diff --git a/apps/web/pages/documents/[id]/index.tsx b/apps/web/pages/documents/[id]/index.tsx
index 69a466bf8..a7dd92cfa 100644
--- a/apps/web/pages/documents/[id]/index.tsx
+++ b/apps/web/pages/documents/[id]/index.tsx
@@ -9,6 +9,18 @@ import prisma from "@documenso/prisma";
import { getUserFromToken } from "@documenso/lib/server";
import Logo from "../../../components/logo";
import Link from "next/link";
+import { DocumentStatus } from "@prisma/client";
+import {
+ BriefcaseIcon,
+ CalendarIcon,
+ ChevronLeftIcon,
+ ChevronRightIcon,
+ CurrencyDollarIcon,
+ InformationCircleIcon,
+ MapPinIcon,
+ PaperAirplaneIcon,
+ UsersIcon,
+} from "@heroicons/react/24/outline";
const PDFViewer = dynamic(() => import("../../../components/pdf-viewer"), {
ssr: false,
@@ -18,27 +30,104 @@ const DocumentsDetailPage: NextPageWithLayout = (props: any) => {
const router = useRouter();
return (
-
-
+
+
-
- {props.document.title}
-
-
- Add Signers
-
+
+
+
+
+
+
+ {props.document.title}
+
+
+
+
+ {props?.document?.Recipient?.length} Recipients
+
+
+
+ {formatDocumentStatus(props.document.status)}
+
+
+
+
+
+ Edit Recipients
+
+
+
-
+
@@ -47,6 +136,19 @@ const DocumentsDetailPage: NextPageWithLayout = (props: any) => {
);
};
+function formatDocumentStatus(status: DocumentStatus) {
+ switch (status) {
+ case DocumentStatus.DRAFT:
+ return "Draft";
+
+ case DocumentStatus.PENDING:
+ return "Pending";
+
+ case DocumentStatus.COMPLETED:
+ return "Completed";
+ }
+}
+
export async function getServerSideProps(context: any) {
const user = await getUserFromToken(context.req, context.res);
if (!user) return;
@@ -56,6 +158,9 @@ export async function getServerSideProps(context: any) {
where: {
id: +documentId,
},
+ include: {
+ Recipient: true,
+ },
});
// todo optimize querys