Blame view

src/pages/School/viewSchoolDashboard.vue 20.6 KB
66a5c3b75   Neeraj Sharma   implement gloabal...
1
  <template>
46993dc1d   Shikha Mishra   solve issue login
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
    <v-app id="pages-dasboard">
      <!-- ****** VIEW PROFIL NOTICE BOARD ******  -->
      <!-- <v-dialog v-model="dialogNotice" max-width="940px" scrollable>
        <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">
                <img src="/static/icon/user.png" width="70px" v-if="!notice.eventImageUrl" />
                <img :src="notice.eventImageUrl" width="280px" v-else-if="notice.eventImageUrl" />
66a5c3b75   Neeraj Sharma   implement gloabal...
19
20
              </v-flex>
            </v-layout>
46993dc1d   Shikha Mishra   solve issue login
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
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
            <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>
                      <h5 class="my-1">{{ notice.title }}</h5>
                    </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>
                      <h5 class="my-1">{{ notice.description }}</h5>
                    </v-flex>
                  </v-layout>
                </v-flex>
              </v-layout>
            </v-container>
          </v-card-text>
        </v-card>
      </v-dialog>-->
      <!-- <v-container fluid grid-list-xl> -->
      <v-layout wrap>
        <v-flex xs12>
          <v-layout wrap row>
            <!-- ***** Total Students ***** -->
            <v-flex xs12 sm12 md9>
              <v-container fluid grid-list-xl>
                <v-flex xs12 sm12 md12>
                  <v-layout wrap class>
                    <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>
                </v-flex>
                <v-layout>
                  <v-flex xs12>
                    <v-card class="card mt-2 account-Card">
                      <h4>
                        <b>Account</b>
                      </h4>
                      <v-layout wrap>
                        <v-flex xs12 sm12 md3>
                          <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 1000</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 2000</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 3000</v-list-tile-title>
                                </v-list-tile-content>
                              </v-list-tile>
                            </template>
                          </v-list>
                        </v-flex>
860da881d   Shikha Mishra   comment all consoles
147
                        <v-flex xs12 sm12 md9 lg9>
68d600c97   Shikha Mishra   improve dashboard...
148
                          <!-- <div id="chart"> -->
860da881d   Shikha Mishra   comment all consoles
149
150
151
152
153
154
155
                          <apexchart
                            type="bar"
                            height="250"
                            style="max-width:800px !important"
                            :options="chartOptions"
                            :series="series"
                          ></apexchart>
68d600c97   Shikha Mishra   improve dashboard...
156
                          <!-- </div> -->
46993dc1d   Shikha Mishra   solve issue login
157
158
159
                        </v-flex>
                      </v-layout>
                    </v-card>
66a5c3b75   Neeraj Sharma   implement gloabal...
160
161
                  </v-flex>
                </v-layout>
46993dc1d   Shikha Mishra   solve issue login
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
                <v-card class="mt-2 card">
                  <!-- <full-calendar
                    ref="calendar"
                    defaultView="month"
                    droppable="false"
                    :events="events"
                    :config="config"
                  ></full-calendar>-->
                  <h4 class="pa-3">
                    <b>Notice</b>
                  </h4>
  
                  <v-data-table
                    :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>
                        </td>
                        <td class="noticeDecritpion grey--text mt-2">{{ props.item.description}}</td>
  
                        <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>
                  </v-data-table>
                </v-card>
              </v-container>
            </v-flex>
            <v-flex xs12 sm12 md3>
              <v-card height="100%" class="elevation-0 mt-3 profileDasboard">
                <v-card-text>
                  <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>
                        <img src="/static/icon/user.png" v-if="!userData.schoolLogoUrl" width="80" />
                        <img
                          :src="userData.schoolLogoUrl"
                          v-else-if="userData.schoolLogoUrl"
                          width="80"
                        />
                      </v-flex>
                      <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>
66a5c3b75   Neeraj Sharma   implement gloabal...
239
240
241
                      </v-flex>
                    </v-layout>
                  </v-flex>
46993dc1d   Shikha Mishra   solve issue login
242
243
244
245
246
247
248
249
250
251
252
                  <hr />
                  <h4 class="text-xs-center py-3">
                    <b>Calender</b>
                  </h4>
                  <vue-event-calendar :events="demoEvents"></vue-event-calendar>
                </v-card-text>
              </v-card>
            </v-flex>
          </v-layout>
        </v-flex>
      </v-layout>
db965de89   Amber Dev   added dialog pers...
253
      <v-dialog v-model="dialog" max-width="500" persistent>
46993dc1d   Shikha Mishra   solve issue login
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
        <v-card color="grey lighten-4" flat>
          <v-toolbar dark color="fixcolors">
            <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>
              </v-list-tile-action>
              <v-list-tile-content>
                <v-list-tile-title>{{ selected.title }}</v-list-tile-title>
              </v-list-tile-content>
            </v-list-tile>
            <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>
              </v-list-tile-content>
            </v-list-tile>
66a5c3b75   Neeraj Sharma   implement gloabal...
278
          </v-flex>
46993dc1d   Shikha Mishra   solve issue login
279
280
        </v-card>
      </v-dialog>
66a5c3b75   Neeraj Sharma   implement gloabal...
281
282
283
284
285
      <div class="loader" v-if="showLoader">
        <v-progress-circular indeterminate color="white"></v-progress-circular>
      </div>
    </v-app>
  </template>
66a5c3b75   Neeraj Sharma   implement gloabal...
286
287
288
  <script>
  import http from "@/Services/http.js";
  import moment from "moment";
46993dc1d   Shikha Mishra   solve issue login
289
  // import { FunctionalCalendar } from "vue-functional-calendar";
66a5c3b75   Neeraj Sharma   implement gloabal...
290
291
  
  export default {
46993dc1d   Shikha Mishra   solve issue login
292
293
294
    components: {
      // FunctionalCalendar
    },
66a5c3b75   Neeraj Sharma   implement gloabal...
295
296
    data() {
      return {
46993dc1d   Shikha Mishra   solve issue login
297
298
299
300
301
302
303
304
305
        // data: {
        //   clieckedToday: false
        // },
        // markedDates: ["16/4/2019", "18/4/2019", "20/4/2019", "21/4/2019"],
        // calendarData: {},
        // calendar: {},
        demoEvents: [
          {
            date: "2020/01/10", // Required
860da881d   Shikha Mishra   comment all consoles
306
            title: "Foo", // Required
46993dc1d   Shikha Mishra   solve issue login
307
308
309
310
311
          },
          {
            date: "2020/01/12",
            title: "Bar",
            desc: "description",
860da881d   Shikha Mishra   comment all consoles
312
313
            customClass: "disabled highlight", // Custom classes to an calendar cell
          },
46993dc1d   Shikha Mishra   solve issue login
314
        ],
66a5c3b75   Neeraj Sharma   implement gloabal...
315
        showLoader: false,
46993dc1d   Shikha Mishra   solve issue login
316
317
318
319
320
321
322
        calendarData: {},
        dialog: false,
        dialogNotice: false,
        HolidaysList: [],
        EventsList: [],
        events: [],
        config: {
860da881d   Shikha Mishra   comment all consoles
323
          eventClick: (event) => {
46993dc1d   Shikha Mishra   solve issue login
324
325
            this.selected = event;
            this.dialog = true;
860da881d   Shikha Mishra   comment all consoles
326
          },
46993dc1d   Shikha Mishra   solve issue login
327
328
329
330
331
332
333
        },
        selected: {},
        // notice: {},
        userData: {},
        dated: new Date(2018, 0, 9),
        userList: [],
        sectionList: [],
66a5c3b75   Neeraj Sharma   implement gloabal...
334
335
336
337
        students: "",
        parents: "",
        teachers: "",
        classes: "",
46993dc1d   Shikha Mishra   solve issue login
338
339
340
341
342
        noticeData: [],
        attrs: [
          {
            key: "today",
            highlight: true,
860da881d   Shikha Mishra   comment all consoles
343
344
            dates: new Date(),
          },
46993dc1d   Shikha Mishra   solve issue login
345
346
347
348
        ],
        drawer: true,
        items: [
          { title: "Home", icon: "dashboard" },
860da881d   Shikha Mishra   comment all consoles
349
          { title: "About", icon: "question_answer" },
46993dc1d   Shikha Mishra   solve issue login
350
351
352
353
354
355
        ],
        right: null,
  
        series: [
          {
            name: "Total",
860da881d   Shikha Mishra   comment all consoles
356
357
            data: [66, 44, 33],
          },
46993dc1d   Shikha Mishra   solve issue login
358
359
360
        ],
        chartOptions: {
          chart: {
68d600c97   Shikha Mishra   improve dashboard...
361
            // type: "bar",
46993dc1d   Shikha Mishra   solve issue login
362
            height: 150,
860da881d   Shikha Mishra   comment all consoles
363
            stacked: true,
68d600c97   Shikha Mishra   improve dashboard...
364
365
366
367
368
369
370
371
372
373
374
375
376
            // animations: {
            //   enabled: true,
            //   easing: "easeinout",
            //   speed: 1200,
            //   animateGradually: {
            //     enabled: true,
            //     delay: 450
            //   },
            //   dynamicAnimation: {
            //     enabled: true,
            //     speed: 450
            //   }
            // }
46993dc1d   Shikha Mishra   solve issue login
377
378
379
380
381
382
          },
          plotOptions: {
            bar: {
              horizontal: false,
              columnWidth: "25%",
              // endingShape: "rounded",
860da881d   Shikha Mishra   comment all consoles
383
384
              distributed: true,
            },
46993dc1d   Shikha Mishra   solve issue login
385
          },
68d600c97   Shikha Mishra   improve dashboard...
386
387
388
389
390
391
392
          responsive: [
            {
              breakpoint: 480,
              options: {
                legend: {
                  position: "bottom",
                  offsetX: -10,
860da881d   Shikha Mishra   comment all consoles
393
394
395
396
                  offsetY: 0,
                },
              },
            },
68d600c97   Shikha Mishra   improve dashboard...
397
          ],
46993dc1d   Shikha Mishra   solve issue login
398
          legend: {
68d600c97   Shikha Mishra   improve dashboard...
399
            position: "right",
860da881d   Shikha Mishra   comment all consoles
400
            offsetY: 40,
46993dc1d   Shikha Mishra   solve issue login
401
402
403
          },
          colors: ["#7852cc", "#f9a825", "#ff8a89"],
          dataLabels: {
860da881d   Shikha Mishra   comment all consoles
404
            enabled: false,
46993dc1d   Shikha Mishra   solve issue login
405
406
407
408
          },
          stroke: {
            show: true,
            width: 2,
860da881d   Shikha Mishra   comment all consoles
409
            colors: ["transparent"],
46993dc1d   Shikha Mishra   solve issue login
410
411
          },
          xaxis: {
860da881d   Shikha Mishra   comment all consoles
412
            categories: ["Fee", "Collections", "Expences"],
46993dc1d   Shikha Mishra   solve issue login
413
414
415
          },
          yaxis: {
            title: {
860da881d   Shikha Mishra   comment all consoles
416
417
              text: "",
            },
46993dc1d   Shikha Mishra   solve issue login
418
419
          },
          fill: {
860da881d   Shikha Mishra   comment all consoles
420
            opacity: 1,
46993dc1d   Shikha Mishra   solve issue login
421
422
423
          },
          tooltip: {
            y: {
860da881d   Shikha Mishra   comment all consoles
424
              formatter: function (val, opts) {
46993dc1d   Shikha Mishra   solve issue login
425
426
                // console.log("opts",opts.w.config.xaxis.categories)
                return "" + val + " ";
860da881d   Shikha Mishra   comment all consoles
427
428
429
430
              },
            },
          },
        },
66a5c3b75   Neeraj Sharma   implement gloabal...
431
432
433
      };
    },
    mounted() {
46993dc1d   Shikha Mishra   solve issue login
434
435
436
437
438
439
440
441
442
      //  = this.$store.state.schoolToken;
      // console.log("this.$store.state.role", this.token);
      if (this.$store.state.role === "ADMIN") {
        this.token = this.$store.state.token;
      } else if (this.$store.state.schoolRole === "SUPERADMIN") {
        this.token = this.$store.state.schoolToken;
      }
      // console.log("role", this.$store.state.schoolRole,"tt",this.$store.state.schoolToken);
      // this.getData();
66a5c3b75   Neeraj Sharma   implement gloabal...
443
444
445
446
      this.getStudents();
      this.getTeachers();
      this.getParents();
      this.getClasses();
46993dc1d   Shikha Mishra   solve issue login
447
448
449
      this.getNoticeData();
      this.getUserData();
      // this.getUsersList();
66a5c3b75   Neeraj Sharma   implement gloabal...
450
451
    },
    methods: {
46993dc1d   Shikha Mishra   solve issue login
452
453
454
455
456
457
458
459
460
      closeNotice() {
        this.dialogNotice = false;
      },
      profile() {
        // this.editedIndex = this.desserts.indexOf(item);
        // this.notice = Object.assign({}, item);
        // this.dialogNotice = true;
        this.$router.push({ name: "NoticeBoard" });
      },
860da881d   Shikha Mishra   comment all consoles
461
      date: function (date) {
46993dc1d   Shikha Mishra   solve issue login
462
463
464
465
466
467
468
469
470
471
472
        return moment(date).format("MMMM DD, YYYY  HH:mm");
      },
      refreshEvents() {
        this.$refs.calendar.$emit("refetch-events");
      },
      removeEvent() {
        this.$refs.calendar.$emit("remove-event", this.selected);
        this.selected = {};
      },
      eventSelected(event) {
        this.selected = event;
860da881d   Shikha Mishra   comment all consoles
473
        //   console.log("this.selected", this.selected);
46993dc1d   Shikha Mishra   solve issue login
474
475
476
477
478
      },
      // eventDropStart: function(event) {
      //   event.editable = false;
      // },
      eventCreated(...test) {
860da881d   Shikha Mishra   comment all consoles
479
        //   console.log(test);
66a5c3b75   Neeraj Sharma   implement gloabal...
480
481
482
483
      },
      getStudents() {
        http()
          .get("/getStudentsList", {
46993dc1d   Shikha Mishra   solve issue login
484
            headers: {
860da881d   Shikha Mishra   comment all consoles
485
486
              Authorization: "Bearer " + this.token,
            },
66a5c3b75   Neeraj Sharma   implement gloabal...
487
          })
860da881d   Shikha Mishra   comment all consoles
488
          .then((response) => {
66a5c3b75   Neeraj Sharma   implement gloabal...
489
490
491
            this.students = response.data.data;
            this.showLoader = false;
          })
860da881d   Shikha Mishra   comment all consoles
492
          .catch((error) => {
66a5c3b75   Neeraj Sharma   implement gloabal...
493
494
            // console.log("err====>", err);
            this.showLoader = false;
46993dc1d   Shikha Mishra   solve issue login
495
496
497
498
499
            // if (error.response.status === 401) {
            //   this.$router.replace({ path: "/" });
            //   this.$store.dispatch("setToken", null);
            //   this.$store.dispatch("Id", null);
            // }
66a5c3b75   Neeraj Sharma   implement gloabal...
500
501
502
503
504
          });
      },
      getParents() {
        http()
          .get("/getParentsList", {
46993dc1d   Shikha Mishra   solve issue login
505
            headers: {
860da881d   Shikha Mishra   comment all consoles
506
507
              Authorization: "Bearer " + this.token,
            },
66a5c3b75   Neeraj Sharma   implement gloabal...
508
          })
860da881d   Shikha Mishra   comment all consoles
509
          .then((response) => {
66a5c3b75   Neeraj Sharma   implement gloabal...
510
511
512
            this.parents = response.data.data;
            this.showLoader = false;
          })
860da881d   Shikha Mishra   comment all consoles
513
          .catch((error) => {
66a5c3b75   Neeraj Sharma   implement gloabal...
514
515
516
517
518
519
520
521
522
523
524
525
            // console.log("err====>", err);
            this.showLoader = false;
            // if (error.response.status === 401) {
            //   this.$router.replace({ path: "/" });
            //   this.$store.dispatch("setToken", null);
            //   this.$store.dispatch("Id", null);
            // }
          });
      },
      getTeachers() {
        http()
          .get("/getTeachersList", {
46993dc1d   Shikha Mishra   solve issue login
526
            headers: {
860da881d   Shikha Mishra   comment all consoles
527
528
              Authorization: "Bearer " + this.token,
            },
66a5c3b75   Neeraj Sharma   implement gloabal...
529
          })
860da881d   Shikha Mishra   comment all consoles
530
          .then((response) => {
66a5c3b75   Neeraj Sharma   implement gloabal...
531
532
533
            this.teachers = response.data.data;
            this.showLoader = false;
          })
860da881d   Shikha Mishra   comment all consoles
534
          .catch((error) => {
66a5c3b75   Neeraj Sharma   implement gloabal...
535
536
            // console.log("err====>", err);
            this.showLoader = false;
46993dc1d   Shikha Mishra   solve issue login
537
538
539
540
541
            // if (error.response.status === 401) {
            //   this.$router.replace({ path: "/" });
            //   this.$store.dispatch("setToken", null);
            //   this.$store.dispatch("Id", null);
            // }
66a5c3b75   Neeraj Sharma   implement gloabal...
542
543
544
545
546
          });
      },
      getClasses() {
        http()
          .get("/getClassesList", {
46993dc1d   Shikha Mishra   solve issue login
547
            headers: {
860da881d   Shikha Mishra   comment all consoles
548
549
              Authorization: "Bearer " + this.token,
            },
66a5c3b75   Neeraj Sharma   implement gloabal...
550
          })
860da881d   Shikha Mishra   comment all consoles
551
          .then((response) => {
66a5c3b75   Neeraj Sharma   implement gloabal...
552
553
554
            this.classes = response.data.data;
            this.showLoader = false;
          })
860da881d   Shikha Mishra   comment all consoles
555
          .catch((error) => {
66a5c3b75   Neeraj Sharma   implement gloabal...
556
            this.showLoader = false;
46993dc1d   Shikha Mishra   solve issue login
557
558
559
560
561
562
            // if (error.response.status === 401) {
            //   this.$router.replace({ path: "/" });
            //   this.$store.dispatch("setToken", null);
            //   this.$store.dispatch("Id", null);
            //   this.$store.dispatch("Role", null);
            // }
66a5c3b75   Neeraj Sharma   implement gloabal...
563
564
          });
      },
46993dc1d   Shikha Mishra   solve issue login
565
566
      getNoticeData() {
        this.showLoader = true;
66a5c3b75   Neeraj Sharma   implement gloabal...
567
        http()
46993dc1d   Shikha Mishra   solve issue login
568
569
          .get("/getEventsList", {
            headers: {
860da881d   Shikha Mishra   comment all consoles
570
571
              Authorization: "Bearer " + this.token,
            },
66a5c3b75   Neeraj Sharma   implement gloabal...
572
          })
860da881d   Shikha Mishra   comment all consoles
573
          .then((response) => {
46993dc1d   Shikha Mishra   solve issue login
574
            this.noticeData = response.data.data;
66a5c3b75   Neeraj Sharma   implement gloabal...
575
576
            this.showLoader = false;
          })
860da881d   Shikha Mishra   comment all consoles
577
          .catch((error) => {
66a5c3b75   Neeraj Sharma   implement gloabal...
578
            this.showLoader = false;
46993dc1d   Shikha Mishra   solve issue login
579
580
581
582
583
584
585
586
587
588
589
590
            // if (error.response.status === 401) {
            //   this.$router.replace({ path: "/" });
            //   this.$store.dispatch("setToken", null);
            //   this.$store.dispatch("Id", null);
            // }
          });
      },
      getUserData() {
        // this.showLoader = true;
        http()
          .get("/getParticularUserDetail", {
            headers: {
860da881d   Shikha Mishra   comment all consoles
591
592
              Authorization: "Bearer " + this.token,
            },
46993dc1d   Shikha Mishra   solve issue login
593
          })
860da881d   Shikha Mishra   comment all consoles
594
          .then((response) => {
46993dc1d   Shikha Mishra   solve issue login
595
596
597
            this.userData = response.data.data;
            this.showLoader = false;
          })
860da881d   Shikha Mishra   comment all consoles
598
          .catch((error) => {
46993dc1d   Shikha Mishra   solve issue login
599
600
601
602
603
604
            this.showLoader = false;
            // if (error.response.status === 401) {
            //   this.$router.replace({ path: "/" });
            //   this.$store.dispatch("setToken", null);
            //   this.$store.dispatch("Id", null);
            // }
66a5c3b75   Neeraj Sharma   implement gloabal...
605
          });
860da881d   Shikha Mishra   comment all consoles
606
607
      },
    },
66a5c3b75   Neeraj Sharma   implement gloabal...
608
609
  };
  </script>
46993dc1d   Shikha Mishra   solve issue login
610
611
  <style scoped>
  @import "fullcalendar/dist/fullcalendar.css";
66a5c3b75   Neeraj Sharma   implement gloabal...
612
  </style>