feat: update team email templates. (#1229)

Updates the email templates to include team information when sent
from a team context.
This commit is contained in:
Ephraim Duncan
2024-08-20 05:41:19 +00:00
committed by GitHub
parent 7a1341eb74
commit 2c9136498c
7 changed files with 127 additions and 17 deletions

View File

@ -91,6 +91,9 @@ export const ConfirmTeamEmailTemplate = ({
<li className="mt-1 text-sm">
Allow document recipients to reply directly to this email address
</li>
<li className="mt-1 text-sm">
Send documents on behalf of the team using the email address
</li>
</ul>
<Text className="mt-2 text-sm">

View File

@ -23,6 +23,9 @@ export type DocumentInviteEmailTemplateProps = Partial<TemplateDocumentInvitePro
customBody?: string;
role: RecipientRole;
selfSigner?: boolean;
isTeamInvite?: boolean;
teamName?: string;
teamEmail?: string;
};
export const DocumentInviteEmailTemplate = ({
@ -34,11 +37,15 @@ export const DocumentInviteEmailTemplate = ({
customBody,
role,
selfSigner = false,
isTeamInvite = false,
teamName,
}: DocumentInviteEmailTemplateProps) => {
const action = RECIPIENT_ROLES_DESCRIPTION[role].actionVerb.toLowerCase();
const previewText = selfSigner
? `Please ${action} your document ${documentName}`
: isTeamInvite
? `${inviterName} on behalf of ${teamName} has invited you to ${action} ${documentName}`
: `${inviterName} has invited you to ${action} ${documentName}`;
const getAssetUrl = (path: string) => {
@ -76,6 +83,8 @@ export const DocumentInviteEmailTemplate = ({
assetBaseUrl={assetBaseUrl}
role={role}
selfSigner={selfSigner}
isTeamInvite={isTeamInvite}
teamName={teamName}
/>
</Section>
</Container>