feat: improve admin panel

This commit is contained in:
Mythie
2024-03-03 01:55:33 +11:00
parent 328d16483c
commit 73aae6f1e3
19 changed files with 824 additions and 169 deletions

View File

@ -0,0 +1,26 @@
import { prisma } from '@documenso/prisma';
export type GetEntireDocumentOptions = {
id: number;
};
export const getEntireDocument = async ({ id }: GetEntireDocumentOptions) => {
const document = await prisma.document.findFirstOrThrow({
where: {
id,
},
include: {
Recipient: {
include: {
Field: {
include: {
Signature: true,
},
},
},
},
},
});
return document;
};