mirror of
https://github.com/documenso/documenso.git
synced 2025-11-20 11:41:44 +10:00
feat: seperate text for email when document is being sent from team
This commit is contained in:
committed by
Mythie
parent
7a1341eb74
commit
7562a68cca
@ -12,6 +12,8 @@ export interface TemplateDocumentInviteProps {
|
||||
assetBaseUrl: string;
|
||||
role: RecipientRole;
|
||||
selfSigner: boolean;
|
||||
isTeamInvite: boolean;
|
||||
teamName?: string;
|
||||
}
|
||||
|
||||
export const TemplateDocumentInvite = ({
|
||||
@ -21,6 +23,8 @@ export const TemplateDocumentInvite = ({
|
||||
assetBaseUrl,
|
||||
role,
|
||||
selfSigner,
|
||||
isTeamInvite,
|
||||
teamName,
|
||||
}: TemplateDocumentInviteProps) => {
|
||||
const { actionVerb, progressiveVerb } = RECIPIENT_ROLES_DESCRIPTION[role];
|
||||
|
||||
@ -36,6 +40,12 @@ export const TemplateDocumentInvite = ({
|
||||
<br />
|
||||
{`"${documentName}"`}
|
||||
</>
|
||||
) : isTeamInvite ? (
|
||||
<>
|
||||
{`${inviterName} on behalf of ${teamName} has invited you to ${actionVerb.toLowerCase()}`}
|
||||
<br />
|
||||
{`"${documentName}"`}
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
{`${inviterName} has invited you to ${actionVerb.toLowerCase()}`}
|
||||
|
||||
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user