From 8ba7615aee27b89e75ede244b26e4a3e6972da3c Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 8 Aug 2023 11:35:35 +0200 Subject: [PATCH] refs #5986 fix state color --- src/pages/Ticket/Card/TicketDescriptor.vue | 11 ++++++++--- src/pages/Ticket/Card/TicketSummary.vue | 2 +- src/pages/Ticket/TicketList.vue | 6 ++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/pages/Ticket/Card/TicketDescriptor.vue b/src/pages/Ticket/Card/TicketDescriptor.vue index 4ae20b70c..c76c437c2 100644 --- a/src/pages/Ticket/Card/TicketDescriptor.vue +++ b/src/pages/Ticket/Card/TicketDescriptor.vue @@ -67,7 +67,12 @@ const filter = { }, ], }; - +function stateColor(state) { + if (state.code === 'OK') return 'text-green'; + if (state.code === 'FREE') return 'text-blue-3'; + if (state.alertLevel === 1) return 'text-primary'; + if (state.alertLevel === 0) return 'text-red'; +} const data = ref(useCardDescription()); const setData = (entity) => (data.value = useCardDescription(entity.client.name, entity.id)); @@ -88,9 +93,9 @@ const setData = (entity) =>