mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-23 08:03:49 +00:00
allow to edit civility in onTheFly
This commit is contained in:
@@ -123,6 +123,7 @@ export default {
|
||||
body.email = payload.data.email;
|
||||
body.altNames = payload.data.altNames;
|
||||
body.gender = payload.data.gender;
|
||||
body.civility = payload.data.civility;
|
||||
|
||||
makeFetch('PATCH', `/api/1.0/person/person/${payload.data.id}.json`, body)
|
||||
.then(response => {
|
||||
|
@@ -150,6 +150,7 @@ export default {
|
||||
body.email = payload.data.email;
|
||||
body.altNames = payload.data.altNames;
|
||||
body.gender = payload.data.gender;
|
||||
body.civility = payload.data.civility;
|
||||
|
||||
makeFetch('PATCH', `/api/1.0/person/person/${payload.data.id}.json`, body)
|
||||
.then(response => {
|
||||
|
@@ -303,6 +303,7 @@ export default {
|
||||
'id': responsePerson.id
|
||||
},
|
||||
'start_date': {
|
||||
// TODO: use date.js methods (low priority)
|
||||
'datetime': `${new Date().toISOString().split('T')[0]}T00:00:00+02:00`
|
||||
},
|
||||
'holder': false,
|
||||
@@ -315,7 +316,7 @@ export default {
|
||||
},
|
||||
'composition': null
|
||||
};
|
||||
makeFetch('POST', '/api/1.0/person/household/members/move.json', member)
|
||||
return makeFetch('POST', '/api/1.0/person/household/members/move.json', member)
|
||||
.then(_response => {
|
||||
makeFetch('POST', `/api/1.0/person/household/${responseHousehold.id}/address.json`, address)
|
||||
.then(_response => {})
|
||||
|
@@ -87,7 +87,7 @@
|
||||
<label>{{ $t('person.gender.title') }}</label>
|
||||
</div>
|
||||
|
||||
<div v-if="action === 'create'" class="form-floating mb-3">
|
||||
<div class="form-floating mb-3">
|
||||
<select
|
||||
class="form-select form-select-lg"
|
||||
id="civility"
|
||||
@@ -223,8 +223,8 @@ export default {
|
||||
get() { return this.person.gender; }
|
||||
},
|
||||
civility: {
|
||||
set(value) { this.person.civility = {id: value}; },
|
||||
get() { return this.person.civility ? this.person.civility.id : undefined; }
|
||||
set(value) { this.person.civility = {id: value, type: 'chill_main_civility'}; },
|
||||
get() { return this.person.civility ? this.person.civility.id : null; }
|
||||
},
|
||||
birthDate: {
|
||||
set(value) {
|
||||
|
Reference in New Issue
Block a user