pramod_Task-#251: A "Notes" section appears in the contact view modal, allowing users to add a note for the selected contact. #124

Merged
pramod.mahajan merged 26 commits from pramod_Task-#251 into Feature_Directory 2025-05-21 11:00:04 +00:00
2 changed files with 61 additions and 64 deletions
Showing only changes of commit 8a53e2d8de - Show all commits

View File

@ -204,23 +204,22 @@ useEffect(() => {
placeholder="email@example.com" placeholder="email@example.com"
/> />
{index === emailFields.length - 1 ? ( {index === emailFields.length - 1 ? (
<button // <button
type="button" // type="button"
className="btn btn-xs btn-primary ms-1" // className="btn btn-xs btn-primary ms-1"
onClick={handleAddEmail} // onClick={handleAddEmail}
style={{ width: "24px", height: "24px" }} // style={{ width: "24px", height: "24px" }}
> // >
<i className="bx bx-plus-circle bx-xs" /> <i className="bx bx-plus-circle bx-xs ms-1 cursor-pointer" onClick={handleAddEmail} />
</button>
) : ( ) : (
<button // <button
type="button" // type="button"
className="btn btn-xs btn-danger ms-1 p-0" // className="btn btn-xs btn-danger ms-1 p-0"
onClick={() => removeEmail(index)} // onClick={() => removeEmail(index)}
style={{ width: "24px", height: "24px" }} // style={{ width: "24px", height: "24px" }}
> // >
<i className="bx bx-minus-circle bx-xs" /> <i className="bx bx-minus-circle bx-xs ms-1 cursor-pointer" onClick={() => removeEmail(index)} />
</button>
)} )}
</div> </div>
{errors.contactEmails?.[index]?.emailAddress && ( {errors.contactEmails?.[index]?.emailAddress && (
@ -264,23 +263,23 @@ useEffect(() => {
placeholder="9876543210" placeholder="9876543210"
/> />
{index === phoneFields.length - 1 ? ( {index === phoneFields.length - 1 ? (
<button // <button
type="button" // type="button"
className="btn btn-xs btn-primary ms-1" // className="btn btn-xs btn-primary ms-1"
onClick={handleAddPhone} // onClick={handleAddPhone}
style={{ width: "24px", height: "24px" }} // style={{ width: "24px", height: "24px" }}
> // >
<i className="bx bx-plus-circle bx-xs" /> <i className="bx bx-plus-circle bx-xs ms-1 cursor-pointer" onClick={handleAddPhone} />
</button>
) : ( ) : (
<button // <button
type="button" // type="button"
className="btn btn-xs btn-danger ms-1" // className="btn btn-xs btn-danger ms-1"
onClick={() => removePhone(index)} // onClick={() => removePhone(index)}
style={{ width: "24px", height: "24px" }} // style={{ width: "24px", height: "24px" }}
> // >
<i className="bx bx-minus-circle bx-xs" /> <i className="bx bx-minus-circle bx-xs ms-1 cursor-pointer" onClick={() => removePhone(index)} />
</button>
)} )}
</div> </div>
{errors.contactPhones?.[index]?.phoneNumber && ( {errors.contactPhones?.[index]?.phoneNumber && (

View File

@ -239,23 +239,23 @@ await submitContact({ ...cleaned, id: existingContact.id });
placeholder="email@example.com" placeholder="email@example.com"
/> />
{index === emailFields.length - 1 ? ( {index === emailFields.length - 1 ? (
<button // <button
type="button" // type="button"
className="btn btn-xs btn-primary ms-1" // className="btn btn-xs btn-primary ms-1"
onClick={handleAddEmail}
style={{ width: "24px", height: "24px" }} // style={{ width: "24px", height: "24px" }}
> // >
<i className="bx bx-plus-circle bx-xs" /> <i className="bx bx-plus-circle bx-xs ms-1 cursor-pointer" onClick={handleAddEmail}/>
</button>
) : ( ) : (
<button // <button
type="button" // type="button"
className="btn btn-xs btn-danger ms-1 p-0" // className="btn btn-xs btn-danger ms-1 p-0"
onClick={() => removeEmail(index)} // onClick={() => removeEmail(index)}
style={{ width: "24px", height: "24px" }} // style={{ width: "24px", height: "24px" }}
> // >
<i className="bx bx-minus-circle bx-xs" /> <i className="bx bx-minus-circle bx-xs ms-1 cursor-pointer" />
</button>
)} )}
</div> </div>
{errors.contactEmails?.[index]?.emailAddress && ( {errors.contactEmails?.[index]?.emailAddress && (
@ -299,23 +299,21 @@ await submitContact({ ...cleaned, id: existingContact.id });
placeholder="9876543210" placeholder="9876543210"
/> />
{index === phoneFields.length - 1 ? ( {index === phoneFields.length - 1 ? (
<button // <button
type="button" // type="button"
className="btn btn-xs btn-primary ms-1" // className="btn btn-xs btn-primary ms-1"
onClick={handleAddPhone} // onClick={handleAddPhone}
style={{ width: "24px", height: "24px" }} // style={{ width: "24px", height: "24px" }}
> // >
<i className="bx bx-plus-circle bx-xs" /> <i className="bx bx-plus-circle bx-xs ms-1 cursor-pointer" onClick={handleAddPhone} />
</button>
) : ( ) : (
<button // <button
type="button" // type="button"
className="btn btn-xs btn-danger ms-1" // className="btn btn-xs btn-danger ms-1"
onClick={() => removePhone(index)} // onClick={() => removePhone(index)}
style={{ width: "24px", height: "24px" }} // style={{ width: "24px", height: "24px" }}
> // >
<i className="bx bx-minus-circle bx-xs" /> <i className="bx bx-minus-circle bx-xs ms-1 cursor-pointer" onClick={() => removePhone(index)} />
</button>
)} )}
</div> </div>
{errors.contactPhones?.[index]?.phoneNumber && ( {errors.contactPhones?.[index]?.phoneNumber && (