diff --git a/package.json b/package.json index 49b8f59..9f9df44 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "axios": "^1.7.9", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", + "date-fns": "^4.1.0", "hoyahax-2025": "file:", "https-localhost": "^4.7.1", "lucide-react": "^0.474.0", @@ -34,6 +35,7 @@ "next-themes": "^0.4.4", "openai-whisper": "^1.0.2", "react": "^19.0.0", + "react-day-picker": "8.10.1", "react-dom": "^19.0.0", "recharts": "^2.15.0", "svix": "^1.45.1", diff --git a/src/app/(panels)/suite/doctor/dashboard/Calender.jsx b/src/app/(panels)/suite/doctor/dashboard/Calender.jsx new file mode 100644 index 0000000..2eeb0a0 --- /dev/null +++ b/src/app/(panels)/suite/doctor/dashboard/Calender.jsx @@ -0,0 +1,24 @@ +"use client" +import { useState } from "react" + +import { Calendar } from "@/components/ui/calendar" + +import { Card, CardContent } from "@/components/ui/card" + +export function ScheduleCalender() { + + const [date, setDate] = useState(new Date()) + + return ( + + + + + + ) +} diff --git a/src/app/(panels)/suite/doctor/dashboard/PatientTable.jsx b/src/app/(panels)/suite/doctor/dashboard/PatientTable.jsx new file mode 100644 index 0000000..98fb928 --- /dev/null +++ b/src/app/(panels)/suite/doctor/dashboard/PatientTable.jsx @@ -0,0 +1,40 @@ +"use client" + +import { + Table, + TableBody, + TableCell, + TableHead, + TableHeader, + TableRow, +} from "@/components/ui/table" + +import { Card, CardContent } from "@/components/ui/card" + +export function PatientTable({ data }) { + + return ( + + + + + + Name + Age + Last Visit + + + + {data.map((patients) => ( + + {patients.name} + {patients.age} + {new Date(patients.lastVisit).toLocaleDateString()} + + ))} + +
+
+
+ ) +} diff --git a/src/app/(panels)/suite/doctor/dashboard/page.tsx b/src/app/(panels)/suite/doctor/dashboard/page.tsx index 9559023..ace1329 100644 --- a/src/app/(panels)/suite/doctor/dashboard/page.tsx +++ b/src/app/(panels)/suite/doctor/dashboard/page.tsx @@ -1,16 +1,23 @@ "use client" +import { PatientTable } from "./PatientTable" + +import { ScheduleCalender } from "./Calender" + export default function Dashboard() { + + const patients = [ + { id: 1, name: "John Doe", age: 30, lastVisit: "2024-10-01" }, + { id: 2, name: "Jane Smith", age: 25, lastVisit: "2024-09-15" }, + { id: 3, name: "Sam Johnson", age: 40, lastVisit: "2024-10-05" }, + ]; + return (

Dashboard

- {[...Array(6)].map((_, i) => ( -
-

Card {i + 1}

-

This is some placeholder content for Card {i + 1}.

-
- ))} + +
) diff --git a/src/app/(panels)/suite/patient/dashboard/IntensityChart.tsx b/src/app/(panels)/suite/patient/dashboard/IntensityChart.tsx index bb7d8f7..aebf2e9 100644 --- a/src/app/(panels)/suite/patient/dashboard/IntensityChart.tsx +++ b/src/app/(panels)/suite/patient/dashboard/IntensityChart.tsx @@ -33,7 +33,7 @@ export function IntenseChart() { Intensity of Symtoms - Last 3 months + Last 4 months diff --git a/src/components/ui/calendar.tsx b/src/components/ui/calendar.tsx new file mode 100644 index 0000000..115cff9 --- /dev/null +++ b/src/components/ui/calendar.tsx @@ -0,0 +1,76 @@ +"use client" + +import * as React from "react" +import { ChevronLeft, ChevronRight } from "lucide-react" +import { DayPicker } from "react-day-picker" + +import { cn } from "@/lib/utils" +import { buttonVariants } from "@/components/ui/button" + +export type CalendarProps = React.ComponentProps + +function Calendar({ + className, + classNames, + showOutsideDays = true, + ...props +}: CalendarProps) { + return ( + .day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md" + : "[&:has([aria-selected])]:rounded-md" + ), + day: cn( + buttonVariants({ variant: "ghost" }), + "h-8 w-8 p-0 font-normal aria-selected:opacity-100" + ), + day_range_start: "day-range-start", + day_range_end: "day-range-end", + day_selected: + "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground", + day_today: "bg-accent text-accent-foreground", + day_outside: + "day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground", + day_disabled: "text-muted-foreground opacity-50", + day_range_middle: + "aria-selected:bg-accent aria-selected:text-accent-foreground", + day_hidden: "invisible", + ...classNames, + }} + components={{ + IconLeft: ({ className, ...props }) => ( + + ), + IconRight: ({ className, ...props }) => ( + + ), + }} + {...props} + /> + ) +} +Calendar.displayName = "Calendar" + +export { Calendar }