feat(admin): implement order and customer operations experience
Some checks failed
Architecture Governance / architecture (push) Has been cancelled

Orders dashboard (real orders-today/pending/paid/cancelled/refunded/customers/returning-customers/average-order/recent-activity/system-alerts, computed from the full order book not just the current page); orders list gains density, saved column visibility, bulk status change/archive/delete/export/print alongside existing search+status filter+pagination, sticky table header; order detail gets a visual status workflow stepper in business language (Pending/Packing/Shipping/Completed, with Cancelled/Refunded as terminal states) and a reusable OrderTimelineComponent replacing the flat text log; added a derived Customers feature (list + profile detail: statistics/lifetime value/addresses/orders/activity/notes) built entirely by grouping existing AdminOrder records by email - no new backend, no invented gateway, since no customer entity existed. Added archive/restore/delete to the orders gateway (soft-delete pattern mirroring categories) and filled in the adminOrders/adminCustomers i18n namespaces, which previously didn't exist at all (every adminOrders.* label was rendering as a raw key).
This commit is contained in:
sdarbinyan
2026-07-18 21:47:54 +04:00
parent ac615837ab
commit 097927f124
30 changed files with 1218 additions and 36 deletions

View File

@@ -1135,6 +1135,82 @@ export const ru: Translations = {
optionalDataMissingDescription: 'Необязательное конфигурационное значение отсутствует.',
optionalDataMissingResolution: 'Добавьте значение, если оно нужно UX.',
},
adminOrders: {
back: 'Назад к заказам',
search: 'Поиск по номеру заказа, имени, email или телефону…',
export: 'Экспорт',
view: 'Просмотр',
orderNumber: 'Заказ',
customer: 'Клиент',
payment: 'Оплата',
delivery: 'Доставка',
trackingNumber: 'Номер отслеживания',
createdAt: 'Оформлен',
items: 'Товары',
timeline: 'Хронология',
notes: 'Заметки для клиента',
internalNotes: 'Внутренние заметки',
addNote: 'Добавить заметку',
changeStatus: 'Изменить статус',
applyStatus: 'Применить',
archiveSelected: 'В архив',
printSelected: 'Печать',
printInvoice: 'Печать накладной',
requestRefund: 'Запросить возврат',
cancelOrder: 'Отменить заказ',
confirmCancel: 'Отменить этот заказ?',
confirmRefund: 'Запросить возврат по этому заказу?',
emptyTitle: 'Заказов пока нет',
emptyDescription: 'Заказы появятся здесь после оформления покупок.',
column_customer: 'Клиент',
column_status: 'Статус',
column_payment: 'Оплата',
column_total: 'Сумма',
column_created: 'Оформлен',
status: {
pending: 'Ожидает',
processing: 'Сборка',
shipped: 'Доставляется',
delivered: 'Завершён',
cancelled: 'Отменён',
refunded: 'Возвращён',
},
paymentStatus: {
unpaid: 'Не оплачен',
paid: 'Оплачен',
refund_requested: 'Запрошен возврат',
refunded: 'Возвращён',
},
ordersToday: 'Заказов сегодня',
paidCount: 'Оплачено',
customersCount: 'Клиенты',
returningCustomers: 'Повторные клиенты',
averageOrder: 'Средний чек',
recentActivity: 'Недавняя активность',
noRecentActivity: 'Активности пока нет.',
alertStuckPending: 'заказов ожидают более 48 часов',
alertRefundRequested: 'заказов ждут запроса на возврат',
},
adminCustomers: {
search: 'Поиск по имени, email или телефону…',
name: 'Имя',
email: 'Email',
phone: 'Телефон',
orderCount: 'Заказы',
lifetimeValue: 'Общая сумма покупок',
returning: 'Повторный',
profile: 'Профиль',
statistics: 'Статистика',
firstOrder: 'Первый заказ',
lastOrder: 'Последний заказ',
addresses: 'Адреса',
notes: 'Заметки',
notesUnavailable: 'Заметок по клиенту пока нет — добавьте заметку к одному из его заказов.',
orders: 'Заказы',
activity: 'Активность',
emptyTitle: 'Клиентов пока нет',
emptyDescription: 'Клиенты появятся здесь после первого заказа.',
},
mediaLibrary: {
title: 'Медиатека',
upload: 'Загрузить',
@@ -1459,6 +1535,7 @@ export const ru: Translations = {
products: 'Товары',
categories: 'Категории',
orders: 'Заказы',
customers: 'Клиенты',
transactions: 'Транзакции',
reviews: 'Отзывы',
reports: 'Отчёты',
@@ -1497,6 +1574,8 @@ export const ru: Translations = {
categoryEdit: { title: 'Редактирование категории', description: 'Измените данные категории' },
orders: { title: 'Заказы', description: 'Просматривайте и обрабатывайте заказы покупателей' },
orderDetail: { title: 'Заказ', description: 'Детали и статус заказа' },
customers: { title: 'Клиенты', description: 'Все, кто оформлял заказ' },
customerDetail: { title: 'Клиент', description: 'Профиль клиента, заказы и активность' },
transactions: { title: 'Транзакции', description: 'Платежи, возвраты и проверка мошенничества' },
media: { title: 'Медиатека', description: 'Изображения и файлы для товаров и страниц' },
users: { title: 'Пользователи', description: 'Команда администраторов и права доступа' },