feat(catalog): wire Fiat (p5fiat) browse — families→models two-step + de routing
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
Fiat catalog browse returned 0 models because the generic single-endpoint P5 model-list flow can't express Fiat's two-level hierarchy and the drill defaulted to the tr account (Fiat is licensed only on de-708171). - fetchVehicleList: dispatch fiatp_parts/fiatt_parts to new fetchFiatVehicleList, which expands modelOverview (34 families) → models?modelFamily=N (model codes + year ranges) into flat catalog vehicles whose catalogPath is the maingroups endpoint. Verified live: 34 families → 123 models, end-to-end drill to parts+image. - fetchMainGroups / fetchP5Restrictions: account-aware (resolveAccount → de + DE proxy for Fiat; tr unchanged for every other P5 brand) so browse maingroups no longer hit the tr demo/empty page. - web: case-insensitive "/maingroup" gate so Fiat (lowercase /mdl/maingroups, already a maingroups endpoint) skips the empty restriction selector and loads categories directly. - formatFiatYear: "(2016,2020)" → "2016-2020"; +unit tests. Subgroups/parts/images already resolve account→de for Fiat (unchanged). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -72,7 +72,9 @@ function CatalogVehiclePage() {
|
||||
const isP5WithRestrictions =
|
||||
vehicle?.architecture === "P5_MODERN" &&
|
||||
!!vehicle?.catalogPath &&
|
||||
!vehicle.catalogPath.includes("/mainGroup");
|
||||
// Case-insensitive: Fiat's catalogPath is already a maingroups endpoint
|
||||
// (/extern/groups/mdl/maingroups) → no restriction step, categories load directly.
|
||||
!/\/maingroup/i.test(vehicle.catalogPath);
|
||||
const showPsaVariantSelector = isPsa && !hasVariant;
|
||||
const showFordVariantSelector = isP4Legacy && !hasVariant;
|
||||
const showP5RestrictionSelector = isP5WithRestrictions && !hasVariant;
|
||||
|
||||
Reference in New Issue
Block a user