From eb95ff18ecd29e7ea83f19835eb1ea38caa0eb62 Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 8 Aug 2023 13:48:36 +0200 Subject: [PATCH] refs #5986 refactored ticket stateColor --- src/pages/Ticket/Card/TicketDescriptor.vue | 17 +++++++++-------- src/pages/Ticket/Card/TicketSummary.vue | 14 ++++++++++---- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/pages/Ticket/Card/TicketDescriptor.vue b/src/pages/Ticket/Card/TicketDescriptor.vue index c76c437c2..31662e343 100644 --- a/src/pages/Ticket/Card/TicketDescriptor.vue +++ b/src/pages/Ticket/Card/TicketDescriptor.vue @@ -67,12 +67,7 @@ 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)); @@ -93,9 +88,15 @@ const setData = (entity) =>