🚧 signign workflow

This commit is contained in:
Timur Ercan
2023-02-17 13:37:28 +01:00
parent ad86b20498
commit 5a3dd547b8
4 changed files with 141 additions and 27 deletions

View File

@ -0,0 +1,46 @@
import prisma from "@documenso/prisma";
import Head from "next/head";
import { NextPageWithLayout } from "../../_app";
import { ReadStatus } from "@prisma/client";
const SignPage: NextPageWithLayout = (props: any) => {
return (
<>
<Head>
<title>Sign | Documenso</title>
</Head>
You signed,thanks for playing.
</>
);
};
export async function getServerSideProps(context: any) {
const recipientToken: string = context.query["token"];
const recipient = await prisma.recipient.findFirstOrThrow({
where: {
token: recipientToken,
},
include: {
Document: true,
},
});
const fields = await prisma.field.findMany({
where: {
documentId: recipient.Document.id,
},
include: {
Recipient: true,
},
});
return {
props: {
document: recipient.Document,
fields: fields,
},
};
}
export default SignPage;