mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 17:02:19 +00:00
also shows the zustellungs warning when there is more than one kontakt marked as zustellung
This commit is contained in:
@@ -23,6 +23,7 @@ class Profil extends Auth_Controller
|
||||
'isMitarbeiter' => ['student/anrechnung_beantragen:r', 'user:r'],
|
||||
'isStudent' => ['student/anrechnung_beantragen:r', 'user:r'],
|
||||
'getZustellAdresse' => ['student/anrechnung_beantragen:r', 'user:r'],
|
||||
'getZustellKontakt' => ['student/anrechnung_beantragen:r', 'user:r'],
|
||||
|
||||
]);
|
||||
|
||||
@@ -101,6 +102,16 @@ class Profil extends Auth_Controller
|
||||
echo json_encode($adressen_res);
|
||||
}
|
||||
|
||||
public function getZustellKontakt(){
|
||||
$this->KontaktModel->addSelect(["kontakt_id"]);
|
||||
$kontakt_res = $this->KontaktModel->loadWhere(['person_id'=>$this->pid, 'zustellung'=>true]);
|
||||
$kontakt_res = hasData($kontakt_res) ? getData($kontakt_res): null;
|
||||
$kontakt_res = array_map(function($item){
|
||||
return $item->kontakt_id;
|
||||
},$kontakt_res);
|
||||
echo json_encode($kontakt_res);
|
||||
}
|
||||
|
||||
|
||||
private function viewMitarbeiterProfil($uid)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user