diff --git a/app/pages/bonus-system/[userId].vue b/app/pages/bonus-system/[userId].vue index 1852330..5bb4b4f 100644 --- a/app/pages/bonus-system/[userId].vue +++ b/app/pages/bonus-system/[userId].vue @@ -35,6 +35,26 @@ function formatAmount(value: number) { function formatDateTime(value: string) { return new Date(value).toLocaleString('ru-RU'); } + +function withdrawalStatusLabel(status: string) { + if (status === 'APPROVED') { + return 'Проведена'; + } + if (status === 'REJECTED') { + return 'Отклонена'; + } + return 'На проверке'; +} + +function withdrawalStatusClass(status: string) { + if (status === 'APPROVED') { + return 'bg-[#def7e8] text-[#0d854a]'; + } + if (status === 'REJECTED') { + return 'bg-[#fde8ea] text-[#b73742]'; + } + return 'bg-[#fff3d8] text-[#9a6100]'; +} -
-

Выводы

- -
-
-
-
-

{{ formatAmount(withdrawal.amount) }}

-

Создано {{ formatDateTime(withdrawal.createdAt) }}

-

{{ withdrawal.reviewComment }}

-
- - - Проверить выплату - -
-
+
+
+

Заявки на выплату

+

Все активные выплаты по этому бонусному счёту.

+ + +
+
+

Заявка

+

WD-{{ withdrawal.id.slice(-6).toUpperCase() }}

+
+ +
+

Создано {{ formatDateTime(withdrawal.createdAt) }}

+

{{ withdrawal.reviewComment }}

+
+ +
+ + {{ withdrawalStatusLabel(withdrawal.status) }} + +
+ +
+

{{ formatAmount(withdrawal.amount) }} ₽

+
+
+
-
-

Транзакции

+
+
+

Транзакции

+

История начислений и операций по бонусному счёту.

+
Начислений пока нет.
-
+
-
-
-

+{{ formatAmount(transaction.amount) }}

-

{{ transaction.reason }}

-

{{ formatDateTime(transaction.createdAt) }}

+
+
+

+{{ formatAmount(transaction.amount) }} ₽

- - Открыть заказ - +
+

Начисление

+

{{ transaction.reason }}

+
+ +
+ {{ formatDateTime(transaction.createdAt) }} +
+ +
+ + Открыть заказ + +
diff --git a/app/pages/bonus-system/index.vue b/app/pages/bonus-system/index.vue index 4f6fc19..cc7dacc 100644 --- a/app/pages/bonus-system/index.vue +++ b/app/pages/bonus-system/index.vue @@ -292,6 +292,10 @@ function productVisualLabel(product: ProductCard) { .map((part) => part.charAt(0).toUpperCase()) .join(''); } + +function compactProductTitle(product: ProductCard) { + return `Подарочная карта ${product.store}`; +}