mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-06-20 09:37:48 +02:00
Fix correct priority class mapping for semantic styling
This commit is contained in:
parent
653a9f983d
commit
7ed661485d
@ -392,13 +392,25 @@
|
|||||||
{
|
{
|
||||||
data: "priority",
|
data: "priority",
|
||||||
render: function (data, type, row, meta) {
|
render: function (data, type, row, meta) {
|
||||||
let priority = "success";
|
let priorityClass = "text-secondary";
|
||||||
if (data === 4) {
|
switch (data) {
|
||||||
priority = "warning";
|
case 1:
|
||||||
} else if (data === 5) {
|
priorityClass = "text-danger";
|
||||||
priority = "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 '<p class="text-' + priority + '">' + data + '</p>';
|
return '<p class="' + priorityClass + '">' + data + '</p>';
|
||||||
},
|
},
|
||||||
visible: false,
|
visible: false,
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user