add open position system
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user