diff --git a/app/Controllers/View/LandingPageController.php b/app/Controllers/View/LandingPageController.php index f7bcfc9..c751061 100644 --- a/app/Controllers/View/LandingPageController.php +++ b/app/Controllers/View/LandingPageController.php @@ -13,6 +13,7 @@ use App\Models\ScoreCommentModel; use App\Models\AttendanceRecordModel; use App\Models\AttendanceDayModel; use App\Models\CalendarModel; +use App\Models\JobPositionModel; use \Config\Database; use DateTimeImmutable; use DateTimeZone; @@ -867,6 +868,15 @@ class LandingPageController extends BaseController ->get() ->getRowArray(); $paymentBalance = (float) ($paymentRow['account_balance'] ?? 0); + $openPositions = []; + + try { + if ($this->db->tableExists('job_positions')) { + $openPositions = (new JobPositionModel())->openPositions(); + } + } catch (\Throwable $e) { + log_message('error', 'Unable to load parent dashboard job positions: ' . $e->getMessage()); + } // Pass data to the view, including the deadlines return view('/landing_page/parent_dashboard', [ @@ -878,6 +888,7 @@ class LandingPageController extends BaseController 'lastDayOfRegistration' => $this->lastDayOfRegistration, // Add the enrollment deadline to the view 'withdrawalDeadline' => $this->refundDeadline, // Add the refund deadline to the view 'paymentBalance' => $paymentBalance, // 🔹 New + 'openPositions' => $openPositions, ]); } diff --git a/app/Views/landing_page/parent_dashboard.php b/app/Views/landing_page/parent_dashboard.php index 19810e1..9b4168e 100644 --- a/app/Views/landing_page/parent_dashboard.php +++ b/app/Views/landing_page/parent_dashboard.php @@ -1,5 +1,36 @@ = $this->extend('layout/main_layout') ?> + += $this->section('styles') ?> + += $this->endSection() ?> + = $this->section('content') ?> + @@ -178,4 +209,74 @@ + +
+ + = $this->endSection() ?> + + + = $this->section('scripts') ?> + + = $this->endSection() ?> +