stash commit

This commit is contained in:
Mathieu Jaumotte 2021-09-30 11:57:20 +02:00
parent 14a13c7bd5
commit e2feea15f9
2 changed files with 32 additions and 19 deletions

View File

@ -292,7 +292,7 @@ let initPromise = Promise.all([scopesPromise, accompanyingCoursePromise])
else if (payload.type === 'thirdparty') {
body.name = payload.data.text;
body.email = payload.data.email;
body.phonenumber = payload.data.phonenumber;
body.telephone = payload.data.phonenumber;
body.address = { address_id: payload.data.address.address_id };
console.log('id', payload.data.id, 'and body', body);
patchThirdparty(payload.data.id, body)

View File

@ -21,7 +21,7 @@
<div v-else-if="action === 'edit' || action === 'create'">
<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>
@ -42,12 +42,13 @@
v-bind:aria-label="$t('thirdparty.phonenumber')"
aria-describedby="phonenumber" />
</div>
<!--
<add-address
:context="this.context"
:options="this.addAddress.options"
:context="this.addAddress.context"
:address-changed-callback="submitAddress">
</add-address>
-->
</div>
</template>
@ -64,32 +65,44 @@ export default {
ThirdPartyRenderBox,
AddAddress
},
data: function() {
data() {
return {
thirdparty: {
type: 'thirdparty'
},
addAddress: {
context: {
},
options: {
//button: {
// text: {
// create: 'courselocation.add_temporary_address',
// edit: 'courselocation.edit_temporary_address'
// }
//},
//title: {
// create: 'courselocation.add_temporary_address',
// edit: 'courselocation.edit_temporary_address'
//},
openPanesInModal: true,
hideAddress: true
hideAddress: false,
/*
button: {
text: {
create: 'courselocation.add_temporary_address',
edit: 'courselocation.edit_temporary_address'
}
},
title: {
create: 'courselocation.add_temporary_address',
edit: 'courselocation.edit_temporary_address'
} */
}
}
}
},
computed: {
context() {
let context = {
target: {
name: this.type,
id: this.id
},
edit: false,
addressId: null
};
console.log('context', context);
return context;
},
},
methods: {
loadData(){
getThirdparty(this.id).then(thirdparty => new Promise((resolve, reject) => {