diff --git a/frontend/src/views/falukant/BranchView.vue b/frontend/src/views/falukant/BranchView.vue index 5ccae65..5542cd8 100644 --- a/frontend/src/views/falukant/BranchView.vue +++ b/frontend/src/views/falukant/BranchView.vue @@ -1014,12 +1014,15 @@ export default { }); await this.loadVehicles(); this.closeRepairAllVehiclesDialog(); - alert(this.$t('falukant.branch.transport.repairAllSuccess')); + // Statt JS-alert: Dialog schließen und MessageDialog anzeigen + this.$root.$refs.messageDialog?.open('tr:falukant.branch.transport.repairAllSuccess'); this.$refs.statusBar?.fetchStatus(); } catch (error) { console.error('Error repairing all vehicles:', error); const errorMessage = error.response?.data?.message || this.$t('falukant.branch.transport.repairAllError'); - alert(errorMessage); + // Bestätigungsdialog ebenfalls schließen und Fehler im MessageDialog anzeigen + this.closeRepairAllVehiclesDialog(); + this.$root.$refs.messageDialog?.open(String(errorMessage), this.$t('error.title')); } }, @@ -1076,12 +1079,15 @@ export default { await apiClient.post(`/api/falukant/vehicles/${this.repairVehicleDialog.vehicle.id}/repair`); await this.loadVehicles(); this.closeRepairVehicleDialog(); - alert(this.$t('falukant.branch.transport.repairSuccess')); + // Statt JS-alert: Dialog schließen und MessageDialog anzeigen + this.$root.$refs.messageDialog?.open('tr:falukant.branch.transport.repairSuccess'); this.$refs.statusBar?.fetchStatus(); } catch (error) { console.error('Error repairing vehicle:', error); const errorMessage = error.response?.data?.message || this.$t('falukant.branch.transport.repairError'); - alert(errorMessage); + // Bestätigungsdialog ebenfalls schließen und Fehler im MessageDialog anzeigen + this.closeRepairVehicleDialog(); + this.$root.$refs.messageDialog?.open(String(errorMessage), this.$t('error.title')); } }, },