Commit e3e2a04c6184db753d7a8bde48c95adff0498ad0
1 parent
4d962bb59d
Exists in
master
and in
3 other branches
first commit
Showing
16 changed files
with
1018 additions
and
575 deletions
Show diff stats
config/index.js
1 | 'use strict' | 1 | 'use strict' |
2 | // Template version: 1.3.1 | 2 | // Template version: 1.3.1 |
3 | // see http://vuejs-templates.github.io/webpack for documentation. | 3 | // see http://vuejs-templates.github.io/webpack for documentation. |
4 | 4 | ||
5 | const path = require('path') | 5 | const path = require('path') |
6 | 6 | ||
7 | module.exports = { | 7 | module.exports = { |
8 | dev: { | 8 | dev: { |
9 | 9 | ||
10 | // Paths | 10 | // Paths |
11 | assetsSubDirectory: 'static', | 11 | assetsSubDirectory: 'static', |
12 | assetsPublicPath: '/', | 12 | assetsPublicPath: '/', |
13 | proxyTable: { | 13 | proxyTable: { |
14 | // mock api server url | 14 | // mock api server url |
15 | }, | 15 | }, |
16 | 16 | ||
17 | // Various Dev Server settings | 17 | // Various Dev Server settings |
18 | host: 'localhost', // can be overwritten by process.env.HOST | 18 | host: '0.0.0.0', // can be overwritten by process.env.HOST |
19 | port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined | 19 | port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined |
20 | autoOpenBrowser: false, | 20 | autoOpenBrowser: false, |
21 | errorOverlay: true, | 21 | errorOverlay: true, |
22 | notifyOnErrors: true, | 22 | notifyOnErrors: true, |
23 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- | 23 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- |
24 | 24 | ||
25 | // Use Eslint Loader? | 25 | // Use Eslint Loader? |
26 | // If true, your code will be linted during bundling and | 26 | // If true, your code will be linted during bundling and |
27 | // linting errors and warnings will be shown in the console. | 27 | // linting errors and warnings will be shown in the console. |
28 | useEslint: true, | 28 | useEslint: true, |
29 | // If true, eslint errors and warnings will also be shown in the error overlay | 29 | // If true, eslint errors and warnings will also be shown in the error overlay |
30 | // in the browser. | 30 | // in the browser. |
31 | showEslintErrorsInOverlay: false, | 31 | showEslintErrorsInOverlay: false, |
32 | 32 | ||
33 | /** | 33 | /** |
34 | * Source Maps | 34 | * Source Maps |
35 | */ | 35 | */ |
36 | 36 | ||
37 | // https://webpack.js.org/configuration/devtool/#development | 37 | // https://webpack.js.org/configuration/devtool/#development |
38 | devtool: 'cheap-module-eval-source-map', | 38 | devtool: 'cheap-module-eval-source-map', |
39 | 39 | ||
40 | // If you have problems debugging vue-files in devtools, | 40 | // If you have problems debugging vue-files in devtools, |
41 | // set this to false - it *may* help | 41 | // set this to false - it *may* help |
42 | // https://vue-loader.vuejs.org/en/options.html#cachebusting | 42 | // https://vue-loader.vuejs.org/en/options.html#cachebusting |
43 | cacheBusting: true, | 43 | cacheBusting: true, |
44 | 44 | ||
45 | cssSourceMap: true | 45 | cssSourceMap: true |
46 | }, | 46 | }, |
47 | 47 | ||
48 | build: { | 48 | build: { |
49 | // Template for index.html | 49 | // Template for index.html |
50 | index: path.resolve(__dirname, '../dist/index.html'), | 50 | index: path.resolve(__dirname, '../dist/index.html'), |
51 | 51 | ||
52 | // Paths | 52 | // Paths |
53 | assetsRoot: path.resolve(__dirname, '../dist'), | 53 | assetsRoot: path.resolve(__dirname, '../dist'), |
54 | assetsSubDirectory: 'static', | 54 | assetsSubDirectory: 'static', |
55 | assetsPublicPath: '/', | 55 | assetsPublicPath: '/', |
56 | 56 | ||
57 | /** | 57 | /** |
58 | * Source Maps | 58 | * Source Maps |
59 | */ | 59 | */ |
60 | 60 | ||
61 | productionSourceMap: true, | 61 | productionSourceMap: true, |
62 | // https://webpack.js.org/configuration/devtool/#production | 62 | // https://webpack.js.org/configuration/devtool/#production |
63 | devtool: '#source-map', | 63 | devtool: '#source-map', |
64 | 64 | ||
65 | // Gzip off by default as many popular static hosts such as | 65 | // Gzip off by default as many popular static hosts such as |
66 | // Surge or Netlify already gzip all static assets for you. | 66 | // Surge or Netlify already gzip all static assets for you. |
67 | // Before setting to `true`, make sure to: | 67 | // Before setting to `true`, make sure to: |
68 | // npm install --save-dev compression-webpack-plugin | 68 | // npm install --save-dev compression-webpack-plugin |
69 | productionGzip: false, | 69 | productionGzip: false, |
70 | productionGzipExtensions: ['js', 'css'], | 70 | productionGzipExtensions: ['js', 'css'], |
71 | 71 | ||
72 | // Run the build command with an extra argument to | 72 | // Run the build command with an extra argument to |
73 | // View the bundle analyzer report after build finishes: | 73 | // View the bundle analyzer report after build finishes: |
74 | // `npm run build --report` | 74 | // `npm run build --report` |
75 | // Set to `true` or `false` to always turn it on or off | 75 | // Set to `true` or `false` to always turn it on or off |
76 | bundleAnalyzerReport: process.env.npm_config_report | 76 | bundleAnalyzerReport: process.env.npm_config_report |
77 | } | 77 | } |
78 | } | 78 | } |
79 | 79 |
index.html
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <html> | 2 | <html> |
3 | <head> | 3 | <head> |
4 | <meta charset="utf-8"> | 4 | <meta charset="utf-8"> |
5 | <meta name="viewport" content="width=device-width,initial-scale=1.0"> | 5 | <meta name="viewport" content="width=device-width,initial-scale=1.0"> |
6 | <link href='https://fonts.googleapis.com/css?family=Roboto:300,400,500,700%7CMaterial+Icons' rel="stylesheet"> | 6 | <link href='https://fonts.googleapis.com/css?family=Roboto:300,400,500,700%7CMaterial+Icons' rel="stylesheet"> |
7 | <script src="https://cdn.bootcss.com/echarts/4.0.4/echarts-en.min.js"></script> | 7 | <script src="https://cdn.bootcss.com/echarts/4.0.4/echarts-en.min.js"></script> |
8 | <title>ana</title> | 8 | <title>School Management</title> |
9 | <link rel="shortcut icon" href="/static/ana.png" type="image/x-icon"> | 9 | <link rel="shortcut icon" href="/static/ana.png" type="image/x-icon"> |
10 | <meta name="description" content="Vue Material Admin Template is a | 10 | <meta name="description" content="Vue Material Admin Template is a |
11 | Google Material Design inspired admin dashboard template built with Vue andVuetify."> | 11 | Google Material Design inspired admin dashboard template built with Vue andVuetify."> |
12 | <meta name="keywords" content="admin, dashboard, webapp, template, responsive, material, bootstrap, crm, uikit, framework, backend, app, widgets, premium, file manamger, mail, vue, vuetify, echarts"> | 12 | <meta name="keywords" content="admin, dashboard, webapp, template, responsive, material, bootstrap, crm, uikit, framework, backend, app, widgets, premium, file manamger, mail, vue, vuetify, echarts"> |
13 | <link href="./static/css/custom.css" rel="stylesheet" /> | 13 | <link href="./static/css/custom.css" rel="stylesheet" /> |
14 | </head> | 14 | </head> |
15 | <body> | 15 | <body> |
16 | 16 | ||
17 | <div id="app"></div> | 17 | <div id="app"></div> |
18 | <!-- built files will be auto injected --> | 18 | <!-- built files will be auto injected --> |
19 | <!-- Global site tag (gtag.js) - Google Analytics --> | 19 | <!-- Global site tag (gtag.js) - Google Analytics --> |
20 | <script async src="https://www.googletagmanager.com/gtag/js?id=UA-3881136-11"></script> | 20 | <script async src="https://www.googletagmanager.com/gtag/js?id=UA-3881136-11"></script> |
21 | <script> | 21 | <script> |
22 | window.dataLayer = window.dataLayer || []; | 22 | window.dataLayer = window.dataLayer || []; |
23 | function gtag(){dataLayer.push(arguments);} | 23 | function gtag(){dataLayer.push(arguments);} |
24 | gtag('js', new Date()); | 24 | gtag('js', new Date()); |
25 | gtag('config', 'UA-3881136-11'); | 25 | gtag('config', 'UA-3881136-11'); |
26 | </script> | 26 | </script> |
27 | </body> | 27 | </body> |
28 | 28 | ||
29 | </html> | 29 | </html> |
30 | 30 |
src/Services/http.js
1 | import axios from 'axios' | 1 | import axios from 'axios' |
2 | import store from '@/store/store' | 2 | import store from '@/store/store' |
3 | 3 | ||
4 | export default () => { | 4 | export default () => { |
5 | return axios.create({ | 5 | return axios.create({ |
6 | baseURL:'http://18.208.28.55:3000/v1', | 6 | baseURL:'http://192.168.2.203:8001/v1', |
7 | headers: { | 7 | headers: { |
8 | Authorization: `Bearer ${store.state.token}` | 8 | Authorization: `Bearer ${store.state.token}` |
9 | } | 9 | } |
10 | }) | 10 | }) |
11 | } | 11 | } |
12 | 12 |
src/api/menu.js
1 | const Menu = [ | 1 | const Menu = [ |
2 | // { header: 'Apps' }, | 2 | // { header: 'Apps' }, |
3 | // { | 3 | // { |
4 | // title: 'Dashboard', | 4 | // title: 'Dashboard', |
5 | // group: 'apps', | 5 | // group: 'apps', |
6 | // icon: 'dashboard', | 6 | // icon: 'dashboard', |
7 | // name: 'Dashboard', | 7 | // name: 'Dashboard', |
8 | // }, | 8 | // }, |
9 | // { | 9 | // { |
10 | // title: 'Chat', | 10 | // title: 'Chat', |
11 | // group: 'apps', | 11 | // group: 'apps', |
12 | // icon: 'chat_bubble', | 12 | // icon: 'chat_bubble', |
13 | // target: '_blank', | 13 | // target: '_blank', |
14 | // name: 'Chat', | 14 | // name: 'Chat', |
15 | // }, | 15 | // }, |
16 | // { | 16 | // { |
17 | // title: 'Inbox', | 17 | // title: 'Inbox', |
18 | // group: 'apps', | 18 | // group: 'apps', |
19 | // name: 'Mail', | 19 | // name: 'Mail', |
20 | // target: '_blank', | 20 | // target: '_blank', |
21 | // icon: 'email', | 21 | // icon: 'email', |
22 | // }, | 22 | // }, |
23 | { | 23 | { |
24 | title: 'User', | 24 | title: 'Teachers', |
25 | // group: '', | 25 | // group: '', |
26 | name: 'Dashboard', | 26 | name: 'Dashboard', |
27 | icon: 'face', | 27 | icon: 'group', |
28 | }, | 28 | }, |
29 | 29 | ||
30 | { | 30 | { |
31 | title: 'Health Care Provider', | 31 | title: 'Students', |
32 | // group: 'apps', | 32 | // group: 'apps', |
33 | name: 'Provider', | 33 | name: 'Students', |
34 | icon: 'local_hospital', | 34 | icon: 'school', |
35 | }, | ||
36 | { | ||
37 | title: 'Notification', | ||
38 | // group: 'apps', | ||
39 | name: 'notification', | ||
40 | icon: 'add_alert', | ||
41 | }, | ||
42 | { | ||
43 | title: 'Forum Questions', | ||
44 | // group: 'apps', | ||
45 | name: 'questions', | ||
46 | icon: 'live_help', | ||
47 | }, | 35 | }, |
48 | // { | 36 | // { |
37 | // title: 'Notification', | ||
38 | // name: 'notification', | ||
39 | // icon: 'add_alert', | ||
40 | // }, | ||
41 | // { | ||
42 | // title: 'Forum Questions', | ||
43 | // name: 'questions', | ||
44 | // icon: 'live_help', | ||
45 | // }, | ||
46 | // { | ||
49 | // title: 'Widgets', | 47 | // title: 'Widgets', |
50 | // group: 'widgets', | 48 | // group: 'widgets', |
51 | // component: 'widgets', | 49 | // component: 'widgets', |
52 | // icon: 'widgets', | 50 | // icon: 'widgets', |
53 | // items: [ | 51 | // items: [ |
54 | // { name: 'social', title: 'Social', component: 'components/social' }, | 52 | // { name: 'social', title: 'Social', component: 'components/social' }, |
55 | // { name: 'statistic', title: 'Statistic', badge: 'new', component: 'components/statistic' }, | 53 | // { name: 'statistic', title: 'Statistic', badge: 'new', component: 'components/statistic' }, |
56 | // { name: 'chart', title: 'Chart', component: 'components/chart' }, | 54 | // { name: 'chart', title: 'Chart', component: 'components/chart' }, |
57 | // { name: 'list', title: 'List', component: 'components/widget-list' }, | 55 | // { name: 'list', title: 'List', component: 'components/widget-list' }, |
58 | // // { name: 'post', title: 'Post', component: 'components/widget-post' }, | 56 | // // { name: 'post', title: 'Post', component: 'components/widget-post' }, |
59 | // ] | 57 | // ] |
60 | // }, | 58 | // }, |
61 | // { header: 'UI Elements' }, | 59 | // { header: 'UI Elements' }, |
62 | // { | 60 | // { |
63 | // title: 'General', | 61 | // title: 'General', |
64 | // group: 'components', | 62 | // group: 'components', |
65 | // component: 'components', | 63 | // component: 'components', |
66 | // icon: 'tune', | 64 | // icon: 'tune', |
67 | // items: [ | 65 | // items: [ |
68 | // { name: 'alerts', title: 'Alerts', component: 'components/alerts' }, | 66 | // { name: 'alerts', title: 'Alerts', component: 'components/alerts' }, |
69 | // { name: 'avatars', title: 'Avatars', component: 'components/avatars' }, | 67 | // { name: 'avatars', title: 'Avatars', component: 'components/avatars' }, |
70 | // { name: 'badges', title: 'Badges', component: 'components/badges' }, | 68 | // { name: 'badges', title: 'Badges', component: 'components/badges' }, |
71 | // { name: 'buttons', title: 'Buttons', component: 'components/buttons' }, | 69 | // { name: 'buttons', title: 'Buttons', component: 'components/buttons' }, |
72 | // { name: 'cards', title: 'Cards', component: 'components/cards' }, | 70 | // { name: 'cards', title: 'Cards', component: 'components/cards' }, |
73 | // { name: 'carousels', title: 'Carousels', component: 'components/carousels' }, | 71 | // { name: 'carousels', title: 'Carousels', component: 'components/carousels' }, |
74 | // { name: 'chips', title: 'Chips', component: 'components/chips' }, | 72 | // { name: 'chips', title: 'Chips', component: 'components/chips' }, |
75 | // { name: 'dialogs', title: 'Dialogs', component: 'components/dialogs' }, | 73 | // { name: 'dialogs', title: 'Dialogs', component: 'components/dialogs' }, |
76 | // { name: 'icons', title: 'Icons', component: 'components/icons' }, | 74 | // { name: 'icons', title: 'Icons', component: 'components/icons' }, |
77 | // { name: 'tables', title: 'Data Tables', component: 'components/tables' }, | 75 | // { name: 'tables', title: 'Data Tables', component: 'components/tables' }, |
78 | // { name: 'parallax', title: 'Parallax image', component: 'components/parallax' }, | 76 | // { name: 'parallax', title: 'Parallax image', component: 'components/parallax' }, |
79 | // { name: 'snackbar', title: 'Snackbar', component: 'components/snackbar' }, | 77 | // { name: 'snackbar', title: 'Snackbar', component: 'components/snackbar' }, |
80 | // { name: 'progress', title: 'Progress', component: 'components/progress' }, | 78 | // { name: 'progress', title: 'Progress', component: 'components/progress' }, |
81 | // { name: 'slider', title: 'Slider', component: 'components/sliders' }, | 79 | // { name: 'slider', title: 'Slider', component: 'components/sliders' }, |
82 | // { name: 'tooltip', title: 'Tooltip', component: 'components/tooltips' }, | 80 | // { name: 'tooltip', title: 'Tooltip', component: 'components/tooltips' }, |
83 | // { name: 'pagination', title: 'Pagination', component: 'components/paginations' }, | 81 | // { name: 'pagination', title: 'Pagination', component: 'components/paginations' }, |
84 | // { name: 'typography', title: 'Typography', component: 'components/typography' }, | 82 | // { name: 'typography', title: 'Typography', component: 'components/typography' }, |
85 | // { name: 'color', title: 'Color', component: 'components/color' }, | 83 | // { name: 'color', title: 'Color', component: 'components/color' }, |
86 | 84 | ||
87 | // ] | 85 | // ] |
88 | // }, | 86 | // }, |
89 | // { | 87 | // { |
90 | // title: 'Pickers', | 88 | // title: 'Pickers', |
91 | // group: 'pickers', | 89 | // group: 'pickers', |
92 | // component: 'picker', | 90 | // component: 'picker', |
93 | // icon: 'filter_vintage', | 91 | // icon: 'filter_vintage', |
94 | // items: [ | 92 | // items: [ |
95 | // { name: 'timepicker', title: 'Timepicker', component: 'pickers/timepicker' }, | 93 | // { name: 'timepicker', title: 'Timepicker', component: 'pickers/timepicker' }, |
96 | // { name: 'datepicker', title: 'Datepicker', component: 'pickers/datepicker' }, | 94 | // { name: 'datepicker', title: 'Datepicker', component: 'pickers/datepicker' }, |
97 | 95 | ||
98 | // ] | 96 | // ] |
99 | // }, | 97 | // }, |
100 | // { | 98 | // { |
101 | // title: 'Layout', | 99 | // title: 'Layout', |
102 | // group: 'layout', | 100 | // group: 'layout', |
103 | // component: 'layout', | 101 | // component: 'layout', |
104 | // icon: 'view_compact', | 102 | // icon: 'view_compact', |
105 | // items: [ | 103 | // items: [ |
106 | // { name: 'bottom-sheets', title: 'Bottom panels', component: 'components/bottom-sheets' }, | 104 | // { name: 'bottom-sheets', title: 'Bottom panels', component: 'components/bottom-sheets' }, |
107 | // { name: 'expansion-panels', title: 'Expansion panels', component: 'components/expansion-panels' }, | 105 | // { name: 'expansion-panels', title: 'Expansion panels', component: 'components/expansion-panels' }, |
108 | // { name: 'footer', title: 'Footer', component: 'components/footer' }, | 106 | // { name: 'footer', title: 'Footer', component: 'components/footer' }, |
109 | // { name: 'lists', title: 'Lists', component: 'components/lists' }, | 107 | // { name: 'lists', title: 'Lists', component: 'components/lists' }, |
110 | // { name: 'jumbotrons', title: 'Jumbotrons', badge: 'new', component: 'components/jumbotrons' }, | 108 | // { name: 'jumbotrons', title: 'Jumbotrons', badge: 'new', component: 'components/jumbotrons' }, |
111 | // { name: 'menus', title: 'Menus', component: 'components/menus' }, | 109 | // { name: 'menus', title: 'Menus', component: 'components/menus' }, |
112 | // // { name: 'navigation-drawers', title: 'Navigation drawers', component: 'components/navigation-drawers' }, | 110 | // // { name: 'navigation-drawers', title: 'Navigation drawers', component: 'components/navigation-drawers' }, |
113 | // { name: 'tabs', title: 'Tabs', component: 'components/tabs' }, | 111 | // { name: 'tabs', title: 'Tabs', component: 'components/tabs' }, |
114 | // { name: 'toolbar', title: 'Toolbars', component: 'components/toolbar' }, | 112 | // { name: 'toolbar', title: 'Toolbars', component: 'components/toolbar' }, |
115 | // { name: 'timeline', title: 'Timeline', component: 'components/timeline' }, | 113 | // { name: 'timeline', title: 'Timeline', component: 'components/timeline' }, |
116 | // ] | 114 | // ] |
117 | // }, | 115 | // }, |
118 | // { | 116 | // { |
119 | // title: 'Forms & Controls', | 117 | // title: 'Forms & Controls', |
120 | // group: 'forms', | 118 | // group: 'forms', |
121 | // component: 'forms', | 119 | // component: 'forms', |
122 | // icon: 'edit', | 120 | // icon: 'edit', |
123 | // items: [ | 121 | // items: [ |
124 | // { name: 'basic', title: 'General', component: 'components/basic-forms' }, | 122 | // { name: 'basic', title: 'General', component: 'components/basic-forms' }, |
125 | // { name: 'selects', title: 'Selects', badge: 'new', component: 'components/selects' }, | 123 | // { name: 'selects', title: 'Selects', badge: 'new', component: 'components/selects' }, |
126 | // { name: 'selection-controls', title: 'Selection Controls', component: 'components/selection-controls' }, | 124 | // { name: 'selection-controls', title: 'Selection Controls', component: 'components/selection-controls' }, |
127 | // { name: 'text-fields', title: 'Text Fields', component: 'components/text-fields' }, | 125 | // { name: 'text-fields', title: 'Text Fields', component: 'components/text-fields' }, |
128 | // { name: 'steppers', title: 'Steppers', component: 'components/steppers' }, | 126 | // { name: 'steppers', title: 'Steppers', component: 'components/steppers' }, |
129 | // { name: 'editors', title: 'Editors', component: 'components/editors' }, | 127 | // { name: 'editors', title: 'Editors', component: 'components/editors' }, |
130 | // ] | 128 | // ] |
131 | // }, | 129 | // }, |
132 | // { divider: true }, | 130 | // { divider: true }, |
133 | // { header: 'Extras' }, | 131 | // { header: 'Extras' }, |
134 | // { | 132 | // { |
135 | // title: 'Pages', | 133 | // title: 'Pages', |
136 | // group: 'extra', | 134 | // group: 'extra', |
137 | // icon: 'list', | 135 | // icon: 'list', |
138 | // items: [ | 136 | // items: [ |
139 | // { name: 'Login', title: 'Login', component: 'Login' }, | 137 | // { name: 'Login', title: 'Login', component: 'Login' }, |
140 | // { name: '404', title: '404', component: 'NotFound' }, | 138 | // { name: '404', title: '404', component: 'NotFound' }, |
141 | // { name: '403', title: '403', component: 'AccessDenied' }, | 139 | // { name: '403', title: '403', component: 'AccessDenied' }, |
142 | // { name: '500', title: '500', component: 'ServerError' }, | 140 | // { name: '500', title: '500', component: 'ServerError' }, |
143 | // ] | 141 | // ] |
144 | // }, | 142 | // }, |
145 | ]; | 143 | ]; |
146 | // reorder menu | 144 | // reorder menu |
147 | Menu.forEach((item) => { | 145 | Menu.forEach((item) => { |
148 | if (item.items) { | 146 | if (item.items) { |
src/components/AppDrawer.vue
1 | <template> | 1 | <template> |
2 | <v-navigation-drawer | 2 | <v-navigation-drawer |
3 | id="appDrawer" | 3 | id="appDrawer" |
4 | :mini-variant.sync="mini" | 4 | :mini-variant.sync="mini" |
5 | fixed | 5 | fixed |
6 | :dark="$vuetify.dark" | 6 | :dark="$vuetify.dark" |
7 | app | 7 | app |
8 | v-model="drawer" | 8 | v-model="drawer" |
9 | width="260" | 9 | width="260" |
10 | > | 10 | > |
11 | <v-toolbar color="grey lighten" > | 11 | <v-toolbar color="grey lighten" > |
12 | <img v-bind:src="computeLogo" height="30" class="imgLogo" alt="ana"> | 12 | <!-- <img v-bind:src="computeLogo" height="30" class="imgLogo" alt="ana"> --> |
13 | <h4 class="white--text my-3 ml-4">School-Managament</h4> | ||
13 | <v-toolbar-title class="ml-0 pl-3"> | 14 | <v-toolbar-title class="ml-0 pl-3"> |
14 | </v-toolbar-title> | 15 | </v-toolbar-title> |
15 | </v-toolbar> | 16 | </v-toolbar> |
16 | <vue-perfect-scrollbar class="drawer-menu--scroll" :settings="scrollSettings"> | 17 | <vue-perfect-scrollbar class="drawer-menu--scroll" :settings="scrollSettings"> |
17 | <v-list dense expand> | 18 | <v-list dense expand> |
18 | <template v-for="(item, i) in menus"> | 19 | <template v-for="(item, i) in menus"> |
19 | <!--group with subitems--> | 20 | <!--group with subitems--> |
20 | <v-list-group v-if="item.items" :key="item.name" :group="item.group" :prepend-icon="item.icon" no-action="no-action"> | 21 | <v-list-group v-if="item.items" :key="item.name" :group="item.group" :prepend-icon="item.icon" no-action="no-action"> |
21 | <v-list-tile slot="activator" ripple="ripple"> | 22 | <v-list-tile slot="activator" ripple="ripple"> |
22 | <v-list-tile-content> | 23 | <v-list-tile-content> |
23 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 24 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
24 | </v-list-tile-content> | 25 | </v-list-tile-content> |
25 | </v-list-tile> | 26 | </v-list-tile> |
26 | <template v-for="(subItem, i) in item.items"> | 27 | <template v-for="(subItem, i) in item.items"> |
27 | <!--sub group--> | 28 | <!--sub group--> |
28 | <v-list-group v-if="subItem.items" :key="subItem.name" :group="subItem.group" sub-group="sub-group"> | 29 | <v-list-group v-if="subItem.items" :key="subItem.name" :group="subItem.group" sub-group="sub-group"> |
29 | <v-list-tile slot="activator" ripple="ripple"> | 30 | <v-list-tile slot="activator" ripple="ripple"> |
30 | <v-list-tile-content> | 31 | <v-list-tile-content> |
31 | <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> | 32 | <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> |
32 | </v-list-tile-content> | 33 | </v-list-tile-content> |
33 | </v-list-tile> | 34 | </v-list-tile> |
34 | <v-list-tile v-for="(grand, i) in subItem.children" :key="i" :to="genChildTarget(item, grand)" :href="grand.href" ripple="ripple"> | 35 | <v-list-tile v-for="(grand, i) in subItem.children" :key="i" :to="genChildTarget(item, grand)" :href="grand.href" ripple="ripple"> |
35 | <v-list-tile-content> | 36 | <v-list-tile-content> |
36 | <v-list-tile-title>{{ grand.title }}</v-list-tile-title> | 37 | <v-list-tile-title>{{ grand.title }}</v-list-tile-title> |
37 | </v-list-tile-content> | 38 | </v-list-tile-content> |
38 | </v-list-tile> | 39 | </v-list-tile> |
39 | </v-list-group> | 40 | </v-list-group> |
40 | <!--child item--> | 41 | <!--child item--> |
41 | <v-list-tile v-else :key="i" :to="genChildTarget(item, subItem)" :href="subItem.href" :disabled="subItem.disabled" :target="subItem.target" ripple="ripple"> | 42 | <v-list-tile v-else :key="i" :to="genChildTarget(item, subItem)" :href="subItem.href" :disabled="subItem.disabled" :target="subItem.target" ripple="ripple"> |
42 | <v-list-tile-content> | 43 | <v-list-tile-content> |
43 | <v-list-tile-title><span>{{ subItem.title }}</span></v-list-tile-title> | 44 | <v-list-tile-title><span>{{ subItem.title }}</span></v-list-tile-title> |
44 | </v-list-tile-content> | 45 | </v-list-tile-content> |
45 | <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> | 46 | <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> |
46 | <v-list-tile-action v-if="subItem.action"> | 47 | <v-list-tile-action v-if="subItem.action"> |
47 | <v-icon :class="[subItem.actionClass || 'success--text']">{{ subItem.action }}</v-icon> | 48 | <v-icon :class="[subItem.actionClass || 'success--text']">{{ subItem.action }}</v-icon> |
48 | </v-list-tile-action> | 49 | </v-list-tile-action> |
49 | </v-list-tile> | 50 | </v-list-tile> |
50 | </template> | 51 | </template> |
51 | </v-list-group> | 52 | </v-list-group> |
52 | <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> | 53 | <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> |
53 | <v-divider v-else-if="item.divider" :key="i"></v-divider> | 54 | <v-divider v-else-if="item.divider" :key="i"></v-divider> |
54 | <!--top-level link--> | 55 | <!--top-level link--> |
55 | <v-list-tile v-else :to="!item.href ? { name: item.name } : null" :href="item.href" ripple="ripple" :disabled="item.disabled" :target="item.target" rel="noopener" :key="item.name"> | 56 | <v-list-tile v-else :to="!item.href ? { name: item.name } : null" :href="item.href" ripple="ripple" :disabled="item.disabled" :target="item.target" rel="noopener" :key="item.name"> |
56 | <v-list-tile-action v-if="item.icon"> | 57 | <v-list-tile-action v-if="item.icon"> |
57 | <v-icon>{{ item.icon }}</v-icon> | 58 | <v-icon>{{ item.icon }}</v-icon> |
58 | </v-list-tile-action> | 59 | </v-list-tile-action> |
59 | <v-list-tile-content> | 60 | <v-list-tile-content> |
60 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 61 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
61 | </v-list-tile-content> | 62 | </v-list-tile-content> |
62 | <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> --> | 63 | <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> --> |
63 | <v-list-tile-action v-if="item.subAction"> | 64 | <v-list-tile-action v-if="item.subAction"> |
64 | <v-icon class="success--text">{{ item.subAction }}</v-icon> | 65 | <v-icon class="success--text">{{ item.subAction }}</v-icon> |
65 | </v-list-tile-action> | 66 | </v-list-tile-action> |
66 | <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> --> | 67 | <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> --> |
67 | </v-list-tile> | 68 | </v-list-tile> |
68 | </template> | 69 | </template> |
69 | </v-list> | 70 | </v-list> |
70 | </vue-perfect-scrollbar> | 71 | </vue-perfect-scrollbar> |
71 | </v-navigation-drawer> | 72 | </v-navigation-drawer> |
72 | </template> | 73 | </template> |
73 | <script> | 74 | <script> |
74 | import menu from '@/api/menu'; | 75 | import menu from '@/api/menu'; |
75 | import VuePerfectScrollbar from 'vue-perfect-scrollbar'; | 76 | import VuePerfectScrollbar from 'vue-perfect-scrollbar'; |
76 | export default { | 77 | export default { |
77 | name: 'app-drawer', | 78 | name: 'app-drawer', |
78 | components: { | 79 | components: { |
79 | VuePerfectScrollbar, | 80 | VuePerfectScrollbar, |
80 | }, | 81 | }, |
81 | props: { | 82 | props: { |
82 | expanded: { | 83 | expanded: { |
83 | type: Boolean, | 84 | type: Boolean, |
84 | default: true | 85 | default: true |
85 | }, | 86 | }, |
86 | }, | 87 | }, |
87 | data: () => ({ | 88 | data: () => ({ |
88 | mini: false, | 89 | mini: false, |
89 | drawer: true, | 90 | drawer: true, |
90 | menus: menu, | 91 | menus: menu, |
91 | scrollSettings: { | 92 | scrollSettings: { |
92 | maxScrollbarLength: 160 | 93 | maxScrollbarLength: 160 |
93 | } | 94 | } |
94 | }), | 95 | }), |
95 | computed: { | 96 | computed: { |
96 | computeGroupActive () { | 97 | computeGroupActive () { |
97 | return true; | 98 | return true; |
98 | }, | 99 | }, |
99 | computeLogo () { | 100 | // computeLogo () { |
100 | return '/static/ana@2x.png'; | 101 | // return '/static/ana@2x.png'; |
101 | }, | 102 | // }, |
102 | 103 | ||
103 | sideToolbarColor () { | 104 | sideToolbarColor () { |
104 | return this.$vuetify.options.extra.sideNav; | 105 | return this.$vuetify.options.extra.sideNav; |
105 | } | 106 | } |
106 | }, | 107 | }, |
107 | created () { | 108 | created () { |
108 | window.getApp.$on('APP_DRAWER_TOGGLED', () => { | 109 | window.getApp.$on('APP_DRAWER_TOGGLED', () => { |
109 | this.drawer = (!this.drawer); | 110 | this.drawer = (!this.drawer); |
110 | }); | 111 | }); |
111 | }, | 112 | }, |
112 | 113 | ||
113 | 114 | ||
114 | methods: { | 115 | methods: { |
115 | genChildTarget (item, subItem) { | 116 | genChildTarget (item, subItem) { |
116 | if (subItem.href) return; | 117 | if (subItem.href) return; |
117 | if (subItem.component) { | 118 | if (subItem.component) { |
118 | return { | 119 | return { |
119 | name: subItem.component, | 120 | name: subItem.component, |
120 | }; | 121 | }; |
121 | } | 122 | } |
122 | return { name: `${item.group}/${(subItem.name)}` }; | 123 | return { name: `${item.group}/${(subItem.name)}` }; |
123 | }, | 124 | }, |
124 | } | 125 | } |
125 | }; | 126 | }; |
126 | </script> | 127 | </script> |
127 | 128 | ||
128 | 129 | ||
129 | <style lang="stylus"> | 130 | <style lang="stylus"> |
130 | // @import '../../node_modules/vuetify/src/stylus/settings/_elevations.styl'; | 131 | // @import '../../node_modules/vuetify/src/stylus/settings/_elevations.styl'; |
131 | 132 | ||
132 | #appDrawer | 133 | #appDrawer |
133 | overflow: hidden | 134 | overflow: hidden |
134 | .drawer-menu--scroll | 135 | .drawer-menu--scroll |
135 | height: calc(100vh - 48px) | 136 | height: calc(100vh - 48px) |
136 | overflow: auto | 137 | overflow: auto |
137 | .v-list--dense .v-list__tile:not(.v-list__tile--avatar) { | 138 | .v-list--dense .v-list__tile:not(.v-list__tile--avatar) { |
138 | height: 60px; | 139 | height: 60px; |
139 | font-size:17px; | 140 | font-size:17px; |
140 | } | 141 | } |
141 | .v-list__tile__action { | 142 | .v-list__tile__action { |
142 | min-width:36px; | 143 | min-width:36px; |
143 | } | 144 | } |
144 | .v-list__tile.primary--text { | 145 | .v-list__tile.primary--text { |
145 | color:black !important; | 146 | color:black !important; |
146 | border-left: 4px solid black; | 147 | border-left: 4px solid black; |
147 | border-radius: 4px; | 148 | border-radius: 4px; |
148 | } | 149 | } |
149 | @media screen and (max-width: 420px) { | 150 | @media screen and (max-width: 420px) { |
150 | .v-list--dense .v-list__tile:not(.v-list__tile--avatar) { | 151 | .v-list--dense .v-list__tile:not(.v-list__tile--avatar) { |
151 | font-size: 14px; | 152 | font-size: 14px; |
152 | } | 153 | } |
153 | .imgLogo{ | 154 | .imgLogo{ |
154 | height: 22px; | 155 | height: 22px; |
155 | width: 62px; | 156 | width: 62px; |
156 | } | 157 | } |
157 | } | 158 | } |
158 | </style> | 159 | </style> |
159 | 160 |
src/components/AppToolbar.vue
1 | <template> | 1 | <template> |
2 | <v-toolbar | 2 | <v-toolbar |
3 | color="grey" | 3 | color="grey" |
4 | fixed | 4 | fixed |
5 | app | 5 | app |
6 | > | 6 | > |
7 | <v-toolbar-title class="ml-0 pl-3"> | 7 | <v-toolbar-title class="ml-0 pl-3"> |
8 | <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon> | 8 | <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon> |
9 | </v-toolbar-title> | 9 | </v-toolbar-title> |
10 | <v-spacer></v-spacer> | 10 | <v-spacer></v-spacer> |
11 | <h5 class="white--text name">{{userName}}</h5> | ||
12 | <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition"> | 11 | <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition"> |
13 | <v-btn icon large flat slot="activator"> | 12 | <v-btn icon large flat slot="activator"> |
14 | <v-avatar size="40px"> | 13 | <v-avatar size="40px"> |
15 | <img src="/static/icon/user.png"/> | 14 | <img src="/static/icon/user.png"/> |
16 | </v-avatar> | 15 | </v-avatar> |
17 | </v-btn> | 16 | </v-btn> |
18 | <v-list class="pa-0"> | 17 | <v-list class="pa-0"> |
19 | <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"> | 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"> |
20 | <v-list-tile-action v-if="item.icon"> | 19 | <v-list-tile-action v-if="item.icon"> |
21 | <v-icon>{{ item.icon }}</v-icon> | 20 | <v-icon>{{ item.icon }}</v-icon> |
22 | </v-list-tile-action> | 21 | </v-list-tile-action> |
23 | <v-list-tile-content> | 22 | <v-list-tile-content> |
24 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 23 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
25 | </v-list-tile-content> | 24 | </v-list-tile-content> |
26 | </v-list-tile> | 25 | </v-list-tile> |
27 | </v-list> | 26 | </v-list> |
28 | </v-menu> | 27 | </v-menu> |
29 | </v-toolbar> | 28 | </v-toolbar> |
30 | </template> | 29 | </template> |
31 | <script> | 30 | <script> |
32 | import NotificationList from "@/components/widgets/list/NotificationList"; | 31 | import NotificationList from "@/components/widgets/list/NotificationList"; |
33 | import Util from "@/util"; | 32 | import Util from "@/util"; |
34 | export default { | 33 | export default { |
35 | search: "", | 34 | search: "", |
36 | name: "app-toolbar", | 35 | name: "app-toolbar", |
37 | components: { | 36 | components: { |
38 | NotificationList | 37 | NotificationList |
39 | }, | 38 | }, |
40 | data: () => ({ | 39 | data: () => ({ |
41 | search: "", | 40 | search: "", |
42 | userName:'', | 41 | userName:'', |
43 | items: [ | 42 | items: [ |
44 | { | 43 | { |
45 | // icon: 'account_circle', | 44 | // icon: 'account_circle', |
46 | href: "/changepassword", | 45 | href: "/changepassword", |
47 | title: "Change Password", | 46 | title: "Change Password", |
48 | click: e => { | 47 | click: e => { |
49 | console.log(e); | 48 | console.log(e); |
50 | } | 49 | } |
51 | }, | 50 | }, |
52 | // { | 51 | // { |
53 | // icon: 'settings', | 52 | // icon: 'settings', |
54 | // href: '#', | 53 | // href: '#', |
55 | // title: 'Settings', | 54 | // title: 'Settings', |
56 | // click: (e) => { | 55 | // click: (e) => { |
57 | // console.log(e); | 56 | // console.log(e); |
58 | // } | 57 | // } |
59 | // }, | 58 | // }, |
60 | { | 59 | { |
61 | // icon: 'fullscreen_exit', | 60 | // icon: 'fullscreen_exit', |
62 | href: "#", | 61 | href: "#", |
63 | title: "Logout", | 62 | title: "Logout", |
64 | click: e => { | 63 | click: e => { |
65 | window.getApp.$emit("APP_LOGOUT"); | 64 | window.getApp.$emit("APP_LOGOUT"); |
66 | // this.$store.dispatch("setToken", null); | 65 | // this.$store.dispatch("setToken", null); |
67 | } | 66 | } |
68 | } | 67 | } |
69 | ] | 68 | ] |
70 | }), | 69 | }), |
71 | computed: { | 70 | computed: { |
72 | toolbarColor() { | 71 | toolbarColor() { |
73 | return this.$vuetify.options.extra.mainNav; | 72 | return this.$vuetify.options.extra.mainNav; |
74 | } | 73 | } |
75 | }, | 74 | }, |
76 | methods: { | 75 | methods: { |
77 | handleDrawerToggle() { | 76 | handleDrawerToggle() { |
78 | window.getApp.$emit("APP_DRAWER_TOGGLED"); | 77 | window.getApp.$emit("APP_DRAWER_TOGGLED"); |
79 | }, | 78 | }, |
80 | handleFullScreen() { | 79 | handleFullScreen() { |
81 | Util.toggleFullScreen(); | 80 | Util.toggleFullScreen(); |
82 | } | 81 | } |
83 | }, | 82 | }, |
84 | mounted(){ | ||
85 | this.userName = this.$store.state.name; | ||
86 | } | ||
87 | }; | 83 | }; |
88 | </script> | 84 | </script> |
89 | <style> | 85 | <style> |
90 | .v-icon{ | 86 | .v-icon{ |
91 | font-size:30px; | 87 | font-size:30px; |
92 | } | 88 | } |
93 | @media screen and (min-width: 1270px){ | 89 | @media screen and (min-width: 1270px){ |
94 | .hide{ | 90 | .hide{ |
95 | display: none; | 91 | display: none; |
96 | } | 92 | } |
97 | /* } | 93 | /* } |
98 | @media screen and (max-width: 962px) { | 94 | @media screen and (max-width: 962px) { |
99 | .imglogo{ | 95 | .imglogo{ |
100 | position: absolute; | 96 | position: absolute; |
101 | top: 13px; | 97 | top: 13px; |
102 | left: 13px !important; | 98 | left: 13px !important; |
103 | width: 70px; | 99 | width: 70px; |
104 | height: 24px; | 100 | height: 24px; |
105 | } */ | 101 | } */ |
106 | } | 102 | } |
107 | @media screen and (max-width: 420px){ | 103 | @media screen and (max-width: 420px){ |
108 | .v-list__tile { | 104 | .v-list__tile { |
109 | font-size:14px; | 105 | font-size:14px; |
110 | padding: 0 10px; | 106 | padding: 0 10px; |
111 | } | 107 | } |
112 | .name{ | 108 | .name{ |
113 | font-size:15px; | 109 | font-size:15px; |
114 | } | 110 | } |
115 | } | 111 | } |
116 | </style> | 112 | </style> |
117 | 113 |
src/components/PageHeader.vue
1 | <template> | 1 | <template> |
2 | <div> </div> | 2 | <div> </div> |
3 | <!-- <v-layout row class="align-center layout px-4 pt-4 app--page-header"> | 3 | <!-- <v-layout row class="align-center layout px-4 pt-4 app--page-header"> |
4 | <div class="page-header-left"> | 4 | <div class="page-header-left"> |
5 | <h3 class="pr-3">{{title}}</h3> | 5 | <h3 class="pr-3">{{title}}</h3> |
6 | </div> | 6 | </div> |
7 | <v-breadcrumbs divider="-"> | 7 | <v-breadcrumbs divider="-"> |
8 | <v-breadcrumbs-item> | 8 | <v-breadcrumbs-item> |
9 | <v-icon larg>home</v-icon> | 9 | <v-icon larg>home</v-icon> |
10 | </v-breadcrumbs-item> | 10 | </v-breadcrumbs-item> |
11 | <v-breadcrumbs-item v-for="(item,key) in breadcrumbs" :key="key"> | 11 | <v-breadcrumbs-item v-for="(item,key) in breadcrumbs" :key="key"> |
12 | {{ item }} | 12 | {{ item }} |
13 | </v-breadcrumbs-item> | 13 | </v-breadcrumbs-item> |
14 | </v-breadcrumbs> | 14 | </v-breadcrumbs> |
15 | <v-spacer></v-spacer> | 15 | <v-spacer></v-spacer> |
16 | <div class="page-header-right"> | 16 | <div class="page-header-right"> |
17 | <v-btn icon> | 17 | <v-btn icon> |
18 | <v-icon class="text--secondary">refresh</v-icon> | 18 | <v-icon class="text--secondary">refresh</v-icon> |
19 | </v-btn> | 19 | </v-btn> |
20 | </div> | 20 | </div> |
21 | </v-layout> --> | 21 | </v-layout> --> |
22 | 22 | ||
23 | 23 | ||
24 | </template>- | 24 | </template> |
25 | 25 | ||
26 | <script> | 26 | <script> |
27 | import menu from '@/api/menu'; | 27 | import menu from '@/api/menu'; |
28 | export default { | 28 | export default { |
29 | data () { | 29 | data () { |
30 | return { | 30 | return { |
31 | title: '' | 31 | title: '' |
32 | }; | 32 | }; |
33 | }, | 33 | }, |
34 | computed: { | 34 | computed: { |
35 | breadcrumbs: function () { | 35 | breadcrumbs: function () { |
36 | let breadcrumbs = []; | 36 | let breadcrumbs = []; |
37 | menu.forEach(item => { | 37 | menu.forEach(item => { |
38 | if (item.items) { | 38 | if (item.items) { |
39 | let child = item.items.find(i => { | 39 | let child = item.items.find(i => { |
40 | return i.component === this.$route.name; | 40 | return i.component === this.$route.name; |
41 | }); | 41 | }); |
42 | if (child) { | 42 | if (child) { |
43 | breadcrumbs.push(item.title); | 43 | breadcrumbs.push(item.title); |
44 | breadcrumbs.push(child.title); | 44 | breadcrumbs.push(child.title); |
45 | this.title = child.title; | 45 | this.title = child.title; |
46 | } | 46 | } |
47 | } else { | 47 | } else { |
48 | if (item.name === this.$route.name) { | 48 | if (item.name === this.$route.name) { |
49 | this.title = item.title; | 49 | this.title = item.title; |
50 | breadcrumbs.push(item.title); | 50 | breadcrumbs.push(item.title); |
51 | } | 51 | } |
52 | } | 52 | } |
53 | }); | 53 | }); |
54 | return breadcrumbs; | 54 | return breadcrumbs; |
55 | }, | 55 | }, |
56 | } | 56 | } |
57 | }; | 57 | }; |
58 | </script> | 58 | </script> |
59 | 59 |
src/event.js
1 | export default [ | 1 | export default [ |
2 | { | 2 | { |
3 | name: 'APP_LOGIN_SUCCESS', | 3 | name: 'APP_LOGIN_SUCCESS', |
4 | callback: function (e) { | 4 | callback: function (e) { |
5 | this.$router.push({ path: 'dashboard' }); | 5 | this.$router.push({ path: 'dashboard' }); |
6 | } | 6 | } |
7 | }, | 7 | }, |
8 | { | 8 | { |
9 | name: 'APP_LOGOUT', | 9 | name: 'APP_LOGOUT', |
10 | callback: function (e) { | 10 | callback: function (e) { |
11 | this.snackbar = { | 11 | this.snackbar = { |
12 | show: true, | 12 | show: true, |
13 | color: 'green', | 13 | color: 'green', |
14 | text: 'Logout successfully.' | 14 | text: 'Logout successfully.' |
15 | }; | 15 | }; |
16 | this.$store.dispatch('setToken', null) | 16 | this.$store.dispatch('setToken', null) |
17 | this.$store.dispatch('setName', null) | 17 | this.$store.dispatch('Id', null) |
18 | this.$router.replace({ path: '/' }); | 18 | this.$router.replace({ path: '/' }); |
19 | } | 19 | } |
20 | }, | 20 | }, |
21 | { | 21 | { |
22 | name: 'APP_CHANGE', | 22 | name: 'APP_CHANGE', |
23 | callback: function (e) { | 23 | callback: function (e) { |
24 | this.snackbar = { | 24 | this.snackbar = { |
25 | show: true, | 25 | show: true, |
26 | color: 'green', | 26 | color: 'green', |
27 | text: 'Logout successfully.' | 27 | text: 'Logout successfully.' |
28 | }; | 28 | }; |
29 | this.$router.replace({ | 29 | this.$router.replace({ |
30 | path: '/' | 30 | path: '/' |
31 | }); | 31 | }); |
32 | } | 32 | } |
33 | }, | 33 | }, |
34 | { | 34 | { |
35 | name: 'APP_PAGE_LOADED', | 35 | name: 'APP_PAGE_LOADED', |
36 | callback: function (e) { | 36 | callback: function (e) { |
37 | } | 37 | } |
38 | }, | 38 | }, |
39 | { | 39 | { |
40 | name: 'APP_AUTH_FAILED', | 40 | name: 'APP_AUTH_FAILED', |
41 | callback: function (e) { | 41 | callback: function (e) { |
42 | this.$router.push('/login'); | 42 | this.$router.push('/login'); |
43 | this.$message.error('Token has expired'); | 43 | this.$message.error('Token has expired'); |
44 | } | 44 | } |
45 | }, | 45 | }, |
46 | { | 46 | { |
47 | name: 'APP_BAD_REQUEST', | 47 | name: 'APP_BAD_REQUEST', |
48 | // @error api response data | 48 | // @error api response data |
49 | callback: function (msg) { | 49 | callback: function (msg) { |
50 | this.$message.error(msg); | 50 | this.$message.error(msg); |
51 | } | 51 | } |
52 | }, | 52 | }, |
53 | { | 53 | { |
54 | name: 'APP_ACCESS_DENIED', | 54 | name: 'APP_ACCESS_DENIED', |
55 | // @error api response data | 55 | // @error api response data |
56 | callback: function (msg) { | 56 | callback: function (msg) { |
57 | this.$message.error(msg); | 57 | this.$message.error(msg); |
58 | this.$router.push('/forbidden'); | 58 | this.$router.push('/forbidden'); |
59 | } | 59 | } |
60 | }, | 60 | }, |
61 | { | 61 | { |
62 | name: 'APP_RESOURCE_DELETED', | 62 | name: 'APP_RESOURCE_DELETED', |
63 | // @error api response data | 63 | // @error api response data |
64 | callback: function (msg) { | 64 | callback: function (msg) { |
65 | this.$message.success(msg); | 65 | this.$message.success(msg); |
66 | } | 66 | } |
67 | }, | 67 | }, |
68 | { | 68 | { |
69 | name: 'APP_RESOURCE_UPDATED', | 69 | name: 'APP_RESOURCE_UPDATED', |
70 | // @error api response data | 70 | // @error api response data |
71 | callback: function (msg) { | 71 | callback: function (msg) { |
72 | this.$message.success(msg); | 72 | this.$message.success(msg); |
73 | } | 73 | } |
74 | }, | 74 | }, |
75 | 75 | ||
76 | ]; | 76 | ]; |
77 | 77 |
src/pages/Dashboard.vue
1 | <template> | 1 | <template> |
2 | <v-app id="pages-dasboard"> | 2 | <v-app id="pages-dasboard"> |
3 | <v-toolbar | 3 | <v-toolbar |
4 | color="grey" | 4 | color="grey" |
5 | fixed | 5 | fixed |
6 | app | 6 | app |
7 | > | 7 | > |
8 | <v-toolbar-title class="ml-0 pl-3"> | 8 | <v-toolbar-title class="ml-0 pl-3"> |
9 | <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon> | 9 | <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon> |
10 | </v-toolbar-title> | 10 | </v-toolbar-title> |
11 | <!-- ****** SEARCH ALL EXISTING USERS ****** --> | 11 | <!-- ****** SEARCH ALL Teachers ****** --> |
12 | <v-flex xs7 sm3 class="userSearch"> | 12 | <v-flex xs7 sm3 class="userSearch"> |
13 | <v-text-field | 13 | <v-text-field |
14 | flat | 14 | flat |
15 | prepend-icon="search" | 15 | prepend-icon="search" |
16 | label="Find your user" | 16 | label="Find your Teachers" |
17 | v-model="term" | 17 | v-model="search" |
18 | color="black" | 18 | color="black" |
19 | @change="getPatientList" | 19 | @change="getTeacherList" |
20 | > | 20 | > |
21 | </v-text-field> | 21 | </v-text-field> |
22 | </v-flex> | 22 | </v-flex> |
23 | <v-spacer></v-spacer> | 23 | <v-spacer></v-spacer> |
24 | <h5 class="white--text name"> {{ userName }} </h5> | ||
25 | <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition"> | 24 | <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition"> |
26 | <v-btn icon large flat slot="activator"> | 25 | <v-btn icon large flat slot="activator"> |
27 | <v-avatar size="40px"> | 26 | <v-avatar size="40px"> |
28 | <img src="/static/icon/user.png"/> | 27 | <img src="/static/icon/user.png"/> |
29 | </v-avatar> | 28 | </v-avatar> |
30 | </v-btn> | 29 | </v-btn> |
31 | <v-list class="pa-0"> | 30 | <v-list class="pa-0"> |
32 | <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"> | 31 | <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"> |
33 | <v-list-tile-action v-if="item.icon"> | 32 | <v-list-tile-action v-if="item.icon"> |
34 | <v-icon>{{ item.icon }}</v-icon> | 33 | <v-icon>{{ item.icon }}</v-icon> |
35 | </v-list-tile-action> | 34 | </v-list-tile-action> |
36 | <v-list-tile-content> | 35 | <v-list-tile-content> |
37 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 36 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
38 | </v-list-tile-content> | 37 | </v-list-tile-content> |
39 | </v-list-tile> | 38 | </v-list-tile> |
40 | </v-list> | 39 | </v-list> |
41 | </v-menu> | 40 | </v-menu> |
42 | </v-toolbar> | 41 | </v-toolbar> |
43 | <v-tabs grow slider-color="black"> | 42 | <v-tabs grow slider-color="black"> |
44 | <v-tab | 43 | <v-tab |
45 | ripple | 44 | ripple |
46 | @click="activeTab('existing')" | 45 | @click="activeTab('existing')" |
47 | v-bind:class="{ active: isActive }" | 46 | v-bind:class="{ active: isActive }" |
48 | id="tab" | 47 | id="tab" |
49 | class="subheading" | 48 | class="subheading" |
50 | >Existing User</v-tab> | 49 | >Existing Teachers</v-tab> |
51 | <v-tab | 50 | <v-tab |
52 | ripple | 51 | ripple |
53 | @click="activeTab('new')" | 52 | @click="activeTab('new')" |
54 | v-bind:class="{ active: newActive }" | 53 | v-bind:class="{ active: newActive }" |
55 | id="tab1" | 54 | id="tab1"User |
56 | class="subheading" | 55 | class="subheading" |
57 | >Add New Users</v-tab> | 56 | >Add New Teachers</v-tab> |
58 | <!-- ****** EDIT USERS Patient Dtails ****** --> | 57 | <!-- ****** EDIT Teachers Dtails ****** --> |
59 | <v-tab-item> | 58 | <v-tab-item> |
60 | <v-snackbar | 59 | <v-snackbar |
61 | :timeout="timeout" | 60 | :timeout="timeout" |
62 | :top="y === 'top'" | 61 | :top="y === 'top'" |
63 | :right="x === 'right'" | 62 | :right="x === 'right'" |
64 | :vertical="mode === 'vertical'" | 63 | :vertical="mode === 'vertical'" |
65 | v-model="snackbar" | 64 | v-model="snackbar" |
66 | color="success" | 65 | color="success" |
67 | >{{ text }}</v-snackbar> | 66 | >{{ text }}</v-snackbar> |
68 | <v-dialog v-model="dialog" max-width="500px"> | 67 | <v-dialog v-model="dialog" max-width="500px"> |
69 | <v-toolbar color="white"> | 68 | <v-toolbar color="white"> |
70 | <v-spacer></v-spacer> | 69 | <v-spacer></v-spacer> |
71 | <v-toolbar-title>Edit Profile</v-toolbar-title> | 70 | <v-toolbar-title>Edit Profile</v-toolbar-title> |
72 | <v-spacer></v-spacer> | 71 | <v-spacer></v-spacer> |
73 | </v-toolbar> | 72 | </v-toolbar> |
74 | <v-card> | 73 | <v-card> |
75 | <v-flex align-center justify-center layout text-xs-center> | 74 | <v-flex align-center justify-center layout text-xs-center> |
76 | <v-avatar size="50px" style="position:absolute; top:10px; "> | 75 | <v-avatar size="50px" style="position:absolute; top:10px; "> |
77 | <img src="/static/icon/user.png"> | 76 | <img src="/static/icon/user.png"> |
78 | </v-avatar> | 77 | </v-avatar> |
79 | </v-flex> | 78 | </v-flex> |
80 | <v-card-text> | 79 | <v-card-text> |
81 | <v-container> | 80 | <v-container> |
82 | <v-layout wrap justify-center> | 81 | <v-layout wrap justify-center> |
83 | <v-flex xs12 sm9> | 82 | <v-flex xs12 sm9> |
84 | <v-form ref="form" v-model="valid" lazy-validation> | 83 | <v-form ref="form" v-model="valid" lazy-validation> |
85 | <v-layout style="position:relative; top:15px;"> | 84 | <v-layout style="position:relative; top:15px;"> |
86 | <v-flex xs4 class="pt-4 subheading"> | 85 | <v-flex xs4 class="pt-4 subheading"> |
87 | <label>Full Name:</label> | 86 | <label>Full Name:</label> |
88 | </v-flex> | 87 | </v-flex> |
89 | <v-flex xs8> | 88 | <v-flex xs8> |
90 | <v-text-field | 89 | <v-text-field |
91 | v-model="editedItem.name" | 90 | v-model="editedItem.name" |
92 | v-validate="'required'" | 91 | v-validate="'required'" |
93 | :rules="nameRules" | 92 | :rules="nameRules" |
94 | data-vv-name="Name" | 93 | data-vv-name="Name" |
95 | required | 94 | required |
96 | ></v-text-field> | 95 | ></v-text-field> |
97 | </v-flex> | 96 | </v-flex> |
98 | </v-layout> | 97 | </v-layout> |
99 | <v-layout> | 98 | <v-layout> |
100 | <v-flex xs4 class="pt-4 subheading"> | 99 | <v-flex xs4 class="pt-4 subheading"> |
101 | <label>Email ID:</label> | 100 | <label>Email ID:</label> |
102 | </v-flex> | 101 | </v-flex> |
103 | <v-flex xs8> | 102 | <v-flex xs8> |
104 | <v-text-field | 103 | <v-text-field |
105 | v-model="editedItem.email" | 104 | v-model="editedItem.email" |
106 | v-validate="'required|email'" | 105 | v-validate="'required|email'" |
107 | :rules="emailRules" | 106 | :rules="emailRules" |
108 | data-vv-name="E-mail" | 107 | data-vv-name="E-mail" |
109 | required | 108 | required |
110 | ></v-text-field> | 109 | ></v-text-field> |
111 | </v-flex> | 110 | </v-flex> |
112 | </v-layout> | 111 | </v-layout> |
113 | <v-layout> | 112 | <!-- <v-layout> |
114 | <v-flex xs4 class="pt-4 subheading"> | 113 | <v-flex xs4 class="pt-4 subheading"> |
115 | <label>Date of Birth:</label> | 114 | <label>Date of Birth:</label> |
116 | </v-flex> | 115 | </v-flex> |
117 | <v-flex xs8> | 116 | <v-flex xs8> |
118 | <v-menu | 117 | <v-menu |
119 | ref="menu1" | 118 | ref="menu1" |
120 | :close-on-content-click="false" | 119 | :close-on-content-click="false" |
121 | v-model="menu1" | 120 | v-model="menu1" |
122 | :nudge-right="40" | 121 | :nudge-right="40" |
123 | lazy | 122 | lazy |
124 | transition="scale-transition" | 123 | transition="scale-transition" |
125 | offset-y | 124 | offset-y |
126 | full-width | 125 | full-width |
127 | min-width="290px" | 126 | min-width="290px" |
128 | > | 127 | > |
129 | <v-text-field | 128 | <v-text-field |
130 | slot="activator" | 129 | slot="activator" |
131 | v-model="editedItem.dob" | 130 | v-model="editedItem.dob" |
132 | placeholder="Select date" | 131 | placeholder="Select date" |
133 | ></v-text-field> | 132 | ></v-text-field> |
134 | <v-date-picker | 133 | <v-date-picker |
135 | ref="picker" | 134 | ref="picker" |
136 | v-model="editedItem.dob" | 135 | v-model="editedItem.dob" |
137 | :max="new Date().toISOString().substr(0, 10)" | 136 | :max="new Date().toISOString().substr(0, 10)" |
138 | min="1950-01-01" | 137 | min="1950-01-01" |
139 | @input="menu1 = false" | 138 | @input="menu1 = false" |
140 | ></v-date-picker> | 139 | ></v-date-picker> |
141 | </v-menu> | 140 | </v-menu> |
142 | </v-flex> | 141 | </v-flex> |
143 | </v-layout> | 142 | </v-layout> --> |
144 | <v-card-actions> | 143 | <v-card-actions> |
145 | <v-btn round dark @click.native="close">Cancel</v-btn> | 144 | <v-btn round dark @click.native="close">Cancel</v-btn> |
146 | <v-spacer></v-spacer> | 145 | <v-spacer></v-spacer> |
147 | <v-btn round dark @click="save">Save</v-btn> | 146 | <v-btn round dark @click="save">Save</v-btn> |
148 | </v-card-actions> | 147 | </v-card-actions> |
149 | </v-form> | 148 | </v-form> |
150 | </v-flex> | 149 | </v-flex> |
151 | </v-layout> | 150 | </v-layout> |
152 | </v-container> | 151 | </v-container> |
153 | </v-card-text> | 152 | </v-card-text> |
154 | </v-card> | 153 | </v-card> |
155 | </v-dialog> | 154 | </v-dialog> |
156 | <!-- ****** PROFILE VIEW pateints Details ****** --> | 155 | <!-- ****** PROFILE VIEW Teachers Details ****** --> |
157 | <v-dialog v-model="dialog1" max-width="600px"> | 156 | <v-dialog v-model="dialog1" max-width="600px"> |
158 | <v-toolbar color="white"> | 157 | <v-toolbar color="white"> |
159 | <v-spacer></v-spacer> | 158 | <v-spacer></v-spacer> |
160 | <v-toolbar-title>Profile</v-toolbar-title> | 159 | <v-toolbar-title>Profile</v-toolbar-title> |
161 | <v-spacer></v-spacer> | 160 | <v-spacer></v-spacer> |
162 | <v-icon @click="close1">close</v-icon> | 161 | <v-icon @click="close1">close</v-icon> |
163 | </v-toolbar> | 162 | </v-toolbar> |
164 | <v-card> | 163 | <v-card> |
165 | <v-flex align-center justify-center layout text-xs-center> | 164 | <v-flex align-center justify-center layout text-xs-center> |
166 | <v-avatar size="50px" style="position:absolute; top:20px;"> | 165 | <v-avatar size="50px" style="position:absolute; top:20px;"> |
167 | <img src="/static/icon/user.png"> | 166 | <img src="/static/icon/user.png"> |
168 | </v-avatar> | 167 | </v-avatar> |
169 | </v-flex> | 168 | </v-flex> |
170 | <v-card-text> | 169 | <v-card-text> |
171 | <v-container grid-list-md> | 170 | <v-container grid-list-md> |
172 | <v-layout wrap> | 171 | <v-layout wrap> |
173 | <v-flex><br><br> | 172 | <v-flex><br><br> |
174 | <v-layout> | 173 | <v-layout> |
175 | <v-flex xs5 sm6> | 174 | <v-flex xs5 sm6> |
176 | <h5 class="right">Full Name:</h5> | 175 | <h5 class="right">Full Name:</h5> |
177 | </v-flex> | 176 | </v-flex> |
178 | <v-flex sm6 xs8> | 177 | <v-flex sm6 xs8> |
179 | <h5>{{ editedItem.name }}</h5> | 178 | <h5>{{ editedItem.name }}</h5> |
180 | </v-flex> | 179 | </v-flex> |
181 | </v-layout> | 180 | </v-layout> |
182 | <v-layout> | 181 | <v-layout> |
183 | <v-flex xs5 sm6> | 182 | <v-flex xs5 sm6> |
184 | <h5 class="right">Email:</h5> | 183 | <h5 class="right">Email:</h5> |
185 | </v-flex> | 184 | </v-flex> |
186 | <v-flex sm6 xs8> | 185 | <v-flex sm6 xs8> |
187 | <h5>{{ editedItem.email }}</h5> | 186 | <h5>{{ editedItem.email }}</h5> |
188 | </v-flex> | 187 | </v-flex> |
189 | </v-layout> | 188 | </v-layout> |
190 | <v-layout> | 189 | <!-- <v-layout> |
191 | <v-flex xs6 sm6 > | 190 | <v-flex xs6 sm6 > |
192 | <h5 class="right my-3">Date Of Birth:</h5> | 191 | <h5 class="right my-3">Date Of Birth:</h5> |
193 | </v-flex> | 192 | </v-flex> |
194 | <v-flex sm6 xs8> | 193 | <v-flex sm6 xs8> |
195 | <h5 class="my-3">{{ editedItem.dob }}</h5> | 194 | <h5 class="my-3">{{ editedItem.dob }}</h5> |
196 | </v-flex> | 195 | </v-flex> |
197 | </v-layout> | 196 | </v-layout> --> |
198 | </v-flex> | 197 | </v-flex> |
199 | </v-layout> | 198 | </v-layout> |
200 | </v-container> | 199 | </v-container> |
201 | </v-card-text> | 200 | </v-card-text> |
202 | </v-card> | 201 | </v-card> |
203 | </v-dialog> | 202 | </v-dialog> |
204 | 203 | ||
205 | <v-dialog v-model="dialog2" width="700px"> | 204 | <!-- <v-dialog v-model="dialog2" width="700px"> |
206 | <v-card> | 205 | <v-card> |
207 | <div id="dialog"> | 206 | <div id="dialog"> |
208 | <h4> | 207 | <h4> |
209 | <b>Report</b> | 208 | <b>Report</b> |
210 | </h4> | 209 | </h4> |
211 | <h5 id="name"> | 210 | <h5 id="name"> |
212 | <b>Patient Name:</b> | 211 | <b>Patient Name:</b> |
213 | {{ editedItem.name }} | 212 | {{ editedItem.name }} |
214 | </h5> | 213 | </h5> |
215 | <h5 id="m">Select Month:</h5> | 214 | <h5 id="m">Select Month:</h5> |
216 | <v-btn color="grey darken-3" id="G" v-on:click="component='report-generate'">Generate</v-btn> | 215 | <v-btn color="grey darken-3" id="G" v-on:click="component='report-generate'">Generate</v-btn> |
217 | <v-spacer></v-spacer> | 216 | <v-spacer></v-spacer> |
218 | <v-icon id="icon" @click="close2">close</v-icon> | 217 | <v-icon id="icon" @click="close2">close</v-icon> |
219 | 218 | ||
220 | <span id="bt"> | 219 | <span id="bt"> |
221 | <v-btn | 220 | <v-btn |
222 | color="grey darken-2" | 221 | color="grey darken-2" |
223 | v-on:click="component='one-month' , activebtn('existing')" | 222 | v-on:click="component='one-month' , activebtn('existing')" |
224 | v-bind:class="{ activebtn: isActivebtn }" | 223 | v-bind:class="{ activebtn: isActivebtn }" |
225 | flat | 224 | flat |
226 | >1 month</v-btn> | 225 | >1 month</v-btn> |
227 | <v-btn | 226 | <v-btn |
228 | color="grey darken-2" | 227 | color="grey darken-2" |
229 | v-on:click="component='three-month' , activebtn('new')" | 228 | v-on:click="component='three-month' , activebtn('new')" |
230 | v-bind:class="{ activebtn: Activebtn1 }" | 229 | v-bind:class="{ activebtn: Activebtn1 }" |
231 | flat | 230 | flat |
232 | >3 Month</v-btn> | 231 | >3 Month</v-btn> |
233 | <v-btn | 232 | <v-btn |
234 | color="grey darken-2" | 233 | color="grey darken-2" |
235 | v-on:click="component='six-month' , activebtn('new1')" | 234 | v-on:click="component='six-month' , activebtn('new1')" |
236 | v-bind:class="{ activebtn: Activebtn2 }" | 235 | v-bind:class="{ activebtn: Activebtn2 }" |
237 | flat | 236 | flat |
238 | >6 Month</v-btn> | 237 | >6 Month</v-btn> |
239 | <v-btn | 238 | <v-btn |
240 | color="grey darken-2" | 239 | color="grey darken-2" |
241 | v-on:click="component='nine-month' , activebtn('new2')" | 240 | v-on:click="component='nine-month' , activebtn('new2')" |
242 | v-bind:class="{ activebtn: Activebtn3 }" | 241 | v-bind:class="{ activebtn: Activebtn3 }" |
243 | flat | 242 | flat |
244 | >9 Month</v-btn> | 243 | >9 Month</v-btn> |
245 | <img id="e" @click="mail" src="/static/icon/email1.png"> | 244 | <img id="e" @click="mail" src="/static/icon/email1.png"> |
246 | <img id="d" @click="download" src="/static/icon/download1.png"> | 245 | <img id="d" @click="download" src="/static/icon/download1.png"> |
247 | </span> | 246 | </span> |
248 | <component v-bind:is="component"></component> | 247 | <component v-bind:is="component"></component> |
249 | </div> | 248 | </div> |
250 | </v-card> | 249 | </v-card> |
251 | </v-dialog> | 250 | </v-dialog> --> |
252 | <v-snackbar | 251 | <v-snackbar |
253 | :timeout="timeout" | 252 | :timeout="timeout" |
254 | :top="y === 'top'" | 253 | :top="y === 'top'" |
255 | :right="x === 'right'" | 254 | :right="x === 'right'" |
256 | :vertical="mode === 'vertical'" | 255 | :vertical="mode === 'vertical'" |
257 | v-model="snackbar" | 256 | v-model="snackbar" |
258 | color="success" | 257 | color="success" |
259 | >{{ text }}</v-snackbar> | 258 | >{{ text }}</v-snackbar> |
260 | <!-- ****** EXISTING-USERS PatientList Table ****** --> | 259 | |
260 | <!-- ****** EXISTING-Teachers Table Data****** --> | ||
261 | <v-data-table | 261 | <v-data-table |
262 | :headers="headers" | 262 | :headers="headers" |
263 | :items="desserts" | 263 | :items="desserts" |
264 | :pagination.sync="pagination" | 264 | :pagination.sync="pagination" |
265 | :search="search" | ||
265 | > <!-- </v-content> | 266 | > <!-- </v-content> |
266 | <v-footer class="pa-4" color="grey darken-2"> | 267 | <v-footer class="pa-4" color="grey darken-2"> |
267 | 268 | ||
268 | </v-footer> --> | 269 | </v-footer> --> |
269 | <template slot="items" slot-scope="props"> | 270 | <template slot="items" slot-scope="props"> |
270 | <td id="td" class="text-xs-center">{{ props.index}}</td> | 271 | <td id="td" class="text-xs-center">{{ props.index}}</td> |
271 | <td id="td" class="text-xs-center">{{ props.item.name}}</td> | 272 | <td id="td" class="text-xs-center">{{ props.item.name}}</td> |
272 | <td id="td" class="text-xs-center">{{ props.item.email }}</td> | 273 | <td id="td" class="text-xs-center">{{ props.item.email }}</td> |
273 | 274 | ||
274 | <td class="text-xs-center"> | 275 | <td class="text-xs-center"> |
275 | <span> | 276 | <span> |
276 | <img | 277 | <!-- <img |
277 | style="cursor:pointer; height:20px; " | 278 | style="cursor:pointer; height:20px; " |
278 | class="mr-5" | 279 | class="mr-5" |
279 | @click="report(props.item)" | 280 | @click="report(props.item)" |
280 | src="/static/icon/List1.png" | 281 | src="/static/icon/List1.png" |
281 | > | 282 | > --> |
282 | <img | 283 | <img |
283 | style="cursor:pointer; width:25px; height:18px; " | 284 | style="cursor:pointer; width:25px; height:18px; " |
284 | class="mr-5" | 285 | class="mr-5" |
285 | @click="profile(props.item)" | 286 | @click="profile(props.item)" |
286 | src="/static/icon/eye1.png" | 287 | src="/static/icon/eye1.png" |
287 | > | 288 | > |
288 | <img | 289 | <img |
289 | style="cursor:pointer; width:20px; height:18px; " | 290 | style="cursor:pointer; width:20px; height:18px; " |
290 | class="mr-5" | 291 | class="mr-5" |
291 | @click="editItem(props.item)" | 292 | @click="editItem(props.item)" |
292 | src="/static/icon/edit1.png" | 293 | src="/static/icon/edit1.png" |
293 | > | 294 | > |
294 | <img | 295 | <img |
295 | style="cursor:pointer; height:20px; " | 296 | style="cursor:pointer; height:20px; " |
296 | class="mr-5" | 297 | class="mr-5" |
297 | @click="deleteItem(props.item)" | 298 | @click="deleteItem(props.item)" |
298 | src="/static/icon/delete1.png" | 299 | src="/static/icon/delete1.png" |
299 | > | 300 | > |
300 | </span> | 301 | </span> |
301 | </td> | 302 | </td> |
302 | </template> | 303 | </template> |
303 | <v-alert | 304 | <v-alert |
304 | slot="no-results" | 305 | slot="no-results" |
305 | :value="true" | 306 | :value="true" |
306 | color="error" | 307 | color="error" |
307 | icon="warning" | 308 | icon="warning" |
308 | >Your search for "{{ term }}" found no results.</v-alert> | 309 | >Your search for "{{ search }}" found no results.</v-alert> |
309 | </v-data-table> | 310 | </v-data-table> |
310 | </v-tab-item> | 311 | </v-tab-item> |
311 | <!-- ****** ADD USER PATIENT ****** --> | 312 | <!-- ****** ADD Teachers ****** --> |
312 | <v-tab-item> | 313 | <v-tab-item> |
313 | <v-container> | 314 | <v-container> |
314 | <v-snackbar | 315 | <v-snackbar |
315 | :timeout="timeout" | 316 | :timeout="timeout" |
316 | :top="y === 'top'" | 317 | :top="y === 'top'" |
317 | :right="x === 'right'" | 318 | :right="x === 'right'" |
318 | :vertical="mode === 'vertical'" | 319 | :vertical="mode === 'vertical'" |
319 | v-model="snackbar" | 320 | v-model="snackbar" |
320 | color="success" | 321 | color="success" |
321 | >{{ text }}</v-snackbar> | 322 | >{{ text }}</v-snackbar> |
322 | <v-flex xs12 sm8 offset-sm2 class="top"> | 323 | <v-flex xs12 sm8 offset-sm2 class="top"> |
323 | <v-card flat> | 324 | <v-card flat> |
324 | <v-container fluid fill-height> | 325 | <v-container fluid fill-height> |
325 | <v-layout align-center> | 326 | <v-layout align-center> |
326 | <v-flex xs12> | 327 | <v-flex xs12> |
327 | <v-flex offset-xs5> | 328 | <v-flex offset-xs5> |
328 | <v-avatar size="55px"> | 329 | <v-avatar size="55px"> |
329 | <img src="/static/icon/user.png"> | 330 | <img src="/static/icon/user.png"> |
330 | </v-avatar> | 331 | </v-avatar> |
331 | </v-flex> | 332 | </v-flex> |
332 | <v-form ref="form" v-model="valid" lazy-validation> | 333 | <v-form ref="form" v-model="valid" lazy-validation> |
333 | <v-layout> | 334 | <v-layout> |
334 | <v-flex xs4 class="pt-4 subheading"> | 335 | <v-flex xs4 class="pt-4 subheading"> |
335 | <label class="right">Full Name:</label> | 336 | <label class="right">Full Name:</label> |
336 | </v-flex> | 337 | </v-flex> |
337 | <v-flex xs6 class="ml-3"> | 338 | <v-flex xs6 class="ml-3"> |
338 | <v-text-field | 339 | <v-text-field |
339 | v-model="editedItem.name" | 340 | v-model="editedItem.name" |
340 | placeholder="fill your full Name" | 341 | placeholder="fill your full Name" |
341 | name="name" | 342 | name="name" |
342 | type="text" | 343 | type="text" |
343 | :rules="nameRules" | 344 | :rules="nameRules" |
344 | required | 345 | required |
345 | ></v-text-field> | 346 | ></v-text-field> |
346 | </v-flex> | 347 | </v-flex> |
347 | </v-layout> | 348 | </v-layout> |
348 | <v-layout> | 349 | <!-- <v-layout> |
349 | <v-flex xs4 class="pt-4 subheading"> | 350 | <v-flex xs4 class="pt-4 subheading"> |
350 | <label class="right">Country:</label> | 351 | <label class="right">Country:</label> |
351 | </v-flex> | 352 | </v-flex> |
352 | <v-flex xs6 class="ml-3"> | 353 | <v-flex xs6 class="ml-3"> |
353 | <v-select | 354 | <v-select |
354 | v-model="editedItem.country" | 355 | v-model="editedItem.country" |
355 | :items="countries" | 356 | :items="countries" |
356 | label="Select Country" | 357 | label="Select Country" |
357 | single-line | 358 | single-line |
358 | ></v-select> | 359 | ></v-select> |
359 | </v-flex> | 360 | </v-flex> |
360 | </v-layout> | 361 | </v-layout> --> |
361 | <v-layout> | 362 | <v-layout> |
362 | <v-flex xs4 class="pt-4 subheading"> | 363 | <v-flex xs4 class="pt-4 subheading"> |
363 | <label class="right">Email ID:</label> | 364 | <label class="right">Email ID:</label> |
364 | </v-flex> | 365 | </v-flex> |
365 | <v-flex xs6 class="ml-3"> | 366 | <v-flex xs6 class="ml-3"> |
366 | <v-text-field | 367 | <v-text-field |
367 | placeholder="fill your email" | 368 | placeholder="fill your email" |
368 | :rules="emailRules" | 369 | :rules="emailRules" |
369 | v-model="editedItem.email" | 370 | v-model="editedItem.email" |
370 | type="text" | 371 | type="text" |
371 | name="email" | 372 | name="email" |
372 | required | 373 | required |
373 | ></v-text-field> | 374 | ></v-text-field> |
374 | </v-flex> | 375 | </v-flex> |
375 | </v-layout> | 376 | </v-layout> |
376 | <v-layout> | 377 | <!-- <v-layout> |
377 | <v-flex xs4 class="pt-4 subheading"> | 378 | <v-flex xs4 class="pt-4 subheading"> |
378 | <label class="right">Date of Birth:</label> | 379 | <label class="right">Date of Birth:</label> |
379 | </v-flex> | 380 | </v-flex> |
380 | <v-flex xs6 class="ml-3"> | 381 | <v-flex xs6 class="ml-3"> |
381 | <v-menu | 382 | <v-menu |
382 | ref="menu" | 383 | ref="menu" |
383 | :close-on-content-click="false" | 384 | :close-on-content-click="false" |
384 | v-model="menu" | 385 | v-model="menu" |
385 | :nudge-right="40" | 386 | :nudge-right="40" |
386 | lazy | 387 | lazy |
387 | transition="scale-transition" | 388 | transition="scale-transition" |
388 | offset-y | 389 | offset-y |
389 | full-width | 390 | full-width |
390 | min-width="290px" | 391 | min-width="290px" |
391 | > | 392 | > |
392 | <v-text-field | 393 | <v-text-field |
393 | slot="activator" | 394 | slot="activator" |
394 | v-model="editedItem.date" | 395 | v-model="editedItem.date" |
395 | placeholder="Select date" | 396 | placeholder="Select date" |
396 | ></v-text-field> | 397 | ></v-text-field> |
397 | <v-date-picker | 398 | <v-date-picker |
398 | ref="picker" | 399 | ref="picker" |
399 | v-model="editedItem.date" | 400 | v-model="editedItem.date" |
400 | :max="new Date().toISOString().substr(0, 10)" | 401 | :max="new Date().toISOString().substr(0, 10)" |
401 | min="1950-01-01" | 402 | min="1950-01-01" |
402 | @input="menu = false" | 403 | @input="menu = false" |
403 | ></v-date-picker> | 404 | ></v-date-picker> |
404 | </v-menu> | 405 | </v-menu> |
405 | </v-flex> | 406 | </v-flex> |
406 | </v-layout> | 407 | </v-layout> --> |
407 | <v-layout> | 408 | <v-layout> |
408 | <v-flex xs12 sm9 offset-sm2> | 409 | <v-flex xs12 sm9 offset-sm2> |
409 | <v-card-actions> | 410 | <v-card-actions> |
410 | <v-btn @click="clear" round dark>clear</v-btn> | 411 | <v-btn @click="clear" round dark>clear</v-btn> |
411 | <v-spacer></v-spacer> | 412 | <v-spacer></v-spacer> |
412 | <v-btn @click="submit" round dark :loading="loading">Add</v-btn> | 413 | <v-btn @click="submit" round dark :loading="loading">Add</v-btn> |
413 | </v-card-actions> | 414 | </v-card-actions> |
414 | </v-flex> | 415 | </v-flex> |
415 | </v-layout> | 416 | </v-layout> |
416 | </v-form> | 417 | </v-form> |
417 | </v-flex> | 418 | </v-flex> |
418 | </v-layout> | 419 | </v-layout> |
419 | </v-container> | 420 | </v-container> |
420 | </v-card> | 421 | </v-card> |
421 | </v-flex> | 422 | </v-flex> |
422 | </v-container> | 423 | </v-container> |
423 | </v-tab-item> | 424 | </v-tab-item> |
424 | </v-tabs> | 425 | </v-tabs> |
425 | </v-app> | 426 | </v-app> |
426 | </template> | 427 | </template> |
427 | 428 | ||
428 | <script> | 429 | <script> |
429 | // import AppToolbar from '@/components/AppToolbar'; | 430 | // import AppToolbar from '@/components/AppToolbar'; |
430 | import onemonth from "@/components/report/onemonth.vue"; | 431 | // import onemonth from "@/components/report/onemonth.vue"; |
431 | import threemonth from "@/components/report/threemonth.vue"; | 432 | // import threemonth from "@/components/report/threemonth.vue"; |
432 | import sixmonth from "@/components/report/sixmonth.vue"; | 433 | // import sixmonth from "@/components/report/sixmonth.vue"; |
433 | import ninemonth from "@/components/report/ninemonth.vue"; | 434 | // import ninemonth from "@/components/report/ninemonth.vue"; |
434 | import generatereport from "@/components/report/generatereport.vue"; | 435 | // import generatereport from "@/components/report/generatereport.vue"; |
435 | import http from "@/Services/http.js"; | 436 | import http from "@/Services/http.js"; |
436 | import NotificationList from "@/components/widgets/list/NotificationList"; | 437 | import NotificationList from "@/components/widgets/list/NotificationList"; |
437 | import Util from "@/util"; | 438 | import Util from "@/util"; |
438 | 439 | ||
439 | export default { | 440 | export default { |
440 | components: { | 441 | components: { |
441 | "one-month": onemonth, | 442 | // "one-month": onemonth, |
442 | "three-month": threemonth, | 443 | // "three-month": threemonth, |
443 | "six-month": sixmonth, | 444 | // "six-month": sixmonth, |
444 | "nine-month": ninemonth, | 445 | // "nine-month": ninemonth, |
445 | "report-generate": generatereport, | 446 | // "report-generate": generatereport, |
446 | }, | 447 | }, |
447 | data: () => ({ | 448 | data: () => ({ |
448 | component: "report-generate", | 449 | component: "report-generate", |
449 | snackbar: false, | 450 | snackbar: false, |
450 | y: "top", | 451 | y: "top", |
451 | x: "right", | 452 | x: "right", |
452 | mode: "", | 453 | mode: "", |
453 | timeout: 3000, | 454 | timeout: 3000, |
454 | text: "", | 455 | text: "", |
455 | loading: false, | 456 | loading: false, |
456 | date:null, | 457 | date:null, |
457 | term: "", | 458 | search: '', |
458 | modal: false, | 459 | modal: false, |
459 | modaledit:false, | 460 | modaledit:false, |
460 | menu: false, | 461 | menu: false, |
461 | menu1:false, | 462 | menu1:false, |
462 | dialog: false, | 463 | dialog: false, |
463 | dialog1: false, | 464 | dialog1: false, |
464 | dialog2: false, | 465 | dialog2: false, |
465 | valid: true, | 466 | valid: true, |
466 | isActive: true, | 467 | isActive: true, |
467 | newActive: false, | 468 | newActive: false, |
468 | isActivebtn: false, | 469 | isActivebtn: false, |
469 | Activebtn1: false, | 470 | Activebtn1: false, |
470 | Activebtn2: false, | 471 | Activebtn2: false, |
471 | Activebtn3: false, | 472 | Activebtn3: false, |
472 | loader: null, | 473 | loader: null, |
473 | loading: false, | 474 | loading: false, |
474 | loading2: false, | 475 | loading2: false, |
475 | loading3: false, | 476 | loading3: false, |
476 | loading4: false, | 477 | loading4: false, |
477 | details: [], | 478 | details: [], |
478 | countries:['US','Canada'], | ||
479 | AddUsercredentials: {}, | ||
480 | pagination: { | 479 | pagination: { |
481 | rowsPerPage: 15 | 480 | rowsPerPage: 15 |
482 | }, | 481 | }, |
483 | rules: { | ||
484 | required: value => !!value || "Date of Birth is Required.", | ||
485 | min: v => | ||
486 | (/^(0?[1-9]|[12][0-9]|3[01])[\/\-](0?[1-9]|1[012])[\/\-]\d{4}$/.test( | ||
487 | v | ||
488 | ) && | ||
489 | v.length > 0) || | ||
490 | "Please enter a date in the format dd/mm/yyyy" | ||
491 | }, | ||
492 | nameRules: [v => !!v || " Full Name is required"], | 482 | nameRules: [v => !!v || " Full Name is required"], |
493 | emailRules: [ | 483 | emailRules: [ |
494 | v => !!v || "E-mail is required", | 484 | v => !!v || "E-mail is required", |
495 | v => /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 'E-mail must be valid' | 485 | v => /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 'E-mail must be valid' |
496 | ], | 486 | ], |
497 | countryRules: [v => !!v || " Country Name is required"], | ||
498 | headers: [ | 487 | headers: [ |
499 | { | 488 | { |
500 | text: "No", | 489 | text: "No", |
501 | align: "center", | 490 | align: "center", |
502 | sortable: false, | 491 | sortable: false, |
503 | value: "No" | 492 | value: "No" |
504 | }, | 493 | }, |
505 | { text: "Name", value: "name", sortable: false, align: "center" }, | 494 | { text: "Name", value: "name", sortable: false, align: "center" }, |
506 | { text: "Email", value: "email", sortable: false, align: "center" }, | 495 | { text: "Email", value: "email", sortable: false, align: "center" }, |
507 | { text: "", value: "", sortable: false, align: "center" } | 496 | { text: "", value: "", sortable: false, align: "center" } |
508 | ], | 497 | ], |
509 | desserts: [], | 498 | desserts: [], |
510 | editedIndex: -1, | 499 | editedIndex: -1, |
511 | editedItem: { | 500 | editedItem: { |
512 | No: "", | 501 | role: "TEACHER", |
513 | name: "", | 502 | name: "", |
514 | email: "", | 503 | email: "", |
515 | date: null, | ||
516 | country: "" | ||
517 | }, | 504 | }, |
518 | defaultItem: { | 505 | defaultItem: { |
519 | No: "", | 506 | role: "TEACHER", |
520 | name: "", | 507 | name: "", |
521 | email: "", | 508 | email: "", |
522 | date: null, | ||
523 | dob: "" | ||
524 | }, | 509 | }, |
525 | userName:'', | 510 | userName:'', |
526 | items: [ | 511 | items: [ |
527 | { | 512 | { |
528 | href: "/changepassword", | 513 | href: "/changepassword", |
529 | title: "Change Password", | 514 | title: "Change Password", |
530 | click: e => { | 515 | click: e => { |
531 | console.log(e); | 516 | console.log(e); |
532 | } | 517 | } |
533 | }, | 518 | }, |
534 | { | 519 | { |
535 | href: "#", | 520 | href: "#", |
536 | title: "Logout", | 521 | title: "Logout", |
537 | click: e => { | 522 | click: e => { |
538 | window.getApp.$emit("APP_LOGOUT"); | 523 | window.getApp.$emit("APP_LOGOUT"); |
539 | } | 524 | } |
540 | } | 525 | } |
541 | ] | 526 | ] |
542 | }), | 527 | }), |
543 | watch: { | 528 | watch: { |
544 | menu (val) { | 529 | menu (val) { |
545 | val && this.$nextTick(() => (this.$refs.picker.activePicker = 'YEAR')) | 530 | val && this.$nextTick(() => (this.$refs.picker.activePicker = 'YEAR')) |
546 | }, | 531 | }, |
547 | menu1 (val) { | 532 | menu1 (val) { |
548 | val && this.$nextTick(() => (this.$refs.picker.activePicker = 'YEAR')) | 533 | val && this.$nextTick(() => (this.$refs.picker.activePicker = 'YEAR')) |
549 | } | 534 | } |
550 | }, | 535 | }, |
551 | methods: { | 536 | methods: { |
552 | save (date) { | 537 | getTeacherList() { |
553 | this.$refs.menu.save(date) | ||
554 | }, | ||
555 | getPatientList() { | ||
556 | var token = this.$store.state.token; | 538 | var token = this.$store.state.token; |
557 | http() | 539 | http() |
558 | .get("/patientList?term=" + this.term, { | 540 | .get("/getTeachersList", { |
559 | headers: { Authorization: "Bearer " + token } | 541 | headers: { Authorization: "Bearer " + token } |
560 | }) | 542 | }) |
561 | .then(response => { | 543 | .then(response => { |
562 | this.desserts = response.data.data.existingUser; | 544 | this.desserts = response.data.data; |
545 | console.log("getTeacherList=====>",this.desserts) | ||
546 | |||
563 | }) | 547 | }) |
564 | .catch(err => { | 548 | .catch(err => { |
565 | // console.log("err====>", err); | 549 | // console.log("err====>", err); |
566 | this.$router.replace({ path: '/' }); | 550 | this.$router.replace({ path: '/' }); |
567 | }); | 551 | }); |
568 | }, | 552 | }, |
569 | editItem(item) { | 553 | editItem(item) { |
570 | this.editedIndex = this.desserts.indexOf(item); | 554 | this.editedIndex = this.desserts.indexOf(item); |
571 | this.editedItem = Object.assign({}, item); | 555 | this.editedItem = Object.assign({}, item); |
572 | this.dialog = true; | 556 | this.dialog = true; |
573 | }, | 557 | }, |
574 | profile(item) { | 558 | profile(item) { |
575 | this.editedIndex = this.desserts.indexOf(item); | 559 | this.editedIndex = this.desserts.indexOf(item); |
576 | this.editedItem = Object.assign({}, item); | 560 | this.editedItem = Object.assign({}, item); |
577 | this.dialog1 = true; | 561 | this.dialog1 = true; |
578 | }, | 562 | }, |
579 | report(item) { | 563 | // report(item) { |
580 | this.editedIndex = this.desserts.indexOf(item); | 564 | // this.editedIndex = this.desserts.indexOf(item); |
581 | this.editedItem = Object.assign({}, item); | 565 | // this.editedItem = Object.assign({}, item); |
582 | this.dialog2 = true; | 566 | // this.dialog2 = true; |
583 | }, | 567 | // }, |
584 | 568 | ||
585 | deleteItem(item) { | 569 | deleteItem(item) { |
586 | let addUsers = { | 570 | let deleteTeachers = { |
587 | userId: item.userId | 571 | teacherId: item._id |
588 | }; | 572 | }; |
573 | console.log("deleteUers",deleteTeachers) | ||
589 | http() | 574 | http() |
590 | .post("/deletePatient", confirm('Are you sure you want to delete this?') && addUsers) | 575 | .delete("/deleteTeacher", confirm('Are you sure you want to delete this?') && { params: deleteTeachers }) |
591 | .then(response => { | 576 | .then(response => { |
577 | console.log("deleteUers",deleteTeachers) | ||
592 | if ((this.snackbar = true)) { | 578 | if ((this.snackbar = true)) { |
593 | this.text = "Successfully delete Existing User"; | 579 | this.text = "Successfully delete Existing User"; |
594 | } | 580 | } |
595 | this.getPatientList(); | 581 | this.getTeacherList(); |
596 | }) | 582 | }) |
597 | .catch(error => { | 583 | .catch(error => { |
598 | // console.log(error); | 584 | console.log(error); |
599 | }); | 585 | }); |
600 | }, | 586 | }, |
601 | activeTab(type) { | 587 | activeTab(type) { |
602 | switch (type) { | 588 | switch (type) { |
603 | case "existing": | 589 | case "existing": |
604 | this.newActive = false; | 590 | this.newActive = false; |
605 | this.isActive = true; | 591 | this.isActive = true; |
606 | break; | 592 | break; |
607 | 593 | ||
608 | default: | 594 | default: |
609 | this.newActive = true; | 595 | this.newActive = true; |
610 | this.isActive = false; | 596 | this.isActive = false; |
611 | break; | 597 | break; |
612 | } | 598 | } |
613 | }, | 599 | }, |
614 | activebtn(type) { | 600 | activebtn(type) { |
615 | switch (type) { | 601 | switch (type) { |
616 | case "existing": | 602 | case "existing": |
617 | this.Activebtn3 = false; | 603 | this.Activebtn3 = false; |
618 | this.Activebtn2 = false; | 604 | this.Activebtn2 = false; |
619 | this.Activebtn1 = false; | 605 | this.Activebtn1 = false; |
620 | this.isActivebtn = true; | 606 | this.isActivebtn = true; |
621 | break; | 607 | break; |
622 | case "new": | 608 | case "new": |
623 | this.Activebtn3 = false; | 609 | this.Activebtn3 = false; |
624 | this.Activebtn2 = false; | 610 | this.Activebtn2 = false; |
625 | this.Activebtn1 = true; | 611 | this.Activebtn1 = true; |
626 | this.isActivebtn = false; | 612 | this.isActivebtn = false; |
627 | break; | 613 | break; |
628 | case "new1": | 614 | case "new1": |
629 | this.Activebtn3 = false; | 615 | this.Activebtn3 = false; |
630 | this.Activebtn2 = true; | 616 | this.Activebtn2 = true; |
631 | this.Activebtn1 = false; | 617 | this.Activebtn1 = false; |
632 | this.isActivebtn = false; | 618 | this.isActivebtn = false; |
633 | break; | 619 | break; |
634 | default: | 620 | default: |
635 | this.Activebtn3 = true; | 621 | this.Activebtn3 = true; |
636 | this.Activebtn2 = false; | 622 | this.Activebtn2 = false; |
637 | this.Activebtn1 = false; | 623 | this.Activebtn1 = false; |
638 | this.isActivebtn = false; | 624 | this.isActivebtn = false; |
639 | break; | 625 | break; |
640 | } | 626 | } |
641 | }, | 627 | }, |
642 | close() { | 628 | close() { |
643 | this.dialog = false; | 629 | this.dialog = false; |
644 | setTimeout(() => { | 630 | setTimeout(() => { |
645 | this.editedItem = Object.assign({}, this.defaultItem); | 631 | this.editedItem = Object.assign({}, this.defaultItem); |
646 | this.editedIndex = -1; | 632 | this.editedIndex = -1; |
647 | }, 300); | 633 | }, 300); |
648 | }, | 634 | }, |
649 | close1() { | 635 | close1() { |
650 | this.dialog1 = false; | 636 | this.dialog1 = false; |
651 | }, | 637 | }, |
652 | close2() { | 638 | close2() { |
653 | this.dialog2 = false; | 639 | this.dialog2 = false; |
654 | }, | 640 | }, |
655 | submit() { | 641 | submit() { |
656 | if (this.$refs.form.validate()) { | 642 | if (this.$refs.form.validate()) { |
657 | let addUsers = { | 643 | let addUsers = { |
658 | name: this.editedItem.name, | 644 | name: this.editedItem.name, |
659 | dob: this.editedItem.date, | ||
660 | email: this.editedItem.email, | 645 | email: this.editedItem.email, |
661 | country: this.editedItem.country | 646 | role: this.editedItem.role |
662 | }; | 647 | }; |
663 | // console.log(addUsers) | 648 | // console.log(addUsers) |
664 | http() | 649 | http() |
665 | .post("/patient", addUsers) | 650 | .post("/createTeacher", addUsers) |
666 | .then(response => { | 651 | .then(response => { |
667 | this.getPatientList(); | 652 | this.getTeacherList(); |
668 | if (this.snackbar = true) { | 653 | if (this.snackbar = true) { |
669 | this.text = "New user added successfully"; | 654 | this.text = "New user added successfully"; |
670 | } | 655 | } |
671 | 656 | ||
672 | this.clear(); | 657 | this.clear(); |
673 | }) | 658 | }) |
674 | .catch(error => { | 659 | .catch(error => { |
675 | // console.log(error); | 660 | // console.log(error); |
676 | if (this.snackbar = true) { | 661 | if (this.snackbar = true) { |
677 | this.text = error.response.data.message; | 662 | this.text = error.response.data.message; |
678 | } | 663 | } |
679 | }); | 664 | }); |
680 | } | 665 | } |
681 | }, | 666 | }, |
682 | mail() { | 667 | mail() { |
683 | }, | 668 | }, |
684 | download() { | 669 | download() { |
685 | }, | 670 | }, |
686 | clear() { | 671 | clear() { |
687 | this.$refs.form.reset(); | 672 | this.$refs.form.reset(); |
688 | }, | 673 | }, |
689 | save() { | 674 | save() { |
690 | let editUsers = { | 675 | let editUsers = { |
691 | name: this.editedItem.name, | 676 | name: this.editedItem.name, |
692 | dob: this.editedItem.dob, | ||
693 | email: this.editedItem.email, | 677 | email: this.editedItem.email, |
694 | userId: this.editedItem.userId | 678 | teacherId: this.editedItem._id |
695 | }; | 679 | }; |
696 | http() | 680 | http() |
697 | .post("/patientDetail", editUsers) | 681 | .put("/updateTeacher", editUsers) |
698 | .then(response => { | 682 | .then(response => { |
683 | console.log("editUsers",editUsers); | ||
699 | if ((this.snackbar = true)) { | 684 | if ((this.snackbar = true)) { |
700 | this.text = "Successfully Edit Existing User"; | 685 | this.text = "Successfully Edit Existing User"; |
701 | } | 686 | } |
702 | this.getPatientList(); | 687 | this.getTeacherList(); |
703 | }) | 688 | }) |
704 | .catch(error => { | 689 | .catch(error => { |
705 | // console.log(error); | 690 | // console.log(error); |
706 | }); | 691 | }); |
707 | this.close(); | 692 | this.close(); |
708 | }, | 693 | }, |
709 | handleDrawerToggle() { | 694 | handleDrawerToggle() { |
710 | window.getApp.$emit("APP_DRAWER_TOGGLED"); | 695 | window.getApp.$emit("APP_DRAWER_TOGGLED"); |
711 | }, | 696 | }, |
712 | handleFullScreen() { | 697 | handleFullScreen() { |
713 | Util.toggleFullScreen(); | 698 | Util.toggleFullScreen(); |
714 | } | 699 | } |
715 | }, | 700 | }, |
716 | mounted() { | 701 | mounted() { |
717 | this.getPatientList(); | 702 | this.getTeacherList(); |
718 | this.userName = this.$store.state.name; | 703 | // console.log("Id",this.$store.state.id) |
704 | // console.log("token",this.$store.state.token) | ||
719 | }, | 705 | }, |
720 | computed:{ | 706 | computed:{ |
721 | toolbarColor() { | 707 | toolbarColor() { |
722 | return this.$vuetify.options.extra.mainNav; | 708 | return this.$vuetify.options.extra.mainNav; |
723 | } | 709 | } |
724 | } | 710 | } |
725 | }; | 711 | }; |
726 | </script> | 712 | </script> |
727 | <style scoped> | 713 | <style scoped> |
728 | .v-tabs__div { | 714 | .v-tabs__div { |
729 | text-transform: none; | 715 | text-transform: none; |
730 | } | 716 | } |
731 | .v-input__prepend-outer { | 717 | .v-input__prepend-outer { |
732 | margin-right: 0px !important; | 718 | margin-right: 0px !important; |
733 | } | 719 | } |
734 | .v-card__actions .v-btn { | 720 | .v-card__actions .v-btn { |
735 | margin: 0 15px; | 721 | margin: 0 15px; |
736 | min-width: 120px; | 722 | min-width: 120px; |
737 | } | 723 | } |
738 | .primary { | 724 | .primary { |
739 | background-color: #aaa !important; | 725 | background-color: #aaa !important; |
740 | border-color: #aaa !important; | 726 | border-color: #aaa !important; |
741 | } | 727 | } |
742 | h4 { | 728 | h4 { |
743 | background-repeat: no-repeat; | 729 | background-repeat: no-repeat; |
744 | padding: 8px; | 730 | padding: 8px; |
745 | margin: auto; | 731 | margin: auto; |
746 | font-size: 25px; | 732 | font-size: 25px; |
747 | } | 733 | } |
748 | #name { | 734 | #name { |
749 | position: absolute; | 735 | position: absolute; |
750 | left: 100px; | 736 | left: 100px; |
751 | top: 17px; | 737 | top: 17px; |
752 | } | 738 | } |
753 | #icon { | 739 | #icon { |
754 | position: absolute; | 740 | position: absolute; |
755 | right: 8px; | 741 | right: 8px; |
756 | top: 8px; | 742 | top: 8px; |
757 | } | 743 | } |
758 | #m { | 744 | #m { |
759 | position: relative; | 745 | position: relative; |
760 | left: 135px; | 746 | left: 135px; |
761 | top: -15px; | 747 | top: -15px; |
762 | } | 748 | } |
763 | #G { | 749 | #G { |
764 | position: absolute; | 750 | position: absolute; |
765 | top: 38px; | 751 | top: 38px; |
766 | color: white; | 752 | color: white; |
767 | } | 753 | } |
768 | #bt { | 754 | #bt { |
769 | position: relative; | 755 | position: relative; |
770 | top: -20px; | 756 | top: -20px; |
771 | left: 115px; | 757 | left: 115px; |
772 | } | 758 | } |
773 | #e { | 759 | #e { |
774 | position: relative; | 760 | position: relative; |
775 | top: 5px; | 761 | top: 5px; |
776 | right: -30px; | 762 | right: -30px; |
777 | height: 17px; | 763 | height: 17px; |
778 | cursor: pointer; | 764 | cursor: pointer; |
779 | } | 765 | } |
780 | #d { | 766 | #d { |
781 | position: relative; | 767 | position: relative; |
782 | top: 5px; | 768 | top: 5px; |
783 | right: -70px; | 769 | right: -70px; |
784 | height: 17px; | 770 | height: 17px; |
785 | cursor: pointer; | 771 | cursor: pointer; |
786 | } | 772 | } |
787 | #td { | 773 | #td { |
788 | border: 1px solid #dddddd; | 774 | border: 1px solid #dddddd; |
789 | text-align: left; | 775 | text-align: left; |
790 | padding: 8px; | 776 | padding: 8px; |
791 | } | 777 | } |
792 | #dialog { | 778 | #dialog { |
793 | height: 550px; | 779 | height: 550px; |
794 | } | 780 | } |
795 | .active { | 781 | .active { |
796 | background-color: black; | 782 | background-color: black; |
797 | color: white !important; | 783 | color: white !important; |
798 | } | 784 | } |
799 | .activebtn { | 785 | .activebtn { |
800 | color: black !important; | 786 | color: black !important; |
801 | } | 787 | } |
802 | #flex { | 788 | #flex { |
803 | height: 300px; | 789 | height: 300px; |
804 | } | 790 | } |
805 | .top{ | 791 | .top{ |
806 | margin-top:100px; | 792 | margin-top:100px; |
807 | } | 793 | } |
808 | .v-tabs__item a{ | 794 | .v-tabs__item a{ |
809 | font-size:16px !important; | 795 | font-size:16px !important; |
810 | } | 796 | } |
811 | @media screen and (max-width: 769px){ | 797 | @media screen and (max-width: 769px){ |
812 | .top{ | 798 | .top{ |
813 | margin-top:0 !important; | 799 | margin-top:0 !important; |
814 | } | 800 | } |
815 | .userSearch .v-icon { | 801 | .userSearch .v-icon { |
816 | font-size: 20px !important; | 802 | font-size: 20px !important; |
817 | margin-left: 20px ; | 803 | margin-left: 20px ; |
818 | } | 804 | } |
819 | } | 805 | } |
820 | @media screen and (max-width: 380px) { | 806 | @media screen and (max-width: 380px) { |
821 | .right { | 807 | .right { |
822 | float: none !important; | 808 | float: none !important; |
823 | } | 809 | } |
824 | .subheading { | 810 | .subheading { |
825 | font-size: 14px !important; | 811 | font-size: 14px !important; |
826 | } | 812 | } |
827 | .v-card__actions .v-btn{ | 813 | .v-card__actions .v-btn{ |
828 | margin: 0 0px; | 814 | margin: 0 0px; |
829 | min-width: 100px; | 815 | min-width: 100px; |
830 | } | 816 | } |
831 | /* .searchIcon .v-icon { | 817 | /* .searchIcon .v-icon { |
832 | font-size: 20px; | 818 | font-size: 20px; |
833 | margin-left: 20px; | 819 | margin-left: 20px; |
834 | } */ | 820 | } */ |
835 | .subheading { | 821 | .subheading { |
836 | font-size: 12px !important; | 822 | font-size: 12px !important; |
837 | } | 823 | } |
838 | h5 { | 824 | h5 { |
839 | font-size: 13px; | 825 | font-size: 13px; |
840 | } | 826 | } |
841 | } | 827 | } |
842 | .v-icon{ | 828 | .v-icon{ |
843 | font-size:30px; | 829 | font-size:30px; |
844 | } | 830 | } |
845 | @media screen and (min-width: 1270px){ | 831 | @media screen and (min-width: 1270px){ |
846 | .hide{ | 832 | .hide{ |
847 | display: none; | 833 | display: none; |
848 | } | 834 | } |
849 | /* } | 835 | /* } |
850 | @media screen and (max-width: 962px) { | 836 | @media screen and (max-width: 962px) { |
851 | .imglogo{ | 837 | .imglogo{ |
852 | position: absolute; | 838 | position: absolute; |
853 | top: 13px; | 839 | top: 13px; |
854 | left: 13px !important; | 840 | left: 13px !important; |
855 | width: 70px; | 841 | width: 70px; |
856 | height: 24px; | 842 | height: 24px; |
857 | } */ | 843 | } */ |
858 | } | 844 | } |
859 | @media screen and (max-width: 420px){ | 845 | @media screen and (max-width: 420px){ |
860 | .userSearch .v-text-field .v-label{ | 846 | .userSearch .v-text-field .v-label{ |
861 | line-height: 24px !important; | 847 | line-height: 24px !important; |
862 | } | 848 | } |
863 | .userSearch .v-label{ | 849 | .userSearch .v-label{ |
864 | font-size: 13px !important; | 850 | font-size: 13px !important; |
865 | } | 851 | } |
866 | .v-list__tile { | 852 | .v-list__tile { |
src/pages/Login.vue
1 | <template> | 1 | <template> |
2 | <v-app id="login"> | 2 | <v-app id="login"> |
3 | <v-toolbar color="grey lighten"> | 3 | <v-toolbar color="grey lighten"> |
4 | <v-toolbar-items> | 4 | <v-toolbar-items> |
5 | <img src="/static/ana@2x.png" height="36" alt="ana"> | 5 | <!-- <img src="/static/ana@2x.png" height="36" alt="ana"> --> |
6 | <h3 class="white--text my-3 ml-4">School-Management</h3> | ||
6 | </v-toolbar-items> | 7 | </v-toolbar-items> |
7 | </v-toolbar> | 8 | </v-toolbar> |
8 | <v-content> | 9 | <v-content> |
9 | <v-container fluid fill-height> | 10 | <v-container fluid fill-height> |
10 | <v-snackbar | 11 | <v-snackbar |
11 | :timeout="timeout" | 12 | :timeout="timeout" |
12 | :top="y === 'top'" | 13 | :top="y === 'top'" |
13 | :right="x === 'right'" | 14 | :right="x === 'right'" |
14 | :vertical="mode === 'vertical'" | 15 | :vertical="mode === 'vertical'" |
15 | v-model="snackbar" | 16 | v-model="snackbar" |
16 | :color="color" | 17 | :color="color" |
17 | >{{ text }}</v-snackbar> | 18 | >{{ text }}</v-snackbar> |
18 | <v-layout align-center justify-center> | 19 | <v-layout align-center justify-center> |
19 | <v-flex xs12 sm10 md6 lg4> | 20 | <v-flex xs12 sm10 md6 lg4> |
20 | <v-toolbar color="black" dark> | 21 | <v-toolbar color="black" dark> |
21 | <v-spacer></v-spacer> | 22 | <v-spacer></v-spacer> |
22 | <v-toolbar-title>Admin Login</v-toolbar-title> | 23 | <v-toolbar-title>School Login</v-toolbar-title> |
23 | <v-spacer></v-spacer> | 24 | <v-spacer></v-spacer> |
24 | </v-toolbar> | 25 | </v-toolbar> |
25 | 26 | ||
26 | <v-card class="elevation-1 pa-1"> | 27 | <v-card class="elevation-1 pa-1"> |
27 | <v-card-text> | 28 | <v-card-text> |
28 | <v-flex xs12 sm12 md12 lg12> | 29 | <v-flex xs12 sm12 md12 lg12> |
29 | <v-form ref="form" v-model="valid" lazy-validation> | 30 | <v-form ref="form" v-model="valid" lazy-validation> |
30 | <v-text-field | 31 | <v-text-field |
31 | v-model="userLogincredentials.userName" | 32 | v-model="userLogincredentials.email" |
32 | :rules="nameRules" | 33 | :rules="nameRules" |
33 | label="Username" | 34 | label="Username" |
34 | required | 35 | required |
35 | ></v-text-field> | 36 | ></v-text-field> |
36 | <v-text-field | 37 | <v-text-field |
37 | :rules="[rules.required, rules.min]" | 38 | :rules="[rules.required]" |
38 | v-model="userLogincredentials.password" | 39 | v-model="userLogincredentials.password" |
39 | :append-icon="e1 ? 'visibility_off' : 'visibility'" | 40 | :append-icon="e1 ? 'visibility_off' : 'visibility'" |
40 | :append-icon-cb="() => (e1 = !e1)" | 41 | :append-icon-cb="() => (e1 = !e1)" |
41 | :type="e1 ? 'password' : 'text'" | 42 | :type="e1 ? 'password' : 'text'" |
42 | name="input-10-1" | 43 | name="input-10-1" |
43 | label="Password" | 44 | label="Password" |
44 | counter | 45 | counter |
45 | ></v-text-field> | 46 | ></v-text-field> |
46 | </v-form> | 47 | </v-form> |
47 | <v-layout row wrap> | 48 | <v-layout row wrap> |
48 | <v-flex xs6> | 49 | <v-flex xs6> |
49 | <v-checkbox :label="`Remember me`" v-model="remember"></v-checkbox> | 50 | <v-checkbox :label="`Remember me`" v-model="remember"></v-checkbox> |
50 | </v-flex> | 51 | </v-flex> |
51 | <v-flex xs6> | 52 | <v-flex xs6> |
52 | <h5 class="right mt-4"> <router-link class="link" to="/forgetpassword" style="border-bottom: 2px solid #aaa;">Forgot Password</router-link></h5> | 53 | <h5 class="right mt-4"> <router-link class="link" to="/forgetpassword" style="border-bottom: 2px solid #aaa;">Forgot Password</router-link></h5> |
53 | </v-flex> | 54 | </v-flex> |
54 | </v-layout> | 55 | </v-layout> |
55 | </v-flex> | 56 | </v-flex> |
56 | </v-card-text> | 57 | </v-card-text> |
57 | <v-layout> | 58 | <v-layout> |
58 | <v-flex sm12 class="my-3"> | 59 | <v-flex sm12 class="my-3"> |
59 | <v-btn style="margin: auto;display: block;" round color="black" dark large @click="login" :loading="loading">Login</v-btn> | 60 | <v-btn style="margin: auto;display: block;" round color="black" dark large @click="login" :loading="loading">Login</v-btn> |
60 | </v-flex> | 61 | </v-flex> |
61 | </v-layout> | 62 | </v-layout> |
62 | <v-layout> | 63 | <v-layout> |
63 | </v-layout> | 64 | </v-layout> |
64 | </v-card> | 65 | </v-card> |
65 | </v-flex> | 66 | </v-flex> |
66 | </v-layout> | 67 | </v-layout> |
67 | </v-container> | 68 | </v-container> |
68 | </v-content> | 69 | </v-content> |
69 | <v-footer class="pa-4" color="grey darken-2"></v-footer> | 70 | <v-footer class="pa-4" color="grey darken-2"></v-footer> |
70 | </v-app> | 71 | </v-app> |
71 | </template> | 72 | </template> |
72 | 73 | ||
73 | <script> | 74 | <script> |
74 | import http from "@/Services/http.js"; | 75 | import http from "@/Services/http.js"; |
75 | export default { | 76 | export default { |
76 | data() { | 77 | data() { |
77 | return { | 78 | return { |
78 | snackbar: false, | 79 | snackbar: false, |
79 | y: "top", | 80 | y: "top", |
80 | x: "right", | 81 | x: "right", |
81 | mode: "", | 82 | mode: "", |
82 | timeout: 3000, | 83 | timeout: 3000, |
83 | text: "", | 84 | text: "", |
84 | e1: true, | 85 | e1: true, |
85 | loading: false, | 86 | loading: false, |
86 | remember: false, | 87 | remember: false, |
87 | valid: false, | 88 | valid: false, |
88 | userLogincredentials: {}, | 89 | userLogincredentials: {}, |
89 | username: "", | ||
90 | nameRules: [ | 90 | nameRules: [ |
91 | v => !!v || "Username is required" | 91 | v => !!v || "Username is required" |
92 | // v => v.length >0 | 92 | |
93 | ], | 93 | ], |
94 | // email: '', | ||
95 | // erules: { | ||
96 | // required: value => !!value || 'This email field is Required.', | ||
97 | // em: v => (v.length > 0 && /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 'Email must be valid') | ||
98 | // }, | ||
99 | password: "", | 94 | password: "", |
95 | email:"", | ||
100 | rules: { | 96 | rules: { |
101 | required: value => !!value || "password is Required.", | 97 | required: value => !!value || "password is Required.", |
102 | min: v => | 98 | // min: v => |
103 | (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/.test( | 99 | // (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/.test( |
104 | v | 100 | // v |
105 | ) && | 101 | // ) && |
106 | v.length >= 8) || | 102 | // v.length >= 4) || |
107 | "Min 8 characters upper case lower case symbol required" | 103 | // "Min 4 characters upper case lower case symbol required" |
108 | } | 104 | } |
109 | }; | 105 | }; |
110 | }, | 106 | }, |
111 | methods: { | 107 | methods: { |
112 | login() { | 108 | login() { |
113 | var userdata = { | 109 | var userdata = { |
114 | userName: this.userLogincredentials.userName, | 110 | email: this.userLogincredentials.email, |
115 | password: this.userLogincredentials.password | 111 | password: this.userLogincredentials.password, |
112 | role:"ADMIN" | ||
113 | |||
116 | }; | 114 | }; |
117 | http() | 115 | http() |
118 | .post("/adminLogin", userdata) | 116 | .post("/schoolLogin", userdata) |
119 | .then(response => { | 117 | .then(response => { |
120 | this.$store.dispatch("setToken", response.data.data.token); | 118 | this.$store.dispatch("setToken", response.data.data.token); |
121 | this.$store.dispatch("setName", response.data.data.name); | 119 | this.$store.dispatch("Id", response.data.data.id); |
122 | this.loading = true; | 120 | this.loading = true; |
123 | if ((this.snackbar = true)) { | 121 | if ((this.snackbar = true)) { |
124 | this.text = "Successfully Login"; | 122 | this.text = "Successfully Login"; |
125 | } | 123 | } |
126 | setTimeout(() => { | 124 | setTimeout(() => { |
127 | this.$router.push("/dashboard"); | 125 | this.$router.push("/dashboard"); |
128 | }, 2000); | 126 | }, 2000); |
129 | }) | 127 | }) |
130 | .catch(err => { | 128 | .catch(err => { |
131 | this.text = "Email or Password not matched !!"; | 129 | this.text = "Email or Password not matched !!"; |
132 | this.snackbar = true; | 130 | this.snackbar = true; |
133 | this.loading = false; | 131 | this.loading = false; |
134 | }); | 132 | }); |
135 | } | 133 | } |
136 | }, | 134 | }, |
137 | computed: { | 135 | computed: { |
138 | color() { | 136 | color() { |
139 | return this.loading ? "success" : "error"; | 137 | return this.loading ? "success" : "error"; |
140 | } | 138 | } |
141 | } | 139 | } |
142 | }; | 140 | }; |
143 | </script> | 141 | </script> |
144 | 142 | ||
145 | <style scoped lang="css"> | 143 | <style scoped lang="css"> |
146 | #login { | 144 | #login { |
147 | width: 100%; | 145 | width: 100%; |
148 | position: absolute; | 146 | position: absolute; |
149 | top: 0; | 147 | top: 0; |
150 | left: 0; | 148 | left: 0; |
151 | content: ""; | 149 | content: ""; |
152 | z-index: 0; | 150 | z-index: 0; |
153 | } | 151 | } |
154 | </style> | 152 | </style> |
155 | <style scoped> | 153 | <style scoped> |
156 | img { | 154 | img { |
157 | position: absolute; | 155 | position: absolute; |
158 | top: 13px; | 156 | top: 13px; |
159 | left: 50px; | 157 | left: 50px; |
160 | } | 158 | } |
161 | .v-btn--large { | 159 | .v-btn--large { |
162 | padding: 0px 84px; | 160 | padding: 0px 84px; |
163 | } | 161 | } |
164 | .link{ | 162 | .link{ |
165 | text-decoration:none; | 163 | text-decoration:none; |
166 | } | 164 | } |
167 | a { | 165 | a { |
168 | color: #696969; | 166 | color: #696969; |
169 | } | 167 | } |
170 | .forget{ | 168 | .forget{ |
171 | margin-top:20px; | 169 | margin-top:20px; |
172 | } | 170 | } |
173 | .mt-4 { | 171 | .mt-4 { |
174 | margin-top: 21px !important; | 172 | margin-top: 21px !important; |
175 | } | 173 | } |
176 | @media screen and (max-width: 600px) { | 174 | @media screen and (max-width: 600px) { |
177 | .forget{ | 175 | .forget{ |
178 | margin-top:none; | 176 | margin-top:none; |
179 | margin-left:18px; | 177 | margin-left:18px; |
180 | } | 178 | } |
181 | img{ | 179 | img{ |
182 | top:16px; | 180 | top:16px; |
183 | left:10px; | 181 | left:10px; |
184 | height: 24px; | 182 | height: 24px; |
src/pages/Provider.vue
1 | <template> | File was deleted | |
2 | <v-flex xs12> | ||
3 | <app-toolbar class="app--toolbar"></app-toolbar> | ||
4 | <v-card> | ||
5 | <v-card-title> | ||
6 | <v-flex xs12 lg2 md3 sm4> | ||
7 | <h4 class="text-xs-center font-weight-medium">Healthcare Providers</h4> | ||
8 | </v-flex> | ||
9 | <v-spacer></v-spacer> | ||
10 | <!-- ****** SEARCH ALL HEALTH PROVIDER ****** --> | ||
11 | <v-flex xs12 sm4 lg3 class="top"> | ||
12 | <v-text-field | ||
13 | justify-right | ||
14 | prepend-icon="search" | ||
15 | v-model="term" | ||
16 | label="Find Yours Users" | ||
17 | color="black" | ||
18 | @change="getProviderList" | ||
19 | ></v-text-field> | ||
20 | </v-flex> | ||
21 | </v-card-title> | ||
22 | <!-- ****** EDIT HEALTH PROVIDER ****** --> | ||
23 | <v-snackbar | ||
24 | :timeout="timeout" | ||
25 | :top="y === 'top'" | ||
26 | :right="x === 'right'" | ||
27 | :vertical="mode === 'vertical'" | ||
28 | v-model="snackbar" | ||
29 | color="success" | ||
30 | >{{ text }}</v-snackbar> | ||
31 | <v-dialog v-model="dialog" max-width="500px"> | ||
32 | <v-toolbar color="white"> | ||
33 | <v-spacer></v-spacer> | ||
34 | <v-toolbar-title>Edit Profile</v-toolbar-title> | ||
35 | <v-spacer></v-spacer> | ||
36 | </v-toolbar> | ||
37 | <v-card> | ||
38 | <v-flex align-center justify-center layout text-xs-center> | ||
39 | <v-avatar size="50px" style="position:absolute; top:10px; "> | ||
40 | <img src="/static/icon/user.png"> | ||
41 | </v-avatar> | ||
42 | </v-flex> | ||
43 | <v-card-text> | ||
44 | <v-container grid-list-md> | ||
45 | <v-layout wrap justify-center> | ||
46 | <v-flex xs12 sm9> | ||
47 | <v-form ref="form" v-model="valid" lazy-validation> | ||
48 | <v-layout style="position:relative; top:15px; "> | ||
49 | <v-flex xs4 class="pt-4 subheading"> | ||
50 | <label>Full Name:</label> | ||
51 | </v-flex> | ||
52 | <v-flex xs8> | ||
53 | <v-text-field v-model="editedItem.name" :rules="nameRules" required></v-text-field> | ||
54 | </v-flex> | ||
55 | </v-layout> | ||
56 | <v-layout> | ||
57 | <v-flex xs4 class="pt-4 subheading"> | ||
58 | <label>Email ID:</label> | ||
59 | </v-flex> | ||
60 | <v-flex xs8> | ||
61 | <v-text-field | ||
62 | v-model="editedItem.email" | ||
63 | :rules="emailRules" | ||
64 | data-vv-name="E-mail" | ||
65 | required | ||
66 | ></v-text-field> | ||
67 | </v-flex> | ||
68 | </v-layout> | ||
69 | <v-card-actions> | ||
70 | <v-btn round dark @click.native="close">Cancel</v-btn> | ||
71 | <v-spacer></v-spacer> | ||
72 | <v-btn round dark @click.native="save">Save</v-btn> | ||
73 | </v-card-actions> | ||
74 | </v-form> | ||
75 | </v-flex> | ||
76 | </v-layout> | ||
77 | </v-container> | ||
78 | </v-card-text> | ||
79 | </v-card> | ||
80 | </v-dialog> | ||
81 | <!-- *****VIEW PROFILE OF PRVIDE LIST ****** --> | ||
82 | <v-dialog v-model="dialog1" max-width="700px"> | ||
83 | <v-toolbar color="white"> | ||
84 | <v-spacer></v-spacer> | ||
85 | <v-toolbar-title>Profile</v-toolbar-title> | ||
86 | <v-spacer></v-spacer> | ||
87 | <v-icon @click="close1">close</v-icon> | ||
88 | </v-toolbar> | ||
89 | <v-card> | ||
90 | <v-flex align-center justify-center layout text-xs-center> | ||
91 | <v-avatar size="60px" style="position:absolute; top:10px;"> | ||
92 | <img src="/static/icon/user.png"> | ||
93 | </v-avatar> | ||
94 | </v-flex> | ||
95 | <v-card-text> | ||
96 | <v-container grid-list-md> | ||
97 | <v-layout wrap justify-center> | ||
98 | <v-flex sm12 offset-sm3> | ||
99 | <br> | ||
100 | <br> | ||
101 | <v-layout> | ||
102 | <v-flex xs4> | ||
103 | <h5 class="right">Full Name:</h5> | ||
104 | </v-flex> | ||
105 | <v-flex xs8> | ||
106 | <h5 class="left">{{ editedItem.name }}</h5> | ||
107 | </v-flex> | ||
108 | </v-layout> | ||
109 | <v-layout> | ||
110 | <v-flex xs4> | ||
111 | <h5 class="right">Email:</h5> | ||
112 | </v-flex> | ||
113 | <v-flex xs8> | ||
114 | <h5 class="left">{{ editedItem.email }}</h5> | ||
115 | </v-flex> | ||
116 | </v-layout> | ||
117 | </v-flex> | ||
118 | </v-layout> | ||
119 | </v-container> | ||
120 | </v-card-text> | ||
121 | </v-card> | ||
122 | <!-- ****** PROVIDER DATA TABLE OF PROVIDER DEATILS ****** --> | ||
123 | </v-dialog> | ||
124 | <v-data-table | ||
125 | :headers="headers" | ||
126 | :items="desserts" | ||
127 | class="elevation-1" | ||
128 | :pagination.sync="pagination" | ||
129 | > | ||
130 | <template slot="items" slot-scope="props"> | ||
131 | <v-snackbar | ||
132 | :timeout="timeout" | ||
133 | :top="y === 'top'" | ||
134 | :right="x === 'right'" | ||
135 | :vertical="mode === 'vertical'" | ||
136 | v-model="statussnackbar" | ||
137 | color="success" | ||
138 | >{{ text }}</v-snackbar> | ||
139 | <td id="td" class="text-xs-center">{{ props.index }}</td> | ||
140 | <td id="td" class="text-xs-center">{{ props.item.name}}</td> | ||
141 | <td id="td" class="text-xs-center">{{ props.item.email }}</td> | ||
142 | <td id="td" class="text-xs-center"> | ||
143 | <v-flex xs12 sm12> | ||
144 | <v-select | ||
145 | :items="statusList" | ||
146 | @change="changeswitch(props.item)" | ||
147 | v-model="props.item.e1" | ||
148 | menu-props="auto" | ||
149 | :label="props.item.verified" | ||
150 | hide-details | ||
151 | single-line | ||
152 | ></v-select> | ||
153 | </v-flex> | ||
154 | </td> | ||
155 | <td class="text-xs-center"> | ||
156 | <span> | ||
157 | <img | ||
158 | style="cursor:pointer; width:25px; height:18px; " | ||
159 | class="mr-5" | ||
160 | @click="profile(props.item)" | ||
161 | src="/static/icon/eye1.png" | ||
162 | > | ||
163 | <img | ||
164 | style="cursor:pointer; width:20px; height:18px; " | ||
165 | class="mr-5" | ||
166 | @click="editItem(props.item)" | ||
167 | src="/static/icon/edit1.png" | ||
168 | > | ||
169 | <img | ||
170 | style="cursor:pointer; height:20px; " | ||
171 | class="mr-5" | ||
172 | @click="deleteItem(props.item)" | ||
173 | src="/static/icon/delete1.png" | ||
174 | > | ||
175 | </span> | ||
176 | </td> | ||
177 | </template> | ||
178 | <v-alert | ||
179 | slot="no-results" | ||
180 | :value="true" | ||
181 | color="error" | ||
182 | icon="warning" | ||
183 | >Your search for "{{ term }}" found no results.</v-alert> | ||
184 | </v-data-table> | ||
185 | </v-card> | ||
186 | </v-flex> | ||
187 | </template> | ||
188 | <script> | ||
189 | import http from "@/Services/http.js"; | ||
190 | import AppToolbar from '@/components/AppToolbar'; | ||
191 | |||
192 | |||
193 | export default { | ||
194 | components: { | ||
195 | AppToolbar, | ||
196 | }, | ||
197 | data: () => ({ | ||
198 | snackbar: false, | ||
199 | statussnackbar: false, | ||
200 | y: "top", | ||
201 | x: "right", | ||
202 | mode: "", | ||
203 | timeout: 3000, | ||
204 | text: "", | ||
205 | valid: "", | ||
206 | modaledit: false, | ||
207 | dialog: false, | ||
208 | dialog1: false, | ||
209 | statusList: ["APPROVED", "DECLINED"], | ||
210 | term:'', | ||
211 | e1: "", | ||
212 | rules: { | ||
213 | required: value => !!value || "This field is Required.", | ||
214 | min: v => | ||
215 | (/^(0?[1-9]|[12][0-9]|3[01])[\/\-](0?[1-9]|1[012])[\/\-]\d{4}$/.test( | ||
216 | v | ||
217 | ) && | ||
218 | v.length > 0) || | ||
219 | "Please enter a date in the format dd/mm/yyyy" | ||
220 | }, | ||
221 | nameRules: [v => !!v || " Full Name is required"], | ||
222 | emailRules: [ | ||
223 | v => !!v || "E-mail is required", | ||
224 | v => /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 'E-mail must be valid' | ||
225 | ], | ||
226 | pagination: { | ||
227 | rowsPerPage: 13 | ||
228 | }, | ||
229 | headers: [ | ||
230 | { | ||
231 | text: "No", | ||
232 | align: "center", | ||
233 | sortable: false, | ||
234 | value: "no" | ||
235 | }, | ||
236 | { text: "Name", value: "name", sortable: false, align: "center" }, | ||
237 | { text: "Email", value: "email", sortable: false, align: "center" }, | ||
238 | { text: "Status", value: "verified", sortable: false, align: "center" }, | ||
239 | { text: "", value: "", sortable: false } | ||
240 | ], | ||
241 | desserts: [], | ||
242 | editedIndex: -1, | ||
243 | editedItem: { | ||
244 | No: "", | ||
245 | Name: "", | ||
246 | Email: "", | ||
247 | dob: "" | ||
248 | }, | ||
249 | defaultItem: { | ||
250 | No: "", | ||
251 | Name: "", | ||
252 | Email: "", | ||
253 | dob: "" | ||
254 | } | ||
255 | }), | ||
256 | watch: { | ||
257 | dialog(val) { | ||
258 | val || this.close(); | ||
259 | } | ||
260 | }, | ||
261 | |||
262 | created() { | ||
263 | this.initialize(); | ||
264 | }, | ||
265 | mounted() { | ||
266 | this.getProviderList(); | ||
267 | }, | ||
268 | methods: { | ||
269 | getProviderList() { | ||
270 | var token = this.$store.state.token; | ||
271 | http() | ||
272 | .get("/provider-list?term=" + this.term, { | ||
273 | headers: { Authorization: "Bearer " + token } | ||
274 | }) | ||
275 | .then(response => { | ||
276 | this.desserts = response.data.data.providerList; | ||
277 | }) | ||
278 | .catch(err => { | ||
279 | // console.log("err====>", err); | ||
280 | this.$router.replace({ path: '/' }); | ||
281 | }); | ||
282 | }, | ||
283 | initialize() { | ||
284 | this.desserts = []; | ||
285 | }, | ||
286 | |||
287 | editItem(item) { | ||
288 | this.editedIndex = this.desserts.indexOf(item); | ||
289 | this.editedItem = Object.assign({}, item); | ||
290 | this.dialog = true; | ||
291 | }, | ||
292 | profile(item) { | ||
293 | this.editedIndex = this.desserts.indexOf(item); | ||
294 | this.editedItem = Object.assign({}, item); | ||
295 | this.dialog1 = true; | ||
296 | }, | ||
297 | changeswitch(item) { | ||
298 | let addStatus = { | ||
299 | userId: item.userId, | ||
300 | status: item.e1 | ||
301 | }; | ||
302 | http() | ||
303 | .post("/approve-decline", addStatus) | ||
304 | .then(response => { | ||
305 | if ((this.statussnackbar = true)) { | ||
306 | this.text = "Successfully change your status is" + " " + item.e1; | ||
307 | } | ||
308 | this.getProviderList(); | ||
309 | }) | ||
310 | .catch(error => { | ||
311 | // console.log(error); | ||
312 | }); | ||
313 | }, | ||
314 | deleteItem(item) { | ||
315 | let addUsers = { | ||
316 | userId: item.userId | ||
317 | }; | ||
318 | http() | ||
319 | .post("/deleteProvider", confirm('Are you sure you want to delete this?') && addUsers) | ||
320 | .then(response => { | ||
321 | if ((this.snackbar = true)) { | ||
322 | this.text = "Successfully delete Health Care Priovider"; | ||
323 | } | ||
324 | this.getProviderList(); | ||
325 | }) | ||
326 | .catch(error => { | ||
327 | // console.log(error); | ||
328 | }); | ||
329 | }, | ||
330 | |||
331 | close() { | ||
332 | this.dialog = false; | ||
333 | setTimeout(() => { | ||
334 | this.editedItem = Object.assign({}, this.defaultItem); | ||
335 | this.editedIndex = -1; | ||
336 | }, 300); | ||
337 | }, | ||
338 | close1() { | ||
339 | this.dialog1 = false; | ||
340 | }, | ||
341 | |||
342 | save() { | ||
343 | let editUsers = { | ||
344 | name: this.editedItem.name, | ||
345 | dob: this.editedItem.dob, | ||
346 | email: this.editedItem.email, | ||
347 | userId: this.editedItem.userId | ||
348 | }; | ||
349 | http() | ||
350 | .post("/provider-detail", editUsers) | ||
351 | .then(response => { | ||
352 | if ((this.snackbar = true)) { | ||
353 | this.text = "Successfully Edit Health Care Priovider"; | ||
354 | } | ||
355 | this.getProviderList(); | ||
356 | }) | ||
357 | .catch(error => { | ||
358 | // console.log(error); | ||
359 | }); | ||
360 | this.close(); | ||
361 | } | ||
362 | } | ||
363 | }; | ||
364 | </script> | ||
365 | <style scoped> | ||
366 | .v-card__actions .v-btn { | ||
367 | margin: 0px; | ||
368 | min-width: 120px; | ||
369 | } | ||
370 | #td { | ||
371 | border: 1px solid #dddddd; | ||
372 | padding: 8px; | ||
373 | } | ||
374 | #flex { | ||
375 | height: 300px; | ||
376 | } | ||
377 | .v-select_selctions.v-select_slot.v-select_selection { | ||
378 | color: black !important; | ||
379 | } | ||
380 | @media screen and (max-width: 769px){ | ||
381 | .top{ | ||
382 | margin-top:30px; | ||
383 | } | ||
384 | |||
385 | } | ||
386 | @media screen and (max-width: 476px) { | ||
387 | .flex.xs4 { | ||
388 | flex-basis: 55.666667%; | ||
389 | max-width: 71.666667%; | ||
390 | } | ||
391 | } | ||
392 | @media screen and (max-width: 402px) { | ||
393 | h5 { | ||
394 | font-size: 13px; | ||
395 | } | ||
396 | /* .right{ | ||
397 | float:none !important; | ||
398 | } */ | ||
399 | .left { | ||
400 | float: none !important; | ||
401 | } | ||
402 | } | ||
403 | </style> | ||
404 | |||
405 | |||
406 | |||
407 | 1 | <template> |
src/pages/Students.vue
File was created | 1 | <template> | |
2 | <v-app id="pages-dasboard"> | ||
3 | <v-toolbar | ||
4 | color="grey" | ||
5 | fixed | ||
6 | app | ||
7 | > | ||
8 | <v-toolbar-title class="ml-0 pl-3"> | ||
9 | <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon> | ||
10 | </v-toolbar-title> | ||
11 | <!-- ****** SEARCH ALL EXISTING StudentS ****** --> | ||
12 | <v-flex xs7 sm3 class="userSearch"> | ||
13 | <v-text-field | ||
14 | flat | ||
15 | prepend-icon="search" | ||
16 | label="Find your Teachers" | ||
17 | v-model="search" | ||
18 | color="black" | ||
19 | @change="getStudentList" | ||
20 | > | ||
21 | </v-text-field> | ||
22 | </v-flex> | ||
23 | <v-spacer></v-spacer> | ||
24 | <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition"> | ||
25 | <v-btn icon large flat slot="activator"> | ||
26 | <v-avatar size="40px"> | ||
27 | <img src="/static/icon/user.png"/> | ||
28 | </v-avatar> | ||
29 | </v-btn> | ||
30 | <v-list class="pa-0"> | ||
31 | <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"> | ||
32 | <v-list-tile-action v-if="item.icon"> | ||
33 | <v-icon>{{ item.icon }}</v-icon> | ||
34 | </v-list-tile-action> | ||
35 | <v-list-tile-content> | ||
36 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | ||
37 | </v-list-tile-content> | ||
38 | </v-list-tile> | ||
39 | </v-list> | ||
40 | </v-menu> | ||
41 | </v-toolbar> | ||
42 | <v-tabs grow slider-color="black"> | ||
43 | <v-tab | ||
44 | ripple | ||
45 | @click="activeTab('existing')" | ||
46 | v-bind:class="{ active: isActive }" | ||
47 | id="tab" | ||
48 | class="subheading" | ||
49 | >Existing Students</v-tab> | ||
50 | <v-tab | ||
51 | ripple | ||
52 | @click="activeTab('new')" | ||
53 | v-bind:class="{ active: newActive }" | ||
54 | id="tab1"User | ||
55 | class="subheading" | ||
56 | >Add New Students</v-tab> | ||
57 | <!-- ****** EDITS StudentS Dtails ****** --> | ||
58 | <v-tab-item> | ||
59 | <v-snackbar | ||
60 | :timeout="timeout" | ||
61 | :top="y === 'top'" | ||
62 | :right="x === 'right'" | ||
63 | :vertical="mode === 'vertical'" | ||
64 | v-model="snackbar" | ||
65 | color="success" | ||
66 | >{{ text }}</v-snackbar> | ||
67 | <v-dialog v-model="dialog" max-width="500px"> | ||
68 | <v-toolbar color="white"> | ||
69 | <v-spacer></v-spacer> | ||
70 | <v-toolbar-title>Edit Profile</v-toolbar-title> | ||
71 | <v-spacer></v-spacer> | ||
72 | </v-toolbar> | ||
73 | <v-card> | ||
74 | <v-flex align-center justify-center layout text-xs-center> | ||
75 | <v-avatar size="50px" style="position:absolute; top:10px; "> | ||
76 | <img src="/static/icon/user.png"> | ||
77 | </v-avatar> | ||
78 | </v-flex> | ||
79 | <v-card-text> | ||
80 | <v-container> | ||
81 | <v-layout wrap justify-center> | ||
82 | <v-flex xs12 sm9> | ||
83 | <v-form ref="form" v-model="valid" lazy-validation> | ||
84 | <v-layout style="position:relative; top:15px;"> | ||
85 | <v-flex xs4 class="pt-4 subheading"> | ||
86 | <label>Full Name:</label> | ||
87 | </v-flex> | ||
88 | <v-flex xs8> | ||
89 | <v-text-field | ||
90 | v-model="editedItem.name" | ||
91 | v-validate="'required'" | ||
92 | :rules="nameRules" | ||
93 | data-vv-name="Name" | ||
94 | required | ||
95 | ></v-text-field> | ||
96 | </v-flex> | ||
97 | </v-layout> | ||
98 | <v-layout> | ||
99 | <v-flex xs4 class="pt-4 subheading"> | ||
100 | <label>Email No.:</label> | ||
101 | </v-flex> | ||
102 | <v-flex xs8> | ||
103 | <v-text-field | ||
104 | v-model="editedItem.email" | ||
105 | required | ||
106 | ></v-text-field> | ||
107 | </v-flex> | ||
108 | </v-layout> | ||
109 | <v-layout> | ||
110 | <v-flex xs4 class="pt-4 subheading"> | ||
111 | <label>Mobile No.:</label> | ||
112 | </v-flex> | ||
113 | <v-flex xs8> | ||
114 | <v-text-field | ||
115 | v-model="editedItem.mobile" | ||
116 | required | ||
117 | ></v-text-field> | ||
118 | </v-flex> | ||
119 | </v-layout> | ||
120 | <v-layout> | ||
121 | <v-flex xs4 class="pt-4 subheading"> | ||
122 | <label>Date of Birth:</label> | ||
123 | </v-flex> | ||
124 | <v-flex xs8> | ||
125 | <v-menu | ||
126 | ref="menu1" | ||
127 | :close-on-content-click="false" | ||
128 | v-model="menu1" | ||
129 | :nudge-right="40" | ||
130 | lazy | ||
131 | transition="scale-transition" | ||
132 | offset-y | ||
133 | full-width | ||
134 | min-width="290px" | ||
135 | > | ||
136 | <v-text-field | ||
137 | slot="activator" | ||
138 | v-model="editedItem.dob" | ||
139 | placeholder="Select date" | ||
140 | ></v-text-field> | ||
141 | <v-date-picker | ||
142 | ref="picker" | ||
143 | v-model="editedItem.dob" | ||
144 | :max="new Date().toISOString().substr(0, 10)" | ||
145 | min="1950-01-01" | ||
146 | @input="menu1 = false" | ||
147 | ></v-date-picker> | ||
148 | </v-menu> | ||
149 | </v-flex> | ||
150 | </v-layout> | ||
151 | <v-card-actions> | ||
152 | <v-btn round dark @click.native="close">Cancel</v-btn> | ||
153 | <v-spacer></v-spacer> | ||
154 | <v-btn round dark @click="save">Save</v-btn> | ||
155 | </v-card-actions> | ||
156 | </v-form> | ||
157 | </v-flex> | ||
158 | </v-layout> | ||
159 | </v-container> | ||
160 | </v-card-text> | ||
161 | </v-card> | ||
162 | </v-dialog> | ||
163 | <!-- ****** PROFILE VIEW StudentS Details ****** --> | ||
164 | <v-dialog v-model="dialog1" max-width="600px"> | ||
165 | <v-toolbar color="white"> | ||
166 | <v-spacer></v-spacer> | ||
167 | <v-toolbar-title>Profile</v-toolbar-title> | ||
168 | <v-spacer></v-spacer> | ||
169 | <v-icon @click="close1">close</v-icon> | ||
170 | </v-toolbar> | ||
171 | <v-card> | ||
172 | <v-flex align-center justify-center layout text-xs-center> | ||
173 | <v-avatar size="50px" style="position:absolute; top:20px;"> | ||
174 | <img src="/static/icon/user.png"> | ||
175 | </v-avatar> | ||
176 | </v-flex> | ||
177 | <v-card-text> | ||
178 | <v-container grid-list-md> | ||
179 | <v-layout wrap> | ||
180 | <v-flex><br><br> | ||
181 | <v-layout> | ||
182 | <v-flex xs5 sm6> | ||
183 | <h5 class="right my-1">Full Name:</h5> | ||
184 | </v-flex> | ||
185 | <v-flex sm6 xs8> | ||
186 | <h5 class="my-1">{{ editedItem.name }}</h5> | ||
187 | </v-flex> | ||
188 | </v-layout> | ||
189 | <v-layout> | ||
190 | <v-flex xs5 sm6> | ||
191 | <h5 class="right my-1">Email:</h5> | ||
192 | </v-flex> | ||
193 | <v-flex sm6 xs8> | ||
194 | <h5 class="my-1">{{ editedItem.email }}</h5> | ||
195 | </v-flex> | ||
196 | </v-layout> | ||
197 | <v-layout> | ||
198 | <v-flex xs6 sm6 > | ||
199 | <h5 class="right my-1">Mobile No. :</h5> | ||
200 | </v-flex> | ||
201 | <v-flex sm6 xs8> | ||
202 | <h5 class="my-1">{{ editedItem.mobile }}</h5> | ||
203 | </v-flex> | ||
204 | </v-layout> | ||
205 | <v-layout> | ||
206 | <v-flex xs6 sm6 > | ||
207 | <h5 class="right my-1">Date Of Birth:</h5> | ||
208 | </v-flex> | ||
209 | <v-flex sm6 xs8> | ||
210 | <h5 class="my-1">{{ editedItem.dob }}</h5> | ||
211 | </v-flex> | ||
212 | </v-layout> | ||
213 | </v-flex> | ||
214 | </v-layout> | ||
215 | </v-container> | ||
216 | </v-card-text> | ||
217 | </v-card> | ||
218 | </v-dialog> | ||
219 | |||
220 | <!-- <v-dialog v-model="dialog2" width="700px"> | ||
221 | <v-card> | ||
222 | <div id="dialog"> | ||
223 | <h4> | ||
224 | <b>Report</b> | ||
225 | </h4> | ||
226 | <h5 id="name"> | ||
227 | <b>Patient Name:</b> | ||
228 | {{ editedItem.name }} | ||
229 | </h5> | ||
230 | <h5 id="m">Select Month:</h5> | ||
231 | <v-btn color="grey darken-3" id="G" v-on:click="component='report-generate'">Generate</v-btn> | ||
232 | <v-spacer></v-spacer> | ||
233 | <v-icon id="icon" @click="close2">close</v-icon> | ||
234 | |||
235 | <span id="bt"> | ||
236 | <v-btn | ||
237 | color="grey darken-2" | ||
238 | v-on:click="component='one-month' , activebtn('existing')" | ||
239 | v-bind:class="{ activebtn: isActivebtn }" | ||
240 | flat | ||
241 | >1 month</v-btn> | ||
242 | <v-btn | ||
243 | color="grey darken-2" | ||
244 | v-on:click="component='three-month' , activebtn('new')" | ||
245 | v-bind:class="{ activebtn: Activebtn1 }" | ||
246 | flat | ||
247 | >3 Month</v-btn> | ||
248 | <v-btn | ||
249 | color="grey darken-2" | ||
250 | v-on:click="component='six-month' , activebtn('new1')" | ||
251 | v-bind:class="{ activebtn: Activebtn2 }" | ||
252 | flat | ||
253 | >6 Month</v-btn> | ||
254 | <v-btn | ||
255 | color="grey darken-2" | ||
256 | v-on:click="component='nine-month' , activebtn('new2')" | ||
257 | v-bind:class="{ activebtn: Activebtn3 }" | ||
258 | flat | ||
259 | >9 Month</v-btn> | ||
260 | <img id="e" @click="mail" src="/static/icon/email1.png"> | ||
261 | <img id="d" @click="download" src="/static/icon/download1.png"> | ||
262 | </span> | ||
263 | <component v-bind:is="component"></component> | ||
264 | </div> | ||
265 | </v-card> | ||
266 | </v-dialog> --> | ||
267 | <v-snackbar | ||
268 | :timeout="timeout" | ||
269 | :top="y === 'top'" | ||
270 | :right="x === 'right'" | ||
271 | :vertical="mode === 'vertical'" | ||
272 | v-model="snackbar" | ||
273 | color="success" | ||
274 | >{{ text }}</v-snackbar> | ||
275 | <!-- ****** EXISTING-USERS StudentS Table ****** --> | ||
276 | <v-data-table | ||
277 | :headers="headers" | ||
278 | :items="desserts" | ||
279 | :pagination.sync="pagination" | ||
280 | :search="search" | ||
281 | > <!-- </v-content> | ||
282 | <v-footer class="pa-4" color="grey darken-2"> | ||
283 | |||
284 | </v-footer> --> | ||
285 | <template slot="items" slot-scope="props"> | ||
286 | <td id="td" class="text-xs-center">{{ props.index}}</td> | ||
287 | <td id="td" class="text-xs-center">{{ props.item.name}}</td> | ||
288 | <!-- <td id="td" class="text-xs-center">{{ props.item.dob }}</td> --> | ||
289 | <td id="td" class="text-xs-center">{{ props.item.mobile}}</td> | ||
290 | |||
291 | <td class="text-xs-center"> | ||
292 | <span> | ||
293 | <!-- <img | ||
294 | style="cursor:pointer; height:20px; " | ||
295 | class="mr-5" | ||
296 | @click="report(props.item)" | ||
297 | src="/static/icon/List1.png" | ||
298 | > --> | ||
299 | <img | ||
300 | style="cursor:pointer; width:25px; height:18px; " | ||
301 | class="mr-5" | ||
302 | @click="profile(props.item)" | ||
303 | src="/static/icon/eye1.png" | ||
304 | > | ||
305 | <img | ||
306 | style="cursor:pointer; width:20px; height:18px; " | ||
307 | class="mr-5" | ||
308 | @click="editItem(props.item)" | ||
309 | src="/static/icon/edit1.png" | ||
310 | > | ||
311 | <img | ||
312 | style="cursor:pointer; height:20px; " | ||
313 | class="mr-5" | ||
314 | @click="deleteItem(props.item)" | ||
315 | src="/static/icon/delete1.png" | ||
316 | > | ||
317 | </span> | ||
318 | </td> | ||
319 | </template> | ||
320 | <v-alert | ||
321 | slot="no-results" | ||
322 | :value="true" | ||
323 | color="error" | ||
324 | icon="warning" | ||
325 | >Your search for "{{ search }}" found no results.</v-alert> | ||
326 | </v-data-table> | ||
327 | </v-tab-item> | ||
328 | <!-- ****** ADD multiple Students ****** --> | ||
329 | <v-tab-item> | ||
330 | <v-container> | ||
331 | <v-snackbar | ||
332 | :timeout="timeout" | ||
333 | :top="y === 'top'" | ||
334 | :right="x === 'right'" | ||
335 | :vertical="mode === 'vertical'" | ||
336 | v-model="snackbar" | ||
337 | color="success" | ||
338 | >{{ text }}</v-snackbar> | ||
339 | <v-flex xs12 sm8 offset-sm2 class="top"> | ||
340 | <v-card flat> | ||
341 | <v-container fluid fill-height> | ||
342 | <v-layout align-center> | ||
343 | <v-flex xs12> | ||
344 | <v-flex offset-xs5> | ||
345 | <v-avatar size="55px"> | ||
346 | <img src="/static/icon/user.png"> | ||
347 | </v-avatar> | ||
348 | </v-flex> | ||
349 | <v-form ref="form" v-model="valid" lazy-validation> | ||
350 | <v-layout> | ||
351 | <v-flex xs4 class="pt-4 subheading"> | ||
352 | <label class="right">Full Name:</label> | ||
353 | </v-flex> | ||
354 | <v-flex xs6 class="ml-3"> | ||
355 | <v-text-field | ||
356 | v-model="editedItem.name" | ||
357 | placeholder="fill your full Name" | ||
358 | name="name" | ||
359 | type="text" | ||
360 | :rules="nameRules" | ||
361 | required | ||
362 | ></v-text-field> | ||
363 | </v-flex> | ||
364 | </v-layout> | ||
365 | <!-- <v-layout> | ||
366 | <v-flex xs4 class="pt-4 subheading"> | ||
367 | <label class="right">Country:</label> | ||
368 | </v-flex> | ||
369 | <v-flex xs6 class="ml-3"> | ||
370 | <v-select | ||
371 | v-model="editedItem.country" | ||
372 | :items="countries" | ||
373 | label="Select Country" | ||
374 | single-line | ||
375 | ></v-select> | ||
376 | </v-flex> | ||
377 | </v-layout> --> | ||
378 | <v-layout> | ||
379 | <v-flex xs4 class="pt-4 subheading"> | ||
380 | <label class="right">Email ID:</label> | ||
381 | </v-flex> | ||
382 | <v-flex xs6 class="ml-3"> | ||
383 | <v-text-field | ||
384 | placeholder="fill your email" | ||
385 | :rules="emailRules" | ||
386 | v-model="editedItem.email" | ||
387 | type="text" | ||
388 | name="email" | ||
389 | required | ||
390 | ></v-text-field> | ||
391 | </v-flex> | ||
392 | </v-layout> | ||
393 | <!-- <v-layout> | ||
394 | <v-flex xs4 class="pt-4 subheading"> | ||
395 | <label class="right">Date of Birth:</label> | ||
396 | </v-flex> | ||
397 | <v-flex xs6 class="ml-3"> | ||
398 | <v-menu | ||
399 | ref="menu" | ||
400 | :close-on-content-click="false" | ||
401 | v-model="menu" | ||
402 | :nudge-right="40" | ||
403 | lazy | ||
404 | transition="scale-transition" | ||
405 | offset-y | ||
406 | full-width | ||
407 | min-width="290px" | ||
408 | > | ||
409 | <v-text-field | ||
410 | slot="activator" | ||
411 | v-model="editedItem.date" | ||
412 | placeholder="Select date" | ||
413 | ></v-text-field> | ||
414 | <v-date-picker | ||
415 | ref="picker" | ||
416 | v-model="editedItem.date" | ||
417 | :max="new Date().toISOString().substr(0, 10)" | ||
418 | min="1950-01-01" | ||
419 | @input="menu = false" | ||
420 | ></v-date-picker> | ||
421 | </v-menu> | ||
422 | </v-flex> | ||
423 | </v-layout> --> | ||
424 | <v-layout> | ||
425 | <v-flex xs12 sm9 offset-sm2> | ||
426 | <v-card-actions> | ||
427 | <v-btn @click="clear" round dark>clear</v-btn> | ||
428 | <v-spacer></v-spacer> | ||
429 | <v-btn @click="submit" round dark :loading="loading">Add</v-btn> | ||
430 | </v-card-actions> | ||
431 | </v-flex> | ||
432 | </v-layout> | ||
433 | </v-form> | ||
434 | </v-flex> | ||
435 | </v-layout> | ||
436 | </v-container> | ||
437 | </v-card> | ||
438 | </v-flex> | ||
439 | </v-container> | ||
440 | </v-tab-item> | ||
441 | </v-tabs> | ||
442 | </v-app> | ||
443 | </template> | ||
444 | |||
445 | <script> | ||
446 | // import AppToolbar from '@/components/AppToolbar'; | ||
447 | // import onemonth from "@/components/report/onemonth.vue"; | ||
448 | // import threemonth from "@/components/report/threemonth.vue"; | ||
449 | // import sixmonth from "@/components/report/sixmonth.vue"; | ||
450 | // import ninemonth from "@/components/report/ninemonth.vue"; | ||
451 | // import generatereport from "@/components/report/generatereport.vue"; | ||
452 | import http from "@/Services/http.js"; | ||
453 | import NotificationList from "@/components/widgets/list/NotificationList"; | ||
454 | import Util from "@/util"; | ||
455 | |||
456 | export default { | ||
457 | components: { | ||
458 | // "one-month": onemonth, | ||
459 | // "three-month": threemonth, | ||
460 | // "six-month": sixmonth, | ||
461 | // "nine-month": ninemonth, | ||
462 | // "report-generate": generatereport, | ||
463 | }, | ||
464 | data: () => ({ | ||
465 | component: "report-generate", | ||
466 | snackbar: false, | ||
467 | y: "top", | ||
468 | x: "right", | ||
469 | mode: "", | ||
470 | timeout: 3000, | ||
471 | text: "", | ||
472 | loading: false, | ||
473 | date:null, | ||
474 | search: '', | ||
475 | modal: false, | ||
476 | modaledit:false, | ||
477 | menu: false, | ||
478 | menu1:false, | ||
479 | dialog: false, | ||
480 | dialog1: false, | ||
481 | dialog2: false, | ||
482 | valid: true, | ||
483 | isActive: true, | ||
484 | newActive: false, | ||
485 | isActivebtn: false, | ||
486 | Activebtn1: false, | ||
487 | Activebtn2: false, | ||
488 | Activebtn3: false, | ||
489 | loader: null, | ||
490 | loading: false, | ||
491 | loading2: false, | ||
492 | loading3: false, | ||
493 | loading4: false, | ||
494 | details: [], | ||
495 | countries:['US','Canada'], | ||
496 | AddUsercredentials: {}, | ||
497 | pagination: { | ||
498 | rowsPerPage: 15 | ||
499 | }, | ||
500 | // rules: { | ||
501 | // required: value => !!value || "Date of Birth is Required.", | ||
502 | // min: v => | ||
503 | // (/^(0?[1-9]|[12][0-9]|3[01])[\/\-](0?[1-9]|1[012])[\/\-]\d{4}$/.test( | ||
504 | // v | ||
505 | // ) && | ||
506 | // v.length > 0) || | ||
507 | // "Please enter a date in the format dd/mm/yyyy" | ||
508 | // }, | ||
509 | nameRules: [v => !!v || " Full Name is required"], | ||
510 | emailRules: [ | ||
511 | v => !!v || "E-mail is required", | ||
512 | v => /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 'E-mail must be valid' | ||
513 | ], | ||
514 | headers: [ | ||
515 | { | ||
516 | text: "No", | ||
517 | align: "center", | ||
518 | sortable: false, | ||
519 | value: "No" | ||
520 | }, | ||
521 | { text: "Name", value: "name", sortable: false, align: "center" }, | ||
522 | // { text: "Email", value: "email", sortable: false, align: "center" }, | ||
523 | { text: "Mobile", value: "mobile", sortable: false, align: "center" }, | ||
524 | { text: "", value: "", sortable: false, align: "center" } | ||
525 | ], | ||
526 | desserts: [], | ||
527 | editedIndex: -1, | ||
528 | editedItem: { | ||
529 | role: "STUDENT", | ||
530 | name: "", | ||
531 | email: "", | ||
532 | }, | ||
533 | defaultItem: { | ||
534 | role: "STUDENT", | ||
535 | name: "", | ||
536 | email: "", | ||
537 | }, | ||
538 | userName:'', | ||
539 | items: [ | ||
540 | { | ||
541 | href: "/changepassword", | ||
542 | title: "Change Password", | ||
543 | click: e => { | ||
544 | console.log(e); | ||
545 | } | ||
546 | }, | ||
547 | { | ||
548 | href: "#", | ||
549 | title: "Logout", | ||
550 | click: e => { | ||
551 | window.getApp.$emit("APP_LOGOUT"); | ||
552 | } | ||
553 | } | ||
554 | ] | ||
555 | }), | ||
556 | watch: { | ||
557 | menu (val) { | ||
558 | val && this.$nextTick(() => (this.$refs.picker.activePicker = 'YEAR')) | ||
559 | }, | ||
560 | menu1 (val) { | ||
561 | val && this.$nextTick(() => (this.$refs.picker.activePicker = 'YEAR')) | ||
562 | } | ||
563 | }, | ||
564 | methods: { | ||
565 | getStudentList() { | ||
566 | var token = this.$store.state.token; | ||
567 | http() | ||
568 | .get("/getStudentsList", { | ||
569 | headers: { Authorization: "Bearer " + token } | ||
570 | }) | ||
571 | .then(response => { | ||
572 | this.desserts = response.data.data; | ||
573 | console.log("getStudentList=====>",this.desserts) | ||
574 | |||
575 | }) | ||
576 | .catch(err => { | ||
577 | // console.log("err====>", err); | ||
578 | this.$router.replace({ path: '/' }); | ||
579 | }); | ||
580 | }, | ||
581 | editItem(item) { | ||
582 | this.editedIndex = this.desserts.indexOf(item); | ||
583 | this.editedItem = Object.assign({}, item); | ||
584 | this.dialog = true; | ||
585 | }, | ||
586 | profile(item) { | ||
587 | this.editedIndex = this.desserts.indexOf(item); | ||
588 | this.editedItem = Object.assign({}, item); | ||
589 | this.dialog1 = true; | ||
590 | }, | ||
591 | // report(item) { | ||
592 | // this.editedIndex = this.desserts.indexOf(item); | ||
593 | // this.editedItem = Object.assign({}, item); | ||
594 | // this.dialog2 = true; | ||
595 | // }, | ||
596 | |||
597 | deleteItem(item) { | ||
598 | let deleteStudent = { | ||
599 | studentId: item._id | ||
600 | }; | ||
601 | http() | ||
602 | .delete("/deleteStudent", confirm('Are you sure you want to delete this?') && { params: deleteStudent }) | ||
603 | .then(response => { | ||
604 | // console.log("deleteUers",deleteStudent) | ||
605 | if ((this.snackbar = true)) { | ||
606 | this.text = "Successfully delete Existing User"; | ||
607 | } | ||
608 | this.getStudentList(); | ||
609 | }) | ||
610 | .catch(error => { | ||
611 | console.log(error); | ||
612 | }); | ||
613 | }, | ||
614 | activeTab(type) { | ||
615 | switch (type) { | ||
616 | case "existing": | ||
617 | this.newActive = false; | ||
618 | this.isActive = true; | ||
619 | break; | ||
620 | |||
621 | default: | ||
622 | this.newActive = true; | ||
623 | this.isActive = false; | ||
624 | break; | ||
625 | } | ||
626 | }, | ||
627 | activebtn(type) { | ||
628 | switch (type) { | ||
629 | case "existing": | ||
630 | this.Activebtn3 = false; | ||
631 | this.Activebtn2 = false; | ||
632 | this.Activebtn1 = false; | ||
633 | this.isActivebtn = true; | ||
634 | break; | ||
635 | case "new": | ||
636 | this.Activebtn3 = false; | ||
637 | this.Activebtn2 = false; | ||
638 | this.Activebtn1 = true; | ||
639 | this.isActivebtn = false; | ||
640 | break; | ||
641 | case "new1": | ||
642 | this.Activebtn3 = false; | ||
643 | this.Activebtn2 = true; | ||
644 | this.Activebtn1 = false; | ||
645 | this.isActivebtn = false; | ||
646 | break; | ||
647 | default: | ||
648 | this.Activebtn3 = true; | ||
649 | this.Activebtn2 = false; | ||
650 | this.Activebtn1 = false; | ||
651 | this.isActivebtn = false; | ||
652 | break; | ||
653 | } | ||
654 | }, | ||
655 | close() { | ||
656 | this.dialog = false; | ||
657 | setTimeout(() => { | ||
658 | this.editedItem = Object.assign({}, this.defaultItem); | ||
659 | this.editedIndex = -1; | ||
660 | }, 300); | ||
661 | }, | ||
662 | close1() { | ||
663 | this.dialog1 = false; | ||
664 | }, | ||
665 | close2() { | ||
666 | this.dialog2 = false; | ||
667 | }, | ||
668 | submit() { | ||
669 | if (this.$refs.form.validate()) { | ||
670 | let addUsers = { | ||
671 | name: this.editedItem.name, | ||
672 | email: this.editedItem.email, | ||
673 | role: this.editedItem.role | ||
674 | }; | ||
675 | // console.log(addUsers) | ||
676 | http() | ||
677 | .post("/createStudent", addUsers) | ||
678 | .then(response => { | ||
679 | this.getStudentList(); | ||
680 | if (this.snackbar = true) { | ||
681 | this.text = "New user added successfully"; | ||
682 | } | ||
683 | |||
684 | this.clear(); | ||
685 | }) | ||
686 | .catch(error => { | ||
687 | // console.log(error); | ||
688 | if (this.snackbar = true) { | ||
689 | this.text = error.response.data.message; | ||
690 | } | ||
691 | }); | ||
692 | } | ||
693 | }, | ||
694 | mail() { | ||
695 | }, | ||
696 | download() { | ||
697 | }, | ||
698 | clear() { | ||
699 | this.$refs.form.reset(); | ||
700 | }, | ||
701 | save() { | ||
702 | let editUsers = { | ||
703 | name: this.editedItem.name, | ||
704 | email: this.editedItem.email, | ||
705 | mobile: this.editedItem.mobile, | ||
706 | dob: this.editedItem.mobile, | ||
707 | studentId: this.editedItem._id | ||
708 | }; | ||
709 | http() | ||
710 | .put("/updateStudent", editUsers) | ||
711 | .then(response => { | ||
712 | console.log("editUsers",editUsers); | ||
713 | if ((this.snackbar = true)) { | ||
714 | this.text = "Successfully Edit Existing User"; | ||
715 | } | ||
716 | this.getStudentList(); | ||
717 | }) | ||
718 | .catch(error => { | ||
719 | // console.log(error); | ||
720 | }); | ||
721 | this.close(); | ||
722 | }, | ||
723 | handleDrawerToggle() { | ||
724 | window.getApp.$emit("APP_DRAWER_TOGGLED"); | ||
725 | }, | ||
726 | handleFullScreen() { | ||
727 | Util.toggleFullScreen(); | ||
728 | } | ||
729 | }, | ||
730 | mounted() { | ||
731 | this.getStudentList(); | ||
732 | // console.log("Id",this.$store.state.id) | ||
733 | // console.log("token",this.$store.state.token) | ||
734 | }, | ||
735 | computed:{ | ||
736 | toolbarColor() { | ||
737 | return this.$vuetify.options.extra.mainNav; | ||
738 | } | ||
739 | } | ||
740 | }; | ||
741 | </script> | ||
742 | <style scoped> | ||
743 | .v-tabs__div { | ||
744 | text-transform: none; | ||
745 | } | ||
746 | .v-input__prepend-outer { | ||
747 | margin-right: 0px !important; | ||
748 | } | ||
749 | .v-card__actions .v-btn { | ||
750 | margin: 0 15px; | ||
751 | min-width: 120px; | ||
752 | } | ||
753 | .primary { | ||
754 | background-color: #aaa !important; | ||
755 | border-color: #aaa !important; | ||
756 | } | ||
757 | h4 { | ||
758 | background-repeat: no-repeat; | ||
759 | padding: 8px; | ||
760 | margin: auto; | ||
761 | font-size: 25px; | ||
762 | } | ||
763 | #name { | ||
764 | position: absolute; | ||
765 | left: 100px; | ||
766 | top: 17px; | ||
767 | } | ||
768 | #icon { | ||
769 | position: absolute; | ||
770 | right: 8px; | ||
771 | top: 8px; | ||
772 | } | ||
773 | #m { | ||
774 | position: relative; | ||
775 | left: 135px; | ||
776 | top: -15px; | ||
777 | } | ||
778 | #G { | ||
779 | position: absolute; | ||
780 | top: 38px; | ||
781 | color: white; | ||
782 | } | ||
783 | #bt { | ||
784 | position: relative; | ||
785 | top: -20px; | ||
786 | left: 115px; | ||
787 | } | ||
788 | #e { | ||
789 | position: relative; | ||
790 | top: 5px; | ||
791 | right: -30px; | ||
792 | height: 17px; | ||
793 | cursor: pointer; | ||
794 | } | ||
795 | #d { | ||
796 | position: relative; | ||
797 | top: 5px; | ||
798 | right: -70px; | ||
799 | height: 17px; | ||
800 | cursor: pointer; | ||
801 | } | ||
802 | #td { | ||
803 | border: 1px solid #dddddd; | ||
804 | text-align: left; | ||
805 | padding: 8px; | ||
806 | } | ||
807 | #dialog { | ||
808 | height: 550px; | ||
809 | } | ||
810 | .active { | ||
811 | background-color: black; | ||
812 | color: white !important; | ||
813 | } | ||
814 | .activebtn { | ||
815 | color: black !important; | ||
816 | } | ||
817 | #flex { | ||
818 | height: 300px; | ||
819 | } | ||
820 | .top{ | ||
821 | margin-top:100px; | ||
822 | } | ||
823 | .v-tabs__item a{ | ||
824 | font-size:16px !important; | ||
825 | } | ||
826 | @media screen and (max-width: 769px){ | ||
827 | .top{ | ||
828 | margin-top:0 !important; | ||
829 | } | ||
830 | .userSearch .v-icon { | ||
831 | font-size: 20px !important; | ||
832 | margin-left: 20px ; | ||
833 | } | ||
834 | } | ||
835 | @media screen and (max-width: 380px) { | ||
836 | .right { | ||
837 | float: none !important; | ||
838 | } | ||
839 | .subheading { | ||
840 | font-size: 14px !important; | ||
841 | } | ||
842 | .v-card__actions .v-btn{ | ||
843 | margin: 0 0px; | ||
844 | min-width: 100px; | ||
845 | } | ||
846 | /* .searchIcon .v-icon { | ||
847 | font-size: 20px; | ||
848 | margin-left: 20px; | ||
849 | } */ | ||
850 | .subheading { | ||
851 | font-size: 12px !important; | ||
852 | } | ||
853 | h5 { | ||
854 | font-size: 13px; | ||
855 | } | ||
856 | } | ||
857 | .v-icon{ | ||
858 | font-size:30px; | ||
859 | } | ||
860 | @media screen and (min-width: 1270px){ | ||
861 | .hide{ | ||
862 | display: none; | ||
863 | } | ||
864 | /* } | ||
865 | @media screen and (max-width: 962px) { | ||
866 | .imglogo{ | ||
867 | position: absolute; | ||
868 | top: 13px; | ||
869 | left: 13px !important; | ||
870 | width: 70px; | ||
871 | height: 24px; | ||
872 | } */ | ||
873 | } | ||
874 | @media screen and (max-width: 420px){ | ||
875 | .userSearch .v-text-field .v-label{ | ||
876 | line-height: 24px !important; | ||
877 | } | ||
878 | .userSearch .v-label{ | ||
879 | font-size: 13px !important; | ||
880 | } | ||
881 | .v-list__tile { | ||
882 | font-size:14px; | ||
883 | padding: 0 10px; | ||
884 | } | ||
885 | .name{ | ||
886 | font-size:15px; | ||
887 | } | ||
888 | } | ||
889 | </style> |
src/pages/changepassword.vue
1 | <template> | 1 | <template> |
2 | <v-app id="login"> | 2 | <v-app id="login"> |
3 | <!-- <v-toolbar color="grey lighten"> | 3 | <!-- <v-toolbar color="grey lighten"> |
4 | <v-toolbar-items> | 4 | <v-toolbar-items> |
5 | <img src="/static/ana@2x.png" height="36" alt="ana"> | 5 | <img src="/static/ana@2x.png" height="36" alt="ana"> |
6 | </v-toolbar-items> | 6 | </v-toolbar-items> |
7 | </v-toolbar> --> | 7 | </v-toolbar> --> |
8 | <!-- <v-content> --> | 8 | <!-- <v-content> --> |
9 | <app-toolbar class="app--toolbar"></app-toolbar> | 9 | <app-toolbar class="app--toolbar"></app-toolbar> |
10 | <v-container fluid fill-height> | 10 | <v-container fluid fill-height> |
11 | <v-layout> | 11 | <v-layout> |
12 | <v-flex xs12 sm8 md8 lg5 offset-sm2 offset-lg3> | 12 | <v-flex xs12 sm8 md8 lg5 offset-sm2 offset-lg3> |
13 | <v-toolbar color="black" dark> | 13 | <v-toolbar color="black" dark> |
14 | <v-spacer></v-spacer> | 14 | <v-spacer></v-spacer> |
15 | <v-toolbar-title>Change Password</v-toolbar-title> | 15 | <v-toolbar-title>Change Password</v-toolbar-title> |
16 | <v-spacer></v-spacer> | 16 | <v-spacer></v-spacer> |
17 | 17 | ||
18 | </v-toolbar> | 18 | </v-toolbar> |
19 | <v-card class="elevation-1 pa-3" id="form"> | 19 | <v-card class="elevation-1 pa-3" id="form"> |
20 | <v-card-text> | 20 | <v-card-text> |
21 | <v-flex xs12 sm8 md8 lg8 offset-sm2> | 21 | <v-flex xs12 sm8 md8 lg8 offset-sm2> |
22 | <v-form class="mt-3" > | 22 | <v-form class="mt-3" > |
23 | <v-text-field | 23 | <v-text-field |
24 | :rules="[rules.required, rules.min]" | 24 | :rules="[rules.required]" |
25 | 25 | ||
26 | v-model="adminChangePasswordcredentials.currentPassword" | 26 | v-model="adminChangePasswordcredentials.oldPassword" |
27 | label="Current Password"> | 27 | label="Old Password"> |
28 | </v-text-field> | 28 | </v-text-field> |
29 | <v-text-field | 29 | <v-text-field |
30 | v-model="adminChangePasswordcredentials.newPassword" | 30 | v-model="adminChangePasswordcredentials.newPassword" |
31 | :rules="[rules.required, rules.min]" | 31 | :rules="[rules.required]" |
32 | 32 | ||
33 | label="New Password" | 33 | label="New Password" |
34 | ></v-text-field> | 34 | ></v-text-field> |
35 | <v-text-field | ||
36 | v-model="adminChangePasswordcredentials.confirmPassword" | ||
37 | :rules="[rules.required, rules.min]" | ||
38 | label="Confirm Password" | ||
39 | ></v-text-field> | ||
40 | </v-form></v-flex> | 35 | </v-form></v-flex> |
41 | </v-card-text> | 36 | </v-card-text> |
42 | <v-card-actions> | 37 | <v-card-actions> |
43 | 38 | ||
44 | <v-flex text-xs-center> | 39 | <v-flex text-xs-center> |
45 | <v-btn class="mt-3" | 40 | <v-btn class="mt-3" |
46 | round | 41 | round |
47 | color="black" | 42 | color="black" |
48 | dark large | 43 | dark large |
49 | :loading="loading" | 44 | :loading="loading" |
50 | @click="reset">Reset Password</v-btn></v-flex> | 45 | @click="reset">Reset Password</v-btn></v-flex> |
51 | </v-card-actions> | 46 | </v-card-actions> |
52 | <v-snackbar | 47 | <v-snackbar |
53 | :timeout="timeout" | 48 | :timeout="timeout" |
54 | :top="y === 'top'" | 49 | :top="y === 'top'" |
55 | :right="x === 'right'" | 50 | :right="x === 'right'" |
56 | :vertical="mode === 'vertical'" | 51 | :vertical="mode === 'vertical'" |
57 | v-model="snackbar" | 52 | v-model="snackbar" |
58 | :color= color | 53 | :color= color |
59 | > | 54 | > |
60 | {{ text }} | 55 | {{ text }} |
61 | </v-snackbar> | 56 | </v-snackbar> |
62 | </v-card> | 57 | </v-card> |
63 | </v-flex> | 58 | </v-flex> |
64 | </v-layout> | 59 | </v-layout> |
65 | </v-container> | 60 | </v-container> |
66 | </v-app> | 61 | </v-app> |
67 | </template> | 62 | </template> |
68 | <script> | 63 | <script> |
69 | import http from '@/Services/http.js'; | 64 | import http from '@/Services/http.js'; |
70 | import AppToolbar from '@/components/AppToolbar'; | 65 | import AppToolbar from '@/components/AppToolbar'; |
71 | 66 | ||
72 | export default { | 67 | export default { |
73 | components: { | 68 | components: { |
74 | AppToolbar, | 69 | AppToolbar, |
75 | }, | 70 | }, |
76 | data () { | 71 | data () { |
77 | return { | 72 | return { |
78 | snackbar: false, | 73 | snackbar: false, |
79 | y: 'top', | 74 | y: 'top', |
80 | x: 'right', | 75 | x: 'right', |
81 | mode: '', | 76 | mode: '', |
82 | timeout: 4000, | 77 | timeout: 4000, |
83 | text: '', | 78 | text: '', |
84 | adminChangePasswordcredentials: {}, | 79 | adminChangePasswordcredentials: {}, |
85 | e1: true, | 80 | e1: true, |
86 | e2: true, | 81 | e2: true, |
87 | e3: true, | 82 | e3: true, |
88 | loading: false, | 83 | loading: false, |
89 | valid: false, | 84 | valid: false, |
90 | text: 'Password Changed', | 85 | text: 'Password Changed', |
91 | currentPassword: '', | 86 | currentPassword: '', |
92 | newPassword: '', | 87 | newPassword: '', |
93 | confirmPassword: '', | 88 | confirmPassword: '', |
94 | rules: { | 89 | rules: { |
95 | required: value => !!value || 'This password field is Required.', | 90 | required: value => !!value || 'This password field is Required.', |
96 | min: v => (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/).test(v) && v.length >= 8 || 'Min 8 characters upper case lower case symbol required' | 91 | // min: v => (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/).test(v) && v.length >= 8 || 'Min 8 characters upper case lower case symbol required' |
97 | }, | 92 | }, |
98 | }; | 93 | }; |
99 | }, | 94 | }, |
100 | methods: { | 95 | methods: { |
101 | reset () { | 96 | reset () { |
102 | var token = this.$store.state.token; | 97 | var token = this.$store.state.token; |
103 | var userdata = { | 98 | var userdata = { |
104 | "currentPassword":this.adminChangePasswordcredentials.currentPassword, | 99 | "oldPassword":this.adminChangePasswordcredentials.oldPassword, |
105 | "newPassword":this.adminChangePasswordcredentials.newPassword, | 100 | "newPassword":this.adminChangePasswordcredentials.newPassword, |
106 | "confirmPassword":this.adminChangePasswordcredentials.confirmPassword | ||
107 | } | 101 | } |
108 | http().post('/adminChangePassword',userdata,{headers: {Authorization: 'Bearer '+token}}) | 102 | http().put('/schoolChangePassword',userdata,{headers: { Authorization: 'Bearer '+ token }}) |
109 | .then(response => { | 103 | .then(response => { |
110 | this.loading = true; | 104 | this.loading = true; |
111 | if(this.snackbar=true){ | 105 | if(this.snackbar=true){ |
112 | this.text= "Successfully changed password !!" | 106 | this.text= "Successfully changed password !!" |
113 | console.log("snackbar",response.data.message) | 107 | console.log("snackbar",response.data.message) |
114 | } | 108 | } |
115 | setTimeout(() => { | 109 | setTimeout(() => { |
116 | this.$router.push('/dashboard'); | 110 | this.$router.push('/dashboard'); |
117 | }, 2000); | 111 | }, 2000); |
118 | }).catch(err => { | 112 | }).catch(err => { |
119 | // console.log("err====>",err); | 113 | // console.log("err====>",err); |
120 | this.text="User Not Found or Incorrect currentPassword" | 114 | this.text="User Not Found or Incorrect currentPassword" |
121 | this.snackbar= true; | 115 | this.snackbar= true; |
122 | this.loading = false; | 116 | this.loading = false; |
123 | }) | 117 | }) |
124 | } | 118 | } |
125 | }, | 119 | }, |
126 | computed:{ | 120 | computed:{ |
127 | color(){ | 121 | color(){ |
128 | return this.loading ? 'success' : 'error' | 122 | return this.loading ? 'success' : 'error' |
129 | } | 123 | } |
130 | } | 124 | } |
131 | }; | 125 | }; |
132 | </script> | 126 | </script> |
133 | <style scoped> | 127 | <style scoped> |
134 | img{ | 128 | img{ |
135 | position:absolute; | 129 | position:absolute; |
136 | top:13px; | 130 | top:13px; |
137 | left:50px; | 131 | left:50px; |
138 | } | 132 | } |
139 | .v-btn--large { | 133 | .v-btn--large { |
140 | padding: 0px 74px; | 134 | padding: 0px 74px; |
141 | } | 135 | } |
142 | @media screen and (max-width: 769px){ | 136 | @media screen and (max-width: 769px){ |
143 | .v-btn--large { | 137 | .v-btn--large { |
144 | font-size: 14px; | 138 | font-size: 14px; |
145 | height: 44px; | 139 | height: 44px; |
146 | padding: 0 32px; | 140 | padding: 0 32px; |
147 | 141 | ||
148 | } | 142 | } |
149 | } | 143 | } |
150 | </style> | 144 | </style> |
151 | 145 |
src/pages/forgetpassword.vue
1 | <template> | 1 | <template> |
2 | <v-app id="login"> | 2 | <v-app id="login"> |
3 | <v-toolbar color="grey lighten"> | 3 | <v-toolbar color="grey lighten"> |
4 | <v-toolbar-items> | 4 | <v-toolbar-items> |
5 | <img src="/static/ana@2x.png" height="36" alt="ana" /> | 5 | <!-- <img src="/static/ana@2x.png" height="36" alt="ana" /> --> |
6 | <h3 class="white--text my-3 ml-4">School-Management</h3> | ||
6 | </v-toolbar-items> | 7 | </v-toolbar-items> |
7 | </v-toolbar> | 8 | </v-toolbar> |
8 | <v-content> | 9 | <v-content> |
9 | <v-container fluid fill-height> | 10 | <v-container fluid fill-height> |
10 | <v-layout align-center justify-center> | 11 | <v-layout align-center justify-center> |
11 | <v-flex xs12 sm8 md7 lg5> | 12 | <v-flex xs12 sm8 md7 lg5> |
12 | <v-toolbar color="black" dark> | 13 | <v-toolbar color="black" dark> |
13 | <v-spacer></v-spacer> | 14 | <v-spacer></v-spacer> |
14 | <v-toolbar-title>Forget Password</v-toolbar-title> | 15 | <v-toolbar-title>Forget Password</v-toolbar-title> |
15 | <v-spacer></v-spacer> | 16 | <v-spacer></v-spacer> |
16 | </v-toolbar> | 17 | </v-toolbar> |
17 | <v-card class="elevation-1 pa-1"> | 18 | <v-card class="elevation-1 pa-1"> |
18 | <v-card-text> | 19 | <v-card-text> |
19 | <h5 class="text-xs-center"> Not to Worry! Enter to your registered Email ID. </h5> | 20 | <h5 class="text-xs-center"> Not to Worry! Enter to your registered Email ID. </h5> |
20 | <h5 class="text-xs-center"> We'll send you a reset.</h5> | 21 | <h5 class="text-xs-center"> We'll send you a reset.</h5> |
21 | <v-flex lg4 sm6 xs10 offset-sm3 offset-xs1 offset-lg4> | 22 | <v-flex lg4 sm6 xs10 offset-sm3 offset-xs1 offset-lg4> |
22 | <v-form class="mt-4"> | 23 | <v-form class="mt-4"> |
23 | <div class="custom-input-align"> | 24 | <div class="custom-input-align"> |
24 | <v-text-field | 25 | <v-text-field |
25 | class="text-md-center" | 26 | class="text-md-center" |
26 | v-validate="'required|email'" | 27 | v-validate="'required|email'" |
27 | v-model="changePassword" | 28 | v-model="changePassword" |
28 | :error-messages="errors.collect('email')" | 29 | :error-messages="errors.collect('email')" |
29 | label="Enter Your email ID" | 30 | label="Enter Your email ID" |
30 | data-vv-name="email" | 31 | data-vv-name="email" |
31 | required> | 32 | required> |
32 | </v-text-field> | 33 | </v-text-field> |
33 | </div> | 34 | </div> |
34 | </v-form></v-flex> | 35 | </v-form></v-flex> |
35 | </v-card-text> | 36 | </v-card-text> |
36 | <v-card-actions> | 37 | <v-card-actions> |
37 | <v-flex text-xs-center> | 38 | <v-flex text-xs-center> |
38 | <v-btn round class="mt-1 button" color="black" dark large @click="reset">Send Request</v-btn></v-flex> | 39 | <v-btn round class="mt-1 button" color="black" dark large @click="reset">Send Request</v-btn></v-flex> |
39 | </v-card-actions> | 40 | </v-card-actions> |
40 | <v-snackbar | 41 | <v-snackbar |
41 | :timeout="timeout" | 42 | :timeout="timeout" |
42 | :top="y === 'top'" | 43 | :top="y === 'top'" |
43 | :right="x === 'right'" | 44 | :right="x === 'right'" |
44 | :vertical="mode === 'vertical'" | 45 | :vertical="mode === 'vertical'" |
45 | v-model="snackbar" | 46 | v-model="snackbar" |
46 | :color= color | 47 | :color= color |
47 | > | 48 | > |
48 | {{ text }} | 49 | {{ text }} |
49 | </v-snackbar> | 50 | </v-snackbar> |
50 | </v-snackbar> | 51 | </v-snackbar> |
51 | </v-card> | 52 | </v-card> |
52 | </v-flex> | 53 | </v-flex> |
53 | </v-layout> | 54 | </v-layout> |
54 | </v-container> | 55 | </v-container> |
55 | </v-content> | 56 | </v-content> |
56 | <v-footer class="pa-4" color="grey darken-2"> | 57 | <v-footer class="pa-4" color="grey darken-2"> |
57 | </v-footer> | 58 | </v-footer> |
58 | </v-app> | 59 | </v-app> |
59 | </template> | 60 | </template> |
60 | <script> | 61 | <script> |
61 | import http from '@/Services/http.js'; | 62 | import http from '@/Services/http.js'; |
62 | 63 | ||
63 | export default { | 64 | export default { |
64 | data: () => ({ | 65 | data: () => ({ |
65 | changePassword:'', | 66 | changePassword:'', |
66 | snackbar: false, | 67 | snackbar: false, |
67 | y: 'top', | 68 | y: 'top', |
68 | x: 'right', | 69 | x: 'right', |
69 | mode: '', | 70 | mode: '', |
70 | timeout: 4000, | 71 | timeout: 4000, |
71 | text: '', | 72 | text: '', |
72 | loading: false, | 73 | loading: false, |
73 | email: '' | 74 | email: '' |
74 | }), | 75 | }), |
75 | 76 | ||
76 | methods: { | 77 | methods: { |
77 | reset () { | 78 | reset () { |
78 | 79 | ||
79 | http().get('/adminForgotPassword?email='+ this.changePassword) | 80 | http().get('/schoolForgotPassword?email='+ this.changePassword) |
80 | .then(response => { | 81 | .then(response => { |
81 | console.log("response=====>",response); | 82 | console.log("response=====>",response); |
82 | this.loading = true; | 83 | this.loading = true; |
83 | if(this.snackbar=true){ | 84 | if(this.snackbar=true){ |
84 | this.text= "Please check your email and Copy your password!" | 85 | this.text= "Please check your email and Copy your password!" |
85 | } | 86 | } |
86 | setTimeout(() => { | 87 | setTimeout(() => { |
87 | this.$router.push('/'); | 88 | this.$router.push('/'); |
88 | }, 1000); | 89 | }, 1000); |
89 | }).catch(err => { | 90 | }).catch(err => { |
90 | this.text="User Not Found or Incorrect Email" | 91 | this.text="User Not Found or Incorrect Email" |
91 | this.snackbar= true; | 92 | this.snackbar= true; |
92 | this.loading = false; | 93 | this.loading = false; |
93 | }) | 94 | }) |
94 | } | 95 | } |
95 | }, | 96 | }, |
96 | computed:{ | 97 | computed:{ |
97 | color(){ | 98 | color(){ |
98 | return this.loading ? 'success' : 'error' | 99 | return this.loading ? 'success' : 'error' |
99 | } | 100 | } |
100 | } | 101 | } |
101 | 102 | ||
102 | }; | 103 | }; |
103 | </script> | 104 | </script> |
104 | <style scoped lang="css"> | 105 | <style scoped lang="css"> |
105 | #login { | 106 | #login { |
106 | height: 50%; | 107 | height: 50%; |
107 | width: 100%; | 108 | width: 100%; |
108 | position: absolute; | 109 | position: absolute; |
109 | top: 0; | 110 | top: 0; |
110 | left: 0; | 111 | left: 0; |
111 | content: ""; | 112 | content: ""; |
112 | z-index: 0; | 113 | z-index: 0; |
113 | } | 114 | } |
114 | img{ | 115 | img{ |
115 | position:absolute; | 116 | position:absolute; |
116 | top:13px; | 117 | top:13px; |
117 | left:50px; | 118 | left:50px; |
118 | } | 119 | } |
119 | .v-btn--large { | 120 | .v-btn--large { |
120 | padding: 0px 74px; | 121 | padding: 0px 74px; |
121 | } | 122 | } |
122 | .button{ | 123 | .button{ |
123 | text-transform: none; | 124 | text-transform: none; |
124 | } | 125 | } |
125 | @media screen and (max-width: 472px) { | 126 | @media screen and (max-width: 472px) { |
126 | .v-btn--large { | 127 | .v-btn--large { |
127 | padding:0px 20px !important; | 128 | padding:0px 20px !important; |
128 | font-size:13px; | 129 | font-size:13px; |
129 | } | 130 | } |
130 | h5 { | 131 | h5 { |
131 | font-size: 11px; | 132 | font-size: 11px; |
132 | } | 133 | } |
133 | } | 134 | } |
134 | @media screen and (max-width: 600px) { | 135 | @media screen and (max-width: 600px) { |
135 | img{ | 136 | img{ |
136 | top:16px; | 137 | top:16px; |
137 | left:10px; | 138 | left:10px; |
138 | height: 24px; | 139 | height: 24px; |
139 | width: 66px;; | 140 | width: 66px;; |
140 | } | 141 | } |
141 | } | 142 | } |
142 | </style> | 143 | </style> |
src/router/paths.js
1 | export default [ | 1 | export default [ |
2 | 2 | ||
3 | { | 3 | { |
4 | path: '*', | 4 | path: '*', |
5 | meta: { | 5 | meta: { |
6 | public: true, | 6 | public: true, |
7 | }, | 7 | }, |
8 | redirect: { | 8 | redirect: { |
9 | path: '/404' | 9 | path: '/404' |
10 | } | 10 | } |
11 | }, | 11 | }, |
12 | { | 12 | { |
13 | path: '/404', | 13 | path: '/404', |
14 | meta: { | 14 | meta: { |
15 | public: true, | 15 | public: true, |
16 | }, | 16 | }, |
17 | name: 'NotFound', | 17 | name: 'NotFound', |
18 | component: () => import( | 18 | component: () => import( |
19 | /* webpackChunkName: "routes" */ | 19 | /* webpackChunkName: "routes" */ |
20 | /* webpackMode: "lazy-once" */ | 20 | /* webpackMode: "lazy-once" */ |
21 | `@/pages/NotFound.vue` | 21 | `@/pages/NotFound.vue` |
22 | ) | 22 | ) |
23 | }, | 23 | }, |
24 | { | 24 | { |
25 | path: '/403', | 25 | path: '/403', |
26 | meta: { | 26 | meta: { |
27 | public: true, | 27 | public: true, |
28 | }, | 28 | }, |
29 | name: 'AccessDenied', | 29 | name: 'AccessDenied', |
30 | component: () => import( | 30 | component: () => import( |
31 | /* webpackChunkName: "routes" */ | 31 | /* webpackChunkName: "routes" */ |
32 | /* webpackMode: "lazy-once" */ | 32 | /* webpackMode: "lazy-once" */ |
33 | `@/pages/Deny.vue` | 33 | `@/pages/Deny.vue` |
34 | ) | 34 | ) |
35 | }, | 35 | }, |
36 | { | 36 | { |
37 | path: '/500', | 37 | path: '/500', |
38 | meta: { | 38 | meta: { |
39 | public: true, | 39 | public: true, |
40 | }, | 40 | }, |
41 | name: 'ServerError', | 41 | name: 'ServerError', |
42 | component: () => import( | 42 | component: () => import( |
43 | /* webpackChunkName: "routes" */ | 43 | /* webpackChunkName: "routes" */ |
44 | /* webpackMode: "lazy-once" */ | 44 | /* webpackMode: "lazy-once" */ |
45 | `@/pages/Error.vue` | 45 | `@/pages/Error.vue` |
46 | ) | 46 | ) |
47 | }, | 47 | }, |
48 | { | 48 | { |
49 | path: '/changepassword', | 49 | path: '/changepassword', |
50 | meta: { }, | 50 | meta: { }, |
51 | name: 'changepassword', | 51 | name: 'changepassword', |
52 | props: (route) => ({ type: route.query.type }), | 52 | props: (route) => ({ type: route.query.type }), |
53 | component: () => import( | 53 | component: () => import( |
54 | /* webpackChunkName: "routes" */ | 54 | /* webpackChunkName: "routes" */ |
55 | /* webpackMode: "lazy-once" */ | 55 | /* webpackMode: "lazy-once" */ |
56 | `@/pages/changepassword.vue` | 56 | `@/pages/changepassword.vue` |
57 | ) | 57 | ) |
58 | }, | 58 | }, |
59 | // { | 59 | // { |
60 | // path: '/changepassword', | 60 | // path: '/changepassword', |
61 | // meta: { | 61 | // meta: { |
62 | // public: true, | 62 | // public: true, |
63 | // }, | 63 | // }, |
64 | // name: 'ServerError', | 64 | // name: 'ServerError', |
65 | // component: () => import( | 65 | // component: () => import( |
66 | // webpackChunkName: "routes" */ | 66 | // webpackChunkName: "routes" */ |
67 | // webpackMode: "lazy-once" */ | 67 | // webpackMode: "lazy-once" */ |
68 | // `@/pages/changepassword.vue` | 68 | // `@/pages/changepassword.vue` |
69 | // ) | 69 | // ) |
70 | // }, | 70 | // }, |
71 | // { | 71 | // { |
72 | // path: '/', | 72 | // path: '/', |
73 | // meta: { }, | 73 | // meta: { }, |
74 | // name: 'Root', | 74 | // name: 'Root', |
75 | // redirect: { | 75 | // redirect: { |
76 | // name: 'Dashboard' | 76 | // name: 'Dashboard' |
77 | // } | 77 | // } |
78 | // }, | 78 | // }, |
79 | 79 | ||
80 | { | 80 | { |
81 | path: '/dashboard', | 81 | path: '/dashboard', |
82 | meta: { breadcrumb: false }, | 82 | meta: { breadcrumb: false }, |
83 | name: 'Dashboard', | 83 | name: 'Dashboard', |
84 | component: () => import( | 84 | component: () => import( |
85 | /* webpackChunkName: "routes" */ | 85 | /* webpackChunkName: "routes" */ |
86 | /* webpackMode: "lazy-once" */ | 86 | /* webpackMode: "lazy-once" */ |
87 | `@/pages/Dashboard.vue` | 87 | `@/pages/Dashboard.vue` |
88 | ) | 88 | ) |
89 | }, | 89 | }, |
90 | { | 90 | { |
91 | path: '/', | 91 | path: '/', |
92 | meta: { | 92 | meta: { |
93 | public: true, | 93 | public: true, |
94 | }, | 94 | }, |
95 | name: 'Login', | 95 | name: 'Login', |
96 | component: () => import( | 96 | component: () => import( |
97 | /* webpackChunkName: "routes" */ | 97 | /* webpackChunkName: "routes" */ |
98 | /* webpackMode: "lazy-once" */ | 98 | /* webpackMode: "lazy-once" */ |
99 | `@/pages/Login.vue` | 99 | `@/pages/Login.vue` |
100 | ) | 100 | ) |
101 | }, | 101 | }, |
102 | { | 102 | { |
103 | path: '/forgetpassword', | 103 | path: '/forgetpassword', |
104 | meta: { | 104 | meta: { |
105 | public: true, | 105 | public: true, |
106 | }, | 106 | }, |
107 | name: 'forgetpassword', | 107 | name: 'forgetpassword', |
108 | component: () => import( | 108 | component: () => import( |
109 | /* webpackChunkName: "routes" */ | 109 | /* webpackChunkName: "routes" */ |
110 | /* webpackMode: "lazy-once" */ | 110 | /* webpackMode: "lazy-once" */ |
111 | `@/pages/forgetpassword.vue` | 111 | `@/pages/forgetpassword.vue` |
112 | ) | 112 | ) |
113 | }, | 113 | }, |
114 | { | 114 | { |
115 | path: '/login', | 115 | path: '/login', |
116 | meta: { | 116 | meta: { |
117 | public: true, | 117 | public: true, |
118 | }, | 118 | }, |
119 | name: '', | 119 | name: '', |
120 | component: () => import( | 120 | component: () => import( |
121 | /* webpackChunkName: "routes" */ | 121 | /* webpackChunkName: "routes" */ |
122 | /* webpackMode: "lazy-once" */ | 122 | /* webpackMode: "lazy-once" */ |
123 | `@/pages/Login.vue` | 123 | `@/pages/Login.vue` |
124 | ) | 124 | ) |
125 | }, | 125 | }, |
126 | // { | 126 | // { |
127 | // path: '/register', | 127 | // path: '/register', |
128 | // meta: { | 128 | // meta: { |
129 | // public: true, | 129 | // public: true, |
130 | // }, | 130 | // }, |
131 | // name: 'register', | 131 | // name: 'register', |
132 | // component: () => import( | 132 | // component: () => import( |
133 | // /* webpackChunkName: "routes" */ | 133 | // /* webpackChunkName: "routes" */ |
134 | // /* webpackMode: "lazy-once" */ | 134 | // /* webpackMode: "lazy-once" */ |
135 | // `@/pages/register.vue` | 135 | // `@/pages/register.vue` |
136 | // ) | 136 | // ) |
137 | // }, | 137 | // }, |
138 | { | 138 | { |
139 | path: '/Provider', | 139 | path: '/students', |
140 | meta: { }, | 140 | meta: { }, |
141 | name: 'Provider', | 141 | name: 'Students', |
142 | props: (route) => ({ type: route.query.type }), | 142 | props: (route) => ({ type: route.query.type }), |
143 | component: () => import( | 143 | component: () => import( |
144 | /* webpackChunkName: "routes" */ | 144 | /* webpackChunkName: "routes" */ |
145 | /* webpackMode: "lazy-once" */ | 145 | /* webpackMode: "lazy-once" */ |
146 | `@/pages/Provider.vue` | 146 | `@/pages/Students.vue` |
147 | ) | 147 | ) |
148 | }, | 148 | }, |
149 | { | 149 | { |
150 | path: '/notification', | 150 | path: '/notification', |
151 | meta: { }, | 151 | meta: { }, |
152 | name: 'notification', | 152 | name: 'notification', |
153 | props: (route) => ({ type: route.query.type }), | 153 | props: (route) => ({ type: route.query.type }), |
154 | component: () => import( | 154 | component: () => import( |
155 | /* webpackChunkName: "routes" */ | 155 | /* webpackChunkName: "routes" */ |
156 | /* webpackMode: "lazy-once" */ | 156 | /* webpackMode: "lazy-once" */ |
157 | `@/pages/notification.vue` | 157 | `@/pages/notification.vue` |
158 | ) | 158 | ) |
159 | }, | 159 | }, |
160 | { | 160 | { |
161 | path: '/questions', | 161 | path: '/questions', |
162 | meta: {}, | 162 | meta: {}, |
163 | name: 'questions', | 163 | name: 'questions', |
164 | props: (route) => ({ | 164 | props: (route) => ({ |
165 | type: route.query.type | 165 | type: route.query.type |
166 | }), | 166 | }), |
167 | component: () => | 167 | component: () => |
168 | import( | 168 | import( |
169 | /* webpackChunkName: "routes" */ | 169 | /* webpackChunkName: "routes" */ |
170 | /* webpackMode: "lazy-once" */ | 170 | /* webpackMode: "lazy-once" */ |
171 | `@/pages/questions.vue` | 171 | `@/pages/questions.vue` |
172 | ) | 172 | ) |
173 | }, | 173 | }, |
174 | { | 174 | { |
175 | path: '/adduser', | 175 | path: '/adduser', |
176 | meta: { }, | 176 | meta: { }, |
177 | name: 'adduser', | 177 | name: 'adduser', |
178 | props: (route) => ({ type: route.query.type }), | 178 | props: (route) => ({ type: route.query.type }), |
179 | component: () => import( | 179 | component: () => import( |
180 | /* webpackChunkName: "routes" */ | 180 | /* webpackChunkName: "routes" */ |
181 | /* webpackMode: "lazy-once" */ | 181 | /* webpackMode: "lazy-once" */ |
182 | `@/pages/adduser.vue` | 182 | `@/pages/adduser.vue` |
183 | ) | 183 | ) |
184 | }, | 184 | }, |
185 | // { | 185 | // { |
186 | // path: '/chat', | 186 | // path: '/chat', |
187 | // meta: { | 187 | // meta: { |
188 | // public: true, | 188 | // public: true, |
189 | // }, | 189 | // }, |
190 | // name: 'Chat', | 190 | // name: 'Chat', |
191 | // component: () => import( | 191 | // component: () => import( |
192 | // /* webpackChunkName: "routes" */ | 192 | // /* webpackChunkName: "routes" */ |
193 | // `@/components/chat/ChatLayout.vue` | 193 | // `@/components/chat/ChatLayout.vue` |
194 | // ), | 194 | // ), |
195 | // redirect: { | 195 | // redirect: { |
196 | // path: '/chat/messaging' | 196 | // path: '/chat/messaging' |
197 | // }, | 197 | // }, |
198 | // children: [ | 198 | // children: [ |
199 | // { | 199 | // { |
200 | // path: '/chat/messaging/:uuid?', | 200 | // path: '/chat/messaging/:uuid?', |
201 | // meta: { | 201 | // meta: { |
202 | // public: true, | 202 | // public: true, |
203 | // }, | 203 | // }, |
204 | // name: 'ChatMessaging', | 204 | // name: 'ChatMessaging', |
205 | // props: true, | 205 | // props: true, |
206 | // components: { | 206 | // components: { |
207 | // default: () => import( | 207 | // default: () => import( |
208 | // /* webpackChunkName: "routes" */ | 208 | // /* webpackChunkName: "routes" */ |
209 | // /* webpackMode: "lazy-once" */ | 209 | // /* webpackMode: "lazy-once" */ |
210 | // `@/components/chat/ChatMessaging.vue` | 210 | // `@/components/chat/ChatMessaging.vue` |
211 | // ), | 211 | // ), |
212 | // } | 212 | // } |
213 | // }, | 213 | // }, |
214 | // { | 214 | // { |
215 | // path: '/chat/contact/:uuid?', | 215 | // path: '/chat/contact/:uuid?', |
216 | // meta: { | 216 | // meta: { |
217 | // public: true, | 217 | // public: true, |
218 | // }, | 218 | // }, |
219 | // name: 'ChatContact', | 219 | // name: 'ChatContact', |
220 | // components: { | 220 | // components: { |
221 | // default: () => import( | 221 | // default: () => import( |
222 | // /* webpackChunkName: "routes" */ | 222 | // /* webpackChunkName: "routes" */ |
223 | // /* webpackMode: "lazy-once" */ | 223 | // /* webpackMode: "lazy-once" */ |
224 | // `@/components/chat/ChatContact.vue` | 224 | // `@/components/chat/ChatContact.vue` |
225 | // ), | 225 | // ), |
226 | 226 | ||
227 | // } | 227 | // } |
228 | // } | 228 | // } |
229 | // ] | 229 | // ] |
230 | // }, | 230 | // }, |
231 | // { | 231 | // { |
232 | // path: '/mail', | 232 | // path: '/mail', |
233 | // meta: { | 233 | // meta: { |
234 | // public: true, | 234 | // public: true, |
235 | // }, | 235 | // }, |
236 | // name: 'Mail', | 236 | // name: 'Mail', |
237 | // component: () => import( | 237 | // component: () => import( |
238 | // /* webpackChunkName: "routes" */ | 238 | // /* webpackChunkName: "routes" */ |
239 | // /* webpackMode: "lazy-once" */ | 239 | // /* webpackMode: "lazy-once" */ |
240 | // `@/components/email/Layout.vue` | 240 | // `@/components/email/Layout.vue` |
241 | // ), | 241 | // ), |
242 | // redirect: { | 242 | // redirect: { |
243 | // path: '/mail/all' | 243 | // path: '/mail/all' |
244 | // }, | 244 | // }, |
245 | // children: [ | 245 | // children: [ |
246 | // { | 246 | // { |
247 | // path: '/mail/:mailType', | 247 | // path: '/mail/:mailType', |
248 | // meta: { | 248 | // meta: { |
249 | // public: true, | 249 | // public: true, |
250 | // }, | 250 | // }, |
251 | // name: 'MailIndex', | 251 | // name: 'MailIndex', |
252 | // component: () => import( | 252 | // component: () => import( |
253 | // /* webpackChunkName: "routes" */ | 253 | // /* webpackChunkName: "routes" */ |
254 | // /* webpackMode: "lazy-once" */ | 254 | // /* webpackMode: "lazy-once" */ |
255 | // `@/components/email/List.vue` | 255 | // `@/components/email/List.vue` |
256 | // ), | 256 | // ), |
257 | // }, | 257 | // }, |
258 | // { | 258 | // { |
259 | // path: '/mail/0/:uuid', | 259 | // path: '/mail/0/:uuid', |
260 | // meta: { | 260 | // meta: { |
261 | // public: true, | 261 | // public: true, |
262 | // }, | 262 | // }, |
263 | // name: 'MailDetail', | 263 | // name: 'MailDetail', |
264 | // component: () => import( | 264 | // component: () => import( |
265 | // /* webpackChunkName: "routes" */ | 265 | // /* webpackChunkName: "routes" */ |
266 | // /* webpackMode: "lazy-once" */ | 266 | // /* webpackMode: "lazy-once" */ |
267 | // `@/components/email/Reply.vue` | 267 | // `@/components/email/Reply.vue` |
268 | // ), | 268 | // ), |
269 | // } | 269 | // } |
270 | // ] | 270 | // ] |
271 | // }, | 271 | // }, |
272 | // { | 272 | // { |
273 | // path: '/components/alert', | 273 | // path: '/components/alert', |
274 | // meta: { breadcrumb: true }, | 274 | // meta: { breadcrumb: true }, |
275 | // name: 'components/alerts', | 275 | // name: 'components/alerts', |
276 | // component: () => import( | 276 | // component: () => import( |
277 | // /* webpackChunkName: "routes" */ | 277 | // /* webpackChunkName: "routes" */ |
278 | // /* webpackMode: "lazy-once" */ | 278 | // /* webpackMode: "lazy-once" */ |
279 | // `@/pages/ui/Alert.vue` | 279 | // `@/pages/ui/Alert.vue` |
280 | // ) | 280 | // ) |
281 | // }, | 281 | // }, |
282 | // { | 282 | // { |
283 | // path: '/components/avatar', | 283 | // path: '/components/avatar', |
284 | // meta: { breadcrumb: true }, | 284 | // meta: { breadcrumb: true }, |
285 | // name: 'components/avatars', | 285 | // name: 'components/avatars', |
286 | // component: () => import( | 286 | // component: () => import( |
287 | // /* webpackChunkName: "routes" */ | 287 | // /* webpackChunkName: "routes" */ |
288 | // /* webpackMode: "lazy-once" */ | 288 | // /* webpackMode: "lazy-once" */ |
289 | // `@/pages/ui/Avatar.vue` | 289 | // `@/pages/ui/Avatar.vue` |
290 | // ) | 290 | // ) |
291 | // }, | 291 | // }, |
292 | // { | 292 | // { |
293 | // path: '/components/badge', | 293 | // path: '/components/badge', |
294 | // meta: { breadcrumb: true }, | 294 | // meta: { breadcrumb: true }, |
295 | // name: 'components/badges', | 295 | // name: 'components/badges', |
296 | // component: () => import( | 296 | // component: () => import( |
297 | // /* webpackChunkName: "routes" */ | 297 | // /* webpackChunkName: "routes" */ |
298 | // /* webpackMode: "lazy-once" */ | 298 | // /* webpackMode: "lazy-once" */ |
299 | // `@/pages/ui/Badge.vue` | 299 | // `@/pages/ui/Badge.vue` |
300 | // ) | 300 | // ) |
301 | // }, | 301 | // }, |
302 | // { | 302 | // { |
303 | // path: '/components/button', | 303 | // path: '/components/button', |
304 | // meta: { breadcrumb: true }, | 304 | // meta: { breadcrumb: true }, |
305 | // name: 'components/buttons', | 305 | // name: 'components/buttons', |
306 | // component: () => import( | 306 | // component: () => import( |
307 | // /* webpackChunkName: "routes" */ | 307 | // /* webpackChunkName: "routes" */ |
308 | // /* webpackMode: "lazy-once" */ | 308 | // /* webpackMode: "lazy-once" */ |
309 | // `@/pages/ui/Button.vue` | 309 | // `@/pages/ui/Button.vue` |
310 | // ) | 310 | // ) |
311 | // }, | 311 | // }, |
312 | // { | 312 | // { |
313 | // path: '/components/parallax', | 313 | // path: '/components/parallax', |
314 | // meta: { breadcrumb: true }, | 314 | // meta: { breadcrumb: true }, |
315 | // name: 'components/parallax', | 315 | // name: 'components/parallax', |
316 | // component: () => import( | 316 | // component: () => import( |
317 | // /* webpackChunkName: "routes" */ | 317 | // /* webpackChunkName: "routes" */ |
318 | // /* webpackMode: "lazy-once" */ | 318 | // /* webpackMode: "lazy-once" */ |
319 | // `@/pages/ui/Parallax.vue` | 319 | // `@/pages/ui/Parallax.vue` |
320 | // ) | 320 | // ) |
321 | // }, | 321 | // }, |
322 | // { | 322 | // { |
323 | // path: '/components/snackbar', | 323 | // path: '/components/snackbar', |
324 | // meta: { breadcrumb: true }, | 324 | // meta: { breadcrumb: true }, |
325 | // name: 'components/snackbar', | 325 | // name: 'components/snackbar', |
326 | // component: () => import( | 326 | // component: () => import( |
327 | // /* webpackChunkName: "routes" */ | 327 | // /* webpackChunkName: "routes" */ |
328 | // /* webpackMode: "lazy-once" */ | 328 | // /* webpackMode: "lazy-once" */ |
329 | // `@/pages/ui/Snackbar.vue` | 329 | // `@/pages/ui/Snackbar.vue` |
330 | // ) | 330 | // ) |
331 | // }, | 331 | // }, |
332 | // { | 332 | // { |
333 | // path: '/components/chip', | 333 | // path: '/components/chip', |
334 | // meta: { breadcrumb: true }, | 334 | // meta: { breadcrumb: true }, |
335 | // name: 'components/chips', | 335 | // name: 'components/chips', |
336 | // component: () => import( | 336 | // component: () => import( |
337 | // /* webpackChunkName: "routes" */ | 337 | // /* webpackChunkName: "routes" */ |
338 | // /* webpackMode: "lazy-once" */ | 338 | // /* webpackMode: "lazy-once" */ |
339 | // `@/pages/ui/Chip.vue` | 339 | // `@/pages/ui/Chip.vue` |
340 | // ) | 340 | // ) |
341 | // }, | 341 | // }, |
342 | // { | 342 | // { |
343 | // path: '/components/card', | 343 | // path: '/components/card', |
344 | // meta: { breadcrumb: true }, | 344 | // meta: { breadcrumb: true }, |
345 | // name: 'components/cards', | 345 | // name: 'components/cards', |
346 | // component: () => import( | 346 | // component: () => import( |
347 | // /* webpackChunkName: "routes" */ | 347 | // /* webpackChunkName: "routes" */ |
348 | // /* webpackMode: "lazy-once" */ | 348 | // /* webpackMode: "lazy-once" */ |
349 | // `@/pages/ui/Cards.vue` | 349 | // `@/pages/ui/Cards.vue` |
350 | // ) | 350 | // ) |
351 | // }, | 351 | // }, |
352 | // { | 352 | // { |
353 | // path: '/components/table', | 353 | // path: '/components/table', |
354 | // meta: { breadcrumb: true }, | 354 | // meta: { breadcrumb: true }, |
355 | // name: 'components/tables', | 355 | // name: 'components/tables', |
356 | // component: () => import( | 356 | // component: () => import( |
357 | // /* webpackChunkName: "routes" */ | 357 | // /* webpackChunkName: "routes" */ |
358 | // /* webpackMode: "lazy-once" */ | 358 | // /* webpackMode: "lazy-once" */ |
359 | // `@/pages/ui/Tables.vue` | 359 | // `@/pages/ui/Tables.vue` |
360 | // ) | 360 | // ) |
361 | // }, | 361 | // }, |
362 | // { | 362 | // { |
363 | // path: '/components/carousel', | 363 | // path: '/components/carousel', |
364 | // meta: { breadcrumb: true }, | 364 | // meta: { breadcrumb: true }, |
365 | // name: 'components/carousels', | 365 | // name: 'components/carousels', |
366 | // component: () => import( | 366 | // component: () => import( |
367 | // /* webpackChunkName: "routes" */ | 367 | // /* webpackChunkName: "routes" */ |
368 | // /* webpackMode: "lazy-once" */ | 368 | // /* webpackMode: "lazy-once" */ |
369 | // `@/pages/ui/Carousels.vue` | 369 | // `@/pages/ui/Carousels.vue` |
370 | // ) | 370 | // ) |
371 | // }, | 371 | // }, |
372 | // { | 372 | // { |
373 | // path: '/components/dialog', | 373 | // path: '/components/dialog', |
374 | // meta: { breadcrumb: true }, | 374 | // meta: { breadcrumb: true }, |
375 | // name: 'components/dialogs', | 375 | // name: 'components/dialogs', |
376 | // component: () => import( | 376 | // component: () => import( |
377 | // /* webpackChunkName: "routes" */ | 377 | // /* webpackChunkName: "routes" */ |
378 | // /* webpackMode: "lazy-once" */ | 378 | // /* webpackMode: "lazy-once" */ |
379 | // `@/pages/ui/Dialogs.vue` | 379 | // `@/pages/ui/Dialogs.vue` |
380 | // ) | 380 | // ) |
381 | // }, | 381 | // }, |
382 | // { | 382 | // { |
383 | // path: '/components/icon', | 383 | // path: '/components/icon', |
384 | // meta: { breadcrumb: true }, | 384 | // meta: { breadcrumb: true }, |
385 | // name: 'components/icons', | 385 | // name: 'components/icons', |
386 | // component: () => import( | 386 | // component: () => import( |
387 | // /* webpackChunkName: "routes" */ | 387 | // /* webpackChunkName: "routes" */ |
388 | // /* webpackMode: "lazy-once" */ | 388 | // /* webpackMode: "lazy-once" */ |
389 | // `@/pages/ui/Icon.vue` | 389 | // `@/pages/ui/Icon.vue` |
390 | // ) | 390 | // ) |
391 | // }, | 391 | // }, |
392 | // { | 392 | // { |
393 | // path: '/components/progress', | 393 | // path: '/components/progress', |
394 | // meta: { breadcrumb: true }, | 394 | // meta: { breadcrumb: true }, |
395 | // name: 'components/progress', | 395 | // name: 'components/progress', |
396 | // component: () => import( | 396 | // component: () => import( |
397 | // /* webpackChunkName: "routes" */ | 397 | // /* webpackChunkName: "routes" */ |
398 | // /* webpackMode: "lazy-once" */ | 398 | // /* webpackMode: "lazy-once" */ |
399 | // `@/pages/ui/Progress.vue` | 399 | // `@/pages/ui/Progress.vue` |
400 | // ) | 400 | // ) |
401 | // }, | 401 | // }, |
402 | // { | 402 | // { |
403 | // path: '/components/slider', | 403 | // path: '/components/slider', |
404 | // meta: { breadcrumb: true }, | 404 | // meta: { breadcrumb: true }, |
405 | // name: 'components/sliders', | 405 | // name: 'components/sliders', |
406 | // component: () => import( | 406 | // component: () => import( |
407 | // /* webpackChunkName: "routes" */ | 407 | // /* webpackChunkName: "routes" */ |
408 | // /* webpackMode: "lazy-once" */ | 408 | // /* webpackMode: "lazy-once" */ |
409 | // `@/pages/ui/Slider.vue` | 409 | // `@/pages/ui/Slider.vue` |
410 | // ) | 410 | // ) |
411 | // }, | 411 | // }, |
412 | // { | 412 | // { |
413 | // path: '/components/tooltip', | 413 | // path: '/components/tooltip', |
414 | // meta: { breadcrumb: true }, | 414 | // meta: { breadcrumb: true }, |
415 | // name: 'components/tooltips', | 415 | // name: 'components/tooltips', |
416 | // component: () => import( | 416 | // component: () => import( |
417 | // /* webpackChunkName: "routes" */ | 417 | // /* webpackChunkName: "routes" */ |
418 | // /* webpackMode: "lazy-once" */ | 418 | // /* webpackMode: "lazy-once" */ |
419 | // `@/pages/ui/Tooltip.vue` | 419 | // `@/pages/ui/Tooltip.vue` |
420 | // ) | 420 | // ) |
421 | // }, | 421 | // }, |
422 | // { | 422 | // { |
423 | // path: '/components/pagination', | 423 | // path: '/components/pagination', |
424 | // meta: { breadcrumb: true }, | 424 | // meta: { breadcrumb: true }, |
425 | // name: 'components/paginations', | 425 | // name: 'components/paginations', |
426 | // component: () => import( | 426 | // component: () => import( |
427 | // /* webpackChunkName: "routes" */ | 427 | // /* webpackChunkName: "routes" */ |
428 | // /* webpackMode: "lazy-once" */ | 428 | // /* webpackMode: "lazy-once" */ |
429 | // `@/pages/ui/Pagination.vue` | 429 | // `@/pages/ui/Pagination.vue` |
430 | // ) | 430 | // ) |
431 | // }, | 431 | // }, |
432 | // { | 432 | // { |
433 | // path: '/pickers/datepicker', | 433 | // path: '/pickers/datepicker', |
434 | // meta: { breadcrumb: true }, | 434 | // meta: { breadcrumb: true }, |
435 | // name: 'pickers/datepicker', | 435 | // name: 'pickers/datepicker', |
436 | // component: () => import( | 436 | // component: () => import( |
437 | // /* webpackChunkName: "routes" */ | 437 | // /* webpackChunkName: "routes" */ |
438 | // /* webpackMode: "lazy-once" */ | 438 | // /* webpackMode: "lazy-once" */ |
439 | // `@/pages/ui/Datepicker.vue` | 439 | // `@/pages/ui/Datepicker.vue` |
440 | // ) | 440 | // ) |
441 | // }, | 441 | // }, |
442 | // { | 442 | // { |
443 | // path: '/components/typography', | 443 | // path: '/components/typography', |
444 | // meta: { breadcrumb: true }, | 444 | // meta: { breadcrumb: true }, |
445 | // name: 'components/typography', | 445 | // name: 'components/typography', |
446 | // component: () => import( | 446 | // component: () => import( |
447 | // /* webpackChunkName: "routes" */ | 447 | // /* webpackChunkName: "routes" */ |
448 | // /* webpackMode: "lazy-once" */ | 448 | // /* webpackMode: "lazy-once" */ |
449 | // `@/pages/ui/Typography.vue` | 449 | // `@/pages/ui/Typography.vue` |
450 | // ) | 450 | // ) |
451 | // }, | 451 | // }, |
452 | // { | 452 | // { |
453 | // path: '/components/color', | 453 | // path: '/components/color', |
454 | // meta: { breadcrumb: true }, | 454 | // meta: { breadcrumb: true }, |
455 | // name: 'components/color', | 455 | // name: 'components/color', |
456 | // component: () => import( | 456 | // component: () => import( |
457 | // /* webpackChunkName: "routes" */ | 457 | // /* webpackChunkName: "routes" */ |
458 | // /* webpackMode: "lazy-once" */ | 458 | // /* webpackMode: "lazy-once" */ |
459 | // `@/pages/ui/Colors.vue` | 459 | // `@/pages/ui/Colors.vue` |
460 | // ) | 460 | // ) |
461 | // }, | 461 | // }, |
462 | // { | 462 | // { |
463 | // path: '/pickers/timepicker', | 463 | // path: '/pickers/timepicker', |
464 | // meta: { breadcrumb: true }, | 464 | // meta: { breadcrumb: true }, |
465 | // name: 'pickers/timepicker', | 465 | // name: 'pickers/timepicker', |
466 | // component: () => import( | 466 | // component: () => import( |
467 | // /* webpackChunkName: "routes" */ | 467 | // /* webpackChunkName: "routes" */ |
468 | // /* webpackMode: "lazy-once" */ | 468 | // /* webpackMode: "lazy-once" */ |
469 | // `@/pages/ui/Timepicker.vue` | 469 | // `@/pages/ui/Timepicker.vue` |
470 | // ) | 470 | // ) |
471 | // }, | 471 | // }, |
472 | // { | 472 | // { |
473 | // path: '/layout/bottomsheets', | 473 | // path: '/layout/bottomsheets', |
474 | // meta: { breadcrumb: true }, | 474 | // meta: { breadcrumb: true }, |
475 | // name: 'components/bottom-sheets', | 475 | // name: 'components/bottom-sheets', |
476 | // component: () => import( | 476 | // component: () => import( |
477 | // /* webpackChunkName: "routes" */ | 477 | // /* webpackChunkName: "routes" */ |
478 | // /* webpackMode: "lazy-once" */ | 478 | // /* webpackMode: "lazy-once" */ |
479 | // `@/pages/layout/BottomSheets.vue` | 479 | // `@/pages/layout/BottomSheets.vue` |
480 | // ) | 480 | // ) |
481 | // }, | 481 | // }, |
482 | // { | 482 | // { |
483 | // path: '/layout/expansion-panel', | 483 | // path: '/layout/expansion-panel', |
484 | // meta: { breadcrumb: true }, | 484 | // meta: { breadcrumb: true }, |
485 | // name: 'components/expansion-panels', | 485 | // name: 'components/expansion-panels', |
486 | // component: () => import( | 486 | // component: () => import( |
487 | // /* webpackChunkName: "routes" */ | 487 | // /* webpackChunkName: "routes" */ |
488 | // /* webpackMode: "lazy-once" */ | 488 | // /* webpackMode: "lazy-once" */ |
489 | // `@/pages/layout/ExpansionPanels.vue` | 489 | // `@/pages/layout/ExpansionPanels.vue` |
490 | // ) | 490 | // ) |
491 | // }, | 491 | // }, |
492 | // { | 492 | // { |
493 | // path: '/layout/footer', | 493 | // path: '/layout/footer', |
494 | // meta: { breadcrumb: true }, | 494 | // meta: { breadcrumb: true }, |
495 | // name: 'components/footer', | 495 | // name: 'components/footer', |
496 | // component: () => import( | 496 | // component: () => import( |
497 | // /* webpackChunkName: "routes" */ | 497 | // /* webpackChunkName: "routes" */ |
498 | // /* webpackMode: "lazy-once" */ | 498 | // /* webpackMode: "lazy-once" */ |
499 | // `@/pages/layout/Footers.vue` | 499 | // `@/pages/layout/Footers.vue` |
500 | // ) | 500 | // ) |
501 | // }, | 501 | // }, |
502 | // { | 502 | // { |
503 | // path: '/layout/timeline', | 503 | // path: '/layout/timeline', |
504 | // meta: { breadcrumb: true }, | 504 | // meta: { breadcrumb: true }, |
505 | // name: 'components/timeline', | 505 | // name: 'components/timeline', |
506 | // component: () => import( | 506 | // component: () => import( |
507 | // /* webpackChunkName: "routes" */ | 507 | // /* webpackChunkName: "routes" */ |
508 | // /* webpackMode: "lazy-once" */ | 508 | // /* webpackMode: "lazy-once" */ |
509 | // `@/pages/layout/Timeline.vue` | 509 | // `@/pages/layout/Timeline.vue` |
510 | // ) | 510 | // ) |
511 | // }, | 511 | // }, |
512 | // { | 512 | // { |
513 | // path: '/layout/list', | 513 | // path: '/layout/list', |
514 | // meta: { breadcrumb: true }, | 514 | // meta: { breadcrumb: true }, |
515 | // name: 'components/lists', | 515 | // name: 'components/lists', |
516 | // component: () => import( | 516 | // component: () => import( |
517 | // /* webpackChunkName: "routes" */ | 517 | // /* webpackChunkName: "routes" */ |
518 | // /* webpackMode: "lazy-once" */ | 518 | // /* webpackMode: "lazy-once" */ |
519 | // `@/pages/layout/Lists.vue` | 519 | // `@/pages/layout/Lists.vue` |
520 | // ) | 520 | // ) |
521 | // }, | 521 | // }, |
522 | // { | 522 | // { |
523 | // path: '/layout/toolbar', | 523 | // path: '/layout/toolbar', |
524 | // meta: { breadcrumb: true }, | 524 | // meta: { breadcrumb: true }, |
525 | // name: 'components/toolbar', | 525 | // name: 'components/toolbar', |
526 | // component: () => import( | 526 | // component: () => import( |
527 | // /* webpackChunkName: "routes" */ | 527 | // /* webpackChunkName: "routes" */ |
528 | // /* webpackMode: "lazy-once" */ | 528 | // /* webpackMode: "lazy-once" */ |
529 | // `@/pages/layout/Toolbar.vue` | 529 | // `@/pages/layout/Toolbar.vue` |
530 | // ) | 530 | // ) |
531 | // }, | 531 | // }, |
532 | // { | 532 | // { |
533 | // path: '/layout/jumbotron', | 533 | // path: '/layout/jumbotron', |
534 | // meta: { breadcrumb: true }, | 534 | // meta: { breadcrumb: true }, |
535 | // name: 'components/jumbotrons', | 535 | // name: 'components/jumbotrons', |
536 | // component: () => import( | 536 | // component: () => import( |
537 | // /* webpackChunkName: "routes" */ | 537 | // /* webpackChunkName: "routes" */ |
538 | // /* webpackMode: "lazy-once" */ | 538 | // /* webpackMode: "lazy-once" */ |
539 | // `@/pages/layout/Jumbotrons.vue` | 539 | // `@/pages/layout/Jumbotrons.vue` |
540 | // ) | 540 | // ) |
541 | // }, | 541 | // }, |
542 | // { | 542 | // { |
543 | // path: '/layout/menu', | 543 | // path: '/layout/menu', |
544 | // meta: { breadcrumb: true }, | 544 | // meta: { breadcrumb: true }, |
545 | // name: 'components/menus', | 545 | // name: 'components/menus', |
546 | // component: () => import( | 546 | // component: () => import( |
547 | // /* webpackChunkName: "routes" */ | 547 | // /* webpackChunkName: "routes" */ |
548 | // /* webpackMode: "lazy-once" */ | 548 | // /* webpackMode: "lazy-once" */ |
549 | // `@/pages/layout/Menus.vue` | 549 | // `@/pages/layout/Menus.vue` |
550 | // ) | 550 | // ) |
551 | // }, | 551 | // }, |
552 | // { | 552 | // { |
553 | // path: '/layout/navigation-drawer', | 553 | // path: '/layout/navigation-drawer', |
554 | // meta: { breadcrumb: true }, | 554 | // meta: { breadcrumb: true }, |
555 | // name: 'components/navigation-drawers', | 555 | // name: 'components/navigation-drawers', |
556 | // component: () => import( | 556 | // component: () => import( |
557 | // /* webpackChunkName: "routes" */ | 557 | // /* webpackChunkName: "routes" */ |
558 | // /* webpackMode: "lazy-once" */ | 558 | // /* webpackMode: "lazy-once" */ |
559 | // `@/pages/layout/NavigationDrawers.vue` | 559 | // `@/pages/layout/NavigationDrawers.vue` |
560 | // ) | 560 | // ) |
561 | // }, | 561 | // }, |
562 | // { | 562 | // { |
563 | // path: '/layout/tabs', | 563 | // path: '/layout/tabs', |
564 | // meta: { breadcrumb: true }, | 564 | // meta: { breadcrumb: true }, |
565 | // name: 'components/tabs', | 565 | // name: 'components/tabs', |
566 | // component: () => import( | 566 | // component: () => import( |
567 | // /* webpackChunkName: "routes" */ | 567 | // /* webpackChunkName: "routes" */ |
568 | // /* webpackMode: "lazy-once" */ | 568 | // /* webpackMode: "lazy-once" */ |
569 | // `@/pages/layout/Tabs.vue` | 569 | // `@/pages/layout/Tabs.vue` |
570 | // ) | 570 | // ) |
571 | // }, | 571 | // }, |
572 | // { | 572 | // { |
573 | // path: '/forms/basic', | 573 | // path: '/forms/basic', |
574 | // meta: { breadcrumb: true }, | 574 | // meta: { breadcrumb: true }, |
575 | // name: 'components/basic-forms', | 575 | // name: 'components/basic-forms', |
576 | // component: () => import( | 576 | // component: () => import( |
577 | // /* webpackChunkName: "routes" */ | 577 | // /* webpackChunkName: "routes" */ |
578 | // /* webpackMode: "lazy-once" */ | 578 | // /* webpackMode: "lazy-once" */ |
579 | // `@/pages/form/BasicForms.vue` | 579 | // `@/pages/form/BasicForms.vue` |
580 | // ) | 580 | // ) |
581 | // }, | 581 | // }, |
582 | // { | 582 | // { |
583 | // path: '/forms/selects', | 583 | // path: '/forms/selects', |
584 | // meta: { breadcrumb: true }, | 584 | // meta: { breadcrumb: true }, |
585 | // name: 'components/selects', | 585 | // name: 'components/selects', |
586 | // component: () => import( | 586 | // component: () => import( |
587 | // /* webpackChunkName: "routes" */ | 587 | // /* webpackChunkName: "routes" */ |
588 | // /* webpackMode: "lazy-once" */ | 588 | // /* webpackMode: "lazy-once" */ |
589 | // `@/pages/form/Selects.vue` | 589 | // `@/pages/form/Selects.vue` |
590 | // ) | 590 | // ) |
591 | // }, | 591 | // }, |
592 | // { | 592 | // { |
593 | // path: '/forms/editor', | 593 | // path: '/forms/editor', |
594 | // meta: { breadcrumb: true }, | 594 | // meta: { breadcrumb: true }, |
595 | // name: 'components/editors', | 595 | // name: 'components/editors', |
596 | // component: () => import( | 596 | // component: () => import( |
597 | // /* webpackChunkName: "routes" */ | 597 | // /* webpackChunkName: "routes" */ |
598 | // /* webpackMode: "lazy-once" */ | 598 | // /* webpackMode: "lazy-once" */ |
599 | // `@/pages/form/Editors.vue` | 599 | // `@/pages/form/Editors.vue` |
600 | // ) | 600 | // ) |
601 | // }, | 601 | // }, |
602 | // { | 602 | // { |
603 | // path: '/forms/selection-controls', | 603 | // path: '/forms/selection-controls', |
604 | // meta: { breadcrumb: true }, | 604 | // meta: { breadcrumb: true }, |
605 | // name: 'components/selection-controls', | 605 | // name: 'components/selection-controls', |
606 | // component: () => import( | 606 | // component: () => import( |
607 | // /* webpackChunkName: "routes" */ | 607 | // /* webpackChunkName: "routes" */ |
608 | // /* webpackMode: "lazy-once" */ | 608 | // /* webpackMode: "lazy-once" */ |
609 | // `@/pages/form/SelectionControls.vue` | 609 | // `@/pages/form/SelectionControls.vue` |
610 | // ) | 610 | // ) |
611 | // }, | 611 | // }, |
612 | // { | 612 | // { |
613 | // path: '/forms/text-fields', | 613 | // path: '/forms/text-fields', |
614 | // meta: { breadcrumb: true }, | 614 | // meta: { breadcrumb: true }, |
615 | // name: 'components/text-fields', | 615 | // name: 'components/text-fields', |
616 | // component: () => import( | 616 | // component: () => import( |
617 | // /* webpackChunkName: "routes" */ | 617 | // /* webpackChunkName: "routes" */ |
618 | // /* webpackMode: "lazy-once" */ | 618 | // /* webpackMode: "lazy-once" */ |
619 | // `@/pages/form/TextFields.vue` | 619 | // `@/pages/form/TextFields.vue` |
620 | // ) | 620 | // ) |
621 | // }, | 621 | // }, |
622 | // { | 622 | // { |
623 | // path: '/forms/steppers', | 623 | // path: '/forms/steppers', |
624 | // meta: { breadcrumb: true }, | 624 | // meta: { breadcrumb: true }, |
625 | // name: 'components/steppers', | 625 | // name: 'components/steppers', |
626 | // component: () => import( | 626 | // component: () => import( |
627 | // /* webpackChunkName: "routes" */ | 627 | // /* webpackChunkName: "routes" */ |
628 | // /* webpackMode: "lazy-once" */ | 628 | // /* webpackMode: "lazy-once" */ |
629 | // `@/pages/form/Steppers.vue` | 629 | // `@/pages/form/Steppers.vue` |
630 | // ) | 630 | // ) |
631 | // }, | 631 | // }, |
632 | // { | 632 | // { |
633 | // path: '/widgets/social', | 633 | // path: '/widgets/social', |
634 | // meta: { | 634 | // meta: { |
635 | // breadcrumb: true | 635 | // breadcrumb: true |
636 | // }, | 636 | // }, |
637 | // name: 'components/social', | 637 | // name: 'components/social', |
638 | // component: () => | 638 | // component: () => |
639 | // import( | 639 | // import( |
640 | // /* webpackChunkName: "routes" */ | 640 | // /* webpackChunkName: "routes" */ |
641 | // /* webpackMode: "lazy-once" */ | 641 | // /* webpackMode: "lazy-once" */ |
642 | // `@/pages/widgets/Social.vue` | 642 | // `@/pages/widgets/Social.vue` |
643 | // ) | 643 | // ) |
644 | // }, | 644 | // }, |
645 | // { | 645 | // { |
646 | // path: '/widgets/post', | 646 | // path: '/widgets/post', |
647 | // meta: { | 647 | // meta: { |
648 | // breadcrumb: true | 648 | // breadcrumb: true |
649 | // }, | 649 | // }, |
650 | // name: 'components/widget-post', | 650 | // name: 'components/widget-post', |
651 | // component: () => | 651 | // component: () => |
652 | // import( | 652 | // import( |
653 | // /* webpackChunkName: "routes" */ | 653 | // /* webpackChunkName: "routes" */ |
654 | // /* webpackMode: "lazy-once" */ | 654 | // /* webpackMode: "lazy-once" */ |
655 | // `@/pages/widgets/Post.vue` | 655 | // `@/pages/widgets/Post.vue` |
656 | // ) | 656 | // ) |
657 | // }, | 657 | // }, |
658 | // { | 658 | // { |
659 | // path: '/widgets/statistic', | 659 | // path: '/widgets/statistic', |
660 | // meta: { | 660 | // meta: { |
661 | // breadcrumb: true | 661 | // breadcrumb: true |
662 | // }, | 662 | // }, |
663 | // name: 'components/statistic', | 663 | // name: 'components/statistic', |
664 | // component: () => | 664 | // component: () => |
665 | // import( | 665 | // import( |
666 | // /* webpackChunkName: "routes" */ | 666 | // /* webpackChunkName: "routes" */ |
667 | // /* webpackMode: "lazy-once" */ | 667 | // /* webpackMode: "lazy-once" */ |
668 | // `@/pages/widgets/Statistic.vue` | 668 | // `@/pages/widgets/Statistic.vue` |
669 | // ) | 669 | // ) |
670 | // }, | 670 | // }, |
671 | // { | 671 | // { |
672 | // path: '/widgets/chart', | 672 | // path: '/widgets/chart', |
673 | // meta: { | 673 | // meta: { |
674 | // breadcrumb: true | 674 | // breadcrumb: true |
675 | // }, | 675 | // }, |
676 | // name: 'components/chart', | 676 | // name: 'components/chart', |
677 | // component: () => | 677 | // component: () => |
678 | // import( | 678 | // import( |
679 | // /* webpackChunkName: "routes" */ | 679 | // /* webpackChunkName: "routes" */ |
680 | // /* webpackMode: "lazy-once" */ | 680 | // /* webpackMode: "lazy-once" */ |
681 | // `@/pages/widgets/Chart.vue` | 681 | // `@/pages/widgets/Chart.vue` |
682 | // ) | 682 | // ) |
683 | // }, | 683 | // }, |
684 | // { | 684 | // { |
685 | // path: '/widgets/list', | 685 | // path: '/widgets/list', |
686 | // meta: { | 686 | // meta: { |
687 | // breadcrumb: true | 687 | // breadcrumb: true |
688 | // }, | 688 | // }, |
689 | // name: 'components/widget-list', | 689 | // name: 'components/widget-list', |
690 | // component: () => | 690 | // component: () => |
691 | // import( | 691 | // import( |
692 | // /* webpackChunkName: "routes" */ | 692 | // /* webpackChunkName: "routes" */ |
693 | // /* webpackMode: "lazy-once" */ | 693 | // /* webpackMode: "lazy-once" */ |
694 | // `@/pages/widgets/List.vue` | 694 | // `@/pages/widgets/List.vue` |
695 | // ) | 695 | // ) |
696 | // }, | 696 | // }, |
697 | 697 | ||
698 | ]; | 698 | ]; |
699 | 699 |
src/store/store.js
1 | import Vue from 'vue' | 1 | import Vue from 'vue' |
2 | import Vuex from 'vuex' | 2 | import Vuex from 'vuex' |
3 | import createPersistedState from 'vuex-persistedstate' | 3 | import createPersistedState from 'vuex-persistedstate' |
4 | 4 | ||
5 | Vue.use(Vuex) | 5 | Vue.use(Vuex) |
6 | 6 | ||
7 | export default new Vuex.Store({ | 7 | export default new Vuex.Store({ |
8 | strict:true, | 8 | strict:true, |
9 | plugins:[ | 9 | plugins:[ |
10 | createPersistedState() | 10 | createPersistedState() |
11 | ], | 11 | ], |
12 | state: { | 12 | state: { |
13 | token: null, | 13 | token: null, |
14 | data: null, | 14 | data: null, |
15 | isUserLoggedIn: false, | 15 | isUserLoggedIn: false, |
16 | userName: null, | 16 | id: null, |
17 | password: null, | ||
18 | name:null | ||
19 | }, | 17 | }, |
20 | // serve as the one and only way to change the state of the data in the state object | 18 | // serve as the one and only way to change the state of the data in the state object |
21 | mutations: { | 19 | mutations: { |
22 | setToken (state, token) { | 20 | setToken (state, token) { |
23 | state.token = token | 21 | state.token = token |
24 | //state.isUserLoggedIn = !!(token) | 22 | //state.isUserLoggedIn = !!(token) |
25 | if (token != null) { | 23 | if (token != null) { |
26 | state.isUserLoggedIn = true | 24 | state.isUserLoggedIn = true |
27 | } else { | 25 | } else { |
28 | state.isUserLoggedIn = false | 26 | state.isUserLoggedIn = false |
29 | } | 27 | } |
30 | }, | 28 | }, |
31 | setUser (state, data) { | 29 | setUser (state, data) { |
32 | state.data = data | 30 | state.data = data |
33 | }, | 31 | }, |
34 | User (state, userName) { | 32 | Id (state, id) { |
35 | state.userName = userName | 33 | state.id = id |
36 | }, | 34 | }, |
37 | password (state, password) { | ||
38 | state.password = password | ||
39 | }, | ||
40 | setName(state,name){ | ||
41 | state.name = name | ||
42 | } | ||
43 | }, | 35 | }, |
44 | //Action methods are referred to as being "dispatched" | 36 | //Action methods are referred to as being "dispatched" |
45 | actions: { | 37 | actions: { |
46 | setToken ({commit}, token) { | 38 | setToken ({commit}, token) { |
47 | commit('setToken', token) | 39 | commit('setToken', token) |
48 | }, | 40 | }, |
49 | setUser ({commit}, data) { | 41 | setUser ({commit}, data) { |
50 | commit('setUser', data) | 42 | commit('setUser', data) |
51 | }, | 43 | }, |
52 | User ({commit}, userName) { | 44 | Id ({commit}, id) { |
53 | commit('User', userName) | 45 | commit('Id', id) |
54 | }, | ||
55 | password ({commit}, password) { | ||
56 | commit('password', password) | ||
57 | }, | ||
58 | setName({commit},name) { | ||
59 | commit('setName',name) | ||
60 | } | 46 | } |
61 | 47 | ||
62 | } | 48 | } |
63 | 49 | ||
64 | }) | 50 | }) |