Adjust to teamer data api

This commit is contained in:
Björn Fromme
2019-09-28 10:26:41 +02:00
parent 9db2fd456d
commit 5713c811cc
2 changed files with 12 additions and 4 deletions
@@ -111,7 +111,17 @@
this.$store.dispatch('teamer/loadSelectableValues');
},
saveTeamerData () {
this.$store.dispatch('teamer/save', this.teamerData)
const data = {
abilities: this.userData.abilities,
jobProfiles: this.userData.jobProfiles,
availableTimeFrames: this.userData.availableTimeFrames,
jacketSize: this.userData.jacketSize,
seniority: this.userData.seniority,
wantsToLead: this.userData.wantsToLead,
monthLong: this.userData.monthLong,
notes: this.userData.notes,
};
this.$store.dispatch('teamer/save', data)
.catch(error => {
});
}
@@ -1,4 +1,3 @@
import EventBus from '../../_bus';
import axios from 'axios';
export default {
@@ -29,7 +28,7 @@ export default {
}
});
return client.put('/api/teamer/', data)
return client.put('/api/teamer-data', data)
.then(() => {
commit('alert', {
message: 'Die Änderungen wurden gespeichert',
@@ -41,7 +40,6 @@ export default {
class: 'alert-danger'
}, { root: true });
commit('logout', null, { root: true });
EventBus.$emit('forcedLogout');
throw error;
}).finally(() => {
commit('loadingFinish', null, { root: true });