Blame view

src/components/pageHeader/AppToolbar.vue 3.78 KB
93a68cfa1   Jatinder Singh   first commit
1
  <template>
68d742034   Neeraj Sharma   implement new des...
2
3
4
    <v-toolbar flat class="white pt-2" fixed app>
      <v-toolbar-title>
        <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide darkBlue-color"></v-toolbar-side-icon>
03dcbf0c1   Neeraj Sharma   fix all api and r...
5
      </v-toolbar-title>
a17c68a03   Neeraj Sharma   implement two rou...
6
      <!-- ****** SEARCH ALL EXISTING STUDENTS ****** -->
68d742034   Neeraj Sharma   implement new des...
7
8
      <v-flex xs12 class="white">
        <!-- <v-text-field
a17c68a03   Neeraj Sharma   implement two rou...
9
10
11
          flat
          append-icon="search"
          label="Seacrh"
cf94564ea   Neeraj Sharma   fixed toolbar sid...
12
          class="pl-3"
a17c68a03   Neeraj Sharma   implement two rou...
13
14
15
16
          color="white"
          @input.native="emitSearch"
          type="text"
          dark
68d742034   Neeraj Sharma   implement new des...
17
18
        ></v-text-field>-->
        <v-toolbar-title class="header-route-name pl-2">{{ $route.name }}</v-toolbar-title>
a17c68a03   Neeraj Sharma   implement two rou...
19
20
      </v-flex>
      <v-spacer></v-spacer>
68d742034   Neeraj Sharma   implement new des...
21
22
23
      <v-toolbar-items class="hidden-sm-and-down">
        <v-icon class="header-icon">notifications_none</v-icon>
      </v-toolbar-items>
a17c68a03   Neeraj Sharma   implement two rou...
24
25
      <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition">
        <v-btn icon large flat slot="activator">
68d742034   Neeraj Sharma   implement new des...
26
          <v-avatar size="26">
aa310d61a   Shikha Mishra   added functionali...
27
            <img src="/static/icon/setting1.png" alt="icon" />
a17c68a03   Neeraj Sharma   implement two rou...
28
          </v-avatar>
93a68cfa1   Jatinder Singh   first commit
29
        </v-btn>
a17c68a03   Neeraj Sharma   implement two rou...
30
31
32
33
34
35
36
37
38
39
40
41
42
        <v-list class="pa-0">
          <v-list-tile
            v-for="(item,index) in items"
            :to="!item.href ? { name: item.name } : null"
            :href="item.href"
            @click="item.click"
            ripple="ripple"
            :disabled="item.disabled"
            :target="item.target"
            rel="noopener"
            :key="index"
          >
            <v-list-tile-action v-if="item.icon">
1571e40b5   Neeraj Sharma   gallery and socia...
43
              <v-icon class="iconSize">{{ item.icon }}</v-icon>
a17c68a03   Neeraj Sharma   implement two rou...
44
45
46
47
48
49
50
            </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>
        </v-list>
      </v-menu>
93a68cfa1   Jatinder Singh   first commit
51
52
53
    </v-toolbar>
  </template>
  <script>
66a5c3b75   Neeraj Sharma   implement gloabal...
54
  import http from "@/Services/http.js";
93a68cfa1   Jatinder Singh   first commit
55
  export default {
03dcbf0c1   Neeraj Sharma   fix all api and r...
56
    name: "app-toolbar",
93a68cfa1   Jatinder Singh   first commit
57
    data: () => ({
a17c68a03   Neeraj Sharma   implement two rou...
58
      userName: "",
03dcbf0c1   Neeraj Sharma   fix all api and r...
59
      search: "",
66a5c3b75   Neeraj Sharma   implement gloabal...
60
      userData: {},
93a68cfa1   Jatinder Singh   first commit
61
62
      items: [
        {
db0c39244   Neeraj Sharma   implement event a...
63
          icon: "account_circle",
79583580d   Neeraj Sharma   implement task ma...
64
          href: "/resetPassword",
03dcbf0c1   Neeraj Sharma   fix all api and r...
65
66
          title: "Change Password",
          click: e => {
93a68cfa1   Jatinder Singh   first commit
67
68
69
70
71
72
73
74
75
76
77
78
            console.log(e);
          }
        },
        // {
        //   icon: 'settings',
        //   href: '#',
        //   title: 'Settings',
        //   click: (e) => {
        //     console.log(e);
        //   }
        // },
        {
db0c39244   Neeraj Sharma   implement event a...
79
          icon: "lock",
03dcbf0c1   Neeraj Sharma   fix all api and r...
80
81
82
83
          href: "#",
          title: "Logout",
          click: e => {
            window.getApp.$emit("APP_LOGOUT");
93a68cfa1   Jatinder Singh   first commit
84
85
          }
        }
03dcbf0c1   Neeraj Sharma   fix all api and r...
86
      ]
93a68cfa1   Jatinder Singh   first commit
87
88
    }),
    computed: {
03dcbf0c1   Neeraj Sharma   fix all api and r...
89
      toolbarColor() {
93a68cfa1   Jatinder Singh   first commit
90
91
92
        return this.$vuetify.options.extra.mainNav;
      }
    },
66a5c3b75   Neeraj Sharma   implement gloabal...
93
94
95
    mounted() {
      this.getUserData();
    },
93a68cfa1   Jatinder Singh   first commit
96
    methods: {
68d742034   Neeraj Sharma   implement new des...
97
98
99
      // emitSearch(ev) {
      //   this.$root.$emit("app:search", ev.target.value);
      // },
03dcbf0c1   Neeraj Sharma   fix all api and r...
100
101
      handleDrawerToggle() {
        window.getApp.$emit("APP_DRAWER_TOGGLED");
93a68cfa1   Jatinder Singh   first commit
102
      },
03dcbf0c1   Neeraj Sharma   fix all api and r...
103
      handleFullScreen() {
93a68cfa1   Jatinder Singh   first commit
104
        Util.toggleFullScreen();
66a5c3b75   Neeraj Sharma   implement gloabal...
105
106
107
      },
      getUserData() {
        http()
25205ccca   Shikha Mishra   show school logo ...
108
109
110
111
112
          .get("/getParticularUserDetail", {
             headers: {
              Authorization: "Bearer " + this.$store.state.token
            }
          })
66a5c3b75   Neeraj Sharma   implement gloabal...
113
114
115
116
          .then(response => {
            this.userData = response.data.data;
          })
          .catch(error => {
7d0816758   Shikha Mishra   show dashboard wh...
117
118
119
120
121
            // if (error.response.status === 401) {
            //   this.$router.replace({ path: "/" });
            //   this.$store.dispatch("setToken", null);
            //   this.$store.dispatch("Id", null);
            // }
66a5c3b75   Neeraj Sharma   implement gloabal...
122
          });
93a68cfa1   Jatinder Singh   first commit
123
      }
a17c68a03   Neeraj Sharma   implement two rou...
124
    }
93a68cfa1   Jatinder Singh   first commit
125
126
  };
  </script>
03dcbf0c1   Neeraj Sharma   fix all api and r...
127
  <style>
a17c68a03   Neeraj Sharma   implement two rou...
128
129
  .v-icon {
    font-size: 30px;
03dcbf0c1   Neeraj Sharma   fix all api and r...
130
  }
687e0b929   Neeraj Sharma   add user,attenden...
131
  .fixcolors {
79583580d   Neeraj Sharma   implement task ma...
132
    background: #444b54 !important;
687e0b929   Neeraj Sharma   add user,attenden...
133
  }
68d742034   Neeraj Sharma   implement new des...
134

a17c68a03   Neeraj Sharma   implement two rou...
135
136
137
138
139
  @media screen and (min-width: 1270px) {
    .hide {
      display: none;
    }
    /* }
a0fe54618   Neeraj Sharma   finally fix
140
141
  @media screen and (max-width: 962px) {
  .imglogo{
659b42db7   Neeraj Sharma   changes something...
142
143
144
145
146
      position: absolute;
      top: 13px;
      left: 13px !important;
      width: 70px;
      height: 24px;
f42c1d9c9   Neeraj Sharma   something change ...
147
  } */
a0fe54618   Neeraj Sharma   finally fix
148
  }
a17c68a03   Neeraj Sharma   implement two rou...
149
150
151
152
153
154
155
156
  @media screen and (max-width: 420px) {
    .v-list__tile {
      font-size: 14px;
      padding: 0 10px;
    }
    .name {
      font-size: 15px;
    }
03dcbf0c1   Neeraj Sharma   fix all api and r...
157
158
  }
  </style>