diff --git a/web-v2/src/features/inspections/inspectionActPresentation.ts b/web-v2/src/features/inspections/inspectionActPresentation.ts index b86d1fe..21d9f5a 100644 --- a/web-v2/src/features/inspections/inspectionActPresentation.ts +++ b/web-v2/src/features/inspections/inspectionActPresentation.ts @@ -1,33 +1,37 @@ -import type { InspectionActStatus, InspectionActVersionEvent } from '../../lib/api'; +import type { InspectionActVersionEvent } from '../../lib/api'; -const statusLabels: Record = { +const statusLabels: Record = { DRAFT: 'Borrador', - READY: 'Lista para cerrar', - CLOSED: 'Cerrada', + LOCKED: 'Bloqueada · esperando manifestación', + SEALED: 'Sellada', + READY: 'Lista para cerrar · legado', + CLOSED: 'Cerrada · legado', CANCELLED: 'Cancelada', - RECTIFIED: 'Rectificada', + RECTIFIED: 'Rectificada · legado', }; -const eventLabels: Record = { +const eventLabels: Record = { CREATED: 'Creación', UPDATED: 'Actualización', - READY: 'Preparación para firmas', + LOCKED: 'Bloqueo para firmas', + SEALED: 'Sellado definitivo', + READY: 'Preparación para firmas · legado', REOPENED: 'Vuelta a borrador', - CLOSED: 'Cierre y sellado', + CLOSED: 'Cierre · legado', CANCELLED: 'Cancelación', }; -export function inspectionActStatusLabel(value: InspectionActStatus): string { - return statusLabels[value]; +export function inspectionActStatusLabel(value: string): string { + return statusLabels[value] ?? value; } -export function inspectionActStatusClass(value: InspectionActStatus): string { - if (value === 'CLOSED') return 'active'; - if (value === 'READY' || value === 'RECTIFIED') return 'observed'; +export function inspectionActStatusClass(value: string): string { + if (value === 'SEALED' || value === 'CLOSED') return 'active'; + if (value === 'LOCKED' || value === 'READY' || value === 'RECTIFIED') return 'observed'; if (value === 'CANCELLED') return 'inactive'; return 'pending'; } -export function inspectionActVersionEventLabel(value: InspectionActVersionEvent): string { - return eventLabels[value]; +export function inspectionActVersionEventLabel(value: InspectionActVersionEvent | string): string { + return eventLabels[value] ?? value; }