The Open Source DocuSign Alternative.
TypeScript digital-signaturedocument-signingdocusign-alternativee-signatureesignesignaturenext-authnextjsopen-sourcepades-standardpdfpdf-signpdf-signaturepostgresqlprismaself-hostedsigningtypescript
feat: improve invite email (#2030)
samuel-cglg399f91de7386
diff --git a/packages/email/template-components/template-document-invite.tsx b/packages/email/template-components/template-document-invite.tsxindex 2c52bf441..5fec7e624 100644--- a/packages/email/template-components/template-document-invite.tsx+++ b/packages/email/template-components/template-document-invite.tsx@@ -1,5 +1,3 @@-import { useMemo } from 'react';-import { useLingui } from '@lingui/react';import { Trans } from '@lingui/react/macro';import { OrganisationType, RecipientRole } from '@prisma/client';@@ -38,12 +36,6 @@ export const TemplateDocumentInvite = ({const { actionVerb } = RECIPIENT_ROLES_DESCRIPTION[role];- const rejectDocumentLink = useMemo(() => {- const url = new URL(signDocumentLink);- url.searchParams.set('reject', 'true');- return url.toString();- }, [signDocumentLink]);-return (<><TemplateDocumentImage className="mt-6" assetBaseUrl={assetBaseUrl} />@@ -99,22 +91,15 @@ export const TemplateDocumentInvite = ({<Section className="mb-6 mt-8 text-center"><Button- className="mr-4 inline-flex items-center justify-center rounded-lg bg-red-500 px-6 py-3 text-center text-sm font-medium text-black no-underline"- href={rejectDocumentLink}- >- <Trans>Reject Document</Trans>- </Button>-- <Button- className="bg-documenso-500 inline-flex items-center justify-center rounded-lg px-6 py-3 text-center text-sm font-medium text-black no-underline"+ className="bg-documenso-500 text-sbase inline-flex items-center justify-center rounded-lg px-6 py-3 text-center font-medium text-black no-underline"href={signDocumentLink}>{match(role)- .with(RecipientRole.SIGNER, () => <Trans>Sign Document</Trans>)+ .with(RecipientRole.SIGNER, () => <Trans>View Document to sign</Trans>).with(RecipientRole.VIEWER, () => <Trans>View Document</Trans>)- .with(RecipientRole.APPROVER, () => <Trans>Approve Document</Trans>)+ .with(RecipientRole.APPROVER, () => <Trans>View Document to approve</Trans>).with(RecipientRole.CC, () => '')- .with(RecipientRole.ASSISTANT, () => <Trans>Assist Document</Trans>)+ .with(RecipientRole.ASSISTANT, () => <Trans>View Document to assist</Trans>).exhaustive()}</Button></Section>