forked from Yara724/api
Fixed resendCarParts label_fa's + OTP
This commit is contained in:
@@ -301,6 +301,19 @@ export function normalizeDamageSelectedParts(
|
||||
}
|
||||
if (typeof el === "object") {
|
||||
const o = el as Record<string, unknown>;
|
||||
const idOnly = toNum(o.id);
|
||||
const hasName = typeof o.name === "string" && o.name.trim();
|
||||
const hasKey = typeof o.key === "string" && String(o.key).trim();
|
||||
if (idOnly != null && !hasName && !hasKey) {
|
||||
let catItem: OuterPartCatalogItem | undefined;
|
||||
if (catalog) catItem = catalog.find((c) => c.id === idOnly);
|
||||
if (!catItem) catItem = CATALOG_ITEM_BY_ID.get(idOnly);
|
||||
if (catItem) {
|
||||
const list = catalog ?? outerCatalogListForItem(catItem);
|
||||
out.push(catalogItemToSelectedPart(catItem, list));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (typeof o.name === "string" && o.name.trim()) {
|
||||
let name = o.name.trim();
|
||||
const inner = splitCatalogKeyToNameAndSide(name);
|
||||
|
||||
Reference in New Issue
Block a user