Blame view

src/components/pageHeader/AppDrawer.vue 26 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
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>
      </v-list>
      <!-- </vue-perfect-scrollbar> -->
93a68cfa1   Jatinder Singh   first commit
491
492
493
    </v-navigation-drawer>
  </template>
  <script>
687e0b929   Neeraj Sharma   add user,attenden...
494
495
  import menu from "@/api/menu";
  import VuePerfectScrollbar from "vue-perfect-scrollbar";
93a68cfa1   Jatinder Singh   first commit
496
  export default {
687e0b929   Neeraj Sharma   add user,attenden...
497
    name: "app-drawer",
93a68cfa1   Jatinder Singh   first commit
498
    components: {
687e0b929   Neeraj Sharma   add user,attenden...
499
      VuePerfectScrollbar
93a68cfa1   Jatinder Singh   first commit
500
501
502
503
504
    },
    props: {
      expanded: {
        type: Boolean,
        default: true
687e0b929   Neeraj Sharma   add user,attenden...
505
      }
93a68cfa1   Jatinder Singh   first commit
506
507
508
509
    },
    data: () => ({
      mini: false,
      drawer: true,
37150e7c1   Neeraj Sharma   implement school ...
510
      menus: [],
68d742034   Neeraj Sharma   implement new des...
511
      menuSchool: [],
710438de6   Shikha Mishra   added teacher mod...
512
      menuTeacher: [],
acb6c9e2b   Shikha Mishra   issues solved rel...
513
514
      menuAccount: [],
      menuLibrarian: [],
68d742034   Neeraj Sharma   implement new des...
515
516
      schoolRole: "",
      role: "",
93a68cfa1   Jatinder Singh   first commit
517
518
      scrollSettings: {
        maxScrollbarLength: 160
687e0b929   Neeraj Sharma   add user,attenden...
519
      }
93a68cfa1   Jatinder Singh   first commit
520
521
    }),
    computed: {
687e0b929   Neeraj Sharma   add user,attenden...
522
      computeGroupActive() {
93a68cfa1   Jatinder Singh   first commit
523
524
        return true;
      },
687e0b929   Neeraj Sharma   add user,attenden...
525
      computeLogo() {
68d742034   Neeraj Sharma   implement new des...
526
        return "/static/icon.png";
55f72b7d7   Neeraj Sharma   add new page are ...
527
      },
93a68cfa1   Jatinder Singh   first commit
528

687e0b929   Neeraj Sharma   add user,attenden...
529
      sideToolbarColor() {
93a68cfa1   Jatinder Singh   first commit
530
        return this.$vuetify.options.extra.sideNav;
687e0b929   Neeraj Sharma   add user,attenden...
531
      }
93a68cfa1   Jatinder Singh   first commit
532
    },
687e0b929   Neeraj Sharma   add user,attenden...
533
    created() {
68d742034   Neeraj Sharma   implement new des...
534
535
536
537
      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...
538
      this.menuTeacher = menu.teacherMenu;
acb6c9e2b   Shikha Mishra   issues solved rel...
539
      this.menuAccount = menu.accountMenu;
a9dc8b176   Neeraj Sharma   remove side bar s...
540
      this.menuLibrarian = menu.libraryMenu;
68d742034   Neeraj Sharma   implement new des...
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
      // 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...
571
572
      window.getApp.$on("APP_DRAWER_TOGGLED", () => {
        this.drawer = !this.drawer;
93a68cfa1   Jatinder Singh   first commit
573
574
      });
    },
93a68cfa1   Jatinder Singh   first commit
575
    methods: {
687e0b929   Neeraj Sharma   add user,attenden...
576
      genChildTarget(item, subItem) {
93a68cfa1   Jatinder Singh   first commit
577
578
579
        if (subItem.href) return;
        if (subItem.component) {
          return {
687e0b929   Neeraj Sharma   add user,attenden...
580
            name: subItem.component
93a68cfa1   Jatinder Singh   first commit
581
582
          };
        }
687e0b929   Neeraj Sharma   add user,attenden...
583
584
        return { name: `${item.group}/${subItem.name}` };
      }
dfd943df6   Shikha Mishra   app drawer
585
586
    },
    mounted() {
a9dc8b176   Neeraj Sharma   remove side bar s...
587
      if (this.$store.state.role === "ADMIN") {
dfd943df6   Shikha Mishra   app drawer
588
        this.token = this.$store.state.token;
a9dc8b176   Neeraj Sharma   remove side bar s...
589
590
591
592
593
      }
      if (this.$store.state.schoolRole === "SUPERADMIN") {
        this.token = this.$store.schoolToken;
      }
      if (this.$store.state.role === "TEACHER") {
acb6c9e2b   Shikha Mishra   issues solved rel...
594
        this.token = this.$store.state.token;
a9dc8b176   Neeraj Sharma   remove side bar s...
595
596
      }
      if (this.$store.state.role === "ACCOUNTANT") {
acb6c9e2b   Shikha Mishra   issues solved rel...
597
        this.token = this.$store.state.token;
a9dc8b176   Neeraj Sharma   remove side bar s...
598
599
600
601
      }
      if (this.$store.state.role === "LIBRARIAN") {
        this.token = this.$store.state.token;
      }
93a68cfa1   Jatinder Singh   first commit
602
603
604
605
606
607
608
    }
  };
  </script>
  
  
  <style lang="stylus">
  // @import '../../node_modules/vuetify/src/stylus/settings/_elevations.styl';
687e0b929   Neeraj Sharma   add user,attenden...
609
610
  #appDrawer {
    overflow: hidden;
93a68cfa1   Jatinder Singh   first commit
611

687e0b929   Neeraj Sharma   add user,attenden...
612
613
614
615
616
    .drawer-menu--scroll {
      height: calc(100vh - 48px);
      overflow: auto;
    }
  }
37150e7c1   Neeraj Sharma   implement school ...
617

687e0b929   Neeraj Sharma   add user,attenden...
618
  .v-list__group__items--no-action .v-list__tile {
37150e7c1   Neeraj Sharma   implement school ...
619
    padding-left: 72px !important;
687e0b929   Neeraj Sharma   add user,attenden...
620
  }
37150e7c1   Neeraj Sharma   implement school ...
621

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

03dcbf0c1   Neeraj Sharma   fix all api and r...
627
  .v-list__tile__action {
687e0b929   Neeraj Sharma   add user,attenden...
628
    min-width: 36px;
03dcbf0c1   Neeraj Sharma   fix all api and r...
629
  }
687e0b929   Neeraj Sharma   add user,attenden...
630

68d742034   Neeraj Sharma   implement new des...
631
632
633
634
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
665
666
  // .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
667
    text-align: left !important;
68d742034   Neeraj Sharma   implement new des...
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
  }
  
  .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...
683
  }
687e0b929   Neeraj Sharma   add user,attenden...
684
685
686
  
  @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...
687
      font-size: 14px;
687e0b929   Neeraj Sharma   add user,attenden...
688
689
690
691
692
693
    }
  
    .imgLogo {
      height: 32px;
      width: 120px;
    }
03dcbf0c1   Neeraj Sharma   fix all api and r...
694
  }
93a68cfa1   Jatinder Singh   first commit
695
  </style>
d75967ec2   Neeraj Sharma   implemented chang...
696
697
698
  
  
  <style scoped>
687e0b929   Neeraj Sharma   add user,attenden...
699
700
701
  .theme--light .v-icon,
  .application .theme--light.v-icon {
    color: #39b982;
d75967ec2   Neeraj Sharma   implemented chang...
702
  }
68d742034   Neeraj Sharma   implement new des...
703
704
  .side-bar-color {
    background: #827bfa !important;
a76a6f135   Neeraj Sharma   implelement task
705
    /* border-top-right-radius: 74px !important; */
68d742034   Neeraj Sharma   implement new des...
706
  }
a9dc8b176   Neeraj Sharma   remove side bar s...
707
708
  .v-navigation-drawer--fixed {
    position: absolute !important;
a76a6f135   Neeraj Sharma   implelement task
709
710
711
  
    min-height: calc(2000px - 64px - 50px - 81px) !important;
    /* max-height: inherit !important; */
a9dc8b176   Neeraj Sharma   remove side bar s...
712
  }
68d742034   Neeraj Sharma   implement new des...
713
714
715
  .hover:hover {
    color: red !important;
    background: red !important;
687e0b929   Neeraj Sharma   add user,attenden...
716
  }
d75967ec2   Neeraj Sharma   implemented chang...
717
  </style>
68d742034   Neeraj Sharma   implement new des...
718