mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Address: courseLocation, update addressId when commit context in store
This commit is contained in:
parent
d52ab2188c
commit
0ed2dc8b13
@ -149,7 +149,7 @@ export default {
|
||||
console.log('@@@ click on Submit Temporary Address Button', payload);
|
||||
payload['locationStatusTo'] = 'address'; // <== temporary, not none, not person
|
||||
this.$store.dispatch('updateLocation', payload);
|
||||
this.$store.commit('setEditContextTrue');
|
||||
this.$store.commit('setEditContextTrue', payload);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -134,9 +134,10 @@ let initPromise = getAccompanyingCourse(id)
|
||||
state.accompanyingCourse.locationStatus = r.locationStatus;
|
||||
state.accompanyingCourse.personLocation = r.personLocation;
|
||||
},
|
||||
setEditContextTrue(state) {
|
||||
//console.log('### mutation: set edit context = true');
|
||||
setEditContextTrue(state, payload) {
|
||||
console.log('### mutation: set edit context true with addressId', payload.addressId);
|
||||
state.addressContext.edit = true;
|
||||
state.addressContext.addressId = payload.addressId;
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
@ -260,7 +261,7 @@ let initPromise = getAccompanyingCourse(id)
|
||||
})).catch((error) => { commit('catchError', error) });
|
||||
},
|
||||
updateLocation({ commit }, payload) {
|
||||
//console.log('## action: updateLocation', payload.locationStatusTo);
|
||||
console.log('## action: updateLocation', payload.locationStatusTo);
|
||||
let body = { 'type': payload.target, 'id': payload.targetId };
|
||||
let location = {};
|
||||
if (payload.locationStatusTo === 'person') { // patch for person address (don't remove addressLocation)
|
||||
|
Loading…
x
Reference in New Issue
Block a user