fix: Enum RouteStatus uppercase conflict with postgres type

This commit is contained in:
2026-02-25 20:09:51 -05:00
parent dc827bcbf4
commit 7d26d0bc10
6 changed files with 198 additions and 6 deletions

View File

@ -1,6 +1,6 @@
/** Type definitions for the SIBU transportation app */
export type RouteStatus = 'active' | 'inactive' | 'maintenance'
export type RouteStatus = 'ACTIVE' | 'INACTIVE' | 'MAINTENANCE'
export type StopType = 'terminal' | 'regular' | 'express_only'
export type ScheduleType = 'weekday' | 'weekend' | 'holiday'

View File

@ -346,7 +346,7 @@ async function confirmCreateRoute() {
name: computedRouteName.value,
origin_city: newRouteForm.value.origin,
destination_city: newRouteForm.value.destination,
status: 'active',
status: 'ACTIVE',
color: '#FEE715',
direction: 'outbound'
})

View File

@ -60,7 +60,7 @@ const correlimientos = computed(() => {
})
const getStatusClass = (status: string) => {
if (status === 'active') return 'bg-emerald-100 dark:bg-emerald-900/30 text-emerald-700 dark:text-emerald-400'
if (status === 'ACTIVE') return 'bg-emerald-100 dark:bg-emerald-900/30 text-emerald-700 dark:text-emerald-400'
return 'bg-slate-100 dark:bg-zinc-800 text-slate-500 dark:text-zinc-400'
}
</script>