From 8539c0d647b8c9559bae202b04a5642018a64877 Mon Sep 17 00:00:00 2001 From: Timur Ercan Date: Tue, 21 Feb 2023 12:10:04 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20download=20after=20signing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/pages/documents/[id]/signed.tsx | 40 +++++++++++++++++++++--- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/apps/web/pages/documents/[id]/signed.tsx b/apps/web/pages/documents/[id]/signed.tsx index 6950dd1c8..413c360ca 100644 --- a/apps/web/pages/documents/[id]/signed.tsx +++ b/apps/web/pages/documents/[id]/signed.tsx @@ -1,12 +1,17 @@ import prisma from "@documenso/prisma"; import Head from "next/head"; import { NextPageWithLayout } from "../../_app"; -import { ReadStatus } from "@prisma/client"; -import { CheckBadgeIcon } from "@heroicons/react/24/outline"; -import { Button } from "@documenso/ui"; +import { ArrowDownTrayIcon, CheckBadgeIcon } from "@heroicons/react/24/outline"; +import { Button, IconButton } from "@documenso/ui"; import Link from "next/link"; +import { useRouter } from "next/router"; const SignPage: NextPageWithLayout = (props: any) => { + const router = useRouter(); + const allRecipientsSigned = props.document.Recipient?.every( + (r: any) => r.signingStatus === "SIGNED" + ); + return ( <> @@ -20,9 +25,34 @@ const SignPage: NextPageWithLayout = (props: any) => {

You signed "{props.document.title}"

-

+

+ +
@@ -53,7 +83,7 @@ export async function getServerSideProps(context: any) { token: recipientToken, }, include: { - Document: true, + Document: { include: { Recipient: true } }, }, });