Commit 04165779ed4a623302d47fc48fc4bb1be7936efa
1 parent
5c102c7051
Exists in
master
and in
3 other branches
implement parents form in student school management dashboard
Showing
3 changed files
with
1236 additions
and
979 deletions
Show diff stats
src/Services/http.js
... | ... | @@ -3,10 +3,10 @@ import store from '@/store/store' |
3 | 3 | |
4 | 4 | export default () => { |
5 | 5 | return axios.create({ |
6 | - // baseURL:'http://192.168.2.221:3002/v1', | |
7 | - baseURL:'http://13.234.251.173:8001/v1', | |
6 | + // baseURL:'http://192.168.2.221:3002/v1', | |
7 | + baseURL: 'http://13.234.251.173:8001/v1', | |
8 | 8 | headers: { |
9 | 9 | Authorization: `Bearer ${store.state.token}` |
10 | - } | |
10 | + } | |
11 | 11 | }) |
12 | 12 | -} |
13 | +} | |
13 | 14 | \ No newline at end of file | ... | ... |
src/pages/Students/students.vue
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 | <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition"> |
20 | 20 | <v-btn icon large flat slot="activator"> |
21 | 21 | <v-avatar size="40px"> |
22 | - <img src="/static/icon/user.png"> | |
22 | + <img src="/static/icon/user.png" /> | |
23 | 23 | </v-avatar> |
24 | 24 | </v-btn> |
25 | 25 | <v-list class="pa-0"> |
... | ... | @@ -73,10 +73,12 @@ |
73 | 73 | color="success" |
74 | 74 | >{{ text }}</v-snackbar> |
75 | 75 | <v-dialog v-model="dialog" max-width="1300px" scrollable> |
76 | - <v-card flat> | |
77 | - <v-toolbar color="grey lighten-2" flat> | |
76 | + <v-card flat> | |
77 | + <v-toolbar color="grey lighten-2" flat> | |
78 | 78 | <v-spacer></v-spacer> |
79 | - <v-toolbar-title><h3>Edit Student Profile</h3></v-toolbar-title> | |
79 | + <v-toolbar-title> | |
80 | + <h3>Edit Student Profile</h3> | |
81 | + </v-toolbar-title> | |
80 | 82 | <v-spacer></v-spacer> |
81 | 83 | </v-toolbar> |
82 | 84 | <v-card-text style="height: 800px;"> |
... | ... | @@ -88,15 +90,20 @@ |
88 | 90 | class="text-xs-center text-sm-center text-md-center text-lg-center mr-4" |
89 | 91 | > |
90 | 92 | <v-avatar size="160px"> |
91 | - <img src="/static/icon/user.png" v-if="!editedItem.profilePicUrl && !imageUrl"> | |
92 | - <img :src="editedItem.profilePicUrl" v-else-if="editedItem.profilePicUrl && !imageUrl"> | |
93 | 93 | <img |
94 | - | |
95 | - v-if="imageUrl" | |
96 | - :src="imageUrl" | |
97 | - height="150" | |
98 | - style="border-radius:50%; width:200px" | |
99 | - > | |
94 | + src="/static/icon/user.png" | |
95 | + v-if="!editedItem.profilePicUrl && !imageUrl" | |
96 | + /> | |
97 | + <img | |
98 | + :src="editedItem.profilePicUrl" | |
99 | + v-else-if="editedItem.profilePicUrl && !imageUrl" | |
100 | + /> | |
101 | + <img | |
102 | + v-if="imageUrl" | |
103 | + :src="imageUrl" | |
104 | + height="150" | |
105 | + style="border-radius:50%; width:200px" | |
106 | + /> | |
100 | 107 | </v-avatar> |
101 | 108 | <input |
102 | 109 | type="file" |
... | ... | @@ -104,7 +111,7 @@ |
104 | 111 | ref="image" |
105 | 112 | accept="image/*" |
106 | 113 | @change="onFilePicked" |
107 | - > | |
114 | + /> | |
108 | 115 | </v-flex> |
109 | 116 | </v-layout> |
110 | 117 | <v-layout> |
... | ... | @@ -145,7 +152,7 @@ |
145 | 152 | </v-flex> |
146 | 153 | </v-layout> |
147 | 154 | </v-flex> |
148 | - <v-flex xs12 sm4> | |
155 | + <v-flex xs12 sm4> | |
149 | 156 | <v-layout> |
150 | 157 | <v-flex xs4 class="pt-4 subheading"> |
151 | 158 | <label class="right">Full Name:</label> |
... | ... | @@ -229,7 +236,7 @@ |
229 | 236 | </v-layout> |
230 | 237 | </v-flex> |
231 | 238 | </v-layout> |
232 | - <v-layout> | |
239 | + <v-layout> | |
233 | 240 | <v-flex xs12 sm4> |
234 | 241 | <v-layout> |
235 | 242 | <v-flex xs4 class="pt-4 subheading"> |
... | ... | @@ -277,7 +284,7 @@ |
277 | 284 | </v-layout> |
278 | 285 | </v-flex> |
279 | 286 | </v-layout> |
280 | - <v-layout> | |
287 | + <v-layout> | |
281 | 288 | <v-flex xs12 sm4> |
282 | 289 | <v-layout> |
283 | 290 | <v-flex xs4 class="pt-4 subheading"> |
... | ... | @@ -387,978 +394,146 @@ |
387 | 394 | :items="countries" |
388 | 395 | placeholder="Select Country Name" |
389 | 396 | required |
390 | - ></v-autocomplete> | |
391 | - </v-flex> | |
392 | - </v-layout> | |
393 | - </v-flex> | |
394 | - <v-flex xs12 sm4> | |
395 | - <v-layout> | |
396 | - <v-flex xs4 class="pt-4 subheading"> | |
397 | - <label class="right">Gender:</label> | |
398 | - </v-flex> | |
399 | - <v-flex xs8 class="ml-3"> | |
400 | - <v-select | |
401 | - :items="gender" | |
402 | - v-model="editedItem.gender" | |
403 | - placeholder="Select Gender" | |
404 | - required | |
405 | - ></v-select> | |
406 | - </v-flex> | |
407 | - </v-layout> | |
408 | - </v-flex> | |
409 | - <v-flex xs12 sm4> | |
410 | - <v-layout> | |
411 | - <v-flex xs4 class="pt-4 subheading"> | |
412 | - <label class="right">Father Name:</label> | |
413 | - </v-flex> | |
414 | - <v-flex xs8 class="ml-3"> | |
415 | - <v-text-field | |
416 | - v-model="editedItem.fatherName" | |
417 | - :items="countries" | |
418 | - placeholder="Fill your father Name" | |
419 | - required | |
420 | - ></v-text-field> | |
421 | - </v-flex> | |
422 | - </v-layout> | |
423 | - </v-flex> | |
424 | - </v-layout> | |
425 | - <v-layout> | |
426 | - <v-flex xs12 sm4> | |
427 | - <v-layout> | |
428 | - <v-flex xs4 class="pt-4 subheading"> | |
429 | - <label class="right">Father Cell No:</label> | |
430 | - </v-flex> | |
431 | - <v-flex xs8 class="ml-3"> | |
432 | - <v-text-field | |
433 | - v-model="editedItem.fatherCellNo" | |
434 | - placeholder="fill your father Cell Number" | |
435 | - name="state" | |
436 | - type="number" | |
437 | - required | |
438 | - ></v-text-field> | |
439 | - </v-flex> | |
440 | - </v-layout> | |
441 | - </v-flex> | |
442 | - <v-flex xs12 sm4> | |
443 | - <v-layout> | |
444 | - <v-flex xs4 class="pt-4 subheading"> | |
445 | - <label class="right">Mother Name:</label> | |
446 | - </v-flex> | |
447 | - <v-flex xs8 class="ml-3"> | |
448 | - <v-text-field | |
449 | - v-model="editedItem.motherName" | |
450 | - placeholder="fill your Mother Name" | |
451 | - name="state" | |
452 | - type="text" | |
453 | - required | |
454 | - ></v-text-field> | |
455 | - </v-flex> | |
456 | - </v-layout> | |
457 | - </v-flex> | |
458 | - <v-flex xs12 sm4> | |
459 | - <v-layout> | |
460 | - <v-flex xs4 class="pt-4 subheading"> | |
461 | - <label class="right">Mother Cell No:</label> | |
462 | - </v-flex> | |
463 | - <v-flex xs8 class="ml-3"> | |
464 | - <v-text-field | |
465 | - v-model="editedItem.motherCellNo" | |
466 | - placeholder="fill your Mother Cell Number" | |
467 | - name="state" | |
468 | - type="number" | |
469 | - required | |
470 | - ></v-text-field> | |
471 | - </v-flex> | |
472 | - </v-layout> | |
473 | - </v-flex> | |
474 | - </v-layout> | |
475 | - <!-- <v-layout> | |
476 | - <v-flex xs12 sm4> | |
477 | - <v-layout> | |
478 | - <v-flex xs4 class="pt-4 subheading"> | |
479 | - <label class="right">Academic Year:</label> | |
480 | - </v-flex> | |
481 | - <v-flex xs8 class="ml-3"> | |
482 | - <v-text-field | |
483 | - v-model="editedItem.establishmentYear" | |
484 | - placeholder="fill your Mother Name" | |
485 | - name="state" | |
486 | - type="number" | |
487 | - required | |
488 | - ></v-text-field> | |
489 | - </v-flex> | |
490 | - </v-layout> | |
491 | - </v-flex> | |
492 | - </v-layout> --> | |
493 | - <v-layout> | |
494 | - <v-flex xs12> | |
495 | - <v-layout> | |
496 | - <v-flex xs1 class="pt-4 subheading" style="flex-basis: 13.333333% !important; max-width: 13.333333% !important;"> | |
497 | - <label class="right">Present Address:</label> | |
498 | - </v-flex> | |
499 | - <v-flex xs11 class="ml-2"> | |
500 | - <v-text-field | |
501 | - v-model="editedItem.presentAddress" | |
502 | - placeholder="fill Your present Address" | |
503 | - required | |
504 | - ></v-text-field> | |
505 | - </v-flex> | |
506 | - </v-layout> | |
507 | - </v-flex> | |
508 | - </v-layout> | |
509 | - <v-layout> | |
510 | - <v-flex xs12> | |
511 | - <v-layout> | |
512 | - <v-flex xs1 class="pt-4 subheading" style="flex-basis: 13.333333% !important; max-width: 13.333333% !important;"> | |
513 | - <label class="right">Permanent Address:</label> | |
514 | - </v-flex> | |
515 | - <v-flex xs11 class="ml-2"> | |
516 | - <v-textarea | |
517 | - rows="1" | |
518 | - v-model="editedItem.permanentAddress" | |
519 | - placeholder="fill Your Permanent Address" | |
520 | - required | |
521 | - ></v-textarea> | |
522 | - </v-flex> | |
523 | - </v-layout> | |
524 | - </v-flex> | |
525 | - </v-layout> | |
526 | - <v-layout> | |
527 | - <v-flex xs12 sm12> | |
528 | - <v-card-actions> | |
529 | - <v-btn round dark @click.native="close">Cancel</v-btn> | |
530 | - <v-spacer></v-spacer> | |
531 | - <v-btn round dark @click="save">Save</v-btn> | |
532 | - </v-card-actions> | |
533 | - </v-flex> | |
534 | - </v-layout> | |
535 | - </v-container> | |
536 | - </v-form> | |
537 | - </v-card-text> | |
538 | - </v-card> | |
539 | - </v-dialog> | |
540 | - | |
541 | - <!-- ****** PROFILE VIEW STUDENTS DEATILS ****** --> | |
542 | - | |
543 | - <v-dialog v-model="dialog1" max-width="800px" scrollable> | |
544 | - <v-card> | |
545 | - <v-toolbar color="grey lighten-2" flat> | |
546 | - <v-spacer></v-spacer> | |
547 | - <v-toolbar-title>Student Profile</v-toolbar-title> | |
548 | - <v-spacer></v-spacer> | |
549 | - <v-icon @click="close1">close</v-icon> | |
550 | - </v-toolbar> | |
551 | - <v-card-text style="height: 700px;"> | |
552 | - <v-flex align-center justify-center layout text-xs-center class="mt-3"> | |
553 | - <v-avatar size="160px"> | |
554 | - <img src="/static/icon/user.png" v-if="!editedItem.profilePicUrl"> | |
555 | - <img :src="editedItem.profilePicUrl" v-else-if="editedItem.profilePicUrl"> | |
556 | - </v-avatar> | |
557 | - </v-flex> | |
558 | - <v-container grid-list-md> | |
559 | - <v-layout wrap> | |
560 | - <v-flex> | |
561 | - <v-layout> | |
562 | - <v-flex xs12 sm6> | |
563 | - <v-layout> | |
564 | - <v-flex xs6 sm5> | |
565 | - <h5 class="right my-1"><b>Full Name:</b></h5> | |
566 | - </v-flex> | |
567 | - <v-flex sm7 xs6> | |
568 | - <h5 class="my-1 left">{{ editedItem.name }}</h5> | |
569 | - </v-flex> | |
570 | - </v-layout> | |
571 | - </v-flex> | |
572 | - <v-flex xs12 sm6> | |
573 | - <v-layout> | |
574 | - <v-flex xs4 sm4> | |
575 | - <h5 class="right my-1"><b>Email:</b></h5> | |
576 | - </v-flex> | |
577 | - <v-flex sm8 xs8> | |
578 | - <h5 class="my-1 left">{{ editedItem.email }}</h5> | |
579 | - </v-flex> | |
580 | - </v-layout> | |
581 | - </v-flex> | |
582 | - </v-layout> | |
583 | - <v-layout> | |
584 | - <v-flex xs6 sm6> | |
585 | - <v-layout> | |
586 | - <v-flex xs4 sm5> | |
587 | - <b><h5 class="right my-1"><b>Gender:</b></h5></b> | |
588 | - </v-flex> | |
589 | - <v-flex sm7 xs8> | |
590 | - <h5 class="my-1 left">{{ editedItem.gender }}</h5> | |
591 | - </v-flex> | |
592 | - </v-layout> | |
593 | - </v-flex> | |
594 | - <v-flex xs6 sm6> | |
595 | - <v-layout> | |
596 | - <v-flex xs4 sm4> | |
597 | - <b><h5 class="right my-1"><b>D.O.B:</b></h5></b> | |
598 | - </v-flex> | |
599 | - <v-flex sm7 xs8> | |
600 | - <h5 class="my-1">{{ dates(editedItem.dob) }}</h5> | |
601 | - </v-flex> | |
602 | - </v-layout> | |
603 | - </v-flex> | |
604 | - </v-layout> | |
605 | - <v-layout> | |
606 | - <v-flex xs6 sm6> | |
607 | - <v-layout> | |
608 | - <v-flex xs4 sm5> | |
609 | - <b><h5 class="right my-1"><b>Blood Group:</b></h5></b> | |
610 | - </v-flex> | |
611 | - <v-flex sm7 xs8> | |
612 | - <h5 class="my-1 left">{{ editedItem.bloodGroup }}</h5> | |
613 | - </v-flex> | |
614 | - </v-layout> | |
615 | - </v-flex> | |
616 | - <v-flex xs6 sm6> | |
617 | - <v-layout> | |
618 | - <v-flex xs4 sm4> | |
619 | - <b><h5 class="right my-1"><b>Allergies:</b></h5></b> | |
620 | - </v-flex> | |
621 | - <v-flex sm8 xs8> | |
622 | - <h5 class="my-1">{{ editedItem.allergies }}</h5> | |
623 | - </v-flex> | |
624 | - </v-layout> | |
625 | - </v-flex> | |
626 | - </v-layout> | |
627 | - <v-layout> | |
628 | - <v-flex xs6 sm6> | |
629 | - <v-layout> | |
630 | - <v-flex xs4 sm5> | |
631 | - <b><h5 class="right my-1"><b>Height:</b></h5></b> | |
632 | - </v-flex> | |
633 | - <v-flex sm7 xs8> | |
634 | - <h5 class="my-1 left">{{ editedItem.height }}</h5> | |
635 | - </v-flex> | |
636 | - </v-layout> | |
637 | - </v-flex> | |
638 | - <v-flex xs6 sm6> | |
639 | - <v-layout> | |
640 | - <v-flex xs4 sm4> | |
641 | - <b><h5 class="right my-1"><b>Weight:</b></h5></b> | |
642 | - </v-flex> | |
643 | - <v-flex sm8 xs8> | |
644 | - <h5 class="my-1">{{ editedItem.weight }}</h5> | |
645 | - </v-flex> | |
646 | - </v-layout> | |
647 | - </v-flex> | |
648 | - </v-layout> | |
649 | - <v-layout> | |
650 | - <v-flex xs6 sm6> | |
651 | - <v-layout> | |
652 | - <v-flex xs4 sm5> | |
653 | - <b><h5 class="right my-1"><b>City:</b></h5></b> | |
654 | - </v-flex> | |
655 | - <v-flex sm7 xs8> | |
656 | - <h5 class="my-1 left">{{ editedItem.city }}</h5> | |
657 | - </v-flex> | |
658 | - </v-layout> | |
659 | - </v-flex> | |
660 | - <v-flex xs6 sm6> | |
661 | - <v-layout> | |
662 | - <v-flex xs4 sm4> | |
663 | - <b><h5 class="right my-1"><b>State:</b></h5></b> | |
664 | - </v-flex> | |
665 | - <v-flex sm8 xs8> | |
666 | - <h5 class="my-1">{{ editedItem.state }}</h5> | |
667 | - </v-flex> | |
668 | - </v-layout> | |
669 | - </v-flex> | |
670 | - </v-layout> | |
671 | - <v-layout> | |
672 | - <v-flex xs6 sm6> | |
673 | - <v-layout> | |
674 | - <v-flex xs4 sm5> | |
675 | - <b><h5 class="right my-1"><b>Pincode:</b></h5></b> | |
676 | - </v-flex> | |
677 | - <v-flex sm7 xs8> | |
678 | - <h5 class="my-1">{{ editedItem.pincode }}</h5> | |
679 | - </v-flex> | |
680 | - </v-layout> | |
681 | - </v-flex> | |
682 | - <v-flex xs5 sm5> | |
683 | - <v-layout> | |
684 | - <v-flex xs4 sm5> | |
685 | - <b><h5 class="right my-1"><b>Country:</b></h5></b> | |
686 | - </v-flex> | |
687 | - <v-flex sm7 xs8> | |
688 | - <h5 class="my-1">{{ editedItem.country }}</h5> | |
689 | - </v-flex> | |
690 | - </v-layout> | |
691 | - </v-flex> | |
692 | - </v-layout> | |
693 | - <v-layout> | |
694 | - <v-flex xs5 sm6> | |
695 | - <v-layout> | |
696 | - <v-flex sm5 xs8> | |
697 | - <b><h5 class="right my-1"><b>Mobile No:</b></h5></b> | |
698 | - </v-flex> | |
699 | - <v-flex sm6 xs8> | |
700 | - <h5 class="my-1">{{ editedItem.mobile }}</h5> | |
701 | - </v-flex> | |
702 | - </v-layout> | |
703 | - </v-flex> | |
704 | - <v-flex xs5 sm6> | |
705 | - <v-layout> | |
706 | - <v-flex xs5 sm4> | |
707 | - <b><h5 class="right my-1"><b>Fahter Name:</b></h5></b> | |
708 | - </v-flex> | |
709 | - <v-flex sm8 xs8> | |
710 | - <h5 class="my-1">{{ editedItem.fatherName }}</h5> | |
711 | - </v-flex> | |
712 | - </v-layout> | |
713 | - </v-flex> | |
714 | - </v-layout> | |
715 | - <v-layout> | |
716 | - <v-flex xs6 sm5> | |
717 | - <v-layout> | |
718 | - <v-flex xs4 sm6> | |
719 | - <b> <h5 class="right my-1"><b>Mother Name:</b></h5></b> | |
720 | - </v-flex> | |
721 | - <v-flex sm6 xs8> | |
722 | - <h5 class="my-1">{{ editedItem.motherName }}</h5> | |
723 | - </v-flex> | |
724 | - </v-layout> | |
725 | - </v-flex> | |
726 | - <v-flex xs6 sm6> | |
727 | - <v-layout> | |
728 | - <v-flex xs4 sm6> | |
729 | - <b><h5 class="right my-1"><b>Father Cell No:</b></h5></b> | |
730 | - </v-flex> | |
731 | - <v-flex sm6 xs8> | |
732 | - <h5 class="my-1">{{ editedItem.fatherCellNo }}</h5> | |
733 | - </v-flex> | |
734 | - </v-layout> | |
735 | - </v-flex> | |
736 | - </v-layout> | |
737 | - <v-layout> | |
738 | - <v-flex xs6 sm5> | |
739 | - <v-layout> | |
740 | - <v-flex xs4 sm6> | |
741 | - <b><h5 class="right my-1"><b>Mother Cell No:</b></h5></b> | |
742 | - </v-flex> | |
743 | - <v-flex sm6 xs8> | |
744 | - <h5 class="my-1">{{ editedItem.motherCellNo }}</h5> | |
745 | - </v-flex> | |
746 | - </v-layout> | |
747 | - </v-flex> | |
748 | - <v-flex xs6 sm6> | |
749 | - <v-layout> | |
750 | - <v-flex xs5 sm6> | |
751 | - <b><h5 class="my-1 right"><b>Academic Year:</b></h5></b> | |
752 | - </v-flex> | |
753 | - <v-flex sm5 xs8> | |
754 | - <h5 class="my-1">{{ editedItem.establishmentYear }}</h5> | |
755 | - </v-flex> | |
756 | - </v-layout> | |
757 | - </v-flex> | |
758 | - </v-layout> | |
759 | - <v-layout> | |
760 | - <v-flex xs6 sm5> | |
761 | - <v-layout> | |
762 | - <v-flex xs5 sm6> | |
763 | - <b><h5 class="my-1 right"><b>Medical Notes:</b></h5></b> | |
764 | - </v-flex> | |
765 | - <v-flex sm5 xs8> | |
766 | - <h5 class="my-1">{{ editedItem.medicalNotes }}</h5> | |
767 | - </v-flex> | |
768 | - </v-layout> | |
769 | - </v-flex> | |
770 | - <v-flex xs12 sm6> | |
771 | - <v-layout> | |
772 | - <v-flex xs6 sm6> | |
773 | - <b><h5 class="right my-1"><b>present Address:</b></h5></b> | |
774 | - </v-flex> | |
775 | - <v-flex sm6 xs8> | |
776 | - <h5 class="my-1">{{ editedItem.presentAddress }}</h5> | |
777 | - </v-flex> | |
778 | - </v-layout> | |
779 | - </v-flex> | |
780 | - </v-layout> | |
781 | - <v-layout> | |
782 | - <v-flex xs12 sm12> | |
783 | - <v-layout> | |
784 | - <v-flex xs4 sm3> | |
785 | - <b><h5 class="right my-1"><b>Permanent Address:</b></h5></b> | |
786 | - </v-flex> | |
787 | - <v-flex sm9 xs8> | |
788 | - <h5 class="my-1">{{ editedItem.permanentAddress }}</h5> | |
789 | - </v-flex> | |
790 | - </v-layout> | |
791 | - </v-flex> | |
792 | - </v-layout> | |
793 | - </v-flex> | |
794 | - </v-layout> | |
795 | - </v-container> | |
796 | - </v-card-text> | |
797 | - </v-card> | |
798 | - </v-dialog> | |
799 | - | |
800 | - <v-snackbar | |
801 | - :timeout="timeout" | |
802 | - :top="y === 'top'" | |
803 | - :right="x === 'right'" | |
804 | - :vertical="mode === 'vertical'" | |
805 | - v-model="snackbar" | |
806 | - color="success" | |
807 | - >{{ text }}</v-snackbar> | |
808 | - | |
809 | - <!-- ****** EXISTING-USERS STUDENTS TABLE ****** --> | |
810 | - <v-card flat> | |
811 | - <v-card-actions> | |
812 | - <v-layout> | |
813 | - <label class = "right mt-4 ml-5 ">Select Class:</label> | |
814 | - <v-select | |
815 | - :items="addclass" | |
816 | - label="Select Class" | |
817 | - v-model="selectStudents.select" | |
818 | - item-text="classNum" | |
819 | - item-value="_id" | |
820 | - name="Select Class" | |
821 | - :rules="classRules" | |
822 | - @change="getSections(selectStudents.select)" | |
823 | - class="px-4" | |
824 | - required | |
825 | - ></v-select> | |
826 | - <label class="right mt-4">Select Section:</label> | |
827 | - <v-select | |
828 | - :items="addSection" | |
829 | - label="Select Section" | |
830 | - v-model="selectStudents.selectSection" | |
831 | - item-text="name" | |
832 | - item-value="_id" | |
833 | - name="Select Section" | |
834 | - :rules="sectionRules" | |
835 | - class="pl-3" | |
836 | - required | |
837 | - ></v-select> | |
838 | - </v-layout> | |
839 | - <v-spacer></v-spacer> | |
840 | - <v-btn @click="findStudents()" round dark :loading="loading" class= "left">Find</v-btn> | |
841 | - </v-card-actions> | |
842 | - </v-card> | |
843 | - <v-data-table | |
844 | - :headers="headers" | |
845 | - :items="desserts" | |
846 | - :pagination.sync="pagination" | |
847 | - :search="search" | |
848 | - > | |
849 | - <template slot="items" slot-scope="props"> | |
850 | - <td id="td" class="text-xs-center">{{ props.index}}</td> | |
851 | - <td id="td" class="text-xs-center"> | |
852 | - <v-avatar><img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl"> | |
853 | - <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl"> | |
854 | - </v-avatar></td> | |
855 | - <td id="td" class="text-xs-center">{{ props.item.name}}</td> | |
856 | - <td id="td" class="text-xs-center">{{ props.item.email }}</td> | |
857 | - <td id="td" class="text-xs-center">{{ dates(props.item.dob) }}</td> | |
858 | - <td id="td" class="text-xs-center">{{ props.item.gender }}</td> | |
859 | - <td id="td" class="text-xs-center">{{ props.item.fatherName }}</td> | |
860 | - <td id="td" class="text-xs-center">{{ props.item.motherName }}</td> | |
861 | - <td id="td" class="text-xs-center">{{ props.item.establishmentYear }}</td> | |
862 | - <td id="td" class="text-xs-center">{{ props.item.mobile}}</td> | |
863 | - | |
864 | - <td class="text-xs-center"> | |
865 | - <span> | |
866 | - <img | |
867 | - style="cursor:pointer; width:25px; height:18px; " | |
868 | - class="mr-5" | |
869 | - @click="profile(props.item)" | |
870 | - src="/static/icon/eye1.png" | |
871 | - > | |
872 | - <img | |
873 | - style="cursor:pointer; width:20px; height:18px; " | |
874 | - class="mr-5" | |
875 | - @click="editItem(props.item)" | |
876 | - src="/static/icon/edit1.png" | |
877 | - > | |
878 | - <img | |
879 | - style="cursor:pointer; height:20px; " | |
880 | - class="mr-5" | |
881 | - @click="deleteItem(props.item)" | |
882 | - src="/static/icon/delete1.png" | |
883 | - > | |
884 | - </span> | |
885 | - </td> | |
886 | - </template> | |
887 | - <v-alert | |
888 | - slot="no-results" | |
889 | - :value="true" | |
890 | - color="error" | |
891 | - icon="warning" | |
892 | - >Your search for "{{ search }}" found no results.</v-alert> | |
893 | - </v-data-table> | |
894 | - </v-tab-item> | |
895 | - | |
896 | - <!-- ****** ADD STUDENTS DETAILS****** --> | |
897 | - | |
898 | - <v-tab-item> | |
899 | - <v-container> | |
900 | - <v-snackbar | |
901 | - :timeout="timeout" | |
902 | - :top="y === 'top'" | |
903 | - :right="x === 'right'" | |
904 | - :vertical="mode === 'vertical'" | |
905 | - v-model="snackbar" | |
906 | - color="success" | |
907 | - >{{ text }}</v-snackbar> | |
908 | - <v-flex xs12 sm12 class="my-4"> | |
909 | - <v-card flat> | |
910 | - <v-form ref="form" v-model="valid" lazy-validation> | |
911 | - <v-container fluid> | |
912 | - <v-layout> | |
913 | - <v-flex | |
914 | - xs12 | |
915 | - class="text-xs-center text-sm-center text-md-center text-lg-center my-4 mr-4" | |
916 | - > | |
917 | - <v-avatar size="100px"> | |
918 | - <img src="/static/icon/user.png" v-if="!imageUrl"> | |
919 | - </v-avatar> | |
920 | - <input | |
921 | - type="file" | |
922 | - style="display: none" | |
923 | - ref="image" | |
924 | - accept="image/*" | |
925 | - @change="onFilePicked" | |
926 | - > | |
927 | - <img | |
928 | - :src="imageData.imageUrl" | |
929 | - height="150" | |
930 | - v-if="imageUrl" | |
931 | - style="border-radius:50%; width:200px" | |
932 | - > | |
933 | - </v-flex> | |
934 | - </v-layout> | |
935 | - <v-layout> | |
936 | - <v-flex xs12 sm6> | |
937 | - <v-layout> | |
938 | - <v-flex xs4 class="pt-4 subheading"> | |
939 | - <label class="right">Select Class:</label> | |
940 | - </v-flex> | |
941 | - <v-flex xs8 class="ml-3"> | |
942 | - <v-select | |
943 | - :items="addclass" | |
944 | - label="Select Class" | |
945 | - v-model="addStudents.select" | |
946 | - item-text="classNum" | |
947 | - item-value="_id" | |
948 | - name="Select Class" | |
949 | - :rules="classRules" | |
950 | - @change="getSection(addStudents.select)" | |
951 | - required | |
952 | - ></v-select> | |
953 | - </v-flex> | |
954 | - </v-layout> | |
955 | - </v-flex> | |
956 | - <v-flex xs12 sm6> | |
957 | - <v-layout> | |
958 | - <v-flex xs4 class="pt-4 subheading"> | |
959 | - <label class="right">Select Section:</label> | |
960 | - </v-flex> | |
961 | - <v-flex xs8 class="ml-3"> | |
962 | - <v-select | |
963 | - :items="addSection" | |
964 | - label="Select Section" | |
965 | - v-model="addStudents.selectSection" | |
966 | - item-text="name" | |
967 | - item-value="_id" | |
968 | - name="Select Section" | |
969 | - :rules="sectionRules" | |
970 | - required | |
971 | - ></v-select> | |
972 | - </v-flex> | |
973 | - </v-layout> | |
974 | - </v-flex> | |
975 | - </v-layout> | |
976 | - <v-layout> | |
977 | - <v-flex xs12 sm6> | |
978 | - <v-layout> | |
979 | - <v-flex xs4 class="pt-4 subheading"> | |
980 | - <label class="right">Full Name:</label> | |
981 | - </v-flex> | |
982 | - <v-flex xs8 class="ml-3"> | |
983 | - <v-text-field | |
984 | - v-model="addStudents.name" | |
985 | - placeholder="fill your full Name" | |
986 | - name="name" | |
987 | - type="text" | |
988 | - :rules="nameRules" | |
989 | - required | |
990 | - ></v-text-field> | |
991 | - </v-flex> | |
992 | - </v-layout> | |
993 | - </v-flex> | |
994 | - <v-flex xs12 sm6> | |
995 | - <v-layout> | |
996 | - <v-flex xs4 class="pt-4 subheading"> | |
997 | - <label class="right">Email ID:</label> | |
998 | - </v-flex> | |
999 | - <v-flex xs8 class="ml-3"> | |
1000 | - <v-text-field | |
1001 | - placeholder="fill your email" | |
1002 | - :rules="emailRules" | |
1003 | - v-model="addStudents.email" | |
1004 | - type="text" | |
1005 | - name="email" | |
1006 | - required | |
1007 | - ></v-text-field> | |
1008 | - </v-flex> | |
1009 | - </v-layout> | |
1010 | - </v-flex> | |
1011 | - </v-layout> | |
1012 | - <v-layout> | |
1013 | - <v-flex xs12 sm6> | |
1014 | - <v-layout> | |
1015 | - <v-flex xs4 class="pt-4 subheading"> | |
1016 | - <label class="right">Date of Birth:</label> | |
1017 | - </v-flex> | |
1018 | - <v-flex xs8 class="ml-3"> | |
1019 | - <v-menu | |
1020 | - ref="menu" | |
1021 | - :close-on-content-click="false" | |
1022 | - v-model="menu" | |
1023 | - :nudge-right="40" | |
1024 | - lazy | |
1025 | - transition="scale-transition" | |
1026 | - offset-y | |
1027 | - full-width | |
1028 | - min-width="290px" | |
1029 | - > | |
1030 | - <v-text-field | |
1031 | - slot="activator" | |
1032 | - :rules="dateRules" | |
1033 | - v-model="addStudents.date" | |
1034 | - placeholder="Select date" | |
1035 | - ></v-text-field> | |
1036 | - <v-date-picker | |
1037 | - ref="picker" | |
1038 | - v-model="addStudents.date" | |
1039 | - :max="new Date().toISOString().substr(0, 10)" | |
1040 | - min="1950-01-01" | |
1041 | - @input="menu = false" | |
1042 | - ></v-date-picker> | |
1043 | - </v-menu> | |
1044 | - </v-flex> | |
1045 | - </v-layout> | |
1046 | - </v-flex> | |
1047 | - <v-flex xs12 sm6> | |
1048 | - <v-layout> | |
1049 | - <v-flex xs4 class="pt-4 subheading"> | |
1050 | - <label class="right">City:</label> | |
1051 | - </v-flex> | |
1052 | - <v-flex xs8 class="ml-3"> | |
1053 | - <v-text-field | |
1054 | - v-model="addStudents.city" | |
1055 | - placeholder="fill your City Name" | |
1056 | - name="City" | |
1057 | - type="text" | |
1058 | - :rules="cityRules" | |
1059 | - required | |
1060 | - ></v-text-field> | |
1061 | - </v-flex> | |
1062 | - </v-layout> | |
1063 | - </v-flex> | |
1064 | - </v-layout> | |
1065 | - <v-layout> | |
1066 | - <v-flex xs12 sm6> | |
1067 | - <v-layout> | |
1068 | - <v-flex xs4 class="pt-4 subheading"> | |
1069 | - <label class="right">State:</label> | |
1070 | - </v-flex> | |
1071 | - <v-flex xs8 class="ml-3"> | |
1072 | - <v-text-field | |
1073 | - v-model="addStudents.state" | |
1074 | - placeholder="fill your State Name" | |
1075 | - name="state" | |
1076 | - type="text" | |
1077 | - :rules="stateRules" | |
1078 | - required | |
1079 | - ></v-text-field> | |
1080 | - </v-flex> | |
1081 | - </v-layout> | |
1082 | - </v-flex> | |
1083 | - <v-flex xs12 sm6> | |
1084 | - <v-layout> | |
1085 | - <v-flex xs4 class="pt-4 subheading"> | |
1086 | - <label class="right">Pincode:</label> | |
1087 | - </v-flex> | |
1088 | - <v-flex xs8 class="ml-3"> | |
1089 | - <v-text-field | |
1090 | - v-model="addStudents.pincode" | |
1091 | - placeholder="fill your pincode" | |
1092 | - name="pincode" | |
1093 | - type="number" | |
1094 | - :rules="pincode" | |
1095 | - required | |
1096 | - ></v-text-field> | |
1097 | - </v-flex> | |
1098 | - </v-layout> | |
1099 | - </v-flex> | |
1100 | - </v-layout> | |
1101 | - <v-layout> | |
1102 | - <v-flex xs12 sm6> | |
1103 | - <v-layout> | |
1104 | - <v-flex xs4 class="pt-4 subheading"> | |
1105 | - <label class="right">Mobile No:</label> | |
1106 | - </v-flex> | |
1107 | - <v-flex xs8 class="ml-3"> | |
1108 | - <v-text-field | |
1109 | - v-model="addStudents.mobile" | |
1110 | - placeholder="fill your MobileNo" | |
1111 | - name="mobileNo" | |
1112 | - type="number" | |
1113 | - :rules="mobileNoRules" | |
1114 | - required | |
1115 | - ></v-text-field> | |
1116 | - </v-flex> | |
1117 | - </v-layout> | |
1118 | - </v-flex> | |
1119 | - <v-flex xs12 sm6> | |
1120 | - <v-layout> | |
1121 | - <v-flex xs4 class="pt-4 subheading"> | |
1122 | - <label class="right">Select Country:</label> | |
1123 | - </v-flex> | |
1124 | - <v-flex xs8 class="ml-3"> | |
1125 | - <v-autocomplete | |
1126 | - v-model="addStudents.country" | |
1127 | - :rules="country" | |
1128 | - :items="countries" | |
1129 | - placeholder="Select Country Name" | |
1130 | - required | |
1131 | - ></v-autocomplete> | |
1132 | - </v-flex> | |
1133 | - </v-layout> | |
1134 | - </v-flex> | |
1135 | - </v-layout> | |
1136 | - <v-layout> | |
1137 | - <v-flex xs12 sm6> | |
1138 | - <v-layout> | |
1139 | - <v-flex xs4 class="pt-4 subheading"> | |
1140 | - <label class="right">Gender:</label> | |
1141 | - </v-flex> | |
1142 | - <v-flex xs8 class="ml-3"> | |
1143 | - <v-select | |
1144 | - :items="gender" | |
1145 | - v-model="addStudents.gender" | |
1146 | - :rules="genderRules" | |
1147 | - label="Select Gender" | |
1148 | - required | |
1149 | - ></v-select> | |
1150 | - </v-flex> | |
1151 | - </v-layout> | |
1152 | - </v-flex> | |
1153 | - <v-flex xs12 sm6> | |
1154 | - <v-layout> | |
1155 | - <v-flex xs4 class="pt-4 subheading"> | |
1156 | - <label class="right">Blood Group:</label> | |
1157 | - </v-flex> | |
1158 | - <v-flex xs8 class="ml-3"> | |
1159 | - <v-text-field | |
1160 | - v-model="addStudents.bloodGroup" | |
1161 | - placeholder="Fill your Blood Group" | |
1162 | - required | |
1163 | - ></v-text-field> | |
1164 | - </v-flex> | |
1165 | - </v-layout> | |
1166 | - </v-flex> | |
1167 | - </v-layout> | |
1168 | - <v-layout> | |
1169 | - <v-flex xs12 sm6> | |
1170 | - <v-layout> | |
1171 | - <v-flex xs4 class="pt-4 subheading"> | |
1172 | - <label class="right">Allergies:</label> | |
1173 | - </v-flex> | |
1174 | - <v-flex xs8 class="ml-3"> | |
1175 | - <v-text-field | |
1176 | - v-model="addStudents.allergies" | |
1177 | - placeholder="Fill your Allergies" | |
1178 | - required | |
1179 | - ></v-text-field> | |
1180 | - </v-flex> | |
1181 | - </v-layout> | |
1182 | - </v-flex> | |
1183 | - <v-flex xs12 sm6> | |
1184 | - <v-layout> | |
1185 | - <v-flex xs4 class="pt-4 subheading"> | |
1186 | - <label class="right">Medical Notes:</label> | |
1187 | - </v-flex> | |
1188 | - <v-flex xs8 class="ml-3"> | |
1189 | - <v-text-field | |
1190 | - v-model="addStudents.medicalNotes" | |
1191 | - placeholder="Fill your Medical Notes" | |
1192 | - required | |
1193 | - ></v-text-field> | |
1194 | - </v-flex> | |
1195 | - </v-layout> | |
1196 | - </v-flex> | |
1197 | - </v-layout> | |
1198 | - <v-layout> | |
1199 | - <v-flex xs12 sm6> | |
1200 | - <v-layout> | |
1201 | - <v-flex xs4 class="pt-4 subheading"> | |
1202 | - <label class="right">Height:</label> | |
1203 | - </v-flex> | |
1204 | - <v-flex xs8 class="ml-3"> | |
1205 | - <v-text-field | |
1206 | - v-model="addStudents.height" | |
1207 | - placeholder="Fill your Height" | |
1208 | - required | |
1209 | - ></v-text-field> | |
397 | + ></v-autocomplete> | |
1210 | 398 | </v-flex> |
1211 | 399 | </v-layout> |
1212 | 400 | </v-flex> |
1213 | - <v-flex xs12 sm6> | |
401 | + <v-flex xs12 sm4> | |
1214 | 402 | <v-layout> |
1215 | 403 | <v-flex xs4 class="pt-4 subheading"> |
1216 | - <label class="right">Weight:</label> | |
404 | + <label class="right">Gender:</label> | |
1217 | 405 | </v-flex> |
1218 | 406 | <v-flex xs8 class="ml-3"> |
1219 | - <v-text-field | |
1220 | - v-model="addStudents.weight" | |
1221 | - placeholder="Fill your Weight" | |
407 | + <v-select | |
408 | + :items="gender" | |
409 | + v-model="editedItem.gender" | |
410 | + placeholder="Select Gender" | |
1222 | 411 | required |
1223 | - ></v-text-field> | |
412 | + ></v-select> | |
1224 | 413 | </v-flex> |
1225 | 414 | </v-layout> |
1226 | 415 | </v-flex> |
1227 | - </v-layout> | |
1228 | - <v-layout> | |
1229 | - <v-flex xs12 sm6> | |
416 | + <v-flex xs12 sm4> | |
1230 | 417 | <v-layout> |
1231 | 418 | <v-flex xs4 class="pt-4 subheading"> |
1232 | 419 | <label class="right">Father Name:</label> |
1233 | 420 | </v-flex> |
1234 | 421 | <v-flex xs8 class="ml-3"> |
1235 | 422 | <v-text-field |
1236 | - v-model="addStudents.fatherName" | |
1237 | - :rules="fatherNameRules" | |
423 | + v-model="editedItem.fatherName" | |
424 | + :items="countries" | |
1238 | 425 | placeholder="Fill your father Name" |
1239 | 426 | required |
1240 | 427 | ></v-text-field> |
1241 | 428 | </v-flex> |
1242 | 429 | </v-layout> |
1243 | 430 | </v-flex> |
1244 | - <v-flex xs12 sm6> | |
431 | + </v-layout> | |
432 | + <v-layout> | |
433 | + <v-flex xs12 sm4> | |
1245 | 434 | <v-layout> |
1246 | 435 | <v-flex xs4 class="pt-4 subheading"> |
1247 | 436 | <label class="right">Father Cell No:</label> |
1248 | 437 | </v-flex> |
1249 | 438 | <v-flex xs8 class="ml-3"> |
1250 | 439 | <v-text-field |
1251 | - v-model="addStudents.fatherCellNo" | |
440 | + v-model="editedItem.fatherCellNo" | |
1252 | 441 | placeholder="fill your father Cell Number" |
1253 | 442 | name="state" |
1254 | 443 | type="number" |
1255 | - :rules="fatheCellNoRules" | |
1256 | 444 | required |
1257 | 445 | ></v-text-field> |
1258 | 446 | </v-flex> |
1259 | 447 | </v-layout> |
1260 | 448 | </v-flex> |
1261 | - </v-layout> | |
1262 | - <v-layout> | |
1263 | - <v-flex xs12 sm6> | |
449 | + <v-flex xs12 sm4> | |
1264 | 450 | <v-layout> |
1265 | 451 | <v-flex xs4 class="pt-4 subheading"> |
1266 | 452 | <label class="right">Mother Name:</label> |
1267 | 453 | </v-flex> |
1268 | 454 | <v-flex xs8 class="ml-3"> |
1269 | 455 | <v-text-field |
1270 | - v-model="addStudents.motherName" | |
456 | + v-model="editedItem.motherName" | |
1271 | 457 | placeholder="fill your Mother Name" |
1272 | 458 | name="state" |
1273 | 459 | type="text" |
1274 | - :rules="motherNameRules" | |
1275 | 460 | required |
1276 | 461 | ></v-text-field> |
1277 | 462 | </v-flex> |
1278 | 463 | </v-layout> |
1279 | 464 | </v-flex> |
1280 | - <v-flex xs12 sm6> | |
465 | + <v-flex xs12 sm4> | |
1281 | 466 | <v-layout> |
1282 | 467 | <v-flex xs4 class="pt-4 subheading"> |
1283 | 468 | <label class="right">Mother Cell No:</label> |
1284 | 469 | </v-flex> |
1285 | 470 | <v-flex xs8 class="ml-3"> |
1286 | 471 | <v-text-field |
1287 | - v-model="addStudents.motherCellNo" | |
472 | + v-model="editedItem.motherCellNo" | |
1288 | 473 | placeholder="fill your Mother Cell Number" |
1289 | 474 | name="state" |
1290 | 475 | type="number" |
1291 | - :rules="motherCellNoRules" | |
1292 | 476 | required |
1293 | 477 | ></v-text-field> |
1294 | 478 | </v-flex> |
1295 | 479 | </v-layout> |
1296 | 480 | </v-flex> |
1297 | 481 | </v-layout> |
1298 | - <v-layout> | |
1299 | - <v-flex xs12 sm6> | |
1300 | - <v-layout> | |
1301 | - <v-flex xs4 class="pt-4 subheading"> | |
1302 | - <label class="right">Uplaod Image:</label> | |
1303 | - </v-flex> | |
1304 | - <v-flex xs8 class="ml-3"> | |
1305 | - <v-text-field | |
1306 | - label="Select Image" | |
1307 | - @click="pickFile" | |
1308 | - v-model="imageName" | |
1309 | - append-icon="attach_file" | |
1310 | - ></v-text-field> | |
1311 | - </v-flex> | |
1312 | - </v-layout> | |
1313 | - </v-flex> | |
1314 | - <v-flex xs12 sm6> | |
482 | + <!-- <v-layout> | |
483 | + <v-flex xs12 sm4> | |
1315 | 484 | <v-layout> |
1316 | 485 | <v-flex xs4 class="pt-4 subheading"> |
1317 | 486 | <label class="right">Academic Year:</label> |
1318 | 487 | </v-flex> |
1319 | 488 | <v-flex xs8 class="ml-3"> |
1320 | 489 | <v-text-field |
1321 | - v-model="addStudents.establishmentYear" | |
1322 | - placeholder="fill your Academic Year" | |
490 | + v-model="editedItem.establishmentYear" | |
491 | + placeholder="fill your Mother Name" | |
1323 | 492 | name="state" |
1324 | 493 | type="number" |
1325 | - :rules="establishmentYearRules" | |
1326 | 494 | required |
1327 | 495 | ></v-text-field> |
1328 | 496 | </v-flex> |
1329 | 497 | </v-layout> |
1330 | 498 | </v-flex> |
1331 | - </v-layout> | |
499 | + </v-layout>--> | |
1332 | 500 | <v-layout> |
1333 | - <v-flex xs12 sm12> | |
501 | + <v-flex xs12> | |
1334 | 502 | <v-layout> |
1335 | - <v-flex xs3 class="pt-4 subheading pl-4" style="max-width: 17%;"> | |
1336 | - <label class>Present Address:</label> | |
503 | + <v-flex | |
504 | + xs1 | |
505 | + class="pt-4 subheading" | |
506 | + style="flex-basis: 13.333333% !important; max-width: 13.333333% !important;" | |
507 | + > | |
508 | + <label class="right">Present Address:</label> | |
1337 | 509 | </v-flex> |
1338 | - <v-flex xs12> | |
510 | + <v-flex xs11 class="ml-2"> | |
1339 | 511 | <v-text-field |
1340 | - name="input-4-3" | |
1341 | - v-model="addStudents.presentAddress" | |
1342 | - :rules="presentAddress" | |
512 | + v-model="editedItem.presentAddress" | |
1343 | 513 | placeholder="fill Your present Address" |
1344 | 514 | required |
1345 | 515 | ></v-text-field> |
1346 | 516 | </v-flex> |
1347 | 517 | </v-layout> |
1348 | 518 | </v-flex> |
1349 | - <v-flex xs12 sm12> | |
519 | + </v-layout> | |
520 | + <v-layout> | |
521 | + <v-flex xs12> | |
1350 | 522 | <v-layout> |
1351 | - <v-flex xs3 class="pt-4 subheading" style="max-width: 17%;"> | |
1352 | - <label>Permanent Address:</label> | |
523 | + <v-flex | |
524 | + xs1 | |
525 | + class="pt-4 subheading" | |
526 | + style="flex-basis: 13.333333% !important; max-width: 13.333333% !important;" | |
527 | + > | |
528 | + <label class="right">Permanent Address:</label> | |
1353 | 529 | </v-flex> |
1354 | - <v-flex xs12> | |
1355 | - <v-text-field | |
1356 | - name="input-4-3" | |
1357 | - v-model="addStudents.permanentAddress" | |
1358 | - :rules="permanentAddress" | |
530 | + <v-flex xs11 class="ml-2"> | |
531 | + <v-textarea | |
532 | + rows="1" | |
533 | + v-model="editedItem.permanentAddress" | |
1359 | 534 | placeholder="fill Your Permanent Address" |
1360 | 535 | required |
1361 | - ></v-text-field> | |
536 | + ></v-textarea> | |
1362 | 537 | </v-flex> |
1363 | 538 | </v-layout> |
1364 | 539 | </v-flex> |
... | ... | @@ -1366,16 +541,1018 @@ |
1366 | 541 | <v-layout> |
1367 | 542 | <v-flex xs12 sm12> |
1368 | 543 | <v-card-actions> |
1369 | - <v-btn @click="clear" round dark>clear</v-btn> | |
544 | + <v-btn round dark @click.native="close">Cancel</v-btn> | |
1370 | 545 | <v-spacer></v-spacer> |
1371 | - <v-btn @click="submit" round dark :loading="loading">Add</v-btn> | |
546 | + <v-btn round dark @click="save">Save</v-btn> | |
1372 | 547 | </v-card-actions> |
1373 | 548 | </v-flex> |
1374 | 549 | </v-layout> |
1375 | 550 | </v-container> |
1376 | 551 | </v-form> |
1377 | - </v-card> | |
1378 | - </v-flex> | |
552 | + </v-card-text> | |
553 | + </v-card> | |
554 | + </v-dialog> | |
555 | + | |
556 | + <!-- ****** PROFILE VIEW STUDENTS DEATILS ****** --> | |
557 | + | |
558 | + <v-dialog v-model="dialog1" max-width="800px" scrollable> | |
559 | + <v-card> | |
560 | + <v-toolbar color="grey lighten-2" flat> | |
561 | + <v-spacer></v-spacer> | |
562 | + <v-toolbar-title>Student Profile</v-toolbar-title> | |
563 | + <v-spacer></v-spacer> | |
564 | + <v-icon @click="close1">close</v-icon> | |
565 | + </v-toolbar> | |
566 | + <v-card-text style="height: 700px;"> | |
567 | + <v-flex align-center justify-center layout text-xs-center class="mt-3"> | |
568 | + <v-avatar size="160px"> | |
569 | + <img src="/static/icon/user.png" v-if="!editedItem.profilePicUrl" /> | |
570 | + <img :src="editedItem.profilePicUrl" v-else-if="editedItem.profilePicUrl" /> | |
571 | + </v-avatar> | |
572 | + </v-flex> | |
573 | + <v-container grid-list-md> | |
574 | + <v-layout wrap> | |
575 | + <v-flex> | |
576 | + <v-layout> | |
577 | + <v-flex xs12 sm6> | |
578 | + <v-layout> | |
579 | + <v-flex xs6 sm5> | |
580 | + <h5 class="right my-1"> | |
581 | + <b>Full Name:</b> | |
582 | + </h5> | |
583 | + </v-flex> | |
584 | + <v-flex sm7 xs6> | |
585 | + <h5 class="my-1 left">{{ editedItem.name }}</h5> | |
586 | + </v-flex> | |
587 | + </v-layout> | |
588 | + </v-flex> | |
589 | + <v-flex xs12 sm6> | |
590 | + <v-layout> | |
591 | + <v-flex xs4 sm4> | |
592 | + <h5 class="right my-1"> | |
593 | + <b>Email:</b> | |
594 | + </h5> | |
595 | + </v-flex> | |
596 | + <v-flex sm8 xs8> | |
597 | + <h5 class="my-1 left">{{ editedItem.email }}</h5> | |
598 | + </v-flex> | |
599 | + </v-layout> | |
600 | + </v-flex> | |
601 | + </v-layout> | |
602 | + <v-layout> | |
603 | + <v-flex xs6 sm6> | |
604 | + <v-layout> | |
605 | + <v-flex xs4 sm5> | |
606 | + <b> | |
607 | + <h5 class="right my-1"> | |
608 | + <b>Gender:</b> | |
609 | + </h5> | |
610 | + </b> | |
611 | + </v-flex> | |
612 | + <v-flex sm7 xs8> | |
613 | + <h5 class="my-1 left">{{ editedItem.gender }}</h5> | |
614 | + </v-flex> | |
615 | + </v-layout> | |
616 | + </v-flex> | |
617 | + <v-flex xs6 sm6> | |
618 | + <v-layout> | |
619 | + <v-flex xs4 sm4> | |
620 | + <b> | |
621 | + <h5 class="right my-1"> | |
622 | + <b>D.O.B:</b> | |
623 | + </h5> | |
624 | + </b> | |
625 | + </v-flex> | |
626 | + <v-flex sm7 xs8> | |
627 | + <h5 class="my-1">{{ dates(editedItem.dob) }}</h5> | |
628 | + </v-flex> | |
629 | + </v-layout> | |
630 | + </v-flex> | |
631 | + </v-layout> | |
632 | + <v-layout> | |
633 | + <v-flex xs6 sm6> | |
634 | + <v-layout> | |
635 | + <v-flex xs4 sm5> | |
636 | + <b> | |
637 | + <h5 class="right my-1"> | |
638 | + <b>Blood Group:</b> | |
639 | + </h5> | |
640 | + </b> | |
641 | + </v-flex> | |
642 | + <v-flex sm7 xs8> | |
643 | + <h5 class="my-1 left">{{ editedItem.bloodGroup }}</h5> | |
644 | + </v-flex> | |
645 | + </v-layout> | |
646 | + </v-flex> | |
647 | + <v-flex xs6 sm6> | |
648 | + <v-layout> | |
649 | + <v-flex xs4 sm4> | |
650 | + <b> | |
651 | + <h5 class="right my-1"> | |
652 | + <b>Allergies:</b> | |
653 | + </h5> | |
654 | + </b> | |
655 | + </v-flex> | |
656 | + <v-flex sm8 xs8> | |
657 | + <h5 class="my-1">{{ editedItem.allergies }}</h5> | |
658 | + </v-flex> | |
659 | + </v-layout> | |
660 | + </v-flex> | |
661 | + </v-layout> | |
662 | + <v-layout> | |
663 | + <v-flex xs6 sm6> | |
664 | + <v-layout> | |
665 | + <v-flex xs4 sm5> | |
666 | + <b> | |
667 | + <h5 class="right my-1"> | |
668 | + <b>Height:</b> | |
669 | + </h5> | |
670 | + </b> | |
671 | + </v-flex> | |
672 | + <v-flex sm7 xs8> | |
673 | + <h5 class="my-1 left">{{ editedItem.height }}</h5> | |
674 | + </v-flex> | |
675 | + </v-layout> | |
676 | + </v-flex> | |
677 | + <v-flex xs6 sm6> | |
678 | + <v-layout> | |
679 | + <v-flex xs4 sm4> | |
680 | + <b> | |
681 | + <h5 class="right my-1"> | |
682 | + <b>Weight:</b> | |
683 | + </h5> | |
684 | + </b> | |
685 | + </v-flex> | |
686 | + <v-flex sm8 xs8> | |
687 | + <h5 class="my-1">{{ editedItem.weight }}</h5> | |
688 | + </v-flex> | |
689 | + </v-layout> | |
690 | + </v-flex> | |
691 | + </v-layout> | |
692 | + <v-layout> | |
693 | + <v-flex xs6 sm6> | |
694 | + <v-layout> | |
695 | + <v-flex xs4 sm5> | |
696 | + <b> | |
697 | + <h5 class="right my-1"> | |
698 | + <b>City:</b> | |
699 | + </h5> | |
700 | + </b> | |
701 | + </v-flex> | |
702 | + <v-flex sm7 xs8> | |
703 | + <h5 class="my-1 left">{{ editedItem.city }}</h5> | |
704 | + </v-flex> | |
705 | + </v-layout> | |
706 | + </v-flex> | |
707 | + <v-flex xs6 sm6> | |
708 | + <v-layout> | |
709 | + <v-flex xs4 sm4> | |
710 | + <b> | |
711 | + <h5 class="right my-1"> | |
712 | + <b>State:</b> | |
713 | + </h5> | |
714 | + </b> | |
715 | + </v-flex> | |
716 | + <v-flex sm8 xs8> | |
717 | + <h5 class="my-1">{{ editedItem.state }}</h5> | |
718 | + </v-flex> | |
719 | + </v-layout> | |
720 | + </v-flex> | |
721 | + </v-layout> | |
722 | + <v-layout> | |
723 | + <v-flex xs6 sm6> | |
724 | + <v-layout> | |
725 | + <v-flex xs4 sm5> | |
726 | + <b> | |
727 | + <h5 class="right my-1"> | |
728 | + <b>Pincode:</b> | |
729 | + </h5> | |
730 | + </b> | |
731 | + </v-flex> | |
732 | + <v-flex sm7 xs8> | |
733 | + <h5 class="my-1">{{ editedItem.pincode }}</h5> | |
734 | + </v-flex> | |
735 | + </v-layout> | |
736 | + </v-flex> | |
737 | + <v-flex xs5 sm5> | |
738 | + <v-layout> | |
739 | + <v-flex xs4 sm5> | |
740 | + <b> | |
741 | + <h5 class="right my-1"> | |
742 | + <b>Country:</b> | |
743 | + </h5> | |
744 | + </b> | |
745 | + </v-flex> | |
746 | + <v-flex sm7 xs8> | |
747 | + <h5 class="my-1">{{ editedItem.country }}</h5> | |
748 | + </v-flex> | |
749 | + </v-layout> | |
750 | + </v-flex> | |
751 | + </v-layout> | |
752 | + <v-layout> | |
753 | + <v-flex xs5 sm6> | |
754 | + <v-layout> | |
755 | + <v-flex sm5 xs8> | |
756 | + <b> | |
757 | + <h5 class="right my-1"> | |
758 | + <b>Mobile No:</b> | |
759 | + </h5> | |
760 | + </b> | |
761 | + </v-flex> | |
762 | + <v-flex sm6 xs8> | |
763 | + <h5 class="my-1">{{ editedItem.mobile }}</h5> | |
764 | + </v-flex> | |
765 | + </v-layout> | |
766 | + </v-flex> | |
767 | + <v-flex xs5 sm6> | |
768 | + <v-layout> | |
769 | + <v-flex xs5 sm4> | |
770 | + <b> | |
771 | + <h5 class="right my-1"> | |
772 | + <b>Fahter Name:</b> | |
773 | + </h5> | |
774 | + </b> | |
775 | + </v-flex> | |
776 | + <v-flex sm8 xs8> | |
777 | + <h5 class="my-1">{{ editedItem.fatherName }}</h5> | |
778 | + </v-flex> | |
779 | + </v-layout> | |
780 | + </v-flex> | |
781 | + </v-layout> | |
782 | + <v-layout> | |
783 | + <v-flex xs6 sm5> | |
784 | + <v-layout> | |
785 | + <v-flex xs4 sm6> | |
786 | + <b> | |
787 | + <h5 class="right my-1"> | |
788 | + <b>Mother Name:</b> | |
789 | + </h5> | |
790 | + </b> | |
791 | + </v-flex> | |
792 | + <v-flex sm6 xs8> | |
793 | + <h5 class="my-1">{{ editedItem.motherName }}</h5> | |
794 | + </v-flex> | |
795 | + </v-layout> | |
796 | + </v-flex> | |
797 | + <v-flex xs6 sm6> | |
798 | + <v-layout> | |
799 | + <v-flex xs4 sm6> | |
800 | + <b> | |
801 | + <h5 class="right my-1"> | |
802 | + <b>Father Cell No:</b> | |
803 | + </h5> | |
804 | + </b> | |
805 | + </v-flex> | |
806 | + <v-flex sm6 xs8> | |
807 | + <h5 class="my-1">{{ editedItem.fatherCellNo }}</h5> | |
808 | + </v-flex> | |
809 | + </v-layout> | |
810 | + </v-flex> | |
811 | + </v-layout> | |
812 | + <v-layout> | |
813 | + <v-flex xs6 sm5> | |
814 | + <v-layout> | |
815 | + <v-flex xs4 sm6> | |
816 | + <b> | |
817 | + <h5 class="right my-1"> | |
818 | + <b>Mother Cell No:</b> | |
819 | + </h5> | |
820 | + </b> | |
821 | + </v-flex> | |
822 | + <v-flex sm6 xs8> | |
823 | + <h5 class="my-1">{{ editedItem.motherCellNo }}</h5> | |
824 | + </v-flex> | |
825 | + </v-layout> | |
826 | + </v-flex> | |
827 | + <v-flex xs6 sm6> | |
828 | + <v-layout> | |
829 | + <v-flex xs5 sm6> | |
830 | + <b> | |
831 | + <h5 class="my-1 right"> | |
832 | + <b>Academic Year:</b> | |
833 | + </h5> | |
834 | + </b> | |
835 | + </v-flex> | |
836 | + <v-flex sm5 xs8> | |
837 | + <h5 class="my-1">{{ editedItem.establishmentYear }}</h5> | |
838 | + </v-flex> | |
839 | + </v-layout> | |
840 | + </v-flex> | |
841 | + </v-layout> | |
842 | + <v-layout> | |
843 | + <v-flex xs6 sm5> | |
844 | + <v-layout> | |
845 | + <v-flex xs5 sm6> | |
846 | + <b> | |
847 | + <h5 class="my-1 right"> | |
848 | + <b>Medical Notes:</b> | |
849 | + </h5> | |
850 | + </b> | |
851 | + </v-flex> | |
852 | + <v-flex sm5 xs8> | |
853 | + <h5 class="my-1">{{ editedItem.medicalNotes }}</h5> | |
854 | + </v-flex> | |
855 | + </v-layout> | |
856 | + </v-flex> | |
857 | + <v-flex xs12 sm6> | |
858 | + <v-layout> | |
859 | + <v-flex xs6 sm6> | |
860 | + <b> | |
861 | + <h5 class="right my-1"> | |
862 | + <b>present Address:</b> | |
863 | + </h5> | |
864 | + </b> | |
865 | + </v-flex> | |
866 | + <v-flex sm6 xs8> | |
867 | + <h5 class="my-1">{{ editedItem.presentAddress }}</h5> | |
868 | + </v-flex> | |
869 | + </v-layout> | |
870 | + </v-flex> | |
871 | + </v-layout> | |
872 | + <v-layout> | |
873 | + <v-flex xs12 sm12> | |
874 | + <v-layout> | |
875 | + <v-flex xs4 sm3> | |
876 | + <b> | |
877 | + <h5 class="right my-1"> | |
878 | + <b>Permanent Address:</b> | |
879 | + </h5> | |
880 | + </b> | |
881 | + </v-flex> | |
882 | + <v-flex sm9 xs8> | |
883 | + <h5 class="my-1">{{ editedItem.permanentAddress }}</h5> | |
884 | + </v-flex> | |
885 | + </v-layout> | |
886 | + </v-flex> | |
887 | + </v-layout> | |
888 | + </v-flex> | |
889 | + </v-layout> | |
890 | + </v-container> | |
891 | + </v-card-text> | |
892 | + </v-card> | |
893 | + </v-dialog> | |
894 | + | |
895 | + <v-snackbar | |
896 | + :timeout="timeout" | |
897 | + :top="y === 'top'" | |
898 | + :right="x === 'right'" | |
899 | + :vertical="mode === 'vertical'" | |
900 | + v-model="snackbar" | |
901 | + color="success" | |
902 | + >{{ text }}</v-snackbar> | |
903 | + | |
904 | + <!-- ****** EXISTING-USERS STUDENTS TABLE ****** --> | |
905 | + <v-card flat> | |
906 | + <v-card-actions> | |
907 | + <v-layout> | |
908 | + <label class="right mt-4 ml-5">Select Class:</label> | |
909 | + <v-select | |
910 | + :items="addclass" | |
911 | + label="Select Class" | |
912 | + v-model="selectStudents.select" | |
913 | + item-text="classNum" | |
914 | + item-value="_id" | |
915 | + name="Select Class" | |
916 | + :rules="classRules" | |
917 | + @change="getSections(selectStudents.select)" | |
918 | + class="px-4" | |
919 | + required | |
920 | + ></v-select> | |
921 | + <label class="right mt-4">Select Section:</label> | |
922 | + <v-select | |
923 | + :items="addSection" | |
924 | + label="Select Section" | |
925 | + v-model="selectStudents.selectSection" | |
926 | + item-text="name" | |
927 | + item-value="_id" | |
928 | + name="Select Section" | |
929 | + :rules="sectionRules" | |
930 | + class="pl-3" | |
931 | + required | |
932 | + ></v-select> | |
933 | + </v-layout> | |
934 | + <v-spacer></v-spacer> | |
935 | + <v-btn @click="findStudents()" round dark :loading="loading" class="left">Find</v-btn> | |
936 | + </v-card-actions> | |
937 | + </v-card> | |
938 | + <v-data-table | |
939 | + :headers="headers" | |
940 | + :items="desserts" | |
941 | + :pagination.sync="pagination" | |
942 | + :search="search" | |
943 | + > | |
944 | + <template slot="items" slot-scope="props"> | |
945 | + <td id="td" class="text-xs-center">{{ props.index}}</td> | |
946 | + <td id="td" class="text-xs-center"> | |
947 | + <v-avatar> | |
948 | + <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> | |
949 | + <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> | |
950 | + </v-avatar> | |
951 | + </td> | |
952 | + <td id="td" class="text-xs-center">{{ props.item.name}}</td> | |
953 | + <td id="td" class="text-xs-center">{{ props.item.email }}</td> | |
954 | + <td id="td" class="text-xs-center">{{ dates(props.item.dob) }}</td> | |
955 | + <td id="td" class="text-xs-center">{{ props.item.gender }}</td> | |
956 | + <td id="td" class="text-xs-center">{{ props.item.fatherName }}</td> | |
957 | + <td id="td" class="text-xs-center">{{ props.item.motherName }}</td> | |
958 | + <td id="td" class="text-xs-center">{{ props.item.establishmentYear }}</td> | |
959 | + <td id="td" class="text-xs-center">{{ props.item.mobile}}</td> | |
960 | + | |
961 | + <td class="text-xs-center"> | |
962 | + <span> | |
963 | + <img | |
964 | + style="cursor:pointer; width:25px; height:18px; " | |
965 | + class="mr-5" | |
966 | + @click="profile(props.item)" | |
967 | + src="/static/icon/eye1.png" | |
968 | + /> | |
969 | + <img | |
970 | + style="cursor:pointer; width:20px; height:18px; " | |
971 | + class="mr-5" | |
972 | + @click="editItem(props.item)" | |
973 | + src="/static/icon/edit1.png" | |
974 | + /> | |
975 | + <img | |
976 | + style="cursor:pointer; height:20px; " | |
977 | + class="mr-5" | |
978 | + @click="deleteItem(props.item)" | |
979 | + src="/static/icon/delete1.png" | |
980 | + /> | |
981 | + </span> | |
982 | + </td> | |
983 | + </template> | |
984 | + <v-alert | |
985 | + slot="no-results" | |
986 | + :value="true" | |
987 | + color="error" | |
988 | + icon="warning" | |
989 | + >Your search for "{{ search }}" found no results.</v-alert> | |
990 | + </v-data-table> | |
991 | + </v-tab-item> | |
992 | + | |
993 | + <!-- ****** ADD STUDENTS DETAILS****** --> | |
994 | + <v-tab-item> | |
995 | + <v-container fluid> | |
996 | + <v-layout align-center justify-center fill-height> | |
997 | + <v-flex xs12 sm8 md7 lg8> | |
998 | + <div> | |
999 | + <v-app> | |
1000 | + <v-stepper v-model="e2"> | |
1001 | + <v-stepper-header> | |
1002 | + <v-stepper-step :complete="e2 > 1" step="1">Fill parent Details</v-stepper-step> | |
1003 | + <v-divider></v-divider> | |
1004 | + <v-stepper-step step="2">Fill Student Details</v-stepper-step> | |
1005 | + </v-stepper-header> | |
1006 | + <v-stepper-items> | |
1007 | + <v-stepper-content step="1"> | |
1008 | + <v-container fluid class> | |
1009 | + <v-layout> | |
1010 | + <v-flex xs12> | |
1011 | + <v-snackbar | |
1012 | + :timeout="timeout" | |
1013 | + :top="y === 'top'" | |
1014 | + :right="x === 'right'" | |
1015 | + :vertical="mode === 'vertical'" | |
1016 | + v-model="snackbar" | |
1017 | + color="success" | |
1018 | + >{{ text }}</v-snackbar> | |
1019 | + <v-flex xs12 sm12> | |
1020 | + <v-form ref="parentForm" v-model="valid" lazy-validation> | |
1021 | + <v-container fluid> | |
1022 | + <v-layout> | |
1023 | + <v-flex xs12 sm6> | |
1024 | + <v-layout> | |
1025 | + <v-flex xs4 class="pt-4 subheading"> | |
1026 | + <label class="right">Parent Email Id:</label> | |
1027 | + </v-flex> | |
1028 | + <v-flex xs8 class="ml-3"> | |
1029 | + <v-text-field | |
1030 | + placeholder="fill Parent email" | |
1031 | + :rules="emailRules" | |
1032 | + v-model="parentData.email" | |
1033 | + type="text" | |
1034 | + v-on:keyup="getParentDetails" | |
1035 | + name="email" | |
1036 | + required | |
1037 | + ></v-text-field> | |
1038 | + </v-flex> | |
1039 | + </v-layout> | |
1040 | + </v-flex> | |
1041 | + <v-flex xs12 sm6> | |
1042 | + <v-layout> | |
1043 | + <v-flex xs4 class="pt-4 subheading"> | |
1044 | + <label class="right">Father Name:</label> | |
1045 | + </v-flex> | |
1046 | + <v-flex xs8 class="ml-3"> | |
1047 | + <v-text-field | |
1048 | + v-model="parentData.fatherName" | |
1049 | + :rules="fatherNameRules" | |
1050 | + placeholder="Fill your father Name" | |
1051 | + required | |
1052 | + ></v-text-field> | |
1053 | + </v-flex> | |
1054 | + </v-layout> | |
1055 | + </v-flex> | |
1056 | + </v-layout> | |
1057 | + <v-layout> | |
1058 | + <v-flex xs12 sm6> | |
1059 | + <v-layout> | |
1060 | + <v-flex xs4 class="pt-4 subheading"> | |
1061 | + <label class="right">Father Cell No:</label> | |
1062 | + </v-flex> | |
1063 | + <v-flex xs8 class="ml-3"> | |
1064 | + <v-text-field | |
1065 | + v-model="parentData.fatherCellNo" | |
1066 | + placeholder="fill your father Cell Number" | |
1067 | + name="state" | |
1068 | + type="number" | |
1069 | + :rules="fatheCellNoRules" | |
1070 | + required | |
1071 | + ></v-text-field> | |
1072 | + </v-flex> | |
1073 | + </v-layout> | |
1074 | + </v-flex> | |
1075 | + <v-flex xs12 sm6> | |
1076 | + <v-layout> | |
1077 | + <v-flex xs4 class="pt-4 subheading"> | |
1078 | + <label class="right">Mother Name:</label> | |
1079 | + </v-flex> | |
1080 | + <v-flex xs8 class="ml-3"> | |
1081 | + <v-text-field | |
1082 | + v-model="parentData.motherName" | |
1083 | + placeholder="fill your Mother Name" | |
1084 | + name="state" | |
1085 | + type="text" | |
1086 | + :rules="motherNameRules" | |
1087 | + required | |
1088 | + ></v-text-field> | |
1089 | + </v-flex> | |
1090 | + </v-layout> | |
1091 | + </v-flex> | |
1092 | + </v-layout> | |
1093 | + <v-layout> | |
1094 | + <v-flex xs12 sm6> | |
1095 | + <v-layout> | |
1096 | + <v-flex xs4 class="pt-4 subheading"> | |
1097 | + <label class="right">Mother Cell No:</label> | |
1098 | + </v-flex> | |
1099 | + <v-flex xs8 class="ml-3"> | |
1100 | + <v-text-field | |
1101 | + v-model="parentData.motherCellNo" | |
1102 | + placeholder="fill your Mother Cell Number" | |
1103 | + name="state" | |
1104 | + type="number" | |
1105 | + :rules="motherCellNoRules" | |
1106 | + required | |
1107 | + ></v-text-field> | |
1108 | + </v-flex> | |
1109 | + </v-layout> | |
1110 | + </v-flex> | |
1111 | + </v-layout> | |
1112 | + <v-flex xs12 sm12> | |
1113 | + <v-card-actions> | |
1114 | + <v-spacer></v-spacer> | |
1115 | + <v-btn | |
1116 | + @click="submitParentDetails" | |
1117 | + round | |
1118 | + dark | |
1119 | + :loading="loading" | |
1120 | + v-show="showParent" | |
1121 | + >Add</v-btn> | |
1122 | + <v-btn v-show="showNext" @click="e2 = 2" round dark>Next</v-btn> | |
1123 | + </v-card-actions> | |
1124 | + </v-flex> | |
1125 | + </v-container> | |
1126 | + </v-form> | |
1127 | + </v-flex> | |
1128 | + </v-flex> | |
1129 | + </v-layout> | |
1130 | + </v-container> | |
1131 | + </v-stepper-content> | |
1132 | + <v-stepper-content step="2"> | |
1133 | + <v-container fluid> | |
1134 | + <v-snackbar | |
1135 | + :timeout="timeout" | |
1136 | + :top="y === 'top'" | |
1137 | + :right="x === 'right'" | |
1138 | + :vertical="mode === 'vertical'" | |
1139 | + v-model="snackbar" | |
1140 | + color="success" | |
1141 | + >{{ text }}</v-snackbar> | |
1142 | + <v-flex xs12 sm12> | |
1143 | + <v-form ref="form" v-model="valid" lazy-validation> | |
1144 | + <v-container fluid> | |
1145 | + <v-layout> | |
1146 | + <v-flex | |
1147 | + xs12 | |
1148 | + class="text-xs-center text-sm-center text-md-center text-lg-center mr-4" | |
1149 | + > | |
1150 | + <v-avatar size="100px"> | |
1151 | + <img src="/static/icon/user.png" v-if="!imageUrl" /> | |
1152 | + </v-avatar> | |
1153 | + <input | |
1154 | + type="file" | |
1155 | + style="display: none" | |
1156 | + ref="image" | |
1157 | + accept="image/*" | |
1158 | + @change="onFilePicked" | |
1159 | + /> | |
1160 | + <img | |
1161 | + :src="imageData.imageUrl" | |
1162 | + height="150" | |
1163 | + v-if="imageUrl" | |
1164 | + style="border-radius:50%; width:200px" | |
1165 | + /> | |
1166 | + </v-flex> | |
1167 | + </v-layout> | |
1168 | + <v-layout> | |
1169 | + <v-flex xs12 sm6> | |
1170 | + <v-layout> | |
1171 | + <v-flex xs4 class="pt-4 subheading"> | |
1172 | + <label class="right">Select Class:</label> | |
1173 | + </v-flex> | |
1174 | + <v-flex xs8 class="ml-3"> | |
1175 | + <v-select | |
1176 | + :items="addclass" | |
1177 | + label="Select Class" | |
1178 | + v-model="addStudents.select" | |
1179 | + item-text="classNum" | |
1180 | + item-value="_id" | |
1181 | + name="Select Class" | |
1182 | + :rules="classRules" | |
1183 | + @change="getSection(addStudents.select)" | |
1184 | + required | |
1185 | + ></v-select> | |
1186 | + </v-flex> | |
1187 | + </v-layout> | |
1188 | + </v-flex> | |
1189 | + <v-flex xs12 sm6> | |
1190 | + <v-layout> | |
1191 | + <v-flex xs4 class="pt-4 subheading"> | |
1192 | + <label class="right">Select Section:</label> | |
1193 | + </v-flex> | |
1194 | + <v-flex xs8 class="ml-3"> | |
1195 | + <v-select | |
1196 | + :items="addSection" | |
1197 | + label="Select Section" | |
1198 | + v-model="addStudents.selectSection" | |
1199 | + item-text="name" | |
1200 | + item-value="_id" | |
1201 | + name="Select Section" | |
1202 | + :rules="sectionRules" | |
1203 | + required | |
1204 | + ></v-select> | |
1205 | + </v-flex> | |
1206 | + </v-layout> | |
1207 | + </v-flex> | |
1208 | + </v-layout> | |
1209 | + <v-layout> | |
1210 | + <v-flex xs12 sm6> | |
1211 | + <v-layout> | |
1212 | + <v-flex xs4 class="pt-4 subheading"> | |
1213 | + <label class="right">Full Name:</label> | |
1214 | + </v-flex> | |
1215 | + <v-flex xs8 class="ml-3"> | |
1216 | + <v-text-field | |
1217 | + v-model="addStudents.name" | |
1218 | + placeholder="fill your full Name" | |
1219 | + name="name" | |
1220 | + type="text" | |
1221 | + :rules="nameRules" | |
1222 | + required | |
1223 | + ></v-text-field> | |
1224 | + </v-flex> | |
1225 | + </v-layout> | |
1226 | + </v-flex> | |
1227 | + <v-flex xs12 sm6> | |
1228 | + <v-layout> | |
1229 | + <v-flex xs4 class="pt-4 subheading"> | |
1230 | + <label class="right">Email ID:</label> | |
1231 | + </v-flex> | |
1232 | + <v-flex xs8 class="ml-3"> | |
1233 | + <v-text-field | |
1234 | + placeholder="fill your email" | |
1235 | + :rules="emailRules" | |
1236 | + v-model="addStudents.email" | |
1237 | + type="text" | |
1238 | + name="email" | |
1239 | + required | |
1240 | + ></v-text-field> | |
1241 | + </v-flex> | |
1242 | + </v-layout> | |
1243 | + </v-flex> | |
1244 | + </v-layout> | |
1245 | + <v-layout> | |
1246 | + <v-flex xs12 sm6> | |
1247 | + <v-layout> | |
1248 | + <v-flex xs4 class="pt-4 subheading"> | |
1249 | + <label class="right">Date of Birth:</label> | |
1250 | + </v-flex> | |
1251 | + <v-flex xs8 class="ml-3"> | |
1252 | + <v-menu | |
1253 | + ref="menu" | |
1254 | + :close-on-content-click="false" | |
1255 | + v-model="menu" | |
1256 | + :nudge-right="40" | |
1257 | + lazy | |
1258 | + transition="scale-transition" | |
1259 | + offset-y | |
1260 | + full-width | |
1261 | + min-width="290px" | |
1262 | + > | |
1263 | + <v-text-field | |
1264 | + slot="activator" | |
1265 | + :rules="dateRules" | |
1266 | + v-model="addStudents.date" | |
1267 | + placeholder="Select date" | |
1268 | + ></v-text-field> | |
1269 | + <v-date-picker | |
1270 | + ref="picker" | |
1271 | + v-model="addStudents.date" | |
1272 | + :max="new Date().toISOString().substr(0, 10)" | |
1273 | + min="1950-01-01" | |
1274 | + @input="menu = false" | |
1275 | + ></v-date-picker> | |
1276 | + </v-menu> | |
1277 | + </v-flex> | |
1278 | + </v-layout> | |
1279 | + </v-flex> | |
1280 | + <v-flex xs12 sm6> | |
1281 | + <v-layout> | |
1282 | + <v-flex xs4 class="pt-4 subheading"> | |
1283 | + <label class="right">City:</label> | |
1284 | + </v-flex> | |
1285 | + <v-flex xs8 class="ml-3"> | |
1286 | + <v-text-field | |
1287 | + v-model="addStudents.city" | |
1288 | + placeholder="fill your City Name" | |
1289 | + name="City" | |
1290 | + type="text" | |
1291 | + :rules="cityRules" | |
1292 | + required | |
1293 | + ></v-text-field> | |
1294 | + </v-flex> | |
1295 | + </v-layout> | |
1296 | + </v-flex> | |
1297 | + </v-layout> | |
1298 | + <v-layout> | |
1299 | + <v-flex xs12 sm6> | |
1300 | + <v-layout> | |
1301 | + <v-flex xs4 class="pt-4 subheading"> | |
1302 | + <label class="right">State:</label> | |
1303 | + </v-flex> | |
1304 | + <v-flex xs8 class="ml-3"> | |
1305 | + <v-text-field | |
1306 | + v-model="addStudents.state" | |
1307 | + placeholder="fill your State Name" | |
1308 | + name="state" | |
1309 | + type="text" | |
1310 | + :rules="stateRules" | |
1311 | + required | |
1312 | + ></v-text-field> | |
1313 | + </v-flex> | |
1314 | + </v-layout> | |
1315 | + </v-flex> | |
1316 | + <v-flex xs12 sm6> | |
1317 | + <v-layout> | |
1318 | + <v-flex xs4 class="pt-4 subheading"> | |
1319 | + <label class="right">Pincode:</label> | |
1320 | + </v-flex> | |
1321 | + <v-flex xs8 class="ml-3"> | |
1322 | + <v-text-field | |
1323 | + v-model="addStudents.pincode" | |
1324 | + placeholder="fill your pincode" | |
1325 | + name="pincode" | |
1326 | + type="number" | |
1327 | + :rules="pincode" | |
1328 | + required | |
1329 | + ></v-text-field> | |
1330 | + </v-flex> | |
1331 | + </v-layout> | |
1332 | + </v-flex> | |
1333 | + </v-layout> | |
1334 | + <v-layout> | |
1335 | + <v-flex xs12 sm6> | |
1336 | + <v-layout> | |
1337 | + <v-flex xs4 class="pt-4 subheading"> | |
1338 | + <label class="right">Mobile No:</label> | |
1339 | + </v-flex> | |
1340 | + <v-flex xs8 class="ml-3"> | |
1341 | + <v-text-field | |
1342 | + v-model="addStudents.mobile" | |
1343 | + placeholder="fill your MobileNo" | |
1344 | + name="mobileNo" | |
1345 | + type="number" | |
1346 | + :rules="mobileNoRules" | |
1347 | + required | |
1348 | + ></v-text-field> | |
1349 | + </v-flex> | |
1350 | + </v-layout> | |
1351 | + </v-flex> | |
1352 | + <v-flex xs12 sm6> | |
1353 | + <v-layout> | |
1354 | + <v-flex xs4 class="pt-4 subheading"> | |
1355 | + <label class="right">Select Country:</label> | |
1356 | + </v-flex> | |
1357 | + <v-flex xs8 class="ml-3"> | |
1358 | + <v-autocomplete | |
1359 | + v-model="addStudents.country" | |
1360 | + :rules="country" | |
1361 | + :items="countries" | |
1362 | + placeholder="Select Country Name" | |
1363 | + required | |
1364 | + ></v-autocomplete> | |
1365 | + </v-flex> | |
1366 | + </v-layout> | |
1367 | + </v-flex> | |
1368 | + </v-layout> | |
1369 | + <v-layout> | |
1370 | + <v-flex xs12 sm6> | |
1371 | + <v-layout> | |
1372 | + <v-flex xs4 class="pt-4 subheading"> | |
1373 | + <label class="right">Gender:</label> | |
1374 | + </v-flex> | |
1375 | + <v-flex xs8 class="ml-3"> | |
1376 | + <v-select | |
1377 | + :items="gender" | |
1378 | + v-model="addStudents.gender" | |
1379 | + :rules="genderRules" | |
1380 | + label="Select Gender" | |
1381 | + required | |
1382 | + ></v-select> | |
1383 | + </v-flex> | |
1384 | + </v-layout> | |
1385 | + </v-flex> | |
1386 | + <v-flex xs12 sm6> | |
1387 | + <v-layout> | |
1388 | + <v-flex xs4 class="pt-4 subheading"> | |
1389 | + <label class="right">Blood Group:</label> | |
1390 | + </v-flex> | |
1391 | + <v-flex xs8 class="ml-3"> | |
1392 | + <v-text-field | |
1393 | + v-model="addStudents.bloodGroup" | |
1394 | + placeholder="Fill your Blood Group" | |
1395 | + required | |
1396 | + ></v-text-field> | |
1397 | + </v-flex> | |
1398 | + </v-layout> | |
1399 | + </v-flex> | |
1400 | + </v-layout> | |
1401 | + <v-layout> | |
1402 | + <v-flex xs12 sm6> | |
1403 | + <v-layout> | |
1404 | + <v-flex xs4 class="pt-4 subheading"> | |
1405 | + <label class="right">Allergies:</label> | |
1406 | + </v-flex> | |
1407 | + <v-flex xs8 class="ml-3"> | |
1408 | + <v-text-field | |
1409 | + v-model="addStudents.allergies" | |
1410 | + placeholder="Fill your Allergies" | |
1411 | + required | |
1412 | + ></v-text-field> | |
1413 | + </v-flex> | |
1414 | + </v-layout> | |
1415 | + </v-flex> | |
1416 | + <v-flex xs12 sm6> | |
1417 | + <v-layout> | |
1418 | + <v-flex xs4 class="pt-4 subheading"> | |
1419 | + <label class="right">Medical Notes:</label> | |
1420 | + </v-flex> | |
1421 | + <v-flex xs8 class="ml-3"> | |
1422 | + <v-text-field | |
1423 | + v-model="addStudents.medicalNotes" | |
1424 | + placeholder="Fill your Medical Notes" | |
1425 | + required | |
1426 | + ></v-text-field> | |
1427 | + </v-flex> | |
1428 | + </v-layout> | |
1429 | + </v-flex> | |
1430 | + </v-layout> | |
1431 | + <v-layout> | |
1432 | + <v-flex xs12 sm6> | |
1433 | + <v-layout> | |
1434 | + <v-flex xs4 class="pt-4 subheading"> | |
1435 | + <label class="right">Height:</label> | |
1436 | + </v-flex> | |
1437 | + <v-flex xs8 class="ml-3"> | |
1438 | + <v-text-field | |
1439 | + v-model="addStudents.height" | |
1440 | + placeholder="Fill your Height" | |
1441 | + required | |
1442 | + ></v-text-field> | |
1443 | + </v-flex> | |
1444 | + </v-layout> | |
1445 | + </v-flex> | |
1446 | + <v-flex xs12 sm6> | |
1447 | + <v-layout> | |
1448 | + <v-flex xs4 class="pt-4 subheading"> | |
1449 | + <label class="right">Weight:</label> | |
1450 | + </v-flex> | |
1451 | + <v-flex xs8 class="ml-3"> | |
1452 | + <v-text-field | |
1453 | + v-model="addStudents.weight" | |
1454 | + placeholder="Fill your Weight" | |
1455 | + required | |
1456 | + ></v-text-field> | |
1457 | + </v-flex> | |
1458 | + </v-layout> | |
1459 | + </v-flex> | |
1460 | + </v-layout> | |
1461 | + <v-layout> | |
1462 | + <v-flex xs12 sm6> | |
1463 | + <v-layout> | |
1464 | + <v-flex xs4 class="pt-4 subheading"> | |
1465 | + <label class="right">Uplaod Image:</label> | |
1466 | + </v-flex> | |
1467 | + <v-flex xs8 class="ml-3"> | |
1468 | + <v-text-field | |
1469 | + label="Select Image" | |
1470 | + @click="pickFile" | |
1471 | + v-model="imageName" | |
1472 | + append-icon="attach_file" | |
1473 | + ></v-text-field> | |
1474 | + </v-flex> | |
1475 | + </v-layout> | |
1476 | + </v-flex> | |
1477 | + <v-flex xs12 sm6> | |
1478 | + <v-layout> | |
1479 | + <v-flex xs4 class="pt-4 subheading"> | |
1480 | + <label class="right">Academic Year:</label> | |
1481 | + </v-flex> | |
1482 | + <v-flex xs8 class="ml-3"> | |
1483 | + <v-text-field | |
1484 | + v-model="addStudents.establishmentYear" | |
1485 | + placeholder="fill your Academic Year" | |
1486 | + name="state" | |
1487 | + type="number" | |
1488 | + :rules="establishmentYearRules" | |
1489 | + required | |
1490 | + ></v-text-field> | |
1491 | + </v-flex> | |
1492 | + </v-layout> | |
1493 | + </v-flex> | |
1494 | + </v-layout> | |
1495 | + <v-layout> | |
1496 | + <v-flex xs12 sm12> | |
1497 | + <v-layout> | |
1498 | + <v-flex | |
1499 | + xs3 | |
1500 | + class="pt-4 subheading pl-4" | |
1501 | + style="max-width: 17%;" | |
1502 | + > | |
1503 | + <label class>Present Address:</label> | |
1504 | + </v-flex> | |
1505 | + <v-flex xs12> | |
1506 | + <v-text-field | |
1507 | + name="input-4-3" | |
1508 | + v-model="addStudents.presentAddress" | |
1509 | + :rules="presentAddress" | |
1510 | + placeholder="fill Your present Address" | |
1511 | + required | |
1512 | + ></v-text-field> | |
1513 | + </v-flex> | |
1514 | + </v-layout> | |
1515 | + </v-flex> | |
1516 | + <v-flex xs12 sm12> | |
1517 | + <v-layout> | |
1518 | + <v-flex xs3 class="pt-4 subheading" style="max-width: 17%;"> | |
1519 | + <label>Permanent Address:</label> | |
1520 | + </v-flex> | |
1521 | + <v-flex xs12> | |
1522 | + <v-text-field | |
1523 | + name="input-4-3" | |
1524 | + v-model="addStudents.permanentAddress" | |
1525 | + :rules="permanentAddress" | |
1526 | + placeholder="fill Your Permanent Address" | |
1527 | + required | |
1528 | + ></v-text-field> | |
1529 | + </v-flex> | |
1530 | + </v-layout> | |
1531 | + </v-flex> | |
1532 | + </v-layout> | |
1533 | + <v-layout> | |
1534 | + <v-flex xs12 sm12> | |
1535 | + <v-card-actions> | |
1536 | + <!-- <v-btn @click="clear" round dark>clear</v-btn> --> | |
1537 | + <v-btn round dark @click="e2 = 1"> | |
1538 | + <v-icon dark left>arrow_back</v-icon>Back | |
1539 | + </v-btn> | |
1540 | + <v-spacer></v-spacer> | |
1541 | + <v-btn @click="submit" round dark :loading="loading">Add</v-btn> | |
1542 | + </v-card-actions> | |
1543 | + </v-flex> | |
1544 | + </v-layout> | |
1545 | + </v-container> | |
1546 | + </v-form> | |
1547 | + </v-flex> | |
1548 | + </v-container> | |
1549 | + </v-stepper-content> | |
1550 | + </v-stepper-items> | |
1551 | + </v-stepper> | |
1552 | + </v-app> | |
1553 | + </div> | |
1554 | + </v-flex> | |
1555 | + </v-layout> | |
1379 | 1556 | </v-container> |
1380 | 1557 | </v-tab-item> |
1381 | 1558 | </v-tabs> |
... | ... | @@ -1392,13 +1569,16 @@ import moment from "moment"; |
1392 | 1569 | |
1393 | 1570 | export default { |
1394 | 1571 | data: () => ({ |
1572 | + e2: 0, | |
1573 | + showParent: true, | |
1574 | + showNext: false, | |
1395 | 1575 | snackbar: false, |
1396 | 1576 | y: "top", |
1397 | 1577 | x: "right", |
1398 | 1578 | mode: "", |
1399 | 1579 | timeout: 3000, |
1400 | 1580 | text: "", |
1401 | - showLoader:false, | |
1581 | + showLoader: false, | |
1402 | 1582 | loading: false, |
1403 | 1583 | date: null, |
1404 | 1584 | search: "", |
... | ... | @@ -1430,7 +1610,7 @@ export default { |
1430 | 1610 | mobileNoRules: [v => !!v || "Mobile Number is required"], |
1431 | 1611 | stateRules: [v => !!v || "State Name is required"], |
1432 | 1612 | classRules: [v => !!v || " Class Name is required"], |
1433 | - sectionRules:[v => !!v || " Section Name is required"], | |
1613 | + sectionRules: [v => !!v || " Section Name is required"], | |
1434 | 1614 | genderRules: [v => !!v || " Select Gender is required"], |
1435 | 1615 | fatherNameRules: [v => !!v || " Father Name is required"], |
1436 | 1616 | fatheCellNoRules: [v => !!v || " father Cell Number is required"], |
... | ... | @@ -1659,19 +1839,41 @@ export default { |
1659 | 1839 | sortable: false, |
1660 | 1840 | value: "No" |
1661 | 1841 | }, |
1662 | - { text: "Profile Pic", value: "profilePicUrl", sortable: false, align: "center" }, | |
1842 | + { | |
1843 | + text: "Profile Pic", | |
1844 | + value: "profilePicUrl", | |
1845 | + sortable: false, | |
1846 | + align: "center" | |
1847 | + }, | |
1663 | 1848 | { text: "Name", value: "name", sortable: false, align: "center" }, |
1664 | 1849 | { text: "Email", value: "email", sortable: false, align: "center" }, |
1665 | 1850 | { text: "Dob", value: "dob", sortable: false, align: "center" }, |
1666 | 1851 | { text: "Gender", value: "gender", sortable: false, align: "center" }, |
1667 | - { text: "Father Name", value: "fatherName", sortable: false, align: "center" }, | |
1668 | - { text: "Mother Name", value: "motherName", sortable: false, align: "center" }, | |
1669 | - { text: "Academic Year", value: "establishmentYear", sortable: false, align: "center" }, | |
1852 | + { | |
1853 | + text: "Father Name", | |
1854 | + value: "fatherName", | |
1855 | + sortable: false, | |
1856 | + align: "center" | |
1857 | + }, | |
1858 | + { | |
1859 | + text: "Mother Name", | |
1860 | + value: "motherName", | |
1861 | + sortable: false, | |
1862 | + align: "center" | |
1863 | + }, | |
1864 | + { | |
1865 | + text: "Academic Year", | |
1866 | + value: "establishmentYear", | |
1867 | + sortable: false, | |
1868 | + align: "center" | |
1869 | + }, | |
1670 | 1870 | { text: "Mobile No", value: "mobile", sortable: false, align: "center" }, |
1671 | 1871 | { text: "Action", value: "", sortable: false, align: "center" } |
1672 | 1872 | ], |
1673 | 1873 | desserts: [], |
1874 | + parentId: "", | |
1674 | 1875 | editedIndex: -1, |
1876 | + parentData: {}, | |
1675 | 1877 | addStudents: { |
1676 | 1878 | role: "STUDENT", |
1677 | 1879 | name: "", |
... | ... | @@ -1685,23 +1887,19 @@ export default { |
1685 | 1887 | mobile: "", |
1686 | 1888 | state: "", |
1687 | 1889 | gender: "", |
1688 | - fatherName: "", | |
1689 | - fatheCellNo: "", | |
1690 | - motherName: "", | |
1691 | - motherCellNo: "", | |
1692 | 1890 | select: "", |
1693 | 1891 | selectSection: "", |
1694 | - bloodGroup:"", | |
1695 | - allergies:"", | |
1696 | - medicalNotes:"", | |
1697 | - height:"", | |
1698 | - weight:"", | |
1892 | + bloodGroup: "", | |
1893 | + allergies: "", | |
1894 | + medicalNotes: "", | |
1895 | + height: "", | |
1896 | + weight: "", | |
1699 | 1897 | establishmentYear: new Date().getFullYear() |
1700 | 1898 | }, |
1701 | - selectStudents: { | |
1899 | + selectStudents: { | |
1702 | 1900 | select: "", |
1703 | - selectSection: "", | |
1704 | - }, | |
1901 | + selectSection: "" | |
1902 | + }, | |
1705 | 1903 | editedItem: { |
1706 | 1904 | role: "STUDENT", |
1707 | 1905 | name: "", |
... | ... | @@ -1721,11 +1919,11 @@ export default { |
1721 | 1919 | motherCellNo: "", |
1722 | 1920 | select: "", |
1723 | 1921 | selectSection: "", |
1724 | - bloodGroup:"", | |
1725 | - allergies:"", | |
1726 | - medicalNotes:"", | |
1727 | - height:"", | |
1728 | - weight:"", | |
1922 | + bloodGroup: "", | |
1923 | + allergies: "", | |
1924 | + medicalNotes: "", | |
1925 | + height: "", | |
1926 | + weight: "", | |
1729 | 1927 | establishmentYear: new Date().getFullYear() |
1730 | 1928 | }, |
1731 | 1929 | defaultItem: { |
... | ... | @@ -1760,13 +1958,15 @@ export default { |
1760 | 1958 | } |
1761 | 1959 | }, |
1762 | 1960 | methods: { |
1763 | - findStudents(){ | |
1764 | - this.showLoader = true; | |
1765 | - http() | |
1766 | - .get( | |
1767 | - "/getStudentWithClass", | |
1768 | - { params: { classId: this.selectStudents.select, sectionId: this.selectStudents.selectSection} } | |
1769 | - ) | |
1961 | + findStudents() { | |
1962 | + this.showLoader = true; | |
1963 | + http() | |
1964 | + .get("/getStudentWithClass", { | |
1965 | + params: { | |
1966 | + classId: this.selectStudents.select, | |
1967 | + sectionId: this.selectStudents.selectSection | |
1968 | + } | |
1969 | + }) | |
1770 | 1970 | .then(response => { |
1771 | 1971 | this.desserts = response.data.data; |
1772 | 1972 | this.showLoader = false; |
... | ... | @@ -1867,11 +2067,14 @@ export default { |
1867 | 2067 | this.editedIndex = this.desserts.indexOf(item); |
1868 | 2068 | this.editedItem = Object.assign({}, item); |
1869 | 2069 | // if(this.editedItem.dob != undefined){ |
1870 | - // this.editedItem.dob = this.editedItem.dob.substring(0, 10) | |
2070 | + // this.editedItem.dob = this.editedItem.dob.substring(0, 10) | |
1871 | 2071 | // }else if(this.editedItem.dob = undefined){ |
1872 | 2072 | // this.editedItem.dob = '' |
1873 | 2073 | // } |
1874 | - this.editedItem.dob = this.editedItem.dob != undefined ? this.editedItem.dob = this.editedItem.dob.substring(0, 10): this.editedItem.dob = '' | |
2074 | + this.editedItem.dob = | |
2075 | + this.editedItem.dob != undefined | |
2076 | + ? (this.editedItem.dob = this.editedItem.dob.substring(0, 10)) | |
2077 | + : (this.editedItem.dob = ""); | |
1875 | 2078 | this.dialog = true; |
1876 | 2079 | }, |
1877 | 2080 | profile(item) { |
... | ... | @@ -1927,6 +2130,7 @@ export default { |
1927 | 2130 | submit() { |
1928 | 2131 | if (this.$refs.form.validate()) { |
1929 | 2132 | let addStudent = { |
2133 | + parentId: this.parentId, | |
1930 | 2134 | name: this.addStudents.name, |
1931 | 2135 | email: this.addStudents.email, |
1932 | 2136 | role: this.addStudents.role, |
... | ... | @@ -1946,18 +2150,18 @@ export default { |
1946 | 2150 | establishmentYear: this.addStudents.establishmentYear, |
1947 | 2151 | classId: this.addStudents.select, |
1948 | 2152 | sectionId: this.addStudents.selectSection, |
1949 | - bloodGroup:this.addStudents.bloodGroup, | |
1950 | - allergies:this.addStudents.allergies, | |
1951 | - medicalNotes:this.addStudents.medicalNotes, | |
1952 | - height:this.addStudents.height, | |
1953 | - weight:this.addStudents.weight, | |
1954 | - upload:this.imageUrl | |
2153 | + bloodGroup: this.addStudents.bloodGroup, | |
2154 | + allergies: this.addStudents.allergies, | |
2155 | + medicalNotes: this.addStudents.medicalNotes, | |
2156 | + height: this.addStudents.height, | |
2157 | + weight: this.addStudents.weight, | |
2158 | + upload: this.imageUrl | |
1955 | 2159 | }; |
1956 | 2160 | this.loading = true; |
1957 | 2161 | http() |
1958 | 2162 | .post("/createStudent", addStudent) |
1959 | 2163 | .then(response => { |
1960 | - console.log(addStudent) | |
2164 | + console.log(addStudent); | |
1961 | 2165 | if ((this.snackbar = true)) { |
1962 | 2166 | this.text = "New Student added successfully"; |
1963 | 2167 | } |
... | ... | @@ -1981,40 +2185,40 @@ export default { |
1981 | 2185 | }, |
1982 | 2186 | save() { |
1983 | 2187 | let editStudent = { |
1984 | - studentId:this.editedItem._id, | |
1985 | - name: this.editedItem.name, | |
1986 | - email: this.editedItem.email, | |
1987 | - role: this.editedItem.role, | |
1988 | - dob: this.editedItem.dob, | |
1989 | - city: this.editedItem.city, | |
1990 | - pincode: this.editedItem.pincode, | |
1991 | - country: this.editedItem.country, | |
1992 | - permanentAddress: this.editedItem.permanentAddress, | |
1993 | - presentAddress: this.editedItem.presentAddress, | |
1994 | - mobile: this.editedItem.mobile, | |
1995 | - state: this.editedItem.state, | |
1996 | - gender: this.editedItem.gender, | |
1997 | - fatherName: this.editedItem.fatherName, | |
1998 | - fatherCellNo: this.editedItem.fatherCellNo, | |
1999 | - motherName: this.editedItem.motherName, | |
2000 | - motherCellNo: this.editedItem.motherCellNo, | |
2001 | - establishmentYear: this.editedItem.establishmentYear, | |
2002 | - classId: this.editedItem.select, | |
2003 | - sectionId: this.editedItem.selectSection, | |
2004 | - bloodGroup:this.editedItem.bloodGroup, | |
2005 | - allergies:this.editedItem.allergies, | |
2006 | - medicalNotes:this.editedItem.medicalNotes, | |
2007 | - height:this.editedItem.height, | |
2008 | - weight:this.editedItem.weight, | |
2009 | - } | |
2010 | - if(this.imageUrl){ | |
2011 | - editStudent.upload = this.imageUrl | |
2012 | - } | |
2013 | - console.log("editStudent",editStudent); | |
2188 | + studentId: this.editedItem._id, | |
2189 | + name: this.editedItem.name, | |
2190 | + email: this.editedItem.email, | |
2191 | + role: this.editedItem.role, | |
2192 | + dob: this.editedItem.dob, | |
2193 | + city: this.editedItem.city, | |
2194 | + pincode: this.editedItem.pincode, | |
2195 | + country: this.editedItem.country, | |
2196 | + permanentAddress: this.editedItem.permanentAddress, | |
2197 | + presentAddress: this.editedItem.presentAddress, | |
2198 | + mobile: this.editedItem.mobile, | |
2199 | + state: this.editedItem.state, | |
2200 | + gender: this.editedItem.gender, | |
2201 | + fatherName: this.editedItem.fatherName, | |
2202 | + fatherCellNo: this.editedItem.fatherCellNo, | |
2203 | + motherName: this.editedItem.motherName, | |
2204 | + motherCellNo: this.editedItem.motherCellNo, | |
2205 | + establishmentYear: this.editedItem.establishmentYear, | |
2206 | + classId: this.editedItem.select, | |
2207 | + sectionId: this.editedItem.selectSection, | |
2208 | + bloodGroup: this.editedItem.bloodGroup, | |
2209 | + allergies: this.editedItem.allergies, | |
2210 | + medicalNotes: this.editedItem.medicalNotes, | |
2211 | + height: this.editedItem.height, | |
2212 | + weight: this.editedItem.weight | |
2213 | + }; | |
2214 | + if (this.imageUrl) { | |
2215 | + editStudent.upload = this.imageUrl; | |
2216 | + } | |
2217 | + console.log("editStudent", editStudent); | |
2014 | 2218 | http() |
2015 | 2219 | .put("/updateStudent", editStudent) |
2016 | 2220 | .then(response => { |
2017 | - console.log("editStudent",editStudent); | |
2221 | + console.log("editStudent", editStudent); | |
2018 | 2222 | if ((this.snackbar = true)) { |
2019 | 2223 | this.text = "Successfully Student Existing User"; |
2020 | 2224 | } |
... | ... | @@ -2023,11 +2227,64 @@ export default { |
2023 | 2227 | }) |
2024 | 2228 | .catch(error => { |
2025 | 2229 | // console.log(error); |
2026 | - if ((this.snackbar = true)) { | |
2027 | - this.text = error.response.data.statusText; | |
2028 | - } | |
2230 | + if ((this.snackbar = true)) { | |
2231 | + this.text = error.response.data.statusText; | |
2232 | + } | |
2029 | 2233 | }); |
2030 | 2234 | }, |
2235 | + submitParentDetails() { | |
2236 | + if (this.$refs.parentForm.validate()) { | |
2237 | + let addparentDetails = { | |
2238 | + email: this.parentData.email, | |
2239 | + fatherName: this.parentData.fatherName, | |
2240 | + fatherCellNo: this.parentData.fatherCellNo, | |
2241 | + motherName: this.parentData.motherName, | |
2242 | + motherCellNo: this.parentData.motherCellNo, | |
2243 | + role: "PARENT" | |
2244 | + }; | |
2245 | + this.loading = true; | |
2246 | + http() | |
2247 | + .post("/createParent", addparentDetails) | |
2248 | + .then(response => { | |
2249 | + this.parentId = response.data.data.id; | |
2250 | + this.e2 = 2; | |
2251 | + if ((this.snackbar = true)) { | |
2252 | + this.text = "successfully"; | |
2253 | + } | |
2254 | + // this.getStudentList(); | |
2255 | + this.clear(); | |
2256 | + this.loading = false; | |
2257 | + }) | |
2258 | + .catch(error => { | |
2259 | + console.log(error.response.data); | |
2260 | + if ((this.snackbar = true)) { | |
2261 | + this.text = error.response.data.message; | |
2262 | + this.text = error.response.data.statusText; | |
2263 | + } | |
2264 | + this.loading = false; | |
2265 | + }); | |
2266 | + } | |
2267 | + }, | |
2268 | + getParentDetails() { | |
2269 | + if (this.parentData.email) { | |
2270 | + http() | |
2271 | + .get("getParticularParent", { | |
2272 | + params: { email: this.parentData.email }, | |
2273 | + headers: { | |
2274 | + Authorization: "Bearer " + this.$store.state.token | |
2275 | + } | |
2276 | + }) | |
2277 | + .then(response => { | |
2278 | + this.showNext = true; | |
2279 | + this.showParent = false; | |
2280 | + this.parentData = response.data.data; | |
2281 | + this.parentId = response.data.data._id; | |
2282 | + }) | |
2283 | + .catch(error => { | |
2284 | + console.log("err====>", error.response.data.message); | |
2285 | + }); | |
2286 | + } | |
2287 | + }, | |
2031 | 2288 | handleDrawerToggle() { |
2032 | 2289 | window.getApp.$emit("APP_DRAWER_TOGGLED"); |
2033 | 2290 | }, |
... | ... | @@ -2044,7 +2301,7 @@ export default { |
2044 | 2301 | }) |
2045 | 2302 | .then(response => { |
2046 | 2303 | this.addclass = response.data.data; |
2047 | - // console.log("getClassesList=====>",this.addclass) | |
2304 | + // console.log("getClassesList=====>",this.addclass) | |
2048 | 2305 | }) |
2049 | 2306 | .catch(err => { |
2050 | 2307 | // console.log("err====>", err); |
... | ... | @@ -2155,8 +2412,8 @@ h4 { |
2155 | 2412 | } |
2156 | 2413 | } |
2157 | 2414 | @media screen and (max-width: 380px) { |
2158 | - .pl-3 { | |
2159 | - padding-left: 0px !important; | |
2415 | + .pl-3 { | |
2416 | + padding-left: 0px !important; | |
2160 | 2417 | } |
2161 | 2418 | .right { |
2162 | 2419 | float: none !important; | ... | ... |
static/icon.png
112 KB