From 07809d663520bb3811baa0459a1e62656dd91e3c Mon Sep 17 00:00:00 2001 From: Pramod Mahajan Date: Sat, 31 May 2025 09:42:54 +0530 Subject: [PATCH 1/5] Fixed conditional rendering logic for Directory project nav item --- src/components/Project/ProjectNav.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Project/ProjectNav.jsx b/src/components/Project/ProjectNav.jsx index 62a09d9b..444c6f03 100644 --- a/src/components/Project/ProjectNav.jsx +++ b/src/components/Project/ProjectNav.jsx @@ -76,7 +76,7 @@ const ProjectNav = ({ onPillClick, activePill }) => { Image Gallary - {DirAdmin || DireManager || DirUser && ( + {(DirAdmin || DireManager || DirUser) && (
  • Date: Sat, 31 May 2025 12:06:40 +0530 Subject: [PATCH 2/5] it able t taking tag from any device --- src/components/common/TagInput.jsx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/components/common/TagInput.jsx b/src/components/common/TagInput.jsx index 6430197e..d0517223 100644 --- a/src/components/common/TagInput.jsx +++ b/src/components/common/TagInput.jsx @@ -77,6 +77,27 @@ useEffect(() => { setTags((prev) => prev.slice(0, -1)); } }; + const handleInputKey = (e) => { + const key = e.key?.toLowerCase(); + + if ((key === "enter" || key === " " || e.code === "Space") && input.trim() !== "") { + e.preventDefault(); + const existing = options.find( + (opt) => opt.name.toLowerCase() === input.trim().toLowerCase() + ); + const newTag = existing + ? existing + : { + id: null, + name: input.trim(), + description: input.trim(), + }; + addTag(newTag); + } else if ((key === "backspace" || e.code === "Backspace") && input === "") { + setTags((prev) => prev.slice(0, -1)); + } +}; + const handleSuggestionClick = (suggestion) => { addTag(suggestion); @@ -122,6 +143,7 @@ useEffect(() => { value={input} onChange={(e) => setInput(e.target.value)} onKeyDown={handleInputKeyDown} + onKeyUp={handleInputKey} placeholder={placeholder} style={{ border: "none", From d826acbb45a12ee893ec87ddba1f451fe49a345e Mon Sep 17 00:00:00 2001 From: Pramod Mahajan Date: Sat, 31 May 2025 12:07:31 +0530 Subject: [PATCH 3/5] fixed width 100 % for editor --- src/components/common/TextEditor/Editor.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/common/TextEditor/Editor.css b/src/components/common/TextEditor/Editor.css index a48c4638..7cf42a6a 100644 --- a/src/components/common/TextEditor/Editor.css +++ b/src/components/common/TextEditor/Editor.css @@ -1,5 +1,5 @@ .editor-wrapper { - max-width: 800px; + max-width: 100%; margin: 1px auto; background: #fff; From dbf7178db0d87138395535d305a9b77fc99c5fb3 Mon Sep 17 00:00:00 2001 From: Pramod Mahajan Date: Sat, 31 May 2025 12:08:47 +0530 Subject: [PATCH 4/5] Replaced inline styles with Bootstrap utility classes --- .../Directory/CardViewDirectory.jsx | 38 ++++++------- .../Directory/ProfileContactDirectory.jsx | 53 ++++++++----------- 2 files changed, 43 insertions(+), 48 deletions(-) diff --git a/src/components/Directory/CardViewDirectory.jsx b/src/components/Directory/CardViewDirectory.jsx index 519d1b7f..9ac982c6 100644 --- a/src/components/Directory/CardViewDirectory.jsx +++ b/src/components/Directory/CardViewDirectory.jsx @@ -94,14 +94,15 @@ const CardViewDirectory = ({ -
      -
    • - -
    • -
    • - {contact.organization} -
    • -
    +
      +
    • + +
    • +
    • + {contact.organization} +
    • +
    +

    - {contact.contactEmails[0] && ( -
      -
    • - -
    • -
    • - {contact.contactEmails[0]?.emailAddress} -
    • -
    - )} + {contact.contactEmails[0] && ( +
      +
    • + +
    • +
    • + {contact.contactEmails[0].emailAddress} +
    • +
    +)} + {contact.contactPhones[0] && (
      diff --git a/src/components/Directory/ProfileContactDirectory.jsx b/src/components/Directory/ProfileContactDirectory.jsx index 274b0d22..8494f2c6 100644 --- a/src/components/Directory/ProfileContactDirectory.jsx +++ b/src/components/Directory/ProfileContactDirectory.jsx @@ -58,23 +58,22 @@ const ProfileContactDirectory = ({ contact, setOpen_contact, closeModal }) => {

      Email:

      -
      -
        +
        +
          {contactProfile.contactEmails.map((email, idx) => ( -
        • - - {email.emailAddress} +
        • + + + {email.emailAddress} + handleCopy(email.emailAddress, idx)} >
        • @@ -103,33 +102,28 @@ const ProfileContactDirectory = ({ contact, setOpen_contact, closeModal }) => { )} {contactProfile?.createdAt && ( -
          +

          Created :

          -
          -
            +
          • {moment(contactProfile.createdAt).format("MMMM, DD YYYY")}
          • -
          )} - {contactProfile?.address && (
          -

          Location :

          +

          Location:

          -
          -
            -
          • - - {contactProfile?.address} -
          • -
          +
          + + + {contactProfile.address} +
          )} @@ -141,13 +135,12 @@ const ProfileContactDirectory = ({ contact, setOpen_contact, closeModal }) => {

          Orgnization :

          -
          -
            -
          • - - {contactProfile.organization} -
          • -
          +
          + + + + {contactProfile.organization} +
          )} From 6819bfbb52bf5f399a9600d00e478efad871ad8e Mon Sep 17 00:00:00 2001 From: Pramod Mahajan Date: Sat, 31 May 2025 12:09:46 +0530 Subject: [PATCH 5/5] Update modal size from lg to xl for improved layout on larger screens --- src/pages/Directory/Directory.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Directory/Directory.jsx b/src/pages/Directory/Directory.jsx index ad3e1052..e09d158f 100644 --- a/src/pages/Directory/Directory.jsx +++ b/src/pages/Directory/Directory.jsx @@ -274,7 +274,7 @@ const handleDeleteContact = async (overrideId = null) => { setOpen_contact(null); setIsOpenModalNote(false); }} - size="lg" + size="xl" > {open_contact && (