From 4e5379c5d9c78e9039e8256fcdbe1e59f49d7e57 Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Thu, 18 Apr 2024 14:53:51 +0200 Subject: [PATCH] adds an edit button over every section in the profil page to edit that section --- .../Cis/Profil/MitarbeiterProfil.js | 52 +++++-- .../ProfilComponents/ProfilInformation.js | 108 +++++++------- .../Profil/ProfilModal/EditProfilSelect.js | 8 +- .../js/components/Cis/Profil/StudentProfil.js | 136 ++++++++++-------- 4 files changed, 180 insertions(+), 124 deletions(-) diff --git a/public/js/components/Cis/Profil/MitarbeiterProfil.js b/public/js/components/Cis/Profil/MitarbeiterProfil.js index 41b2c8038..52c9dfb24 100755 --- a/public/js/components/Cis/Profil/MitarbeiterProfil.js +++ b/public/js/components/Cis/Profil/MitarbeiterProfil.js @@ -30,7 +30,9 @@ export default { data() { return { showModal: false, + editDataFilter: null, + // tabulator options funktionen_table_options: { height: 300, layout: "fitColumns", @@ -159,14 +161,20 @@ export default { // when modal was closed without submitting request } this.showModal = false; + this.editDataFilter = null; }, - showEditProfilModal() { + showEditProfilModal(view) { + if (view) { + this.editDataFilter = view; + } + this.showModal = true; - // after a state change, wait for the DOM updates to complete Vue.nextTick(() => { this.$refs.editModal.show(); }); + + // after a state change, wait for the DOM updates to complete }, fetchProfilUpdates: function () { @@ -181,6 +189,11 @@ export default { }, computed: { + filteredEditData() { + return this.editDataFilter + ? this.editData.data[this.editDataFilter] + : this.editData; + }, profilInformation() { if (!this.data) { return {}; @@ -233,12 +246,11 @@ export default { template: /*html*/ `
- - + +
-
- +
@@ -250,7 +262,7 @@ export default {
-