Compare commits
No commits in common. "423d339affceb140e88a82e902b4c54450e571ff" and "2d4bf9c43b1e3c0952521883782eba0fd9b5198c" have entirely different histories.
423d339aff
...
2d4bf9c43b
@ -39,12 +39,6 @@ interface DashboardStats {
|
|||||||
active_upcoming_meetings: number;
|
active_upcoming_meetings: number;
|
||||||
total_revenue: number;
|
total_revenue: number;
|
||||||
monthly_revenue: number;
|
monthly_revenue: number;
|
||||||
// Percentage fields from API
|
|
||||||
users_pct?: number;
|
|
||||||
scheduled_pct?: number;
|
|
||||||
completed_pct?: number;
|
|
||||||
pending_review_pct?: number;
|
|
||||||
rejected_pct?: number;
|
|
||||||
trends: {
|
trends: {
|
||||||
total_users: string;
|
total_users: string;
|
||||||
active_users: string;
|
active_users: string;
|
||||||
@ -139,12 +133,6 @@ export default function Dashboard() {
|
|||||||
active_upcoming_meetings: activeUpcomingMeetings,
|
active_upcoming_meetings: activeUpcomingMeetings,
|
||||||
total_revenue: totalRevenue,
|
total_revenue: totalRevenue,
|
||||||
monthly_revenue: monthlyRevenue,
|
monthly_revenue: monthlyRevenue,
|
||||||
// Include percentage fields from API
|
|
||||||
users_pct: appointmentStats?.users_pct,
|
|
||||||
scheduled_pct: appointmentStats?.scheduled_pct,
|
|
||||||
completed_pct: appointmentStats?.completed_pct,
|
|
||||||
pending_review_pct: appointmentStats?.pending_review_pct,
|
|
||||||
rejected_pct: appointmentStats?.rejected_pct,
|
|
||||||
trends,
|
trends,
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -160,11 +148,6 @@ export default function Dashboard() {
|
|||||||
active_upcoming_meetings: 0,
|
active_upcoming_meetings: 0,
|
||||||
total_revenue: 0,
|
total_revenue: 0,
|
||||||
monthly_revenue: 0,
|
monthly_revenue: 0,
|
||||||
users_pct: undefined,
|
|
||||||
scheduled_pct: undefined,
|
|
||||||
completed_pct: undefined,
|
|
||||||
pending_review_pct: undefined,
|
|
||||||
rejected_pct: undefined,
|
|
||||||
trends: {
|
trends: {
|
||||||
total_users: "0%",
|
total_users: "0%",
|
||||||
active_users: "0%",
|
active_users: "0%",
|
||||||
@ -189,7 +172,7 @@ export default function Dashboard() {
|
|||||||
title: "Total Users",
|
title: "Total Users",
|
||||||
value: stats?.total_users ?? 0,
|
value: stats?.total_users ?? 0,
|
||||||
icon: Users,
|
icon: Users,
|
||||||
trend: stats?.users_pct !== undefined ? `${Math.round(stats.users_pct)}%` : undefined,
|
trend: stats?.trends.total_users ?? "0%",
|
||||||
trendUp: true,
|
trendUp: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -210,28 +193,28 @@ export default function Dashboard() {
|
|||||||
title: "Upcoming Bookings",
|
title: "Upcoming Bookings",
|
||||||
value: stats?.upcoming_bookings ?? 0,
|
value: stats?.upcoming_bookings ?? 0,
|
||||||
icon: CalendarCheck,
|
icon: CalendarCheck,
|
||||||
trend: stats?.scheduled_pct !== undefined ? `${Math.round(stats.scheduled_pct)}%` : undefined,
|
trend: stats?.trends.upcoming_bookings ?? "0",
|
||||||
trendUp: true,
|
trendUp: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Completed Bookings",
|
title: "Completed Bookings",
|
||||||
value: stats?.completed_bookings ?? 0,
|
value: stats?.completed_bookings ?? 0,
|
||||||
icon: CalendarCheck,
|
icon: CalendarCheck,
|
||||||
trend: stats?.completed_pct !== undefined ? `${Math.round(stats.completed_pct)}%` : undefined,
|
trend: stats?.trends.completed_bookings ?? "0%",
|
||||||
trendUp: true,
|
trendUp: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Cancelled Bookings",
|
title: "Cancelled Bookings",
|
||||||
value: stats?.cancelled_bookings ?? 0,
|
value: stats?.cancelled_bookings ?? 0,
|
||||||
icon: CalendarX,
|
icon: CalendarX,
|
||||||
trend: stats?.rejected_pct !== undefined ? `${Math.round(stats.rejected_pct)}%` : undefined,
|
trend: stats?.trends.cancelled_bookings ?? "0%",
|
||||||
trendUp: false,
|
trendUp: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Active Upcoming Meetings",
|
title: "Active Upcoming Meetings",
|
||||||
value: stats?.active_upcoming_meetings ?? 0,
|
value: stats?.active_upcoming_meetings ?? 0,
|
||||||
icon: CalendarCheck,
|
icon: CalendarCheck,
|
||||||
trend: undefined,
|
trend: "0",
|
||||||
trendUp: true,
|
trendUp: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@ -301,7 +284,8 @@ export default function Dashboard() {
|
|||||||
<div className={`p-2 sm:p-2.5 rounded-lg ${isDark ? "bg-gray-700" : "bg-gray-50"}`}>
|
<div className={`p-2 sm:p-2.5 rounded-lg ${isDark ? "bg-gray-700" : "bg-gray-50"}`}>
|
||||||
<Icon className={`w-4 h-4 sm:w-5 sm:h-5 ${isDark ? "text-gray-200" : "text-gray-600"}`} />
|
<Icon className={`w-4 h-4 sm:w-5 sm:h-5 ${isDark ? "text-gray-200" : "text-gray-600"}`} />
|
||||||
</div>
|
</div>
|
||||||
{card.trend && (
|
{/* Percentage badge commented out */}
|
||||||
|
{/* {card.trend && (
|
||||||
<div className={`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${getTrendClasses(card.trendUp)}`}>
|
<div className={`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${getTrendClasses(card.trendUp)}`}>
|
||||||
{card.trendUp ? (
|
{card.trendUp ? (
|
||||||
<ArrowUpRight className="w-3 h-3" />
|
<ArrowUpRight className="w-3 h-3" />
|
||||||
@ -310,7 +294,7 @@ export default function Dashboard() {
|
|||||||
)}
|
)}
|
||||||
<span className="hidden sm:inline">{card.trend}</span>
|
<span className="hidden sm:inline">{card.trend}</span>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)} */}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@ -146,13 +146,9 @@ export default function UserDashboard() {
|
|||||||
if (stats) {
|
if (stats) {
|
||||||
return {
|
return {
|
||||||
scheduled: stats.scheduled || 0,
|
scheduled: stats.scheduled || 0,
|
||||||
scheduled_pct: stats.scheduled_pct,
|
|
||||||
completed: stats.completed || 0,
|
completed: stats.completed || 0,
|
||||||
completed_pct: stats.completed_pct,
|
|
||||||
pending_review: stats.pending_review || 0,
|
pending_review: stats.pending_review || 0,
|
||||||
pending_review_pct: stats.pending_review_pct,
|
|
||||||
rejected: stats.rejected || 0,
|
rejected: stats.rejected || 0,
|
||||||
rejected_pct: stats.rejected_pct,
|
|
||||||
total_requests: stats.total_requests || 0,
|
total_requests: stats.total_requests || 0,
|
||||||
completion_rate: stats.completion_rate || 0,
|
completion_rate: stats.completion_rate || 0,
|
||||||
};
|
};
|
||||||
@ -227,14 +223,13 @@ export default function UserDashboard() {
|
|||||||
<div className={`p-2 sm:p-2.5 rounded-lg ${isDark ? 'bg-gray-700' : 'bg-gray-50'}`}>
|
<div className={`p-2 sm:p-2.5 rounded-lg ${isDark ? 'bg-gray-700' : 'bg-gray-50'}`}>
|
||||||
<CalendarCheck className={`w-4 h-4 sm:w-5 sm:h-5 ${isDark ? 'text-gray-400' : 'text-gray-600'}`} />
|
<CalendarCheck className={`w-4 h-4 sm:w-5 sm:h-5 ${isDark ? 'text-gray-400' : 'text-gray-600'}`} />
|
||||||
</div>
|
</div>
|
||||||
{displayStats.scheduled_pct !== undefined && (
|
{/* Percentage badge commented out */}
|
||||||
<div
|
{/* <div
|
||||||
className={`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${isDark ? "bg-green-900/30 text-green-400" : "bg-green-50 text-green-700"}`}
|
className={`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${isDark ? "bg-green-900/30 text-green-400" : "bg-green-50 text-green-700"}`}
|
||||||
>
|
>
|
||||||
<ArrowUpRight className="w-3 h-3" />
|
<ArrowUpRight className="w-3 h-3" />
|
||||||
<span>{`${Math.round(displayStats.scheduled_pct)}%`}</span>
|
<span>{displayStats.scheduled > 0 ? `+${displayStats.scheduled}` : "0"}</span>
|
||||||
</div>
|
</div> */}
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h3 className={`text-xs font-medium mb-1 sm:mb-2 uppercase tracking-wider ${isDark ? 'text-rose-400' : 'text-rose-600'}`}>
|
<h3 className={`text-xs font-medium mb-1 sm:mb-2 uppercase tracking-wider ${isDark ? 'text-rose-400' : 'text-rose-600'}`}>
|
||||||
@ -253,14 +248,13 @@ export default function UserDashboard() {
|
|||||||
<div className={`p-2 sm:p-2.5 rounded-lg ${isDark ? 'bg-gray-700' : 'bg-gray-50'}`}>
|
<div className={`p-2 sm:p-2.5 rounded-lg ${isDark ? 'bg-gray-700' : 'bg-gray-50'}`}>
|
||||||
<CheckCircle2 className={`w-4 h-4 sm:w-5 sm:h-5 ${isDark ? 'text-gray-400' : 'text-gray-600'}`} />
|
<CheckCircle2 className={`w-4 h-4 sm:w-5 sm:h-5 ${isDark ? 'text-gray-400' : 'text-gray-600'}`} />
|
||||||
</div>
|
</div>
|
||||||
{displayStats.completed_pct !== undefined && (
|
{/* Percentage badge commented out */}
|
||||||
<div
|
{/* <div
|
||||||
className={`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${isDark ? "bg-green-900/30 text-green-400" : "bg-green-50 text-green-700"}`}
|
className={`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${isDark ? "bg-green-900/30 text-green-400" : "bg-green-50 text-green-700"}`}
|
||||||
>
|
>
|
||||||
<ArrowUpRight className="w-3 h-3" />
|
<ArrowUpRight className="w-3 h-3" />
|
||||||
<span>{`${Math.round(displayStats.completed_pct)}%`}</span>
|
<span>{displayStats.completed > 0 ? `+${displayStats.completed}` : "0"}</span>
|
||||||
</div>
|
</div> */}
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h3 className={`text-xs font-medium mb-1 sm:mb-2 uppercase tracking-wider ${isDark ? 'text-rose-400' : 'text-rose-600'}`}>
|
<h3 className={`text-xs font-medium mb-1 sm:mb-2 uppercase tracking-wider ${isDark ? 'text-rose-400' : 'text-rose-600'}`}>
|
||||||
@ -279,7 +273,13 @@ export default function UserDashboard() {
|
|||||||
<div className={`p-2 sm:p-2.5 rounded-lg ${isDark ? 'bg-gray-700' : 'bg-gray-50'}`}>
|
<div className={`p-2 sm:p-2.5 rounded-lg ${isDark ? 'bg-gray-700' : 'bg-gray-50'}`}>
|
||||||
<Calendar className={`w-4 h-4 sm:w-5 sm:h-5 ${isDark ? 'text-gray-400' : 'text-gray-600'}`} />
|
<Calendar className={`w-4 h-4 sm:w-5 sm:h-5 ${isDark ? 'text-gray-400' : 'text-gray-600'}`} />
|
||||||
</div>
|
</div>
|
||||||
{/* No percentage badge for total appointments */}
|
{/* Percentage badge commented out */}
|
||||||
|
{/* <div
|
||||||
|
className={`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${isDark ? "bg-green-900/30 text-green-400" : "bg-green-50 text-green-700"}`}
|
||||||
|
>
|
||||||
|
<ArrowUpRight className="w-3 h-3" />
|
||||||
|
<span>{`${Math.round(displayStats.completion_rate || 0)}%`}</span>
|
||||||
|
</div> */}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h3 className={`text-xs font-medium mb-1 sm:mb-2 uppercase tracking-wider ${isDark ? 'text-rose-400' : 'text-rose-600'}`}>
|
<h3 className={`text-xs font-medium mb-1 sm:mb-2 uppercase tracking-wider ${isDark ? 'text-rose-400' : 'text-rose-600'}`}>
|
||||||
@ -298,14 +298,13 @@ export default function UserDashboard() {
|
|||||||
<div className={`p-2 sm:p-2.5 rounded-lg ${isDark ? 'bg-gray-700' : 'bg-gray-50'}`}>
|
<div className={`p-2 sm:p-2.5 rounded-lg ${isDark ? 'bg-gray-700' : 'bg-gray-50'}`}>
|
||||||
<Calendar className={`w-4 h-4 sm:w-5 sm:h-5 ${isDark ? 'text-gray-400' : 'text-gray-600'}`} />
|
<Calendar className={`w-4 h-4 sm:w-5 sm:h-5 ${isDark ? 'text-gray-400' : 'text-gray-600'}`} />
|
||||||
</div>
|
</div>
|
||||||
{displayStats.pending_review_pct !== undefined && (
|
{/* Percentage badge commented out */}
|
||||||
<div
|
{/* <div
|
||||||
className={`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${isDark ? "bg-yellow-900/30 text-yellow-400" : "bg-yellow-50 text-yellow-700"}`}
|
className={`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${isDark ? "bg-red-900/30 text-red-400" : "bg-red-50 text-red-700"}`}
|
||||||
>
|
>
|
||||||
<ArrowUpRight className="w-3 h-3" />
|
<ArrowUpRight className="w-3 h-3" />
|
||||||
<span>{`${Math.round(displayStats.pending_review_pct)}%`}</span>
|
<span>{displayStats.pending_review > 0 ? `${displayStats.pending_review}` : "0"}</span>
|
||||||
</div>
|
</div> */}
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h3 className={`text-xs font-medium mb-1 sm:mb-2 uppercase tracking-wider ${isDark ? 'text-rose-400' : 'text-rose-600'}`}>
|
<h3 className={`text-xs font-medium mb-1 sm:mb-2 uppercase tracking-wider ${isDark ? 'text-rose-400' : 'text-rose-600'}`}>
|
||||||
|
|||||||
@ -140,36 +140,24 @@ export interface MatchingAvailability {
|
|||||||
export interface AppointmentStats {
|
export interface AppointmentStats {
|
||||||
total_requests: number;
|
total_requests: number;
|
||||||
pending_review: number;
|
pending_review: number;
|
||||||
pending_review_pct?: number;
|
|
||||||
scheduled: number;
|
scheduled: number;
|
||||||
scheduled_pct?: number;
|
|
||||||
rejected: number;
|
rejected: number;
|
||||||
rejected_pct?: number;
|
|
||||||
completed: number;
|
completed: number;
|
||||||
completed_pct?: number;
|
|
||||||
completion_rate: number;
|
completion_rate: number;
|
||||||
users?: number; // Total users count from API
|
users?: number; // Total users count from API
|
||||||
users_pct?: number;
|
|
||||||
active_upcoming_meetings?: number;
|
active_upcoming_meetings?: number;
|
||||||
availability_coverage?: number;
|
availability_coverage?: number;
|
||||||
availability_coverage_pct?: number;
|
|
||||||
available_days_count?: number;
|
available_days_count?: number;
|
||||||
jitsi_meetings_created?: number;
|
jitsi_meetings_created?: number;
|
||||||
meetings_with_video?: number;
|
meetings_with_video?: number;
|
||||||
meetings_with_video_pct?: number;
|
|
||||||
video_meetings?: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UserAppointmentStats {
|
export interface UserAppointmentStats {
|
||||||
total_requests: number;
|
total_requests: number;
|
||||||
pending_review: number;
|
pending_review: number;
|
||||||
pending_review_pct?: number;
|
|
||||||
scheduled: number;
|
scheduled: number;
|
||||||
scheduled_pct?: number;
|
|
||||||
rejected: number;
|
rejected: number;
|
||||||
rejected_pct?: number;
|
|
||||||
completed: number;
|
completed: number;
|
||||||
completed_pct?: number;
|
|
||||||
completion_rate: number;
|
completion_rate: number;
|
||||||
email?: string;
|
email?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user