Blame view

src/components/pageHeader/AppDrawer.vue 27.6 KB
93a68cfa1   Jatinder Singh   first commit
1
2
3
4
5
6
7
8
  <template>
    <v-navigation-drawer
      id="appDrawer"
      :mini-variant.sync="mini"
      fixed
      :dark="$vuetify.dark"
      app
      v-model="drawer"
68d742034   Neeraj Sharma   implement new des...
9
      hide-overlay
93a68cfa1   Jatinder Singh   first commit
10
      width="260"
687e0b929   Neeraj Sharma   add user,attenden...
11
    >
68d742034   Neeraj Sharma   implement new des...
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
      <img
        v-bind:src="computeLogo"
        height="40"
        width="130"
        class="imgLogo mb-3 mt-3"
        alt="logo"
        style="margin: auto;
        display: block;"
      />
      <!-- <v-toolbar class="white" flat>
      <img
        v-bind:src="computeLogo"
        height="40"
        width="140"
        class="imgLogo"
        alt="logo"
        style="15px 0px 0px 40px !important;"
      />
      </v-toolbar>-->
      <vue-perfect-scrollbar
        class="drawer-menu--scroll side-bar-color mt-3"
        :settings="scrollSettings"
      >
        <v-list dense expand class="white--text">
          <template v-for="(item, i) in menus" v-if="role === 'ADMIN'">
            <!-- {{menus}} -->
687e0b929   Neeraj Sharma   add user,attenden...
38
39
40
41
42
43
44
45
            <!--group with subitems-->
            <v-list-group
              v-if="item.items"
              :key="item.name"
              :group="item.group"
              no-action="no-action"
            >
              <v-list-tile slot="activator" ripple="ripple">
68d742034   Neeraj Sharma   implement new des...
46
47
                <v-list-tile-action v-if="item.icon">
                  <img :src="item.icon" width="22" alt="icons" />
687e0b929   Neeraj Sharma   add user,attenden...
48
49
50
51
52
53
54
55
56
57
58
59
60
61
                </v-list-tile-action>
                <v-list-tile-content>
                  <v-list-tile-title>{{ item.title }}</v-list-tile-title>
                </v-list-tile-content>
              </v-list-tile>
              <template v-for="(subItem, i) in item.items">
                <!--sub group-->
                <v-list-group
                  v-if="subItem.items"
                  :key="subItem.name"
                  :group="subItem.group"
                  sub-group="sub-group"
                >
                  <v-list-tile slot="activator" ripple="ripple">
93a68cfa1   Jatinder Singh   first commit
62
                    <v-list-tile-content>
687e0b929   Neeraj Sharma   add user,attenden...
63
                      <v-list-tile-title>{{ subItem.title }}</v-list-tile-title>
93a68cfa1   Jatinder Singh   first commit
64
                    </v-list-tile-content>
93a68cfa1   Jatinder Singh   first commit
65
                  </v-list-tile>
687e0b929   Neeraj Sharma   add user,attenden...
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
                  <v-list-tile
                    v-for="(grand, i) in subItem.children"
                    :key="i"
                    :to="genChildTarget(item, grand)"
                    :href="grand.href"
                    ripple="ripple"
                  >
                    <v-list-tile-content>
                      <v-list-tile-title>{{ grand.title }}</v-list-tile-title>
                    </v-list-tile-content>
                  </v-list-tile>
                </v-list-group>
                <!--child item-->
                <v-list-tile
                  v-else
                  :key="i"
                  :to="genChildTarget(item, subItem)"
                  :href="subItem.href"
                  :disabled="subItem.disabled"
                  :target="subItem.target"
                  ripple="ripple"
                >
                  <v-list-tile-action v-if="subItem.action">
                    <img
                      width="30"
                      :src="subItem.action"
                      :class="[subItem.actionClass || 'success--text']"
                    />
                  </v-list-tile-action>
                  <v-list-tile-content>
                    <v-list-tile-title class="body-2">
                      <span>{{ subItem.title }}</span>
                    </v-list-tile-title>
                  </v-list-tile-content>
                  <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> -->
                </v-list-tile>
              </template>
            </v-list-group>
            <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader>
            <v-divider v-else-if="item.divider" :key="i"></v-divider>
            <!--top-level link-->
            <v-list-tile
              v-else
              ripple="ripple"
              :disabled="item.disabled"
              :target="item.target"
              rel="noopener"
68d742034   Neeraj Sharma   implement new des...
113
114
115
              :key="item.name"
              :to="!item.href ? { name: item.name } : null"
              :href="item.href"
687e0b929   Neeraj Sharma   add user,attenden...
116
            >
68d742034   Neeraj Sharma   implement new des...
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
              <!-- <a :href="item.path"> -->
              <v-list-tile-action v-if="item.icon">
                <img :src="item.icon" width="22" alt="icons" />
              </v-list-tile-action>
              <v-list-tile-content class="pt-2">
                <v-list-tile-title>{{ item.title }}</v-list-tile-title>
              </v-list-tile-content>
              <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> -->
              <v-list-tile-action v-if="item.subAction">
                <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> -->
                <!-- <img :src="item.icon" width="40" alt="icons" /> -->
              </v-list-tile-action>
              <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> -->
              <!-- </a> -->
            </v-list-tile>
          </template>
acb6c9e2b   Shikha Mishra   issues solved rel...
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
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
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
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
          <template v-for="(item, i) in menuAccount" v-if="role === 'ACCOUNTANT'">
            <!-- {{menus}} -->
            <!--group with subitems-->
            <v-list-group
              v-if="item.items"
              :key="item.name"
              :group="item.group"
              no-action="no-action"
            >
              <v-list-tile slot="activator" ripple="ripple">
                <v-list-tile-action v-if="item.icon">
                  <img :src="item.icon" width="22" alt="icons" />
                </v-list-tile-action>
                <v-list-tile-content>
                  <v-list-tile-title>{{ item.title }}</v-list-tile-title>
                </v-list-tile-content>
              </v-list-tile>
              <template v-for="(subItem, i) in item.items">
                <!--sub group-->
                <v-list-group
                  v-if="subItem.items"
                  :key="subItem.name"
                  :group="subItem.group"
                  sub-group="sub-group"
                >
                  <v-list-tile slot="activator" ripple="ripple">
                    <v-list-tile-content>
                      <v-list-tile-title>{{ subItem.title }}</v-list-tile-title>
                    </v-list-tile-content>
                  </v-list-tile>
                  <v-list-tile
                    v-for="(grand, i) in subItem.children"
                    :key="i"
                    :to="genChildTarget(item, grand)"
                    :href="grand.href"
                    ripple="ripple"
                  >
                    <v-list-tile-content>
                      <v-list-tile-title>{{ grand.title }}</v-list-tile-title>
                    </v-list-tile-content>
                  </v-list-tile>
                </v-list-group>
                <!--child item-->
                <v-list-tile
                  v-else
                  :key="i"
                  :to="genChildTarget(item, subItem)"
                  :href="subItem.href"
                  :disabled="subItem.disabled"
                  :target="subItem.target"
                  ripple="ripple"
                >
                  <v-list-tile-action v-if="subItem.action">
                    <img
                      width="30"
                      :src="subItem.action"
                      :class="[subItem.actionClass || 'success--text']"
                    />
                  </v-list-tile-action>
                  <v-list-tile-content>
                    <v-list-tile-title class="body-2">
                      <span>{{ subItem.title }}</span>
                    </v-list-tile-title>
                  </v-list-tile-content>
                  <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> -->
                </v-list-tile>
              </template>
            </v-list-group>
            <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader>
            <v-divider v-else-if="item.divider" :key="i"></v-divider>
            <!--top-level link-->
            <v-list-tile
              v-else
              ripple="ripple"
              :disabled="item.disabled"
              :target="item.target"
              rel="noopener"
              :key="item.name"
              :to="!item.href ? { name: item.name } : null"
              :href="item.href"
            >
              <!-- <a :href="item.path"> -->
              <v-list-tile-action v-if="item.icon">
                <img :src="item.icon" width="22" alt="icons" />
              </v-list-tile-action>
              <v-list-tile-content class="pt-2">
                <v-list-tile-title>{{ item.title }}</v-list-tile-title>
              </v-list-tile-content>
              <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> -->
              <v-list-tile-action v-if="item.subAction">
                <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> -->
                <!-- <img :src="item.icon" width="40" alt="icons" /> -->
              </v-list-tile-action>
              <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> -->
              <!-- </a> -->
            </v-list-tile>
          </template>
          <template v-for="(item, i) in menuLibrarian" v-if="role === 'LIBRARIAN'">
            <!-- {{menus}} -->
            <!--group with subitems-->
            <v-list-group
              v-if="item.items"
              :key="item.name"
              :group="item.group"
              no-action="no-action"
            >
              <v-list-tile slot="activator" ripple="ripple">
                <v-list-tile-action v-if="item.icon">
                  <img :src="item.icon" width="22" alt="icons" />
                </v-list-tile-action>
                <v-list-tile-content>
                  <v-list-tile-title>{{ item.title }}</v-list-tile-title>
                </v-list-tile-content>
              </v-list-tile>
              <template v-for="(subItem, i) in item.items">
                <!--sub group-->
                <v-list-group
                  v-if="subItem.items"
                  :key="subItem.name"
                  :group="subItem.group"
                  sub-group="sub-group"
                >
                  <v-list-tile slot="activator" ripple="ripple">
                    <v-list-tile-content>
                      <v-list-tile-title>{{ subItem.title }}</v-list-tile-title>
                    </v-list-tile-content>
                  </v-list-tile>
                  <v-list-tile
                    v-for="(grand, i) in subItem.children"
                    :key="i"
                    :to="genChildTarget(item, grand)"
                    :href="grand.href"
                    ripple="ripple"
                  >
                    <v-list-tile-content>
                      <v-list-tile-title>{{ grand.title }}</v-list-tile-title>
                    </v-list-tile-content>
                  </v-list-tile>
                </v-list-group>
                <!--child item-->
                <v-list-tile
                  v-else
                  :key="i"
                  :to="genChildTarget(item, subItem)"
                  :href="subItem.href"
                  :disabled="subItem.disabled"
                  :target="subItem.target"
                  ripple="ripple"
                >
                  <v-list-tile-action v-if="subItem.action">
                    <img
                      width="30"
                      :src="subItem.action"
                      :class="[subItem.actionClass || 'success--text']"
                    />
                  </v-list-tile-action>
                  <v-list-tile-content>
                    <v-list-tile-title class="body-2">
                      <span>{{ subItem.title }}</span>
                    </v-list-tile-title>
                  </v-list-tile-content>
                  <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> -->
                </v-list-tile>
              </template>
            </v-list-group>
            <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader>
            <v-divider v-else-if="item.divider" :key="i"></v-divider>
            <!--top-level link-->
            <v-list-tile
              v-else
              ripple="ripple"
              :disabled="item.disabled"
              :target="item.target"
              rel="noopener"
              :key="item.name"
              :to="!item.href ? { name: item.name } : null"
              :href="item.href"
            >
              <!-- <a :href="item.path"> -->
              <v-list-tile-action v-if="item.icon">
                <img :src="item.icon" width="22" alt="icons" />
              </v-list-tile-action>
              <v-list-tile-content class="pt-2">
                <v-list-tile-title>{{ item.title }}</v-list-tile-title>
              </v-list-tile-content>
              <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> -->
              <v-list-tile-action v-if="item.subAction">
                <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> -->
                <!-- <img :src="item.icon" width="40" alt="icons" /> -->
              </v-list-tile-action>
              <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> -->
              <!-- </a> -->
            </v-list-tile>
          </template>
dfd943df6   Shikha Mishra   app drawer
327
          <template v-for="(item, i) in menuSchool" v-if="schoolRole === 'SUPERADMIN'">
68d742034   Neeraj Sharma   implement new des...
328
329
330
331
332
333
334
335
336
            <!-- {{menus}} -->
            <!--group with subitems-->
            <v-list-group
              v-if="item.items"
              :key="item.name"
              :group="item.group"
              no-action="no-action"
            >
              <v-list-tile slot="activator" ripple="ripple">
93a68cfa1   Jatinder Singh   first commit
337
                <v-list-tile-action v-if="item.icon">
68d742034   Neeraj Sharma   implement new des...
338
                  <img :src="item.icon" width="22" alt="icons" />
93a68cfa1   Jatinder Singh   first commit
339
                </v-list-tile-action>
68d742034   Neeraj Sharma   implement new des...
340
                <v-list-tile-content>
93a68cfa1   Jatinder Singh   first commit
341
342
                  <v-list-tile-title>{{ item.title }}</v-list-tile-title>
                </v-list-tile-content>
68d742034   Neeraj Sharma   implement new des...
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
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
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
              </v-list-tile>
              <template v-for="(subItem, i) in item.items">
                <!--sub group-->
                <v-list-group
                  v-if="subItem.items"
                  :key="subItem.name"
                  :group="subItem.group"
                  sub-group="sub-group"
                >
                  <v-list-tile slot="activator" ripple="ripple">
                    <v-list-tile-content>
                      <v-list-tile-title>{{ subItem.title }}</v-list-tile-title>
                    </v-list-tile-content>
                  </v-list-tile>
                  <v-list-tile
                    v-for="(grand, i) in subItem.children"
                    :key="i"
                    :to="genChildTarget(item, grand)"
                    :href="grand.href"
                    ripple="ripple"
                  >
                    <v-list-tile-content>
                      <v-list-tile-title>{{ grand.title }}</v-list-tile-title>
                    </v-list-tile-content>
                  </v-list-tile>
                </v-list-group>
                <!--child item-->
                <v-list-tile
                  v-else
                  :key="i"
                  :to="genChildTarget(item, subItem)"
                  :href="subItem.href"
                  :disabled="subItem.disabled"
                  :target="subItem.target"
                  ripple="ripple"
                >
                  <v-list-tile-action v-if="subItem.action">
                    <img
                      width="30"
                      :src="subItem.action"
                      :class="[subItem.actionClass || 'success--text']"
                    />
                  </v-list-tile-action>
                  <v-list-tile-content>
                    <v-list-tile-title class="body-2">
                      <span>{{ subItem.title }}</span>
                    </v-list-tile-title>
                  </v-list-tile-content>
                  <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> -->
                </v-list-tile>
              </template>
            </v-list-group>
            <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader>
            <v-divider v-else-if="item.divider" :key="i"></v-divider>
            <!--top-level link-->
            <v-list-tile
              v-else
              ripple="ripple"
              :disabled="item.disabled"
              :target="item.target"
              rel="noopener"
              :key="item.name"
              :to="!item.href ? { name: item.name } : null"
              :href="item.href"
            >
              <!-- <a :href="item.path"> -->
              <v-list-tile-action v-if="item.icon">
                <img :src="item.icon" width="22" alt="icons" />
              </v-list-tile-action>
              <v-list-tile-content class="pt-2">
                <v-list-tile-title>{{ item.title }}</v-list-tile-title>
              </v-list-tile-content>
              <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> -->
              <v-list-tile-action v-if="item.subAction">
                <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> -->
                <!-- <img :src="item.icon" width="40" alt="icons" /> -->
              </v-list-tile-action>
              <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> -->
              <!-- </a> -->
687e0b929   Neeraj Sharma   add user,attenden...
422
            </v-list-tile>
93a68cfa1   Jatinder Singh   first commit
423
          </template>
710438de6   Shikha Mishra   added teacher mod...
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
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
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
          <template v-for="(item, i) in menuTeacher" v-if="role === 'TEACHER'">
            <!-- {{menus}} -->
            <!--group with subitems-->
            <v-list-group
              v-if="item.items"
              :key="item.name"
              :group="item.group"
              no-action="no-action"
            >
              <v-list-tile slot="activator" ripple="ripple">
                <v-list-tile-action v-if="item.icon">
                  <img :src="item.icon" width="22" alt="icons" />
                </v-list-tile-action>
                <v-list-tile-content>
                  <v-list-tile-title>{{ item.title }}</v-list-tile-title>
                </v-list-tile-content>
              </v-list-tile>
              <template v-for="(subItem, i) in item.items">
                <!--sub group-->
                <v-list-group
                  v-if="subItem.items"
                  :key="subItem.name"
                  :group="subItem.group"
                  sub-group="sub-group"
                >
                  <v-list-tile slot="activator" ripple="ripple">
                    <v-list-tile-content>
                      <v-list-tile-title>{{ subItem.title }}</v-list-tile-title>
                    </v-list-tile-content>
                  </v-list-tile>
                  <v-list-tile
                    v-for="(grand, i) in subItem.children"
                    :key="i"
                    :to="genChildTarget(item, grand)"
                    :href="grand.href"
                    ripple="ripple"
                  >
                    <v-list-tile-content>
                      <v-list-tile-title>{{ grand.title }}</v-list-tile-title>
                    </v-list-tile-content>
                  </v-list-tile>
                </v-list-group>
                <!--child item-->
                <v-list-tile
                  v-else
                  :key="i"
                  :to="genChildTarget(item, subItem)"
                  :href="subItem.href"
                  :disabled="subItem.disabled"
                  :target="subItem.target"
                  ripple="ripple"
                >
                  <v-list-tile-action v-if="subItem.action">
                    <img
                      width="30"
                      :src="subItem.action"
                      :class="[subItem.actionClass || 'success--text']"
                    />
                  </v-list-tile-action>
                  <v-list-tile-content>
                    <v-list-tile-title class="body-2">
                      <span>{{ subItem.title }}</span>
                    </v-list-tile-title>
                  </v-list-tile-content>
                  <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> -->
                </v-list-tile>
              </template>
            </v-list-group>
            <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader>
            <v-divider v-else-if="item.divider" :key="i"></v-divider>
            <!--top-level link-->
            <v-list-tile
              v-else
              ripple="ripple"
              :disabled="item.disabled"
              :target="item.target"
              rel="noopener"
              :key="item.name"
              :to="!item.href ? { name: item.name } : null"
              :href="item.href"
            >
              <!-- <a :href="item.path"> -->
              <v-list-tile-action v-if="item.icon">
                <img :src="item.icon" width="22" alt="icons" />
              </v-list-tile-action>
              <v-list-tile-content class="pt-2">
                <v-list-tile-title>{{ item.title }}</v-list-tile-title>
              </v-list-tile-content>
              <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> -->
              <v-list-tile-action v-if="item.subAction">
                <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> -->
                <!-- <img :src="item.icon" width="40" alt="icons" /> -->
              </v-list-tile-action>
              <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> -->
              <!-- </a> -->
            </v-list-tile>
          </template>
687e0b929   Neeraj Sharma   add user,attenden...
521
522
        </v-list>
      </vue-perfect-scrollbar>
93a68cfa1   Jatinder Singh   first commit
523
524
525
    </v-navigation-drawer>
  </template>
  <script>
687e0b929   Neeraj Sharma   add user,attenden...
526
527
  import menu from "@/api/menu";
  import VuePerfectScrollbar from "vue-perfect-scrollbar";
93a68cfa1   Jatinder Singh   first commit
528
  export default {
687e0b929   Neeraj Sharma   add user,attenden...
529
    name: "app-drawer",
93a68cfa1   Jatinder Singh   first commit
530
    components: {
687e0b929   Neeraj Sharma   add user,attenden...
531
      VuePerfectScrollbar
93a68cfa1   Jatinder Singh   first commit
532
533
534
535
536
    },
    props: {
      expanded: {
        type: Boolean,
        default: true
687e0b929   Neeraj Sharma   add user,attenden...
537
      }
93a68cfa1   Jatinder Singh   first commit
538
539
540
541
    },
    data: () => ({
      mini: false,
      drawer: true,
37150e7c1   Neeraj Sharma   implement school ...
542
      menus: [],
68d742034   Neeraj Sharma   implement new des...
543
      menuSchool: [],
710438de6   Shikha Mishra   added teacher mod...
544
      menuTeacher: [],
acb6c9e2b   Shikha Mishra   issues solved rel...
545
546
      menuAccount: [],
      menuLibrarian: [],
68d742034   Neeraj Sharma   implement new des...
547
548
      schoolRole: "",
      role: "",
93a68cfa1   Jatinder Singh   first commit
549
550
      scrollSettings: {
        maxScrollbarLength: 160
687e0b929   Neeraj Sharma   add user,attenden...
551
      }
93a68cfa1   Jatinder Singh   first commit
552
553
    }),
    computed: {
687e0b929   Neeraj Sharma   add user,attenden...
554
      computeGroupActive() {
93a68cfa1   Jatinder Singh   first commit
555
556
        return true;
      },
687e0b929   Neeraj Sharma   add user,attenden...
557
      computeLogo() {
68d742034   Neeraj Sharma   implement new des...
558
        return "/static/icon.png";
55f72b7d7   Neeraj Sharma   add new page are ...
559
      },
93a68cfa1   Jatinder Singh   first commit
560

687e0b929   Neeraj Sharma   add user,attenden...
561
      sideToolbarColor() {
93a68cfa1   Jatinder Singh   first commit
562
        return this.$vuetify.options.extra.sideNav;
687e0b929   Neeraj Sharma   add user,attenden...
563
      }
93a68cfa1   Jatinder Singh   first commit
564
    },
687e0b929   Neeraj Sharma   add user,attenden...
565
    created() {
68d742034   Neeraj Sharma   implement new des...
566
567
568
569
      this.schoolRole = this.$store.state.schoolRole;
      this.role = this.$store.state.role;
      this.menus = menu.adminMenu;
      this.menuSchool = menu.schoolMenu;
710438de6   Shikha Mishra   added teacher mod...
570
      this.menuTeacher = menu.teacherMenu;
acb6c9e2b   Shikha Mishra   issues solved rel...
571
572
      this.menuAccount = menu.accountMenu;
      this.menuLibrarian = menu.libraryMenu
68d742034   Neeraj Sharma   implement new des...
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
      // console.log("this.$route.name", this.$route.name);
      // if (this.$route.name === "School") {
      //   localStorage.setItem("SchoolName", this.$route.name);
      // }
      // if (this.$route.name === "Dashboard") {
      //   localStorage.setItem("AdminName", this.$route.name);
      // }
      // console.log("SN", localStorage.getItem("SchoolName"));
      // if (localStorage.getItem("SchoolName") === "School") {
      // if (this.$store.state.schoolRole === "SUPERADMIN") {
      //   console.log("rolA", this.$store.state.schoolRole);
      // if (this.$store.state.schoolRole === "SUPERADMIN") {
      // }
      //   console.log("this.menus", this.menus);
      // }
      // // }
      // // console.log("AN", localStorage.getItem("AdminName"));
      // // if (localStorage.getItem("AdminName") === "Dashboard") {
      // if (this.$store.state.role === "ADMIN") {
      //   console.log("role", this.$store.state.role);
      // else if (this.$store.state.role === "ADMIN") {
      // }
      //   // }
      // }
  
      // else if (this.$store.state.role === "LIBRARIAN") {
      //   this.menus = menu.libraryMenu;
      // } else if (this.$store.state.role === "ACCOUNTANT") {
      //   this.menus = menu.accountMenu;
      // }
687e0b929   Neeraj Sharma   add user,attenden...
603
604
      window.getApp.$on("APP_DRAWER_TOGGLED", () => {
        this.drawer = !this.drawer;
93a68cfa1   Jatinder Singh   first commit
605
606
      });
    },
93a68cfa1   Jatinder Singh   first commit
607
    methods: {
687e0b929   Neeraj Sharma   add user,attenden...
608
      genChildTarget(item, subItem) {
93a68cfa1   Jatinder Singh   first commit
609
610
611
        if (subItem.href) return;
        if (subItem.component) {
          return {
687e0b929   Neeraj Sharma   add user,attenden...
612
            name: subItem.component
93a68cfa1   Jatinder Singh   first commit
613
614
          };
        }
687e0b929   Neeraj Sharma   add user,attenden...
615
616
        return { name: `${item.group}/${subItem.name}` };
      }
dfd943df6   Shikha Mishra   app drawer
617
618
619
620
621
622
    },
    mounted() {
     if (this.$store.state.role === "ADMIN") {
        this.token = this.$store.state.token;
     } if (this.$store.state.schoolRole === "SUPERADMIN") {
       this.token = this.$store.schoolToken;
710438de6   Shikha Mishra   added teacher mod...
623
624
     } if (this.$store.state.role === "TEACHER") {
       this.token = this.$store.state.token;
acb6c9e2b   Shikha Mishra   issues solved rel...
625
626
627
628
     }if (this.$store.state.role === "ACCOUNTANT") {
        this.token = this.$store.state.token;
     }if (this.$store.state.role === "LIBRARIAN") {
        this.token = this.$store.state.token;
dfd943df6   Shikha Mishra   app drawer
629
     }
93a68cfa1   Jatinder Singh   first commit
630
631
632
633
634
635
636
    }
  };
  </script>
  
  
  <style lang="stylus">
  // @import '../../node_modules/vuetify/src/stylus/settings/_elevations.styl';
687e0b929   Neeraj Sharma   add user,attenden...
637
638
  #appDrawer {
    overflow: hidden;
93a68cfa1   Jatinder Singh   first commit
639

687e0b929   Neeraj Sharma   add user,attenden...
640
641
642
643
644
    .drawer-menu--scroll {
      height: calc(100vh - 48px);
      overflow: auto;
    }
  }
37150e7c1   Neeraj Sharma   implement school ...
645

687e0b929   Neeraj Sharma   add user,attenden...
646
  .v-list__group__items--no-action .v-list__tile {
37150e7c1   Neeraj Sharma   implement school ...
647
    padding-left: 72px !important;
687e0b929   Neeraj Sharma   add user,attenden...
648
  }
37150e7c1   Neeraj Sharma   implement school ...
649

03dcbf0c1   Neeraj Sharma   fix all api and r...
650
  .v-list--dense .v-list__tile:not(.v-list__tile--avatar) {
68d742034   Neeraj Sharma   implement new des...
651
    height: 54px;
687e0b929   Neeraj Sharma   add user,attenden...
652
    font-size: 17px;
03dcbf0c1   Neeraj Sharma   fix all api and r...
653
  }
687e0b929   Neeraj Sharma   add user,attenden...
654

03dcbf0c1   Neeraj Sharma   fix all api and r...
655
  .v-list__tile__action {
687e0b929   Neeraj Sharma   add user,attenden...
656
    min-width: 36px;
03dcbf0c1   Neeraj Sharma   fix all api and r...
657
  }
687e0b929   Neeraj Sharma   add user,attenden...
658

68d742034   Neeraj Sharma   implement new des...
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
  // .theme--light .v-icon, .application .theme--light.v-icon {
  // color: #f1f1f1;
  // }
  .ps>.ps__scrollbar-y-rail>.ps__scrollbar-y {
    background-color: #f5f5f5;
    background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.44, rgb(122, 153, 217)), color-stop(0.72, rgb(73, 125, 189)), color-stop(0.86, rgb(28, 58, 148)));
    width: 8px !important;
  }
  
  .ps>.ps__scrollbar-y-rail {
    width: 0px !important;
  }
  
  .ps:hover > .ps__scrollbar-y-rail:hover {
    background-color: #5f2171 !important;
    opacity: 0.9;
  }
  
  .ps > .ps__scrollbar-y-rail:hover > .ps__scrollbar-y {
    width: 8px !important;
    background-color: #f5f5f5;
    background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.44, rgb(122, 153, 217)), color-stop(0.72, rgb(73, 125, 189)), color-stop(0.86, rgb(28, 58, 148)));
  }
  
  .ps:hover > .ps__scrollbar-y-rail:hover > .ps__scrollbar-y {
    // background-color: #5f2171 !important;
    width: 8px !important;
    background-color: #f5f5f5;
    background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.44, rgb(122, 153, 217)), color-stop(0.72, rgb(73, 125, 189)), color-stop(0.86, rgb(28, 58, 148)));
  }
  
  .v-list__tile--active {
    color: #71d9ea !important;
  }
  
  .my-1 {
dfd943df6   Shikha Mishra   app drawer
695
    text-align: left !important;
68d742034   Neeraj Sharma   implement new des...
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
  }
  
  .title {
    line-height: 2 !important;
  }
  
  // .v-list__tile--hover {
  // color: white !important;
  // background: red !important;
  // }
  .v-list .v-list__tile--link:hover, .v-list .v-list__tile--highlighted, .v-list .v-list__group__header:hover, .v-list .v-list__group--active:before, .v-list .v-list__group--active:after {
    background: #7f62f8 !important;
    color: #71d9ea !important;
    box-shadow: 0 3px 3px -2px rgba(0, 0, 0, 0.2), 0 3px 4px 0 rgba(0, 0, 0, 0.14), 0 1px 8px 0 rgba(0, 0, 0, 0.12) !important;
    // border-radius: 12px !important;
03dcbf0c1   Neeraj Sharma   fix all api and r...
711
  }
687e0b929   Neeraj Sharma   add user,attenden...
712
713
714
  
  @media screen and (max-width: 420px) {
    .v-list--dense .v-list__tile:not(.v-list__tile--avatar) {
03dcbf0c1   Neeraj Sharma   fix all api and r...
715
      font-size: 14px;
687e0b929   Neeraj Sharma   add user,attenden...
716
717
718
719
720
721
    }
  
    .imgLogo {
      height: 32px;
      width: 120px;
    }
03dcbf0c1   Neeraj Sharma   fix all api and r...
722
  }
93a68cfa1   Jatinder Singh   first commit
723
  </style>
d75967ec2   Neeraj Sharma   implemented chang...
724
725
726
  
  
  <style scoped>
687e0b929   Neeraj Sharma   add user,attenden...
727
728
729
  .theme--light .v-icon,
  .application .theme--light.v-icon {
    color: #39b982;
d75967ec2   Neeraj Sharma   implemented chang...
730
  }
68d742034   Neeraj Sharma   implement new des...
731
732
733
734
735
  .side-bar-color {
    background: #827bfa !important;
    border-top-right-radius: 74px !important;
  }
  /* a {
687e0b929   Neeraj Sharma   add user,attenden...
736
737
738
    text-decoration: none;
    display: inherit;
    color: black;
68d742034   Neeraj Sharma   implement new des...
739
740
741
742
  } */
  .hover:hover {
    color: red !important;
    background: red !important;
687e0b929   Neeraj Sharma   add user,attenden...
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
  }
  /* a:active {
    color: red !important;
  } */
  /* a:visited {
    border-left: 4px solid black;
    border-radius: 4px;
  } */
  /* visited link */
  /* a:visited {
    color: black !important;
    border-left: 4px solid black;
    border-radius: 4px;
  }
  a:active {
    color: black !important;
    border-left: 4px solid black;
    border-radius: 4px;
  }  */
d75967ec2   Neeraj Sharma   implemented chang...
762
  </style>
68d742034   Neeraj Sharma   implement new des...
763