diff --git a/frontend/src/components/falukant/SaleSection.vue b/frontend/src/components/falukant/SaleSection.vue index 256575a..2d81e01 100644 --- a/frontend/src/components/falukant/SaleSection.vue +++ b/frontend/src/components/falukant/SaleSection.vue @@ -344,7 +344,8 @@ quantity: quantityToSell, quality: item.quality, }); - // Inventory neu laden nach erfolgreichem Verkauf + // UI sofort freigeben (Label/Disabled zurücksetzen), dann Inventory refreshen + this.sellingItemIndex = null; await this.loadInventory(); } catch (error) { alert(this.$t('falukant.branch.sale.sellError')); @@ -361,6 +362,8 @@ try { const response = await apiClient.post(`/api/falukant/sell/all`, { branchId: this.branchId }); const revenue = response.data?.revenue || 0; + // UI sofort freigeben + Status setzen, danach Inventory refreshen + this.sellingAll = false; this.sellAllStatus = { type: 'success', message: this.$t('falukant.branch.sale.sellAllSuccess', { revenue: this.formatMoney(revenue) }) @@ -368,11 +371,14 @@ // Inventory neu laden nach erfolgreichem Verkauf await this.loadInventory(); } catch (error) { + // UI sofort freigeben + Fehlerstatus setzen + this.sellingAll = false; this.sellAllStatus = { type: 'error', message: this.$t('falukant.branch.sale.sellAllError') }; } finally { + // Falls noch nicht freigegeben (z.B. wenn ein unerwarteter Fehler vor Response passiert) this.sellingAll = false; // Status nach 5 Sekunden löschen setTimeout(() => { @@ -648,4 +654,3 @@ border: 1px solid #f5c6cb; } - \ No newline at end of file