From bdd984942226eb1f89bf3716bfce60cbf627470c Mon Sep 17 00:00:00 2001
From: =bhagwanSingh <=bhagwan.r@hicglobalsolutions.com>
Date: Fri, 11 Jul 2025 17:09:00 +0530
Subject: [PATCH] Route Update
---
.../process/processStepOne/ProcessStepOne.tsx | 27 ++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)
diff --git a/src/components/process/processStepOne/ProcessStepOne.tsx b/src/components/process/processStepOne/ProcessStepOne.tsx
index aa15ed3..48e1bc1 100644
--- a/src/components/process/processStepOne/ProcessStepOne.tsx
+++ b/src/components/process/processStepOne/ProcessStepOne.tsx
@@ -53,10 +53,30 @@ const ProcessStepOne = () => {
}, [])
const handleNextClick = async (isSendNow: boolean) => {
- if (!selectedDocuments.length || !selectedRecipients.length) {
+ let formError = {
+ documents: false,
+ recipients: false,
+ subject: false
+ }
+
+ if (!selectedDocuments.length) {
+ formError.documents = true
+ }
+ if (!selectedRecipients.length) {
+ formError.recipients = true
+ }
+ if (!emailDtls.subject.length) {
+ formError.subject = true
+ }
+
+ if (formError.documents || formError.recipients || formError.subject) {
console.log(selectedDocuments, 'line 193')
toast.dismiss();
- toast.error("Add Documents | Recipients First", {
+ toast.error(`${formError.documents ? "Add Document" : ""}
+ ${(formError.documents && formError.recipients) ? " | " : ""}
+ ${formError.recipients ? "Add Recipient" : ""}
+ ${(formError.documents || formError.recipients) ? " | " : ""}
+ ${formError.subject ? "Add Subject" : ""}`, {
position: "top-center",
autoClose: 5000,
hideProgressBar: false,
@@ -218,7 +238,8 @@ const ProcessStepOne = () => {
setEmailDtls({ ...emailDtls, subject: e.target.value })}
placeholder="Email Subject"
className="w-full px-3 py-2 rounded border border-gray-300 focus:outline-none focus:ring-2 focus:ring-[var(--primary)]"