add job openings to the parent portal
This commit is contained in:
@@ -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,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user