优化订单状态颜色展示
This commit is contained in:
@@ -226,11 +226,17 @@ export function formatStatus(status: string) {
|
||||
}
|
||||
|
||||
export function resolveStatusColor(status: string) {
|
||||
if (status === 'accepted') return 'green'
|
||||
if (status === 'problem') return 'red'
|
||||
if (status === 'pending_acceptance') return 'gold'
|
||||
if (status === 'open') return 'blue'
|
||||
return 'default'
|
||||
const colors: Record<string, string> = {
|
||||
pending_material: 'orange',
|
||||
unassigned: 'cyan',
|
||||
open: 'blue',
|
||||
in_progress: 'geekblue',
|
||||
pending_acceptance: 'purple',
|
||||
problem: 'red',
|
||||
accepted: 'green',
|
||||
cancelled: 'default',
|
||||
}
|
||||
return colors[status] || 'default'
|
||||
}
|
||||
|
||||
export function formatWorkerStatus(status: string) {
|
||||
@@ -259,4 +265,3 @@ export function resolveSharingShareStatusColor(status: string) {
|
||||
if (status === 'cancelled') return 'default'
|
||||
return 'purple'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user