27 lines
633 B
JavaScript
27 lines
633 B
JavaScript
|
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};
|