mirror of
https://github.com/documenso/documenso.git
synced 2025-11-12 15:53:02 +10:00
layout, remove debug send
This commit is contained in:
@ -42,14 +42,13 @@ async function postHandler(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
const recipients = prisma.recipient.findMany({
|
const recipients = prisma.recipient.findMany({
|
||||||
where: {
|
where: {
|
||||||
documentId: +documentId,
|
documentId: +documentId,
|
||||||
// sendStatus: SendStatus.NOT_SENT, // TODO REDO AFTER DEBUG
|
sendStatus: SendStatus.NOT_SENT, // TODO REDO AFTER DEBUG
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
// todo check if recipient has an account and show them in their inbox or something
|
// 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 sendSigningRequest(recipient, document);
|
await sendSigningRequest(recipient, document);
|
||||||
await sendSignedMail(recipient, document);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// todo way better error handling
|
// todo way better error handling
|
||||||
|
|||||||
@ -14,10 +14,10 @@ export const sendSignedMail = async (recipient: any, document: any) => {
|
|||||||
${document.User.name || recipient.email} has signed your document ${
|
${document.User.name || recipient.email} has signed your document ${
|
||||||
document.title
|
document.title
|
||||||
}.
|
}.
|
||||||
<p style="margin: 24px;">
|
<p style="margin: 30px;">
|
||||||
<a href="${NEXT_PUBLIC_WEBAPP_URL}/documents/${
|
<a href="${NEXT_PUBLIC_WEBAPP_URL}/documents/${
|
||||||
document.id
|
document.id
|
||||||
}" style="background-color: #37f095; color: white; border-color: transparent; border-width: 1px; border-radius: 0.375rem; font-size: 18px; padding-left: 16px; padding-right: 16px; padding-top: 10px; padding-bottom: 10px; text-decoration: none;">
|
}" style="background-color: #37f095; color: white; border-color: transparent; border-width: 1px; border-radius: 0.375rem; font-size: 18px; padding-left: 16px; padding-right: 16px; padding-top: 10px; padding-bottom: 10px; text-decoration: none; margin-top: 4px; margin-bottom: 4px;">
|
||||||
View Document
|
View Document
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
@ -40,6 +40,10 @@ export const sendSignedMail = async (recipient: any, document: any) => {
|
|||||||
<br>
|
<br>
|
||||||
Contact us at <a href="mailto:hi@documenso.com">hi@documenso.com</a>
|
Contact us at <a href="mailto:hi@documenso.com">hi@documenso.com</a>
|
||||||
</div>
|
</div>
|
||||||
|
<hr size="1" style="height: 1px; border: none; color: #D8D8D8; background-color: #D8D8D8">
|
||||||
|
<div style="text-align: center">
|
||||||
|
<small>Easy and beautiful document signing by Documenso.</small>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
);
|
);
|
||||||
|
|||||||
@ -13,8 +13,8 @@ export const sendSigningRequest = async (recipient: any, document: any) => {
|
|||||||
<div style="text-align:center; margin: auto; font-size: 14px; font-color: #353434; max-width: 500px; border-radius: 0.375rem; background: white; padding: 50px">
|
<div style="text-align:center; margin: auto; font-size: 14px; font-color: #353434; max-width: 500px; border-radius: 0.375rem; background: white; padding: 50px">
|
||||||
<img src="${NEXT_PUBLIC_WEBAPP_URL}/logo_h.png" alt="Documenso Logo" style="width: 180px; display: block; margin: auto; margin-bottom: 14px;">
|
<img src="${NEXT_PUBLIC_WEBAPP_URL}/logo_h.png" alt="Documenso Logo" style="width: 180px; display: block; margin: auto; margin-bottom: 14px;">
|
||||||
${document.User.name} (${document.User.email}) has sent you a document to sign.
|
${document.User.name} (${document.User.email}) has sent you a document to sign.
|
||||||
<p style="margin: 24px;">
|
<p style="margin: 30px;">
|
||||||
<a href="${NEXT_PUBLIC_WEBAPP_URL}/documents/${document.id}/sign?token=${recipient.token}" style="background-color: #37f095; color: white; border-color: transparent; border-width: 1px; border-radius: 0.375rem; font-size: 18px; padding-left: 16px; padding-right: 16px; padding-top: 10px; padding-bottom: 10px; text-decoration: none;">
|
<a href="${NEXT_PUBLIC_WEBAPP_URL}/documents/${document.id}/sign?token=${recipient.token}" style="background-color: #37f095; color: white; border-color: transparent; border-width: 1px; border-radius: 0.375rem; font-size: 18px; padding-left: 16px; padding-right: 16px; padding-top: 10px; padding-bottom: 10px; text-decoration: none; margin-top: 4px; margin-bottom: 4px;">
|
||||||
Sign Document
|
Sign Document
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
@ -35,6 +35,10 @@ export const sendSigningRequest = async (recipient: any, document: any) => {
|
|||||||
<br>
|
<br>
|
||||||
Contact us at <a href="mailto:hi@documenso.com">hi@documenso.com</a>
|
Contact us at <a href="mailto:hi@documenso.com">hi@documenso.com</a>
|
||||||
</div>
|
</div>
|
||||||
|
<hr size="1" style="height: 1px; border: none; color: #D8D8D8; background-color: #D8D8D8">
|
||||||
|
<div style="text-align: center">
|
||||||
|
<small>Easy and beautiful document signing by Documenso.</small>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user