Commit 04e3fbc564c119f7341e5937843c591771ac981e

Authored by Jatinder Singh
1 parent 07095d4d87

minor fix

... ... @@ -18,7 +18,7 @@
18 18 </v-footer>
19 19 </v-content>
20 20 <!-- Go to top -->
21   - <app-fab></app-fab>
  21 + <!-- <app-fab></app-fab> -->
22 22 <!-- theme setting -->
23 23 <!-- <v-btn small fab dark falt fixed top="top" right="right" class="setting-fab" color="red" @click="openThemeSettings">
24 24 <v-icon>settings</v-icon>
... ...
... ... @@ -39,6 +39,12 @@ const Menu = [
39 39 name: 'notification',
40 40 icon: '',
41 41 },
  42 + {
  43 + title: 'Forum Questions',
  44 + // group: 'apps',
  45 + name: 'questions',
  46 + icon: '',
  47 + },
42 48 // {
43 49 // title: 'Widgets',
44 50 // group: 'widgets',
... ...
src/components/AppFab.vue
1   -<!--<template>
  1 +<template>
2 2 <v-fab-transition>
3 3 <v-btn fab="fab" small dark="dark" fixed="fixed" bottom="bottom" right="right" color="red" v-scroll="onScroll" v-show="fab" @click="toTop">
4 4 <v-icon>keyboard_arrow_up</v-icon>
5 5 </v-btn>
6 6 </v-fab-transition>
7   -</template>-->
  7 +</template>
8 8  
9 9 <script>
10 10 export default {
... ...
src/components/AppToolbar.vue
... ... @@ -25,9 +25,9 @@
25 25 <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition">
26 26 <v-btn icon large flat slot="activator">
27 27 <v-avatar size="40px" color="black">
28   - <!-- <img src="/static/avatar/man_4.jpg" alt="Michael Wang"/>-->
29   - <!-- <v-icon>fa-user-circle-o</v-icon> -->
30   - <v-icon dark>account_circle</v-icon>
  28 + <img src="/static/avatar/download.png"/>
  29 + <!-- <v-icon>fa-user-circle-o</v-icon> -->
  30 + <!-- <v-icon dark>account_circle</v-icon> -->
31 31 </v-avatar>
32 32 </v-btn>
33 33 <v-list class="pa-0">
... ...
src/components/PageHeader.vue
1   -<!--<template>
2   -
3   - <v-layout row class="align-center layout px-4 pt-4 app--page-header">
  1 +<template>
  2 + <div> </div>
  3 + <!-- <v-layout row class="align-center layout px-4 pt-4 app--page-header">
4 4 <div class="page-header-left">
5 5 <h3 class="pr-3">{{title}}</h3>
6 6 </div>
... ... @@ -18,10 +18,10 @@
18 18 <v-icon class="text--secondary">refresh</v-icon>
19 19 </v-btn>
20 20 </div>
21   - </v-layout>
  21 + </v-layout> -->
22 22  
23 23  
24   -</template>-->
  24 +</template>-
25 25  
26 26 <script>
27 27 import menu from '@/api/menu';
... ...
src/pages/Dashboard.vue
1 1 <template>
2 2 <v-tabs
3   - color=""
4   - dark
5   - slider-color="yellow"
  3 +
  4 + slider-color="black"
6 5 >
7   -<v-spacer></v-spacer>
  6 + <v-spacer></v-spacer>
8 7 <v-tab ripple>
9 8 Existing user
10 9 </v-tab>
... ... @@ -19,12 +18,11 @@
19 18 <v-data-table
20 19 :headers="headers"
21 20 :items="desserts"
22   - hide-actions
23 21 class="elevation-1">
24 22 <template slot="items" slot-scope="props">
25   - <td>{{ props.item.No }}</td>
26   - <td>{{ props.item.Name }}</td>
27   - <td>{{ props.item.Email }}</td>
  23 + <td>{{ props.item.No }}</td>
  24 + <td>{{ props.item.Name }}</td>
  25 + <td>{{ props.item.Email }}</td>
28 26 <!-- <td><v-flex xs6>
29 27 </v-flex></td> -->
30 28 <td class="justify-center layout px-0">
... ... @@ -51,43 +49,42 @@
51 49 </td>
52 50 </template>
53 51 </v-data-table>
54   - </v-card-text>
55   - </v-card>
  52 + </v-card-text>
  53 + </v-card>
56 54 </v-tab-item>
57 55 <v-tab-item>
58 56 <v-flex xs12 sm6 offset-sm3>
59 57  
60 58  
61   - <v-card flat>
  59 +<v-card flat>
62 60 <!-- <v-card-text>Contents for Item 2 go here</v-card-text> -->
63   - <v-container fluid fill-height>
  61 + <v-container fluid fill-height>
64 62 <v-layout align-center>
65   - <v-flex xs12 sm8 offset-sm2>
66   - <v-flex offset-sm4>
67   - <v-avatar size="40px">
  63 + <v-flex xs12 sm8 offset-sm2>
  64 + <v-flex offset-sm5>
  65 + <v-avatar size="40px">
68 66 <img src="/static/avatar/download.png"/> </v-avatar>
69   - </v-flex>
70   - <v-form>
  67 + </v-flex>
  68 + <v-form>
71 69  
72 70 <v-text-field
73   - v-validate="'required|first'"
  71 + v-validate="'required|FName'"
74 72 label="First name"
75 73 class="mt-5"
76   - v-model="first"
77   - :rules="[() => first.length > 0 || 'This field is required']"
  74 + v-model="FName"
  75 + :rules="[() => FName.length > 0 || 'This field is required']"
78 76 required
79 77 ></v-text-field>
80 78 <v-text-field
81   - v-validate="'required|last'"
  79 + v-validate="'required|LName'"
82 80 label="Last name"
83   - v-model="last"
84   - :rules="[() => last.length > 0 || 'This field is required']"
  81 + v-model="LName"
  82 + :rules="[() => LName.length > 0 || 'This field is required']"
85 83 required
86 84 ></v-text-field>
87 85 <v-text-field
88   - v-validate="'required|email'"
89 86 v-model="email"
90   - :error-messages="errors.collect('email')"
  87 + :rules="[erules.required, erules.em]"
91 88 label="E-mail"
92 89 data-vv-name="email"
93 90 required>
... ... @@ -97,15 +94,15 @@
97 94 <v-text-field
98 95 v-model="DOB"
99 96 label="Date of Birth"
100   - hint="DD/MM/YYYY"
  97 +
101 98 persistent-hint
102   - @blur="date = parseDate(dateFormatted)"
  99 + :rules="[rules.required, rules.min]"
103 100 required >
104 101 </v-text-field>
105 102 <v-card-actions>
106   - <v-btn @click="clear" large round dark>clear</v-btn>
  103 + <v-btn @click="clear" round dark>clear</v-btn>
107 104 <v-spacer></v-spacer>
108   - <v-btn @click="submit" large round dark>Add</v-btn></v-card-actions>
  105 + <v-btn @click="submit" round dark>Add</v-btn></v-card-actions>
109 106 </v-form>
110 107 </v-flex>
111 108 </v-layout>
... ... @@ -127,13 +124,23 @@ export default {
127 124 validator: 'new'
128 125 },
129 126 data: () => ({
130   - first: '',
131   - last: '',
  127 + FName: '',
  128 + LName: '',
132 129 DOB: '',
133 130 email: '',
  131 + clear: '',
134 132 search: '',
135 133 dialog: false,
136 134 state: ['Pending', 'Approved'],
  135 + rules: {
  136 + required: value => !!value || 'This field is Required.',
  137 + 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'
  138 +
  139 + },
  140 + erules: {
  141 + required: value => !!value || 'This email field is Required.',
  142 + em: v => (v.length > 0 && /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 'Email must be valid')
  143 + },
137 144 headers: [
138 145 {
139 146 text: 'No',
... ... @@ -159,24 +166,6 @@ export default {
159 166 Email: '',
160 167 },
161 168 }),
162   -
163   - checkbox: null,
164   - dictionary: {
165   - attributes: {
166   - email: 'E-mail Address'
167   - // custom attributes
168   - },
169   - custom: {
170   - name: {
171   - required: () => 'Name can not be empty',
172   - max: 'The name field may not be greater than 10 characters'
173   - // custom messages
174   - },
175   - // select: {
176   - // required: 'Select field is required'
177   - // }
178   - }
179   - },
180 169 mounted () {
181 170 this.$validator.localize('en', this.dictionary);
182 171 },
... ... @@ -239,16 +228,23 @@ export default {
239 228 },
240 229  
241 230 clear () {
242   - this.first = '';
243   - this.last = '';
  231 + this.FName = '';
  232 + this.LName = '';
244 233 this.email = '';
245 234 this.DOB = '';
  235 + event.target.reset();
246 236 // this.select = null;
247 237 // this.checkbox = null;
248   - this.$validator.reset();
  238 + // this.$validator.reset();
249 239  
250 240  
251 241 }
252 242 };
253 243  
254 244 </script>
  245 +<style scoped>
  246 +.v-card__actions .v-btn{
  247 + margin: 0 15px;
  248 + min-width: 120px;
  249 +}
  250 +</style>
255 251 \ No newline at end of file
... ...
src/pages/Login.vue
... ... @@ -10,28 +10,27 @@
10 10 <v-content>
11 11 <v-container fluid fill-height>
12 12 <v-layout align-center justify-center>
13   - <v-flex xs12 sm8 md6 lg4>
  13 + <v-flex xs12 sm8 md6 lg5>
14 14 <v-toolbar color="black" dark>
15 15 <v-spacer></v-spacer>
16 16 <v-toolbar-title>Admin Login</v-toolbar-title>
17 17 <v-spacer></v-spacer>
18 18 </v-toolbar>
19 19  
20   - <v-card class="elevation-1 pa-3">
21   - <v-card-text>
  20 + <v-card class="elevation-1 pa-1">
  21 + <v-card-text>
  22 + <v-flex xs12 sm8 md8 lg8 offset-xs2>
22 23 <v-form>
23 24 <v-text-field
24   - append-icon="person"
25   - v-model="email"
26   - :rules="[erules.required, erules.em]"
27   - label="E-mail"
28   - data-vv-name="email"
29   -
30   - ></v-text-field>
  25 + v-model="username"
  26 + :rules="nameRules"
  27 + label="Username"
  28 + required
  29 + ></v-text-field>
31 30 <v-text-field
32 31 :rules="[rules.required, rules.min]"
33 32 v-model="password"
34   - :append-icon="e1 ? 'visibility' : 'visibility_off'"
  33 + :append-icon="e1 ? 'visibility_off' : 'visibility'"
35 34 :append-icon-cb="() => (e1 = !e1)"
36 35 :type="e1 ? 'password' : 'text'"
37 36 name="input-10-1"
... ... @@ -40,12 +39,15 @@
40 39  
41 40 ></v-text-field>
42 41  
43   - </v-form>
  42 + </v-form></v-flex>
44 43 </v-card-text>
  44 + <v-flex xs12 sm8 md8 lg8 offset-xs2>
45 45 <v-checkbox :label="`Remember me`"
46 46 v-model="remember"></v-checkbox>
47   - <h5 class="text-md-center" > <router-link to="/forgetpassword">Forget Password</router-link></h5>
48   - <v-flex class="mt-3 text-md-center">
  47 + <h5 id="fp" > <router-link to="/forgetpassword">Forget Password</router-link></h5>
  48 + </v-flex>
  49 +
  50 + <v-flex class="mt-3 text-md-center">
49 51 <v-btn round color="black" dark large @click="login" :loading="loading">Login</v-btn>
50 52 </v-flex>
51 53 </v-card>
... ... @@ -67,11 +69,16 @@ export default {
67 69 loading: false,
68 70 remember: false,
69 71 valid: false,
70   - Email: '',
71   - erules: {
72   - required: value => !!value || 'This email field is Required.',
73   - em: v => (v.length > 0 && /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 'Email must be valid')
74   - },
  72 + username: '',
  73 + nameRules: [
  74 + v => !!v || 'Username is required',
  75 + // v => v.length >0
  76 + ],
  77 + // email: '',
  78 + // erules: {
  79 + // required: value => !!value || 'This email field is Required.',
  80 + // em: v => (v.length > 0 && /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 'Email must be valid')
  81 + // },
75 82 password: '',
76 83 rules: {
77 84 required: value => !!value || 'This password field is Required.',
... ... @@ -82,11 +89,12 @@ export default {
82 89 },
83 90 methods: {
84 91 login () {
  92 + console.log('=clicked==');
85 93 this.loading = true;
86 94 setTimeout(() => {
87 95 this.$router.push('/dashboard');
88 96 }, 1000);
89   - }
  97 + },
90 98 }
91 99 };
92 100 </script>
... ... @@ -101,11 +109,19 @@ export default {
101 109 z-index: 0;
102 110 }
103 111 </style>
104   -<style>
  112 +<style scoped>
105 113 img{
106 114 position:absolute;
107 115 top:13px;
108   -left:50px
109   -
  116 +left:50px;
  117 +}
  118 +.v-btn--large {
  119 + padding: 0px 84px;
110 120 }
  121 +#fp{
  122 + position: absolute;
  123 + top: 193px;
  124 + right: 128px;
  125 +}
  126 +
111 127 </style>
112 128 \ No newline at end of file
... ...
src/pages/Provider.vue
... ... @@ -36,22 +36,22 @@
36 36 </v-flex></td>
37 37 <td>
38 38 <v-icon
39   - class="mr-1"
40   - @click="report(props.item)"
  39 + class="mr-2"
  40 + @click="report()"
41 41 >
42 42 visibility
43 43 </v-icon>
44 44 <v-icon
45   - class="mr-1"
  45 + class="mr-2"
46 46 @click="editItem(props.item)"
47 47 >
48   - edit
  48 + edit
49 49 </v-icon>
50 50 <v-icon
51   - class="mr-1"
  51 + class="mr-2"
52 52 @click="deleteItem(props.item)"
53 53 >
54   - delete
  54 + delete
55 55 </v-icon>
56 56 </td>
57 57  
... ... @@ -60,15 +60,16 @@
60 60 Your search for "{{ search }}" found no results.
61 61 </v-alert> -->
62 62 </v-data-table>
  63 +
63 64 <v-dialog v-model="dialog" max-width="500px">
64   - <v-toolbar>
  65 + <v-toolbar color="white">
65 66 <v-spacer></v-spacer>
66 67 <v-toolbar-title>Edit Profile</v-toolbar-title>
67 68 <v-spacer></v-spacer>
68 69 </v-toolbar>
69 70 <v-card>
70 71 <v-flex align-center justify-center layout text-xs-center>
71   - <v-avatar size="40px">
  72 + <v-avatar size="40px" style="position:absolute; top:10px; ">
72 73 <img src="/static/avatar/download.png"/> </v-avatar>
73 74 </v-flex>
74 75 <v-card-text>
... ... @@ -77,7 +78,7 @@
77 78 <v-flex xs12 sm9>
78 79 <v-form>
79 80 <v-text-field
80   - v-model="editedItem.FName"
  81 + v-model="editedItem.Name"
81 82 v-validate="'required|max:15'"
82 83 :error-messages="errors.collect('Name')"
83 84 label="Name"
... ... @@ -109,25 +110,51 @@
109 110 v-validate="'required'" >
110 111 </v-text-field>
111 112 <v-card-actions>
  113 +
  114 + <v-btn round dark @click.native="close">Cancel</v-btn>
112 115 <v-spacer></v-spacer>
113   - <v-btn large round dark @click.native="close">Cancel</v-btn>
114   - <v-spacer></v-spacer>
115   - <v-btn large round dark @click.native="save">Save</v-btn>
116   - <v-spacer></v-spacer>
  116 + <v-btn round dark @click.native="save">Save</v-btn>
  117 +
117 118 </v-card-actions>
118 119 </v-form>
119 120 </v-flex>
120 121 </v-layout>
121 122 </v-container>
122 123 </v-card-text>
123   -
124 124 </v-card>
125 125 </v-dialog>
126   - <!-- <v-dialog v-model="dialog1" max-width="500px">
127   - <v-flex></v-flex>
128   - </v-dialog> -->
  126 +
  127 +<v-dialog v-model="dialog1" max-width="500px">
  128 + <v-toolbar color="white">
  129 + <v-spacer></v-spacer>
  130 + <v-toolbar-title>Profile</v-toolbar-title>
  131 + <v-spacer></v-spacer>
  132 + <v-icon @click="close1">close</v-icon>
  133 + </v-toolbar>
  134 +
  135 +
  136 + <v-card>
  137 + <v-flex align-center justify-center layout text-xs-center>
  138 + <v-avatar size="40px" style="position:absolute; top:10px;">
  139 + <img src="/static/avatar/download.png"/> </v-avatar>
  140 + </v-flex>
  141 + <v-card-text>
  142 + <v-container grid-list-md>
  143 + <v-layout wrap justify-center>
  144 + <v-flex xs12 sm9>
  145 + <h5><b></b></h5>
  146 + <h5><b></b></h5>
  147 + <h5><b></b></h5>
  148 + <h5><b></b></h5>
  149 + </v-flex>
  150 + </v-layout>
  151 + </v-container>
  152 + </v-card-text>
129 153 </v-card>
130   - </v-flex>
  154 +</v-dialog>
  155 +
  156 +</v-card>
  157 +</v-flex>
131 158 </v-container>
132 159 </template>
133 160 <script>
... ... @@ -135,8 +162,9 @@ export default {
135 162 data: () => ({
136 163 dialog: false,
137 164 dialog1: false,
138   - status: ['Pending', 'Approved'],
  165 + status: ['Pending', 'Approved', 'Declined'],
139 166 search: '',
  167 + e1: '',
140 168 headers: [
141 169 {
142 170 text: 'No',
... ... @@ -205,11 +233,11 @@ export default {
205 233 this.editedItem = Object.assign({}, item);
206 234 this.dialog = true;
207 235 },
208   - // report (item) {
  236 + report (item) {
209 237 // this.editedIndex = this.desserts.indexOf(item);
210 238 // this.editedItem = Object.assign({}, item);
211   - // this.dialog1 = true;
212   - // },
  239 + this.dialog1 = true;
  240 + },
213 241  
214 242 deleteItem (item) {
215 243 const index = this.desserts.indexOf(item);
... ... @@ -224,6 +252,9 @@ export default {
224 252 this.editedIndex = -1;
225 253 }, 300);
226 254 },
  255 + close1 () {
  256 + this.dialog1 = false;
  257 + },
227 258  
228 259 save () {
229 260 if (this.editedIndex > -1) {
... ... @@ -235,4 +266,10 @@ export default {
235 266 }
236 267 },
237 268 };
238   -</script>
239 269 \ No newline at end of file
  270 +</script>
  271 +<style scoped>
  272 +.v-card__actions .v-btn {
  273 +margin: 0px;
  274 +min-width: 120px;
  275 +}
  276 +</style>
240 277 \ No newline at end of file
... ...
src/pages/changepassword.vue
1 1 <template>
2 2 <v-app id="login">
3   - <v-toolbar color="grey lighten">
  3 + <!-- <v-toolbar color="grey lighten">
4 4 <v-toolbar-items>
5 5 <img src="/static/ana@2x.png" height="36" alt="ana">
6 6 </v-toolbar-items>
7   - </v-toolbar>
8   - <v-content>
  7 + </v-toolbar>-->
  8 + <!-- <v-content> -->
9 9 <v-container fluid fill-height>
10   - <v-layout align-center justify-center>
11   - <v-flex xs12 sm8 md6 lg4>
  10 + <v-layout>
  11 + <v-flex xs12 sm8 md6 lg7 offset-xs2>
12 12 <v-toolbar color="black" dark>
13 13 <v-spacer></v-spacer>
14 14 <v-toolbar-title>Change Password</v-toolbar-title>
15 15 <v-spacer></v-spacer>
16 16  
17 17 </v-toolbar>
18   - <v-card class="elevation-1 pa-3">
  18 + <v-card class="elevation-1 pa-3" id="form">
19 19 <v-card-text>
20   - <v-form class="mt-5">
21   - <v-text-field type="password" label="Password"></v-text-field>
22   - <v-text-field type="password" label="New Password"></v-text-field>
23   - <v-text-field type="password" label="Confirm Password"></v-text-field>
24   - </v-form>
  20 + <v-flex xs12 sm8 md8 lg8 offset-xs2>
  21 + <v-form class="mt-3" >
  22 + <v-text-field
  23 + :rules="[rules.required, rules.min]"
  24 + :append-icon="e1 ? 'visibility_off' : 'visibility'"
  25 + :append-icon-cb="() => (e1 = !e1)"
  26 + :type="e1 ? 'password' : 'text'"
  27 + v-model="password"
  28 + label="Current Password">
  29 + </v-text-field>
  30 + <v-text-field
  31 + v-model="npassword"
  32 + :rules="[rules.required, rules.min]"
  33 + :append-icon="e2 ? 'visibility_off' : 'visibility'"
  34 + :append-icon-cb="() => (e2 = !e2)"
  35 + :type="e2 ? 'password' : 'text'"
  36 + label="New Password"
  37 + ></v-text-field>
  38 + <v-text-field
  39 + v-model="cnpassword"
  40 + :append-icon="e3 ? 'visibility_off' : 'visibility'"
  41 + :append-icon-cb="() => (e3 = !e3)"
  42 + :type="e3 ? 'password' : 'text'"
  43 + label="Confirm Password"
  44 + ></v-text-field>
  45 + </v-form></v-flex>
25 46 </v-card-text>
26 47 <v-card-actions>
  48 +
27 49 <v-flex text-sm-center>
28 50 <v-btn class="mt-3"
29 51 round
30 52 color="black"
31 53 dark large
32   - :loading="loading"
  54 + :loading="loading"
33 55 @click="reset">Reset Password</v-btn></v-flex>
34 56 </v-card-actions>
  57 + <v-snackbar
  58 + :timeout="timeout"
  59 + v-model="snackbar"
  60 + color="green"
  61 + >
  62 + {{ text }}
  63 + <v-icon
  64 + flat
  65 + @click="snackbar = false"
  66 +
  67 + >
  68 + close
  69 + </v-icon>
  70 + </v-snackbar>
35 71 </v-card>
36 72 </v-flex>
37 73 </v-layout>
38 74 </v-container>
39   - </v-content>
40   - <v-footer class="pa-4" color="grey darken-2">
  75 + <!-- </v-content>
  76 + <v-footer class="pa-4" color="grey darken-2">
41 77  
42   - </v-footer>
  78 + </v-footer> -->
43 79 </v-app>
44 80 </template>
45 81 <script>
... ... @@ -47,33 +83,44 @@ import axios from &#39;axios&#39;;
47 83 export default {
48 84 data () {
49 85 return {
50   - show1: false,
  86 + e1: true,
  87 + e2: true,
  88 + e3: true,
  89 + snackbar: false,
  90 + timeout: 1000,
51 91 loading: false,
52 92 valid: false,
53   - model: {
54   - custom: {
55   - password: '',
56   - npassword: '',
57   - cnpassword: '',
58   - }
59   - }
  93 + text: 'Password Changed',
  94 + password: '',
  95 + rules: {
  96 + required: value => !!value || 'This password field is Required.',
  97 + min: v => (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/).test(v) && v.length >= 8 || 'Min 8 characters upper case lower case symbol required'
  98 + },
  99 + npassword: '',
  100 + cnpassword: '',
60 101 };
61 102 },
62 103 methods: {
63 104 reset () {
64 105 this.loading = true;
  106 + this.snackbar = true;
65 107 setTimeout(() => {
  108 +
66 109 this.$router.push('/dashboard');
67   - }, 1000);
  110 +
  111 + }, 2000);
  112 +
68 113 }
69 114 }
70 115 };
71 116 </script>
72   -<style>
  117 +<style scoped>
73 118 img{
74 119 position:absolute;
75 120 top:13px;
76   -left:50px
77   -
  121 +left:50px;
78 122 }
79   -</style>
80 123 \ No newline at end of file
  124 +.v-btn--large {
  125 + padding: 0px 74px;
  126 +}
  127 +</style>
... ...
src/pages/forgetpassword.vue
... ... @@ -8,7 +8,7 @@
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 lg4>
  11 + <v-flex xs12 sm8 md6 lg6>
12 12 <v-toolbar color="black" dark>
13 13 <v-spacer></v-spacer>
14 14  
... ... @@ -16,16 +16,17 @@
16 16 <v-spacer></v-spacer>
17 17  
18 18 </v-toolbar>
19   - <v-card class="elevation-1 pa-3">
  19 + <v-card class="elevation-1 pa-1">
20 20 <v-card-text>
21 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>
  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>
24 25 <v-form class="mt-5">
25 26  
26 27 <v-text-field append-icon="person" v-validate="'required|email'" v-model="email" :error-messages="errors.collect('email')" label="E-mail" data-vv-name="email" required ></v-text-field>
27 28  
28   - </v-form>
  29 + </v-form></v-flex>
29 30 </v-card-text>
30 31 <v-card-actions>
31 32  
... ... @@ -35,12 +36,26 @@
35 36 <h5> You will recieve an email to continue</h5>
36 37 <v-btn class="mt-3" round color="black" dark large @click="login">Send Request</v-btn></v-flex>
37 38 </v-card-actions>
  39 + <v-snackbar
  40 + :timeout="timeout"
  41 + v-model="snackbar"
  42 + color="green"
  43 + >
  44 + {{ text }}
  45 + <v-icon
  46 + flat
  47 + @click="snackbar = false"
  48 +
  49 + >
  50 + close
  51 + </v-icon>
  52 + </v-snackbar>
38 53 </v-card>
39 54 </v-flex>
40 55 </v-layout>
41 56 </v-container>
42 57 </v-content>
43   - <v-footer class="pa-4" color="grey darken-2">
  58 + <v-footer class="pa-4" color="grey darken-2">
44 59  
45 60 </v-footer>
46 61 </v-app>
... ... @@ -48,16 +63,17 @@
48 63 <script>
49 64 export default {
50 65 data: () => ({
  66 + text: 'Link send to your Email address',
  67 + snackbar: false,
  68 + timeout: 1000,
51 69 loading: false,
52   - model: {
53   - Email: ''
54   -
55   - }
  70 + email: ''
56 71 }),
57 72  
58 73 methods: {
59 74 login () {
60   - this.loading = true;
  75 + // this.loading = true;
  76 + this.snackbar = true;
61 77 setTimeout(() => {
62 78 this.$router.push('/');
63 79 }, 1000);
... ... @@ -76,4 +92,12 @@ export default {
76 92 content: "";
77 93 z-index: 0;
78 94 }
  95 +img{
  96 +position:absolute;
  97 +top:13px;
  98 +left:50px;
  99 +}
  100 +.v-btn--large {
  101 + padding: 0px 74px;
  102 +}
79 103 </style>
80 104 \ No newline at end of file
... ...
src/pages/notification.vue
1 1 <template>
2 2 <v-app id="login">
3   - <v-toolbar class="elevation-0 transparent">
  3 + <!-- <v-toolbar class="elevation-0 transparent"> -->
  4 + <v-toolbar color="white">
4 5 <h4 class="text-lg-left"><b>Push Notification</b></h4>
5 6 <v-spacer></v-spacer>
6 7 <v-flex xs6 sm4>
... ... @@ -10,7 +11,7 @@
10 11 label="Find your users"
11 12 single-line
12 13 hide-details
13   - >
  14 + >
14 15 </v-text-field>
15 16 </v-flex>
16 17 </v-toolbar>
... ...
src/pages/questions.vue
... ... @@ -0,0 +1,237 @@
  1 +<template>
  2 +<v-container grid-list-xl>
  3 + <v-flex>
  4 + <v-card>
  5 + <v-toolbar flat color="white">
  6 + <v-toolbar-title>Forum Questions</v-toolbar-title>
  7 + <v-spacer></v-spacer>
  8 + <v-dialog v-model="dialog" max-width="800px">
  9 + <v-btn slot="activator" flat class="mb-2">Add New Question<v-icon>add</v-icon></v-btn>
  10 + <!-- <v-btn slot="activator" flat class="mb-2">Add New Question</v-btn> -->
  11 + <v-card>
  12 + <v-card-title>
  13 + <span class="headline">{{ formTitle }}</span>
  14 + <v-spacer></v-spacer>
  15 + <v-icon @click="close">close</v-icon>
  16 + </v-card-title>
  17 + <v-flex>
  18 + <v-card>
  19 + <v-card-text>
  20 + <span>
  21 + <p><b>Ana Suggestion:</b> Select Suggestion</p></span>
  22 + <h5>Select Category:</h5>
  23 + <span>
  24 + <v-btn color="black" flat>Suggestion</v-btn>
  25 + <v-btn color="black" flat>Sex</v-btn>
  26 + <v-btn color="black" flat>Health</v-btn>
  27 + <v-btn color="black" flat>Skin & Beauty</v-btn>
  28 + <v-btn color="black" flat>Diet & Ex</v-btn>
  29 + </span>
  30 + </v-card-text>
  31 + </v-card>
  32 + </v-flex>
  33 + <v-card-text>
  34 + <v-container grid-list-md>
  35 + <v-layout wrap>
  36 + <v-flex xs12 sm6 md12>
  37 + <!-- <v-text-area solo label="Type Question"></v-text-area> -->
  38 + <v-textarea
  39 + solo
  40 + name="input-7-4"
  41 + label="Type Question"
  42 + ></v-textarea>
  43 + </v-flex>
  44 + </v-layout>
  45 + </v-container>
  46 + </v-card-text>
  47 +
  48 + <v-card-actions>
  49 + <v-spacer></v-spacer>
  50 + <v-btn dark large @click.native="save">Post Question</v-btn>
  51 + </v-card-actions>
  52 + </v-card>
  53 + </v-dialog>
  54 +
  55 +
  56 +
  57 + <v-dialog v-model="dialog1" max-width="800px">
  58 + <v-card>
  59 + <v-card-title>
  60 + <span class="headline">Edit Question</span>
  61 + <v-spacer></v-spacer>
  62 + <v-icon @click="close1">close</v-icon>
  63 + </v-card-title>
  64 +
  65 + <v-card-text>
  66 + <v-layout wrap>
  67 + <v-flex xs12 sm6 md12>
  68 + <v-text-field outline v-model="editedItem.ques" label="Question"></v-text-field>
  69 + </v-flex>
  70 + </v-layout>
  71 + <span><p> <b>Ana suggestion:</b> Abnormal Uterine Bleeding <br>
  72 + Diagnosis 1,Diagnosis 2,Diagnosis 3
  73 + <v-btn dark large @click.native="save1" style="position:absolute; top:163px; right:5px;">Save Edit</v-btn></p></span>
  74 + </v-card-text>
  75 + <v-card-actions>
  76 + <v-spacer></v-spacer>
  77 + <!-- <v-btn dark large @click.native="save1">Save Edit</v-btn> -->
  78 + </v-card-actions>
  79 + </v-card>
  80 + </v-dialog>
  81 + </v-toolbar>
  82 + <v-data-table
  83 + :headers="headers"
  84 + :items="desserts"
  85 + class="elevation-1"
  86 + >
  87 + <template slot="items" slot-scope="props">
  88 +
  89 + <td>{{ props.item.no }}</td>
  90 + <td>{{ props.item.ques }}</td>
  91 + <td>{{ props.item.res }}</td>
  92 +
  93 + <td class="justify-center layout px-0">
  94 + <v-icon
  95 + class="mr-3"
  96 + @click="editItem(props.item)"
  97 + >
  98 + edit
  99 + </v-icon>
  100 + <v-icon
  101 + @click="deleteItem(props.item)"
  102 + >
  103 + delete
  104 + </v-icon>
  105 + </td>
  106 + <td></td>
  107 + <td></td>
  108 + </template>
  109 + <!-- <template slot="no-data">
  110 + <v-btn color="primary" @click="initialize">Reset</v-btn>
  111 + </template> -->
  112 + </v-data-table>
  113 +
  114 + </v-card>
  115 + </v-flex>
  116 + </v-container>
  117 +</template>
  118 +<script>
  119 +export default {
  120 + data: () => ({
  121 + dialog: false,
  122 + dialog1: false,
  123 + headers: [
  124 + {
  125 + text: 'No.',
  126 + align: 'left',
  127 + sortable: false,
  128 + value: 'name'
  129 + },
  130 + { text: 'Posts', value: 'posts', sortable: false },
  131 + { text: 'Responses', value: 'responses', sortable: false },
  132 + { text: '', value: 'carbs', sortable: false },
  133 + { text: '', value: '', sortable: false },
  134 + { text: '', value: '', sortable: false }
  135 + ],
  136 + desserts: [],
  137 + editedIndex: -1,
  138 + editedItem: {
  139 + name: '',
  140 + calories: 0,
  141 + fat: 0,
  142 + carbs: 0,
  143 + protein: 0
  144 + },
  145 + defaultItem: {
  146 + name: '',
  147 + calories: 0,
  148 + fat: 0,
  149 + carbs: 0,
  150 + protein: 0
  151 + }
  152 + }),
  153 +
  154 + computed: {
  155 + formTitle () {
  156 + return this.editedIndex === -1 ? 'Create New Question' : 'Edit Question';
  157 + }
  158 + },
  159 +
  160 + watch: {
  161 + dialog (val) {
  162 + val || this.close();
  163 + }
  164 + },
  165 +
  166 + created () {
  167 + this.initialize();
  168 + },
  169 +
  170 + methods: {
  171 + initialize () {
  172 + this.desserts = [
  173 + {
  174 + no: '1',
  175 + ques: 159,
  176 + res: 6.0,
  177 +
  178 + },
  179 + {
  180 + no: '2',
  181 + ques: 237,
  182 + res: 9.0,
  183 +
  184 + },
  185 + {
  186 + no: '3',
  187 + ques: 262,
  188 + res: 16.0,
  189 +
  190 + },
  191 + ];
  192 + },
  193 +
  194 + editItem (item) {
  195 + this.editedIndex = this.desserts.indexOf(item);
  196 + this.editedItem = Object.assign({}, item);
  197 + this.dialog1 = true;
  198 + },
  199 +
  200 + deleteItem (item) {
  201 + const index = this.desserts.indexOf(item);
  202 + confirm('Are you sure you want to delete this item?') && this.desserts.splice(index, 1);
  203 + },
  204 +
  205 + close () {
  206 + this.dialog = false;
  207 + setTimeout(() => {
  208 + this.editedItem = Object.assign({}, this.defaultItem);
  209 + this.editedIndex = -1;
  210 + }, 300);
  211 + },
  212 + close1 () {
  213 + this.dialog1 = false;
  214 + setTimeout(() => {
  215 + this.editedItem = Object.assign({}, this.defaultItem);
  216 + this.editedIndex = -1;
  217 + }, 300);
  218 + },
  219 + save () {
  220 + if (this.editedIndex > -1) {
  221 + Object.assign(this.desserts[this.editedIndex], this.editedItem);
  222 + } else {
  223 + this.desserts.push(this.editedItem);
  224 + }
  225 + this.close();
  226 + },
  227 + save1 () {
  228 + if (this.editedIndex > -1) {
  229 + Object.assign(this.desserts[this.editedIndex], this.editedItem);
  230 + } else {
  231 + this.desserts.push(this.editedItem);
  232 + }
  233 + this.close1();
  234 + }
  235 + }
  236 +};
  237 +</script>
0 238 \ No newline at end of file
... ...
src/router/paths.js
... ... @@ -47,10 +47,9 @@ export default [
47 47 },
48 48 {
49 49 path: '/changepassword',
50   - meta: {
51   - public: true,
52   - },
53   - name: 'ServerError',
  50 + meta: { },
  51 + name: 'changepassword',
  52 + props: (route) => ({ type: route.query.type }),
54 53 component: () => import(
55 54 /* webpackChunkName: "routes" */
56 55 /* webpackMode: "lazy-once" */
... ... @@ -58,6 +57,18 @@ export default [
58 57 )
59 58 },
60 59 // {
  60 + // path: '/changepassword',
  61 + // meta: {
  62 + // public: true,
  63 + // },
  64 + // name: 'ServerError',
  65 + // component: () => import(
  66 + // webpackChunkName: "routes" */
  67 + // webpackMode: "lazy-once" */
  68 + // `@/pages/changepassword.vue`
  69 + // )
  70 + // },
  71 + // {
61 72 // path: '/',
62 73 // meta: { },
63 74 // name: 'Root',
... ... @@ -158,7 +169,21 @@ export default [
158 169 /* webpackMode: "lazy-once" */
159 170 `@/pages/notification.vue`
160 171 )
161   - },
  172 + },
  173 + {
  174 + path: '/questions',
  175 + meta: {},
  176 + name: 'questions',
  177 + props: (route) => ({
  178 + type: route.query.type
  179 + }),
  180 + component: () =>
  181 + import(
  182 + /* webpackChunkName: "routes" */
  183 + /* webpackMode: "lazy-once" */
  184 + `@/pages/questions.vue`
  185 + )
  186 + },
162 187 {
163 188 path: '/adduser',
164 189 meta: { },
... ...