diff --git a/frontend/public/models/3d/falukant/characters/female_toddler.glb b/frontend/public/models/3d/falukant/characters/female_toddler.glb index c96bb60..757d09a 100644 Binary files a/frontend/public/models/3d/falukant/characters/female_toddler.glb and b/frontend/public/models/3d/falukant/characters/female_toddler.glb differ diff --git a/frontend/public/models/3d/falukant/characters/female_toddler_old.glb b/frontend/public/models/3d/falukant/characters/female_toddler_old.glb new file mode 100644 index 0000000..c96bb60 Binary files /dev/null and b/frontend/public/models/3d/falukant/characters/female_toddler_old.glb differ diff --git a/frontend/src/views/falukant/BranchView.vue b/frontend/src/views/falukant/BranchView.vue index 303e670..52b4ddf 100644 --- a/frontend/src/views/falukant/BranchView.vue +++ b/frontend/src/views/falukant/BranchView.vue @@ -468,10 +468,14 @@ export default { }, watch: { - activeTab(newVal) { - if (newVal === 'taxes') { - this.loadBranchTaxes(); - } + activeTab(newVal, oldVal) { + // Nur neu laden, wenn der Tab wirklich gewechselt wurde und ein Branch ausgewählt ist + if (!this.selectedBranch || newVal === oldVal) return; + + // Alle Tabs neu laden, wenn gewechselt wird + this.$nextTick(() => { + this.refreshActiveTab(); + }); }, selectedBranch: { handler(newBranch) { @@ -537,6 +541,33 @@ export default { } }, + refreshActiveTab() { + // Lade die Daten für den aktiven Tab neu + switch (this.activeTab) { + case 'director': + this.$refs.directorInfo?.refresh(); + break; + case 'inventory': + this.$refs.saleSection?.loadInventory(); + this.$refs.saleSection?.loadTransports(); + break; + case 'production': + this.$refs.productionSection?.loadProductions(); + this.$refs.productionSection?.loadStorage(); + this.$refs.revenueSection?.refresh && this.$refs.revenueSection.refresh(); + break; + case 'taxes': + this.loadBranchTaxes(); + break; + case 'storage': + this.$refs.storageSection?.loadStorageData(); + break; + case 'transport': + this.loadVehicles(); + break; + } + }, + async onBranchSelected(newBranch) { this.selectedBranch = newBranch; // Branches neu laden, um das Wetter zu aktualisieren @@ -549,13 +580,8 @@ export default { await this.loadVehicles(); await this.loadProductPricesForCurrentBranch(); this.$nextTick(() => { - this.$refs.directorInfo?.refresh(); - this.$refs.saleSection?.loadInventory(); - this.$refs.saleSection?.loadTransports(); - this.$refs.productionSection?.loadProductions(); - this.$refs.productionSection?.loadStorage(); - this.$refs.storageSection?.loadStorageData(); - this.$refs.revenueSection?.refresh && this.$refs.revenueSection.refresh(); + // Alle Tabs neu laden + this.refreshActiveTab(); }); // load tax info for this branch