Compare View

switch
from
...
to
 
Commits (9)
src/Services/AllApiCalls.js
... ... @@ -15,6 +15,8 @@ export default {
15 15 pdfFileName: "",
16 16 courseData: [],
17 17 teachersList: [],
  18 + schoolEvents: [],
  19 + particularEvent: {},
18 20  
19 21 }
20 22 },
... ...
src/Services/GetApis.js
... ... @@ -3,10 +3,10 @@ export default {
3 3 mixins: [ApiCalls],
4 4 data() {
5 5 return {
6   - courseData: [],
  6 + // courseData: [],
7 7  
8 8 // dashboard.vue data properties
9   - particularEvent: {},
  9 +
10 10  
11 11  
12 12 }
... ... @@ -81,12 +81,38 @@ export default {
81 81 let response = await this.getMethod("/getParticularMeetingEvent", {
82 82 meetingEventId: params.meetingEventId
83 83 })
84   - this.particularEvent = response.data.data
  84 + // this.particularEvent.push = response.data.data
  85 + return response
  86 + } catch (error) {
  87 + console.log("Error in getParticularMeetingEvent - ", error.message)
  88 + }
  89 + },
  90 +
  91 + async getParticularSchoolEvent(params) {
  92 + try {
  93 + let response = await this.getMethod("/getParticularSchoolEvent", {
  94 + schoolEventId: params.schoolEventId
  95 + })
  96 + // this.particularEvent = response.data.data
  97 + return response
85 98 } catch (error) {
86 99 console.log("Error in getParticularMeetingEvent - ", error.message)
87 100 }
88 101 },
89 102  
  103 + async getSchoolEventsList(params) {
  104 + try {
  105 + let response = await this.getMethod("/getSchoolEventsList")
  106 + this.schoolEvents = response.data.data;
  107 + console.log("school events - ", this.schoolEvents)
  108 + return response
  109 + } catch (error) {
  110 + console.log("Error in getParticularMeetingEvent - ", error.message)
  111 + }
  112 +
  113 + },
  114 +
  115 +
90 116 /************************************************************************************************************************ */
91 117  
92 118 /* APIS USED IN LiveOnlineClass.vue */
... ...
src/pages/Academic/subject.vue
... ... @@ -632,7 +632,7 @@ export default {
632 632 watch: {
633 633 addSubjectDialog: function (val) {
634 634 if (!val) {
635   - this.addSubject = [];
  635 + // this.addSubject = [];
636 636 }
637 637 },
638 638 },
... ...
src/pages/AssignTeachers.vue
... ... @@ -6,7 +6,7 @@
6 6 </div>
7 7  
8 8 <!-- SNACKBAR -->
9   - <v-snackbar
  9 + <!-- <v-snackbar
10 10 :timeout="timeout"
11 11 :top="y === 'top'"
12 12 :right="x === 'right'"
... ... @@ -17,7 +17,7 @@
17 17 {{ text }}
18 18 <v-spacer></v-spacer>
19 19 <v-btn flat text @click="snackbar = false">X</v-btn>
20   - </v-snackbar>
  20 + </v-snackbar>-->
21 21  
22 22 <!-- DIALOG ENROLL TEACHER -->
23 23 <v-dialog v-model="dialogEnrollTeacher" max-width="600px" scrollable persistent>
... ... @@ -56,38 +56,33 @@
56 56 </v-dialog>
57 57  
58 58 <v-toolbar color="transparent" flat>
59   - <v-card-actions>
60   - <v-layout row wrap>
61   - <!-- SELECT CLASS -->
62   - <v-flex xs12 sm6>
63   - <v-select
64   - :items="classesList"
65   - label="Select Class"
66   - v-model="classId"
67   - item-text="classNum"
68   - item-value="_id"
69   - name="Select Class"
70   - :rules="classRules"
71   - required
72   - @change="populateCourses(classId)"
73   - class="ml-2"
74   - ></v-select>
75   - </v-flex>
76   - <!-- SELECT COURSE -->
77   - <v-flex xs12 sm6>
78   - <v-select
79   - :items="courseData"
80   - label="Select Course"
81   - v-model="courseId"
82   - item-text="courseName"
83   - item-value="_id"
84   - required
85   - class="ml-2"
86   - @change="getTeachersList()"
87   - ></v-select>
88   - </v-flex>
89   - </v-layout>
90   - </v-card-actions>
  59 + <v-spacer></v-spacer>
  60 + <v-flex xs12 sm4 md2>
  61 + <v-select
  62 + small
  63 + :items="classesList"
  64 + label="Select Class"
  65 + v-model="getReport.classId"
  66 + item-text="classNum"
  67 + item-value="_id"
  68 + name="Select Class"
  69 + @change="getCourses(getReport.classId)"
  70 + class="mr-2"
  71 + required
  72 + ></v-select>
  73 + </v-flex>
  74 + <v-flex xs12 sm4 md2>
  75 + <v-select
  76 + :items="courseData"
  77 + label="Select Course"
  78 + v-model="getReport.courseId"
  79 + item-text="courseName"
  80 + item-value="_id"
  81 + required
  82 + class="ml-2"
  83 + @change=" getTeacherTable(getReport.classId)"
  84 + ></v-select>
  85 + </v-flex>
91 86 </v-toolbar>
92 87  
93 88 <!-- LIST OF TEACHERS -->
... ... @@ -118,13 +113,13 @@
118 113 <template slot="headers" slot-scope="props">
119 114 <tr>
120 115 <th>
121   - <v-checkbox
  116 + <!-- <v-checkbox
122 117 :input-value="props.all"
123 118 :indeterminate="props.indeterminate"
124 119 primary
125 120 hide-details
126 121 @click.native="toggleAll"
127   - ></v-checkbox>
  122 + ></v-checkbox>-->
128 123 </th>
129 124 <th
130 125 v-for="header in props.headers"
... ... @@ -222,6 +217,7 @@ export default {
222 217 align: "center",
223 218 },
224 219 ],
  220 + getReport: {},
225 221 selected: [],
226 222 teachers: [],
227 223 // courseData: [],
... ... @@ -242,9 +238,9 @@ export default {
242 238 }),
243 239  
244 240 methods: {
245   - async populateCourses() {
246   - let response = await this.getCourseesList({ classId: this.classId });
247   - },
  241 + // async populateCourses() {
  242 + // let response = await this.getCourseesList({ classId: getReport.classId });
  243 + // },
248 244 enrollTeacher(selected) {
249 245 let selectedTeachersArray = [];
250 246 selectedTeachersArray.push({ teacherId: selected._id });
... ... @@ -256,22 +252,24 @@ export default {
256 252 break;
257 253 }
258 254 }
259   -
260 255 if (selected.enroll === true) {
261 256 if (!isExists) this.selected.push(selected);
262 257 var payload = {
263   - courseId: this.courseId,
264   - teacherId: selectedTeachersArray,
  258 + courseId: this.getReport.courseId,
  259 + teacherId: selected._id,
265 260 };
266 261 http()
267 262 .put("/assignTeacherToCourse", payload)
268 263 .then((response) => {
  264 + // console.log("===response===", response);
269 265 this.snackbar = true;
  266 + this.color = "success";
270 267 this.text = response.data.message;
271 268 this.getParticularCourse("noSnackbar");
272 269 })
273 270 .catch((error) => {
274 271 this.snackbar = true;
  272 + this.color = "error";
275 273 this.text = error.response.data.message;
276 274 });
277 275 }
... ... @@ -280,16 +278,17 @@ export default {
280 278 selected.enroll != undefined &&
281 279 selected.enroll != null
282 280 ) {
283   - var payloadDeleteStudents = {
284   - courseId: this.courseId,
285   - teacherId: selected.enrollId,
  281 + var payloadDeleteTeacher = {
  282 + courseId: this.getReport.courseId,
  283 + assignedId: selected.enrollId,
286 284 };
287 285 http()
288   - .put("/deleteStudents", payloadDeleteStudents)
  286 + .put("/removeTeacherToCourse", payloadDeleteTeacher)
289 287 .then((response) => {
290 288 this.snackbar = true;
  289 + this.color = "success";
291 290 this.text = response.data.message;
292   - this.getParticularCourse();
  291 + this.getParticularCourse("noSnackbar");
293 292 })
294 293 .catch((error) => {
295 294 this.snackbar = true;
... ... @@ -300,7 +299,7 @@ export default {
300 299  
301 300 toggleAll() {
302 301 let withdraw = false;
303   - if (this.selected.length === this.studentsData.length) withdraw = true;
  302 + if (this.selected.length === this.teachersList.length) withdraw = true;
304 303  
305 304 if (withdraw) {
306 305 var payload = {
... ... @@ -313,8 +312,8 @@ export default {
313 312 this.snackbar = true;
314 313 this.text = response.data.message;
315 314 this.selected = [];
316   - for (let i = 0; i < this.studentsData.length; i++) {
317   - this.studentsData[i].enroll = false;
  315 + for (let i = 0; i < this.teachersList.length; i++) {
  316 + this.teachersList[i].enroll = false;
318 317 }
319 318 this.getParticularCourse();
320 319 })
... ... @@ -324,7 +323,7 @@ export default {
324 323 });
325 324 } else {
326 325 let selectedTeachersArray = [];
327   - for (let item of this.studentsData) {
  326 + for (let item of this.teachersList) {
328 327 if (item.enroll === false || !item.enroll) {
329 328 selectedTeachersArray.push({ teacherId: item._id });
330 329 }
... ... @@ -339,8 +338,8 @@ export default {
339 338 .then((response) => {
340 339 this.snackbar = true;
341 340 this.text = response.data.message;
342   - for (let i = 0; i < this.studentsData.length; i++) {
343   - this.studentsData[i].enroll = true;
  341 + for (let i = 0; i < this.teachersList.length; i++) {
  342 + this.teachersList[i].enroll = true;
344 343 }
345 344 this.getParticularCourse();
346 345 })
... ... @@ -350,23 +349,82 @@ export default {
350 349 });
351 350 }
352 351 },
353   - // getCourses() {
354   - // this.showLoader = true;
355   - // http()
356   - // .get("/getCourseesList", {
357   - // params: {
358   - // classId: this.selectStudents.select,
359   - // },
360   - // })
361   - // .then((response) => {
362   - // this.courseData = response.data.data;
363   - // this.showLoader = false;
364   - // })
365   - // .catch((err) => {
366   - // console.log("err====>", err);
367   - // this.showLoader = false;
368   - // });
369   - // },
  352 + getTeacherTable(id) {
  353 + // console.log("id", this.getReport.courseId);
  354 + this.getTeachersList("noSnackbar");
  355 + },
  356 + getTeachersList(message) {
  357 + this.showLoader = true;
  358 + http()
  359 + .get("/getTeachersList", {
  360 + params: {
  361 + classId: this.getReport.classId,
  362 + },
  363 + })
  364 + .then((response) => {
  365 + this.teachersList = response.data.data;
  366 + this.showLoader = false;
  367 + // this.addStudentAttendenceDialog = false;
  368 + var attendence = "";
  369 + for (let i = 0; i < this.teachersList.length; i++) {
  370 + this.teachersList[i].attendence = true;
  371 + }
  372 + this.getParticularCourse(message);
  373 + })
  374 + .catch((error) => {
  375 + console.log("err====>", error);
  376 + this.showLoader = false;
  377 + });
  378 + },
  379 + getParticularCourse(message) {
  380 + this.selected = [];
  381 + var payload = {
  382 + courseId: this.getReport.courseId,
  383 + };
  384 + http()
  385 + .get("/getParticularCourse", {
  386 + params: payload,
  387 + })
  388 + .then((response) => {
  389 + for (let i = 0; i < response.data.data.assignedTeacher.length; i++) {
  390 + var teacherId = {};
  391 + teacherId = response.data.data.assignedTeacher[i];
  392 + for (let j = 0; j < this.teachersList.length; j++) {
  393 + if (teacherId.teacherId == this.teachersList[j]._id) {
  394 + this.teachersList[j].enroll = true;
  395 + this.teachersList[j].enrollId = teacherId._id;
  396 + this.selected.push(this.teachersList[j]);
  397 + break;
  398 + }
  399 + }
  400 + }
  401 + if (message != "noSnackbar") {
  402 + this.snackbar = true;
  403 + this.text = response.data.message;
  404 + }
  405 + })
  406 + .catch((error) => {
  407 + this.snackbar = true;
  408 + this.text = error.response.data.message;
  409 + });
  410 + },
  411 + getCourses(classId) {
  412 + this.showLoader = true;
  413 + http()
  414 + .get("/getCourseesList", {
  415 + params: {
  416 + classId: classId,
  417 + },
  418 + })
  419 + .then((response) => {
  420 + this.courseData = response.data.data;
  421 + this.showLoader = false;
  422 + })
  423 + .catch((err) => {
  424 + console.log("err====>", err);
  425 + this.showLoader = false;
  426 + });
  427 + },
370 428 // getSections(_id) {
371 429 // var token = this.$store.state.token;
372 430 // this.showLoader = true;
... ...
src/pages/Common/UploadPdf.vue
... ... @@ -23,7 +23,7 @@ export default {
23 23 return {
24 24 fileToLoad: "",
25 25 fileName: "",
26   - fileInBase64: ""
  26 + fileInBase64: "",
27 27 };
28 28 },
29 29 methods: {
... ... @@ -39,12 +39,12 @@ export default {
39 39 // Select the very first file from list
40 40 this.fileToLoad = selectedFile[0];
41 41 this.fileName = selectedFile[0].name;
42   - console.log("file name - ", this.fileName);
  42 + // console.log("file name - ", this.fileName);
43 43 // FileReader function for read the file.
44 44 var fileReader = new FileReader();
45 45 // Onload of file read the file content
46 46 let vm = this;
47   - fileReader.onload = function(fileLoadedEvent) {
  47 + fileReader.onload = function (fileLoadedEvent) {
48 48 vm.fileInBase64 = fileLoadedEvent.target.result;
49 49 // Print data in console
50 50 // console.log(vm.fileInBase64);
... ... @@ -54,9 +54,9 @@ export default {
54 54 // console.log("required - ", requiredUrl);
55 55  
56 56 let fileData = {
57   - fileName: this.fileName,
  57 + selectedFileName: vm.fileName,
58 58 fileInBase64: requiredUrl,
59   - emptyPdf: ""
  59 + emptyPdf: "",
60 60 };
61 61 vm.$emit("pdfFileSelected", fileData);
62 62 };
... ... @@ -78,10 +78,10 @@ export default {
78 78 let fileData = {
79 79 fileName: this.fileName,
80 80 fileInBase64: this.fileInBase64,
81   - trigger: ""
  81 + trigger: "",
82 82 };
83 83 this.$emit("fileSelected", fileData);
84   - }
  84 + },
85 85 },
86 86 watch: {
87 87 respondToTrigger() {
... ... @@ -89,17 +89,17 @@ export default {
89 89 // console.log("Reset pdf - ", this.emptyPdf);
90 90 this.resetInput();
91 91 }
92   - }
  92 + },
93 93 },
94 94 computed: {
95 95 respondToTrigger: {
96 96 get() {
97 97 return this.emptyPdf;
98 98 },
99   - set(newVal) {}
  99 + set(newVal) {},
100 100 // this.respondToTrigger = this.trigger;
101   - }
102   - }
  101 + },
  102 + },
103 103 };
104 104 </script>
105 105 <style scoped >
... ...
src/pages/Course/courseDetail.vue
... ... @@ -394,7 +394,7 @@
394 394 </v-flex>
395 395 </v-layout>
396 396 <!-- LINK TO PDF -->
397   - <v-layout row justify-center v-show="editedItem.pdfFileUrl != ''">
  397 + <!-- <v-layout row justify-center v-show="editedItem.pdfFileUrl != ''">
398 398 <v-flex xs6>
399 399 <div style="width: 100%;">
400 400 <a
... ... @@ -412,7 +412,7 @@
412 412 </a>
413 413 </div>
414 414 </v-flex>
415   - </v-layout>
  415 + </v-layout>-->
416 416 </v-flex>
417 417 </v-layout>
418 418 </v-container>
... ... @@ -597,6 +597,18 @@
597 597 />
598 598 <span>Delete Chapter</span>
599 599 </v-tooltip>
  600 + <v-tooltip top>
  601 + <img
  602 + slot="activator"
  603 + style="cursor:pointer; width:20px; height:20px; "
  604 + class="mr-3"
  605 + src="/static/icon/dashboard icons-34.png"
  606 + @click="openLink(props.item.pdfFileUrl)"
  607 + />
  608 + <span>
  609 + <h5>{{props.item.fileName}}</h5>
  610 + </span>
  611 + </v-tooltip>
600 612 </td>
601 613 </tr>
602 614 </template>
... ... @@ -880,6 +892,9 @@ export default {
880 892 showData: false,
881 893 }),
882 894 methods: {
  895 + openLink(url) {
  896 + window.open(url, "_blank");
  897 + },
883 898 getCourses(classId) {
884 899 this.showLoader = true;
885 900 http()
... ... @@ -942,10 +957,14 @@ export default {
942 957 this.addChapterDialog = true;
943 958 },
944 959 submitChapter() {
  960 + // console.log("addChapterItem", this.addChapterItem);
945 961 this.addChapterItem.chapterPoints = [];
946 962 for (let i = 0; i < this.findsChapterPoint.length; i++) {
947 963 this.addChapterItem.chapterPoints.push(this.findsChapterPoint[i].value);
948 964 }
  965 + this.addChapterItem.uploadPdf = this.pdfFile;
  966 + this.addChapterItem.uploadPpt = this.pptFile;
  967 + this.addChapterItem.fileName = this.pdfFileName;
949 968 this.loading = true;
950 969 http()
951 970 .put("/addChapters", this.addChapterItem)
... ... @@ -1056,6 +1075,7 @@ export default {
1056 1075 chapterPoints: chapterPoints,
1057 1076 uploadPdf: this.pdfFile,
1058 1077 uploadPpt: this.pptFile,
  1078 + fileName: this.pdfFileName,
1059 1079 },
1060 1080 ];
1061 1081 }
... ... @@ -1136,6 +1156,7 @@ export default {
1136 1156 chapterPoints: chapterPoints,
1137 1157 uploadPdf: this.pdfFile,
1138 1158 uploadPpt: this.pptFile,
  1159 + fileName: this.pdfFileName,
1139 1160 };
1140 1161 this.editLoading = true;
1141 1162 http()
... ...
src/pages/Course/enrollStudents.vue
... ... @@ -197,6 +197,8 @@ export default {
197 197 },
198 198 getCourses(classId) {
199 199 this.showLoader = true;
  200 + this.studentsData = [];
  201 + this.getReport.courseId = "";
200 202 http()
201 203 .get("/getCourseesList", {
202 204 params: {
... ... @@ -221,7 +223,8 @@ export default {
221 223 },
222 224 })
223 225 .then((response) => {
224   - this.studentsData = response.data.data;
  226 + this.studentsData = response.data.data.filter((item) => item.status);
  227 + //this.studentsData = response.data.data;
225 228 this.showLoader = false;
226 229 // this.addStudentAttendenceDialog = false;
227 230 var attendence = "";
... ...
src/pages/Dashboard/LiveOnlineClass.vue
... ... @@ -230,14 +230,16 @@ export default {
230 230 console.log("this.api ", this.api);
231 231 _this.api.addEventListener("videoConferenceJoined", () => {
232 232 console.log("Local User Joined");
233   -
  233 + this.showLoader = false;
234 234 _this.api.executeCommand("displayName", _this.username);
235 235 _this.api.executeCommand("password", this_.roomPassword);
236 236 });
  237 +
237 238 _this.api.on("readyToClose", () => {
238 239 this.$router.push({ name: "Refresh" });
239   - this.showLoader = false;
  240 +
240 241 });
  242 +
241 243 } catch (error) {
242 244 console.error("Failed to load Jitsi API", error);
243 245 }
... ...
src/pages/Dashboard/dashboard.vue
... ... @@ -69,50 +69,115 @@
69 69 </v-snackbar>
70 70  
71 71 <!-- DIALOG BOX EVENT DETAILS -->
72   - <v-dialog v-model="viewEventDetails" max-width="500" persistent>
73   - <v-card flat class="card-style pa-2" dark>
74   - <!-- TITLE -->
  72 + <v-dialog v-model="viewEventDetails" max-width="500" persistent lazy>
  73 + <v-card flat class="card-style elevation-0" height="600" dark>
75 74 <v-layout>
76   - <v-layout>
77   - <v-flex xs12>
78   - <label class="title text-xs-center">{{particularEvent.title}}</label>
79   - <v-icon size="24" class="right" @click="viewEventDetails = false">cancel</v-icon>
80   - </v-flex>
81   - </v-layout>
  75 + <v-flex xs12>
  76 + <v-icon
  77 + size="24"
  78 + class="right"
  79 + @click="active=0;displayEventsList=[];dialogSchoolEvents = [];dialogMeetingEvents=[];viewEventDetails = false"
  80 + >cancel</v-icon>
  81 + </v-flex>
82 82 </v-layout>
  83 + <v-tabs v-model="active" color="#7f62f8" dark v-if="displayEventsList.length == 0">
  84 + <v-tabs-slider color="yellow"></v-tabs-slider>
  85 + <v-tab v-for="(tab,index) in tabs" :key="index">
  86 + <div class="subheading py-1">{{ tab.name }}</div>
  87 + </v-tab>
  88 + <!-- <v-tab href="#schoolTab" v-if="dialogSchoolEvents.length > 0">School Events</v-tab>
  89 + <v-tab href="#meetingTab" v-if="dialogMeetingEvents.length > 0">Meeting Events</v-tab>-->
83 90  
84   - <v-card-text>
85   - <v-list dark class="card-style">
86   - <v-list-tile>
87   - <v-list-tile-content>
88   - <v-list-tile-title>Date Of Event : {{moment(particularEvent.dateOfEvent).format("DD MMMM, YYYY")}}</v-list-tile-title>
89   - </v-list-tile-content>
90   - </v-list-tile>
91   - <v-list-tile>
92   - <v-list-tile-content>
93   - <v-list-tile-title>Start Time : {{particularEvent.startTime}}</v-list-tile-title>
94   - </v-list-tile-content>
95   - </v-list-tile>
96   - <v-list-tile>
97   - <v-list-tile-content>
98   - <v-list-tile-title>Duration : {{particularEvent.duration}}</v-list-tile-title>
99   - </v-list-tile-content>
100   - </v-list-tile>
101   - <v-list-tile>
102   - <v-list-tile-content>
103   - <v-list-tile-title>
  91 + <!-- SCHOOL EVENTS-->
  92 + <v-tab-item>
  93 + <v-card flat class="card-style pa-2" dark v-if="dialogSchoolEvents.length > 0">
  94 + <v-container fluid>
  95 + <v-divider class="white"></v-divider>
  96 + <v-card
  97 + v-for="(particularEvent,index) in dialogSchoolEvents"
  98 + :key="index"
  99 + class="mt-3 pa-2 card-style white--text elevation-0"
  100 + >
  101 + <div>
  102 + <div class="headline">{{particularEvent.title}}</div>
  103 + <div>Date Of Event : {{moment(particularEvent.dateOfEvent).format("DD MMMM, YYYY")}}</div>
  104 + <div v-if="particularEvent.link">Start Time : {{particularEvent.startTime}}</div>
  105 + <div v-if="particularEvent.link">Duration : {{particularEvent.duration}}</div>
  106 + <div v-if="particularEvent.link">
  107 + Link :
  108 + <a :href="particularEvent.link">{{particularEvent.link}}</a>
  109 + </div>
  110 + <div
  111 + v-if="particularEvent.description"
  112 + >Description : {{particularEvent.description}}</div>
  113 + </div>
  114 + <v-divider class="white mt-3"></v-divider>
  115 + </v-card>
  116 + </v-container>
  117 + </v-card>
  118 + </v-tab-item>
  119 +
  120 + <!-- MEETING EVENTS -->
  121 + <v-tab-item>
  122 + <v-card v-if="dialogMeetingEvents.length > 0" flat class="card-style pa-2" dark>
  123 + <v-container fluid>
  124 + <v-divider class="white"></v-divider>
  125 + <v-card
  126 + v-for="(particularEvent,index) in dialogMeetingEvents"
  127 + :key="index"
  128 + class="mt-3 pa-2 card-style white--text elevation-0"
  129 + >
  130 + <div>
  131 + <div class="headline">{{particularEvent.title}}</div>
  132 + <div>Date Of Event : {{moment(particularEvent.dateOfEvent).format("DD MMMM, YYYY")}}</div>
  133 + <div v-if="particularEvent.link">Start Time : {{particularEvent.startTime}}</div>
  134 + <div v-if="particularEvent.link">Duration : {{particularEvent.duration}}</div>
  135 + <div v-if="particularEvent.link">
  136 + Link :
  137 + <a :href="particularEvent.link">{{particularEvent.link}}</a>
  138 + </div>
  139 + <div
  140 + v-if="particularEvent.description"
  141 + >Description : {{particularEvent.description}}</div>
  142 + </div>
  143 + <v-divider class="white mt-3"></v-divider>
  144 + </v-card>
  145 + </v-container>
  146 + </v-card>
  147 + </v-tab-item>
  148 + </v-tabs>
  149 +
  150 + <!-- IF NO MULTIPLE EVENTS ON SAME DATE -->
  151 + <v-card flat class="card-style pa-2 elevation-0" dark v-else>
  152 + <v-container fluid>
  153 + <v-divider class="white"></v-divider>
  154 + <v-card
  155 + v-for="(particularEvent,index) in displayEventsList"
  156 + :key="index"
  157 + class="mt-3 pa-2 card-style white--text elevation-0"
  158 + >
  159 + <div>
  160 + <div class="headline">{{particularEvent.title}}</div>
  161 + <div>Date Of Event : {{moment(particularEvent.dateOfEvent).format("DD MMMM, YYYY")}}</div>
  162 + <div v-if="particularEvent.link">Start Time : {{particularEvent.startTime}}</div>
  163 + <div v-if="particularEvent.link">Duration : {{particularEvent.duration}}</div>
  164 + <div v-if="particularEvent.link">
104 165 Link :
105 166 <a :href="particularEvent.link">{{particularEvent.link}}</a>
106   - </v-list-tile-title>
107   - </v-list-tile-content>
108   - </v-list-tile>
109   - </v-list>
110   - </v-card-text>
  167 + </div>
  168 + <div
  169 + v-if="particularEvent.description"
  170 + >Description : {{particularEvent.description}}</div>
  171 + </div>
  172 + <v-divider class="white mt-3"></v-divider>
  173 + </v-card>
  174 + </v-container>
  175 + </v-card>
111 176 </v-card>
112 177 </v-dialog>
113 178  
114 179 <v-layout wrap row>
115   - <v-flex xs12 sm12 md9>
  180 + <v-flex xs12 sm12 md8>
116 181 <v-container fluid grid-list-xl>
117 182 <!-- ***** Total Students ***** -->
118 183 <v-layout wrap class v-if="$store.state.role != 'PARENT' ">
... ... @@ -228,61 +293,97 @@
228 293 </v-layout>
229 294  
230 295 <!-- FOR ADMIN ROLE -->
231   - <v-card class="mt-2 card" v-if="role == 'ADMIN'">
232   - <!-- <full-calendar
233   - ref="calendar"
234   - defaultView="month"
235   - droppable="false"
236   - :events="events"
237   - :config="config"
238   - ></full-calendar>-->
239   - <h4 class="pa-3">
240   - <b>Notice</b>
241   - </h4>
  296 + <v-layout row wrap v-if="role == 'ADMIN'||role == 'TEACHER'">
  297 + <!-- NOTICE -->
  298 + <v-flex xs12 sm6>
  299 + <v-card class="card">
  300 + <v-container>
  301 + <v-card-title class="justify-center subheading font-weight-bold">Notice</v-card-title>
242 302  
243   - <v-data-table
244   - :items="noticeData"
245   - class="elevation-0"
246   - flat
247   - hide-actions
248   - hide-headers
249   - style="border-spacing: 0 !important;"
250   - >
251   - <template
252   - slot="items"
253   - slot-scope="props"
254   - v-if="props.index < 5"
255   - style="border-spacing: 0 !important;"
256   - >
257   - <tr class="td-notice">
258   - <td class="grey--text" style="width:18px">{{ props.index + 1}}</td>
259   - <td>
260   - <span class="grey--text caption">{{ date(props.item.created) }}</span>
261   - <br />
262   - <span class="body-2">{{ props.item.title}}</span>
263   - </td>
264   - <td class="grey--text mt-2">{{ props.item.description}}</td>
  303 + <v-data-table
  304 + :items="noticeData"
  305 + class="elevation-0"
  306 + flat
  307 + hide-actions
  308 + hide-headers
  309 + style="border-spacing: 0 !important;"
  310 + >
  311 + <template
  312 + slot="items"
  313 + slot-scope="props"
  314 + v-if="props.index < 5"
  315 + style="border-spacing: 0 !important;"
  316 + >
  317 + <tr class="td-notice">
  318 + <td class="grey--text" style="width:18px">{{ props.index + 1}}</td>
  319 + <td>
  320 + <span class="grey--text caption">{{ date(props.item.created) }}</span>
  321 + <br />
  322 + <span class="body-2">{{ props.item.title}}</span>
  323 + </td>
  324 + <!-- <td class="grey--text mt-2" >{{ props.item.description}}</td> -->
  325 +
  326 + <td class="text-xs-center">
  327 + <span>
  328 + <v-tooltip top>
  329 + <img
  330 + slot="activator"
  331 + style="cursor:pointer; width:25px; height:25px; "
  332 + @click="profile"
  333 + src="/static/icon/view.png"
  334 + />
  335 + <span>View</span>
  336 + </v-tooltip>
  337 + </span>
  338 + </td>
  339 + </tr>
  340 + </template>
  341 + </v-data-table>
  342 + </v-container>
  343 + </v-card>
  344 + </v-flex>
  345 +
  346 + <!-- SCHOOL EVENTS -->
  347 + <v-flex xs12 sm6>
  348 + <v-card class="card">
  349 + <v-container>
  350 + <v-card-title class="justify-center subheading font-weight-bold">School Events</v-card-title>
  351 + <div
  352 + v-for="(schoolEvent,index) in schoolEvents"
  353 + :key="schoolEvent.title"
  354 + class="mt-2"
  355 + style="cursor: pointer;"
  356 + @click="seeEventDetails(schoolEvent,'schoolEvent')"
  357 + >
  358 + <!-- color dot-->
  359 + <span
  360 + :style="{ 'background-color': colorsArray[index%colorsArray.length] }"
  361 + style="height: 12px;width: 12px;border-radius: 50%;display: inline-block;vertical-align: top;"
  362 + ></span>
  363 + <div style="display: inline-block;" class="ml-2">
  364 + <div>
  365 + <!-- date of event -->
  366 + <div
  367 + class="grey--text lighten-1 caption"
  368 + v-if="schoolEvent.dateOfEvent"
  369 + >{{moment(schoolEvent.dateOfEvent).format("DD MMMM, YYYY")}}</div>
  370 + <!-- event title-->
  371 + <div class="body-1" v-if="schoolEvent.title">{{schoolEvent.title}}</div>
  372 + </div>
  373 + </div>
  374 + </div>
  375 + <div v-if="schoolEvents.length == 0">
  376 + <p class="text-center title grey lighten-4 error--text">No Data Found!</p>
  377 + </div>
  378 + </v-container>
  379 + </v-card>
  380 + </v-flex>
  381 + </v-layout>
265 382  
266   - <td class="text-xs-center">
267   - <span>
268   - <v-tooltip top>
269   - <img
270   - slot="activator"
271   - style="cursor:pointer; width:25px; height:25px; "
272   - @click="profile"
273   - src="/static/icon/view.png"
274   - />
275   - <span>View</span>
276   - </v-tooltip>
277   - </span>
278   - </td>
279   - </tr>
280   - </template>
281   - </v-data-table>
282   - </v-card>
  383 +
283 384  
284 385 <!-- FOR TEACHER ROLE -->
285   - <v-card class="mt-2 card" v-if="role == 'TEACHER'">
  386 + <!-- <v-card class="mt-2 card" v-if="role == 'TEACHER'">
286 387 <v-layout>
287 388 <v-flex xs6 sm6 md6>
288 389 <h4 class="pa-3">
... ... @@ -331,7 +432,7 @@
331 432  
332 433 <v-flex xs6 sm6 md6>
333 434 <v-card-text>
334   - <v-card-title class="justify-center subheading font-weight-bold">Latest Events</v-card-title>
  435 + <v-card-title class="justify-center subheading font-weight-bold">Meeting Events</v-card-title>
335 436 <div
336 437 v-for="(activity,index) in activityList"
337 438 :key="index"
... ... @@ -359,7 +460,7 @@
359 460 </v-card-text>
360 461 </v-flex>
361 462 </v-layout>
362   - </v-card>
  463 + </v-card> -->
363 464  
364 465 <!-- COURSES -->
365 466 <v-layout v-if="role == 'PARENT'">
... ... @@ -497,7 +598,7 @@
497 598 </v-flex>
498 599 <v-spacer></v-spacer>
499 600 <!-- SIDE BAR -->
500   - <v-flex xs12 sm12 md3>
  601 + <v-flex xs12 sm12 md4>
501 602 <v-card height="100%" class="elevation-0 mt-3 profileDasboard">
502 603 <v-card-text class="px-2">
503 604 <h4 class="text-xs-center py-3">
... ... @@ -539,10 +640,12 @@
539 640  
540 641 <vue-event-calendar :events="activityEvents" @day-changed="handleDayChanged($event)"></vue-event-calendar>
541 642  
542   - <!-- LATEST EVENTS -->
543   - <v-card class="my-3 elevation-0" v-if="role != 'TEACHER'">
  643 + <!-- MEETING EVENTS -->
  644 + <!-- IF ROLE IS ADMIN -->
  645 + <v-card class="my-3 elevation-0">
544 646 <v-card-text v-if="$store.state.role === 'ADMIN' ">
545   - <v-card-title class="justify-center subheading font-weight-bold">Latest Events</v-card-title>
  647 + <!-- MEETING EVENTS -->
  648 + <v-card-title class="justify-center subheading font-weight-bold">Meeting Events</v-card-title>
546 649 <div
547 650 v-for="(activity,index) in activityList"
548 651 :key="index"
... ... @@ -560,7 +663,7 @@
560 663 class="grey--text lighten-1 caption"
561 664 v-if="activity.dateOfEvent"
562 665 >{{moment(activity.dateOfEvent).format("DD MMMM, YYYY")}}</div>
563   - <div class="body-2" v-if="activity.title">{{activity.title}}</div>
  666 + <div class="body-1" v-if="activity.title">{{activity.title}}</div>
564 667 </div>
565 668 </div>
566 669 </div>
... ... @@ -568,8 +671,10 @@
568 671 <p class="text-center title grey lighten-4 error--text">No Data Found!</p>
569 672 </div>
570 673 </v-card-text>
  674 +
  675 + <!-- ROLE IS NOT ADMIN -->
571 676 <v-card-text v-if="$store.state.role != 'ADMIN'">
572   - <v-card-title class="justify-center subheading font-weight-bold">Latest Events</v-card-title>
  677 + <v-card-title class="justify-center subheading font-weight-bold">Meeting Events</v-card-title>
573 678 <div
574 679 v-for="(activity,index) in activityList"
575 680 :key="index"
... ... @@ -582,7 +687,7 @@
582 687 style="height: 12px;width: 12px;border-radius: 50%;display: inline-block;vertical-align: top;"
583 688 ></span>
584 689 <div style="display: inline-block;" class="ml-2">
585   - <!-- LATEST EVENTS FOR PARENT -->
  690 + <!-- MEETING EVENTS FOR PARENT -->
586 691 <div v-if="$store.state.role === 'PARENT' ">
587 692 <div
588 693 class="grey--text lighten-1 caption"
... ... @@ -594,7 +699,7 @@
594 699 >{{activity.meetingEvent.title}}</div>
595 700 </div>
596 701  
597   - <!-- LATEST EVENTS FOR TEACHER -->
  702 + <!-- MEETING EVENTS FOR TEACHER -->
598 703 <div v-if="role === 'TEACHER'">
599 704 <div
600 705 class="grey--text lighten-1 caption"
... ... @@ -666,7 +771,16 @@ export default {
666 771 // calendar: {},
667 772  
668 773 // DIALOG BOX EVENT DETAILS
  774 + tabs: [
  775 + { name: "School Events", icon: "mdi-account" },
  776 + { name: "Meeting Events", icon: "mdi-account-outline" },
  777 + ],
669 778 viewEventDetails: false,
  779 + active: 0,
  780 + particularEvent: [],
  781 + displayEventsList: [],
  782 + dialogSchoolEvents: [],
  783 + dialogMeetingEvents: [],
670 784  
671 785 // CALENDER
672 786 moment: moment,
... ... @@ -823,26 +937,60 @@ export default {
823 937 console.log(" test - ", e);
824 938 },
825 939 async handleDayChanged(e) {
826   - await this.getParticularMeetingEvent({
827   - meetingEventId: e.events[0]._id,
828   - });
  940 + console.log("event calender - ", e);
  941 + /*the list of events that will be used in dialog box to display events */
  942 + // this.displayEventsList = [];
  943 + this.dialogMeetingEvents = [];
  944 + this.dialogSchoolEvents = [];
  945 +
  946 + for (var i = 0; i < e.events.length; i++) {
  947 + if (e.events[i].eventType == "meetingEvent") {
  948 + let meetingEventResponse = await this.getParticularMeetingEvent({
  949 + meetingEventId: e.events[i]._id,
  950 + });
  951 + this.dialogMeetingEvents.push(meetingEventResponse.data.data);
  952 + }
  953 + if (e.events[i].eventType == "schoolEvent") {
  954 + let schoolEventResponse = await this.getParticularSchoolEvent({
  955 + schoolEventId: e.events[i]._id,
  956 + });
  957 + this.dialogSchoolEvents.push(schoolEventResponse.data.data);
  958 + }
  959 + }
  960 +
829 961 this.viewEventDetails = true;
830 962 },
831   - async seeEventDetails(activity) {
832   - if (this.$store.state.role === "TEACHER") {
833   - await this.getParticularMeetingEvent({ meetingEventId: activity._id });
834   - this.viewEventDetails = true;
835   - }
  963 + async seeEventDetails(activity, message) {
  964 + // if (this.$store.state.role === "TEACHER") {
  965 + // let response = await this.getParticularMeetingEvent({
  966 + // meetingEventId: activity._id,
  967 + // });
  968 + // this.displayEventsList = [];
  969 + // this.displayEventsList.push(response.data.data);
  970 + // this.viewEventDetails = true;
  971 + // }
836 972 if (this.$store.state.role === "PARENT") {
837   - await this.getParticularMeetingEvent({
  973 + let response = await this.getParticularMeetingEvent({
838 974 meetingEventId: activity.meetingEvent._id,
839 975 });
  976 + this.displayEventsList = [];
  977 + this.displayEventsList.push(response.data.data);
840 978 this.viewEventDetails = true;
841 979 }
842   - if (this.$store.state.role === "ADMIN") {
843   - await this.getParticularMeetingEvent({
844   - meetingEventId: activity._id,
845   - });
  980 + if (this.$store.state.role === "ADMIN" || this.$store.state.role === "TEACHER") {
  981 + if (message == "schoolEvent") {
  982 + let response = await this.getParticularSchoolEvent({
  983 + schoolEventId: activity._id,
  984 + });
  985 + this.displayEventsList = [];
  986 + this.displayEventsList.push(response.data.data);
  987 + } else {
  988 + let response = await this.getParticularMeetingEvent({
  989 + meetingEventId: activity._id,
  990 + });
  991 + this.displayEventsList = [];
  992 + this.displayEventsList.push(response.data.data);
  993 + }
846 994 this.viewEventDetails = true;
847 995 }
848 996 },
... ... @@ -1070,7 +1218,7 @@ export default {
1070 1218 this.activityList = activityList;
1071 1219 this.showLoader = false;
1072 1220  
1073   - /* set activityEvents array to highlight event dates in calender */
  1221 + /* set meetingEvents in activityEvents array to highlight event dates in calender */
1074 1222 for (var i = 0; i < this.activityList.length; i++) {
1075 1223 let obj = {};
1076 1224 obj.date = moment(this.activityList[i].dateOfEvent).format(
... ... @@ -1078,6 +1226,8 @@ export default {
1078 1226 );
1079 1227 obj.title = this.activityList[i].title;
1080 1228 obj._id = this.activityList[i]._id;
  1229 + obj.eventType = "meetingEvent";
  1230 + /* activityEvents is an array used to display events in calender on particular dates */
1081 1231 this.activityEvents.push(obj);
1082 1232 }
1083 1233 })
... ... @@ -1085,6 +1235,22 @@ export default {
1085 1235 this.showLoader = false;
1086 1236 });
1087 1237 }
  1238 + /* If role is ADMIN or TEACHER then school events need to be displayed too */
  1239 + if (this.role === "ADMIN" || this.role === "TEACHER") {
  1240 + await this.getSchoolEventsList();
  1241 + /* set schoolEvents in activityEvents array to highlight event dates in calender */
  1242 + for (var i = 0; i < this.schoolEvents.length; i++) {
  1243 + let obj = {};
  1244 + obj.date = moment(this.schoolEvents[i].dateOfEvent).format(
  1245 + "YYYY/MM/DD"
  1246 + );
  1247 + obj.title = this.schoolEvents[i].title;
  1248 + obj._id = this.schoolEvents[i]._id;
  1249 + obj.eventType = "schoolEvent";
  1250 + /* activityEvents is an array used to display events in calender on particular dates */
  1251 + this.activityEvents.push(obj);
  1252 + }
  1253 + }
1088 1254 },
1089 1255 },
1090 1256  
... ... @@ -1155,6 +1321,9 @@ export default {
1155 1321  
1156 1322 <style scoped>
1157 1323 @import "fullcalendar/dist/fullcalendar.css";
  1324 +.wrap-text {
  1325 + -webkit-line-clamp: unset !important;
  1326 +}
1158 1327  
1159 1328 a {
1160 1329 color: white;
... ...
src/pages/Report/admitCard.vue
... ... @@ -114,9 +114,9 @@
114 114 <!-- ADMIT CARDS -->
115 115 <div id="printMe" v-if="frontPart">
116 116 <v-card
117   - v-for="(student,index) in getScheduleList.studentData"
118   - :key="index"
119   - class="mt-3"
  117 + v-for="(student,index) in getScheduleList.studentData"
  118 + :key="index"
  119 + class="mt-3"
120 120 style="
121 121 page-break-after: always;
122 122 background-color: #fff;
... ... @@ -128,8 +128,7 @@
128 128 webkit-box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.2), 0px 0px 0px 0px rgba(0,0,0,0.14), 0px 0px 0px 0px rgba(0,0,0,0.12) !important;
129 129 box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.2), 0px 0px 0px 0px rgba(0,0,0,0.14), 0px 0px 0px 0px rgba(0,0,0,0.12) !important;"
130 130 >
131   -
132   - <v-layout style="border-bottom: 1px solid #ddd;margin: 8px; auto" >
  131 + <v-layout style="border-bottom: 1px solid #ddd;margin: 8px; auto">
133 132 <v-flex xs3 style="margin-bottom:0px">
134 133 <img
135 134 :src="userData.schoolLogoUrl"
... ... @@ -158,12 +157,7 @@
158 157 </div>
159 158 </v-flex>
160 159 <v-flex xs4 style="text-align:center;margin-bottom:0px">
161   -
162   - <img
163   - src="/static/icon/user.png"
164   - v-if="!student.profilePicUrl"
165   - width="80"
166   - />
  160 + <img src="/static/icon/user.png" v-if="!student.profilePicUrl" width="80" />
167 161 <img
168 162 :src="student.profilePicUrl"
169 163 onerror="this.src='/static/icon/user.png';"
... ... @@ -546,15 +540,15 @@ export default {
546 540 } else {
547 541 studentId.push(this.getReport.studentId);
548 542 }
549   - console.log("this.getReport.studentId - ", studentId);
  543 + // console.log("this.getReport.studentId - ", studentId);
  544 + var admitPayload = {
  545 + examId: this.getReport.examId,
  546 + classId: this.getReport.classId,
  547 + sectionId: this.getReport.sectionId,
  548 + studentId: studentId,
  549 + };
550 550 http()
551   - .get("/getScheduleForParticularStudent", {
552   - params: {
553   - examId: this.getReport.examId,
554   - classId: this.getReport.classId,
555   - sectionId: this.getReport.sectionId,
556   - studentId: studentId,
557   - },
  551 + .put("/getScheduleForParticularStudent", admitPayload, {
558 552 paramsSerializer: (params) => {
559 553 return qs.stringify(params);
560 554 },
... ... @@ -562,7 +556,7 @@ export default {
562 556 .then((response) => {
563 557 this.showTable = true;
564 558 this.getScheduleList = response.data.data;
565   - console.log(" getScheduleList - ",this.getScheduleList)
  559 + console.log(" getScheduleList - ", this.getScheduleList);
566 560 // this.schoolData = response.data.data.studentData.schoolId;
567 561 if (response.data.data.scheduleData.length === 0) {
568 562 this.showLoader = false;
... ...
src/pages/Report/idCard.vue
... ... @@ -131,11 +131,11 @@
131 131 label="Select View Type"
132 132 type="text"
133 133 :items="typeList"
134   - v-model="getReport.form"
  134 + v-model="getReport.viewType"
135 135 item-text="name"
136 136 item-value="value"
137 137 :rules="typeRules"
138   - @change="getReportType(getReport.form)"
  138 + @change="getReportType(getReport.viewType)"
139 139 required
140 140 ></v-autocomplete>
141 141 </v-flex>
... ... @@ -495,11 +495,11 @@ export default {
495 495 return date;
496 496 },
497 497 getReportType() {
498   - if (this.getReport.form === "frontPart") {
  498 + if (this.getReport.viewType === "frontPart") {
499 499 this.frontPart = true;
500 500 this.backPart = false;
501 501 }
502   - if (this.getReport.form === "backPart") {
  502 + if (this.getReport.viewType === "backPart") {
503 503 this.frontPart = false;
504 504 this.backPart = true;
505 505 }
... ... @@ -509,6 +509,12 @@ export default {
509 509 this.showReport = false;
510 510 this.getReport._id = "";
511 511 this.getCard = "";
  512 + this.classList = [];
  513 + this.addSection = [];
  514 + this.getReport.classId = "";
  515 + this.getReport.sectionId = "";
  516 + this.getReport._id = "";
  517 + this.getSelectUserData = [];
512 518 if (role.name === "STUDENT") {
513 519 // console.log("role", role);
514 520 this.showClass = true;
... ... @@ -705,15 +711,15 @@ export default {
705 711 // var strigified = JSON.stringify(getSelectUserId)
706 712 // var profileId = [];
707 713 // profileId = getSelectUserId;
  714 + var idcardPayload = {
  715 + profileId: getSelectUserId,
  716 + role: this.getReport.role.role,
  717 + };
708 718 http()
709   - .get("/getIdCardDetail", {
  719 + .put("/getIdCardDetail", idcardPayload, {
710 720 headers: {
711 721 Authorization: "Bearer " + this.token,
712 722 },
713   - params: {
714   - profileId: getSelectUserId,
715   - role: this.getReport.role.role,
716   - },
717 723 paramsSerializer: (params) => {
718 724 return qs.stringify(params);
719 725 },
... ...
src/pages/Section/section.vue
... ... @@ -318,7 +318,7 @@
318 318 <v-layout>
319 319 <v-flex xs12 sm12>
320 320 <v-card-actions>
321   - <v-btn @click="clear" class="add-button" round dark>Clear</v-btn>
  321 + <v-btn @click="clear" class="clear-button" round dark>Clear</v-btn>
322 322 <v-spacer></v-spacer>
323 323 <v-btn @click="submit" class="add-button" round dark :loading="loading">Add</v-btn>
324 324 </v-card-actions>
... ...