Commit 7efe0276247c8d678a06d115b6a419d4dab0d399

Authored by Amber Dev
1 parent 9037797eef

made forms reset

src/pages/Attendence/teacherAttendence.vue
... ... @@ -84,7 +84,7 @@
84 84 <v-layout>
85 85 <v-flex xs12>
86 86 <label class="title text-xs-center">Add Teacher Attendence</label>
87   - <v-icon size="24" class="right" @click="addTeacherAttendenceDialog = false">cancel</v-icon>
  87 + <v-icon size="24" class="right" @click="$refs.form.reset();addTeacherAttendenceDialog = false">cancel</v-icon>
88 88 </v-flex>
89 89 </v-layout>
90 90 <v-flex xs12 class="mt-4">
... ... @@ -318,6 +318,7 @@ export default {
318 318 this.snackbar = true;
319 319 this.text = response.data.message;
320 320 this.addTeacherAttendenceDialog = false;
  321 + this.clear();
321 322 })
322 323 .catch(error => {
323 324 this.snackbar = true;
... ...
src/pages/Class/addclass.vue
... ... @@ -140,13 +140,13 @@
140 140 >Your search for "{{ search }}" found no results.</v-alert>
141 141 </v-data-table>
142 142  
143   - <!-- ****** ADD Class ****** -->
  143 + <!-- DIALOG BOX - ADD Class -->
144 144 <v-dialog v-model="addClassDialog" max-width="400px">
145 145 <v-card flat class="card-style pa-2" dark>
146 146 <v-layout>
147 147 <v-flex xs12>
148 148 <label class="title text-xs-center">Add Class</label>
149   - <v-icon size="24" class="right" @click="addClassDialog = false">cancel</v-icon>
  149 + <v-icon size="24" class="right" @click="$refs.form.reset();addClassDialog = false">cancel</v-icon>
150 150 </v-flex>
151 151 </v-layout>
152 152 <v-container fluid fill-height>
... ... @@ -316,8 +316,9 @@ export default {
316 316 this.snackbar = true;
317 317 this.text = response.data.message;
318 318 this.color = "green";
319   - this.clear();
  319 + // this.clear();
320 320 this.loading = false;
  321 + this.$refs.form.reset()
321 322 this.addClassDialog = false;
322 323 })
323 324 .catch((error) => {
... ...
src/pages/Exam/exam.vue
... ... @@ -233,7 +233,7 @@
233 233 <v-layout>
234 234 <v-flex xs12>
235 235 <label class="title text-xs-center">Add Exam</label>
236   - <v-icon size="24" class="right" @click="addExamDialog = false">cancel</v-icon>
  236 + <v-icon size="24" class="right" @click="$refs.form.reset();addExamDialog = false">cancel</v-icon>
237 237 </v-flex>
238 238 </v-layout>
239 239 <v-form ref="form" v-model="valid" lazy-validation>
... ...
src/pages/Exam/examSchedule.vue
... ... @@ -417,7 +417,7 @@
417 417 <v-layout>
418 418 <v-flex xs12>
419 419 <label class="title text-xs-center">Add Exam Schedule</label>
420   - <v-icon size="24" class="right" @click="addExamScheduleDialog = false">cancel</v-icon>
  420 + <v-icon size="24" class="right" @click="$refs.form.reset();addExamScheduleDialog = false">cancel</v-icon>
421 421 </v-flex>
422 422 </v-layout>
423 423 <v-form ref="form" v-model="valid" lazy-validation>
... ...
src/pages/Exam/grade.vue
... ... @@ -268,7 +268,7 @@
268 268 <v-layout>
269 269 <v-flex xs12>
270 270 <label class="title text-xs-center">Add Grade</label>
271   - <v-icon size="24" class="right" @click="addGradeDialog = false">cancel</v-icon>
  271 + <v-icon size="24" class="right" @click="$refs.form.reset();addGradeDialog = false">cancel</v-icon>
272 272 </v-flex>
273 273 </v-layout>
274 274 <v-form ref="form" v-model="valid" lazy-validation>
... ...
src/pages/Parent/parents.vue
... ... @@ -563,13 +563,13 @@
563 563 >Your search for "{{ search }}" found no results.</v-alert>
564 564 </v-data-table>
565 565  
566   - <!-- ****** ADD PARENTS DETAILS****** -->
  566 + <!-- ******DIALOG BOX - ADD PARENTS DETAILS****** -->
567 567 <v-dialog v-model="addParentDialog" max-width="1100px">
568 568 <v-card flat class="card-style pa-2" dark>
569 569 <v-layout>
570 570 <v-flex xs12>
571 571 <label class="title text-xs-center">Add Parent</label>
572   - <v-icon size="24" class="right" @click="addParentDialog = false">cancel</v-icon>
  572 + <v-icon size="24" class="right" @click="$refs.parentForm.reset();addParentDialog = false">cancel</v-icon>
573 573 </v-flex>
574 574 </v-layout>
575 575 <v-container fluid fill-height>
... ...
src/pages/Section/section.vue
... ... @@ -235,13 +235,13 @@
235 235 </v-data-table>
236 236 <!-- </v-tab-item> -->
237 237  
238   - <!-- ****** ADD Students Dialog box****** -->
  238 + <!-- DIALOG BOX - ADD Students Dialog box -->
239 239 <v-dialog v-model="addSectionDialog" max-width="400px">
240 240 <v-card flat class="card-style pa-2" dark>
241 241 <v-layout>
242 242 <v-flex xs12>
243 243 <label class="title text-xs-center">Add Section</label>
244   - <v-icon size="24" class="right" @click="addSectionDialog = false">cancel</v-icon>
  244 + <v-icon size="24" class="right" @click="$refs.form.reset();addSectionDialog = false">cancel</v-icon>
245 245 </v-flex>
246 246 </v-layout>
247 247 <v-container fluid fill-height>
... ...
src/pages/Teachers/teachers.vue
... ... @@ -562,13 +562,13 @@
562 562 >Your search for "{{ search }}" found no results.</v-alert>
563 563 </v-data-table>
564 564  
565   - <!-- ****** Add Teachers Data****** -->
  565 + <!-- ****** DIALOG BOX - Add Teachers Data****** -->
566 566 <v-dialog v-model="addTeacherDialog" max-width="1160">
567 567 <v-card flat class="card-style pa-2" dark>
568 568 <v-layout>
569 569 <v-flex xs12 class="pa-0">
570 570 <label class="title text-xs-center">Add Teacher</label>
571   - <v-icon size="24" class="right" @click="addTeacherDialog = false">cancel</v-icon>
  571 + <v-icon size="24" class="right" @click="$refs.form.reset();addTeacherDialog = false">cancel</v-icon>
572 572 </v-flex>
573 573 </v-layout>
574 574 <v-form ref="form" v-model="valid" lazy-validation>
... ...
src/pages/User/user.vue
... ... @@ -474,13 +474,13 @@
474 474 icon="warning"
475 475 >Your search for "{{ search }}" found no results.</v-alert>
476 476 </v-data-table>
477   - <!-- ****** Add User Data****** -->
  477 + <!-- DIALOG BOX - Add User Data -->
478 478 <v-dialog v-model="addUserDialog" max-width="900px">
479 479 <v-card flat class="card-style pa-2" dark>
480 480 <v-layout>
481 481 <v-flex xs12>
482 482 <label class="title text-xs-center">Add User</label>
483   - <v-icon size="24" class="right" @click="addUserDialog = false">cancel</v-icon>
  483 + <v-icon size="24" class="right" @click="$refs.form.reset();addUserDialog = false">cancel</v-icon>
484 484 </v-flex>
485 485 </v-layout>
486 486 <v-form ref="form" v-model="valid" lazy-validation>
... ...