+
+ {/* Last Name */}
+
handleFocus("lastName")}
onBlur={handleContactModalBlur}
value={recipient.lastName}
placeholder="Last Name"
- className={` w-full px-4 py-2 border rounded-md text-sm focus:outline-none transition
- ${errors.lastName ? 'border-red-500 ring-2 ring-red-300' : 'border-gray-300 focus:ring-2 focus:ring-[var(--primary)]'}`}
+ className={`w-full px-3 sm:px-4 py-2 border rounded-md text-sm focus:outline-none transition
+ ${errors.lastName ? 'border-red-500 ring-2 ring-red-300' : 'border-gray-300 focus:ring-2 focus:ring-[var(--primary)]'}`}
onChange={(e) => {
setRecipients({ ...recipient, lastName: e.target.value });
setErrors((prev) => ({ ...prev, lastName: false }));
@@ -492,15 +472,17 @@ const RecipientAddCard = ({ transactionTemplateToggle, editRecipient, editCase,
Last Name is required
)}
-
+ {/* Host Fields for In-Person Signers */}
+ {recipient.type === recipientType.INPERSONSIGNER && (
+
+ setOpenContactModal(true)}
+ onBlur={handleContactModalBlur}
+ value={recipient.hostName}
+ placeholder="Host Name"
+ className="w-full px-3 sm:px-4 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-[var(--primary)] transition"
+ onChange={(e) => setRecipients({ ...recipient, hostName: e.target.value })}
+ />
+ setOpenContactModal(true)}
+ onBlur={handleContactModalBlur}
+ value={recipient.hostEmail}
+ placeholder="Host Email"
+ className="w-full px-3 sm:px-4 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-[var(--primary)] transition"
+ onChange={(e) => setRecipients({ ...recipient, hostEmail: e.target.value })}
+ />
+
+ )}
- {recipient.type === recipientType.INPERSONSIGNER &&
- setOpenContactModal(true)}
- onBlur={handleContactModalBlur}
- value={recipient.hostName}
- placeholder="Host Name"
- className="w-full px-4 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-[var(--primary)] transition"
- onChange={(e) => setRecipients({ ...recipient, hostName: e.target.value })}
- />
- setOpenContactModal(true)}
- onBlur={handleContactModalBlur}
- value={recipient.hostEmail}
- placeholder="Host Email"
- className="w-full px-4 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-[var(--primary)] transition"
- onChange={(e) => setRecipients({ ...recipient, hostEmail: e.target.value })}
- />
-
}
-
- {/* Contact Modal */}
+ {/* Contact Modal - Responsive Positioning */}
{openContactModal && contactData.contacts.length > 0 && (
-
+
)}
-
-
- {/* Signing options + Add button in one line */}
-
-
+ {/* Signing Options and Add Button - Responsive Layout */}
+
+ {/* Recipient Type Radio Options */}
+
{[
{ label: "Signer", value: recipientType.SIGNER },
{ label: "In Person Signer", value: recipientType.INPERSONSIGNER },
{ label: "CC", value: recipientType.CC },
].map((option) => (
-
- {!showCard &&
}
+ {/* Add/Edit Button */}
+ {!showCard && (
+
+ )}
diff --git a/src/components/process/processStepOne/RecipientCards.tsx b/src/components/process/processStepOne/RecipientCards.tsx
index 608257e..aa0626b 100644
--- a/src/components/process/processStepOne/RecipientCards.tsx
+++ b/src/components/process/processStepOne/RecipientCards.tsx
@@ -121,7 +121,7 @@ const RecipientCards = ({
return currentValue && currentValue.toString().trim() !== "";
};
- const renderEditableField = (
+ const renderEditableField = (
recipient: any,
fieldName: string,
placeholder: string,
@@ -134,7 +134,7 @@ const RecipientCards = ({
const editable = isEditable(recipient);
return (
-
+
@@ -215,17 +215,17 @@ const RecipientCards = ({
setEditingField(null);
};
- return (
+ return (
{recipients.length > 0 ? (
<>
{recipients.length > 1 && (
-
+
Recipients ({recipients.length})
setSigningOrderModal({ ...signingOrderModal, open: true })}
>
Signing Order
@@ -238,14 +238,16 @@ const RecipientCards = ({
{recipients.map((recipient, idx) => (
-
+ {/* Main Content Section */}
+
+ {/* Order Number */}
{recipients.length > 1 ? (
-
+
) : (
@@ -271,25 +273,30 @@ const RecipientCards = ({
Number(e.target.value)
)
}
- className="w-8 text-center rounded text-sm text-gray-700 border-none focus:outline-none focus:ring-[var(--primary)]"
+ className="w-6 sm:w-8 text-center rounded text-sm text-gray-700 border-none focus:outline-none focus:ring-[var(--primary)] flex-shrink-0"
/>
)}
-
+
+ {/* Avatar */}
+
{getInitials(`${recipient.firstName} ${recipient.lastName || ""}`)}
-
-
-
+
+ {/* Form Fields Section */}
+
+ {/* Role Name and Permissions Row */}
+
+
{renderEditableField(recipient, "roleName", "Role name")}
-
+
+ {/* Permissions - Mobile: Below role, Desktop: Right side */}
+
{transactionTemplateToggle === TRANSACTION_TEMPLATE_TOGGLE.TEMPLATES && (
-
+
-
-
-
-
-
- {renderEditableField(recipient, "firstName", "First Name")}
- {renderEditableField(recipient, "lastName", "Last Name")}
- {renderEditableField(recipient, "email", "Recipient Email", "", "email")}
-
-
-
- {recipient.type === recipientType.INPERSONSIGNER && (
-
-
-
- {renderEditableField(recipient, "hostName", "Host Name")}
- {renderEditableField(recipient, "hostEmail", "Host Email", "", "email")}
+ {/* Name and Email Fields */}
+
+ {/* Mobile: Stack vertically, Tablet+: Side by side */}
+
+
+
+
+ {renderEditableField(recipient, "firstName", "First Name")}
+
+
+
+
+ {renderEditableField(recipient, "lastName", "Last Name")}
+
+
+
+
+
+ {renderEditableField(recipient, "email", "Recipient Email", "", "email")}
+
+
+ {/* Host Fields (for In-Person Signers) */}
+ {recipient.type === recipientType.INPERSONSIGNER && (
+
+
+
+
+ {renderEditableField(recipient, "hostName", "Host Name")}
+
+
+
+
+ {renderEditableField(recipient, "hostEmail", "Host Email", "", "email")}
+
+
+
+
)}
-
+ {/* Action Buttons */}
{signType !== "self-sign" && (
-
+
)}
@@ -415,24 +447,27 @@ const RecipientCards = ({
>
) : (
-
+
No Recipients Added
)}
+ {/* Responsive Modal */}
{signingOrderModal.open && (
-
-
-
-
Signing Order
+
+
+
+
Signing Order
setSigningOrderModal({ ...signingOrderModal, open: false })}
- className="text-xl cursor-pointer hover:text-gray-200 transition-all"
+ className="text-xl sm:text-2xl cursor-pointer hover:text-gray-200 transition-all p-1"
>
-
+
+
+
)}
diff --git a/src/components/process/processStepOne/SelectedDocuments.tsx b/src/components/process/processStepOne/SelectedDocuments.tsx
index b479bb1..6dbf3b3 100644
--- a/src/components/process/processStepOne/SelectedDocuments.tsx
+++ b/src/components/process/processStepOne/SelectedDocuments.tsx
@@ -90,15 +90,26 @@ const SelectedDocuments = ({ transactionTemplateToggle }) => {
// Get proper Tailwind class names for upload card span
const getUploadCardSpanClass = () => {
- switch (docCount) {
- case 0: return 'col-span-5'; // Full width when no docs
- case 1: return 'col-span-4'; // 4 cols for upload, 1 for doc
- case 2: return 'col-span-3'; // 3 cols for upload, 2 for docs
- case 3: return 'col-span-2'; // 2 cols for upload, 3 for docs
- case 4: return 'col-span-1'; // 1 col for upload, 4 for docs
- default: return 'col-span-1'; // 1 col for upload, rest for docs
- }
- };
+ if (docCount === 0) {
+ // Upload card takes all columns only when no docs
+ return "col-span-1 sm:col-span-2 md:col-span-3 lg:col-span-4 xl:col-span-5";
+ }
+
+ switch (docCount) {
+ case 1:
+ return "col-span-1 sm:col-span-1 md:col-span-2 lg:col-span-3 xl:col-span-4";
+ case 2:
+ return "col-span-1 sm:col-span-1 md:col-span-1 lg:col-span-2 xl:col-span-3";
+ case 3:
+ return "col-span-1 sm:col-span-1 md:col-span-1 lg:col-span-1 xl:col-span-2";
+ case 4:
+ return "col-span-1"; // balanced
+ default:
+ return "col-span-1";
+ }
+};
+
+
// Calculate how many documents should be in the first row
const getFirstRowDocCount = () => {
@@ -113,150 +124,153 @@ const SelectedDocuments = ({ transactionTemplateToggle }) => {
return (
<>
{/* Upload Card First */}
-
-
- {/* Upload Document Card - Always First */}
+
setModalOpen(true)}
- className={`${getUploadCardSpanClass()} cursor-pointer h-[170px] flex flex-col items-center justify-center border-2 border-dashed border-gray-300 rounded-xl bg-white hover:bg-gray-50 transition shadow-sm hover:shadow-md`}
+ id="upload-doc-step-one"
+ className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-5 gap-2"
>
-
-
Upload Document
+ {/* Upload Document Card */}
+
setModalOpen(true)}
+ className={`${getUploadCardSpanClass()} cursor-pointer h-[170px] flex flex-col items-center justify-center border-2 border-dashed border-gray-300 rounded-xl bg-white hover:bg-gray-50 transition shadow-sm hover:shadow-md`}
+ >
+
+
Upload Document
+
+
+ {/* First Row Documents */}
+
({ ...doc }))}
+ setList={(newState) => {
+ const updatedDocs = [...newState, ...documents.slice(firstRowDocCount)];
+ dispatch(setDocuments(updatedDocs));
+ }}
+ handle=".drag-handle"
+ animation={200}
+ ghostClass="sortable-ghost"
+ disabled={false}
+ >
+ {documents.slice(0, firstRowDocCount).map((doc) => (
+
+
+
+ ))}
+
- {/* First Row Documents */}
-
({ ...doc }))}
- setList={(newState) => {
- const updatedDocs = [
- ...newState,
- ...documents.slice(firstRowDocCount)
- ];
- dispatch(setDocuments(updatedDocs));
- }}
- handle=".drag-handle"
- animation={200}
- ghostClass="sortable-ghost"
- disabled={false}
- >
- {documents.slice(0, firstRowDocCount).map((doc) => (
-
-
-
- ))}
-
-
+ {/* Additional Rows */}
+ {remainingDocs > 0 && (
+
({ ...doc }))}
+ setList={(newState) => {
+ const updatedDocs = [
+ ...documents.slice(0, firstRowDocCount),
+ ...newState,
+ ];
+ dispatch(setDocuments(updatedDocs));
+ }}
+ handle=".drag-handle"
+ animation={200}
+ ghostClass="sortable-ghost"
+ disabled={false}
+ >
+ {documents.slice(firstRowDocCount).map((doc) => (
+
+
+
+ ))}
+
+ )}
- {/* Additional Rows - Remaining Documents (5th, 6th, 7th, etc.) */}
- {remainingDocs > 0 && (
-
({ ...doc }))}
- setList={(newState) => {
- const updatedDocs = [
- ...documents.slice(0, firstRowDocCount),
- ...newState
- ];
- dispatch(setDocuments(updatedDocs));
- }}
- handle=".drag-handle"
- animation={200}
- ghostClass="sortable-ghost"
- disabled={false}
- >
- {documents.slice(firstRowDocCount).map((doc) => (
-
-
-
- ))}
-
- )}
+ {/* Modal */}
+ {isModalOpen && (
+
+
+ {/* Close Button */}
+
-
- {/* Modal */}
- {isModalOpen && (
-
-
- {/* Close Button */}
-
-
- {/* Sidebar Tabs */}
-
- {tabs.map(tab => (
-
- ))}
-
-
- {/* Modal Content */}
-
- {activeTab === 'Upload' && (
-
fileInputRef.current?.click()}
- onDragOver={(e) => e.preventDefault()}
- onDrop={handleDrop}
- className="flex flex-col items-center justify-center h-full border-2 border-dashed border-gray-300 rounded-xl p-6 text-center cursor-pointer hover:bg-gray-50"
- >
-
-
Drag & drop files here or
-
+
+ {/* Modal Content */}
+
+ {activeTab === "Upload" && (
+
fileInputRef.current?.click()}
+ onDragOver={(e) => e.preventDefault()}
+ onDrop={handleDrop}
+ className="flex flex-col items-center justify-center h-full border-2 border-dashed border-gray-300 rounded-xl p-6 text-center cursor-pointer hover:bg-gray-50"
+ >
+
+
+ Drag & drop files here or
+
+
+ Browse Files
+
+
+
+ )}
+ {activeTab !== "Upload" && (
+
+
{activeTab} integration coming soon...
+
+ )}
+
-
- )}
-
+ )}
+
>
);
};