diff --git a/frontend/src/components/falukant/SaleSection.vue b/frontend/src/components/falukant/SaleSection.vue index 2d81e01..6e01727 100644 --- a/frontend/src/components/falukant/SaleSection.vue +++ b/frontend/src/components/falukant/SaleSection.vue @@ -290,6 +290,8 @@ this.inventory = response.data.map(item => ({ ...item, sellQuantity: item.totalQuantity, + // Vue3: besserPrices direkt als Property setzen (statt this.$set) + betterPrices: Array.isArray(item.betterPrices) ? item.betterPrices : [], })); await this.loadPricesForInventory(); } catch (error) { @@ -310,10 +312,11 @@ currentPrice: currentPrice } }); - this.$set(item, 'betterPrices', data || []); + // Vue3: direkte Zuweisung ist reaktiv + item.betterPrices = Array.isArray(data) ? data : []; } catch (error) { console.error(`Error loading prices for item ${itemKey}:`, error); - this.$set(item, 'betterPrices', []); + item.betterPrices = []; } finally { this.loadingPrices.delete(itemKey); }