From 2d5309f97d9d2d2fe8b2a5cd57e459f783555bc7 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Thu, 13 Feb 2025 12:06:41 +0100 Subject: [PATCH 1/8] fix invisible funktionen/betriebsmittel tabulator columns; fix phrasen roleInfo studentViewProfil; --- .../Cis/Profil/MitarbeiterProfil.js | 39 +++++++++++++------ .../Cis/Profil/MitarbeiterViewProfil.js | 15 +++---- .../js/components/Cis/Profil/StudentProfil.js | 11 ------ .../Cis/Profil/StudentViewProfil.js | 20 +++------- 4 files changed, 38 insertions(+), 47 deletions(-) diff --git a/public/js/components/Cis/Profil/MitarbeiterProfil.js b/public/js/components/Cis/Profil/MitarbeiterProfil.js index acae0cc5a..4b71b05c1 100644 --- a/public/js/components/Cis/Profil/MitarbeiterProfil.js +++ b/public/js/components/Cis/Profil/MitarbeiterProfil.js @@ -58,18 +58,21 @@ export default { formatter: "responsiveCollapse", maxWidth: 40, headerClick: this.collapseFunction, + visible: true }, { title: "Bezeichnung", field: "Bezeichnung", headerFilter: true, minWidth: 200, + visible: true }, { title: "Organisationseinheit", field: "Organisationseinheit", headerFilter: true, minWidth: 200, + visible: true }, { title: "Gültig_von", @@ -77,6 +80,7 @@ export default { headerFilter: true, resizable: true, minWidth: 200, + visible: true }, { title: "Gültig_bis", @@ -84,12 +88,14 @@ export default { headerFilter: true, resizable: true, minWidth: 200, + visible: true }, { title: "Wochenstunden", field: "Wochenstunden", headerFilter: true, minWidth: 200, + visible: true }, ], }, @@ -111,12 +117,14 @@ export default { formatter: "responsiveCollapse", maxWidth: 40, headerClick: this.collapseFunction, + visible: true }, { title: "Betriebsmittel", field: "betriebsmittel", headerFilter: true, minWidth: 200, + visible: true }, { title: "Nummer", @@ -124,15 +132,17 @@ export default { headerFilter: true, resizable: true, minWidth: 200, + visible: true }, { title: "Ausgegeben_am", field: "Ausgegeben_am", headerFilter: true, minWidth: 200, + visible: true }, ], - }, + } }; }, @@ -256,15 +266,6 @@ export default { value: this.data.ort_kurzbz } }; - - // return { - // [`${this.$p.t('profil', 'Geburtsdatum')}`]: this.data.gebdatum, - // [`${this.$p.t('profil', 'Geburtsort')}`]: this.data.gebort, - // [`${this.$p.t('profil', 'Kurzzeichen')}`]: this.data.kurzbz, - // [`${this.$p.t('profil', 'Telefon')}`]: - // (this.data.standort_telefon ? this.data.standort_telefon.kontakt + " " + this.data.telefonklappe : this.data.telefonklappe), - // [`${this.$p.t('profil', 'Büro')}`]: this.data.ort_kurzbz, - // }; }, }, @@ -390,11 +391,25 @@ export default {
- +
- +
diff --git a/public/js/components/Cis/Profil/MitarbeiterViewProfil.js b/public/js/components/Cis/Profil/MitarbeiterViewProfil.js index 07cb83402..81c875a6c 100644 --- a/public/js/components/Cis/Profil/MitarbeiterViewProfil.js +++ b/public/js/components/Cis/Profil/MitarbeiterViewProfil.js @@ -46,18 +46,21 @@ export default { formatter: "responsiveCollapse", maxWidth: 40, headerClick: this.collapseFunction, + visible: true }, { title: "Bezeichnung", field: "Bezeichnung", headerFilter: true, minWidth: 200, + visible: true }, { title: "Organisationseinheit", field: "Organisationseinheit", headerFilter: true, minWidth: 200, + visible: true }, { title: "Gültig_von", @@ -65,6 +68,7 @@ export default { headerFilter: true, resizable: true, minWidth: 200, + visible: true }, { title: "Gültig_bis", @@ -72,12 +76,14 @@ export default { headerFilter: true, resizable: true, minWidth: 200, + visible: true }, { title: "Wochenstunden", field: "Wochenstunden", headerFilter: true, minWidth: 200, + visible: true }, ], }, @@ -153,15 +159,6 @@ export default { value: this.data.ort_kurzbz } }; - - // return { - // [`${this.$p.t('profil', 'Geburtsdatum')}`]: this.data.gebdatum, - // [`${this.$p.t('profil', 'Geburtsort')}`]: this.data.gebort, - // [`${this.$p.t('profil', 'Kurzzeichen')}`]: this.data.kurzbz, - // [`${this.$p.t('profil', 'Telefon')}`]: - // (this.data.standort_telefon ? this.data.standort_telefon + " " + this.data.telefonklappe : this.data.telefonklappe), - // [`${this.$p.t('profil', 'Büro')}`]: this.data.ort_kurzbz, - // }; }, }, diff --git a/public/js/components/Cis/Profil/StudentProfil.js b/public/js/components/Cis/Profil/StudentProfil.js index 1c1f55997..5b4609e5f 100644 --- a/public/js/components/Cis/Profil/StudentProfil.js +++ b/public/js/components/Cis/Profil/StudentProfil.js @@ -206,17 +206,6 @@ export default { value: this.data.gruppe.trim() } }; - - // so nicht - // return { - // [`${this.$p.t('profil','Geburtsdatum')}`]: this.data.gebdatum, - // [`${this.$p.t('profil', 'Geburtsort')}`]: this.data.gebort, - // [`${this.$p.t('person', 'personenkennzeichen')}`]: this.data.personenkennzeichen, - // [`${this.$p.t('lehre', 'studiengang')}`]: this.data.studiengang, - // [`${this.$p.t('lehre', 'semester')}`]: this.data.semester, - // [`${this.$p.t('lehre', 'lehrverband')}`]: this.data.verband, - // [`${this.$p.t('lehre', 'gruppe')}`]: this.data.gruppe.trim(), - // }; }, }, created() { diff --git a/public/js/components/Cis/Profil/StudentViewProfil.js b/public/js/components/Cis/Profil/StudentViewProfil.js index b1e4479df..1c2044441 100644 --- a/public/js/components/Cis/Profil/StudentViewProfil.js +++ b/public/js/components/Cis/Profil/StudentViewProfil.js @@ -66,36 +66,26 @@ export default { value: this.data.gebort }, personenkennzeichen: { - label: `${this.$p.t('person','Geburtsort')}`, + label: `${this.$p.t('person','personenkennzeichen')}`, value: this.data.personenkennzeichen }, studiengang: { - label: `${this.$p.t('lehre','Geburtsort')}`, + label: `${this.$p.t('lehre','studiengang')}`, value: this.data.studiengang }, semester: { - label: `${this.$p.t('lehre','Geburtsort')}`, + label: `${this.$p.t('lehre','semester')}`, value: this.data.semester }, verband: { - label: `${this.$p.t('lehre','Geburtsort')}`, + label: `${this.$p.t('lehre','lehrverband')}`, value: this.data.verband }, gruppe: { - label: `${this.$p.t('lehre','Geburtsort')}`, + label: `${this.$p.t('lehre','gruppe')}`, value: this.data.gruppe.trim() } }; - - // return { - // Geburtsdatum: this.data.gebdatum, - // Geburtsort: this.data.gebort, - // Personenkennzeichen: this.data.personenkennzeichen, - // Studiengang: this.data.studiengang, - // Semester: this.data.semester, - // Verband: this.data.verband, - // Gruppe: this.data.gruppe.trim(), - // }; }, }, From 139a2f900ff73699fea75a2482d280e746fca7f6 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Thu, 13 Feb 2025 12:41:24 +0100 Subject: [PATCH 2/8] watch for changing betriebsmittel & funktionen data; wait for loaded viewData before rendering greeting; --- .../components/Cis/Profil/MitarbeiterProfil.js | 16 ++++++---------- .../Cis/Profil/MitarbeiterViewProfil.js | 15 +++++---------- public/js/components/Dashboard/Dashboard.js | 2 +- 3 files changed, 12 insertions(+), 21 deletions(-) diff --git a/public/js/components/Cis/Profil/MitarbeiterProfil.js b/public/js/components/Cis/Profil/MitarbeiterProfil.js index 4b71b05c1..424e78549 100644 --- a/public/js/components/Cis/Profil/MitarbeiterProfil.js +++ b/public/js/components/Cis/Profil/MitarbeiterProfil.js @@ -39,15 +39,6 @@ export default { responsiveLayout: "collapse", responsiveLayoutCollapseUseFormatters: false, responsiveLayoutCollapseFormatter: Vue.$collapseFormatter, - data: [ - { - Bezeichnung: "", - Organisationseinheit: "", - Gültig_von: "", - Gültig_bis: "", - Wochenstunden: "", - }, - ], columns: [ { title: @@ -150,7 +141,12 @@ export default { data: Object, editData: Object, }, - + 'data.funktionen'(newVal) { + if(this.$refs.funktionenTable) this.$refs.funktionenTable.tabulator.setData(newVal); + }, + 'data.mittel'(newVal) { + if(this.$refs.betriebsmittelTable) this.$refs.betriebsmittelTable.tabulator.setData(newVal); + }, methods: { betriebsmittelTableBuilt: function () { this.$refs.betriebsmittelTable.tabulator.setData(this.data.mittel); diff --git a/public/js/components/Cis/Profil/MitarbeiterViewProfil.js b/public/js/components/Cis/Profil/MitarbeiterViewProfil.js index 81c875a6c..63c9b84ba 100644 --- a/public/js/components/Cis/Profil/MitarbeiterViewProfil.js +++ b/public/js/components/Cis/Profil/MitarbeiterViewProfil.js @@ -25,15 +25,6 @@ export default { responsiveLayout: "collapse", responsiveLayoutCollapseUseFormatters: false, responsiveLayoutCollapseFormatter: Vue.$collapseFormatter, - data: [ - { - Bezeichnung: "", - Organisationseinheit: "", - Gültig_von: "", - Gültig_bis: "", - Wochenstunden: "", - }, - ], columns: [ //? option when wanting to hide the collapsed list @@ -97,7 +88,11 @@ export default { this.$refs.funktionenTable.tabulator.setData(this.data.funktionen); }, }, - + watch: { + 'data.funktionen'(newVal) { + if(this.$refs.funktionenTable) this.$refs.funktionenTable.tabulator.setData(newVal); + }, + }, computed: { getTelefonValue() { if(this.data.standort_telefon?.kontakt) { diff --git a/public/js/components/Dashboard/Dashboard.js b/public/js/components/Dashboard/Dashboard.js index b1219cad6..cd721264a 100644 --- a/public/js/components/Dashboard/Dashboard.js +++ b/public/js/components/Dashboard/Dashboard.js @@ -169,7 +169,7 @@ export default { }, template: `
-

+

{{ $p.t('global/personalGreeting', [ viewDataInternal?.name ]) }}

From 47293a81d343c724ae877116975858295d6ddb75 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Thu, 13 Feb 2025 13:40:24 +0100 Subject: [PATCH 3/8] avoid persisting invisible column definitions on funktionen table --- public/js/components/Cis/Profil/MitarbeiterProfil.js | 4 ++++ public/js/components/Cis/Profil/MitarbeiterViewProfil.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/public/js/components/Cis/Profil/MitarbeiterProfil.js b/public/js/components/Cis/Profil/MitarbeiterProfil.js index 424e78549..8bba26ea2 100644 --- a/public/js/components/Cis/Profil/MitarbeiterProfil.js +++ b/public/js/components/Cis/Profil/MitarbeiterProfil.js @@ -34,6 +34,10 @@ export default { // tabulator options funktionen_table_options: { + persistenceID: "filterTableMaProfilFunktionen", + persistence: { + columns: false + }, height: 300, layout: "fitColumns", responsiveLayout: "collapse", diff --git a/public/js/components/Cis/Profil/MitarbeiterViewProfil.js b/public/js/components/Cis/Profil/MitarbeiterViewProfil.js index 63c9b84ba..baf6fe745 100644 --- a/public/js/components/Cis/Profil/MitarbeiterViewProfil.js +++ b/public/js/components/Cis/Profil/MitarbeiterViewProfil.js @@ -20,6 +20,10 @@ export default { collapseIconFunktionen: true, funktionen_table_options: { + persistenceID: "filterTableMaViewProfilFunktionen", + persistence: { + columns: false + }, height: 300, layout: "fitColumns", responsiveLayout: "collapse", From 4de9441699558cf689f654d8085697f699badb68 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Thu, 13 Feb 2025 17:25:24 +0100 Subject: [PATCH 4/8] fix accessing fhc language locale .locale -> .LC_TIME --- public/js/plugin/Phrasen.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/plugin/Phrasen.js b/public/js/plugin/Phrasen.js index f85303fbe..40d448fc0 100644 --- a/public/js/plugin/Phrasen.js +++ b/public/js/plugin/Phrasen.js @@ -5,7 +5,7 @@ const loadingModules = {}; let user_language = Vue.ref(FHC_JS_DATA_STORAGE_OBJECT.user_language); export let user_locale = Vue.computed(()=>{ if(!user_language.value) return null; - return FHC_JS_DATA_STORAGE_OBJECT.server_languages.find(language => language.sprache == user_language.value).locale; + return FHC_JS_DATA_STORAGE_OBJECT.server_languages.find(language => language.sprache == user_language.value).LC_Time; }); function extractCategory(obj, category) { @@ -30,7 +30,7 @@ const phrasen = { setLanguage(language, api) { const catArray = Object.keys(categories) return api.factory.phrasen.setLanguage(catArray, language).then(res => { - + console.log('setLanguage', res) res.data.forEach(row => { categories[row.category][row.phrase] = row.text }) From 43e3fdcc4664721dd691aafbf1f2c6c8ec52585b Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Thu, 13 Feb 2025 17:28:34 +0100 Subject: [PATCH 5/8] remove log --- public/js/plugin/Phrasen.js | 1 - 1 file changed, 1 deletion(-) diff --git a/public/js/plugin/Phrasen.js b/public/js/plugin/Phrasen.js index 40d448fc0..fd2db9d9b 100644 --- a/public/js/plugin/Phrasen.js +++ b/public/js/plugin/Phrasen.js @@ -30,7 +30,6 @@ const phrasen = { setLanguage(language, api) { const catArray = Object.keys(categories) return api.factory.phrasen.setLanguage(catArray, language).then(res => { - console.log('setLanguage', res) res.data.forEach(row => { categories[row.category][row.phrase] = row.text }) From 40db480489f0adef22249b46a35690fe7411f78a Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Thu, 13 Feb 2025 17:46:28 +0100 Subject: [PATCH 6/8] stundenplan widget header format as per fhc locale --- public/js/components/DashboardWidget/Stundenplan.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/components/DashboardWidget/Stundenplan.js b/public/js/components/DashboardWidget/Stundenplan.js index 732176c0c..bf4324f4a 100644 --- a/public/js/components/DashboardWidget/Stundenplan.js +++ b/public/js/components/DashboardWidget/Stundenplan.js @@ -180,7 +180,7 @@ export default {