mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-07-04 16:06:13 +00:00
tp onthefly: add add-address (wip)
This commit is contained in:
parent
adc94aaeea
commit
3040ed9483
@ -43,11 +43,19 @@
|
|||||||
aria-describedby="phonenumber" />
|
aria-describedby="phonenumber" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<add-address
|
||||||
|
:options="this.addAddress.options"
|
||||||
|
:address-changed-callback="submitAddress"
|
||||||
|
:context="this.addAddress.context"
|
||||||
|
>
|
||||||
|
</add-address>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ThirdPartyRenderBox from '../Entity/ThirdPartyRenderBox.vue';
|
import ThirdPartyRenderBox from '../Entity/ThirdPartyRenderBox.vue';
|
||||||
|
import AddAddress from 'ChillMainAssets/vuejs/Address/components/AddAddress';
|
||||||
import { getThirdparty, postThirdparty } from '../../_api/OnTheFly';
|
import { getThirdparty, postThirdparty } from '../../_api/OnTheFly';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -55,11 +63,31 @@ export default {
|
|||||||
props: ['id', 'type', 'action'],
|
props: ['id', 'type', 'action'],
|
||||||
components: {
|
components: {
|
||||||
ThirdPartyRenderBox,
|
ThirdPartyRenderBox,
|
||||||
|
AddAddress
|
||||||
},
|
},
|
||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
thirdparty: {
|
thirdparty: {
|
||||||
type: '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();
|
resolve();
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
submitAddress(payload) {
|
||||||
|
console.log(payload);
|
||||||
|
},
|
||||||
postData() {
|
postData() {
|
||||||
postThirdparty(this.thirdparty).then(thirdparty => new Promise((resolve, reject) => {
|
postThirdparty(this.thirdparty).then(thirdparty => new Promise((resolve, reject) => {
|
||||||
this.thirdparty = thirdparty;
|
this.thirdparty = thirdparty;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user