Skip to content

Commit

Permalink
feat : Add MonthlyRevenue and NewHospitals component
Browse files Browse the repository at this point in the history
  • Loading branch information
ad956 committed Sep 2, 2024
1 parent 2525a23 commit 22b7775
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions app/(pages)/admin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import {
UserDistributionPie,
} from "./components";
import { PaginatedResponse, RecentUser, TilesDataProp } from "@pft-types/index";
import MonthlyRevenueChart from "./components/MonthlyRevenueChart";
import HospitalApprovalList from "./components/HospitalApprovalList";

export default function Admin() {
const [tilesData, setTilesData] = useState<TilesDataProp | null>(null);
Expand Down Expand Up @@ -90,6 +92,38 @@ export default function Admin() {
{ id: "hospitals", label: "Hospitals", value: 5 },
];

const mockNewHospitals = [
{ id: "1", name: "Central Hospital", email: "[email protected]" },
{ id: "2", name: "Westside Clinic", email: "[email protected]" },
{ id: "3", name: "Sunshine Medical Center", email: "[email protected]" },
{
id: "4",
name: "Northern Health Institute",
email: "[email protected]",
},
{ id: "5", name: "Riverside Hospital", email: "[email protected]" },
];

const mockMonthlyRevenue = [
{
id: "Monthly Revenue",
data: [
{ x: "Jan", y: 50000 },
{ x: "Feb", y: 55000 },
{ x: "Mar", y: 60000 },
{ x: "Apr", y: 58000 },
{ x: "May", y: 65000 },
{ x: "Jun", y: 70000 },
{ x: "Jul", y: 68000 },
{ x: "Aug", y: 72000 },
{ x: "Sep", y: 75000 },
{ x: "Oct", y: 80000 },
{ x: "Nov", y: 85000 },
{ x: "Dec", y: 90000 },
],
},
];

return (
<div className="flex flex-col overflow-y-scroll scrollbar">
<main className="flex-grow p-8">
Expand All @@ -109,6 +143,14 @@ export default function Admin() {
<UserDistributionPie data={userDistributionData} />
</div>

<div className="grid grid-cols-2 gap-6">
{/* Monthly Revenue Chart */}
<MonthlyRevenueChart data={mockMonthlyRevenue} />

{/* Hospital Approval List */}
<HospitalApprovalList hospitals={mockNewHospitals} />
</div>

{/* Recent Activity */}
<RecentActivity
recentUsers={recentUsers}
Expand Down

0 comments on commit 22b7775

Please sign in to comment.