From a507533f4008c526a991a127779cbfef773658f2 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Thu, 6 Feb 2025 16:23:42 +0100 Subject: [PATCH] use getStudiengangByKz to get stgtyp and stg_oe_kurzbz for checking showallformats permission, add and use phrase notekommpruefung --- .../Abschlusspruefung/Abschlusspruefung.js | 38 ++++++++++--------- system/phrasesupdate.php | 20 ++++++++++ 2 files changed, 40 insertions(+), 18 deletions(-) diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Abschlusspruefung/Abschlusspruefung.js b/public/js/components/Stv/Studentenverwaltung/Details/Abschlusspruefung/Abschlusspruefung.js index cf573deb0..fdebacaec 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Abschlusspruefung/Abschlusspruefung.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Abschlusspruefung/Abschlusspruefung.js @@ -49,6 +49,9 @@ export default { }, stg_kz(){ return this.studentKzs[0]; + }, + showAllFormats() { + return this.isBerechtigtDocAndOdt.includes(this.stgInfo.oe_kurzbz); } }, props: { @@ -214,8 +217,7 @@ export default { mitarbeiter: null, pruefer: null }, - stgTyp: null, - stgKz: null, + stgInfo: { typ: '', oe_kurzbz: '' } } }, watch: { @@ -223,14 +225,14 @@ export default { if (this.$refs.table) { this.$refs.table.reloadTable(); } - this.getStudiengangsTyp(); + this.getStudiengangByKz(); } }, methods: { - getStudiengangsTyp(){ - this.stgTyp = ''; - this.$fhcApi.factory.stv.abschlusspruefung.getTypStudiengang(this.stg_kz) - .then(result => this.stgTyp = result.data) + getStudiengangByKz(){ + this.stgInfo = { typ: '', oe_kurzbz: '' }; + this.$fhcApi.factory.studiengang.getStudiengangByKz(this.stg_kz) + .then(result => this.stgInfo = result.data) .catch(this.$fhcAlert.handleSystemError); }, actionNewAbschlusspruefung() { @@ -352,17 +354,17 @@ export default { this.resetForm(); //TODO(Manu) test with uid in browser //check lg: if no prüfungsnotizen - if (this.stgTyp === 'b') { - // if (this.stgTyp === 'b' || this.formData.pruefungstyp_kurzbz == 'Bachelor') { + if (this.stgInfo.typ === 'b') { + // if (this.stgInfo.typ === 'b' || this.formData.pruefungstyp_kurzbz == 'Bachelor') { this.formData.pruefungstyp_kurzbz = 'Bachelor'; this.formData.protokoll = this.$p.t('abschlusspruefung', 'pruefungsnotizenMaster'); } - if (this.stgTyp === 'd' || this.stgTyp === 'm') { + if (this.stgInfo.typ === 'd' || this.stgInfo === 'm') { this.formData.pruefungstyp_kurzbz = 'Diplom'; this.formData.protokoll = this.$p.t('abschlusspruefung', 'pruefungsnotizenMaster'); } - if (this.stgTyp === 'lg') { + if (this.stgInfo.typ === 'lg') { this.formData.pruefungstyp_kurzbz = 'lgabschluss'; } @@ -401,14 +403,14 @@ export default { }) .catch(this.$fhcAlert.handleSystemError); if (!this.student.length) { - this.$fhcApi.factory.stv.abschlusspruefung.getTypStudiengang(this.student.studiengang_kz) + this.$fhcApi.factory.studiengang.getStudiengangByKz(this.student.studiengang_kz) .then(result => { - this.stgTyp = result.data; + this.stgInfo = result.data; this.setDefaultFormData(); }) .catch(this.$fhcAlert.handleSystemError); } else - this.getStudiengangsTyp(); + this.getStudiengangByKz(); }, template: `
@@ -416,10 +418,10 @@ export default {
'core', + 'category' => 'abschlusspruefung', + 'phrase' => 'notekommpruefung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Note komm. Prüfung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Grade committee exam', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), // FHC4 Phrases Abschlusspruefung End array( 'app' => 'core',