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