From 03ad3116f720c401f1be15e71f1fc74037d789cd Mon Sep 17 00:00:00 2001 From: ma0068 Date: Fri, 10 Jan 2025 07:16:56 +0100 Subject: [PATCH] temp formular --- .../api/frontend/v1/stv/Mobility.php | 16 +- public/js/api/stv/mobility.js | 3 + .../Details/Mobility/Mobility.js | 510 +++++++----------- system/phrasesupdate.php | 162 +++++- 4 files changed, 359 insertions(+), 332 deletions(-) diff --git a/application/controllers/api/frontend/v1/stv/Mobility.php b/application/controllers/api/frontend/v1/stv/Mobility.php index db2ee1486..fa1a62e77 100644 --- a/application/controllers/api/frontend/v1/stv/Mobility.php +++ b/application/controllers/api/frontend/v1/stv/Mobility.php @@ -14,7 +14,7 @@ class Mobility extends FHCAPI_Controller 'insertMobility' => ['admin:rw', 'assistenz:rw'], 'updateMobility' => ['admin:rw', 'assistenz:rw'], 'deleteMobility' => ['admin:rw', 'assistenz:rw'], - 'getTypenMobility' => ['admin:rw', 'assistenz:rw'], + 'getProgramsMobility' => ['admin:rw', 'assistenz:rw'], ]); // Load Libraries @@ -32,7 +32,10 @@ class Mobility extends FHCAPI_Controller public function getMobilitaeten($student_uid) { - // $this->BisioModel->addJoin('bis.tbl_Bisiosprogramm mp', 'ON (mp.Bisiosprogramm_code = bis.tbl_Bisio.Bisiosprogramm_code)', 'LEFT'); + $this->BisioModel->addSelect("*"); + $this->BisioModel->addSelect("TO_CHAR( tbl_bisio.von::timestamp, 'DD.MM.YYYY') AS format_von"); + $this->BisioModel->addSelect("TO_CHAR( tbl_bisio.bis::timestamp, 'DD.MM.YYYY') AS format_bis"); + $this->BisioModel->addJoin('bis.tbl_mobilitaetsprogramm mp', 'ON (mp.mobilitaetsprogramm_code = bis.tbl_bisio.mobilitaetsprogramm_code)', 'LEFT'); $result = $this->BisioModel->loadWhere( array('student_uid' => $student_uid) @@ -41,7 +44,16 @@ class Mobility extends FHCAPI_Controller $data = $this->getDataOrTerminateWithError($result); $this->terminateWithSuccess($data); + } + public function getProgramsMobility() + { + $this->load->model('codex/Mobilitaetsprogramm_model', 'MobilitaetsprogrammModel'); + + $result = $this->MobilitaetsprogrammModel->load(); + $data = $this->getDataOrTerminateWithError($result); + + $this->terminateWithSuccess($data); } } diff --git a/public/js/api/stv/mobility.js b/public/js/api/stv/mobility.js index 0aee23fb6..d749f58f3 100644 --- a/public/js/api/stv/mobility.js +++ b/public/js/api/stv/mobility.js @@ -2,4 +2,7 @@ export default { getMobilitaeten (url, config, params){ return this.$fhcApi.get('api/frontend/v1/stv/mobility/getMobilitaeten/' + params.id); }, + getProgramsMobility(){ + return this.$fhcApi.get('api/frontend/v1/stv/mobility/getProgramsMobility/'); + }, } \ No newline at end of file diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Mobility/Mobility.js b/public/js/components/Stv/Studentenverwaltung/Details/Mobility/Mobility.js index 26a41ec3e..a70897e32 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Mobility/Mobility.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Mobility/Mobility.js @@ -14,6 +14,9 @@ export default { $reloadList: { from: '$reloadList', required: true + }, + lists: { + from: 'lists' } }, props: { @@ -26,15 +29,15 @@ export default { ajaxRequestFunc: this.$fhcApi.factory.stv.mobility.getMobilitaeten, ajaxParams: () => { return { - id: this.student.student_uid + id: this.student.uid }; }, ajaxResponse: (url, params, response) => response.data, columns: [ {title: "Kurzbz", field: "kurzbz"}, {title: "Nation", field: "nation_code"}, - {title: "Von", field: "von"}, - {title: "Bis", field: "bis"}, + {title: "Von", field: "format_von"}, + {title: "Bis", field: "format_bis"}, {title: "bisio_id", field: "bisio_id"}, { title: 'Aktionen', field: 'actions', @@ -48,7 +51,7 @@ export default { button.innerHTML = ''; button.title = this.$p.t('ui', 'bearbeiten'); button.addEventListener('click', (event) => - this.actionEditmobility(cell.getData().mobility_id) + this.actionEditMobility(cell.getData().mobility_id) ); container.append(button); @@ -57,7 +60,7 @@ export default { button.innerHTML = ''; button.title = this.$p.t('ui', 'loeschen'); button.addEventListener('click', () => - this.actionDeletemobility(cell.getData().mobility_id) + this.actionDeleteMobility(cell.getData().mobility_id) ); container.append(button); @@ -69,7 +72,6 @@ export default { layout: 'fitDataFill', layoutColumnsOnNewData: false, height: 'auto', - minHeight: '200', selectable: true, index: 'mobility_id', persistenceID: 'stv-details-table_mobiliy' @@ -131,8 +133,14 @@ export default { } ], formData: { + von: new Date(), + bis: new Date(), + mobilitaetsprogramm: 7, + gastnation: 'A', + herkunftsland: 'A', }, statusNew: true, + programsMobility: [], } }, watch: { @@ -149,17 +157,17 @@ export default { .then(result => this.stgTyp = result.data) .catch(this.$fhcAlert.handleSystemError); }, - actionNewmobility() { + actionNewMobility() { this.resetForm(); this.statusNew = true; - this.setDefaultFormData(); + //this.setDefaultFormData(); }, - actionEditmobility(mobility_id) { + actionEditMobility(mobility_id) { this.resetForm(); this.statusNew = false; - this.loadmobility(mobility_id); + this.loadMobility(mobility_id); }, - actionDeletemobility(mobility_id) { + actionDeleteMobility(mobility_id) { this.$fhcAlert .confirmDelete() .then(result => result @@ -168,7 +176,7 @@ export default { .then(this.deletemobility) .catch(this.$fhcAlert.handleSystemError); }, - addNewmobility() { + addNewMobility() { const dataToSend = { uid: this.student.uid, formData: this.formData @@ -187,7 +195,7 @@ export default { reload() { this.$refs.table.reloadTable(); }, - loadmobility(mobility_id) { + loadMobility(mobility_id) { return this.$fhcApi.factory.stv.mobility.loadmobility(mobility_id) .then(result => { this.formData = result.data; @@ -197,7 +205,7 @@ export default { }) .catch(this.$fhcAlert.handleSystemError); }, - updatemobility(mobility_id) { + updateMobility(mobility_id) { const dataToSend = { id: mobility_id, formData: this.formData @@ -212,7 +220,7 @@ export default { this.reload(); }); }, - deletemobility(mobility_id) { + deleteMobility(mobility_id) { return this.$fhcApi.factory.stv.mobility.deletemobility(mobility_id) .then(response => { this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successDelete')); @@ -227,44 +235,17 @@ export default { }, }, created() { - // this.$fhcApi.factory.stv.mobility.getTypenmobility() - // .then(result => { - // this.arrTypen = result.data; - // }) - // .catch(this.$fhcAlert.handleSystemError); - // this.$fhcApi.factory.stv.mobility.getTypenAntritte() - // .then(result => { - // this.arrAntritte = result.data; - // }) - // .catch(this.$fhcAlert.handleSystemError); - // this.$fhcApi.factory.stv.mobility.getBeurteilungen() - // .then(result => { - // this.arrBeurteilungen = result.data; - // }) - // .catch(this.$fhcAlert.handleSystemError); - // this.$fhcApi.factory.stv.mobility.getNoten() - // .then(result => { - // this.arrNoten = result.data; - // }) - // .catch(this.$fhcAlert.handleSystemError); - // this.$fhcApi.factory.stv.mobility.getAkadGrade(this.student.studiengang_kz) - // .then(result => { - // this.arrAkadGrad = result.data; - // }) - // .catch(this.$fhcAlert.handleSystemError); - // if (!this.student.length) { - // this.$fhcApi.factory.stv.mobility.getTypStudiengang(this.student.studiengang_kz) - // .then(result => { - // this.stgTyp = result.data; - // this.setDefaultFormData(); - // }) - // .catch(this.$fhcAlert.handleSystemError); - // } else - // this.getStudiengangsTyp(); + this.$fhcApi.factory.stv.mobility.getProgramsMobility() + .then(result => { + this.programsMobility = result.data; + }) + .catch(this.$fhcAlert.handleSystemError); }, template: `

In/out

+ + {{formData}} - -
- +
- - - -
- -
- - - - - -
- -
- - - - - - - -
- -
- - - - - -
- -
- +
- +
+ + + +
+ +
+ + + + + + +
+ +
+ + + + + +
- -
-
-

{{$p.t('mobility', 'zurBeurteilung')}}

-
- + +
+ + + +
- - -
--> + + +
diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 038bb5de5..a1847f679 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -37299,7 +37299,167 @@ array( ) ) ), - // FHC4 Phrases Mobility Start + array( + 'app' => 'core', + 'category' => 'mobility', + 'phrase' => 'mobilitaetsprogramm', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Mobilitätsprogramm', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Mobility program', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'mobility', + 'phrase' => 'gastnation', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Gastnation', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Host nation', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'mobility', + 'phrase' => 'herkunftsland', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Herkunftsland', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Country of origin', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'mobility', + 'phrase' => 'universitaet', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Universität', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'University', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'mobility', + 'phrase' => 'ects_erworben', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Erworbene ECTS', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'ECTS acquired', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'mobility', + 'phrase' => 'ects_angerechnet', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Angerechnete ECTS', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'ECTS credited', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'mobility', + 'phrase' => 'zweck', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Zweck', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Purpose', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'mobility', + 'phrase' => 'aufenthalt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Aufenthalt Förderung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Residency funding', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + // FHC4 Phrases Mobility End );