From 898f40e8a5afacda8abdada3b0a6a539d804c8f3 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Fri, 9 Feb 2024 12:14:14 +0100 Subject: [PATCH] hidden fields ZGV depending on Config entries --- application/config/stv.php | 0 application/views/Studentenverwaltung.php | 10 ++++++- .../js/components/Stv/Studentenverwaltung.js | 2 ++ .../Studentenverwaltung/Details/Prestudent.js | 29 ++++++++++--------- 4 files changed, 26 insertions(+), 15 deletions(-) delete mode 100644 application/config/stv.php diff --git a/application/config/stv.php b/application/config/stv.php deleted file mode 100644 index e69de29bb..000000000 diff --git a/application/views/Studentenverwaltung.php b/application/views/Studentenverwaltung.php index 01b616397..54354578e 100644 --- a/application/views/Studentenverwaltung.php +++ b/application/views/Studentenverwaltung.php @@ -31,6 +31,14 @@ $this->load->view('templates/FHC-Header', $includesArray); ?> + !defined('GENERATE_ALIAS_STUDENT') ? true : GENERATE_ALIAS_STUDENT, + 'showZgvDoktor' => !defined('ZGV_DOKTOR_ANZEIGEN') ? true : ZGV_DOKTOR_ANZEIGEN, + 'showZgvErfuellt' => !defined('ZGV_ERFUELLT_ANZEIGEN') ? true : ZGV_ERFUELLT_ANZEIGEN +]; +?> +
diff --git a/public/js/components/Stv/Studentenverwaltung.js b/public/js/components/Stv/Studentenverwaltung.js index 908a98ae3..e097dc92e 100644 --- a/public/js/components/Stv/Studentenverwaltung.js +++ b/public/js/components/Stv/Studentenverwaltung.js @@ -46,6 +46,8 @@ export default { cisRoot: this.cisRoot, activeAddonBewerbung: this.activeAddons.split(';').includes('bewerbung'), configGenerateAlias: this.config.generateAlias, + configShowZgvDoktor: this.config.showZgvDoktor, + configShowZgvErfuellt: this.config.showZgvErfuellt, hasBpkPermission: this.permissions['student/bpk'], hasAliasPermission: this.permissions['student/alias'], lists: this.lists diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Prestudent.js b/public/js/components/Stv/Studentenverwaltung/Details/Prestudent.js index 7c79bf6b2..e27cf3a14 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Prestudent.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Prestudent.js @@ -11,14 +11,21 @@ export default { inject: { lists: { from: 'lists' - } + }, + showZgvErfuellt: { + from: 'configShowZgvErfuellt', + default: false + }, + showZgvDoktor: { + from: 'configShowZgvDoktor', + default: false + }, }, props: { modelValue: Object }, data(){ return { - config: {}, data: [], listZgvs: [], listZgvsmaster: [], @@ -158,15 +165,7 @@ export default { }) .catch(this.$fhcAlert.handleSystemError); }, - mounted(){ - fetch('config/stv') - .then(result => result.json()) - .then(result => { - this.config = result; - console.log('Konfiguration geladen:', this.config); - }) - .catch(error => console.error('Fehler beim Laden der Konfiguration:', error)); - }, + mounted(){}, template: `
@@ -284,7 +283,7 @@ export default {
-
+
-
+
-
+

+ + {{showZgvDoktor}} || {{generateAlias}} || {{showZgvErfuellt}}