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

@@ -1138,6 +1138,82 @@ export interface Translations {
optionalDataMissingDescription: string;
optionalDataMissingResolution: string;
};
adminOrders: {
back: string;
search: string;
export: string;
view: string;
orderNumber: string;
customer: string;
payment: string;
delivery: string;
trackingNumber: string;
createdAt: string;
items: string;
timeline: string;
notes: string;
internalNotes: string;
addNote: string;
changeStatus: string;
applyStatus: string;
archiveSelected: string;
printSelected: string;
printInvoice: string;
requestRefund: string;
cancelOrder: string;
confirmCancel: string;
confirmRefund: string;
emptyTitle: string;
emptyDescription: string;
column_customer: string;
column_status: string;
column_payment: string;
column_total: string;
column_created: string;
status: {
pending: string;
processing: string;
shipped: string;
delivered: string;
cancelled: string;
refunded: string;
};
paymentStatus: {
unpaid: string;
paid: string;
refund_requested: string;
refunded: string;
};
ordersToday: string;
paidCount: string;
customersCount: string;
returningCustomers: string;
averageOrder: string;
recentActivity: string;
noRecentActivity: string;
alertStuckPending: string;
alertRefundRequested: string;
};
adminCustomers: {
search: string;
name: string;
email: string;
phone: string;
orderCount: string;
lifetimeValue: string;
returning: string;
profile: string;
statistics: string;
firstOrder: string;
lastOrder: string;
addresses: string;
notes: string;
notesUnavailable: string;
orders: string;
activity: string;
emptyTitle: string;
emptyDescription: string;
};
mediaLibrary: {
title: string;
upload: string;
@@ -1471,6 +1547,7 @@ export interface Translations {
products: string;
categories: string;
orders: string;
customers: string;
transactions: string;
reviews: string;
reports: string;
@@ -1509,6 +1586,8 @@ export interface Translations {
categoryEdit: { title: string; description: string };
orders: { title: string; description: string };
orderDetail: { title: string; description: string };
customers: { title: string; description: string };
customerDetail: { title: string; description: string };
transactions: { title: string; description: string };
media: { title: string; description: string };
users: { title: string; description: string };