From c5f6ce861bd21635c70927b65bf7d6aaf08ebd88 Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Thu, 18 Jan 2024 09:20:01 +0100 Subject: [PATCH] when adding a new kontakt or address, it is possible to modify it afterwards --- public/js/components/Cis/Profil/EditProfil.js | 6 ++---- public/js/components/Cis/Profil/EditProfilSelect.js | 10 +++++----- public/js/components/Cis/Profil/ProfilComponents.js | 9 ++++++--- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/public/js/components/Cis/Profil/EditProfil.js b/public/js/components/Cis/Profil/EditProfil.js index 4f2022b0f..b033cd66a 100644 --- a/public/js/components/Cis/Profil/EditProfil.js +++ b/public/js/components/Cis/Profil/EditProfil.js @@ -39,7 +39,7 @@ export default { methods: { submitProfilChange(){ - + //TODO: check if the updated value is different from the original value before submitting the request if(this.topic && this.profilUpdate){ //? inserts new row in public.tbl_cis_profil_update @@ -94,9 +94,7 @@ export default { -
{{JSON.stringify(profilUpdate,null,2)}}
-
{{JSON.stringify(topic,null,2)}}
- + diff --git a/public/js/components/Cis/Profil/EditProfilSelect.js b/public/js/components/Cis/Profil/EditProfilSelect.js index 8e20058bb..cef314eb6 100644 --- a/public/js/components/Cis/Profil/EditProfilSelect.js +++ b/public/js/components/Cis/Profil/EditProfilSelect.js @@ -52,29 +52,29 @@ export default { addItem: function(){ this.view= this.topic == "Private Kontakte"?"EditKontakt":"EditAdresse" ; - console.log(this.view); + //? updates the topic when a Kontakt or an Address should be added this.topic = this.topic == "Private Kontakte"?"Add Kontakte":"Add Adressen" this.$emit('update:topic',this.topic); - + this.breadcrumbItems.push(this.topic); + this.$emit('update:breadcrumb',this.breadcrumbItems); this.data= this.view=="EditAdresse"? { - adresse_id: "to be defined", + adresse_id: "", strasse: "", adr_typ: "", plz: "", ort: "" }: { - kontakt_id: "to be defined", + kontakt_id: "", kontakttyp: "", kontakt: "", anmerkung: "", zustellung: false } - console.log(this.data); }, diff --git a/public/js/components/Cis/Profil/ProfilComponents.js b/public/js/components/Cis/Profil/ProfilComponents.js index baa296f78..361890251 100644 --- a/public/js/components/Cis/Profil/ProfilComponents.js +++ b/public/js/components/Cis/Profil/ProfilComponents.js @@ -205,7 +205,7 @@ const EditKontakt = {
-
+
@@ -236,9 +236,8 @@ const EditKontakt = {
-
+
-
Anmerkung
@@ -303,6 +302,10 @@ const FetchProfilUpdates = { switch(topic){ case "Private Kontakte" : return "EditKontakt"; break; case "Private Adressen" : return "EditAdresse"; break; + case "Add Adressen" : return "EditAdresse"; break; + case "Add Kontakte" : return "EditKontakt"; break; + case "Delete Adressen" : return "EditAdresse"; break; + case "Delete Kontakte" : return "EditKontakt"; break; default: return "text_input"; break; } },