mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Merge remote-tracking branch 'origin/feature-30660/FHC4_StudierendenGUI_Prototyp' into feature-30660/FHC4_StudierendenGUI_Prototyp
This commit is contained in:
@@ -535,120 +535,4 @@ class Student extends FHC_Controller
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getAdressen($person_id)
|
||||
{
|
||||
$this->load->model('person/Adresse_model', 'AdresseModel');
|
||||
$this->load->model('person/Adressentyp_model', 'AdressentypModel');
|
||||
$this->load->model('ressource/firma_model', 'FirmaModel');
|
||||
|
||||
$this->AdresseModel->addSelect('*');
|
||||
$this->AdressentypModel->addJoin('public.tbl_adressentyp t', 'ON (t.adressentyp_kurzbz = public.tbl_adresse.typ)');
|
||||
$this->FirmaModel->addJoin('public.tbl_firma f', 'ON (f.firma_id = public.tbl_adresse.firma_id)', 'LEFT');
|
||||
|
||||
$result = $this->AdresseModel->loadWhere(
|
||||
array('person_id' => $person_id)
|
||||
);
|
||||
if (isError($result)) {
|
||||
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
|
||||
$this->outputJson(getError($result));
|
||||
} else {
|
||||
$this->outputJson(getData($result) ?: []);
|
||||
}
|
||||
}
|
||||
|
||||
public function addNewAddress($person_id)
|
||||
{
|
||||
$_POST = json_decode(utf8_encode($this->input->raw_input_stream), true);
|
||||
|
||||
//var_dump($_POST);
|
||||
//echo ($_POST['ort']);
|
||||
$this->load->model('person/Adresse_model', 'AdresseModel');
|
||||
// Load Libraries
|
||||
$this->load->library('AuthLib');
|
||||
$this->load->library('VariableLib', ['uid' => getAuthUID()]);
|
||||
|
||||
$result = $this->AdresseModel->insert(
|
||||
[
|
||||
'person_id' => $person_id,
|
||||
'strasse' => $_POST['strasse'],
|
||||
'insertvon' => 'FHC4',
|
||||
'insertamum' => date('c'),
|
||||
'plz' => $_POST['plz'],
|
||||
'ort' => $_POST['ort'],
|
||||
'gemeinde' => $_POST['gemeinde'],
|
||||
'nation' => $_POST['nation'],
|
||||
'heimatadresse' => $_POST['heimatadresse'],
|
||||
'zustelladresse' => $_POST['zustelladresse'],
|
||||
'co_name' => $_POST['co_name'],
|
||||
'typ' => $_POST['typ']
|
||||
]
|
||||
);
|
||||
|
||||
if (isError($result))
|
||||
{
|
||||
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
|
||||
return $this->outputJson($result);
|
||||
}
|
||||
return $this->outputJsonSuccess(true);
|
||||
}
|
||||
|
||||
public function getAdressentypen()
|
||||
{
|
||||
$this->load->model('person/Adressentyp_model', 'AdressentypModel');
|
||||
|
||||
$result = $this->AdressentypModel->load();
|
||||
if (isError($result)) {
|
||||
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
|
||||
$this->outputJson(getError($result));
|
||||
} else {
|
||||
$this->outputJson(getData($result) ?: []);
|
||||
}
|
||||
}
|
||||
|
||||
public function getGmeinden($plz)
|
||||
{
|
||||
//TODO(manu) finish
|
||||
$result = "";
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function getKontakte($person_id)
|
||||
{
|
||||
$this->load->model('person/Kontakt_model', 'KontaktModel');
|
||||
$this->load->model('organisation/standort_model', 'StandortModel');
|
||||
$this->load->model('ressource/firma_model', 'FirmaModel');
|
||||
|
||||
$this->KontaktModel->addSelect('*');
|
||||
$this->StandortModel->addJoin('public.tbl_standort st', 'ON (public.tbl_kontakt.standort_id = st.standort_id)', 'LEFT');
|
||||
$this->StandortModel->addJoin('public.tbl_firma f', 'ON (f.firma_id = st.firma_id)', 'LEFT');
|
||||
|
||||
$result = $this->KontaktModel->loadWhere(
|
||||
array('person_id' => $person_id)
|
||||
);
|
||||
|
||||
if (isError($result)) {
|
||||
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
|
||||
$this->outputJson(getError($result));
|
||||
} else {
|
||||
$this->outputJson(getData($result) ?: []);
|
||||
}
|
||||
}
|
||||
|
||||
public function getBankverbindung($person_id)
|
||||
{
|
||||
$this->load->model('person/Bankverbindung_model', 'BankverbindungModel');
|
||||
|
||||
$this->BankverbindungModel->addSelect('*');
|
||||
|
||||
$result = $this->BankverbindungModel->loadWhere(
|
||||
array('person_id' => $person_id)
|
||||
);
|
||||
if (isError($result)) {
|
||||
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
|
||||
$this->outputJson(getError($result));
|
||||
} else {
|
||||
$this->outputJson(getData($result) ?: []);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,11 @@ const app = Vue.createApp();
|
||||
|
||||
app
|
||||
.use(router)
|
||||
.use(PvConfig)
|
||||
.use(PvConfig, {
|
||||
zIndex: {
|
||||
overlay: 1100
|
||||
}
|
||||
})
|
||||
.use(FhcAlert)
|
||||
.mount('#main');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user