return interchange of name and text back to how it was before -> solves one bug recreates the other

This commit is contained in:
Julie Lenaerts 2022-02-09 09:53:15 +01:00
parent 769700fe83
commit 41bddf2db6
5 changed files with 17 additions and 17 deletions

View File

@ -220,7 +220,7 @@ export default {
data = {
"type": "thirdparty",
"kind": "child",
"name": data.name,
"name": data.text,
"isChild": true,
"parent": {"type": "thirdparty", "id": this.parent.id},
"civility": {"id": data.civility},

View File

@ -159,10 +159,10 @@ export default {
.catch((error) => {
if (error.name === 'ValidationException') {
for (let v of error.violations) {
this.$toast.open({message: v });
this.$toast.open({message: v });
}
} else {
this.$toast.open({message: 'An error occurred'});
this.$toast.open({message: 'An error occurred'});
}
})
}
@ -180,10 +180,10 @@ export default {
.catch((error) => {
if (error.name === 'ValidationException') {
for (let v of error.violations) {
this.$toast.open({message: v });
this.$toast.open({message: v });
}
} else {
this.$toast.open({message: 'An error occurred'});
this.$toast.open({message: 'An error occurred'});
}
})
}

View File

@ -444,23 +444,23 @@ let initPromise = (root) => Promise.all([getScopesPromise(root), accompanyingCou
body.gender = payload.data.gender;
console.log('id', payload.data.id, 'and body', body);
patchPerson(payload.data.id, body)
.then(person => new Promise((resolve, reject) => {
console.log('patch person', person);
commit('updatePerson', { target: payload.target, person: person });
resolve();
}));
.then(person => new Promise((resolve, reject) => {
console.log('patch person', person);
commit('updatePerson', { target: payload.target, person: person });
resolve();
}));
}
else if (payload.type === 'thirdparty') {
body.name = payload.data.name;
body.name = payload.data.text;
body.email = payload.data.email;
body.telephone = payload.data.phonenumber;
body.address = { id: payload.data.address.address_id };
console.log('id', payload.data.id, 'and body', body);
patchThirdparty(payload.data.id, body)
.then(thirdparty => new Promise((resolve, reject) => {
console.log('patch thirdparty', thirdparty);
commit('updateThirdparty', { target: payload.target, thirdparty: thirdparty });
resolve();
.then(thirdparty => new Promise((resolve, reject) => {
console.log('patch thirdparty', thirdparty);
commit('updateThirdparty', { target: payload.target, thirdparty: thirdparty });
resolve();
}));
}
},

View File

@ -2,7 +2,7 @@
<div class="container tpartycontainer">
<div class="tparty-identification">
<span class="name">
{{ item.result.text }}&nbsp;
{{ item.result.text }}&nbsp;
</span>
<span class="location">
<template v-if="hasAddress">

View File

@ -84,7 +84,7 @@
</div>
<div class="form-floating mb-3">
<input class="form-control form-control-lg" id="name" v-model="thirdparty.name" v-bind:placeholder="$t('thirdparty.name')" />
<input class="form-control form-control-lg" id="name" v-model="thirdparty.text" v-bind:placeholder="$t('thirdparty.name')" />
<label for="name">{{ $t('thirdparty.name') }}</label>
</div>