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
Showing only changes of commit 7f8784bf6a - Show all commits

View File

@ -42,16 +42,16 @@ export const ContactSchema = z
bucketIds: z.array(z.string()).optional(), bucketIds: z.array(z.string()).optional(),
}) })
.refine((data) => { // .refine((data) => {
const hasValidEmail = (data.contactEmails || []).some( // const hasValidEmail = (data.contactEmails || []).some(
(e) => e.emailAddress?.trim() !== "" // (e) => e.emailAddress?.trim() !== ""
); // );
const hasValidPhone = (data.contactPhones || []).some( // const hasValidPhone = (data.contactPhones || []).some(
(p) => p.phoneNumber?.trim() !== "" // (p) => p.phoneNumber?.trim() !== ""
); // );
return hasValidEmail || hasValidPhone; // return hasValidEmail || hasValidPhone;
}, { // }, {
message: "At least one contact (email or phone) is required", // message: "At least one contact (email or phone) is required",
path: ["contactPhone"], // path: ["contactPhone"],
}); // });