From fb42625354bca0f1e427a6075306637aec4cd9d8 Mon Sep 17 00:00:00 2001 From: Christian Cueni Date: Wed, 14 Dec 2022 07:58:16 +0100 Subject: [PATCH] Allow multi-circle selection in cockpit --- client/src/pages/cockpit/CockpitIndexPage.vue | 11 ++--------- client/src/stores/cockpit.ts | 17 ++++++++++++++--- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/client/src/pages/cockpit/CockpitIndexPage.vue b/client/src/pages/cockpit/CockpitIndexPage.vue index 38714db5..ff5a899e 100644 --- a/client/src/pages/cockpit/CockpitIndexPage.vue +++ b/client/src/pages/cockpit/CockpitIndexPage.vue @@ -27,7 +27,6 @@ function userCountStatus(userId: number) { } const data = { - circles: ["KMU Teil 1", "KMU Teil 2", "3-Säuli-Prinzip"], transferProgress: { fail: 0, success: 3, @@ -35,17 +34,11 @@ const data = { }, }; -const selectedCircle = ref(1); - function setActiveClasses(id: number) { - return cockpitStore.selectedCircle === id + return cockpitStore.selectedCircles.indexOf(id) > -1 ? ["bg-blue-900", "text-white"] : ["text-bg-900"]; } - -function setActiveCircle(id: number) { - cockpitStore.selectedCircle = id; -}