Skip to content
Snippets Groups Projects
Commit bafa39d3 authored by permcu's avatar permcu
Browse files

Update absence-creation-dialog's success handling

parent a7e98030
No related branches found
No related tags found
1 merge request!356Add dialog for creation of long-term absences
......@@ -104,6 +104,13 @@ export default {
this.popup = false;
this.form = true;
},
clearForm() {
this.persons = [];
this.startDate = "";
this.endDate = "";
this.comment = "";
this.absenceReason = "";
},
confirm() {
this.handleLoading(true);
this.$apollo.mutate( {
......@@ -117,13 +124,9 @@ export default {
},
})
.then(() => {
this.persons = [];
this.startDate = "";
this.endDate = "";
this.comment = "";
this.absenceReason = "";
this.popup = false;
$toastSuccess("alsijil.coursebook.absences.success");
this.clearForm()
this.cancel();
this.$toastSuccess("alsijil.coursebook.absences.success");
})
.catch((error) => {
this.popup = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment