Blame view

src/components/pageHeader/AppDrawer.vue 30.5 KB
93a68cfa1   Jatinder Singh   first commit
1
2
3
  <template>
    <v-navigation-drawer
      id="appDrawer"
93a68cfa1   Jatinder Singh   first commit
4
      app
a76a6f135   Neeraj Sharma   implelement task
5
      fixed
bf63831be   Amber Dev   navigation drawer...
6
7
      :mini-variant.sync="mini"
      :dark="$vuetify.dark"
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"
52d274996   Amber Dev   added scroll to n...
12
      style="height: 100%; overflow: scroll;"
687e0b929   Neeraj Sharma   add user,attenden...
13
    >
a9dc8b176   Neeraj Sharma   remove side bar s...
14
      <!-- <vue-perfect-scrollbar
68d742034   Neeraj Sharma   implement new des...
15
16
        class="drawer-menu--scroll side-bar-color mt-3"
        :settings="scrollSettings"
a9dc8b176   Neeraj Sharma   remove side bar s...
17
      >-->
a76a6f135   Neeraj Sharma   implelement task
18
19
20
21
22
23
24
25
26
27
28
29
      <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...
30
31
32
        <template v-for="(item, i) in menus" v-if="role === 'ADMIN'">
          <!-- {{menus}} -->
          <!--group with subitems-->
a76a6f135   Neeraj Sharma   implelement task
33
          <v-list-group v-if="item.items" :key="item.name" :group="item.group" no-action>
a9dc8b176   Neeraj Sharma   remove side bar s...
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
            <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...
55
                <v-list-tile
a9dc8b176   Neeraj Sharma   remove side bar s...
56
                  v-for="(grand, i) in subItem.children"
687e0b929   Neeraj Sharma   add user,attenden...
57
                  :key="i"
a9dc8b176   Neeraj Sharma   remove side bar s...
58
59
                  :to="genChildTarget(item, grand)"
                  :href="grand.href"
687e0b929   Neeraj Sharma   add user,attenden...
60
61
                  ripple="ripple"
                >
687e0b929   Neeraj Sharma   add user,attenden...
62
                  <v-list-tile-content>
a9dc8b176   Neeraj Sharma   remove side bar s...
63
                    <v-list-tile-title>{{ grand.title }}</v-list-tile-title>
687e0b929   Neeraj Sharma   add user,attenden...
64
                  </v-list-tile-content>
687e0b929   Neeraj Sharma   add user,attenden...
65
                </v-list-tile>
a9dc8b176   Neeraj Sharma   remove side bar s...
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
              </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...
127
128
129
              <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...
130
              <v-list-tile-content>
68d742034   Neeraj Sharma   implement new des...
131
132
                <v-list-tile-title>{{ item.title }}</v-list-tile-title>
              </v-list-tile-content>
68d742034   Neeraj Sharma   implement new des...
133
            </v-list-tile>
a9dc8b176   Neeraj Sharma   remove side bar s...
134
135
136
137
138
139
140
141
142
143
144
145
146
            <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...
147
                <v-list-tile
a9dc8b176   Neeraj Sharma   remove side bar s...
148
                  v-for="(grand, i) in subItem.children"
acb6c9e2b   Shikha Mishra   issues solved rel...
149
                  :key="i"
a9dc8b176   Neeraj Sharma   remove side bar s...
150
151
                  :to="genChildTarget(item, grand)"
                  :href="grand.href"
acb6c9e2b   Shikha Mishra   issues solved rel...
152
153
                  ripple="ripple"
                >
acb6c9e2b   Shikha Mishra   issues solved rel...
154
                  <v-list-tile-content>
a9dc8b176   Neeraj Sharma   remove side bar s...
155
                    <v-list-tile-title>{{ grand.title }}</v-list-tile-title>
acb6c9e2b   Shikha Mishra   issues solved rel...
156
                  </v-list-tile-content>
acb6c9e2b   Shikha Mishra   issues solved rel...
157
                </v-list-tile>
a9dc8b176   Neeraj Sharma   remove side bar s...
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
              </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...
219
220
221
              <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...
222
              <v-list-tile-content>
acb6c9e2b   Shikha Mishra   issues solved rel...
223
224
                <v-list-tile-title>{{ item.title }}</v-list-tile-title>
              </v-list-tile-content>
acb6c9e2b   Shikha Mishra   issues solved rel...
225
            </v-list-tile>
a9dc8b176   Neeraj Sharma   remove side bar s...
226
227
228
229
230
231
232
233
234
235
236
237
238
            <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...
239
                <v-list-tile
a9dc8b176   Neeraj Sharma   remove side bar s...
240
                  v-for="(grand, i) in subItem.children"
acb6c9e2b   Shikha Mishra   issues solved rel...
241
                  :key="i"
a9dc8b176   Neeraj Sharma   remove side bar s...
242
243
                  :to="genChildTarget(item, grand)"
                  :href="grand.href"
acb6c9e2b   Shikha Mishra   issues solved rel...
244
245
                  ripple="ripple"
                >
acb6c9e2b   Shikha Mishra   issues solved rel...
246
                  <v-list-tile-content>
a9dc8b176   Neeraj Sharma   remove side bar s...
247
                    <v-list-tile-title>{{ grand.title }}</v-list-tile-title>
acb6c9e2b   Shikha Mishra   issues solved rel...
248
                  </v-list-tile-content>
acb6c9e2b   Shikha Mishra   issues solved rel...
249
                </v-list-tile>
a9dc8b176   Neeraj Sharma   remove side bar s...
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
              </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...
311
312
313
              <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...
314
              <v-list-tile-content>
acb6c9e2b   Shikha Mishra   issues solved rel...
315
316
                <v-list-tile-title>{{ item.title }}</v-list-tile-title>
              </v-list-tile-content>
acb6c9e2b   Shikha Mishra   issues solved rel...
317
            </v-list-tile>
a9dc8b176   Neeraj Sharma   remove side bar s...
318
319
320
321
322
323
324
325
326
327
328
329
330
            <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...
331
                <v-list-tile
a9dc8b176   Neeraj Sharma   remove side bar s...
332
                  v-for="(grand, i) in subItem.children"
68d742034   Neeraj Sharma   implement new des...
333
                  :key="i"
a9dc8b176   Neeraj Sharma   remove side bar s...
334
335
                  :to="genChildTarget(item, grand)"
                  :href="grand.href"
68d742034   Neeraj Sharma   implement new des...
336
337
                  ripple="ripple"
                >
68d742034   Neeraj Sharma   implement new des...
338
                  <v-list-tile-content>
a9dc8b176   Neeraj Sharma   remove side bar s...
339
                    <v-list-tile-title>{{ grand.title }}</v-list-tile-title>
68d742034   Neeraj Sharma   implement new des...
340
                  </v-list-tile-content>
68d742034   Neeraj Sharma   implement new des...
341
                </v-list-tile>
a9dc8b176   Neeraj Sharma   remove side bar s...
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
397
              </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
398
399
  
        <!-- NAVIGATION DRAWER IF ROLE IS TEACHER -->
a9dc8b176   Neeraj Sharma   remove side bar s...
400
401
402
403
404
        <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...
405
406
407
              <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...
408
              <v-list-tile-content>
68d742034   Neeraj Sharma   implement new des...
409
410
                <v-list-tile-title>{{ item.title }}</v-list-tile-title>
              </v-list-tile-content>
687e0b929   Neeraj Sharma   add user,attenden...
411
            </v-list-tile>
a9dc8b176   Neeraj Sharma   remove side bar s...
412
413
414
415
416
417
418
419
420
421
422
423
424
            <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...
425
                <v-list-tile
a9dc8b176   Neeraj Sharma   remove side bar s...
426
                  v-for="(grand, i) in subItem.children"
710438de6   Shikha Mishra   added teacher mod...
427
                  :key="i"
a9dc8b176   Neeraj Sharma   remove side bar s...
428
429
                  :to="genChildTarget(item, grand)"
                  :href="grand.href"
710438de6   Shikha Mishra   added teacher mod...
430
431
                  ripple="ripple"
                >
710438de6   Shikha Mishra   added teacher mod...
432
                  <v-list-tile-content>
a9dc8b176   Neeraj Sharma   remove side bar s...
433
                    <v-list-tile-title>{{ grand.title }}</v-list-tile-title>
710438de6   Shikha Mishra   added teacher mod...
434
                  </v-list-tile-content>
710438de6   Shikha Mishra   added teacher mod...
435
                </v-list-tile>
a9dc8b176   Neeraj Sharma   remove side bar s...
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
              </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
492
493
  
        <!-- NAVIGATION DRAWER IF ROLE IS PARENT -->
11d037abe   Neeraj Sharma   commit code
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
573
        <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
574
575
576
577
578
            <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
579
580
581
582
583
584
585
586
587
588
589
590
            <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...
591
592
      </v-list>
      <!-- </vue-perfect-scrollbar> -->
93a68cfa1   Jatinder Singh   first commit
593
594
595
    </v-navigation-drawer>
  </template>
  <script>
687e0b929   Neeraj Sharma   add user,attenden...
596
597
  import menu from "@/api/menu";
  import VuePerfectScrollbar from "vue-perfect-scrollbar";
93a68cfa1   Jatinder Singh   first commit
598
  export default {
687e0b929   Neeraj Sharma   add user,attenden...
599
    name: "app-drawer",
93a68cfa1   Jatinder Singh   first commit
600
    components: {
bf63831be   Amber Dev   navigation drawer...
601
      VuePerfectScrollbar,
93a68cfa1   Jatinder Singh   first commit
602
603
604
605
    },
    props: {
      expanded: {
        type: Boolean,
bf63831be   Amber Dev   navigation drawer...
606
607
        default: true,
      },
93a68cfa1   Jatinder Singh   first commit
608
609
610
611
    },
    data: () => ({
      mini: false,
      drawer: true,
37150e7c1   Neeraj Sharma   implement school ...
612
      menus: [],
68d742034   Neeraj Sharma   implement new des...
613
      menuSchool: [],
710438de6   Shikha Mishra   added teacher mod...
614
      menuTeacher: [],
acb6c9e2b   Shikha Mishra   issues solved rel...
615
616
      menuAccount: [],
      menuLibrarian: [],
11d037abe   Neeraj Sharma   commit code
617
      menuParent: [],
68d742034   Neeraj Sharma   implement new des...
618
619
      schoolRole: "",
      role: "",
93a68cfa1   Jatinder Singh   first commit
620
      scrollSettings: {
bf63831be   Amber Dev   navigation drawer...
621
622
        maxScrollbarLength: 160,
      },
93a68cfa1   Jatinder Singh   first commit
623
624
    }),
    computed: {
687e0b929   Neeraj Sharma   add user,attenden...
625
      computeGroupActive() {
93a68cfa1   Jatinder Singh   first commit
626
627
        return true;
      },
687e0b929   Neeraj Sharma   add user,attenden...
628
      computeLogo() {
68d742034   Neeraj Sharma   implement new des...
629
        return "/static/icon.png";
55f72b7d7   Neeraj Sharma   add new page are ...
630
      },
93a68cfa1   Jatinder Singh   first commit
631

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

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

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

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

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

68d742034   Neeraj Sharma   implement new des...
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
773
  // .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
774
    text-align: left !important;
68d742034   Neeraj Sharma   implement new des...
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
  }
  
  .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...
790
  }
687e0b929   Neeraj Sharma   add user,attenden...
791
792
793
  
  @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...
794
      font-size: 14px;
687e0b929   Neeraj Sharma   add user,attenden...
795
796
797
798
799
800
    }
  
    .imgLogo {
      height: 32px;
      width: 120px;
    }
03dcbf0c1   Neeraj Sharma   fix all api and r...
801
  }
93a68cfa1   Jatinder Singh   first commit
802
  </style>
d75967ec2   Neeraj Sharma   implemented chang...
803
804
805
  
  
  <style scoped>
687e0b929   Neeraj Sharma   add user,attenden...
806
807
808
  .theme--light .v-icon,
  .application .theme--light.v-icon {
    color: #39b982;
d75967ec2   Neeraj Sharma   implemented chang...
809
  }
68d742034   Neeraj Sharma   implement new des...
810
811
  .side-bar-color {
    background: #827bfa !important;
a76a6f135   Neeraj Sharma   implelement task
812
    /* border-top-right-radius: 74px !important; */
68d742034   Neeraj Sharma   implement new des...
813
  }
a9dc8b176   Neeraj Sharma   remove side bar s...
814
  .v-navigation-drawer--fixed {
bf63831be   Amber Dev   navigation drawer...
815
    /* position: absolute !important; */
a76a6f135   Neeraj Sharma   implelement task
816

a6a5b3fcd   Amber Dev   screen height
817
    /* min-height: calc(2000px - 64px - 50px - 81px) !important; */
a76a6f135   Neeraj Sharma   implelement task
818
    /* max-height: inherit !important; */
a9dc8b176   Neeraj Sharma   remove side bar s...
819
  }
68d742034   Neeraj Sharma   implement new des...
820
821
822
  .hover:hover {
    color: red !important;
    background: red !important;
687e0b929   Neeraj Sharma   add user,attenden...
823
  }
d75967ec2   Neeraj Sharma   implemented chang...
824
  </style>
68d742034   Neeraj Sharma   implement new des...
825