updates
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
import { z } from "zod"
|
||||
import { AppointmentStatus } from "@garage/api"
|
||||
|
||||
const relationFieldSchema = z
|
||||
.object({ value: z.string(), label: z.string() })
|
||||
.nullable()
|
||||
|
||||
const APPOINTMENT_STATUS_OPTIONS = [
|
||||
{ value: "requested", label: "Requested" },
|
||||
{ value: "confirmed", label: "Confirmed" },
|
||||
{ value: "in_progress", label: "In Progress" },
|
||||
{ value: "completed", label: "Completed" },
|
||||
{ value: "cancelled", label: "Cancelled" },
|
||||
]
|
||||
const APPOINTMENT_STATUS_OPTIONS = AppointmentStatus.map((v) => ({
|
||||
value: v,
|
||||
label: v.replace(/_/g, " ").replace(/\b\w/g, (c) => c.toUpperCase()),
|
||||
}))
|
||||
|
||||
const appointmentFormSchema = z.object({
|
||||
title: z.string().min(1, "Title is required"),
|
||||
|
||||
Reference in New Issue
Block a user