tp onthefly: add add-address (wip)

This commit is contained in:
Mathieu Jaumotte 2021-09-28 16:26:59 +02:00
parent adc94aaeea
commit 3040ed9483

View File

@ -43,11 +43,19 @@
aria-describedby="phonenumber" />
</div>
<add-address
:options="this.addAddress.options"
:address-changed-callback="submitAddress"
:context="this.addAddress.context"
>
</add-address>
</div>
</template>
<script>
import ThirdPartyRenderBox from '../Entity/ThirdPartyRenderBox.vue';
import AddAddress from 'ChillMainAssets/vuejs/Address/components/AddAddress';
import { getThirdparty, postThirdparty } from '../../_api/OnTheFly';
export default {
@ -55,11 +63,31 @@ export default {
props: ['id', 'type', 'action'],
components: {
ThirdPartyRenderBox,
AddAddress
},
data: function() {
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
}
}
}
},
@ -70,6 +98,9 @@ export default {
resolve();
}));
},
submitAddress(payload) {
console.log(payload);
},
postData() {
postThirdparty(this.thirdparty).then(thirdparty => new Promise((resolve, reject) => {
this.thirdparty = thirdparty;