add space name

This commit is contained in:
Philipinho
2026-04-13 20:17:53 +01:00
parent 655c5a724f
commit 630188e0f7
3 changed files with 12 additions and 4 deletions
@@ -246,7 +246,7 @@ export class VerificationNotificationService {
const context = await this.getPageContext(pageId, spaceId, appUrl); const context = await this.getPageContext(pageId, spaceId, appUrl);
if (!context) return; if (!context) return;
const { pageTitle, basePageUrl } = context; const { pageTitle, spaceName, basePageUrl } = context;
const actorName = await this.getUserName(actorId); const actorName = await this.getUserName(actorId);
for (const userId of accessibleVerifierIds) { for (const userId of accessibleVerifierIds) {
@@ -268,6 +268,7 @@ export class VerificationNotificationService {
ApprovalRequestedEmail({ ApprovalRequestedEmail({
actorName, actorName,
pageTitle, pageTitle,
spaceName,
pageUrl: basePageUrl, pageUrl: basePageUrl,
}), }),
); );
@@ -291,7 +292,7 @@ export class VerificationNotificationService {
const context = await this.getPageContext(pageId, spaceId, appUrl); const context = await this.getPageContext(pageId, spaceId, appUrl);
if (!context) return; if (!context) return;
const { pageTitle, basePageUrl } = context; const { pageTitle, spaceName, basePageUrl } = context;
const actorName = await this.getUserName(actorId); const actorName = await this.getUserName(actorId);
const notification = await this.notificationService.create({ const notification = await this.notificationService.create({
@@ -312,6 +313,7 @@ export class VerificationNotificationService {
ApprovalRejectedEmail({ ApprovalRejectedEmail({
actorName, actorName,
pageTitle, pageTitle,
spaceName,
pageUrl: basePageUrl, pageUrl: basePageUrl,
comment, comment,
}), }),
@@ -6,6 +6,7 @@ import { EmailButton, MailBody } from '../partials/partials';
interface Props { interface Props {
actorName: string; actorName: string;
pageTitle: string; pageTitle: string;
spaceName: string;
pageUrl: string; pageUrl: string;
comment?: string; comment?: string;
} }
@@ -13,6 +14,7 @@ interface Props {
export const ApprovalRejectedEmail = ({ export const ApprovalRejectedEmail = ({
actorName, actorName,
pageTitle, pageTitle,
spaceName,
pageUrl, pageUrl,
comment, comment,
}: Props) => { }: Props) => {
@@ -22,7 +24,8 @@ export const ApprovalRejectedEmail = ({
<Text style={paragraph}>Hi there,</Text> <Text style={paragraph}>Hi there,</Text>
<Text style={paragraph}> <Text style={paragraph}>
<strong>{actorName}</strong> returned{' '} <strong>{actorName}</strong> returned{' '}
<strong>{pageTitle}</strong> for revision. <strong>{pageTitle}</strong> in the{' '}
<strong>{spaceName}</strong> space for revision.
</Text> </Text>
{comment && ( {comment && (
<Text style={{ ...paragraph, fontStyle: 'italic' }}> <Text style={{ ...paragraph, fontStyle: 'italic' }}>
@@ -6,12 +6,14 @@ import { EmailButton, MailBody } from '../partials/partials';
interface Props { interface Props {
actorName: string; actorName: string;
pageTitle: string; pageTitle: string;
spaceName: string;
pageUrl: string; pageUrl: string;
} }
export const ApprovalRequestedEmail = ({ export const ApprovalRequestedEmail = ({
actorName, actorName,
pageTitle, pageTitle,
spaceName,
pageUrl, pageUrl,
}: Props) => { }: Props) => {
return ( return (
@@ -20,7 +22,8 @@ export const ApprovalRequestedEmail = ({
<Text style={paragraph}>Hi there,</Text> <Text style={paragraph}>Hi there,</Text>
<Text style={paragraph}> <Text style={paragraph}>
<strong>{actorName}</strong> submitted{' '} <strong>{actorName}</strong> submitted{' '}
<strong>{pageTitle}</strong> for your approval. <strong>{pageTitle}</strong> in the{' '}
<strong>{spaceName}</strong> space for your approval.
</Text> </Text>
</Section> </Section>
<EmailButton href={pageUrl}>Review page</EmailButton> <EmailButton href={pageUrl}>Review page</EmailButton>