From bd64fffa168398821df95f0b762bca0f48c2049c Mon Sep 17 00:00:00 2001 From: joydip Date: Mon, 6 Apr 2026 11:53:01 +0530 Subject: [PATCH] Added dashboard template sample --- app/Config/Routes.php | 1 + app/Controllers/Admin.php | 11 + app/Views/admin/overview.php | 588 +++++++++++++++++++++++++++++++++++ 3 files changed, 600 insertions(+) create mode 100644 app/Views/admin/overview.php diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 6e2ef6e..6f0c766 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -13,6 +13,7 @@ $routes->post('/register', 'Auth::registerProcess'); $routes->get('/logout', 'Auth::logout'); $routes->get('/admin/dashboard', 'Admin::dashboard'); +$routes->get('/admin/overview', 'Admin::overview'); $routes->get('/admin/doctors', 'Admin::doctors'); $routes->get('/admin/doctors/add', 'Admin::addDoctor'); $routes->post('/admin/doctors/add', 'Admin::storeDoctor'); diff --git a/app/Controllers/Admin.php b/app/Controllers/Admin.php index 179bac2..747902d 100644 --- a/app/Controllers/Admin.php +++ b/app/Controllers/Admin.php @@ -25,6 +25,17 @@ class Admin extends BaseController return view('admin/dashboard', $data); } + + public function overview() + { + if ($r = $this->requireRole('admin')) { + return $r; + } + + $data=[]; + + return view('admin/overview', $data); + } public function doctors() { if ($r = $this->requireRole('admin')) { diff --git a/app/Views/admin/overview.php b/app/Views/admin/overview.php new file mode 100644 index 0000000..2bec96a --- /dev/null +++ b/app/Views/admin/overview.php @@ -0,0 +1,588 @@ + + + + + + Admin Overview + + + + + + + + + + + +
+ + +
+

Overview

+
+
A
+ Admin +
+
+ + +
+ + +
+
+
+
+ +
+
+
Doctors
+

12

+
+
+
+ +
+
+
+ +
+
+
Patients
+

48

+
+
+
+ +
+
+
+ +
+
+
Appointments
+

134

+
+
+
+ +
+
+
+ +
+
+
Active Today
+

7

+
+
+
+
+ + +
+ + +
+
+
+

Quick Actions

+
+ +
+
+ + +
+
+
+

Recent Activity

+
+
+
+
+
+
Sarah Johnson booked with Dr. Alan Carter Approved
+
2026-04-06 09:00
+
+
+
+
+
+
Mark Evans booked with Dr. Priya Nair Pending
+
2026-04-06 10:30
+
+
+
+
+
+
Lisa Ray booked with Dr. James White Rejected
+
2026-04-05 14:00
+
+
+
+
+
+
Tom Harris booked with Dr. Alan Carter Approved
+
2026-04-05 11:00
+
+
+
+
+
+
Nina Patel booked with Dr. Priya Nair Pending
+
2026-04-04 16:15
+
+
+
+
+
+ +
+ + +
+ +
+
+
+

Doctors

+ View all +
+
+ + + + + + + + + + + + + + + +
#NameSpecialization
1Dr. Alan CarterCardiology
2Dr. Priya NairDermatology
3Dr. James WhiteNeurology
4Dr. Maria LopezPediatrics
5Dr. Chen WeiOrthopedics
+
+
+
+ +
+
+
+

Patients

+ View all +
+
+ + + + + + + + + + + + + + + +
#NamePhone
1Sarah Johnson+1 555-0101
2Mark Evans+1 555-0182
3Lisa Ray+1 555-0234
4Tom Harris+1 555-0317
5Nina Patel+1 555-0459
+
+
+
+ +
+ +
+
+ + + +