diff --git a/src/components/Directory/DirectorySchema.js b/src/components/Directory/DirectorySchema.js index bdf3b99d..eb830e17 100644 --- a/src/components/Directory/DirectorySchema.js +++ b/src/components/Directory/DirectorySchema.js @@ -81,21 +81,21 @@ export const defaultContactValue = { }; export const contactsFilter = z.object({ - buckets: z.array(z.string()).optional(), - contactCategories: z.array(z.string()).optional(), + bucketIds: z.array(z.string()).optional(), + categoryIds: z.array(z.string()).optional(), }); export const defaultContactFilter = { - buckets: [], - contactCategories: [], + bucketIds: [], + categoryIds: [], }; export const notesFilter = z.object({ - createdBy: z.array(z.string()).optional(), + createdByIds: z.array(z.string()).optional(), organizations: z.array(z.string()).optional(), }); export const defaultNotesFilter = { - createdBy: [], + createdByIds: [], organizations: [], }; diff --git a/src/hooks/useDirectory.js b/src/hooks/useDirectory.js index 523fa5a3..28869f9a 100644 --- a/src/hooks/useDirectory.js +++ b/src/hooks/useDirectory.js @@ -243,7 +243,7 @@ export const useDirectoryNotes = ( const cleanFilter = (filter) => { const cleaned = { ...filter }; - ["bucketIds", "contactCategories"].forEach((key) => { + ["bucketIds", "categoryIds"].forEach((key) => { if (Array.isArray(cleaned[key]) && cleaned[key].length === 0) { delete cleaned[key]; } @@ -307,7 +307,7 @@ export const useContactDetails = (contactId) => { const cleanNoteFilter = (filter) => { const cleaned = { ...filter }; - ["bucketIds", "contactCategories"].forEach((key) => { + ["createdByIds", "organizations"].forEach((key) => { if (Array.isArray(cleaned[key]) && cleaned[key].length === 0) { delete cleaned[key]; } diff --git a/src/pages/Directory/ContactFilterPanel.jsx b/src/pages/Directory/ContactFilterPanel.jsx index 642f98f6..c6556914 100644 --- a/src/pages/Directory/ContactFilterPanel.jsx +++ b/src/pages/Directory/ContactFilterPanel.jsx @@ -42,14 +42,14 @@ const ContactFilterPanel = ({ onApply, clearFilter }) => {