From 7ed661485d07f8097af575f9c812ef9b5d6132b9 Mon Sep 17 00:00:00 2001 From: bhargav1002 Date: Tue, 3 Jun 2025 10:52:21 +0530 Subject: [PATCH] Fix correct priority class mapping for semantic styling --- helpdesk/templates/helpdesk/ticket_list.html | 24 +++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/helpdesk/templates/helpdesk/ticket_list.html b/helpdesk/templates/helpdesk/ticket_list.html index dd1c61e8..5c5f8e0b 100644 --- a/helpdesk/templates/helpdesk/ticket_list.html +++ b/helpdesk/templates/helpdesk/ticket_list.html @@ -392,13 +392,25 @@ { data: "priority", render: function (data, type, row, meta) { - let priority = "success"; - if (data === 4) { - priority = "warning"; - } else if (data === 5) { - priority = "danger"; + let priorityClass = "text-secondary"; + switch (data) { + case 1: + priorityClass = "text-danger"; + break; + case 2: + priorityClass = "text-warning"; + break; + case 3: + priorityClass = "text-success"; + break; + case 4: + priorityClass = "text-info"; + break; + case 5: + priorityClass = "text-secondary"; + break; } - return '

' + data + '

'; + return '

' + data + '

'; }, visible: false, },