From ab3c63103055ec787a4ecc7821746bc136c56189 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Tue, 2 Apr 2024 09:22:59 +0200 Subject: [PATCH] update Phrases Status --- .../api/frontend/v1/stv/Status.php | 8 ++-- .../Studentenverwaltung/Details/Prestudent.js | 2 +- .../Details/Prestudent/Status.js | 14 +++---- system/phrasesupdate.php | 39 ++++++++++++++++++- 4 files changed, 50 insertions(+), 13 deletions(-) diff --git a/application/controllers/api/frontend/v1/stv/Status.php b/application/controllers/api/frontend/v1/stv/Status.php index 00602cf95..2f6f9aa6d 100644 --- a/application/controllers/api/frontend/v1/stv/Status.php +++ b/application/controllers/api/frontend/v1/stv/Status.php @@ -26,7 +26,7 @@ class Status extends FHCAPI_Controller // Load language phrases $this->loadPhrases([ - 'ui', 'bismeldestichtag','lehre' + 'ui', 'bismeldestichtag','lehre','studierendenantrag' ]); } @@ -659,7 +659,7 @@ class Status extends FHCAPI_Controller } if (!hasData($result)) { - return $this->terminateWithError($this->p->t('studierendenantrag','error_no_student_for_prestudent'), self::ERROR_TYPE_GENERAL); + return $this->terminateWithError($this->p->t('studierendenantrag','error_no_student_for_prestudent',['prestudent_id' => $prestudent_id]), self::ERROR_TYPE_GENERAL); } $student_uid = $result->retval; @@ -1070,7 +1070,7 @@ class Status extends FHCAPI_Controller } if (!hasData($result)) { - $this->terminateWithError($this->p->t('lehre','error_no_student_for_prestudent'), self::ERROR_TYPE_GENERAL); + $this->terminateWithError($this->p->t('studierendenantrag','error_no_student_for_prestudent',['prestudent_id' => $prestudent_id]), self::ERROR_TYPE_GENERAL); } $student_uid = $result->retval; @@ -1236,7 +1236,7 @@ class Status extends FHCAPI_Controller } if (!hasData($result)) { - $this->terminateWithError($this->p->t('lehre','error_no_student_for_prestudent'), self::ERROR_TYPE_GENERAL); + $this->terminateWithError($this->p->t('studierendenantrag','error_no_student_for_prestudent', ['prestudent_id' => $prestudent_id]), self::ERROR_TYPE_GENERAL); } $student_uid = $result->retval; diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Prestudent.js b/public/js/components/Stv/Studentenverwaltung/Details/Prestudent.js index 351902339..3d723a570 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Prestudent.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Prestudent.js @@ -103,7 +103,7 @@ export default { this.$refs.form .post('api/frontend/v1/stv/prestudent/updatePrestudent/' + this.modelValue.prestudent_id, this.deltaArray) .then(response => { - this.$fhcAlert.alertSuccess('Speichern erfolgreich'); + this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave')); this.deltaArray = []; this.actionUpdate = false; }) diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/Status.js b/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/Status.js index cf4f7728a..1538ad9aa 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/Status.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/Status.js @@ -299,7 +299,7 @@ export default{ this.$fhcApi.post('api/frontend/v1/stv/status/addNewStatus/' + this.prestudent_id, this.statusData ).then(response => { - this.$fhcAlert.alertSuccess('Speichern erfolgreich'); + this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave')); this.hideModal('newStatusModal'); this.resetModal(); }).catch(this.$fhcAlert.handleSystemError) @@ -316,7 +316,7 @@ export default{ this.statusId.ausbildungssemester) .then( result => { - this.$fhcAlert.alertSuccess('Vorrückung Status erfolgreich'); + this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successAdvance')); }) .catch(this.$fhcAlert.handleSystemError) .finally(() => { @@ -332,7 +332,7 @@ export default{ this.statusId.ausbildungssemester) .then( result => { - this.$fhcAlert.alertSuccess('Bestätigung Status erfolgreich'); + this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successConfirm')); }) .catch(this.$fhcAlert.handleSystemError) .finally(() => { @@ -345,7 +345,7 @@ export default{ status_id) .then( result => { - this.$fhcAlert.alertSuccess('Löschen erfolgreich'); + this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successDelete')); this.hideModal('deleteStatusModal'); this.resetModal(); }) @@ -364,9 +364,9 @@ export default{ this.statusData) .then( result => { - this.$fhcAlert.alertSuccess('Bearbeitung Status erfolgreich'); - this.hideModal('editStatusModal'); - this.resetModal(); + this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave')); + this.hideModal('editStatusModal'); + this.resetModal(); }) .catch(this.$fhcAlert.handleSystemError) .finally(() => { diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 2e82a250a..b0da7a7c5 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -26247,7 +26247,44 @@ array( ) ) ), - + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'successAdvance', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Vorrückung Status erfolgreich', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Advance status successful', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'successConfirm', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Bestätigung Status erfolgreich', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Confirmation status successful', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), );