diff --git a/application/config/stv.php b/application/config/stv.php
index 8b7792e83..78613cd40 100644
--- a/application/config/stv.php
+++ b/application/config/stv.php
@@ -13,16 +13,30 @@ $config['tabs'] =
//all fields can be configured to be hidden, see class attribute stv-details-prestudent-name for name
'hiddenFields' => [
- //corresponding to config-entry 'ZGV_DOKTOR_ANZEIGEN' in global.config
- 'zgvdoktor_code', 'zgvdoktorort', 'zgvdoktordatum', 'zgvdoktornation', 'zgvdoktor_erfuellt',
-
- //corresponding to config-entry 'ZGV_ERFUELLT_ANZEIGEN' in global.config
- 'zgv_erfuellt', 'zgvmas_erfuellt','zgvdoktor_erfuellt',
-
//propably used by FH-Communities
'aufnahmeschluessel', 'standort_code', 'facheinschlaegigBerufstaetig'
],
'hideUDFs' => false
]
-];
\ No newline at end of file
+];
+
+// List of fields to show when ZGV_DOKTOR_ANZEIGEN is defined
+$fieldsZgvDoktor = ['zgvdoktorort', 'zgvdoktordatum', 'zgvdoktornation', 'zgvdoktor_erfuellt', 'zgvdoktor_code'];
+
+// List of fields to show when ZGV_ERFUELLT_ANZEIGEN is defined
+$fieldsZgvErfuellt = ['zgv_erfuellt', 'zgvmas_erfuellt','zgvdoktor_erfuellt'];
+
+//order important: to show zgf_erfuellt_doktor just in case visibility of doktor is true
+if (!defined('ZGV_ERFUELLT_ANZEIGEN') || !ZGV_ERFUELLT_ANZEIGEN) {
+ $config['tabs']['prestudent']['hiddenFields'] = array_merge(
+ $config['tabs']['prestudent']['hiddenFields'], $fieldsZgvErfuellt
+ );
+}
+
+if (!defined('ZGV_DOKTOR_ANZEIGEN') || !ZGV_DOKTOR_ANZEIGEN) {
+ $config['tabs']['prestudent']['hiddenFields'] = array_merge(
+ $config['tabs']['prestudent']['hiddenFields'],
+ $fieldsZgvDoktor
+ );
+}
diff --git a/application/controllers/api/frontend/v1/stv/Address.php b/application/controllers/api/frontend/v1/stv/Address.php
index 48a3a3aa0..324e306f3 100644
--- a/application/controllers/api/frontend/v1/stv/Address.php
+++ b/application/controllers/api/frontend/v1/stv/Address.php
@@ -47,17 +47,13 @@ class Address extends FHCAPI_Controller
public function getPlaces($plz = null)
{
- //TODO(Manu) check with Chris
- if (!$plz){
- $plz = $this->input->post('plz');
- }
$this->load->model('codex/Gemeinde_model', 'GemeindeModel');
$this->load->library('form_validation');
$this->form_validation->set_data(['address.plz' => $plz]);
- $this->form_validation->set_rules('address.plz', 'PLZ', 'numeric|less_than[10000]');
+ $this->form_validation->set_rules('address.plz', 'PLZ', 'required|numeric|less_than[10000]');
if (!$this->form_validation->run())
$this->terminateWithValidationErrors($this->form_validation->error_array());
diff --git a/application/controllers/api/frontend/v1/stv/Kontakt.php b/application/controllers/api/frontend/v1/stv/Kontakt.php
index 1bc751a27..f02073e2b 100644
--- a/application/controllers/api/frontend/v1/stv/Kontakt.php
+++ b/application/controllers/api/frontend/v1/stv/Kontakt.php
@@ -97,9 +97,6 @@ class Kontakt extends FHCAPI_Controller
|| $this->router->method == 'deleteContact'
|| $this->router->method == 'deleteBankverbindung'
) {
-
- //TODO(manu) build all new with postparamater
-
if($this->input->post('address_id'))
$id = $this->input->post('address_id');
if($this->input->post('adresse_id'))
@@ -109,11 +106,6 @@ class Kontakt extends FHCAPI_Controller
if($this->input->post('kontakt_id'))
$id = $this->input->post('kontakt_id');
- //$id = current(array_slice($this->uri->rsegments, 2));
- // $id = $this->input->post('address_id') || $this->input->post('adresse_id');
- //$id: no more uri parameter
- // $this->terminateWithError($this->router->method, self::ERROR_TYPE_GENERAL);
-
$model = 'person/Adresse_model';
if ($this->router->method == 'loadContact'
|| $this->router->method == 'updateContact'
@@ -140,7 +132,12 @@ class Kontakt extends FHCAPI_Controller
}
public function getAdressen($person_id)
{
- $this->AdresseModel->addSelect('public.tbl_adresse.*');
+ $this->AdresseModel->addSelect("public.tbl_adresse.*,
+ TO_CHAR (CASE
+ WHEN public.tbl_adresse.updateamum >= public.tbl_adresse.insertamum
+ THEN public.tbl_adresse.updateamum
+ ELSE public.tbl_adresse.insertamum
+ END::timestamp, 'DD.MM.YYYY HH24:MI:SS') AS lastUpdate");
$this->AdresseModel->addSelect('t.*');
$this->AdresseModel->addSelect('f.firma_id');
$this->AdresseModel->addSelect('f.name as firmenname');
@@ -158,15 +155,19 @@ class Kontakt extends FHCAPI_Controller
public function addNewAddress($person_id)
{
- $this->form_validation->set_rules('plz', 'PLZ', 'required|numeric', [
+ $this->form_validation->set_data(['address.plz' => $_POST['plz']]);
+
+ $this->form_validation->set_rules('address.plz', 'PLZ', 'required|numeric', [
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'PLZ']),
'numeric' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'PLZ'])
]);
- if(isset($_POST['gemeinde']) && isset($_POST['ort']))
- $this->form_validation->set_rules('plz', 'Postleitzahl', 'callback_validateLocationCombination', [
- 'validateLocationCombination' => $this->p->t('ui', 'error_location_combination')
- ]);
+ if(isset($_POST['gemeinde']) && isset($_POST['ort']) && isset($_POST['nation']) && $_POST['nation'] == 'A')
+ {
+ $this->form_validation->set_rules('address.plz', 'Postleitzahl', 'callback_validateLocationCombination', [
+ 'validateLocationCombination' => $this->p->t('ui', 'error_location_combination')
+ ]);
+ }
if ($this->form_validation->run() == false)
{
@@ -211,28 +212,30 @@ class Kontakt extends FHCAPI_Controller
]
);
- if (isError($result))
- {
- return $this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
- }
- return $this->outputJsonSuccess(true);
+ $data = $this->getDataOrTerminateWithError($result);
+
+ $this->terminateWithSuccess($data);
}
public function updateAddress()
{
- //TODO(Manu) rename all to same
$address_id = $this->input->post('adresse_id');
+ $this->form_validation->set_data(['address.plz' => $_POST['plz']]);
+
$uid = getAuthUID();
- $this->form_validation->set_rules('plz', 'PLZ', 'required|numeric', [
+
+ $this->form_validation->set_rules('address.plz', 'PLZ', 'required|numeric', [
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'PLZ']),
'numeric' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'PLZ'])
]);
- if(isset($_POST['gemeinde']) && isset($_POST['ort']))
- $this->form_validation->set_rules('plz', 'Postleitzahl', 'callback_validateLocationCombination', [
+ if(isset($_POST['gemeinde']) && isset($_POST['ort']) && isset($_POST['nation']) && ($_POST['nation'] == 'A'))
+ {
+ $this->form_validation->set_rules('address.plz', 'Postleitzahl', 'callback_validateLocationCombination', [
'validateLocationCombination' => $this->p->t('ui', 'error_location_combination')
]);
+ }
if ($this->form_validation->run() == false)
{
@@ -275,7 +278,7 @@ class Kontakt extends FHCAPI_Controller
'strasse' => $strasse,
'updatevon' => $uid,
'updateamum' => date('c'),
- 'plz' => $_POST['plz'],
+ 'plz' => $_POST['address']['plz'],
'ort' => $ort,
'gemeinde' => $gemeinde,
'nation' => $nation,
@@ -290,11 +293,9 @@ class Kontakt extends FHCAPI_Controller
]
);
- if (isError($result))
- {
- return $this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
- }
- return $this->outputJsonSuccess(true);
+ $data = $this->getDataOrTerminateWithError($result);
+
+ $this->terminateWithSuccess($data);
}
public function loadAddress()
@@ -328,9 +329,7 @@ class Kontakt extends FHCAPI_Controller
public function deleteAddress()
{
- //TODO(Manu) rename all to same
$adresse_id = $this->input->post('address_id');
- // return $this->terminateWithError($adresse_id, self::ERROR_TYPE_GENERAL);
$this->load->model('person/Adresse_model', 'AdresseModel');
$result = $this->AdresseModel->load([
@@ -390,10 +389,10 @@ class Kontakt extends FHCAPI_Controller
$this->load->model('organisation/standort_model', 'StandortModel');
$result = $this->StandortModel->searchStandorte($searchString);
- if (isError($result)) {
- $this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
- }
- $this->terminateWithSuccess($result ?: []);
+
+ $data = $this->getDataOrTerminateWithError($result);
+
+ $this->terminateWithSuccess($data);
}
public function getStandorteByFirma($firma_id)
@@ -573,11 +572,9 @@ class Kontakt extends FHCAPI_Controller
]
);
- if (isError($result))
- {
- return $this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
- }
- return $this->outputJsonSuccess(true);
+ $data = $this->getDataOrTerminateWithError($result);
+
+ $this->terminateWithSuccess($data);
}
public function deleteContact()
@@ -660,11 +657,9 @@ class Kontakt extends FHCAPI_Controller
'orgform_kurzbz' => $orgform_kurzbz
]
);
- if (isError($result))
- {
- return $this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
- }
- return $this->outputJsonSuccess(true);
+ $data = $this->getDataOrTerminateWithError($result);
+
+ $this->terminateWithSuccess($data);
}
public function loadBankverbindung()
@@ -738,11 +733,9 @@ class Kontakt extends FHCAPI_Controller
]
);
- if (isError($result))
- {
- return $this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
- }
- return $this->outputJsonSuccess(true);
+ $data = $this->getDataOrTerminateWithError($result);
+
+ $this->terminateWithSuccess($data);
}
public function deleteBankverbindung()
diff --git a/application/core/Notiz_Controller.php b/application/core/Notiz_Controller.php
index 05f70ee85..472ac7669 100644
--- a/application/core/Notiz_Controller.php
+++ b/application/core/Notiz_Controller.php
@@ -309,6 +309,7 @@ abstract class Notiz_Controller extends FHCAPI_Controller
}
//update(1) loading all dms-entries with this notiz_id
+ $dms_id_arr = [];
$this->load->model('person/Notizdokument_model', 'NotizdokumentModel');
$this->NotizdokumentModel->addJoin('campus.tbl_dms_version', 'dms_id');
diff --git a/public/js/api/notiz/person.js b/public/js/api/notiz/person.js
index de351b68b..04812eacc 100644
--- a/public/js/api/notiz/person.js
+++ b/public/js/api/notiz/person.js
@@ -5,8 +5,8 @@ export default {
getUid(){
return this.$fhcApi.get('api/frontend/v1/notiz/notizPerson/getUid/');
},
- addNewNotiz(id, formData) {
- return this.$fhcApi.post('api/frontend/v1/notiz/notizPerson/addNewNotiz/' + id,
+ addNewNotiz(form, id, formData) {
+ return this.$fhcApi.post(form,'api/frontend/v1/notiz/notizPerson/addNewNotiz/' + id,
formData
);
},
@@ -27,8 +27,8 @@ export default {
id
});
},
- updateNotiz(notiz_id, formData){
- return this.$fhcApi.post('api/frontend/v1/notiz/notizPerson/updateNotiz/' + notiz_id,
+ updateNotiz(form, notiz_id, formData){
+ return this.$fhcApi.post(form,'api/frontend/v1/notiz/notizPerson/updateNotiz/' + notiz_id,
formData
);
},
diff --git a/public/js/api/stv/kontakt.js b/public/js/api/stv/kontakt.js
index 8a309564c..f76c9b5cb 100644
--- a/public/js/api/stv/kontakt.js
+++ b/public/js/api/stv/kontakt.js
@@ -1,5 +1,4 @@
export default {
- //TODO(Manu) check if tabulatorConfig use here like in konto.js
//------------- address.js-----------
getAdressen (url, config, params){
return this.$fhcApi.get('api/frontend/v1/stv/kontakt/getAdressen/' + params.id);
diff --git a/public/js/api/stv/prestudent.js b/public/js/api/stv/prestudent.js
index dd90880c5..b58f8eda1 100644
--- a/public/js/api/stv/prestudent.js
+++ b/public/js/api/stv/prestudent.js
@@ -39,24 +39,38 @@ export default {
},
//------------- MultiStatus.js------------------------------------------------------
-
getHistoryPrestudent (url, config, params){
return this.$fhcApi.get('api/frontend/v1/stv/status/getHistoryPrestudent/' + params.id);
},
getMaxSem(studiengang_kzs) {
return this.$fhcApi.post('api/frontend/v1/stv/status/getMaxSemester/', {studiengang_kzs});
},
- advanceStatus(status_id) {
- return this.$fhcApi.post('api/frontend/v1/stv/status/advanceStatus/' + Object.values(status_id).join('/'));
+ advanceStatus({prestudent_id, status_kurzbz, studiensemester_kurzbz, ausbildungssemester}) {
+ return this.$fhcApi.post('api/frontend/v1/stv/status/advanceStatus/'
+ + prestudent_id + '/'
+ + status_kurzbz + '/'
+ + studiensemester_kurzbz + '/'
+ + ausbildungssemester
+ );
},
- confirmStatus(status_id) {
- return this.$fhcApi.post('api/frontend/v1/stv/status/confirmStatus/' + Object.values(status_id).join('/'));
+ confirmStatus({prestudent_id, status_kurzbz, studiensemester_kurzbz, ausbildungssemester}) {
+ return this.$fhcApi.post('api/frontend/v1/stv/status/confirmStatus/'
+ + prestudent_id + '/'
+ + status_kurzbz + '/'
+ + studiensemester_kurzbz + '/'
+ + ausbildungssemester
+ );
},
isLastStatus(id) {
return this.$fhcApi.get('api/frontend/v1/stv/status/isLastStatus/' + id);
},
- deleteStatus(status_id) {
- return this.$fhcApi.post('api/frontend/v1/stv/status/deleteStatus/' + Object.values(status_id).join('/'));
+ deleteStatus({prestudent_id, status_kurzbz, studiensemester_kurzbz, ausbildungssemester}) {
+ return this.$fhcApi.post('api/frontend/v1/stv/status/deleteStatus/'
+ + prestudent_id + '/'
+ + status_kurzbz + '/'
+ + studiensemester_kurzbz + '/'
+ + ausbildungssemester
+ );
},
getLastBismeldestichtag() {
return this.$fhcApi.get('api/frontend/v1/stv/status/getLastBismeldestichtag/');
diff --git a/public/js/api/stv/status.js b/public/js/api/stv/status.js
index 20b59c8de..a2a143f65 100644
--- a/public/js/api/stv/status.js
+++ b/public/js/api/stv/status.js
@@ -7,11 +7,24 @@ export default {
data
);
},
- loadStatus(status_id) {
- return this.$fhcApi.post('api/frontend/v1/stv/status/loadStatus/' + Object.values(status_id).join('/'));
+ loadStatus({prestudent_id, status_kurzbz, studiensemester_kurzbz, ausbildungssemester}) {
+ return this.$fhcApi.post(
+ 'api/frontend/v1/stv/status/loadStatus/'
+ + prestudent_id + '/'
+ + status_kurzbz + '/'
+ + studiensemester_kurzbz + '/'
+ + ausbildungssemester
+ );
},
- updateStatus(status_id, data) {
- return this.$fhcApi.post('api/frontend/v1/stv/status/updateStatus/' + Object.values(status_id).join('/'), data);
+ updateStatus({prestudent_id, status_kurzbz, studiensemester_kurzbz, ausbildungssemester}, data) {
+ return this.$fhcApi.post(
+ 'api/frontend/v1/stv/status/updateStatus/'
+ + prestudent_id + '/'
+ + status_kurzbz + '/'
+ + studiensemester_kurzbz + '/'
+ + ausbildungssemester,
+ data
+ );
},
getStudienplaene(prestudent_id) {
return this.$fhcApi.get('api/frontend/v1/stv/prestudent/getStudienplaene/' + prestudent_id);
diff --git a/public/js/components/Betriebsmittel/Betriebsmittel.js b/public/js/components/Betriebsmittel/Betriebsmittel.js
index 3849578ea..a9468ccb5 100644
--- a/public/js/components/Betriebsmittel/Betriebsmittel.js
+++ b/public/js/components/Betriebsmittel/Betriebsmittel.js
@@ -142,6 +142,18 @@ export default {
cm.getColumnByField('format_ausgabe').component.updateDefinition({
title: this.$p.t('wawi', 'ausgabedatum')
});
+ cm.getColumnByField('betriebsmittel_id').component.updateDefinition({
+ title: this.$p.t('ui', 'betriebsmittel_id')
+ });
+ cm.getColumnByField('betriebsmittelperson_id').component.updateDefinition({
+ title: this.$p.t('ui', 'betriebsmittelperson_id')
+ });
+ cm.getColumnByField('person_id').component.updateDefinition({
+ title: this.$p.t('person', 'person_id')
+ });
+ cm.getColumnByField('uid').component.updateDefinition({
+ title: this.$p.t('person', 'uid')
+ });
}
}
],
diff --git a/public/js/components/Notiz/Notiz.js b/public/js/components/Notiz/Notiz.js
index 18d483985..b017b830b 100644
--- a/public/js/components/Notiz/Notiz.js
+++ b/public/js/components/Notiz/Notiz.js
@@ -161,7 +161,7 @@ export default {
event: 'tableBuilt',
handler: async () => {
- await this.$p.loadCategory(['notiz', 'global']);
+ await this.$p.loadCategory(['notiz', 'global', 'ui']);
let cm = this.$refs.table.tabulator.columnManager;
@@ -202,18 +202,21 @@ export default {
visible: this.showVariables.showLastupdate
});
cm.getColumnByField('notiz_id').component.updateDefinition({
- visible: this.showVariables.showNotiz_id
+ visible: this.showVariables.showNotiz_id,
+ title: this.$p.t('ui', 'notiz_id')
});
cm.getColumnByField('notizzuordnung_id').component.updateDefinition({
- visible: this.showVariables.showNotizzuordnung_id
+ visible: this.showVariables.showNotizzuordnung_id,
+ title: this.$p.t('ui', 'notizzuordnung_id')
});
cm.getColumnByField('type_id').component.updateDefinition({
- visible: this.showVariables.showType_id
+ visible: this.showVariables.showType_id,
+ title: this.$p.t('ui', 'type_id')
});
cm.getColumnByField('id').component.updateDefinition({
- visible: this.showVariables.showId
+ visible: this.showVariables.showId,
+ title: this.$p.t('ui', 'extension_id')
});
-
}
}
],
@@ -302,7 +305,8 @@ export default {
formData.append('data', JSON.stringify(this.notizData));
Object.entries(this.notizData.anhang).forEach(([k, v]) => formData.append(k, v));
- return this.endpoint.addNewNotiz(this.id, formData)
+ //TODO(Manu) formvalidation: inform not working with tinymce textarea
+ return this.endpoint.addNewNotiz(this.$refs.formNotiz, this.id, formData)
.then(response => {
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
this.resetFormData();
@@ -318,7 +322,7 @@ export default {
},
deleteNotiz(notiz_id) {
return this.endpoint.deleteNotiz(notiz_id, this.typeId, this.id)
- //return this.$fhcApi.post(this.endpoint + 'deleteNotiz/', this.param)
+ //return this.eost(this.endpoint + 'deleteNotiz/', this.param)
.then(result => {
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successDelete'));
this.$refs.deleteNotizModal.hide();
@@ -354,7 +358,8 @@ export default {
formData.append('data', JSON.stringify(this.notizData));
Object.entries(this.notizData.anhang).forEach(([k, v]) => formData.append(k, v));
- return this.endpoint.updateNotiz(notiz_id, formData)
+ //TODO(Manu) formvalidation: inform not working with tinymce textarea
+ return this.endpoint.updateNotiz(this.$refs.formNotiz, notiz_id, formData)
.then(response => {
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
this.resetFormData();
@@ -372,7 +377,9 @@ export default {
this.$refs.table.reloadTable();
},
resetFormData() {
- this.$refs.formc.reset();
+ //TODO(Manu) check ref, needed here?
+ //this.$refs.formNotiz.reset();
+ //this.$refs.formc.reset();
this.notizData = {
typeId: this.typeId,
titel: null,
@@ -521,7 +528,7 @@ export default {
-