+
+
-
+ setFullName(e.target.value.trimStart())}
+ />
+
-
-
-
-
-
- {
- await completeDocument(undefined, nextSigner);
- }}
- role={recipient.role}
- allowDictateNextSigner={
- nextRecipient && document.documentMeta?.allowDictateNextSigner
- }
- defaultNextSigner={
- nextRecipient
- ? { name: nextRecipient.name, email: nextRecipient.email }
- : undefined
- }
- />
+ )}
+
+
+
+
+
+ {
+ await completeDocument(undefined, nextSigner);
+ }}
+ role={recipient.role}
+ allowDictateNextSigner={
+ nextRecipient && document.documentMeta?.allowDictateNextSigner
+ }
+ defaultNextSigner={
+ nextRecipient
+ ? { name: nextRecipient.name, email: nextRecipient.email }
+ : undefined
+ }
+ />
>
)}
diff --git a/apps/remix/app/components/general/document-signing/document-signing-page-view.tsx b/apps/remix/app/components/general/document-signing/document-signing-page-view.tsx
index e750bae74..a1bf3d24e 100644
--- a/apps/remix/app/components/general/document-signing/document-signing-page-view.tsx
+++ b/apps/remix/app/components/general/document-signing/document-signing-page-view.tsx
@@ -3,6 +3,7 @@ import { useState } from 'react';
import { Trans } from '@lingui/react/macro';
import type { Field } from '@prisma/client';
import { FieldType, RecipientRole } from '@prisma/client';
+import { LucideChevronDown, LucideChevronUp } from 'lucide-react';
import { match } from 'ts-pattern';
import { DEFAULT_DOCUMENT_DATE_FORMAT } from '@documenso/lib/constants/date-formats';
@@ -20,6 +21,7 @@ import type { CompletedField } from '@documenso/lib/types/fields';
import type { FieldWithSignatureAndFieldMeta } from '@documenso/prisma/types/field-with-signature-and-fieldmeta';
import type { RecipientWithFields } from '@documenso/prisma/types/recipient-with-fields';
import { DocumentReadOnlyFields } from '@documenso/ui/components/document/document-read-only-fields';
+import { Button } from '@documenso/ui/primitives/button';
import { Card, CardContent } from '@documenso/ui/primitives/card';
import { ElementVisible } from '@documenso/ui/primitives/element-visible';
import { PDFViewer } from '@documenso/ui/primitives/pdf-viewer';
@@ -62,6 +64,7 @@ export const DocumentSigningPageView = ({
const { documentData, documentMeta } = document;
const [selectedSignerId, setSelectedSignerId] = useState
(allRecipients?.[0]?.id);
+ const [isExpanded, setIsExpanded] = useState(false);
let senderName = document.user.name ?? '';
let senderEmail = `(${document.user.email})`;
@@ -77,15 +80,15 @@ export const DocumentSigningPageView = ({
return (
-
+
{document.title}
-
+
{senderName} {senderEmail}
@@ -135,26 +138,79 @@ export const DocumentSigningPageView = ({
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+ {match(recipient.role)
+ .with(RecipientRole.VIEWER, () => View Document)
+ .with(RecipientRole.SIGNER, () => Sign Document)
+ .with(RecipientRole.APPROVER, () => Approve Document)
+ .with(RecipientRole.ASSISTANT, () => Assist Document)
+ .otherwise(() => null)}
+
+
+
+
+
+
+
+ {match(recipient.role)
+ .with(RecipientRole.VIEWER, () => (
+ Please mark as viewed to complete.
+ ))
+ .with(RecipientRole.SIGNER, () => (
+ Please review the document before signing.
+ ))
+ .with(RecipientRole.APPROVER, () => (
+ Please review the document before approving.
+ ))
+ .with(RecipientRole.ASSISTANT, () => (
+ Complete the fields for the following signers.
+ ))
+ .otherwise(() => null)}
+
+
+
+
+
+
+
+
+
diff --git a/packages/ui/primitives/dialog.tsx b/packages/ui/primitives/dialog.tsx
index 70d3f4afd..59c126fcc 100644
--- a/packages/ui/primitives/dialog.tsx
+++ b/packages/ui/primitives/dialog.tsx
@@ -65,7 +65,11 @@ const DialogContent = React.forwardRef<