now i have to find id+method from payload

This commit is contained in:
Mathieu Jaumotte 2021-05-21 16:59:38 +02:00
parent 21f75c8a63
commit 132f11298e
2 changed files with 9 additions and 3 deletions

View File

@ -56,7 +56,13 @@ export default {
}, },
updateSocialIssues(value) { updateSocialIssues(value) {
console.log('@@@ CHANGE value', value); console.log('@@@ CHANGE value', value);
this.$store.dispatch('updateSocialIssues', value); this.$store.dispatch('updateSocialIssues', this.transformValue(value));
},
transformValue(value) {
let payload = value;
let body = {}; //{ type: "social_issue", id: 5 };
let method = ''; //'POST' : 'DELETE';
return { payload, body, method };
} }
} }
} }

View File

@ -178,8 +178,8 @@ let initPromise = getAccompanyingCourse(id)
resolve(); resolve();
})).catch((error) => { commit('catchError', error) }); })).catch((error) => { commit('catchError', error) });
}, },
updateSocialIssues({ commit }, payload) { updateSocialIssues({ commit }, { payload, body, method }) {
console.log('## action: payload', payload); console.log('## action: payload', { payload, body, method });
//postSocialIssue(id, body, method) //postSocialIssue(id, body, method)
//.then(response => new Promise((resolve, reject) => { //.then(response => new Promise((resolve, reject) => {