mirror of
https://github.com/documenso/documenso.git
synced 2025-11-17 02:01:33 +10:00
wip: create document workflow
This commit is contained in:
@ -30,7 +30,7 @@ export default async function DashboardPage() {
|
||||
findDocuments({
|
||||
userId: session.id,
|
||||
perPage: 10,
|
||||
}).then((r) => ({ ...r, data: [] })),
|
||||
}),
|
||||
]);
|
||||
|
||||
return (
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
'use client';
|
||||
|
||||
import { Suspense } from 'react';
|
||||
|
||||
import dynamic from 'next/dynamic';
|
||||
|
||||
import { Loader } from 'lucide-react';
|
||||
@ -15,7 +13,7 @@ export type LoadablePDFCard = PDFViewerProps & {
|
||||
pdfClassName?: string;
|
||||
};
|
||||
|
||||
const PDFCard = dynamic(async () => import('~/components/(dashboard)/pdf-viewer/pdf-viewer'), {
|
||||
const PDFViewer = dynamic(async () => import('~/components/(dashboard)/pdf-viewer/pdf-viewer'), {
|
||||
ssr: false,
|
||||
loading: () => (
|
||||
<div className="flex min-h-[80vh] flex-col items-center justify-center bg-white/50">
|
||||
@ -30,7 +28,7 @@ export const LoadablePDFCard = ({ className, pdfClassName, ...props }: LoadableP
|
||||
return (
|
||||
<Card className={className} gradient {...props}>
|
||||
<CardContent className="p-2">
|
||||
<PDFCard className={pdfClassName} {...props} />
|
||||
<PDFViewer className={pdfClassName} {...props} />
|
||||
</CardContent>
|
||||
</Card>
|
||||
);
|
||||
|
||||
@ -5,9 +5,8 @@ import { ChevronLeft } from 'lucide-react';
|
||||
|
||||
import { getRequiredServerComponentSession } from '@documenso/lib/next-auth/get-server-session';
|
||||
import { getDocumentById } from '@documenso/lib/server-only/document/get-document-by-id';
|
||||
import { Button } from '@documenso/ui/primitives/button';
|
||||
|
||||
import { LoadablePDFCard } from './loadable-pdf-card';
|
||||
import { EditDocumentForm } from '~/components/forms/edit-document';
|
||||
|
||||
export type DocumentPageProps = {
|
||||
params: {
|
||||
@ -49,46 +48,7 @@ export default async function DocumentPage({ params }: DocumentPageProps) {
|
||||
Document.pdf
|
||||
</h1>
|
||||
|
||||
<div className="mt-8 grid w-full grid-cols-12 gap-x-8">
|
||||
<LoadablePDFCard
|
||||
className="col-span-7 rounded-xl before:rounded-xl"
|
||||
document={document.document}
|
||||
/>
|
||||
|
||||
<div className="relative col-span-5">
|
||||
<div className="sticky top-20 flex max-h-screen min-h-[calc(100vh-6rem)] flex-col rounded-xl border bg-[hsl(var(--widget))] px-4 py-6">
|
||||
<h3 className="text-2xl font-semibold">Add Signers</h3>
|
||||
|
||||
<p className="mt-2 text-sm text-black/30">Add the people who will sign the document.</p>
|
||||
|
||||
<hr className="mb-8 mt-4" />
|
||||
|
||||
<div className="flex-1"></div>
|
||||
|
||||
<div className="">
|
||||
<p className="text-sm text-black/30">Add Signers (1/3)</p>
|
||||
|
||||
<div className="relative mt-4 h-[2px] rounded-md bg-slate-300">
|
||||
<div className="bg-primary absolute inset-y-0 left-0 w-1/3" />
|
||||
</div>
|
||||
|
||||
<div className="mt-4 flex gap-x-4">
|
||||
<Button
|
||||
className="flex-1 bg-black/5 hover:bg-black/10"
|
||||
size="lg"
|
||||
variant="secondary"
|
||||
>
|
||||
Go Back
|
||||
</Button>
|
||||
|
||||
<Button className="flex-1" size="lg">
|
||||
Continue
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<EditDocumentForm className="mt-8" document={document} user={session} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user