Commit 03dcbf0c1181c1fc1a1718545c221170e321dccb

Authored by Neeraj Sharma
1 parent e9818ce3a4

fix all api and responsive design

package-lock.json
... ... @@ -3743,6 +3743,11 @@
3743 3743 "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=",
3744 3744 "dev": true
3745 3745 },
  3746 + "deepmerge": {
  3747 + "version": "2.2.1",
  3748 + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.2.1.tgz",
  3749 + "integrity": "sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA=="
  3750 + },
3746 3751 "default-require-extensions": {
3747 3752 "version": "1.0.0",
3748 3753 "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-1.0.0.tgz",
... ... @@ -13643,6 +13648,11 @@
13643 13648 "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==",
13644 13649 "dev": true
13645 13650 },
  13651 + "shvl": {
  13652 + "version": "1.3.1",
  13653 + "resolved": "https://registry.npmjs.org/shvl/-/shvl-1.3.1.tgz",
  13654 + "integrity": "sha512-+rRPP46hloYUAEImJcqprUgXu+05Ikqr4h4V+w5i2zJy37nAqtkQKufs3+3S2fDq6JNRrHMIQhB/Vaex+jgAAw=="
  13655 + },
13646 13656 "sigmund": {
13647 13657 "version": "1.0.1",
13648 13658 "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
... ... @@ -15472,6 +15482,20 @@
15472 15482 "resolved": "https://registry.npmjs.org/vuetify/-/vuetify-1.1.0-alpha.5.tgz",
15473 15483 "integrity": "sha512-wrAaJ9GZNbERFoTwrEmhRvfUCBY5dyx1FSK+Bcx9M9LuH8UTFGA7tcj7hAwl756KRGu3Xt56Z00X5RPzgK75ww=="
15474 15484 },
  15485 + "vuex": {
  15486 + "version": "3.0.1",
  15487 + "resolved": "https://registry.npmjs.org/vuex/-/vuex-3.0.1.tgz",
  15488 + "integrity": "sha512-wLoqz0B7DSZtgbWL1ShIBBCjv22GV5U+vcBFox658g6V0s4wZV9P4YjCNyoHSyIBpj1f29JBoNQIqD82cR4O3w=="
  15489 + },
  15490 + "vuex-persistedstate": {
  15491 + "version": "2.5.4",
  15492 + "resolved": "https://registry.npmjs.org/vuex-persistedstate/-/vuex-persistedstate-2.5.4.tgz",
  15493 + "integrity": "sha512-XYJhKIwO+ZVlTaXyxKxnplrJ88Fnvk5aDw753bxzRw5/yMKLQ6lq9CDCBex2fwZaQcLibhtgJOxGCHjy9GLSlQ==",
  15494 + "requires": {
  15495 + "deepmerge": "^2.1.0",
  15496 + "shvl": "^1.3.0"
  15497 + }
  15498 + },
15475 15499 "w3c-hr-time": {
15476 15500 "version": "1.0.1",
15477 15501 "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz",
... ...
... ... @@ -27,7 +27,9 @@
27 27 "vue-quill-editor": "^3.0.6",
28 28 "vue-resize": "^0.4.4",
29 29 "vue-router": "^3.0.1",
30   - "vuetify": "^1.1.0-alpha.5"
  30 + "vuetify": "^1.1.0-alpha.5",
  31 + "vuex": "^3.0.1",
  32 + "vuex-persistedstate": "^2.5.4"
31 33 },
32 34 "devDependencies": {
33 35 "autoprefixer": "^7.1.2",
... ...
src/Services/http.js
... ... @@ -0,0 +1,11 @@
  1 +import axios from 'axios'
  2 +import store from '@/store/store'
  3 +
  4 +export default () => {
  5 + return axios.create({
  6 + baseURL:'http://18.208.28.55:3000/v1',
  7 + headers: {
  8 + Authorization: `Bearer ${store.state.token}`
  9 + }
  10 + })
  11 +}
... ...
... ... @@ -24,26 +24,26 @@ const Menu = [
24 24 title: 'User',
25 25 // group: '',
26 26 name: 'Dashboard',
27   - icon: '',
  27 + icon: 'face',
28 28 },
29 29  
30 30 {
31 31 title: 'Health Care Provider',
32 32 // group: 'apps',
33 33 name: 'Provider',
34   - icon: '',
  34 + icon: 'local_hospital',
35 35 },
36 36 {
37 37 title: 'Notification',
38 38 // group: 'apps',
39 39 name: 'notification',
40   - icon: '',
  40 + icon: 'add_alert',
41 41 },
42 42 {
43 43 title: 'Forum Questions',
44 44 // group: 'apps',
45 45 name: 'questions',
46   - icon: '',
  46 + icon: 'live_help',
47 47 },
48 48 // {
49 49 // title: 'Widgets',
... ...
src/components/AppDrawer.vue
... ... @@ -11,7 +11,6 @@
11 11 <v-toolbar color="grey lighten" >
12 12 <img v-bind:src="computeLogo" height="36" alt="ana">
13 13 <v-toolbar-title class="ml-0 pl-3">
14   - <!-- <span class="hidden-sm-and-down">Vue Material</span>-->
15 14 </v-toolbar-title>
16 15 </v-toolbar>
17 16 <vue-perfect-scrollbar class="drawer-menu--scroll" :settings="scrollSettings">
... ... @@ -135,5 +134,21 @@ export default {
135 134 .drawer-menu--scroll
136 135 height: calc(100vh - 48px)
137 136 overflow: auto
138   -
  137 +.v-list--dense .v-list__tile:not(.v-list__tile--avatar) {
  138 + height: 60px;
  139 + font-size:17px;
  140 +}
  141 +.v-list__tile__action {
  142 + min-width:36px;
  143 +}
  144 +.v-list__tile.primary--text {
  145 + color:black !important;
  146 + border-left: 4px solid black;
  147 + border-radius: 4px;
  148 +}
  149 +@media screen and (max-width: 420px) {
  150 +.v-list--dense .v-list__tile:not(.v-list__tile--avatar) {
  151 + font-size: 14px;
  152 +}
  153 +}
139 154 </style>
... ...
src/components/AppToolbar.vue
... ... @@ -4,9 +4,9 @@
4 4 fixed
5 5 app
6 6 >
7   - <!-- <v-toolbar-title class="ml-0 pl-3">
8   - <v-toolbar-side-icon @click.stop="handleDrawerToggle"></v-toolbar-side-icon>
9   - </v-toolbar-title> -->
  7 + <v-toolbar-title class="ml-0 pl-3">
  8 + <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon>
  9 + </v-toolbar-title>
10 10 <!-- <v-text-field
11 11 flat
12 12 prepend-icon="search"
... ... @@ -22,7 +22,6 @@
22 22 <v-btn icon large flat slot="activator">
23 23 <v-avatar size="40px">
24 24 <img src="/static/icon/user.png"/>
25   -
26 25 </v-avatar>
27 26 </v-btn>
28 27 <v-list class="pa-0">
... ... @@ -39,22 +38,22 @@
39 38 </v-toolbar>
40 39 </template>
41 40 <script>
42   -import NotificationList from '@/components/widgets/list/NotificationList';
43   -import Util from '@/util';
  41 +import NotificationList from "@/components/widgets/list/NotificationList";
  42 +import Util from "@/util";
44 43 export default {
45   - search: '',
46   - name: 'app-toolbar',
  44 + search: "",
  45 + name: "app-toolbar",
47 46 components: {
48 47 NotificationList
49 48 },
50 49 data: () => ({
51   - search: '',
  50 + search: "",
52 51 items: [
53 52 {
54 53 // icon: 'account_circle',
55   - href: '/changepassword',
56   - title: 'Change Password',
57   - click: (e) => {
  54 + href: "/changepassword",
  55 + title: "Change Password",
  56 + click: e => {
58 57 console.log(e);
59 58 }
60 59 },
... ... @@ -68,26 +67,43 @@ export default {
68 67 // },
69 68 {
70 69 // icon: 'fullscreen_exit',
71   - href: '#',
72   - title: 'Logout',
73   - click: (e) => {
74   - window.getApp.$emit('APP_LOGOUT');
  70 + href: "#",
  71 + title: "Logout",
  72 + click: e => {
  73 + window.getApp.$emit("APP_LOGOUT");
  74 + // this.$store.dispatch("setToken", null);
75 75 }
76 76 }
77   - ],
  77 + ]
78 78 }),
79 79 computed: {
80   - toolbarColor () {
  80 + toolbarColor() {
81 81 return this.$vuetify.options.extra.mainNav;
82 82 }
83 83 },
84 84 methods: {
85   - handleDrawerToggle () {
86   - window.getApp.$emit('APP_DRAWER_TOGGLED');
  85 + handleDrawerToggle() {
  86 + window.getApp.$emit("APP_DRAWER_TOGGLED");
87 87 },
88   - handleFullScreen () {
  88 + handleFullScreen() {
89 89 Util.toggleFullScreen();
90 90 }
91 91 }
92 92 };
93 93 </script>
  94 +<style>
  95 +.v-icon{
  96 + font-size:30px;
  97 +}
  98 +@media screen and (min-width: 1270px){
  99 +.hide{
  100 + display: none;
  101 +}
  102 +}
  103 +@media screen and (max-width: 420px) {
  104 +.v-list__tile {
  105 + font-size:14px;
  106 + padding: 0 10px;
  107 +}
  108 +}
  109 +</style>
... ...
src/components/ThemeSettings.vue
1   -<template>
  1 +<!--<template>
2 2 <div id="themeSetting">
3 3 <v-toolbar color="blue" dark>
4 4 <v-toolbar-title>
... ... @@ -49,157 +49,157 @@
49 49 </template>
50 50  
51 51 <script>
52   -import colors from 'vuetify/es5/util/colors';
53   -export default {
54   - data () {
55   - return {
56   - themeColor: 'indigo',
57   - sideBarOption: 'light',
58   - colors: colors
59   - };
60   - },
61   - computed: {
62   - themeColorOptions () {
63   - return [
64   - {
65   - key: 'blue',
66   - value: {
67   - sideNav: 'blue',
68   - mainNav: 'blue',
69   - sideManu: 'white'
70   - }
71   - },
72   - // {
73   - // key: 'lightBlue',
74   - // value: {
75   - // sideNav: 'blue',
76   - // mainNav: 'white',
77   - // sideManu: 'blue lighten-1'
78   - // }
79   - // },
80   - {
81   - key: 'teal',
82   - value: {
83   - sideNav: 'teal',
84   - mainNav: 'teal',
85   - sideManu: 'white'
86   - }
87   - },
88   - {
89   - key: 'red',
90   - value: {
91   - sideNav: 'red',
92   - mainNav: 'red',
93   - sideManu: 'white'
94   - }
95   - },
96   - {
97   - key: 'orange',
98   - value: {
99   - sideNav: 'orange',
100   - mainNav: 'orange',
101   - sideManu: 'white'
102   - }
103   - },
104   - {
105   - key: 'purple',
106   - value: {
107   - sideNav: 'purple',
108   - mainNav: 'purple',
109   - sideManu: 'white'
110   - }
111   - },
112   - {
113   - key: 'indigo',
114   - value: {
115   - sideNav: 'indigo',
116   - mainNav: 'indigo',
117   - sideManu: 'white'
118   - }
119   - },
120   - {
121   - key: 'cyan',
122   - value: {
123   - sideNav: 'cyan',
124   - mainNav: 'cyan',
125   - sideManu: 'white'
126   - }
127   - },
128   - {
129   - key: 'pink',
130   - value: {
131   - sideNav: 'pink',
132   - mainNav: 'pink',
133   - sideManu: 'white'
134   - }
135   - },
136   - {
137   - key: 'green',
138   - value: {
139   - sideNav: 'green',
140   - mainNav: 'green',
141   - sideManu: 'white'
142   - }
143   - }
144   - ];
145   - }
146   - },
147   - watch: {
148   - themeColor: {
149   - handler (val) {
150   - this.$vuetify.theme.primary = this.colors[val].base;
  52 +// import colors from 'vuetify/es5/util/colors';
  53 +// export default {
  54 +// data () {
  55 +// return {
  56 +// themeColor: 'indigo',
  57 +// sideBarOption: 'light',
  58 +// colors: colors
  59 +// };
  60 +// },
  61 +// computed: {
  62 +// themeColorOptions () {
  63 +// return [
  64 +// {
  65 +// key: 'blue',
  66 +// value: {
  67 +// sideNav: 'blue',
  68 +// mainNav: 'blue',
  69 +// sideManu: 'white'
  70 +// }
  71 +// },
  72 +// // {
  73 +// // key: 'lightBlue',
  74 +// // value: {
  75 +// // sideNav: 'blue',
  76 +// // mainNav: 'white',
  77 +// // sideManu: 'blue lighten-1'
  78 +// // }
  79 +// // },
  80 +// {
  81 +// key: 'teal',
  82 +// value: {
  83 +// sideNav: 'teal',
  84 +// mainNav: 'teal',
  85 +// sideManu: 'white'
  86 +// }
  87 +// },
  88 +// {
  89 +// key: 'red',
  90 +// value: {
  91 +// sideNav: 'red',
  92 +// mainNav: 'red',
  93 +// sideManu: 'white'
  94 +// }
  95 +// },
  96 +// {
  97 +// key: 'orange',
  98 +// value: {
  99 +// sideNav: 'orange',
  100 +// mainNav: 'orange',
  101 +// sideManu: 'white'
  102 +// }
  103 +// },
  104 +// {
  105 +// key: 'purple',
  106 +// value: {
  107 +// sideNav: 'purple',
  108 +// mainNav: 'purple',
  109 +// sideManu: 'white'
  110 +// }
  111 +// },
  112 +// {
  113 +// key: 'indigo',
  114 +// value: {
  115 +// sideNav: 'indigo',
  116 +// mainNav: 'indigo',
  117 +// sideManu: 'white'
  118 +// }
  119 +// },
  120 +// {
  121 +// key: 'cyan',
  122 +// value: {
  123 +// sideNav: 'cyan',
  124 +// mainNav: 'cyan',
  125 +// sideManu: 'white'
  126 +// }
  127 +// },
  128 +// {
  129 +// key: 'pink',
  130 +// value: {
  131 +// sideNav: 'pink',
  132 +// mainNav: 'pink',
  133 +// sideManu: 'white'
  134 +// }
  135 +// },
  136 +// {
  137 +// key: 'green',
  138 +// value: {
  139 +// sideNav: 'green',
  140 +// mainNav: 'green',
  141 +// sideManu: 'white'
  142 +// }
  143 +// }
  144 +// ];
  145 +// }
  146 +// },
  147 +// watch: {
  148 +// themeColor: {
  149 +// handler (val) {
  150 +// this.$vuetify.theme.primary = this.colors[val].base;
151 151  
152   - },
153   - immediate: true
154   - },
155   - sideBarOption: {
156   - handler (val) {
157   - this.$vuetify.dark = (val === 'dark');
158   - },
159   - immediate: true
160   - }
161   - },
  152 +// },
  153 +// immediate: true
  154 +// },
  155 +// sideBarOption: {
  156 +// handler (val) {
  157 +// this.$vuetify.dark = (val === 'dark');
  158 +// },
  159 +// immediate: true
  160 +// }
  161 +// },
162 162  
163   -};
164   -</script>
165   -<style lang="stylus" scoped>
166   -.color-option
167   - &--label
168   - position: relative
169   - display: block
170   - cursor: pointer
171   - & input[type="radio"]
172   - display:none
173   - &+span
174   - position: relative
175   - &>.overlay
176   - display: none;
177   - position: absolute
178   - top: 0;
179   - bottom: 0;
180   - right: 0;
181   - left: 0;
182   - width: 100%;
183   - height: 100%;
184   - background-color: rgba(0,0,0,.3);
185   - text-align: center;
186   - line-height: 30px;
187   - color: #fff;
188   - &:checked+span>.overlay
189   - display:block
190   - & .bg
191   - background-color: #f1f1f1
192   - &--item
193   - overflow: hidden;
194   - display: block;
195   - box-shadow: 0 0 2px rgba(0,0,0,.1);
196   - margin-bottom: 15px;
197   - &--header
198   - height: 10px
199   - &>span
200   - display: block;
201   - float: left;
202   - width: 50%;
203   - height: 20px;
204   -</style>
  163 +// };
  164 +// </script>
  165 +// <style lang="stylus" scoped>
  166 +// .color-option
  167 +// &--label
  168 +// position: relative
  169 +// display: block
  170 +// cursor: pointer
  171 +// & input[type="radio"]
  172 +// display:none
  173 +// &+span
  174 +// position: relative
  175 +// &>.overlay
  176 +// display: none;
  177 +// position: absolute
  178 +// top: 0;
  179 +// bottom: 0;
  180 +// right: 0;
  181 +// left: 0;
  182 +// width: 100%;
  183 +// height: 100%;
  184 +// background-color: rgba(0,0,0,.3);
  185 +// text-align: center;
  186 +// line-height: 30px;
  187 +// color: #fff;
  188 +// &:checked+span>.overlay
  189 +// display:block
  190 +// & .bg
  191 +// background-color: #f1f1f1
  192 +// &--item
  193 +// overflow: hidden;
  194 +// display: block;
  195 +// box-shadow: 0 0 2px rgba(0,0,0,.1);
  196 +// margin-bottom: 15px;
  197 +// &--header
  198 +// height: 10px
  199 +// &>span
  200 +// display: block;
  201 +// float: left;
  202 +// width: 50%;
  203 +// height: 20px;
  204 +// </style>
205 205  
... ...
... ... @@ -13,6 +13,7 @@ export default [
13 13 color: 'green',
14 14 text: 'Logout successfully.'
15 15 };
  16 + this.$store.dispatch('setToken', null)
16 17 this.$router.replace({ path: '/' });
17 18 }
18 19 },
... ...
... ... @@ -10,8 +10,13 @@ import VeeValidate from &#39;vee-validate&#39;;
10 10 import colors from 'vuetify/es5/util/colors';
11 11 import Truncate from 'lodash.truncate';
12 12 Vue.config.productionTip = false;
  13 +// import axios from 'axios';
  14 +// import VueAxios from 'vue-axios';
  15 +import store from '@/store/store'
  16 +
13 17 // Helpers
14 18 // Global filters
  19 +// Vue.use(VueAxios, axios);
15 20 Vue.filter('truncate', Truncate);
16 21 Vue.use(VeeValidate, { fieldsBagName: 'formFields' });
17 22 Vue.use(Vuetify, {
... ... @@ -42,6 +47,7 @@ Vue.use(Vuetify, {
42 47 new Vue({
43 48 el: '#app',
44 49 router,
  50 + store,
45 51 components: { App },
46 52 template: '<App/>'
47 53 });
... ...
src/pages/Dashboard.vue
1 1 <template>
2   -<v-tabs
3   - grow
4   - slider-color="black"
5   ->
6   -
7   - <v-tab ripple @click="activeTab('existing')" v-bind:class="{ active: isActive }" id="tab">
8   - Existing user
9   - </v-tab>
10   -
11   - <v-tab ripple @click="activeTab('new')" v-bind:class="{ active: newActive }" id="tab1">
12   - Add New Users
13   - </v-tab>
14   -
15   - <v-tab-item>
16   - <v-dialog v-model="dialog" max-width="500px">
17   - <v-toolbar color="white">
18   - <v-spacer></v-spacer>
19   - <v-toolbar-title>Edit Profile</v-toolbar-title>
20   - <v-spacer></v-spacer>
21   - </v-toolbar>
22   - <v-card>
23   - <v-flex align-center justify-center layout text-xs-center>
24   - <v-avatar size="50px" style="position:absolute; top:10px; ">
25   - <img src="/static/icon/user.png"/></v-avatar>
26   - </v-flex>
  2 +<v-app id="pages-dasboard">
  3 + <v-tabs grow slider-color="black">
  4 + <v-tab
  5 + ripple
  6 + @click="activeTab('existing')"
  7 + v-bind:class="{ active: isActive }"
  8 + id="tab"
  9 + class="subheading"
  10 + >Existing user</v-tab>
  11 + <v-tab
  12 + ripple
  13 + @click="activeTab('new')"
  14 + v-bind:class="{ active: newActive }"
  15 + id="tab1"
  16 + class="subheading"
  17 + >Add New Users</v-tab>
  18 + <!-- EDIT USERS Patient Dtails-->
  19 + <v-tab-item>
  20 + <v-snackbar
  21 + :timeout="timeout"
  22 + :top="y === 'top'"
  23 + :right="x === 'right'"
  24 + :vertical="mode === 'vertical'"
  25 + v-model="snackbar"
  26 + color="success"
  27 + >{{ text }}</v-snackbar>
  28 + <v-dialog v-model="dialog" max-width="500px">
  29 + <v-toolbar color="white">
  30 + <v-spacer></v-spacer>
  31 + <v-toolbar-title>Edit Profile</v-toolbar-title>
  32 + <v-spacer></v-spacer>
  33 + </v-toolbar>
  34 + <v-card>
  35 + <v-flex align-center justify-center layout text-xs-center>
  36 + <v-avatar size="50px" style="position:absolute; top:10px; ">
  37 + <img src="/static/icon/user.png">
  38 + </v-avatar>
  39 + </v-flex>
27 40 <v-card-text>
28   - <v-container>
29   - <v-layout wrap justify-center>
30   - <v-flex xs12 sm9>
31   - <v-form ref="form" v-model="valid" lazy-validation>
32   -
33   - <v-layout style="position:relative; top:15px;">
34   - <v-flex xs4 class="pt-4 subheading">
35   - <label>First Name: </label>
36   - </v-flex>
37   - <v-flex xs8>
38   - <v-text-field
39   - v-model="editedItem.Name"
40   - v-validate="'required'"
41   - :rules="nameRules"
42   - data-vv-name="Name"
43   - required
44   - ></v-text-field></v-flex></v-layout>
45   - <v-layout>
46   - <v-flex xs4 class="pt-4 subheading">
47   - <label>Last Name: </label>
48   - </v-flex>
49   - <v-flex xs8>
50   - <v-text-field
51   - v-model="editedItem.LName"
52   - v-validate="'required'"
53   - :rules="lnameRules"
54   - data-vv-name="Name"
55   - required
56   - ></v-text-field></v-flex></v-layout>
57   -
58   - <v-layout>
59   - <v-flex xs4 class="pt-4 subheading">
60   - <label>Email ID: </label>
61   - </v-flex>
62   - <v-flex xs8>
63   - <v-text-field
64   - v-model="editedItem.Email"
65   - v-validate="'required|email'"
66   - :rules="emailRules"
67   - data-vv-name="E-mail"
68   - required
69   - ></v-text-field></v-flex></v-layout>
70   - <v-layout>
71   - <v-flex xs4 class="pt-4 subheading">
72   - <label>Date of Birth: </label>
73   - </v-flex>
74   - <v-flex xs8>
75   - <v-text-field
76   - v-model="editedItem.DOB"
77   - :rules="[rules.required, rules.min]"
78   - ></v-text-field></v-flex></v-layout>
79   - <v-card-actions>
  41 + <v-container>
  42 + <v-layout wrap justify-center>
  43 + <v-flex xs12 sm9>
  44 + <v-form ref="form" v-model="valid" lazy-validation>
  45 + <v-layout style="position:relative; top:15px;">
  46 + <v-flex xs4 date: new Date().toISOString().substr(0, 10), class="pt-4 subheading">
  47 + <label>First Name:</label>
  48 + </v-flex>
  49 + <v-flex xs8>
  50 + <v-text-field
  51 + v-model="editedItem.name"
  52 + v-validate="'required'"
  53 + :rules="nameRules"
  54 + data-vv-name="Name"
  55 + required
  56 + ></v-text-field>
  57 + </v-flex>
  58 + </v-layout>
  59 + <v-layout>
  60 + <v-flex xs4 class="pt-4 subheading">
  61 + <label>Last Name:</label>
  62 + </v-flex>
  63 + <v-flex xs8>
  64 + <v-text-field
  65 + v-model="editedItem.lastname"
  66 + v-validate="'required'"
  67 + :rules="lastnameRules"
  68 + data-vv-name="Name"
  69 + required
  70 + ></v-text-field>
  71 + </v-flex>
  72 + </v-layout>
80 73  
81   - <v-btn round dark @click.native="close">Cancel</v-btn>
82   - <v-spacer></v-spacer>
83   - <v-btn round dark @click.native="save">Save</v-btn>
84   -
85   - </v-card-actions>
86   - </v-form>
87   - </v-flex>
88   -</v-layout>
89   -</v-container>
90   -</v-card-text>
91   -</v-card>
92   -</v-dialog>
93   -
94   -<v-dialog v-model="dialog1" max-width="500px">
95   - <v-toolbar color="white">
96   - <v-spacer></v-spacer>
97   - <v-toolbar-title>Profile</v-toolbar-title>
98   - <v-spacer></v-spacer>
99   - <v-icon @click="close1">close</v-icon>
100   - </v-toolbar>
101   -
102   -
103   - <v-card>
104   - <v-flex align-center justify-center layout text-xs-center>
105   - <v-avatar size="50px" style="position:absolute; top:20px;">
106   - <img src="/static/icon/user.png"/> </v-avatar>
107   - </v-flex>
108   - <v-card-text>
109   - <v-container grid-list-md>
110   - <v-layout wrap justify-center>
111   - <v-flex offset-xs3 id="flex">
112   -
113   - <br><br>
114   - <table style="position:absolute; top:110px;">
115   - <th>
116   - <tr><h5><b>First Name:</b></h5></tr><br>
117   - <tr><h5><b>Last Name:</b></h5></tr><br>
118   - <tr><h5><b>Email:</b></h5></tr><br>
119   - <tr><h5><b>Date Of Birth:</b></h5></tr>
120   - </th>
121   - <th>
122   - <tr><td><h5><b>{{ editedItem.Name }}</b></h5></td></tr><br>
123   - <tr> <td><h5><b>{{ editedItem.LName }}</b></h5></td></tr><br>
124   - <tr><td><h5><b>{{ editedItem.Email }}</b></h5></td></tr><br>
125   - <tr><td><h5><b>{{ editedItem.DOB }}</b></h5></td></tr>
126   - </th>
127   -
128   -
129   - </table>
130   - </v-flex>
131   - </v-layout>
132   - </v-container>
133   - </v-card-text>
134   - </v-card>
135   -</v-dialog>
  74 + <v-layout>
  75 + <v-flex xs4 class="pt-4 subheading">
  76 + <label>Email ID:</label>
  77 + </v-flex>
  78 + <v-flex xs8>
  79 + <v-text-field
  80 + v-model="editedItem.email"
  81 + v-validate="'required|email'"
  82 + :rules="emailRules"
  83 + data-vv-name="E-mail"
  84 + required
  85 + ></v-text-field>
  86 + </v-flex>
  87 + </v-layout>
  88 + <v-layout>
  89 + <v-flex xs4 class="pt-4 subheading">
  90 + <label>Date of Birth:</label>
  91 + </v-flex>
  92 + <v-flex xs8>
  93 + <v-menu
  94 + :close-on-content-click="false"
  95 + v-model="modaledit"
  96 + :nudge-right="20"
  97 + lazy
  98 + transition="scale-transition"
  99 + persistent
  100 + full-width
  101 + max-width="290px"
  102 + >
  103 + <v-text-field
  104 + slot="activator"
  105 + v-model="editedItem.dob.slice(0,10)"
  106 + name="dob"
  107 + ></v-text-field>
  108 + <v-date-picker v-model="editedItem.dob" @input="modaledit = false"></v-date-picker>
  109 + </v-menu>
  110 + </v-flex>
  111 + </v-layout>
  112 + <v-card-actions>
  113 + <v-btn round dark @click.native="close">Cancel</v-btn>
  114 + <v-spacer></v-spacer>
  115 + <v-btn round dark @click="save">Save</v-btn>
  116 + </v-card-actions>
  117 + </v-form>
  118 + </v-flex>
  119 + </v-layout>
  120 + </v-container>
  121 + </v-card-text>
  122 + </v-card>
  123 + </v-dialog>
136 124  
137   -<v-dialog v-model="dialog2" width="700px">
138   - <v-card>
139   - <div id="dialog">
140   - <h4><b> Report </b> </h4>
141   - <h5 id="name"><b>Patient Name:</b> {{ editedItem.Name+' '+editedItem.LName }}</h5>
142   - <h5 id="m">Select Month:</h5>
143   - <v-btn color="grey darken-3" id="G" v-on:click="component='report-generate'">Generate</v-btn>
144   - <v-spacer></v-spacer>
145   - <v-icon id="icon" @click="close2">close</v-icon>
146   -
147   - <span id="bt">
148   -
149   - <v-btn color="grey darken-2" v-on:click="component='one-month' , activebtn('existing')" v-bind:class="{ activebtn: isActivebtn }" flat>1 month</v-btn>
150   - <v-btn color="grey darken-2" v-on:click="component='three-month' , activebtn('new')" v-bind:class="{ activebtn: Activebtn1 }" flat>3 Month</v-btn>
151   - <v-btn color="grey darken-2" v-on:click="component='six-month' , activebtn('new1')" v-bind:class="{ activebtn: Activebtn2 }" flat>6 Month</v-btn>
152   - <v-btn color="grey darken-2" v-on:click="component='nine-month' , activebtn('new2')" v-bind:class="{ activebtn: Activebtn3 }" flat>9 Month</v-btn>
153   - <img id="e" @click="mail" src="/static/icon/email1.png"/>
154   - <img id="d" @click="download" src="/static/icon/download1.png"/>
155   - </span>
156   - <component v-bind:is="component"></component>
  125 + <!-- PROFILE VIEW pateints Details-->
  126 + <v-dialog v-model="dialog1" max-width="600px">
  127 + <v-toolbar color="white">
  128 + <v-spacer></v-spacer>
  129 + <v-toolbar-title>Profile</v-toolbar-title>
  130 + <v-spacer></v-spacer>
  131 + <v-icon @click="close1">close</v-icon>
  132 + </v-toolbar>
  133 + <v-card>
  134 + <v-flex align-center justify-center layout text-xs-center>
  135 + <v-avatar size="50px" style="position:absolute; top:20px;">
  136 + <img src="/static/icon/user.png">
  137 + </v-avatar>
  138 + </v-flex>
  139 + <v-card-text>
  140 + <v-container grid-list-md>
  141 + <v-layout wrap>
  142 + <v-flex><br><br>
  143 + <v-layout>
  144 + <v-flex xs5 sm6>
  145 + <h5 class="right">First Name:</h5>
  146 + </v-flex>
  147 + <v-flex sm6 xs8>
  148 + <h5>{{ editedItem.name }}</h5>
  149 + </v-flex>
  150 + </v-layout>
  151 + <v-layout>
  152 + <v-flex xs5 sm6>
  153 + <h5 class="right my-3">Last Name:</h5>
  154 + </v-flex>
  155 + <v-flex sm5 xs8>
  156 + <h5 class="my-3">{{ editedItem.name }}</h5>
  157 + </v-flex>
  158 + </v-layout>
  159 + <v-layout>
  160 + <v-flex xs5 sm6>
  161 + <h5 class="right">Email:</h5>
  162 + </v-flex>
  163 + <v-flex sm6 xs8>
  164 + <h5>{{ editedItem.email }}</h5>
  165 + </v-flex>
  166 + </v-layout>
  167 + <v-layout>
  168 + <v-flex xs6 sm6 >
  169 + <h5 class="right my-3">Date Of Birth:</h5>
  170 + </v-flex>
  171 + <v-flex sm6 xs8>
  172 + <h5 class="my-3">{{ editedItem.dob }}</h5>
  173 + </v-flex>
  174 + </v-layout>
  175 + </v-flex>
  176 + </v-layout>
  177 + </v-container>
  178 + </v-card-text>
  179 + </v-card>
  180 + </v-dialog>
157 181  
158   -
159   - </div>
160   - </v-card>
161   -</v-dialog>
  182 + <v-dialog v-model="dialog2" width="700px">
  183 + <v-card>
  184 + <div id="dialog">
  185 + <h4>
  186 + <b>Report</b>
  187 + </h4>
  188 + <h5 id="name">
  189 + <b>Patient Name:</b>
  190 + {{ editedItem.name+' '+editedItem.lastName }}
  191 + </h5>
  192 + <h5 id="m">Select Month:</h5>
  193 + <v-btn color="grey darken-3" id="G" v-on:click="component='report-generate'">Generate</v-btn>
  194 + <v-spacer></v-spacer>
  195 + <v-icon id="icon" @click="close2">close</v-icon>
162 196  
163   - <v-data-table
164   - :headers="headers"
165   - :items="desserts"
166   - :pagination.sync="pagination"
  197 + <span id="bt">
  198 + <v-btn
  199 + color="grey darken-2"
  200 + v-on:click="component='one-month' , activebtn('existing')"
  201 + v-bind:class="{ activebtn: isActivebtn }"
  202 + flat
  203 + >1 month</v-btn>
  204 + <v-btn
  205 + color="grey darken-2"
  206 + v-on:click="component='three-month' , activebtn('new')"
  207 + v-bind:class="{ activebtn: Activebtn1 }"
  208 + flat
  209 + >3 Month</v-btn>
  210 + <v-btn
  211 + color="grey darken-2"
  212 + v-on:click="component='six-month' , activebtn('new1')"
  213 + v-bind:class="{ activebtn: Activebtn2 }"
  214 + flat
  215 + >6 Month</v-btn>
  216 + <v-btn
  217 + color="grey darken-2"
  218 + v-on:click="component='nine-month' , activebtn('new2')"
  219 + v-bind:class="{ activebtn: Activebtn3 }"
  220 + flat
  221 + >9 Month</v-btn>
  222 + <img id="e" @click="mail" src="/static/icon/email1.png">
  223 + <img id="d" @click="download" src="/static/icon/download1.png">
  224 + </span>
  225 + <component v-bind:is="component"></component>
  226 + </div>
  227 + </v-card>
  228 + </v-dialog>
  229 + <v-snackbar
  230 + :timeout="timeout"
  231 + :top="y === 'top'"
  232 + :right="x === 'right'"
  233 + :vertical="mode === 'vertical'"
  234 + v-model="snackbar"
  235 + color="success"
  236 + >{{ text }}</v-snackbar>
  237 + <!-- EXISTING-USERS PatientList-->
  238 + <v-data-table
  239 + :headers="headers"
  240 + :items="desserts"
  241 + :pagination.sync="pagination"
167 242 >
168 243 <template slot="items" slot-scope="props">
169   - <td id="td" class="text-xs-center">{{ props.item.No }}</td>
170   - <td id="td" class="text-xs-center">{{ props.item.Name+' '+props.item.LName }}</td>
171   - <td id="td" class="text-xs-center">{{ props.item.Email }}</td>
172   -
173   -
  244 + <td id="td" class="text-xs-center">{{ props.index}}</td>
  245 + <td id="td" class="text-xs-center">{{ props.item.name}}</td>
  246 + <td id="td" class="text-xs-center">{{ props.item.email }}</td>
  247 +
174 248 <td class="text-xs-center">
175   -
176   - <span>
177   - <img style="cursor:pointer; height:20px; " class="mr-5" @click="report(props.item)" src="/static/icon/List1.png"/>
178   - <img style="cursor:pointer; width:25px; height:18px; " class="mr-5" @click="profile(props.item)" src="/static/icon/eye1.png"/>
179   - <img style="cursor:pointer; width:20px; height:18px; " class="mr-5" @click="editItem(props.item)" src="/static/icon/edit1.png"/>
180   - <img style="cursor:pointer; height:20px; " class="mr-2" @click="deleteItem(props.item)" src="/static/icon/delete1.png"/>
181   - </span>
  249 + <span>
  250 + <img
  251 + style="cursor:pointer; height:20px; "
  252 + class="mr-5"
  253 + @click="report(props.item)"
  254 + src="/static/icon/List1.png"
  255 + >
  256 + <img
  257 + style="cursor:pointer; width:25px; height:18px; "
  258 + class="mr-5"
  259 + @click="profile(props.item)"
  260 + src="/static/icon/eye1.png"
  261 + >
  262 + <img
  263 + style="cursor:pointer; width:20px; height:18px; "
  264 + class="mr-5"
  265 + @click="editItem(props.item)"
  266 + src="/static/icon/edit1.png"
  267 + >
  268 + <img
  269 + style="cursor:pointer; height:20px; "
  270 + class="mr-5"
  271 + @click="deleteItem(props.item)"
  272 + src="/static/icon/delete1.png"
  273 + >
  274 + </span>
182 275 </td>
183   -
184 276 </template>
185   -
186 277 </v-data-table>
187   - </v-tab-item>
188   - <v-tab-item>
189   - <v-flex xs12 sm6 offset-sm3>
190   -
191   -
192   -<v-card flat>
193   - <v-container fluid fill-height>
194   - <v-layout align-center>
195   - <v-flex xs12 sm8 offset-sm2>
196   - <v-flex offset-sm5>
197   - <v-avatar size="55px">
198   - <img src="/static/icon/user.png"/> </v-avatar>
199   - </v-flex>
200   -<v-form ref="form" v-model="valid" lazy-validation>
201   - <v-layout>
202   - <v-flex xs4 class="pt-4 subheading">
203   - <label>First Name: </label>
204   - </v-flex>
205   - <v-flex xs8>
206   - <v-text-field
207   - v-model="AddUsercredentials.firstName"
208   - :rules="nameRules"
209   - required
210   - ></v-text-field>
211   - </v-flex>
212   - </v-layout>
213   - <v-layout>
214   - <v-flex xs4 class="pt-4 subheading">
215   - <label>Last Name: </label>
216   - </v-flex>
217   - <v-flex xs8>
218   - <v-text-field
219   - :rules="lnameRules"
220   - v-model="AddUsercredentials.lastName"
221   - required
222   - ></v-text-field>
223   - </v-flex>
224   - </v-layout>
225   - <v-layout>
226   - <v-flex xs4 class="pt-4 subheading">
227   - <label>Email ID: </label>
228   - </v-flex>
229   - <v-flex xs8>
230   - <v-text-field
231   - :rules="emailRules"
232   - v-model="AddUsercredentials.email"
233   - required
234   - ></v-text-field>
235   - </v-flex>
236   - </v-layout>
237   -
238   - <v-layout>
239   - <v-flex xs4 class="pt-4 subheading">
240   - <label>Date of Birth: </label>
241   - </v-flex>
242   - <v-flex xs8>
243   - <v-text-field
244   - :rules="[rules.required, rules.min]"
245   - v-model="AddUsercredentials.dob"
246   - required
247   - ></v-text-field>
248   - </v-flex>
249   - </v-layout>
250   - <v-card-actions>
251   - <v-btn @click="clear" round dark>clear</v-btn>
252   - <v-spacer></v-spacer>
253   - <v-btn @click="submit" round dark> Add </v-btn>
254   -
255   -</v-card-actions>
256   - </v-form>
257   -</v-flex>
258   -</v-layout>
259   -</v-container>
260   - </v-card>
261   - </v-flex>
262   - </v-tab-item>
263   -</v-tabs>
  278 + </v-tab-item>
  279 + <!-- ADD USER PATIENT -->
  280 + <v-tab-item>
  281 + <v-snackbar
  282 + :timeout="timeout"
  283 + :top="y === 'top'"
  284 + :right="x === 'right'"
  285 + :vertical="mode === 'vertical'"
  286 + v-model="snackbar"
  287 + color="success"
  288 + >{{ text }}</v-snackbar>
  289 + <v-container>
  290 + <v-flex xs12 sm8 offset-sm2 class="top">
  291 + <v-card flat>
  292 + <v-container fluid fill-height>
  293 + <v-layout align-center>
  294 + <v-flex xs12>
  295 + <v-flex offset-xs5>
  296 + <v-avatar size="55px">
  297 + <img src="/static/icon/user.png">
  298 + </v-avatar>
  299 + </v-flex>
  300 + <v-form ref="form" v-model="valid" lazy-validation>
  301 + <v-layout>
  302 + <v-flex xs4 class="pt-4 subheading">
  303 + <label class="right">First Name:</label>
  304 + </v-flex>
  305 + <v-flex xs6 class="ml-3">
  306 + <v-text-field
  307 + v-model="editedItem.name"
  308 + name="name"
  309 + :rules="nameRules"
  310 + required
  311 + ></v-text-field>
  312 + </v-flex>
  313 + </v-layout>
  314 + <v-layout>
  315 + <v-flex xs4 class="pt-4 subheading">
  316 + <label class="right">Last Name:</label>
  317 + </v-flex>
  318 + <v-flex xs6 class="ml-3">
  319 + <v-text-field
  320 + :rules="lastnameRules"
  321 + v-model="editedItem.lastname"
  322 + name="lastname"
  323 + required
  324 + ></v-text-field>
  325 + </v-flex>
  326 + </v-layout>
  327 + <v-layout>
  328 + <v-flex xs4 class="pt-4 subheading">
  329 + <label class="right">Email ID:</label>
  330 + </v-flex>
  331 + <v-flex xs6 class="ml-3">
  332 + <v-text-field
  333 + :rules="emailRules"
  334 + v-model="editedItem.email"
  335 + name="email"
  336 + required
  337 + ></v-text-field>
  338 + </v-flex>
  339 + </v-layout>
264 340  
265   -
  341 + <v-layout>
  342 + <v-flex xs4 class="pt-4 subheading">
  343 + <label class="right">Date of Birth:</label>
  344 + </v-flex>
  345 + <v-flex xs6 class="ml-3">
  346 + <v-menu
  347 + :close-on-content-click="false"
  348 + v-model="modal"
  349 + :nudge-right="20"
  350 + lazy
  351 + transition="scale-transition"
  352 + persistent
  353 + full-width
  354 + max-width="290px"
  355 + >
  356 + <v-text-field
  357 + slot="activator"
  358 + v-model="editedItem.dob"
  359 + name="dob"
  360 + ></v-text-field>
  361 + <v-date-picker v-model="editedItem.dob" @input="modal = false"></v-date-picker>
  362 + </v-menu>
  363 + </v-flex>
  364 + </v-layout>
  365 + <v-layout>
  366 + <v-flex xs12 sm9 offset-sm2>
  367 + <v-card-actions>
  368 + <v-btn @click="clear" round dark>clear</v-btn>
  369 + <v-spacer></v-spacer>
  370 + <v-btn @click="submit" round dark :loading="loading">Add</v-btn>
  371 + </v-card-actions>
  372 + </v-flex>
  373 + </v-layout>
  374 + </v-form>
  375 + </v-flex>
  376 + </v-layout>
  377 + </v-container>
  378 + </v-card>
  379 + </v-flex>
  380 + </v-container>
  381 + </v-tab-item>
  382 + </v-tabs>
  383 +</v-app>
266 384 </template>
267 385  
268 386 <script>
269   -import onemonth from '@/components/report/onemonth.vue';
270   -import threemonth from '@/components/report/threemonth.vue';
271   -import sixmonth from '@/components/report/sixmonth.vue';
272   -import ninemonth from '@/components/report/ninemonth.vue';
273   -import generatereport from '@/components/report/generatereport.vue';
274   -import axios from 'axios';
  387 +import onemonth from "@/components/report/onemonth.vue";
  388 +import threemonth from "@/components/report/threemonth.vue";
  389 +import sixmonth from "@/components/report/sixmonth.vue";
  390 +import ninemonth from "@/components/report/ninemonth.vue";
  391 +import generatereport from "@/components/report/generatereport.vue";
  392 +import http from "@/Services/http.js";
  393 +
275 394 export default {
276 395 components: {
277   - 'one-month': onemonth,
278   - 'three-month': threemonth,
279   - 'six-month': sixmonth,
280   - 'nine-month': ninemonth,
281   - 'report-generate': generatereport,
  396 + "one-month": onemonth,
  397 + "three-month": threemonth,
  398 + "six-month": sixmonth,
  399 + "nine-month": ninemonth,
  400 + "report-generate": generatereport
282 401 },
283 402 data: () => ({
284   - component: 'report-generate',
285   - No: '',
286   - Name: '',
287   - LName: '',
288   - Email: '',
289   - DOB: '',
290   - search: '',
291   - firstName: '',
292   - lastName: '',
293   - email: '',
294   - dob: '',
  403 + component: "report-generate",
  404 + snackbar: false,
  405 + y: "top",
  406 + x: "right",
  407 + mode: "",
  408 + timeout: 3000,
  409 + text: "",
  410 + loading: false,
  411 + search: "",
  412 + modal: false,
  413 + modaledit:false,
295 414 dialog: false,
296 415 dialog1: false,
297 416 dialog2: false,
... ... @@ -307,65 +426,53 @@ export default {
307 426 loading2: false,
308 427 loading3: false,
309 428 loading4: false,
310   -
  429 + details: [],
311 430 AddUsercredentials: {},
312 431 pagination: {
313   - rowsPerPage: 10
  432 + rowsPerPage: 15
314 433 },
315 434 rules: {
316   - required: value => !!value || 'Date of Birth is Required.',
  435 + required: value => !!value || "Date of Birth is Required.",
317 436 min: v =>
318 437 (/^(0?[1-9]|[12][0-9]|3[01])[\/\-](0?[1-9]|1[012])[\/\-]\d{4}$/.test(
319 438 v
320 439 ) &&
321 440 v.length > 0) ||
322   - 'Please enter a date in the format dd/mm/yyyy'
  441 + "Please enter a date in the format dd/mm/yyyy"
323 442 },
324   - nameRules: [v => !!v || ' First Name is required'],
  443 + nameRules: [v => !!v || " First Name is required"],
325 444 emailRules: [
326   - v => !!v || 'E-mail is required',
327   - v => /.+@.+/.test(v) || 'E-mail must be valid'
  445 + v => !!v || "E-mail is required",
  446 + v => /.+@.+/.test(v) || "E-mail must be valid"
328 447 ],
329   - lnameRules: [v => !!v || ' Last Name is required'],
  448 + lastnameRules: [v => !!v || " Last Name is required"],
330 449 headers: [
331 450 {
332   - text: 'No',
333   - align: 'center',
  451 + text: "No",
  452 + align: "center",
334 453 sortable: false,
335   - value: 'No'
336   - },
337   - { text: 'Name', value: 'Name', sortable: false, align: 'center' },
338   - { text: 'Email', value: 'Email', sortable: false, align: 'center' },
339   - { text: '', value: '', sortable: false, align: 'center' }
340   - ],
341   - desserts: [
342   - {
343   - No: 1,
344   - Name: 'Amit',
345   - LName: 'goyal',
346   - Email: 'jsi@gmail.com',
347   - DOB: '22/09/1996'
  454 + value: "No"
348 455 },
349   - {
350   - No: 2,
351   - Name: 'Sumit',
352   - LName: 'kumar',
353   - Email: 'aasi@gmail.com',
354   - DOB: '16/09/1997'
355   - }
  456 + { text: "Name", value: "name", sortable: false, align: "center" },
  457 + { text: "Email", value: "email", sortable: false, align: "center" },
  458 + { text: "", value: "", sortable: false, align: "center" }
356 459 ],
  460 + desserts: [],
357 461 editedIndex: -1,
358 462 editedItem: {
359   - No: '',
360   - Name: '',
361   - LName: '',
362   - Email: ''
  463 + No: "",
  464 + name: "",
  465 + lastName: "",
  466 + email: "",
  467 + dob: '',
  468 + country: "India"
363 469 },
364 470 defaultItem: {
365   - No: '',
366   - Name: '',
367   - LName: '',
368   - Email: ''
  471 + No: "",
  472 + name: "",
  473 + lastname: "",
  474 + email: "",
  475 + dob: ""
369 476 }
370 477 }),
371 478 // computed: {
... ... @@ -377,39 +484,54 @@ export default {
377 484 // }
378 485 // },
379 486 methods: {
380   - getPatientList(){
381   - var token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjViZWQyYTRkMDRlZGE3ZTBiNzcwYjg5YiIsImVtYWlsIjoiYWRtaW5AZ21haWwuY29tIiwiaWF0IjoxNTQyMzQzNzg3LCJleHAiOjE1NDIzNDM5MDd9.diDjMkhRXvpdpXxibfsE9EmIb5G-39Bcy3qdzA0rREg"
382   - axios.get('http://18.208.28.55:3000/v1/patientList',{headers: {Authorization: 'Bearer '+token}})
  487 + getPatientList() {
  488 + var token = this.$store.state.token;
  489 + http()
  490 + .get("/patientList", {
  491 + headers: { Authorization: "Bearer " + token }
  492 + })
383 493 .then(response => {
384   - console.log("response=====>",response.data);
385   - }).catch(err => {
386   - console.log("err====>",err);
387   - })
  494 + this.desserts = response.data.data.existingUser;
  495 + })
  496 + .catch(err => {
  497 + console.log("err====>", err);
  498 + });
388 499 },
389   - editItem (item) {
  500 + editItem(item) {
390 501 this.editedIndex = this.desserts.indexOf(item);
391 502 this.editedItem = Object.assign({}, item);
392 503 this.dialog = true;
393 504 },
394   - profile (item) {
  505 + profile(item) {
395 506 this.editedIndex = this.desserts.indexOf(item);
396 507 this.editedItem = Object.assign({}, item);
397 508 this.dialog1 = true;
398 509 },
399   - report (item) {
  510 + report(item) {
400 511 this.editedIndex = this.desserts.indexOf(item);
401 512 this.editedItem = Object.assign({}, item);
402 513 this.dialog2 = true;
403 514 },
404 515  
405   - deleteItem (item) {
406   - const index = this.desserts.indexOf(item);
407   - confirm('Are you sure you want to delete this item?') &&
408   - this.desserts.splice(index, 1);
  516 + deleteItem(item) {
  517 + let addUsers = {
  518 + userId: item.userId
  519 + };
  520 + http()
  521 + .post("/deletePatient", addUsers)
  522 + .then(response => {
  523 + if ((this.snackbar = true)) {
  524 + this.text = "Successfully delete Existing User";
  525 + }
  526 + this.getPatientList();
  527 + })
  528 + .catch(error => {
  529 + console.log(error);
  530 + });
409 531 },
410   - activeTab (type) {
  532 + activeTab(type) {
411 533 switch (type) {
412   - case 'existing':
  534 + case "existing":
413 535 this.newActive = false;
414 536 this.isActive = true;
415 537 break;
... ... @@ -420,21 +542,21 @@ export default {
420 542 break;
421 543 }
422 544 },
423   - activebtn (type) {
  545 + activebtn(type) {
424 546 switch (type) {
425   - case 'existing':
  547 + case "existing":
426 548 this.Activebtn3 = false;
427 549 this.Activebtn2 = false;
428 550 this.Activebtn1 = false;
429 551 this.isActivebtn = true;
430 552 break;
431   - case 'new':
  553 + case "new":
432 554 this.Activebtn3 = false;
433 555 this.Activebtn2 = false;
434 556 this.Activebtn1 = true;
435 557 this.isActivebtn = false;
436 558 break;
437   - case 'new1':
  559 + case "new1":
438 560 this.Activebtn3 = false;
439 561 this.Activebtn2 = true;
440 562 this.Activebtn1 = false;
... ... @@ -448,56 +570,83 @@ export default {
448 570 break;
449 571 }
450 572 },
451   - close () {
  573 + close() {
452 574 this.dialog = false;
453 575 setTimeout(() => {
454 576 this.editedItem = Object.assign({}, this.defaultItem);
455 577 this.editedIndex = -1;
456 578 }, 300);
457 579 },
458   - close1 () {
  580 + close1() {
459 581 this.dialog1 = false;
460 582 },
461   - close2 () {
  583 + close2() {
462 584 this.dialog2 = false;
463 585 },
464   - submit () {
  586 + submit() {
465 587 if (this.$refs.form.validate()) {
466   - console.log('=clicked==', this.AddUsercredentials);
467   - var token ="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjViZWQyYTRkMDRlZGE3ZTBiNzcwYjg5YiIsImVtYWlsIjoiamF0aW5kZXIuc2luZ2hAdmlpdGhpaXN5cy5jb20iLCJpYXQiOjE1NDIzNjE2NjAsImV4cCI6MTU0MjM2MTc4MH0.SLGvEfihgMLqI1It3r76I2aLaA15fIhCvF_OgQwjxTw"
468   - var userdata = {
469   - "name":this.AddUsercredentials.name,
470   - // "name":this.AddUsercredentials.userName,
471   - "email":this.AddUsercredentials.email,
472   - "dob":this.AddUsercredentials.dob
473   - }
  588 + let addUsers = {
  589 + name: this.editedItem.name + this.editedItem.lastname,
  590 + dob: this.editedItem.dob,
  591 + email: this.editedItem.email,
  592 + country: this.editedItem.country
  593 + };
  594 + http()
  595 + .post("/patient", addUsers)
  596 + .then(response => {
  597 + this.clear();
  598 + this.getPatientList();
  599 + if ((this.snackbar = true)) {
  600 + this.text = "Successfully Add New User";
  601 + }
  602 + })
  603 + .catch(error => {
  604 + console.log(error);
  605 + });
  606 + $("input[name='name']").val("");
  607 + $("input[name='lastname']").val("");
  608 + $("input[name='email']").val("");
  609 + $("input[name='dob']").val("");
474 610 }
475 611 },
476   - mail () {
  612 + mail() {
477 613 // this.editedIndex = this.desserts.indexOf();
478 614 },
479   - download () {
  615 + download() {
480 616 // this.editedIndex = this.desserts.indexOf();
481   -
482 617 },
483   - clear () {
  618 + clear() {
484 619 this.$refs.form.reset();
485 620 },
486   - save () {
487   - if (this.$refs.form.validate()) {
488   - console.log('editedItem', this.editedItem);
489   - if (this.editedIndex > -1) {
490   - Object.assign(this.desserts[this.editedIndex], this.editedItem);
491   - } else {
492   - this.desserts.push(this.editedItem);
493   - }
494   - this.close();
495   - }
  621 + save() {
  622 + let editUsers = {
  623 + name: this.editedItem.name + this.editedItem.lastname,
  624 + dob: this.editedItem.dob,
  625 + email: this.editedItem.email,
  626 + userId: this.editedItem.userId
  627 + };
  628 + http()
  629 + .post("/patientDetail", editUsers)
  630 + .then(response => {
  631 + if ((this.snackbar = true)) {
  632 + this.text = "Successfully Edit Existing User";
  633 + }
  634 + this.getPatientList();
  635 + })
  636 + .catch(error => {
  637 + console.log(error);
  638 + });
  639 + this.close();
496 640 }
497 641 },
498   - mounted(){
  642 + mounted() {
499 643 this.getPatientList();
500 644 }
  645 + //computed:{
  646 + // color(){
  647 + // return this.loading ? 'success' : ''
  648 + // }
  649 + //}
501 650 };
502 651 </script>
503 652 <style scoped>
... ... @@ -558,7 +707,6 @@ h4 {
558 707 }
559 708 #dialog {
560 709 height: 550px;
561   -
562 710 }
563 711 .active {
564 712 background-color: black;
... ... @@ -567,7 +715,33 @@ h4 {
567 715 .activebtn {
568 716 color: black !important;
569 717 }
570   -#flex{
571   -height: 300px;
  718 +#flex {
  719 + height: 300px;
  720 +}
  721 +.top{
  722 + margin-top:100px;
  723 +}
  724 +.v-tabs__item a{
  725 + font-size:16px !important;
  726 +}
  727 +@media screen and (max-width: 380px) {
  728 +.right {
  729 + float: none !important;
  730 +}
  731 +.subheading {
  732 + font-size: 14px !important;
  733 +}
  734 +.v-card__actions .v-btn{
  735 + margin: 0 0px;
  736 + min-width: 100px;
  737 +}
  738 +}
  739 +@media screen and (max-width: 380px) {
  740 +.subheading {
  741 + font-size: 12px !important;
  742 +}
  743 +h5 {
  744 + font-size: 13px;
  745 +}
572 746 }
573 747 </style>
574 748 \ No newline at end of file
... ...
src/pages/Login.vue
1 1 <template>
2   -
3   - <v-app id="login">
  2 + <v-app id="login">
4 3 <v-toolbar color="grey lighten">
5 4 <v-toolbar-items>
6   - <img src="/static/ana@2x.png" height="36" alt="ana">
7   - </v-toolbar-items>
8   - </v-toolbar>
9   -
  5 + <img src="/static/ana@2x.png" height="36" alt="ana">
  6 + </v-toolbar-items>
  7 + </v-toolbar>
  8 +
10 9 <v-content>
11 10 <v-container fluid fill-height>
  11 + <v-snackbar
  12 + :timeout="timeout"
  13 + :top="y === 'top'"
  14 + :right="x === 'right'"
  15 + :vertical="mode === 'vertical'"
  16 + v-model="snackbar"
  17 + :color="color"
  18 + >{{ text }}</v-snackbar>
12 19 <v-layout align-center justify-center>
13   - <v-flex xs12 sm8 md6 lg5>
14   - <v-toolbar color="black" dark>
15   - <v-spacer></v-spacer>
16   - <v-toolbar-title>Admin Login</v-toolbar-title>
17   - <v-spacer></v-spacer>
18   - </v-toolbar>
19   -
  20 + <v-flex xs12 sm10 md6 lg4>
  21 + <v-toolbar color="black" dark>
  22 + <v-spacer></v-spacer>
  23 + <v-toolbar-title>Admin Login</v-toolbar-title>
  24 + <v-spacer></v-spacer>
  25 + </v-toolbar>
  26 +
20 27 <v-card class="elevation-1 pa-1">
21   - <v-card-text>
22   - <v-flex xs12 sm8 md8 lg8 offset-xs2>
23   - <v-form ref="form" v-model="valid" lazy-validation>
24   - <v-text-field
25   - v-model="userLogincredentials.userName"
26   - :rules="nameRules"
27   - label="Username"
28   - required
29   - ></v-text-field>
30   - <v-text-field
31   - :rules="[rules.required, rules.min]"
32   - v-model="userLogincredentials.password"
33   - :append-icon="e1 ? 'visibility_off' : 'visibility'"
34   - :append-icon-cb="() => (e1 = !e1)"
35   - :type="e1 ? 'password' : 'text'"
36   - name="input-10-1"
37   - label="Password"
38   - counter
39   -
40   - ></v-text-field>
41   -
42   - </v-form></v-flex>
43   - </v-card-text>
44   - <v-flex xs12 sm8 md8 lg8 offset-xs2>
45   -
46   - <v-checkbox
47   - :label="`Remember me`"
48   - v-model="remember"
49   - ></v-checkbox>
50   -
51   - <h5 id="fp"> <router-link to="/forgetpassword">Forget Password</router-link></h5>
52   -
53   - </v-flex>
54   -
55   - <v-flex class="mt-3 text-md-center">
56   - <v-btn round color="black" dark large @click="login" :loading="loading">Login</v-btn>
  28 + <v-card-text>
  29 + <v-flex xs12 sm12 md12 lg12>
  30 + <v-form ref="form" v-model="valid" lazy-validation>
  31 + <v-text-field
  32 + v-model="userLogincredentials.userName"
  33 + :rules="nameRules"
  34 + label="Username"
  35 + required
  36 + ></v-text-field>
  37 + <v-text-field
  38 + :rules="[rules.required, rules.min]"
  39 + v-model="userLogincredentials.password"
  40 + :append-icon="e1 ? 'visibility_off' : 'visibility'"
  41 + :append-icon-cb="() => (e1 = !e1)"
  42 + :type="e1 ? 'password' : 'text'"
  43 + name="input-10-1"
  44 + label="Password"
  45 + counter
  46 + ></v-text-field>
  47 + </v-form>
  48 + <v-layout row wrap>
  49 + <v-flex xs6>
  50 + <v-checkbox :label="`Remember me`" v-model="remember"></v-checkbox>
  51 + </v-flex>
  52 + <v-flex xs6>
  53 + <h5 class="right mt-4"> <router-link class="link" to="/forgetpassword">Forget Password</router-link></h5>
  54 + </v-flex>
  55 + </v-layout>
57 56 </v-flex>
  57 + </v-card-text>
  58 + <v-layout>
  59 + </v-layout>
  60 + <v-layout>
  61 + <v-flex sm12 class="my-3">
  62 + <v-btn style="margin: auto;display: block;" round color="black" dark large @click="login" :loading="loading">Login</v-btn>
  63 + </v-flex>
  64 + </v-layout>
58 65 </v-card>
59 66 </v-flex>
60 67 </v-layout>
61 68 </v-container>
62 69 </v-content>
63   - <v-footer class="pa-4" color="grey darken-2">
64   -</v-footer>
65   -</v-app>
  70 + <v-footer class="pa-4" color="grey darken-2"></v-footer>
  71 + </v-app>
66 72 </template>
67 73  
68 74 <script>
69   -import axios from 'axios';
  75 +import http from "@/Services/http.js";
70 76 export default {
71   - data () {
  77 + data() {
72 78 return {
  79 + snackbar: false,
  80 + y: "top",
  81 + x: "right",
  82 + mode: "",
  83 + timeout: 3000,
  84 + text: "",
73 85 e1: true,
74 86 loading: false,
75 87 remember: false,
76 88 valid: false,
77 89 userLogincredentials: {},
78   - username: '',
  90 + username: "",
79 91 nameRules: [
80   - v => !!v || 'Username is required',
81   - // v => v.length >0
  92 + v => !!v || "Username is required"
  93 + // v => v.length >0
82 94 ],
83 95 // email: '',
84 96 // erules: {
85   - // required: value => !!value || 'This email field is Required.',
86   - // em: v => (v.length > 0 && /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 'Email must be valid')
  97 + // required: value => !!value || 'This email field is Required.',
  98 + // em: v => (v.length > 0 && /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 'Email must be valid')
87 99 // },
88   - password: '',
  100 + password: "",
89 101 rules: {
90   - required: value => !!value || 'password is 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'
92   -
93   - }
  102 + required: value => !!value || "password is Required.",
  103 + min: v =>
  104 + (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/.test(
  105 + v
  106 + ) &&
  107 + v.length >= 8) ||
  108 + "Min 8 characters upper case lower case symbol required"
  109 + }
94 110 };
95 111 },
96 112 methods: {
97   - login () {
  113 + login() {
98 114 var userdata = {
99   - "userName":this.userLogincredentials.userName,
100   - "password":this.userLogincredentials.password
101   - }
102   - axios.post('http://18.208.28.55:3000/v1/adminLogin',userdata)
  115 + userName: this.userLogincredentials.userName,
  116 + password: this.userLogincredentials.password
  117 + };
  118 + http()
  119 + .post("/adminLogin", userdata)
103 120 .then(response => {
104   - window.localStorage.setItem("value1", true);
105   - console.log("response=====>",response.data.data);
106   - }).catch(err => {
107   - console.log("err====>",err);
108   - })
109   - // this.loading = true;
110   - // setTimeout(() => {
111   - // this.$router.push('/dashboard');
112   - // }, 1000);
  121 + this.$store.dispatch("setToken", response.data.data.token);
  122 + this.loading = true;
  123 + if ((this.snackbar = true)) {
  124 + this.text = "Successfully Login";
  125 + }
  126 + setTimeout(() => {
  127 + this.$router.push("/dashboard");
  128 + }, 2000);
  129 + })
  130 + .catch(err => {
  131 + this.text = "Email or Password not matched !!";
  132 + this.snackbar = true;
  133 + this.loading = false;
  134 + });
  135 + }
  136 + },
  137 + computed: {
  138 + color() {
  139 + return this.loading ? "success" : "error";
113 140 }
114 141 }
115 142 };
116 143 </script>
117 144  
118 145 <style scoped lang="css">
119   - #login{
120   - width: 100%;
121   - position: absolute;
122   - top: 0;
123   - left: 0;
124   - content: "";
125   - z-index: 0;
126   - }
  146 +#login {
  147 + width: 100%;
  148 + position: absolute;
  149 + top: 0;
  150 + left: 0;
  151 + content: "";
  152 + z-index: 0;
  153 +}
127 154 </style>
128 155 <style scoped>
129   -img{
130   -position:absolute;
131   -top:13px;
132   -left:50px;
  156 +img {
  157 + position: absolute;
  158 + top: 13px;
  159 + left: 50px;
133 160 }
134 161 .v-btn--large {
135   - padding: 0px 84px;
  162 + padding: 0px 84px;
136 163 }
137   -#fp{
138   - position: absolute;
139   - top: 193px;
140   - right: 128px;
141   - color: black;
  164 +.link{
  165 + text-decoration:none;
142 166 }
143   -a{
144   -color: #696969;
  167 +a {
  168 + color: #696969;
  169 +}
  170 + .forget{
  171 + margin-top:20px;
  172 +}
  173 +.mt-4 {
  174 + margin-top: 21px !important;
  175 +}
  176 +@media screen and (max-width: 600px) {
  177 + .forget{
  178 + margin-top:none;
  179 + margin-left:18px;
  180 +}
145 181 }
146   -
147   -
148   -
149 182 </style>
150 183 \ No newline at end of file
... ...
src/pages/Provider.vue
1 1 <template>
2   -<v-container grid-list-md>
3   -<v-flex>
  2 +<!-- <v-container fluid> -->
  3 +<v-flex xs12>
4 4 <v-card>
5 5 <v-card-title>
6   - <b><h5> Healthcare Providers </h5></b>
  6 + <v-flex xs12 lg2 md3 sm4>
  7 + <h4 class="text-xs-center"> Healthcare Providers </h4>
  8 + </v-flex>
7 9 <v-spacer></v-spacer>
8   - <v-flex xs6 sm4>
  10 + <!-- SEARCH ALL HEALTH PROVIDER -->
  11 + <v-flex xs8 sm4 lg3>
9 12 <v-text-field justify-right
10 13 prepend-icon="search"
11 14 v-model="search"
... ... @@ -13,9 +16,17 @@
13 16 color="black"
14 17 ></v-text-field></v-flex>
15 18 </v-card-title>
16   -
17   - <v-dialog v-model="dialog" max-width="500px">
18   - <v-toolbar color="white">
  19 +<!-- EDIT HEALTH PROVIDER -->
  20 + <v-snackbar
  21 + :timeout="timeout"
  22 + :top="y === 'top'"
  23 + :right="x === 'right'"
  24 + :vertical="mode === 'vertical'"
  25 + v-model="snackbar"
  26 + color="success"
  27 + >{{ text }}</v-snackbar>
  28 + <v-dialog v-model="dialog" max-width="500px">
  29 + <v-toolbar color="white">
19 30 <v-spacer></v-spacer>
20 31 <v-toolbar-title>Edit Profile</v-toolbar-title>
21 32 <v-spacer></v-spacer>
... ... @@ -36,7 +47,7 @@
36 47 </v-flex>
37 48 <v-flex xs8>
38 49 <v-text-field
39   - v-model="editedItem.Name"
  50 + v-model="editedItem.name"
40 51 :rules="nameRules"
41 52 required
42 53 ></v-text-field>
... ... @@ -48,8 +59,7 @@
48 59 </v-flex>
49 60 <v-flex xs8>
50 61 <v-text-field
51   - v-model="editedItem.LName"
52   - :rules="lnameRules"
  62 + v-model="editedItem.lastname"
53 63 required
54 64 ></v-text-field>
55 65 </v-flex>
... ... @@ -60,20 +70,11 @@
60 70 </v-flex>
61 71 <v-flex xs8>
62 72 <v-text-field
63   - v-model="editedItem.Email"
  73 + v-model="editedItem.email"
64 74 :rules="emailRules"
65 75 data-vv-name="E-mail"
66 76 required
67 77 ></v-text-field></v-flex></v-layout>
68   - <v-layout>
69   - <v-flex xs4 class="pt-4 subheading">
70   - <label>Date of Birth: </label>
71   - </v-flex>
72   - <v-flex xs8>
73   - <v-text-field
74   - v-model="editedItem.DOB"
75   - :rules="[rules.required, rules.min]"
76   - ></v-text-field></v-flex></v-layout>
77 78 <v-card-actions>
78 79 <v-btn round dark @click.native="close">Cancel</v-btn>
79 80 <v-spacer></v-spacer>
... ... @@ -87,48 +88,53 @@
87 88 </v-card-text>
88 89 </v-card>
89 90 </v-dialog>
90   -
91   -<v-dialog v-model="dialog1" max-width="500px">
  91 +<!-- VIEW PROFILE PRVIDE LIST -->
  92 +<v-dialog v-model="dialog1" max-width="700px" >
92 93 <v-toolbar color="white">
93 94 <v-spacer></v-spacer>
94 95 <v-toolbar-title>Profile</v-toolbar-title>
95 96 <v-spacer></v-spacer>
96 97 <v-icon @click="close1">close</v-icon>
97 98 </v-toolbar>
98   -
99   -
100 99 <v-card>
101 100 <v-flex align-center justify-center layout text-xs-center>
102   - <v-avatar size="50px" style="position:absolute; top:10px;">
  101 + <v-avatar size="60px" style="position:absolute; top:10px;">
103 102 <img src="/static/icon/user.png"/> </v-avatar>
104 103 </v-flex>
105 104 <v-card-text>
106   - <v-container grid-list-md>
107   - <v-layout wrap justify-center>
108   - <v-flex offset-xs3>
109   -
110   - <br><br>
111   - <table>
112   - <th>
113   - <tr><h5><b>First Name:</b></h5></tr><br>
114   - <tr><h5><b>Last Name:</b></h5></tr><br>
115   - <tr><h5><b>Email:</b></h5></tr><br>
116   - <tr><h5><b>Date Of Birth:</b></h5></tr>
117   - </th>
118   - <th>
119   - <tr><td><h5><b>{{ editedItem.Name }}</b></h5></td></tr><br>
120   - <tr> <td><h5><b>{{ editedItem.LName }}</b></h5></td></tr><br>
121   - <tr><td><h5><b>{{ editedItem.Email }}</b></h5></td></tr><br>
122   - <tr><td><h5><b>{{ editedItem.DOB }}</b></h5></td></tr>
123   - </th>
124   -
125   -
126   - </table>
127   - </v-flex>
128   - </v-layout>
129   - </v-container>
  105 + <v-container grid-list-md>
  106 + <v-layout wrap justify-center>
  107 + <v-flex sm12 offset-sm3><br><br>
  108 + <v-layout>
  109 + <v-flex xs4>
  110 + <h5 class="right">First Name:</h5>
  111 + </v-flex>
  112 + <v-flex xs8>
  113 + <h5 class="left">{{ editedItem.name }}</h5>
  114 + </v-flex>
  115 + </v-layout>
  116 + <v-layout>
  117 + <v-flex xs4>
  118 + <h5 class="right my-3">Last Name:</h5>
  119 + </v-flex>
  120 + <v-flex xs8>
  121 + <h5 class="my-3 left" >{{ editedItem.name }}</h5>
  122 + </v-flex>
  123 + </v-layout>
  124 + <v-layout>
  125 + <v-flex xs4 >
  126 + <h5 class="right">Email:</h5>
  127 + </v-flex>
  128 + <v-flex xs8>
  129 + <h5 class="left">{{ editedItem.email }}</h5>
  130 + </v-flex>
  131 + </v-layout>
  132 + </v-flex>
  133 + </v-layout>
  134 + </v-container>
130 135 </v-card-text>
131 136 </v-card>
  137 +<!-- PROVIDER DATA TABLE PROVIDER DEATILS -->
132 138 </v-dialog>
133 139 <v-data-table
134 140 :headers="headers"
... ... @@ -137,18 +143,26 @@
137 143 class="elevation-1"
138 144 :pagination.sync="pagination"
139 145 >
140   -
141   - <template slot="items" slot-scope="props">
142   - <td id="td" class="text-xs-center">{{ props.item.No }}</td>
143   - <td id="td" class="text-xs-center">{{ props.item.Name+' '+props.item.LName }}</td>
144   - <td id="td" class="text-xs-center">{{ props.item.Email }}</td>
145   - <td id="td" class="text-xs-center">
146   - <v-flex xs6 sm6>
  146 + <template slot="items" slot-scope="props">
  147 + <v-snackbar
  148 + :timeout="timeout"
  149 + :top="y === 'top'"
  150 + :right="x === 'right'"
  151 + :vertical="mode === 'vertical'"
  152 + v-model="statussnackbar"
  153 + color="success"
  154 + >{{ text }}</v-snackbar>
  155 + <td id="td" class="text-xs-center">{{ props.index }}</td>
  156 + <td id="td" class="text-xs-center">{{ props.item.name}}</td>
  157 + <td id="td" class="text-xs-center">{{ props.item.email }}</td>
  158 + <td id="td" class="text-xs-center">
  159 + <v-flex xs12 sm12>
147 160 <v-select
148   - :items="status"
  161 + :items="statusList"
  162 + @change="changeswitch(props.item)"
149 163 v-model="props.item.e1"
150 164 menu-props="auto"
151   - label="Select"
  165 + :label="props.item.verified"
152 166 hide-details
153 167 single-line
154 168 ></v-select>
... ... @@ -158,7 +172,7 @@
158 172 <span>
159 173 <img style="cursor:pointer; width:25px; height:18px; " class="mr-5" @click="profile(props.item)" src="/static/icon/eye1.png"/>
160 174 <img style="cursor:pointer; width:20px; height:18px; " class="mr-5" @click="editItem(props.item)" src="/static/icon/edit1.png"/>
161   - <img style="cursor:pointer; height:20px; " class="mr-2" @click="deleteItem(props.item)" src="/static/icon/delete1.png"/>
  175 + <img style="cursor:pointer; height:20px; " class="mr-5" @click="deleteItem(props.item)" src="/static/icon/delete1.png"/>
162 176 </span>
163 177 </td>
164 178  
... ... @@ -167,20 +181,24 @@
167 181  
168 182 </v-card>
169 183 </v-flex>
170   -</v-container>
  184 +<!-- </v-container> -->
171 185 </template>
172 186 <script>
173   -import axios from 'axios';
  187 +import http from '@/Services/http.js';
174 188 export default {
175 189 data: () => ({
176   - Name: '',
177   - LName: '',
178   - DOB: '',
179   - email: '',
  190 + snackbar: false,
  191 + statussnackbar:false,
  192 + y: "top",
  193 + x: "right",
  194 + mode: "",
  195 + timeout: 3000,
  196 + text: "",
180 197 valid: '',
  198 + modaledit:false,
181 199 dialog: false,
182 200 dialog1: false,
183   - status: ['Pending', 'Approved', 'Declined'],
  201 + statusList: ["APPROVED","DECLINED"],
184 202 search: '',
185 203 e1: '',
186 204 rules: {
... ... @@ -188,13 +206,13 @@ export default {
188 206 min: v => (/^(0?[1-9]|[12][0-9]|3[01])[\/\-](0?[1-9]|1[012])[\/\-]\d{4}$/).test(v) && v.length > 0 || 'Please enter a date in the format dd/mm/yyyy'
189 207 },
190 208 nameRules: [v => !!v || ' First Name is required'],
191   - lnameRules: [v => !!v || ' Last Name is required'],
  209 + // lnameRules: [v => !!v || ' Last Name is required'],
192 210 emailRules: [
193 211 v => !!v || 'E-mail is required',
194 212 v => /.+@.+/.test(v) || 'E-mail must be valid'
195 213 ],
196 214 pagination: {
197   - rowsPerPage: 10,
  215 + rowsPerPage: 13,
198 216  
199 217 },
200 218 headers: [
... ... @@ -204,9 +222,9 @@ export default {
204 222 sortable: false,
205 223 value: 'no'
206 224 },
207   - { text: 'Name', value: 'Name', sortable: false, align: 'center' },
208   - { text: 'Email', value: 'Email', sortable: false, align: 'center' },
209   - { text: 'Status', value: 'Status', sortable: false, align: 'center' },
  225 + { text: 'Name', value: 'name', sortable: false, align: 'center' },
  226 + { text: 'Email', value: 'email', sortable: false, align: 'center' },
  227 + { text: 'Status', value: 'verified', sortable: false, align: 'center' },
210 228 { text: '', value: '', sortable: false },
211 229  
212 230 ],
... ... @@ -215,14 +233,16 @@ export default {
215 233 editedItem: {
216 234 No: '',
217 235 Name: '',
218   - LName: '',
  236 + lastname: '',
219 237 Email: '',
  238 + dob:''
220 239 },
221 240 defaultItem: {
222 241 No: '',
223 242 Name: '',
224   - LName: '',
  243 + lastname: '',
225 244 Email: '',
  245 + dob:''
226 246 },
227 247 }),
228 248 watch: {
... ... @@ -239,32 +259,16 @@ export default {
239 259 },
240 260 methods: {
241 261 getProviderList(){
242   - var token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjViZWQyYTRkMDRlZGE3ZTBiNzcwYjg5YiIsImVtYWlsIjoiYWRtaW5AZ21haWwuY29tIiwiaWF0IjoxNTQyMzQzNzg3LCJleHAiOjE1NDIzNDM5MDd9.diDjMkhRXvpdpXxibfsE9EmIb5G-39Bcy3qdzA0rREg"
243   - axios.get('http://18.208.28.55:3000/v1/provider-list',{headers: {Authorization: 'Bearer '+ token}})
  262 + var token = this.$store.state.token
  263 + http().get('/provider-list',{headers: {Authorization: 'Bearer '+ token}})
244 264 .then(response => {
245   - console.log("response=====>",response.data);
  265 + this.desserts = response.data.data.providerList;
246 266 }).catch(err => {
247 267 console.log("err====>",err);
248 268 })
249 269 },
250 270 initialize () {
251   - this.desserts = [
252   - {
253   - No: 1,
254   - Name: 'Amit',
255   - LName: 'goyal',
256   - Email: 'jsi@gmail.com',
257   - DOB: '22/09/1996'
258   - },
259   - {
260   - No: 2,
261   - Name: 'Sumit',
262   - LName: 'kumar',
263   - Email: 'aasi@gmail.com',
264   - DOB: '16/09/1997'
265   - }
266   -
267   - ];
  271 + this.desserts = [];
268 272 },
269 273  
270 274 editItem (item) {
... ... @@ -277,11 +281,36 @@ export default {
277 281 this.editedItem = Object.assign({}, item);
278 282 this.dialog1 = true;
279 283 },
280   -
  284 + changeswitch(item){
  285 + let addStatus = {
  286 + userId:item.userId,
  287 + status:item.e1
  288 + };
  289 + http().post("/approve-decline", addStatus)
  290 + .then(response => {
  291 + if ((this.statussnackbar = true)) {
  292 + this.text = "Successfully change your status is" + " " + item.e1;
  293 + }
  294 + this.getProviderList();
  295 + })
  296 + .catch(error => {
  297 + console.log(error);
  298 + });
  299 + },
281 300 deleteItem (item) {
282   - const index = this.desserts.indexOf(item);
283   - confirm('Are you sure you want to delete this item?') &&
284   - this.desserts.splice(index, 1);
  301 + let addUsers = {
  302 + userId:item.userId
  303 + };
  304 + http().post("/deleteProvider", addUsers)
  305 + .then(response => {
  306 + if ((this.snackbar = true)) {
  307 + this.text = "Successfully delete Health Care Priovider";
  308 + }
  309 + this.getProviderList();
  310 + })
  311 + .catch(error => {
  312 + console.log(error);
  313 + });
285 314 },
286 315  
287 316 close () {
... ... @@ -296,15 +325,23 @@ export default {
296 325 },
297 326  
298 327 save () {
299   - if (this.$refs.form.validate()) {
300   - console.log('editedItem', this.editedItem);
301   - if (this.editedIndex > -1) {
302   - Object.assign(this.desserts[this.editedIndex], this.editedItem);
303   - } else {
304   - this.desserts.push(this.editedItem);
305   - }
306   - this.close();
307   - }
  328 + let editUsers = {
  329 + name: this.editedItem.name +this.editedItem.lastname,
  330 + dob: this.editedItem.dob,
  331 + email: this.editedItem.email,
  332 + userId: this.editedItem.userId
  333 + };
  334 + http().post("/provider-detail", editUsers)
  335 + .then(response => {
  336 + if ((this.snackbar = true)) {
  337 + this.text = "Successfully Edit Health Care Priovider";
  338 + }
  339 + this.getProviderList();
  340 + })
  341 + .catch(error => {
  342 + console.log(error);
  343 + });
  344 + this.close();
308 345 }
309 346 },
310 347 };
... ... @@ -318,5 +355,32 @@ min-width: 120px;
318 355 border: 1px solid #dddddd;
319 356 padding: 8px;
320 357 }
  358 +#flex{
  359 +height: 300px;
  360 +}
  361 +.v-select_selctions.v-select_slot.v-select_selection{
  362 + color: black !important;
  363 +}
  364 +@media screen and (max-width:476px){
  365 +.flex.xs4 {
  366 + flex-basis: 55.666667%;
  367 + max-width: 71.666667%;
  368 +}
  369 +}
  370 +@media screen and (max-width: 402px) {
  371 +h5 {
  372 + font-size: 13px;
  373 +}
  374 +/* .right{
  375 + float:none !important;
  376 +} */
  377 +.left{
  378 + float:none !important;
  379 +}
  380 +
  381 +}
  382 +
  383 +</style>
  384 +
  385 +
321 386  
322   -</style>
323 387 \ No newline at end of file
... ...
src/pages/changepassword.vue
... ... @@ -48,19 +48,16 @@
48 48 :loading="loading"
49 49 @click="reset">Reset Password</v-btn></v-flex>
50 50 </v-card-actions>
51   - <v-snackbar
52   - :timeout="timeout"
53   - v-model="snackbar"
54   - color="green"
55   - >
56   - {{ text }}
57   - <v-icon
58   - flat
59   - @click="snackbar = false"
60   - >
61   - close
62   - </v-icon>
63   - </v-snackbar>
  51 + <v-snackbar
  52 + :timeout="timeout"
  53 + :top="y === 'top'"
  54 + :right="x === 'right'"
  55 + :vertical="mode === 'vertical'"
  56 + v-model="snackbar"
  57 + :color= color
  58 + >
  59 + {{ text }}
  60 + </v-snackbar>
64 61 </v-card>
65 62 </v-flex>
66 63 </v-layout>
... ... @@ -72,16 +69,21 @@
72 69 </v-app>
73 70 </template>
74 71 <script>
75   -import axios from 'axios';
  72 +import http from '@/Services/http.js';
  73 +
76 74 export default {
77 75 data () {
78 76 return {
  77 + snackbar: false,
  78 + y: 'top',
  79 + x: 'right',
  80 + mode: '',
  81 + timeout: 4000,
  82 + text: '',
79 83 adminChangePasswordcredentials: {},
80 84 e1: true,
81 85 e2: true,
82 86 e3: true,
83   - snackbar: false,
84   - timeout: 1000,
85 87 loading: false,
86 88 valid: false,
87 89 text: 'Password Changed',
... ... @@ -96,33 +98,35 @@ export default {
96 98 },
97 99 methods: {
98 100 reset () {
99   - var token ="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjViZWQyYTRkMDRlZGE3ZTBiNzcwYjg5YiIsImVtYWlsIjoiamF0aW5kZXIuc2luZ2hAdmlpdGhpaXN5cy5jb20iLCJpYXQiOjE1NDIzNjE2NjAsImV4cCI6MTU0MjM2MTc4MH0.SLGvEfihgMLqI1It3r76I2aLaA15fIhCvF_OgQwjxTw"
100   -
101   - console.log("this.adminChangePasswordcredentials.confirmPassword",this.adminChangePasswordcredentials.confirmPassword)
102   - console.log(this.adminChangePasswordcredentials.newPassword,"=======",this.adminChangePasswordcredentials.currentPassword)
  101 + var token = this.$store.state.token;
103 102 var userdata = {
104 103 "currentPassword":this.adminChangePasswordcredentials.currentPassword,
105 104 "newPassword":this.adminChangePasswordcredentials.newPassword,
106 105 "confirmPassword":this.adminChangePasswordcredentials.confirmPassword
107 106 }
108   - axios.post('http://18.208.28.55:3000/v1/adminChangePassword',userdata,{headers: {Authorization: 'Bearer '+token}})
  107 + http().post('/adminChangePassword',userdata,{headers: {Authorization: 'Bearer '+token}})
109 108 .then(response => {
110   - window.localStorage.setItem("value1", true);
111   - console.log("response=====>",response.data.data);
  109 + this.loading = true;
  110 + if(this.snackbar=true){
  111 + this.text= "Successfully changed password !!"
  112 + console.log("snackbar",response.data.message)
  113 + }
  114 + setTimeout(() => {
  115 + this.$router.push('/dashboard');
  116 + }, 2000);
112 117 }).catch(err => {
113   - console.log("err====>",err);
114   - })
115   - // console.log('=clicked==', this.adminChangePasswordcredentials);
116   - // this.loading = true;
117   - // this.snackbar = true;
118   - // setTimeout(() => {
119   -
120   - // this.$router.push('/dashboard');
121   -
122   - // }, 2000);
123   -
  118 + // console.log("err====>",err);
  119 + this.text="User Not Found or Incorrect currentPassword"
  120 + this.snackbar= true;
  121 + this.loading = false;
  122 + })
124 123 }
125   - }
  124 + },
  125 + computed:{
  126 + color(){
  127 + return this.loading ? 'success' : 'error'
  128 +}
  129 +}
126 130 };
127 131 </script>
128 132 <style scoped>
... ...
src/pages/forgetpassword.vue
... ... @@ -8,98 +8,96 @@
8 8 <v-content>
9 9 <v-container fluid fill-height>
10 10 <v-layout align-center justify-center>
11   - <v-flex xs12 sm8 md6 lg6>
  11 + <v-flex xs12 sm8 md7 lg5>
12 12 <v-toolbar color="black" dark>
13 13 <v-spacer></v-spacer>
14   -
15 14 <v-toolbar-title>Forget Password</v-toolbar-title>
16   - <v-spacer></v-spacer>
17   -
  15 + <v-spacer></v-spacer>
18 16 </v-toolbar>
19 17 <v-card class="elevation-1 pa-1">
20 18 <v-card-text>
21   -
22   - <h5 class="text-md-center"> Not to Worry! Enter to your registered Email ID. </h5>
23   - <h5 class="text-md-center"> We'll send you a reset.</h5>
24   - <v-flex xs12 sm8 md6 lg6 offset-xs3>
  19 + <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 + <v-flex lg4 sm6 xs10 offset-sm3 offset-xs1 offset-lg4>
25 22 <v-form class="mt-4">
26 23 <div class="custom-input-align">
27 24 <v-text-field
28 25 class="text-md-center"
29 26 v-validate="'required|email'"
30   - v-model="userForgotPasswordcredentials.email"
  27 + v-model="changePassword"
31 28 :error-messages="errors.collect('email')"
32 29 label="Enter Your email ID"
33 30 data-vv-name="email"
34 31 required>
35 32 </v-text-field>
36   - </div>
37   -
38   - </v-form></v-flex>
39   - </v-card-text>
40   - <v-card-actions>
41   -
42   -
43   -
44   - <v-flex text-sm-center>
45   -
  33 + </div>
  34 + </v-form></v-flex>
  35 + </v-card-text>
  36 + <v-card-actions>
  37 + <v-flex text-xs-center>
46 38 <v-btn round class="mt-1" color="black" dark large @click="reset">Send Request</v-btn></v-flex>
47 39 </v-card-actions>
48 40 <v-snackbar
49 41 :timeout="timeout"
  42 + :top="y === 'top'"
  43 + :right="x === 'right'"
  44 + :vertical="mode === 'vertical'"
50 45 v-model="snackbar"
51   - color="green"
52   - >
53   - {{ text }}
54   - <v-icon
55   - flat
56   - @click="snackbar = false"
57   - >
58   - close
59   - </v-icon>
  46 + :color= color
  47 + >
  48 + {{ text }}
  49 + </v-snackbar>
60 50 </v-snackbar>
61 51 </v-card>
62 52 </v-flex>
63 53 </v-layout>
64 54 </v-container>
65 55 </v-content>
66   - <v-footer class="pa-4" color="grey darken-2">
67   -
  56 + <v-footer class="pa-4" color="grey darken-2">
68 57 </v-footer>
69 58 </v-app>
70 59 </template>
71 60 <script>
72   -import axios from 'axios';
  61 +import http from '@/Services/http.js';
  62 +
73 63 export default {
74 64 data: () => ({
75   - userForgotPasswordcredentials: {},
76   - text: 'Link send to your Email address',
  65 + changePassword:'',
77 66 snackbar: false,
78   - timeout: 1000,
  67 + y: 'top',
  68 + x: 'right',
  69 + mode: '',
  70 + timeout: 4000,
  71 + text: '',
79 72 loading: false,
80 73 email: ''
81 74 }),
82 75  
83 76 methods: {
84 77 reset () {
85   - var userdata = {
86   - "email":this.userForgotPasswordcredentials.email,
87   - }
88   - axios.post('http://18.208.28.55:3000/v1/adminForgotPassword',userdata)
  78 +
  79 + http().get('/adminForgotPassword?email='+ this.changePassword)
89 80 .then(response => {
90   - window.localStorage.setItem("value1", true);
91   - console.log("response=====>",response.data.data);
  81 + console.log("response=====>",response);
  82 + this.loading = true;
  83 + if(this.snackbar=true){
  84 + this.text= "Please check your email and Copy your password!"
  85 + }
  86 + setTimeout(() => {
  87 + this.$router.push('/');
  88 + }, 1000);
92 89 }).catch(err => {
93   - console.log("err====>",err);
  90 + this.text="User Not Found or Incorrect Email"
  91 + this.snackbar= true;
  92 + this.loading = false;
94 93 })
95   - // console.log('=clicked==', this.userForgotPasswordcredentials);
96   - // this.loading = true;
97   - // this.snackbar = true;
98   - // setTimeout(() => {
99   - // this.$router.push('/');
100   - // }, 1000);
101 94 }
102   - }
  95 + },
  96 + computed:{
  97 + color(){
  98 + return this.loading ? 'success' : 'error'
  99 +}
  100 +}
103 101  
104 102 };
105 103 </script>
... ... @@ -121,4 +119,13 @@ left:50px;
121 119 .v-btn--large {
122 120 padding: 0px 74px;
123 121 }
  122 +@media screen and (max-width: 472px) {
  123 +.v-btn--large {
  124 + padding:0px 20px !important;
  125 + font-size:13px;
  126 +}
  127 +h5 {
  128 + font-size: 11px;
  129 +}
  130 +}
124 131 </style>
125 132 \ No newline at end of file
... ...
src/pages/questions.vue
1 1 <template>
2   -<v-container grid-list-xl>
3   - <v-flex>
  2 + <v-flex>
4 3 <v-card>
5 4 <v-toolbar flat color="white">
6 5 <v-card-title>
... ... @@ -23,9 +22,8 @@
23 22  
24 23 </v-toolbar>
25 24 <component v-bind:is="component"></component>
26   - </v-card></v-flex>
27   -
28   - </v-container>
  25 + </v-card>
  26 + </v-flex>
29 27 </template>
30 28 <script>
31 29 import axios from 'axios';
... ...
src/services/api.js
src/store/store.js
... ... @@ -0,0 +1,57 @@
  1 +import Vue from 'vue'
  2 +import Vuex from 'vuex'
  3 +import createPersistedState from 'vuex-persistedstate'
  4 +
  5 +Vue.use(Vuex)
  6 +
  7 +export default new Vuex.Store({
  8 + strict:true,
  9 + plugins:[
  10 + createPersistedState()
  11 + ],
  12 + state: {
  13 + token: null,
  14 + data: null,
  15 + isUserLoggedIn: false,
  16 + username: null,
  17 + password: null
  18 + },
  19 + // serve as the one and only way to change the state of the data in the state object
  20 + mutations: {
  21 + setToken (state, token) {
  22 + state.token = token
  23 + //state.isUserLoggedIn = !!(token)
  24 + if (token != null) {
  25 + state.isUserLoggedIn = true
  26 + } else {
  27 + state.isUserLoggedIn = false
  28 + }
  29 + },
  30 + setUser (state, data) {
  31 + state.data = data
  32 + },
  33 + User (state, username) {
  34 + state.username = username
  35 + },
  36 + password (state, password) {
  37 + state.password = password
  38 + }
  39 + },
  40 + //Action methods are referred to as being "dispatched"
  41 + actions: {
  42 + setToken ({commit}, token) {
  43 + commit('setToken', token)
  44 + },
  45 + setUser ({commit}, data) {
  46 + commit('setUser', data)
  47 + },
  48 + User ({commit}, username) {
  49 + commit('User', username)
  50 + },
  51 + password ({commit}, password) {
  52 + commit('password', password)
  53 + },
  54 +
  55 + }
  56 +
  57 +})
0 58 \ No newline at end of file
... ...