fix: Enum RouteStatus uppercase conflict with postgres type
This commit is contained in:
@ -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'
|
||||
|
||||
|
||||
@ -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'
|
||||
})
|
||||
|
||||
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user