Tighten notification copy

This commit is contained in:
Ruslan Bakiev
2026-04-06 21:28:15 +07:00
parent db2e05bbf4
commit 386f6fa9fe

View File

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