diff --git a/public/js/components/Cis/Profil/ProfilComponents/Adresse.js b/public/js/components/Cis/Profil/ProfilComponents/Adresse.js
index 8da928d32..5d7406bbd 100644
--- a/public/js/components/Cis/Profil/ProfilComponents/Adresse.js
+++ b/public/js/components/Cis/Profil/ProfilComponents/Adresse.js
@@ -17,61 +17,50 @@ export default {
-
-
+
-
-
-
+
+
-
-
-
-
-
-
-
-
- `
-
+`
};
\ No newline at end of file
diff --git a/public/js/components/Cis/Profil/ProfilComponents/FetchProfilUpdates.js b/public/js/components/Cis/Profil/ProfilComponents/FetchProfilUpdates.js
index 11c5960e4..4c7411cdf 100644
--- a/public/js/components/Cis/Profil/ProfilComponents/FetchProfilUpdates.js
+++ b/public/js/components/Cis/Profil/ProfilComponents/FetchProfilUpdates.js
@@ -1,212 +1,197 @@
import EditProfil from "../ProfilModal/EditProfil.js";
//? EditProfil is the modal used to edit the profil updates
export default {
- components: { EditProfil },
- props: {
- data: {
- type: Object,
- },
- },
+ components: {EditProfil},
+ props: {
+ data: {
+ type: Object,
+ },
+ },
- inject: [
- "getZustellkontakteCount",
- "getZustelladressenCount",
- "profilUpdateStates",
- "profilUpdateTopic",
- ],
+ inject: [
+ "getZustellkontakteCount",
+ "getZustelladressenCount",
+ "profilUpdateStates",
+ "profilUpdateTopic",
+ ],
- emits: ["fetchUpdates"],
+ emits: ["fetchUpdates"],
- data() {
- return {
- showUpdateModal: false,
- content: null,
- editProfilTitle: this.$p.t("profil", "profilBearbeiten"),
- };
- },
+ data() {
+ return {
+ showUpdateModal: false,
+ content: null,
+ editProfilTitle: this.$p.t("profil", "profilBearbeiten"),
+ };
+ },
- methods: {
- hideEditProfilModal: function () {
- //? checks the editModal component property result, if the user made a successful request or not
- if (this.$refs.updateEditModal.result) {
- this.$emit("fetchUpdates");
- } else {
- // when modal was closed without submitting request
- }
- this.showUpdateModal = false;
- },
+ methods: {
+ hideEditProfilModal: function () {
+ //? checks the editModal component property result, if the user made a successful request or not
+ if (this.$refs.updateEditModal.result) {
+ this.$emit("fetchUpdates");
+ } else {
+ // when modal was closed without submitting request
+ }
+ this.showUpdateModal = false;
+ },
- async showEditProfilModal(updateRequest) {
+ async showEditProfilModal(updateRequest) {
- let view = this.getView(updateRequest.topic, updateRequest.status);
-
- let data = null;
- let content = null;
- let files = null;
- let withFiles = false;
+ let view = this.getView(updateRequest.topic, updateRequest.status);
- if (view === "TextInputDokument") {
- data = {
- titel: updateRequest.topic,
- value: updateRequest.requested_change.value,
- };
-
- const filesFromDatabase =
- await this.$fhcApi.factory.profilUpdate.getProfilRequestFiles(
- updateRequest.profil_update_id
- ).then((res) => {
- return res.data;
- });
+ let data = null;
+ let content = null;
+ let files = null;
+ let withFiles = false;
- files = filesFromDatabase;
- if (files) {
- withFiles = true;
- }
- } else {
- data = updateRequest.requested_change;
- }
+ if (view === "TextInputDokument") {
+ data = {
+ titel: updateRequest.topic,
+ value: updateRequest.requested_change.value,
+ };
- content = {
- updateID: updateRequest.profil_update_id,
- view: view,
- data: data,
- withFiles: withFiles,
- topic: updateRequest.topic,
- files: files,
- };
+ const filesFromDatabase =
+ await this.$fhcApi.factory.profilUpdate.getProfilRequestFiles(
+ updateRequest.profil_update_id
+ ).then((res) => {
+ return res.data;
+ });
- if (view === "EditAdresse") {
-
- const isMitarbeiter = await this.$fhcApi.factory.profil.isMitarbeiter(updateRequest.uid).then((res)=>res.data);
+ files = filesFromDatabase;
+ if (files) {
+ withFiles = true;
+ }
+ } else {
+ data = updateRequest.requested_change;
+ }
- if (isMitarbeiter) {
- content["isMitarbeiter"] = isMitarbeiter;
- }
- }
+ content = {
+ updateID: updateRequest.profil_update_id,
+ view: view,
+ data: data,
+ withFiles: withFiles,
+ topic: updateRequest.topic,
+ files: files,
+ };
- //? adds the status information if the profil update request was rejected or accepted
- if (updateRequest.status !== this.profilUpdateStates["Pending"]) {
- content["status"] = updateRequest.status;
- content["status_message"] = updateRequest.status_message;
- content["status_timestamp"] = updateRequest.status_timestamp;
- }
+ if (view === "EditAdresse") {
- //? update data of the reactive content
- this.content = content;
- this.editProfilTitle = updateRequest.topic;
+ const isMitarbeiter = await this.$fhcApi.factory.profil.isMitarbeiter(updateRequest.uid).then((res) => res.data);
- //? only show the popup if also the right content is available
- if (content) {
- this.showUpdateModal = true;
- // after a state change, wait for the DOM updates to complete
- Vue.nextTick(() => {
- this.$refs.updateEditModal.show();
- });
- }
- },
+ if (isMitarbeiter) {
+ content["isMitarbeiter"] = isMitarbeiter;
+ }
+ }
- deleteRequest: function (item) {
- this.$fhcApi.factory.profilUpdate.deleteProfilRequest(item.profil_update_id).then(
- (res) => {
- if (res.data.error) {
- //? open alert
- console.error("error happened",res.data);
- } else {
- this.$emit("fetchUpdates");
- }
- }
- );
- },
-
- getView: function (topic, status) {
- if (!(status === this.profilUpdateStates["Pending"])) {
- return "Status";
- }
+ //? adds the status information if the profil update request was rejected or accepted
+ if (updateRequest.status !== this.profilUpdateStates["Pending"]) {
+ content["status"] = updateRequest.status;
+ content["status_message"] = updateRequest.status_message;
+ content["status_timestamp"] = updateRequest.status_timestamp;
+ }
- switch (topic) {
- case this.profilUpdateTopic["Private Kontakte"]:
- return "EditKontakt";
- case this.profilUpdateTopic["Add Kontakt"]:
- return "EditKontakt";
- case this.profilUpdateTopic["Delete Kontakt"]:
- return "Kontakt";
- case this.profilUpdateTopic["Private Adressen"]:
- return "EditAdresse";
- case this.profilUpdateTopic["Add Adresse"]:
- return "EditAdresse";
- case this.profilUpdateTopic["Delete Adresse"]:
- return "Adresse";
- default:
- return "TextInputDokument";
- }
- },
+ //? update data of the reactive content
+ this.content = content;
+ this.editProfilTitle = updateRequest.topic;
- },
- created() {
- },
+ //? only show the popup if also the right content is available
+ if (content) {
+ this.showUpdateModal = true;
+ // after a state change, wait for the DOM updates to complete
+ Vue.nextTick(() => {
+ this.$refs.updateEditModal.show();
+ });
+ }
+ },
- computed: {},
+ deleteRequest: function (item) {
+ this.$fhcApi.factory.profilUpdate.deleteProfilRequest(item.profil_update_id).then(
+ (res) => {
+ if (res.data.error) {
+ //? open alert
+ console.error("error happened", res.data);
+ } else {
+ this.$emit("fetchUpdates");
+ }
+ }
+ );
+ },
- template: /*html*/ `
-
-
+ getView: function (topic, status) {
+ if (!(status === this.profilUpdateStates["Pending"])) {
+ return "Status";
+ }
+
+ switch (topic) {
+ case this.profilUpdateTopic["Private Kontakte"]:
+ return "EditKontakt";
+ case this.profilUpdateTopic["Add Kontakt"]:
+ return "EditKontakt";
+ case this.profilUpdateTopic["Delete Kontakt"]:
+ return "Kontakt";
+ case this.profilUpdateTopic["Private Adressen"]:
+ return "EditAdresse";
+ case this.profilUpdateTopic["Add Adresse"]:
+ return "EditAdresse";
+ case this.profilUpdateTopic["Delete Adresse"]:
+ return "Adresse";
+ default:
+ return "TextInputDokument";
+ }
+ },
+
+ },
+ created() {
+ },
+
+ computed: {},
+
+ template: /*html*/ `
+
-
-
-
-
-
-
- | {{$p.t('profilUpdate','topic')}} |
- {{$p.t('global','status')}} |
- {{$p.t('global','datum')}} |
- {{$p.t('ui','aktion')}} |
-
-
-
-
- | {{item.topic}} |
- {{item.status}} |
- {{item.status_timestamp?item.status_timestamp:item.insertamum}} |
-
-
-
-
-
-
- |
-
-
-
-
-
-
-
-
- |
-
-
-
-
-
-
-
+
+
+
+
+
+
+ | {{$p.t('profilUpdate','topic')}} |
+ {{$p.t('global','status')}} |
+ {{$p.t('global','datum')}} |
+ {{$p.t('ui','aktion')}} |
+
+
+
+
+ | {{item.topic}} |
+ {{item.status}} |
+ {{item.status_timestamp?item.status_timestamp:item.insertamum}} |
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+
+
-
-
-
-
- `,
+
+`,
};
diff --git a/public/js/components/Cis/Profil/ProfilComponents/FhAusweisStatus.js b/public/js/components/Cis/Profil/ProfilComponents/FhAusweisStatus.js
index d59bcbce3..21e05e525 100644
--- a/public/js/components/Cis/Profil/ProfilComponents/FhAusweisStatus.js
+++ b/public/js/components/Cis/Profil/ProfilComponents/FhAusweisStatus.js
@@ -1,20 +1,16 @@
export default {
- props:{
- data:{
- type:String,
-
- }
- },
- data(){
- return {
-
- }
- },mounted(){
- },
- template: /*html*/`
+ props: {
+ data: {
+ type: String,
+ }
+ },
+ data() {
+ return {}
+ },
+ template: /*html*/`
- {{$p.t('profil','fhAusweisStatus',[data])}}
+ {{$p.t('profil','fhAusweisStatus',[data])}}
`,
}
\ No newline at end of file
diff --git a/public/js/components/Cis/Profil/ProfilComponents/Kontakt.js b/public/js/components/Cis/Profil/ProfilComponents/Kontakt.js
index 7b5c25a0c..ffb46e1a2 100644
--- a/public/js/components/Cis/Profil/ProfilComponents/Kontakt.js
+++ b/public/js/components/Cis/Profil/ProfilComponents/Kontakt.js
@@ -13,38 +13,26 @@ export default{
},
template:/*html*/`
-
-
-
-
-
-
- `,
+`,
};
\ No newline at end of file
diff --git a/public/js/components/Cis/Profil/ProfilComponents/Mailverteiler.js b/public/js/components/Cis/Profil/ProfilComponents/Mailverteiler.js
index 37b8fc1a5..5f2221b22 100644
--- a/public/js/components/Cis/Profil/ProfilComponents/Mailverteiler.js
+++ b/public/js/components/Cis/Profil/ProfilComponents/Mailverteiler.js
@@ -11,30 +11,23 @@ export default {
},
template: /*html*/`
-
-
-
{{$p.t('profil','mailverteilerMitglied')}}
+
{{$p.t('profil','mailverteilerMitglied')}}
-
{{verteiler.beschreibung}}
-
-
`,
};
diff --git a/public/js/components/Cis/Profil/ProfilComponents/ProfilEmails.js b/public/js/components/Cis/Profil/ProfilComponents/ProfilEmails.js
index 4040be37b..43ef807ba 100644
--- a/public/js/components/Cis/Profil/ProfilComponents/ProfilEmails.js
+++ b/public/js/components/Cis/Profil/ProfilComponents/ProfilEmails.js
@@ -1,62 +1,38 @@
export default {
- data() {
- return {};
- },
- props: {
- title: {
- type: String,
- required: true,
- },
- data: {
- type: Array,
- },
- },
- template: /*html*/ `
-
+ data() {
+ return {};
+ },
+ props: {
+ title: {
+ type: String,
+ required: true,
+ },
+ data: {
+ type: Array,
+ },
+ },
+ template: /*html*/ `
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
`,
+
`,
};
diff --git a/public/js/components/Cis/Profil/ProfilComponents/ProfilInformation.js b/public/js/components/Cis/Profil/ProfilComponents/ProfilInformation.js
index 46b0b2eda..24458ed93 100644
--- a/public/js/components/Cis/Profil/ProfilComponents/ProfilInformation.js
+++ b/public/js/components/Cis/Profil/ProfilComponents/ProfilInformation.js
@@ -1,150 +1,115 @@
export default {
- props: {
- title: {
- type: String,
- },
- data: {
- type: Object,
- },
- editable: {
- type: Boolean,
- default: false
- }
- },
- data() {
- return {
- FotoSperre: this.data.foto_sperre,
- };
- },
- emits: ["showEditProfilModal"],
+ props: {
+ title: {
+ type: String,
+ },
+ data: {
+ type: Object,
+ },
+ editable: {
+ type: Boolean,
+ default: false
+ }
+ },
+ data() {
+ return {
+ FotoSperre: this.data.foto_sperre,
+ };
+ },
+ emits: ["showEditProfilModal"],
- methods: {
- sperre_foto_function() {
- //TODO: refactor
- if (!this.data) {
- return;
- }
- this.$fhcApi.factory.profil.fotoSperre(!this.FotoSperre).then(res =>{
- this.FotoSperre = res.data.foto_sperre;
- })
- },
- },
- computed: {
- get_image_base64_src: function () {
- if (!this.data.foto) {
- return "";
- }
- return "data:image/jpeg;base64," + this.data.foto;
- },
- name: function () {
- return { vorname: this.data.Vorname, nachname: this.data.Nachname };
- },
- profilInfo: function () {
- let res = {};
- let notIncludedProperties = [
- "Vorname",
- "Nachname",
- "foto_sperre",
- "foto",
- ];
- Object.keys(this.data).forEach((key) => {
- if (!notIncludedProperties.includes(key)) {
- res[key] = this.data[key];
- }
- });
- return res;
- },
- },
- template: /*html*/ `
-
-
+ methods: {
+ sperre_foto_function() {
+ //TODO: refactor
+ if (!this.data) {
+ return;
+ }
+ this.$fhcApi.factory.profil.fotoSperre(!this.FotoSperre).then(res => {
+ this.FotoSperre = res.data.foto_sperre;
+ })
+ },
+ },
+ computed: {
+ get_image_base64_src: function () {
+ if (!this.data.foto) {
+ return "";
+ }
+ return "data:image/jpeg;base64," + this.data.foto;
+ },
+ name: function () {
+ return {vorname: this.data.Vorname, nachname: this.data.Nachname};
+ },
+ profilInfo: function () {
+ let res = {};
+ let notIncludedProperties = [
+ "Vorname",
+ "Nachname",
+ "foto_sperre",
+ "foto",
+ ];
+ Object.keys(this.data).forEach((key) => {
+ if (!notIncludedProperties.includes(key)) {
+ res[key] = this.data[key];
+ }
+ });
+ return res;
+ },
+ },
+ template: /*html*/ `
+
+