Ops app (Vue/Quasar PWA) with dispatch V2 integration, tag system, customer 360, tickets, and dashboard. Served via standalone nginx container at erp.gigafibre.ca/ops/ with Traefik StripPrefix + Authentik SSO. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
38 lines
1.1 KiB
JavaScript
38 lines
1.1 KiB
JavaScript
/**
|
|
* Status badge CSS class mappings for all doctypes.
|
|
* Classes map to .ops-badge variants: active, inactive, open, closed, draft
|
|
*/
|
|
|
|
export function locStatusClass (s) {
|
|
return s === 'Active' ? 'active' : s === 'Inactive' ? 'inactive' : 'draft'
|
|
}
|
|
|
|
export function subStatusClass (s) {
|
|
return s === 'Active' ? 'active' : s === 'Cancelled' ? 'inactive' : 'draft'
|
|
}
|
|
|
|
export function eqStatusClass (s) {
|
|
return s === 'Actif' ? 'active' : s === 'Défectueux' || s === 'Perdu' ? 'inactive' : 'draft'
|
|
}
|
|
|
|
export function ticketStatusClass (s) {
|
|
if (s === 'Open') return 'open'
|
|
if (s === 'Closed' || s === 'Resolved') return 'closed'
|
|
if (s === 'Replied') return 'active'
|
|
return 'draft'
|
|
}
|
|
|
|
export function invStatusClass (s) {
|
|
return s === 'Paid' ? 'active' : s === 'Overdue' ? 'inactive' : s === 'Unpaid' ? 'open' : 'draft'
|
|
}
|
|
|
|
export function priorityClass (p) {
|
|
return p === 'Urgent' ? 'inactive' : p === 'High' ? 'open' : p === 'Medium' ? 'draft' : 'active'
|
|
}
|
|
|
|
export function deviceColorClass (status) {
|
|
if (status === 'Actif') return 'dev-green'
|
|
if (status === 'Défectueux' || status === 'Perdu') return 'dev-red'
|
|
return 'dev-grey'
|
|
}
|