Commit 654e1501d9b3a39f2aaa0361b547a83900dee64e

Authored by Neeraj Sharma
1 parent 99ffa9511f

remove school-manegement name and we fix intract logo in header

src/components/pageHeader/AppDrawer.vue
1 <template> 1 <template>
2 <v-navigation-drawer 2 <v-navigation-drawer
3 id="appDrawer" 3 id="appDrawer"
4 :mini-variant.sync="mini" 4 :mini-variant.sync="mini"
5 fixed 5 fixed
6 :dark="$vuetify.dark" 6 :dark="$vuetify.dark"
7 app 7 app
8 v-model="drawer" 8 v-model="drawer"
9 width="260" 9 width="260"
10 > 10 >
11 <v-toolbar style="background:#39b982" > 11 <v-toolbar style="background:#39b982" >
12 <img v-bind:src="computeLogo" height="30" class="imgLogo" alt="ana"> 12 <img v-bind:src="computeLogo" height="40" width="150" class="imgLogo" alt="ana">
13 <h5 class="white--text my-3 ml-2">School Management</h5>
14 <v-toolbar-title class="ml-0 pl-3" > 13 <v-toolbar-title class="ml-0 pl-3" >
15 </v-toolbar-title> 14 </v-toolbar-title>
16 </v-toolbar> 15 </v-toolbar>
17 <vue-perfect-scrollbar class="drawer-menu--scroll" :settings="scrollSettings"> 16 <vue-perfect-scrollbar class="drawer-menu--scroll" :settings="scrollSettings">
18 <v-list dense expand> 17 <v-list dense expand>
19 <template v-for="(item, i) in menus"> 18 <template v-for="(item, i) in menus">
20 <!--group with subitems--> 19 <!--group with subitems-->
21 <v-list-group v-if="item.items" :key="item.name" :group="item.group" :prepend-icon="item.icon" no-action="no-action"> 20 <v-list-group v-if="item.items" :key="item.name" :group="item.group" :prepend-icon="item.icon" no-action="no-action">
22 <v-list-tile slot="activator" ripple="ripple"> 21 <v-list-tile slot="activator" ripple="ripple">
23 <v-list-tile-content> 22 <v-list-tile-content>
24 <v-list-tile-title>{{ item.title }}</v-list-tile-title> 23 <v-list-tile-title>{{ item.title }}</v-list-tile-title>
25 </v-list-tile-content> 24 </v-list-tile-content>
26 </v-list-tile> 25 </v-list-tile>
27 <template v-for="(subItem, i) in item.items"> 26 <template v-for="(subItem, i) in item.items">
28 <!--sub group--> 27 <!--sub group-->
29 <v-list-group v-if="subItem.items" :key="subItem.name" :group="subItem.group" sub-group="sub-group"> 28 <v-list-group v-if="subItem.items" :key="subItem.name" :group="subItem.group" sub-group="sub-group">
30 <v-list-tile slot="activator" ripple="ripple"> 29 <v-list-tile slot="activator" ripple="ripple">
31 <v-list-tile-content> 30 <v-list-tile-content>
32 <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> 31 <v-list-tile-title>{{ subItem.title }}</v-list-tile-title>
33 </v-list-tile-content> 32 </v-list-tile-content>
34 </v-list-tile> 33 </v-list-tile>
35 <v-list-tile v-for="(grand, i) in subItem.children" :key="i" :to="genChildTarget(item, grand)" :href="grand.href" ripple="ripple"> 34 <v-list-tile v-for="(grand, i) in subItem.children" :key="i" :to="genChildTarget(item, grand)" :href="grand.href" ripple="ripple">
36 <v-list-tile-content> 35 <v-list-tile-content>
37 <v-list-tile-title>{{ grand.title }}</v-list-tile-title> 36 <v-list-tile-title>{{ grand.title }}</v-list-tile-title>
38 </v-list-tile-content> 37 </v-list-tile-content>
39 </v-list-tile> 38 </v-list-tile>
40 </v-list-group> 39 </v-list-group>
41 <!--child item--> 40 <!--child item-->
42 <v-list-tile v-else :key="i" :to="genChildTarget(item, subItem)" :href="subItem.href" :disabled="subItem.disabled" :target="subItem.target" ripple="ripple"> 41 <v-list-tile v-else :key="i" :to="genChildTarget(item, subItem)" :href="subItem.href" :disabled="subItem.disabled" :target="subItem.target" ripple="ripple">
43 <v-list-tile-content> 42 <v-list-tile-content>
44 <v-list-tile-title><span>{{ subItem.title }}</span></v-list-tile-title> 43 <v-list-tile-title><span>{{ subItem.title }}</span></v-list-tile-title>
45 </v-list-tile-content> 44 </v-list-tile-content>
46 <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> 45 <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> -->
47 <v-list-tile-action v-if="subItem.action"> 46 <v-list-tile-action v-if="subItem.action">
48 <v-icon :class="[subItem.actionClass || 'success--text']">{{ subItem.action }}</v-icon> 47 <v-icon :class="[subItem.actionClass || 'success--text']">{{ subItem.action }}</v-icon>
49 </v-list-tile-action> 48 </v-list-tile-action>
50 </v-list-tile> 49 </v-list-tile>
51 </template> 50 </template>
52 </v-list-group> 51 </v-list-group>
53 <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> 52 <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader>
54 <v-divider v-else-if="item.divider" :key="i"></v-divider> 53 <v-divider v-else-if="item.divider" :key="i"></v-divider>
55 <!--top-level link--> 54 <!--top-level link-->
56 <v-list-tile v-else :to="!item.href ? { name: item.name } : null" :href="item.href" ripple="ripple" :disabled="item.disabled" :target="item.target" rel="noopener" :key="item.name"> 55 <v-list-tile v-else :to="!item.href ? { name: item.name } : null" :href="item.href" ripple="ripple" :disabled="item.disabled" :target="item.target" rel="noopener" :key="item.name">
57 <v-list-tile-action v-if="item.icon"> 56 <v-list-tile-action v-if="item.icon">
58 <v-icon>{{ item.icon }}</v-icon> 57 <v-icon>{{ item.icon }}</v-icon>
59 </v-list-tile-action> 58 </v-list-tile-action>
60 <v-list-tile-content> 59 <v-list-tile-content>
61 <v-list-tile-title>{{ item.title }}</v-list-tile-title> 60 <v-list-tile-title>{{ item.title }}</v-list-tile-title>
62 </v-list-tile-content> 61 </v-list-tile-content>
63 <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> --> 62 <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> -->
64 <v-list-tile-action v-if="item.subAction"> 63 <v-list-tile-action v-if="item.subAction">
65 <v-icon class="success--text">{{ item.subAction }}</v-icon> 64 <v-icon class="success--text">{{ item.subAction }}</v-icon>
66 </v-list-tile-action> 65 </v-list-tile-action>
67 <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> --> 66 <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> -->
68 </v-list-tile> 67 </v-list-tile>
69 </template> 68 </template>
70 </v-list> 69 </v-list>
71 </vue-perfect-scrollbar> 70 </vue-perfect-scrollbar>
72 </v-navigation-drawer> 71 </v-navigation-drawer>
73 </template> 72 </template>
74 <script> 73 <script>
75 import menu from '@/api/menu'; 74 import menu from '@/api/menu';
76 import VuePerfectScrollbar from 'vue-perfect-scrollbar'; 75 import VuePerfectScrollbar from 'vue-perfect-scrollbar';
77 export default { 76 export default {
78 name: 'app-drawer', 77 name: 'app-drawer',
79 components: { 78 components: {
80 VuePerfectScrollbar, 79 VuePerfectScrollbar,
81 }, 80 },
82 props: { 81 props: {
83 expanded: { 82 expanded: {
84 type: Boolean, 83 type: Boolean,
85 default: true 84 default: true
86 }, 85 },
87 }, 86 },
88 data: () => ({ 87 data: () => ({
89 mini: false, 88 mini: false,
90 drawer: true, 89 drawer: true,
91 menus: menu, 90 menus: menu,
92 scrollSettings: { 91 scrollSettings: {
93 maxScrollbarLength: 160 92 maxScrollbarLength: 160
94 } 93 }
95 }), 94 }),
96 computed: { 95 computed: {
97 computeGroupActive () { 96 computeGroupActive () {
98 return true; 97 return true;
99 }, 98 },
100 computeLogo () { 99 computeLogo () {
101 return '/static/icon.jpeg'; 100 return '/static/icon.png';
102 }, 101 },
103 102
104 sideToolbarColor () { 103 sideToolbarColor () {
105 return this.$vuetify.options.extra.sideNav; 104 return this.$vuetify.options.extra.sideNav;
106 } 105 }
107 }, 106 },
108 created () { 107 created () {
109 window.getApp.$on('APP_DRAWER_TOGGLED', () => { 108 window.getApp.$on('APP_DRAWER_TOGGLED', () => {
110 this.drawer = (!this.drawer); 109 this.drawer = (!this.drawer);
111 }); 110 });
112 }, 111 },
113 112
114 113
115 methods: { 114 methods: {
116 genChildTarget (item, subItem) { 115 genChildTarget (item, subItem) {
117 if (subItem.href) return; 116 if (subItem.href) return;
118 if (subItem.component) { 117 if (subItem.component) {
119 return { 118 return {
120 name: subItem.component, 119 name: subItem.component,
121 }; 120 };
122 } 121 }
123 return { name: `${item.group}/${(subItem.name)}` }; 122 return { name: `${item.group}/${(subItem.name)}` };
124 }, 123 },
125 } 124 }
126 }; 125 };
127 </script> 126 </script>
128 127
129 128
130 <style lang="stylus"> 129 <style lang="stylus">
131 // @import '../../node_modules/vuetify/src/stylus/settings/_elevations.styl'; 130 // @import '../../node_modules/vuetify/src/stylus/settings/_elevations.styl';
132 131
133 #appDrawer 132 #appDrawer
134 overflow: hidden 133 overflow: hidden
135 .drawer-menu--scroll 134 .drawer-menu--scroll
136 height: calc(100vh - 48px) 135 height: calc(100vh - 48px)
137 overflow: auto 136 overflow: auto
138 .v-list--dense .v-list__tile:not(.v-list__tile--avatar) { 137 .v-list--dense .v-list__tile:not(.v-list__tile--avatar) {
139 height: 60px; 138 height: 60px;
140 font-size:17px; 139 font-size:17px;
141 } 140 }
142 .v-list__tile__action { 141 .v-list__tile__action {
143 min-width:36px; 142 min-width:36px;
144 } 143 }
145 .v-list__tile.primary--text { 144 .v-list__tile.primary--text {
146 color:black !important; 145 color:black !important;
147 border-left: 4px solid black; 146 border-left: 4px solid black;
148 border-radius: 4px; 147 border-radius: 4px;
149 } 148 }
150 @media screen and (max-width: 420px) { 149 @media screen and (max-width: 420px) {
151 .v-list--dense .v-list__tile:not(.v-list__tile--avatar) { 150 .v-list--dense .v-list__tile:not(.v-list__tile--avatar) {
152 font-size: 14px; 151 font-size: 14px;
153 } 152 }
154 .imgLogo{ 153 .imgLogo{
155 height: 22px; 154 height: 22px;
156 width: 20px;; 155 width: 20px;;
157 } 156 }
158 } 157 }
159 </style> 158 </style>
160 159
161 160
162 <style scoped> 161 <style scoped>
163 .theme--light .v-icon, .application .theme--light.v-icon { 162 .theme--light .v-icon, .application .theme--light.v-icon {
164 color: #39b982; 163 color: #39b982;
165 } 164 }
166 165
167 </style> 166 </style>
168 167
169 168
src/pages/Authentication/Login.vue
1 <template> 1 <template>
2 <v-app id="login"> 2 <v-app id="login">
3 <v-toolbar class="fixcolors"> 3 <v-toolbar class="fixcolors">
4 <v-toolbar-items> 4 <v-toolbar-items>
5 <img src="/static/icon.jpeg" height="36" alt="logo"> 5 <img src="/static/icon.png" height="40" width="140" alt="logo">
6 <h3 class="white--text my-3 ml-5 logoSchool">School-Management</h3> 6 <!-- <h3 class="white--text my-3 ml-5 logoSchool">School-Management</h3> -->
7 </v-toolbar-items> 7 </v-toolbar-items>
8 </v-toolbar> 8 </v-toolbar>
9 <v-content> 9 <v-content>
10 <v-container fluid fill-height> 10 <v-container fluid fill-height>
11 <v-snackbar 11 <v-snackbar
12 :timeout="timeout" 12 :timeout="timeout"
13 :top="y === 'top'" 13 :top="y === 'top'"
14 :right="x === 'right'" 14 :right="x === 'right'"
15 :vertical="mode === 'vertical'" 15 :vertical="mode === 'vertical'"
16 v-model="snackbar" 16 v-model="snackbar"
17 :color="color" 17 :color="color"
18 >{{ text }}</v-snackbar> 18 >{{ text }}</v-snackbar>
19 <v-layout align-center justify-center> 19 <v-layout align-center justify-center>
20 <v-flex xs12 sm10 md6 lg4> 20 <v-flex xs12 sm10 md6 lg4>
21 <v-toolbar class="fixcolors" dark> 21 <v-toolbar class="fixcolors" dark>
22 <v-spacer></v-spacer> 22 <v-spacer></v-spacer>
23 <v-toolbar-title>School Login</v-toolbar-title> 23 <v-toolbar-title>School Login</v-toolbar-title>
24 <v-spacer></v-spacer> 24 <v-spacer></v-spacer>
25 </v-toolbar> 25 </v-toolbar>
26 26
27 <v-card class="elevation-1 pa-1"> 27 <v-card class="elevation-1 pa-1">
28 <v-card-text> 28 <v-card-text>
29 <v-flex xs12 sm12 md12 lg12> 29 <v-flex xs12 sm12 md12 lg12>
30 <v-form ref="form" v-model="valid" lazy-validation> 30 <v-form ref="form" v-model="valid" lazy-validation>
31 <v-text-field 31 <v-text-field
32 v-model="userLogincredentials.email" 32 v-model="userLogincredentials.email"
33 :rules="nameRules" 33 :rules="nameRules"
34 label="Username" 34 label="Username"
35 required 35 required
36 ></v-text-field> 36 ></v-text-field>
37 <v-text-field 37 <v-text-field
38 :rules="[rules.required]" 38 :rules="[rules.required]"
39 v-model="userLogincredentials.password" 39 v-model="userLogincredentials.password"
40 :append-icon="e1 ? 'visibility_off' : 'visibility'" 40 :append-icon="e1 ? 'visibility_off' : 'visibility'"
41 :append-icon-cb="() => (e1 = !e1)" 41 :append-icon-cb="() => (e1 = !e1)"
42 :type="e1 ? 'password' : 'text'" 42 :type="e1 ? 'password' : 'text'"
43 name="input-10-1" 43 name="input-10-1"
44 label="Password" 44 label="Password"
45 @keyup.enter="login"
45 counter 46 counter
46 ></v-text-field> 47 ></v-text-field>
47 </v-form> 48 </v-form>
48 <v-layout row wrap> 49 <v-layout row wrap>
49 <v-flex xs6> 50 <v-flex xs6>
50 <!-- <v-checkbox :label="`Remember me`" v-model="remember"></v-checkbox> --> 51 <!-- <v-checkbox :label="`Remember me`" v-model="remember"></v-checkbox> -->
51 </v-flex> 52 </v-flex>
52 <v-flex xs6> 53 <v-flex xs6>
53 <h5 class="right mt-4"> <router-link class="link" to="/forgetpassword" style="border-bottom: 2px solid #aaa;">Forgot Password</router-link></h5> 54 <h5 class="right mt-4"> <router-link class="link" to="/forgetpassword" style="border-bottom: 2px solid #aaa;">Forgot Password</router-link></h5>
54 </v-flex> 55 </v-flex>
55 </v-layout> 56 </v-layout>
56 </v-flex> 57 </v-flex>
57 </v-card-text> 58 </v-card-text>
58 <v-layout> 59 <v-layout>
59 <v-flex sm12 class="my-3"> 60 <v-flex sm12 class="my-3">
60 <v-btn style="margin: auto;display: block;b" class="fixcolors" round dark large @click="login" :loading="loading">Login</v-btn> 61 <v-btn style="margin: auto;display: block;b" class="fixcolors" round dark large @click="login" :loading="loading">Login</v-btn>
61 </v-flex> 62 </v-flex>
62 </v-layout> 63 </v-layout>
63 <v-layout> 64 <v-layout>
64 </v-layout> 65 </v-layout>
65 </v-card> 66 </v-card>
66 </v-flex> 67 </v-flex>
67 </v-layout> 68 </v-layout>
68 </v-container> 69 </v-container>
69 </v-content> 70 </v-content>
70 <v-footer class="pa-4 fixcolors"></v-footer> 71 <v-footer class="pa-4 fixcolors"></v-footer>
71 </v-app> 72 </v-app>
72 </template> 73 </template>
73 74
74 <script> 75 <script>
75 import http from "@/Services/http.js"; 76 import http from "@/Services/http.js";
76 export default { 77 export default {
77 data() { 78 data() {
78 return { 79 return {
79 snackbar: false, 80 snackbar: false,
80 y: "top", 81 y: "top",
81 x: "right", 82 x: "right",
82 mode: "", 83 mode: "",
83 timeout: 3000, 84 timeout: 3000,
84 text: "", 85 text: "",
85 e1: true, 86 e1: true,
86 loading: false, 87 loading: false,
87 remember: false, 88 remember: false,
88 valid: false, 89 valid: false,
89 userLogincredentials: {}, 90 userLogincredentials: {},
90 nameRules: [ 91 nameRules: [
91 v => !!v || "Username is required" 92 v => !!v || "Username is required"
92 93
93 ], 94 ],
94 password: "", 95 password: "",
95 email:"", 96 email:"",
96 rules: { 97 rules: {
97 required: value => !!value || "password is Required.", 98 required: value => !!value || "password is Required.",
98 // min: v => 99 // min: v =>
99 // (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/.test( 100 // (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/.test(
100 // v 101 // v
101 // ) && 102 // ) &&
102 // v.length >= 6) || 103 // v.length >= 6) ||
103 // "Min 4 characters upper case lower case symbol required" 104 // "Min 4 characters upper case lower case symbol required"
104 } 105 }
105 }; 106 };
106 }, 107 },
107 methods: { 108 methods: {
108 login() { 109 login() {
109 this.loading = true; 110 this.loading = true;
110 var userdata = { 111 var userdata = {
111 email: this.userLogincredentials.email, 112 email: this.userLogincredentials.email,
112 password: this.userLogincredentials.password, 113 password: this.userLogincredentials.password,
113 role:"ADMIN" 114 role:"ADMIN"
114 }; 115 };
115 http() 116 http()
116 .post("/schoolLogin", userdata) 117 .post("/schoolLogin", userdata)
117 .then(response => { 118 .then(response => {
118 this.$store.dispatch("setToken", response.data.data.token); 119 this.$store.dispatch("setToken", response.data.data.token);
119 this.$store.dispatch("Id", response.data.data.id); 120 this.$store.dispatch("Id", response.data.data.id);
120 this.loading = false; 121 this.loading = false;
121 this.$router.push("/teachers"); 122 this.$router.push("/teachers");
122 }) 123 })
123 .catch(error => { 124 .catch(error => {
124 this.text = error.response.data.message 125 this.text = error.response.data.message
125 this.snackbar = true; 126 this.snackbar = true;
126 this.loading = false; 127 this.loading = false;
127 }); 128 });
128 } 129 }
129 }, 130 },
130 computed: { 131 computed: {
131 color() { 132 color() {
132 return this.loading ? "success" : "error"; 133 return this.loading ? "success" : "error";
133 } 134 }
134 } 135 }
135 }; 136 };
136 </script> 137 </script>
137 138
138 <style scoped lang="css"> 139 <style scoped lang="css">
139 #login { 140 #login {
140 width: 100%; 141 width: 100%;
141 position: absolute; 142 position: absolute;
142 top: 0; 143 top: 0;
143 left: 0; 144 left: 0;
144 content: ""; 145 content: "";
145 z-index: 0; 146 z-index: 0;
146 } 147 }
147 </style> 148 </style>
148 <style scoped> 149 <style scoped>
149 img { 150 img {
150 position: absolute; 151 position: absolute;
151 top: 13px; 152 top: 13px;
152 left: 8px; 153 left: 8px;
153 } 154 }
154 .v-btn--large { 155 .v-btn--large {
155 padding: 0px 84px; 156 padding: 0px 84px;
156 } 157 }
157 .link{ 158 .link{
158 text-decoration:none; 159 text-decoration:none;
159 } 160 }
160 a { 161 a {
161 color: #696969; 162 color: #696969;
162 } 163 }
163 .forget{ 164 .forget{
164 margin-top:20px; 165 margin-top:20px;
165 } 166 }
166 .mt-4 { 167 .mt-4 {
167 margin-top: 21px !important; 168 margin-top: 21px !important;
168 } 169 }
169 @media screen and (max-width: 600px) { 170 @media screen and (max-width: 600px) {
170 .forget{ 171 .forget{
171 margin-top:none; 172 margin-top:none;
172 margin-left:18px; 173 margin-left:18px;
173 } 174 }
174 img{ 175 img{
175 top: 21px; 176 top: 21px;
176 left: 10px; 177 left: 10px;
177 height: 24px; 178 height: 24px;
178 width: 33px; 179 width: 33px;
179 } 180 }
180 .logoSchool{ 181 .logoSchool{
181 font-size: 18px; 182 font-size: 18px;
182 margin-top: 20px !important; 183 margin-top: 20px !important;
183 } 184 }
184 h5 { 185 h5 {
185 font-size: 14px !important; 186 font-size: 14px !important;
186 } 187 }
187 } 188 }
188 </style> 189 </style>
src/pages/Authentication/forgetpassword.vue
1 <template> 1 <template>
2 <v-app id="login"> 2 <v-app id="login">
3 <v-toolbar class="fixcolors"> 3 <v-toolbar class="fixcolors">
4 <v-toolbar-items> 4 <v-toolbar-items>
5 <img src="/static/icon.jpeg" height="36" alt="logo"> 5 <img src="/static/icon.png" height="40" width="140" alt="logo">
6 <h3 class="white--text my-3 ml-5 logoSchool">School Management</h3>
7 </v-toolbar-items> 6 </v-toolbar-items>
8 </v-toolbar> 7 </v-toolbar>
9 <v-container fluid> 8 <v-container fluid>
10 <v-layout align-center justify-center fill-height> 9 <v-layout align-center justify-center fill-height>
11 <v-flex xs12 sm8 md7 lg8> 10 <v-flex xs12 sm8 md7 lg8>
12 <div> 11 <div>
13 <v-app> 12 <v-app>
14 <v-stepper v-model="e2"> 13 <v-stepper v-model="e2">
15 <v-stepper-header> 14 <v-stepper-header>
16 <v-stepper-step :complete="e2 > 1" step="1">Fill Your Email</v-stepper-step> 15 <v-stepper-step :complete="e2 > 1" step="1">Fill Your Email</v-stepper-step>
17 <v-divider></v-divider> 16 <v-divider></v-divider>
18 <v-stepper-step step="2">Last Step of Forget Password</v-stepper-step> 17 <v-stepper-step step="2">Last Step of Forget Password</v-stepper-step>
19 </v-stepper-header> 18 </v-stepper-header>
20 <v-stepper-items> 19 <v-stepper-items>
21 <v-stepper-content step="1"> 20 <v-stepper-content step="1">
22 <v-content> 21 <v-content>
23 <v-container fluid class="content"> 22 <v-container fluid class="content">
24 <v-layout align-center justify-center fill-height> 23 <v-layout align-center justify-center fill-height>
25 <v-flex xs12 sm8 md7 lg8> 24 <v-flex xs12 sm8 md7 lg8>
26 <v-toolbar class="fixcolors" dark> 25 <v-toolbar class="fixcolors" dark>
27 <v-spacer></v-spacer> 26 <v-spacer></v-spacer>
28 <v-toolbar-title>Forget Password</v-toolbar-title> 27 <v-toolbar-title>Forget Password</v-toolbar-title>
29 <v-spacer></v-spacer> 28 <v-spacer></v-spacer>
30 </v-toolbar> 29 </v-toolbar>
31 <v-card class="elevation-1 pa-1"> 30 <v-card class="elevation-1 pa-1">
32 <v-card-text> 31 <v-card-text>
33 <h5 class="text-xs-center"> Not to Worry! Enter to your registered Email ID. </h5> 32 <h5 class="text-xs-center"> Not to Worry! Enter to your registered Email ID. </h5>
34 <h5 class="text-xs-center"> We'll send you a reset.</h5> 33 <h5 class="text-xs-center"> We'll send you a reset.</h5>
35 <v-flex lg6 sm6 xs10 offset-sm3 offset-xs1 offset-lg3> 34 <v-flex lg6 sm6 xs10 offset-sm3 offset-xs1 offset-lg3>
36 <v-form ref="form" v-model="valid" lazy-validation> 35 <v-form ref="form" v-model="valid" lazy-validation>
37 <div class="custom-input-align"> 36 <div class="custom-input-align">
38 <v-text-field 37 <v-text-field
39 class="text-md-center" 38 class="text-md-center"
40 :rules="emailRules" 39 :rules="emailRules"
41 v-model="forgetemail" 40 v-model="forgetemail"
42 label="Enter Your email ID" 41 label="Enter Your email ID"
43 required></v-text-field> 42 required></v-text-field>
44 </div> 43 </div>
45 </v-form> 44 </v-form>
46 </v-flex> 45 </v-flex>
47 </v-card-text> 46 </v-card-text>
48 <v-card-actions> 47 <v-card-actions>
49 <v-flex text-xs-center> 48 <v-flex text-xs-center>
50 <v-btn round class="mt-1 button fixcolors" dark large @click="reset">Send Request</v-btn> 49 <v-btn round class="mt-1 button fixcolors" dark large @click="reset">Send Request</v-btn>
51 </v-flex> 50 </v-flex>
52 </v-card-actions> 51 </v-card-actions>
53 <v-snackbar 52 <v-snackbar
54 :timeout="timeout" 53 :timeout="timeout"
55 :top="y === 'top'" 54 :top="y === 'top'"
56 :right="x === 'right'" 55 :right="x === 'right'"
57 :vertical="mode === 'vertical'" 56 :vertical="mode === 'vertical'"
58 v-model="snackbar" 57 v-model="snackbar"
59 :color= color 58 :color= color
60 > 59 >
61 {{ text }} 60 {{ text }}
62 </v-snackbar> 61 </v-snackbar>
63 </v-snackbar> 62 </v-snackbar>
64 </v-card> 63 </v-card>
65 </v-flex> 64 </v-flex>
66 </v-layout> 65 </v-layout>
67 </v-container> 66 </v-container>
68 </v-content> 67 </v-content>
69 </v-stepper-content> 68 </v-stepper-content>
70 <v-stepper-content step="2"> 69 <v-stepper-content step="2">
71 <v-content> 70 <v-content>
72 <v-container fluid fill-height> 71 <v-container fluid fill-height>
73 <v-layout align-center justify-center> 72 <v-layout align-center justify-center>
74 <v-flex xs12 sm8 md7 lg8> 73 <v-flex xs12 sm8 md7 lg8>
75 <v-toolbar class="fixcolors" dark> 74 <v-toolbar class="fixcolors" dark>
76 <v-spacer></v-spacer> 75 <v-spacer></v-spacer>
77 <v-toolbar-title>Forget Password</v-toolbar-title> 76 <v-toolbar-title>Forget Password</v-toolbar-title>
78 <v-spacer></v-spacer> 77 <v-spacer></v-spacer>
79 </v-toolbar> 78 </v-toolbar>
80 <v-card class="elevation-1 pa-1"> 79 <v-card class="elevation-1 pa-1">
81 <v-card-text> 80 <v-card-text>
82 <h5 class="text-xs-center"> Not to Worry! Enter to your registered Email ID And New Password. </h5> 81 <h5 class="text-xs-center"> Not to Worry! Enter to your registered Email ID And New Password. </h5>
83 <h5 class="text-xs-center"> We'll send you a reset.</h5> 82 <h5 class="text-xs-center"> We'll send you a reset.</h5>
84 <v-flex lg6 sm6 xs10 offset-sm3 offset-xs1 offset-lg3> 83 <v-flex lg6 sm6 xs10 offset-sm3 offset-xs1 offset-lg3>
85 <v-form class="mt-4"> 84 <v-form class="mt-4">
86 <div class="custom-input-align"> 85 <div class="custom-input-align">
87 <v-text-field 86 <v-text-field
88 class="text-md-center" 87 class="text-md-center"
89 v-model="email" 88 v-model="email"
90 :rules="emailRules" 89 :rules="emailRules"
91 label="Enter Your email ID" 90 label="Enter Your email ID"
92 required></v-text-field> 91 required></v-text-field>
93 <v-text-field 92 <v-text-field
94 :rules="[rules.required,rules.min]" 93 :rules="[rules.required,rules.min]"
95 v-model="changepassword" 94 v-model="changepassword"
96 :append-icon="e1 ? 'visibility_off' : 'visibility'" 95 :append-icon="e1 ? 'visibility_off' : 'visibility'"
97 :append-icon-cb="() => (e1 = !e1)" 96 :append-icon-cb="() => (e1 = !e1)"
98 :type="e1 ? 'password' : 'text'" 97 :type="e1 ? 'password' : 'text'"
99 name="input-10-1" 98 name="input-10-1"
100 label="Password" 99 label="Password"
101 counter 100 counter
102 ></v-text-field> 101 ></v-text-field>
103 </div> 102 </div>
104 </v-form> 103 </v-form>
105 </v-flex> 104 </v-flex>
106 </v-card-text> 105 </v-card-text>
107 <v-card-actions> 106 <v-card-actions>
108 <v-flex text-xs-center> 107 <v-flex text-xs-center>
109 <v-btn round class="mt-1 button fixcolors" dark large @click="resetPassword">Send Request</v-btn> 108 <v-btn round class="mt-1 button fixcolors" dark large @click="resetPassword">Send Request</v-btn>
110 </v-flex> 109 </v-flex>
111 </v-card-actions> 110 </v-card-actions>
112 <v-snackbar 111 <v-snackbar
113 :timeout="timeout" 112 :timeout="timeout"
114 :top="y === 'top'" 113 :top="y === 'top'"
115 :right="x === 'right'" 114 :right="x === 'right'"
116 :vertical="mode === 'vertical'" 115 :vertical="mode === 'vertical'"
117 v-model="snackbar" 116 v-model="snackbar"
118 :color= color 117 :color= color
119 > 118 >
120 {{ text }} 119 {{ text }}
121 </v-snackbar> 120 </v-snackbar>
122 </v-snackbar> 121 </v-snackbar>
123 </v-card> 122 </v-card>
124 </v-flex> 123 </v-flex>
125 </v-layout> 124 </v-layout>
126 </v-container> 125 </v-container>
127 </v-content> 126 </v-content>
128 <v-btn 127 <v-btn
129 color="primary" 128 color="primary"
130 dark 129 dark
131 @click="e2 = 1" 130 @click="e2 = 1"
132 > 131 >
133 Back 132 Back
134 </v-btn> 133 </v-btn>
135 </v-stepper-content> 134 </v-stepper-content>
136 </v-stepper-items> 135 </v-stepper-items>
137 </v-stepper> 136 </v-stepper>
138 </v-app> 137 </v-app>
139 </div> 138 </div>
140 </v-flex> 139 </v-flex>
141 </v-layout> 140 </v-layout>
142 </v-container> 141 </v-container>
143 <v-footer class="pa-4 fixcolors"> 142 <v-footer class="pa-4 fixcolors">
144 </v-footer> 143 </v-footer>
145 </v-app> 144 </v-app>
146 </template> 145 </template>
147 146
148 147
149 148
150 <script> 149 <script>
151 import http from '@/Services/http.js'; 150 import http from '@/Services/http.js';
152 151
153 export default { 152 export default {
154 data: () => ({ 153 data: () => ({
155 e1: true, 154 e1: true,
156 e2:0, 155 e2:0,
157 snackbar: false, 156 snackbar: false,
158 y: 'top', 157 y: 'top',
159 x: 'right', 158 x: 'right',
160 mode: '', 159 mode: '',
161 timeout: 4000, 160 timeout: 4000,
162 text: '', 161 text: '',
163 loading: false, 162 loading: false,
164 email: '', 163 email: '',
165 forgetemail:'', 164 forgetemail:'',
166 password:'', 165 password:'',
167 changepassword:'', 166 changepassword:'',
168 valid: true, 167 valid: true,
169 emailRules: [ 168 emailRules: [
170 v => !!v || "E-mail is required", 169 v => !!v || "E-mail is required",
171 v => 170 v =>
172 /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 171 /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) ||
173 "E-mail must be valid" 172 "E-mail must be valid"
174 ], 173 ],
175 rules: { 174 rules: {
176 required: value => !!value || "password is Required.", 175 required: value => !!value || "password is Required.",
177 min: v => 176 min: v =>
178 (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/.test( 177 (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/.test(
179 v 178 v
180 ) && 179 ) &&
181 v.length >= 6) || 180 v.length >= 6) ||
182 "Min 4 characters upper case lower case symbol required" 181 "Min 4 characters upper case lower case symbol required"
183 } 182 }
184 }), 183 }),
185 184
186 methods: { 185 methods: {
187 reset () { 186 reset () {
188 if (this.$refs.form.validate()) { 187 if (this.$refs.form.validate()) {
189 http().get('/schoolForgotPassword?email='+ this.forgetemail) 188 http().get('/schoolForgotPassword?email='+ this.forgetemail)
190 .then(response => { 189 .then(response => {
191 // console.log("response=====>",response.data.data.token); 190 // console.log("response=====>",response.data.data.token);
192 this.$store.dispatch("setToken", response.data.data.token); 191 this.$store.dispatch("setToken", response.data.data.token);
193 this.loading = true; 192 this.loading = true;
194 this.e2 = 2 ; 193 this.e2 = 2 ;
195 if(this.snackbar=true){ 194 if(this.snackbar=true){
196 this.text= "Please you Fill Last Step of Forget Password!" 195 this.text= "Please you Fill Last Step of Forget Password!"
197 } 196 }
198 }).catch(err => { 197 }).catch(err => {
199 this.text="User Not Found or Incorrect Email" 198 this.text="User Not Found or Incorrect Email"
200 this.snackbar= true; 199 this.snackbar= true;
201 this.loading = false; 200 this.loading = false;
202 }) 201 })
203 } 202 }
204 }, 203 },
205 resetPassword(){ 204 resetPassword(){
206 let forgotPassword = { 205 let forgotPassword = {
207 resetToken: this.$store.state.token, 206 resetToken: this.$store.state.token,
208 email: this.email, 207 email: this.email,
209 password: this.changepassword 208 password: this.changepassword
210 } 209 }
211 http().post('/schoolResetPassword',forgotPassword) 210 http().post('/schoolResetPassword',forgotPassword)
212 .then(response => { 211 .then(response => {
213 console.log("response=====>",response); 212 console.log("response=====>",response);
214 this.loading = true; 213 this.loading = true;
215 if(this.snackbar=true){ 214 if(this.snackbar=true){
216 this.text= "Successfully Change your Password" 215 this.text= "Successfully Change your Password"
217 } 216 }
218 setTimeout(() => { 217 setTimeout(() => {
219 this.$router.push('/'); 218 this.$router.push('/');
220 }, 1000); 219 }, 1000);
221 }).catch(err => { 220 }).catch(err => {
222 this.text="User Not Found or Incorrect Email" 221 this.text="User Not Found or Incorrect Email"
223 this.snackbar= true; 222 this.snackbar= true;
224 this.loading = false; 223 this.loading = false;
225 }) 224 })
226 } 225 }
227 }, 226 },
228 computed:{ 227 computed:{
229 color(){ 228 color(){
230 return this.loading ? 'success' : 'error' 229 return this.loading ? 'success' : 'error'
231 } 230 }
232 } 231 }
233 232
234 }; 233 };
235 </script> 234 </script>
236 <style scoped lang="css"> 235 <style scoped lang="css">
237 .content { 236 .content {
238 padding: 100px 0px 100px 0px !important; 237 padding: 100px 0px 100px 0px !important;
239 } 238 }
240 #login { 239 #login {
241 height: 50%; 240 height: 50%;
242 width: 100%; 241 width: 100%;
243 position: absolute; 242 position: absolute;
244 top: 0; 243 top: 0;
245 left: 0; 244 left: 0;
246 content: ""; 245 content: "";
247 z-index: 0; 246 z-index: 0;
248 } 247 }
249 img{ 248 img{
250 position:absolute; 249 position:absolute;
251 top:13px; 250 top:13px;
252 left:8px; 251 left:8px;
253 } 252 }
254 .v-btn--large { 253 .v-btn--large {
255 padding: 0px 74px; 254 padding: 0px 74px;
256 } 255 }
257 .button{ 256 .button{
258 text-transform: none; 257 text-transform: none;
259 } 258 }
260 @media screen and (max-width: 472px) { 259 @media screen and (max-width: 472px) {
261 .v-btn--large { 260 .v-btn--large {
262 padding:0px 20px !important; 261 padding:0px 20px !important;
263 font-size:13px; 262 font-size:13px;
264 } 263 }
265 h5 { 264 h5 {
266 font-size: 11px; 265 font-size: 11px;
267 } 266 }
268 } 267 }
269 @media screen and (max-width: 600px) { 268 @media screen and (max-width: 600px) {
270 .theme--light .v-btn, .application .theme--light.v-btn { 269 .theme--light .v-btn, .application .theme--light.v-btn {
271 color: white !important; 270 color: white !important;
272 } 271 }
273 img{ 272 img{
274 top: 21px; 273 top: 21px;
275 left: 10px; 274 left: 10px;
276 height: 24px; 275 height: 24px;
277 width: 33px; 276 width: 33px;
278 } 277 }
279 .logoSchool{ 278 .logoSchool{
280 font-size: 18px; 279 font-size: 18px;
281 margin-top: 20px !important; 280 margin-top: 20px !important;
282 } 281 }
283 .content { 282 .content {
284 padding: 0px 0px 0px 0px !important; 283 padding: 0px 0px 0px 0px !important;
285 } 284 }
286 } 285 }
287 </style> 286 </style>
static/icon.jpeg

8.25 KB