feat(categories): detail page with fleet insights
Clicking a category anywhere in the app now opens /categories/:id with MPN breakdown, manufacturer mix, failures by MPN, and past-EOL exposure — a dual of the manufacturer detail page. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
export interface CategoryPriceStats {
|
||||
total: number;
|
||||
average: number;
|
||||
min: number | null;
|
||||
max: number | null;
|
||||
countWithPrice: number;
|
||||
}
|
||||
|
||||
export interface CategoryFailureStats {
|
||||
repairs: number;
|
||||
distinctFailedParts: number;
|
||||
fmsImplicating: number;
|
||||
}
|
||||
|
||||
export interface CategoryManufacturerCount {
|
||||
manufacturerId: string;
|
||||
manufacturerName: string;
|
||||
count: number;
|
||||
}
|
||||
|
||||
export interface CategoryModelCount {
|
||||
partModelId: string;
|
||||
mpn: string;
|
||||
count: number;
|
||||
}
|
||||
|
||||
export interface CategoryModelFailureCount {
|
||||
partModelId: string;
|
||||
mpn: string;
|
||||
repairs: number;
|
||||
}
|
||||
|
||||
export interface CategoryPastEolModel {
|
||||
partModelId: string;
|
||||
mpn: string;
|
||||
eolDate: string;
|
||||
deployedCount: number;
|
||||
}
|
||||
|
||||
export interface CategoryInsights {
|
||||
totalPartModels: number;
|
||||
totalParts: number;
|
||||
priceStats: CategoryPriceStats;
|
||||
failures: CategoryFailureStats;
|
||||
byManufacturer: CategoryManufacturerCount[];
|
||||
topModelsByUnits: CategoryModelCount[];
|
||||
failuresByModel: CategoryModelFailureCount[];
|
||||
pastEolModels: CategoryPastEolModel[];
|
||||
}
|
||||
Reference in New Issue
Block a user