diff --git a/client/app/(patient)/appointments/[id]/page.tsx b/client/app/(patient)/appointments/[id]/page.tsx index 09926d78..538331cf 100644 --- a/client/app/(patient)/appointments/[id]/page.tsx +++ b/client/app/(patient)/appointments/[id]/page.tsx @@ -118,7 +118,7 @@ const Page = () => {
- {format(new Date(appointment.appointmentDate!), "PPP")} + {format(new Date(appointment.appointmentDate!), "PPPP")}
@@ -215,13 +215,6 @@ const Page = () => { Slot Information -
- -
-

Day

-

{appointment.slot?.day}

-
-
diff --git a/client/app/(patient)/new-appointment/[id]/page.tsx b/client/app/(patient)/new-appointment/[id]/page.tsx index 008c602d..c409f429 100644 --- a/client/app/(patient)/new-appointment/[id]/page.tsx +++ b/client/app/(patient)/new-appointment/[id]/page.tsx @@ -5,17 +5,14 @@ import { Skeleton } from "@/components/ui/skeleton"; import Image from "next/image"; import Link from "next/link"; import { useParams } from "next/navigation"; -import { format } from "date-fns"; import { XCircle } from "lucide-react"; import { ButtonV2 } from "@/components/common/ButtonV2"; +import { format } from 'date-fns' + export default function AppointmentSuccessPage() { const paymentId = useParams().id as string; - const { data: appointment, isLoading, isError, error } = useGetAppointmentSuccessPageDetails(paymentId); - - const formatDate = (dateString: string) => { - return format(new Date(dateString), "MMMM d, yyyy"); - }; + const { data: appointment, isLoading, error } = useGetAppointmentSuccessPageDetails(paymentId); return (
@@ -89,7 +86,7 @@ export default function AppointmentSuccessPage() {

Appointment Date

- {formatDate(appointment.appointmentDate!)} , {appointment.slot?.startTime} + {format(appointment.appointmentDate!, "PPPP")} , {appointment.slot?.startTime}

@@ -124,7 +121,7 @@ export default function AppointmentSuccessPage() { Show Details - + Book Another Appointment
diff --git a/client/app/doctor/appointments/[id]/page.tsx b/client/app/doctor/appointments/[id]/page.tsx index f0ff3146..736f54d3 100644 --- a/client/app/doctor/appointments/[id]/page.tsx +++ b/client/app/doctor/appointments/[id]/page.tsx @@ -95,7 +95,7 @@ export default function AppointmentDetailsPage() { {appointment.status === AppointmentStatus.PENDING && ( <> - + Accept setCancelModelOpen(true)}> @@ -111,7 +111,7 @@ export default function AppointmentDetailsPage() {
-
+
@@ -123,7 +123,7 @@ export default function AppointmentDetailsPage() {
- {format(new Date(appointment.appointmentDate!), "PPP")} + {format(new Date(appointment.appointmentDate!), "PPPP")}
@@ -141,7 +141,7 @@ export default function AppointmentDetailsPage() {

- Reason for Visit + Reason for Appointment

{appointment.reason}

diff --git a/client/components/layout/DoctorLayoutWithSideBar.tsx b/client/components/layout/DoctorLayoutWithSideBar.tsx index 9ab8f4c5..3479703b 100644 --- a/client/components/layout/DoctorLayoutWithSideBar.tsx +++ b/client/components/layout/DoctorLayoutWithSideBar.tsx @@ -207,10 +207,7 @@ const AdminLayoutWithSideBar = ({
-
- - -
+
diff --git a/client/components/view/table/DoctorAppointmentTable.tsx b/client/components/view/table/DoctorAppointmentTable.tsx index c158fae9..47cce3c5 100644 --- a/client/components/view/table/DoctorAppointmentTable.tsx +++ b/client/components/view/table/DoctorAppointmentTable.tsx @@ -11,6 +11,8 @@ import Pagination from "@/components/navigation/Pagination"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import GetStatusBadge from "@/components/doctor/appointment/GetStatusBadge"; import { ButtonV2 } from "@/components/common/ButtonV2"; +import { format } from 'date-fns' + const columns = [ { name: "Date", width: "w-1/5" }, @@ -114,7 +116,7 @@ export default function AppointmentTable({ page }: Props) { appointments.map((appointment) => ( - {new Date(appointment.appointmentDate!).toLocaleString().split(",")[0]} + {format(new Date(appointment.appointmentDate!), "PPPP")} {appointment.appointmentType} {appointment.reason}