Commit e3e2a04c6184db753d7a8bde48c95adff0498ad0
1 parent
4d962bb59d
Exists in
master
and in
3 other branches
first commit
Showing
16 changed files
with
1018 additions
and
575 deletions
Show diff stats
config/index.js
... | ... | @@ -15,7 +15,7 @@ module.exports = { |
15 | 15 | }, |
16 | 16 | |
17 | 17 | // Various Dev Server settings |
18 | - host: 'localhost', // can be overwritten by process.env.HOST | |
18 | + host: '0.0.0.0', // can be overwritten by process.env.HOST | |
19 | 19 | port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined |
20 | 20 | autoOpenBrowser: false, |
21 | 21 | errorOverlay: true, | ... | ... |
index.html
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | <meta name="viewport" content="width=device-width,initial-scale=1.0"> |
6 | 6 | <link href='https://fonts.googleapis.com/css?family=Roboto:300,400,500,700%7CMaterial+Icons' rel="stylesheet"> |
7 | 7 | <script src="https://cdn.bootcss.com/echarts/4.0.4/echarts-en.min.js"></script> |
8 | - <title>ana</title> | |
8 | + <title>School Management</title> | |
9 | 9 | <link rel="shortcut icon" href="/static/ana.png" type="image/x-icon"> |
10 | 10 | <meta name="description" content="Vue Material Admin Template is a |
11 | 11 | Google Material Design inspired admin dashboard template built with Vue andVuetify."> | ... | ... |
src/Services/http.js
src/api/menu.js
... | ... | @@ -21,31 +21,29 @@ const Menu = [ |
21 | 21 | // icon: 'email', |
22 | 22 | // }, |
23 | 23 | { |
24 | - title: 'User', | |
24 | + title: 'Teachers', | |
25 | 25 | // group: '', |
26 | 26 | name: 'Dashboard', |
27 | - icon: 'face', | |
27 | + icon: 'group', | |
28 | 28 | }, |
29 | 29 | |
30 | 30 | { |
31 | - title: 'Health Care Provider', | |
31 | + title: 'Students', | |
32 | 32 | // group: 'apps', |
33 | - name: 'Provider', | |
34 | - icon: 'local_hospital', | |
35 | - }, | |
36 | - { | |
37 | - title: 'Notification', | |
38 | - // group: 'apps', | |
39 | - name: 'notification', | |
40 | - icon: 'add_alert', | |
41 | - }, | |
42 | - { | |
43 | - title: 'Forum Questions', | |
44 | - // group: 'apps', | |
45 | - name: 'questions', | |
46 | - icon: 'live_help', | |
33 | + name: 'Students', | |
34 | + icon: 'school', | |
47 | 35 | }, |
48 | 36 | // { |
37 | + // title: 'Notification', | |
38 | + // name: 'notification', | |
39 | + // icon: 'add_alert', | |
40 | + // }, | |
41 | + // { | |
42 | + // title: 'Forum Questions', | |
43 | + // name: 'questions', | |
44 | + // icon: 'live_help', | |
45 | + // }, | |
46 | + // { | |
49 | 47 | // title: 'Widgets', |
50 | 48 | // group: 'widgets', |
51 | 49 | // component: 'widgets', | ... | ... |
src/components/AppDrawer.vue
... | ... | @@ -9,7 +9,8 @@ |
9 | 9 | width="260" |
10 | 10 | > |
11 | 11 | <v-toolbar color="grey lighten" > |
12 | - <img v-bind:src="computeLogo" height="30" class="imgLogo" alt="ana"> | |
12 | + <!-- <img v-bind:src="computeLogo" height="30" class="imgLogo" alt="ana"> --> | |
13 | + <h4 class="white--text my-3 ml-4">School-Managament</h4> | |
13 | 14 | <v-toolbar-title class="ml-0 pl-3"> |
14 | 15 | </v-toolbar-title> |
15 | 16 | </v-toolbar> |
... | ... | @@ -96,9 +97,9 @@ export default { |
96 | 97 | computeGroupActive () { |
97 | 98 | return true; |
98 | 99 | }, |
99 | - computeLogo () { | |
100 | - return '/static/ana@2x.png'; | |
101 | - }, | |
100 | + // computeLogo () { | |
101 | + // return '/static/ana@2x.png'; | |
102 | + // }, | |
102 | 103 | |
103 | 104 | sideToolbarColor () { |
104 | 105 | return this.$vuetify.options.extra.sideNav; | ... | ... |
src/components/AppToolbar.vue
... | ... | @@ -8,7 +8,6 @@ |
8 | 8 | <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon> |
9 | 9 | </v-toolbar-title> |
10 | 10 | <v-spacer></v-spacer> |
11 | - <h5 class="white--text name">{{userName}}</h5> | |
12 | 11 | <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition"> |
13 | 12 | <v-btn icon large flat slot="activator"> |
14 | 13 | <v-avatar size="40px"> |
... | ... | @@ -81,9 +80,6 @@ export default { |
81 | 80 | Util.toggleFullScreen(); |
82 | 81 | } |
83 | 82 | }, |
84 | - mounted(){ | |
85 | - this.userName = this.$store.state.name; | |
86 | -} | |
87 | 83 | }; |
88 | 84 | </script> |
89 | 85 | <style> | ... | ... |
src/components/PageHeader.vue
src/event.js
src/pages/Dashboard.vue
... | ... | @@ -8,20 +8,19 @@ |
8 | 8 | <v-toolbar-title class="ml-0 pl-3"> |
9 | 9 | <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon> |
10 | 10 | </v-toolbar-title> |
11 | -<!-- ****** SEARCH ALL EXISTING USERS ****** --> | |
11 | +<!-- ****** SEARCH ALL Teachers ****** --> | |
12 | 12 | <v-flex xs7 sm3 class="userSearch"> |
13 | 13 | <v-text-field |
14 | 14 | flat |
15 | 15 | prepend-icon="search" |
16 | - label="Find your user" | |
17 | - v-model="term" | |
16 | + label="Find your Teachers" | |
17 | + v-model="search" | |
18 | 18 | color="black" |
19 | - @change="getPatientList" | |
19 | + @change="getTeacherList" | |
20 | 20 | > |
21 | 21 | </v-text-field> |
22 | 22 | </v-flex> |
23 | 23 | <v-spacer></v-spacer> |
24 | - <h5 class="white--text name"> {{ userName }} </h5> | |
25 | 24 | <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition"> |
26 | 25 | <v-btn icon large flat slot="activator"> |
27 | 26 | <v-avatar size="40px"> |
... | ... | @@ -47,15 +46,15 @@ |
47 | 46 | v-bind:class="{ active: isActive }" |
48 | 47 | id="tab" |
49 | 48 | class="subheading" |
50 | - >Existing User</v-tab> | |
49 | + >Existing Teachers</v-tab> | |
51 | 50 | <v-tab |
52 | 51 | ripple |
53 | 52 | @click="activeTab('new')" |
54 | 53 | v-bind:class="{ active: newActive }" |
55 | - id="tab1" | |
54 | + id="tab1"User | |
56 | 55 | class="subheading" |
57 | - >Add New Users</v-tab> | |
58 | -<!-- ****** EDIT USERS Patient Dtails ****** --> | |
56 | + >Add New Teachers</v-tab> | |
57 | +<!-- ****** EDIT Teachers Dtails ****** --> | |
59 | 58 | <v-tab-item> |
60 | 59 | <v-snackbar |
61 | 60 | :timeout="timeout" |
... | ... | @@ -110,7 +109,7 @@ |
110 | 109 | ></v-text-field> |
111 | 110 | </v-flex> |
112 | 111 | </v-layout> |
113 | - <v-layout> | |
112 | + <!-- <v-layout> | |
114 | 113 | <v-flex xs4 class="pt-4 subheading"> |
115 | 114 | <label>Date of Birth:</label> |
116 | 115 | </v-flex> |
... | ... | @@ -140,7 +139,7 @@ |
140 | 139 | ></v-date-picker> |
141 | 140 | </v-menu> |
142 | 141 | </v-flex> |
143 | - </v-layout> | |
142 | + </v-layout> --> | |
144 | 143 | <v-card-actions> |
145 | 144 | <v-btn round dark @click.native="close">Cancel</v-btn> |
146 | 145 | <v-spacer></v-spacer> |
... | ... | @@ -153,7 +152,7 @@ |
153 | 152 | </v-card-text> |
154 | 153 | </v-card> |
155 | 154 | </v-dialog> |
156 | -<!-- ****** PROFILE VIEW pateints Details ****** --> | |
155 | +<!-- ****** PROFILE VIEW Teachers Details ****** --> | |
157 | 156 | <v-dialog v-model="dialog1" max-width="600px"> |
158 | 157 | <v-toolbar color="white"> |
159 | 158 | <v-spacer></v-spacer> |
... | ... | @@ -187,14 +186,14 @@ |
187 | 186 | <h5>{{ editedItem.email }}</h5> |
188 | 187 | </v-flex> |
189 | 188 | </v-layout> |
190 | - <v-layout> | |
189 | + <!-- <v-layout> | |
191 | 190 | <v-flex xs6 sm6 > |
192 | 191 | <h5 class="right my-3">Date Of Birth:</h5> |
193 | 192 | </v-flex> |
194 | 193 | <v-flex sm6 xs8> |
195 | 194 | <h5 class="my-3">{{ editedItem.dob }}</h5> |
196 | 195 | </v-flex> |
197 | - </v-layout> | |
196 | + </v-layout> --> | |
198 | 197 | </v-flex> |
199 | 198 | </v-layout> |
200 | 199 | </v-container> |
... | ... | @@ -202,7 +201,7 @@ |
202 | 201 | </v-card> |
203 | 202 | </v-dialog> |
204 | 203 | |
205 | - <v-dialog v-model="dialog2" width="700px"> | |
204 | + <!-- <v-dialog v-model="dialog2" width="700px"> | |
206 | 205 | <v-card> |
207 | 206 | <div id="dialog"> |
208 | 207 | <h4> |
... | ... | @@ -248,7 +247,7 @@ |
248 | 247 | <component v-bind:is="component"></component> |
249 | 248 | </div> |
250 | 249 | </v-card> |
251 | - </v-dialog> | |
250 | + </v-dialog> --> | |
252 | 251 | <v-snackbar |
253 | 252 | :timeout="timeout" |
254 | 253 | :top="y === 'top'" |
... | ... | @@ -257,11 +256,13 @@ |
257 | 256 | v-model="snackbar" |
258 | 257 | color="success" |
259 | 258 | >{{ text }}</v-snackbar> |
260 | -<!-- ****** EXISTING-USERS PatientList Table ****** --> | |
259 | + | |
260 | +<!-- ****** EXISTING-Teachers Table Data****** --> | |
261 | 261 | <v-data-table |
262 | 262 | :headers="headers" |
263 | 263 | :items="desserts" |
264 | 264 | :pagination.sync="pagination" |
265 | + :search="search" | |
265 | 266 | > <!-- </v-content> |
266 | 267 | <v-footer class="pa-4" color="grey darken-2"> |
267 | 268 | |
... | ... | @@ -273,12 +274,12 @@ |
273 | 274 | |
274 | 275 | <td class="text-xs-center"> |
275 | 276 | <span> |
276 | - <img | |
277 | + <!-- <img | |
277 | 278 | style="cursor:pointer; height:20px; " |
278 | 279 | class="mr-5" |
279 | 280 | @click="report(props.item)" |
280 | 281 | src="/static/icon/List1.png" |
281 | - > | |
282 | + > --> | |
282 | 283 | <img |
283 | 284 | style="cursor:pointer; width:25px; height:18px; " |
284 | 285 | class="mr-5" |
... | ... | @@ -305,10 +306,10 @@ |
305 | 306 | :value="true" |
306 | 307 | color="error" |
307 | 308 | icon="warning" |
308 | - >Your search for "{{ term }}" found no results.</v-alert> | |
309 | + >Your search for "{{ search }}" found no results.</v-alert> | |
309 | 310 | </v-data-table> |
310 | 311 | </v-tab-item> |
311 | -<!-- ****** ADD USER PATIENT ****** --> | |
312 | +<!-- ****** ADD Teachers ****** --> | |
312 | 313 | <v-tab-item> |
313 | 314 | <v-container> |
314 | 315 | <v-snackbar |
... | ... | @@ -345,7 +346,7 @@ |
345 | 346 | ></v-text-field> |
346 | 347 | </v-flex> |
347 | 348 | </v-layout> |
348 | - <v-layout> | |
349 | + <!-- <v-layout> | |
349 | 350 | <v-flex xs4 class="pt-4 subheading"> |
350 | 351 | <label class="right">Country:</label> |
351 | 352 | </v-flex> |
... | ... | @@ -357,7 +358,7 @@ |
357 | 358 | single-line |
358 | 359 | ></v-select> |
359 | 360 | </v-flex> |
360 | - </v-layout> | |
361 | + </v-layout> --> | |
361 | 362 | <v-layout> |
362 | 363 | <v-flex xs4 class="pt-4 subheading"> |
363 | 364 | <label class="right">Email ID:</label> |
... | ... | @@ -373,7 +374,7 @@ |
373 | 374 | ></v-text-field> |
374 | 375 | </v-flex> |
375 | 376 | </v-layout> |
376 | - <v-layout> | |
377 | + <!-- <v-layout> | |
377 | 378 | <v-flex xs4 class="pt-4 subheading"> |
378 | 379 | <label class="right">Date of Birth:</label> |
379 | 380 | </v-flex> |
... | ... | @@ -403,7 +404,7 @@ |
403 | 404 | ></v-date-picker> |
404 | 405 | </v-menu> |
405 | 406 | </v-flex> |
406 | - </v-layout> | |
407 | + </v-layout> --> | |
407 | 408 | <v-layout> |
408 | 409 | <v-flex xs12 sm9 offset-sm2> |
409 | 410 | <v-card-actions> |
... | ... | @@ -427,22 +428,22 @@ |
427 | 428 | |
428 | 429 | <script> |
429 | 430 | // import AppToolbar from '@/components/AppToolbar'; |
430 | -import onemonth from "@/components/report/onemonth.vue"; | |
431 | -import threemonth from "@/components/report/threemonth.vue"; | |
432 | -import sixmonth from "@/components/report/sixmonth.vue"; | |
433 | -import ninemonth from "@/components/report/ninemonth.vue"; | |
434 | -import generatereport from "@/components/report/generatereport.vue"; | |
431 | +// import onemonth from "@/components/report/onemonth.vue"; | |
432 | +// import threemonth from "@/components/report/threemonth.vue"; | |
433 | +// import sixmonth from "@/components/report/sixmonth.vue"; | |
434 | +// import ninemonth from "@/components/report/ninemonth.vue"; | |
435 | +// import generatereport from "@/components/report/generatereport.vue"; | |
435 | 436 | import http from "@/Services/http.js"; |
436 | 437 | import NotificationList from "@/components/widgets/list/NotificationList"; |
437 | 438 | import Util from "@/util"; |
438 | 439 | |
439 | 440 | export default { |
440 | 441 | components: { |
441 | - "one-month": onemonth, | |
442 | - "three-month": threemonth, | |
443 | - "six-month": sixmonth, | |
444 | - "nine-month": ninemonth, | |
445 | - "report-generate": generatereport, | |
442 | + // "one-month": onemonth, | |
443 | + // "three-month": threemonth, | |
444 | + // "six-month": sixmonth, | |
445 | + // "nine-month": ninemonth, | |
446 | + // "report-generate": generatereport, | |
446 | 447 | }, |
447 | 448 | data: () => ({ |
448 | 449 | component: "report-generate", |
... | ... | @@ -454,7 +455,7 @@ export default { |
454 | 455 | text: "", |
455 | 456 | loading: false, |
456 | 457 | date:null, |
457 | - term: "", | |
458 | + search: '', | |
458 | 459 | modal: false, |
459 | 460 | modaledit:false, |
460 | 461 | menu: false, |
... | ... | @@ -475,26 +476,14 @@ export default { |
475 | 476 | loading3: false, |
476 | 477 | loading4: false, |
477 | 478 | details: [], |
478 | - countries:['US','Canada'], | |
479 | - AddUsercredentials: {}, | |
480 | 479 | pagination: { |
481 | 480 | rowsPerPage: 15 |
482 | 481 | }, |
483 | - rules: { | |
484 | - required: value => !!value || "Date of Birth is Required.", | |
485 | - min: v => | |
486 | - (/^(0?[1-9]|[12][0-9]|3[01])[\/\-](0?[1-9]|1[012])[\/\-]\d{4}$/.test( | |
487 | - v | |
488 | - ) && | |
489 | - v.length > 0) || | |
490 | - "Please enter a date in the format dd/mm/yyyy" | |
491 | - }, | |
492 | 482 | nameRules: [v => !!v || " Full Name is required"], |
493 | 483 | emailRules: [ |
494 | 484 | v => !!v || "E-mail is required", |
495 | 485 | v => /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 'E-mail must be valid' |
496 | 486 | ], |
497 | - countryRules: [v => !!v || " Country Name is required"], | |
498 | 487 | headers: [ |
499 | 488 | { |
500 | 489 | text: "No", |
... | ... | @@ -509,18 +498,14 @@ export default { |
509 | 498 | desserts: [], |
510 | 499 | editedIndex: -1, |
511 | 500 | editedItem: { |
512 | - No: "", | |
501 | + role: "TEACHER", | |
513 | 502 | name: "", |
514 | 503 | email: "", |
515 | - date: null, | |
516 | - country: "" | |
517 | 504 | }, |
518 | 505 | defaultItem: { |
519 | - No: "", | |
506 | + role: "TEACHER", | |
520 | 507 | name: "", |
521 | 508 | email: "", |
522 | - date: null, | |
523 | - dob: "" | |
524 | 509 | }, |
525 | 510 | userName:'', |
526 | 511 | items: [ |
... | ... | @@ -549,17 +534,16 @@ export default { |
549 | 534 | } |
550 | 535 | }, |
551 | 536 | methods: { |
552 | - save (date) { | |
553 | - this.$refs.menu.save(date) | |
554 | - }, | |
555 | - getPatientList() { | |
537 | + getTeacherList() { | |
556 | 538 | var token = this.$store.state.token; |
557 | - http() | |
558 | - .get("/patientList?term=" + this.term, { | |
539 | + http() | |
540 | + .get("/getTeachersList", { | |
559 | 541 | headers: { Authorization: "Bearer " + token } |
560 | 542 | }) |
561 | 543 | .then(response => { |
562 | - this.desserts = response.data.data.existingUser; | |
544 | + this.desserts = response.data.data; | |
545 | + console.log("getTeacherList=====>",this.desserts) | |
546 | + | |
563 | 547 | }) |
564 | 548 | .catch(err => { |
565 | 549 | // console.log("err====>", err); |
... | ... | @@ -576,26 +560,28 @@ export default { |
576 | 560 | this.editedItem = Object.assign({}, item); |
577 | 561 | this.dialog1 = true; |
578 | 562 | }, |
579 | - report(item) { | |
580 | - this.editedIndex = this.desserts.indexOf(item); | |
581 | - this.editedItem = Object.assign({}, item); | |
582 | - this.dialog2 = true; | |
583 | - }, | |
563 | + // report(item) { | |
564 | + // this.editedIndex = this.desserts.indexOf(item); | |
565 | + // this.editedItem = Object.assign({}, item); | |
566 | + // this.dialog2 = true; | |
567 | + // }, | |
584 | 568 | |
585 | 569 | deleteItem(item) { |
586 | - let addUsers = { | |
587 | - userId: item.userId | |
570 | + let deleteTeachers = { | |
571 | + teacherId: item._id | |
588 | 572 | }; |
573 | + console.log("deleteUers",deleteTeachers) | |
589 | 574 | http() |
590 | - .post("/deletePatient", confirm('Are you sure you want to delete this?') && addUsers) | |
575 | + .delete("/deleteTeacher", confirm('Are you sure you want to delete this?') && { params: deleteTeachers }) | |
591 | 576 | .then(response => { |
577 | + console.log("deleteUers",deleteTeachers) | |
592 | 578 | if ((this.snackbar = true)) { |
593 | 579 | this.text = "Successfully delete Existing User"; |
594 | 580 | } |
595 | - this.getPatientList(); | |
581 | + this.getTeacherList(); | |
596 | 582 | }) |
597 | 583 | .catch(error => { |
598 | - // console.log(error); | |
584 | + console.log(error); | |
599 | 585 | }); |
600 | 586 | }, |
601 | 587 | activeTab(type) { |
... | ... | @@ -656,15 +642,14 @@ export default { |
656 | 642 | if (this.$refs.form.validate()) { |
657 | 643 | let addUsers = { |
658 | 644 | name: this.editedItem.name, |
659 | - dob: this.editedItem.date, | |
660 | 645 | email: this.editedItem.email, |
661 | - country: this.editedItem.country | |
646 | + role: this.editedItem.role | |
662 | 647 | }; |
663 | 648 | // console.log(addUsers) |
664 | 649 | http() |
665 | - .post("/patient", addUsers) | |
650 | + .post("/createTeacher", addUsers) | |
666 | 651 | .then(response => { |
667 | - this.getPatientList(); | |
652 | + this.getTeacherList(); | |
668 | 653 | if (this.snackbar = true) { |
669 | 654 | this.text = "New user added successfully"; |
670 | 655 | } |
... | ... | @@ -689,17 +674,17 @@ export default { |
689 | 674 | save() { |
690 | 675 | let editUsers = { |
691 | 676 | name: this.editedItem.name, |
692 | - dob: this.editedItem.dob, | |
693 | 677 | email: this.editedItem.email, |
694 | - userId: this.editedItem.userId | |
678 | + teacherId: this.editedItem._id | |
695 | 679 | }; |
696 | 680 | http() |
697 | - .post("/patientDetail", editUsers) | |
681 | + .put("/updateTeacher", editUsers) | |
698 | 682 | .then(response => { |
683 | + console.log("editUsers",editUsers); | |
699 | 684 | if ((this.snackbar = true)) { |
700 | 685 | this.text = "Successfully Edit Existing User"; |
701 | 686 | } |
702 | - this.getPatientList(); | |
687 | + this.getTeacherList(); | |
703 | 688 | }) |
704 | 689 | .catch(error => { |
705 | 690 | // console.log(error); |
... | ... | @@ -714,8 +699,9 @@ export default { |
714 | 699 | } |
715 | 700 | }, |
716 | 701 | mounted() { |
717 | - this.getPatientList(); | |
718 | - this.userName = this.$store.state.name; | |
702 | + this.getTeacherList(); | |
703 | + // console.log("Id",this.$store.state.id) | |
704 | + // console.log("token",this.$store.state.token) | |
719 | 705 | }, |
720 | 706 | computed:{ |
721 | 707 | toolbarColor() { | ... | ... |
src/pages/Login.vue
... | ... | @@ -2,7 +2,8 @@ |
2 | 2 | <v-app id="login"> |
3 | 3 | <v-toolbar color="grey lighten"> |
4 | 4 | <v-toolbar-items> |
5 | - <img src="/static/ana@2x.png" height="36" alt="ana"> | |
5 | + <!-- <img src="/static/ana@2x.png" height="36" alt="ana"> --> | |
6 | + <h3 class="white--text my-3 ml-4">School-Management</h3> | |
6 | 7 | </v-toolbar-items> |
7 | 8 | </v-toolbar> |
8 | 9 | <v-content> |
... | ... | @@ -19,7 +20,7 @@ |
19 | 20 | <v-flex xs12 sm10 md6 lg4> |
20 | 21 | <v-toolbar color="black" dark> |
21 | 22 | <v-spacer></v-spacer> |
22 | - <v-toolbar-title>Admin Login</v-toolbar-title> | |
23 | + <v-toolbar-title>School Login</v-toolbar-title> | |
23 | 24 | <v-spacer></v-spacer> |
24 | 25 | </v-toolbar> |
25 | 26 | |
... | ... | @@ -28,13 +29,13 @@ |
28 | 29 | <v-flex xs12 sm12 md12 lg12> |
29 | 30 | <v-form ref="form" v-model="valid" lazy-validation> |
30 | 31 | <v-text-field |
31 | - v-model="userLogincredentials.userName" | |
32 | + v-model="userLogincredentials.email" | |
32 | 33 | :rules="nameRules" |
33 | 34 | label="Username" |
34 | 35 | required |
35 | 36 | ></v-text-field> |
36 | 37 | <v-text-field |
37 | - :rules="[rules.required, rules.min]" | |
38 | + :rules="[rules.required]" | |
38 | 39 | v-model="userLogincredentials.password" |
39 | 40 | :append-icon="e1 ? 'visibility_off' : 'visibility'" |
40 | 41 | :append-icon-cb="() => (e1 = !e1)" |
... | ... | @@ -86,39 +87,36 @@ export default { |
86 | 87 | remember: false, |
87 | 88 | valid: false, |
88 | 89 | userLogincredentials: {}, |
89 | - username: "", | |
90 | 90 | nameRules: [ |
91 | 91 | v => !!v || "Username is required" |
92 | - // v => v.length >0 | |
92 | + | |
93 | 93 | ], |
94 | - // email: '', | |
95 | - // erules: { | |
96 | - // required: value => !!value || 'This email field is Required.', | |
97 | - // em: v => (v.length > 0 && /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 'Email must be valid') | |
98 | - // }, | |
99 | 94 | password: "", |
95 | + email:"", | |
100 | 96 | rules: { |
101 | 97 | required: value => !!value || "password is Required.", |
102 | - min: v => | |
103 | - (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/.test( | |
104 | - v | |
105 | - ) && | |
106 | - v.length >= 8) || | |
107 | - "Min 8 characters upper case lower case symbol required" | |
98 | + // min: v => | |
99 | + // (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/.test( | |
100 | + // v | |
101 | + // ) && | |
102 | + // v.length >= 4) || | |
103 | + // "Min 4 characters upper case lower case symbol required" | |
108 | 104 | } |
109 | 105 | }; |
110 | 106 | }, |
111 | 107 | methods: { |
112 | 108 | login() { |
113 | 109 | var userdata = { |
114 | - userName: this.userLogincredentials.userName, | |
115 | - password: this.userLogincredentials.password | |
110 | + email: this.userLogincredentials.email, | |
111 | + password: this.userLogincredentials.password, | |
112 | + role:"ADMIN" | |
113 | + | |
116 | 114 | }; |
117 | 115 | http() |
118 | - .post("/adminLogin", userdata) | |
116 | + .post("/schoolLogin", userdata) | |
119 | 117 | .then(response => { |
120 | 118 | this.$store.dispatch("setToken", response.data.data.token); |
121 | - this.$store.dispatch("setName", response.data.data.name); | |
119 | + this.$store.dispatch("Id", response.data.data.id); | |
122 | 120 | this.loading = true; |
123 | 121 | if ((this.snackbar = true)) { |
124 | 122 | this.text = "Successfully Login"; | ... | ... |
src/pages/Provider.vue
... | ... | @@ -1,406 +0,0 @@ |
1 | -<template> | |
2 | - <v-flex xs12> | |
3 | - <app-toolbar class="app--toolbar"></app-toolbar> | |
4 | - <v-card> | |
5 | - <v-card-title> | |
6 | - <v-flex xs12 lg2 md3 sm4> | |
7 | - <h4 class="text-xs-center font-weight-medium">Healthcare Providers</h4> | |
8 | - </v-flex> | |
9 | - <v-spacer></v-spacer> | |
10 | -<!-- ****** SEARCH ALL HEALTH PROVIDER ****** --> | |
11 | - <v-flex xs12 sm4 lg3 class="top"> | |
12 | - <v-text-field | |
13 | - justify-right | |
14 | - prepend-icon="search" | |
15 | - v-model="term" | |
16 | - label="Find Yours Users" | |
17 | - color="black" | |
18 | - @change="getProviderList" | |
19 | - ></v-text-field> | |
20 | - </v-flex> | |
21 | - </v-card-title> | |
22 | -<!-- ****** EDIT HEALTH PROVIDER ****** --> | |
23 | - <v-snackbar | |
24 | - :timeout="timeout" | |
25 | - :top="y === 'top'" | |
26 | - :right="x === 'right'" | |
27 | - :vertical="mode === 'vertical'" | |
28 | - v-model="snackbar" | |
29 | - color="success" | |
30 | - >{{ text }}</v-snackbar> | |
31 | - <v-dialog v-model="dialog" max-width="500px"> | |
32 | - <v-toolbar color="white"> | |
33 | - <v-spacer></v-spacer> | |
34 | - <v-toolbar-title>Edit Profile</v-toolbar-title> | |
35 | - <v-spacer></v-spacer> | |
36 | - </v-toolbar> | |
37 | - <v-card> | |
38 | - <v-flex align-center justify-center layout text-xs-center> | |
39 | - <v-avatar size="50px" style="position:absolute; top:10px; "> | |
40 | - <img src="/static/icon/user.png"> | |
41 | - </v-avatar> | |
42 | - </v-flex> | |
43 | - <v-card-text> | |
44 | - <v-container grid-list-md> | |
45 | - <v-layout wrap justify-center> | |
46 | - <v-flex xs12 sm9> | |
47 | - <v-form ref="form" v-model="valid" lazy-validation> | |
48 | - <v-layout style="position:relative; top:15px; "> | |
49 | - <v-flex xs4 class="pt-4 subheading"> | |
50 | - <label>Full Name:</label> | |
51 | - </v-flex> | |
52 | - <v-flex xs8> | |
53 | - <v-text-field v-model="editedItem.name" :rules="nameRules" required></v-text-field> | |
54 | - </v-flex> | |
55 | - </v-layout> | |
56 | - <v-layout> | |
57 | - <v-flex xs4 class="pt-4 subheading"> | |
58 | - <label>Email ID:</label> | |
59 | - </v-flex> | |
60 | - <v-flex xs8> | |
61 | - <v-text-field | |
62 | - v-model="editedItem.email" | |
63 | - :rules="emailRules" | |
64 | - data-vv-name="E-mail" | |
65 | - required | |
66 | - ></v-text-field> | |
67 | - </v-flex> | |
68 | - </v-layout> | |
69 | - <v-card-actions> | |
70 | - <v-btn round dark @click.native="close">Cancel</v-btn> | |
71 | - <v-spacer></v-spacer> | |
72 | - <v-btn round dark @click.native="save">Save</v-btn> | |
73 | - </v-card-actions> | |
74 | - </v-form> | |
75 | - </v-flex> | |
76 | - </v-layout> | |
77 | - </v-container> | |
78 | - </v-card-text> | |
79 | - </v-card> | |
80 | - </v-dialog> | |
81 | -<!-- *****VIEW PROFILE OF PRVIDE LIST ****** --> | |
82 | - <v-dialog v-model="dialog1" max-width="700px"> | |
83 | - <v-toolbar color="white"> | |
84 | - <v-spacer></v-spacer> | |
85 | - <v-toolbar-title>Profile</v-toolbar-title> | |
86 | - <v-spacer></v-spacer> | |
87 | - <v-icon @click="close1">close</v-icon> | |
88 | - </v-toolbar> | |
89 | - <v-card> | |
90 | - <v-flex align-center justify-center layout text-xs-center> | |
91 | - <v-avatar size="60px" style="position:absolute; top:10px;"> | |
92 | - <img src="/static/icon/user.png"> | |
93 | - </v-avatar> | |
94 | - </v-flex> | |
95 | - <v-card-text> | |
96 | - <v-container grid-list-md> | |
97 | - <v-layout wrap justify-center> | |
98 | - <v-flex sm12 offset-sm3> | |
99 | - <br> | |
100 | - <br> | |
101 | - <v-layout> | |
102 | - <v-flex xs4> | |
103 | - <h5 class="right">Full Name:</h5> | |
104 | - </v-flex> | |
105 | - <v-flex xs8> | |
106 | - <h5 class="left">{{ editedItem.name }}</h5> | |
107 | - </v-flex> | |
108 | - </v-layout> | |
109 | - <v-layout> | |
110 | - <v-flex xs4> | |
111 | - <h5 class="right">Email:</h5> | |
112 | - </v-flex> | |
113 | - <v-flex xs8> | |
114 | - <h5 class="left">{{ editedItem.email }}</h5> | |
115 | - </v-flex> | |
116 | - </v-layout> | |
117 | - </v-flex> | |
118 | - </v-layout> | |
119 | - </v-container> | |
120 | - </v-card-text> | |
121 | - </v-card> | |
122 | -<!-- ****** PROVIDER DATA TABLE OF PROVIDER DEATILS ****** --> | |
123 | - </v-dialog> | |
124 | - <v-data-table | |
125 | - :headers="headers" | |
126 | - :items="desserts" | |
127 | - class="elevation-1" | |
128 | - :pagination.sync="pagination" | |
129 | - > | |
130 | - <template slot="items" slot-scope="props"> | |
131 | - <v-snackbar | |
132 | - :timeout="timeout" | |
133 | - :top="y === 'top'" | |
134 | - :right="x === 'right'" | |
135 | - :vertical="mode === 'vertical'" | |
136 | - v-model="statussnackbar" | |
137 | - color="success" | |
138 | - >{{ text }}</v-snackbar> | |
139 | - <td id="td" class="text-xs-center">{{ props.index }}</td> | |
140 | - <td id="td" class="text-xs-center">{{ props.item.name}}</td> | |
141 | - <td id="td" class="text-xs-center">{{ props.item.email }}</td> | |
142 | - <td id="td" class="text-xs-center"> | |
143 | - <v-flex xs12 sm12> | |
144 | - <v-select | |
145 | - :items="statusList" | |
146 | - @change="changeswitch(props.item)" | |
147 | - v-model="props.item.e1" | |
148 | - menu-props="auto" | |
149 | - :label="props.item.verified" | |
150 | - hide-details | |
151 | - single-line | |
152 | - ></v-select> | |
153 | - </v-flex> | |
154 | - </td> | |
155 | - <td class="text-xs-center"> | |
156 | - <span> | |
157 | - <img | |
158 | - style="cursor:pointer; width:25px; height:18px; " | |
159 | - class="mr-5" | |
160 | - @click="profile(props.item)" | |
161 | - src="/static/icon/eye1.png" | |
162 | - > | |
163 | - <img | |
164 | - style="cursor:pointer; width:20px; height:18px; " | |
165 | - class="mr-5" | |
166 | - @click="editItem(props.item)" | |
167 | - src="/static/icon/edit1.png" | |
168 | - > | |
169 | - <img | |
170 | - style="cursor:pointer; height:20px; " | |
171 | - class="mr-5" | |
172 | - @click="deleteItem(props.item)" | |
173 | - src="/static/icon/delete1.png" | |
174 | - > | |
175 | - </span> | |
176 | - </td> | |
177 | - </template> | |
178 | - <v-alert | |
179 | - slot="no-results" | |
180 | - :value="true" | |
181 | - color="error" | |
182 | - icon="warning" | |
183 | - >Your search for "{{ term }}" found no results.</v-alert> | |
184 | - </v-data-table> | |
185 | - </v-card> | |
186 | - </v-flex> | |
187 | -</template> | |
188 | -<script> | |
189 | -import http from "@/Services/http.js"; | |
190 | -import AppToolbar from '@/components/AppToolbar'; | |
191 | - | |
192 | - | |
193 | -export default { | |
194 | - components: { | |
195 | - AppToolbar, | |
196 | - }, | |
197 | - data: () => ({ | |
198 | - snackbar: false, | |
199 | - statussnackbar: false, | |
200 | - y: "top", | |
201 | - x: "right", | |
202 | - mode: "", | |
203 | - timeout: 3000, | |
204 | - text: "", | |
205 | - valid: "", | |
206 | - modaledit: false, | |
207 | - dialog: false, | |
208 | - dialog1: false, | |
209 | - statusList: ["APPROVED", "DECLINED"], | |
210 | - term:'', | |
211 | - e1: "", | |
212 | - rules: { | |
213 | - required: value => !!value || "This field is Required.", | |
214 | - min: v => | |
215 | - (/^(0?[1-9]|[12][0-9]|3[01])[\/\-](0?[1-9]|1[012])[\/\-]\d{4}$/.test( | |
216 | - v | |
217 | - ) && | |
218 | - v.length > 0) || | |
219 | - "Please enter a date in the format dd/mm/yyyy" | |
220 | - }, | |
221 | - nameRules: [v => !!v || " Full Name is required"], | |
222 | - emailRules: [ | |
223 | - v => !!v || "E-mail is required", | |
224 | - v => /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 'E-mail must be valid' | |
225 | - ], | |
226 | - pagination: { | |
227 | - rowsPerPage: 13 | |
228 | - }, | |
229 | - headers: [ | |
230 | - { | |
231 | - text: "No", | |
232 | - align: "center", | |
233 | - sortable: false, | |
234 | - value: "no" | |
235 | - }, | |
236 | - { text: "Name", value: "name", sortable: false, align: "center" }, | |
237 | - { text: "Email", value: "email", sortable: false, align: "center" }, | |
238 | - { text: "Status", value: "verified", sortable: false, align: "center" }, | |
239 | - { text: "", value: "", sortable: false } | |
240 | - ], | |
241 | - desserts: [], | |
242 | - editedIndex: -1, | |
243 | - editedItem: { | |
244 | - No: "", | |
245 | - Name: "", | |
246 | - Email: "", | |
247 | - dob: "" | |
248 | - }, | |
249 | - defaultItem: { | |
250 | - No: "", | |
251 | - Name: "", | |
252 | - Email: "", | |
253 | - dob: "" | |
254 | - } | |
255 | - }), | |
256 | - watch: { | |
257 | - dialog(val) { | |
258 | - val || this.close(); | |
259 | - } | |
260 | - }, | |
261 | - | |
262 | - created() { | |
263 | - this.initialize(); | |
264 | - }, | |
265 | - mounted() { | |
266 | - this.getProviderList(); | |
267 | - }, | |
268 | - methods: { | |
269 | - getProviderList() { | |
270 | - var token = this.$store.state.token; | |
271 | - http() | |
272 | - .get("/provider-list?term=" + this.term, { | |
273 | - headers: { Authorization: "Bearer " + token } | |
274 | - }) | |
275 | - .then(response => { | |
276 | - this.desserts = response.data.data.providerList; | |
277 | - }) | |
278 | - .catch(err => { | |
279 | - // console.log("err====>", err); | |
280 | - this.$router.replace({ path: '/' }); | |
281 | - }); | |
282 | - }, | |
283 | - initialize() { | |
284 | - this.desserts = []; | |
285 | - }, | |
286 | - | |
287 | - editItem(item) { | |
288 | - this.editedIndex = this.desserts.indexOf(item); | |
289 | - this.editedItem = Object.assign({}, item); | |
290 | - this.dialog = true; | |
291 | - }, | |
292 | - profile(item) { | |
293 | - this.editedIndex = this.desserts.indexOf(item); | |
294 | - this.editedItem = Object.assign({}, item); | |
295 | - this.dialog1 = true; | |
296 | - }, | |
297 | - changeswitch(item) { | |
298 | - let addStatus = { | |
299 | - userId: item.userId, | |
300 | - status: item.e1 | |
301 | - }; | |
302 | - http() | |
303 | - .post("/approve-decline", addStatus) | |
304 | - .then(response => { | |
305 | - if ((this.statussnackbar = true)) { | |
306 | - this.text = "Successfully change your status is" + " " + item.e1; | |
307 | - } | |
308 | - this.getProviderList(); | |
309 | - }) | |
310 | - .catch(error => { | |
311 | - // console.log(error); | |
312 | - }); | |
313 | - }, | |
314 | - deleteItem(item) { | |
315 | - let addUsers = { | |
316 | - userId: item.userId | |
317 | - }; | |
318 | - http() | |
319 | - .post("/deleteProvider", confirm('Are you sure you want to delete this?') && addUsers) | |
320 | - .then(response => { | |
321 | - if ((this.snackbar = true)) { | |
322 | - this.text = "Successfully delete Health Care Priovider"; | |
323 | - } | |
324 | - this.getProviderList(); | |
325 | - }) | |
326 | - .catch(error => { | |
327 | - // console.log(error); | |
328 | - }); | |
329 | - }, | |
330 | - | |
331 | - close() { | |
332 | - this.dialog = false; | |
333 | - setTimeout(() => { | |
334 | - this.editedItem = Object.assign({}, this.defaultItem); | |
335 | - this.editedIndex = -1; | |
336 | - }, 300); | |
337 | - }, | |
338 | - close1() { | |
339 | - this.dialog1 = false; | |
340 | - }, | |
341 | - | |
342 | - save() { | |
343 | - let editUsers = { | |
344 | - name: this.editedItem.name, | |
345 | - dob: this.editedItem.dob, | |
346 | - email: this.editedItem.email, | |
347 | - userId: this.editedItem.userId | |
348 | - }; | |
349 | - http() | |
350 | - .post("/provider-detail", editUsers) | |
351 | - .then(response => { | |
352 | - if ((this.snackbar = true)) { | |
353 | - this.text = "Successfully Edit Health Care Priovider"; | |
354 | - } | |
355 | - this.getProviderList(); | |
356 | - }) | |
357 | - .catch(error => { | |
358 | - // console.log(error); | |
359 | - }); | |
360 | - this.close(); | |
361 | - } | |
362 | - } | |
363 | -}; | |
364 | -</script> | |
365 | -<style scoped> | |
366 | -.v-card__actions .v-btn { | |
367 | - margin: 0px; | |
368 | - min-width: 120px; | |
369 | -} | |
370 | -#td { | |
371 | - border: 1px solid #dddddd; | |
372 | - padding: 8px; | |
373 | -} | |
374 | -#flex { | |
375 | - height: 300px; | |
376 | -} | |
377 | -.v-select_selctions.v-select_slot.v-select_selection { | |
378 | - color: black !important; | |
379 | -} | |
380 | -@media screen and (max-width: 769px){ | |
381 | - .top{ | |
382 | - margin-top:30px; | |
383 | - } | |
384 | - | |
385 | -} | |
386 | -@media screen and (max-width: 476px) { | |
387 | - .flex.xs4 { | |
388 | - flex-basis: 55.666667%; | |
389 | - max-width: 71.666667%; | |
390 | - } | |
391 | -} | |
392 | -@media screen and (max-width: 402px) { | |
393 | - h5 { | |
394 | - font-size: 13px; | |
395 | - } | |
396 | - /* .right{ | |
397 | - float:none !important; | |
398 | -} */ | |
399 | - .left { | |
400 | - float: none !important; | |
401 | - } | |
402 | -} | |
403 | -</style> | |
404 | - | |
405 | - | |
406 | - |
src/pages/Students.vue
... | ... | @@ -0,0 +1,889 @@ |
1 | +<template> | |
2 | +<v-app id="pages-dasboard"> | |
3 | + <v-toolbar | |
4 | + color="grey" | |
5 | + fixed | |
6 | + app | |
7 | + > | |
8 | + <v-toolbar-title class="ml-0 pl-3"> | |
9 | + <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon> | |
10 | + </v-toolbar-title> | |
11 | +<!-- ****** SEARCH ALL EXISTING StudentS ****** --> | |
12 | + <v-flex xs7 sm3 class="userSearch"> | |
13 | + <v-text-field | |
14 | + flat | |
15 | + prepend-icon="search" | |
16 | + label="Find your Teachers" | |
17 | + v-model="search" | |
18 | + color="black" | |
19 | + @change="getStudentList" | |
20 | + > | |
21 | + </v-text-field> | |
22 | + </v-flex> | |
23 | + <v-spacer></v-spacer> | |
24 | + <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition"> | |
25 | + <v-btn icon large flat slot="activator"> | |
26 | + <v-avatar size="40px"> | |
27 | + <img src="/static/icon/user.png"/> | |
28 | + </v-avatar> | |
29 | + </v-btn> | |
30 | + <v-list class="pa-0"> | |
31 | + <v-list-tile v-for="(item,index) in items" :to="!item.href ? { name: item.name } : null" :href="item.href" @click="item.click" ripple="ripple" :disabled="item.disabled" :target="item.target" rel="noopener" :key="index"> | |
32 | + <v-list-tile-action v-if="item.icon"> | |
33 | + <v-icon>{{ item.icon }}</v-icon> | |
34 | + </v-list-tile-action> | |
35 | + <v-list-tile-content> | |
36 | + <v-list-tile-title>{{ item.title }}</v-list-tile-title> | |
37 | + </v-list-tile-content> | |
38 | + </v-list-tile> | |
39 | + </v-list> | |
40 | + </v-menu> | |
41 | + </v-toolbar> | |
42 | + <v-tabs grow slider-color="black"> | |
43 | + <v-tab | |
44 | + ripple | |
45 | + @click="activeTab('existing')" | |
46 | + v-bind:class="{ active: isActive }" | |
47 | + id="tab" | |
48 | + class="subheading" | |
49 | + >Existing Students</v-tab> | |
50 | + <v-tab | |
51 | + ripple | |
52 | + @click="activeTab('new')" | |
53 | + v-bind:class="{ active: newActive }" | |
54 | + id="tab1"User | |
55 | + class="subheading" | |
56 | + >Add New Students</v-tab> | |
57 | +<!-- ****** EDITS StudentS Dtails ****** --> | |
58 | + <v-tab-item> | |
59 | + <v-snackbar | |
60 | + :timeout="timeout" | |
61 | + :top="y === 'top'" | |
62 | + :right="x === 'right'" | |
63 | + :vertical="mode === 'vertical'" | |
64 | + v-model="snackbar" | |
65 | + color="success" | |
66 | + >{{ text }}</v-snackbar> | |
67 | + <v-dialog v-model="dialog" max-width="500px"> | |
68 | + <v-toolbar color="white"> | |
69 | + <v-spacer></v-spacer> | |
70 | + <v-toolbar-title>Edit Profile</v-toolbar-title> | |
71 | + <v-spacer></v-spacer> | |
72 | + </v-toolbar> | |
73 | + <v-card> | |
74 | + <v-flex align-center justify-center layout text-xs-center> | |
75 | + <v-avatar size="50px" style="position:absolute; top:10px; "> | |
76 | + <img src="/static/icon/user.png"> | |
77 | + </v-avatar> | |
78 | + </v-flex> | |
79 | + <v-card-text> | |
80 | + <v-container> | |
81 | + <v-layout wrap justify-center> | |
82 | + <v-flex xs12 sm9> | |
83 | + <v-form ref="form" v-model="valid" lazy-validation> | |
84 | + <v-layout style="position:relative; top:15px;"> | |
85 | + <v-flex xs4 class="pt-4 subheading"> | |
86 | + <label>Full Name:</label> | |
87 | + </v-flex> | |
88 | + <v-flex xs8> | |
89 | + <v-text-field | |
90 | + v-model="editedItem.name" | |
91 | + v-validate="'required'" | |
92 | + :rules="nameRules" | |
93 | + data-vv-name="Name" | |
94 | + required | |
95 | + ></v-text-field> | |
96 | + </v-flex> | |
97 | + </v-layout> | |
98 | + <v-layout> | |
99 | + <v-flex xs4 class="pt-4 subheading"> | |
100 | + <label>Email No.:</label> | |
101 | + </v-flex> | |
102 | + <v-flex xs8> | |
103 | + <v-text-field | |
104 | + v-model="editedItem.email" | |
105 | + required | |
106 | + ></v-text-field> | |
107 | + </v-flex> | |
108 | + </v-layout> | |
109 | + <v-layout> | |
110 | + <v-flex xs4 class="pt-4 subheading"> | |
111 | + <label>Mobile No.:</label> | |
112 | + </v-flex> | |
113 | + <v-flex xs8> | |
114 | + <v-text-field | |
115 | + v-model="editedItem.mobile" | |
116 | + required | |
117 | + ></v-text-field> | |
118 | + </v-flex> | |
119 | + </v-layout> | |
120 | + <v-layout> | |
121 | + <v-flex xs4 class="pt-4 subheading"> | |
122 | + <label>Date of Birth:</label> | |
123 | + </v-flex> | |
124 | + <v-flex xs8> | |
125 | + <v-menu | |
126 | + ref="menu1" | |
127 | + :close-on-content-click="false" | |
128 | + v-model="menu1" | |
129 | + :nudge-right="40" | |
130 | + lazy | |
131 | + transition="scale-transition" | |
132 | + offset-y | |
133 | + full-width | |
134 | + min-width="290px" | |
135 | + > | |
136 | + <v-text-field | |
137 | + slot="activator" | |
138 | + v-model="editedItem.dob" | |
139 | + placeholder="Select date" | |
140 | + ></v-text-field> | |
141 | + <v-date-picker | |
142 | + ref="picker" | |
143 | + v-model="editedItem.dob" | |
144 | + :max="new Date().toISOString().substr(0, 10)" | |
145 | + min="1950-01-01" | |
146 | + @input="menu1 = false" | |
147 | + ></v-date-picker> | |
148 | + </v-menu> | |
149 | + </v-flex> | |
150 | + </v-layout> | |
151 | + <v-card-actions> | |
152 | + <v-btn round dark @click.native="close">Cancel</v-btn> | |
153 | + <v-spacer></v-spacer> | |
154 | + <v-btn round dark @click="save">Save</v-btn> | |
155 | + </v-card-actions> | |
156 | + </v-form> | |
157 | + </v-flex> | |
158 | + </v-layout> | |
159 | + </v-container> | |
160 | + </v-card-text> | |
161 | + </v-card> | |
162 | + </v-dialog> | |
163 | +<!-- ****** PROFILE VIEW StudentS Details ****** --> | |
164 | + <v-dialog v-model="dialog1" max-width="600px"> | |
165 | + <v-toolbar color="white"> | |
166 | + <v-spacer></v-spacer> | |
167 | + <v-toolbar-title>Profile</v-toolbar-title> | |
168 | + <v-spacer></v-spacer> | |
169 | + <v-icon @click="close1">close</v-icon> | |
170 | + </v-toolbar> | |
171 | + <v-card> | |
172 | + <v-flex align-center justify-center layout text-xs-center> | |
173 | + <v-avatar size="50px" style="position:absolute; top:20px;"> | |
174 | + <img src="/static/icon/user.png"> | |
175 | + </v-avatar> | |
176 | + </v-flex> | |
177 | + <v-card-text> | |
178 | + <v-container grid-list-md> | |
179 | + <v-layout wrap> | |
180 | + <v-flex><br><br> | |
181 | + <v-layout> | |
182 | + <v-flex xs5 sm6> | |
183 | + <h5 class="right my-1">Full Name:</h5> | |
184 | + </v-flex> | |
185 | + <v-flex sm6 xs8> | |
186 | + <h5 class="my-1">{{ editedItem.name }}</h5> | |
187 | + </v-flex> | |
188 | + </v-layout> | |
189 | + <v-layout> | |
190 | + <v-flex xs5 sm6> | |
191 | + <h5 class="right my-1">Email:</h5> | |
192 | + </v-flex> | |
193 | + <v-flex sm6 xs8> | |
194 | + <h5 class="my-1">{{ editedItem.email }}</h5> | |
195 | + </v-flex> | |
196 | + </v-layout> | |
197 | + <v-layout> | |
198 | + <v-flex xs6 sm6 > | |
199 | + <h5 class="right my-1">Mobile No. :</h5> | |
200 | + </v-flex> | |
201 | + <v-flex sm6 xs8> | |
202 | + <h5 class="my-1">{{ editedItem.mobile }}</h5> | |
203 | + </v-flex> | |
204 | + </v-layout> | |
205 | + <v-layout> | |
206 | + <v-flex xs6 sm6 > | |
207 | + <h5 class="right my-1">Date Of Birth:</h5> | |
208 | + </v-flex> | |
209 | + <v-flex sm6 xs8> | |
210 | + <h5 class="my-1">{{ editedItem.dob }}</h5> | |
211 | + </v-flex> | |
212 | + </v-layout> | |
213 | + </v-flex> | |
214 | + </v-layout> | |
215 | + </v-container> | |
216 | + </v-card-text> | |
217 | + </v-card> | |
218 | + </v-dialog> | |
219 | + | |
220 | + <!-- <v-dialog v-model="dialog2" width="700px"> | |
221 | + <v-card> | |
222 | + <div id="dialog"> | |
223 | + <h4> | |
224 | + <b>Report</b> | |
225 | + </h4> | |
226 | + <h5 id="name"> | |
227 | + <b>Patient Name:</b> | |
228 | + {{ editedItem.name }} | |
229 | + </h5> | |
230 | + <h5 id="m">Select Month:</h5> | |
231 | + <v-btn color="grey darken-3" id="G" v-on:click="component='report-generate'">Generate</v-btn> | |
232 | + <v-spacer></v-spacer> | |
233 | + <v-icon id="icon" @click="close2">close</v-icon> | |
234 | + | |
235 | + <span id="bt"> | |
236 | + <v-btn | |
237 | + color="grey darken-2" | |
238 | + v-on:click="component='one-month' , activebtn('existing')" | |
239 | + v-bind:class="{ activebtn: isActivebtn }" | |
240 | + flat | |
241 | + >1 month</v-btn> | |
242 | + <v-btn | |
243 | + color="grey darken-2" | |
244 | + v-on:click="component='three-month' , activebtn('new')" | |
245 | + v-bind:class="{ activebtn: Activebtn1 }" | |
246 | + flat | |
247 | + >3 Month</v-btn> | |
248 | + <v-btn | |
249 | + color="grey darken-2" | |
250 | + v-on:click="component='six-month' , activebtn('new1')" | |
251 | + v-bind:class="{ activebtn: Activebtn2 }" | |
252 | + flat | |
253 | + >6 Month</v-btn> | |
254 | + <v-btn | |
255 | + color="grey darken-2" | |
256 | + v-on:click="component='nine-month' , activebtn('new2')" | |
257 | + v-bind:class="{ activebtn: Activebtn3 }" | |
258 | + flat | |
259 | + >9 Month</v-btn> | |
260 | + <img id="e" @click="mail" src="/static/icon/email1.png"> | |
261 | + <img id="d" @click="download" src="/static/icon/download1.png"> | |
262 | + </span> | |
263 | + <component v-bind:is="component"></component> | |
264 | + </div> | |
265 | + </v-card> | |
266 | + </v-dialog> --> | |
267 | + <v-snackbar | |
268 | + :timeout="timeout" | |
269 | + :top="y === 'top'" | |
270 | + :right="x === 'right'" | |
271 | + :vertical="mode === 'vertical'" | |
272 | + v-model="snackbar" | |
273 | + color="success" | |
274 | + >{{ text }}</v-snackbar> | |
275 | +<!-- ****** EXISTING-USERS StudentS Table ****** --> | |
276 | + <v-data-table | |
277 | + :headers="headers" | |
278 | + :items="desserts" | |
279 | + :pagination.sync="pagination" | |
280 | + :search="search" | |
281 | + > <!-- </v-content> | |
282 | + <v-footer class="pa-4" color="grey darken-2"> | |
283 | + | |
284 | + </v-footer> --> | |
285 | + <template slot="items" slot-scope="props"> | |
286 | + <td id="td" class="text-xs-center">{{ props.index}}</td> | |
287 | + <td id="td" class="text-xs-center">{{ props.item.name}}</td> | |
288 | + <!-- <td id="td" class="text-xs-center">{{ props.item.dob }}</td> --> | |
289 | + <td id="td" class="text-xs-center">{{ props.item.mobile}}</td> | |
290 | + | |
291 | + <td class="text-xs-center"> | |
292 | + <span> | |
293 | + <!-- <img | |
294 | + style="cursor:pointer; height:20px; " | |
295 | + class="mr-5" | |
296 | + @click="report(props.item)" | |
297 | + src="/static/icon/List1.png" | |
298 | + > --> | |
299 | + <img | |
300 | + style="cursor:pointer; width:25px; height:18px; " | |
301 | + class="mr-5" | |
302 | + @click="profile(props.item)" | |
303 | + src="/static/icon/eye1.png" | |
304 | + > | |
305 | + <img | |
306 | + style="cursor:pointer; width:20px; height:18px; " | |
307 | + class="mr-5" | |
308 | + @click="editItem(props.item)" | |
309 | + src="/static/icon/edit1.png" | |
310 | + > | |
311 | + <img | |
312 | + style="cursor:pointer; height:20px; " | |
313 | + class="mr-5" | |
314 | + @click="deleteItem(props.item)" | |
315 | + src="/static/icon/delete1.png" | |
316 | + > | |
317 | + </span> | |
318 | + </td> | |
319 | + </template> | |
320 | + <v-alert | |
321 | + slot="no-results" | |
322 | + :value="true" | |
323 | + color="error" | |
324 | + icon="warning" | |
325 | + >Your search for "{{ search }}" found no results.</v-alert> | |
326 | + </v-data-table> | |
327 | + </v-tab-item> | |
328 | +<!-- ****** ADD multiple Students ****** --> | |
329 | + <v-tab-item> | |
330 | + <v-container> | |
331 | + <v-snackbar | |
332 | + :timeout="timeout" | |
333 | + :top="y === 'top'" | |
334 | + :right="x === 'right'" | |
335 | + :vertical="mode === 'vertical'" | |
336 | + v-model="snackbar" | |
337 | + color="success" | |
338 | + >{{ text }}</v-snackbar> | |
339 | + <v-flex xs12 sm8 offset-sm2 class="top"> | |
340 | + <v-card flat> | |
341 | + <v-container fluid fill-height> | |
342 | + <v-layout align-center> | |
343 | + <v-flex xs12> | |
344 | + <v-flex offset-xs5> | |
345 | + <v-avatar size="55px"> | |
346 | + <img src="/static/icon/user.png"> | |
347 | + </v-avatar> | |
348 | + </v-flex> | |
349 | + <v-form ref="form" v-model="valid" lazy-validation> | |
350 | + <v-layout> | |
351 | + <v-flex xs4 class="pt-4 subheading"> | |
352 | + <label class="right">Full Name:</label> | |
353 | + </v-flex> | |
354 | + <v-flex xs6 class="ml-3"> | |
355 | + <v-text-field | |
356 | + v-model="editedItem.name" | |
357 | + placeholder="fill your full Name" | |
358 | + name="name" | |
359 | + type="text" | |
360 | + :rules="nameRules" | |
361 | + required | |
362 | + ></v-text-field> | |
363 | + </v-flex> | |
364 | + </v-layout> | |
365 | + <!-- <v-layout> | |
366 | + <v-flex xs4 class="pt-4 subheading"> | |
367 | + <label class="right">Country:</label> | |
368 | + </v-flex> | |
369 | + <v-flex xs6 class="ml-3"> | |
370 | + <v-select | |
371 | + v-model="editedItem.country" | |
372 | + :items="countries" | |
373 | + label="Select Country" | |
374 | + single-line | |
375 | + ></v-select> | |
376 | + </v-flex> | |
377 | + </v-layout> --> | |
378 | + <v-layout> | |
379 | + <v-flex xs4 class="pt-4 subheading"> | |
380 | + <label class="right">Email ID:</label> | |
381 | + </v-flex> | |
382 | + <v-flex xs6 class="ml-3"> | |
383 | + <v-text-field | |
384 | + placeholder="fill your email" | |
385 | + :rules="emailRules" | |
386 | + v-model="editedItem.email" | |
387 | + type="text" | |
388 | + name="email" | |
389 | + required | |
390 | + ></v-text-field> | |
391 | + </v-flex> | |
392 | + </v-layout> | |
393 | + <!-- <v-layout> | |
394 | + <v-flex xs4 class="pt-4 subheading"> | |
395 | + <label class="right">Date of Birth:</label> | |
396 | + </v-flex> | |
397 | + <v-flex xs6 class="ml-3"> | |
398 | + <v-menu | |
399 | + ref="menu" | |
400 | + :close-on-content-click="false" | |
401 | + v-model="menu" | |
402 | + :nudge-right="40" | |
403 | + lazy | |
404 | + transition="scale-transition" | |
405 | + offset-y | |
406 | + full-width | |
407 | + min-width="290px" | |
408 | + > | |
409 | + <v-text-field | |
410 | + slot="activator" | |
411 | + v-model="editedItem.date" | |
412 | + placeholder="Select date" | |
413 | + ></v-text-field> | |
414 | + <v-date-picker | |
415 | + ref="picker" | |
416 | + v-model="editedItem.date" | |
417 | + :max="new Date().toISOString().substr(0, 10)" | |
418 | + min="1950-01-01" | |
419 | + @input="menu = false" | |
420 | + ></v-date-picker> | |
421 | + </v-menu> | |
422 | + </v-flex> | |
423 | + </v-layout> --> | |
424 | + <v-layout> | |
425 | + <v-flex xs12 sm9 offset-sm2> | |
426 | + <v-card-actions> | |
427 | + <v-btn @click="clear" round dark>clear</v-btn> | |
428 | + <v-spacer></v-spacer> | |
429 | + <v-btn @click="submit" round dark :loading="loading">Add</v-btn> | |
430 | + </v-card-actions> | |
431 | + </v-flex> | |
432 | + </v-layout> | |
433 | + </v-form> | |
434 | + </v-flex> | |
435 | + </v-layout> | |
436 | + </v-container> | |
437 | + </v-card> | |
438 | + </v-flex> | |
439 | + </v-container> | |
440 | + </v-tab-item> | |
441 | + </v-tabs> | |
442 | +</v-app> | |
443 | +</template> | |
444 | + | |
445 | +<script> | |
446 | +// import AppToolbar from '@/components/AppToolbar'; | |
447 | +// import onemonth from "@/components/report/onemonth.vue"; | |
448 | +// import threemonth from "@/components/report/threemonth.vue"; | |
449 | +// import sixmonth from "@/components/report/sixmonth.vue"; | |
450 | +// import ninemonth from "@/components/report/ninemonth.vue"; | |
451 | +// import generatereport from "@/components/report/generatereport.vue"; | |
452 | +import http from "@/Services/http.js"; | |
453 | +import NotificationList from "@/components/widgets/list/NotificationList"; | |
454 | +import Util from "@/util"; | |
455 | + | |
456 | +export default { | |
457 | + components: { | |
458 | + // "one-month": onemonth, | |
459 | + // "three-month": threemonth, | |
460 | + // "six-month": sixmonth, | |
461 | + // "nine-month": ninemonth, | |
462 | + // "report-generate": generatereport, | |
463 | + }, | |
464 | + data: () => ({ | |
465 | + component: "report-generate", | |
466 | + snackbar: false, | |
467 | + y: "top", | |
468 | + x: "right", | |
469 | + mode: "", | |
470 | + timeout: 3000, | |
471 | + text: "", | |
472 | + loading: false, | |
473 | + date:null, | |
474 | + search: '', | |
475 | + modal: false, | |
476 | + modaledit:false, | |
477 | + menu: false, | |
478 | + menu1:false, | |
479 | + dialog: false, | |
480 | + dialog1: false, | |
481 | + dialog2: false, | |
482 | + valid: true, | |
483 | + isActive: true, | |
484 | + newActive: false, | |
485 | + isActivebtn: false, | |
486 | + Activebtn1: false, | |
487 | + Activebtn2: false, | |
488 | + Activebtn3: false, | |
489 | + loader: null, | |
490 | + loading: false, | |
491 | + loading2: false, | |
492 | + loading3: false, | |
493 | + loading4: false, | |
494 | + details: [], | |
495 | + countries:['US','Canada'], | |
496 | + AddUsercredentials: {}, | |
497 | + pagination: { | |
498 | + rowsPerPage: 15 | |
499 | + }, | |
500 | + // rules: { | |
501 | + // required: value => !!value || "Date of Birth is Required.", | |
502 | + // min: v => | |
503 | + // (/^(0?[1-9]|[12][0-9]|3[01])[\/\-](0?[1-9]|1[012])[\/\-]\d{4}$/.test( | |
504 | + // v | |
505 | + // ) && | |
506 | + // v.length > 0) || | |
507 | + // "Please enter a date in the format dd/mm/yyyy" | |
508 | + // }, | |
509 | + nameRules: [v => !!v || " Full Name is required"], | |
510 | + emailRules: [ | |
511 | + v => !!v || "E-mail is required", | |
512 | + v => /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 'E-mail must be valid' | |
513 | + ], | |
514 | + headers: [ | |
515 | + { | |
516 | + text: "No", | |
517 | + align: "center", | |
518 | + sortable: false, | |
519 | + value: "No" | |
520 | + }, | |
521 | + { text: "Name", value: "name", sortable: false, align: "center" }, | |
522 | + // { text: "Email", value: "email", sortable: false, align: "center" }, | |
523 | + { text: "Mobile", value: "mobile", sortable: false, align: "center" }, | |
524 | + { text: "", value: "", sortable: false, align: "center" } | |
525 | + ], | |
526 | + desserts: [], | |
527 | + editedIndex: -1, | |
528 | + editedItem: { | |
529 | + role: "STUDENT", | |
530 | + name: "", | |
531 | + email: "", | |
532 | + }, | |
533 | + defaultItem: { | |
534 | + role: "STUDENT", | |
535 | + name: "", | |
536 | + email: "", | |
537 | + }, | |
538 | + userName:'', | |
539 | + items: [ | |
540 | + { | |
541 | + href: "/changepassword", | |
542 | + title: "Change Password", | |
543 | + click: e => { | |
544 | + console.log(e); | |
545 | + } | |
546 | + }, | |
547 | + { | |
548 | + href: "#", | |
549 | + title: "Logout", | |
550 | + click: e => { | |
551 | + window.getApp.$emit("APP_LOGOUT"); | |
552 | + } | |
553 | + } | |
554 | + ] | |
555 | + }), | |
556 | + watch: { | |
557 | + menu (val) { | |
558 | + val && this.$nextTick(() => (this.$refs.picker.activePicker = 'YEAR')) | |
559 | + }, | |
560 | + menu1 (val) { | |
561 | + val && this.$nextTick(() => (this.$refs.picker.activePicker = 'YEAR')) | |
562 | + } | |
563 | + }, | |
564 | + methods: { | |
565 | + getStudentList() { | |
566 | + var token = this.$store.state.token; | |
567 | + http() | |
568 | + .get("/getStudentsList", { | |
569 | + headers: { Authorization: "Bearer " + token } | |
570 | + }) | |
571 | + .then(response => { | |
572 | + this.desserts = response.data.data; | |
573 | + console.log("getStudentList=====>",this.desserts) | |
574 | + | |
575 | + }) | |
576 | + .catch(err => { | |
577 | + // console.log("err====>", err); | |
578 | + this.$router.replace({ path: '/' }); | |
579 | + }); | |
580 | + }, | |
581 | + editItem(item) { | |
582 | + this.editedIndex = this.desserts.indexOf(item); | |
583 | + this.editedItem = Object.assign({}, item); | |
584 | + this.dialog = true; | |
585 | + }, | |
586 | + profile(item) { | |
587 | + this.editedIndex = this.desserts.indexOf(item); | |
588 | + this.editedItem = Object.assign({}, item); | |
589 | + this.dialog1 = true; | |
590 | + }, | |
591 | + // report(item) { | |
592 | + // this.editedIndex = this.desserts.indexOf(item); | |
593 | + // this.editedItem = Object.assign({}, item); | |
594 | + // this.dialog2 = true; | |
595 | + // }, | |
596 | + | |
597 | + deleteItem(item) { | |
598 | + let deleteStudent = { | |
599 | + studentId: item._id | |
600 | + }; | |
601 | + http() | |
602 | + .delete("/deleteStudent", confirm('Are you sure you want to delete this?') && { params: deleteStudent }) | |
603 | + .then(response => { | |
604 | + // console.log("deleteUers",deleteStudent) | |
605 | + if ((this.snackbar = true)) { | |
606 | + this.text = "Successfully delete Existing User"; | |
607 | + } | |
608 | + this.getStudentList(); | |
609 | + }) | |
610 | + .catch(error => { | |
611 | + console.log(error); | |
612 | + }); | |
613 | + }, | |
614 | + activeTab(type) { | |
615 | + switch (type) { | |
616 | + case "existing": | |
617 | + this.newActive = false; | |
618 | + this.isActive = true; | |
619 | + break; | |
620 | + | |
621 | + default: | |
622 | + this.newActive = true; | |
623 | + this.isActive = false; | |
624 | + break; | |
625 | + } | |
626 | + }, | |
627 | + activebtn(type) { | |
628 | + switch (type) { | |
629 | + case "existing": | |
630 | + this.Activebtn3 = false; | |
631 | + this.Activebtn2 = false; | |
632 | + this.Activebtn1 = false; | |
633 | + this.isActivebtn = true; | |
634 | + break; | |
635 | + case "new": | |
636 | + this.Activebtn3 = false; | |
637 | + this.Activebtn2 = false; | |
638 | + this.Activebtn1 = true; | |
639 | + this.isActivebtn = false; | |
640 | + break; | |
641 | + case "new1": | |
642 | + this.Activebtn3 = false; | |
643 | + this.Activebtn2 = true; | |
644 | + this.Activebtn1 = false; | |
645 | + this.isActivebtn = false; | |
646 | + break; | |
647 | + default: | |
648 | + this.Activebtn3 = true; | |
649 | + this.Activebtn2 = false; | |
650 | + this.Activebtn1 = false; | |
651 | + this.isActivebtn = false; | |
652 | + break; | |
653 | + } | |
654 | + }, | |
655 | + close() { | |
656 | + this.dialog = false; | |
657 | + setTimeout(() => { | |
658 | + this.editedItem = Object.assign({}, this.defaultItem); | |
659 | + this.editedIndex = -1; | |
660 | + }, 300); | |
661 | + }, | |
662 | + close1() { | |
663 | + this.dialog1 = false; | |
664 | + }, | |
665 | + close2() { | |
666 | + this.dialog2 = false; | |
667 | + }, | |
668 | + submit() { | |
669 | + if (this.$refs.form.validate()) { | |
670 | + let addUsers = { | |
671 | + name: this.editedItem.name, | |
672 | + email: this.editedItem.email, | |
673 | + role: this.editedItem.role | |
674 | + }; | |
675 | + // console.log(addUsers) | |
676 | + http() | |
677 | + .post("/createStudent", addUsers) | |
678 | + .then(response => { | |
679 | + this.getStudentList(); | |
680 | + if (this.snackbar = true) { | |
681 | + this.text = "New user added successfully"; | |
682 | + } | |
683 | + | |
684 | + this.clear(); | |
685 | + }) | |
686 | + .catch(error => { | |
687 | + // console.log(error); | |
688 | + if (this.snackbar = true) { | |
689 | + this.text = error.response.data.message; | |
690 | + } | |
691 | + }); | |
692 | + } | |
693 | + }, | |
694 | + mail() { | |
695 | + }, | |
696 | + download() { | |
697 | + }, | |
698 | + clear() { | |
699 | + this.$refs.form.reset(); | |
700 | + }, | |
701 | + save() { | |
702 | + let editUsers = { | |
703 | + name: this.editedItem.name, | |
704 | + email: this.editedItem.email, | |
705 | + mobile: this.editedItem.mobile, | |
706 | + dob: this.editedItem.mobile, | |
707 | + studentId: this.editedItem._id | |
708 | + }; | |
709 | + http() | |
710 | + .put("/updateStudent", editUsers) | |
711 | + .then(response => { | |
712 | + console.log("editUsers",editUsers); | |
713 | + if ((this.snackbar = true)) { | |
714 | + this.text = "Successfully Edit Existing User"; | |
715 | + } | |
716 | + this.getStudentList(); | |
717 | + }) | |
718 | + .catch(error => { | |
719 | + // console.log(error); | |
720 | + }); | |
721 | + this.close(); | |
722 | + }, | |
723 | + handleDrawerToggle() { | |
724 | + window.getApp.$emit("APP_DRAWER_TOGGLED"); | |
725 | + }, | |
726 | + handleFullScreen() { | |
727 | + Util.toggleFullScreen(); | |
728 | + } | |
729 | + }, | |
730 | + mounted() { | |
731 | + this.getStudentList(); | |
732 | + // console.log("Id",this.$store.state.id) | |
733 | + // console.log("token",this.$store.state.token) | |
734 | + }, | |
735 | + computed:{ | |
736 | + toolbarColor() { | |
737 | + return this.$vuetify.options.extra.mainNav; | |
738 | + } | |
739 | + } | |
740 | +}; | |
741 | +</script> | |
742 | +<style scoped> | |
743 | +.v-tabs__div { | |
744 | + text-transform: none; | |
745 | +} | |
746 | +.v-input__prepend-outer { | |
747 | + margin-right: 0px !important; | |
748 | +} | |
749 | +.v-card__actions .v-btn { | |
750 | + margin: 0 15px; | |
751 | + min-width: 120px; | |
752 | +} | |
753 | + .primary { | |
754 | + background-color: #aaa !important; | |
755 | + border-color: #aaa !important; | |
756 | +} | |
757 | +h4 { | |
758 | + background-repeat: no-repeat; | |
759 | + padding: 8px; | |
760 | + margin: auto; | |
761 | + font-size: 25px; | |
762 | +} | |
763 | +#name { | |
764 | + position: absolute; | |
765 | + left: 100px; | |
766 | + top: 17px; | |
767 | +} | |
768 | +#icon { | |
769 | + position: absolute; | |
770 | + right: 8px; | |
771 | + top: 8px; | |
772 | +} | |
773 | +#m { | |
774 | + position: relative; | |
775 | + left: 135px; | |
776 | + top: -15px; | |
777 | +} | |
778 | +#G { | |
779 | + position: absolute; | |
780 | + top: 38px; | |
781 | + color: white; | |
782 | +} | |
783 | +#bt { | |
784 | + position: relative; | |
785 | + top: -20px; | |
786 | + left: 115px; | |
787 | +} | |
788 | +#e { | |
789 | + position: relative; | |
790 | + top: 5px; | |
791 | + right: -30px; | |
792 | + height: 17px; | |
793 | + cursor: pointer; | |
794 | +} | |
795 | +#d { | |
796 | + position: relative; | |
797 | + top: 5px; | |
798 | + right: -70px; | |
799 | + height: 17px; | |
800 | + cursor: pointer; | |
801 | +} | |
802 | +#td { | |
803 | + border: 1px solid #dddddd; | |
804 | + text-align: left; | |
805 | + padding: 8px; | |
806 | +} | |
807 | +#dialog { | |
808 | + height: 550px; | |
809 | +} | |
810 | +.active { | |
811 | + background-color: black; | |
812 | + color: white !important; | |
813 | +} | |
814 | +.activebtn { | |
815 | + color: black !important; | |
816 | +} | |
817 | +#flex { | |
818 | + height: 300px; | |
819 | +} | |
820 | +.top{ | |
821 | + margin-top:100px; | |
822 | +} | |
823 | +.v-tabs__item a{ | |
824 | + font-size:16px !important; | |
825 | +} | |
826 | +@media screen and (max-width: 769px){ | |
827 | + .top{ | |
828 | + margin-top:0 !important; | |
829 | + } | |
830 | + .userSearch .v-icon { | |
831 | + font-size: 20px !important; | |
832 | + margin-left: 20px ; | |
833 | + } | |
834 | +} | |
835 | +@media screen and (max-width: 380px) { | |
836 | +.right { | |
837 | + float: none !important; | |
838 | +} | |
839 | +.subheading { | |
840 | + font-size: 14px !important; | |
841 | +} | |
842 | +.v-card__actions .v-btn{ | |
843 | + margin: 0 0px; | |
844 | + min-width: 100px; | |
845 | +} | |
846 | +/* .searchIcon .v-icon { | |
847 | + font-size: 20px; | |
848 | + margin-left: 20px; | |
849 | +} */ | |
850 | +.subheading { | |
851 | + font-size: 12px !important; | |
852 | +} | |
853 | +h5 { | |
854 | + font-size: 13px; | |
855 | +} | |
856 | +} | |
857 | +.v-icon{ | |
858 | + font-size:30px; | |
859 | +} | |
860 | +@media screen and (min-width: 1270px){ | |
861 | +.hide{ | |
862 | + display: none; | |
863 | +} | |
864 | +/* } | |
865 | +@media screen and (max-width: 962px) { | |
866 | +.imglogo{ | |
867 | + position: absolute; | |
868 | + top: 13px; | |
869 | + left: 13px !important; | |
870 | + width: 70px; | |
871 | + height: 24px; | |
872 | +} */ | |
873 | +} | |
874 | +@media screen and (max-width: 420px){ | |
875 | +.userSearch .v-text-field .v-label{ | |
876 | + line-height: 24px !important; | |
877 | +} | |
878 | +.userSearch .v-label{ | |
879 | + font-size: 13px !important; | |
880 | +} | |
881 | +.v-list__tile { | |
882 | + font-size:14px; | |
883 | + padding: 0 10px; | |
884 | +} | |
885 | +.name{ | |
886 | + font-size:15px; | |
887 | +} | |
888 | +} | |
889 | +</style> | |
0 | 890 | \ No newline at end of file | ... | ... |
src/pages/changepassword.vue
... | ... | @@ -21,22 +21,17 @@ |
21 | 21 | <v-flex xs12 sm8 md8 lg8 offset-sm2> |
22 | 22 | <v-form class="mt-3" > |
23 | 23 | <v-text-field |
24 | - :rules="[rules.required, rules.min]" | |
24 | + :rules="[rules.required]" | |
25 | 25 | |
26 | - v-model="adminChangePasswordcredentials.currentPassword" | |
27 | - label="Current Password"> | |
26 | + v-model="adminChangePasswordcredentials.oldPassword" | |
27 | + label="Old Password"> | |
28 | 28 | </v-text-field> |
29 | 29 | <v-text-field |
30 | 30 | v-model="adminChangePasswordcredentials.newPassword" |
31 | - :rules="[rules.required, rules.min]" | |
31 | + :rules="[rules.required]" | |
32 | 32 | |
33 | 33 | label="New Password" |
34 | 34 | ></v-text-field> |
35 | - <v-text-field | |
36 | - v-model="adminChangePasswordcredentials.confirmPassword" | |
37 | - :rules="[rules.required, rules.min]" | |
38 | - label="Confirm Password" | |
39 | - ></v-text-field> | |
40 | 35 | </v-form></v-flex> |
41 | 36 | </v-card-text> |
42 | 37 | <v-card-actions> |
... | ... | @@ -93,7 +88,7 @@ export default { |
93 | 88 | confirmPassword: '', |
94 | 89 | rules: { |
95 | 90 | required: value => !!value || 'This password field is Required.', |
96 | - min: v => (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/).test(v) && v.length >= 8 || 'Min 8 characters upper case lower case symbol required' | |
91 | + // min: v => (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/).test(v) && v.length >= 8 || 'Min 8 characters upper case lower case symbol required' | |
97 | 92 | }, |
98 | 93 | }; |
99 | 94 | }, |
... | ... | @@ -101,11 +96,10 @@ export default { |
101 | 96 | reset () { |
102 | 97 | var token = this.$store.state.token; |
103 | 98 | var userdata = { |
104 | - "currentPassword":this.adminChangePasswordcredentials.currentPassword, | |
99 | + "oldPassword":this.adminChangePasswordcredentials.oldPassword, | |
105 | 100 | "newPassword":this.adminChangePasswordcredentials.newPassword, |
106 | - "confirmPassword":this.adminChangePasswordcredentials.confirmPassword | |
107 | 101 | } |
108 | - http().post('/adminChangePassword',userdata,{headers: {Authorization: 'Bearer '+token}}) | |
102 | + http().put('/schoolChangePassword',userdata,{headers: { Authorization: 'Bearer '+ token }}) | |
109 | 103 | .then(response => { |
110 | 104 | this.loading = true; |
111 | 105 | if(this.snackbar=true){ | ... | ... |
src/pages/forgetpassword.vue
... | ... | @@ -2,7 +2,8 @@ |
2 | 2 | <v-app id="login"> |
3 | 3 | <v-toolbar color="grey lighten"> |
4 | 4 | <v-toolbar-items> |
5 | - <img src="/static/ana@2x.png" height="36" alt="ana" /> | |
5 | + <!-- <img src="/static/ana@2x.png" height="36" alt="ana" /> --> | |
6 | + <h3 class="white--text my-3 ml-4">School-Management</h3> | |
6 | 7 | </v-toolbar-items> |
7 | 8 | </v-toolbar> |
8 | 9 | <v-content> |
... | ... | @@ -76,7 +77,7 @@ export default { |
76 | 77 | methods: { |
77 | 78 | reset () { |
78 | 79 | |
79 | - http().get('/adminForgotPassword?email='+ this.changePassword) | |
80 | + http().get('/schoolForgotPassword?email='+ this.changePassword) | |
80 | 81 | .then(response => { |
81 | 82 | console.log("response=====>",response); |
82 | 83 | this.loading = true; | ... | ... |
src/router/paths.js
... | ... | @@ -136,14 +136,14 @@ export default [ |
136 | 136 | // ) |
137 | 137 | // }, |
138 | 138 | { |
139 | - path: '/Provider', | |
139 | + path: '/students', | |
140 | 140 | meta: { }, |
141 | - name: 'Provider', | |
141 | + name: 'Students', | |
142 | 142 | props: (route) => ({ type: route.query.type }), |
143 | 143 | component: () => import( |
144 | 144 | /* webpackChunkName: "routes" */ |
145 | 145 | /* webpackMode: "lazy-once" */ |
146 | - `@/pages/Provider.vue` | |
146 | + `@/pages/Students.vue` | |
147 | 147 | ) |
148 | 148 | }, |
149 | 149 | { | ... | ... |
src/store/store.js
... | ... | @@ -13,9 +13,7 @@ export default new Vuex.Store({ |
13 | 13 | token: null, |
14 | 14 | data: null, |
15 | 15 | isUserLoggedIn: false, |
16 | - userName: null, | |
17 | - password: null, | |
18 | - name:null | |
16 | + id: null, | |
19 | 17 | }, |
20 | 18 | // serve as the one and only way to change the state of the data in the state object |
21 | 19 | mutations: { |
... | ... | @@ -31,15 +29,9 @@ export default new Vuex.Store({ |
31 | 29 | setUser (state, data) { |
32 | 30 | state.data = data |
33 | 31 | }, |
34 | - User (state, userName) { | |
35 | - state.userName = userName | |
32 | + Id (state, id) { | |
33 | + state.id = id | |
36 | 34 | }, |
37 | - password (state, password) { | |
38 | - state.password = password | |
39 | - }, | |
40 | - setName(state,name){ | |
41 | - state.name = name | |
42 | - } | |
43 | 35 | }, |
44 | 36 | //Action methods are referred to as being "dispatched" |
45 | 37 | actions: { |
... | ... | @@ -49,14 +41,8 @@ export default new Vuex.Store({ |
49 | 41 | setUser ({commit}, data) { |
50 | 42 | commit('setUser', data) |
51 | 43 | }, |
52 | - User ({commit}, userName) { | |
53 | - commit('User', userName) | |
54 | - }, | |
55 | - password ({commit}, password) { | |
56 | - commit('password', password) | |
57 | - }, | |
58 | - setName({commit},name) { | |
59 | - commit('setName',name) | |
44 | + Id ({commit}, id) { | |
45 | + commit('Id', id) | |
60 | 46 | } |
61 | 47 | |
62 | 48 | } | ... | ... |