mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 08:34:29 +00:00
adds the dashboard menu punkt and adds greeting to the dashboard view
This commit is contained in:
@@ -27,6 +27,13 @@ class Cis4 extends FHC_Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->load->view('CisVue/Dashboard.php');
|
||||
$this->load->model('person/Person_model','PersonModel');
|
||||
$begrüsung = $this->PersonModel->getFirstName(getAuthUID());
|
||||
if(isError($begrüsung))
|
||||
{
|
||||
show_error("name couldn't be loaded for username ".getAuthUID());
|
||||
}
|
||||
$begrüsung = getData($begrüsung);
|
||||
$this->load->view('CisVue/Dashboard.php',["name"=> $begrüsung]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,6 +290,21 @@ class Person_model extends DB_Model
|
||||
return success($result->vorname. ' '. $result->nachname);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get first name of given uid. (Vorname Nachname)
|
||||
* @param $uid
|
||||
* @return array
|
||||
*/
|
||||
public function getFirstName($uid)
|
||||
{
|
||||
$result = getData($this->getByUid($uid))[0];
|
||||
if (!$result) {
|
||||
show_error('Failed loading person');
|
||||
}
|
||||
|
||||
return success($result->vorname);
|
||||
}
|
||||
|
||||
public function checkDuplicate($person_id)
|
||||
{
|
||||
$qry = "SELECT person_id
|
||||
|
||||
@@ -12,7 +12,7 @@ $this->load->view('templates/CISVUE-Header', $includesArray);
|
||||
?>
|
||||
|
||||
<div id="content">
|
||||
<h2>Dashboard</h2>
|
||||
<h2>Hallo <?= $name?>!</h2>
|
||||
<hr>
|
||||
<fhc-dashboard dashboard="CIS"/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user