format tickets in Tickets.vue
This commit is contained in:
parent
6dad675d1e
commit
3a5f35fa5d
7 changed files with 79 additions and 8 deletions
27
web/src/utils.js
Normal file
27
web/src/utils.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
function ticketStateColorLookup(ticket) {
|
||||
if (ticket.startsWith('closed_')) {
|
||||
return 'secondary';
|
||||
}
|
||||
if (ticket.startsWith('pending_')) {
|
||||
return 'warning';
|
||||
}
|
||||
if (ticket.startsWith('waiting_')) {
|
||||
return 'primary';
|
||||
}
|
||||
return 'danger';
|
||||
}
|
||||
|
||||
function ticketStateIconLookup(ticket) {
|
||||
if (ticket.startsWith('closed_')) {
|
||||
return 'check';
|
||||
}
|
||||
if (ticket.startsWith('pending_')) {
|
||||
return 'exclamation';
|
||||
}
|
||||
if (ticket.startsWith('waiting_')) {
|
||||
return 'hourglass';
|
||||
}
|
||||
return 'exclamation';
|
||||
}
|
||||
|
||||
export {ticketStateColorLookup, ticketStateIconLookup};
|
Loading…
Add table
Add a link
Reference in a new issue