diff --git a/public/js/components/Cis/Profil/MitarbeiterProfil.js b/public/js/components/Cis/Profil/MitarbeiterProfil.js index e31d817f9..3b0b81d41 100644 --- a/public/js/components/Cis/Profil/MitarbeiterProfil.js +++ b/public/js/components/Cis/Profil/MitarbeiterProfil.js @@ -2,7 +2,12 @@ import { CoreFilterCmpt } from "../../../components/filter/Filter.js"; import EditProfil from "./EditProfil.js"; import {Adresse, Kontakt, FetchProfilUpdates} from "./ProfilComponents.js"; - +import Mailverteiler from "./ProfilComponents/Mailverteiler.js"; +import AusweisStatus from "./ProfilComponents/FhAusweisStatus.js"; +import QuickLinks from "./ProfilComponents/QuickLinks.js"; +import ProfilEmails from "./ProfilComponents/ProfilEmails.js" +import RoleInformation from "./ProfilComponents/RoleInformation.js"; +import ProfilInformation from "./ProfilComponents/ProfilInformation.js"; export default { components: { @@ -11,6 +16,12 @@ export default { Adresse, Kontakt, FetchProfilUpdates, + AusweisStatus, + Mailverteiler, + QuickLinks, + ProfilEmails, + RoleInformation, + ProfilInformation, }, data() { return { @@ -160,64 +171,30 @@ export default { }, - sperre_foto_function() { - if (!this.data) { - return; - } - Vue.$fhcapi.UserData.sperre_foto_function(!this.data.foto_sperre).then((res) => { - this.data.foto_sperre = res.data.foto_sperre; - }); - }, + }, computed: { - - //? legacy mailto link to create an email with information that should be changed - refreshMailTo() { - return `mailto:info.mio@technikum-wien.at?subject=Datenkorrektur&body=Die%20Profildaten%20für%20User%20'${this.data.username}'%20sind%20nicht%20korrekt.%0DHier, die richtigen Daten:%0A%0ANachname:%20${this.data.nachname}%0AVorname:%20${this.data.vorname}%0AGeburtsdatum:${this.data.gebdatum}%0AGeburtsort:%20${this.data.gebort}%0ATitelPre:${this.data.titel}%20%0ATitelPost:${this.data.postnomen}%20%0A%0A***%0DPlatz für weitere (nicht angeführte Daten)%0D***%0A%0A[Bitte%20übermitteln%20Sie%20uns%20etwaige%20Dokumente%20zum%20Beleg%20der%20Änderung]`; - }, - - 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.titel, Postnomen: this.data.postnomen, + foto_sperre:this.data.foto_sperre, + foto:this.data.foto, + }; }, - personKontakt() { - if (!this.data) { - return {}; - } - - return { - emails: this.data.emails, - - }; - }, - - specialData() { + roleInformation() { if (!this.data) { return {}; } @@ -231,6 +208,10 @@ export default { }; }, + personEmails() { + return this.data?.emails ? this.data.emails : []; + }, + privateKontakte() { if (!this.data) { return {}; @@ -250,18 +231,6 @@ export default { }, - kontaktInfo() { - if (!this.data) { - return {}; - } - - return { - FhAusweisStatus: this.data.zutrittsdatum, - emails: this.data.emails, - Kontakte: this.data.kontakte, - Adressen: this.data.adressen, - }; - }, }, created() { @@ -352,41 +321,18 @@ export default {
{{JSON.stringify(data)}}
- {{originalValue}}
+
{{JSON.stringify(data,null,2)}}
+
+