wip: create document workflow

This commit is contained in:
Mythie
2023-06-10 22:33:12 +10:00
parent 159bcade7b
commit cc182649c2
9 changed files with 506 additions and 54 deletions

View File

@ -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>
);
}