Commit 5f1d4b44471028b31ecc16626e4247535cff1eab

Authored by Neeraj Sharma
1 parent 3816c82ec6

fix design and fix api notification all pages or add loader all submit(add) button

src/pages/Class/addclass.vue
... ... @@ -377,7 +377,7 @@ export default {
377 377 .then(response => {
378 378 // console.log("deleteUers",deleteStudent)
379 379 if ((this.snackbar = true)) {
380   - this.text = "Successfully delete Existing User";
  380 + this.text = "Successfully delete Existing Class";
381 381 }
382 382 this.getClassList();
383 383 })
... ... @@ -414,18 +414,20 @@ export default {
414 414 classNum: this.addclasses.classNum
415 415 };
416 416 console.log(addClass);
  417 + this.loading = true;
417 418 http()
418 419 .post("/createClass", addClass)
419 420 .then(response => {
420 421 this.getClassList();
421 422 if ((this.snackbar = true)) {
422   - this.text = "New user added successfully";
  423 + this.text = "New class added successfully";
423 424 }
424   -
425 425 this.clear();
  426 + this.loading = false;
426 427 })
427 428 .catch(error => {
428 429 // console.log(error);
  430 + this.loading = false;
429 431 if ((this.snackbar = true)) {
430 432 this.text = error.response.data.message;
431 433 }
... ... @@ -447,7 +449,7 @@ export default {
447 449 .then(response => {
448 450 console.log("editClass", editClass);
449 451 if ((this.snackbar = true)) {
450   - this.text = "Successfully Edit Existing User";
  452 + this.text = "Successfully Edit Existing Class";
451 453 }
452 454 this.getClassList();
453 455 })
... ...
src/pages/News/news.vue
... ... @@ -84,7 +84,7 @@
84 84 <v-form ref="form">
85 85 <v-container fluid>
86 86 <v-layout>
87   - <v-flex
  87 + <!-- <v-flex
88 88 xs12
89 89 class="text-xs-center text-sm-center text-md-center text-lg-center mr-4"
90 90 >
... ... @@ -93,7 +93,7 @@
93 93 <span v-for = "image in editedItem.newsImageUrl">
94 94 <img :src="image" alt="newsImage" v-if="editedItem.newsImageUrl">
95 95 </span>
96   - </v-avatar>
  96 + </v-avatar> -->
97 97 <input
98 98 type = "file"
99 99 style="display: none"
... ... @@ -101,13 +101,15 @@
101 101 accept="image/*"
102 102 @change="onFilePicked"
103 103 >
104   - <img
105   - :src="editItem.newsImageUrl"
106   - height="150"
107   - v-if="imageUrl"
108   - style="border-radius:50%; width:200px"
109   - >
  104 + <v-flex align-center justify-center layout text-xs-center >
  105 + <!-- <v-avatar size="50px" style="position:absolute; top:20px;">
  106 + <img src="/static/icon/user.png">
  107 + </v-avatar> -->
  108 + <span v-for = "image in editedItem.newsImageUrl" class="mt-4 pa-2">
  109 + <img :src="image" alt="News" width="240" height="180">
  110 + </span>
110 111 </v-flex>
  112 + <!-- </v-flex> -->
111 113 </v-layout>
112 114 <v-layout>
113 115 <v-flex xs12 sm12>
... ... @@ -278,9 +280,9 @@
278 280 <td class="text-xs-center">{{ props.index}}</td>
279 281 <td id="td"class="text-xs-center">
280 282 <span v-for = "image in props.item.newsImageUrl" class="pa-2">
281   - <v-avatar size = "70">
282   - <img :src="image" alt="">
283   - </v-avatar>
  283 + <!-- <v-avatar size = "70"> -->
  284 + <img :src="image" alt="newsImage" width="100" height="70">
  285 + <!-- </v-avatar> -->
284 286 </span>
285 287 </td>
286 288 <td id="td" class="text-xs-center">{{ props.item.title}}</td>
... ... @@ -465,7 +467,7 @@ export default {
465 467 descriptionRules: [v => !!v || " Description is required"],
466 468 headers: [
467 469 {
468   - align: "center",
  470 + align: "justify-center",
469 471 text: "No",
470 472 sortable: false,
471 473 value: "No"
... ... @@ -530,7 +532,7 @@ export default {
530 532 // console.log("getSectionsList=====>", this.addSection);
531 533 })
532 534 .catch(err => {
533   - // console.log("err====>", err);
  535 + console.log("err====>", err);
534 536 // this.$router.replace({ path: '/' });
535 537 });
536 538 },
... ... @@ -618,7 +620,7 @@ export default {
618 620 .then(response => {
619 621 // console.log("deleteNews",deleteNews)
620 622 if ((this.snackbar = true)) {
621   - this.text = "Successfully delete Existing User";
  623 + this.text = "Successfully delete Existing News";
622 624 }
623 625 this.getNewsList();
624 626 })
... ... @@ -667,7 +669,7 @@ export default {
667 669 .then(response => {
668 670 console.log(newsData)
669 671 if ((this.snackbar = true)) {
670   - this.text = "New user added successfully";
  672 + this.text = "New News added successfully";
671 673 }
672 674 this.getNewsList();
673 675 this.loading = false;
... ... @@ -686,15 +688,6 @@ export default {
686 688 this.$refs.form.reset();
687 689 },
688 690 save() {
689   - // let imageData = new FormData();
690   - // imageData.append("upload", this.imageFile);
691   - // console.log(imageData);
692   - // let editNews = {
693   - // newsId: this.editedItem._id,
694   - // title: this.editedItem.title,
695   - // description: this.editedItem.description,
696   - // // imageData
697   - // };
698 691 let newsData = new FormData();
699 692 for( var i = 0; i < this.imageFile.length; i++ ){
700 693 let file = this.imageFile[i];
... ... @@ -707,7 +700,7 @@ export default {
707 700 .then(response => {
708 701 // console.log("updateNews",updateNews);
709 702 if ((this.snackbar = true)) {
710   - this.text = "Successfully Edit Existing User";
  703 + this.text = "Successfully Edit Existing News";
711 704 }
712 705 this.getNewsList();
713 706 })
... ...
src/pages/Notification/notification.vue
... ... @@ -528,21 +528,24 @@ export default {
528 528 // imageData
529 529 };
530 530 console.log(create)
  531 + this.loading = true;
531 532 http()
532 533 .post("/createNotification", create)
533 534 .then(response => {
534 535 console.log(create)
535 536 if ((this.snackbar = true)) {
536   - this.text = "New user added successfully";
  537 + this.text = "New Notification added successfully";
537 538 }
538 539 this.getNotifications();
539 540 this.clear();
  541 + this.loading = false;
540 542 })
541 543 .catch(error => {
542 544 // console.log(error);
543 545 if ((this.snackbar = true)) {
544 546 this.text = error.response.data.message;
545 547 }
  548 + this.loading = false;
546 549 });
547 550 }
548 551 },
... ...
src/pages/Section/section.vue
... ... @@ -140,7 +140,7 @@
140 140 <v-flex><br><br>
141 141 <v-layout>
142 142 <v-flex xs5 sm6>
143   - <h5 class="right my-1">Class Name:</h5>
  143 + <h5 class="right my-1"><b>Class Name:</b></h5>
144 144 </v-flex>
145 145 <v-flex sm6 xs8>
146 146 <h5 class="my-1">{{ editedItem.classData.classNum }}</h5>
... ... @@ -148,12 +148,20 @@
148 148 </v-layout>
149 149 <v-layout>
150 150 <v-flex xs5 sm6>
151   - <h5 class="right my-1">Section Name:</h5>
  151 + <h5 class="right my-1"><b>Section Name:</b></h5>
152 152 </v-flex>
153 153 <v-flex sm6 xs8>
154 154 <h5 class="my-1">{{ editedItem.name }}</h5>
155 155 </v-flex>
156 156 </v-layout>
  157 + <v-layout>
  158 + <v-flex xs5 sm6>
  159 + <h5 class="right my-1"><b>Session:</b></h5>
  160 + </v-flex>
  161 + <v-flex sm6 xs8>
  162 + <h5 class="my-1">{{ editedItem.session }}</h5>
  163 + </v-flex>
  164 + </v-layout>
157 165 </v-flex>
158 166 </v-layout>
159 167 </v-container>
... ... @@ -182,6 +190,8 @@
182 190 <td id="td" class="text-xs-center">{{ props.index}}</td>
183 191 <td id="td" class="text-xs-center">{{ props.item.classData.classNum}}</td>
184 192 <td id="td" class="text-xs-center">{{ props.item.name}}</td>
  193 + <td id="td" class="text-xs-center">{{ props.item.session}}</td>
  194 +
185 195 <td class="text-xs-center">
186 196 <span>
187 197 <img
... ... @@ -349,6 +359,7 @@ export default {
349 359 },
350 360 { text: "Class Name", value: "classData.classNum", sortable: false, align: "center" },
351 361 { text: "Section Name", value: "name", sortable: false, align: "center" },
  362 + { text: "Session", value: "session", sortable: false, align: "center" },
352 363 { text: "Action", value: "", sortable: false, align: "center" }
353 364 ],
354 365 desserts: [],
... ... @@ -429,7 +440,7 @@ export default {
429 440 .then(response => {
430 441 // console.log("deleteUers",deleteStudent)
431 442 if ((this.snackbar = true)) {
432   - this.text = "Successfully delete Existing User";
  443 + this.text = "Successfully delete Existing Section";
433 444 }
434 445 this.getSectionList();
435 446 })
... ... @@ -471,22 +482,25 @@ export default {
471 482 session:this.add.session
472 483 };
473 484 console.log(addSection)
  485 + this.loading = true;
474 486 http()
475 487 .post("/createSection", addSection)
476 488 .then(response => {
477 489 console.log(addSection)
478 490 this.getSectionList();
479 491 if (this.snackbar = true) {
480   - this.text = "New user added successfully";
  492 + this.text = "New Section added successfully";
481 493 }
482 494  
483 495 this.clear();
  496 + this.loading = false;
484 497 })
485 498 .catch(error => {
486 499 // console.log(error);
487 500 if (this.snackbar = true) {
488 501 this.text = error.response.data.message;
489 502 }
  503 + this.loading = false;
490 504 });
491 505 }
492 506 },
... ... @@ -509,7 +523,7 @@ export default {
509 523 .then(response => {
510 524 // console.log("editStudent",editStudent);
511 525 if ((this.snackbar = true)) {
512   - this.text = "Successfully Edit Existing User";
  526 + this.text = "Successfully Edit Existing Section";
513 527 }
514 528 this.getSectionList();
515 529 // this.showLoader = false;
... ...
src/pages/Students/students.vue
... ... @@ -1591,7 +1591,7 @@ export default {
1591 1591 .then(response => {
1592 1592 // console.log("deleteUers",deleteStudent)
1593 1593 if ((this.snackbar = true)) {
1594   - this.text = "Successfully delete Existing User";
  1594 + this.text = "Successfully delete Existing Student";
1595 1595 }
1596 1596 this.getStudentList();
1597 1597 })
... ... @@ -1653,21 +1653,24 @@ export default {
1653 1653 imageData
1654 1654 // upload:this.imageFile
1655 1655 };
  1656 + this.loading = true;
1656 1657 http()
1657 1658 .post("/createStudent", addStudent)
1658 1659 .then(response => {
1659 1660 // console.log(addStudent)
1660 1661 if ((this.snackbar = true)) {
1661   - this.text = "New user added successfully";
  1662 + this.text = "New Student added successfully";
1662 1663 }
1663 1664 // this.getStudentList();
1664 1665 this.clear();
  1666 + this.loading = false;
1665 1667 })
1666 1668 .catch(error => {
1667 1669 // console.log(error);
1668 1670 if ((this.snackbar = true)) {
1669 1671 this.text = error.response.data.message;
1670 1672 }
  1673 + this.loading = false;
1671 1674 });
1672 1675 }
1673 1676 },
... ... @@ -1708,7 +1711,7 @@ export default {
1708 1711 .then(response => {
1709 1712 // console.log("editStudent",editStudent);
1710 1713 if ((this.snackbar = true)) {
1711   - this.text = "Successfully Edit Existing User";
  1714 + this.text = "Successfully Student Existing User";
1712 1715 }
1713 1716 this.findStudents();
1714 1717 })
... ...
src/pages/Teachers/teachers.vue
... ... @@ -1257,7 +1257,7 @@ export default {
1257 1257 .then(response => {
1258 1258 // console.log("deleteUers",deleteTeachers)
1259 1259 if ((this.snackbar = true)) {
1260   - this.text = "Successfully delete Existing User";
  1260 + this.text = "Successfully delete Existing Teacher";
1261 1261 }
1262 1262 this.getTeacherList();
1263 1263 })
... ... @@ -1322,22 +1322,25 @@ export default {
1322 1322 // upload:this.imageFile
1323 1323 };
1324 1324 // console.log("addTeacher============>", addTeacher);
  1325 + this.loading = true;
1325 1326 http()
1326 1327 .post("/createTeacher", addTeacher)
1327 1328 .then(response => {
1328 1329 console.log("addTeacher", addTeacher);
1329 1330 this.getTeacherList();
1330 1331 if ((this.snackbar = true)) {
1331   - this.text = "New user added successfully";
  1332 + this.text = "New Teacher added successfully";
1332 1333 }
1333 1334  
1334 1335 this.clear();
  1336 + this.loading = false;
1335 1337 })
1336 1338 .catch(error => {
1337 1339 // console.log(error);
1338 1340 if ((this.snackbar = true)) {
1339 1341 this.text = error.response.data.message;
1340 1342 }
  1343 + this.loading = false;
1341 1344 });
1342 1345 }
1343 1346 },
... ... @@ -1368,7 +1371,7 @@ export default {
1368 1371 .then(response => {
1369 1372 console.log("editTeacher",editTeacher);
1370 1373 if ((this.snackbar = true)) {
1371   - this.text = "Successfully Edit Existing User";
  1374 + this.text = "Successfully Edit Existing Teacher";
1372 1375 }
1373 1376 this.getTeacherList();
1374 1377 })
... ...
src/pages/TimeTable/timeTable.vue
... ... @@ -1072,7 +1072,7 @@
1072 1072 .then(response => {
1073 1073 // console.log("deleteUers",deleteTimeTable)
1074 1074 if ((this.snackbar = true)) {
1075   - this.text = "Successfully delete Existing User";
  1075 + this.text = "Successfully delete Existing Time Table";
1076 1076 }
1077 1077 this.findTimeTable();
1078 1078 })
... ... @@ -1131,6 +1131,7 @@
1131 1131 }
1132 1132 ]
1133 1133 };
  1134 + this.loading = true;
1134 1135 http()
1135 1136 .post("/createTimeTable", addTimeTable)
1136 1137 .then(response => {
... ... @@ -1139,12 +1140,14 @@
1139 1140 this.text = "New Time Table added successfully";
1140 1141 }
1141 1142 this.clear();
  1143 + this.loading = false;
1142 1144 })
1143 1145 .catch(error => {
1144 1146 // console.log(error);
1145 1147 if ((this.snackbar = true)) {
1146 1148 this.text = error.response.data.message;
1147 1149 }
  1150 + this.loading = false;
1148 1151 });
1149 1152 }
1150 1153 },
... ... @@ -1168,7 +1171,7 @@
1168 1171 .then(response => {
1169 1172 console.log("editTimeTable", editTimeTable);
1170 1173 if ((this.snackbar = true)) {
1171   - this.text = "Successfully Edit Existing User";
  1174 + this.text = "Successfully Edit Existing Time Table";
1172 1175 }
1173 1176 this.findTimeTable();
1174 1177 })
... ...