From cd574cd12c940c1abee83d2c6538f239d8e91dfd Mon Sep 17 00:00:00 2001 From: chfhtw Date: Thu, 13 Nov 2025 09:39:38 +0100 Subject: [PATCH] Reload settings setup on language change --- public/js/components/AppConfig.js | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/public/js/components/AppConfig.js b/public/js/components/AppConfig.js index 0b2110617..b6b6aaeac 100644 --- a/public/js/components/AppConfig.js +++ b/public/js/components/AppConfig.js @@ -46,6 +46,29 @@ export default { tempValues: {} }; }, + watch: { + '$p.user_language.value'(n, o) { + if (n !== o && o !== undefined && Object.keys(this.setup).length) { + this.$api + .call(this.endpoints.get()) + .then(res => { + this.setup = {}; + Object.keys(res.data).forEach(key => { + const binding = { ...res.data[key] }; + delete binding.value; + delete binding.options; + const options = res.data[key].options; + this.setup[key] = { + binding, + options + }; + }); + }) + .catch(this.$fhcAlert.handleSystemErrors); + } + } + + }, methods: { update() { this.$refs.form @@ -62,7 +85,6 @@ export default { this.$api .call(this.endpoints.get()) .then(res => { - this.setup = {}; Object.keys(res.data).forEach(key => { const binding = { ...res.data[key] }; delete binding.value;