From 783a2fb2b09c25fe20f124c9b3d01436d6d7a675 Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Mon, 29 Jan 2024 09:22:20 +0100 Subject: [PATCH] removes print in MitarbeiterView Controller and MitarbeiterView uses the components to render the information --- application/controllers/Cis/Profil.php | 2 - .../Cis/Profil/MitarbeiterViewProfil.js | 304 +++--------------- 2 files changed, 40 insertions(+), 266 deletions(-) diff --git a/application/controllers/Cis/Profil.php b/application/controllers/Cis/Profil.php index 5b0cacfbf..2969ecf9c 100644 --- a/application/controllers/Cis/Profil.php +++ b/application/controllers/Cis/Profil.php @@ -267,8 +267,6 @@ class Profil extends Auth_Controller } } - - print_r($telefon_res); $res = new stdClass(); $res->username = $uid; diff --git a/public/js/components/Cis/Profil/MitarbeiterViewProfil.js b/public/js/components/Cis/Profil/MitarbeiterViewProfil.js index b64d3ebbd..e2d727ad7 100644 --- a/public/js/components/Cis/Profil/MitarbeiterViewProfil.js +++ b/public/js/components/Cis/Profil/MitarbeiterViewProfil.js @@ -1,9 +1,19 @@ import { CoreFilterCmpt } from "../../../components/filter/Filter.js"; +import Mailverteiler from "./ProfilComponents/Mailverteiler.js"; +import QuickLinks from "./ProfilComponents/QuickLinks.js"; +import RoleInformation from "./ProfilComponents/RoleInformation.js"; +import ProfilEmails from "./ProfilComponents/ProfilEmails.js"; +import ProfilInformation from "./ProfilComponents/ProfilInformation.js"; export default { components: { CoreFilterCmpt, + Mailverteiler, + QuickLinks, + RoleInformation, + ProfilEmails, + ProfilInformation, }, data() { return { @@ -82,56 +92,41 @@ export default { }, computed: { + + personEmails() { + return this.data?.emails ? this.data.emails : []; + }, - - get_image_base64_src() { - if (!this.data) { - return ""; - } - return "data:image/jpeg;base64," + this.data.foto; - }, - - get_mitarbeiter_standort_telefon(){ - if(this.data.standort_telefon){ - return "tel:"+ this.data.telefonklappe + this.data.standort_telefon ; - }else{ - return null; - } - }, - //? this computed function returns all the informations for the first column in the profil - personData() { + profilInformation() { if (!this.data) { return {}; } return { + Vorname: this.data.vorname, + Nachname: this.data.nachname, Username: this.data.username, Anrede: this.data.anrede, - Titel: this.data.titelpre, + Titel: this.data.titel, Postnomen: this.data.postnomen, + foto_sperre:this.data.foto_sperre, + foto:this.data.foto, + }; }, + + - personKontakt() { + roleInformation() { if (!this.data) { return {}; } return { - emails: this.data.emails, - - }; - }, - - specialData() { - if (!this.data) { - return {}; - } - - return { - + Geburtsdatum: this.data.gebdatum, + Geburtsort: this.data.gebort, Kurzzeichen: this.data.kurzbz, - Telefon: (this.data.standort_telefon?this.data.standort_telefon:"") + " " + this.data.telefonklappe , + Telefon: (this.data.standort_telefon?this.data.standort_telefon:"") + " " + this.data.telefonklappe, Büro: this.data.ort_kurzbz, }; }, @@ -220,94 +215,10 @@ export default {
- -
-
- MitarbeiterIn -
-
- - - - - -
- - - - - - -
-
-
- - -
-
- -
- - - - - -
-
-
- - -
-
Vorname
- {{data.vorname}} - -
- - -
-
- - -
-
Nachname
- {{data.nachname}} - -
- -
-
- - -
- - - - - - - - -
- - - - -
-
{{bez}}
- {{wert?wert:'-'}} - -
- -
- - -
- - - -
-
-
+ + + +
@@ -328,61 +239,9 @@ export default {
- -
-
- Mails -
+ + -
- - - -
- - - - - - -
-
- -
-
- - - -
-
- - - -
-
{{email.type}}
- {{email.email}} -
- - - -
-
-
-
- - - - - - - - - -
- - -
-
@@ -392,37 +251,8 @@ export default {
-
- -
- Mitarbeiter Information -
-
-
-
- - - - -
-
{{bez}}
- - {{wert?wert:'-'}} - - - {{wert?wert:'-'}} - - -
- - - -
-
- -
- -
+ +
@@ -477,80 +307,26 @@ export default {
- - - - - - +
-
-
- Quick Links -
- -
- - - -
- - - -
- - - - -
-
- Mailverteilers -
-
- -
Sie sind Mitgglied in folgenden Verteilern:
-
-
-
-
- - - -
- -
- -
-
{{verteiler.beschreibung}}
-
- -
-
- - + +
-