Adjust to teamer data api
This commit is contained in:
@@ -111,7 +111,17 @@
|
|||||||
this.$store.dispatch('teamer/loadSelectableValues');
|
this.$store.dispatch('teamer/loadSelectableValues');
|
||||||
},
|
},
|
||||||
saveTeamerData () {
|
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 => {
|
.catch(error => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import EventBus from '../../_bus';
|
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -29,7 +28,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return client.put('/api/teamer/', data)
|
return client.put('/api/teamer-data', data)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
commit('alert', {
|
commit('alert', {
|
||||||
message: 'Die Änderungen wurden gespeichert',
|
message: 'Die Änderungen wurden gespeichert',
|
||||||
@@ -41,7 +40,6 @@ export default {
|
|||||||
class: 'alert-danger'
|
class: 'alert-danger'
|
||||||
}, { root: true });
|
}, { root: true });
|
||||||
commit('logout', null, { root: true });
|
commit('logout', null, { root: true });
|
||||||
EventBus.$emit('forcedLogout');
|
|
||||||
throw error;
|
throw error;
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
commit('loadingFinish', null, { root: true });
|
commit('loadingFinish', null, { root: true });
|
||||||
|
|||||||
Reference in New Issue
Block a user