@vrplatform/email 1.0.2-40176543866 → 1.0.2-40299030944
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/main/components/ActionEmailTemplate.d.ts +3 -1
- package/build/main/components/ActionEmailTemplate.js +9 -11
- package/build/main/components/ActionEmailTemplate.js.map +1 -1
- package/build/main/components/EmailContainer.js +2 -1
- package/build/main/components/EmailContainer.js.map +1 -1
- package/build/main/components/EmailHeading.d.ts +8 -0
- package/build/main/components/EmailHeading.js +21 -0
- package/build/main/components/EmailHeading.js.map +1 -0
- package/build/main/components/index.d.ts +1 -0
- package/build/main/components/index.js +1 -0
- package/build/main/components/index.js.map +1 -1
- package/build/main/index.d.ts +1 -1
- package/build/main/index.js +2 -3
- package/build/main/index.js.map +1 -1
- package/build/main/render.d.ts +2 -0
- package/build/main/render.js +24 -0
- package/build/main/render.js.map +1 -0
- package/build/main/templates/BankAccountChangedEmailTemplate.d.ts +1 -0
- package/build/main/templates/BankAccountChangedEmailTemplate.js +3 -1
- package/build/main/templates/BankAccountChangedEmailTemplate.js.map +1 -1
- package/build/main/templates/BankAccountChangedTeamAdminEmailTemplate.d.ts +1 -0
- package/build/main/templates/BankAccountChangedTeamAdminEmailTemplate.js +1 -1
- package/build/main/templates/BankAccountChangedTeamAdminEmailTemplate.js.map +1 -1
- package/build/main/templates/BankDetailsRequestEmailTemplate.d.ts +2 -1
- package/build/main/templates/BankDetailsRequestEmailTemplate.js +1 -1
- package/build/main/templates/BankDetailsRequestEmailTemplate.js.map +1 -1
- package/build/main/templates/InviteOwnerEmailTemplate.js +1 -1
- package/build/main/templates/InviteOwnerEmailTemplate.js.map +1 -1
- package/build/main/templates/InvitePmEmailTemplate.js +1 -1
- package/build/main/templates/InvitePmEmailTemplate.js.map +1 -1
- package/build/main/templates/OwnerStatementEmailTemplate.d.ts +0 -2
- package/build/main/templates/OwnerStatementEmailTemplate.js +16 -37
- package/build/main/templates/OwnerStatementEmailTemplate.js.map +1 -1
- package/build/main/templates/TenantDeletionEmailTemplate.js +2 -6
- package/build/main/templates/TenantDeletionEmailTemplate.js.map +1 -1
- package/build/main/templates/TenantSuspensionEmailTemplate.js +2 -6
- package/build/main/templates/TenantSuspensionEmailTemplate.js.map +1 -1
- package/build/module/components/ActionEmailTemplate.d.ts +3 -1
- package/build/module/components/ActionEmailTemplate.js +9 -11
- package/build/module/components/ActionEmailTemplate.js.map +1 -1
- package/build/module/components/EmailContainer.js +2 -1
- package/build/module/components/EmailContainer.js.map +1 -1
- package/build/module/components/EmailHeading.d.ts +8 -0
- package/build/module/components/EmailHeading.js +17 -0
- package/build/module/components/EmailHeading.js.map +1 -0
- package/build/module/components/index.d.ts +1 -0
- package/build/module/components/index.js +1 -0
- package/build/module/components/index.js.map +1 -1
- package/build/module/index.d.ts +1 -1
- package/build/module/index.js +1 -1
- package/build/module/index.js.map +1 -1
- package/build/module/render.d.ts +2 -0
- package/build/module/render.js +20 -0
- package/build/module/render.js.map +1 -0
- package/build/module/templates/BankAccountChangedEmailTemplate.d.ts +1 -0
- package/build/module/templates/BankAccountChangedEmailTemplate.js +3 -1
- package/build/module/templates/BankAccountChangedEmailTemplate.js.map +1 -1
- package/build/module/templates/BankAccountChangedTeamAdminEmailTemplate.d.ts +1 -0
- package/build/module/templates/BankAccountChangedTeamAdminEmailTemplate.js +2 -2
- package/build/module/templates/BankAccountChangedTeamAdminEmailTemplate.js.map +1 -1
- package/build/module/templates/BankDetailsRequestEmailTemplate.d.ts +2 -1
- package/build/module/templates/BankDetailsRequestEmailTemplate.js +1 -1
- package/build/module/templates/BankDetailsRequestEmailTemplate.js.map +1 -1
- package/build/module/templates/InviteOwnerEmailTemplate.js +1 -1
- package/build/module/templates/InviteOwnerEmailTemplate.js.map +1 -1
- package/build/module/templates/InvitePmEmailTemplate.js +1 -1
- package/build/module/templates/InvitePmEmailTemplate.js.map +1 -1
- package/build/module/templates/OwnerStatementEmailTemplate.d.ts +0 -2
- package/build/module/templates/OwnerStatementEmailTemplate.js +16 -37
- package/build/module/templates/OwnerStatementEmailTemplate.js.map +1 -1
- package/build/module/templates/TenantDeletionEmailTemplate.js +3 -7
- package/build/module/templates/TenantDeletionEmailTemplate.js.map +1 -1
- package/build/module/templates/TenantSuspensionEmailTemplate.js +3 -7
- package/build/module/templates/TenantSuspensionEmailTemplate.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ActionEmailTemplate.tsx +11 -13
- package/src/components/EmailContainer.tsx +2 -1
- package/src/components/EmailHeading.tsx +36 -0
- package/src/components/index.ts +1 -0
- package/src/index.ts +1 -1
- package/src/render.ts +24 -0
- package/src/templates/BankAccountChangedEmailTemplate.tsx +23 -9
- package/src/templates/BankAccountChangedTeamAdminEmailTemplate.tsx +11 -5
- package/src/templates/BankDetailsRequestEmailTemplate.tsx +5 -1
- package/src/templates/InviteOwnerEmailTemplate.tsx +1 -0
- package/src/templates/InvitePmEmailTemplate.tsx +1 -0
- package/src/templates/OwnerStatementEmailTemplate.tsx +19 -50
- package/src/templates/TenantDeletionEmailTemplate.tsx +9 -10
- package/src/templates/TenantSuspensionEmailTemplate.tsx +9 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InviteOwnerEmailTemplate.js","sourceRoot":"src/","sources":["templates/InviteOwnerEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAEL,mBAAmB,GAEpB,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAC5C,IAAoB,EACpB,IAGC,EACgB,EAAE;IACnB,MAAM,UAAU,GACd,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC;IAEjE,OAAO;QACL,OAAO,EAAE,qDAAqD,IAAI,CAAC,OAAO,gEAAgE;QAC1I,OAAO,EAAE,wGAAwG,UAAU,MAAM;QACjI,UAAU,EAAE,mBAAmB;QAC/B,MAAM,EAAE,+BAA+B;QACvC,gBAAgB,EAAE,wDAAwD;QAC1E,IAAI,EAAE,IAAI,CAAC,UAAU;QACrB,OAAO,EAAE,0BAA0B,IAAI,CAAC,OAAO,eAAe;KAC/D,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EACvC,eAAe,GAAG,OAAO,EACzB,GAAG,KAAK,EAGT,EAAE,EAAE;IACH,OAAO,CACL,KAAC,mBAAmB,OACd,KAAK,EACT,IAAI,EAAE;YACJ,GAAG,KAAK,CAAC,IAAI;YACb,wEAAwE;YACxE,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,mYAAmY,eAAe,KAAK,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,kCAAkC,sCAAsC;SAC3hB,GACD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { EMAIL_ACTION_LINK_COMPONENT } from '../extensions';\nimport {\n type ActionEmailData,\n ActionEmailTemplate,\n type ActionEmailTemplateProps,\n} from '../components';\n\nexport const getDefaultInviteOwnerEmailData = (\n mode: 'tag' | 'text',\n args: {\n appName: string;\n signInLink: string;\n }\n): ActionEmailData => {\n const signInLink =\n mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.signInLink;\n\n return {\n bodyOne: `<p>You are invited to access your Owner Portal on ${args.appName}.</p><p>Accept the invitation below to set up your access.</p>`,\n bodyTwo: `<p>If you have any trouble with the button, you can copy and paste the link below into your browser: ${signInLink}</p>`,\n buttonText: 'Accept Invitation',\n header: 'Welcome to your Owner Portal!',\n shortDescription: 'Set up your Owner Portal access using your invitation.',\n href: args.signInLink,\n subject: `Your invitation to the ${args.appName} Owner Portal`,\n };\n};\n\nexport const InviteOwnerEmailTemplate = ({\n ownerAccessRole = 'admin',\n ...props\n}: ActionEmailTemplateProps & {\n ownerAccessRole?: 'admin' | 'viewer';\n}) => {\n return (\n <ActionEmailTemplate\n {...props}\n data={{\n ...props.data,\n // Add guidance at render time so saved custom templates receive it too.\n bodyTwo: `${props.data.bodyTwo}<hr style=\"width:100%;border:none;border-top:1px solid #eaeaea;margin:24px 0\" /><p>This invitation link is for one-time setup of your Owner Portal access and expires after 7 days. Sign up using the exact email address this invitation was sent to.</p><p>If your invitation expires before setup is complete, contact your property manager for a new invitation.</p><p>For questions about ${ownerAccessRole === 'viewer' ? 'portal access' : 'your statements or portal access'}, contact your property manager.</p>`,\n }}\n />\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"InviteOwnerEmailTemplate.js","sourceRoot":"src/","sources":["templates/InviteOwnerEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAEL,mBAAmB,GAEpB,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAC5C,IAAoB,EACpB,IAGC,EACgB,EAAE;IACnB,MAAM,UAAU,GACd,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC;IAEjE,OAAO;QACL,OAAO,EAAE,qDAAqD,IAAI,CAAC,OAAO,gEAAgE;QAC1I,OAAO,EAAE,wGAAwG,UAAU,MAAM;QACjI,UAAU,EAAE,mBAAmB;QAC/B,MAAM,EAAE,+BAA+B;QACvC,gBAAgB,EAAE,wDAAwD;QAC1E,IAAI,EAAE,IAAI,CAAC,UAAU;QACrB,OAAO,EAAE,0BAA0B,IAAI,CAAC,OAAO,eAAe;KAC/D,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EACvC,eAAe,GAAG,OAAO,EACzB,GAAG,KAAK,EAGT,EAAE,EAAE;IACH,OAAO,CACL,KAAC,mBAAmB,OACd,KAAK,EACT,OAAO,EAAC,yBAAyB,EACjC,IAAI,EAAE;YACJ,GAAG,KAAK,CAAC,IAAI;YACb,wEAAwE;YACxE,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,mYAAmY,eAAe,KAAK,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,kCAAkC,sCAAsC;SAC3hB,GACD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { EMAIL_ACTION_LINK_COMPONENT } from '../extensions';\nimport {\n type ActionEmailData,\n ActionEmailTemplate,\n type ActionEmailTemplateProps,\n} from '../components';\n\nexport const getDefaultInviteOwnerEmailData = (\n mode: 'tag' | 'text',\n args: {\n appName: string;\n signInLink: string;\n }\n): ActionEmailData => {\n const signInLink =\n mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.signInLink;\n\n return {\n bodyOne: `<p>You are invited to access your Owner Portal on ${args.appName}.</p><p>Accept the invitation below to set up your access.</p>`,\n bodyTwo: `<p>If you have any trouble with the button, you can copy and paste the link below into your browser: ${signInLink}</p>`,\n buttonText: 'Accept Invitation',\n header: 'Welcome to your Owner Portal!',\n shortDescription: 'Set up your Owner Portal access using your invitation.',\n href: args.signInLink,\n subject: `Your invitation to the ${args.appName} Owner Portal`,\n };\n};\n\nexport const InviteOwnerEmailTemplate = ({\n ownerAccessRole = 'admin',\n ...props\n}: ActionEmailTemplateProps & {\n ownerAccessRole?: 'admin' | 'viewer';\n}) => {\n return (\n <ActionEmailTemplate\n {...props}\n eyebrow=\"Owner Portal invitation\"\n data={{\n ...props.data,\n // Add guidance at render time so saved custom templates receive it too.\n bodyTwo: `${props.data.bodyTwo}<hr style=\"width:100%;border:none;border-top:1px solid #eaeaea;margin:24px 0\" /><p>This invitation link is for one-time setup of your Owner Portal access and expires after 7 days. Sign up using the exact email address this invitation was sent to.</p><p>If your invitation expires before setup is complete, contact your property manager for a new invitation.</p><p>For questions about ${ownerAccessRole === 'viewer' ? 'portal access' : 'your statements or portal access'}, contact your property manager.</p>`,\n }}\n />\n );\n};\n"]}
|
|
@@ -16,7 +16,7 @@ export const getDefaultInvitePropertyManagerEmailData = (mode, args) => {
|
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
export const InvitePmEmailTemplate = (props) => {
|
|
19
|
-
return (_jsx(ActionEmailTemplate, { ...props, data: {
|
|
19
|
+
return (_jsx(ActionEmailTemplate, { ...props, eyebrow: "Team invitation", data: {
|
|
20
20
|
...props.data,
|
|
21
21
|
// Add guidance at render time so saved custom templates receive it too.
|
|
22
22
|
bodyTwo: `${props.data.bodyTwo}<hr style="width:100%;border:none;border-top:1px solid #eaeaea;margin:24px 0" /><p>This invitation link is for one-time setup of your team access and expires after 7 days. Sign up using the exact email address this invitation was sent to.</p><p>If your invitation expires before setup is complete, contact your team administrator for a new invitation.</p><p>For questions about team access, contact your team administrator.</p>`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvitePmEmailTemplate.js","sourceRoot":"src/","sources":["templates/InvitePmEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAEL,mBAAmB,GAEpB,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,MAAM,wCAAwC,GAAG,CACtD,IAAoB,EACpB,IAIC,EACgB,EAAE;IACnB,MAAM,UAAU,GACd,IAAI,KAAK,KAAK;QACZ,CAAC,CAAC,2BAA2B;QAC7B,CAAC,CAAC,YAAY,IAAI,CAAC,UAAU,qBAAqB,IAAI,CAAC,UAAU,MAAM,CAAC;IAE5E,OAAO;QACL,OAAO,EAAE,8BAA8B,IAAI,CAAC,QAAQ,OAAO,IAAI,CAAC,OAAO,qEAAqE;QAC5I,OAAO,EAAE,qFAAqF,UAAU,MAAM;QAC9G,UAAU,EAAE,mBAAmB;QAC/B,MAAM,EAAE,sBAAsB;QAC9B,gBAAgB,EAAE,kCAAkC,IAAI,CAAC,QAAQ,OAAO,IAAI,CAAC,OAAO,GAAG;QACvF,IAAI,EAAE,IAAI,CAAC,UAAU;QACrB,OAAO,EAAE,2BAA2B,IAAI,CAAC,QAAQ,OAAO,IAAI,CAAC,OAAO,EAAE;KACvE,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAA+B,EAAE,EAAE;IACvE,OAAO,CACL,KAAC,mBAAmB,OACd,KAAK,EACT,IAAI,EAAE;YACJ,GAAG,KAAK,CAAC,IAAI;YACb,wEAAwE;YACxE,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,6aAA6a;SAC5c,GACD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { EMAIL_ACTION_LINK_COMPONENT } from '../extensions';\nimport {\n type ActionEmailData,\n ActionEmailTemplate,\n type ActionEmailTemplateProps,\n} from '../components';\n\nexport const getDefaultInvitePropertyManagerEmailData = (\n mode: 'tag' | 'text',\n args: {\n appName: string;\n signInLink: string;\n teamName: string;\n }\n): ActionEmailData => {\n const signInLink =\n mode === 'tag'\n ? EMAIL_ACTION_LINK_COMPONENT\n : `<a href='${args.signInLink}' target='_blank'>${args.signInLink}</a>`;\n\n return {\n bodyOne: `<p>You are invited to join ${args.teamName} on ${args.appName}.</p><p>Accept the invitation below to set up your team access.</p>`,\n bodyTwo: `<p>If you have any trouble with the button, you can use the following link below: ${signInLink}</p>`,\n buttonText: 'Accept Invitation',\n header: 'Welcome to the team!',\n shortDescription: `Accept your invitation to join ${args.teamName} on ${args.appName}.`,\n href: args.signInLink,\n subject: `You are invited to join ${args.teamName} on ${args.appName}`,\n };\n};\n\nexport const InvitePmEmailTemplate = (props: ActionEmailTemplateProps) => {\n return (\n <ActionEmailTemplate\n {...props}\n data={{\n ...props.data,\n // Add guidance at render time so saved custom templates receive it too.\n bodyTwo: `${props.data.bodyTwo}<hr style=\"width:100%;border:none;border-top:1px solid #eaeaea;margin:24px 0\" /><p>This invitation link is for one-time setup of your team access and expires after 7 days. Sign up using the exact email address this invitation was sent to.</p><p>If your invitation expires before setup is complete, contact your team administrator for a new invitation.</p><p>For questions about team access, contact your team administrator.</p>`,\n }}\n />\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"InvitePmEmailTemplate.js","sourceRoot":"src/","sources":["templates/InvitePmEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAEL,mBAAmB,GAEpB,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,MAAM,wCAAwC,GAAG,CACtD,IAAoB,EACpB,IAIC,EACgB,EAAE;IACnB,MAAM,UAAU,GACd,IAAI,KAAK,KAAK;QACZ,CAAC,CAAC,2BAA2B;QAC7B,CAAC,CAAC,YAAY,IAAI,CAAC,UAAU,qBAAqB,IAAI,CAAC,UAAU,MAAM,CAAC;IAE5E,OAAO;QACL,OAAO,EAAE,8BAA8B,IAAI,CAAC,QAAQ,OAAO,IAAI,CAAC,OAAO,qEAAqE;QAC5I,OAAO,EAAE,qFAAqF,UAAU,MAAM;QAC9G,UAAU,EAAE,mBAAmB;QAC/B,MAAM,EAAE,sBAAsB;QAC9B,gBAAgB,EAAE,kCAAkC,IAAI,CAAC,QAAQ,OAAO,IAAI,CAAC,OAAO,GAAG;QACvF,IAAI,EAAE,IAAI,CAAC,UAAU;QACrB,OAAO,EAAE,2BAA2B,IAAI,CAAC,QAAQ,OAAO,IAAI,CAAC,OAAO,EAAE;KACvE,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAA+B,EAAE,EAAE;IACvE,OAAO,CACL,KAAC,mBAAmB,OACd,KAAK,EACT,OAAO,EAAC,iBAAiB,EACzB,IAAI,EAAE;YACJ,GAAG,KAAK,CAAC,IAAI;YACb,wEAAwE;YACxE,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,6aAA6a;SAC5c,GACD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { EMAIL_ACTION_LINK_COMPONENT } from '../extensions';\nimport {\n type ActionEmailData,\n ActionEmailTemplate,\n type ActionEmailTemplateProps,\n} from '../components';\n\nexport const getDefaultInvitePropertyManagerEmailData = (\n mode: 'tag' | 'text',\n args: {\n appName: string;\n signInLink: string;\n teamName: string;\n }\n): ActionEmailData => {\n const signInLink =\n mode === 'tag'\n ? EMAIL_ACTION_LINK_COMPONENT\n : `<a href='${args.signInLink}' target='_blank'>${args.signInLink}</a>`;\n\n return {\n bodyOne: `<p>You are invited to join ${args.teamName} on ${args.appName}.</p><p>Accept the invitation below to set up your team access.</p>`,\n bodyTwo: `<p>If you have any trouble with the button, you can use the following link below: ${signInLink}</p>`,\n buttonText: 'Accept Invitation',\n header: 'Welcome to the team!',\n shortDescription: `Accept your invitation to join ${args.teamName} on ${args.appName}.`,\n href: args.signInLink,\n subject: `You are invited to join ${args.teamName} on ${args.appName}`,\n };\n};\n\nexport const InvitePmEmailTemplate = (props: ActionEmailTemplateProps) => {\n return (\n <ActionEmailTemplate\n {...props}\n eyebrow=\"Team invitation\"\n data={{\n ...props.data,\n // Add guidance at render time so saved custom templates receive it too.\n bodyTwo: `${props.data.bodyTwo}<hr style=\"width:100%;border:none;border-top:1px solid #eaeaea;margin:24px 0\" /><p>This invitation link is for one-time setup of your team access and expires after 7 days. Sign up using the exact email address this invitation was sent to.</p><p>If your invitation expires before setup is complete, contact your team administrator for a new invitation.</p><p>For questions about team access, contact your team administrator.</p>`,\n }}\n />\n );\n};\n"]}
|
|
@@ -5,8 +5,6 @@ export declare const getDefaultOwnerStatementEmailData: (mode: "tag" | "text", a
|
|
|
5
5
|
listingName: string;
|
|
6
6
|
userName: string;
|
|
7
7
|
month: string;
|
|
8
|
-
/** The owner opens the statement through an emailed link, without a login. */
|
|
9
|
-
noLogin?: boolean;
|
|
10
8
|
}) => ActionEmailData;
|
|
11
9
|
export declare const OwnerStatementEmailTemplate: ({ data, tenant, themeColors, mode, user, listing, month, unsubscribeHref, renewHref, }: ActionEmailTemplateProps & {
|
|
12
10
|
/** Requests a new no-login link once the emailed one has expired. */
|
|
@@ -1,39 +1,30 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Heading } from '@react-email/heading';
|
|
3
2
|
import { Text } from '@react-email/text';
|
|
4
3
|
import { EMAIL_ACTION_LINK_COMPONENT, EMAIL_DATE_COMPONENT, EMAIL_LISTING_COMPONENT, EMAIL_USER_NAME_COMPONENT, } from '../extensions';
|
|
5
4
|
import { Button } from '../components/Button';
|
|
6
5
|
import { EmailContainer } from '../components/EmailContainer';
|
|
6
|
+
import { EmailHeading } from '../components/EmailHeading';
|
|
7
7
|
import { parseEmailHtml } from '../components/utils';
|
|
8
8
|
export const getDefaultOwnerStatementEmailData = (mode, args) => {
|
|
9
9
|
const ownerStatementHref = mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.ownerStatementHref;
|
|
10
10
|
const listingName = mode === 'tag' ? EMAIL_LISTING_COMPONENT : args.listingName;
|
|
11
11
|
const month = mode === 'tag' ? EMAIL_DATE_COMPONENT : args.month;
|
|
12
12
|
const userName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.userName;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
subject: mode === 'tag'
|
|
18
|
-
? 'Your owner statement is ready'
|
|
19
|
-
: `Your ${args.month} owner statement for ${args.listingName}`,
|
|
20
|
-
shortDescription: mode === 'tag'
|
|
21
|
-
? 'Your owner statement is ready. Open it with one click, no login needed.'
|
|
22
|
-
: `Your ${args.month} statement for ${args.listingName} is ready. Open it with one click, no login needed.`,
|
|
23
|
-
header: 'Your owner statement is ready',
|
|
24
|
-
bodyOne: `<p>Hi ${userName},</p><p>${args.appName} published your ${month} owner statement for ${listingName}. Open it with the button below. You don't need a login.</p>`,
|
|
25
|
-
buttonText: 'View statement',
|
|
26
|
-
bodyTwo: `<p style="color:#737373;font-size:13px">If the button doesn't work, copy this link into your browser: ${ownerStatementHref}</p>`,
|
|
27
|
-
href: args.ownerStatementHref,
|
|
28
|
-
};
|
|
29
|
-
}
|
|
13
|
+
// Owners open the statement by link without a login and viewers log in to
|
|
14
|
+
// the owner portal, so the text names neither. Subject and preview text are
|
|
15
|
+
// plain text without tokens, so a saved template must not keep the editor's
|
|
16
|
+
// sample month and listing.
|
|
30
17
|
return {
|
|
31
|
-
subject:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
18
|
+
subject: mode === 'tag'
|
|
19
|
+
? 'Your owner statement is ready'
|
|
20
|
+
: `Your ${args.month} owner statement for ${args.listingName}`,
|
|
21
|
+
shortDescription: mode === 'tag'
|
|
22
|
+
? 'Your owner statement is ready to view.'
|
|
23
|
+
: `Your ${args.month} statement for ${args.listingName} is ready to view.`,
|
|
24
|
+
header: 'Your owner statement is ready',
|
|
25
|
+
bodyOne: `<p>Hi ${userName},</p><p>${args.appName} published your ${month} owner statement for ${listingName}. Open it with the button below.</p>`,
|
|
26
|
+
buttonText: 'View statement',
|
|
27
|
+
bodyTwo: `<p style="color:#737373;font-size:13px">If the button doesn't work, copy this link into your browser: ${ownerStatementHref}</p>`,
|
|
37
28
|
href: args.ownerStatementHref,
|
|
38
29
|
};
|
|
39
30
|
};
|
|
@@ -46,19 +37,7 @@ export const OwnerStatementEmailTemplate = ({ data, tenant, themeColors, mode, u
|
|
|
46
37
|
date: month || '',
|
|
47
38
|
listingName: listing || '',
|
|
48
39
|
});
|
|
49
|
-
return (_jsxs(EmailContainer, { title: data.subject, shortDescription: data.shortDescription, tenant: tenant, mode: mode, unsubscribeHref: unsubscribeHref, children: [_jsx(Text, { style: {
|
|
50
|
-
color: themeColors[8],
|
|
51
|
-
fontSize: 12,
|
|
52
|
-
fontWeight: 600,
|
|
53
|
-
letterSpacing: '0.08em',
|
|
54
|
-
textTransform: 'uppercase',
|
|
55
|
-
margin: '0 0 8px',
|
|
56
|
-
}, children: "Owner statement" }), _jsx(Heading, { style: {
|
|
57
|
-
fontSize: 26,
|
|
58
|
-
fontWeight: 600,
|
|
59
|
-
lineHeight: '34px',
|
|
60
|
-
margin: '0 0 32px',
|
|
61
|
-
}, children: data.header?.trim() || 'Your owner statement is ready' }), data.banner?.trim() && (_jsx(Text, { style: {
|
|
40
|
+
return (_jsxs(EmailContainer, { title: data.subject, shortDescription: data.shortDescription, tenant: tenant, mode: mode, unsubscribeHref: unsubscribeHref, children: [_jsx(EmailHeading, { eyebrow: "Owner statement", themeColors: themeColors, children: data.header?.trim() || 'Your owner statement is ready' }), data.banner?.trim() && (_jsx(Text, { style: {
|
|
62
41
|
padding: '16px 20px',
|
|
63
42
|
backgroundColor: '#f8f9fa',
|
|
64
43
|
borderLeft: `3px solid ${themeColors[8]}`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OwnerStatementEmailTemplate.js","sourceRoot":"src/","sources":["templates/OwnerStatementEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EACL,2BAA2B,EAC3B,oBAAoB,EACpB,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,eAAe,CAAC;AAKvB,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAC/C,IAAoB,EACpB,IAQC,EACgB,EAAE;IACnB,MAAM,kBAAkB,GACtB,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;IAEzE,MAAM,WAAW,GACf,IAAI,KAAK,KAAK,CAAC,CA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@react-email/text';\nimport {\n EMAIL_ACTION_LINK_COMPONENT,\n EMAIL_DATE_COMPONENT,\n EMAIL_LISTING_COMPONENT,\n EMAIL_USER_NAME_COMPONENT,\n} from '../extensions';\nimport type {\n ActionEmailData,\n ActionEmailTemplateProps,\n} from '../components/ActionEmailTemplate';\nimport { Button } from '../components/Button';\nimport { EmailContainer } from '../components/EmailContainer';\nimport { parseEmailHtml } from '../components/utils';\n\nexport const getDefaultOwnerStatementEmailData = (\n mode: 'tag' | 'text',\n args: {\n appName: string;\n ownerStatementHref: string;\n listingName: string;\n userName: string;\n month: string;\n /** The owner opens the statement through an emailed link, without a login. */\n noLogin?: boolean;\n }\n): ActionEmailData => {\n const ownerStatementHref =\n mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.ownerStatementHref;\n\n const listingName =\n mode === 'tag' ? EMAIL_LISTING_COMPONENT : args.listingName;\n const month = mode === 'tag' ? EMAIL_DATE_COMPONENT : args.month;\n const userName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.userName;\n\n if (args.noLogin) {\n // Subject and preview text are plain text without tokens, so a saved\n // template must not keep the editor's sample month and listing.\n return {\n subject:\n mode === 'tag'\n ? 'Your owner statement is ready'\n : `Your ${args.month} owner statement for ${args.listingName}`,\n shortDescription:\n mode === 'tag'\n ? 'Your owner statement is ready. Open it with one click, no login needed.'\n : `Your ${args.month} statement for ${args.listingName} is ready. Open it with one click, no login needed.`,\n header: 'Your owner statement is ready',\n bodyOne: `<p>Hi ${userName},</p><p>${args.appName} published your ${month} owner statement for ${listingName}. Open it with the button below. You don't need a login.</p>`,\n buttonText: 'View statement',\n bodyTwo: `<p style=\"color:#737373;font-size:13px\">If the button doesn't work, copy this link into your browser: ${ownerStatementHref}</p>`,\n href: args.ownerStatementHref,\n };\n }\n\n return {\n subject: 'Owner statement was published',\n shortDescription: `An owner statement is ready for you. Log in to ${args.appName} now to view it.`,\n header: 'Owner statement was published',\n bodyOne: `<p>Hi ${userName},<p>Your ${month} owner statement for property ${listingName} is ready for your review on ${args.appName}.</p><p>To access your statement, please click the button below:</p>`,\n buttonText: 'View Owner statement',\n bodyTwo: `<p>If you have any trouble with the button, you can copy and paste the link below into your browser: ${ownerStatementHref}</p>`,\n href: args.ownerStatementHref,\n };\n};\n\nconst mutedColor = '#737373';\nconst borderColor = '#e5e7eb';\n\nexport const OwnerStatementEmailTemplate = ({\n data,\n tenant,\n themeColors,\n mode,\n user,\n listing,\n month,\n unsubscribeHref,\n renewHref,\n}: ActionEmailTemplateProps & {\n /** Requests a new no-login link once the emailed one has expired. */\n renewHref?: string;\n}) => {\n const parse = (html: string) =>\n parseEmailHtml(html, {\n href: data.href,\n userName: user.firstName || '',\n date: month || '',\n listingName: listing || '',\n });\n\n return (\n <EmailContainer\n title={data.subject}\n shortDescription={data.shortDescription}\n tenant={tenant}\n mode={mode}\n unsubscribeHref={unsubscribeHref}\n >\n <Text\n style={{\n color: themeColors[8],\n fontSize: 12,\n fontWeight: 600,\n letterSpacing: '0.08em',\n textTransform: 'uppercase',\n margin: '0 0 8px',\n }}\n >\n Owner statement\n </Text>\n <Heading\n style={{\n fontSize: 26,\n fontWeight: 600,\n lineHeight: '34px',\n margin: '0 0 32px',\n }}\n >\n {data.header?.trim() || 'Your owner statement is ready'}\n </Heading>\n\n {data.banner?.trim() && (\n <Text\n style={{\n padding: '16px 20px',\n backgroundColor: '#f8f9fa',\n borderLeft: `3px solid ${themeColors[8]}`,\n borderRadius: '4px',\n margin: '0 0 32px',\n whiteSpace: 'pre-line',\n }}\n >\n {data.banner.trim()}\n </Text>\n )}\n\n <div\n // biome-ignore lint/security/noDangerouslySetInnerHtml: values are escaped by parseEmailHtml\n dangerouslySetInnerHTML={{ __html: parse(data.bodyOne) }}\n />\n\n {(listing || month) && (\n <table\n role=\"presentation\"\n cellPadding={0}\n cellSpacing={0}\n width=\"100%\"\n style={{\n border: `1px solid ${borderColor}`,\n borderRadius: '8px',\n borderCollapse: 'separate',\n margin: '24px 0 0',\n }}\n >\n <tbody>\n {[\n ['Property', listing],\n ['Statement', month],\n ].map(([label, value], index) =>\n value ? (\n <tr key={label}>\n <td\n style={{\n padding: '14px 20px',\n color: mutedColor,\n fontSize: 14,\n borderTop: index ? `1px solid ${borderColor}` : 'none',\n }}\n >\n {label}\n </td>\n <td\n style={{\n padding: '14px 20px',\n fontSize: 14,\n fontWeight: 600,\n textAlign: 'right',\n borderTop: index ? `1px solid ${borderColor}` : 'none',\n }}\n >\n {value}\n </td>\n </tr>\n ) : null\n )}\n </tbody>\n </table>\n )}\n\n <Button\n href={data.href}\n mode={mode}\n data-testid=\"view-owner-statement-button\"\n label={data.buttonText?.trim() || 'View statement'}\n themeColors={themeColors}\n style={{ marginTop: '24px', marginBottom: '32px' }}\n />\n\n {renewHref && (\n <div\n style={{\n padding: '20px',\n backgroundColor: '#f8f9fa',\n borderRadius: '8px',\n marginBottom: '32px',\n }}\n >\n <Text style={{ fontWeight: 600, margin: '0 0 4px' }}>\n Link expired?\n </Text>\n <Text style={{ color: mutedColor, fontSize: 14, margin: 0 }}>\n For your security, this link opens only this statement and works for\n 7 days. After that, request a new one and we'll email it to this\n address.\n </Text>\n <Button\n href={renewHref}\n mode={mode}\n data-testid=\"renew-owner-statement-link-button\"\n label=\"Send me a new link\"\n themeColors={themeColors}\n style={{\n background: '#ffffff',\n border: `1px solid ${themeColors[8]}`,\n color: themeColors[8],\n marginTop: '16px',\n marginBottom: 0,\n }}\n />\n </div>\n )}\n\n <div\n // biome-ignore lint/security/noDangerouslySetInnerHtml: values are escaped by parseEmailHtml\n dangerouslySetInnerHTML={{ __html: parse(data.bodyTwo) }}\n />\n </EmailContainer>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"OwnerStatementEmailTemplate.js","sourceRoot":"src/","sources":["templates/OwnerStatementEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EACL,2BAA2B,EAC3B,oBAAoB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,EAAE,IAAI,iBACE,6BAA6B,EACzC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,gBAAgB,EAClD,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,GAClD,EAED,SAAS,IAAI,CACZ,eACE,KAAK,EAAE;oBACL,OAAO,EAAE,MAAM;oBACf,eAAe,EAAE,SAAS;oBAC1B,YAAY,EAAE,KAAK;oBACnB,YAAY,EAAE,MAAM;iBACrB,aAED,KAAC,IAAI,IAAC,KAAK,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,8BAE5C,EACP,KAAC,IAAI,IAAC,KAAK,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,+JAIpD,EACP,KAAC,MAAM,IACL,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,IAAI,iBACE,mCAAmC,EAC/C,KAAK,EAAC,oBAAoB,EAC1B,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE;4BACL,UAAU,EAAE,SAAS;4BACrB,MAAM,EAAE,aAAa,WAAW,CAAC,CAAC,CAAC,EAAE;4BACrC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC;4BACrB,SAAS,EAAE,MAAM;4BACjB,YAAY,EAAE,CAAC;yBAChB,GACD,IACE,CACP,EAED;gBACE,6FAA6F;gBAC7F,uBAAuB,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,GACxD,IACa,CAClB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Text } from '@react-email/text';\nimport {\n EMAIL_ACTION_LINK_COMPONENT,\n EMAIL_DATE_COMPONENT,\n EMAIL_LISTING_COMPONENT,\n EMAIL_USER_NAME_COMPONENT,\n} from '../extensions';\nimport type {\n ActionEmailData,\n ActionEmailTemplateProps,\n} from '../components/ActionEmailTemplate';\nimport { Button } from '../components/Button';\nimport { EmailContainer } from '../components/EmailContainer';\nimport { EmailHeading } from '../components/EmailHeading';\nimport { parseEmailHtml } from '../components/utils';\n\nexport const getDefaultOwnerStatementEmailData = (\n mode: 'tag' | 'text',\n args: {\n appName: string;\n ownerStatementHref: string;\n listingName: string;\n userName: string;\n month: string;\n }\n): ActionEmailData => {\n const ownerStatementHref =\n mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.ownerStatementHref;\n\n const listingName =\n mode === 'tag' ? EMAIL_LISTING_COMPONENT : args.listingName;\n const month = mode === 'tag' ? EMAIL_DATE_COMPONENT : args.month;\n const userName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.userName;\n\n // Owners open the statement by link without a login and viewers log in to\n // the owner portal, so the text names neither. Subject and preview text are\n // plain text without tokens, so a saved template must not keep the editor's\n // sample month and listing.\n return {\n subject:\n mode === 'tag'\n ? 'Your owner statement is ready'\n : `Your ${args.month} owner statement for ${args.listingName}`,\n shortDescription:\n mode === 'tag'\n ? 'Your owner statement is ready to view.'\n : `Your ${args.month} statement for ${args.listingName} is ready to view.`,\n header: 'Your owner statement is ready',\n bodyOne: `<p>Hi ${userName},</p><p>${args.appName} published your ${month} owner statement for ${listingName}. Open it with the button below.</p>`,\n buttonText: 'View statement',\n bodyTwo: `<p style=\"color:#737373;font-size:13px\">If the button doesn't work, copy this link into your browser: ${ownerStatementHref}</p>`,\n href: args.ownerStatementHref,\n };\n};\n\nconst mutedColor = '#737373';\nconst borderColor = '#e5e7eb';\n\nexport const OwnerStatementEmailTemplate = ({\n data,\n tenant,\n themeColors,\n mode,\n user,\n listing,\n month,\n unsubscribeHref,\n renewHref,\n}: ActionEmailTemplateProps & {\n /** Requests a new no-login link once the emailed one has expired. */\n renewHref?: string;\n}) => {\n const parse = (html: string) =>\n parseEmailHtml(html, {\n href: data.href,\n userName: user.firstName || '',\n date: month || '',\n listingName: listing || '',\n });\n\n return (\n <EmailContainer\n title={data.subject}\n shortDescription={data.shortDescription}\n tenant={tenant}\n mode={mode}\n unsubscribeHref={unsubscribeHref}\n >\n <EmailHeading eyebrow=\"Owner statement\" themeColors={themeColors}>\n {data.header?.trim() || 'Your owner statement is ready'}\n </EmailHeading>\n\n {data.banner?.trim() && (\n <Text\n style={{\n padding: '16px 20px',\n backgroundColor: '#f8f9fa',\n borderLeft: `3px solid ${themeColors[8]}`,\n borderRadius: '4px',\n margin: '0 0 32px',\n whiteSpace: 'pre-line',\n }}\n >\n {data.banner.trim()}\n </Text>\n )}\n\n <div\n // biome-ignore lint/security/noDangerouslySetInnerHtml: values are escaped by parseEmailHtml\n dangerouslySetInnerHTML={{ __html: parse(data.bodyOne) }}\n />\n\n {(listing || month) && (\n <table\n role=\"presentation\"\n cellPadding={0}\n cellSpacing={0}\n width=\"100%\"\n style={{\n border: `1px solid ${borderColor}`,\n borderRadius: '8px',\n borderCollapse: 'separate',\n margin: '24px 0 0',\n }}\n >\n <tbody>\n {[\n ['Property', listing],\n ['Statement', month],\n ].map(([label, value], index) =>\n value ? (\n <tr key={label}>\n <td\n style={{\n padding: '14px 20px',\n color: mutedColor,\n fontSize: 14,\n borderTop: index ? `1px solid ${borderColor}` : 'none',\n }}\n >\n {label}\n </td>\n <td\n style={{\n padding: '14px 20px',\n fontSize: 14,\n fontWeight: 600,\n textAlign: 'right',\n borderTop: index ? `1px solid ${borderColor}` : 'none',\n }}\n >\n {value}\n </td>\n </tr>\n ) : null\n )}\n </tbody>\n </table>\n )}\n\n <Button\n href={data.href}\n mode={mode}\n data-testid=\"view-owner-statement-button\"\n label={data.buttonText?.trim() || 'View statement'}\n themeColors={themeColors}\n style={{ marginTop: '24px', marginBottom: '32px' }}\n />\n\n {renewHref && (\n <div\n style={{\n padding: '20px',\n backgroundColor: '#f8f9fa',\n borderRadius: '8px',\n marginBottom: '32px',\n }}\n >\n <Text style={{ fontWeight: 600, margin: '0 0 4px' }}>\n Link expired?\n </Text>\n <Text style={{ color: mutedColor, fontSize: 14, margin: 0 }}>\n For your security, this link opens only this statement and works for\n 7 days. After that, request a new one and we'll email it to this\n address.\n </Text>\n <Button\n href={renewHref}\n mode={mode}\n data-testid=\"renew-owner-statement-link-button\"\n label=\"Send me a new link\"\n themeColors={themeColors}\n style={{\n background: '#ffffff',\n border: `1px solid ${themeColors[8]}`,\n color: themeColors[8],\n marginTop: '16px',\n marginBottom: 0,\n }}\n />\n </div>\n )}\n\n <div\n // biome-ignore lint/security/noDangerouslySetInnerHtml: values are escaped by parseEmailHtml\n dangerouslySetInnerHTML={{ __html: parse(data.bodyTwo) }}\n />\n </EmailContainer>\n );\n};\n"]}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Heading } from '@react-email/heading';
|
|
3
2
|
import { Text } from '@react-email/text';
|
|
4
|
-
import { EmailContainer } from '../components';
|
|
3
|
+
import { EmailContainer, EmailHeading } from '../components';
|
|
4
|
+
import { THEME_COLORS } from '../theme';
|
|
5
5
|
export const TenantDeletionEmailTemplate = ({ tenant, mode, user, }) => {
|
|
6
6
|
return (_jsxs(EmailContainer, { title: 'Team Account Deletion Notification', shortDescription: "We're reaching out to inform you that your VRPlatform team has been deleted.", tenant: {
|
|
7
7
|
logo: undefined,
|
|
8
|
-
}, mode: mode, children: [_jsx(
|
|
9
|
-
fontSize: 28,
|
|
10
|
-
fontWeight: 600,
|
|
11
|
-
marginBottom: '50px',
|
|
12
|
-
}, children: user.firstName ? `Dear ${user.firstName},` : 'Hi there,' }), _jsxs(Text, { children: ["We wanted to inform you that the team account \"", tenant.name, "\" has been deleted. This action has resulted in the removal of the following data associated with the team:"] }), _jsxs("ul", { children: [_jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Payments:" }), " All payment records linked to the team have been permanently deleted."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Reservations:" }), " Any reservations made under this team account have been erased."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Owner Statements:" }), " All statements generated for owners within this team are no longer accessible."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Owner Data:" }), " Personal and transactional data of the owners connected to this team have been removed."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Connections:" }), " Any established connections or integrations related to this team have been terminated."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Other Related Data:" }), " All other data associated with this team has been permanently deleted."] }) })] }), _jsx(Text, { children: "If you have any questions or need further assistance, please don't hesitate to reach out." }), _jsxs(Text, { children: ["Best regards,", _jsx("br", {}), "The VRPlatform Team"] })] }));
|
|
8
|
+
}, mode: mode, children: [_jsx(EmailHeading, { eyebrow: "Team deleted", themeColors: THEME_COLORS.vrplatform, children: "Your team was deleted" }), _jsx(Text, { children: user.firstName ? `Dear ${user.firstName},` : 'Hi there,' }), _jsxs(Text, { children: ["We wanted to inform you that the team account \"", tenant.name, "\" has been deleted. This action has resulted in the removal of the following data associated with the team:"] }), _jsxs("ul", { children: [_jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Payments:" }), " All payment records linked to the team have been permanently deleted."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Reservations:" }), " Any reservations made under this team account have been erased."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Owner Statements:" }), " All statements generated for owners within this team are no longer accessible."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Owner Data:" }), " Personal and transactional data of the owners connected to this team have been removed."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Connections:" }), " Any established connections or integrations related to this team have been terminated."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Other Related Data:" }), " All other data associated with this team has been permanently deleted."] }) })] }), _jsx(Text, { children: "If you have any questions or need further assistance, please don't hesitate to reach out." }), _jsxs(Text, { children: ["Best regards,", _jsx("br", {}), "The VRPlatform Team"] })] }));
|
|
13
9
|
};
|
|
14
10
|
export const TenantDeletionEmail = (props) => {
|
|
15
11
|
return _jsx(TenantDeletionEmailTemplate, { ...props });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TenantDeletionEmailTemplate.js","sourceRoot":"src/","sources":["templates/TenantDeletionEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"TenantDeletionEmailTemplate.js","sourceRoot":"src/","sources":["templates/TenantDeletionEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AASxC,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,EAC1C,MAAM,EACN,IAAI,EACJ,IAAI,GAC6B,EAAE,EAAE;IACrC,OAAO,CACL,MAAC,cAAc,IACb,KAAK,EAAE,oCAAoC,EAC3C,gBAAgB,EACd,8EAA8E,EAEhF,MAAM,EAAE;YACN,IAAI,EAAE,SAAS;SAChB,EACD,IAAI,EAAE,IAAI,aAEV,KAAC,YAAY,IACX,OAAO,EAAC,cAAc,EACtB,WAAW,EAAE,YAAY,CAAC,UAAU,sCAGvB,EAEf,KAAC,IAAI,cAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,WAAW,GAAQ,EAEvE,MAAC,IAAI,mEAC6C,MAAM,CAAC,IAAI,oHAGtD,EACP,yBACE,uBACE,MAAC,IAAI,eACH,oCAAgB,8EAEX,GACJ,EACL,uBACE,MAAC,IAAI,eACH,wCAAoB,wEAEf,GACJ,EAEL,uBACE,MAAC,IAAI,eACH,4CAAwB,uFAEnB,GACJ,EAEL,uBACE,MAAC,IAAI,eACH,sCAAkB,gGAEb,GACJ,EAEL,uBACE,MAAC,IAAI,eACH,uCAAmB,+FAEd,GACJ,EAEL,uBACE,MAAC,IAAI,eACH,8CAA0B,+EAErB,GACJ,IACF,EACL,KAAC,IAAI,4GAGE,EACP,MAAC,IAAI,gCAEH,cAAM,2BAED,IACQ,CAClB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,KAAuC,EACvC,EAAE;IACF,OAAO,KAAC,2BAA2B,OAAK,KAAK,GAAI,CAAC;AACpD,CAAC,CAAC","sourcesContent":["import { Text } from '@react-email/text';\nimport { EmailContainer, EmailHeading } from '../components';\nimport { THEME_COLORS } from '../theme';\nimport type { EmailBaseProps } from '../types';\n\nexport type TenantDeletionEmailTemplateProps = {\n tenant: EmailBaseProps['tenant'];\n mode: EmailBaseProps['mode'];\n user: EmailBaseProps['user'];\n};\n\nexport const TenantDeletionEmailTemplate = ({\n tenant,\n mode,\n user,\n}: TenantDeletionEmailTemplateProps) => {\n return (\n <EmailContainer\n title={'Team Account Deletion Notification'}\n shortDescription={\n \"We're reaching out to inform you that your VRPlatform team has been deleted.\"\n }\n tenant={{\n logo: undefined,\n }}\n mode={mode}\n >\n <EmailHeading\n eyebrow=\"Team deleted\"\n themeColors={THEME_COLORS.vrplatform}\n >\n Your team was deleted\n </EmailHeading>\n\n <Text>{user.firstName ? `Dear ${user.firstName},` : 'Hi there,'}</Text>\n\n <Text>\n We wanted to inform you that the team account \"{tenant.name}\" has been\n deleted. This action has resulted in the removal of the following data\n associated with the team:\n </Text>\n <ul>\n <li>\n <Text>\n <b>Payments:</b> All payment records linked to the team have been\n permanently deleted.\n </Text>\n </li>\n <li>\n <Text>\n <b>Reservations:</b> Any reservations made under this team account\n have been erased.\n </Text>\n </li>\n\n <li>\n <Text>\n <b>Owner Statements:</b> All statements generated for owners within\n this team are no longer accessible.\n </Text>\n </li>\n\n <li>\n <Text>\n <b>Owner Data:</b> Personal and transactional data of the owners\n connected to this team have been removed.\n </Text>\n </li>\n\n <li>\n <Text>\n <b>Connections:</b> Any established connections or integrations\n related to this team have been terminated.\n </Text>\n </li>\n\n <li>\n <Text>\n <b>Other Related Data:</b> All other data associated with this team\n has been permanently deleted.\n </Text>\n </li>\n </ul>\n <Text>\n If you have any questions or need further assistance, please don't\n hesitate to reach out.\n </Text>\n <Text>\n Best regards,\n <br />\n The VRPlatform Team\n </Text>\n </EmailContainer>\n );\n};\n\nexport const TenantDeletionEmail = (\n props: TenantDeletionEmailTemplateProps\n) => {\n return <TenantDeletionEmailTemplate {...props} />;\n};\n"]}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Heading } from '@react-email/heading';
|
|
3
2
|
import { Text } from '@react-email/text';
|
|
4
|
-
import { EmailContainer } from '../components';
|
|
3
|
+
import { EmailContainer, EmailHeading } from '../components';
|
|
4
|
+
import { THEME_COLORS } from '../theme';
|
|
5
5
|
export const TenantSuspensionEmailTemplate = ({ mode, user, tenant, }) => {
|
|
6
6
|
return (_jsxs(EmailContainer, { title: 'Action Required: Your VRPlatform Account Access', shortDescription: "We're reaching out to inform you that access to your VRPlatform team has been temporarily suspended.", tenant: {
|
|
7
7
|
logo: undefined,
|
|
8
|
-
}, mode: mode, children: [_jsx(
|
|
9
|
-
fontSize: 28,
|
|
10
|
-
fontWeight: 600,
|
|
11
|
-
marginBottom: '50px',
|
|
12
|
-
}, children: user.firstName ? `Dear ${user.firstName},` : 'Hi there,' }), _jsxs(Text, { children: ["We're reaching out to inform you that as of today, access to your team", ' ', _jsx("b", { children: tenant.name }), " has been temporarily suspended. This includes access to features such as accounting automations, owner statements, management commissions and the owner portal (including portal access for all owners)."] }), _jsx(Text, { children: "At VRPlatform, we take the security and functionality of our platform seriously, ensuring that our partners have the best possible experience. This step, though necessary, is intended to be temporary and is part of our commitment to maintain the highest standards of service." }), _jsx(Text, { style: {
|
|
8
|
+
}, mode: mode, children: [_jsx(EmailHeading, { eyebrow: "Team suspended", themeColors: THEME_COLORS.vrplatform, children: "Your team access is suspended" }), _jsx(Text, { children: user.firstName ? `Dear ${user.firstName},` : 'Hi there,' }), _jsxs(Text, { children: ["We're reaching out to inform you that as of today, access to your team", ' ', _jsx("b", { children: tenant.name }), " has been temporarily suspended. This includes access to features such as accounting automations, owner statements, management commissions and the owner portal (including portal access for all owners)."] }), _jsx(Text, { children: "At VRPlatform, we take the security and functionality of our platform seriously, ensuring that our partners have the best possible experience. This step, though necessary, is intended to be temporary and is part of our commitment to maintain the highest standards of service." }), _jsx(Text, { style: {
|
|
13
9
|
fontWeight: 'bold',
|
|
14
10
|
}, children: "Next Steps to Regain Access:" }), _jsxs("ul", { children: [_jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Immediate Action:" }), " To adress this and help you regain access to your account, please contact our support team at your earliest convenience. We're here to assist you with the necessary steps to restore your services."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Contact Information:" }), " You can reach us by emailing support@vrplatform.app. Our dedicated team is ready to support you in resolving this matter promptly."] }) })] }), _jsx(Text, { children: "Thank you for your prompt attention to this important matter. We value your partnership and are here to support you every step of the way." }), _jsxs(Text, { children: ["Best regards,", _jsx("br", {}), "The VRPlatform Team"] })] }));
|
|
15
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TenantSuspensionEmailTemplate.js","sourceRoot":"src/","sources":["templates/TenantSuspensionEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"TenantSuspensionEmailTemplate.js","sourceRoot":"src/","sources":["templates/TenantSuspensionEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AASxC,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,EAC5C,IAAI,EACJ,IAAI,EACJ,MAAM,GAC6B,EAAE,EAAE;IACvC,OAAO,CACL,MAAC,cAAc,IACb,KAAK,EAAE,iDAAiD,EACxD,gBAAgB,EACd,sGAAsG,EAExG,MAAM,EAAE;YACN,IAAI,EAAE,SAAS;SAChB,EACD,IAAI,EAAE,IAAI,aAEV,KAAC,YAAY,IACX,OAAO,EAAC,gBAAgB,EACxB,WAAW,EAAE,YAAY,CAAC,UAAU,8CAGvB,EAEf,KAAC,IAAI,cAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,WAAW,GAAQ,EAEvE,MAAC,IAAI,yFACoE,GAAG,EAC1E,sBAAI,MAAM,CAAC,IAAI,GAAK,iNAIf,EACP,KAAC,IAAI,sSAKE,EACP,KAAC,IAAI,IACH,KAAK,EAAE;oBACL,UAAU,EAAE,MAAM;iBACnB,6CAGI,EACP,yBACE,uBACE,MAAC,IAAI,eACH,4CAAwB,6MAInB,GACJ,EACL,uBACE,MAAC,IAAI,eACH,+CAA2B,2IAGtB,GACJ,IACF,EACL,KAAC,IAAI,6JAGE,EACP,MAAC,IAAI,gCAEH,cAAM,2BAED,IACQ,CAClB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Text } from '@react-email/text';\nimport { EmailContainer, EmailHeading } from '../components';\nimport { THEME_COLORS } from '../theme';\nimport type { EmailBaseProps } from '../types';\n\nexport type TenantSuspensionEmailTemplateProps = {\n mode: EmailBaseProps['mode'];\n user: EmailBaseProps['user'];\n tenant: Omit<EmailBaseProps['tenant'], 'logo'>;\n};\n\nexport const TenantSuspensionEmailTemplate = ({\n mode,\n user,\n tenant,\n}: TenantSuspensionEmailTemplateProps) => {\n return (\n <EmailContainer\n title={'Action Required: Your VRPlatform Account Access'}\n shortDescription={\n \"We're reaching out to inform you that access to your VRPlatform team has been temporarily suspended.\"\n }\n tenant={{\n logo: undefined,\n }}\n mode={mode}\n >\n <EmailHeading\n eyebrow=\"Team suspended\"\n themeColors={THEME_COLORS.vrplatform}\n >\n Your team access is suspended\n </EmailHeading>\n\n <Text>{user.firstName ? `Dear ${user.firstName},` : 'Hi there,'}</Text>\n\n <Text>\n We're reaching out to inform you that as of today, access to your team{' '}\n <b>{tenant.name}</b> has been temporarily suspended. This includes\n access to features such as accounting automations, owner statements,\n management commissions and the owner portal (including portal access for\n all owners).\n </Text>\n <Text>\n At VRPlatform, we take the security and functionality of our platform\n seriously, ensuring that our partners have the best possible experience.\n This step, though necessary, is intended to be temporary and is part of\n our commitment to maintain the highest standards of service.\n </Text>\n <Text\n style={{\n fontWeight: 'bold',\n }}\n >\n Next Steps to Regain Access:\n </Text>\n <ul>\n <li>\n <Text>\n <b>Immediate Action:</b> To adress this and help you regain access\n to your account, please contact our support team at your earliest\n convenience. We're here to assist you with the necessary steps to\n restore your services.\n </Text>\n </li>\n <li>\n <Text>\n <b>Contact Information:</b> You can reach us by emailing\n support@vrplatform.app. Our dedicated team is ready to support you\n in resolving this matter promptly.\n </Text>\n </li>\n </ul>\n <Text>\n Thank you for your prompt attention to this important matter. We value\n your partnership and are here to support you every step of the way.\n </Text>\n <Text>\n Best regards,\n <br />\n The VRPlatform Team\n </Text>\n </EmailContainer>\n );\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Heading } from '@react-email/heading';
|
|
2
1
|
import { Text } from '@react-email/text';
|
|
3
2
|
import { EmailContainer } from './EmailContainer';
|
|
3
|
+
import { EmailHeading } from './EmailHeading';
|
|
4
4
|
import type { EmailBaseProps } from '../types';
|
|
5
5
|
import { parseEmailHtml } from './utils';
|
|
6
6
|
import { Button } from './Button';
|
|
@@ -22,6 +22,7 @@ export interface ActionEmailTemplateProps extends EmailBaseProps {
|
|
|
22
22
|
|
|
23
23
|
export const ActionEmailTemplate = ({
|
|
24
24
|
data,
|
|
25
|
+
eyebrow,
|
|
25
26
|
tenant,
|
|
26
27
|
themeColors,
|
|
27
28
|
mode,
|
|
@@ -29,7 +30,7 @@ export const ActionEmailTemplate = ({
|
|
|
29
30
|
listing,
|
|
30
31
|
month,
|
|
31
32
|
unsubscribeHref,
|
|
32
|
-
}: ActionEmailTemplateProps) => {
|
|
33
|
+
}: ActionEmailTemplateProps & { eyebrow: string }) => {
|
|
33
34
|
return (
|
|
34
35
|
<EmailContainer
|
|
35
36
|
title={data.subject}
|
|
@@ -38,23 +39,19 @@ export const ActionEmailTemplate = ({
|
|
|
38
39
|
mode={mode}
|
|
39
40
|
unsubscribeHref={unsubscribeHref}
|
|
40
41
|
>
|
|
41
|
-
<
|
|
42
|
-
style={{
|
|
43
|
-
fontSize: 28,
|
|
44
|
-
fontWeight: 600,
|
|
45
|
-
marginBottom: '50px',
|
|
46
|
-
}}
|
|
47
|
-
>
|
|
42
|
+
<EmailHeading eyebrow={eyebrow} themeColors={themeColors}>
|
|
48
43
|
{data.header?.trim() || `Welcome to ${tenant.name}!`}
|
|
49
|
-
</
|
|
44
|
+
</EmailHeading>
|
|
50
45
|
|
|
51
46
|
{data.banner?.trim() && (
|
|
52
47
|
<Text
|
|
53
48
|
style={{
|
|
54
|
-
padding: '
|
|
55
|
-
backgroundColor: '#
|
|
49
|
+
padding: '16px 20px',
|
|
50
|
+
backgroundColor: '#f8f9fa',
|
|
51
|
+
borderLeft: `3px solid ${themeColors[8]}`,
|
|
56
52
|
borderRadius: '4px',
|
|
57
|
-
|
|
53
|
+
margin: '0 0 32px',
|
|
54
|
+
whiteSpace: 'pre-line',
|
|
58
55
|
}}
|
|
59
56
|
>
|
|
60
57
|
{data.banner.trim()}
|
|
@@ -79,6 +76,7 @@ export const ActionEmailTemplate = ({
|
|
|
79
76
|
data-testid="accept-invite-button"
|
|
80
77
|
label={data.buttonText?.trim() || 'Accept Invitation'}
|
|
81
78
|
themeColors={themeColors}
|
|
79
|
+
style={{ marginTop: '24px', marginBottom: '32px' }}
|
|
82
80
|
/>
|
|
83
81
|
|
|
84
82
|
<div
|
|
@@ -7,6 +7,7 @@ import { Img } from '@react-email/img';
|
|
|
7
7
|
import { Preview } from '@react-email/preview';
|
|
8
8
|
import { Text } from '@react-email/text';
|
|
9
9
|
import { day } from '@vrplatform/utils';
|
|
10
|
+
import { VRP_PLATFORM } from '../const';
|
|
10
11
|
import type { EmailBaseProps } from '../types';
|
|
11
12
|
|
|
12
13
|
type Props = {
|
|
@@ -96,7 +97,7 @@ const Content = ({
|
|
|
96
97
|
<Text>{name}</Text>
|
|
97
98
|
) : mode === 'send' ? (
|
|
98
99
|
<Img
|
|
99
|
-
src={
|
|
100
|
+
src={`${VRP_PLATFORM.portal}/logo.png`}
|
|
100
101
|
alt={'Logo'}
|
|
101
102
|
width={70}
|
|
102
103
|
style={{ marginBottom: '60px' }}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Heading } from '@react-email/heading';
|
|
2
|
+
import { Text } from '@react-email/text';
|
|
3
|
+
import type { EmailBaseProps } from '../types';
|
|
4
|
+
|
|
5
|
+
type Props = {
|
|
6
|
+
eyebrow: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
themeColors: EmailBaseProps['themeColors'];
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const EmailHeading = ({ eyebrow, children, themeColors }: Props) => (
|
|
12
|
+
<>
|
|
13
|
+
<Text
|
|
14
|
+
style={{
|
|
15
|
+
color: themeColors[8],
|
|
16
|
+
fontSize: 12,
|
|
17
|
+
fontWeight: 600,
|
|
18
|
+
letterSpacing: '0.08em',
|
|
19
|
+
textTransform: 'uppercase',
|
|
20
|
+
margin: '0 0 8px',
|
|
21
|
+
}}
|
|
22
|
+
>
|
|
23
|
+
{eyebrow}
|
|
24
|
+
</Text>
|
|
25
|
+
<Heading
|
|
26
|
+
style={{
|
|
27
|
+
fontSize: 26,
|
|
28
|
+
fontWeight: 600,
|
|
29
|
+
lineHeight: '34px',
|
|
30
|
+
margin: '0 0 32px',
|
|
31
|
+
}}
|
|
32
|
+
>
|
|
33
|
+
{children}
|
|
34
|
+
</Heading>
|
|
35
|
+
</>
|
|
36
|
+
);
|
package/src/components/index.ts
CHANGED
package/src/index.ts
CHANGED
package/src/render.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { plainTextSelectors, render as renderEmail } from '@react-email/render';
|
|
2
|
+
|
|
3
|
+
// html-to-text uppercases headings by default, so the plain-text part of an
|
|
4
|
+
// email opened "HI THERE," (PRO-19711). Headings keep their case.
|
|
5
|
+
export const render: typeof renderEmail = (component, options) =>
|
|
6
|
+
renderEmail(
|
|
7
|
+
component,
|
|
8
|
+
options?.plainText
|
|
9
|
+
? {
|
|
10
|
+
...options,
|
|
11
|
+
htmlToTextOptions: {
|
|
12
|
+
...options.htmlToTextOptions,
|
|
13
|
+
selectors: [
|
|
14
|
+
...plainTextSelectors,
|
|
15
|
+
...['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].map((selector) => ({
|
|
16
|
+
selector,
|
|
17
|
+
options: { uppercase: false },
|
|
18
|
+
})),
|
|
19
|
+
...(options.htmlToTextOptions?.selectors ?? []),
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
}
|
|
23
|
+
: options
|
|
24
|
+
);
|
|
@@ -7,7 +7,8 @@ export type BankAccountChangedEmailTemplateProps = {
|
|
|
7
7
|
mode: EmailBaseProps['mode'];
|
|
8
8
|
user: EmailBaseProps['user'];
|
|
9
9
|
tenant: EmailBaseProps['tenant'];
|
|
10
|
-
|
|
10
|
+
// Added: the payee had no bank account before.
|
|
11
|
+
bankAccount: { last4: string; changedOn: string; added: boolean };
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
export const BankAccountChangedEmailTemplate = ({
|
|
@@ -17,7 +18,11 @@ export const BankAccountChangedEmailTemplate = ({
|
|
|
17
18
|
bankAccount,
|
|
18
19
|
}: BankAccountChangedEmailTemplateProps) => (
|
|
19
20
|
<EmailContainer
|
|
20
|
-
title=
|
|
21
|
+
title={
|
|
22
|
+
bankAccount.added
|
|
23
|
+
? 'Your bank account was added'
|
|
24
|
+
: 'Your bank account was changed'
|
|
25
|
+
}
|
|
21
26
|
shortDescription={`${tenant.name} now pays you to the account ending in ${bankAccount.last4}.`}
|
|
22
27
|
tenant={tenant}
|
|
23
28
|
mode={mode}
|
|
@@ -25,14 +30,23 @@ export const BankAccountChangedEmailTemplate = ({
|
|
|
25
30
|
<Heading style={{ fontSize: 28, fontWeight: 600, marginBottom: '50px' }}>
|
|
26
31
|
{user.firstName ? `Hi ${user.firstName},` : 'Hi there,'}
|
|
27
32
|
</Heading>
|
|
33
|
+
{bankAccount.added ? (
|
|
34
|
+
<Text>
|
|
35
|
+
A bank account for payments from <b>{tenant.name}</b> was added on{' '}
|
|
36
|
+
{bankAccount.changedOn}. Future payments go to the account ending in{' '}
|
|
37
|
+
<b>{bankAccount.last4}</b>.
|
|
38
|
+
</Text>
|
|
39
|
+
) : (
|
|
40
|
+
<Text>
|
|
41
|
+
The bank account <b>{tenant.name}</b> pays you to was changed on{' '}
|
|
42
|
+
{bankAccount.changedOn}. Future payments go to the account ending in{' '}
|
|
43
|
+
<b>{bankAccount.last4}</b>. A payment already on its way still goes to
|
|
44
|
+
the previous account.
|
|
45
|
+
</Text>
|
|
46
|
+
)}
|
|
28
47
|
<Text>
|
|
29
|
-
|
|
30
|
-
{bankAccount.
|
|
31
|
-
<b>{bankAccount.last4}</b>. A payment already on its way still goes to the
|
|
32
|
-
previous account.
|
|
33
|
-
</Text>
|
|
34
|
-
<Text>
|
|
35
|
-
If you did not make or request this change, contact {tenant.name} right
|
|
48
|
+
If you did not make or request this{' '}
|
|
49
|
+
{bankAccount.added ? 'addition' : 'change'}, contact {tenant.name} right
|
|
36
50
|
away.
|
|
37
51
|
</Text>
|
|
38
52
|
</EmailContainer>
|
|
@@ -9,7 +9,13 @@ export type BankAccountChangedTeamAdminEmailTemplateProps = {
|
|
|
9
9
|
mode: EmailBaseProps['mode'];
|
|
10
10
|
tenant: EmailBaseProps['tenant'];
|
|
11
11
|
contact: { name: string; type: 'owner' | 'vendor' };
|
|
12
|
-
|
|
12
|
+
// Added: the contact had no bank account before.
|
|
13
|
+
bankAccount: {
|
|
14
|
+
last4: string;
|
|
15
|
+
changedOn: string;
|
|
16
|
+
changedBy: string | null;
|
|
17
|
+
added: boolean;
|
|
18
|
+
};
|
|
13
19
|
href: string;
|
|
14
20
|
};
|
|
15
21
|
|
|
@@ -21,17 +27,17 @@ export const BankAccountChangedTeamAdminEmailTemplate = ({
|
|
|
21
27
|
href,
|
|
22
28
|
}: BankAccountChangedTeamAdminEmailTemplateProps) => (
|
|
23
29
|
<EmailContainer
|
|
24
|
-
title={`Bank details changed for ${contact.name}`}
|
|
30
|
+
title={`Bank details ${bankAccount.added ? 'added' : 'changed'} for ${contact.name}`}
|
|
25
31
|
shortDescription={`Future payments to ${contact.name} go to the account ending in ${bankAccount.last4}.`}
|
|
26
32
|
tenant={tenant}
|
|
27
33
|
mode={mode}
|
|
28
34
|
>
|
|
29
35
|
<Heading style={{ fontSize: 28, fontWeight: 600, marginBottom: '50px' }}>
|
|
30
|
-
Bank details changed
|
|
36
|
+
Bank details {bankAccount.added ? 'added' : 'changed'}
|
|
31
37
|
</Heading>
|
|
32
38
|
<Text>
|
|
33
|
-
The bank account of {contact.type} <b>{contact.name}</b> was
|
|
34
|
-
{bankAccount.changedOn}
|
|
39
|
+
The bank account of {contact.type} <b>{contact.name}</b> was{' '}
|
|
40
|
+
{bankAccount.added ? 'added' : 'changed'} on {bankAccount.changedOn}
|
|
35
41
|
{bankAccount.changedBy ? ` by ${bankAccount.changedBy}` : ''}. Future
|
|
36
42
|
payments go to the account ending in <b>{bankAccount.last4}</b>.
|
|
37
43
|
</Text>
|
|
@@ -8,6 +8,9 @@ export type BankDetailsRequestEmailTemplateProps = {
|
|
|
8
8
|
mode: EmailBaseProps['mode'];
|
|
9
9
|
user: EmailBaseProps['user'];
|
|
10
10
|
tenant: EmailBaseProps['tenant'];
|
|
11
|
+
// The owner or vendor asked, so requests to different payees do not thread
|
|
12
|
+
// together.
|
|
13
|
+
payeeName: string;
|
|
11
14
|
themeColors: EmailBaseProps['themeColors'];
|
|
12
15
|
href: string;
|
|
13
16
|
// Owners enter their details in the owner portal; vendors in a one-time
|
|
@@ -21,12 +24,13 @@ export const BankDetailsRequestEmailTemplate = ({
|
|
|
21
24
|
mode,
|
|
22
25
|
user,
|
|
23
26
|
tenant,
|
|
27
|
+
payeeName,
|
|
24
28
|
themeColors,
|
|
25
29
|
href,
|
|
26
30
|
form,
|
|
27
31
|
}: BankDetailsRequestEmailTemplateProps) => (
|
|
28
32
|
<EmailContainer
|
|
29
|
-
title={`${tenant.name} needs
|
|
33
|
+
title={`${tenant.name} needs payout details for ${payeeName}`}
|
|
30
34
|
shortDescription={`Add the bank account ${tenant.name} pays you to.`}
|
|
31
35
|
tenant={tenant}
|
|
32
36
|
mode={mode}
|