From 60e12e1ab7926b5dceacd28d67899532de732f87 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Wed, 12 Feb 2025 14:04:23 +0100 Subject: [PATCH 1/5] dont load any studiengang related infos for mitarbeiter --- application/controllers/api/frontend/v1/Studgang.php | 8 +++++++- application/models/organisation/Studiengang_model.php | 6 +----- public/js/apps/Dashboard/Fhc.js | 5 ----- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/application/controllers/api/frontend/v1/Studgang.php b/application/controllers/api/frontend/v1/Studgang.php index 0e4eb3205..63579e3a6 100644 --- a/application/controllers/api/frontend/v1/Studgang.php +++ b/application/controllers/api/frontend/v1/Studgang.php @@ -31,6 +31,7 @@ class Studgang extends FHCAPI_Controller ]); $this->load->model('organisation/Studiengang_model', 'StudiengangModel'); + $this->load->model('ressource/mitarbeiter_model', 'MitarbeiterModel'); // Loads phrases system $this->loadPhrases([ @@ -43,7 +44,12 @@ class Studgang extends FHCAPI_Controller // Public methods public function getStudiengangInfo(){ - // fetches the Studiengang Information which is used next the the news + $isMitarbeiter = $this->MitarbeiterModel->isMitarbeiter(getAuthUID()); + if($isMitarbeiter) { + $this->terminateWithSuccess(); + } + + // fetches the Studiengang Information which is used next to the news $studiengangInfo = $this->StudiengangModel->getStudiengangInfoForNews(); $studiengangInfo= $this->getDataOrTerminateWithError($studiengangInfo); $this->terminateWithSuccess($studiengangInfo); diff --git a/application/models/organisation/Studiengang_model.php b/application/models/organisation/Studiengang_model.php index 066210e0b..7ea8a901c 100644 --- a/application/models/organisation/Studiengang_model.php +++ b/application/models/organisation/Studiengang_model.php @@ -656,6 +656,7 @@ class Studiengang_model extends DB_Model $this->load->model('person/Benutzerfunktion_model', 'BenutzerfunktionModel'); $this->load->model('person/Person_model', 'PersonModel'); + $this->load->model('crm/Student_model', 'StudentModel'); $addEmailProperty= function(&$benutzerfunktionen){ if(count($benutzerfunktionen) && defined('DOMAIN')) @@ -691,11 +692,6 @@ class Studiengang_model extends DB_Model if (isError($student)) return error($student); if (getData($student)) { - //TODO: if a mitarbeiter requests this site, empty data should be returned - if(count($student) == 0) - { - return new stdClass(); - } $student = current(getData($student)); $studiengang_kz = $student->studiengang_kz; $semester = $student->semester; diff --git a/public/js/apps/Dashboard/Fhc.js b/public/js/apps/Dashboard/Fhc.js index 6a3f8c66d..703563283 100644 --- a/public/js/apps/Dashboard/Fhc.js +++ b/public/js/apps/Dashboard/Fhc.js @@ -131,11 +131,6 @@ const app = Vue.createApp({ }, }); -router.beforeEach((to,from) => { - console.log('to', to) - console.log('from', from) -}) - // kind of a bandaid for bad css on some pages to avoid horizontal scroll setScrollbarWidth(); app.use(router); From e6edd42737c223525ca39b4f267c37e8a659b2bb Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Wed, 12 Feb 2025 14:34:52 +0100 Subject: [PATCH 2/5] profil remove console.log, added missing phrase --- public/js/components/Cis/Profil/Profil.js | 1 - system/phrasesupdate.php | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/public/js/components/Cis/Profil/Profil.js b/public/js/components/Cis/Profil/Profil.js index 26ad712be..73dd8b132 100644 --- a/public/js/components/Cis/Profil/Profil.js +++ b/public/js/components/Cis/Profil/Profil.js @@ -355,7 +355,6 @@ export const Profil = { } }, uid (newVal, oldVal) { - console.log('watch uid', newVal) this.load() } }, diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 03a1259e6..14002a580 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -26736,6 +26736,26 @@ array( ) ) ), + array( + 'app' => 'core', + 'category' => 'profil', + 'phrase' => 'MOBIL', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Mobiltelefonnummer', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Cell phone number', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'profil', From 480bef3b0d0e8d39f2fc70e7d0149f5b60c8d85a Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Wed, 12 Feb 2025 17:24:37 +0100 Subject: [PATCH 3/5] student profile role info verband/gruppe/semester links to old cis list; reworked role info data to also work in english lol; --- .../controllers/api/frontend/v1/Profil.php | 2 +- .../Cis/Profil/MitarbeiterProfil.js | 44 +++++++++++++--- .../Cis/Profil/MitarbeiterViewProfil.js | 45 +++++++++++++--- .../ProfilComponents/RoleInformation.js | 52 +++++++++++++++++-- .../js/components/Cis/Profil/StudentProfil.js | 51 +++++++++++++++--- .../Cis/Profil/StudentViewProfil.js | 52 ++++++++++++++++--- 6 files changed, 213 insertions(+), 33 deletions(-) diff --git a/application/controllers/api/frontend/v1/Profil.php b/application/controllers/api/frontend/v1/Profil.php index 36bc5b68c..c52d8bae5 100644 --- a/application/controllers/api/frontend/v1/Profil.php +++ b/application/controllers/api/frontend/v1/Profil.php @@ -567,7 +567,7 @@ class Profil extends FHCAPI_Controller */ private function getStudentInfo($uid) { - $this->StudentModel->addSelect(['tbl_studiengang.bezeichnung as studiengang', 'tbl_student.semester', 'tbl_student.verband', 'tbl_student.gruppe', 'tbl_student.matrikelnr as personenkennzeichen']); + $this->StudentModel->addSelect(['tbl_studiengang.bezeichnung as studiengang', 'tbl_studiengang.studiengang_kz as studiengang_kz', 'tbl_student.semester', 'tbl_student.verband', 'tbl_student.gruppe', 'tbl_student.matrikelnr as personenkennzeichen']); $this->StudentModel->addJoin('tbl_studiengang', "tbl_studiengang.studiengang_kz=tbl_student.studiengang_kz"); $student_res = $this->StudentModel->load([$uid]); diff --git a/public/js/components/Cis/Profil/MitarbeiterProfil.js b/public/js/components/Cis/Profil/MitarbeiterProfil.js index ccdc68a9b..acae0cc5a 100644 --- a/public/js/components/Cis/Profil/MitarbeiterProfil.js +++ b/public/js/components/Cis/Profil/MitarbeiterProfil.js @@ -198,6 +198,15 @@ export default { editable() { return this.data?.editAllowed ?? false; }, + getTelefonValue() { + if(this.data.standort_telefon?.kontakt) { + return this.data.standort_telefon.kontakt + " " + this.data.telefonklappe + } else if(this.data.standort_telefon) { + return this.data.standort_telefon + " " + this.data.telefonklappe + } else { + return this.data.telefonklappe + } + }, filteredEditData() { return this.editDataFilter ? this.editData.data[this.editDataFilter] @@ -226,13 +235,36 @@ export default { } 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, + geburtsdatum: { + label: `${this.$p.t('profil','Geburtsdatum')}`, + value: this.data.gebdatum + }, + geburtsort: { + label: `${this.$p.t('profil','Geburtsort')}`, + value: this.data.gebort + }, + personenkennzeichen: { + label: `${this.$p.t('profil','Kurzzeichen')}`, + value: this.data.kurzbz + }, + telefon: { + label: `${this.$p.t('profil','Telefon')}`, + value: this.getTelefonValue + }, + office: { + label: `${this.$p.t('profil','Büro')}`, + 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, + // }; }, }, diff --git a/public/js/components/Cis/Profil/MitarbeiterViewProfil.js b/public/js/components/Cis/Profil/MitarbeiterViewProfil.js index b062b7708..07cb83402 100644 --- a/public/js/components/Cis/Profil/MitarbeiterViewProfil.js +++ b/public/js/components/Cis/Profil/MitarbeiterViewProfil.js @@ -93,6 +93,15 @@ export default { }, computed: { + getTelefonValue() { + if(this.data.standort_telefon?.kontakt) { + return this.data.standort_telefon.kontakt + " " + this.data.telefonklappe + } else if(this.data.standort_telefon) { + return this.data.standort_telefon + " " + this.data.telefonklappe + } else { + return this.data.telefonklappe + } + }, editable() { return this.data?.editAllowed ?? false; }, @@ -122,15 +131,37 @@ export default { if (!this.data) { return {}; } - 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, + geburtsdatum: { + label: `${this.$p.t('profil','Geburtsdatum')}`, + value: this.data.gebdatum + }, + geburtsort: { + label: `${this.$p.t('profil','Geburtsort')}`, + value: this.data.gebort + }, + personenkennzeichen: { + label: `${this.$p.t('profil','Kurzzeichen')}`, + value: this.data.kurzbz + }, + telefon: { + label: `${this.$p.t('profil','Telefon')}`, + value: this.getTelefonValue + }, + office: { + label: `${this.$p.t('profil','Büro')}`, + 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/ProfilComponents/RoleInformation.js b/public/js/components/Cis/Profil/ProfilComponents/RoleInformation.js index 9fb0b4976..e49fa624a 100644 --- a/public/js/components/Cis/Profil/ProfilComponents/RoleInformation.js +++ b/public/js/components/Cis/Profil/ProfilComponents/RoleInformation.js @@ -10,7 +10,25 @@ export default { type: String, } }, - computed: {}, + inject: [ + 'studiengang_kz', // inject info that should not be displayed + ], + computed: { + getLinkGruppeListe() { + return this.data.gruppe?.value && this.data.verband?.value && this.data.semester?.value ? FHC_JS_DATA_STORAGE_OBJECT.app_root + + 'cis/private/stud_in_grp.php?kz='+this.studiengang_kz+'&sem=' + this.data.semester.value + + '&verband=' + this.data.verband.value + '&grp=' + this.data.gruppe.value : '' + }, + getLinkVerbandListe() { + return this.data.verband?.value && this.data.semester?.value ? FHC_JS_DATA_STORAGE_OBJECT.app_root + + 'cis/private/stud_in_grp.php?kz='+this.studiengang_kz+'&sem=' + this.data.semester.value + + '&verband=' + this.data.verband.value : '' + }, + getLinkSemesterListe() { + return this.data.semester?.value ? FHC_JS_DATA_STORAGE_OBJECT.app_root + + 'cis/private/stud_in_grp.php?kz='+this.studiengang_kz+'&sem=' + this.data.semester.value : '' + } + }, created() { //TODO: check if data.Telefon is a valid telefon number to call before using it as a tel: link }, @@ -19,16 +37,40 @@ export default {
{{title}}
-
+
-
{{bez }}
+
{{entry.label }}
- {{wert?wert:'-'}} + {{entry.value ?? '-'}} + + + + {{ entry.value }} + + + + + + + + {{ entry.value }} + + + + + + + + {{ entry.value }} + + + + - {{wert?wert:'-'}} + {{ entry.value ?? '-'}}
diff --git a/public/js/components/Cis/Profil/StudentProfil.js b/public/js/components/Cis/Profil/StudentProfil.js index 7c7d365b0..1c1f55997 100644 --- a/public/js/components/Cis/Profil/StudentProfil.js +++ b/public/js/components/Cis/Profil/StudentProfil.js @@ -84,6 +84,11 @@ export default { data: Object, editData: Object, }, + provide() { + return { + studiengang_kz: Vue.computed({ get: () => this.data.studiengang_kz }), + } + }, methods: { betriebsmittelTableBuilt: function () { @@ -172,14 +177,46 @@ export default { } 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(), + geburtsdatum: { + label: `${this.$p.t('profil','Geburtsdatum')}`, + value: this.data.gebdatum + }, + geburtsort: { + label: `${this.$p.t('profil','Geburtsort')}`, + value: this.data.gebort + }, + personenkennzeichen: { + label: `${this.$p.t('person','personenkennzeichen')}`, + value: this.data.personenkennzeichen + }, + studiengang: { + label: `${this.$p.t('lehre','studiengang')}`, + value: this.data.studiengang + }, + semester: { + label: `${this.$p.t('lehre','semester')}`, + value: this.data.semester + }, + verband: { + label: `${this.$p.t('lehre','lehrverband')}`, + value: this.data.verband + }, + gruppe: { + label: `${this.$p.t('lehre','gruppe')}`, + 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 fec4e3664..b1e4479df 100644 --- a/public/js/components/Cis/Profil/StudentViewProfil.js +++ b/public/js/components/Cis/Profil/StudentViewProfil.js @@ -17,6 +17,12 @@ export default { }, props: ["data"], + provide() { + return { + studiengang_kz: Vue.computed({ get: () => this.data.studiengang_kz }), + } + }, + methods: {}, computed: { @@ -49,15 +55,47 @@ export default { return {}; } + 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(), + geburtsdatum: { + label: `${this.$p.t('profil','Geburtsdatum')}`, + value: this.data.gebdatum + }, + geburtsort: { + label: `${this.$p.t('profil','Geburtsort')}`, + value: this.data.gebort + }, + personenkennzeichen: { + label: `${this.$p.t('person','Geburtsort')}`, + value: this.data.personenkennzeichen + }, + studiengang: { + label: `${this.$p.t('lehre','Geburtsort')}`, + value: this.data.studiengang + }, + semester: { + label: `${this.$p.t('lehre','Geburtsort')}`, + value: this.data.semester + }, + verband: { + label: `${this.$p.t('lehre','Geburtsort')}`, + value: this.data.verband + }, + gruppe: { + label: `${this.$p.t('lehre','Geburtsort')}`, + 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 a6e0f10f32992a44f194b4d89b158e7faf03af65 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Wed, 12 Feb 2025 17:56:10 +0100 Subject: [PATCH 4/5] use correct path to searchbar.css --- application/views/CisRouterView/CisRouterView.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/views/CisRouterView/CisRouterView.php b/application/views/CisRouterView/CisRouterView.php index a7b3d6f80..4590b210e 100644 --- a/application/views/CisRouterView/CisRouterView.php +++ b/application/views/CisRouterView/CisRouterView.php @@ -10,7 +10,7 @@ $includesArray = array( 'primevue3' => true, 'customCSSs' => array( 'public/css/components/verticalsplit.css', - 'public/css/components/searchbar.css', + 'public/css/components/searchbar/searchbar.css', 'public/css/Fhc.css', 'public/css/components/dashboard.css', 'public/css/components/calendar.css', @@ -38,4 +38,4 @@ $this->load->view('templates/CISVUE-Header', $includesArray); :view-data='' >
-load->view('templates/CISVUE-Footer', $includesArray); ?> \ No newline at end of file +load->view('templates/CISVUE-Footer', $includesArray); ?> From 9bcd566bee93afaa228dd570f5223aaba2fd7c11 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Wed, 12 Feb 2025 17:57:53 +0100 Subject: [PATCH 5/5] fix TransitionGroup children have to be keyed and duplicate attribute v-bind --- public/js/components/Dashboard/Section.js | 3 ++- public/js/components/Drop/Grid.js | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/public/js/components/Dashboard/Section.js b/public/js/components/Dashboard/Section.js index 6ab57ee77..ab931543d 100644 --- a/public/js/components/Dashboard/Section.js +++ b/public/js/components/Dashboard/Section.js @@ -96,7 +96,8 @@ export default { } } else { - placeholders.push({ x: x, y: y, w: 1, h: 1, placeholder: true }); + placeholders.push({ x: x, y: y, w: 1, h: 1, placeholder: true, + data: { id: 'placeholder_' + String(placeholders.length).padStart(4, "0") } }); } } } diff --git a/public/js/components/Drop/Grid.js b/public/js/components/Drop/Grid.js index 97f83ddd3..0381352d4 100644 --- a/public/js/components/Drop/Grid.js +++ b/public/js/components/Drop/Grid.js @@ -359,8 +359,8 @@ export default { @mouseleave="mouseLeave">