From 814f972287a74e4f2cc1e73d06230f1231bef933 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Mon, 8 Dec 2025 11:34:50 +0100 Subject: [PATCH] Update branch selection logic in BranchView component - Enhanced the onBranchSelected method to reload branches for updated weather information and reset the selected branch after reloading. - Improved user experience by ensuring the correct branch is selected post-refresh, maintaining data accuracy and consistency. --- frontend/src/views/falukant/BranchView.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/src/views/falukant/BranchView.vue b/frontend/src/views/falukant/BranchView.vue index 118071c..43baaa4 100644 --- a/frontend/src/views/falukant/BranchView.vue +++ b/frontend/src/views/falukant/BranchView.vue @@ -448,6 +448,12 @@ export default { async onBranchSelected(newBranch) { this.selectedBranch = newBranch; + // Branches neu laden, um das Wetter zu aktualisieren + await this.loadBranches(); + // Den ausgewählten Branch nach dem Neuladen wieder setzen + if (newBranch) { + this.selectedBranch = this.branches.find(b => b.id === newBranch.id) || newBranch; + } await this.loadProducts(); await this.loadVehicles(); await this.loadProductPricesForCurrentBranch();