diff --git a/packages/email/template-components/template-document-reminder.tsx b/packages/email/template-components/template-document-reminder.tsx index de3255597..542272182 100644 --- a/packages/email/template-components/template-document-reminder.tsx +++ b/packages/email/template-components/template-document-reminder.tsx @@ -1,6 +1,6 @@ import { useLingui } from '@lingui/react'; import { Trans } from '@lingui/react/macro'; -import type { RecipientRole } from '@prisma/client'; +import { RecipientRole } from '@prisma/client'; import { match } from 'ts-pattern'; import { RECIPIENT_ROLES_DESCRIPTION } from '@documenso/lib/constants/recipient-roles'; @@ -32,7 +32,6 @@ export const TemplateDocumentReminder = ({
- {/* Reminder specific text */} Reminder: Please {_(actionVerb).toLowerCase()} your document @@ -40,34 +39,33 @@ export const TemplateDocumentReminder = ({ - {/* Addressee */} Hi {recipientName}, - {/* Reminder Call to Action */} {match(role) - .with('SIGNER', () => Continue by signing the document.) - .with('VIEWER', () => Continue by viewing the document.) - .with('APPROVER', () => Continue by approving the document.) - .with('CC', () => '') - .with('ASSISTANT', () => Continue by assisting with the document.) + .with(RecipientRole.SIGNER, () => Continue by signing the document.) + .with(RecipientRole.VIEWER, () => Continue by viewing the document.) + .with(RecipientRole.APPROVER, () => Continue by approving the document.) + .with(RecipientRole.CC, () => '') + .with(RecipientRole.ASSISTANT, () => ( + Continue by assisting with the document. + )) .exhaustive()} - {/* Primary Action Button */}
diff --git a/packages/email/templates/document-reminder.tsx b/packages/email/templates/document-reminder.tsx index 03ed3f9e2..da3bedca3 100644 --- a/packages/email/templates/document-reminder.tsx +++ b/packages/email/templates/document-reminder.tsx @@ -1,3 +1,4 @@ +import { msg } from '@lingui/core/macro'; import { useLingui } from '@lingui/react'; import type { RecipientRole } from '@prisma/client'; @@ -30,7 +31,7 @@ export const DocumentReminderEmailTemplate = ({ const action = i18n.t(RECIPIENT_ROLES_DESCRIPTION[role].actionVerb).toLowerCase(); - const previewTextString = `Reminder to ${action} ${documentName}`; + const previewTextString = i18n._(msg`Reminder to ${action} ${documentName}`); const getAssetUrl = (path: string) => { return new URL(path, assetBaseUrl).toString(); diff --git a/packages/lib/constants/document-audit-logs.ts b/packages/lib/constants/document-audit-logs.ts index a6a5d8fdb..3ec716e0a 100644 --- a/packages/lib/constants/document-audit-logs.ts +++ b/packages/lib/constants/document-audit-logs.ts @@ -20,6 +20,6 @@ export const DOCUMENT_AUDIT_LOG_EMAIL_FORMAT = { description: 'Document completed', }, [DOCUMENT_EMAIL_TYPE.REMINDER]: { - description: 'Reminder', + description: 'Signing Reminder', }, } satisfies Record; diff --git a/packages/lib/jobs/client/inngest.ts b/packages/lib/jobs/client/inngest.ts index 9dd806478..59319209c 100644 --- a/packages/lib/jobs/client/inngest.ts +++ b/packages/lib/jobs/client/inngest.ts @@ -35,10 +35,10 @@ export class InngestJobProvider extends BaseJobProvider { } public defineJob(job: JobDefinition): void { - let fn: InngestFunction.Any; + let jobFunction: InngestFunction.Any; if (job.trigger.type === 'cron') { - fn = this._client.createFunction( + jobFunction = this._client.createFunction( { id: job.id, name: job.name, @@ -60,7 +60,7 @@ export class InngestJobProvider extends BaseJobProvider { }, ); } else { - fn = this._client.createFunction( + jobFunction = this._client.createFunction( { id: job.id, name: job.name, @@ -83,7 +83,7 @@ export class InngestJobProvider extends BaseJobProvider { ); } - this._functions.push(fn); + this._functions.push(jobFunction); } public async triggerJob(options: SimpleTriggerJobOptions): Promise {