mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
AddAddress option buttonType: component manage button in edit or create context
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
ref="addAddress">
|
||||
</add-address>
|
||||
</li>
|
||||
<li v-if="isContextEdit && isPersonLocation">
|
||||
<li v-if="isPersonLocation">
|
||||
<button
|
||||
class="btn btn-remove"
|
||||
@click="removeAddress"
|
||||
@@ -112,10 +112,6 @@ export default {
|
||||
}
|
||||
this.$store.commit('setAddressContext', context);
|
||||
},
|
||||
initAddressOptions() {
|
||||
// here button.type is a contextual option
|
||||
this.$refs.addAddress.$data.default.button.type = this.isContextEdit ? 'btn-update' : '';
|
||||
},
|
||||
removeAddress() {
|
||||
console.log('remove address');
|
||||
let payload = {
|
||||
@@ -133,11 +129,11 @@ export default {
|
||||
let payload = this.$refs.addAddress.submitNewAddress();
|
||||
payload['locationStatusTo'] = 'address'; // <== temporary, not none, not person
|
||||
this.$store.dispatch('updateLocation', payload);
|
||||
this.$store.commit('setEditContextTrue');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initAddressContext();
|
||||
this.initAddressOptions();
|
||||
|
||||
console.log('ac.locationStatus', this.accompanyingCourse.locationStatus);
|
||||
console.log('ac.location (temporary location)', this.accompanyingCourse.location);
|
||||
|
Reference in New Issue
Block a user