fix(catalog): fix supplier products and remove old offers page
All checks were successful
Build Docker Image / build (push) Successful in 4m23s
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:
@@ -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())
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user