diff --git a/application/config/stv.php b/application/config/stv.php new file mode 100644 index 000000000..78613cd40 --- /dev/null +++ b/application/config/stv.php @@ -0,0 +1,42 @@ + [ + //all fields can be configured to be hidden, see class attribute stv-details-details-name for name + 'hiddenFields' => [], + 'hideUDFs' => false + ], + + 'prestudent' => [ + + //all fields can be configured to be hidden, see class attribute stv-details-prestudent-name for name + 'hiddenFields' => [ + + //propably used by FH-Communities + 'aufnahmeschluessel', 'standort_code', 'facheinschlaegigBerufstaetig' + + ], + 'hideUDFs' => false + ] +]; + +// 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 7685fcd04..324e306f3 100644 --- a/application/controllers/api/frontend/v1/stv/Address.php +++ b/application/controllers/api/frontend/v1/stv/Address.php @@ -45,7 +45,7 @@ class Address extends FHCAPI_Controller $this->terminateWithSuccess($data); } - public function getPlaces($plz) + public function getPlaces($plz = null) { $this->load->model('codex/Gemeinde_model', 'GemeindeModel'); @@ -53,7 +53,7 @@ class Address extends FHCAPI_Controller $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/Config.php b/application/controllers/api/frontend/v1/stv/Config.php index c28c49485..fd318a79f 100644 --- a/application/controllers/api/frontend/v1/stv/Config.php +++ b/application/controllers/api/frontend/v1/stv/Config.php @@ -46,14 +46,20 @@ class Config extends FHCAPI_Controller 'stv', 'konto' ]); + + // Load Config + $this->load->config('stv'); } public function student() { $result = []; + $config = $this->config->item('tabs'); + $result['details'] = [ 'title' => $this->p->t('stv', 'tab_details'), - 'component' => './Stv/Studentenverwaltung/Details/Details.js' + 'component' => './Stv/Studentenverwaltung/Details/Details.js', + 'config' => $config['details'] ]; $result['notes'] = [ 'title' => $this->p->t('stv', 'tab_notes'), @@ -69,7 +75,8 @@ class Config extends FHCAPI_Controller ]; $result['prestudent'] = [ 'title' => $this->p->t('stv', 'tab_prestudent'), - 'component' => './Stv/Studentenverwaltung/Details/Prestudent.js' + 'component' => './Stv/Studentenverwaltung/Details/Prestudent.js', + 'config' => $config['prestudent'] ]; $result['status'] = [ 'title' => 'Status', diff --git a/application/controllers/api/frontend/v1/stv/Kontakt.php b/application/controllers/api/frontend/v1/stv/Kontakt.php index 379184ee0..05fb55011 100644 --- a/application/controllers/api/frontend/v1/stv/Kontakt.php +++ b/application/controllers/api/frontend/v1/stv/Kontakt.php @@ -97,7 +97,14 @@ class Kontakt extends FHCAPI_Controller || $this->router->method == 'deleteContact' || $this->router->method == 'deleteBankverbindung' ) { - $id = current(array_slice($this->uri->rsegments, 2)); + if($this->input->post('address_id')) + $id = $this->input->post('address_id'); + if($this->input->post('adresse_id')) + $id = $this->input->post('adresse_id'); + if($this->input->post('bankverbindung_id')) + $id = $this->input->post('bankverbindung_id'); + if($this->input->post('kontakt_id')) + $id = $this->input->post('kontakt_id'); $model = 'person/Adresse_model'; if ($this->router->method == 'loadContact' @@ -125,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'); @@ -143,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) { @@ -196,25 +212,33 @@ 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($address_id) + public function updateAddress() { + $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']) && ($_POST['gemeinde'] != '') + && isset($_POST['ort']) && ($_POST['ort'] != '') + && isset($_POST['nation']) && ($_POST['nation'] == 'A') + && isset($_POST['plz']) && ($_POST['plz'] != '') ) + { + $this->form_validation->set_rules('address.plz', 'Postleitzahl', 'callback_validateLocationCombination', [ 'validateLocationCombination' => $this->p->t('ui', 'error_location_combination') ]); + } if ($this->form_validation->run() == false) { @@ -272,15 +296,15 @@ 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($adresse_id) + public function loadAddress() { + $adresse_id = $this->input->post('address_id'); + $this->load->model('person/Adresse_model', 'AdresseModel'); $this->AdresseModel->addSelect('public.tbl_adresse.*'); @@ -306,8 +330,10 @@ class Kontakt extends FHCAPI_Controller $this->terminateWithSuccess(current(getData($result)) ? : null); } - public function deleteAddress($adresse_id) + public function deleteAddress() { + $adresse_id = $this->input->post('address_id'); + $this->load->model('person/Adresse_model', 'AdresseModel'); $result = $this->AdresseModel->load([ 'adresse_id'=> $adresse_id, @@ -366,10 +392,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) @@ -418,8 +444,9 @@ class Kontakt extends FHCAPI_Controller } } - public function loadContact($kontakt_id) + public function loadContact() { + $kontakt_id = $this->input->post('kontakt_id'); $this->load->model('person/Kontakt_model', 'KontaktModel'); $this->KontaktModel->addSelect('*, public.tbl_kontakt.*'); @@ -439,7 +466,6 @@ class Kontakt extends FHCAPI_Controller { return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Kontakt_id']), self::ERROR_TYPE_GENERAL); } - // $this->outputJsonSuccess(current(getData($result))); $this->terminateWithSuccess(current(getData($result))); } @@ -495,8 +521,9 @@ class Kontakt extends FHCAPI_Controller return $this->outputJsonSuccess(true); } - public function updateContact($kontakt_id) + public function updateContact() { + $kontakt_id = $this->input->post('kontakt_id'); $this->load->model('person/Kontakt_model', 'KontaktModel'); if(!$kontakt_id) @@ -523,13 +550,6 @@ class Kontakt extends FHCAPI_Controller $this->terminateWithValidationErrors($this->form_validation->error_array()); } -/* if(isset($_POST['standort'])) - { - $standort_id = $_POST['standort']['standort_id']; - } - else - $standort_id = null;*/ - $uid = getAuthUID(); $kontakttyp = $this->input->post('kontakttyp'); $anmerkung = $this->input->post('anmerkung'); @@ -538,8 +558,6 @@ class Kontakt extends FHCAPI_Controller $person_id = $this->input->post('person_id'); $standort_id = $this->input->post('standort_id'); - //return $this->terminateWithError("in update " . $standort_id, self::ERROR_TYPE_GENERAL); - $result = $this->KontaktModel->update( [ 'kontakt_id' => $kontakt_id @@ -557,15 +575,14 @@ 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($kontakt_id) + public function deleteContact() { + $kontakt_id = $this->input->post('kontakt_id'); $this->load->model('person/Kontakt_model', 'KontaktModel'); $result = $this->KontaktModel->delete( @@ -643,15 +660,15 @@ 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($bankverbindung_id) + public function loadBankverbindung() { + $bankverbindung_id = $this->input->post('bankverbindung_id'); + $this->load->model('person/Bankverbindung_model', 'BankverbindungModel'); $this->BankverbindungModel->addSelect('*'); @@ -719,15 +736,15 @@ 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($bankverbindung_id) + public function deleteBankverbindung() { + $bankverbindung_id = $this->input->post('bankverbindung_id'); + $this->load->model('person/Bankverbindung_model', 'BankverbindungModel'); $result = $this->BankverbindungModel->delete( diff --git a/application/controllers/api/frontend/v1/stv/Prestudent.php b/application/controllers/api/frontend/v1/stv/Prestudent.php index ef9aeb111..0b06b9667 100644 --- a/application/controllers/api/frontend/v1/stv/Prestudent.php +++ b/application/controllers/api/frontend/v1/stv/Prestudent.php @@ -19,6 +19,7 @@ class Prestudent extends FHCAPI_Controller 'getAufmerksamdurch' => ['admin:r', 'assistenz:r'], 'getBerufstaetigkeit' => ['admin:r', 'assistenz:r'], 'getTypenStg' => ['admin:r', 'assistenz:r'], + 'getBisstandort' => ['admin:r', 'assistenz:r'], 'getStudienplaene' => ['admin:r', 'assistenz:r'], 'getStudiengang' => ['admin:r', 'assistenz:r'] ]); @@ -265,6 +266,17 @@ class Prestudent extends FHCAPI_Controller return $this->terminateWithSuccess(getData($result) ?: []); } + public function getBisstandort() + { + $this->load->model('codex/Bisstandort_model', 'BisstandortModel'); + + $result = $this->BisstandortModel->load(); + if (isError($result)) { + $this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL); + } + return $this->terminateWithSuccess(getData($result) ?: []); + } + public function getStudienplaene($prestudent_id) { $this->load->model('organisation/Studienplan_model', 'StudienplanModel'); diff --git a/application/controllers/api/frontend/v1/stv/Status.php b/application/controllers/api/frontend/v1/stv/Status.php index 074f4029e..4e7189d1d 100644 --- a/application/controllers/api/frontend/v1/stv/Status.php +++ b/application/controllers/api/frontend/v1/stv/Status.php @@ -647,15 +647,8 @@ class Status extends FHCAPI_Controller return $this->outputJsonSuccess(true); } - public function loadStatus() + public function loadStatus($prestudent_id, $status_kurzbz, $studiensemester_kurzbz, $ausbildungssemester) { - $_POST = json_decode(utf8_encode($this->input->raw_input_stream), true); - - $prestudent_id = $this->input->post('prestudent_id'); - $status_kurzbz = $this->input->post('status_kurzbz'); - $ausbildungssemester = $this->input->post('ausbildungssemester'); - $studiensemester_kurzbz = $this->input->post('studiensemester_kurzbz'); - $result = $this->PrestudentstatusModel->loadWhere( array( 'prestudent_id' => $prestudent_id, diff --git a/application/controllers/api/frontend/v1/stv/Student.php b/application/controllers/api/frontend/v1/stv/Student.php index 89c317ae4..f805be88a 100644 --- a/application/controllers/api/frontend/v1/stv/Student.php +++ b/application/controllers/api/frontend/v1/stv/Student.php @@ -55,7 +55,7 @@ class Student extends FHCAPI_Controller // Load language phrases $this->loadPhrases([ - 'ui' + 'ui', 'lehre' ]); } @@ -223,12 +223,10 @@ class Student extends FHCAPI_Controller // Check PKs if (count($update_lehrverband) + count($update_student) && $uid === null) { - // TODO(chris): phrase - $this->terminateWithValidationErrors(['' => "Kein/e StudentIn vorhanden!"]); + $this->terminateWithValidationErrors(['' => $this->p->t('lehre', 'error_no_student')]); } if (count($update_person) && $person_id === null) { - // TODO(chris): phrase - $this->terminateWithValidationErrors(['' => "Keine Person vorhanden!"]); + $this->terminateWithValidationErrors(['' => $this->p->t('lehre', 'error_no_person')]); } // Do Updates 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/application/models/codex/Bisstandort_model.php b/application/models/codex/Bisstandort_model.php new file mode 100644 index 000000000..9c7e9e45b --- /dev/null +++ b/application/models/codex/Bisstandort_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_bisstandort'; + $this->pk = 'standort_code'; + } +} diff --git a/application/views/Studentenverwaltung.php b/application/views/Studentenverwaltung.php index 2d0d22346..c8d9dc3f7 100644 --- a/application/views/Studentenverwaltung.php +++ b/application/views/Studentenverwaltung.php @@ -34,8 +34,10 @@ !defined('GENERATE_ALIAS_STUDENT') ? true : GENERATE_ALIAS_STUDENT, - 'showZgvDoktor' => !defined('ZGV_DOKTOR_ANZEIGEN') ? false : ZGV_DOKTOR_ANZEIGEN, - 'showZgvErfuellt' => !defined('ZGV_ERFUELLT_ANZEIGEN') ? false : ZGV_ERFUELLT_ANZEIGEN + + //replaced by possibility to hide each formular field via config stv.php + #'showZgvDoktor' => !defined('ZGV_DOKTOR_ANZEIGEN') ? false : ZGV_DOKTOR_ANZEIGEN, + #'showZgvErfuellt' => !defined('ZGV_ERFUELLT_ANZEIGEN') ? false : ZGV_ERFUELLT_ANZEIGEN ]; ?> 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.js b/public/js/api/stv.js index 14fcc6661..b66ae401e 100644 --- a/public/js/api/stv.js +++ b/public/js/api/stv.js @@ -2,12 +2,20 @@ import verband from './stv/verband.js'; import students from './stv/students.js'; import filter from './stv/filter.js'; import konto from './stv/konto.js'; +import kontakt from './stv/kontakt.js'; +import prestudent from './stv/prestudent.js'; +import status from './stv/status.js'; +import details from './stv/details.js'; export default { verband, students, filter, konto, + kontakt, + prestudent, + status, + details, configStudent() { return this.$fhcApi.get('api/frontend/v1/stv/config/student'); }, diff --git a/public/js/api/stv/details.js b/public/js/api/stv/details.js new file mode 100644 index 000000000..bdf26739b --- /dev/null +++ b/public/js/api/stv/details.js @@ -0,0 +1,10 @@ +export default { + get(prestudent_id) { + return this.$fhcApi.post('api/frontend/v1/stv/student/get/' + prestudent_id); + }, + save(prestudent_id, data) { + return this.$fhcApi.post('api/frontend/v1/stv/student/save/' + prestudent_id, + data + ); + }, +} diff --git a/public/js/api/stv/kontakt.js b/public/js/api/stv/kontakt.js new file mode 100644 index 000000000..f76c9b5cb --- /dev/null +++ b/public/js/api/stv/kontakt.js @@ -0,0 +1,82 @@ +export default { + //------------- address.js----------- + getAdressen (url, config, params){ + return this.$fhcApi.get('api/frontend/v1/stv/kontakt/getAdressen/' + params.id); + }, + addNewAddress(id, data) { + return this.$fhcApi.post('api/frontend/v1/stv/kontakt/addNewAddress/' + id, + data + ); + }, + loadAddress(address_id){ + return this.$fhcApi.post('api/frontend/v1/stv/kontakt/loadAddress/', {address_id}); + }, + updateAddress(address_id, data) { + return this.$fhcApi.post('api/frontend/v1/stv/kontakt/updateAddress/' + address_id, + data + ); + }, + deleteAddress(address_id) { + return this.$fhcApi.post('api/frontend/v1/stv/kontakt/deleteAddress/', {address_id}); + }, + getPlaces(plz) { + return this.$fhcApi.get('api/frontend/v1/stv/address/getPlaces/' + plz); + }, + getFirmen(searchString) { + return this.$fhcApi.get('api/frontend/v1/stv/kontakt/getFirmen/' + searchString); + }, + getNations() { + return this.$fhcApi.get('api/frontend/v1/stv/address/getNations/'); + }, + getAdressentypen() { + return this.$fhcApi.get('api/frontend/v1/stv/kontakt/getAdressentypen/'); + }, + + //------------- bankverbindung.js----------- + getBankverbindung (url, config, params){ + return this.$fhcApi.get('api/frontend/v1/stv/kontakt/getBankverbindung/' + params.id); + }, + addNewBankverbindung(id, data) { + return this.$fhcApi.post('api/frontend/v1/stv/kontakt/addNewBankverbindung/' + id, + data + ); + }, + loadBankverbindung(bankverbindung_id){ + return this.$fhcApi.post('api/frontend/v1/stv/kontakt/loadBankverbindung/', {bankverbindung_id}); + }, + updateBankverbindung(bankverbindung_id, data) { + return this.$fhcApi.post('api/frontend/v1/stv/kontakt/updateBankverbindung/' + bankverbindung_id, + data + ); + }, + deleteBankverbindung(bankverbindung_id) { + return this.$fhcApi.post('api/frontend/v1/stv/kontakt/deleteBankverbindung/', {bankverbindung_id}); + }, + + //------------- contact.js----------- + getKontakte (url, config, params){ + return this.$fhcApi.get('api/frontend/v1/stv/kontakt/getKontakte/' + params.id); + }, + addNewContact(id, data) { + return this.$fhcApi.post('api/frontend/v1/stv/kontakt/addNewContact/' + id, + data + ); + }, + loadContact(kontakt_id){ + return this.$fhcApi.post('api/frontend/v1/stv/kontakt/loadContact/', {kontakt_id}); + }, + updateContact(kontakt_id, data) { + return this.$fhcApi.post('api/frontend/v1/stv/kontakt/updateContact/' + kontakt_id, + data + ); + }, + deleteContact(kontakt_id) { + return this.$fhcApi.post('api/frontend/v1/stv/kontakt/deleteContact/', {kontakt_id}); + }, + getStandorteByFirma(searchString){ + return this.$fhcApi.get('api/frontend/v1/stv/kontakt/getStandorteByFirma/' + searchString); + }, + getKontakttypen(){ + return this.$fhcApi.get('api/frontend/v1/stv/kontakt/getKontakttypen/'); + } +}; \ No newline at end of file diff --git a/public/js/api/stv/prestudent.js b/public/js/api/stv/prestudent.js new file mode 100644 index 000000000..b58f8eda1 --- /dev/null +++ b/public/js/api/stv/prestudent.js @@ -0,0 +1,84 @@ +export default { + +//------------- Prestudent.js------------------------------------------------------ + + get(prestudent_id){ + return this.$fhcApi.post('api/frontend/v1/stv/prestudent/get/' + prestudent_id); + }, + updatePrestudent(prestudent_id, data){ + return this.$fhcApi.post('api/frontend/v1/stv/prestudent/updatePrestudent/' + prestudent_id, + data + ); + }, + getBezeichnungZGV() { + return this.$fhcApi.get('api/frontend/v1/stv/prestudent/getBezeichnungZGV/'); + }, + getBezeichnungMZgv() { + return this.$fhcApi.get('api/frontend/v1/stv/prestudent/getBezeichnungMZgv/'); + }, + getBezeichnungDZgv() { + return this.$fhcApi.get('api/frontend/v1/stv/prestudent/getBezeichnungDZgv/'); + }, + getStgs() { + return this.$fhcApi.get('api/frontend/v1/stv/lists/getStgs/'); + }, + getAusbildung() { + return this.$fhcApi.get('api/frontend/v1/stv/prestudent/getAusbildung/'); + }, + getAufmerksamdurch() { + return this.$fhcApi.get('api/frontend/v1/stv/prestudent/getAufmerksamdurch/'); + }, + getBerufstaetigkeit() { + return this.$fhcApi.get('api/frontend/v1/stv/prestudent/getBerufstaetigkeit/'); + }, + getTypenStg() { + return this.$fhcApi.get('api/frontend/v1/stv/prestudent/getTypenStg/'); + }, + getBisstandort() { + return this.$fhcApi.get('api/frontend/v1/stv/prestudent/getBisstandort/'); + }, + +//------------- 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({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({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({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/'); + }, + +//------------- History.js------------------------------------------------------ + getHistoryPrestudents (url, config, params){ + return this.$fhcApi.get('api/frontend/v1/stv/prestudent/getHistoryPrestudents/' + params.id); + }, + +} \ No newline at end of file diff --git a/public/js/api/stv/status.js b/public/js/api/stv/status.js new file mode 100644 index 000000000..a2a143f65 --- /dev/null +++ b/public/js/api/stv/status.js @@ -0,0 +1,59 @@ +export default { + +//------------- Modal.js------------------------------------------------------ + + insertStatus(id, data) { + return this.$fhcApi.post('api/frontend/v1/stv/status/insertStatus/' + id, + data + ); + }, + 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({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); + }, + getStudiengang(prestudent_id) { + return this.$fhcApi.get('api/frontend/v1/stv/prestudent/getStudiengang/' + prestudent_id); + }, + getStatusgruende() { + return this.$fhcApi.get('api/frontend/v1/stv/status/getStatusgruende/'); + }, + getStati() { + return this.$fhcApi.get('api/frontend/v1/stv/lists/getStati/'); + }, + +//------------- Dropdown.js------------------------------------------------------ + + addStudent(id, data) { + return this.$fhcApi.post('api/frontend/v1/stv/status/addStudent/' + id, + data, + {errorHeader: id} + ); + }, + changeStatus(id, data) { + return this.$fhcApi.post('api/frontend/v1/stv/status/changeStatus/' + id, + data, + {errorHeader: id} + ); + }, + getStatusarray() { + return this.$fhcApi.get('api/frontend/v1/stv/status/getStatusarray/'); + } +} \ No newline at end of file diff --git a/public/js/components/Betriebsmittel/Betriebsmittel.js b/public/js/components/Betriebsmittel/Betriebsmittel.js index a3acb6673..6e91df0fb 100644 --- a/public/js/components/Betriebsmittel/Betriebsmittel.js +++ b/public/js/components/Betriebsmittel/Betriebsmittel.js @@ -66,7 +66,7 @@ export default { let button = document.createElement('button'); button.className = 'btn btn-outline-secondary btn-action'; button.innerHTML = ''; - button.title = 'Übernahmebestätigung drucken'; + button.title = this.$p.t('betriebsmittel', 'btn_printUebernahmebestaetigung'); let cellData = cell.getData(); button.addEventListener( 'click', @@ -82,7 +82,7 @@ export default { button = document.createElement('button'); button.className = 'btn btn-outline-secondary btn-action'; button.innerHTML = ''; - button.title = 'Betriebsmittel bearbeiten'; + button.title = this.$p.t('betriebsmittel', 'btn_editBetriebsmittel'); button.addEventListener( 'click', (event) => @@ -93,7 +93,7 @@ export default { button = document.createElement('button'); button.className = 'btn btn-outline-secondary btn-action'; button.innerHTML = ''; - button.title = 'Betriebsmittel löschen'; + button.title = this.$p.t('betriebsmittel', 'btn_deleteBetriebsmittel'); button.addEventListener( 'click', () => @@ -117,26 +117,43 @@ export default { event: 'tableBuilt', handler: async() => { - await this.$p.loadCategory(['wawi', 'global', 'infocenter']); + await this.$p.loadCategory(['wawi', 'global', 'infocenter', 'betriebsmittel', 'person']); let cm = this.$refs.table.tabulator.columnManager; cm.getColumnByField('nummer').component.updateDefinition({ title: this.$p.t('wawi', 'nummer') }); + cm.getColumnByField('betriebsmitteltyp').component.updateDefinition({ + title: this.$p.t('global', 'typ') + }); cm.getColumnByField('anmerkung').component.updateDefinition({ title: this.$p.t('global', 'anmerkung') }); cm.getColumnByField('format_retour').component.updateDefinition({ title: this.$p.t('wawi', 'retourdatum') }); + cm.getColumnByField('beschreibung').component.updateDefinition({ + title: this.$p.t('global', 'beschreibung') + }); cm.getColumnByField('kaution').component.updateDefinition({ title: this.$p.t('infocenter', 'kaution') }); 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') + }); } } ], @@ -261,7 +278,7 @@ export default { :side-menu="false" reload new-btn-show - new-btn-label="Betriebsmittel" + :new-btn-label="this.$p.t('ui', 'betriebsmittel')" @click:new="actionNewBetriebsmittel" > @@ -278,7 +295,7 @@ export default {
Notiz wirklich löschen?
- - - - - -Notiz wirklich löschen?
- - - - - -{{$p.t('notiz','notiz_new')}} [{{notizData.typeId}}]
{{$p.t('notiz','notiz_edit')}} [{{notizData.typeId}}]
@@ -883,19 +878,29 @@ export default {Notiz wirklich löschen?
- - - - - -