mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
stash commit
This commit is contained in:
parent
14a13c7bd5
commit
e2feea15f9
@ -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)
|
||||
|
@ -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) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user