types fixed
This commit is contained in:
@@ -121,6 +121,7 @@ export function AppointmentForm({
|
||||
// Format the date and times for the form
|
||||
const defaultValues: Partial<Appointment> = appointment
|
||||
? {
|
||||
userId: user?.id,
|
||||
patientId: appointment.patientId,
|
||||
title: appointment.title,
|
||||
date:
|
||||
@@ -139,6 +140,7 @@ export function AppointmentForm({
|
||||
}
|
||||
: parsedStoredData
|
||||
? {
|
||||
userId: user?.id,
|
||||
patientId: Number(parsedStoredData.patientId),
|
||||
date: parsedStoredData.date
|
||||
? typeof parsedStoredData.date === "string"
|
||||
@@ -158,6 +160,7 @@ export function AppointmentForm({
|
||||
: (staffMembers?.[0]?.id ?? undefined),
|
||||
}
|
||||
: {
|
||||
userId: user?.id ?? 0,
|
||||
date: new Date(),
|
||||
title: "",
|
||||
startTime: "09:00",
|
||||
@@ -262,6 +265,7 @@ export function AppointmentForm({
|
||||
|
||||
onSubmit({
|
||||
...data,
|
||||
userId: Number(user?.id),
|
||||
title,
|
||||
notes,
|
||||
patientId,
|
||||
|
||||
Reference in New Issue
Block a user