Fix js error when author had no deparment
This commit is contained in:
parent
6f6a0f8632
commit
dfef67642f
@ -304,8 +304,13 @@ function loadTicketItems(page=1) {
|
||||
// priorityElem.tooltip();
|
||||
|
||||
var departmentElem = template.find(".ticket-item-department");
|
||||
departmentElem.css("color", ticket.author.department.colour);
|
||||
departmentElem.css("background-color", ticket.author.department.backgroundcolour);
|
||||
if (ticket.author.department === null) {
|
||||
departmentElem.hide();
|
||||
}
|
||||
else {
|
||||
departmentElem.css("color", ticket.author.department.colour);
|
||||
departmentElem.css("background-color", ticket.author.department.backgroundcolour);
|
||||
}
|
||||
// departmentElem.attr("data-bs-title", ticket.author.department.title);
|
||||
// departmentElem.attr("data-bs-toggle", "tooltip");
|
||||
// departmentElem.tooltip();
|
||||
|
Loading…
x
Reference in New Issue
Block a user