fixed card display &...

This commit is contained in:
2026-07-01 12:22:43 +02:00
parent bbec5b802d
commit e8c394d71a
7 changed files with 256 additions and 64 deletions
+3 -3
View File
@@ -524,14 +524,14 @@ export function enrichInventoryCardsWithCatalog<T extends { product_id?: number;
cards: T[],
catalog: Product[]
): T[] {
return cards.map((card) => {
return cards.map((card) => {
const fromCatalog = catalog.find((product) => product.id === card.product_id)
if (!fromCatalog) {
return card
}
return {
...card,
return {
...card,
file: card.file ?? fromCatalog.file ?? null,
}
})