Display department and priority

This commit is contained in:
Corban-Lee Jones 2024-03-06 16:05:29 +00:00
parent 92c6cda583
commit fc8cea1d0a
3 changed files with 19 additions and 1 deletions

View File

@ -1,4 +1,5 @@
$(document).ready(function() {
// Activate all tooltips
$('[data-bs-toggle="tooltip"]').tooltip();

View File

@ -396,6 +396,20 @@ function createTicketContent(ticket) {
template.find(".ticket-content-badges").append(tagTemplate);
});
var departmentElem = template.find(".ticket-content-department");
if (ticket.author.department === null) {
template.find(".ticket-content-department").hide();
}
else {
}
var priorityElem = template.find(".ticket-content-priority");
priorityElem.css({"color": ticket.priority.colour, "background-color": ticket.priority.backgroundcolour});
priorityElem.attr("data-bs-title", ticket.priority.title);
priorityElem.tooltip();
return template;
}

View File

@ -447,9 +447,12 @@
<!-- <small class="ticket-content-datetime"></small> -->
<h5 class="ticket-content-author mb-0"></h5>
<div class="peers mt-2">
<div class="peer badge bgc-orange-100 c-orange-700">
<div class="ticket-content-department peer badge bgc-orange-100 c-orange-700" data-bs-toggle="tooltip">
<i class="fa fa-users"></i>
</div>
<div class="ticket-content-priority peer badge rounded" data-bs-toggle="tooltip">
<i class="fa fa-folder"></i>
</div>
</div>
<div class="ticket-content-badges"></div>
</div>