mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
when adding a new kontakt or address, it is possible to modify it afterwards
This commit is contained in:
@@ -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 {
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<pre>{{JSON.stringify(profilUpdate,null,2)}}</pre>
|
||||
<pre>{{JSON.stringify(topic,null,2)}}</pre>
|
||||
|
||||
|
||||
<edit-profil-select @submit="submitProfilChange" v-model:breadcrumb="breadcrumb" v-model:topic="topic" v-model:profilUpdate="profilUpdate" ariaLabel="test" :list="editData"></edit-profil-select>
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
},
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ const EditKontakt = {
|
||||
|
||||
<div class="gy-3 row align-items-center justify-content-center">
|
||||
|
||||
<div v-if="data.kontakt_id =='to be defined'" class="col-12">
|
||||
<div v-if="!data.kontakt_id" class="col-12">
|
||||
|
||||
|
||||
<div class="form-underline">
|
||||
@@ -236,9 +236,8 @@ const EditKontakt = {
|
||||
|
||||
|
||||
</div>
|
||||
<div v-if="data?.anmerkung" class="col-12">
|
||||
<div class="col-12">
|
||||
|
||||
|
||||
<div class="form-underline">
|
||||
<div class="form-underline-titel">Anmerkung</div>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user