add open position system
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 48s
Tests / PHPUnit (push) Successful in 1m29s

This commit is contained in:
root
2026-09-02 00:53:55 -04:00
parent 5b11e2d859
commit dbfd72c2f9
24 changed files with 1627 additions and 47 deletions
+13 -1
View File
@@ -12,6 +12,7 @@ use App\Models\UserRoleModel;
use App\Models\PasswordResetRequestModel;
use App\Models\RolePermissionModel;
use App\Models\IpAttemptModel;
use App\Models\JobPositionModel;
use CodeIgniter\Controller;
use App\Controllers\View\EmailController;
use App\Models\LoginActivityModel; // Make sure this import is present
@@ -108,7 +109,18 @@ class UserController extends BaseController
// Method to show the home page
public function home()
{
return view('/index');
$openPositions = [];
try {
if ($this->db->tableExists('job_positions')) {
$openPositions = (new JobPositionModel())->openPositions();
}
} catch (\Throwable $e) {
log_message('error', 'Unable to load home page job positions: ' . $e->getMessage());
}
return view('/index', [
'openPositions' => $openPositions,
]);
}
// Method to show the about page