From f4210e7671060b6c854223056433c0f5b1e06b67 Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Mon, 29 Jul 2024 13:44:17 +0200 Subject: [PATCH] fixes the Vue component layout for the ampeln dashboardwidget --- public/js/components/DashboardWidget/Ampel.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/public/js/components/DashboardWidget/Ampel.js b/public/js/components/DashboardWidget/Ampel.js index 1f1154a3b..7aaf152ec 100755 --- a/public/js/components/DashboardWidget/Ampel.js +++ b/public/js/components/DashboardWidget/Ampel.js @@ -17,13 +17,16 @@ export default { AbstractWidget ], computed: { + widgetAmpelMAX(){ + return widgetAmpelMAX; + }, ampelnComputed(){ switch(this.source) { case 'offen': return this.applyFilter(this.activeAmpeln); case 'alle': return this.applyFilter(this.allAmpeln); - default: return this.activeAmpeln; + default: return this.applyFilter(this.activeAmpeln); } }, @@ -63,7 +66,9 @@ export default { for (let i = 0; i < this.ampelnComputed.length; i++) { let ampelId = this.ampelnComputed[i].ampel_id; - this.$refs['ampelCollapse_' + ampelId][0].classList.remove('show'); + if(this.$refs['ampelCollapse_' + ampelId]){ + this.$refs['ampelCollapse_' + ampelId][0].classList.remove('show'); + } } }, openOffcanvasAmpel(ampelId){ @@ -74,7 +79,9 @@ export default { this.$refs['ampelCollapse_' + ampelId][0].classList.add('show'); }, closeOffcanvas(){ + this.closeOffcanvasAmpeln(); this.filter = ''; + // maybe we also want to reset the source (open/alle) of the displayed ampeln }, async fetchNonConfirmedActiveAmpeln(){ @@ -153,8 +160,9 @@ export default {
-
Neueste Ampeln
+
Neueste Ampeln