feat: add inventory statistics section, adapt to latest prototype

- Add GET /api/vehicles/inventory-stats endpoint that groups inventory vehicles by macro-region, city, brand, type, model, and batch
- Add RegionalInventoryStats type and fetchInventoryStats API function
- Add full inventory statistics section with region/model tabs, filters, desktop table, and mobile views
- Add modal filters (plate number, model, brand, location search) to vehicle detail modal
- Update modal header to support title field for contextual naming

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
kkfluous
2026-03-28 16:24:39 +08:00
parent d6ac1044fe
commit 629451c13d
4 changed files with 660 additions and 10 deletions

View File

@@ -114,6 +114,16 @@ export interface VehicleListItem {
orgName: string | null;
}
export interface RegionalInventoryStats {
region: string;
city: string;
brand: string;
type: string;
model: string;
batch: string;
quantity: number;
}
export interface ManagerStats {
manager: string;
department: string;