mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
todo, qoc
This commit is contained in:
@ -45,6 +45,7 @@ async function postHandler(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// todo check if recipient has an account and show them in their inbox or something
|
||||||
(await recipients).forEach(async (recipient) => {
|
(await recipients).forEach(async (recipient) => {
|
||||||
await sendSigningRequestMail(recipient, document);
|
await sendSigningRequestMail(recipient, document);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -49,19 +49,19 @@ async function getHandler(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
let user = await getUserFromToken(req, res);
|
let user = await getUserFromToken(req, res);
|
||||||
if (!user) return;
|
if (!user) return;
|
||||||
|
|
||||||
return res.status(200).json(
|
const documents = await prisma.document.findMany({
|
||||||
await prisma.document.findMany({
|
where: {
|
||||||
where: {
|
userId: user?.id,
|
||||||
userId: user?.id,
|
},
|
||||||
},
|
select: {
|
||||||
select: {
|
id: true,
|
||||||
id: true,
|
title: true,
|
||||||
title: true,
|
status: true,
|
||||||
status: true,
|
Recipient: true,
|
||||||
Recipient: true,
|
},
|
||||||
},
|
});
|
||||||
})
|
|
||||||
);
|
return res.status(200).json(documents);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default defaultHandler({
|
export default defaultHandler({
|
||||||
|
|||||||
@ -133,6 +133,11 @@ const DocumentsPage: NextPageWithLayout = (req, res) => {
|
|||||||
</td>
|
</td>
|
||||||
<td className="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
<td className="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||||
{formatDocumentStatus(document.status)}
|
{formatDocumentStatus(document.status)}
|
||||||
|
<p>
|
||||||
|
<small>
|
||||||
|
{document.recipients || 0}/{document.signed || 0}
|
||||||
|
</small>
|
||||||
|
</p>
|
||||||
</td>
|
</td>
|
||||||
<td className="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6">
|
<td className="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6">
|
||||||
<Link
|
<Link
|
||||||
|
|||||||
Reference in New Issue
Block a user