From 8c84a63757f28c63222e6bbff3e1b8de274b584a Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Wed, 31 Jul 2024 09:40:50 +0200 Subject: [PATCH] corrects how both the ampel and the ui phrasen are loaded --- public/js/components/DashboardWidget/Ampel.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/public/js/components/DashboardWidget/Ampel.js b/public/js/components/DashboardWidget/Ampel.js index 1b4efa022..ca7442578 100755 --- a/public/js/components/DashboardWidget/Ampel.js +++ b/public/js/components/DashboardWidget/Ampel.js @@ -10,16 +10,13 @@ export default { source: '', allAmpeln:null, activeAmpeln:null, - phrasen: {ampeln:false, ui:false}, + isPhrasenLoaded: false, }), mixins: [ AbstractWidget ], computed: { - arePhrasenLoaded(){ - // checks if both the phrasen categories 'ampeln' and 'ui' are loaded - return this.phrasen.ampeln && this.phrasen.ui; - }, + ampelnComputed(){ switch(this.source) @@ -117,10 +114,7 @@ export default { } }, created() { - this.$p.loadCategory('ampel').then(() => { - this.isPhrasenLoaded = true; - }); - this.$p.loadCategory('ui').then(() => { + this.$p.loadCategory(['ampel','ui']).then(() => { this.isPhrasenLoaded = true; }); this.$emit('setConfig', false);