diff --git a/client/src/pages/CreateSchedulePage.tsx b/client/src/pages/CreateSchedulePage.tsx index d95694c..e3cb963 100644 --- a/client/src/pages/CreateSchedulePage.tsx +++ b/client/src/pages/CreateSchedulePage.tsx @@ -1,7 +1,6 @@ import { Formik, Form } from "formik"; import * as yup from "yup"; -import { Button, Radio } from "@nextui-org/react"; -import { NextUIFormikRadioGroup } from "../components/NextUIFormikRadioButton"; +import { Button } from "@nextui-org/react"; import { NextUIFormikDatePicker } from "../components/NextUIFormikDatePicker"; import NextUIFormikInput from "../components/NextUIFormikInput"; import { useNavigate } from "react-router-dom"; @@ -18,14 +17,15 @@ const validationSchema = yup.object().shape({ status: yup.string().trim().required() }); -const initialValues: any = { +const initialValues = { date: "", time: "", location: "", postalCode: "", - status: "" + status: "Up coming" // Set the default status }; + export default function CreateSchedulePage() { const navigate = useNavigate(); @@ -55,14 +55,9 @@ export default function CreateSchedulePage() { } data.dateTime = dateTime.toISOString(); - data.location = data.location.trim(); - - if (typeof data.postalCode === 'string') { - data.postalCode = data.postalCode.trim(); - } - - data.status = data.status.trim(); + data.postalCode = data.postalCode.trim(); + data.status = "Up coming"; // Set status to "Up coming" explicitly console.log("Data to be sent:", data); @@ -74,8 +69,8 @@ export default function CreateSchedulePage() { }; return ( -