add job openings to the parent portal
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 47s
Tests / PHPUnit (push) Successful in 1m22s

This commit is contained in:
root
2026-09-02 23:48:23 -04:00
parent 88772c3ea0
commit 46769e8b27
2 changed files with 112 additions and 0 deletions
@@ -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,
]);
}