Blame view

src/components/pageHeader/AppToolbar.vue 3.25 KB
93a68cfa1   Jatinder Singh   first commit
1
  <template>
687e0b929   Neeraj Sharma   add user,attenden...
2
    <v-toolbar class="fixcolors" fixed app>
cf94564ea   Neeraj Sharma   fixed toolbar sid...
3
4
      <v-toolbar-title class="ml-0">
        <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide white--text"></v-toolbar-side-icon>
03dcbf0c1   Neeraj Sharma   fix all api and r...
5
      </v-toolbar-title>
a17c68a03   Neeraj Sharma   implement two rou...
6
7
  
      <!-- ****** SEARCH ALL EXISTING STUDENTS ****** -->
db0c39244   Neeraj Sharma   implement event a...
8
9
10
11
      <v-flex
        xs7
        sm3
        class="userSearch"
1c69557ac   Neeraj Sharma   implement design ...
12
        v-if="$route.name != 'Dashboard' && $route.name != 'changepassword' && $route.name != 'generalSetting'  && $route.name != 'resetPassword' && $route.name != 'bulkImport'"
db0c39244   Neeraj Sharma   implement event a...
13
      >
a17c68a03   Neeraj Sharma   implement two rou...
14
15
16
17
        <v-text-field
          flat
          append-icon="search"
          label="Seacrh"
cf94564ea   Neeraj Sharma   fixed toolbar sid...
18
          class="pl-3"
a17c68a03   Neeraj Sharma   implement two rou...
19
20
21
22
23
24
25
26
27
          color="white"
          @input.native="emitSearch"
          type="text"
          dark
        ></v-text-field>
      </v-flex>
      <v-spacer></v-spacer>
      <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition">
        <v-btn icon large flat slot="activator">
79583580d   Neeraj Sharma   implement task ma...
28
          <v-avatar>
687e0b929   Neeraj Sharma   add user,attenden...
29
            <!-- <img src="/static/icon/user.png" /> -->
79583580d   Neeraj Sharma   implement task ma...
30
            <v-icon dark size="40px">account_circle</v-icon>
a17c68a03   Neeraj Sharma   implement two rou...
31
          </v-avatar>
93a68cfa1   Jatinder Singh   first commit
32
        </v-btn>
a17c68a03   Neeraj Sharma   implement two rou...
33
34
35
36
37
38
39
40
41
42
43
44
45
        <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...
46
              <v-icon class="iconSize">{{ item.icon }}</v-icon>
a17c68a03   Neeraj Sharma   implement two rou...
47
48
49
50
51
52
53
            </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
54
55
56
    </v-toolbar>
  </template>
  <script>
03dcbf0c1   Neeraj Sharma   fix all api and r...
57
  import Util from "@/util";
93a68cfa1   Jatinder Singh   first commit
58
  export default {
03dcbf0c1   Neeraj Sharma   fix all api and r...
59
    name: "app-toolbar",
93a68cfa1   Jatinder Singh   first commit
60
    data: () => ({
a17c68a03   Neeraj Sharma   implement two rou...
61
      userName: "",
03dcbf0c1   Neeraj Sharma   fix all api and r...
62
      search: "",
93a68cfa1   Jatinder Singh   first commit
63
64
      items: [
        {
db0c39244   Neeraj Sharma   implement event a...
65
          icon: "account_circle",
79583580d   Neeraj Sharma   implement task ma...
66
          href: "/resetPassword",
03dcbf0c1   Neeraj Sharma   fix all api and r...
67
68
          title: "Change Password",
          click: e => {
93a68cfa1   Jatinder Singh   first commit
69
70
71
72
73
74
75
76
77
78
79
80
            console.log(e);
          }
        },
        // {
        //   icon: 'settings',
        //   href: '#',
        //   title: 'Settings',
        //   click: (e) => {
        //     console.log(e);
        //   }
        // },
        {
db0c39244   Neeraj Sharma   implement event a...
81
          icon: "lock",
03dcbf0c1   Neeraj Sharma   fix all api and r...
82
83
84
85
          href: "#",
          title: "Logout",
          click: e => {
            window.getApp.$emit("APP_LOGOUT");
93a68cfa1   Jatinder Singh   first commit
86
87
          }
        }
03dcbf0c1   Neeraj Sharma   fix all api and r...
88
      ]
93a68cfa1   Jatinder Singh   first commit
89
90
    }),
    computed: {
03dcbf0c1   Neeraj Sharma   fix all api and r...
91
      toolbarColor() {
93a68cfa1   Jatinder Singh   first commit
92
93
94
95
        return this.$vuetify.options.extra.mainNav;
      }
    },
    methods: {
db0c39244   Neeraj Sharma   implement event a...
96
97
98
      emitSearch(ev) {
        this.$root.$emit("app:search", ev.target.value);
        console.log("ev.target.value", ev.target.value);
a17c68a03   Neeraj Sharma   implement two rou...
99
      },
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
105
        Util.toggleFullScreen();
      }
a17c68a03   Neeraj Sharma   implement two rou...
106
    }
93a68cfa1   Jatinder Singh   first commit
107
108
  };
  </script>
03dcbf0c1   Neeraj Sharma   fix all api and r...
109
  <style>
a17c68a03   Neeraj Sharma   implement two rou...
110
111
  .v-icon {
    font-size: 30px;
03dcbf0c1   Neeraj Sharma   fix all api and r...
112
  }
687e0b929   Neeraj Sharma   add user,attenden...
113
  .fixcolors {
79583580d   Neeraj Sharma   implement task ma...
114
    background: #444b54 !important;
687e0b929   Neeraj Sharma   add user,attenden...
115
  }
a17c68a03   Neeraj Sharma   implement two rou...
116
117
118
119
120
  @media screen and (min-width: 1270px) {
    .hide {
      display: none;
    }
    /* }
a0fe54618   Neeraj Sharma   finally fix
121
122
  @media screen and (max-width: 962px) {
  .imglogo{
659b42db7   Neeraj Sharma   changes something...
123
124
125
126
127
      position: absolute;
      top: 13px;
      left: 13px !important;
      width: 70px;
      height: 24px;
f42c1d9c9   Neeraj Sharma   something change ...
128
  } */
a0fe54618   Neeraj Sharma   finally fix
129
  }
a17c68a03   Neeraj Sharma   implement two rou...
130
131
132
133
134
135
136
137
  @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...
138
139
  }
  </style>