diff --git a/frontend/src/views/falukant/BranchView.vue b/frontend/src/views/falukant/BranchView.vue index 89a3c57..118071c 100644 --- a/frontend/src/views/falukant/BranchView.vue +++ b/frontend/src/views/falukant/BranchView.vue @@ -682,6 +682,28 @@ export default { } } break; + case 'transport_removed': + // Transport wurde entfernt (z.B. abgebrochen oder gelöscht) + if (eventData.branch_id) { + // Nur aktualisieren, wenn der betroffene Branch ausgewählt ist + if (this.selectedBranch && this.selectedBranch.id === eventData.branch_id) { + // Fahrzeuge im Transport-Tab aktualisieren + this.loadVehicles(); + // Laufende Transporte im Inventar-Tab aktualisieren + if (this.$refs.saleSection) { + this.$refs.saleSection.loadInventory(); + this.$refs.saleSection.loadTransports(); + } + // Lager aktualisieren + if (this.$refs.storageSection) { + this.$refs.storageSection.loadStorageData(); + } + if (this.$refs.productionSection) { + this.$refs.productionSection.loadStorage(); + } + } + } + break; case 'inventory_updated': // Inventar wurde aktualisiert (durch Transporte) if (eventData.branch_id) {