add/delete/update kontakt is possible

This commit is contained in:
SimonGschnell
2024-01-24 16:06:22 +01:00
parent 20d6a34506
commit a390eefd75
6 changed files with 115 additions and 61 deletions
@@ -66,14 +66,16 @@ export default {
this.data= this.view=="EditAdresse"?
{
added:true,
//? add flag
add:true,
adresse_id: null,
strasse: null,
adr_typ: null,
typ: null,
plz: null,
ort: null
}: {
added:true,
//? add flag
add:true,
kontakt_id: null,
kontakttyp: null,
kontakt: null,
@@ -85,7 +87,8 @@ export default {
},
deleteItem: function(item){
//? delete flag
item.data.delete = true;
this.$emit('update:profilUpdate',item.data);
//? updates the topic when a Kontakt or an Address should be deleted
this.topic = item.data.kontakt?"Delete Kontakte":"Delete Adressen";
@@ -26,6 +26,7 @@ export default {
},
template:`
<div class="gy-3 row justify-content-center align-items-center">
<!-- column 1 in the address row -->
@@ -49,9 +49,13 @@ export default {
<select :value="data.kontakttyp" @change="updateValue($event,'kontakttyp')" class="form-select" aria-label="Select Kontakttyp">
<option selected></option>
<option value="email">Email</option>
<option value="telefon">Telefon</option>
<option value="email">E-mail</option>
<option value="telefon">Telefonnummer</option>
<option value="notfallkontakt">Notfallkontakt</option>
<option value="mobil">Mobiltelefonnummer</option>
<option value="homepage">Homepage</option>
<option value="fax">Faxnummer</option>
</select>
</div>
@@ -44,7 +44,7 @@ export default {
methods: {
acceptRequest: function(){
console.log(this.data.profil_update_id);
Vue.$fhcapi.ProfilUpdate.acceptProfilRequest(this.data).then(res =>{
console.log("res",res);
console.log("res.data",res.data);
@@ -108,6 +108,7 @@ export default {
return BsModal.popup.bind(this)(null, options);
},
template: `
<bs-modal ref="modalContainer" v-bind="$props" body-class="" dialog-class="modal-lg" class="bootstrap-alert" backdrop="false" >
<template v-slot:title>
@@ -116,14 +117,15 @@ export default {
<template v-slot:default>
<!-- debugging prints
<pre>{{JSON.stringify(data.profil_update_id,null,2)}}</pre>
<pre>view {{getComponentView}}</pre>
<pre>topic {{JSON.stringify(data.topic,null,2)}}</pre>
<pre>data {{JSON.stringify(data.requested_change,null,2)}}</pre>
-->
<div class="row">
<div class="row">
<div class="form-underline mb-2 col">
<div class="form-underline-titel">Status: </div>