Commit a17c68a030ae25a42b8c759f47169e93b3aba355

Authored by Neeraj Sharma
1 parent 8bb178441a

implement two route page gallery and notice board

package-lock.json
... ... @@ -1625,7 +1625,6 @@
1625 1625 "version": "6.23.0",
1626 1626 "resolved": "https://registry.npmjs.org/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz",
1627 1627 "integrity": "sha1-iEkNRGUC6puOfvsP4J7E2ZR5se4=",
1628   - "dev": true,
1629 1628 "requires": {
1630 1629 "babel-runtime": "^6.22.0"
1631 1630 }
... ... @@ -1793,7 +1792,6 @@
1793 1792 "version": "6.26.0",
1794 1793 "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
1795 1794 "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
1796   - "dev": true,
1797 1795 "requires": {
1798 1796 "core-js": "^2.4.0",
1799 1797 "regenerator-runtime": "^0.11.0"
... ... @@ -3195,8 +3193,7 @@
3195 3193 "core-js": {
3196 3194 "version": "2.5.3",
3197 3195 "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz",
3198   - "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4=",
3199   - "dev": true
  3196 + "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4="
3200 3197 },
3201 3198 "core-util-is": {
3202 3199 "version": "1.0.2",
... ... @@ -3691,29 +3688,6 @@
3691 3688 "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=",
3692 3689 "dev": true
3693 3690 },
3694   - "dayspan": {
3695   - "version": "0.12.5",
3696   - "resolved": "https://registry.npmjs.org/dayspan/-/dayspan-0.12.5.tgz",
3697   - "integrity": "sha512-/IkvULBqTRJjUnmKcu3nAGpo04mIszC+ua1ItZadNRxfMKzplmxEljHytOpHdOyl6GF3V7de8oxgep7emeivNA=="
3698   - },
3699   - "dayspan-vuetify": {
3700   - "version": "0.4.0",
3701   - "resolved": "https://registry.npmjs.org/dayspan-vuetify/-/dayspan-vuetify-0.4.0.tgz",
3702   - "integrity": "sha512-YoCFu1hZsvklDQXm8IBRvY00v/B06F/h6yS0k4GALEqrzlqY0EKF4UUdjlr5xMRoKuw7NTA//4V4twOQ8H3D/A==",
3703   - "requires": {
3704   - "dayspan": "^0.12.2",
3705   - "material-design-icons-iconfont": "^3.0.3",
3706   - "vue": "^2.3.3",
3707   - "vuetify": "^1.3.9"
3708   - },
3709   - "dependencies": {
3710   - "vuetify": {
3711   - "version": "1.5.18",
3712   - "resolved": "https://registry.npmjs.org/vuetify/-/vuetify-1.5.18.tgz",
3713   - "integrity": "sha512-TLtVYBlajKk+I99rUvQ7c/qlSJ3gqZZKkBaVWXy5bIDFzUyIChIIcaZM7k+J/JumxQYJqnJ9H24rAjddemWalQ=="
3714   - }
3715   - }
3716   - },
3717 3691 "de-indent": {
3718 3692 "version": "1.0.2",
3719 3693 "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz",
... ... @@ -4327,7 +4301,8 @@
4327 4301 "es6-promise": {
4328 4302 "version": "4.2.4",
4329 4303 "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz",
4330   - "integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ=="
  4304 + "integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==",
  4305 + "dev": true
4331 4306 },
4332 4307 "es6-set": {
4333 4308 "version": "0.1.5",
... ... @@ -5575,14 +5550,14 @@
5575 5550 "dev": true
5576 5551 },
5577 5552 "fsevents": {
5578   - "version": "1.2.7",
5579   - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.7.tgz",
5580   - "integrity": "sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw==",
  5553 + "version": "1.2.9",
  5554 + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz",
  5555 + "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==",
5581 5556 "dev": true,
5582 5557 "optional": true,
5583 5558 "requires": {
5584   - "nan": "^2.9.2",
5585   - "node-pre-gyp": "^0.10.0"
  5559 + "nan": "^2.12.1",
  5560 + "node-pre-gyp": "^0.12.0"
5586 5561 },
5587 5562 "dependencies": {
5588 5563 "abbrev": {
... ... @@ -5660,12 +5635,12 @@
5660 5635 "optional": true
5661 5636 },
5662 5637 "debug": {
5663   - "version": "2.6.9",
  5638 + "version": "4.1.1",
5664 5639 "bundled": true,
5665 5640 "dev": true,
5666 5641 "optional": true,
5667 5642 "requires": {
5668   - "ms": "2.0.0"
  5643 + "ms": "^2.1.1"
5669 5644 }
5670 5645 },
5671 5646 "deep-extend": {
... ... @@ -5836,24 +5811,24 @@
5836 5811 }
5837 5812 },
5838 5813 "ms": {
5839   - "version": "2.0.0",
  5814 + "version": "2.1.1",
5840 5815 "bundled": true,
5841 5816 "dev": true,
5842 5817 "optional": true
5843 5818 },
5844 5819 "needle": {
5845   - "version": "2.2.4",
  5820 + "version": "2.3.0",
5846 5821 "bundled": true,
5847 5822 "dev": true,
5848 5823 "optional": true,
5849 5824 "requires": {
5850   - "debug": "^2.1.2",
  5825 + "debug": "^4.1.0",
5851 5826 "iconv-lite": "^0.4.4",
5852 5827 "sax": "^1.2.4"
5853 5828 }
5854 5829 },
5855 5830 "node-pre-gyp": {
5856   - "version": "0.10.3",
  5831 + "version": "0.12.0",
5857 5832 "bundled": true,
5858 5833 "dev": true,
5859 5834 "optional": true,
... ... @@ -5881,13 +5856,13 @@
5881 5856 }
5882 5857 },
5883 5858 "npm-bundled": {
5884   - "version": "1.0.5",
  5859 + "version": "1.0.6",
5885 5860 "bundled": true,
5886 5861 "dev": true,
5887 5862 "optional": true
5888 5863 },
5889 5864 "npm-packlist": {
5890   - "version": "1.2.0",
  5865 + "version": "1.4.1",
5891 5866 "bundled": true,
5892 5867 "dev": true,
5893 5868 "optional": true,
... ... @@ -6026,7 +6001,7 @@
6026 6001 "optional": true
6027 6002 },
6028 6003 "semver": {
6029   - "version": "5.6.0",
  6004 + "version": "5.7.0",
6030 6005 "bundled": true,
6031 6006 "dev": true,
6032 6007 "optional": true
... ... @@ -6158,6 +6133,11 @@
6158 6133 }
6159 6134 }
6160 6135 },
  6136 + "fullcalendar": {
  6137 + "version": "3.10.1",
  6138 + "resolved": "https://registry.npmjs.org/fullcalendar/-/fullcalendar-3.10.1.tgz",
  6139 + "integrity": "sha512-E0ioaHVmwdS4es8pNTUNva7505wPkUMFdn9JGFLYo+J12ARhN3zDBwoPj2DfB8rL7Yc1sSve+FqDHC3s2SZ7Fw=="
  6140 + },
6161 6141 "function-bind": {
6162 6142 "version": "1.1.1",
6163 6143 "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
... ... @@ -8044,6 +8024,11 @@
8044 8024 "integrity": "sha1-2t2e8BkkvHKLA/L3l5vb1i96Kqo=",
8045 8025 "dev": true
8046 8026 },
  8027 + "jquery": {
  8028 + "version": "3.4.1",
  8029 + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.4.1.tgz",
  8030 + "integrity": "sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw=="
  8031 + },
8047 8032 "js-base64": {
8048 8033 "version": "2.4.3",
8049 8034 "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.3.tgz",
... ... @@ -8950,11 +8935,6 @@
8950 8935 "object-visit": "^1.0.0"
8951 8936 }
8952 8937 },
8953   - "material-design-icons-iconfont": {
8954   - "version": "3.0.3",
8955   - "resolved": "https://registry.npmjs.org/material-design-icons-iconfont/-/material-design-icons-iconfont-3.0.3.tgz",
8956   - "integrity": "sha1-FUoQhAR9Ticjf6f1o34Qdc7qbfI="
8957   - },
8958 8938 "math-expression-evaluator": {
8959 8939 "version": "1.2.17",
8960 8940 "resolved": "https://registry.npmjs.org/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz",
... ... @@ -9394,9 +9374,9 @@
9394 9374 "dev": true
9395 9375 },
9396 9376 "nan": {
9397   - "version": "2.12.1",
9398   - "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz",
9399   - "integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==",
  9377 + "version": "2.14.0",
  9378 + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz",
  9379 + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==",
9400 9380 "dev": true,
9401 9381 "optional": true
9402 9382 },
... ... @@ -12781,8 +12761,7 @@
12781 12761 "regenerator-runtime": {
12782 12762 "version": "0.11.1",
12783 12763 "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
12784   - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==",
12785   - "dev": true
  12764 + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
12786 12765 },
12787 12766 "regenerator-transform": {
12788 12767 "version": "0.10.1",
... ... @@ -15407,14 +15386,21 @@
15407 15386 "lodash": "^4.17.4"
15408 15387 }
15409 15388 },
15410   - "vue-fullcalendar": {
15411   - "version": "1.0.9",
15412   - "resolved": "https://registry.npmjs.org/vue-fullcalendar/-/vue-fullcalendar-1.0.9.tgz",
15413   - "integrity": "sha1-qFO7JZRiUid1M7mZTvUDz6ywEjM=",
  15389 + "vue-full-calendar": {
  15390 + "version": "2.7.0",
  15391 + "resolved": "https://registry.npmjs.org/vue-full-calendar/-/vue-full-calendar-2.7.0.tgz",
  15392 + "integrity": "sha512-H6qrox4UwHXdIMuKeb9CjtbZFHYmL8AMU+DFtLbS4/qW3mqktNcKESqkduQfeu8+xw1szdatJsXLrBt3zbqZzA==",
15414 15393 "requires": {
15415   - "es6-promise": "^4.0.5",
15416   - "vue": "^2.1.8",
15417   - "vue-fullcalendar": "^1.0.5"
  15394 + "babel-plugin-transform-runtime": "^6.23.0",
  15395 + "fullcalendar": "^3.4.0",
  15396 + "lodash.defaultsdeep": "^4.6.0"
  15397 + },
  15398 + "dependencies": {
  15399 + "lodash.defaultsdeep": {
  15400 + "version": "4.6.1",
  15401 + "resolved": "https://registry.npmjs.org/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz",
  15402 + "integrity": "sha512-3j8wdDzYuWO3lM3Reg03MuQR957t287Rpcxp1njpEa8oDrikb+FwGdW3n+FELh/A6qib6yPit0j/pv9G/yeAqA=="
  15403 + }
15418 15404 }
15419 15405 },
15420 15406 "vue-hot-reload-api": {
... ...
... ... @@ -15,15 +15,15 @@
15 15 },
16 16 "dependencies": {
17 17 "axios": "^0.18.0",
18   - "dayspan-vuetify": "^0.4.0",
19 18 "font-awesome": "^4.7.0",
  19 + "jquery": "^3.4.1",
20 20 "lodash.truncate": "^4.4.2",
21 21 "moment": "^2.24.0",
22 22 "nprogress": "^0.2.0",
23 23 "quill": "^1.3.6",
24 24 "vee-validate": "^2.0.9",
25 25 "vue": "^2.5.16",
26   - "vue-fullcalendar": "^1.0.9",
  26 + "vue-full-calendar": "^2.7.0",
27 27 "vue-password": "^1.2.0",
28 28 "vue-perfect-scrollbar": "^0.1.0",
29 29 "vue-quill-editor": "^3.0.6",
... ...
1 1 <template>
2 2 <div id="appRoot">
3 3 <template v-if="!$route.meta.public">
4   - <!-- Go to top -->
  4 + <!-- Go to top -->
5 5 <v-app id="inspire" class="app">
6 6 <app-drawer class="app--drawer"></app-drawer>
7 7 <v-content>
8 8 <div class="page-wrapper">
  9 + <!-- Header toolbar with Seacrh -->
  10 + <app-toolbar class="app--toolbar"></app-toolbar>
9 11 <router-view></router-view>
10   - </div>
11   - <!-- App Footer -->
12   - <v-footer height="auto" class="fixcolors pa-3 app--footer">
13   - </v-footer>
  12 + </div>
  13 + <!-- App Footer -->
  14 + <v-footer height="auto" class="fixcolors pa-3 app--footer"></v-footer>
14 15 </v-content>
15 16 </v-app>
16 17 </template>
... ... @@ -21,68 +22,61 @@
21 22 </keep-alive>
22 23 </transition>
23 24 </template>
24   - <v-snackbar
25   - :timeout="3000"
26   - bottom
27   - right
28   - :color="snackbar.color"
29   - v-model="snackbar.show"
30   - >
  25 + <v-snackbar :timeout="3000" bottom right :color="snackbar.color" v-model="snackbar.show">
31 26 {{ snackbar.text }}
32   - <v-btn dark flat @click.native="snackbar.show = false" icon>
  27 + <v-btn dark flat @click.native="snackbar.show = false" icon>
33 28 <v-icon>close</v-icon>
34 29 </v-btn>
35   - </v-snackbar>
  30 + </v-snackbar>
36 31 </div>
37 32 </template>
38 33 <script>
39   -import AppDrawer from '@/components/pageHeader/AppDrawer';
40   -import AppToolbar from '@/components/pageHeader/AppToolbar';
41   -import menu from '@/api/menu';
42   -import AppEvents from './event';
  34 +import AppDrawer from "@/components/pageHeader/AppDrawer";
  35 +import AppToolbar from "@/components/pageHeader/AppToolbar";
  36 +import menu from "@/api/menu";
  37 +import AppEvents from "./event";
43 38  
44 39 export default {
45 40 components: {
46 41 AppDrawer,
47   - AppToolbar,
  42 + AppToolbar
48 43 },
49 44 data: () => ({
50 45 expanded: true,
51 46 rightDrawer: false,
52 47 snackbar: {
53 48 show: false,
54   - text: '',
55   - color: '',
  49 + text: "",
  50 + color: ""
56 51 }
57 52 }),
58 53  
59   - computed: {
  54 + computed: {},
60 55  
61   - },
62   -
63   - created () {
  56 + created() {
64 57 AppEvents.forEach(item => {
65 58 this.$on(item.name, item.callback);
66 59 });
67 60 window.getApp = this;
68   - },
  61 + }
69 62 };
70 63 </script>
71 64  
72 65  
73 66 <style lang="stylus" scoped>
74   - .setting-fab
75   - top:50%!important;
76   - right:0;
77   - border-radius:0
78   -.page-wrapper
79   - min-height:calc(1200px - 64px - 50px - 81px )
  67 +.setting-fab {
  68 + top: 50% !important;
  69 + right: 0;
  70 + border-radius: 0;
  71 +}
80 72  
  73 +.page-wrapper {
  74 + min-height: calc(1200px - 64px - 50px - 81px);
  75 +}
81 76 </style>
82 77 <style>
83   -
84   -body{
85   - font-family: 'Nunito', sans-serif !important;
  78 +body {
  79 + font-family: "Nunito", sans-serif !important;
86 80 -webkit-font-smoothing: antialiased;
87 81 -moz-osx-font-smoothing: grayscale;
88 82 }
... ...
src/Services/http.js
... ... @@ -4,7 +4,7 @@ import store from &#39;@/store/store&#39;
4 4 export default () => {
5 5 return axios.create({
6 6 // baseURL: 'http://192.168.2.221:3002/v1',
7   - baseURL: 'http://13.234.251.173:8001/v1',
  7 + baseURL: 'http://13.234.251.173:8001/sv1',
8 8 headers: {
9 9 Authorization: `Bearer ${store.state.token}`
10 10 }
... ...
1 1 const Menu = [
2 2 // { header: 'Apps' },
3   - // {
4   - // title: 'Dashboard',
5   - // // group: 'apps',
6   - // name: 'Dashboard',
7   - // icon: 'dashboard',
8   - // },
  3 + {
  4 + title: 'Dashboard',
  5 + // group: 'apps',
  6 + name: 'Dashboard',
  7 + icon: 'dashboard',
  8 + },
9 9 {
10 10 title: 'Class',
11 11 // group: 'apps',
... ...
src/components/pageHeader/AppToolbar.vue
1 1 <template>
2   - <v-toolbar
3   - class="fixcolors"
4   - fixed
5   - app
6   - >
  2 + <v-toolbar class="fixcolors" fixed app>
7 3 <v-toolbar-title class="ml-0 pl-3">
8   - <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon>
  4 + <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon>
9 5 </v-toolbar-title>
10   - <v-spacer></v-spacer>
11   - <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition">
12   - <v-btn icon large flat slot="activator">
13   - <v-avatar size="40px">
14   - <img src="/static/icon/user.png"/>
15   - </v-avatar>
  6 +
  7 + <!-- ****** SEARCH ALL EXISTING STUDENTS ****** -->
  8 + <v-flex xs7 sm3 class="userSearch" v-if="$route.name != 'Dashboard'">
  9 + <v-text-field
  10 + flat
  11 + append-icon="search"
  12 + label="Seacrh"
  13 + color="white"
  14 + @input.native="emitSearch"
  15 + type="text"
  16 + dark
  17 + ></v-text-field>
  18 + </v-flex>
  19 + <v-spacer></v-spacer>
  20 + <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition">
  21 + <v-btn icon large flat slot="activator">
  22 + <v-avatar size="40px">
  23 + <img src="/static/icon/user.png" />
  24 + </v-avatar>
16 25 </v-btn>
17   - <v-list class="pa-0">
18   - <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">
19   - <v-list-tile-action v-if="item.icon">
20   - <v-icon>{{ item.icon }}</v-icon>
21   - </v-list-tile-action>
22   - <v-list-tile-content>
23   - <v-list-tile-title>{{ item.title }}</v-list-tile-title>
24   - </v-list-tile-content>
25   - </v-list-tile>
26   - </v-list>
27   - </v-menu>
  26 + <v-list class="pa-0">
  27 + <v-list-tile
  28 + v-for="(item,index) in items"
  29 + :to="!item.href ? { name: item.name } : null"
  30 + :href="item.href"
  31 + @click="item.click"
  32 + ripple="ripple"
  33 + :disabled="item.disabled"
  34 + :target="item.target"
  35 + rel="noopener"
  36 + :key="index"
  37 + >
  38 + <v-list-tile-action v-if="item.icon">
  39 + <v-icon>{{ item.icon }}</v-icon>
  40 + </v-list-tile-action>
  41 + <v-list-tile-content>
  42 + <v-list-tile-title>{{ item.title }}</v-list-tile-title>
  43 + </v-list-tile-content>
  44 + </v-list-tile>
  45 + </v-list>
  46 + </v-menu>
28 47 </v-toolbar>
29 48 </template>
30 49 <script>
31 50 import Util from "@/util";
32 51 export default {
33   - search: "",
  52 + // props: {
  53 + // search: {
  54 + // type: String,
  55 + // required: true
  56 + // }
  57 + // },
34 58 name: "app-toolbar",
35 59 data: () => ({
  60 + userName: "",
36 61 search: "",
37   - userName:'',
38 62 items: [
39 63 {
40 64 // icon: 'account_circle',
... ... @@ -68,24 +92,27 @@ export default {
68 92 }
69 93 },
70 94 methods: {
  95 + emitSearch (ev) {
  96 + this.$root.$emit('app:search', ev.target.value)
  97 + },
71 98 handleDrawerToggle() {
72 99 window.getApp.$emit("APP_DRAWER_TOGGLED");
73 100 },
74 101 handleFullScreen() {
75 102 Util.toggleFullScreen();
76 103 }
77   - },
  104 + }
78 105 };
79 106 </script>
80 107 <style>
81   -.v-icon{
82   - font-size:30px;
83   -}
84   -@media screen and (min-width: 1270px){
85   -.hide{
86   - display: none;
  108 +.v-icon {
  109 + font-size: 30px;
87 110 }
88   -/* }
  111 +@media screen and (min-width: 1270px) {
  112 + .hide {
  113 + display: none;
  114 + }
  115 + /* }
89 116 @media screen and (max-width: 962px) {
90 117 .imglogo{
91 118 position: absolute;
... ... @@ -95,13 +122,13 @@ export default {
95 122 height: 24px;
96 123 } */
97 124 }
98   -@media screen and (max-width: 420px){
99   -.v-list__tile {
100   - font-size:14px;
101   - padding: 0 10px;
102   -}
103   -.name{
104   - font-size:15px;
105   -}
  125 +@media screen and (max-width: 420px) {
  126 + .v-list__tile {
  127 + font-size: 14px;
  128 + padding: 0 10px;
  129 + }
  130 + .name {
  131 + font-size: 15px;
  132 + }
106 133 }
107 134 </style>
... ...
... ... @@ -9,26 +9,17 @@ import &#39;./theme/default.styl&#39;;
9 9 import VeeValidate from 'vee-validate';
10 10 import colors from 'vuetify/es5/util/colors';
11 11 import Truncate from 'lodash.truncate';
12   -import DaySpanVuetify from 'dayspan-vuetify'
  12 +import store from '@/store/store'
  13 +import FullCalendar from 'vue-full-calendar';
13 14  
14 15 Vue.config.productionTip = false;
15   -// import axios from 'axios';
16   -// import VueAxios from 'vue-axios';
17   -import store from '@/store/store'
18   -import 'vuetify/dist/vuetify.css'
19   -import 'material-design-icons-iconfont/dist/material-design-icons.css'
20   -import 'dayspan-vuetify/dist/lib/dayspan-vuetify.min.css'
  16 +Vue.use(FullCalendar);
21 17  
22 18 // Helpers
23 19 // Global filters
24 20 // Vue.use(VueAxios, axios);
25 21 Vue.filter('truncate', Truncate);
26 22 Vue.use(VeeValidate, { fieldsBagName: 'formFields' });
27   -Vue.use(DaySpanVuetify, {
28   - methods: {
29   - getDefaultEventColor: () => '#1976d2'
30   - }
31   -});
32 23 Vue.use(Vuetify, {
33 24 // theme: {
34 25 // primary: colors.indigo.base, // #E53935
... ...
src/pages/Authentication/Login.vue
1 1 <template>
2 2 <v-app id="login">
3   - <v-toolbar class="fixcolors">
  3 + <v-toolbar class="fixcolors">
4 4 <v-toolbar-items>
5   - <img src="/static/icon.png" height="40" width="140" alt="logo">
  5 + <img src="/static/icon.png" height="40" width="140" alt="logo" />
6 6 <!-- <h3 class="white--text my-3 ml-5 logoSchool">School-Management</h3> -->
7 7 </v-toolbar-items>
8 8 </v-toolbar>
... ... @@ -46,23 +46,36 @@
46 46 counter
47 47 ></v-text-field>
48 48 </v-form>
49   - <v-layout row wrap>
50   - <v-flex xs6>
  49 + <v-layout row wrap>
  50 + <v-flex xs6>
51 51 <!-- <v-checkbox :label="`Remember me`" v-model="remember"></v-checkbox> -->
52 52 </v-flex>
53 53 <v-flex xs6>
54   - <h5 class="right mt-4"> <router-link class="link" to="/forgetpassword" style="border-bottom: 2px solid #aaa;">Forgot Password</router-link></h5>
55   - </v-flex>
56   - </v-layout>
  54 + <h5 class="right mt-4">
  55 + <router-link
  56 + class="link"
  57 + to="/forgetpassword"
  58 + style="border-bottom: 2px solid #aaa;"
  59 + >Forgot Password</router-link>
  60 + </h5>
  61 + </v-flex>
  62 + </v-layout>
57 63 </v-flex>
58 64 </v-card-text>
59 65 <v-layout>
60   - <v-flex sm12 class="my-3">
61   - <v-btn style="margin: auto;display: block;b" class="fixcolors" round dark large @click="login" :loading="loading">Login</v-btn>
62   - </v-flex>
63   - </v-layout>
64   - <v-layout>
  66 + <v-flex sm12 class="my-3">
  67 + <v-btn
  68 + style="margin: auto;display: block;b"
  69 + class="fixcolors"
  70 + round
  71 + dark
  72 + large
  73 + @click="login"
  74 + :loading="loading"
  75 + >Login</v-btn>
  76 + </v-flex>
65 77 </v-layout>
  78 + <v-layout></v-layout>
66 79 </v-card>
67 80 </v-flex>
68 81 </v-layout>
... ... @@ -88,14 +101,11 @@ export default {
88 101 remember: false,
89 102 valid: false,
90 103 userLogincredentials: {},
91   - nameRules: [
92   - v => !!v || "Username is required"
93   -
94   - ],
  104 + nameRules: [v => !!v || "Username is required"],
95 105 password: "",
96   - email:"",
  106 + email: "",
97 107 rules: {
98   - required: value => !!value || "password is Required.",
  108 + required: value => !!value || "password is Required."
99 109 // min: v =>
100 110 // (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/.test(
101 111 // v
... ... @@ -107,11 +117,11 @@ export default {
107 117 },
108 118 methods: {
109 119 login() {
110   - this.loading = true;
  120 + this.loading = true;
111 121 var userdata = {
112 122 email: this.userLogincredentials.email,
113 123 password: this.userLogincredentials.password,
114   - role:"ADMIN"
  124 + role: "ADMIN"
115 125 };
116 126 http()
117 127 .post("/schoolLogin", userdata)
... ... @@ -122,12 +132,23 @@ export default {
122 132 this.$router.push("/teachers");
123 133 })
124 134 .catch(error => {
125   - this.text = error.response.data.message
126   - this.snackbar = true;
  135 + if (error) {
  136 + this.text = "Server appears to be offline";
  137 + this.snackbar = true;
  138 + }
  139 + if (error.response.data.message) {
  140 + this.text = error.response.data.message;
  141 + this.snackbar = true;
  142 + }
127 143 this.loading = false;
128 144 });
129 145 }
130 146 },
  147 + mounted() {
  148 + if (this.$store.state.isUserLoggedIn == true) {
  149 + this.$router.push("/teachers");
  150 + }
  151 + },
131 152 computed: {
132 153 color() {
133 154 return this.loading ? "success" : "error";
... ... @@ -155,34 +176,34 @@ img {
155 176 .v-btn--large {
156 177 padding: 0px 84px;
157 178 }
158   -.link{
159   - text-decoration:none;
  179 +.link {
  180 + text-decoration: none;
160 181 }
161 182 a {
162 183 color: #696969;
163 184 }
164   - .forget{
165   - margin-top:20px;
166   -}
  185 +.forget {
  186 + margin-top: 20px;
  187 +}
167 188 .mt-4 {
168   - margin-top: 21px !important;
  189 + margin-top: 21px !important;
169 190 }
170 191 @media screen and (max-width: 600px) {
171   - .forget{
172   - margin-top:none;
173   - margin-left:18px;
174   -}
175   -img{
176   -left: 10px;
177   -height: 34px;
178   -width: 120px;
179   -}
180   -.logoSchool{
181   -font-size: 18px;
182   -margin-top: 20px !important;
183   -}
184   -h5 {
  192 + .forget {
  193 + margin-top: none;
  194 + margin-left: 18px;
  195 + }
  196 + img {
  197 + left: 10px;
  198 + height: 34px;
  199 + width: 120px;
  200 + }
  201 + .logoSchool {
  202 + font-size: 18px;
  203 + margin-top: 20px !important;
  204 + }
  205 + h5 {
185 206 font-size: 14px !important;
186   -}
  207 + }
187 208 }
188 209 </style>
189 210 \ No newline at end of file
... ...
src/pages/Class/addclass.vue
1 1 <template>
2   - <v-app id="pages-dasboard">
3   - <v-toolbar class="fixcolors" fixed app>
4   - <v-toolbar-title class="ml-0 pl-3">
5   - <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon>
6   - </v-toolbar-title>
7   -
8   - <!-- ****** SEARCH ALL EXISTING STUDENTS ****** -->
9   - <v-flex xs7 sm3 class="userSearch">
10   - <v-text-field
11   - flat
12   - append-icon="search"
13   - label="Find your Class"
14   - v-model="search"
15   - color="white"
16   - dark
17   - ></v-text-field>
18   - </v-flex>
19   - <v-spacer></v-spacer>
20   - <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition">
21   - <v-btn icon large flat slot="activator">
22   - <v-avatar size="40px">
23   - <img src="/static/icon/user.png">
24   - </v-avatar>
25   - </v-btn>
26   - <v-list class="pa-0">
27   - <v-list-tile
28   - v-for="(item,index) in items"
29   - :to="!item.href ? { name: item.name } : null"
30   - :href="item.href"
31   - @click="item.click"
32   - ripple="ripple"
33   - :disabled="item.disabled"
34   - :target="item.target"
35   - rel="noopener"
36   - :key="index"
37   - >
38   - <v-list-tile-action v-if="item.icon">
39   - <v-icon>{{ item.icon }}</v-icon>
40   - </v-list-tile-action>
41   - <v-list-tile-content>
42   - <v-list-tile-title>{{ item.title }}</v-list-tile-title>
43   - </v-list-tile-content>
44   - </v-list-tile>
45   - </v-list>
46   - </v-menu>
47   - </v-toolbar>
  2 + <div>
48 3 <v-tabs grow slider-color="black">
49 4 <v-tab
50 5 ripple
... ... @@ -75,7 +30,9 @@
75 30 <v-dialog v-model="dialog" max-width="500px">
76 31 <v-toolbar color="grey lighten-2">
77 32 <v-spacer></v-spacer>
78   - <v-toolbar-title><h3>Edit Class</h3></v-toolbar-title>
  33 + <v-toolbar-title>
  34 + <h3>Edit Class</h3>
  35 + </v-toolbar-title>
79 36 <v-spacer></v-spacer>
80 37 </v-toolbar>
81 38 <v-card>
... ... @@ -85,14 +42,14 @@
85 42 <v-flex xs12 sm9>
86 43 <v-form ref="form" v-model="valid" lazy-validation>
87 44 <v-layout style="position:relative;">
88   - <v-flex xs4 class="pt-4 subheading">
  45 + <v-flex xs4 lg2 class="pt-4 subheading">
89 46 <label>Class:</label>
90 47 </v-flex>
91   - <v-flex xs8>
  48 + <v-flex xs10>
92 49 <v-autocomplete
93 50 v-model="editedItem.classNum"
94   - :placeholder ="editedItem.classNum"
95   - :items = "classList"
  51 + :label="editedItem.classNum"
  52 + :items="classList"
96 53 :rules="nameRules"
97 54 ></v-autocomplete>
98 55 </v-flex>
... ... @@ -114,27 +71,29 @@
114 71 <v-dialog v-model="dialog1" max-width="600px">
115 72 <v-toolbar color="grey lighten-2">
116 73 <v-spacer></v-spacer>
117   - <v-toolbar-title><h3>Class Profile</h3></v-toolbar-title>
  74 + <v-toolbar-title>
  75 + <h3>Class Profile</h3>
  76 + </v-toolbar-title>
118 77 <v-spacer></v-spacer>
119 78 <v-icon @click="close1">close</v-icon>
120 79 </v-toolbar>
121 80 <v-card>
122 81 <v-flex align-center justify-center layout text-xs-center>
123 82 <v-avatar size="50px" style="position:absolute; top:20px;">
124   - <img src="/static/icon/user.png">
  83 + <img src="/static/icon/user.png" />
125 84 </v-avatar>
126 85 </v-flex>
127 86 <v-card-text>
128 87 <v-container grid-list-md>
129 88 <v-layout wrap>
130 89 <v-flex>
131   - <br>
132   - <br>
  90 + <br />
  91 + <br />
133 92 <v-layout>
134   - <v-flex xs5 sm6>
  93 + <v-flex xs6 sm6>
135 94 <h5 class="right my-1">Class Name:</h5>
136 95 </v-flex>
137   - <v-flex sm6 xs8>
  96 + <v-flex sm6 xs6>
138 97 <h5 class="my-1">{{ editedItem.classNum }}</h5>
139 98 </v-flex>
140 99 </v-layout>
... ... @@ -171,23 +130,23 @@
171 130 class="mr-5"
172 131 @click="profile(props.item)"
173 132 src="/static/icon/eye1.png"
174   - >
  133 + />
175 134 <img
176 135 style="cursor:pointer; width:20px; height:18px; "
177 136 class="mr-5"
178 137 @click="editItem(props.item)"
179 138 src="/static/icon/edit1.png"
180   - >
  139 + />
181 140 <img
182 141 style="cursor:pointer; width:20px; height:20px; "
183 142 class="mr-5"
184 143 @click="deleteItem(props.item)"
185 144 src="/static/icon/delete1.png"
186   - >
  145 + />
187 146 </span>
188 147 </td>
189 148 </template>
190   - <v-alert
  149 + <v-alert
191 150 slot="no-results"
192 151 :value="true"
193 152 color="error"
... ... @@ -249,7 +208,7 @@
249 208 <div class="loader" v-if="showLoader">
250 209 <v-progress-circular indeterminate color="white"></v-progress-circular>
251 210 </div>
252   - </v-app>
  211 + </div>
253 212 </template>
254 213  
255 214 <script>
... ... @@ -264,7 +223,7 @@ export default {
264 223 mode: "",
265 224 timeout: 3000,
266 225 text: "",
267   - showLoader:false,
  226 + showLoader: false,
268 227 loading: false,
269 228 date: null,
270 229 search: "",
... ... @@ -290,46 +249,14 @@ export default {
290 249 { text: "Action", value: "", sortable: false, align: "center" }
291 250 ],
292 251 desserts: [],
293   - classList:[
294   - "1",
295   - "2",
296   - "3",
297   - "4",
298   - "5",
299   - "6",
300   - "7",
301   - "8",
302   - "9",
303   - "10",
304   - "11",
305   - "12"
306   - ],
  252 + classList: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
307 253 editedIndex: -1,
308 254 editedItem: {
309 255 classNum: ""
310 256 },
311   - addclasses:{
  257 + addclasses: {
312 258 classNum: ""
313   - },
314   - defaultItem: {
315   - classNum: ""
316   - },
317   - items: [
318   - {
319   - href: "/changepassword",
320   - title: "Change Password",
321   - click: e => {
322   - console.log(e);
323   - }
324   - },
325   - {
326   - href: "#",
327   - title: "Logout",
328   - click: e => {
329   - window.getApp.$emit("APP_LOGOUT");
330   - }
331   - }
332   - ]
  259 + }
333 260 }),
334 261 methods: {
335 262 getClassList() {
... ... @@ -345,7 +272,11 @@ export default {
345 272 .catch(err => {
346 273 console.log("err====>", err);
347 274 this.showLoader = false;
348   - this.$router.replace({ path: "/" });
  275 + if (error.response.status === 401) {
  276 + this.$router.replace({ path: "/" });
  277 + this.$store.dispatch("setToken", null);
  278 + this.$store.dispatch("Id", null);
  279 + }
349 280 });
350 281 },
351 282 editItem(item) {
... ... @@ -429,8 +360,6 @@ export default {
429 360 });
430 361 }
431 362 },
432   - mail() {},
433   - download() {},
434 363 clear() {
435 364 this.$refs.form.reset();
436 365 },
... ... @@ -452,95 +381,24 @@ export default {
452 381 // console.log(error);
453 382 });
454 383 this.close();
455   - },
456   - handleDrawerToggle() {
457   - window.getApp.$emit("APP_DRAWER_TOGGLED");
458   - },
459   - handleFullScreen() {
460   - Util.toggleFullScreen();
461 384 }
462 385 },
463 386 mounted() {
464 387 this.getClassList();
  388 + // console.log("this.search",this.search)
465 389 },
466   - computed: {
467   - toolbarColor() {
468   - return this.$vuetify.options.extra.mainNav;
469   - }
  390 + created() {
  391 + this.$root.$on("app:search", search => {
  392 + this.search = search;
  393 + });
  394 + },
  395 + beforeDestroy() {
  396 + // dont forget to remove the listener
  397 + this.$root.$off("app:search");
470 398 }
471 399 };
472 400 </script>
473 401 <style>
474   -.v-tabs__div {
475   - text-transform: none;
476   -}
477   -.v-input__prepend-outer {
478   - margin-right: 0px !important;
479   -}
480   -.v-card__actions .v-btn {
481   - margin: 0 15px;
482   - min-width: 120px;
483   -}
484   -.primary {
485   - background-color: #aaa !important;
486   - border-color: #aaa !important;
487   -}
488   -h4 {
489   - background-repeat: no-repeat;
490   - padding: 8px;
491   - margin: auto;
492   - font-size: 25px;
493   -}
494   -#name {
495   - position: absolute;
496   - left: 100px;
497   - top: 17px;
498   -}
499   -#icon {
500   - position: absolute;
501   - right: 8px;
502   - top: 8px;
503   -}
504   -#m {
505   - position: relative;
506   - left: 135px;
507   - top: -15px;
508   -}
509   -#G {
510   - position: absolute;
511   - top: 38px;
512   - color: white;
513   -}
514   -#bt {
515   - position: relative;
516   - top: -20px;
517   - left: 115px;
518   -}
519   -#e {
520   - position: relative;
521   - top: 5px;
522   - right: -30px;
523   - height: 17px;
524   - cursor: pointer;
525   -}
526   -#d {
527   - position: relative;
528   - top: 5px;
529   - right: -70px;
530   - height: 17px;
531   - cursor: pointer;
532   -}
533   -#indexId{
534   - padding: 0 0px !important;
535   -}
536   -#td {
537   - border: 1px solid #dddddd;
538   - text-align: left;
539   - padding: 8px;
540   -}
541   -#dialog {
542   - height: 550px;
543   -}
544 402 .active {
545 403 background-color: black;
546 404 color: white !important;
... ... @@ -548,66 +406,4 @@ h4 {
548 406 .activebtn {
549 407 color: black !important;
550 408 }
551   -#flex {
552   - height: 300px;
553   -}
554   -.top {
555   - margin-top: 100px;
556   -}
557   -.v-tabs__item a {
558   - font-size: 16px !important;
559   -}
560   -@media screen and (max-width: 769px) {
561   - .top {
562   - margin-top: 0 !important;
563   - }
564   - .userSearch .v-icon {
565   - font-size: 20px !important;
566   - margin-left: 20px;
567   - }
568   -}
569   -@media screen and (max-width: 380px) {
570   - .pl-3 {
571   - padding-left: 0px !important;
572   - }
573   - .right {
574   - float: none !important;
575   - }
576   - .subheading {
577   - font-size: 14px !important;
578   - }
579   - .v-card__actions .v-btn {
580   - margin: 0 0px;
581   - min-width: 100px;
582   - }
583   - .subheading {
584   - font-size: 12px !important;
585   - }
586   - h5 {
587   - font-size: 13px;
588   - }
589   -}
590   -.v-icon {
591   - font-size: 30px;
592   -}
593   -@media screen and (min-width: 1270px) {
594   - .hide {
595   - display: none;
596   - }
597   -}
598   -@media screen and (max-width: 420px) {
599   - .userSearch .v-text-field .v-label {
600   - line-height: 24px !important;
601   - }
602   - .userSearch .v-label {
603   - font-size: 13px !important;
604   - }
605   - .v-list__tile {
606   - font-size: 14px;
607   - padding: 0 10px;
608   - }
609   - .name {
610   - font-size: 15px;
611   - }
612   -}
613 409 </style>
614 410 \ No newline at end of file
... ...
src/pages/Dashboard/dashboard.vue
1   -<!--<template>
2   - <v-app >
3   - <v-toolbar class="fixcolors" fixed app>
4   - <v-toolbar-title class="ml-0 pl-3">
5   - <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon>
6   - </v-toolbar-title>
7   - <v-spacer></v-spacer>
8   - <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition">
9   - <v-btn icon large flat slot="activator">
10   - <v-avatar size="40px">
11   - <img src="/static/icon/user.png" />
12   - </v-avatar>
13   - </v-btn>
14   - <v-list class="pa-0">
15   - <v-list-tile
16   - v-for="(item,index) in items"
17   - :to="!item.href ? { name: item.name } : null"
18   - :href="item.href"
19   - @click="item.click"
20   - ripple="ripple"
21   - :disabled="item.disabled"
22   - :target="item.target"
23   - rel="noopener"
24   - :key="index"
25   - >
26   - <v-list-tile-action v-if="item.icon">
27   - <v-icon>{{ item.icon }}</v-icon>
  1 +<template>
  2 + <v-app id="pages-dasboard">
  3 + <div>
  4 + <full-calendar
  5 + ref="calendar"
  6 + :event-sources="eventSources"
  7 + @event-selected="eventSelected"
  8 + @event-created="eventCreated"
  9 + :config="config"
  10 + ></full-calendar>
  11 + </div>
  12 + <v-dialog v-model="dialog" max-width="500">
  13 + <v-card color="grey lighten-4" flat>
  14 + <v-toolbar dark color="fixcolors">
  15 + <v-toolbar-side-icon></v-toolbar-side-icon>
  16 + <v-toolbar-title class="white--text">Title</v-toolbar-title>
  17 + <v-spacer></v-spacer>
  18 + <v-btn icon @click="dialog= false">
  19 + <v-icon>close</v-icon>
  20 + </v-btn>
  21 + </v-toolbar>
  22 + <v-flex class="py-4">
  23 + <v-list-tile>
  24 + <v-list-tile-action>
  25 + <v-icon>edit</v-icon>
28 26 </v-list-tile-action>
29 27 <v-list-tile-content>
30   - <v-list-tile-title>{{ item.title }}</v-list-tile-title>
  28 + <v-list-tile-title>{{ selected.title }}</v-list-tile-title>
31 29 </v-list-tile-content>
32 30 </v-list-tile>
33   - </v-list>
34   - </v-menu>
35   - </v-toolbar>
36   - <ds-calendar-app ref="appRoot" :calendar="calendar" :read-only="readOnly" @change="saveState">
37   - <template slot="title">DaySpan</template>
38   -
39   - <template slot="menuRight">
40   - <v-btn icon large href="https://github.com/ClickerMonkey/dayspan-vuetify" target="_blank">
41   - <v-avatar size="32px" tile>
42   - <img src="https://simpleicons.org/icons/github.svg" alt="Github" />
43   - </v-avatar>
44   - </v-btn>
45   - </template>
46   -
47   - <template slot="eventPopover" slot-scope="slotData">
48   - <ds-calendar-event-popover v-bind="slotData" :read-only="readOnly" @finish="saveState"></ds-calendar-event-popover>
49   - </template>
50   -
51   - <template slot="eventCreatePopover" slot-scope="{placeholder, calendar, close}">
52   - <ds-calendar-event-create-popover
53   - @create-edit="$refs.app.editPlaceholder"
54   - @create-popover-closed="saveState"
55   - ></ds-calendar-event-create-popover>
56   - </template>
57   -
58   - <template slot="eventTimeTitle" slot-scope="{calendarEvent, details}">
59   - <div>
60   - <v-icon
61   - class="ds-ev-icon"
62   - v-if="details.icon"
63   - size="14"
64   - :style="{color: details.forecolor}"
65   - >{{ details.icon }}</v-icon>
66   - <strong class="ds-ev-title">{{ details.title }}</strong>
67   - </div>
68   - <div class="ds-ev-description">{{ getCalendarTime( calendarEvent ) }}</div>
69   - </template>
70   -
71   - <template slot="drawerBottom">
72   - <div class="pa-3">
73   - <v-checkbox label="Read Only?" v-model="readOnly"></v-checkbox>
74   - </div>
75   - </template>
76   - </ds-calendar-app>
  31 + <v-list-tile>
  32 + <v-list-tile-action>
  33 + <v-icon>access_time</v-icon>
  34 + </v-list-tile-action>
  35 + <v-list-tile-content>
  36 + <v-list-tile-title>{{ date(selected.start)}}</v-list-tile-title>
  37 + <v-list-tile-sub-title>{{ date(selected.end) }}</v-list-tile-sub-title>
  38 + </v-list-tile-content>
  39 + </v-list-tile>
  40 + </v-flex>
  41 + </v-card>
  42 + </v-dialog>
77 43 <div class="loader" v-if="showLoader">
78 44 <v-progress-circular indeterminate color="white"></v-progress-circular>
79 45 </div>
... ... @@ -83,290 +49,231 @@
83 49 <script>
84 50 import http from "@/Services/http.js";
85 51 import Util from "@/util";
86   -import { Calendar, Weekday, Month } from "dayspan";
87   -import Vue from "vue";
  52 +import moment from "moment";
88 53  
89 54 export default {
90   - data: () => ({
91   - showLoader: false,
92   - storeKey: "dayspanState",
93   - calendar: Calendar.months(),
94   - readOnly: true,
95   - defaultEvents: [
96   - {
97   - data: {
98   - title: "Weekly Meeting",
99   - color: "#3F51B5"
100   - },
101   - schedule: {
102   - dayOfWeek: [Weekday.MONDAY],
103   - times: [9],
104   - duration: 30,
105   - durationUnit: "minutes"
106   - }
107   - },
108   - {
109   - data: {
110   - title: "First Weekend",
111   - color: "#4CAF50"
112   - },
113   - schedule: {
114   - weekspanOfMonth: [0],
115   - dayOfWeek: [Weekday.FRIDAY],
116   - duration: 3,
117   - durationUnit: "days"
118   - }
119   - },
120   - {
121   - data: {
122   - title: "End of Month",
123   - color: "#000000"
  55 + data() {
  56 + return {
  57 + showLoader: false,
  58 + dialog: false,
  59 + events: [
  60 + {
  61 + id: 1,
  62 + title:
  63 + "property to add transparency to a button transparency,property to add transparency to a button transparency",
  64 + start: "2019-09-04 09:30:26.123"
124 65 },
125   - schedule: {
126   - lastDayOfMonth: [1],
127   - duration: 1,
128   - durationUnit: "hours"
129   - }
130   - },
131   - {
132   - data: {
133   - title: "Mother's Day",
134   - color: "#2196F3",
135   - calendar: "US Holidays"
136   - },
137   - schedule: {
138   - month: [Month.MAY],
139   - dayOfWeek: [Weekday.SUNDAY],
140   - weekspanOfMonth: [1]
141   - }
142   - },
143   - {
144   - data: {
145   - title: "New Year's Day",
146   - color: "#2196F3",
147   - calendar: "US Holidays"
148   - },
149   - schedule: {
150   - month: [Month.JANUARY],
151   - dayOfMonth: [1]
152   - }
153   - },
154   - {
155   - data: {
156   - title: "Inauguration Day",
157   - color: "#2196F3",
158   - calendar: "US Holidays"
  66 + {
  67 + id: 2,
  68 + title: "event2",
  69 + start: "2019-09-06 09:30:26.123",
  70 + end: "2019-09-07 09:31:26.123",
159 71 },
160   - schedule: {
161   - month: [Month.JANUARY],
162   - dayOfMonth: [20]
  72 + {
  73 + id: 3,
  74 + title: "event3",
  75 + start: "2019-09-08 09:30:26.123",
  76 + end: "2019-09-09 09:35:26.123",
163 77 }
164   - },
165   - {
166   - data: {
167   - title: "Martin Luther King, Jr. Day",
168   - color: "#2196F3",
169   - calendar: "US Holidays"
170   - },
171   - schedule: {
172   - month: [Month.JANUARY],
173   - dayOfWeek: [Weekday.MONDAY],
174   - weekspanOfMonth: [2]
  78 + ],
  79 + config: {
  80 + eventClick: event => {
  81 + this.selected = event;
  82 + this.dialog = true;
175 83 }
176 84 },
177   - {
178   - data: {
179   - title: "George Washington's Birthday",
180   - color: "#2196F3",
181   - calendar: "US Holidays"
182   - },
183   - schedule: {
184   - month: [Month.FEBRUARY],
185   - dayOfWeek: [Weekday.MONDAY],
186   - weekspanOfMonth: [2]
187   - }
188   - },
189   - {
190   - data: {
191   - title: "Memorial Day",
192   - color: "#2196F3",
193   - calendar: "US Holidays"
194   - },
195   - schedule: {
196   - month: [Month.MAY],
197   - dayOfWeek: [Weekday.MONDAY],
198   - lastWeekspanOfMonth: [0]
199   - }
200   - },
201   - {
202   - data: {
203   - title: "Independence Day",
204   - color: "#2196F3",
205   - calendar: "US Holidays"
206   - },
207   - schedule: {
208   - month: [Month.JULY],
209   - dayOfMonth: [4]
210   - }
211   - },
212   - {
213   - data: {
214   - title: "Labor Day",
215   - color: "#2196F3",
216   - calendar: "US Holidays"
217   - },
218   - schedule:
219   - <template slot="menuRight">
220   - <v-btn icon large href="https://github.com/ClickerMonkey/dayspan-vuetify" target="_blank">
221   - <v-avatar size="32px" tile>
222   - <img src="https://simpleicons.org/icons/github.svg" alt="Github" />
223   - </v-avatar>
224   - </v-btn>
225   - </template> {
226   - month: [Month.SEPTEMBER],
227   - dayOfWeek: [Weekday.MONDAY],
228   - lastWeekspanOfMonth: [0]
229   - }
230   - },
231   - {
232   - data: {
233   - title: "Columbus Day",
234   - color: "#2196F3",
235   - calendar: "US Holidays"
236   - },
237   - schedule: {
238   - month: [Month.OCTOBER],
239   - dayOfWeek: [Weekday.MONDAY],
240   - weekspanOfMonth: [1]
241   - }
242   - },
243   - {
244   - data: {
245   - title: "Veterans Day",
246   - color: "#2196F3",
247   - calendar: "US Holidays"
248   - },
249   - schedule: {
250   - month: [Month.NOVEMBER],
251   - dayOfMonth: [11]
252   - }
253   - },
254   - {
255   - data: {
256   - title: "Thanksgiving Day",
257   - color: "#2196F3",
258   - calendar: "US Holidays"
259   - },
260   - schedule: {
261   - month: [Month.NOVEMBER],
262   - dayOfWeek: [Weekday.THURSDAY],
263   - weekspanOfMonth: [3]
264   - }
265   - },
266   - {
267   - data: {
268   - title: "Christmas Day",
269   - color: "#2196F3",
270   - calendar: "US Holidays"
271   - },
272   - schedule: {
273   - month: [Month.DECEMBER],
274   - dayOfMonth: [25]
275   - }
276   - }
277   - ],
278   - items: [
279   - {
280   - href: "/changepassword",
281   - title: "Change Password",
282   - click: e => {
283   - console.log(e);
284   - }
285   - },
286   - {
287   - href: "#",
288   - title: "Logout",
289   - click: e => {
290   - window.getApp.$emit("APP_LOGOUT");
291   - }
292   - }
293   - ]
294   - }),
  85 + selected: {},
  86 + };
  87 + },
295 88 methods: {
296   - handleDrawerToggle() {
297   - window.getApp.$emit("APP_DRAWER_TOGGLED");
  89 + date: function(date) {
  90 + return moment(date).format("MMMM DD, YYYY HH:mm:ss");
298 91 },
299   - handleFullScreen() {
300   - Util.toggleFullScreen();
  92 + refreshEvents() {
  93 + this.$refs.calendar.$emit("refetch-events");
  94 + },
  95 + removeEvent() {
  96 + this.$refs.calendar.$emit("remove-event", this.selected);
  97 + this.selected = {};
  98 + },
  99 + eventSelected(event) {
  100 + this.selected = event;
  101 + },
  102 + eventCreated(...test) {
  103 + console.log(test);
301 104 },
302   - // getCalendarTime(calendarEvent) {
303   - // let sa = calendarEvent.start.format("a");
304   - // let ea = calendarEvent.end.format("a");
305   - // let sh = calendarEvent.start.format("h");
306   - // let eh = calendarEvent.end.format("h");
307   -
308   - // if (calendarEvent.start.minute !== 0) {
309   - // sh += calendarEvent.start.format(":mm");
310   - // }
311   -
312   - // if (calendarEvent.end.minute !== 0) {
313   - // eh += calendarEvent.end.format(":mm");
314   - // }
315   -
316   - // return sa === ea ? sh + " - " + eh + ea : sh + sa + " - " + eh + ea;
317   - // },
318   -
319   - // saveState() {
320   - // let state = this.calendar.toInput(true);
321   - // let json = JSON.stringify(state);
322   -
323   - // localStorage.setItem(this.storeKey, json);
324   - // },
325   -
326   - loadState() {
327   - let state = {};
328   -
329   - try {
330   - let savedState = JSON.parse(localStorage.getItem(this.storeKey));
331   -
332   - if (savedState) {
333   - state = savedState;
334   - state.preferToday = false;
335   - }
336   - } catch (e) {
337   - // eslint-disable-next-line
338   - console.log(e);
339   - }
340   -
341   - if (!state.events || !state.events.length) {
342   - state.events = this.defaultEvents;
343   - }
344   -
345   - state.events.forEach(ev => {
346   - let defaults = this.$dayspan.getDefaultEventDetails();
347   -
348   - ev.data = Vue.util.extend(defaults, ev.data);
349   - });
350   -
351   - this.$refs.appRoot.setState(state);
352   - }
353 105 },
354 106 computed: {
355   - toolbarColor() {
356   - return this.$vuetify.options.extra.mainNav;
  107 + eventSources() {
  108 + const self = this;
  109 + return [
  110 + {
  111 + events(start, end, timezone, callback) {
  112 + setTimeout(() => {
  113 + callback(self.events.filter(() => Math.random() > 0.5));
  114 + }, 1000);
  115 + }
  116 + }
  117 + ];
357 118 }
358   - },
359   - mounted() {
360   - window.appRoot = this.$refs.appRoot;
361   -
362   - this.loadState();
363 119 }
364 120 };
365 121 </script>
366   -
367 122 <style>
368   -.ds-expand {
369   - padding: 0 !important;
  123 +@import "fullcalendar/dist/fullcalendar.css";
  124 +.fc button {
  125 + background: #39b982 !important;
  126 + border: none;
  127 + border-radius: 4px;
  128 + color: white;
  129 + padding: 6px 32px;
  130 + text-align: center;
  131 + text-decoration: none;
  132 + display: inline-block;
  133 + font-size: 18px;
  134 + margin: 8px 2px !important;
  135 + cursor: pointer;
  136 + -webkit-transition-duration: 0.4s;
  137 + transition-duration: 0.4s;
  138 + box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  139 +}
  140 +.v-tabs__div {
  141 + text-transform: none;
  142 +}
  143 +.v-input__prepend-outer {
  144 + margin-right: 0px !important;
  145 +}
  146 +.v-card__actions .v-btn {
  147 + margin: 0 15px;
  148 + min-width: 120px;
  149 +}
  150 +.primary {
  151 + background-color: #aaa !important;
  152 + border-color: #aaa !important;
  153 +}
  154 +h4 {
  155 + background-repeat: no-repeat;
  156 + padding: 8px;
  157 + margin: auto;
  158 + font-size: 25px;
  159 +}
  160 +#name {
  161 + position: absolute;
  162 + left: 100px;
  163 + top: 17px;
  164 +}
  165 +#icon {
  166 + position: absolute;
  167 + right: 8px;
  168 + top: 8px;
  169 +}
  170 +#m {
  171 + position: relative;
  172 + left: 135px;
  173 + top: -15px;
  174 +}
  175 +#G {
  176 + position: absolute;
  177 + top: 38px;
  178 + color: white;
  179 +}
  180 +#bt {
  181 + position: relative;
  182 + top: -20px;
  183 + left: 115px;
  184 +}
  185 +#e {
  186 + position: relative;
  187 + top: 5px;
  188 + right: -30px;
  189 + height: 17px;
  190 + cursor: pointer;
  191 +}
  192 +#d {
  193 + position: relative;
  194 + top: 5px;
  195 + right: -70px;
  196 + height: 17px;
  197 + cursor: pointer;
  198 +}
  199 +#indexId {
  200 + padding: 0 0px !important;
  201 +}
  202 +#td {
  203 + border: 1px solid #dddddd;
  204 + text-align: left;
  205 + padding: 8px;
  206 +}
  207 +#dialog {
  208 + height: 550px;
  209 +}
  210 +.active {
  211 + background-color: black;
  212 + color: white !important;
  213 +}
  214 +.activebtn {
  215 + color: black !important;
  216 +}
  217 +#flex {
  218 + height: 300px;
  219 +}
  220 +.top {
  221 + margin-top: 100px;
  222 +}
  223 +.v-tabs__item a {
  224 + font-size: 16px !important;
  225 +}
  226 +@media screen and (max-width: 769px) {
  227 + .top {
  228 + margin-top: 0 !important;
  229 + }
  230 + .userSearch .v-icon {
  231 + font-size: 20px !important;
  232 + margin-left: 20px;
  233 + }
  234 +}
  235 +@media screen and (max-width: 380px) {
  236 + .pl-3 {
  237 + padding-left: 0px !important;
  238 + }
  239 + .right {
  240 + float: none !important;
  241 + }
  242 + .subheading {
  243 + font-size: 14px !important;
  244 + }
  245 + .v-card__actions .v-btn {
  246 + margin: 0 0px;
  247 + min-width: 100px;
  248 + }
  249 + .subheading {
  250 + font-size: 12px !important;
  251 + }
  252 + h5 {
  253 + font-size: 13px;
  254 + }
  255 +}
  256 +.v-icon {
  257 + font-size: 30px;
  258 +}
  259 +@media screen and (min-width: 1270px) {
  260 + .hide {
  261 + display: none;
  262 + }
  263 +}
  264 +@media screen and (max-width: 420px) {
  265 + .userSearch .v-text-field .v-label {
  266 + line-height: 24px !important;
  267 + }
  268 + .userSearch .v-label {
  269 + font-size: 13px !important;
  270 + }
  271 + .v-list__tile {
  272 + font-size: 14px;
  273 + padding: 0 10px;
  274 + }
  275 + .name {
  276 + font-size: 15px;
  277 + }
370 278 }
371   -</style>
372   --->
  279 +</style>
373 280 \ No newline at end of file
... ...
src/pages/Gallery/gallery.vue
1 1 <template>
2 2 <v-app id="pages-dasboard">
3   - <v-toolbar class="fixcolors" fixed app>
4   - <v-toolbar-title class="ml-0 pl-3">
5   - <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon>
6   - </v-toolbar-title>
7   - <!-- ****** SEARCH ALL EXISTING GALLERY ****** -->
8   - <v-flex xs7 sm3 class="userSearch">
9   - <v-text-field
10   - flat
11   - append-icon="search"
12   - label="Find your gallery"
13   - v-model="search"
14   - color="white"
15   - class="pa-3"
16   - dark
17   - ></v-text-field>
18   - </v-flex>
19   - <v-spacer></v-spacer>
20   - <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition">
21   - <v-btn icon large flat slot="activator">
22   - <v-avatar size="40px">
23   - <img src="/static/icon/user.png" />
24   - </v-avatar>
25   - </v-btn>
26   - <v-list class="pa-0">
27   - <v-list-tile
28   - v-for="(item,index) in items"
29   - :to="!item.href ? { name: item.name } : null"
30   - :href="item.href"
31   - @click="item.click"
32   - ripple="ripple"
33   - :disabled="item.disabled"
34   - :target="item.target"
35   - rel="noopener"
36   - :key="index"
37   - >
38   - <v-list-tile-action v-if="item.icon">
39   - <v-icon>{{ item.icon }}</v-icon>
40   - </v-list-tile-action>
41   - <v-list-tile-content>
42   - <v-list-tile-title>{{ item.title }}</v-list-tile-title>
43   - </v-list-tile-content>
44   - </v-list-tile>
45   - </v-list>
46   - </v-menu>
47   - </v-toolbar>
48 3 <v-tabs grow slider-color="black">
49 4 <v-tab
50 5 ripple
... ... @@ -82,7 +37,7 @@
82 37 </v-toolbar-title>
83 38 <v-spacer></v-spacer>
84 39 </v-toolbar>
85   - <v-card-text style="height:600px;">
  40 + <v-card-text style="height:700px;">
86 41 <v-form ref="form">
87 42 <v-container fluid>
88 43 <v-layout row>
... ... @@ -93,10 +48,10 @@
93 48 <input
94 49 type="file"
95 50 style="display: none"
96   - ref="image"
  51 + ref="editImage"
97 52 accept="image/*"
98 53 multiple
99   - @change="onFilePicked"
  54 + @change="editFilePicked"
100 55 />
101 56 <v-layout justify-center>
102 57 <v-flex
... ... @@ -106,20 +61,26 @@
106 61 v-if="editedItem.imageUrl"
107 62 class="profile-image-wrapper"
108 63 >
109   - <img :src="Image" height="160" width="160" alt="Gallery" class="pa-2" />
  64 + <img
  65 + :src="Image.imageLink"
  66 + height="160"
  67 + width="160"
  68 + alt="Gallery"
  69 + class="pa-2"
  70 + />
110 71 <v-icon
111 72 class="red edit-profile-icon"
112 73 dark
113 74 @click="deleteImage(Image._id,editedItem._id)"
114 75 >close</v-icon>
115 76 </v-flex>
116   - <v-flex v-for="(file, index) in files" :key="index">
  77 + <v-flex v-for="(file, index) in editFiles" :key="index">
117 78 <img :src="file" height="160" width="160" class="pa-2" />
118 79 </v-flex>
119 80 </v-layout>
120 81 <img
121 82 src="/static/icon/user.png"
122   - v-if="editedItem.imageUrl ==''"
  83 + v-if="editedItem.imageUrl == '' && editFiles == ''"
123 84 height="160"
124 85 width="160"
125 86 alt="Gallery"
... ... @@ -184,8 +145,8 @@
184 145 <v-flex xs5 class="ml-3">
185 146 <v-text-field
186 147 label="Select Image"
187   - @click="pickFile"
188   - v-model="imageName"
  148 + @click="editPickFile"
  149 + v-model="editImageName"
189 150 append-icon="attach_file"
190 151 multiple
191 152 ></v-text-field>
... ... @@ -193,6 +154,48 @@
193 154 </v-layout>
194 155 </v-flex>
195 156 </v-layout>
  157 + <v-flex xs12>
  158 + <div v-for="(editImage,index) in editedItem.youTubeLinkUrl" :key="index">
  159 + <v-layout>
  160 + <v-flex xs4 class="pt-4 subheading">
  161 + <label class="right">You Tube Link Url:</label>
  162 + </v-flex>
  163 + <v-flex xs5 class="ml-3">
  164 + <v-text-field
  165 + v-model="editImage.youTubeLink"
  166 + type="text"
  167 + name="link"
  168 + required
  169 + ></v-text-field>
  170 + </v-flex>
  171 + <v-flex xs2 class="pt-4">
  172 + <v-icon @click="deleteUrl(index,editImage._id,editedItem._id)">cancel</v-icon>
  173 + </v-flex>
  174 + </v-layout>
  175 + </div>
  176 + </v-flex>
  177 + <v-flex xs12>
  178 + <div v-for="(updateImage,index) in updates" :key="index">
  179 + <v-layout>
  180 + <v-flex xs4 class="pt-4 subheading">
  181 + <label class="right">You Tube Link Url:</label>
  182 + </v-flex>
  183 + <v-flex xs5 class="ml-3">
  184 + <v-text-field
  185 + v-model="updateImage.youTubeLink"
  186 + label="Upload new you tube link url"
  187 + type="text"
  188 + name="link"
  189 + required
  190 + ></v-text-field>
  191 + </v-flex>
  192 + <v-flex xs2 class="pt-4">
  193 + <v-icon @click="deleteUpdate(index)" v-if="index !=0">cancel</v-icon>
  194 + <v-icon @click="update">add_circle</v-icon>
  195 + </v-flex>
  196 + </v-layout>
  197 + </div>
  198 + </v-flex>
196 199 <v-layout>
197 200 <v-flex xs12 sm8 offset-sm2>
198 201 <v-card-actions>
... ... @@ -230,7 +233,7 @@
230 233 class="mt-4 pa-2"
231 234 v-if="editedItem.imageUrl"
232 235 >
233   - <img :src="image" alt="Gallery" width="240" height="180" />
  236 + <img :src="image.imageLink" alt="Gallery" width="240" height="180" />
234 237 </span>
235 238 </v-flex>
236 239 <v-card-text>
... ... @@ -257,6 +260,20 @@
257 260 <h5 class="my-1">{{ editedItem.description }}</h5>
258 261 </v-flex>
259 262 </v-layout>
  263 + <v-layout>
  264 + <v-flex xs5 sm6>
  265 + <h5 class="right my-1">
  266 + <b>You Tube Link Url:</b>
  267 + </h5>
  268 + </v-flex>
  269 + <v-flex sm6 xs8>
  270 + <h5 class="my-1">
  271 + <span
  272 + v-for="youTubeLinkUrl in editedItem.youTubeLinkUrl "
  273 + >{{ youTubeLinkUrl }}</span>
  274 + </h5>
  275 + </v-flex>
  276 + </v-layout>
260 277 </v-flex>
261 278 </v-layout>
262 279 </v-container>
... ... @@ -284,13 +301,13 @@
284 301 <td class="text-xs-center">{{ props.index}}</td>
285 302 <td id="td" class="text-xs-center">
286 303 <span v-for="(image,_id) in props.item.imageUrl" class="pa-2">
287   - <img :src="image" alt="newsImage" width="100" height="70" />
  304 + <img :src="image.imageLink" alt="newsImage" width="100" height="70" />
288 305 </span>
289 306 </td>
290 307 <td id="td" class="text-xs-center">{{ props.item.title}}</td>
291 308 <td id="td" class="text-xs-center">{{ props.item.description}}</td>
292 309  
293   - <td class="text-xs-center">
  310 + <td id="td" class="text-xs-center">
294 311 <span>
295 312 <img
296 313 style="cursor:pointer; width:25px; height:18px; "
... ... @@ -447,10 +464,9 @@
447 464 name="link"
448 465 required
449 466 ></v-text-field>
450   - <!-- </div> -->
451 467 </v-flex>
452 468 <v-flex xs2 class="pt-4">
453   - <v-icon @click="deleteFind(index)">cancel</v-icon>
  469 + <v-icon @click="deleteFind(index)" v-if="index !=0 ">cancel</v-icon>
454 470 <v-icon @click="addFind">add_circle</v-icon>
455 471 </v-flex>
456 472 </v-layout>
... ... @@ -501,7 +517,8 @@ export default {
501 517 addclass: [],
502 518 addSection: [],
503 519 finds: [{ value: "" }],
504   - youTubeLinkUrl: "",
  520 + updates: [{ youTubeLink: "" }],
  521 + youTubeLink: {},
505 522 addGallery: {
506 523 youTubeLinkUrl: []
507 524 },
... ... @@ -513,6 +530,8 @@ export default {
513 530 imageFile: "",
514 531 image: [],
515 532 upload: "",
  533 + editImageName: "",
  534 + editFiles: [],
516 535 files: [],
517 536 addclass: [],
518 537 token: "",
... ... @@ -537,51 +556,16 @@ export default {
537 556 ],
538 557 desserts: [],
539 558 editedIndex: -1,
540   - editedItem: {},
541   - userName: "",
542   - items: [
543   - {
544   - href: "/changepassword",
545   - title: "Change Password",
546   - click: e => {
547   - console.log(e);
548   - }
549   - },
550   - {
551   - href: "#",
552   - title: "Logout",
553   - click: e => {
554   - window.getApp.$emit("APP_LOGOUT");
555   - }
556   - }
557   - ]
  559 + editedItem: {}
558 560 }),
559 561 methods: {
560   - getSections(_id) {
561   - console.log("_id", _id);
562   - var token = this.$store.state.token;
563   - http()
564   - .get(
565   - "/getSectionsList",
566   - { params: { classId: _id } },
567   - {
568   - headers: { Authorization: "Bearer " + token }
569   - }
570   - )
571   - .then(response => {
572   - this.addSection = response.data.data;
573   - // console.log("getSectionsList=====>", this.addSection);
574   - })
575   - .catch(err => {
576   - console.log("err====>", err);
577   - // this.$router.replace({ path: '/' });
578   - });
579   - },
580 562 pickFile() {
581 563 this.$refs.image.click();
582 564 },
  565 + editPickFile() {
  566 + this.$refs.editImage.click();
  567 + },
583 568 onFilePicked(e) {
584   - // console.log(e)
585 569 const files = e.target.files;
586 570 /** fetch Image Name **/
587 571 if (files[0] !== undefined) {
... ... @@ -601,6 +585,7 @@ export default {
601 585 e.target.result
602 586 );
603 587 };
  588 + console.log("uploadImage=======>", this.files);
604 589 });
605 590 fr.readAsDataURL(file);
606 591 return getResult.then(file => {
... ... @@ -611,7 +596,6 @@ export default {
611 596 fr.readAsDataURL(files[0]);
612 597 fr.addEventListener("load", () => {
613 598 this.imageFile = files; // this is an image file that can be sent to server...
614   - // console.log("uploadImage=======>", this.imageFile );
615 599 });
616 600 } else {
617 601 this.imageName = "";
... ... @@ -619,6 +603,41 @@ export default {
619 603 this.imageUrl = "";
620 604 }
621 605 },
  606 + editFilePicked(e) {
  607 + const files = e.target.files;
  608 + /** fetch Image Name **/
  609 + if (files[0] !== undefined) {
  610 + this.editImageName = files[0].name;
  611 + if (this.editImageName.lastIndexOf(".") <= 0) {
  612 + return;
  613 + }
  614 + /** Select many image and showing many image add to Gallery card **/
  615 + const test = Array.from(files).forEach((file, idx) => {
  616 + const fr = new FileReader();
  617 + const getResult = new Promise(resolve => {
  618 + fr.onload = e => {
  619 + this.editFiles.push(
  620 + // id: idx,
  621 + e.target.result
  622 + );
  623 + };
  624 + console.log("uploadImage=======>", this.files);
  625 + });
  626 + fr.readAsDataURL(file);
  627 + return getResult.then(file => {
  628 + return file;
  629 + });
  630 + });
  631 + const fr = new FileReader();
  632 + fr.readAsDataURL(files[0]);
  633 + // fr.addEventListener("load", () => {
  634 + // this.imageFile = files; // this is an image file that can be sent to server...
  635 + // });
  636 + } else {
  637 + this.editImageName = "";
  638 + this.editFiles = "";
  639 + }
  640 + },
622 641 getGalleryList() {
623 642 this.showLoader = true;
624 643 http()
... ... @@ -632,13 +651,30 @@ export default {
632 651 .catch(err => {
633 652 // console.log("err====>", err);
634 653 this.showLoader = false;
635   - // this.$router.replace({ path: "/" });
  654 + if (error.response.status === 401) {
  655 + this.$router.replace({ path: "/" });
  656 + this.$store.dispatch("setToken", null);
  657 + this.$store.dispatch("Id", null);
  658 + }
636 659 });
637 660 },
638 661 editItem(item) {
639 662 this.files = [];
640 663 this.editedIndex = this.desserts.indexOf(item);
641 664 this.editedItem = Object.assign({}, item);
  665 + console.log("this.editedItem", this.editedItem);
  666 + // for (let i = 0; i < this.editedItem.youTubeLinkUrl.length; i++) {
  667 + // console.log(
  668 + // "this.editedItem.youTubeLinkUrl[i]",
  669 + // this.editedItem.youTubeLinkUrl[i]
  670 + // );
  671 + // this.updates = this.editedItem.youTubeLinkUrl[i];
  672 + // console.log("this.updates.linkUrl", this.updates);
  673 + // }
  674 + // this.updates[i].push(this.editedItem.youTubeLinkUrl);
  675 + // console.log("updates", this.updates[i]);
  676 + // console.log("updates", this.updates[i].youTubeLinkUrl);
  677 + // }
642 678 this.dialog = true;
643 679 },
644 680 profile(item) {
... ... @@ -648,39 +684,40 @@ export default {
648 684 },
649 685 deleteItem(item) {
650 686 let deleteGallery = {
651   - gelleryId: item._id
  687 + galleryId: item._id
652 688 };
653 689 http()
654 690 .delete(
655   - "/deleteGellery",
  691 + "/deleteGallery",
656 692 confirm("Are you sure you want to delete this?") && {
657   - params: deleteGallery
  693 + params: deleteGallery,
  694 + headers: {
  695 + Authorization: "Bearer " + this.token
  696 + }
658 697 }
659 698 )
660 699 .then(response => {
661 700 if ((this.snackbar = true)) {
662 701 this.text = "Successfully delete Existing News";
663 702 }
664   - this.getNewsList();
  703 + this.getGalleryList();
665 704 })
666 705 .catch(error => {
667 706 // console.log(error);
668 707 });
669 708 },
670   - deleteImage(imageId, newsId) {
671   - console.log(imageId, newsId);
  709 + deleteImage(imageId, id) {
  710 + console.log("imageId", imageId, "id", id);
672 711 let deleteImages = {
673   - newsId: newsId,
  712 + galleryId: id,
674 713 imageId: imageId
675 714 };
676 715 http()
677   - .put("/deleteImages", deleteImages)
  716 + .put("/deleteImage", deleteImages)
678 717 .then(response => {
679   - console.log("deleteNews", deleteImages);
680   - if ((this.snackbar = true)) {
681   - this.text = "Image deleted Successfully";
682   - }
683   - this.getNewsList();
  718 + this.snackbar = true;
  719 + this.text = response.data.message;
  720 + this.getGalleryList();
684 721 this.close();
685 722 })
686 723 .catch(error => {
... ... @@ -712,7 +749,9 @@ export default {
712 749 },
713 750 submit() {
714 751 this.loading = true;
715   - this.addGallery.youTubeLinkUrl.push(this.youTubeLinkUrl);
  752 + for (let i = 0; i < this.finds.length; i++) {
  753 + this.addGallery.youTubeLinkUrl.push(this.finds[i].value);
  754 + }
716 755 if (this.$refs.form.validate()) {
717 756 if (this.files) {
718 757 var ary = [];
... ... @@ -727,10 +766,10 @@ export default {
727 766 http()
728 767 .post("/createGallery", this.addGallery)
729 768 .then(response => {
  769 + this.getGalleryList();
730 770 this.loading = false;
731 771 this.snackbar = true;
732 772 this.text = response.data.message;
733   - this.getGelleryList();
734 773 this.clear();
735 774 })
736 775 .catch(error => {
... ... @@ -745,6 +784,9 @@ export default {
745 784 },
746 785 save() {
747 786 this.editedItem.gelleryId = this.editedItem._id;
  787 + for (let i = 0; i < this.updates.length; i++) {
  788 + this.editedItem.youTubeLinkUrl.push(this.updates[i].value);
  789 + }
748 790 if (this.files) {
749 791 var ary = [];
750 792 var imageData = [];
... ... @@ -755,17 +797,18 @@ export default {
755 797 this.editedItem.upload = imageData;
756 798 }
757 799 }
758   - http()
759   - .put("/updateGellery", this.editedItem)
760   - .then(response => {
761   - this.snackbar = true;
762   - this.text = response.data.message;
763   - this.getGelleryList();
764   - this.close();
765   - })
766   - .catch(error => {
767   - console.log(error);
768   - });
  800 + console.log("this.editedItem", this.editedItem);
  801 + // http()
  802 + // .put("/updateGellery", this.editedItem)
  803 + // .then(response => {
  804 + // this.getGalleryList();
  805 + // this.close();
  806 + // this.snackbar = true;
  807 + // this.text = response.data.message;
  808 + // })
  809 + // .catch(error => {
  810 + // console.log(error);
  811 + // });
769 812 },
770 813 getAllClasses() {
771 814 http()
... ... @@ -777,21 +820,41 @@ export default {
777 820 })
778 821 .catch(err => {
779 822 // console.log("err====>", err);
780   - // this.$router.replace({ path: "/" });
781 823 });
782 824 },
783   - handleDrawerToggle() {
784   - window.getApp.$emit("APP_DRAWER_TOGGLED");
785   - },
786   - handleFullScreen() {
787   - Util.toggleFullScreen();
788   - },
789 825 addFind: function() {
790 826 this.finds.push({ value: "" });
791 827 },
  828 + update: function() {
  829 + this.updates.push({ youTubeLink: "" });
  830 + },
792 831 deleteFind: function(index) {
793 832 this.finds.splice(index, 1);
794 833 if (index === 0) this.addFind();
  834 + },
  835 + deleteUpdate: function(index) {
  836 + this.updates.splice(index, 1);
  837 + if (index === 0) this.update();
  838 + },
  839 + deleteUrl: function(index,youTubelinkId,id) {
  840 + this.editedItem.youTubeLinkUrl.splice(index, 1);
  841 + if (index === 0) this.update();
  842 + console.log("imageId", youTubelinkId, "id", id);
  843 + let deleteYouTubeUrl = {
  844 + galleryId: id,
  845 + youTubeId: youTubelinkId
  846 + };
  847 + http()
  848 + .put("/deleteYoutubeLink", deleteYouTubeUrl)
  849 + .then(response => {
  850 + this.snackbar = true;
  851 + this.text = response.data.message;
  852 + this.getGalleryList();
  853 + this.close();
  854 + })
  855 + .catch(error => {
  856 + console.log(error);
  857 + });
795 858 }
796 859 },
797 860 mounted() {
... ... @@ -799,83 +862,23 @@ export default {
799 862 this.getAllClasses();
800 863 this.getGalleryList();
801 864 },
802   - computed: {
803   - toolbarColor() {
804   - return this.$vuetify.options.extra.mainNav;
805   - }
  865 + created() {
  866 + this.$root.$on("app:search", search => {
  867 + this.search = search;
  868 + });
  869 + },
  870 + beforeDestroy() {
  871 + // dont forget to remove the listener
  872 + this.$root.$off("app:search");
806 873 }
807 874 };
808 875 </script>
809 876 <style scoped>
810   -.pl-3 {
811   - padding-left: 0px !important;
812   -}
813   -.v-tabs__div {
814   - text-transform: none;
815   -}
816   -.v-input__prepend-outer {
817   - margin-right: 0px !important;
818   -}
819   -.v-card__actions .v-btn {
820   - margin: 0 15px;
821   - min-width: 120px;
822   -}
823   -.primary {
824   - background-color: #aaa !important;
825   - border-color: #aaa !important;
826   -}
827   -h4 {
828   - background-repeat: no-repeat;
829   - padding: 8px;
830   - margin: auto;
831   - font-size: 25px;
832   -}
833   -#name {
834   - position: absolute;
835   - left: 100px;
836   - top: 17px;
837   -}
838   -#icon {
839   - position: absolute;
840   - right: 8px;
841   - top: 8px;
842   -}
843   -#m {
844   - position: relative;
845   - left: 135px;
846   - top: -15px;
847   -}
848   -#G {
849   - position: absolute;
850   - top: 38px;
851   - color: white;
852   -}
853   -#bt {
854   - position: relative;
855   - top: -20px;
856   - left: 115px;
857   -}
858   -#e {
859   - position: relative;
860   - top: 5px;
861   - right: -30px;
862   - height: 17px;
863   - cursor: pointer;
864   -}
865   -#d {
866   - position: relative;
867   - top: 5px;
868   - right: -70px;
869   - height: 17px;
870   - cursor: pointer;
871   -}
872 877 #td {
873 878 border: 1px solid #dddddd;
874 879 text-align: left;
875   - padding: 8px;
876   -}
877   -#dialog {
878   - height: 550px;
  880 + padding: 2px 0px;
  881 + max-width: 200px;
879 882 }
880 883 .active {
881 884 background-color: black;
... ... @@ -884,96 +887,4 @@ h4 {
884 887 .activebtn {
885 888 color: black !important;
886 889 }
887   -#flex {
888   - height: 300px;
889   -}
890   -.top {
891   - margin-top: 100px;
892   -}
893   -.v-tabs__item a {
894   - font-size: 16px !important;
895   -}
896   -.list {
897   - padding: 0 0px !important;
898   -}
899   -.profile-image-wrapper {
900   - position: relative;
901   -}
902   -.edit-profile-icon {
903   - position: absolute;
904   - right: 15px;
905   - top: 15px;
906   - cursor: pointer;
907   -}
908   -.profile-image-wrapper > .edit-profile-icon {
909   - right: 10%;
910   - top: 0%;
911   - margin-top: 8px;
912   - border-radius: 50%;
913   - padding: 7px;
914   - font-size: 20px;
915   -}
916   -@media screen and (max-width: 769px) {
917   - .top {
918   - margin-top: 0 !important;
919   - }
920   - .userSearch .v-icon {
921   - font-size: 20px !important;
922   - margin-left: 20px;
923   - }
924   -}
925   -@media screen and (max-width: 380px) {
926   - .right {
927   - float: none !important;
928   - }
929   - .subheading {
930   - font-size: 14px !important;
931   - }
932   - .v-card__actions .v-btn {
933   - margin: 0 0px;
934   - min-width: 100px;
935   - }
936   - /* .searchIcon .v-icon {
937   - font-size: 20px;
938   - margin-left: 20px;
939   -} */
940   - .subheading {
941   - font-size: 12px !important;
942   - }
943   - h5 {
944   - font-size: 13px;
945   - }
946   -}
947   -.v-icon {
948   - font-size: 30px;
949   -}
950   -@media screen and (min-width: 1270px) {
951   - .hide {
952   - display: none;
953   - }
954   - /* }
955   -@media screen and (max-width: 962px) {
956   -.imglogo{
957   - position: absolute;
958   - top: 13px;
959   - left: 13px !important;
960   - width: 70px;
961   - height: 24px;
962   -} */
963   -}
964   -@media screen and (max-width: 420px) {
965   - .userSearch .v-text-field .v-label {
966   - line-height: 24px !important;
967   - }
968   - .userSearch .v-label {
969   - font-size: 13px !important;
970   - }
971   - .v-list__tile {
972   - font-size: 14px;
973   - padding: 0 10px;
974   - }
975   - .name {
976   - font-size: 15px;
977   - }
978   -}
979 890 </style>
980 891 \ No newline at end of file
... ...
src/pages/News/news.vue
1 1 <template>
2 2 <v-app id="pages-dasboard">
3   - <v-toolbar class="fixcolors" fixed app>
4   - <v-toolbar-title class="ml-0 pl-3">
5   - <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon>
6   - </v-toolbar-title>
7   - <!-- ****** SEARCH ALL EXISTING NEWS ****** -->
8   - <v-flex xs7 sm3 class="userSearch">
9   - <v-text-field
10   - flat
11   - append-icon="search"
12   - label="Find your News"
13   - v-model="search"
14   - color="white"
15   - class="pa-3"
16   - dark
17   - ></v-text-field>
18   - </v-flex>
19   - <v-spacer></v-spacer>
20   - <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition">
21   - <v-btn icon large flat slot="activator">
22   - <v-avatar size="40px">
23   - <img src="/static/icon/user.png" />
24   - </v-avatar>
25   - </v-btn>
26   - <v-list class="pa-0">
27   - <v-list-tile
28   - v-for="(item,index) in items"
29   - :to="!item.href ? { name: item.name } : null"
30   - :href="item.href"
31   - @click="item.click"
32   - ripple="ripple"
33   - :disabled="item.disabled"
34   - :target="item.target"
35   - rel="noopener"
36   - :key="index"
37   - >
38   - <v-list-tile-action v-if="item.icon">
39   - <v-icon>{{ item.icon }}</v-icon>
40   - </v-list-tile-action>
41   - <v-list-tile-content>
42   - <v-list-tile-title>{{ item.title }}</v-list-tile-title>
43   - </v-list-tile-content>
44   - </v-list-tile>
45   - </v-list>
46   - </v-menu>
47   - </v-toolbar>
48 3 <v-tabs grow slider-color="black">
49 4 <v-tab
50 5 ripple
... ... @@ -487,23 +442,6 @@ export default {
487 442 title: "",
488 443 description: ""
489 444 },
490   - userName: "",
491   - items: [
492   - {
493   - href: "/changepassword",
494   - title: "Change Password",
495   - click: e => {
496   - console.log(e);
497   - }
498   - },
499   - {
500   - href: "#",
501   - title: "Logout",
502   - click: e => {
503   - window.getApp.$emit("APP_LOGOUT");
504   - }
505   - }
506   - ]
507 445 }),
508 446 methods: {
509 447 getSections(_id) {
... ... @@ -583,7 +521,11 @@ export default {
583 521 .catch(err => {
584 522 // console.log("err====>", err);
585 523 this.showLoader = false;
586   - this.$router.replace({ path: "/" });
  524 + if (error.response.status === 401) {
  525 + this.$router.replace({ path: "/" });
  526 + this.$store.dispatch("setToken", null);
  527 + this.$store.dispatch("Id", null);
  528 + }
587 529 });
588 530 },
589 531 editItem(item) {
... ... @@ -697,8 +639,6 @@ export default {
697 639 });
698 640 }
699 641 },
700   - mail() {},
701   - download() {},
702 642 clear() {
703 643 this.$refs.form.reset();
704 644 },
... ... @@ -706,18 +646,18 @@ export default {
706 646 let editNews = {
707 647 title: this.editedItem.title,
708 648 description: this.editedItem.description,
709   - newsId: this.editedItem._id,
  649 + newsId: this.editedItem._id
710 650 };
711 651 if (this.files) {
712   - var ary = [];
713   - var imageData = [];
714   - ary = this.files;
715   - for (let i = 0; i < ary.length; i++) {
716   - const [baseUrl, imageUrl] = ary[i].split(/,/);
717   - imageData.push(imageUrl);
718   - editNews.upload = imageData;
719   - }
  652 + var ary = [];
  653 + var imageData = [];
  654 + ary = this.files;
  655 + for (let i = 0; i < ary.length; i++) {
  656 + const [baseUrl, imageUrl] = ary[i].split(/,/);
  657 + imageData.push(imageUrl);
  658 + editNews.upload = imageData;
720 659 }
  660 + }
721 661 http()
722 662 .put("/updateNews", editNews)
723 663 .then(response => {
... ... @@ -732,107 +672,23 @@ export default {
732 672 // console.log(error);
733 673 });
734 674 },
735   - handleDrawerToggle() {
736   - window.getApp.$emit("APP_DRAWER_TOGGLED");
737   - },
738   - handleFullScreen() {
739   - Util.toggleFullScreen();
740   - }
741 675 },
742 676 mounted() {
743 677 this.getNewsList();
744   - // var token = this.$store.state.token;
745   - // http()
746   - // .get("/getClassesList", {
747   - // headers: { Authorization: "Bearer " + token }
748   - // })
749   - // .then(response => {
750   - // this.addclass = response.data.data;
751   - // // console.log("getClassesList=====>",this.addclass)
752   - // })
753   - // .catch(err => {
754   - // // console.log("err====>", err);
755   - // });
756 678 this.editItem;
757 679 },
758   - computed: {
759   - toolbarColor() {
760   - return this.$vuetify.options.extra.mainNav;
761   - }
  680 + created() {
  681 + this.$root.$on("app:search", search => {
  682 + this.search = search;
  683 + });
  684 + },
  685 + beforeDestroy() {
  686 + // dont forget to remove the listener
  687 + this.$root.$off("app:search");
762 688 }
763 689 };
764 690 </script>
765 691 <style scoped>
766   -.pl-3 {
767   - padding-left: 0px !important;
768   -}
769   -.v-tabs__div {
770   - text-transform: none;
771   -}
772   -.v-input__prepend-outer {
773   - margin-right: 0px !important;
774   -}
775   -.v-card__actions .v-btn {
776   - margin: 0 15px;
777   - min-width: 120px;
778   -}
779   -.primary {
780   - background-color: #aaa !important;
781   - border-color: #aaa !important;
782   -}
783   -h4 {
784   - background-repeat: no-repeat;
785   - padding: 8px;
786   - margin: auto;
787   - font-size: 25px;
788   -}
789   -#name {
790   - position: absolute;
791   - left: 100px;
792   - top: 17px;
793   -}
794   -#icon {
795   - position: absolute;
796   - right: 8px;
797   - top: 8px;
798   -}
799   -#m {
800   - position: relative;
801   - left: 135px;
802   - top: -15px;
803   -}
804   -#G {
805   - position: absolute;
806   - top: 38px;
807   - color: white;
808   -}
809   -#bt {
810   - position: relative;
811   - top: -20px;
812   - left: 115px;
813   -}
814   -#e {
815   - position: relative;
816   - top: 5px;
817   - right: -30px;
818   - height: 17px;
819   - cursor: pointer;
820   -}
821   -#d {
822   - position: relative;
823   - top: 5px;
824   - right: -70px;
825   - height: 17px;
826   - cursor: pointer;
827   -}
828   -#td {
829   - border: 1px solid #dddddd;
830   - text-align: left;
831   - padding: 8px;
832   -}
833   -#dialog {
834   - height: 550px;
835   -}
836 692 .active {
837 693 background-color: black;
838 694 color: white !important;
... ... @@ -840,96 +696,4 @@ h4 {
840 696 .activebtn {
841 697 color: black !important;
842 698 }
843   -#flex {
844   - height: 300px;
845   -}
846   -.top {
847   - margin-top: 100px;
848   -}
849   -.v-tabs__item a {
850   - font-size: 16px !important;
851   -}
852   -.list {
853   - padding: 0 0px !important;
854   -}
855   -.profile-image-wrapper {
856   - position: relative;
857   -}
858   -.edit-profile-icon {
859   - position: absolute;
860   - right: 15px;
861   - top: 15px;
862   - cursor: pointer;
863   -}
864   -.profile-image-wrapper > .edit-profile-icon {
865   - right: 10%;
866   - top: 0%;
867   - margin-top: 8px;
868   - border-radius: 50%;
869   - padding: 7px;
870   - font-size: 20px;
871   -}
872   -@media screen and (max-width: 769px) {
873   - .top {
874   - margin-top: 0 !important;
875   - }
876   - .userSearch .v-icon {
877   - font-size: 20px !important;
878   - margin-left: 20px;
879   - }
880   -}
881   -@media screen and (max-width: 380px) {
882   - .right {
883   - float: none !important;
884   - }
885   - .subheading {
886   - font-size: 14px !important;
887   - }
888   - .v-card__actions .v-btn {
889   - margin: 0 0px;
890   - min-width: 100px;
891   - }
892   - /* .searchIcon .v-icon {
893   - font-size: 20px;
894   - margin-left: 20px;
895   -} */
896   - .subheading {
897   - font-size: 12px !important;
898   - }
899   - h5 {
900   - font-size: 13px;
901   - }
902   -}
903   -.v-icon {
904   - font-size: 30px;
905   -}
906   -@media screen and (min-width: 1270px) {
907   - .hide {
908   - display: none;
909   - }
910   - /* }
911   -@media screen and (max-width: 962px) {
912   -.imglogo{
913   - position: absolute;
914   - top: 13px;
915   - left: 13px !important;
916   - width: 70px;
917   - height: 24px;
918   -} */
919   -}
920   -@media screen and (max-width: 420px) {
921   - .userSearch .v-text-field .v-label {
922   - line-height: 24px !important;
923   - }
924   - .userSearch .v-label {
925   - font-size: 13px !important;
926   - }
927   - .v-list__tile {
928   - font-size: 14px;
929   - padding: 0 10px;
930   - }
931   - .name {
932   - font-size: 15px;
933   - }
934   -}
935 699 </style>
936 700 \ No newline at end of file
... ...
src/pages/NoticeBoard/noticeBoard.vue
1 1 <template>
2 2 <v-app id="pages-dasboard">
3   - <v-toolbar class="fixcolors" fixed app>
4   - <v-toolbar-title class="ml-0 pl-3">
5   - <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon>
6   - </v-toolbar-title>
7   -
8   - <!-- ****** SEARCH ALL EXISTING NOTICE BOARD ****** -->
9   -
10   - <v-flex xs7 sm3 class="userSearch">
11   - <v-text-field
12   - flat
13   - append-icon="search"
14   - label="Find your Notice Board"
15   - v-model="search"
16   - color="white"
17   - dark
18   - ></v-text-field>
19   - </v-flex>
20   - <v-spacer></v-spacer>
21   - <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition">
22   - <v-btn icon large flat slot="activator">
23   - <v-avatar size="40px">
24   - <img src="/static/icon/user.png" />
25   - </v-avatar>
26   - </v-btn>
27   - <v-list class="pa-0">
28   - <v-list-tile
29   - v-for="(item,index) in items"
30   - :to="!item.href ? { name: item.name } : null"
31   - :href="item.href"
32   - @click="item.click"
33   - ripple="ripple"
34   - :disabled="item.disabled"
35   - :target="item.target"
36   - rel="noopener"
37   - :key="index"
38   - >
39   - <v-list-tile-action v-if="item.icon">
40   - <v-icon>{{ item.icon }}</v-icon>
41   - </v-list-tile-action>
42   - <v-list-tile-content>
43   - <v-list-tile-title>{{ item.title }}</v-list-tile-title>
44   - </v-list-tile-content>
45   - </v-list-tile>
46   - </v-list>
47   - </v-menu>
48   - </v-toolbar>
49 3 <v-tabs grow slider-color="black">
50 4 <v-tab
51 5 ripple
... ... @@ -448,24 +402,7 @@ export default {
448 402 defaultItem: {
449 403 title: "",
450 404 description: ""
451   - },
452   - userName: "",
453   - items: [
454   - {
455   - href: "/changepassword",
456   - title: "Change Password",
457   - click: e => {
458   - console.log(e);
459   - }
460   - },
461   - {
462   - href: "#",
463   - title: "Logout",
464   - click: e => {
465   - window.getApp.$emit("APP_LOGOUT");
466   - }
467   - }
468   - ]
  405 + }
469 406 }),
470 407 methods: {
471 408 pickFile() {
... ... @@ -487,8 +424,6 @@ export default {
487 424 fr.addEventListener("load", () => {
488 425 this.imageUrl = fr.result;
489 426 this.imageFile = files[0]; // this is an image file that can be sent to server...
490   - console.log("upload=======>", this.imageUrl);
491   - console.log("imageFile", this.imageFile);
492 427 });
493 428 } else {
494 429 this.imageName = "";
... ... @@ -506,12 +441,14 @@ export default {
506 441 .then(response => {
507 442 this.desserts = response.data.data;
508 443 this.showLoader = false;
509   - // console.log("getEventList=====>",this.desserts)
510 444 })
511 445 .catch(err => {
512 446 this.showLoader = false;
513   - // console.log("err====>", err);
514   - // this.$router.replace({ path: "/" });
  447 + if (error.response.status === 401) {
  448 + this.$router.replace({ path: "/" });
  449 + this.$store.dispatch("setToken", null);
  450 + this.$store.dispatch("Id", null);
  451 + }
515 452 });
516 453 },
517 454 editItem(item) {
... ... @@ -614,97 +551,28 @@ export default {
614 551 this.text = "Successfully Edit Existing Notice Data";
615 552 }
616 553 this.getNoticeDataList();
  554 + this.close();
617 555 })
618 556 .catch(error => {
619 557 // console.log(error);
620 558 });
621   - this.close();
622   - },
623   - handleDrawerToggle() {
624   - window.getApp.$emit("APP_DRAWER_TOGGLED");
625   - },
626   - handleFullScreen() {
627   - Util.toggleFullScreen();
628 559 }
629 560 },
630 561 mounted() {
631 562 this.getNoticeDataList();
632 563 },
633   - computed: {
634   - toolbarColor() {
635   - return this.$vuetify.options.extra.mainNav;
636   - }
  564 + created() {
  565 + this.$root.$on("app:search", search => {
  566 + this.search = search;
  567 + });
  568 + },
  569 + beforeDestroy() {
  570 + // dont forget to remove the listener
  571 + this.$root.$off("app:search");
637 572 }
638 573 };
639 574 </script>
640 575 <style scoped>
641   -.v-tabs__div {
642   - text-transform: none;
643   -}
644   -.v-input__prepend-outer {
645   - margin-right: 0px !important;
646   -}
647   -.v-card__actions .v-btn {
648   - margin: 0 15px;
649   - min-width: 120px;
650   -}
651   -.primary {
652   - background-color: #aaa !important;
653   - border-color: #aaa !important;
654   -}
655   -h4 {
656   - background-repeat: no-repeat;
657   - padding: 8px;
658   - margin: auto;
659   - font-size: 25px;
660   -}
661   -#name {
662   - position: absolute;
663   - left: 100px;
664   - top: 17px;
665   -}
666   -#icon {
667   - position: absolute;
668   - right: 8px;
669   - top: 8px;
670   -}
671   -#m {
672   - position: relative;
673   - left: 135px;
674   - top: -15px;
675   -}
676   -#G {
677   - position: absolute;
678   - top: 38px;
679   - color: white;
680   -}
681   -#bt {
682   - position: relative;
683   - top: -20px;
684   - left: 115px;
685   -}
686   -#e {
687   - position: relative;
688   - top: 5px;
689   - right: -30px;
690   - height: 17px;
691   - cursor: pointer;
692   -}
693   -#d {
694   - position: relative;
695   - top: 5px;
696   - right: -70px;
697   - height: 17px;
698   - cursor: pointer;
699   -}
700   -#td {
701   - border: 1px solid #dddddd;
702   - text-align: left;
703   - padding: 8px;
704   -}
705   -#dialog {
706   - height: 550px;
707   -}
708 576 .active {
709 577 background-color: black;
710 578 color: white !important;
... ... @@ -712,79 +580,4 @@ h4 {
712 580 .activebtn {
713 581 color: black !important;
714 582 }
715   -#flex {
716   - height: 300px;
717   -}
718   -.top {
719   - margin-top: 100px;
720   -}
721   -.v-tabs__item a {
722   - font-size: 16px !important;
723   -}
724   -@media screen and (max-width: 769px) {
725   - .top {
726   - margin-top: 0 !important;
727   - }
728   - .userSearch .v-icon {
729   - font-size: 20px !important;
730   - margin-left: 20px;
731   - }
732   -}
733   -@media screen and (max-width: 380px) {
734   - .pl-3 {
735   - padding-left: 0px !important;
736   - }
737   - .right {
738   - float: none !important;
739   - }
740   - .subheading {
741   - font-size: 14px !important;
742   - }
743   - .v-card__actions .v-btn {
744   - margin: 0 0px;
745   - min-width: 100px;
746   - }
747   - /* .searchIcon .v-icon {
748   - font-size: 20px;
749   - margin-left: 20px;
750   -} */
751   - .subheading {
752   - font-size: 12px !important;
753   - }
754   - h5 {
755   - font-size: 13px;
756   - }
757   -}
758   -.v-icon {
759   - font-size: 30px;
760   -}
761   -@media screen and (min-width: 1270px) {
762   - .hide {
763   - display: none;
764   - }
765   - /* }
766   -@media screen and (max-width: 962px) {
767   -.imglogo{
768   - position: absolute;
769   - top: 13px;
770   - left: 13px !important;
771   - width: 70px;
772   - height: 24px;
773   -} */
774   -}
775   -@media screen and (max-width: 420px) {
776   - .userSearch .v-text-field .v-label {
777   - line-height: 24px !important;
778   - }
779   - .userSearch .v-label {
780   - font-size: 13px !important;
781   - }
782   - .v-list__tile {
783   - font-size: 14px;
784   - padding: 0 10px;
785   - }
786   - .name {
787   - font-size: 15px;
788   - }
789   -}
790 583 </style>
791 584 \ No newline at end of file
... ...
src/pages/Notification/notification.vue
1 1 <template>
2 2 <v-app id="pages-dasboard">
3   - <v-toolbar class="fixcolors" fixed app>
4   - <v-toolbar-title class="ml-0 pl-3">
5   - <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon>
6   - </v-toolbar-title>
7   -
8   - <!-- ****** SEARCH ALL EXISTING REMINDER ****** -->
9   -
10   - <v-flex xs7 sm3 class="userSearch">
11   - <v-text-field
12   - flat
13   - append-icon="search"
14   - label="Find your Notifictaion"
15   - v-model="search"
16   - color="white"
17   - dark
18   - ></v-text-field>
19   - </v-flex>
20   - <v-spacer></v-spacer>
21   - <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition">
22   - <v-btn icon large flat slot="activator">
23   - <v-avatar size="40px">
24   - <img src="/static/icon/user.png">
25   - </v-avatar>
26   - </v-btn>
27   - <v-list class="pa-0">
28   - <v-list-tile
29   - v-for="(item,index) in items"
30   - :to="!item.href ? { name: item.name } : null"
31   - :href="item.href"
32   - @click="item.click"
33   - ripple="ripple"
34   - :disabled="item.disabled"
35   - :target="item.target"
36   - rel="noopener"
37   - :key="index"
38   - >
39   - <v-list-tile-action v-if="item.icon">
40   - <v-icon>{{ item.icon }}</v-icon>
41   - </v-list-tile-action>
42   - <v-list-tile-content>
43   - <v-list-tile-title>{{ item.title }}</v-list-tile-title>
44   - </v-list-tile-content>
45   - </v-list-tile>
46   - </v-list>
47   - </v-menu>
48   - </v-toolbar>
49 3 <v-tabs grow slider-color="black">
50 4 <v-tab
51 5 ripple
... ... @@ -78,7 +32,9 @@
78 32 <v-flex xs12 sm12>
79 33 <v-toolbar color="v-toolbar">
80 34 <v-spacer></v-spacer>
81   - <v-toolbar-title><h3>Edit Notifictaion</h3></v-toolbar-title>
  35 + <v-toolbar-title>
  36 + <h3>Edit Notifictaion</h3>
  37 + </v-toolbar-title>
82 38 <v-spacer></v-spacer>
83 39 </v-toolbar>
84 40 <v-card flat>
... ... @@ -90,7 +46,7 @@
90 46 class="text-xs-center text-sm-center text-md-center text-lg-center mr-4"
91 47 >
92 48 <v-avatar size="100px">
93   - <img src="/static/icon/user.png" v-if="!imageUrl">
  49 + <img src="/static/icon/user.png" v-if="!imageUrl" />
94 50 </v-avatar>
95 51 <input
96 52 type="file"
... ... @@ -98,51 +54,51 @@
98 54 ref="image"
99 55 accept="image/*"
100 56 @change="onFilePicked"
101   - >
  57 + />
102 58 <img
103 59 :src="imageData.imageUrl"
104 60 height="150"
105 61 v-if="imageUrl"
106 62 style="border-radius:50%; width:200px"
107   - >
  63 + />
108 64 </v-flex>
109 65 </v-layout>
110   - <v-flex xs12 sm12>
111   - <v-layout>
112   - <v-flex xs4 class="pt-4 subheading">
113   - <label class="right">Title:</label>
114   - </v-flex>
115   - <v-flex xs5 class="ml-3">
116   - <v-text-field
117   - v-model="editedItem.title"
118   - placeholder="fill your Title"
119   - name="name"
120   - type="text"
121   - ></v-text-field>
122   - </v-flex>
123   - </v-layout>
124   - </v-flex>
125   - <v-flex xs12 sm12>
126   - <v-layout>
127   - <v-flex xs4 class="pt-4 subheading">
128   - <label class="right">Description:</label>
129   - </v-flex>
130   - <v-flex xs5 class="ml-3">
131   - <v-text-field
132   - placeholder="fill your Description"
133   - v-model="editedItem.description"
134   - type="text"
135   - ></v-text-field>
136   - </v-flex>
137   - </v-layout>
138   - </v-flex>
  66 + <v-flex xs12 sm12>
  67 + <v-layout>
  68 + <v-flex xs4 class="pt-4 subheading">
  69 + <label class="right">Title:</label>
  70 + </v-flex>
  71 + <v-flex xs5 class="ml-3">
  72 + <v-text-field
  73 + v-model="editedItem.title"
  74 + placeholder="fill your Title"
  75 + name="name"
  76 + type="text"
  77 + ></v-text-field>
  78 + </v-flex>
  79 + </v-layout>
  80 + </v-flex>
  81 + <v-flex xs12 sm12>
  82 + <v-layout>
  83 + <v-flex xs4 class="pt-4 subheading">
  84 + <label class="right">Description:</label>
  85 + </v-flex>
  86 + <v-flex xs5 class="ml-3">
  87 + <v-text-field
  88 + placeholder="fill your Description"
  89 + v-model="editedItem.description"
  90 + type="text"
  91 + ></v-text-field>
  92 + </v-flex>
  93 + </v-layout>
  94 + </v-flex>
139 95 <v-layout>
140 96 <v-flex xs12 sm10 offset-sm1>
141   - <v-card-actions>
142   - <v-btn round dark @click.native="close">Cancel</v-btn>
143   - <v-spacer></v-spacer>
144   - <v-btn round dark @click="save">Save</v-btn>
145   - </v-card-actions>
  97 + <v-card-actions>
  98 + <v-btn round dark @click.native="close">Cancel</v-btn>
  99 + <v-spacer></v-spacer>
  100 + <v-btn round dark @click="save">Save</v-btn>
  101 + </v-card-actions>
146 102 </v-flex>
147 103 </v-layout>
148 104 </v-container>
... ... @@ -156,22 +112,24 @@
156 112 <v-dialog v-model="dialog1" max-width="600px">
157 113 <v-toolbar color="white">
158 114 <v-spacer></v-spacer>
159   - <v-toolbar-title><h3>Notification</h3></v-toolbar-title>
  115 + <v-toolbar-title>
  116 + <h3>Notification</h3>
  117 + </v-toolbar-title>
160 118 <v-spacer></v-spacer>
161 119 <v-icon @click="close1">close</v-icon>
162 120 </v-toolbar>
163 121 <v-card>
164 122 <v-flex align-center justify-center layout text-xs-center>
165 123 <v-avatar size="50px" style="position:absolute; top:20px;">
166   - <img src="/static/icon/user.png">
  124 + <img src="/static/icon/user.png" />
167 125 </v-avatar>
168 126 </v-flex>
169 127 <v-card-text>
170 128 <v-container grid-list-md>
171 129 <v-layout wrap>
172 130 <v-flex>
173   - <br>
174   - <br>
  131 + <br />
  132 + <br />
175 133 <v-layout>
176 134 <v-flex xs5 sm6>
177 135 <h5 class="right my-1">Title:</h5>
... ... @@ -203,7 +161,7 @@
203 161 color="success"
204 162 >{{ text }}</v-snackbar>
205 163  
206   - <!-- ****** EXISTING-USERS REMINDER TABLE ****** -->
  164 + <!-- ****** EXISTING-USERS REMINDER TABLE ****** -->
207 165  
208 166 <v-data-table
209 167 :headers="headers"
... ... @@ -216,26 +174,26 @@
216 174 <td id="td" class="text-xs-center">{{ props.item.title}}</td>
217 175 <td id="td" class="text-xs-center">{{ props.item.description}}</td>
218 176  
219   - <td class="text-xs-center">
  177 + <td id="td" class="text-xs-center">
220 178 <span>
221 179 <img
222 180 style="cursor:pointer; width:25px; height:18px; "
223 181 class="mr-5"
224 182 @click="profile(props.item)"
225 183 src="/static/icon/eye1.png"
226   - >
  184 + />
227 185 <img
228 186 style="cursor:pointer; width:20px; height:18px; "
229 187 class="mr-5"
230 188 @click="editItem(props.item)"
231 189 src="/static/icon/edit1.png"
232   - >
  190 + />
233 191 <img
234 192 style="cursor:pointer;width:20px; height:20px; "
235 193 class="mr-5"
236 194 @click="deleteItem(props.item)"
237 195 src="/static/icon/delete1.png"
238   - >
  196 + />
239 197 </span>
240 198 </td>
241 199 </template>
... ... @@ -249,7 +207,7 @@
249 207 </v-tab-item>
250 208  
251 209 <!-- ****** ADD MULTIPLE REMINDER ****** -->
252   -
  210 +
253 211 <v-tab-item>
254 212 <v-container>
255 213 <v-snackbar
... ... @@ -270,7 +228,7 @@
270 228 class="text-xs-center text-sm-center text-md-center text-lg-center my-4 mr-4"
271 229 >
272 230 <v-avatar size="100px">
273   - <img src="/static/icon/user.png" v-if="!imageUrl">
  231 + <img src="/static/icon/user.png" v-if="!imageUrl" />
274 232 </v-avatar>
275 233 <input
276 234 type="file"
... ... @@ -278,47 +236,47 @@
278 236 ref="image"
279 237 accept="image/*"
280 238 @change="onFilePicked"
281   - >
  239 + />
282 240 <img
283 241 :src="imageData.imageUrl"
284 242 height="150"
285 243 v-if="imageUrl"
286 244 style="border-radius:50%; width:200px"
287   - >
  245 + />
288 246 </v-flex>
289 247 </v-layout>
290   - <v-flex xs12>
291   - <v-layout>
292   - <v-flex xs4 class="pt-4 subheading">
293   - <label class="right">Title:</label>
294   - </v-flex>
295   - <v-flex xs4 class="ml-3">
296   - <v-text-field
297   - v-model="addNotification.title"
298   - placeholder="fill your Title"
299   - type="text"
300   - :rules="titleRules"
301   - required
302   - ></v-text-field>
303   - </v-flex>
304   - </v-layout>
305   - </v-flex>
306   - <v-flex xs12>
307   - <v-layout>
308   - <v-flex xs4 class="pt-4 subheading">
309   - <label class="right">Description:</label>
310   - </v-flex>
311   - <v-flex xs4 class="ml-3">
312   - <v-text-field
313   - placeholder="fill your Description"
314   - :rules="descriptionRules"
315   - v-model="addNotification.description"
316   - type="text"
317   - required
318   - ></v-text-field>
319   - </v-flex>
320   - </v-layout>
321   - </v-flex>
  248 + <v-flex xs12>
  249 + <v-layout>
  250 + <v-flex xs4 class="pt-4 subheading">
  251 + <label class="right">Title:</label>
  252 + </v-flex>
  253 + <v-flex xs4 class="ml-3">
  254 + <v-text-field
  255 + v-model="addNotification.title"
  256 + placeholder="fill your Title"
  257 + type="text"
  258 + :rules="titleRules"
  259 + required
  260 + ></v-text-field>
  261 + </v-flex>
  262 + </v-layout>
  263 + </v-flex>
  264 + <v-flex xs12>
  265 + <v-layout>
  266 + <v-flex xs4 class="pt-4 subheading">
  267 + <label class="right">Description:</label>
  268 + </v-flex>
  269 + <v-flex xs4 class="ml-3">
  270 + <v-text-field
  271 + placeholder="fill your Description"
  272 + :rules="descriptionRules"
  273 + v-model="addNotification.description"
  274 + type="text"
  275 + required
  276 + ></v-text-field>
  277 + </v-flex>
  278 + </v-layout>
  279 + </v-flex>
322 280 <v-layout>
323 281 <v-flex xs12 sm6 offset-sm3>
324 282 <v-card-actions>
... ... @@ -356,7 +314,7 @@ export default {
356 314 loading: false,
357 315 date: null,
358 316 search: "",
359   - showLoader:false,
  317 + showLoader: false,
360 318 dialog: false,
361 319 dialog1: false,
362 320 valid: true,
... ... @@ -379,40 +337,28 @@ export default {
379 337 value: "No"
380 338 },
381 339 { text: "Title", value: "title", sortable: false, align: "center" },
382   - { text: "Description", value: "description", sortable: false, align: "center" },
  340 + {
  341 + text: "Description",
  342 + value: "description",
  343 + sortable: false,
  344 + align: "center"
  345 + },
383 346 { text: "Action", value: "", sortable: false, align: "center" }
384 347 ],
385 348 desserts: [],
386 349 editedIndex: -1,
387   - addNotification:{
388   - title:'',
389   - description:''
  350 + addNotification: {
  351 + title: "",
  352 + description: ""
390 353 },
391 354 editedItem: {
392   - title:'',
393   - description:''
  355 + title: "",
  356 + description: ""
394 357 },
395 358 defaultItem: {
396   - title:'',
397   - description:''
398   - },
399   - userName: "",
400   - items: [
401   - {
402   - href: "/changepassword",
403   - title: "Change Password",
404   - click: e => {
405   - console.log(e);
406   - }
407   - },
408   - {
409   - href: "#",
410   - title: "Logout",
411   - click: e => {
412   - window.getApp.$emit("APP_LOGOUT");
413   - }
414   - }
415   - ]
  359 + title: "",
  360 + description: ""
  361 + }
416 362 }),
417 363 methods: {
418 364 pickFile() {
... ... @@ -443,7 +389,7 @@ export default {
443 389 this.imageUrl = "";
444 390 }
445 391 },
446   - getNotifications() {
  392 + getNotifications() {
447 393 this.showLoader = true;
448 394 var token = this.$store.state.token;
449 395 http()
... ... @@ -458,7 +404,11 @@ export default {
458 404 .catch(err => {
459 405 // console.log("err====>", err);
460 406 this.showLoader = false;
461   - this.$router.replace({ path: "/" });
  407 + if (error.response.status === 401) {
  408 + this.$router.replace({ path: "/" });
  409 + this.$store.dispatch("setToken", null);
  410 + this.$store.dispatch("Id", null);
  411 + }
462 412 });
463 413 },
464 414 editItem(item) {
... ... @@ -488,10 +438,10 @@ export default {
488 438 if ((this.snackbar = true)) {
489 439 this.text = "Successfully Delete Notification";
490 440 }
491   - this.getNotifications();
  441 + this.getNotifications();
492 442 })
493 443 .catch(error => {
494   - console.log(error);
  444 + console.log(error);
495 445 });
496 446 },
497 447 activeTab(type) {
... ... @@ -524,15 +474,15 @@ export default {
524 474 console.log(imageData);
525 475 let create = {
526 476 title: this.addNotification.title,
527   - description: this.addNotification.description,
  477 + description: this.addNotification.description
528 478 // imageData
529 479 };
530   - console.log(create)
  480 + console.log(create);
531 481 this.loading = true;
532 482 http()
533 483 .post("/createNotification", create)
534 484 .then(response => {
535   - console.log(create)
  485 + console.log(create);
536 486 if ((this.snackbar = true)) {
537 487 this.text = "New Notification added successfully";
538 488 }
... ... @@ -549,20 +499,18 @@ export default {
549 499 });
550 500 }
551 501 },
552   - mail() {},
553   - download() {},
554 502 clear() {
555 503 this.$refs.form.reset();
556 504 },
557 505 save() {
558   - let imageData = new FormData();
559   - imageData.append("upload", this.imageFile);
560   - console.log(imageData);
  506 + let imageData = new FormData();
  507 + imageData.append("upload", this.imageFile);
  508 + console.log(imageData);
561 509 let editNotification = {
562   - notificationId:this.editedItem._id,
563   - title: this.editedItem.title,
564   - description: this.editedItem.description,
565   - // imageData
  510 + notificationId: this.editedItem._id,
  511 + title: this.editedItem.title,
  512 + description: this.editedItem.description
  513 + // imageData
566 514 };
567 515 http()
568 516 .put("/updateNotification", editNotification)
... ... @@ -577,91 +525,25 @@ export default {
577 525 // console.log(error);
578 526 });
579 527 this.close();
580   - },
581   - handleDrawerToggle() {
582   - window.getApp.$emit("APP_DRAWER_TOGGLED");
583   - },
584   - handleFullScreen() {
585   - Util.toggleFullScreen();
586 528 }
587 529 },
588 530 mounted() {
589 531 this.getNotifications();
590 532 },
591   - computed: {
592   - toolbarColor() {
593   - return this.$vuetify.options.extra.mainNav;
594   - }
  533 + created() {
  534 + this.$root.$on("app:search", search => {
  535 + this.search = search;
  536 + });
  537 + },
  538 + beforeDestroy() {
  539 + // dont forget to remove the listener
  540 + this.$root.$off("app:search");
595 541 }
596 542 };
597 543 </script>
598 544 <style scoped>
599   -.v-tabs__div {
600   - text-transform: none;
601   -}
602   -.v-input__prepend-outer {
603   - margin-right: 0px !important;
604   -}
605   -.v-card__actions .v-btn {
606   - margin: 0 15px;
607   - min-width: 120px;
608   -}
609   -.primary {
610   - background-color: #aaa !important;
611   - border-color: #aaa !important;
612   -}
613   -h4 {
614   - background-repeat: no-repeat;
615   - padding: 8px;
616   - margin: auto;
617   - font-size: 25px;
618   -}
619   -#name {
620   - position: absolute;
621   - left: 100px;
622   - top: 17px;
623   -}
624   -#icon {
625   - position: absolute;
626   - right: 8px;
627   - top: 8px;
628   -}
629   -#m {
630   - position: relative;
631   - left: 135px;
632   - top: -15px;
633   -}
634   -#G {
635   - position: absolute;
636   - top: 38px;
637   - color: white;
638   -}
639   -#bt {
640   - position: relative;
641   - top: -20px;
642   - left: 115px;
643   -}
644   -#e {
645   - position: relative;
646   - top: 5px;
647   - right: -30px;
648   - height: 17px;
649   - cursor: pointer;
650   -}
651   -#d {
652   - position: relative;
653   - top: 5px;
654   - right: -70px;
655   - height: 17px;
656   - cursor: pointer;
657   -}
658 545 #td {
659   - border: 1px solid #dddddd;
660   - text-align: left;
661   - padding: 8px;
662   -}
663   -#dialog {
664   - height: 550px;
  546 + max-width: 200px;
665 547 }
666 548 .active {
667 549 background-color: black;
... ... @@ -670,79 +552,4 @@ h4 {
670 552 .activebtn {
671 553 color: black !important;
672 554 }
673   -#flex {
674   - height: 300px;
675   -}
676   -.top {
677   - margin-top: 100px;
678   -}
679   -.v-tabs__item a {
680   - font-size: 16px !important;
681   -}
682   -@media screen and (max-width: 769px) {
683   - .top {
684   - margin-top: 0 !important;
685   - }
686   - .userSearch .v-icon {
687   - font-size: 20px !important;
688   - margin-left: 20px;
689   - }
690   -}
691   -@media screen and (max-width: 380px) {
692   - .right {
693   - float: none !important;
694   - }
695   - .subheading {
696   - font-size: 14px !important;
697   - }
698   - .v-card__actions .v-btn {
699   - margin: 0 0px;
700   - min-width: 100px;
701   - }
702   - /* .searchIcon .v-icon {
703   - font-size: 20px;
704   - margin-left: 20px;
705   -} */
706   - .subheading {
707   - font-size: 12px !important;
708   - }
709   - h5 {
710   - font-size: 13px;
711   - }
712   -}
713   -.v-icon {
714   - font-size: 30px;
715   -}
716   -@media screen and (min-width: 1270px) {
717   - .hide {
718   - display: none;
719   - }
720   - /* }
721   -@media screen and (max-width: 962px) {
722   -.imglogo{
723   - position: absolute;
724   - top: 13px;
725   - left: 13px !important;
726   - width: 70px;
727   - height: 24px;
728   -} */
729   -}
730   -@media screen and (max-width: 420px) {
731   - .pl-3 {
732   - padding-left: 0px !important;
733   - }
734   - .userSearch .v-text-field .v-label {
735   - line-height: 24px !important;
736   - }
737   - .userSearch .v-label {
738   - font-size: 13px !important;
739   - }
740   - .v-list__tile {
741   - font-size: 14px;
742   - padding: 0 10px;
743   - }
744   - .name {
745   - font-size: 15px;
746   - }
747   -}
748 555 </style>
749 556 \ No newline at end of file
... ...
src/pages/Parent/parents.vue
1 1 <template>
2 2 <v-app id="pages-dasboard">
3   - <v-toolbar class="fixcolors" fixed app>
4   - <v-toolbar-title class="ml-0 pl-3">
5   - <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon>
6   - </v-toolbar-title>
7   -
8   - <!-- ****** SEARCH ALL EXISTING PARENT ****** -->
9   -
10   - <v-flex xs7 sm3 class="userSearch">
11   - <v-text-field
12   - flat
13   - append-icon="search"
14   - label="Find Parents"
15   - v-model="search"
16   - color="white"
17   - dark
18   - ></v-text-field>
19   - </v-flex>
20   - <v-spacer></v-spacer>
21   - <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition">
22   - <v-btn icon large flat slot="activator">
23   - <v-avatar size="40px">
24   - <img src="/static/icon/user.png" />
25   - </v-avatar>
26   - </v-btn>
27   - <v-list class="pa-0">
28   - <v-list-tile
29   - v-for="(item,index) in items"
30   - :to="!item.href ? { name: item.name } : null"
31   - :href="item.href"
32   - @click="item.click"
33   - ripple="ripple"
34   - :disabled="item.disabled"
35   - :target="item.target"
36   - rel="noopener"
37   - :key="index"
38   - >
39   - <v-list-tile-action v-if="item.icon">
40   - <v-icon>{{ item.icon }}</v-icon>
41   - </v-list-tile-action>
42   - <v-list-tile-content>
43   - <v-list-tile-title>{{ item.title }}</v-list-tile-title>
44   - </v-list-tile-content>
45   - </v-list-tile>
46   - </v-list>
47   - </v-menu>
48   - </v-toolbar>
49 3 <v-tabs grow slider-color="black">
50 4 <v-tab
51 5 ripple
... ... @@ -104,7 +58,7 @@
104 58 </v-flex>
105 59 </v-layout>
106 60 </v-flex>
107   - <v-flex xs12>
  61 + <v-flex xs12>
108 62 <v-layout>
109 63 <v-flex xs4 class="pt-4 subheading">
110 64 <label class="right">Father Name:</label>
... ... @@ -559,23 +513,7 @@ export default {
559 513 motherName: "",
560 514 motherCellNo: "",
561 515 email: ""
562   - },
563   - items: [
564   - {
565   - href: "/changepassword",
566   - title: "Change Password",
567   - click: e => {
568   - console.log(e);
569   - }
570   - },
571   - {
572   - href: "#",
573   - title: "Logout",
574   - click: e => {
575   - window.getApp.$emit("APP_LOGOUT");
576   - }
577   - }
578   - ]
  516 + }
579 517 }),
580 518 watch: {
581 519 menu(val) {
... ... @@ -685,92 +623,23 @@ export default {
685 623 .catch(error => {
686 624 console.log("err====>", error.response.data.message);
687 625 });
688   - },
689   - handleDrawerToggle() {
690   - window.getApp.$emit("APP_DRAWER_TOGGLED");
691   - },
692   - handleFullScreen() {
693   - Util.toggleFullScreen();
694 626 }
695 627 },
696 628 mounted() {
697 629 this.getParentDetails();
698 630 },
699   - computed: {
700   - toolbarColor() {
701   - return this.$vuetify.options.extra.mainNav;
702   - }
  631 + created() {
  632 + this.$root.$on("app:search", search => {
  633 + this.search = search;
  634 + });
  635 + },
  636 + beforeDestroy() {
  637 + // dont forget to remove the listener
  638 + this.$root.$off("app:search");
703 639 }
704 640 };
705 641 </script>
706 642 <style scoped>
707   -.v-tabs__div {
708   - text-transform: none;
709   -}
710   -.v-input__prepend-outer {
711   - margin-right: 0px !important;
712   -}
713   -.v-card__actions .v-btn {
714   - margin: 0 15px;
715   - min-width: 120px;
716   -}
717   -.primary {
718   - background-color: #aaa !important;
719   - border-color: #aaa !important;
720   -}
721   -h4 {
722   - background-repeat: no-repeat;
723   - padding: 8px;
724   - margin: auto;
725   - font-size: 25px;
726   -}
727   -#name {
728   - position: absolute;
729   - left: 100px;
730   - top: 17px;
731   -}
732   -#icon {
733   - position: absolute;
734   - right: 8px;
735   - top: 8px;
736   -}
737   -#m {
738   - position: relative;
739   - left: 135px;
740   - top: -15px;
741   -}
742   -#G {
743   - position: absolute;
744   - top: 38px;
745   - color: white;
746   -}
747   -#bt {
748   - position: relative;
749   - top: -20px;
750   - left: 115px;
751   -}
752   -#e {
753   - position: relative;
754   - top: 5px;
755   - right: -30px;
756   - height: 17px;
757   - cursor: pointer;
758   -}
759   -#d {
760   - position: relative;
761   - top: 5px;
762   - right: -70px;
763   - height: 17px;
764   - cursor: pointer;
765   -}
766   -#td {
767   - border: 1px solid #dddddd;
768   - text-align: left;
769   - padding: 8px;
770   -}
771   -#dialog {
772   - height: 550px;
773   -}
774 643 .active {
775 644 background-color: black;
776 645 color: white !important;
... ... @@ -778,79 +647,4 @@ h4 {
778 647 .activebtn {
779 648 color: black !important;
780 649 }
781   -#flex {
782   - height: 300px;
783   -}
784   -.top {
785   - margin-top: 100px;
786   -}
787   -.v-tabs__item a {
788   - font-size: 16px !important;
789   -}
790   -@media screen and (max-width: 769px) {
791   - .top {
792   - margin-top: 0 !important;
793   - }
794   - .userSearch .v-icon {
795   - font-size: 20px !important;
796   - margin-left: 20px;
797   - }
798   -}
799   -@media screen and (max-width: 380px) {
800   - .pl-3 {
801   - padding-left: 0px !important;
802   - }
803   - .right {
804   - float: none !important;
805   - }
806   - .subheading {
807   - font-size: 14px !important;
808   - }
809   - .v-card__actions .v-btn {
810   - margin: 0 0px;
811   - min-width: 100px;
812   - }
813   - /* .searchIcon .v-icon {
814   - font-size: 20px;
815   - margin-left: 20px;
816   -} */
817   - .subheading {
818   - font-size: 12px !important;
819   - }
820   - h5 {
821   - font-size: 13px;
822   - }
823   -}
824   -.v-icon {
825   - font-size: 30px;
826   -}
827   -@media screen and (min-width: 1270px) {
828   - .hide {
829   - display: none;
830   - }
831   - /* }
832   -@media screen and (max-width: 962px) {
833   -.imglogo{
834   - position: absolute;
835   - top: 13px;
836   - left: 13px !important;
837   - width: 70px;
838   - height: 24px;
839   -} */
840   -}
841   -@media screen and (max-width: 420px) {
842   - .userSearch .v-text-field .v-label {
843   - line-height: 24px !important;
844   - }
845   - .userSearch .v-label {
846   - font-size: 13px !important;
847   - }
848   - .v-list__tile {
849   - font-size: 14px;
850   - padding: 0 10px;
851   - }
852   - .name {
853   - font-size: 15px;
854   - }
855   -}
856 650 </style>
857 651 \ No newline at end of file
... ...
src/pages/Reminder/reminder.vue
... ... @@ -456,7 +456,11 @@ export default {
456 456 .catch(err => {
457 457 // console.log("err====>", err);
458 458 this.showLoader = false;
459   - this.$router.replace({ path: "/" });
  459 + if (error.response.status === 401) {
  460 + this.$router.replace({ path: "/" });
  461 + this.$store.dispatch("setToken", null);
  462 + this.$store.dispatch("Id", null);
  463 + }
460 464 });
461 465 },
462 466 editItem(item) {
... ...
src/pages/Section/section.vue
1 1 <template>
2 2 <v-app id="pages-dasboard">
3   - <v-toolbar class="fixcolors" fixed app>
4   - <v-toolbar-title class="ml-0 pl-3">
5   - <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon>
6   - </v-toolbar-title>
7   - <!-- ****** SEARCH ALL EXISTING SECTION ****** -->
8   - <v-flex xs7 sm3 class="userSearch">
9   - <v-text-field
10   - flat
11   - append-icon="search"
12   - label="Find your Section Data"
13   - v-model="search"
14   - color="white"
15   - dark
16   - ></v-text-field>
17   - </v-flex>
18   - <v-spacer></v-spacer>
19   - <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition">
20   - <v-btn icon large flat slot="activator">
21   - <v-avatar size="40px">
22   - <img src="/static/icon/user.png" />
23   - </v-avatar>
24   - </v-btn>
25   - <v-list class="pa-0">
26   - <v-list-tile
27   - v-for="(item,index) in items"
28   - :to="!item.href ? { name: item.name } : null"
29   - :href="item.href"
30   - @click="item.click"
31   - ripple="ripple"
32   - :disabled="item.disabled"
33   - :target="item.target"
34   - rel="noopener"
35   - :key="index"
36   - >
37   - <v-list-tile-action v-if="item.icon">
38   - <v-icon>{{ item.icon }}</v-icon>
39   - </v-list-tile-action>
40   - <v-list-tile-content>
41   - <v-list-tile-title>{{ item.title }}</v-list-tile-title>
42   - </v-list-tile-content>
43   - </v-list-tile>
44   - </v-list>
45   - </v-menu>
46   - </v-toolbar>
47 3 <v-tabs grow slider-color="black">
48 4 <v-tab
49 5 ripple
... ... @@ -481,7 +437,11 @@ export default {
481 437 .catch(err => {
482 438 // console.log("err====>", err);
483 439 this.showLoader = false;
484   - this.$router.replace({ path: "/" });
  440 + if (error.response.status === 401) {
  441 + this.$router.replace({ path: "/" });
  442 + this.$store.dispatch("setToken", null);
  443 + this.$store.dispatch("Id", null);
  444 + }
485 445 });
486 446 },
487 447 editItem(item) {
... ... @@ -576,14 +536,14 @@ export default {
576 536 this.$refs.form.reset();
577 537 },
578 538 save() {
579   - this.editedItem.sectionId = this.editedItem._id
  539 + this.editedItem.sectionId = this.editedItem._id;
580 540 http()
581 541 .put("/updateSection", this.editedItem)
582 542 .then(response => {
583 543 // console.log("editStudent",editStudent);
584 544 if ((this.snackbar = true)) {
585 545 this.text = "Successfully Edit Existing Section";
586   - }
  546 + }
587 547 this.getSectionList();
588 548 this.close();
589 549 })
... ... @@ -622,7 +582,7 @@ export default {
622 582 })
623 583 .catch(err => {
624 584 // console.log("err====>", err);
625   - this.$router.replace({ path: "/" });
  585 + // this.$router.replace({ path: "/" });
626 586 });
627 587 }
628 588 },
... ... @@ -637,77 +597,20 @@ export default {
637 597 toolbarColor() {
638 598 return this.$vuetify.options.extra.mainNav;
639 599 }
  600 + },
  601 + created() {
  602 + this.$root.$on("app:search", search => {
  603 + this.search = search;
  604 + });
  605 + },
  606 + beforeDestroy() {
  607 + // dont forget to remove the listener
  608 + this.$root.$off("app:search");
640 609 }
641 610 };
642 611 </script>
  612 +
643 613 <style scoped>
644   -.v-tabs__div {
645   - text-transform: none;
646   -}
647   -.v-input__prepend-outer {
648   - margin-right: 0px !important;
649   -}
650   -.v-card__actions .v-btn {
651   - margin: 0 15px;
652   - min-width: 120px;
653   -}
654   -.primary {
655   - background-color: #aaa !important;
656   - border-color: #aaa !important;
657   -}
658   -h4 {
659   - background-repeat: no-repeat;
660   - padding: 8px;
661   - margin: auto;
662   - font-size: 25px;
663   -}
664   -#name {
665   - position: absolute;
666   - left: 100px;
667   - top: 17px;
668   -}
669   -#icon {
670   - position: absolute;
671   - right: 8px;
672   - top: 8px;
673   -}
674   -#m {
675   - position: relative;
676   - left: 135px;
677   - top: -15px;
678   -}
679   -#G {
680   - position: absolute;
681   - top: 38px;
682   - color: white;
683   -}
684   -#bt {
685   - position: relative;
686   - top: -20px;
687   - left: 115px;
688   -}
689   -#e {
690   - position: relative;
691   - top: 5px;
692   - right: -30px;
693   - height: 17px;
694   - cursor: pointer;
695   -}
696   -#d {
697   - position: relative;
698   - top: 5px;
699   - right: -70px;
700   - height: 17px;
701   - cursor: pointer;
702   -}
703   -#td {
704   - border: 1px solid #dddddd;
705   - text-align: left;
706   - padding: 8px;
707   -}
708   -#dialog {
709   - height: 550px;
710   -}
711 614 .active {
712 615 background-color: black;
713 616 color: white !important;
... ... @@ -715,79 +618,4 @@ h4 {
715 618 .activebtn {
716 619 color: black !important;
717 620 }
718   -#flex {
719   - height: 300px;
720   -}
721   -.top {
722   - margin-top: 100px;
723   -}
724   -.v-tabs__item a {
725   - font-size: 16px !important;
726   -}
727   -@media screen and (max-width: 769px) {
728   - .top {
729   - margin-top: 0 !important;
730   - }
731   - .userSearch .v-icon {
732   - font-size: 20px !important;
733   - margin-left: 20px;
734   - }
735   -}
736   -@media screen and (max-width: 380px) {
737   - .pl-3 {
738   - padding-left: 0px !important;
739   - }
740   - .right {
741   - float: none !important;
742   - }
743   - .subheading {
744   - font-size: 14px !important;
745   - }
746   - .v-card__actions .v-btn {
747   - margin: 0 0px;
748   - min-width: 100px;
749   - }
750   - /* .searchIcon .v-icon {
751   - font-size: 20px;
752   - margin-left: 20px;
753   -} */
754   - .subheading {
755   - font-size: 12px !important;
756   - }
757   - h5 {
758   - font-size: 13px;
759   - }
760   -}
761   -.v-icon {
762   - font-size: 30px;
763   -}
764   -@media screen and (min-width: 1270px) {
765   - .hide {
766   - display: none;
767   - }
768   - /* }
769   -@media screen and (max-width: 962px) {
770   -.imglogo{
771   - position: absolute;
772   - top: 13px;
773   - left: 13px !important;
774   - width: 70px;
775   - height: 24px;
776   -} */
777   -}
778   -@media screen and (max-width: 420px) {
779   - .userSearch .v-text-field .v-label {
780   - line-height: 24px !important;
781   - }
782   - .userSearch .v-label {
783   - font-size: 13px !important;
784   - }
785   - .v-list__tile {
786   - font-size: 14px;
787   - padding: 0 10px;
788   - }
789   - .name {
790   - font-size: 15px;
791   - }
792   -}
793 621 </style>
794 622 \ No newline at end of file
... ...
src/pages/Students/students.vue
1 1 <template>
2   - <v-app id="pages-dasboard">
3   - <v-toolbar class="fixcolors" fixed app>
4   - <v-toolbar-title class="ml-0 pl-3">
5   - <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon>
6   - </v-toolbar-title>
7   - <!-- ****** SEARCH ALL EXISTING StudentS ****** -->
8   - <v-flex xs7 sm3 class="userSearch">
9   - <v-text-field
10   - flat
11   - append-icon="search"
12   - label="Find your Students"
13   - v-model="search"
14   - color="white"
15   - dark
16   - ></v-text-field>
17   - </v-flex>
18   - <v-spacer></v-spacer>
19   - <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition">
20   - <v-btn icon large flat slot="activator">
21   - <v-avatar size="40px">
22   - <img src="/static/icon/user.png" />
23   - </v-avatar>
24   - </v-btn>
25   - <v-list class="pa-0">
26   - <v-list-tile
27   - v-for="(item,index) in items"
28   - :to="!item.href ? { name: item.name } : null"
29   - :href="item.href"
30   - @click="item.click"
31   - ripple="ripple"
32   - :disabled="item.disabled"
33   - :target="item.target"
34   - rel="noopener"
35   - :key="index"
36   - >
37   - <v-list-tile-action v-if="item.icon">
38   - <v-icon>{{ item.icon }}</v-icon>
39   - </v-list-tile-action>
40   - <v-list-tile-content>
41   - <v-list-tile-title>{{ item.title }}</v-list-tile-title>
42   - </v-list-tile-content>
43   - </v-list-tile>
44   - </v-list>
45   - </v-menu>
46   - </v-toolbar>
  2 + <div>
47 3 <v-tabs grow slider-color="black">
48 4 <v-tab
49 5 ripple
... ... @@ -1535,7 +1491,7 @@
1535 1491 <div class="loader" v-if="showLoader">
1536 1492 <v-progress-circular indeterminate color="white"></v-progress-circular>
1537 1493 </div>
1538   - </v-app>
  1494 + </div>
1539 1495 </template>
1540 1496  
1541 1497 <script>
... ... @@ -1905,23 +1861,6 @@ export default {
1905 1861 name: "",
1906 1862 email: ""
1907 1863 },
1908   - userName: "",
1909   - items: [
1910   - {
1911   - href: "/changepassword",
1912   - title: "Change Password",
1913   - click: e => {
1914   - console.log(e);
1915   - }
1916   - },
1917   - {
1918   - href: "#",
1919   - title: "Logout",
1920   - click: e => {
1921   - window.getApp.$emit("APP_LOGOUT");
1922   - }
1923   - }
1924   - ]
1925 1864 }),
1926 1865 watch: {
1927 1866 menu(val) {
... ... @@ -2161,8 +2100,6 @@ export default {
2161 2100 });
2162 2101 }
2163 2102 },
2164   - mail() {},
2165   - download() {},
2166 2103 clear() {
2167 2104 this.$refs.form.reset();
2168 2105 },
... ... @@ -2264,12 +2201,6 @@ export default {
2264 2201 console.log("err====>", error.response.data.message);
2265 2202 });
2266 2203 }
2267   - },
2268   - handleDrawerToggle() {
2269   - window.getApp.$emit("APP_DRAWER_TOGGLED");
2270   - },
2271   - handleFullScreen() {
2272   - Util.toggleFullScreen();
2273 2204 }
2274 2205 },
2275 2206 mounted() {
... ... @@ -2287,84 +2218,18 @@ export default {
2287 2218 this.$router.replace({ path: "/" });
2288 2219 });
2289 2220 },
2290   -
2291   - // console.log("Id",this.$store.state.id)
2292   - // console.log("token",this.$store.state.token)
2293   - computed: {
2294   - toolbarColor() {
2295   - return this.$vuetify.options.extra.mainNav;
2296   - }
  2221 + created() {
  2222 + this.$root.$on("app:search", search => {
  2223 + this.search = search;
  2224 + });
  2225 + },
  2226 + beforeDestroy() {
  2227 + // dont forget to remove the listener
  2228 + this.$root.$off("app:search");
2297 2229 }
2298 2230 };
2299 2231 </script>
2300 2232 <style scoped>
2301   -.v-tabs__div {
2302   - text-transform: none;
2303   -}
2304   -.v-input__prepend-outer {
2305   - margin-right: 0px !important;
2306   -}
2307   -.v-card__actions .v-btn {
2308   - margin: 0 15px;
2309   - min-width: 120px;
2310   -}
2311   -.primary {
2312   - background-color: #aaa !important;
2313   - border-color: #aaa !important;
2314   -}
2315   -h4 {
2316   - background-repeat: no-repeat;
2317   - padding: 8px;
2318   - margin: auto;
2319   - font-size: 25px;
2320   -}
2321   -#name {
2322   - position: absolute;
2323   - left: 100px;
2324   - top: 17px;
2325   -}
2326   -#icon {
2327   - position: absolute;
2328   - right: 8px;
2329   - top: 8px;
2330   -}
2331   -#m {
2332   - position: relative;
2333   - left: 135px;
2334   - top: -15px;
2335   -}
2336   -#G {
2337   - position: absolute;
2338   - top: 38px;
2339   - color: white;
2340   -}
2341   -#bt {
2342   - position: relative;
2343   - top: -20px;
2344   - left: 115px;
2345   -}
2346   -#e {
2347   - position: relative;
2348   - top: 5px;
2349   - right: -30px;
2350   - height: 17px;
2351   - cursor: pointer;
2352   -}
2353   -#d {
2354   - position: relative;
2355   - top: 5px;
2356   - right: -70px;
2357   - height: 17px;
2358   - cursor: pointer;
2359   -}
2360   -#td {
2361   - border: 1px solid #dddddd;
2362   - text-align: left;
2363   - padding: 8px;
2364   -}
2365   -#dialog {
2366   - height: 550px;
2367   -}
2368 2233 .active {
2369 2234 background-color: black;
2370 2235 color: white !important;
... ... @@ -2372,79 +2237,4 @@ h4 {
2372 2237 .activebtn {
2373 2238 color: black !important;
2374 2239 }
2375   -#flex {
2376   - height: 300px;
2377   -}
2378   -.top {
2379   - margin-top: 100px;
2380   -}
2381   -.v-tabs__item a {
2382   - font-size: 16px !important;
2383   -}
2384   -@media screen and (max-width: 769px) {
2385   - .top {
2386   - margin-top: 0 !important;
2387   - }
2388   - .userSearch .v-icon {
2389   - font-size: 20px !important;
2390   - margin-left: 20px;
2391   - }
2392   -}
2393   -@media screen and (max-width: 380px) {
2394   - .pl-3 {
2395   - padding-left: 0px !important;
2396   - }
2397   - .right {
2398   - float: none !important;
2399   - }
2400   - .subheading {
2401   - font-size: 14px !important;
2402   - }
2403   - .v-card__actions .v-btn {
2404   - margin: 0 0px;
2405   - min-width: 100px;
2406   - }
2407   - /* .searchIcon .v-icon {
2408   - font-size: 20px;
2409   - margin-left: 20px;
2410   -} */
2411   - .subheading {
2412   - font-size: 12px !important;
2413   - }
2414   - h5 {
2415   - font-size: 13px;
2416   - }
2417   -}
2418   -.v-icon {
2419   - font-size: 30px;
2420   -}
2421   -@media screen and (min-width: 1270px) {
2422   - .hide {
2423   - display: none;
2424   - }
2425   - /* }
2426   -@media screen and (max-width: 962px) {
2427   -.imglogo{
2428   - position: absolute;
2429   - top: 13px;
2430   - left: 13px !important;
2431   - width: 70px;
2432   - height: 24px;
2433   -} */
2434   -}
2435   -@media screen and (max-width: 420px) {
2436   - .userSearch .v-text-field .v-label {
2437   - line-height: 24px !important;
2438   - }
2439   - .userSearch .v-label {
2440   - font-size: 13px !important;
2441   - }
2442   - .v-list__tile {
2443   - font-size: 14px;
2444   - padding: 0 10px;
2445   - }
2446   - .name {
2447   - font-size: 15px;
2448   - }
2449   -}
2450 2240 </style>
2451 2241 \ No newline at end of file
... ...
src/pages/Subjects/subjects.vue
1 1 <template>
2 2 <v-app id="pages-dasboard">
3   - <v-toolbar class="fixcolors" fixed app>
4   - <v-toolbar-title class="ml-0 pl-3">
5   - <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon>
6   - </v-toolbar-title>
7   -
8   - <!-- ****** SEARCH ALL EXISTING Subjects ****** -->
9   -
10   - <v-flex xs7 sm3 class="userSearch">
11   - <v-text-field
12   - flat
13   - append-icon="search"
14   - label="Find your Subject"
15   - v-model="search"
16   - color="white"
17   - dark
18   - ></v-text-field>
19   - </v-flex>
20   - <v-spacer></v-spacer>
21   - <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition">
22   - <v-btn icon large flat slot="activator">
23   - <v-avatar size="40px">
24   - <img src="/static/icon/user.png" />
25   - </v-avatar>
26   - </v-btn>
27   - <v-list class="pa-0">
28   - <v-list-tile
29   - v-for="(item,index) in items"
30   - :to="!item.href ? { name: item.name } : null"
31   - :href="item.href"
32   - @click="item.click"
33   - ripple="ripple"
34   - :disabled="item.disabled"
35   - :target="item.target"
36   - rel="noopener"
37   - :key="index"
38   - >
39   - <v-list-tile-action v-if="item.icon">
40   - <v-icon>{{ item.icon }}</v-icon>
41   - </v-list-tile-action>
42   - <v-list-tile-content>
43   - <v-list-tile-title>{{ item.title }}</v-list-tile-title>
44   - </v-list-tile-content>
45   - </v-list-tile>
46   - </v-list>
47   - </v-menu>
48   - </v-toolbar>
49 3 <v-tabs grow slider-color="black">
50 4 <v-tab
51 5 ripple
... ... @@ -347,10 +301,6 @@ export default {
347 301 pagination: {
348 302 rowsPerPage: 19
349 303 },
350   - // imageName: "",
351   - // imageUrl: "",
352   - // imageFile: "",
353   - // upload: "",
354 304 token: "",
355 305 nameRules: [v => !!v || " Class Name is required"],
356 306 subjectRules: [v => !!v || " Subject Name is required"],
... ... @@ -376,24 +326,7 @@ export default {
376 326 selectClassId: "",
377 327 editedItem: {
378 328 subjectName: ""
379   - },
380   - userName: "",
381   - items: [
382   - {
383   - href: "/changepassword",
384   - title: "Change Password",
385   - click: e => {
386   - console.log(e);
387   - }
388   - },
389   - {
390   - href: "#",
391   - title: "Logout",
392   - click: e => {
393   - window.getApp.$emit("APP_LOGOUT");
394   - }
395   - }
396   - ]
  329 + }
397 330 }),
398 331 methods: {
399 332 pickFile() {
... ... @@ -472,8 +405,6 @@ export default {
472 405 });
473 406 }
474 407 },
475   - mail() {},
476   - download() {},
477 408 clear() {
478 409 this.$refs.form.reset();
479 410 },
... ... @@ -511,12 +442,6 @@ export default {
511 442 });
512 443 this.close();
513 444 },
514   - handleDrawerToggle() {
515   - window.getApp.$emit("APP_DRAWER_TOGGLED");
516   - },
517   - handleFullScreen() {
518   - Util.toggleFullScreen();
519   - },
520 445 getClassSubject(id) {
521 446 this.selectClassId = id;
522 447 http()
... ... @@ -544,7 +469,11 @@ export default {
544 469 })
545 470 .catch(err => {
546 471 // console.log("err====>", err);
547   - this.$router.replace({ path: "/" });
  472 + if (error.response.status === 401) {
  473 + this.$router.replace({ path: "/" });
  474 + this.$store.dispatch("setToken", null);
  475 + this.$store.dispatch("Id", null);
  476 + }
548 477 });
549 478 }
550 479 },
... ... @@ -553,81 +482,18 @@ export default {
553 482 // this.getNoticeDataList();
554 483 this.getClass();
555 484 },
556   - computed: {
557   - toolbarColor() {
558   - return this.$vuetify.options.extra.mainNav;
559   - }
  485 + created() {
  486 + this.$root.$on("app:search", search => {
  487 + this.search = search;
  488 + });
  489 + },
  490 + beforeDestroy() {
  491 + // dont forget to remove the listener
  492 + this.$root.$off("app:search");
560 493 }
561 494 };
562 495 </script>
563 496 <style scoped>
564   -.v-tabs__div {
565   - text-transform: none;
566   -}
567   -.v-input__prepend-outer {
568   - margin-right: 0px !important;
569   -}
570   -.v-card__actions .v-btn {
571   - margin: 0 15px;
572   - min-width: 120px;
573   -}
574   -.primary {
575   - background-color: #aaa !important;
576   - border-color: #aaa !important;
577   -}
578   -h4 {
579   - background-repeat: no-repeat;
580   - padding: 8px;
581   - margin: auto;
582   - font-size: 25px;
583   -}
584   -#name {
585   - position: absolute;
586   - left: 100px;
587   - top: 17px;
588   -}
589   -#icon {
590   - position: absolute;
591   - right: 8px;
592   - top: 8px;
593   -}
594   -#m {
595   - position: relative;
596   - left: 135px;
597   - top: -15px;
598   -}
599   -#G {
600   - position: absolute;
601   - top: 38px;
602   - color: white;
603   -}
604   -#bt {
605   - position: relative;
606   - top: -20px;
607   - left: 115px;
608   -}
609   -#e {
610   - position: relative;
611   - top: 5px;
612   - right: -30px;
613   - height: 17px;
614   - cursor: pointer;
615   -}
616   -#d {
617   - position: relative;
618   - top: 5px;
619   - right: -70px;
620   - height: 17px;
621   - cursor: pointer;
622   -}
623   -#td {
624   - border: 1px solid #dddddd;
625   - text-align: left;
626   - padding: 8px;
627   -}
628   -#dialog {
629   - height: 550px;
630   -}
631 497 .active {
632 498 background-color: black;
633 499 color: white !important;
... ... @@ -635,79 +501,4 @@ h4 {
635 501 .activebtn {
636 502 color: black !important;
637 503 }
638   -#flex {
639   - height: 300px;
640   -}
641   -.top {
642   - margin-top: 100px;
643   -}
644   -.v-tabs__item a {
645   - font-size: 16px !important;
646   -}
647   -@media screen and (max-width: 769px) {
648   - .top {
649   - margin-top: 0 !important;
650   - }
651   - .userSearch .v-icon {
652   - font-size: 20px !important;
653   - margin-left: 20px;
654   - }
655   -}
656   -@media screen and (max-width: 380px) {
657   - .pl-3 {
658   - padding-left: 0px !important;
659   - }
660   - .right {
661   - float: none !important;
662   - }
663   - .subheading {
664   - font-size: 14px !important;
665   - }
666   - .v-card__actions .v-btn {
667   - margin: 0 0px;
668   - min-width: 100px;
669   - }
670   - /* .searchIcon .v-icon {
671   - font-size: 20px;
672   - margin-left: 20px;
673   -} */
674   - .subheading {
675   - font-size: 12px !important;
676   - }
677   - h5 {
678   - font-size: 13px;
679   - }
680   -}
681   -.v-icon {
682   - font-size: 30px;
683   -}
684   -@media screen and (min-width: 1270px) {
685   - .hide {
686   - display: none;
687   - }
688   - /* }
689   -@media screen and (max-width: 962px) {
690   -.imglogo{
691   - position: absolute;
692   - top: 13px;
693   - left: 13px !important;
694   - width: 70px;
695   - height: 24px;
696   -} */
697   -}
698   -@media screen and (max-width: 420px) {
699   - .userSearch .v-text-field .v-label {
700   - line-height: 24px !important;
701   - }
702   - .userSearch .v-label {
703   - font-size: 13px !important;
704   - }
705   - .v-list__tile {
706   - font-size: 14px;
707   - padding: 0 10px;
708   - }
709   - .name {
710   - font-size: 15px;
711   - }
712   -}
713 504 </style>
714 505 \ No newline at end of file
... ...
src/pages/Teachers/teachers.vue
1 1 <template>
2 2 <v-app id="pages-dasboard">
3   - <v-toolbar class="fixcolors" fixed app>
4   - <v-toolbar-title class="ml-0 pl-3">
5   - <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon>
6   - </v-toolbar-title>
7   - <!-- ****** SEARCH ALL Teachers ****** -->
8   - <v-flex xs7 sm3 class="userSearch">
9   - <v-text-field
10   - flat
11   - append-icon="search"
12   - label="Find your Teachers"
13   - v-model="search"
14   - color="white"
15   - dark
16   - ></v-text-field>
17   - </v-flex>
18   - <v-spacer></v-spacer>
19   - <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition">
20   - <v-btn icon large flat slot="activator">
21   - <v-avatar size="40px">
22   - <img src="/static/icon/user.png" />
23   - </v-avatar>
24   - </v-btn>
25   - <v-list class="pa-0">
26   - <v-list-tile
27   - v-for="(item,index) in items"
28   - :to="!item.href ? { name: item.name } : null"
29   - :href="item.href"
30   - @click="item.click"
31   - ripple="ripple"
32   - :disabled="item.disabled"
33   - :target="item.target"
34   - rel="noopener"
35   - :key="index"
36   - >
37   - <v-list-tile-action v-if="item.icon">
38   - <v-icon>{{ item.icon }}</v-icon>
39   - </v-list-tile-action>
40   - <v-list-tile-content>
41   - <v-list-tile-title>{{ item.title }}</v-list-tile-title>
42   - </v-list-tile-content>
43   - </v-list-tile>
44   - </v-list>
45   - </v-menu>
46   - </v-toolbar>
47 3 <v-tabs grow slider-color="black">
48 4 <v-tab
49 5 ripple
... ... @@ -1171,23 +1127,6 @@ export default {
1171 1127 name: "",
1172 1128 email: ""
1173 1129 },
1174   - userName: "",
1175   - items: [
1176   - {
1177   - href: "/changepassword",
1178   - title: "Change Password",
1179   - click: e => {
1180   - console.log(e);
1181   - }
1182   - },
1183   - {
1184   - href: "#",
1185   - title: "Logout",
1186   - click: e => {
1187   - window.getApp.$emit("APP_LOGOUT");
1188   - }
1189   - }
1190   - ]
1191 1130 }),
1192 1131 watch: {
1193 1132 menu(val) {
... ... @@ -1247,10 +1186,13 @@ export default {
1247 1186 this.showLoader = false;
1248 1187 // console.log("getTeacherList=====>",this.desserts)
1249 1188 })
1250   - .catch(err => {
1251   - // console.log("err====>", err);
  1189 + .catch(error => {
1252 1190 this.showLoader = false;
1253   - // this.$router.replace({ path: "/" });
  1191 + if (error.response.status === 401) {
  1192 + this.$router.replace({ path: "/" });
  1193 + this.$store.dispatch("setToken", null);
  1194 + this.$store.dispatch("Id", null);
  1195 + }
1254 1196 });
1255 1197 },
1256 1198 editItem(item) {
... ... @@ -1321,9 +1263,6 @@ export default {
1321 1263 close1() {
1322 1264 this.dialog1 = false;
1323 1265 },
1324   - // close2() {
1325   - // this.dialog2 = false;
1326   - // },
1327 1266 submit() {
1328 1267 if (this.$refs.form.validate()) {
1329 1268 let addTeacher = {
... ... @@ -1367,8 +1306,6 @@ export default {
1367 1306 });
1368 1307 }
1369 1308 },
1370   - mail() {},
1371   - download() {},
1372 1309 clear() {
1373 1310 this.$refs.form.reset();
1374 1311 },
... ... @@ -1409,94 +1346,24 @@ export default {
1409 1346 console.log(error);
1410 1347 this.loading = false;
1411 1348 });
1412   - },
1413   - handleDrawerToggle() {
1414   - window.getApp.$emit("APP_DRAWER_TOGGLED");
1415   - },
1416   - handleFullScreen() {
1417   - Util.toggleFullScreen();
1418 1349 }
1419 1350 },
1420 1351 mounted() {
1421 1352 this.getTeacherList();
1422   - // console.log("Id",this.$store.state.id)
1423   - // console.log("token",this.$store.state.token)
1424 1353 },
1425   - computed: {
1426   - toolbarColor() {
1427   - return this.$vuetify.options.extra.mainNav;
1428   - }
  1354 + created() {
  1355 + this.$root.$on("app:search", search => {
  1356 + this.search = search;
  1357 + });
  1358 + },
  1359 + beforeDestroy() {
  1360 + // dont forget to remove the listener
  1361 + this.$root.$off("app:search");
1429 1362 }
1430 1363 };
1431 1364 </script>
1432 1365 <style scoped>
1433   -.v-tabs__div {
1434   - text-transform: none;
1435   -}
1436   -.v-input__prepend-outer {
1437   - margin-right: 0px !important;
1438   -}
1439   -.v-card__actions .v-btn {
1440   - margin: 0 15px;
1441   - min-width: 120px;
1442   -}
1443   -.primary {
1444   - background-color: #aaa !important;
1445   - border-color: #aaa !important;
1446   -}
1447   -h4 {
1448   - background-repeat: no-repeat;
1449   - padding: 8px;
1450   - margin: auto;
1451   - font-size: 25px;
1452   -}
1453   -#name {
1454   - position: absolute;
1455   - left: 100px;
1456   - top: 17px;
1457   -}
1458   -#icon {
1459   - position: absolute;
1460   - right: 8px;
1461   - top: 8px;
1462   -}
1463   -#m {
1464   - position: relative;
1465   - left: 135px;
1466   - top: -15px;
1467   -}
1468   -#G {
1469   - position: absolute;
1470   - top: 38px;
1471   - color: white;
1472   -}
1473   -#bt {
1474   - position: relative;
1475   - top: -20px;
1476   - left: 115px;
1477   -}
1478   -#e {
1479   - position: relative;
1480   - top: 5px;
1481   - right: -30px;
1482   - height: 17px;
1483   - cursor: pointer;
1484   -}
1485   -#d {
1486   - position: relative;
1487   - top: 5px;
1488   - right: -70px;
1489   - height: 17px;
1490   - cursor: pointer;
1491   -}
1492   -#td {
1493   - border: 1px solid #dddddd;
1494   - text-align: left;
1495   - padding: 8px;
1496   -}
1497   -#dialog {
1498   - height: 550px;
1499   -}
  1366 +
1500 1367 .active {
1501 1368 background-color: black;
1502 1369 color: white !important;
... ... @@ -1504,83 +1371,4 @@ h4 {
1504 1371 .activebtn {
1505 1372 color: black !important;
1506 1373 }
1507   -#flex {
1508   - height: 300px;
1509   -}
1510   -.v-tabs__item a {
1511   - font-size: 16px !important;
1512   -}
1513   -@media screen and (max-width: 769px) {
1514   - .top {
1515   - margin-top: 0 !important;
1516   - }
1517   - .userSearch .v-icon {
1518   - font-size: 20px !important;
1519   - margin-left: 20px;
1520   - }
1521   -}
1522   -
1523   -@media screen and (max-width: 380px) {
1524   - .pl-3 {
1525   - padding-left: 0px !important;
1526   - }
1527   - .right {
1528   - float: none !important;
1529   - }
1530   - .subheading {
1531   - font-size: 14px !important;
1532   - }
1533   - .v-card__actions .v-btn {
1534   - margin: 0 0px;
1535   - min-width: 100px;
1536   - }
1537   - .presentInput {
1538   - padding-left: 48px !important;
1539   - }
1540   - /* .searchIcon .v-icon {
1541   - font-size: 20px;
1542   - margin-left: 20px;
1543   -} */
1544   - .subheading {
1545   - font-size: 12px !important;
1546   - }
1547   - h5 {
1548   - font-size: 13px;
1549   - }
1550   - .pl-4 {
1551   - padding-left: 0px !important;
1552   - }
1553   -}
1554   -.v-icon {
1555   - font-size: 30px;
1556   -}
1557   -@media screen and (min-width: 1270px) {
1558   - .hide {
1559   - display: none;
1560   - }
1561   - /* }
1562   -@media screen and (max-width: 962px) {
1563   -.imglogo{
1564   - position: absolute;
1565   - top: 13px;
1566   - left: 13px !important;
1567   - width: 70px;
1568   - height: 24px;
1569   -} */
1570   -}
1571   -@media screen and (max-width: 420px) {
1572   - .userSearch .v-text-field .v-label {
1573   - line-height: 24px !important;
1574   - }
1575   - .userSearch .v-label {
1576   - font-size: 13px !important;
1577   - }
1578   - .v-list__tile {
1579   - font-size: 14px;
1580   - padding: 0 10px;
1581   - }
1582   - .name {
1583   - font-size: 15px;
1584   - }
1585   -}
1586 1374 </style>
1587 1375 \ No newline at end of file
... ...
src/pages/TimeTable/timeTable.vue
1 1 <template>
2 2 <v-app id="pages-dasboard">
3   - <v-toolbar class="fixcolors" fixed app>
4   - <v-toolbar-title class="ml-0 pl-3">
5   - <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon>
6   - </v-toolbar-title>
7   - <!-- ****** SEARCH ALL EXISTING TIME-TABLE ****** -->
8   - <v-flex xs7 sm3 class="userSearch">
9   - <v-text-field
10   - flat
11   - append-icon="search"
12   - label="Find your Time Talbe"
13   - v-model="search"
14   - color="white"
15   - dark
16   - ></v-text-field>
17   - </v-flex>
18   - <v-spacer></v-spacer>
19   - <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition">
20   - <v-btn icon large flat slot="activator">
21   - <v-avatar size="40px">
22   - <img src="/static/icon/user.png" />
23   - </v-avatar>
24   - </v-btn>
25   - <v-list class="pa-0">
26   - <v-list-tile
27   - v-for="(item,index) in items"
28   - :to="!item.href ? { name: item.name } : null"
29   - :href="item.href"
30   - @click="item.click"
31   - ripple="ripple"
32   - :disabled="item.disabled"
33   - :target="item.target"
34   - rel="noopener"
35   - :key="index"
36   - >
37   - <v-list-tile-action v-if="item.icon">
38   - <v-icon>{{ item.icon }}</v-icon>
39   - </v-list-tile-action>
40   - <v-list-tile-content>
41   - <v-list-tile-title>{{ item.title }}</v-list-tile-title>
42   - </v-list-tile-content>
43   - </v-list-tile>
44   - </v-list>
45   - </v-menu>
46   - </v-toolbar>
47 3 <v-tabs grow slider-color="black">
48 4 <v-tab
49 5 ripple
... ... @@ -554,10 +510,7 @@
554 510 @click="deleteItem(props.item)"
555 511 src="/static/icon/delete1.png"
556 512 />
557   - <v-icon
558   - color="black"
559   - @click="addSchedule(props.item._id)"
560   - >add_circle_outline</v-icon>
  513 + <v-icon color="black" @click="addSchedule(props.item._id)">add_circle_outline</v-icon>
561 514 </span>
562 515 </td>
563 516 </tr>
... ... @@ -961,22 +914,6 @@ export default {
961 914 menu5: false,
962 915 menu6: false,
963 916 scheduleDayId: "",
964   - items: [
965   - {
966   - href: "/changepassword",
967   - title: "Change Password",
968   - click: e => {
969   - console.log(e);
970   - }
971   - },
972   - {
973   - href: "#",
974   - title: "Logout",
975   - click: e => {
976   - window.getApp.$emit("APP_LOGOUT");
977   - }
978   - }
979   - ]
980 917 }),
981 918 methods: {
982 919 findTimeTable() {
... ... @@ -1041,7 +978,6 @@ export default {
1041 978 },
1042 979  
1043 980 onFilePicked(e) {
1044   - // console.log(e)
1045 981 const files = e.target.files;
1046 982 this.imageData.upload = e.target.files[0];
1047 983 if (files[0] !== undefined) {
... ... @@ -1055,8 +991,6 @@ export default {
1055 991 this.imageUrl = fr.result;
1056 992 this.imageFile = files[0]; // this is an image file that can be sent to server...
1057 993 this.imageData.imageUrl = URL.createObjectURL(this.imageFile);
1058   - // console.log("upload=======>", this.imageData.imageUrl);
1059   - // console.log("imageFile", this.imageFile);
1060 994 });
1061 995 } else {
1062 996 this.imageName = "";
... ... @@ -1101,7 +1035,6 @@ export default {
1101 1035 this.dialogUpdateLectures = true;
1102 1036 },
1103 1037 addLecture(scheduleId, timeTableId) {
1104   - // console.log('timeToAdd, classToAdd', scheduleId, timeTableId);
1105 1038 this.addlectures.scheduleId = scheduleId;
1106 1039 this.addlectures.timeTableId = timeTableId;
1107 1040 this.dialogAddLecture = true;
... ... @@ -1262,8 +1195,6 @@ export default {
1262 1195 });
1263 1196 }
1264 1197 },
1265   - mail() {},
1266   - download() {},
1267 1198 clear() {
1268 1199 this.$refs.form.reset();
1269 1200 },
... ... @@ -1297,12 +1228,6 @@ export default {
1297 1228 });
1298 1229 this.close();
1299 1230 },
1300   - handleDrawerToggle() {
1301   - window.getApp.$emit("APP_DRAWER_TOGGLED");
1302   - },
1303   - handleFullScreen() {
1304   - Util.toggleFullScreen();
1305   - },
1306 1231 deleteTimeTable(timeToDelete, deleteLectures) {
1307 1232 let deleteLecture = {
1308 1233 lectureId: timeToDelete._id
... ... @@ -1332,7 +1257,7 @@ export default {
1332 1257 this.dialogSchedule = true;
1333 1258 },
1334 1259 submitSchedule() {
1335   - let scheduleDayData = {
  1260 + let scheduleDayData = {
1336 1261 timeTableId: this.scheduleDayId,
1337 1262 day: this.schedule.selectDay
1338 1263 };
... ... @@ -1381,85 +1306,18 @@ export default {
1381 1306 // console.log("err====>", err);
1382 1307 });
1383 1308 },
1384   - computed: {
1385   - toolbarColor() {
1386   - return this.$vuetify.options.extra.mainNav;
1387   - }
  1309 + created() {
  1310 + this.$root.$on("app:search", search => {
  1311 + this.search = search;
  1312 + });
  1313 + },
  1314 + beforeDestroy() {
  1315 + // dont forget to remove the listener
  1316 + this.$root.$off("app:search");
1388 1317 }
1389 1318 };
1390 1319 </script>
1391 1320 <style scoped>
1392   -.theme--light .v-label,
1393   -.application .theme--light.v-label {
1394   - color: black;
1395   -}
1396   -.v-tabs__div {
1397   - text-transform: none;
1398   -}
1399   -.v-input__prepend-outer {
1400   - margin-right: 0px !important;
1401   -}
1402   -.v-card__actions .v-btn {
1403   - margin: 0 15px;
1404   - min-width: 120px;
1405   -}
1406   -.primary {
1407   - background-color: #aaa !important;
1408   - border-color: #aaa !important;
1409   -}
1410   -h4 {
1411   - background-repeat: no-repeat;
1412   - padding: 8px;
1413   - margin: auto;
1414   - font-size: 25px;
1415   -}
1416   -#name {
1417   - position: absolute;
1418   - left: 100px;
1419   - top: 17px;
1420   -}
1421   -#icon {
1422   - position: absolute;
1423   - right: 8px;
1424   - top: 8px;
1425   -}
1426   -#m {
1427   - position: relative;
1428   - left: 135px;
1429   - top: -15px;
1430   -}
1431   -#G {
1432   - position: absolute;
1433   - top: 38px;
1434   - color: white;
1435   -}
1436   -#bt {
1437   - position: relative;
1438   - top: -20px;
1439   - left: 115px;
1440   -}
1441   -#e {
1442   - position: relative;
1443   - top: 5px;
1444   - right: -30px;
1445   - height: 17px;
1446   - cursor: pointer;
1447   -}
1448   -#d {
1449   - position: relative;
1450   - top: 5px;
1451   - right: -70px;
1452   - height: 17px;
1453   - cursor: pointer;
1454   -}
1455   -#td {
1456   - border: 1px solid #dddddd;
1457   - text-align: left;
1458   - padding: 8px;
1459   -}
1460   -#dialog {
1461   - height: 550px;
1462   -}
1463 1321 .active {
1464 1322 background-color: black;
1465 1323 color: white !important;
... ... @@ -1467,73 +1325,4 @@ h4 {
1467 1325 .activebtn {
1468 1326 color: black !important;
1469 1327 }
1470   -#flex {
1471   - height: 300px;
1472   -}
1473   -.top {
1474   - margin-top: 100px;
1475   -}
1476   -.v-tabs__item a {
1477   - font-size: 16px !important;
1478   -}
1479   -.table-td {
1480   - padding: 0px 42px !important;
1481   -}
1482   -@media screen and (max-width: 769px) {
1483   - .top {
1484   - margin-top: 0 !important;
1485   - }
1486   - .userSearch .v-icon {
1487   - font-size: 20px !important;
1488   - margin-left: 20px;
1489   - }
1490   -}
1491   -@media screen and (max-width: 380px) {
1492   - .pl-3 {
1493   - padding-left: 0px !important;
1494   - }
1495   - /* .right {
1496   - float: none !important;
1497   - } */
1498   - .subheading {
1499   - font-size: 14px !important;
1500   - }
1501   - .v-card__actions .v-btn {
1502   - margin: 0 0px;
1503   - min-width: 100px;
1504   - }
1505   - /* .searchIcon .v-icon {
1506   - font-size: 20px;
1507   - margin-left: 20px;
1508   - } */
1509   - .subheading {
1510   - font-size: 12px !important;
1511   - }
1512   - h5 {
1513   - font-size: 13px;
1514   - }
1515   -}
1516   -.v-icon {
1517   - font-size: 30px;
1518   -}
1519   -@media screen and (min-width: 1270px) {
1520   - .hide {
1521   - display: none;
1522   - }
1523   -}
1524   -@media screen and (max-width: 420px) {
1525   - .userSearch .v-text-field .v-label {
1526   - line-height: 24px !important;
1527   - }
1528   - .userSearch .v-label {
1529   - font-size: 13px !important;
1530   - }
1531   - .v-list__tile {
1532   - font-size: 14px;
1533   - padding: 0 10px;
1534   - }
1535   - .name {
1536   - font-size: 15px;
1537   - }
1538   -}
1539 1328 </style>
1540 1329 \ No newline at end of file
... ...
src/pages/socialMedia/socialMedia.vue
1 1 <template>
2 2 <v-app id="pages-dasboard">
3   - <v-toolbar class="fixcolors" fixed app>
4   - <v-toolbar-title class="ml-0 pl-3">
5   - <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon>
6   - </v-toolbar-title>
7   -
8   - <!-- ****** SEARCH ALL EXISTING REMINDER ****** -->
9   -
10   - <v-flex xs7 sm3 class="userSearch">
11   - <v-text-field
12   - flat
13   - append-icon="search"
14   - label="Find your Media"
15   - v-model="search"
16   - color="white"
17   - dark
18   - ></v-text-field>
19   - </v-flex>
20   - <v-spacer></v-spacer>
21   - <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition">
22   - <v-btn icon large flat slot="activator">
23   - <v-avatar size="40px">
24   - <img src="/static/icon/user.png" />
25   - </v-avatar>
26   - </v-btn>
27   - <v-list class="pa-0">
28   - <v-list-tile
29   - v-for="(item,index) in items"
30   - :to="!item.href ? { name: item.name } : null"
31   - :href="item.href"
32   - @click="item.click"
33   - ripple="ripple"
34   - :disabled="item.disabled"
35   - :target="item.target"
36   - rel="noopener"
37   - :key="index"
38   - >
39   - <v-list-tile-action v-if="item.icon">
40   - <v-icon>{{ item.icon }}</v-icon>
41   - </v-list-tile-action>
42   - <v-list-tile-content>
43   - <v-list-tile-title>{{ item.title }}</v-list-tile-title>
44   - </v-list-tile-content>
45   - </v-list-tile>
46   - </v-list>
47   - </v-menu>
48   - </v-toolbar>
49 3 <v-tabs grow slider-color="black">
50 4 <v-tab
51 5 ripple
... ... @@ -219,11 +173,11 @@
219 173 :search="search"
220 174 >
221 175 <template slot="items" slot-scope="props">
222   - <td id="td" class="text-xs-center">{{ props.index}}</td>
223   - <td id="td" class="text-xs-center">{{ props.item.type}}</td>
224   - <td id="td" class="text-xs-center">{{ props.item.linkUrl}}</td>
  176 + <td id="tabeleData" class="text-xs-center">{{ props.index}}</td>
  177 + <td id="tabeleData" class="text-xs-center">{{ props.item.type}}</td>
  178 + <td id="tabeleData" class="text-xs-center">{{ props.item.linkUrl}}</td>
225 179  
226   - <td class="text-xs-center">
  180 + <td id="tabeleData" class="text-xs-center">
227 181 <span>
228 182 <img
229 183 style="cursor:pointer; width:25px; height:18px; "
... ... @@ -409,33 +363,17 @@ export default {
409 363 {
410 364 name: "You Tube",
411 365 value: "YOUTUBE"
412   - },
413   - {
414   - name: "Instagram",
415   - value: "INSTAGRAM"
416   - },
417   - {
418   - name: "Linkedin",
419   - value: "LINKEDIN"
420 366 }
  367 + // {
  368 + // name: "Instagram",
  369 + // value: "INSTAGRAM"
  370 + // },
  371 + // {
  372 + // name: "Linkedin",
  373 + // value: "LINKEDIN"
  374 + // }
421 375 ],
422   - userName: "",
423   - items: [
424   - {
425   - href: "/changepassword",
426   - title: "Change Password",
427   - click: e => {
428   - console.log(e);
429   - }
430   - },
431   - {
432   - href: "#",
433   - title: "Logout",
434   - click: e => {
435   - window.getApp.$emit("APP_LOGOUT");
436   - }
437   - }
438   - ]
  376 + userName: ""
439 377 }),
440 378 methods: {
441 379 // pickFile() {
... ... @@ -479,7 +417,7 @@ export default {
479 417 })
480 418 .catch(err => {
481 419 this.showLoader = false;
482   - this.$router.replace({ path: "/" });
  420 + // this.$router.replace({ path: "/" });
483 421 });
484 422 },
485 423 editItem(item) {
... ... @@ -569,91 +507,29 @@ export default {
569 507 .catch(error => {
570 508 console.log(error);
571 509 });
572   - },
573   - handleDrawerToggle() {
574   - window.getApp.$emit("APP_DRAWER_TOGGLED");
575   - },
576   - handleFullScreen() {
577   - Util.toggleFullScreen();
578 510 }
579 511 },
580 512 mounted() {
581 513 this.getSocialMedia();
582 514 },
583   - computed: {
584   - toolbarColor() {
585   - return this.$vuetify.options.extra.mainNav;
586   - }
  515 + created() {
  516 + this.$root.$on("app:search", search => {
  517 + this.search = search;
  518 + });
  519 + },
  520 + beforeDestroy() {
  521 + // dont forget to remove the listener
  522 + this.$root.$off("app:search");
587 523 }
588 524 };
589 525 </script>
590 526 <style scoped>
591   -.v-tabs__div {
592   - text-transform: none;
593   -}
594   -.v-input__prepend-outer {
595   - margin-right: 0px !important;
596   -}
597   -.v-card__actions .v-btn {
598   - margin: 0 15px;
599   - min-width: 120px;
600   -}
601   -.primary {
602   - background-color: #aaa !important;
603   - border-color: #aaa !important;
604   -}
605   -h4 {
606   - background-repeat: no-repeat;
607   - padding: 8px;
608   - margin: auto;
609   - font-size: 25px;
610   -}
611   -#name {
612   - position: absolute;
613   - left: 100px;
614   - top: 17px;
615   -}
616   -#icon {
617   - position: absolute;
618   - right: 8px;
619   - top: 8px;
620   -}
621   -#m {
622   - position: relative;
623   - left: 135px;
624   - top: -15px;
625   -}
626   -#G {
627   - position: absolute;
628   - top: 38px;
629   - color: white;
630   -}
631   -#bt {
632   - position: relative;
633   - top: -20px;
634   - left: 115px;
635   -}
636   -#e {
637   - position: relative;
638   - top: 5px;
639   - right: -30px;
640   - height: 17px;
641   - cursor: pointer;
642   -}
643   -#d {
644   - position: relative;
645   - top: 5px;
646   - right: -70px;
647   - height: 17px;
648   - cursor: pointer;
649   -}
650   -#td {
  527 +
  528 +#tabeleData {
651 529 border: 1px solid #dddddd;
652 530 text-align: left;
653   - padding: 8px;
654   -}
655   -#dialog {
656   - height: 550px;
  531 + padding: 8px 0px;
  532 + max-width: 200px !important;
657 533 }
658 534 .active {
659 535 background-color: black;
... ... @@ -662,79 +538,4 @@ h4 {
662 538 .activebtn {
663 539 color: black !important;
664 540 }
665   -#flex {
666   - height: 300px;
667   -}
668   -.top {
669   - margin-top: 100px;
670   -}
671   -.v-tabs__item a {
672   - font-size: 16px !important;
673   -}
674   -@media screen and (max-width: 769px) {
675   - .top {
676   - margin-top: 0 !important;
677   - }
678   - .userSearch .v-icon {
679   - font-size: 20px !important;
680   - margin-left: 20px;
681   - }
682   -}
683   -@media screen and (max-width: 380px) {
684   - .right {
685   - float: none !important;
686   - }
687   - .subheading {
688   - font-size: 14px !important;
689   - }
690   - .v-card__actions .v-btn {
691   - margin: 0 0px;
692   - min-width: 100px;
693   - }
694   - /* .searchIcon .v-icon {
695   - font-size: 20px;
696   - margin-left: 20px;
697   -} */
698   - .subheading {
699   - font-size: 12px !important;
700   - }
701   - h5 {
702   - font-size: 13px;
703   - }
704   -}
705   -.v-icon {
706   - font-size: 30px;
707   -}
708   -@media screen and (min-width: 1270px) {
709   - .hide {
710   - display: none;
711   - }
712   - /* }
713   -@media screen and (max-width: 962px) {
714   -.imglogo{
715   - position: absolute;
716   - top: 13px;
717   - left: 13px !important;
718   - width: 70px;
719   - height: 24px;
720   -} */
721   -}
722   -@media screen and (max-width: 420px) {
723   - .pl-3 {
724   - padding-left: 0px !important;
725   - }
726   - .userSearch .v-text-field .v-label {
727   - line-height: 24px !important;
728   - }
729   - .userSearch .v-label {
730   - font-size: 13px !important;
731   - }
732   - .v-list__tile {
733   - font-size: 14px;
734   - padding: 0 10px;
735   - }
736   - .name {
737   - font-size: 15px;
738   - }
739   -}
740 541 </style>
741 542 \ No newline at end of file
... ...
static/css/custom.css
... ... @@ -26,11 +26,186 @@
26 26 z-index: 999;
27 27 }
28 28  
  29 +.profile-image-wrapper {
  30 + position: relative;
  31 +}
  32 +
  33 +.edit-profile-icon {
  34 + position: absolute;
  35 + right: 15px;
  36 + top: 15px;
  37 + cursor: pointer;
  38 +}
  39 +
  40 +.profile-image-wrapper>.edit-profile-icon {
  41 + right: 10%;
  42 + top: 0%;
  43 + margin-top: 8px;
  44 + border-radius: 50%;
  45 + padding: 7px;
  46 + font-size: 20px;
  47 +}
  48 +
29 49 .loader>div {
30 50 position: relative;
31 51 top: calc(50% - 16px);
32 52 }
33 53  
  54 +.v-tabs__div {
  55 + text-transform: none !important;
  56 +}
  57 +
  58 +.v-input__prepend-outer {
  59 + margin-right: 0px !important;
  60 +}
  61 +
  62 +.v-card__actions .v-btn {
  63 + margin: 0 15px !important;
  64 + min-width: 120px !important;
  65 +}
  66 +
  67 +.primary {
  68 + background-color: #aaa !important;
  69 + border-color: #aaa !important;
  70 +}
  71 +
  72 +h4 {
  73 + background-repeat: no-repeat;
  74 + padding: 8px;
  75 + margin: auto;
  76 + font-size: 25px;
  77 +}
  78 +
  79 +#name {
  80 + position: absolute;
  81 + left: 100px;
  82 + top: 17px;
  83 +}
  84 +
  85 +#icon {
  86 + position: absolute;
  87 + right: 8px;
  88 + top: 8px;
  89 +}
  90 +
  91 +#m {
  92 + position: relative;
  93 + left: 135px;
  94 + top: -15px;
  95 +}
  96 +
  97 +#G {
  98 + position: absolute;
  99 + top: 38px;
  100 + color: white;
  101 +}
  102 +
  103 +#bt {
  104 + position: relative;
  105 + top: -20px;
  106 + left: 115px;
  107 +}
  108 +
  109 +#e {
  110 + position: relative;
  111 + top: 5px;
  112 + right: -30px;
  113 + height: 17px;
  114 + cursor: pointer;
  115 +}
  116 +
  117 +#d {
  118 + position: relative;
  119 + top: 5px;
  120 + right: -70px;
  121 + height: 17px;
  122 + cursor: pointer;
  123 +}
  124 +
  125 +#indexId {
  126 + padding: 0 0px !important;
  127 +}
  128 +
  129 +#td {
  130 + border: 1px solid #dddddd;
  131 + text-align: left;
  132 + padding: 8px;
  133 +}
  134 +
  135 +#dialog {
  136 + height: 550px;
  137 +}
  138 +
  139 +#flex {
  140 + height: 300px;
  141 +}
  142 +
  143 +.top {
  144 + margin-top: 100px;
  145 +}
  146 +
  147 +.v-tabs__item a {
  148 + font-size: 16px !important;
  149 +}
  150 +
  151 +@media screen and (max-width: 769px) {
  152 + .top {
  153 + margin-top: 0 !important;
  154 + }
  155 + .userSearch .v-icon {
  156 + font-size: 20px !important;
  157 + margin-left: 20px;
  158 + }
  159 +}
  160 +
  161 +@media screen and (max-width: 380px) {
  162 + .pl-3 {
  163 + padding-left: 0px !important;
  164 + }
  165 + .right {
  166 + float: none !important;
  167 + }
  168 + .subheading {
  169 + font-size: 14px !important;
  170 + }
  171 + .v-card__actions .v-btn {
  172 + margin: 0 0px;
  173 + min-width: 100px;
  174 + }
  175 + .subheading {
  176 + font-size: 12px !important;
  177 + }
  178 + h5 {
  179 + font-size: 13px;
  180 + }
  181 +}
  182 +
  183 +.v-icon {
  184 + font-size: 30px;
  185 +}
  186 +
  187 +@media screen and (min-width: 1270px) {
  188 + .hide {
  189 + display: none;
  190 + }
  191 +}
  192 +
  193 +@media screen and (max-width: 420px) {
  194 + .userSearch .v-text-field .v-label {
  195 + line-height: 24px !important;
  196 + }
  197 + .userSearch .v-label {
  198 + font-size: 13px !important;
  199 + }
  200 + .v-list__tile {
  201 + font-size: 14px !important;
  202 + padding: 0 10px !important;
  203 + }
  204 + .name {
  205 + font-size: 15px !important;
  206 + }
  207 +}
  208 +
34 209 @media screen and (max-width: 600px) {
35 210 img {
36 211 /* position: absolute; */
... ...