Blame view
src/pages/Dashboard/dashboard.vue
52.9 KB
a17c68a03
|
1 |
<template> |
68d742034
|
2 |
<v-app id="pages-dasboard"> |
01d009dde
|
3 |
<!-- ****** VIEW PROFIL NOTICE BOARD ****** --> |
68d742034
|
4 |
<!-- <v-dialog v-model="dialogNotice" max-width="940px" scrollable> |
01d009dde
|
5 6 7 8 9 10 11 12 13 14 15 16 |
<v-card> <v-toolbar color="grey lighten-2" flat> <v-spacer></v-spacer> <v-toolbar-title> <h3>Notice Board</h3> </v-toolbar-title> <v-spacer></v-spacer> <v-icon @click="closeNotice">close</v-icon> </v-toolbar> <v-card-text> <v-layout> <v-flex align-center justify-center layout text-xs-center class="mt-2"> |
088d91b5f
|
17 18 |
<img src="/static/icon/user.png" width="70px" v-if="!notice.eventImageUrl" /> <img :src="notice.eventImageUrl" width="280px" v-else-if="notice.eventImageUrl" /> |
01d009dde
|
19 20 21 22 23 24 25 26 27 28 29 30 |
</v-flex> </v-layout> <v-container grid-list-md> <v-layout wrap> <v-flex> <v-layout> <v-flex xs5 sm6> <h5 class="right my-1"> <b>Title:</b> </h5> </v-flex> <v-flex sm6 xs8> |
088d91b5f
|
31 |
<h5 class="my-1">{{ notice.title }}</h5> |
01d009dde
|
32 33 34 35 36 37 38 39 40 |
</v-flex> </v-layout> <v-layout> <v-flex xs5 sm6> <h5 class="right my-1"> <b>Description:</b> </h5> </v-flex> <v-flex sm6 xs8> |
088d91b5f
|
41 |
<h5 class="my-1">{{ notice.description }}</h5> |
01d009dde
|
42 43 44 45 46 47 48 |
</v-flex> </v-layout> </v-flex> </v-layout> </v-container> </v-card-text> </v-card> |
68d742034
|
49 50 |
</v-dialog>--> <!-- <v-container fluid grid-list-xl> --> |
6f7cf8cf5
|
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
<!-- LOADER --> <div class="loader" v-if="showLoader"> <v-progress-circular indeterminate color="white"></v-progress-circular> </div> <!-- SNACKBAR --> <v-snackbar :timeout="timeout" :top="y === 'top'" :right="x === 'right'" :vertical="mode === 'vertical'" v-model="snackbar" :color="snackbarColor" > {{ text }} <v-spacer></v-spacer> <v-btn flat text @click="snackbar = false">X</v-btn> </v-snackbar> |
a26ba60ed
|
70 |
<!-- DIALOG BOX EVENT DETAILS --> |
d802ef837
|
71 72 |
<v-dialog v-model="viewEventDetails" max-width="500" persistent lazy> <v-card flat class="card-style elevation-0" height="600" dark> |
a26ba60ed
|
73 |
<v-layout> |
d802ef837
|
74 75 76 77 78 79 80 |
<v-flex xs12> <v-icon size="24" class="right" @click="active=0;displayEventsList=[];dialogSchoolEvents = [];dialogMeetingEvents=[];viewEventDetails = false" >cancel</v-icon> </v-flex> |
a26ba60ed
|
81 |
</v-layout> |
d802ef837
|
82 83 84 85 86 87 88 |
<v-tabs v-model="active" color="#7f62f8" dark v-if="displayEventsList.length == 0"> <v-tabs-slider color="yellow"></v-tabs-slider> <v-tab v-for="(tab,index) in tabs" :key="index"> <div class="subheading py-1">{{ tab.name }}</div> </v-tab> <!-- <v-tab href="#schoolTab" v-if="dialogSchoolEvents.length > 0">School Events</v-tab> <v-tab href="#meetingTab" v-if="dialogMeetingEvents.length > 0">Meeting Events</v-tab>--> |
a26ba60ed
|
89 |
|
d802ef837
|
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
<!-- SCHOOL EVENTS--> <v-tab-item> <v-card flat class="card-style pa-2" dark v-if="dialogSchoolEvents.length > 0"> <v-container fluid> <v-divider class="white"></v-divider> <v-card v-for="(particularEvent,index) in dialogSchoolEvents" :key="index" class="mt-3 pa-2 card-style white--text elevation-0" > <div> <div class="headline">{{particularEvent.title}}</div> <div>Date Of Event : {{moment(particularEvent.dateOfEvent).format("DD MMMM, YYYY")}}</div> <div v-if="particularEvent.link">Start Time : {{particularEvent.startTime}}</div> <div v-if="particularEvent.link">Duration : {{particularEvent.duration}}</div> <div v-if="particularEvent.link"> Link : <a :href="particularEvent.link">{{particularEvent.link}}</a> </div> <div v-if="particularEvent.description" >Description : {{particularEvent.description}}</div> </div> <v-divider class="white mt-3"></v-divider> </v-card> </v-container> </v-card> </v-tab-item> <!-- MEETING EVENTS --> <v-tab-item> <v-card v-if="dialogMeetingEvents.length > 0" flat class="card-style pa-2" dark> <v-container fluid> <v-divider class="white"></v-divider> <v-card v-for="(particularEvent,index) in dialogMeetingEvents" :key="index" class="mt-3 pa-2 card-style white--text elevation-0" > <div> <div class="headline">{{particularEvent.title}}</div> <div>Date Of Event : {{moment(particularEvent.dateOfEvent).format("DD MMMM, YYYY")}}</div> <div v-if="particularEvent.link">Start Time : {{particularEvent.startTime}}</div> <div v-if="particularEvent.link">Duration : {{particularEvent.duration}}</div> <div v-if="particularEvent.link"> Link : <a :href="particularEvent.link">{{particularEvent.link}}</a> </div> <div v-if="particularEvent.description" >Description : {{particularEvent.description}}</div> </div> <v-divider class="white mt-3"></v-divider> </v-card> </v-container> </v-card> </v-tab-item> </v-tabs> <!-- IF NO MULTIPLE EVENTS ON SAME DATE --> <v-card flat class="card-style pa-2 elevation-0" dark v-else> <v-container fluid> <v-divider class="white"></v-divider> <v-card v-for="(particularEvent,index) in displayEventsList" :key="index" class="mt-3 pa-2 card-style white--text elevation-0" > <div> <div class="headline">{{particularEvent.title}}</div> <div>Date Of Event : {{moment(particularEvent.dateOfEvent).format("DD MMMM, YYYY")}}</div> <div v-if="particularEvent.link">Start Time : {{particularEvent.startTime}}</div> <div v-if="particularEvent.link">Duration : {{particularEvent.duration}}</div> <div v-if="particularEvent.link"> |
bbd60612f
|
164 165 |
Link : <a :href="particularEvent.link">{{particularEvent.link}}</a> |
d802ef837
|
166 167 168 169 170 171 172 173 174 |
</div> <div v-if="particularEvent.description" >Description : {{particularEvent.description}}</div> </div> <v-divider class="white mt-3"></v-divider> </v-card> </v-container> </v-card> |
a26ba60ed
|
175 176 |
</v-card> </v-dialog> |
3f7b85167
|
177 |
<v-layout wrap row> |
d802ef837
|
178 |
<v-flex xs12 sm12 md8> |
3f7b85167
|
179 |
<v-container fluid grid-list-xl> |
68d742034
|
180 |
<!-- ***** Total Students ***** --> |
ac24ec07a
|
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
<v-layout wrap class v-if="$store.state.role != 'PARENT' "> <v-flex xs12 sm12 md3> <router-link :to="{ name:'Students' }"> <v-card class="card pink-bgcolor"> <v-card-title primary-title class="titleCard white--text py-3">Students</v-card-title> <img src="/static/icon/student.png" class="ml-2" width="40" alt="icons" /> <v-card-title class="headline py-1 white--text">{{ students.length }}</v-card-title> </v-card> </router-link> </v-flex> <!-- ***** Total Teachers***** --> <v-flex xs12 sm12 md3> <router-link :to="{ name:'Teachers' }"> <v-card flat class="card elevation-2 firozi-bgcolor"> <v-card-title primary-title class="titleCard white--text py-3">Teachers</v-card-title> <img src="/static/icon/teacher.png" class="ml-2" width="40" alt="icons" /> <v-card-title class="headline py-1 white--text">{{ teachers.length }}</v-card-title> </v-card> </router-link> </v-flex> <!-- ***** Total Parents ***** --> <v-flex xs12 sm12 md3> <router-link :to="{ name:'Parents' }"> <v-card flat class="card yellow darken-3"> <v-card-title primary-title class="titleCard white--text py-3">Parents</v-card-title> <img src="/static/icon/parents.png" class="ml-3" width="40px" alt="icons" /> <v-card-title class="headline py-1 white--text">{{ parents.length }}</v-card-title> </v-card> </router-link> </v-flex> <!-- ***** Total Class***** --> <v-flex xs12 sm12 md3> <router-link :to="{ name:'Class' }"> <v-card flat class="card darkBlue-bgcolor"> <v-card-title primary-title class="titleCard white--text py-3">Class</v-card-title> <img src="/static/icon/class.png" width="40" alt="icons" class="ml-2" /> <v-card-title class="headline py-1 white--text">{{ classes.length }}</v-card-title> </v-card> </router-link> </v-flex> </v-layout> |
68d742034
|
223 |
|
3f7b85167
|
224 225 226 227 |
<p v-if="studentsData.length === 0 && role == 'PARENT'" class="text-center title grey lighten-4 error--text" >You have no student registered with school</p> |
2d3a8e9c3
|
228 |
<!-- ACCOUNT --> |
edfe025fa
|
229 |
<v-layout v-if="role == 'SUPERADMIN'|| role == 'ADMIN'"> |
3f7b85167
|
230 231 232 233 234 235 |
<v-flex xs12> <v-card class="card mt-2 account-Card"> <h4> <b>Account</b> </h4> <v-layout wrap> |
68d742034
|
236 |
<v-flex xs12 sm12 md3> |
3f7b85167
|
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
<v-list two-line> <template> <v-list-tile> <v-list-tile-avatar> <v-icon class="account-circle darkBlue-color">panorama_fish_eye</v-icon> </v-list-tile-avatar> <v-list-tile-content> <v-list-tile-title class="mt-2"> <p class="subheading font-color">Fees</p> </v-list-tile-title> <v-list-tile-title>Rs. {{ feeData.totalFees }}</v-list-tile-title> </v-list-tile-content> </v-list-tile> <v-list-tile> <v-list-tile-avatar> <v-icon class="account-circle yellowDark-color">panorama_fish_eye</v-icon> </v-list-tile-avatar> <v-list-tile-content> <v-list-tile-title class="mt-2"> <p class="subheading font-color">Collection</p> </v-list-tile-title> <v-list-tile-title>Rs. {{ feeData.totalCollection }}</v-list-tile-title> </v-list-tile-content> </v-list-tile> <v-list-tile> <v-list-tile-avatar> <v-icon class="account-circle pink-color">panorama_fish_eye</v-icon> </v-list-tile-avatar> <v-list-tile-content> <v-list-tile-title class="mt-2"> <p class="subheading font-color">Expences</p> </v-list-tile-title> <v-list-tile-title>Rs. {{ expenseData.sum }}</v-list-tile-title> </v-list-tile-content> </v-list-tile> </template> </v-list> |
68d742034
|
274 |
</v-flex> |
3f7b85167
|
275 276 |
<v-flex xs12 sm12 md9 lg9> <div id="chart"> |
4e37936da
|
277 |
<div v-if="showChart"> |
3f7b85167
|
278 279 280 281 282 283 |
<apexchart type="bar" height="250" style="max-width: 800px !important" :options="chartOptions" :series="series" |
3f7b85167
|
284 285 286 |
></apexchart> </div> </div> |
68d742034
|
287 288 |
</v-flex> </v-layout> |
3f7b85167
|
289 290 |
</v-card> </v-flex> |
edfe025fa
|
291 |
</v-layout> |
2d3a8e9c3
|
292 |
|
4dfee9964
|
293 |
<!-- FOR ADMIN,TEACHER ROLE --> |
4fb0af78f
|
294 |
<v-layout row wrap v-if="role == 'ADMIN'||role == 'TEACHER'"> |
d802ef837
|
295 296 |
<!-- NOTICE --> <v-flex xs12 sm6> |
4fb0af78f
|
297 |
<v-card class="card"> |
d802ef837
|
298 |
<v-container> |
29ad14d96
|
299 |
<v-card-title class="justify-center title font-weight-bold">Notice Board</v-card-title> |
88b7fd92a
|
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 |
<v-layout column> <v-flex v-for="(item,index) in noticeData" :key="index" style="cursor: pointer;" > <v-layout column> <!--Date--> <v-flex class="pb-2 pl-2 pr-2"> <v-chip :color="colorsArray[index%colorsArray.length]" text-color="white" class="ma-0" >{{ moment(item.created).format("DD MMMM, YYYY") }}</v-chip> </v-flex> <!-- title --> <v-flex class="pa-2"> |
29ad14d96
|
317 |
<div class="body-1 font-weight-bold px-2" @click="profile">{{item.title}}</div> |
88b7fd92a
|
318 |
</v-flex> |
3f7b85167
|
319 |
|
88b7fd92a
|
320 321 322 323 324 325 326 327 328 |
<!-- divider --> <v-flex class="pa-2"> <v-divider></v-divider> </v-flex> </v-layout> </v-flex> </v-layout> <!-- <v-data-table |
d802ef837
|
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 |
:items="noticeData" class="elevation-0" flat hide-actions hide-headers style="border-spacing: 0 !important;" > <template slot="items" slot-scope="props" v-if="props.index < 5" style="border-spacing: 0 !important;" > <tr class="td-notice"> <td class="grey--text" style="width:18px">{{ props.index + 1}}</td> <td> <span class="grey--text caption">{{ date(props.item.created) }}</span> <br /> <span class="body-2">{{ props.item.title}}</span> |
88b7fd92a
|
348 349 350 |
</td>--> <!-- <td class="grey--text mt-2" >{{ props.item.description}}</td> --> <!-- |
d802ef837
|
351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 |
<td class="text-xs-center"> <span> <v-tooltip top> <img slot="activator" style="cursor:pointer; width:25px; height:25px; " @click="profile" src="/static/icon/view.png" /> <span>View</span> </v-tooltip> </span> </td> </tr> </template> |
88b7fd92a
|
366 |
</v-data-table>--> |
d802ef837
|
367 368 369 370 371 372 |
</v-container> </v-card> </v-flex> <!-- SCHOOL EVENTS --> <v-flex xs12 sm6> |
88b7fd92a
|
373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 |
<v-layout column> <!-- school events --> <v-flex> <v-card class="card"> <v-container> <v-card-title class="justify-center title font-weight-bold">School Events</v-card-title> <div v-for="(schoolEvent,index) in schoolEvents" :key="schoolEvent.title" class="mt-2" style="cursor: pointer;" @click="seeEventDetails(schoolEvent,'schoolEvent')" > <!-- color dot--> <span :style="{ 'background-color': colorsArray[index%colorsArray.length] }" style="height: 12px;width: 12px;border-radius: 50%;display: inline-block;vertical-align: top;" ></span> <div style="display: inline-block;" class="ml-2"> <div> <!-- date of event --> <div class="grey--text lighten-1 caption" v-if="schoolEvent.dateOfEvent" >{{moment(schoolEvent.dateOfEvent).format("DD MMMM, YYYY")}}</div> <!-- event title--> <div class="body-1" v-if="schoolEvent.title">{{schoolEvent.title}}</div> </div> </div> |
d802ef837
|
402 |
</div> |
88b7fd92a
|
403 404 405 406 407 408 409 410 411 |
<div v-if="schoolEvents.length == 0"> <p class="text-center title grey lighten-4 error--text">No Data Found!</p> </div> </v-container> </v-card> </v-flex> <!-- apex charts - Male Female data --> <v-flex> <v-card> |
019880b6f
|
412 |
<v-card-title class="justify-center title font-weight-bold">Students</v-card-title> |
88b7fd92a
|
413 414 415 416 417 418 |
<div id="chart"> <apexcharts type="donut" :options="maleFemaleData" :series="maleFemaleSeries" /> |
d802ef837
|
419 |
</div> |
88b7fd92a
|
420 421 422 |
</v-card> </v-flex> </v-layout> |
d802ef837
|
423 424 |
</v-flex> </v-layout> |
019880b6f
|
425 426 427 428 429 430 431 432 433 434 435 436 437 |
<v-layout row wrap v-if="role == 'PARENT'"> <!-- ROLE - PARENT , ACTIVE STUDENTS --> <v-flex xs12> <v-card class="elevation-0 account-Card"> <v-container> <v-card-title class="title font-weight-bold">Students</v-card-title> <v-data-iterator :items="activeStudentsList" :rows-per-page-items="rowsPerPageItems" :pagination.sync="pagination" content-tag="v-layout" row wrap |
3f8187137
|
438 |
> |
019880b6f
|
439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 |
<template v-slot:item="props"> <v-flex xs12 sm6> <v-card style="border: 2px solid black" class="elevation-0" height="300"> <v-container> <v-card-text> <v-layout row wrap> <!-- IMAGE OF ACTIVE STUDENT --> <v-flex xs12 class="text-xs-center"> <img :src="props.item.profilePicUrl" alt="profileImage" width="80" /> </v-flex> <v-flex xs12 class="text-xs-center"> <!--NAME --> <v-layout class="pa-0 ma-0"> <v-flex xs4 class="body-1 font-weight-bold pa-0 ma-0"> <span class="left">Name:</span> </v-flex> <v-flex xs8 class="body-1 font-weight-bold pa-0 ml-2"> <span class="left">{{props.item.name}}</span> </v-flex> </v-layout> <!--ROLLNO --> <v-layout class="pa-0 ma-0"> <v-flex xs4 class="body-1 font-weight-bold pa-0 ma-0"> <span class="left">Roll No:</span> </v-flex> <v-flex xs8 class="body-1 font-weight-bold pa-0 ml-2"> <span class="left">{{props.item.rollNo}}</span> </v-flex> </v-layout> <!--GENDER --> <v-layout class="pa-0 ma-0"> <v-flex xs4 class="body-1 font-weight-bold pa-0 ma-0"> <span class="left">Gender:</span> </v-flex> <v-flex xs8 class="body-1 font-weight-bold pa-0 ml-2"> <span class="left">{{props.item.gender}}</span> </v-flex> </v-layout> <!--EMAIL --> <v-layout class="pa-0 ma-0"> <v-flex xs4 class="body-1 font-weight-bold pa-0 ma-0"> <span class="left">Email:</span> </v-flex> <v-flex xs8 class="body-1 font-weight-bold pa-0 ml-2"> <span class="left">{{props.item.email}}</span> </v-flex> </v-layout> </v-flex> </v-layout> </v-card-text> </v-container> </v-card> </v-flex> </template> </v-data-iterator> </v-container> </v-card> </v-flex> |
3f8187137
|
501 |
|
019880b6f
|
502 |
<!-- ROLE - PARENT, MY COURSES --> |
3f7b85167
|
503 |
<v-flex xs12> |
4dfee9964
|
504 505 |
<v-card class="elevation-0 account-Card"> <v-container> |
019880b6f
|
506 |
<v-card-title class="title font-weight-bold">My Courses</v-card-title> |
860da881d
|
507 |
<v-layout wrap> |
019880b6f
|
508 509 510 511 512 513 514 515 |
<v-flex xs3 v-for="(course,i) in courseData" :key="i"> <v-btn block outline color="#71d9ea" dark> <span class="subheading font-weight-bold" @click="routeToCourseDetails(course._id)" >{{ course.courseName }}</span> </v-btn> <!-- <v-list two-line> |
860da881d
|
516 |
<template> |
019880b6f
|
517 |
<v-list-tile> |
860da881d
|
518 |
<v-list-tile-avatar> |
019880b6f
|
519 |
|
860da881d
|
520 |
</v-list-tile-avatar> |
019880b6f
|
521 |
<v-list-tile-content></v-list-tile-content> |
860da881d
|
522 523 |
</v-list-tile> </template> |
019880b6f
|
524 |
</v-list>--> |
860da881d
|
525 526 |
</v-flex> </v-layout> |
4dfee9964
|
527 |
</v-container> |
3f7b85167
|
528 529 530 |
</v-card> </v-flex> </v-layout> |
4dfee9964
|
531 532 |
<v-layout row wrap v-if="role == 'PARENT'"> |
019880b6f
|
533 534 535 536 |
<!-- ROLE - PARENT , LATEST ANNOUNCEMENTS --> <v-flex xs12 sm6 md6> <!-- NOTICE --> <v-card class="account-Card"> |
4dfee9964
|
537 |
<v-container> |
019880b6f
|
538 539 540 541 542 543 |
<v-card-title class="justify-center subheading font-weight-bold">Latest Announcements</v-card-title> <v-layout column> <v-flex v-for="(item,index) in annoucementData" :key="index" style="cursor: pointer;" |
4dfee9964
|
544 |
> |
019880b6f
|
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 |
<v-layout column> <!--Date--> <v-flex class="pb-2 pl-2 pr-2"> <v-chip :color="colorsArray[index%colorsArray.length]" text-color="white" class="ma-0" >{{ moment(item.created).format("DD MMMM, YYYY") }}</v-chip> </v-flex> <!-- title --> <v-flex class="pa-2"> <div class="body-1 font-weight-bold px-2" @click="profile" >{{item.discussionType}}</div> </v-flex> <!-- divider --> <v-flex class="pa-2"> <v-divider></v-divider> </v-flex> </v-layout> </v-flex> </v-layout> |
4dfee9964
|
569 |
</v-container> |
68d742034
|
570 |
</v-card> |
3f7b85167
|
571 |
</v-flex> |
019880b6f
|
572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 |
<v-flex xs12 sm6> <v-layout column> <!-- ROLE - PARENT, SCHOOL EVENTS --> <v-flex> <v-card class="account-Card"> <v-container> <v-card-title class="justify-center subheading font-weight-bold">School Events</v-card-title> <div v-for="(schoolEvent,index) in schoolEvents" :key="schoolEvent.title" class="mt-2" style="cursor: pointer;" @click="seeEventDetails(schoolEvent,'schoolEvent')" > <!-- color dot--> <span :style="{ 'background-color': colorsArray[index%colorsArray.length] }" style="height: 12px;width: 12px;border-radius: 50%;display: inline-block;vertical-align: top;" ></span> <div style="display: inline-block;" class="ml-2"> <div> <!-- date of event --> <div class="grey--text lighten-1 caption" v-if="schoolEvent.dateOfEvent" >{{moment(schoolEvent.dateOfEvent).format("DD MMMM, YYYY")}}</div> <!-- event title--> <div class="body-1" v-if="schoolEvent.title">{{schoolEvent.title}}</div> </div> </div> |
4dfee9964
|
603 |
</div> |
019880b6f
|
604 605 606 607 608 609 610 |
<div v-if="schoolEvents.length == 0"> <p class="text-center title grey lighten-4 error--text">No Data Found!</p> </div> </v-container> </v-card> </v-flex> </v-layout> |
4dfee9964
|
611 |
</v-flex> |
3f7b85167
|
612 613 614 615 616 |
</v-layout> </v-container> </v-flex> <v-spacer></v-spacer> <!-- SIDE BAR --> |
d802ef837
|
617 |
<v-flex xs12 sm12 md4> |
3f7b85167
|
618 619 620 621 622 623 624 625 |
<v-card height="100%" class="elevation-0 mt-3 profileDasboard"> <v-card-text class="px-2"> <h4 class="text-xs-center py-3"> <b>Profile</b> </h4> <v-flex xs12 class="py-3"> <v-layout wrap> <v-flex xs12 sm12 md4> |
bbd60612f
|
626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 |
<img src="/static/icon/user.png" v-if="!userData.profilePicUrl && !userData.schoolLogoUrl" width="80" /> <img :src="userData.profilePicUrl" onerror="this.src='/static/icon/user.png';" v-if="userData.profilePicUrl" width="80" /> <img :src="userData.schoolLogoUrl" onerror="this.src='/static/icon/user.png';" v-if="userData.schoolLogoUrl" width="80" /> |
11d037abe
|
643 |
</v-flex> |
3f7b85167
|
644 645 646 647 648 649 650 |
<v-flex xs12 sm12 md6> <p class="mb-0 body-1"> <i>{{ userData.name }}</i> </p> <p class="mb-0 caption grey--text">{{ userData.email }}</p> <p class="mb-0 caption grey--text">{{ userData.mobile }}</p> <address class="caption grey--text mb-3">{{ userData.address }}</address> |
11d037abe
|
651 652 |
</v-flex> </v-layout> |
3f7b85167
|
653 654 655 |
</v-flex> <hr /> <div class="text-xs-center py-3 subheading font-weight-bold">Calender</div> |
852713654
|
656 |
|
a26ba60ed
|
657 |
<vue-event-calendar :events="activityEvents" @day-changed="handleDayChanged($event)"></vue-event-calendar> |
1dea1c0ef
|
658 |
|
4fb0af78f
|
659 |
<!-- MEETING EVENTS --> |
d802ef837
|
660 |
<!-- IF ROLE IS ADMIN --> |
4fb0af78f
|
661 |
<v-card class="my-3 elevation-0"> |
e5699315c
|
662 |
<v-card-text v-if="$store.state.role === 'ADMIN' "> |
d802ef837
|
663 664 |
<!-- MEETING EVENTS --> <v-card-title class="justify-center subheading font-weight-bold">Meeting Events</v-card-title> |
a26ba60ed
|
665 666 667 668 669 |
<div v-for="(activity,index) in activityList" :key="index" class="mt-2" style="cursor: pointer;" |
8b184d484
|
670 |
@click="seeEventDetails(activity)" |
a26ba60ed
|
671 |
> |
3f7b85167
|
672 673 674 675 676 |
<span :style="{ 'background-color': colorsArray[index%colorsArray.length] }" style="height: 12px;width: 12px;border-radius: 50%;display: inline-block;vertical-align: top;" ></span> <div style="display: inline-block;" class="ml-2"> |
e5699315c
|
677 |
<div> |
3311ad345
|
678 679 680 681 |
<div class="grey--text lighten-1 caption" v-if="activity.dateOfEvent" >{{moment(activity.dateOfEvent).format("DD MMMM, YYYY")}}</div> |
d802ef837
|
682 |
<div class="body-1" v-if="activity.title">{{activity.title}}</div> |
3311ad345
|
683 |
</div> |
3f7b85167
|
684 685 |
</div> </div> |
3311ad345
|
686 687 688 |
<div v-if="activityList.length == 0"> <p class="text-center title grey lighten-4 error--text">No Data Found!</p> </div> |
68d742034
|
689 |
</v-card-text> |
d802ef837
|
690 691 |
<!-- ROLE IS NOT ADMIN --> |
107ec8845
|
692 |
<v-card-text v-if="$store.state.role != 'ADMIN'"> |
4fb0af78f
|
693 |
<v-card-title class="justify-center subheading font-weight-bold">Meeting Events</v-card-title> |
107ec8845
|
694 |
<div |
e5699315c
|
695 696 697 698 699 700 701 702 703 |
v-for="(activity,index) in activityList" :key="index" class="mt-2" style="cursor: pointer;" @click="seeEventDetails(activity)" > <span :style="{ 'background-color': colorsArray[index%colorsArray.length] }" style="height: 12px;width: 12px;border-radius: 50%;display: inline-block;vertical-align: top;" |
107ec8845
|
704 705 |
></span> <div style="display: inline-block;" class="ml-2"> |
4fb0af78f
|
706 |
<!-- MEETING EVENTS FOR PARENT --> |
107ec8845
|
707 708 709 710 711 712 713 714 715 716 |
<div v-if="$store.state.role === 'PARENT' "> <div class="grey--text lighten-1 caption" v-if="activity.meetingEvent" >{{moment(activity.meetingEvent.dateOfEvent).format("DD MMMM, YYYY")}}</div> <div class="body-2" v-if="activity.meetingEvent" >{{activity.meetingEvent.title}}</div> </div> |
e5699315c
|
717 |
|
4fb0af78f
|
718 |
<!-- MEETING EVENTS FOR TEACHER --> |
107ec8845
|
719 720 721 722 723 724 725 726 727 728 |
<div v-if="role === 'TEACHER'"> <div class="grey--text lighten-1 caption" v-if="activity.dateOfEvent" >{{moment(activity.dateOfEvent).format("DD MMMM, YYYY")}}</div> <div class="body-2" v-if="activity.title">{{activity.title}}</div> </div> </div> <div v-if="activityList.length == 0"> <p class="text-center title grey lighten-4 error--text">No Data Found!</p> |
e5699315c
|
729 730 |
</div> </div> |
e5699315c
|
731 |
</v-card-text> |
68d742034
|
732 |
</v-card> |
3f7b85167
|
733 734 |
</v-card-text> </v-card> |
68d742034
|
735 736 |
</v-flex> </v-layout> |
3f7b85167
|
737 |
|
db965de89
|
738 |
<v-dialog v-model="dialog" max-width="500" persistent> |
a17c68a03
|
739 740 |
<v-card color="grey lighten-4" flat> <v-toolbar dark color="fixcolors"> |
a17c68a03
|
741 742 743 744 745 746 747 748 749 |
<v-spacer></v-spacer> <v-btn icon @click="dialog= false"> <v-icon>close</v-icon> </v-btn> </v-toolbar> <v-flex class="py-4"> <v-list-tile> <v-list-tile-action> <v-icon>edit</v-icon> |
8bb178441
|
750 751 |
</v-list-tile-action> <v-list-tile-content> |
a17c68a03
|
752 |
<v-list-tile-title>{{ selected.title }}</v-list-tile-title> |
8bb178441
|
753 754 |
</v-list-tile-content> </v-list-tile> |
a17c68a03
|
755 756 757 758 759 760 |
<v-list-tile> <v-list-tile-action> <v-icon>access_time</v-icon> </v-list-tile-action> <v-list-tile-content> <v-list-tile-title>{{ date(selected.start)}}</v-list-tile-title> |
a17c68a03
|
761 762 763 764 765 |
</v-list-tile-content> </v-list-tile> </v-flex> </v-card> </v-dialog> |
8bb178441
|
766 767 768 769 770 |
</v-app> </template> <script> import http from "@/Services/http.js"; |
a17c68a03
|
771 |
import moment from "moment"; |
6f7cf8cf5
|
772 |
import AllApiCalls from "@/Services/AllApiCalls.js"; |
88b7fd92a
|
773 |
import VueApexCharts from "vue-apexcharts"; |
68d742034
|
774 |
// import { FunctionalCalendar } from "vue-functional-calendar"; |
8bb178441
|
775 776 |
export default { |
68d742034
|
777 |
components: { |
88b7fd92a
|
778 |
apexcharts: VueApexCharts, |
68d742034
|
779 |
}, |
6f7cf8cf5
|
780 |
mixins: [AllApiCalls], |
a17c68a03
|
781 782 |
data() { return { |
898c80f27
|
783 |
studentsData: [], |
68d742034
|
784 785 786 787 788 789 |
// data: { // clieckedToday: false // }, // markedDates: ["16/4/2019", "18/4/2019", "20/4/2019", "21/4/2019"], // calendarData: {}, // calendar: {}, |
6f7cf8cf5
|
790 |
|
a26ba60ed
|
791 |
// DIALOG BOX EVENT DETAILS |
d802ef837
|
792 793 794 795 |
tabs: [ { name: "School Events", icon: "mdi-account" }, { name: "Meeting Events", icon: "mdi-account-outline" }, ], |
a26ba60ed
|
796 |
viewEventDetails: false, |
d802ef837
|
797 798 799 800 801 |
active: 0, particularEvent: [], displayEventsList: [], dialogSchoolEvents: [], dialogMeetingEvents: [], |
a26ba60ed
|
802 |
|
88b7fd92a
|
803 |
// apexCharts |
29ad14d96
|
804 |
maleFemaleSeries: [], |
88b7fd92a
|
805 806 807 808 809 810 |
maleFemaleData: { labels: ["Male", "Female"], legend: { formatter: function (val, opts) { return val + " - " + opts.w.globals.series[opts.seriesIndex]; }, |
019880b6f
|
811 |
position: "bottom", |
88b7fd92a
|
812 813 814 |
}, dataLabels: { enabled: true, |
019880b6f
|
815 |
formatter: function (val, opts) { |
88b7fd92a
|
816 817 818 819 |
return opts.w.globals.series[opts.seriesIndex]; }, }, }, |
0a5256600
|
820 821 822 |
// CALENDER moment: moment, activityEvents: [], |
11d037abe
|
823 824 |
onlineUser: [ { |
bbd60612f
|
825 |
user: "Student Demo", |
11d037abe
|
826 827 |
}, { |
bbd60612f
|
828 |
user: "Teacher Demo", |
11d037abe
|
829 830 |
}, { |
bbd60612f
|
831 |
user: "Priyansh Gupta", |
11d037abe
|
832 833 |
}, { |
bbd60612f
|
834 |
user: "Gaurav Aggarwal", |
11d037abe
|
835 836 |
}, { |
bbd60612f
|
837 838 |
user: "Approve Arorra", }, |
11d037abe
|
839 |
], |
a17c68a03
|
840 |
showLoader: false, |
68d742034
|
841 |
calendarData: {}, |
a17c68a03
|
842 |
dialog: false, |
01d009dde
|
843 |
dialogNotice: false, |
b28a5f17d
|
844 845 |
HolidaysList: [], EventsList: [], |
ceb43037a
|
846 |
events: [], |
a17c68a03
|
847 |
config: { |
bbd60612f
|
848 |
eventClick: (event) => { |
a17c68a03
|
849 850 |
this.selected = event; this.dialog = true; |
bbd60612f
|
851 |
}, |
8bb178441
|
852 |
}, |
6c05a9f84
|
853 |
selected: {}, |
01b56330e
|
854 |
barGraph: [], |
68d742034
|
855 |
// notice: {}, |
01d009dde
|
856 |
userData: {}, |
68d742034
|
857 858 859 |
dated: new Date(2018, 0, 9), userList: [], sectionList: [], |
6c05a9f84
|
860 861 862 |
students: "", parents: "", teachers: "", |
01d009dde
|
863 |
classes: "", |
68d742034
|
864 |
noticeData: [], |
65d5475b6
|
865 |
expenseData: [], |
01b56330e
|
866 867 |
feeData: [], collectionData: [], |
11d037abe
|
868 |
courseData: [], |
019880b6f
|
869 |
|
11d037abe
|
870 871 |
annoucementData: [], role: "", |
68d742034
|
872 873 874 875 |
attrs: [ { key: "today", highlight: true, |
bbd60612f
|
876 877 |
dates: new Date(), }, |
68d742034
|
878 879 880 881 |
], drawer: true, items: [ { title: "Home", icon: "dashboard" }, |
bbd60612f
|
882 |
{ title: "About", icon: "question_answer" }, |
68d742034
|
883 884 885 886 887 888 |
], right: null, series: [ { name: "Total", |
bbd60612f
|
889 890 |
data: [], }, |
68d742034
|
891 |
], |
4e37936da
|
892 |
showChart: false, |
68d742034
|
893 894 895 896 |
chartOptions: { chart: { type: "bar", height: 150, |
bbd60612f
|
897 |
stacked: true, |
68d600c97
|
898 899 900 901 902 903 904 905 906 907 908 909 910 |
// animations: { // enabled: true, // easing: "easeinout", // speed: 1200, // animateGradually: { // enabled: true, // delay: 450 // }, // dynamicAnimation: { // enabled: true, // speed: 450 // } // } |
68d742034
|
911 912 913 914 915 916 |
}, plotOptions: { bar: { horizontal: false, columnWidth: "25%", // endingShape: "rounded", |
bbd60612f
|
917 918 |
distributed: true, }, |
68d742034
|
919 |
}, |
68d600c97
|
920 921 922 923 924 925 926 |
responsive: [ { breakpoint: 480, options: { legend: { position: "bottom", offsetX: -10, |
bbd60612f
|
927 928 929 930 |
offsetY: 0, }, }, }, |
68d600c97
|
931 |
], |
68d742034
|
932 |
legend: { |
bbd60612f
|
933 |
show: false, |
68d742034
|
934 935 936 |
}, colors: ["#7852cc", "#f9a825", "#ff8a89"], dataLabels: { |
bbd60612f
|
937 |
enabled: false, |
68d742034
|
938 939 940 941 |
}, stroke: { show: true, width: 2, |
bbd60612f
|
942 |
colors: ["transparent"], |
68d742034
|
943 944 |
}, xaxis: { |
bbd60612f
|
945 |
categories: ["Fee", "Collections", "Expences"], |
68d742034
|
946 947 948 |
}, yaxis: { title: { |
bbd60612f
|
949 950 |
text: "", }, |
68d742034
|
951 952 |
}, fill: { |
bbd60612f
|
953 |
opacity: 1, |
68d742034
|
954 955 956 |
}, tooltip: { y: { |
bbd60612f
|
957 |
formatter: function (val, opts) { |
68d742034
|
958 |
return "" + val + " "; |
bbd60612f
|
959 960 961 |
}, }, }, |
0a5256600
|
962 |
}, |
019880b6f
|
963 964 965 966 967 968 969 970 |
/* ROLE PARENT - ACTIVE STUDENTS */ studentsData: [], activeStudent: {}, activeStudentsList: [], rowsPerPageItems: [2], pagination: { rowsPerPage: 2, }, |
0a5256600
|
971 972 |
// LATEST ACTIVITY colorsArray: ["#ff8a89", "#71d9ea", "#7852cc", "#F9A825"], |
bbd60612f
|
973 |
activityList: [], |
a17c68a03
|
974 975 |
}; }, |
32fcd6960
|
976 |
|
8bb178441
|
977 |
methods: { |
852713654
|
978 |
test(e) { |
860da881d
|
979 |
// console.log(" test - ", e); |
852713654
|
980 |
}, |
4dfee9964
|
981 982 |
/*WHEN CALENDER IS CLICKED - DISPLAYS EVENTS IN DIALOG BOX */ |
a26ba60ed
|
983 |
async handleDayChanged(e) { |
860da881d
|
984 |
// console.log("event calender - ", e); |
d802ef837
|
985 |
/*the list of events that will be used in dialog box to display events */ |
4dfee9964
|
986 |
|
d802ef837
|
987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 |
this.dialogMeetingEvents = []; this.dialogSchoolEvents = []; for (var i = 0; i < e.events.length; i++) { if (e.events[i].eventType == "meetingEvent") { let meetingEventResponse = await this.getParticularMeetingEvent({ meetingEventId: e.events[i]._id, }); this.dialogMeetingEvents.push(meetingEventResponse.data.data); } if (e.events[i].eventType == "schoolEvent") { let schoolEventResponse = await this.getParticularSchoolEvent({ schoolEventId: e.events[i]._id, }); this.dialogSchoolEvents.push(schoolEventResponse.data.data); } } |
4dfee9964
|
1004 |
/* Opens the dialog box */ |
a26ba60ed
|
1005 1006 |
this.viewEventDetails = true; }, |
4dfee9964
|
1007 1008 |
/* see meeting events, school events individually (when calender is not clicked) */ |
d802ef837
|
1009 |
async seeEventDetails(activity, message) { |
4fb0af78f
|
1010 1011 1012 1013 1014 1015 1016 1017 |
// if (this.$store.state.role === "TEACHER") { // let response = await this.getParticularMeetingEvent({ // meetingEventId: activity._id, // }); // this.displayEventsList = []; // this.displayEventsList.push(response.data.data); // this.viewEventDetails = true; // } |
8b184d484
|
1018 |
if (this.$store.state.role === "PARENT") { |
4dfee9964
|
1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 |
if (message == "schoolEvent") { let response = await this.getParticularSchoolEvent({ schoolEventId: activity._id, }); this.displayEventsList = []; this.displayEventsList.push(response.data.data); } else { let response = await this.getParticularMeetingEvent({ meetingEventId: activity.meetingEvent._id, }); this.displayEventsList = []; this.displayEventsList.push(response.data.data); } |
8b184d484
|
1032 1033 |
this.viewEventDetails = true; } |
4dfee9964
|
1034 1035 1036 1037 |
if ( this.$store.state.role === "ADMIN" || this.$store.state.role === "TEACHER" ) { |
d802ef837
|
1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 |
if (message == "schoolEvent") { let response = await this.getParticularSchoolEvent({ schoolEventId: activity._id, }); this.displayEventsList = []; this.displayEventsList.push(response.data.data); } else { let response = await this.getParticularMeetingEvent({ meetingEventId: activity._id, }); this.displayEventsList = []; this.displayEventsList.push(response.data.data); } |
e5699315c
|
1051 1052 |
this.viewEventDetails = true; } |
a26ba60ed
|
1053 |
}, |
6f7cf8cf5
|
1054 1055 1056 1057 1058 1059 1060 1061 |
async routeToCourseDetails(courseId) { /* getParticularCourseDetail- To get courseDetail - defined in GetApis.js*/ let response = await this.getParticularCourseDetail(courseId); /* If the response is null then dont route */ if (response.data.data.length > 0) { this.$router.push({ name: "Course Details", |
bbd60612f
|
1062 |
query: { courseId: courseId }, |
6f7cf8cf5
|
1063 1064 1065 1066 1067 |
}); } else { this.seeSnackbar("No Data Available", "warning"); } }, |
0a5256600
|
1068 |
|
01d009dde
|
1069 1070 1071 |
closeNotice() { this.dialogNotice = false; }, |
68d742034
|
1072 |
profile() { |
01d009dde
|
1073 |
// this.editedIndex = this.desserts.indexOf(item); |
68d742034
|
1074 1075 |
// this.notice = Object.assign({}, item); // this.dialogNotice = true; |
3f8187137
|
1076 |
this.$router.push("/noticeBoard"); |
01d009dde
|
1077 |
}, |
bbd60612f
|
1078 |
date: function (date) { |
68d742034
|
1079 |
return moment(date).format("MMMM DD, YYYY HH:mm"); |
8bb178441
|
1080 |
}, |
0a5256600
|
1081 1082 1083 |
activityDate(date) { return moment(date).format("MMMM DD, YYYY"); }, |
a17c68a03
|
1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 |
refreshEvents() { this.$refs.calendar.$emit("refetch-events"); }, removeEvent() { this.$refs.calendar.$emit("remove-event", this.selected); this.selected = {}; }, eventSelected(event) { this.selected = event; }, |
687e0b929
|
1094 1095 1096 |
// eventDropStart: function(event) { // event.editable = false; // }, |
a17c68a03
|
1097 |
eventCreated(...test) { |
860da881d
|
1098 |
// console.log(test); |
8bb178441
|
1099 |
}, |
6c05a9f84
|
1100 1101 |
getStudents() { http() |
02a841878
|
1102 |
.get("/getStudentsList") |
bbd60612f
|
1103 |
.then((response) => { |
6c05a9f84
|
1104 1105 1106 |
this.students = response.data.data; this.showLoader = false; }) |
bbd60612f
|
1107 |
.catch((error) => { |
6c05a9f84
|
1108 1109 |
// console.log("err====>", err); this.showLoader = false; |
b0f5f6684
|
1110 1111 1112 1113 1114 |
if (error.response.status === 401) { this.$router.replace({ path: "/" }); this.$store.dispatch("setToken", null); this.$store.dispatch("Id", null); } |
6c05a9f84
|
1115 1116 1117 1118 |
}); }, getParents() { http() |
02a841878
|
1119 |
.get("/getParentsList") |
bbd60612f
|
1120 |
.then((response) => { |
6c05a9f84
|
1121 1122 1123 |
this.parents = response.data.data; this.showLoader = false; }) |
bbd60612f
|
1124 |
.catch((error) => { |
6c05a9f84
|
1125 1126 |
// console.log("err====>", err); this.showLoader = false; |
6c05a9f84
|
1127 1128 1129 1130 |
}); }, getTeachers() { http() |
02a841878
|
1131 |
.get("/getTeachersList") |
bbd60612f
|
1132 |
.then((response) => { |
6c05a9f84
|
1133 1134 1135 |
this.teachers = response.data.data; this.showLoader = false; }) |
bbd60612f
|
1136 |
.catch((error) => { |
6c05a9f84
|
1137 1138 |
// console.log("err====>", err); this.showLoader = false; |
6c05a9f84
|
1139 1140 1141 1142 |
}); }, getClasses() { http() |
02a841878
|
1143 |
.get("/getClassesList") |
bbd60612f
|
1144 |
.then((response) => { |
6c05a9f84
|
1145 1146 1147 |
this.classes = response.data.data; this.showLoader = false; }) |
bbd60612f
|
1148 |
.catch((error) => { |
6c05a9f84
|
1149 |
this.showLoader = false; |
6c05a9f84
|
1150 |
}); |
01d009dde
|
1151 1152 1153 1154 |
}, getNoticeData() { this.showLoader = true; http() |
02a841878
|
1155 |
.get("/getEventsList") |
bbd60612f
|
1156 |
.then((response) => { |
01d009dde
|
1157 1158 1159 |
this.noticeData = response.data.data; this.showLoader = false; }) |
bbd60612f
|
1160 |
.catch((error) => { |
01d009dde
|
1161 |
this.showLoader = false; |
01d009dde
|
1162 1163 1164 |
}); }, getUserData() { |
68d742034
|
1165 |
// this.showLoader = true; |
3f7b85167
|
1166 1167 1168 |
if (this.$store.state.role === "PARENT") { http() .get("/getParticularUserDetail", { |
3f7b85167
|
1169 |
params: { |
bbd60612f
|
1170 1171 |
studentId: localStorage.getItem("parentStudentId"), }, |
3f7b85167
|
1172 |
}) |
bbd60612f
|
1173 |
.then((response) => { |
3f7b85167
|
1174 1175 |
this.userData = response.data.data; this.showLoader = false; |
3f7b85167
|
1176 |
}) |
bbd60612f
|
1177 |
.catch((error) => { |
3f7b85167
|
1178 1179 1180 1181 |
this.showLoader = false; }); } else { http() |
02a841878
|
1182 |
.get("/getParticularUserDetail") |
bbd60612f
|
1183 |
.then((response) => { |
3f7b85167
|
1184 1185 1186 |
this.userData = response.data.data; this.showLoader = false; }) |
bbd60612f
|
1187 |
.catch((error) => { |
3f7b85167
|
1188 1189 1190 |
this.showLoader = false; }); } |
65d5475b6
|
1191 |
}, |
01b56330e
|
1192 1193 1194 |
getFeesAndCollectionsData() { http() |
02a841878
|
1195 |
.get("/getTotalFeesAndCollections") |
bbd60612f
|
1196 |
.then((response) => { |
01b56330e
|
1197 1198 1199 1200 |
this.feeData = response.data.data; // this.collectionData = response.data.data; this.series[0].data[0] = this.feeData.totalFees; this.series[0].data[1] = this.feeData.totalCollection; |
01b56330e
|
1201 1202 |
this.showLoader = false; }) |
bbd60612f
|
1203 |
.catch((error) => { |
01b56330e
|
1204 1205 1206 |
this.showLoader = false; }); }, |
65d5475b6
|
1207 1208 |
getExpensesData() { http() |
02a841878
|
1209 |
.get("/getTotalExpenses") |
bbd60612f
|
1210 |
.then((response) => { |
01b56330e
|
1211 1212 1213 |
this.expenseData = response.data.data; // var array = response.data.data.sum; this.series[0].data[2] = this.expenseData.sum; |
4e37936da
|
1214 |
this.showChart = true; |
01b56330e
|
1215 1216 1217 1218 1219 1220 |
// this.series = [ // { // name: "Total", // data: array // } // ]; |
01b56330e
|
1221 1222 |
this.showLoader = false; }) |
bbd60612f
|
1223 |
.catch((error) => { |
01b56330e
|
1224 1225 |
this.showLoader = false; }); |
11d037abe
|
1226 |
}, |
32fcd6960
|
1227 1228 1229 1230 1231 |
// async getparentStudents() { // this.showLoader = true; // await http() // .get("/parentStudentsList") // .then((response) => { |
058c4a6cf
|
1232 |
|
32fcd6960
|
1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 |
// /* set values in local storage */ // this.studentsData = response.data.data.students; // this.showLoader = false; // }) // .catch((err) => { // console.log("err====>", err); // this.showLoader = false; // }); // await this.getCourses(parentStudentsId, classId); // await this.getAnnoucementes(classId); // }, |
6f7cf8cf5
|
1244 1245 1246 |
async getCourses(parentStudentsId, classId) { /* getStudentCourses - to get courseData - defined in GetApis.js*/ await this.getStudentCourses({ |
32fcd6960
|
1247 1248 |
classId: localStorage.getItem("parentClassId"), studentId: localStorage.getItem("parentStudentId"), |
6f7cf8cf5
|
1249 |
}); |
11d037abe
|
1250 |
}, |
6f7cf8cf5
|
1251 |
getAnnoucementes(classId) { |
11d037abe
|
1252 1253 1254 1255 |
this.showLoader = true; http() .get("/getAnnoucementesList", { params: { |
32fcd6960
|
1256 |
classId: localStorage.getItem("parentClassId"), |
bbd60612f
|
1257 |
}, |
11d037abe
|
1258 |
}) |
bbd60612f
|
1259 |
.then((response) => { |
11d037abe
|
1260 |
this.annoucementData = response.data.data; |
019880b6f
|
1261 |
console.log("avnn - ", this.annoucementData); |
11d037abe
|
1262 1263 |
this.showLoader = false; }) |
bbd60612f
|
1264 |
.catch((err) => { |
860da881d
|
1265 |
// console.log("err====>", err); |
11d037abe
|
1266 |
this.showLoader = false; |
860da881d
|
1267 1268 1269 |
this.snackbar = true; this.color = "error"; this.text = error.response.data.message; |
11d037abe
|
1270 |
}); |
3311ad345
|
1271 |
}, |
4dfee9964
|
1272 1273 |
/* MEETING EVENTS, SCHOOL EVENTS */ |
610e873a0
|
1274 |
async getMeetingEventes() { |
e5699315c
|
1275 |
if (this.role == "TEACHER" || this.role === "ADMIN") { |
3311ad345
|
1276 |
this.showLoader = true; |
610e873a0
|
1277 |
await http() |
02a841878
|
1278 |
.get("/getMeetingEventesList") |
bbd60612f
|
1279 |
.then((response) => { |
3311ad345
|
1280 1281 1282 |
var activityList = response.data.data; this.activityList = activityList; this.showLoader = false; |
8b184d484
|
1283 |
|
4fb0af78f
|
1284 |
/* set meetingEvents in activityEvents array to highlight event dates in calender */ |
8b184d484
|
1285 1286 1287 1288 1289 1290 1291 |
for (var i = 0; i < this.activityList.length; i++) { let obj = {}; obj.date = moment(this.activityList[i].dateOfEvent).format( "YYYY/MM/DD" ); obj.title = this.activityList[i].title; obj._id = this.activityList[i]._id; |
d802ef837
|
1292 |
obj.eventType = "meetingEvent"; |
4fb0af78f
|
1293 |
/* activityEvents is an array used to display events in calender on particular dates */ |
8b184d484
|
1294 1295 |
this.activityEvents.push(obj); } |
3311ad345
|
1296 |
}) |
bbd60612f
|
1297 |
.catch((error) => { |
3311ad345
|
1298 1299 1300 |
this.showLoader = false; }); } |
4dfee9964
|
1301 1302 1303 1304 1305 1306 1307 |
/* If role is ADMIN,TEACHER, PARENT then school events need to be displayed too */ if ( this.role === "ADMIN" || this.role === "TEACHER" || this.role === "PARENT" ) { /* this will get data in a "schoolEvents" data property */ |
d802ef837
|
1308 |
await this.getSchoolEventsList(); |
4fb0af78f
|
1309 |
/* set schoolEvents in activityEvents array to highlight event dates in calender */ |
d802ef837
|
1310 1311 1312 1313 1314 1315 1316 1317 |
for (var i = 0; i < this.schoolEvents.length; i++) { let obj = {}; obj.date = moment(this.schoolEvents[i].dateOfEvent).format( "YYYY/MM/DD" ); obj.title = this.schoolEvents[i].title; obj._id = this.schoolEvents[i]._id; obj.eventType = "schoolEvent"; |
4dfee9964
|
1318 |
/* activityEvents is an array used to display events in calender on particular dates */ |
d802ef837
|
1319 1320 1321 |
this.activityEvents.push(obj); } } |
bbd60612f
|
1322 |
}, |
019880b6f
|
1323 1324 1325 1326 1327 1328 1329 1330 |
async getMaleFemaleData() { await http() .get("/getStudentsByGender") .then((response) => { console.log("gender response - ", response); for (var i = 0; i < response.data.data.length; i++) { if (response.data.data[i]._id == "male") { this.maleFemaleSeries.push(response.data.data[i].total); |
29ad14d96
|
1331 |
} |
019880b6f
|
1332 1333 1334 1335 1336 1337 1338 1339 1340 |
if (response.data.data[i]._id == "female") { this.maleFemaleSeries.push(response.data.data[i].total); } } }) .catch((error) => { this.showLoader = false; }); }, |
fe15ee8b4
|
1341 |
}, |
a26ba60ed
|
1342 1343 1344 1345 |
mounted() { // = this.$store.state.schoolToken; // console.log("this.$store.state.role", this.token); |
610e873a0
|
1346 1347 1348 1349 |
// this.getUsersList(); }, async created() { |
a26ba60ed
|
1350 |
if (this.$store.state.role === "ADMIN") { |
02a841878
|
1351 |
// this.token = this.$store.state.token; |
bbd60612f
|
1352 1353 |
await this.getFeesAndCollectionsData(); await this.getExpensesData(); |
88b7fd92a
|
1354 |
await this.getMaleFemaleData(); |
a26ba60ed
|
1355 |
} else if (this.$store.state.schoolRole === "SUPERADMIN") { |
02a841878
|
1356 |
// this.token = this.$store.state.schoolToken; |
bbd60612f
|
1357 1358 |
await this.getFeesAndCollectionsData(); await this.getExpensesData(); |
88b7fd92a
|
1359 |
await this.getMaleFemaleData(); |
a26ba60ed
|
1360 |
} else if (this.$store.state.role === "TEACHER") { |
02a841878
|
1361 |
// this.token = this.$store.state.token; |
88b7fd92a
|
1362 |
await this.getMaleFemaleData(); |
a26ba60ed
|
1363 |
} else if (this.$store.state.role === "ACCOUNTANT") { |
02a841878
|
1364 |
// this.token = this.$store.state.token; |
a26ba60ed
|
1365 |
} else if (this.$store.state.role === "LIBRARIAN") { |
02a841878
|
1366 |
// this.token = this.$store.state.token; |
a26ba60ed
|
1367 |
} else if (this.$store.state.role === "PARENT") { |
058c4a6cf
|
1368 |
await this.getCourses(); |
32fcd6960
|
1369 |
await this.getAnnoucementes(); |
019880b6f
|
1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 |
this.studentsData = this.$store.getters.GET_STUDENTS_DATA; this.activeStudent = this.$store.getters.GET_ACTIVE_STUDENT; /* MAKE A LIST OF STUDENTS WITH STATUS TRUE, FOR DISPLAYING STUDENTS DATA AT TOP */ for (var i = 0; i < this.studentsData.length; i++) { if (this.studentsData[i].status == true) { this.activeStudentsList.push(this.studentsData[i]); } } console.log("student list - ", this.activeStudentsList); console.log("active - ", this.activeStudent); |
a26ba60ed
|
1380 1381 |
} this.role = this.$store.state.role; |
058c4a6cf
|
1382 |
|
610e873a0
|
1383 1384 1385 1386 1387 1388 |
await this.getStudents(); await this.getTeachers(); await this.getParents(); await this.getClasses(); await this.getNoticeData(); await this.getUserData(); |
a26ba60ed
|
1389 |
|
8b184d484
|
1390 |
/* get Latest events list for student login*/ |
ac24ec07a
|
1391 |
if (this.$store.state.role == "PARENT") { |
3311ad345
|
1392 |
let response = await this.studentMeetingEvents({ |
bbd60612f
|
1393 |
studentId: localStorage.getItem("parentStudentId"), |
3311ad345
|
1394 1395 |
}); this.activityList = response.data.data; |
0a5256600
|
1396 |
|
3311ad345
|
1397 1398 1399 1400 1401 1402 1403 |
/* set activityEvents array to highlight event dates in calender */ for (var i = 0; i < this.activityList.length; i++) { let obj = {}; obj.date = moment(this.activityList[i].meetingEvent.dateOfEvent).format( "YYYY/MM/DD" ); obj.title = this.activityList[i].meetingEvent.title; |
a26ba60ed
|
1404 |
obj._id = this.activityList[i].meetingEvent._id; |
4dfee9964
|
1405 |
obj.eventType = "meetingEvent"; |
3311ad345
|
1406 1407 |
this.activityEvents.push(obj); } |
0a5256600
|
1408 |
} |
8b184d484
|
1409 |
|
ac24ec07a
|
1410 |
/* get Latest events list for teacher login*/ |
4dfee9964
|
1411 1412 1413 1414 1415 |
if ( this.role == "TEACHER" || this.role == "ADMIN" || this.role == "PARENT" ) { |
ac24ec07a
|
1416 1417 |
await this.getMeetingEventes(); } |
bbd60612f
|
1418 |
}, |
8bb178441
|
1419 1420 |
}; </script> |
687e0b929
|
1421 |
|
68d742034
|
1422 |
<style scoped> |
a17c68a03
|
1423 |
@import "fullcalendar/dist/fullcalendar.css"; |
d802ef837
|
1424 1425 1426 |
.wrap-text { -webkit-line-clamp: unset !important; } |
3f8187137
|
1427 1428 1429 1430 |
a { color: white; } |
a17c68a03
|
1431 |
</style> |