fix(categories): treat image-board.action linkPaths as leaves in user-vehicle flow
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
getChildren had a leaf-detection whitelist that covered BOM/partinfo paths but missed PL24's image-board.action (and the VIN variant). When users clicked into a vin-image-board.action leaf, fetchSubGroupsByPath ran on its HTML, parsed the BOM rows' jsonUrl="...json-vin-bom-detail.action..." attributes as if they were sub-groups, and inserted 10+ ghost category rows under the leaf — each pointing to a per-part endpoint that's not a sub-group at all. Drilling into one of those ghosts then surfaced the "0 parça listeleniyor" empty state instead of the real BOM table. Add both image-board.action and json-vin-bom-detail.action to the leaf detection list so the flow short-circuits and getCategoryWithParts handles them via fetchPartsByPath as designed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -523,7 +523,15 @@ export class CategoriesService {
|
||||
lp.includes("/bom/") ||
|
||||
lp.includes("/bomdetails") ||
|
||||
lp.includes("/partinfo/") ||
|
||||
lp.includes("/servicepart/vin_items")
|
||||
lp.includes("/servicepart/vin_items") ||
|
||||
// PSA / Hyundai / Opel / Volvo image-board pages and the Ford VIN
|
||||
// vin-image-board.action equivalent. Drilling into them yields BOM rows,
|
||||
// not sub-groups — let getCategoryWithParts handle those as parts.
|
||||
lp.includes("image-board.action") ||
|
||||
// json-vin-bom-detail.action is the per-part endpoint (one level past a
|
||||
// leaf). If any code ever inserts it as a category linkPath, treat the
|
||||
// node as a dead-end leaf so the UI doesn't loop into it.
|
||||
lp.includes("json-vin-bom-detail.action")
|
||||
) {
|
||||
return [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user