Adjust to teamer data api
This commit is contained in:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user