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).
20 lines
569 B
TypeScript
20 lines
569 B
TypeScript
import { AdminOrder } from '../../orders/models/admin-order.model';
|
|
|
|
/**
|
|
* A customer is not its own stored entity - it's derived by grouping existing
|
|
* AdminOrder records by customer.email, since no customer gateway/backend exists.
|
|
* Every field here is a real aggregate over that customer's orders, never fabricated.
|
|
*/
|
|
export interface AdminCustomer {
|
|
email: string;
|
|
name: string;
|
|
phone: string;
|
|
orderCount: number;
|
|
totalSpent: number;
|
|
currency: string;
|
|
firstOrderAt: string;
|
|
lastOrderAt: string;
|
|
addresses: string[];
|
|
orders: AdminOrder[];
|
|
}
|