mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
courselocation in pause. we have to make changes in AddAddress component.
This commit is contained in:
parent
ad55cc0477
commit
61f6e95281
@ -5,25 +5,20 @@
|
|||||||
</h2>
|
</h2>
|
||||||
<div class="my-4">
|
<div class="my-4">
|
||||||
|
|
||||||
<div>
|
<show-address
|
||||||
<show-address
|
v-if="address"
|
||||||
v-if="address"
|
v-bind:address="address">
|
||||||
v-bind:address="address">
|
</show-address>
|
||||||
</show-address>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!--ul class="record_actions">
|
<ul class="record_actions">
|
||||||
<li>
|
<li>
|
||||||
<button class="btn btn-create" type="button" name="button">
|
<add-address
|
||||||
{{ $t('courselocation.add_temp_address') }}
|
modalAddTitle="courselocation.add_temp_address"
|
||||||
</button>
|
modalEditTitle="courselocation.edit_temp_address"
|
||||||
|
@addNewAddress="addTemporaryAddress">
|
||||||
|
</add-address>
|
||||||
</li>
|
</li>
|
||||||
</ul-->
|
</ul>
|
||||||
<add-address
|
|
||||||
modalAddTitle="courselocation.add_temp_address"
|
|
||||||
modalEditTitle="courselocation.edit_temp_address"
|
|
||||||
@addNewAddress="addTemporaryAddress">
|
|
||||||
</add-address>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -39,10 +34,64 @@ export default {
|
|||||||
AddAddress,
|
AddAddress,
|
||||||
ShowAddress
|
ShowAddress
|
||||||
},
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
/*
|
||||||
|
address: {},
|
||||||
|
errors: {},
|
||||||
|
loading: false,
|
||||||
|
success: false
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
addTemporaryAddress({ address, modal }) {
|
addTemporaryAddress({ address, modal }) {
|
||||||
console.log('@@@ CLICK button addTemporaryAdress', address);
|
console.log('@@@ CLICK button addTemporaryAdress', address);
|
||||||
|
|
||||||
|
/*
|
||||||
|
let newAddress = {
|
||||||
|
'isNoAddress': address.isNoAddress,
|
||||||
|
'street': address.isNoAddress ? '' : address.street,
|
||||||
|
'streetNumber': address.isNoAddress ? '' : address.streetNumber,
|
||||||
|
'postcode': {'id': address.selected.city.id},
|
||||||
|
'floor': address.floor,
|
||||||
|
'corridor': address.corridor,
|
||||||
|
'steps': address.steps,
|
||||||
|
'flat': address.flat,
|
||||||
|
'buildingName': address.buildingName,
|
||||||
|
'distribution': address.distribution,
|
||||||
|
'extra': address.extra
|
||||||
|
};
|
||||||
|
|
||||||
|
if (address.selected.address.point !== undefined){
|
||||||
|
newAddress = Object.assign(newAddress, {
|
||||||
|
'point': address.selected.address.point.coordinates
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (address.writeNewPostalCode){
|
||||||
|
let newPostalCode = address.newPostalCode;
|
||||||
|
newPostalCode = Object.assign(newPostalCode, {
|
||||||
|
'country': {'id': address.selected.country.id },
|
||||||
|
});
|
||||||
|
newAddress = Object.assign(newAddress, {
|
||||||
|
'newPostalCode': newPostalCode
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('===> ', this.addressId, newAddress);
|
||||||
|
|
||||||
|
if (this.edit){
|
||||||
|
this.$store.dispatch('updateAddress', {
|
||||||
|
addressId: this.addressId,
|
||||||
|
newAddress: newAddress
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$store.dispatch('addAddress', newAddress);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
modal.showModal = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user