feat(contact-us): Add delete functionality to contact us table

- Add delete button with trash icon to contact us table rows
- Implement confirmation modal for delete action
- Create useDeleteContactUs mutation hook with success callback
- Add deleteContactUs method to contact-us service
- Update API endpoints to support BASE() function for dynamic ID routing
- Add state management for modal open/close and current contact selection
- Integrate toast notifications for delete success feedback
- Add tooltip component to delete button for better UX
- Update query key to use BASE() endpoint for consistency
This commit is contained in:
AmirReza Jamali
2025-11-23 13:33:07 +03:30
parent a8d95d5f92
commit 2389ad1bbf
6 changed files with 107 additions and 9 deletions
+1 -1
View File
@@ -62,6 +62,6 @@ export const API_ENDPOINTS = {
MARK_AS_SEEN: (id: string) => `notifications/mark-seen/${id}`,
},
CONTACT_US: {
READ_ALL: "contacts",
BASE: (id?: string) => (id ? `contacts/${id}` : "contacts"),
},
} as const;