mirror of
https://github.com/docmost/docmost.git
synced 2026-05-06 22:03:06 +08:00
add space name
This commit is contained in:
@@ -246,7 +246,7 @@ export class VerificationNotificationService {
|
||||
const context = await this.getPageContext(pageId, spaceId, appUrl);
|
||||
if (!context) return;
|
||||
|
||||
const { pageTitle, basePageUrl } = context;
|
||||
const { pageTitle, spaceName, basePageUrl } = context;
|
||||
const actorName = await this.getUserName(actorId);
|
||||
|
||||
for (const userId of accessibleVerifierIds) {
|
||||
@@ -268,6 +268,7 @@ export class VerificationNotificationService {
|
||||
ApprovalRequestedEmail({
|
||||
actorName,
|
||||
pageTitle,
|
||||
spaceName,
|
||||
pageUrl: basePageUrl,
|
||||
}),
|
||||
);
|
||||
@@ -291,7 +292,7 @@ export class VerificationNotificationService {
|
||||
const context = await this.getPageContext(pageId, spaceId, appUrl);
|
||||
if (!context) return;
|
||||
|
||||
const { pageTitle, basePageUrl } = context;
|
||||
const { pageTitle, spaceName, basePageUrl } = context;
|
||||
const actorName = await this.getUserName(actorId);
|
||||
|
||||
const notification = await this.notificationService.create({
|
||||
@@ -312,6 +313,7 @@ export class VerificationNotificationService {
|
||||
ApprovalRejectedEmail({
|
||||
actorName,
|
||||
pageTitle,
|
||||
spaceName,
|
||||
pageUrl: basePageUrl,
|
||||
comment,
|
||||
}),
|
||||
|
||||
@@ -6,6 +6,7 @@ import { EmailButton, MailBody } from '../partials/partials';
|
||||
interface Props {
|
||||
actorName: string;
|
||||
pageTitle: string;
|
||||
spaceName: string;
|
||||
pageUrl: string;
|
||||
comment?: string;
|
||||
}
|
||||
@@ -13,6 +14,7 @@ interface Props {
|
||||
export const ApprovalRejectedEmail = ({
|
||||
actorName,
|
||||
pageTitle,
|
||||
spaceName,
|
||||
pageUrl,
|
||||
comment,
|
||||
}: Props) => {
|
||||
@@ -22,7 +24,8 @@ export const ApprovalRejectedEmail = ({
|
||||
<Text style={paragraph}>Hi there,</Text>
|
||||
<Text style={paragraph}>
|
||||
<strong>{actorName}</strong> returned{' '}
|
||||
<strong>{pageTitle}</strong> for revision.
|
||||
<strong>{pageTitle}</strong> in the{' '}
|
||||
<strong>{spaceName}</strong> space for revision.
|
||||
</Text>
|
||||
{comment && (
|
||||
<Text style={{ ...paragraph, fontStyle: 'italic' }}>
|
||||
|
||||
@@ -6,12 +6,14 @@ import { EmailButton, MailBody } from '../partials/partials';
|
||||
interface Props {
|
||||
actorName: string;
|
||||
pageTitle: string;
|
||||
spaceName: string;
|
||||
pageUrl: string;
|
||||
}
|
||||
|
||||
export const ApprovalRequestedEmail = ({
|
||||
actorName,
|
||||
pageTitle,
|
||||
spaceName,
|
||||
pageUrl,
|
||||
}: Props) => {
|
||||
return (
|
||||
@@ -20,7 +22,8 @@ export const ApprovalRequestedEmail = ({
|
||||
<Text style={paragraph}>Hi there,</Text>
|
||||
<Text style={paragraph}>
|
||||
<strong>{actorName}</strong> submitted{' '}
|
||||
<strong>{pageTitle}</strong> for your approval.
|
||||
<strong>{pageTitle}</strong> in the{' '}
|
||||
<strong>{spaceName}</strong> space for your approval.
|
||||
</Text>
|
||||
</Section>
|
||||
<EmailButton href={pageUrl}>Review page</EmailButton>
|
||||
|
||||
Reference in New Issue
Block a user