Commit e173bab2137b46122a94173be002722bbca994b8

Authored by Jatinder Singh
1 parent 09f34e0c85

api

... ... @@ -3,3 +3,4 @@
3 3 /dist/
4 4 /*.js
5 5 /test/unit/coverage/
  6 +*
6 7 \ No newline at end of file
... ...
src/components/report/onemonth.vue
1 1 <template>
2   -<h3> first month report</h3>
  2 + <div><h3>
  3 + first month report
  4 + </h3> </div>
  5 +
3 6 </template>
4 7 \ No newline at end of file
... ...
src/pages/Dashboard.vue
... ... @@ -134,8 +134,7 @@
134 134 </v-card>
135 135 </v-dialog>
136 136  
137   -<v-dialog v-model="dialog2" max-width="700px">
138   -
  137 +<v-dialog v-model="dialog2" width="700px">
139 138 <v-card>
140 139 <div id="dialog">
141 140 <h4><b> Report </b> </h4>
... ... @@ -378,6 +377,15 @@ export default {
378 377 // }
379 378 // },
380 379 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}})
  383 + .then(response => {
  384 + console.log("response=====>",response.data);
  385 + }).catch(err => {
  386 + console.log("err====>",err);
  387 + })
  388 + },
381 389 editItem (item) {
382 390 this.editedIndex = this.desserts.indexOf(item);
383 391 this.editedItem = Object.assign({}, item);
... ... @@ -487,6 +495,9 @@ export default {
487 495 }
488 496 }
489 497 },
  498 + mounted(){
  499 + this.getPatientList();
  500 + }
490 501 };
491 502 </script>
492 503 <style scoped>
... ... @@ -547,6 +558,7 @@ h4 {
547 558 }
548 559 #dialog {
549 560 height: 550px;
  561 +
550 562 }
551 563 .active {
552 564 background-color: black;
... ...
src/pages/Login.vue
... ... @@ -95,22 +95,22 @@ export default {
95 95 },
96 96 methods: {
97 97 login () {
98   - console.log('=clicked==', this.userLogincredentials);
99   - this.loading = true;
100   - setTimeout(() => {
101   - this.$router.push('/dashboard');
102   - }, 1000);
  98 + 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)
  103 + .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);
103 113 }
104   - // created () {
105   - // axios.get(`http://jsonplaceholder.typicode.com/posts`)
106   - // .then(response => {
107   -
108   - // this.posts = response.data;
109   - // })
110   - // .catch(e => {
111   - // this.errors.push(e);
112   - // });
113   - // }
114 114 }
115 115 };
116 116 </script>
... ...
src/pages/Provider.vue
... ... @@ -170,6 +170,7 @@
170 170 </v-container>
171 171 </template>
172 172 <script>
  173 +import axios from 'axios';
173 174 export default {
174 175 data: () => ({
175 176 Name: '',
... ... @@ -233,7 +234,19 @@ export default {
233 234 created () {
234 235 this.initialize();
235 236 },
  237 + mounted(){
  238 + this.getProviderList();
  239 + },
236 240 methods: {
  241 + getProviderList(){
  242 + var token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjViZWQyYTRkMDRlZGE3ZTBiNzcwYjg5YiIsImVtYWlsIjoiYWRtaW5AZ21haWwuY29tIiwiaWF0IjoxNTQyMzQzNzg3LCJleHAiOjE1NDIzNDM5MDd9.diDjMkhRXvpdpXxibfsE9EmIb5G-39Bcy3qdzA0rREg"
  243 + axios.get('http://18.208.28.55:3000/v1/provider-list',{headers: {Authorization: 'Bearer '+ token}})
  244 + .then(response => {
  245 + console.log("response=====>",response.data);
  246 + }).catch(err => {
  247 + console.log("err====>",err);
  248 + })
  249 + },
237 250 initialize () {
238 251 this.desserts = [
239 252 {
... ...
src/pages/changepassword.vue
... ... @@ -22,7 +22,7 @@
22 22 <v-text-field
23 23 :rules="[rules.required, rules.min]"
24 24  
25   - v-model="adminChangePasswordcredentials.password"
  25 + v-model="adminChangePasswordcredentials.currentPassword"
26 26 label="Current Password">
27 27 </v-text-field>
28 28 <v-text-field
... ... @@ -32,7 +32,7 @@
32 32 label="New Password"
33 33 ></v-text-field>
34 34 <v-text-field
35   - v-model="adminChangePasswordcredentials.ConifrmPassword"
  35 + v-model="adminChangePasswordcredentials.ConfirmPassword"
36 36 :rules="[rules.required, rules.min]"
37 37 label="Confirm Password"
38 38 ></v-text-field>
... ... @@ -86,7 +86,7 @@ export default {
86 86 loading: false,
87 87 valid: false,
88 88 text: 'Password Changed',
89   - password: '',
  89 + currentPassword: '',
90 90 rules: {
91 91 required: value => !!value || 'This password field is Required.',
92 92 min: v => (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/).test(v) && v.length >= 8 || 'Min 8 characters upper case lower case symbol required'
... ... @@ -97,14 +97,26 @@ export default {
97 97 },
98 98 methods: {
99 99 reset () {
100   - console.log('=clicked==', this.adminChangePasswordcredentials);
101   - this.loading = true;
102   - this.snackbar = true;
103   - setTimeout(() => {
  100 + var userdata = {
  101 + "currentPassword":this.adminChangePasswordcredentials.currentPassword,
  102 + "newPassword":this.adminChangePasswordcredentials.newPassword,
  103 + "confirmPassword":this.adminChangePasswordcredentials.confirmPassword
  104 + }
  105 + axios.post('http://18.208.28.55:3000/v1/adminChangePassword',userdata)
  106 + .then(response => {
  107 + window.localStorage.setItem("value1", true);
  108 + console.log("response=====>",response.data.data);
  109 + }).catch(err => {
  110 + console.log("err====>",err);
  111 + })
  112 + // console.log('=clicked==', this.adminChangePasswordcredentials);
  113 + // this.loading = true;
  114 + // this.snackbar = true;
  115 + // setTimeout(() => {
104 116  
105   - this.$router.push('/dashboard');
  117 + // this.$router.push('/dashboard');
106 118  
107   - }, 2000);
  119 + // }, 2000);
108 120  
109 121 }
110 122 }
... ...
src/pages/forgetpassword.vue
... ... @@ -43,7 +43,7 @@
43 43  
44 44 <v-flex text-sm-center>
45 45  
46   - <v-btn round class="mt-1" color="black" dark large @click="login">Send Request</v-btn></v-flex>
  46 + <v-btn round class="mt-1" color="black" dark large @click="reset">Send Request</v-btn></v-flex>
47 47 </v-card-actions>
48 48 <v-snackbar
49 49 :timeout="timeout"
... ... @@ -69,6 +69,7 @@
69 69 </v-app>
70 70 </template>
71 71 <script>
  72 +import axios from 'axios';
72 73 export default {
73 74 data: () => ({
74 75 userForgotPasswordcredentials: {},
... ... @@ -80,13 +81,23 @@ export default {
80 81 }),
81 82  
82 83 methods: {
83   - login () {
84   - console.log('=clicked==', this.userForgotPasswordcredentials);
85   - this.loading = true;
86   - this.snackbar = true;
87   - setTimeout(() => {
88   - this.$router.push('/');
89   - }, 1000);
  84 + reset () {
  85 + var userdata = {
  86 + "email":this.userForgotPasswordcredentials.email,
  87 + }
  88 + axios.post('http://18.208.28.55:3000/v1/adminForgotPassword',userdata)
  89 + .then(response => {
  90 + window.localStorage.setItem("value1", true);
  91 + console.log("response=====>",response.data.data);
  92 + }).catch(err => {
  93 + console.log("err====>",err);
  94 + })
  95 + // console.log('=clicked==', this.userForgotPasswordcredentials);
  96 + // this.loading = true;
  97 + // this.snackbar = true;
  98 + // setTimeout(() => {
  99 + // this.$router.push('/');
  100 + // }, 1000);
90 101 }
91 102 }
92 103  
... ...
src/pages/notification.vue
... ... @@ -60,6 +60,7 @@
60 60 </v-app>
61 61 </template>
62 62 <script>
  63 +import axios from 'axios';
63 64 export default {
64 65 data () {
65 66 return {
... ...
src/pages/questions.vue
... ... @@ -28,6 +28,7 @@
28 28 </v-container>
29 29 </template>
30 30 <script>
  31 +import axios from 'axios';
31 32 import suggestion from '@/components/questions/suggestion.vue';
32 33 import sex from '@/components/questions/sex.vue';
33 34 import health from '@/components/questions/health.vue';
... ...
src/pages/register.vue
... ... @@ -1,121 +0,0 @@
1   -<template>
2   - <v-app id="login" class="primary">
3   - <v-content>
4   - <v-container fluid fill-height>
5   - <v-layout align-center justify-center>
6   - <v-flex xs12 sm8 md6 lg4>
7   - <v-app style="margin-right: 15px;">
8   - <v-stepper v-model="e1">
9   - <v-stepper-items>
10   - <!-- <v-stepper-content step="1">
11   - <h3 class="primary--text mt-5 text-md-left"> Lets get you started</h3>
12   - <div class="mt-5">
13   - <v-form>
14   - <v-text-field append-icon="person" name="Email" label="Email" type="text" v-model="model.username"></v-text-field>
15   - </v-form></div>
16   - <h5 class="mt-3 text-md-center">A verification will be send to your email</h5>
17   - <v-flex text-sm-center>
18   - <v-btn class="mt-3" round color="primary" large @click="e1=2">Next</v-btn></v-flex>
19   - <h5 class="mt-4 text-md-right">Already have an account?</h5>
20   - <h5 class="text-md-right">go to<router-link to="/login">Log in</router-link></h5>
21   - </v-stepper-content>
22   -
23   -
24   -
25   - <v-stepper-content step="2">
26   - <h3 class="primary--text mt-5 text-md-left"> Lets get you started</h3>
27   - <v-form>
28   - <v-text-field append-icon="lock" name="password" label="Password" id="password" type="password"></v-text-field>
29   - <v-text-field append-icon="lock" name="cpassword" label="Confirm Password" id="cpassword" type="password" ></v-text-field>
30   - </v-form>
31   - <v-flex text-sm-center>
32   - <v-btn class="mt-3" round color="primary" large @click="e2=3">Next</v-btn></v-flex>
33   - </v-stepper-content>-->
34   -
35   -
36   - <v-stepper-content step="3">
37   - <h3 class="primary--text mt-3 text-md-left"> Lets get you started</h3>
38   - <h4 class="primary--text mt-3 text-md-left">Type of user</h4>
39   - <v-flex text-sm-center>
40   - <v-btn class="mt-3 selected" round color="primar" large @click="first">Provider</v-btn>
41   - <v-btn class="mt-3" round color="primay" large @click="second">Patient</v-btn>
42   - </v-flex>
43   - <div class="mt-5" id="first">
44   - <v-form >
45   - <v-text-field name="name" label="Full Name" type="text"></v-text-field>
46   - <v-text-field name="license" label="License Number" type="text"></v-text-field>
47   - <v-text-field name="country" label="Country" type="text"></v-text-field>
48   - </v-form></div>
49   - <h5 class="mt-4 text-md-center">By signing up you accept term & conditions</h5>
50   - <v-flex text-sm-center>
51   - <v-btn class="mt-3" round color="primary" large>Register</v-btn></v-flex>
52   - <div class="mt-5" id="second">
53   - <v-form>
54   - <v-text-field name="name" label="Full Name" type="text"></v-text-field>
55   - <v-text-field name="dob" label="Birth Date" placeholder="dd/mm/yyyy" type="date"></v-text-field>
56   - <v-text-field name="country" label="Country" type="text"></v-text-field>
57   - </v-form></div>
58   - <h5 class="mt-4 text-md-center">By signing up you accept term & conditions</h5>
59   - <v-flex text-sm-center>
60   - <v-btn class="mt-3" round color="primary" large>Register</v-btn></v-flex>
61   - <!-- <v-flex xs12 sm6 d-flex>
62   - <v-select
63   - :items="items"
64   - label="select user"
65   - >
66   - </v-select>
67   - </v-flex>-->
68   -
69   -
70   - </v-stepper-content>
71   - </v-stepper-items>
72   - <v-stepper-header>
73   - <!-- <v-stepper-step :complete="e1 > 1" step="1"></v-stepper-step>
74   -
75   - <v-divider></v-divider>
76   -
77   - <v-stepper-step :complete="e2 > 2" step="2"></v-stepper-step>
78   -
79   - <v-divider></v-divider>
80   --->
81   - <v-stepper-step :complete="e3 > 3" step="3"></v-stepper-step>
82   - </v-stepper-header>
83   - </v-stepper>
84   - </v-app>
85   - </v-flex>
86   - </v-layout>
87   - </v-container>
88   - </v-content>
89   - </v-app>
90   -</template>
91   -<script>
92   -export default {
93   - data: () => ({
94   - loading: false,
95   - model: {
96   - Email: '',
97   - }
98   - }),
99   - methods: {
100   - login () {
101   - this.loading = true;
102   - setTimeout(() => {
103   - this.$router.push('/login');
104   - }, 1000);
105   - }
106   - },
107   -};
108   -
109   -
110   -</script>
111   -<style scoped lang="css">
112   - #login {
113   - height: 50%;
114   - width: 100%;
115   - position: absolute;
116   - top: 0;
117   - left: 0;
118   - content: "";
119   - z-index: 0;
120   - }
121   -</style>
122 0 \ No newline at end of file
src/router/paths.js
... ... @@ -123,18 +123,18 @@ export default [
123 123 `@/pages/Login.vue`
124 124 )
125 125 },
126   - {
127   - path: '/register',
128   - meta: {
129   - public: true,
130   - },
131   - name: 'register',
132   - component: () => import(
133   - /* webpackChunkName: "routes" */
134   - /* webpackMode: "lazy-once" */
135   - `@/pages/register.vue`
136   - )
137   - },
  126 + // {
  127 + // path: '/register',
  128 + // meta: {
  129 + // public: true,
  130 + // },
  131 + // name: 'register',
  132 + // component: () => import(
  133 + // /* webpackChunkName: "routes" */
  134 + // /* webpackMode: "lazy-once" */
  135 + // `@/pages/register.vue`
  136 + // )
  137 + // },
138 138 {
139 139 path: '/Provider',
140 140 meta: { },
... ...