From c3643683c86b6a7bc08897edac5327b0d85f209b Mon Sep 17 00:00:00 2001 From: Pramod Mahajan Date: Tue, 27 May 2025 12:31:48 +0530 Subject: [PATCH 01/32] added filter action while apply filter --- src/pages/Directory/DirectoryPageHeader.jsx | 124 +++++++++++++------- 1 file changed, 79 insertions(+), 45 deletions(-) diff --git a/src/pages/Directory/DirectoryPageHeader.jsx b/src/pages/Directory/DirectoryPageHeader.jsx index c3ae03cd..fcf603f4 100644 --- a/src/pages/Directory/DirectoryPageHeader.jsx +++ b/src/pages/Directory/DirectoryPageHeader.jsx @@ -1,4 +1,4 @@ -import React from "react"; +import React, { useEffect, useState } from "react"; const DirectoryPageHeader = ({ searchText, @@ -16,14 +16,19 @@ const DirectoryPageHeader = ({ applyFilter, loading, IsActive, - setIsOpenModal, - setOpenBucketModal + setIsOpenModal, + setOpenBucketModal, }) => { + const [filtered, setFiltered] = useState(); + + useEffect(() => { + setFiltered( + tempSelectedBucketIds?.length + tempSelectedCategoryIds?.length + ); + }, [tempSelectedBucketIds, tempSelectedCategoryIds]); return ( <> -
- -
+
    -

    +

    Filter by

    {/* Bucket Filter */}
    -

    Buckets

    +

    Buckets

    {filteredBuckets.map(({ id, name }) => (
    handleTempBucketChange(id)} />
    @@ -55,20 +55,19 @@ const CardViewDirectory = ({ setSelectedContact(contact); setIsOpenModal(true); }} - > - - - Modify + + + Modify
  • IsDeleted(contact.id)} > - - Delete + + Delete
@@ -80,7 +79,7 @@ const CardViewDirectory = ({
  • -
  • +
  • {contact.organization}
  • @@ -96,52 +95,54 @@ const CardViewDirectory = ({ >
    {contact.contactEmails[0] && ( -
      +
      • - +
      • -
      • +
      • {contact.contactEmails[0]?.emailAddress}
      )} {contact.contactPhones[0] && ( -
        -
      • +
          +
        • -
        • +
        • {contact.contactPhones[0]?.phoneNumber}
        )}
          -
        • - +
        • + +
        • -
        • +
        • {contact.contactCategory.name}
        -
          - {contact.bucketIds.map((bucketId) => ( - -
        • - -
        • -
        • - {getBucketNameById(buckets, bucketId)} -
        • -
          - ))} -
        +
          + {contact.bucketIds?.map((bucketId) => ( +
        • + + + + {getBucketNameById(buckets, bucketId)} + + +
        • + ))} +
        +
    ); -- 2.43.0 From dd35de14a7538a05593ce5a0a882db43e4e44cd6 Mon Sep 17 00:00:00 2001 From: Pramod Mahajan Date: Tue, 27 May 2025 12:35:23 +0530 Subject: [PATCH 03/32] removed project select validation, it no longer required --- src/components/Directory/DirectorySchema.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Directory/DirectorySchema.js b/src/components/Directory/DirectorySchema.js index 3d30292f..1b61c4ac 100644 --- a/src/components/Directory/DirectorySchema.js +++ b/src/components/Directory/DirectorySchema.js @@ -6,7 +6,7 @@ export const ContactSchema = z contactCategoryId: z.string().nullable().optional(), address: z.string().optional(), description: z.string().min(1, { message: "Description is required" }), - projectIds: z.array(z.string()).min(1, "Project is required"), + projectIds: z.array(z.string()), // min(1, "Project is required") contactEmails: z .array( z.object({ -- 2.43.0 From 5287b40cd04f1d14854ccc782ce1ffe2883d9108 Mon Sep 17 00:00:00 2001 From: Pramod Mahajan Date: Tue, 27 May 2025 12:37:02 +0530 Subject: [PATCH 04/32] changed font size --- src/components/Directory/ManageBucket.jsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/Directory/ManageBucket.jsx b/src/components/Directory/ManageBucket.jsx index d3a5d5c3..ae7551e3 100644 --- a/src/components/Directory/ManageBucket.jsx +++ b/src/components/Directory/ManageBucket.jsx @@ -89,7 +89,7 @@ const ManageBucket = () => return (
    -

    Manage Buckets

    +

    Manage Buckets

    >