From b622f6ef96af92c8fd9159a3ec30f384b61836de Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 3 Sep 2024 07:36:40 +0200 Subject: [PATCH] fix: refs #7553 fixed QChips like Salix --- src/pages/Ticket/TicketList.vue | 34 +++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue index e05e783d9..e35c63e43 100644 --- a/src/pages/Ticket/TicketList.vue +++ b/src/pages/Ticket/TicketList.vue @@ -255,7 +255,11 @@ const fetchAddresses = async (formData) => { } }; const getColor = (row) => { - return row?.classColor ? `bg-${row.classColor}` : 'bg-orange'; + // return row?.classColor ? `bg-${row.classColor}` : 'bg-orange'; + if (row.alertLevelCode === 'OK') return 'bg-success'; + else if (row.alertLevelCode === 'FREE') return 'bg-notice'; + else if (row.alertLevel === 1) return 'bg-warning'; + else if (row.alertLevel === 0) return 'bg-alert'; }; const getDateColor = (date) => { @@ -264,13 +268,8 @@ const getDateColor = (date) => { const timeTicket = new Date(date); timeTicket.setHours(0, 0, 0, 0); const comparation = today - timeTicket; - return comparation < 0 ? 'bg-success' : 'bg-warning'; -}; - -const getTotalColor = () => { - // const total = row.totalWithVat; - // return total > 0 && total < 50 ? 'bg-warning' : ''; - return 'bg-warning'; + if (comparation == 0) return 'bg-warning'; + if (comparation < 0) return 'bg-success'; }; onMounted(() => (stateStore.rightDrawer = true)); @@ -523,9 +522,11 @@ function setReference(data) {