From 601110913281ee722d8cab3dbb9eb6a3ffe899ed Mon Sep 17 00:00:00 2001 From: chfhtw Date: Wed, 5 Nov 2025 11:44:25 +0100 Subject: [PATCH] Fix language on details tabs --- .../Stv/Studentenverwaltung/Details.js | 33 ++++++++++++------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/public/js/components/Stv/Studentenverwaltung/Details.js b/public/js/components/Stv/Studentenverwaltung/Details.js index 8222d637e..2c141754e 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details.js +++ b/public/js/components/Stv/Studentenverwaltung/Details.js @@ -37,25 +37,34 @@ export default { return this.configStudents; } }, + watch: { + '$p.user_language.value'(n, o) { + if (n !== o && o !== undefined) + this.loadConfig(); + } + }, methods: { + loadConfig() { + this.$api + .call(ApiStvApp.configStudent()) + .then(result => { + this.configStudent = result.data; + }) + .catch(this.$fhcAlert.handleSystemError); + this.$api + .call(ApiStvApp.configStudents()) + .then(result => { + this.configStudents = result.data; + }) + .catch(this.$fhcAlert.handleSystemError); + }, reload() { if (this.$refs.tabs?.$refs?.current?.reload) this.$refs.tabs.$refs.current.reload(); } }, created() { - this.$api - .call(ApiStvApp.configStudent()) - .then(result => { - this.configStudent = result.data; - }) - .catch(this.$fhcAlert.handleSystemError); - this.$api - .call(ApiStvApp.configStudents()) - .then(result => { - this.configStudents = result.data; - }) - .catch(this.$fhcAlert.handleSystemError); + this.loadConfig(); }, template: `