+
+
+ My Appointments
+
+
+ Manage and view your medical appointments
+
+
- {/* Search and Filter */}
-
-
-
- setSearchTerm(e.target.value)}
- className="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"
- />
-
+
+
+
+ setSearchTerm(e.target.value)}
+ className="w-full pl-10 pr-4 py-2.5 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 transition-all"
+ />
+
-
-
-
-
+
+
+
diff --git a/client/src/components/Patient/PatientAppointments/AppointmentStats.jsx b/client/src/components/Patient/PatientAppointments/AppointmentStats.jsx
deleted file mode 100644
index f9de81b..0000000
--- a/client/src/components/Patient/PatientAppointments/AppointmentStats.jsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import { Calendar, Clock, CheckCircle, FileText } from 'lucide-react';
-
-const AppointmentStats = ({ appointments, prescriptionStatus }) => {
- const completedCount = appointments.filter((apt) => apt.status === 'completed').length;
- const prescriptionCount = Object.values(prescriptionStatus).filter(Boolean).length;
-
- const stats = [
- {
- label: 'Total',
- value: appointments.length,
- icon: Calendar,
- color: 'text-gray-900',
- iconColor: 'text-gray-400',
- },
- {
- label: 'Upcoming',
- value: appointments.filter((apt) => apt.status === 'confirmed' || apt.status === 'pending')
- .length,
- icon: Clock,
- color: 'text-blue-600',
- iconColor: 'text-blue-400',
- },
- {
- label: 'Completed',
- value: completedCount,
- icon: CheckCircle,
- color: 'text-green-600',
- iconColor: 'text-green-400',
- },
- {
- label: 'With Prescription',
- value: prescriptionCount,
- icon: FileText,
- color: 'text-purple-600',
- iconColor: 'text-purple-400',
- },
- ];
-
- return (
-
- {stats.map((stat, index) => (
-
-
-
-
{stat.label}
-
{stat.value}
-
-
-
-
- ))}
-
- );
-};
-
-export default AppointmentStats;
diff --git a/client/src/components/Patient/PatientAppointments/AppointmentTabs.jsx b/client/src/components/Patient/PatientAppointments/AppointmentTabs.jsx
index ca8f5c9..2397697 100644
--- a/client/src/components/Patient/PatientAppointments/AppointmentTabs.jsx
+++ b/client/src/components/Patient/PatientAppointments/AppointmentTabs.jsx
@@ -10,10 +10,8 @@ const AppointmentTabs = ({
setActiveTab,
onAppointmentClick,
}) => {
- // Categorize appointments
const categorizedAppointments = useMemo(() => {
const today = new Date();
-
return {
upcoming: appointments
.filter((apt) => {
@@ -25,14 +23,12 @@ const AppointmentTabs = ({
);
})
.sort((a, b) => new Date(a.date) - new Date(b.date)),
-
today: appointments
.filter((apt) => {
const aptDate = new Date(apt.date);
return isToday(aptDate);
})
.sort((a, b) => a.startTime.localeCompare(b.startTime)),
-
past: appointments
.filter((apt) => {
const aptDate = new Date(apt.date);
@@ -42,7 +38,6 @@ const AppointmentTabs = ({
};
}, [appointments]);
- // Tab Navigation
const tabs = [
{
key: 'upcoming',
@@ -62,54 +57,47 @@ const AppointmentTabs = ({
];
return (
-
-
-