diff --git a/apps/remix/app/components/general/document-signing/document-signing-page-view-v2.tsx b/apps/remix/app/components/general/document-signing/document-signing-page-view-v2.tsx index 57a37bd0c..f29747e5e 100644 --- a/apps/remix/app/components/general/document-signing/document-signing-page-view-v2.tsx +++ b/apps/remix/app/components/general/document-signing/document-signing-page-view-v2.tsx @@ -1,15 +1,23 @@ -import { useMemo, useRef } from 'react'; +import { useMemo, useRef, useState } from 'react'; -import { Plural, Trans } from '@lingui/react/macro'; +import { Plural, Trans, useLingui } from '@lingui/react/macro'; import { EnvelopeType, RecipientRole } from '@prisma/client'; import { motion } from 'framer-motion'; -import { ArrowLeftIcon, BanIcon, DownloadCloudIcon, PaperclipIcon } from 'lucide-react'; +import { + ArrowLeftIcon, + BanIcon, + DownloadCloudIcon, + PanelLeftCloseIcon, + PanelLeftOpenIcon, + PaperclipIcon, +} from 'lucide-react'; import { Link } from 'react-router'; import { match } from 'ts-pattern'; import { useCurrentEnvelopeRender } from '@documenso/lib/client-only/providers/envelope-render-provider'; import { PDF_VIEWER_ERROR_MESSAGES } from '@documenso/lib/constants/pdf-viewer-i18n'; import { mapSecondaryIdToDocumentId } from '@documenso/lib/utils/envelope'; +import { cn } from '@documenso/ui/lib/utils'; import { Button } from '@documenso/ui/primitives/button'; import { Separator } from '@documenso/ui/primitives/separator'; @@ -57,6 +65,9 @@ export const DocumentSigningPageViewV2 = () => { onDocumentRejected, } = useEmbedSigningContext() || {}; + const { t } = useLingui(); + const [isSidebarCollapsed, setIsSidebarCollapsed] = useState(false); + /** * The total remaining fields remaining for the current recipient or selected assistant recipient. * @@ -86,121 +97,157 @@ export const DocumentSigningPageViewV2 = () => { {/* Main Content Area */}
{/* Left Section - Step Navigation */} -
-
-

- {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)} - - - - -

- -
- -
- -
- -
-
- - - - {/* Quick Actions. */} - {!isDirectTemplate && ( -
-

- Actions -

- - - - Attachments - - } - /> - - - - Download PDF - - } - /> - - {envelope.type === EnvelopeType.DOCUMENT && allowDocumentRejection && ( - - onDocumentRejected({ - token: recipient.token, - documentId: mapSecondaryIdToDocumentId(envelope.secondaryId), - envelopeId: envelope.id, - recipientId: recipient.id, - reason, - })) - } - trigger={ - - } - /> - )} +