fix(catalog): fix supplier products and remove old offers page
All checks were successful
Build Docker Image / build (push) Successful in 4m23s

- Fix computed products to read from offer directly instead of offer.lines
- Remove obsolete offers/[uuid].vue (replaced by new flow)
This commit is contained in:
Ruslan Bakiev
2026-01-16 09:38:17 +07:00
parent 3b0418f328
commit cdf4b3069f
2 changed files with 7 additions and 232 deletions

View File

@@ -127,15 +127,13 @@ const mapItems = computed(() => {
const products = computed(() => {
const productsMap = new Map<string, { uuid: string; name: string; locationUuid?: string }>()
offers.value.forEach(offer => {
offer.lines?.forEach((line: any) => {
if (line?.productUuid && line?.productName && !productsMap.has(line.productUuid)) {
productsMap.set(line.productUuid, {
uuid: line.productUuid,
name: line.productName,
locationUuid: offer.locationUuid
})
}
})
if (offer.productUuid && offer.productName && !productsMap.has(offer.productUuid)) {
productsMap.set(offer.productUuid, {
uuid: offer.productUuid,
name: offer.productName,
locationUuid: offer.locationUuid
})
}
})
return Array.from(productsMap.values())
})