mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
return interchange of name and text back to how it was before -> solves one bug recreates the other
This commit is contained in:
parent
769700fe83
commit
41bddf2db6
@ -220,7 +220,7 @@ export default {
|
|||||||
data = {
|
data = {
|
||||||
"type": "thirdparty",
|
"type": "thirdparty",
|
||||||
"kind": "child",
|
"kind": "child",
|
||||||
"name": data.name,
|
"name": data.text,
|
||||||
"isChild": true,
|
"isChild": true,
|
||||||
"parent": {"type": "thirdparty", "id": this.parent.id},
|
"parent": {"type": "thirdparty", "id": this.parent.id},
|
||||||
"civility": {"id": data.civility},
|
"civility": {"id": data.civility},
|
||||||
|
@ -159,10 +159,10 @@ export default {
|
|||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
if (error.name === 'ValidationException') {
|
if (error.name === 'ValidationException') {
|
||||||
for (let v of error.violations) {
|
for (let v of error.violations) {
|
||||||
this.$toast.open({message: v });
|
this.$toast.open({message: v });
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$toast.open({message: 'An error occurred'});
|
this.$toast.open({message: 'An error occurred'});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -180,10 +180,10 @@ export default {
|
|||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
if (error.name === 'ValidationException') {
|
if (error.name === 'ValidationException') {
|
||||||
for (let v of error.violations) {
|
for (let v of error.violations) {
|
||||||
this.$toast.open({message: v });
|
this.$toast.open({message: v });
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$toast.open({message: 'An error occurred'});
|
this.$toast.open({message: 'An error occurred'});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -444,23 +444,23 @@ let initPromise = (root) => Promise.all([getScopesPromise(root), accompanyingCou
|
|||||||
body.gender = payload.data.gender;
|
body.gender = payload.data.gender;
|
||||||
console.log('id', payload.data.id, 'and body', body);
|
console.log('id', payload.data.id, 'and body', body);
|
||||||
patchPerson(payload.data.id, body)
|
patchPerson(payload.data.id, body)
|
||||||
.then(person => new Promise((resolve, reject) => {
|
.then(person => new Promise((resolve, reject) => {
|
||||||
console.log('patch person', person);
|
console.log('patch person', person);
|
||||||
commit('updatePerson', { target: payload.target, person: person });
|
commit('updatePerson', { target: payload.target, person: person });
|
||||||
resolve();
|
resolve();
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
else if (payload.type === 'thirdparty') {
|
else if (payload.type === 'thirdparty') {
|
||||||
body.name = payload.data.name;
|
body.name = payload.data.text;
|
||||||
body.email = payload.data.email;
|
body.email = payload.data.email;
|
||||||
body.telephone = payload.data.phonenumber;
|
body.telephone = payload.data.phonenumber;
|
||||||
body.address = { id: payload.data.address.address_id };
|
body.address = { id: payload.data.address.address_id };
|
||||||
console.log('id', payload.data.id, 'and body', body);
|
console.log('id', payload.data.id, 'and body', body);
|
||||||
patchThirdparty(payload.data.id, body)
|
patchThirdparty(payload.data.id, body)
|
||||||
.then(thirdparty => new Promise((resolve, reject) => {
|
.then(thirdparty => new Promise((resolve, reject) => {
|
||||||
console.log('patch thirdparty', thirdparty);
|
console.log('patch thirdparty', thirdparty);
|
||||||
commit('updateThirdparty', { target: payload.target, thirdparty: thirdparty });
|
commit('updateThirdparty', { target: payload.target, thirdparty: thirdparty });
|
||||||
resolve();
|
resolve();
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div class="container tpartycontainer">
|
<div class="container tpartycontainer">
|
||||||
<div class="tparty-identification">
|
<div class="tparty-identification">
|
||||||
<span class="name">
|
<span class="name">
|
||||||
{{ item.result.text }}
|
{{ item.result.text }}
|
||||||
</span>
|
</span>
|
||||||
<span class="location">
|
<span class="location">
|
||||||
<template v-if="hasAddress">
|
<template v-if="hasAddress">
|
||||||
|
@ -84,7 +84,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-floating mb-3">
|
<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>
|
<label for="name">{{ $t('thirdparty.name') }}</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user