Skip to content

Commit

Permalink
Bugfix: Application personal details should update candidate
Browse files Browse the repository at this point in the history
  • Loading branch information
warrensearle committed Feb 20, 2023
1 parent 3ccadca commit db07af8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/views/Exercise/Applications/Application.vue
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,6 @@ export default {
},
created() {
this.pageLoad();
this.$root.$on('changeUserDetails', (obj) => this.changeUserDetails(obj));
},
destroyed() {
this.$store.dispatch('application/unbind');
Expand Down Expand Up @@ -580,13 +579,13 @@ export default {
}
return objChanged;
},
changeUserDetails(objChanged) {
changePersonalDetails(objChanged) {
if (objChanged.firstName || objChanged.lastName) {
objChanged = this.makeFullName(objChanged);
}
const myPersonalDetails = { ...this.application.personalDetails, ...objChanged };
this.$store.dispatch('application/update', { data: { personalDetails: myPersonalDetails }, id: this.applicationId });
this.changeApplication({ personalDetails: myPersonalDetails });
this.$store.dispatch('candidates/savePersonalDetails', { data: objChanged, id: this.application.userId });
logEvent('info', 'Application updated (personal details)', {
Expand All @@ -604,9 +603,6 @@ export default {
changeApplication(obj) {
this.$store.dispatch('application/update', { data: obj, id: this.applicationId });
},
changePersonalDetails(obj) {
this.changeApplication({ personalDetails: obj });
},
},
};
</script>
Expand Down

0 comments on commit db07af8

Please sign in to comment.