From e659e8e12cf7cd7f2311e37b72cde155f0ede50b Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Thu, 3 Jul 2025 15:30:02 +0200 Subject: [PATCH] update(Profil Tabulator Columns):preloads phrasen for the tabulator tables, otherwise the column titles are not displayed --- .../Cis/Profil/MitarbeiterProfil.js | 52 ++++++++++++------- .../Cis/Profil/MitarbeiterViewProfil.js | 18 +++++-- .../js/components/Cis/Profil/StudentProfil.js | 42 +++++++++------ 3 files changed, 73 insertions(+), 39 deletions(-) diff --git a/public/js/components/Cis/Profil/MitarbeiterProfil.js b/public/js/components/Cis/Profil/MitarbeiterProfil.js index 0bb628e19..840cdefc1 100644 --- a/public/js/components/Cis/Profil/MitarbeiterProfil.js +++ b/public/js/components/Cis/Profil/MitarbeiterProfil.js @@ -33,7 +33,7 @@ export default { return { showModal: false, editDataFilter: null, - + preloadedPhrasen:{}, // tabulator options funktionen_table_options: { persistenceID: "filterTableMaProfilFunktionen", @@ -58,21 +58,21 @@ export default { visible: true }, { - title: Vue.computed(() => this.$p.t('ui/bezeichnung')), + title: Vue.computed(() => this.preloadedPhrasen.bezeichnungPhrase), field: "Bezeichnung", headerFilter: true, minWidth: 200, visible: true }, { - title: Vue.computed(() => this.$p.t('lehre/organisationseinheit')), + title: Vue.computed(() => this.preloadedPhrasen.organisationseinheitPhrase), field: "Organisationseinheit", headerFilter: true, minWidth: 200, visible: true }, { - title: Vue.computed(() => this.$p.t('global/gueltigVon')), + title: Vue.computed(() => this.preloadedPhrasen.gueltigVonPhrase), field: "Gültig_von", headerFilter: true, resizable: true, @@ -80,7 +80,7 @@ export default { visible: true }, { - title: Vue.computed(() => this.$p.t('global/gueltigBis')), + title: Vue.computed(() => this.preloadedPhrasen.gueltigBisPhrase), field: "Gültig_bis", headerFilter: true, resizable: true, @@ -88,7 +88,7 @@ export default { visible: true }, { - title: Vue.computed(() => this.$p.t('profil/wochenstunden')), + title: Vue.computed(() => this.preloadedPhrasen.wochenstundenPhrase), field: "Wochenstunden", headerFilter: true, minWidth: 200, @@ -121,14 +121,14 @@ export default { visible: true }, { - title: Vue.computed(() => this.$p.t('profil/entlehnteBetriebsmittel')), + title: Vue.computed(() => this.preloadedPhrasen.entlehnteBetriebsmittelPhrase), field: "betriebsmittel", headerFilter: true, minWidth: 200, visible: true }, { - title: Vue.computed(() => this.$p.t('profil/inventarnummer')), + title: Vue.computed(() => this.preloadedPhrasen.inventarnummerPhrase), field: "Nummer", headerFilter: true, resizable: true, @@ -136,7 +136,7 @@ export default { visible: true }, { - title: Vue.computed(() => this.$p.t('profil/ausgabedatum')), + title: Vue.computed(() => this.preloadedPhrasen.ausgabedatumPhrase), field: "Ausgegeben_am", headerFilter: true, minWidth: 200, @@ -283,6 +283,18 @@ export default { }, created() { + // preload phrasen + this.$p.loadCategory(["ui","lehre","global","profil"]).then(() => { + this.preloadedPhrasen.bezeichnungPhrase = this.$p.t('ui/bezeichnung'); + this.preloadedPhrasen.organisationseinheitPhrase = this.$p.t('lehre/organisationseinheit'); + this.preloadedPhrasen.gueltigVonPhrase = this.$p.t('global/gueltigVon'); + this.preloadedPhrasen.gueltigBisPhrase = this.$p.t('global/gueltigBis'); + this.preloadedPhrasen.wochenstundenPhrase = this.$p.t('profil/wochenstunden'); + this.preloadedPhrasen.entlehnteBetriebsmittelPhrase = this.$p.t('profil/entlehnteBetriebsmittel'); + this.preloadedPhrasen.inventarnummerPhrase = this.$p.t('profil/inventarnummer'); + this.preloadedPhrasen.ausgabedatumPhrase = this.$p.t('profil/ausgabedatum'); + this.preloadedPhrasen.loaded=true; + }); //? sorts the profil Updates: pending -> accepted -> rejected this.data.profilUpdates?.sort(this.sortProfilUpdates); @@ -298,7 +310,7 @@ export default { this.setTableColumnTitles() } }, - template: /*html*/ ` + template: /*html*/ `
@@ -306,7 +318,7 @@ export default { @@ -324,7 +336,7 @@ export default {
- +
@@ -334,7 +346,7 @@ export default {
- +
@@ -411,18 +423,20 @@ export default {
-
- { + this.preloadedPhrasen.bezeichnungPhrase = this.$p.t('ui/bezeichnung'); + this.preloadedPhrasen.organisationseinheitPhrase = this.$p.t('lehre/organisationseinheit'); + this.preloadedPhrasen.gueltigVonPhrase = this.$p.t('global/gueltigVon'); + this.preloadedPhrasen.gueltigBisPhrase = this.$p.t('global/gueltigBis'); + this.preloadedPhrasen.wochenstundenPhrase = this.$p.t('profil/wochenstunden'); + this.preloadedPhrasen.loaded = true; + }); + }, template: /*html*/ ` @@ -175,9 +185,9 @@ export default { @@ -223,7 +233,7 @@ export default {
- +
diff --git a/public/js/components/Cis/Profil/StudentProfil.js b/public/js/components/Cis/Profil/StudentProfil.js index 2c0d5ba2b..5d9b441e0 100644 --- a/public/js/components/Cis/Profil/StudentProfil.js +++ b/public/js/components/Cis/Profil/StudentProfil.js @@ -32,7 +32,7 @@ export default { showModal: false, collapseIconBetriebsmittel: true, editDataFilter: null, - + preloadedPhrasen:{}, // tabulator options zutrittsgruppen_table_options: { persistenceID: "filterTableStudentProfilZutrittsgruppen", @@ -42,7 +42,7 @@ export default { height: 200, layout: "fitColumns", columns: [{ - title: Vue.computed(() => this.$p.t('profil/zutrittsGruppen')), + title: Vue.computed(() => this.preloadedPhrasen.zutrittsGruppenPhrase), field: "bezeichnung" }], }, @@ -68,14 +68,14 @@ export default { headerClick: this.collapseFunction, }, { - title: Vue.computed(() => this.$p.t('profil/entlehnteBetriebsmittel')), + title: Vue.computed(()=>this.preloadedPhrasen.entlehnteBetriebsmittelPhrase), field: "betriebsmittel", headerFilter: true, minWidth: 200, visible: true }, { - title: Vue.computed(() => this.$p.t('profil/inventarnummer')), + title: Vue.computed(() =>this.preloadedPhrasen.inventarnummerPhrase) , field: "Nummer", headerFilter: true, resizable: true, @@ -83,7 +83,7 @@ export default { visible: true }, { - title: Vue.computed(() => this.$p.t('profil/ausgabedatum')), + title: Vue.computed(() =>this.preloadedPhrasen.ausgabedatum) , field: "Ausgegeben_am", headerFilter: true, minWidth: 200, @@ -231,6 +231,14 @@ export default { }, }, created() { + // preload phrasen + this.$p.loadCategory('profil').then(() => { + this.preloadedPhrasen.zutrittsGruppenPhrase = this.$p.t('profil/zutrittsGruppen'); + this.preloadedPhrasen.entlehnteBetriebsmittelPhrase = this.$p.t('profil/entlehnteBetriebsmittel'); + this.preloadedPhrasen.inventarnummerPhrase = this.$p.t('profil/inventarnummer'); + this.preloadedPhrasen.ausgabedatum = this.$p.t('profil/ausgabedatum'); + this.preloadedPhrasen.loaded = true; + }); //? sorts the profil Updates: pending -> accepted -> rejected this.data.profilUpdates?.sort(this.sortProfilUpdates); }, @@ -294,7 +302,7 @@ export default {
-
+
@@ -329,7 +337,7 @@ export default {
- +
@@ -347,7 +355,7 @@ export default {
- +
@@ -359,16 +367,18 @@ export default {
- -
+
-