This commit is contained in:
2026-08-11 18:43:56 +08:00
parent 6456278ec8
commit 6622815d6c
37 changed files with 739 additions and 205 deletions
+21
View File
@@ -0,0 +1,21 @@
import type { OceanBookingStatus } from './types'
export const oceanBookingStatusLabels: Record<OceanBookingStatus, string> = {
DRAFT: '草稿',
SUBMITTED: '已提交',
CONFIRMED: '已确认',
RELEASED: '已放舱',
FAILED: '订舱失败',
CHANGE_PENDING: '变更中',
CANCELLED: '已取消',
}
export const oceanBookingStatusOptions = Object.entries(oceanBookingStatusLabels).map(([value, label]) => ({
value: value as OceanBookingStatus,
label,
}))
export function oceanBookingStatusLabel(status: string | null | undefined, emptyLabel = '未设置') {
if (!status) return emptyLabel
return oceanBookingStatusLabels[status as OceanBookingStatus] || '未知状态'
}