Sprint 27. New features/admin/analytics/ module + net-new /:lang/backoffice/analytics route + Dashboard Quick Action. - revenue/orders/avg-order-value/sales-over-time/top-products computed by composing AdminOrdersLocalGateway (Sprint 23's seeded mock orders) - real aggregation over mock data, not a separate fabricated dataset - products/categories counts from AdminProductsLocalGateway/ AdminCategoriesLocalGateway - visitors/funnels/heatmaps render pending-backend badges (no analytics pipeline exists anywhere in this system) rather than fabricated numbers, same convention as the Sprint 19 dashboard's pre-Sprint-23 Orders/Revenue cards - plain div-bar chart (no charting library), 7/30/90-day range toggle, CSV export docs/ADMIN.md + docs/BACKEND.md (new item 16) updated. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
46 lines
977 B
TypeScript
46 lines
977 B
TypeScript
export type AdminDashboardCardStatus = 'loading' | 'ready' | 'empty' | 'error' | 'pending-backend';
|
|
|
|
export interface AdminDashboardCardState<T> {
|
|
status: AdminDashboardCardStatus;
|
|
value: T | null;
|
|
}
|
|
|
|
export interface AdminDashboardMetrics {
|
|
categoriesCount: number;
|
|
productsCount: number;
|
|
}
|
|
|
|
export type AdminDashboardQuickActionId =
|
|
| 'edit-project'
|
|
| 'categories'
|
|
| 'products'
|
|
| 'static-pages'
|
|
| 'transactions'
|
|
| 'orders'
|
|
| 'media-library'
|
|
| 'users'
|
|
| 'monitoring'
|
|
| 'analytics'
|
|
| 'preview-marketplace';
|
|
|
|
export interface AdminDashboardQuickAction {
|
|
id: AdminDashboardQuickActionId;
|
|
labelKey: string;
|
|
route: string[];
|
|
external?: boolean;
|
|
}
|
|
|
|
export type AdminDashboardActivityType = 'draft-saved' | 'published';
|
|
|
|
export interface AdminDashboardActivityEntry {
|
|
id: string;
|
|
type: AdminDashboardActivityType;
|
|
timestamp: number;
|
|
}
|
|
|
|
export interface AdminDashboardHealthCheck {
|
|
code: string;
|
|
labelKey: string;
|
|
healthy: boolean;
|
|
}
|