mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-24 02:12:17 +00:00
first template for the hr view to accept or deny profil update requests
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
if (!defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class ProfilUpdate extends Auth_Controller
|
||||
{
|
||||
|
||||
public function __construct(){
|
||||
parent::__construct([
|
||||
'index' => ['student/anrechnung_beantragen:r', 'user:r'], // TODO(chris): permissions?
|
||||
'getAllRequests' => ['student/anrechnung_beantragen:r', 'user:r'],
|
||||
|
||||
]);
|
||||
//? put the uid and pid inside the controller to reuse in controller
|
||||
$this->uid = getAuthUID();
|
||||
$this->pid = getAuthPersonID();
|
||||
|
||||
$this->load->model('person/Profil_change_model','ProfilChangeModel');
|
||||
}
|
||||
|
||||
|
||||
public function index(){
|
||||
$this->load->view('Cis/ProfilUpdate');
|
||||
}
|
||||
|
||||
public function getAllRequests(){
|
||||
|
||||
$res = $this->ProfilChangeModel->load();
|
||||
if(isError($res)){
|
||||
// catch exception
|
||||
echo $res->retval->data;
|
||||
return;
|
||||
}else{
|
||||
$res = hasData($res)? getData($res) : null;
|
||||
}
|
||||
echo json_encode($res);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user