Blame view

src/components/pageHeader/AppDrawer.vue 30.1 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
397
398
399
400
401
              </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 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...
402
403
404
              <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...
405
              <v-list-tile-content>
68d742034   Neeraj Sharma   implement new des...
406
407
                <v-list-tile-title>{{ item.title }}</v-list-tile-title>
              </v-list-tile-content>
687e0b929   Neeraj Sharma   add user,attenden...
408
            </v-list-tile>
a9dc8b176   Neeraj Sharma   remove side bar s...
409
410
411
412
413
414
415
416
417
418
419
420
421
            <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...
422
                <v-list-tile
a9dc8b176   Neeraj Sharma   remove side bar s...
423
                  v-for="(grand, i) in subItem.children"
710438de6   Shikha Mishra   added teacher mod...
424
                  :key="i"
a9dc8b176   Neeraj Sharma   remove side bar s...
425
426
                  :to="genChildTarget(item, grand)"
                  :href="grand.href"
710438de6   Shikha Mishra   added teacher mod...
427
428
                  ripple="ripple"
                >
710438de6   Shikha Mishra   added teacher mod...
429
                  <v-list-tile-content>
a9dc8b176   Neeraj Sharma   remove side bar s...
430
                    <v-list-tile-title>{{ grand.title }}</v-list-tile-title>
710438de6   Shikha Mishra   added teacher mod...
431
                  </v-list-tile-content>
710438de6   Shikha Mishra   added teacher mod...
432
                </v-list-tile>
a9dc8b176   Neeraj Sharma   remove side bar s...
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
              </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>
11d037abe   Neeraj Sharma   commit code
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
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
574
575
576
577
578
579
580
        <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>
            <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...
581
582
      </v-list>
      <!-- </vue-perfect-scrollbar> -->
93a68cfa1   Jatinder Singh   first commit
583
584
585
    </v-navigation-drawer>
  </template>
  <script>
687e0b929   Neeraj Sharma   add user,attenden...
586
587
  import menu from "@/api/menu";
  import VuePerfectScrollbar from "vue-perfect-scrollbar";
93a68cfa1   Jatinder Singh   first commit
588
  export default {
687e0b929   Neeraj Sharma   add user,attenden...
589
    name: "app-drawer",
93a68cfa1   Jatinder Singh   first commit
590
    components: {
687e0b929   Neeraj Sharma   add user,attenden...
591
      VuePerfectScrollbar
93a68cfa1   Jatinder Singh   first commit
592
593
594
595
596
    },
    props: {
      expanded: {
        type: Boolean,
        default: true
687e0b929   Neeraj Sharma   add user,attenden...
597
      }
93a68cfa1   Jatinder Singh   first commit
598
599
600
601
    },
    data: () => ({
      mini: false,
      drawer: true,
37150e7c1   Neeraj Sharma   implement school ...
602
      menus: [],
68d742034   Neeraj Sharma   implement new des...
603
      menuSchool: [],
710438de6   Shikha Mishra   added teacher mod...
604
      menuTeacher: [],
acb6c9e2b   Shikha Mishra   issues solved rel...
605
606
      menuAccount: [],
      menuLibrarian: [],
11d037abe   Neeraj Sharma   commit code
607
      menuParent: [],
68d742034   Neeraj Sharma   implement new des...
608
609
      schoolRole: "",
      role: "",
93a68cfa1   Jatinder Singh   first commit
610
611
      scrollSettings: {
        maxScrollbarLength: 160
687e0b929   Neeraj Sharma   add user,attenden...
612
      }
93a68cfa1   Jatinder Singh   first commit
613
614
    }),
    computed: {
687e0b929   Neeraj Sharma   add user,attenden...
615
      computeGroupActive() {
93a68cfa1   Jatinder Singh   first commit
616
617
        return true;
      },
687e0b929   Neeraj Sharma   add user,attenden...
618
      computeLogo() {
68d742034   Neeraj Sharma   implement new des...
619
        return "/static/icon.png";
55f72b7d7   Neeraj Sharma   add new page are ...
620
      },
93a68cfa1   Jatinder Singh   first commit
621

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

687e0b929   Neeraj Sharma   add user,attenden...
709
710
711
712
713
    .drawer-menu--scroll {
      height: calc(100vh - 48px);
      overflow: auto;
    }
  }
37150e7c1   Neeraj Sharma   implement school ...
714

687e0b929   Neeraj Sharma   add user,attenden...
715
  .v-list__group__items--no-action .v-list__tile {
37150e7c1   Neeraj Sharma   implement school ...
716
    padding-left: 72px !important;
687e0b929   Neeraj Sharma   add user,attenden...
717
  }
37150e7c1   Neeraj Sharma   implement school ...
718

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

03dcbf0c1   Neeraj Sharma   fix all api and r...
724
  .v-list__tile__action {
687e0b929   Neeraj Sharma   add user,attenden...
725
    min-width: 36px;
03dcbf0c1   Neeraj Sharma   fix all api and r...
726
  }
687e0b929   Neeraj Sharma   add user,attenden...
727

68d742034   Neeraj Sharma   implement new des...
728
729
730
731
732
733
734
735
736
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
  // .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
764
    text-align: left !important;
68d742034   Neeraj Sharma   implement new des...
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
  }
  
  .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...
780
  }
687e0b929   Neeraj Sharma   add user,attenden...
781
782
783
  
  @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...
784
      font-size: 14px;
687e0b929   Neeraj Sharma   add user,attenden...
785
786
787
788
789
790
    }
  
    .imgLogo {
      height: 32px;
      width: 120px;
    }
03dcbf0c1   Neeraj Sharma   fix all api and r...
791
  }
93a68cfa1   Jatinder Singh   first commit
792
  </style>
d75967ec2   Neeraj Sharma   implemented chang...
793
794
795
  
  
  <style scoped>
687e0b929   Neeraj Sharma   add user,attenden...
796
797
798
  .theme--light .v-icon,
  .application .theme--light.v-icon {
    color: #39b982;
d75967ec2   Neeraj Sharma   implemented chang...
799
  }
68d742034   Neeraj Sharma   implement new des...
800
801
  .side-bar-color {
    background: #827bfa !important;
a76a6f135   Neeraj Sharma   implelement task
802
    /* border-top-right-radius: 74px !important; */
68d742034   Neeraj Sharma   implement new des...
803
  }
a9dc8b176   Neeraj Sharma   remove side bar s...
804
805
  .v-navigation-drawer--fixed {
    position: absolute !important;
a76a6f135   Neeraj Sharma   implelement task
806
807
808
  
    min-height: calc(2000px - 64px - 50px - 81px) !important;
    /* max-height: inherit !important; */
a9dc8b176   Neeraj Sharma   remove side bar s...
809
  }
68d742034   Neeraj Sharma   implement new des...
810
811
812
  .hover:hover {
    color: red !important;
    background: red !important;
687e0b929   Neeraj Sharma   add user,attenden...
813
  }
d75967ec2   Neeraj Sharma   implemented chang...
814
  </style>
68d742034   Neeraj Sharma   implement new des...
815