Tighten notification copy
This commit is contained in:
@@ -96,12 +96,12 @@ function formatOrderStatusLabel(status) {
|
||||
|
||||
function formatWithdrawalStatusLabel(status) {
|
||||
if (status === 'APPROVED') {
|
||||
return 'одобрена';
|
||||
return 'принята';
|
||||
}
|
||||
if (status === 'REJECTED') {
|
||||
return 'отклонена';
|
||||
return 'не принята';
|
||||
}
|
||||
return 'обновлена';
|
||||
return 'обработана';
|
||||
}
|
||||
|
||||
export function buildMessengerLoginTemplate({ buttonUrl, expiresAt = null }) {
|
||||
@@ -119,13 +119,13 @@ export function buildMessengerLoginTemplate({ buttonUrl, expiresAt = null }) {
|
||||
}
|
||||
|
||||
export function buildOrderStatusNotificationTemplate({ orderId, orderCode, status, note, role }) {
|
||||
void note;
|
||||
const body = [
|
||||
`Статус заказа ${orderCode}: ${formatOrderStatusLabel(status)}.`,
|
||||
...(note ? [`Комментарий: ${note}`] : []),
|
||||
`Статус заказа изменен на «${formatOrderStatusLabel(status)}».`,
|
||||
];
|
||||
|
||||
return {
|
||||
subject: `Изменение статуса заказа ${orderCode}`,
|
||||
subject: `Статус заказа ${orderCode} изменен`,
|
||||
body,
|
||||
message: body.join('\n'),
|
||||
buttonText: 'Открыть заказ',
|
||||
@@ -151,9 +151,9 @@ export function buildManualBonusNotificationTemplate({ amount }) {
|
||||
}
|
||||
|
||||
export function buildWithdrawalReviewNotificationTemplate({ status, reviewComment }) {
|
||||
void reviewComment;
|
||||
const body = [
|
||||
`Ваша заявка на вывод вознаграждения ${formatWithdrawalStatusLabel(status)}.`,
|
||||
...(reviewComment ? [`Комментарий: ${reviewComment}`] : []),
|
||||
`Ваша заявка на выплату вознаграждения ${formatWithdrawalStatusLabel(status)}.`,
|
||||
];
|
||||
|
||||
return {
|
||||
@@ -176,7 +176,7 @@ export function getNotificationTemplatesCatalog() {
|
||||
orderId: 'demo-order-id',
|
||||
orderCode: 'FRG-2401',
|
||||
status: 'IN_PROGRESS',
|
||||
note: 'заказ передан в производство',
|
||||
note: null,
|
||||
role: 'CLIENT',
|
||||
});
|
||||
const bonusTemplate = buildBonusCreditTemplate({
|
||||
@@ -184,7 +184,7 @@ export function getNotificationTemplatesCatalog() {
|
||||
});
|
||||
const withdrawalReviewTemplate = buildWithdrawalReviewNotificationTemplate({
|
||||
status: 'APPROVED',
|
||||
reviewComment: 'выплата передана в обработку',
|
||||
reviewComment: null,
|
||||
});
|
||||
|
||||
return [
|
||||
@@ -252,7 +252,7 @@ export function getNotificationTemplatesCatalog() {
|
||||
},
|
||||
{
|
||||
id: 'reward-withdrawal-review',
|
||||
title: 'Заявка на вывод вознаграждения',
|
||||
title: 'Заявка на выплату вознаграждения',
|
||||
channels: [
|
||||
createChannelPreview('TELEGRAM', {
|
||||
body: splitBody(withdrawalReviewTemplate.message),
|
||||
|
||||
Reference in New Issue
Block a user