Blame view

src/components/pageHeader/AppDrawer.vue 30.4 KB
93a68cfa1   Jatinder Singh   first commit
1
2
3
4
  <template>
    <v-navigation-drawer
      id="appDrawer"
      :mini-variant.sync="mini"
93a68cfa1   Jatinder Singh   first commit
5
6
      :dark="$vuetify.dark"
      app
a76a6f135   Neeraj Sharma   implelement task
7
      fixed
93a68cfa1   Jatinder Singh   first commit
8
      v-model="drawer"
68d742034   Neeraj Sharma   implement new des...
9
      hide-overlay
93a68cfa1   Jatinder Singh   first commit
10
      width="260"
a76a6f135   Neeraj Sharma   implelement task
11
      class="white--text side-bar-color"
687e0b929   Neeraj Sharma   add user,attenden...
12
    >
a9dc8b176   Neeraj Sharma   remove side bar s...
13
      <!-- <vue-perfect-scrollbar
68d742034   Neeraj Sharma   implement new des...
14
15
        class="drawer-menu--scroll side-bar-color mt-3"
        :settings="scrollSettings"
a9dc8b176   Neeraj Sharma   remove side bar s...
16
      >-->
a76a6f135   Neeraj Sharma   implelement task
17
18
19
20
21
22
23
24
25
26
27
28
      <v-toolbar class="white" flat>
        <img
          v-bind:src="computeLogo"
          height="40"
          width="130"
          class="imgLogo mb-3 mt-3"
          alt="logo"
          style="margin: auto;
        display: block;"
        />
      </v-toolbar>
      <v-list dense dark>
a9dc8b176   Neeraj Sharma   remove side bar s...
29
30
31
        <template v-for="(item, i) in menus" v-if="role === 'ADMIN'">
          <!-- {{menus}} -->
          <!--group with subitems-->
a76a6f135   Neeraj Sharma   implelement task
32
          <v-list-group v-if="item.items" :key="item.name" :group="item.group" no-action>
a9dc8b176   Neeraj Sharma   remove side bar s...
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
            <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>
687e0b929   Neeraj Sharma   add user,attenden...
54
                <v-list-tile
a9dc8b176   Neeraj Sharma   remove side bar s...
55
                  v-for="(grand, i) in subItem.children"
687e0b929   Neeraj Sharma   add user,attenden...
56
                  :key="i"
a9dc8b176   Neeraj Sharma   remove side bar s...
57
58
                  :to="genChildTarget(item, grand)"
                  :href="grand.href"
687e0b929   Neeraj Sharma   add user,attenden...
59
60
                  ripple="ripple"
                >
687e0b929   Neeraj Sharma   add user,attenden...
61
                  <v-list-tile-content>
a9dc8b176   Neeraj Sharma   remove side bar s...
62
                    <v-list-tile-title>{{ grand.title }}</v-list-tile-title>
687e0b929   Neeraj Sharma   add user,attenden...
63
                  </v-list-tile-content>
687e0b929   Neeraj Sharma   add user,attenden...
64
                </v-list-tile>
a9dc8b176   Neeraj Sharma   remove side bar s...
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
              </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 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">
68d742034   Neeraj Sharma   implement new des...
126
127
128
              <v-list-tile-action v-if="item.icon">
                <img :src="item.icon" width="22" alt="icons" />
              </v-list-tile-action>
a9dc8b176   Neeraj Sharma   remove side bar s...
129
              <v-list-tile-content>
68d742034   Neeraj Sharma   implement new des...
130
131
                <v-list-tile-title>{{ item.title }}</v-list-tile-title>
              </v-list-tile-content>
68d742034   Neeraj Sharma   implement new des...
132
            </v-list-tile>
a9dc8b176   Neeraj Sharma   remove side bar s...
133
134
135
136
137
138
139
140
141
142
143
144
145
            <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>
acb6c9e2b   Shikha Mishra   issues solved rel...
146
                <v-list-tile
a9dc8b176   Neeraj Sharma   remove side bar s...
147
                  v-for="(grand, i) in subItem.children"
acb6c9e2b   Shikha Mishra   issues solved rel...
148
                  :key="i"
a9dc8b176   Neeraj Sharma   remove side bar s...
149
150
                  :to="genChildTarget(item, grand)"
                  :href="grand.href"
acb6c9e2b   Shikha Mishra   issues solved rel...
151
152
                  ripple="ripple"
                >
acb6c9e2b   Shikha Mishra   issues solved rel...
153
                  <v-list-tile-content>
a9dc8b176   Neeraj Sharma   remove side bar s...
154
                    <v-list-tile-title>{{ grand.title }}</v-list-tile-title>
acb6c9e2b   Shikha Mishra   issues solved rel...
155
                  </v-list-tile-content>
acb6c9e2b   Shikha Mishra   issues solved rel...
156
                </v-list-tile>
a9dc8b176   Neeraj Sharma   remove side bar s...
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
              </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">
acb6c9e2b   Shikha Mishra   issues solved rel...
218
219
220
              <v-list-tile-action v-if="item.icon">
                <img :src="item.icon" width="22" alt="icons" />
              </v-list-tile-action>
a9dc8b176   Neeraj Sharma   remove side bar s...
221
              <v-list-tile-content>
acb6c9e2b   Shikha Mishra   issues solved rel...
222
223
                <v-list-tile-title>{{ item.title }}</v-list-tile-title>
              </v-list-tile-content>
acb6c9e2b   Shikha Mishra   issues solved rel...
224
            </v-list-tile>
a9dc8b176   Neeraj Sharma   remove side bar s...
225
226
227
228
229
230
231
232
233
234
235
236
237
            <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>
acb6c9e2b   Shikha Mishra   issues solved rel...
238
                <v-list-tile
a9dc8b176   Neeraj Sharma   remove side bar s...
239
                  v-for="(grand, i) in subItem.children"
acb6c9e2b   Shikha Mishra   issues solved rel...
240
                  :key="i"
a9dc8b176   Neeraj Sharma   remove side bar s...
241
242
                  :to="genChildTarget(item, grand)"
                  :href="grand.href"
acb6c9e2b   Shikha Mishra   issues solved rel...
243
244
                  ripple="ripple"
                >
acb6c9e2b   Shikha Mishra   issues solved rel...
245
                  <v-list-tile-content>
a9dc8b176   Neeraj Sharma   remove side bar s...
246
                    <v-list-tile-title>{{ grand.title }}</v-list-tile-title>
acb6c9e2b   Shikha Mishra   issues solved rel...
247
                  </v-list-tile-content>
acb6c9e2b   Shikha Mishra   issues solved rel...
248
                </v-list-tile>
a9dc8b176   Neeraj Sharma   remove side bar s...
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
              </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 menuSchool" v-if="schoolRole === 'SUPERADMIN'">
          <!-- {{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">
acb6c9e2b   Shikha Mishra   issues solved rel...
310
311
312
              <v-list-tile-action v-if="item.icon">
                <img :src="item.icon" width="22" alt="icons" />
              </v-list-tile-action>
a9dc8b176   Neeraj Sharma   remove side bar s...
313
              <v-list-tile-content>
acb6c9e2b   Shikha Mishra   issues solved rel...
314
315
                <v-list-tile-title>{{ item.title }}</v-list-tile-title>
              </v-list-tile-content>
acb6c9e2b   Shikha Mishra   issues solved rel...
316
            </v-list-tile>
a9dc8b176   Neeraj Sharma   remove side bar s...
317
318
319
320
321
322
323
324
325
326
327
328
329
            <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>
68d742034   Neeraj Sharma   implement new des...
330
                <v-list-tile
a9dc8b176   Neeraj Sharma   remove side bar s...
331
                  v-for="(grand, i) in subItem.children"
68d742034   Neeraj Sharma   implement new des...
332
                  :key="i"
a9dc8b176   Neeraj Sharma   remove side bar s...
333
334
                  :to="genChildTarget(item, grand)"
                  :href="grand.href"
68d742034   Neeraj Sharma   implement new des...
335
336
                  ripple="ripple"
                >
68d742034   Neeraj Sharma   implement new des...
337
                  <v-list-tile-content>
a9dc8b176   Neeraj Sharma   remove side bar s...
338
                    <v-list-tile-title>{{ grand.title }}</v-list-tile-title>
68d742034   Neeraj Sharma   implement new des...
339
                  </v-list-tile-content>
68d742034   Neeraj Sharma   implement new des...
340
                </v-list-tile>
a9dc8b176   Neeraj Sharma   remove side bar s...
341
342
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
              </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>
e91641fe5   Amber Dev   solved bugs
397
398
  
        <!-- NAVIGATION DRAWER IF ROLE IS TEACHER -->
a9dc8b176   Neeraj Sharma   remove side bar s...
399
400
401
402
403
        <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">
68d742034   Neeraj Sharma   implement new des...
404
405
406
              <v-list-tile-action v-if="item.icon">
                <img :src="item.icon" width="22" alt="icons" />
              </v-list-tile-action>
a9dc8b176   Neeraj Sharma   remove side bar s...
407
              <v-list-tile-content>
68d742034   Neeraj Sharma   implement new des...
408
409
                <v-list-tile-title>{{ item.title }}</v-list-tile-title>
              </v-list-tile-content>
687e0b929   Neeraj Sharma   add user,attenden...
410
            </v-list-tile>
a9dc8b176   Neeraj Sharma   remove side bar s...
411
412
413
414
415
416
417
418
419
420
421
422
423
            <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>
710438de6   Shikha Mishra   added teacher mod...
424
                <v-list-tile
a9dc8b176   Neeraj Sharma   remove side bar s...
425
                  v-for="(grand, i) in subItem.children"
710438de6   Shikha Mishra   added teacher mod...
426
                  :key="i"
a9dc8b176   Neeraj Sharma   remove side bar s...
427
428
                  :to="genChildTarget(item, grand)"
                  :href="grand.href"
710438de6   Shikha Mishra   added teacher mod...
429
430
                  ripple="ripple"
                >
710438de6   Shikha Mishra   added teacher mod...
431
                  <v-list-tile-content>
a9dc8b176   Neeraj Sharma   remove side bar s...
432
                    <v-list-tile-title>{{ grand.title }}</v-list-tile-title>
710438de6   Shikha Mishra   added teacher mod...
433
                  </v-list-tile-content>
710438de6   Shikha Mishra   added teacher mod...
434
                </v-list-tile>
a9dc8b176   Neeraj Sharma   remove side bar s...
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
              </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>
e91641fe5   Amber Dev   solved bugs
491
492
  
        <!-- NAVIGATION DRAWER IF ROLE IS PARENT -->
11d037abe   Neeraj Sharma   commit code
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
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
        <template v-for="(item, i) in menuParent" v-if="role === 'PARENT'">
          <!-- {{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>
e91641fe5   Amber Dev   solved bugs
573
574
575
576
577
            <v-list-tile-action v-if="item.Vicon">
              <div style="position: relative; top: 3px;">
                <v-icon color="white" size="25">{{item.Vicon}}</v-icon>
              </div>
            </v-list-tile-action>
11d037abe   Neeraj Sharma   commit code
578
579
580
581
582
583
584
585
586
587
588
589
            <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>
a9dc8b176   Neeraj Sharma   remove side bar s...
590
591
      </v-list>
      <!-- </vue-perfect-scrollbar> -->
93a68cfa1   Jatinder Singh   first commit
592
593
594
    </v-navigation-drawer>
  </template>
  <script>
687e0b929   Neeraj Sharma   add user,attenden...
595
596
  import menu from "@/api/menu";
  import VuePerfectScrollbar from "vue-perfect-scrollbar";
93a68cfa1   Jatinder Singh   first commit
597
  export default {
687e0b929   Neeraj Sharma   add user,attenden...
598
    name: "app-drawer",
93a68cfa1   Jatinder Singh   first commit
599
    components: {
687e0b929   Neeraj Sharma   add user,attenden...
600
      VuePerfectScrollbar
93a68cfa1   Jatinder Singh   first commit
601
602
603
604
605
    },
    props: {
      expanded: {
        type: Boolean,
        default: true
687e0b929   Neeraj Sharma   add user,attenden...
606
      }
93a68cfa1   Jatinder Singh   first commit
607
608
609
610
    },
    data: () => ({
      mini: false,
      drawer: true,
37150e7c1   Neeraj Sharma   implement school ...
611
      menus: [],
68d742034   Neeraj Sharma   implement new des...
612
      menuSchool: [],
710438de6   Shikha Mishra   added teacher mod...
613
      menuTeacher: [],
acb6c9e2b   Shikha Mishra   issues solved rel...
614
615
      menuAccount: [],
      menuLibrarian: [],
11d037abe   Neeraj Sharma   commit code
616
      menuParent: [],
68d742034   Neeraj Sharma   implement new des...
617
618
      schoolRole: "",
      role: "",
93a68cfa1   Jatinder Singh   first commit
619
620
      scrollSettings: {
        maxScrollbarLength: 160
687e0b929   Neeraj Sharma   add user,attenden...
621
      }
93a68cfa1   Jatinder Singh   first commit
622
623
    }),
    computed: {
687e0b929   Neeraj Sharma   add user,attenden...
624
      computeGroupActive() {
93a68cfa1   Jatinder Singh   first commit
625
626
        return true;
      },
687e0b929   Neeraj Sharma   add user,attenden...
627
      computeLogo() {
68d742034   Neeraj Sharma   implement new des...
628
        return "/static/icon.png";
55f72b7d7   Neeraj Sharma   add new page are ...
629
      },
93a68cfa1   Jatinder Singh   first commit
630

687e0b929   Neeraj Sharma   add user,attenden...
631
      sideToolbarColor() {
93a68cfa1   Jatinder Singh   first commit
632
        return this.$vuetify.options.extra.sideNav;
687e0b929   Neeraj Sharma   add user,attenden...
633
      }
93a68cfa1   Jatinder Singh   first commit
634
    },
687e0b929   Neeraj Sharma   add user,attenden...
635
    created() {
68d742034   Neeraj Sharma   implement new des...
636
637
638
639
      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...
640
      this.menuTeacher = menu.teacherMenu;
acb6c9e2b   Shikha Mishra   issues solved rel...
641
      this.menuAccount = menu.accountMenu;
a9dc8b176   Neeraj Sharma   remove side bar s...
642
      this.menuLibrarian = menu.libraryMenu;
11d037abe   Neeraj Sharma   commit code
643
      this.menuParent = menu.parentMenu;
68d742034   Neeraj Sharma   implement new des...
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
      // 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...
674
675
      window.getApp.$on("APP_DRAWER_TOGGLED", () => {
        this.drawer = !this.drawer;
93a68cfa1   Jatinder Singh   first commit
676
677
      });
    },
93a68cfa1   Jatinder Singh   first commit
678
    methods: {
687e0b929   Neeraj Sharma   add user,attenden...
679
      genChildTarget(item, subItem) {
93a68cfa1   Jatinder Singh   first commit
680
681
682
        if (subItem.href) return;
        if (subItem.component) {
          return {
687e0b929   Neeraj Sharma   add user,attenden...
683
            name: subItem.component
93a68cfa1   Jatinder Singh   first commit
684
685
          };
        }
687e0b929   Neeraj Sharma   add user,attenden...
686
687
        return { name: `${item.group}/${subItem.name}` };
      }
dfd943df6   Shikha Mishra   app drawer
688
689
    },
    mounted() {
a9dc8b176   Neeraj Sharma   remove side bar s...
690
      if (this.$store.state.role === "ADMIN") {
dfd943df6   Shikha Mishra   app drawer
691
        this.token = this.$store.state.token;
a9dc8b176   Neeraj Sharma   remove side bar s...
692
693
694
695
696
      }
      if (this.$store.state.schoolRole === "SUPERADMIN") {
        this.token = this.$store.schoolToken;
      }
      if (this.$store.state.role === "TEACHER") {
acb6c9e2b   Shikha Mishra   issues solved rel...
697
        this.token = this.$store.state.token;
a9dc8b176   Neeraj Sharma   remove side bar s...
698
699
      }
      if (this.$store.state.role === "ACCOUNTANT") {
acb6c9e2b   Shikha Mishra   issues solved rel...
700
        this.token = this.$store.state.token;
a9dc8b176   Neeraj Sharma   remove side bar s...
701
702
703
704
      }
      if (this.$store.state.role === "LIBRARIAN") {
        this.token = this.$store.state.token;
      }
11d037abe   Neeraj Sharma   commit code
705
706
707
      if (this.$store.state.role === "PARENT") {
        this.token = this.$store.state.token;
      }
93a68cfa1   Jatinder Singh   first commit
708
709
710
711
712
713
714
    }
  };
  </script>
  
  
  <style lang="stylus">
  // @import '../../node_modules/vuetify/src/stylus/settings/_elevations.styl';
687e0b929   Neeraj Sharma   add user,attenden...
715
716
  #appDrawer {
    overflow: hidden;
93a68cfa1   Jatinder Singh   first commit
717

687e0b929   Neeraj Sharma   add user,attenden...
718
719
720
721
722
    .drawer-menu--scroll {
      height: calc(100vh - 48px);
      overflow: auto;
    }
  }
37150e7c1   Neeraj Sharma   implement school ...
723

687e0b929   Neeraj Sharma   add user,attenden...
724
  .v-list__group__items--no-action .v-list__tile {
37150e7c1   Neeraj Sharma   implement school ...
725
    padding-left: 72px !important;
687e0b929   Neeraj Sharma   add user,attenden...
726
  }
37150e7c1   Neeraj Sharma   implement school ...
727

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

03dcbf0c1   Neeraj Sharma   fix all api and r...
733
  .v-list__tile__action {
687e0b929   Neeraj Sharma   add user,attenden...
734
    min-width: 36px;
03dcbf0c1   Neeraj Sharma   fix all api and r...
735
  }
687e0b929   Neeraj Sharma   add user,attenden...
736

68d742034   Neeraj Sharma   implement new des...
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
  // .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
773
    text-align: left !important;
68d742034   Neeraj Sharma   implement new des...
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
  }
  
  .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...
789
  }
687e0b929   Neeraj Sharma   add user,attenden...
790
791
792
  
  @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...
793
      font-size: 14px;
687e0b929   Neeraj Sharma   add user,attenden...
794
795
796
797
798
799
    }
  
    .imgLogo {
      height: 32px;
      width: 120px;
    }
03dcbf0c1   Neeraj Sharma   fix all api and r...
800
  }
93a68cfa1   Jatinder Singh   first commit
801
  </style>
d75967ec2   Neeraj Sharma   implemented chang...
802
803
804
  
  
  <style scoped>
687e0b929   Neeraj Sharma   add user,attenden...
805
806
807
  .theme--light .v-icon,
  .application .theme--light.v-icon {
    color: #39b982;
d75967ec2   Neeraj Sharma   implemented chang...
808
  }
68d742034   Neeraj Sharma   implement new des...
809
810
  .side-bar-color {
    background: #827bfa !important;
a76a6f135   Neeraj Sharma   implelement task
811
    /* border-top-right-radius: 74px !important; */
68d742034   Neeraj Sharma   implement new des...
812
  }
a9dc8b176   Neeraj Sharma   remove side bar s...
813
814
  .v-navigation-drawer--fixed {
    position: absolute !important;
a76a6f135   Neeraj Sharma   implelement task
815
816
817
  
    min-height: calc(2000px - 64px - 50px - 81px) !important;
    /* max-height: inherit !important; */
a9dc8b176   Neeraj Sharma   remove side bar s...
818
  }
68d742034   Neeraj Sharma   implement new des...
819
820
821
  .hover:hover {
    color: red !important;
    background: red !important;
687e0b929   Neeraj Sharma   add user,attenden...
822
  }
d75967ec2   Neeraj Sharma   implemented chang...
823
  </style>
68d742034   Neeraj Sharma   implement new des...
824