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 { ...@@ -104,6 +104,13 @@ export default {
this.popup = false; this.popup = false;
this.form = true; this.form = true;
}, },
clearForm() {
this.persons = [];
this.startDate = "";
this.endDate = "";
this.comment = "";
this.absenceReason = "";
},
confirm() { confirm() {
this.handleLoading(true); this.handleLoading(true);
this.$apollo.mutate( { this.$apollo.mutate( {
...@@ -117,13 +124,9 @@ export default { ...@@ -117,13 +124,9 @@ export default {
}, },
}) })
.then(() => { .then(() => {
this.persons = []; this.clearForm()
this.startDate = ""; this.cancel();
this.endDate = ""; this.$toastSuccess("alsijil.coursebook.absences.success");
this.comment = "";
this.absenceReason = "";
this.popup = false;
$toastSuccess("alsijil.coursebook.absences.success");
}) })
.catch((error) => { .catch((error) => {
this.popup = false; 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