Commit 200c2d17178e31919bdd75fe4daca8692365dc36

Authored by Neeraj Sharma
1 parent 4efdca5643

implement change status in student and teacher

src/pages/Students/students.vue
1 <template> 1 <template>
2 <div> 2 <div>
3 <v-tabs grow slider-color="gray"> 3 <v-tabs grow slider-color="gray">
4 <v-tab 4 <v-tab
5 ripple 5 ripple
6 @click="activeTab('existing')" 6 @click="activeTab('existing')"
7 v-bind:class="{ active: isActive }" 7 v-bind:class="{ active: isActive }"
8 id="tab" 8 id="tab"
9 class="subheading" 9 class="subheading"
10 >Existing Students</v-tab> 10 >Existing Students</v-tab>
11 <v-tab 11 <v-tab
12 ripple 12 ripple
13 @click="activeTab('new')" 13 @click="activeTab('new')"
14 v-bind:class="{ active: newActive }" 14 v-bind:class="{ active: newActive }"
15 id="tab1" 15 id="tab1"
16 User 16 User
17 class="subheading" 17 class="subheading"
18 >Add New Students</v-tab> 18 >Add New Students</v-tab>
19 19
20 <!-- ****** EDITS STUDENTS DETAILS ****** --> 20 <!-- ****** EDITS STUDENTS DETAILS ****** -->
21 21
22 <v-tab-item> 22 <v-tab-item>
23 <v-snackbar 23 <v-snackbar
24 :timeout="timeout" 24 :timeout="timeout"
25 :top="y === 'top'" 25 :top="y === 'top'"
26 :right="x === 'right'" 26 :right="x === 'right'"
27 :vertical="mode === 'vertical'" 27 :vertical="mode === 'vertical'"
28 v-model="snackbar" 28 v-model="snackbar"
29 color="success" 29 color="success"
30 >{{ text }}</v-snackbar> 30 >{{ text }}</v-snackbar>
31 <v-dialog v-model="dialog" max-width="170 0px" scrollable> 31 <v-dialog v-model="dialog" max-width="170 0px" scrollable>
32 <v-card flat> 32 <v-card flat>
33 <v-toolbar color="grey lighten-2" flat> 33 <v-toolbar color="grey lighten-2" flat>
34 <v-spacer></v-spacer> 34 <v-spacer></v-spacer>
35 <v-toolbar-title> 35 <v-toolbar-title>
36 <h3>Edit Student Profile</h3> 36 <h3>Edit Student Profile</h3>
37 </v-toolbar-title> 37 </v-toolbar-title>
38 <v-spacer></v-spacer> 38 <v-spacer></v-spacer>
39 </v-toolbar> 39 </v-toolbar>
40 <v-card-text style="height: 680px;"> 40 <v-card-text style="height: 680px;">
41 <v-form ref="form"> 41 <v-form ref="form">
42 <v-container fluid> 42 <v-container fluid>
43 <v-layout> 43 <v-layout>
44 <v-flex 44 <v-flex
45 xs12 45 xs12
46 class="text-xs-center text-sm-center text-md-center text-lg-center" 46 class="text-xs-center text-sm-center text-md-center text-lg-center"
47 > 47 >
48 <v-avatar size="160px"> 48 <v-avatar size="160px">
49 <img 49 <img
50 src="/static/icon/user.png" 50 src="/static/icon/user.png"
51 v-if="!editedItem.profilePicUrl && !editImageUrl" 51 v-if="!editedItem.profilePicUrl && !editImageUrl"
52 /> 52 />
53 <img 53 <img
54 :src="editedItem.profilePicUrl" 54 :src="editedItem.profilePicUrl"
55 v-else-if="editedItem.profilePicUrl && !editImageUrl" 55 v-else-if="editedItem.profilePicUrl && !editImageUrl"
56 /> 56 />
57 <img 57 <img
58 v-if="editImageUrl" 58 v-if="editImageUrl"
59 :src="editImageUrl" 59 :src="editImageUrl"
60 height="150" 60 height="150"
61 style="border-radius:50%; width:200px" 61 style="border-radius:50%; width:200px"
62 /> 62 />
63 </v-avatar> 63 </v-avatar>
64 <input 64 <input
65 type="file" 65 type="file"
66 style="display: none" 66 style="display: none"
67 ref="editDataImage" 67 ref="editDataImage"
68 accept="image/*" 68 accept="image/*"
69 @change="onEditFilePicked" 69 @change="onEditFilePicked"
70 /> 70 />
71 </v-flex> 71 </v-flex>
72 </v-layout> 72 </v-layout>
73 <v-layout> 73 <v-layout>
74 <v-flex xs12 sm4> 74 <v-flex xs12 sm4>
75 <v-layout> 75 <v-layout>
76 <v-flex xs4 class="pt-4 subheading"> 76 <v-flex xs4 class="pt-4 subheading">
77 <label class="right hidden-xs-only hidden-sm-only">Select Class:</label> 77 <label class="right hidden-xs-only hidden-sm-only">Select Class:</label>
78 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Class:</label> 78 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Class:</label>
79 </v-flex> 79 </v-flex>
80 <v-flex xs8 class="ml-3"> 80 <v-flex xs8 class="ml-3">
81 <v-select 81 <v-select
82 :items="addclass" 82 :items="addclass"
83 label="Select Class" 83 label="Select Class"
84 v-model="editedItem.select" 84 v-model="editedItem.select"
85 item-text="classNum" 85 item-text="classNum"
86 item-value="_id" 86 item-value="_id"
87 name="Select Class" 87 name="Select Class"
88 @change="getSections(editedItem.select)" 88 @change="getSections(editedItem.select)"
89 required 89 required
90 ></v-select> 90 ></v-select>
91 </v-flex> 91 </v-flex>
92 </v-layout> 92 </v-layout>
93 </v-flex> 93 </v-flex>
94 <v-flex xs12 sm4> 94 <v-flex xs12 sm4>
95 <v-layout> 95 <v-layout>
96 <v-flex xs4 class="pt-4 subheading"> 96 <v-flex xs4 class="pt-4 subheading">
97 <label class="right hidden-xs-only hidden-sm-only">Select Section:</label> 97 <label class="right hidden-xs-only hidden-sm-only">Select Section:</label>
98 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Section:</label> 98 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Section:</label>
99 </v-flex> 99 </v-flex>
100 <v-flex xs8 class="ml-3"> 100 <v-flex xs8 class="ml-3">
101 <v-select 101 <v-select
102 :items="addSection" 102 :items="addSection"
103 label="Select Section" 103 label="Select Section"
104 v-model="editedItem.selectSection" 104 v-model="editedItem.selectSection"
105 item-text="name" 105 item-text="name"
106 item-value="_id" 106 item-value="_id"
107 name="Select Section" 107 name="Select Section"
108 required 108 required
109 ></v-select> 109 ></v-select>
110 </v-flex> 110 </v-flex>
111 </v-layout> 111 </v-layout>
112 </v-flex> 112 </v-flex>
113 <v-flex xs12 sm4> 113 <v-flex xs12 sm4>
114 <v-layout> 114 <v-layout>
115 <v-flex xs4 class="pt-4 subheading"> 115 <v-flex xs4 class="pt-4 subheading">
116 <label class="right hidden-xs-only hidden-sm-only">Full Name:</label> 116 <label class="right hidden-xs-only hidden-sm-only">Full Name:</label>
117 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Name:</label> 117 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Name:</label>
118 </v-flex> 118 </v-flex>
119 <v-flex xs8 class="ml-3"> 119 <v-flex xs8 class="ml-3">
120 <v-text-field 120 <v-text-field
121 v-model="editedItem.name" 121 v-model="editedItem.name"
122 placeholder="fill your full Name" 122 placeholder="fill your full Name"
123 name="name" 123 name="name"
124 type="text" 124 type="text"
125 required 125 required
126 ></v-text-field> 126 ></v-text-field>
127 </v-flex> 127 </v-flex>
128 </v-layout> 128 </v-layout>
129 </v-flex> 129 </v-flex>
130 </v-layout> 130 </v-layout>
131 <v-layout> 131 <v-layout>
132 <v-flex xs12 sm4> 132 <v-flex xs12 sm4>
133 <v-layout> 133 <v-layout>
134 <v-flex xs4 class="pt-4 subheading"> 134 <v-flex xs4 class="pt-4 subheading">
135 <label class="right hidden-xs-only hidden-sm-only">Email Id:</label> 135 <label class="right hidden-xs-only hidden-sm-only">Email Id:</label>
136 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Email:</label> 136 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Email:</label>
137 </v-flex> 137 </v-flex>
138 <v-flex xs8 class="ml-3"> 138 <v-flex xs8 class="ml-3">
139 <v-text-field 139 <v-text-field
140 placeholder="fill your email" 140 placeholder="fill your email"
141 v-model="editedItem.email" 141 v-model="editedItem.email"
142 type="text" 142 type="text"
143 name="email" 143 name="email"
144 required 144 required
145 ></v-text-field> 145 ></v-text-field>
146 </v-flex> 146 </v-flex>
147 </v-layout> 147 </v-layout>
148 </v-flex> 148 </v-flex>
149 <v-flex xs12 sm4> 149 <v-flex xs12 sm4>
150 <v-layout> 150 <v-layout>
151 <v-flex xs4 class="pt-4 subheading"> 151 <v-flex xs4 class="pt-4 subheading">
152 <label class="right hidden-sm-only hidden-xs-only">Date of Birth:</label> 152 <label class="right hidden-sm-only hidden-xs-only">Date of Birth:</label>
153 <label class="right hidden-lg-only hidden-xl-only hidden-md-only">D.O.B:</label> 153 <label class="right hidden-lg-only hidden-xl-only hidden-md-only">D.O.B:</label>
154 </v-flex> 154 </v-flex>
155 <v-flex xs8 class="ml-3"> 155 <v-flex xs8 class="ml-3">
156 <v-menu 156 <v-menu
157 ref="menu" 157 ref="menu"
158 :close-on-content-click="false" 158 :close-on-content-click="false"
159 v-model="menu1" 159 v-model="menu1"
160 :nudge-right="40" 160 :nudge-right="40"
161 lazy 161 lazy
162 transition="scale-transition" 162 transition="scale-transition"
163 offset-y 163 offset-y
164 full-width 164 full-width
165 min-width="290px" 165 min-width="290px"
166 > 166 >
167 <v-text-field 167 <v-text-field
168 slot="activator" 168 slot="activator"
169 v-model="editedItem.dob" 169 v-model="editedItem.dob"
170 placeholder="Select Dob" 170 placeholder="Select Dob"
171 ></v-text-field> 171 ></v-text-field>
172 <v-date-picker 172 <v-date-picker
173 ref="picker" 173 ref="picker"
174 v-model="editedItem.dob" 174 v-model="editedItem.dob"
175 :max="new Date().toISOString().substr(0, 10)" 175 :max="new Date().toISOString().substr(0, 10)"
176 min="1950-01-01" 176 min="1950-01-01"
177 @input="menu1 = false" 177 @input="menu1 = false"
178 ></v-date-picker> 178 ></v-date-picker>
179 </v-menu> 179 </v-menu>
180 </v-flex> 180 </v-flex>
181 </v-layout> 181 </v-layout>
182 </v-flex> 182 </v-flex>
183 <v-flex xs12 sm4> 183 <v-flex xs12 sm4>
184 <v-layout> 184 <v-layout>
185 <v-flex xs4 class="pt-4 subheading"> 185 <v-flex xs4 class="pt-4 subheading">
186 <label class="right">City:</label> 186 <label class="right">City:</label>
187 </v-flex> 187 </v-flex>
188 <v-flex xs8 class="ml-3"> 188 <v-flex xs8 class="ml-3">
189 <v-text-field 189 <v-text-field
190 v-model="editedItem.city" 190 v-model="editedItem.city"
191 placeholder="fill your City Name" 191 placeholder="fill your City Name"
192 name="City" 192 name="City"
193 type="text" 193 type="text"
194 required 194 required
195 ></v-text-field> 195 ></v-text-field>
196 </v-flex> 196 </v-flex>
197 </v-layout> 197 </v-layout>
198 </v-flex> 198 </v-flex>
199 </v-layout> 199 </v-layout>
200 <v-layout> 200 <v-layout>
201 <v-flex xs12 sm4> 201 <v-flex xs12 sm4>
202 <v-layout> 202 <v-layout>
203 <v-flex xs4 class="pt-4 subheading"> 203 <v-flex xs4 class="pt-4 subheading">
204 <label class="right hidden-xs-only hidden-sm-only">Blood Group:</label> 204 <label class="right hidden-xs-only hidden-sm-only">Blood Group:</label>
205 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Blood:</label> 205 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Blood:</label>
206 </v-flex> 206 </v-flex>
207 <v-flex xs8 class="ml-3"> 207 <v-flex xs8 class="ml-3">
208 <v-text-field 208 <v-text-field
209 v-model="editedItem.bloodGroup" 209 v-model="editedItem.bloodGroup"
210 placeholder="fill your BloodGroup" 210 placeholder="fill your BloodGroup"
211 name="state" 211 name="state"
212 type="text" 212 type="text"
213 required 213 required
214 ></v-text-field> 214 ></v-text-field>
215 </v-flex> 215 </v-flex>
216 </v-layout> 216 </v-layout>
217 </v-flex> 217 </v-flex>
218 <v-flex xs12 sm4> 218 <v-flex xs12 sm4>
219 <v-layout> 219 <v-layout>
220 <v-flex xs4 class="pt-4 subheading"> 220 <v-flex xs4 class="pt-4 subheading">
221 <label class="right">Gender:</label> 221 <label class="right">Gender:</label>
222 </v-flex> 222 </v-flex>
223 <v-flex xs8 class="ml-3"> 223 <v-flex xs8 class="ml-3">
224 <v-select 224 <v-select
225 :items="gender" 225 :items="gender"
226 v-model="editedItem.gender" 226 v-model="editedItem.gender"
227 placeholder="Select Gender" 227 placeholder="Select Gender"
228 required 228 required
229 ></v-select> 229 ></v-select>
230 </v-flex> 230 </v-flex>
231 </v-layout> 231 </v-layout>
232 </v-flex> 232 </v-flex>
233 <v-flex xs12 sm4> 233 <v-flex xs12 sm4>
234 <v-layout> 234 <v-layout>
235 <v-flex xs4 class="pt-4 subheading"> 235 <v-flex xs4 class="pt-4 subheading">
236 <label class="right">Medical Notes:</label> 236 <label class="right">Medical Notes:</label>
237 </v-flex> 237 </v-flex>
238 <v-flex xs8 class="ml-3"> 238 <v-flex xs8 class="ml-3">
239 <v-text-field 239 <v-text-field
240 v-model="editedItem.medicalNotes" 240 v-model="editedItem.medicalNotes"
241 placeholder="fill your medicalNotes" 241 placeholder="fill your medicalNotes"
242 required 242 required
243 ></v-text-field> 243 ></v-text-field>
244 </v-flex> 244 </v-flex>
245 </v-layout> 245 </v-layout>
246 </v-flex> 246 </v-flex>
247 </v-layout> 247 </v-layout>
248 <v-layout> 248 <v-layout>
249 <v-flex xs12 sm4> 249 <v-flex xs12 sm4>
250 <v-layout> 250 <v-layout>
251 <v-flex xs4 class="pt-4 subheading"> 251 <v-flex xs4 class="pt-4 subheading">
252 <label class="right">Height:</label> 252 <label class="right">Height:</label>
253 </v-flex> 253 </v-flex>
254 <v-flex xs8 class="ml-3"> 254 <v-flex xs8 class="ml-3">
255 <v-text-field 255 <v-text-field
256 v-model="editedItem.height" 256 v-model="editedItem.height"
257 placeholder="fill your Height" 257 placeholder="fill your Height"
258 name="state" 258 name="state"
259 type="text" 259 type="text"
260 required 260 required
261 ></v-text-field> 261 ></v-text-field>
262 </v-flex> 262 </v-flex>
263 </v-layout> 263 </v-layout>
264 </v-flex> 264 </v-flex>
265 <v-flex xs12 sm4> 265 <v-flex xs12 sm4>
266 <v-layout> 266 <v-layout>
267 <v-flex xs4 class="pt-4 subheading"> 267 <v-flex xs4 class="pt-4 subheading">
268 <label class="right">Weight:</label> 268 <label class="right">Weight:</label>
269 </v-flex> 269 </v-flex>
270 <v-flex xs8 class="ml-3"> 270 <v-flex xs8 class="ml-3">
271 <v-text-field 271 <v-text-field
272 v-model="editedItem.weight" 272 v-model="editedItem.weight"
273 placeholder="fill your Weight" 273 placeholder="fill your Weight"
274 name="pincode" 274 name="pincode"
275 required 275 required
276 ></v-text-field> 276 ></v-text-field>
277 </v-flex> 277 </v-flex>
278 </v-layout> 278 </v-layout>
279 </v-flex> 279 </v-flex>
280 <v-flex xs12 sm4> 280 <v-flex xs12 sm4>
281 <v-layout> 281 <v-layout>
282 <v-flex xs4 class="pt-4 subheading"> 282 <v-flex xs4 class="pt-4 subheading">
283 <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label> 283 <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label>
284 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod:</label> 284 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod:</label>
285 </v-flex> 285 </v-flex>
286 <v-flex xs8 class="ml-3"> 286 <v-flex xs8 class="ml-3">
287 <v-text-field 287 <v-text-field
288 label="Select Image" 288 label="Select Image"
289 @click="pickEditFile" 289 @click="pickEditFile"
290 v-model="editImageName" 290 v-model="editImageName"
291 append-icon="attach_file" 291 append-icon="attach_file"
292 ></v-text-field> 292 ></v-text-field>
293 </v-flex> 293 </v-flex>
294 </v-layout> 294 </v-layout>
295 </v-flex> 295 </v-flex>
296 </v-layout> 296 </v-layout>
297 <v-layout> 297 <v-layout>
298 <v-flex xs12 sm4> 298 <v-flex xs12 sm4>
299 <v-layout> 299 <v-layout>
300 <v-flex xs4 class="pt-4 subheading"> 300 <v-flex xs4 class="pt-4 subheading">
301 <label class="right">State:</label> 301 <label class="right">State:</label>
302 </v-flex> 302 </v-flex>
303 <v-flex xs8 class="ml-3"> 303 <v-flex xs8 class="ml-3">
304 <v-text-field 304 <v-text-field
305 v-model="editedItem.state" 305 v-model="editedItem.state"
306 placeholder="fill your State Name" 306 placeholder="fill your State Name"
307 name="state" 307 name="state"
308 type="text" 308 type="text"
309 required 309 required
310 ></v-text-field> 310 ></v-text-field>
311 </v-flex> 311 </v-flex>
312 </v-layout> 312 </v-layout>
313 </v-flex> 313 </v-flex>
314 <v-flex xs12 sm4> 314 <v-flex xs12 sm4>
315 <v-layout> 315 <v-layout>
316 <v-flex xs4 class="pt-4 subheading"> 316 <v-flex xs4 class="pt-4 subheading">
317 <label class="right">Pincode:</label> 317 <label class="right">Pincode:</label>
318 </v-flex> 318 </v-flex>
319 <v-flex xs8 class="ml-3"> 319 <v-flex xs8 class="ml-3">
320 <v-text-field 320 <v-text-field
321 v-model="editedItem.pincode" 321 v-model="editedItem.pincode"
322 placeholder="fill your pincode" 322 placeholder="fill your pincode"
323 name="pincode" 323 name="pincode"
324 type="number" 324 type="number"
325 required 325 required
326 ></v-text-field> 326 ></v-text-field>
327 </v-flex> 327 </v-flex>
328 </v-layout> 328 </v-layout>
329 </v-flex> 329 </v-flex>
330 <v-flex xs12 sm4> 330 <v-flex xs12 sm4>
331 <v-layout> 331 <v-layout>
332 <v-flex xs4 class="pt-4 subheading"> 332 <v-flex xs4 class="pt-4 subheading">
333 <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label> 333 <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label>
334 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Mobile:</label> 334 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Mobile:</label>
335 </v-flex> 335 </v-flex>
336 <v-flex xs8 class="ml-3"> 336 <v-flex xs8 class="ml-3">
337 <v-text-field 337 <v-text-field
338 v-model="editedItem.mobile" 338 v-model="editedItem.mobile"
339 placeholder="fill your MobileNo" 339 placeholder="fill your MobileNo"
340 name="mobileNo" 340 name="mobileNo"
341 type="number" 341 type="number"
342 required 342 required
343 ></v-text-field> 343 ></v-text-field>
344 </v-flex> 344 </v-flex>
345 </v-layout> 345 </v-layout>
346 </v-flex> 346 </v-flex>
347 </v-layout> 347 </v-layout>
348 <v-layout> 348 <v-layout>
349 <v-flex xs12 sm4> 349 <v-flex xs12 sm4>
350 <v-layout> 350 <v-layout>
351 <v-flex xs4 class="pt-4 subheading"> 351 <v-flex xs4 class="pt-4 subheading">
352 <label class="right hidden-xs-only hidden-sm-only">Select Country:</label> 352 <label class="right hidden-xs-only hidden-sm-only">Select Country:</label>
353 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Country:</label> 353 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Country:</label>
354 </v-flex> 354 </v-flex>
355 <v-flex xs8 class="ml-3"> 355 <v-flex xs8 class="ml-3">
356 <v-autocomplete 356 <v-autocomplete
357 v-model="editedItem.country" 357 v-model="editedItem.country"
358 :items="countries" 358 :items="countries"
359 placeholder="Select Country Name" 359 placeholder="Select Country Name"
360 required 360 required
361 ></v-autocomplete> 361 ></v-autocomplete>
362 </v-flex> 362 </v-flex>
363 </v-layout> 363 </v-layout>
364 </v-flex> 364 </v-flex>
365 <v-flex xs12 sm4> 365 <v-flex xs12 sm4>
366 <v-layout> 366 <v-layout>
367 <v-flex xs4 class="pt-4 subheading"> 367 <v-flex xs4 class="pt-4 subheading">
368 <label class="right hidden-xs-only hidden-sm-only">Roll Number:</label> 368 <label class="right hidden-xs-only hidden-sm-only">Roll Number:</label>
369 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Roll No:</label> 369 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Roll No:</label>
370 </v-flex> 370 </v-flex>
371 <v-flex xs8 class="ml-3"> 371 <v-flex xs8 class="ml-3">
372 <v-text-field 372 <v-text-field
373 :items="gender" 373 :items="gender"
374 v-model="editedItem.rollNo" 374 v-model="editedItem.rollNo"
375 placeholder="fill roll number" 375 placeholder="fill roll number"
376 required 376 required
377 ></v-text-field> 377 ></v-text-field>
378 </v-flex> 378 </v-flex>
379 </v-layout> 379 </v-layout>
380 </v-flex> 380 </v-flex>
381 <v-flex xs12 sm4 class="hidden-xs-only hidden-sm-only"> 381 <v-flex xs12 sm4 class="hidden-xs-only hidden-sm-only">
382 <v-layout> 382 <v-layout>
383 <v-flex xs4 sm4 class="pt-4 subheading"> 383 <v-flex xs4 sm4 class="pt-4 subheading">
384 <label class="right hidden-xs-only hidden-sm-only">Permanent Address:</label> 384 <label class="right hidden-xs-only hidden-sm-only">Permanent Address:</label>
385 <label 385 <label
386 class="right hidden-lg-only hidden-md-only hidden-xl-only" 386 class="right hidden-lg-only hidden-md-only hidden-xl-only"
387 >Permanent Address:</label> 387 >Permanent Address:</label>
388 </v-flex> 388 </v-flex>
389 <v-flex xs12 sm8 class="ml-3"> 389 <v-flex xs12 sm8 class="ml-3">
390 <v-text-field 390 <v-text-field
391 v-model="editedItem.permanentAddress" 391 v-model="editedItem.permanentAddress"
392 placeholder="fill Your Permanent Address" 392 placeholder="fill Your Permanent Address"
393 required 393 required
394 ></v-text-field> 394 ></v-text-field>
395 </v-flex> 395 </v-flex>
396 </v-layout> 396 </v-layout>
397 </v-flex> 397 </v-flex>
398 </v-layout> 398 </v-layout>
399 <v-layout class="hidden-xs-only hidden-sm-only"> 399 <v-layout class="hidden-xs-only hidden-sm-only">
400 <v-flex xs12 sm4> 400 <v-flex xs12 sm4>
401 <v-layout> 401 <v-layout>
402 <v-flex xs4 class="pt-4 subheading"> 402 <v-flex xs4 class="pt-4 subheading">
403 <label class="right hidden-xs-only hidden-sm-only">Present Address:</label> 403 <label class="right hidden-xs-only hidden-sm-only">Present Address:</label>
404 <label 404 <label
405 class="right hidden-lg-only hidden-md-only hidden-xl-only" 405 class="right hidden-lg-only hidden-md-only hidden-xl-only"
406 >Present Address:</label> 406 >Present Address:</label>
407 </v-flex> 407 </v-flex>
408 <v-flex xs8 class="ml-3"> 408 <v-flex xs8 class="ml-3">
409 <v-text-field 409 <v-text-field
410 v-model="editedItem.presentAddress" 410 v-model="editedItem.presentAddress"
411 placeholder="Select Country Name" 411 placeholder="Select Country Name"
412 required 412 required
413 ></v-text-field> 413 ></v-text-field>
414 </v-flex> 414 </v-flex>
415 </v-layout> 415 </v-layout>
416 </v-flex> 416 </v-flex>
417 </v-layout> 417 </v-layout>
418 <v-layout class="hidden-lg-only hidden-md-only hidden-xl-only"> 418 <v-layout class="hidden-lg-only hidden-md-only hidden-xl-only">
419 <v-flex xs12 sm12> 419 <v-flex xs12 sm12>
420 <v-layout> 420 <v-layout>
421 <v-flex xs12 sm3 class="pt-4 subheading text-xs-center"> 421 <v-flex xs12 sm3 class="pt-4 subheading text-xs-center">
422 <label class>Present Address :</label> 422 <label class>Present Address :</label>
423 </v-flex> 423 </v-flex>
424 </v-layout> 424 </v-layout>
425 <v-layout> 425 <v-layout>
426 <v-flex xs12 sm12> 426 <v-flex xs12 sm12>
427 <v-textarea 427 <v-textarea
428 v-model="editedItem.presentAddress" 428 v-model="editedItem.presentAddress"
429 placeholder="fill Your present Address" 429 placeholder="fill Your present Address"
430 required 430 required
431 ></v-textarea> 431 ></v-textarea>
432 </v-flex> 432 </v-flex>
433 </v-layout> 433 </v-layout>
434 </v-flex> 434 </v-flex>
435 <v-flex xs12 sm12> 435 <v-flex xs12 sm12>
436 <v-layout> 436 <v-layout>
437 <v-flex xs12 sm3 class="pt-4 pr-4 subheading text-xs-center addressForm"> 437 <v-flex xs12 sm3 class="pt-4 pr-4 subheading text-xs-center addressForm">
438 <label>Permanent addr:</label> 438 <label>Permanent addr:</label>
439 </v-flex> 439 </v-flex>
440 </v-layout> 440 </v-layout>
441 <v-layout> 441 <v-layout>
442 <v-flex xs12 sm12> 442 <v-flex xs12 sm12>
443 <v-textarea 443 <v-textarea
444 name="input-4-3" 444 name="input-4-3"
445 v-model="editedItem.permanentAddress" 445 v-model="editedItem.permanentAddress"
446 placeholder="fill Your Permanent Address" 446 placeholder="fill Your Permanent Address"
447 required 447 required
448 ></v-textarea> 448 ></v-textarea>
449 </v-flex> 449 </v-flex>
450 </v-layout> 450 </v-layout>
451 </v-flex> 451 </v-flex>
452 </v-layout> 452 </v-layout>
453 <v-layout> 453 <v-layout>
454 <v-flex xs12 sm12> 454 <v-flex xs12 sm12>
455 <v-layout> 455 <v-layout>
456 <v-flex xs6> 456 <v-flex xs6>
457 <v-btn round dark @click.native="close">Cancel</v-btn> 457 <v-btn round dark @click.native="close">Cancel</v-btn>
458 </v-flex> 458 </v-flex>
459 <v-flex xs6> 459 <v-flex xs6>
460 <v-btn @click="save" round dark :loading="editLoading" class="right">Save</v-btn> 460 <v-btn @click="save" round dark :loading="editLoading" class="right">Save</v-btn>
461 </v-flex> 461 </v-flex>
462 </v-layout> 462 </v-layout>
463 </v-flex> 463 </v-flex>
464 </v-layout> 464 </v-layout>
465 </v-container> 465 </v-container>
466 </v-form> 466 </v-form>
467 </v-card-text> 467 </v-card-text>
468 </v-card> 468 </v-card>
469 </v-dialog> 469 </v-dialog>
470 470
471 <!-- ****** PROFILE VIEW STUDENTS DEATILS ****** --> 471 <!-- ****** PROFILE VIEW STUDENTS DEATILS ****** -->
472 472
473 <v-dialog v-model="dialog1" max-width="1200px" scrollable> 473 <v-dialog v-model="dialog1" max-width="1200px" scrollable>
474 <v-card> 474 <v-card>
475 <v-toolbar color="grey lighten-2" flat> 475 <v-toolbar color="grey lighten-2" flat>
476 <v-spacer></v-spacer> 476 <v-spacer></v-spacer>
477 <v-toolbar-title>Student Profile</v-toolbar-title> 477 <v-toolbar-title>Student Profile</v-toolbar-title>
478 <v-spacer></v-spacer> 478 <v-spacer></v-spacer>
479 <v-icon @click="close1">close</v-icon> 479 <v-icon @click="close1">close</v-icon>
480 </v-toolbar> 480 </v-toolbar>
481 <v-card-text style="height: 700px;"> 481 <v-card-text style="height: 700px;">
482 <v-flex align-center justify-center layout text-xs-center class="mt-3"> 482 <v-flex align-center justify-center layout text-xs-center class="mt-3">
483 <v-avatar size="160px"> 483 <v-avatar size="160px">
484 <img src="/static/icon/user.png" v-if="!editedItem.profilePicUrl" /> 484 <img src="/static/icon/user.png" v-if="!editedItem.profilePicUrl" />
485 <img :src="editedItem.profilePicUrl" v-else-if="editedItem.profilePicUrl" /> 485 <img :src="editedItem.profilePicUrl" v-else-if="editedItem.profilePicUrl" />
486 </v-avatar> 486 </v-avatar>
487 </v-flex> 487 </v-flex>
488 <v-container grid-list-md> 488 <v-container grid-list-md>
489 <v-layout wrap> 489 <v-layout wrap>
490 <v-flex xs12 sm5> 490 <v-flex xs12 sm5>
491 <v-layout> 491 <v-layout>
492 <v-flex xs6 sm6> 492 <v-flex xs6 sm6>
493 <h5 class="right my-1"> 493 <h5 class="right my-1">
494 <b>Full Name:</b> 494 <b>Full Name:</b>
495 </h5> 495 </h5>
496 </v-flex> 496 </v-flex>
497 <v-flex sm6 xs6> 497 <v-flex sm6 xs6>
498 <h5 class="my-1 left">{{ editedItem.name }}</h5> 498 <h5 class="my-1 left">{{ editedItem.name }}</h5>
499 </v-flex> 499 </v-flex>
500 </v-layout> 500 </v-layout>
501 </v-flex> 501 </v-flex>
502 <v-flex xs12 sm7> 502 <v-flex xs12 sm7>
503 <v-layout> 503 <v-layout>
504 <v-flex xs6 sm4> 504 <v-flex xs6 sm4>
505 <h5 class="right my-1"> 505 <h5 class="right my-1">
506 <b>Email:</b> 506 <b>Email:</b>
507 </h5> 507 </h5>
508 </v-flex> 508 </v-flex>
509 <v-flex sm8 xs6> 509 <v-flex sm8 xs6>
510 <h5 class="my-1 left">{{ editedItem.email }}</h5> 510 <h5 class="my-1 left">{{ editedItem.email }}</h5>
511 </v-flex> 511 </v-flex>
512 </v-layout> 512 </v-layout>
513 </v-flex> 513 </v-flex>
514 </v-layout> 514 </v-layout>
515 <v-layout wrap> 515 <v-layout wrap>
516 <v-flex xs12 sm5> 516 <v-flex xs12 sm5>
517 <v-layout> 517 <v-layout>
518 <v-flex xs6 sm6> 518 <v-flex xs6 sm6>
519 <b> 519 <b>
520 <h5 class="right my-1"> 520 <h5 class="right my-1">
521 <b>Gender:</b> 521 <b>Gender:</b>
522 </h5> 522 </h5>
523 </b> 523 </b>
524 </v-flex> 524 </v-flex>
525 <v-flex sm6 xs6> 525 <v-flex sm6 xs6>
526 <h5 class="my-1 left">{{ editedItem.gender }}</h5> 526 <h5 class="my-1 left">{{ editedItem.gender }}</h5>
527 </v-flex> 527 </v-flex>
528 </v-layout> 528 </v-layout>
529 </v-flex> 529 </v-flex>
530 <v-flex xs12 sm7> 530 <v-flex xs12 sm7>
531 <v-layout> 531 <v-layout>
532 <v-flex xs6 sm4> 532 <v-flex xs6 sm4>
533 <b> 533 <b>
534 <h5 class="right my-1"> 534 <h5 class="right my-1">
535 <b>D.O.B:</b> 535 <b>D.O.B:</b>
536 </h5> 536 </h5>
537 </b> 537 </b>
538 </v-flex> 538 </v-flex>
539 <v-flex sm8 xs6> 539 <v-flex sm8 xs6>
540 <h5 class="my-1">{{ dates(editedItem.dob) }}</h5> 540 <h5 class="my-1">{{ dates(editedItem.dob) }}</h5>
541 </v-flex> 541 </v-flex>
542 </v-layout> 542 </v-layout>
543 </v-flex> 543 </v-flex>
544 </v-layout> 544 </v-layout>
545 <v-layout wrap> 545 <v-layout wrap>
546 <v-flex xs12 sm5> 546 <v-flex xs12 sm5>
547 <v-layout> 547 <v-layout>
548 <v-flex xs6 sm6> 548 <v-flex xs6 sm6>
549 <b> 549 <b>
550 <h5 class="right my-1"> 550 <h5 class="right my-1">
551 <b>Blood Group:</b> 551 <b>Blood Group:</b>
552 </h5> 552 </h5>
553 </b> 553 </b>
554 </v-flex> 554 </v-flex>
555 <v-flex sm6 xs6> 555 <v-flex sm6 xs6>
556 <h5 class="my-1 left">{{ editedItem.bloodGroup }}</h5> 556 <h5 class="my-1 left">{{ editedItem.bloodGroup }}</h5>
557 </v-flex> 557 </v-flex>
558 </v-layout> 558 </v-layout>
559 </v-flex> 559 </v-flex>
560 <v-flex xs12 sm7> 560 <v-flex xs12 sm7>
561 <v-layout> 561 <v-layout>
562 <v-flex xs6 sm4> 562 <v-flex xs6 sm4>
563 <b> 563 <b>
564 <h5 class="right my-1"> 564 <h5 class="right my-1">
565 <b>Roll No. :</b> 565 <b>Roll No. :</b>
566 </h5> 566 </h5>
567 </b> 567 </b>
568 </v-flex> 568 </v-flex>
569 <v-flex sm8 xs6> 569 <v-flex sm8 xs6>
570 <h5 class="my-1">{{ editedItem.rollNo }}</h5> 570 <h5 class="my-1">{{ editedItem.rollNo }}</h5>
571 </v-flex> 571 </v-flex>
572 </v-layout> 572 </v-layout>
573 </v-flex> 573 </v-flex>
574 </v-layout> 574 </v-layout>
575 <v-layout wrap> 575 <v-layout wrap>
576 <v-flex xs12 sm5> 576 <v-flex xs12 sm5>
577 <v-layout> 577 <v-layout>
578 <v-flex xs6 sm6> 578 <v-flex xs6 sm6>
579 <b> 579 <b>
580 <h5 class="right my-1"> 580 <h5 class="right my-1">
581 <b>Height:</b> 581 <b>Height:</b>
582 </h5> 582 </h5>
583 </b> 583 </b>
584 </v-flex> 584 </v-flex>
585 <v-flex sm6 xs6> 585 <v-flex sm6 xs6>
586 <h5 class="my-1 left">{{ editedItem.height }}</h5> 586 <h5 class="my-1 left">{{ editedItem.height }}</h5>
587 </v-flex> 587 </v-flex>
588 </v-layout> 588 </v-layout>
589 </v-flex> 589 </v-flex>
590 <v-flex xs12 sm7> 590 <v-flex xs12 sm7>
591 <v-layout> 591 <v-layout>
592 <v-flex xs6 sm4> 592 <v-flex xs6 sm4>
593 <b> 593 <b>
594 <h5 class="right my-1"> 594 <h5 class="right my-1">
595 <b>Weight:</b> 595 <b>Weight:</b>
596 </h5> 596 </h5>
597 </b> 597 </b>
598 </v-flex> 598 </v-flex>
599 <v-flex sm8 xs6> 599 <v-flex sm8 xs6>
600 <h5 class="my-1">{{ editedItem.weight }}</h5> 600 <h5 class="my-1">{{ editedItem.weight }}</h5>
601 </v-flex> 601 </v-flex>
602 </v-layout> 602 </v-layout>
603 </v-flex> 603 </v-flex>
604 </v-layout> 604 </v-layout>
605 <v-layout wrap> 605 <v-layout wrap>
606 <v-flex xs12 sm5> 606 <v-flex xs12 sm5>
607 <v-layout> 607 <v-layout>
608 <v-flex xs6 sm6> 608 <v-flex xs6 sm6>
609 <b> 609 <b>
610 <h5 class="right my-1"> 610 <h5 class="right my-1">
611 <b>City:</b> 611 <b>City:</b>
612 </h5> 612 </h5>
613 </b> 613 </b>
614 </v-flex> 614 </v-flex>
615 <v-flex sm6 xs6> 615 <v-flex sm6 xs6>
616 <h5 class="my-1 left">{{ editedItem.city }}</h5> 616 <h5 class="my-1 left">{{ editedItem.city }}</h5>
617 </v-flex> 617 </v-flex>
618 </v-layout> 618 </v-layout>
619 </v-flex> 619 </v-flex>
620 <v-flex xs12 sm7> 620 <v-flex xs12 sm7>
621 <v-layout> 621 <v-layout>
622 <v-flex xs6 sm4> 622 <v-flex xs6 sm4>
623 <b> 623 <b>
624 <h5 class="right my-1"> 624 <h5 class="right my-1">
625 <b>State:</b> 625 <b>State:</b>
626 </h5> 626 </h5>
627 </b> 627 </b>
628 </v-flex> 628 </v-flex>
629 <v-flex sm8 xs6> 629 <v-flex sm8 xs6>
630 <h5 class="my-1">{{ editedItem.state }}</h5> 630 <h5 class="my-1">{{ editedItem.state }}</h5>
631 </v-flex> 631 </v-flex>
632 </v-layout> 632 </v-layout>
633 </v-flex> 633 </v-flex>
634 </v-layout> 634 </v-layout>
635 <v-layout wrap> 635 <v-layout wrap>
636 <v-flex xs12 sm5> 636 <v-flex xs12 sm5>
637 <v-layout> 637 <v-layout>
638 <v-flex xs6 sm6> 638 <v-flex xs6 sm6>
639 <b> 639 <b>
640 <h5 class="right my-1"> 640 <h5 class="right my-1">
641 <b>Pincode:</b> 641 <b>Pincode:</b>
642 </h5> 642 </h5>
643 </b> 643 </b>
644 </v-flex> 644 </v-flex>
645 <v-flex sm6 xs6> 645 <v-flex sm6 xs6>
646 <h5 class="my-1">{{ editedItem.pincode }}</h5> 646 <h5 class="my-1">{{ editedItem.pincode }}</h5>
647 </v-flex> 647 </v-flex>
648 </v-layout> 648 </v-layout>
649 </v-flex> 649 </v-flex>
650 <v-flex xs12 sm7> 650 <v-flex xs12 sm7>
651 <v-layout> 651 <v-layout>
652 <v-flex xs6 sm4> 652 <v-flex xs6 sm4>
653 <b> 653 <b>
654 <h5 class="right my-1"> 654 <h5 class="right my-1">
655 <b>Country:</b> 655 <b>Country:</b>
656 </h5> 656 </h5>
657 </b> 657 </b>
658 </v-flex> 658 </v-flex>
659 <v-flex sm7 xs6> 659 <v-flex sm7 xs6>
660 <h5 class="my-1">{{ editedItem.country }}</h5> 660 <h5 class="my-1">{{ editedItem.country }}</h5>
661 </v-flex> 661 </v-flex>
662 </v-layout> 662 </v-layout>
663 </v-flex> 663 </v-flex>
664 </v-layout> 664 </v-layout>
665 <v-layout wrap> 665 <v-layout wrap>
666 <v-flex xs12 sm5> 666 <v-flex xs12 sm5>
667 <v-layout> 667 <v-layout>
668 <v-flex sm6 xs6> 668 <v-flex sm6 xs6>
669 <b> 669 <b>
670 <h5 class="right my-1"> 670 <h5 class="right my-1">
671 <b>Mobile No:</b> 671 <b>Mobile No:</b>
672 </h5> 672 </h5>
673 </b> 673 </b>
674 </v-flex> 674 </v-flex>
675 <v-flex sm6 xs6> 675 <v-flex sm6 xs6>
676 <h5 class="my-1">{{ editedItem.mobile }}</h5> 676 <h5 class="my-1">{{ editedItem.mobile }}</h5>
677 </v-flex> 677 </v-flex>
678 </v-layout> 678 </v-layout>
679 </v-flex> 679 </v-flex>
680 <v-flex xs12 sm7> 680 <v-flex xs12 sm7>
681 <v-layout> 681 <v-layout>
682 <v-flex xs6 sm4> 682 <v-flex xs6 sm4>
683 <b> 683 <b>
684 <h5 class="right my-1"> 684 <h5 class="right my-1">
685 <b>FahterName:</b> 685 <b>FahterName:</b>
686 </h5> 686 </h5>
687 </b> 687 </b>
688 </v-flex> 688 </v-flex>
689 <v-flex sm8 xs6> 689 <v-flex sm8 xs6>
690 <h5 class="my-1">{{ editedItem.fatherName }}</h5> 690 <h5 class="my-1">{{ editedItem.fatherName }}</h5>
691 </v-flex> 691 </v-flex>
692 </v-layout> 692 </v-layout>
693 </v-flex> 693 </v-flex>
694 </v-layout> 694 </v-layout>
695 <v-layout wrap> 695 <v-layout wrap>
696 <v-flex xs12 sm5> 696 <v-flex xs12 sm5>
697 <v-layout> 697 <v-layout>
698 <v-flex xs6 sm6> 698 <v-flex xs6 sm6>
699 <b> 699 <b>
700 <h5 class="right my-1"> 700 <h5 class="right my-1">
701 <b>MotherName:</b> 701 <b>MotherName:</b>
702 </h5> 702 </h5>
703 </b> 703 </b>
704 </v-flex> 704 </v-flex>
705 <v-flex sm6 xs6> 705 <v-flex sm6 xs6>
706 <h5 class="my-1">{{ editedItem.motherName }}</h5> 706 <h5 class="my-1">{{ editedItem.motherName }}</h5>
707 </v-flex> 707 </v-flex>
708 </v-layout> 708 </v-layout>
709 </v-flex> 709 </v-flex>
710 <v-flex xs12 sm7> 710 <v-flex xs12 sm7>
711 <v-layout> 711 <v-layout>
712 <v-flex xs6 sm4> 712 <v-flex xs6 sm4>
713 <b> 713 <b>
714 <h5 class="right my-1"> 714 <h5 class="right my-1">
715 <b>FatherCellNo:</b> 715 <b>FatherCellNo:</b>
716 </h5> 716 </h5>
717 </b> 717 </b>
718 </v-flex> 718 </v-flex>
719 <v-flex sm6 xs6> 719 <v-flex sm6 xs6>
720 <h5 class="my-1">{{ editedItem.fatherCellNo }}</h5> 720 <h5 class="my-1">{{ editedItem.fatherCellNo }}</h5>
721 </v-flex> 721 </v-flex>
722 </v-layout> 722 </v-layout>
723 </v-flex> 723 </v-flex>
724 </v-layout> 724 </v-layout>
725 <v-layout wrap> 725 <v-layout wrap>
726 <v-flex xs12 sm5> 726 <v-flex xs12 sm5>
727 <v-layout> 727 <v-layout>
728 <v-flex xs6 sm6> 728 <v-flex xs6 sm6>
729 <b> 729 <b>
730 <h5 class="right my-1"> 730 <h5 class="right my-1">
731 <b>MotherCellNo:</b> 731 <b>MotherCellNo:</b>
732 </h5> 732 </h5>
733 </b> 733 </b>
734 </v-flex> 734 </v-flex>
735 <v-flex sm6 xs6> 735 <v-flex sm6 xs6>
736 <h5 class="my-1">{{ editedItem.motherCellNo }}</h5> 736 <h5 class="my-1">{{ editedItem.motherCellNo }}</h5>
737 </v-flex> 737 </v-flex>
738 </v-layout> 738 </v-layout>
739 </v-flex> 739 </v-flex>
740 <v-flex xs12 sm7> 740 <v-flex xs12 sm7>
741 <v-layout> 741 <v-layout>
742 <v-flex xs6 sm4> 742 <v-flex xs6 sm4>
743 <b> 743 <b>
744 <h5 class="my-1 right"> 744 <h5 class="my-1 right">
745 <b>AcademicYear:</b> 745 <b>AcademicYear:</b>
746 </h5> 746 </h5>
747 </b> 747 </b>
748 </v-flex> 748 </v-flex>
749 <v-flex sm5 xs8> 749 <v-flex sm5 xs8>
750 <h5 class="my-1">{{ editedItem.establishmentYear }}</h5> 750 <h5 class="my-1">{{ editedItem.establishmentYear }}</h5>
751 </v-flex> 751 </v-flex>
752 </v-layout> 752 </v-layout>
753 </v-flex> 753 </v-flex>
754 </v-layout> 754 </v-layout>
755 <v-layout wrap> 755 <v-layout wrap>
756 <v-flex xs12 sm5> 756 <v-flex xs12 sm5>
757 <v-layout> 757 <v-layout>
758 <v-flex xs6 sm6> 758 <v-flex xs6 sm6>
759 <b> 759 <b>
760 <h5 class="my-1 right"> 760 <h5 class="my-1 right">
761 <b>MedicalNotes:</b> 761 <b>MedicalNotes:</b>
762 </h5> 762 </h5>
763 </b> 763 </b>
764 </v-flex> 764 </v-flex>
765 <v-flex sm5 xs6> 765 <v-flex sm5 xs6>
766 <h5 class="my-1">{{ editedItem.medicalNotes }}</h5> 766 <h5 class="my-1">{{ editedItem.medicalNotes }}</h5>
767 </v-flex> 767 </v-flex>
768 </v-layout> 768 </v-layout>
769 </v-flex> 769 </v-flex>
770 <v-flex xs12 sm7 class="hidden-xs-only"> 770 <v-flex xs12 sm7 class="hidden-xs-only">
771 <v-layout wrap> 771 <v-layout wrap>
772 <v-flex sm4> 772 <v-flex sm4>
773 <b> 773 <b>
774 <h5 class="my-1 right"> 774 <h5 class="my-1 right">
775 <b>present Address:</b> 775 <b>present Address:</b>
776 </h5> 776 </h5>
777 </b> 777 </b>
778 </v-flex> 778 </v-flex>
779 <v-flex sm8> 779 <v-flex sm8>
780 <h5 class="my-1">{{ editedItem.presentAddress }}</h5> 780 <h5 class="my-1">{{ editedItem.presentAddress }}</h5>
781 </v-flex> 781 </v-flex>
782 </v-layout> 782 </v-layout>
783 </v-flex> 783 </v-flex>
784 <v-flex sm6 class="hidden-xs-only"> 784 <v-flex sm6 class="hidden-xs-only">
785 <v-layout wrap> 785 <v-layout wrap>
786 <v-flex sm5> 786 <v-flex sm5>
787 <b> 787 <b>
788 <h5 class="my-1 right"> 788 <h5 class="my-1 right">
789 <b>Permanent Address:</b> 789 <b>Permanent Address:</b>
790 </h5> 790 </h5>
791 </b> 791 </b>
792 </v-flex> 792 </v-flex>
793 <v-flex sm7> 793 <v-flex sm7>
794 <h5 class="my-1">{{ editedItem.permanentAddress }}</h5> 794 <h5 class="my-1">{{ editedItem.permanentAddress }}</h5>
795 </v-flex> 795 </v-flex>
796 </v-layout> 796 </v-layout>
797 </v-flex> 797 </v-flex>
798 </v-layout> 798 </v-layout>
799 <v-layout wrap class="hidden-sm-only hidden-md-only hidden-lg-only hidden-xl-only"> 799 <v-layout wrap class="hidden-sm-only hidden-md-only hidden-lg-only hidden-xl-only">
800 <v-flex xs12 sm5> 800 <v-flex xs12 sm5>
801 <v-layout wrap> 801 <v-layout wrap>
802 <v-flex xs12 sm6> 802 <v-flex xs12 sm6>
803 <b> 803 <b>
804 <h5 class="my-1"> 804 <h5 class="my-1">
805 <b>present Address:-</b> 805 <b>present Address:-</b>
806 </h5> 806 </h5>
807 </b> 807 </b>
808 </v-flex> 808 </v-flex>
809 <v-flex sm5 xs12> 809 <v-flex sm5 xs12>
810 <h5 class="my-1">{{ editedItem.presentAddress }}</h5> 810 <h5 class="my-1">{{ editedItem.presentAddress }}</h5>
811 </v-flex> 811 </v-flex>
812 </v-layout> 812 </v-layout>
813 </v-flex> 813 </v-flex>
814 <v-flex xs12 sm6> 814 <v-flex xs12 sm6>
815 <v-layout wrap> 815 <v-layout wrap>
816 <v-flex xs12 sm6> 816 <v-flex xs12 sm6>
817 <b> 817 <b>
818 <h5 class="my-1"> 818 <h5 class="my-1">
819 <b>Permanent Address:-</b> 819 <b>Permanent Address:-</b>
820 </h5> 820 </h5>
821 </b> 821 </b>
822 </v-flex> 822 </v-flex>
823 <v-flex sm6 xs12> 823 <v-flex sm6 xs12>
824 <h5 class="my-1">{{ editedItem.permanentAddress }}</h5> 824 <h5 class="my-1">{{ editedItem.permanentAddress }}</h5>
825 </v-flex> 825 </v-flex>
826 </v-layout> 826 </v-layout>
827 </v-flex> 827 </v-flex>
828 </v-layout> 828 </v-layout>
829 </v-container> 829 </v-container>
830 </v-card-text> 830 </v-card-text>
831 </v-card> 831 </v-card>
832 </v-dialog> 832 </v-dialog>
833 833
834 <v-snackbar 834 <v-snackbar
835 :timeout="timeout" 835 :timeout="timeout"
836 :top="y === 'top'" 836 :top="y === 'top'"
837 :right="x === 'right'" 837 :right="x === 'right'"
838 :vertical="mode === 'vertical'" 838 :vertical="mode === 'vertical'"
839 v-model="snackbar" 839 v-model="snackbar"
840 color="success" 840 color="success"
841 >{{ text }}</v-snackbar> 841 >{{ text }}</v-snackbar>
842 842
843 <!-- ****** EXISTING-USERS STUDENTS TABLE ****** --> 843 <!-- ****** EXISTING-USERS STUDENTS TABLE ****** -->
844 <v-card flat> 844 <v-card flat>
845 <v-card-actions class="hidden-xs-only hidden-sm-only"> 845 <v-card-actions class="hidden-xs-only hidden-sm-only">
846 <v-layout> 846 <v-layout>
847 <label class="right mt-4 ml-5">Select Class:</label> 847 <label class="right mt-4 ml-5">Select Class:</label>
848 <v-select 848 <v-select
849 :items="addclass" 849 :items="addclass"
850 label="Select Class" 850 label="Select Class"
851 v-model="selectStudents.select" 851 v-model="selectStudents.select"
852 item-text="classNum" 852 item-text="classNum"
853 item-value="_id" 853 item-value="_id"
854 name="Select Class" 854 name="Select Class"
855 :rules="classRules" 855 :rules="classRules"
856 @change="getSections(selectStudents.select)" 856 @change="getSections(selectStudents.select)"
857 class="px-4" 857 class="px-4"
858 required 858 required
859 ></v-select> 859 ></v-select>
860 <label class="right mt-4">Select Section:</label> 860 <label class="right mt-4">Select Section:</label>
861 <v-select 861 <v-select
862 :items="addSection" 862 :items="addSection"
863 label="Select Section" 863 label="Select Section"
864 v-model="selectStudents.selectSection" 864 v-model="selectStudents.selectSection"
865 item-text="name" 865 item-text="name"
866 item-value="_id" 866 item-value="_id"
867 name="Select Section" 867 name="Select Section"
868 :rules="sectionRules" 868 :rules="sectionRules"
869 class="pl-3" 869 class="pl-3"
870 required 870 required
871 ></v-select> 871 ></v-select>
872 </v-layout> 872 </v-layout>
873 <v-spacer></v-spacer> 873 <v-spacer></v-spacer>
874 <v-btn @click="findStudents()" round dark :loading="loading" class="left">Find</v-btn> 874 <v-btn @click="findStudents()" round dark :loading="loading" class="left">Find</v-btn>
875 </v-card-actions> 875 </v-card-actions>
876 <v-flex class="hidden-xl-only hidden-lg-only hidden-md-only"> 876 <v-flex class="hidden-xl-only hidden-lg-only hidden-md-only">
877 <v-layout> 877 <v-layout>
878 <v-flex xs4> 878 <v-flex xs4>
879 <label class="right mt-4">Select Class:</label> 879 <label class="right mt-4">Select Class:</label>
880 </v-flex> 880 </v-flex>
881 <v-flex xs8> 881 <v-flex xs8>
882 <v-select 882 <v-select
883 :items="addclass" 883 :items="addclass"
884 label="Select Class" 884 label="Select Class"
885 v-model="selectStudents.select" 885 v-model="selectStudents.select"
886 item-text="classNum" 886 item-text="classNum"
887 item-value="_id" 887 item-value="_id"
888 name="Select Class" 888 name="Select Class"
889 :rules="classRules" 889 :rules="classRules"
890 @change="getSections(selectStudents.select)" 890 @change="getSections(selectStudents.select)"
891 class="px-2" 891 class="px-2"
892 required 892 required
893 ></v-select> 893 ></v-select>
894 </v-flex> 894 </v-flex>
895 </v-layout> 895 </v-layout>
896 <v-layout> 896 <v-layout>
897 <v-flex xs4> 897 <v-flex xs4>
898 <label class="right mt-4">Select Section:</label> 898 <label class="right mt-4">Select Section:</label>
899 </v-flex> 899 </v-flex>
900 <v-flex xs8> 900 <v-flex xs8>
901 <v-select 901 <v-select
902 :items="addSection" 902 :items="addSection"
903 label="Select Section" 903 label="Select Section"
904 v-model="selectStudents.selectSection" 904 v-model="selectStudents.selectSection"
905 item-text="name" 905 item-text="name"
906 item-value="_id" 906 item-value="_id"
907 name="Select Section" 907 name="Select Section"
908 :rules="sectionRules" 908 :rules="sectionRules"
909 class="px-2" 909 class="px-2"
910 required 910 required
911 ></v-select> 911 ></v-select>
912 </v-flex> 912 </v-flex>
913 </v-layout> 913 </v-layout>
914 <v-layout> 914 <v-layout>
915 <v-flex xs5 class="mx-auto mb-2"> 915 <v-flex xs5 class="mx-auto mb-2">
916 <v-btn @click="findStudents()" block round dark :loading="loading">Find</v-btn> 916 <v-btn @click="findStudents()" block round dark :loading="loading">Find</v-btn>
917 </v-flex> 917 </v-flex>
918 </v-layout> 918 </v-layout>
919 </v-flex> 919 </v-flex>
920 </v-card> 920 </v-card>
921 <v-data-table 921 <v-data-table
922 :headers="headers" 922 :headers="headers"
923 :items="desserts" 923 :items="desserts"
924 :pagination.sync="pagination" 924 :pagination.sync="pagination"
925 :search="search" 925 :search="search"
926 > 926 >
927 <template slot="items" slot-scope="props"> 927 <template slot="items" slot-scope="props">
928 <td id="td" class="text-xs-center">{{ props.item.rollNo}}</td> 928 <td id="td" class="text-xs-center">{{ props.item.rollNo}}</td>
929 <td id="td" class="text-xs-center"> 929 <td id="td" class="text-xs-center">
930 <v-avatar> 930 <v-avatar>
931 <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> 931 <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" />
932 <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> 932 <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" />
933 </v-avatar> 933 </v-avatar>
934 </td> 934 </td>
935 <td id="td" class="text-xs-center">{{ props.item.name}}</td> 935 <td id="td" class="text-xs-center">{{ props.item.name}}</td>
936 <td id="td" class="text-xs-center">{{ props.item.email }}</td> 936 <td id="td" class="text-xs-center">{{ props.item.email }}</td>
937 <td id="td" class="text-xs-center">{{ dates(props.item.dob) }}</td> 937 <td id="td" class="text-xs-center">{{ dates(props.item.dob) }}</td>
938 <td id="td" class="text-xs-center">{{ props.item.gender }}</td> 938 <td id="td" class="text-xs-center">{{ props.item.gender }}</td>
939 <td id="td" class="text-xs-center">{{ props.item.parentId.fatherName }}</td> 939 <td id="td" class="text-xs-center">{{ props.item.parentId.fatherName }}</td>
940 <td id="td" class="text-xs-center">{{ props.item.parentId.motherName }}</td> 940 <td id="td" class="text-xs-center">{{ props.item.parentId.motherName }}</td>
941 <td id="td" class="text-xs-center">{{ props.item.establishmentYear }}</td> 941 <td id="td" class="text-xs-center">{{ props.item.establishmentYear }}</td>
942 <td id="td" class="text-xs-center">{{ props.item.mobile}}</td> 942 <td id="td" class="text-xs-center">{{ props.item.mobile}}</td>
943 943 <td id="td">
944 <v-switch
945 class="pl-3"
946 v-model="props.item.status"
947 @change="suspendStudentStatus(props.item.status,props.item._id)"
948 ></v-switch>
949 </td>
944 <td class="text-xs-center"> 950 <td class="text-xs-center">
945 <span> 951 <span>
946 <v-tooltip top> 952 <v-tooltip top>
947 <img 953 <img
948 slot="activator" 954 slot="activator"
949 style="cursor:pointer; width:25px; height:18px; " 955 style="cursor:pointer; width:25px; height:18px; "
950 class="mr5" 956 class="mr5"
951 @click="profile(props.item)" 957 @click="profile(props.item)"
952 src="/static/icon/eye1.png" 958 src="/static/icon/eye1.png"
953 /> 959 />
954 <span>View</span> 960 <span>View</span>
955 </v-tooltip> 961 </v-tooltip>
956 <v-tooltip top> 962 <v-tooltip top>
957 <img 963 <img
958 slot="activator" 964 slot="activator"
959 style="cursor:pointer; width:20px; height:18px; " 965 style="cursor:pointer; width:20px; height:18px; "
960 class="mr5" 966 class="mr5"
961 @click="editItem(props.item)" 967 @click="editItem(props.item)"
962 src="/static/icon/edit1.png" 968 src="/static/icon/edit1.png"
963 /> 969 />
964 <span>Edit</span> 970 <span>Edit</span>
965 </v-tooltip> 971 </v-tooltip>
966 <v-tooltip top> 972 <v-tooltip top>
967 <img 973 <img
968 slot="activator" 974 slot="activator"
969 style="cursor:pointer; width:20px; height:20px; " 975 style="cursor:pointer; width:20px; height:20px; "
970 class="mr5" 976 class="mr5"
971 @click="deleteItem(props.item)" 977 @click="deleteItem(props.item)"
972 src="/static/icon/delete1.png" 978 src="/static/icon/delete1.png"
973 /> 979 />
974 <span>Delete</span> 980 <span>Delete</span>
975 </v-tooltip> 981 </v-tooltip>
976 </span> 982 </span>
977 </td> 983 </td>
978 </template> 984 </template>
979 <v-alert 985 <v-alert
980 slot="no-results" 986 slot="no-results"
981 :value="true" 987 :value="true"
982 color="error" 988 color="error"
983 icon="warning" 989 icon="warning"
984 >Your search for "{{ search }}" found no results.</v-alert> 990 >Your search for "{{ search }}" found no results.</v-alert>
985 </v-data-table> 991 </v-data-table>
986 </v-tab-item> 992 </v-tab-item>
987 993
988 <!-- ****** ADD STUDENTS DETAILS****** --> 994 <!-- ****** ADD STUDENTS DETAILS****** -->
989 <v-tab-item> 995 <v-tab-item>
990 <v-container fluid> 996 <v-container fluid>
991 <v-layout align-center justify-center fill-height> 997 <v-layout align-center justify-center fill-height>
992 <v-flex xs12 sm12 md10 lg11> 998 <v-flex xs12 sm12 md10 lg11>
993 <div> 999 <div>
994 <v-app> 1000 <v-app>
995 <v-stepper v-model="e2"> 1001 <v-stepper v-model="e2">
996 <v-stepper-header> 1002 <v-stepper-header>
997 <v-stepper-step :complete="e2 > 1" step="1">Fill parent Details</v-stepper-step> 1003 <v-stepper-step :complete="e2 > 1" step="1">Fill parent Details</v-stepper-step>
998 <v-divider></v-divider> 1004 <v-divider></v-divider>
999 <v-stepper-step step="2">Fill Student Details</v-stepper-step> 1005 <v-stepper-step step="2">Fill Student Details</v-stepper-step>
1000 </v-stepper-header> 1006 </v-stepper-header>
1001 <v-stepper-items> 1007 <v-stepper-items>
1002 <v-stepper-content step="1"> 1008 <v-stepper-content step="1">
1003 <v-container fluid class> 1009 <v-container fluid class>
1004 <v-snackbar 1010 <v-snackbar
1005 :timeout="timeout" 1011 :timeout="timeout"
1006 :top="y === 'top'" 1012 :top="y === 'top'"
1007 :right="x === 'right'" 1013 :right="x === 'right'"
1008 :vertical="mode === 'vertical'" 1014 :vertical="mode === 'vertical'"
1009 v-model="snackbar" 1015 v-model="snackbar"
1010 color="success" 1016 color="success"
1011 >{{ text }}</v-snackbar> 1017 >{{ text }}</v-snackbar>
1012 <v-flex xs12 sm12 class="hidden-md-only hidden-lg-only hidden-xl-only"> 1018 <v-flex xs12 sm12 class="hidden-md-only hidden-lg-only hidden-xl-only">
1013 <v-form ref="parentForm" v-model="valid" lazy-validation> 1019 <v-form ref="parentForm" v-model="valid" lazy-validation>
1014 <v-layout wrap> 1020 <v-layout wrap>
1015 <v-flex xs12 sm6> 1021 <v-flex xs12 sm6>
1016 <v-layout wrap> 1022 <v-layout wrap>
1017 <v-flex xs12 class="pt-4 subheading"> 1023 <v-flex xs12 class="pt-4 subheading">
1018 <label>Father Cell No:</label> 1024 <label>Father Cell No:</label>
1019 </v-flex> 1025 </v-flex>
1020 <v-flex xs12> 1026 <v-flex xs12>
1021 <v-text-field 1027 <v-text-field
1022 v-model.trim="parentData.fatherCellNo" 1028 v-model.trim="parentData.fatherCellNo"
1023 placeholder="fill your father Cell Number" 1029 placeholder="fill your father Cell Number"
1024 type="number" 1030 type="number"
1025 :rules="fatheCellNoRules" 1031 :rules="fatheCellNoRules"
1026 counter="10" 1032 counter="10"
1027 v-on:keyup="getParentDetails()" 1033 v-on:keyup="getParentDetails()"
1028 required 1034 required
1029 ></v-text-field> 1035 ></v-text-field>
1030 </v-flex> 1036 </v-flex>
1031 </v-layout> 1037 </v-layout>
1032 </v-flex> 1038 </v-flex>
1033 <v-flex xs12 sm6> 1039 <v-flex xs12 sm6>
1034 <v-layout wrap> 1040 <v-layout wrap>
1035 <v-flex xs12 class="pt-4 subheading"> 1041 <v-flex xs12 class="pt-4 subheading">
1036 <label>Parent Email Id:</label> 1042 <label>Parent Email Id:</label>
1037 </v-flex> 1043 </v-flex>
1038 <v-flex xs12> 1044 <v-flex xs12>
1039 <v-text-field 1045 <v-text-field
1040 placeholder="fill Parent email" 1046 placeholder="fill Parent email"
1041 v-model="parentData.email" 1047 v-model="parentData.email"
1042 type="text" 1048 type="text"
1043 required 1049 required
1044 ></v-text-field> 1050 ></v-text-field>
1045 </v-flex> 1051 </v-flex>
1046 </v-layout> 1052 </v-layout>
1047 </v-flex> 1053 </v-flex>
1048 </v-layout> 1054 </v-layout>
1049 <v-layout wrap> 1055 <v-layout wrap>
1050 <v-flex xs12 sm6> 1056 <v-flex xs12 sm6>
1051 <v-layout wrap> 1057 <v-layout wrap>
1052 <v-flex xs12 class="pt-4 subheading"> 1058 <v-flex xs12 class="pt-4 subheading">
1053 <label>Father Name:</label> 1059 <label>Father Name:</label>
1054 </v-flex> 1060 </v-flex>
1055 <v-flex xs12> 1061 <v-flex xs12>
1056 <v-text-field 1062 <v-text-field
1057 v-model="parentData.fatherName" 1063 v-model="parentData.fatherName"
1058 placeholder="Fill your father Name" 1064 placeholder="Fill your father Name"
1059 required 1065 required
1060 ></v-text-field> 1066 ></v-text-field>
1061 </v-flex> 1067 </v-flex>
1062 </v-layout> 1068 </v-layout>
1063 </v-flex> 1069 </v-flex>
1064 <v-flex xs12 sm6> 1070 <v-flex xs12 sm6>
1065 <v-layout wrap> 1071 <v-layout wrap>
1066 <v-flex xs12 class="pt-4 subheading"> 1072 <v-flex xs12 class="pt-4 subheading">
1067 <label>Mother Name:</label> 1073 <label>Mother Name:</label>
1068 </v-flex> 1074 </v-flex>
1069 <v-flex xs12> 1075 <v-flex xs12>
1070 <v-text-field 1076 <v-text-field
1071 v-model="parentData.motherName" 1077 v-model="parentData.motherName"
1072 placeholder="fill your Mother Name" 1078 placeholder="fill your Mother Name"
1073 type="text" 1079 type="text"
1074 required 1080 required
1075 ></v-text-field> 1081 ></v-text-field>
1076 </v-flex> 1082 </v-flex>
1077 </v-layout> 1083 </v-layout>
1078 </v-flex> 1084 </v-flex>
1079 </v-layout> 1085 </v-layout>
1080 <v-layout wrap> 1086 <v-layout wrap>
1081 <v-flex xs12 sm6> 1087 <v-flex xs12 sm6>
1082 <v-layout wrap> 1088 <v-layout wrap>
1083 <v-flex xs12 class="pt-4 subheading"> 1089 <v-flex xs12 class="pt-4 subheading">
1084 <label>Mother Cell No:</label> 1090 <label>Mother Cell No:</label>
1085 </v-flex> 1091 </v-flex>
1086 <v-flex xs12> 1092 <v-flex xs12>
1087 <v-text-field 1093 <v-text-field
1088 v-model="parentData.motherCellNo" 1094 v-model="parentData.motherCellNo"
1089 placeholder="fill your Mother Cell Number" 1095 placeholder="fill your Mother Cell Number"
1090 type="number" 1096 type="number"
1091 required 1097 required
1092 ></v-text-field> 1098 ></v-text-field>
1093 </v-flex> 1099 </v-flex>
1094 </v-layout> 1100 </v-layout>
1095 </v-flex> 1101 </v-flex>
1096 <v-flex xs12 sm6> 1102 <v-flex xs12 sm6>
1097 <v-layout wrap> 1103 <v-layout wrap>
1098 <v-flex xs12 class="pt-4 subheading"> 1104 <v-flex xs12 class="pt-4 subheading">
1099 <label>Father Profession:</label> 1105 <label>Father Profession:</label>
1100 </v-flex> 1106 </v-flex>
1101 <v-flex xs12> 1107 <v-flex xs12>
1102 <v-text-field 1108 <v-text-field
1103 v-model="parentData.fatherProfession" 1109 v-model="parentData.fatherProfession"
1104 placeholder="fill your father profession" 1110 placeholder="fill your father profession"
1105 ></v-text-field> 1111 ></v-text-field>
1106 </v-flex> 1112 </v-flex>
1107 </v-layout> 1113 </v-layout>
1108 </v-flex> 1114 </v-flex>
1109 </v-layout> 1115 </v-layout>
1110 <v-layout wrap> 1116 <v-layout wrap>
1111 <v-flex xs12 sm6> 1117 <v-flex xs12 sm6>
1112 <v-layout wrap> 1118 <v-layout wrap>
1113 <v-flex xs12 class="pt-4 subheading"> 1119 <v-flex xs12 class="pt-4 subheading">
1114 <label>Mother Profession:</label> 1120 <label>Mother Profession:</label>
1115 </v-flex> 1121 </v-flex>
1116 <v-flex xs12> 1122 <v-flex xs12>
1117 <v-text-field 1123 <v-text-field
1118 v-model="parentData.motherProfession" 1124 v-model="parentData.motherProfession"
1119 placeholder="fill your mother profession" 1125 placeholder="fill your mother profession"
1120 ></v-text-field> 1126 ></v-text-field>
1121 </v-flex> 1127 </v-flex>
1122 </v-layout> 1128 </v-layout>
1123 </v-flex> 1129 </v-flex>
1124 </v-layout> 1130 </v-layout>
1125 <v-flex sm12 class="hidden-xs-only"> 1131 <v-flex sm12 class="hidden-xs-only">
1126 <v-card-actions> 1132 <v-card-actions>
1127 <v-spacer></v-spacer> 1133 <v-spacer></v-spacer>
1128 <v-btn 1134 <v-btn
1129 @click="submitParentDetails" 1135 @click="submitParentDetails"
1130 round 1136 round
1131 dark 1137 dark
1132 :loading="loading" 1138 :loading="loading"
1133 v-show="showParent" 1139 v-show="showParent"
1134 >Add</v-btn> 1140 >Add</v-btn>
1135 <v-btn v-show="showNext" @click="e2 = 2" round dark>Next</v-btn> 1141 <v-btn v-show="showNext" @click="e2 = 2" round dark>Next</v-btn>
1136 </v-card-actions> 1142 </v-card-actions>
1137 </v-flex> 1143 </v-flex>
1138 <v-flex 1144 <v-flex
1139 xs6 1145 xs6
1140 class="hidden-md-only hidden-sm-only hidden-lg-only hidden-xl-only mx-auto mt-2" 1146 class="hidden-md-only hidden-sm-only hidden-lg-only hidden-xl-only mx-auto mt-2"
1141 > 1147 >
1142 <v-btn 1148 <v-btn
1143 @click="submitParentDetails" 1149 @click="submitParentDetails"
1144 round 1150 round
1145 dark 1151 dark
1146 :loading="loading" 1152 :loading="loading"
1147 v-show="showParent" 1153 v-show="showParent"
1148 >Add</v-btn> 1154 >Add</v-btn>
1149 <v-btn v-show="showNext" @click="e2 = 2" round dark>Next</v-btn> 1155 <v-btn v-show="showNext" @click="e2 = 2" round dark>Next</v-btn>
1150 </v-flex> 1156 </v-flex>
1151 </v-form> 1157 </v-form>
1152 </v-flex> 1158 </v-flex>
1153 <v-flex xs12 sm12 class="hidden-xs-only hidden-sm-only"> 1159 <v-flex xs12 sm12 class="hidden-xs-only hidden-sm-only">
1154 <v-form ref="parentForm" v-model="valid" lazy-validation> 1160 <v-form ref="parentForm" v-model="valid" lazy-validation>
1155 <v-layout wrap> 1161 <v-layout wrap>
1156 <v-flex xs12 sm6> 1162 <v-flex xs12 sm6>
1157 <v-layout> 1163 <v-layout>
1158 <v-flex xs4 class="pt-4 subheading"> 1164 <v-flex xs4 class="pt-4 subheading">
1159 <label class="right">Father Cell No:</label> 1165 <label class="right">Father Cell No:</label>
1160 </v-flex> 1166 </v-flex>
1161 <v-flex xs8 class="ml-3"> 1167 <v-flex xs8 class="ml-3">
1162 <v-text-field 1168 <v-text-field
1163 v-model.trim="parentData.fatherCellNo" 1169 v-model.trim="parentData.fatherCellNo"
1164 placeholder="fill your father Cell Number" 1170 placeholder="fill your father Cell Number"
1165 type="number" 1171 type="number"
1166 :rules="fatheCellNoRules" 1172 :rules="fatheCellNoRules"
1167 counter="10" 1173 counter="10"
1168 v-on:keyup="getParentDetails()" 1174 v-on:keyup="getParentDetails()"
1169 required 1175 required
1170 ></v-text-field> 1176 ></v-text-field>
1171 </v-flex> 1177 </v-flex>
1172 </v-layout> 1178 </v-layout>
1173 </v-flex> 1179 </v-flex>
1174 <v-flex xs12 sm6> 1180 <v-flex xs12 sm6>
1175 <v-layout> 1181 <v-layout>
1176 <v-flex xs4 class="pt-4 subheading"> 1182 <v-flex xs4 class="pt-4 subheading">
1177 <label class="right">Parent Email Id:</label> 1183 <label class="right">Parent Email Id:</label>
1178 </v-flex> 1184 </v-flex>
1179 <v-flex xs8 class="ml-3"> 1185 <v-flex xs8 class="ml-3">
1180 <v-text-field 1186 <v-text-field
1181 placeholder="fill Parent email" 1187 placeholder="fill Parent email"
1182 v-model="parentData.email" 1188 v-model="parentData.email"
1183 type="text" 1189 type="text"
1184 required 1190 required
1185 ></v-text-field> 1191 ></v-text-field>
1186 </v-flex> 1192 </v-flex>
1187 </v-layout> 1193 </v-layout>
1188 </v-flex> 1194 </v-flex>
1189 </v-layout> 1195 </v-layout>
1190 <v-layout wrap> 1196 <v-layout wrap>
1191 <v-flex xs12 sm6> 1197 <v-flex xs12 sm6>
1192 <v-layout> 1198 <v-layout>
1193 <v-flex xs4 class="pt-4 subheading"> 1199 <v-flex xs4 class="pt-4 subheading">
1194 <label class="right">Father Name:</label> 1200 <label class="right">Father Name:</label>
1195 </v-flex> 1201 </v-flex>
1196 <v-flex xs8 class="ml-3"> 1202 <v-flex xs8 class="ml-3">
1197 <v-text-field 1203 <v-text-field
1198 v-model="parentData.fatherName" 1204 v-model="parentData.fatherName"
1199 placeholder="Fill your father Name" 1205 placeholder="Fill your father Name"
1200 required 1206 required
1201 ></v-text-field> 1207 ></v-text-field>
1202 </v-flex> 1208 </v-flex>
1203 </v-layout> 1209 </v-layout>
1204 </v-flex> 1210 </v-flex>
1205 <v-flex xs12 sm6> 1211 <v-flex xs12 sm6>
1206 <v-layout> 1212 <v-layout>
1207 <v-flex xs4 class="pt-4 subheading"> 1213 <v-flex xs4 class="pt-4 subheading">
1208 <label class="right">Mother Name:</label> 1214 <label class="right">Mother Name:</label>
1209 </v-flex> 1215 </v-flex>
1210 <v-flex xs8 class="ml-3"> 1216 <v-flex xs8 class="ml-3">
1211 <v-text-field 1217 <v-text-field
1212 v-model="parentData.motherName" 1218 v-model="parentData.motherName"
1213 placeholder="fill your Mother Name" 1219 placeholder="fill your Mother Name"
1214 type="text" 1220 type="text"
1215 required 1221 required
1216 ></v-text-field> 1222 ></v-text-field>
1217 </v-flex> 1223 </v-flex>
1218 </v-layout> 1224 </v-layout>
1219 </v-flex> 1225 </v-flex>
1220 </v-layout> 1226 </v-layout>
1221 <v-layout wrap> 1227 <v-layout wrap>
1222 <v-flex xs12 sm6> 1228 <v-flex xs12 sm6>
1223 <v-layout> 1229 <v-layout>
1224 <v-flex xs4 class="pt-4 subheading"> 1230 <v-flex xs4 class="pt-4 subheading">
1225 <label class="right">Mother Cell No:</label> 1231 <label class="right">Mother Cell No:</label>
1226 </v-flex> 1232 </v-flex>
1227 <v-flex xs8 class="ml-3"> 1233 <v-flex xs8 class="ml-3">
1228 <v-text-field 1234 <v-text-field
1229 v-model="parentData.motherCellNo" 1235 v-model="parentData.motherCellNo"
1230 placeholder="fill your Mother Cell Number" 1236 placeholder="fill your Mother Cell Number"
1231 type="number" 1237 type="number"
1232 required 1238 required
1233 ></v-text-field> 1239 ></v-text-field>
1234 </v-flex> 1240 </v-flex>
1235 </v-layout> 1241 </v-layout>
1236 </v-flex> 1242 </v-flex>
1237 <v-flex xs12 sm6> 1243 <v-flex xs12 sm6>
1238 <v-layout> 1244 <v-layout>
1239 <v-flex xs4 class="pt-4 subheading"> 1245 <v-flex xs4 class="pt-4 subheading">
1240 <label class="right">Father Profession:</label> 1246 <label class="right">Father Profession:</label>
1241 </v-flex> 1247 </v-flex>
1242 <v-flex xs8 class="ml-3"> 1248 <v-flex xs8 class="ml-3">
1243 <v-text-field 1249 <v-text-field
1244 v-model="parentData.fatherProfession" 1250 v-model="parentData.fatherProfession"
1245 placeholder="fill your father profession" 1251 placeholder="fill your father profession"
1246 ></v-text-field> 1252 ></v-text-field>
1247 </v-flex> 1253 </v-flex>
1248 </v-layout> 1254 </v-layout>
1249 </v-flex> 1255 </v-flex>
1250 </v-layout> 1256 </v-layout>
1251 <v-layout wrap> 1257 <v-layout wrap>
1252 <v-flex xs12 sm6> 1258 <v-flex xs12 sm6>
1253 <v-layout> 1259 <v-layout>
1254 <v-flex xs4 class="pt-4 subheading"> 1260 <v-flex xs4 class="pt-4 subheading">
1255 <label class="right">Mother Profession:</label> 1261 <label class="right">Mother Profession:</label>
1256 </v-flex> 1262 </v-flex>
1257 <v-flex xs8 class="ml-3"> 1263 <v-flex xs8 class="ml-3">
1258 <v-text-field 1264 <v-text-field
1259 v-model="parentData.motherProfession" 1265 v-model="parentData.motherProfession"
1260 placeholder="fill your mother profession" 1266 placeholder="fill your mother profession"
1261 ></v-text-field> 1267 ></v-text-field>
1262 </v-flex> 1268 </v-flex>
1263 </v-layout> 1269 </v-layout>
1264 </v-flex> 1270 </v-flex>
1265 </v-layout> 1271 </v-layout>
1266 <v-flex sm12 class="hidden-xs-only"> 1272 <v-flex sm12 class="hidden-xs-only">
1267 <v-card-actions> 1273 <v-card-actions>
1268 <v-spacer></v-spacer> 1274 <v-spacer></v-spacer>
1269 <v-btn 1275 <v-btn
1270 @click="submitParentDetails" 1276 @click="submitParentDetails"
1271 round 1277 round
1272 dark 1278 dark
1273 :loading="loading" 1279 :loading="loading"
1274 v-show="showParent" 1280 v-show="showParent"
1275 >Add</v-btn> 1281 >Add</v-btn>
1276 <v-btn v-show="showNext" @click="e2 = 2" round dark>Next</v-btn> 1282 <v-btn v-show="showNext" @click="e2 = 2" round dark>Next</v-btn>
1277 </v-card-actions> 1283 </v-card-actions>
1278 </v-flex> 1284 </v-flex>
1279 <v-flex 1285 <v-flex
1280 xs6 1286 xs6
1281 class="hidden-md-only hidden-sm-only hidden-lg-only hidden-xl-only mx-auto mt-2" 1287 class="hidden-md-only hidden-sm-only hidden-lg-only hidden-xl-only mx-auto mt-2"
1282 > 1288 >
1283 <v-btn 1289 <v-btn
1284 @click="submitParentDetails" 1290 @click="submitParentDetails"
1285 round 1291 round
1286 dark 1292 dark
1287 :loading="loading" 1293 :loading="loading"
1288 v-show="showParent" 1294 v-show="showParent"
1289 >Add</v-btn> 1295 >Add</v-btn>
1290 <v-btn v-show="showNext" @click="e2 = 2" round dark>Next</v-btn> 1296 <v-btn v-show="showNext" @click="e2 = 2" round dark>Next</v-btn>
1291 </v-flex> 1297 </v-flex>
1292 </v-form> 1298 </v-form>
1293 </v-flex> 1299 </v-flex>
1294 </v-container> 1300 </v-container>
1295 </v-stepper-content> 1301 </v-stepper-content>
1296 <v-stepper-content step="2"> 1302 <v-stepper-content step="2">
1297 <v-snackbar 1303 <v-snackbar
1298 :timeout="timeout" 1304 :timeout="timeout"
1299 :top="y === 'top'" 1305 :top="y === 'top'"
1300 :right="x === 'right'" 1306 :right="x === 'right'"
1301 :vertical="mode === 'vertical'" 1307 :vertical="mode === 'vertical'"
1302 v-model="snackbar" 1308 v-model="snackbar"
1303 color="success" 1309 color="success"
1304 >{{ text }}</v-snackbar> 1310 >{{ text }}</v-snackbar>
1305 <v-flex xs12 sm12> 1311 <v-flex xs12 sm12>
1306 <v-form ref="form" v-model="valid" lazy-validation> 1312 <v-form ref="form" v-model="valid" lazy-validation>
1307 <v-layout> 1313 <v-layout>
1308 <v-flex 1314 <v-flex
1309 xs12 1315 xs12
1310 class="text-xs-center text-sm-center text-md-center text-lg-center" 1316 class="text-xs-center text-sm-center text-md-center text-lg-center"
1311 > 1317 >
1312 <v-avatar size="100px"> 1318 <v-avatar size="100px">
1313 <img src="/static/icon/user.png" v-if="!imageUrl" /> 1319 <img src="/static/icon/user.png" v-if="!imageUrl" />
1314 </v-avatar> 1320 </v-avatar>
1315 <input 1321 <input
1316 type="file" 1322 type="file"
1317 style="display: none" 1323 style="display: none"
1318 ref="image" 1324 ref="image"
1319 accept="image/*" 1325 accept="image/*"
1320 @change="onFilePicked" 1326 @change="onFilePicked"
1321 /> 1327 />
1322 <img 1328 <img
1323 :src="imageData.imageUrl" 1329 :src="imageData.imageUrl"
1324 height="150" 1330 height="150"
1325 v-if="imageUrl" 1331 v-if="imageUrl"
1326 style="border-radius:50%; width:200px" 1332 style="border-radius:50%; width:200px"
1327 /> 1333 />
1328 </v-flex> 1334 </v-flex>
1329 </v-layout> 1335 </v-layout>
1330 <v-layout wrap> 1336 <v-layout wrap>
1331 <v-flex xs12 sm6> 1337 <v-flex xs12 sm6>
1332 <v-layout> 1338 <v-layout>
1333 <v-flex x4 sm4 class="pt-4 subheading"> 1339 <v-flex x4 sm4 class="pt-4 subheading">
1334 <label class="right hidden-xs-only hidden-sm-only">Select Class:</label> 1340 <label class="right hidden-xs-only hidden-sm-only">Select Class:</label>
1335 <label 1341 <label
1336 class="right hidden-lg-only hidden-md-only hidden-xl-only" 1342 class="right hidden-lg-only hidden-md-only hidden-xl-only"
1337 >Class:</label> 1343 >Class:</label>
1338 </v-flex> 1344 </v-flex>
1339 <v-flex xs8 sm8 class="ml-3"> 1345 <v-flex xs8 sm8 class="ml-3">
1340 <v-select 1346 <v-select
1341 :items="addclass" 1347 :items="addclass"
1342 label="Select Class" 1348 label="Select Class"
1343 v-model="addStudents.select" 1349 v-model="addStudents.select"
1344 item-text="classNum" 1350 item-text="classNum"
1345 item-value="_id" 1351 item-value="_id"
1346 name="Select Class" 1352 name="Select Class"
1347 :rules="classRules" 1353 :rules="classRules"
1348 @change="getSection(addStudents.select)" 1354 @change="getSection(addStudents.select)"
1349 required 1355 required
1350 ></v-select> 1356 ></v-select>
1351 </v-flex> 1357 </v-flex>
1352 </v-layout> 1358 </v-layout>
1353 </v-flex> 1359 </v-flex>
1354 <v-flex xs12 sm6> 1360 <v-flex xs12 sm6>
1355 <v-layout> 1361 <v-layout>
1356 <v-flex xs4 class="pt-4 subheading"> 1362 <v-flex xs4 class="pt-4 subheading">
1357 <label 1363 <label
1358 class="right hidden-xs-only hidden-sm-only" 1364 class="right hidden-xs-only hidden-sm-only"
1359 >Select Section:</label> 1365 >Select Section:</label>
1360 <label 1366 <label
1361 class="right hidden-lg-only hidden-md-only hidden-xl-only" 1367 class="right hidden-lg-only hidden-md-only hidden-xl-only"
1362 >Section:</label> 1368 >Section:</label>
1363 </v-flex> 1369 </v-flex>
1364 <v-flex xs8 class="ml-3"> 1370 <v-flex xs8 class="ml-3">
1365 <v-select 1371 <v-select
1366 :items="addSection" 1372 :items="addSection"
1367 label="Select Section" 1373 label="Select Section"
1368 v-model="addStudents.selectSection" 1374 v-model="addStudents.selectSection"
1369 item-text="name" 1375 item-text="name"
1370 item-value="_id" 1376 item-value="_id"
1371 name="Select Section" 1377 name="Select Section"
1372 :rules="sectionRules" 1378 :rules="sectionRules"
1373 required 1379 required
1374 ></v-select> 1380 ></v-select>
1375 </v-flex> 1381 </v-flex>
1376 </v-layout> 1382 </v-layout>
1377 </v-flex> 1383 </v-flex>
1378 </v-layout> 1384 </v-layout>
1379 <v-layout wrap> 1385 <v-layout wrap>
1380 <v-flex xs12 sm6> 1386 <v-flex xs12 sm6>
1381 <v-layout> 1387 <v-layout>
1382 <v-flex xs4 sm4 class="pt-4 subheading"> 1388 <v-flex xs4 sm4 class="pt-4 subheading">
1383 <label class="right hidden-xs-only hidden-sm-only">Full Name:</label> 1389 <label class="right hidden-xs-only hidden-sm-only">Full Name:</label>
1384 <label 1390 <label
1385 class="right hidden-lg-only hidden-md-only hidden-xl-only" 1391 class="right hidden-lg-only hidden-md-only hidden-xl-only"
1386 >Name:</label> 1392 >Name:</label>
1387 </v-flex> 1393 </v-flex>
1388 <v-flex xs8 sm8 class="ml-3"> 1394 <v-flex xs8 sm8 class="ml-3">
1389 <v-text-field 1395 <v-text-field
1390 v-model="addStudents.name" 1396 v-model="addStudents.name"
1391 placeholder="fill your full Name" 1397 placeholder="fill your full Name"
1392 name="name" 1398 name="name"
1393 type="text" 1399 type="text"
1394 :rules="nameRules" 1400 :rules="nameRules"
1395 required 1401 required
1396 ></v-text-field> 1402 ></v-text-field>
1397 </v-flex> 1403 </v-flex>
1398 </v-layout> 1404 </v-layout>
1399 </v-flex> 1405 </v-flex>
1400 <v-flex xs12 sm6> 1406 <v-flex xs12 sm6>
1401 <v-layout> 1407 <v-layout>
1402 <v-flex xs4 sm4 class="pt-4 subheading"> 1408 <v-flex xs4 sm4 class="pt-4 subheading">
1403 <label class="right">Email ID:</label> 1409 <label class="right">Email ID:</label>
1404 </v-flex> 1410 </v-flex>
1405 <v-flex xs8 sm8 class="ml-3"> 1411 <v-flex xs8 sm8 class="ml-3">
1406 <v-text-field 1412 <v-text-field
1407 placeholder="fill your email" 1413 placeholder="fill your email"
1408 v-model="addStudents.email" 1414 v-model="addStudents.email"
1409 type="text" 1415 type="text"
1410 name="email" 1416 name="email"
1411 required 1417 required
1412 ></v-text-field> 1418 ></v-text-field>
1413 </v-flex> 1419 </v-flex>
1414 </v-layout> 1420 </v-layout>
1415 </v-flex> 1421 </v-flex>
1416 </v-layout> 1422 </v-layout>
1417 <v-layout wrap> 1423 <v-layout wrap>
1418 <v-flex xs12 sm6> 1424 <v-flex xs12 sm6>
1419 <v-layout> 1425 <v-layout>
1420 <v-flex xs4 sm4 class="pt-4 subheading"> 1426 <v-flex xs4 sm4 class="pt-4 subheading">
1421 <label 1427 <label
1422 class="right hidden-sm-only hidden-xs-only" 1428 class="right hidden-sm-only hidden-xs-only"
1423 >Date of Birth:</label> 1429 >Date of Birth:</label>
1424 <label 1430 <label
1425 class="right hidden-lg-only hidden-xl-only hidden-md-only" 1431 class="right hidden-lg-only hidden-xl-only hidden-md-only"
1426 >D.O.B:</label> 1432 >D.O.B:</label>
1427 </v-flex> 1433 </v-flex>
1428 <v-flex xs8 sm8 class="ml-3"> 1434 <v-flex xs8 sm8 class="ml-3">
1429 <v-menu 1435 <v-menu
1430 ref="menu" 1436 ref="menu"
1431 :close-on-content-click="false" 1437 :close-on-content-click="false"
1432 v-model="menu" 1438 v-model="menu"
1433 :nudge-right="40" 1439 :nudge-right="40"
1434 lazy 1440 lazy
1435 transition="scale-transition" 1441 transition="scale-transition"
1436 offset-y 1442 offset-y
1437 full-width 1443 full-width
1438 min-width="290px" 1444 min-width="290px"
1439 > 1445 >
1440 <v-text-field 1446 <v-text-field
1441 slot="activator" 1447 slot="activator"
1442 :rules="dateRules" 1448 :rules="dateRules"
1443 v-model="addStudents.date" 1449 v-model="addStudents.date"
1444 placeholder="Select date" 1450 placeholder="Select date"
1445 ></v-text-field> 1451 ></v-text-field>
1446 <v-date-picker 1452 <v-date-picker
1447 ref="picker" 1453 ref="picker"
1448 v-model="addStudents.date" 1454 v-model="addStudents.date"
1449 :max="new Date().toISOString().substr(0, 10)" 1455 :max="new Date().toISOString().substr(0, 10)"
1450 min="1950-01-01" 1456 min="1950-01-01"
1451 @input="menu = false" 1457 @input="menu = false"
1452 ></v-date-picker> 1458 ></v-date-picker>
1453 </v-menu> 1459 </v-menu>
1454 </v-flex> 1460 </v-flex>
1455 </v-layout> 1461 </v-layout>
1456 </v-flex> 1462 </v-flex>
1457 <v-flex xs12 sm6> 1463 <v-flex xs12 sm6>
1458 <v-layout> 1464 <v-layout>
1459 <v-flex xs4 class="pt-4 subheading"> 1465 <v-flex xs4 class="pt-4 subheading">
1460 <label class="right">City:</label> 1466 <label class="right">City:</label>
1461 </v-flex> 1467 </v-flex>
1462 <v-flex xs8 class="ml-3"> 1468 <v-flex xs8 class="ml-3">
1463 <v-text-field 1469 <v-text-field
1464 v-model="addStudents.city" 1470 v-model="addStudents.city"
1465 placeholder="fill your City Name" 1471 placeholder="fill your City Name"
1466 name="City" 1472 name="City"
1467 type="text" 1473 type="text"
1468 :rules="cityRules" 1474 :rules="cityRules"
1469 required 1475 required
1470 ></v-text-field> 1476 ></v-text-field>
1471 </v-flex> 1477 </v-flex>
1472 </v-layout> 1478 </v-layout>
1473 </v-flex> 1479 </v-flex>
1474 </v-layout> 1480 </v-layout>
1475 <v-layout wrap> 1481 <v-layout wrap>
1476 <v-flex xs12 sm6> 1482 <v-flex xs12 sm6>
1477 <v-layout> 1483 <v-layout>
1478 <v-flex xs4 class="pt-4 subheading"> 1484 <v-flex xs4 class="pt-4 subheading">
1479 <label class="right">State:</label> 1485 <label class="right">State:</label>
1480 </v-flex> 1486 </v-flex>
1481 <v-flex xs8 class="ml-3"> 1487 <v-flex xs8 class="ml-3">
1482 <v-text-field 1488 <v-text-field
1483 v-model="addStudents.state" 1489 v-model="addStudents.state"
1484 placeholder="fill your State Name" 1490 placeholder="fill your State Name"
1485 name="state" 1491 name="state"
1486 type="text" 1492 type="text"
1487 :rules="stateRules" 1493 :rules="stateRules"
1488 required 1494 required
1489 ></v-text-field> 1495 ></v-text-field>
1490 </v-flex> 1496 </v-flex>
1491 </v-layout> 1497 </v-layout>
1492 </v-flex> 1498 </v-flex>
1493 <v-flex xs12 sm6> 1499 <v-flex xs12 sm6>
1494 <v-layout> 1500 <v-layout>
1495 <v-flex xs4 class="pt-4 subheading"> 1501 <v-flex xs4 class="pt-4 subheading">
1496 <label class="right">Pincode:</label> 1502 <label class="right">Pincode:</label>
1497 </v-flex> 1503 </v-flex>
1498 <v-flex xs8 class="ml-3"> 1504 <v-flex xs8 class="ml-3">
1499 <v-text-field 1505 <v-text-field
1500 v-model="addStudents.pincode" 1506 v-model="addStudents.pincode"
1501 placeholder="fill your pincode" 1507 placeholder="fill your pincode"
1502 name="pincode" 1508 name="pincode"
1503 type="number" 1509 type="number"
1504 :rules="pincode" 1510 :rules="pincode"
1505 required 1511 required
1506 ></v-text-field> 1512 ></v-text-field>
1507 </v-flex> 1513 </v-flex>
1508 </v-layout> 1514 </v-layout>
1509 </v-flex> 1515 </v-flex>
1510 </v-layout> 1516 </v-layout>
1511 <v-layout wrap> 1517 <v-layout wrap>
1512 <v-flex xs12 sm6> 1518 <v-flex xs12 sm6>
1513 <v-layout> 1519 <v-layout>
1514 <v-flex xs4 class="pt-4 subheading"> 1520 <v-flex xs4 class="pt-4 subheading">
1515 <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label> 1521 <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label>
1516 <label 1522 <label
1517 class="right hidden-lg-only hidden-md-only hidden-xl-only" 1523 class="right hidden-lg-only hidden-md-only hidden-xl-only"
1518 >Mobile:</label> 1524 >Mobile:</label>
1519 </v-flex> 1525 </v-flex>
1520 <v-flex xs8 class="ml-3"> 1526 <v-flex xs8 class="ml-3">
1521 <v-text-field 1527 <v-text-field
1522 v-model="addStudents.mobile" 1528 v-model="addStudents.mobile"
1523 placeholder="fill your MobileNo" 1529 placeholder="fill your MobileNo"
1524 :rules="mobileNoRule" 1530 :rules="mobileNoRule"
1525 name="mobileNo" 1531 name="mobileNo"
1526 type="number" 1532 type="number"
1527 required 1533 required
1528 ></v-text-field> 1534 ></v-text-field>
1529 </v-flex> 1535 </v-flex>
1530 </v-layout> 1536 </v-layout>
1531 </v-flex> 1537 </v-flex>
1532 <v-flex xs12 sm6> 1538 <v-flex xs12 sm6>
1533 <v-layout> 1539 <v-layout>
1534 <v-flex xs4 class="pt-4 subheading"> 1540 <v-flex xs4 class="pt-4 subheading">
1535 <label 1541 <label
1536 class="right hidden-xs-only hidden-sm-only" 1542 class="right hidden-xs-only hidden-sm-only"
1537 >Select Country:</label> 1543 >Select Country:</label>
1538 <label 1544 <label
1539 class="right hidden-lg-only hidden-md-only hidden-xl-only" 1545 class="right hidden-lg-only hidden-md-only hidden-xl-only"
1540 >Country:</label> 1546 >Country:</label>
1541 </v-flex> 1547 </v-flex>
1542 <v-flex xs8 class="ml-3"> 1548 <v-flex xs8 class="ml-3">
1543 <v-autocomplete 1549 <v-autocomplete
1544 v-model="addStudents.country" 1550 v-model="addStudents.country"
1545 :rules="country" 1551 :rules="country"
1546 :items="countries" 1552 :items="countries"
1547 placeholder="Select Country Name" 1553 placeholder="Select Country Name"
1548 required 1554 required
1549 ></v-autocomplete> 1555 ></v-autocomplete>
1550 </v-flex> 1556 </v-flex>
1551 </v-layout> 1557 </v-layout>
1552 </v-flex> 1558 </v-flex>
1553 </v-layout> 1559 </v-layout>
1554 <v-layout wrap> 1560 <v-layout wrap>
1555 <v-flex xs12 sm6> 1561 <v-flex xs12 sm6>
1556 <v-layout> 1562 <v-layout>
1557 <v-flex xs4 class="pt-4 subheading"> 1563 <v-flex xs4 class="pt-4 subheading">
1558 <label class="right">Gender:</label> 1564 <label class="right">Gender:</label>
1559 </v-flex> 1565 </v-flex>
1560 <v-flex xs8 class="ml-3"> 1566 <v-flex xs8 class="ml-3">
1561 <v-select 1567 <v-select
1562 :items="gender" 1568 :items="gender"
1563 v-model="addStudents.gender" 1569 v-model="addStudents.gender"
1564 :rules="genderRules" 1570 :rules="genderRules"
1565 label="Select Gender" 1571 label="Select Gender"
1566 required 1572 required
1567 ></v-select> 1573 ></v-select>
1568 </v-flex> 1574 </v-flex>
1569 </v-layout> 1575 </v-layout>
1570 </v-flex> 1576 </v-flex>
1571 <v-flex xs12 sm6> 1577 <v-flex xs12 sm6>
1572 <v-layout> 1578 <v-layout>
1573 <v-flex xs4 class="pt-4 subheading"> 1579 <v-flex xs4 class="pt-4 subheading">
1574 <label class="right hidden-xs-only hidden-sm-only">Blood Group:</label> 1580 <label class="right hidden-xs-only hidden-sm-only">Blood Group:</label>
1575 <label 1581 <label
1576 class="right hidden-lg-only hidden-md-only hidden-xl-only" 1582 class="right hidden-lg-only hidden-md-only hidden-xl-only"
1577 >Blood:</label> 1583 >Blood:</label>
1578 </v-flex> 1584 </v-flex>
1579 <v-flex xs8 class="ml-3"> 1585 <v-flex xs8 class="ml-3">
1580 <v-text-field 1586 <v-text-field
1581 v-model="addStudents.bloodGroup" 1587 v-model="addStudents.bloodGroup"
1582 placeholder="Fill your Blood Group" 1588 placeholder="Fill your Blood Group"
1583 required 1589 required
1584 ></v-text-field> 1590 ></v-text-field>
1585 </v-flex> 1591 </v-flex>
1586 </v-layout> 1592 </v-layout>
1587 </v-flex> 1593 </v-flex>
1588 </v-layout> 1594 </v-layout>
1589 <v-layout wrap> 1595 <v-layout wrap>
1590 <!-- <v-flex xs12 sm6> 1596 <!-- <v-flex xs12 sm6>
1591 <v-layout> 1597 <v-layout>
1592 <v-flex xs4 class="pt-4 subheading"> 1598 <v-flex xs4 class="pt-4 subheading">
1593 <label class="right">Allergies:</label> 1599 <label class="right">Allergies:</label>
1594 </v-flex> 1600 </v-flex>
1595 <v-flex xs8 class="ml-3"> 1601 <v-flex xs8 class="ml-3">
1596 <v-text-field 1602 <v-text-field
1597 v-model="addStudents.allergies" 1603 v-model="addStudents.allergies"
1598 placeholder="Fill your Allergies" 1604 placeholder="Fill your Allergies"
1599 required 1605 required
1600 ></v-text-field> 1606 ></v-text-field>
1601 </v-flex> 1607 </v-flex>
1602 </v-layout> 1608 </v-layout>
1603 </v-flex>--> 1609 </v-flex>-->
1604 <v-flex xs12 sm6> 1610 <v-flex xs12 sm6>
1605 <v-layout> 1611 <v-layout>
1606 <v-flex xs4 class="pt-4 subheading"> 1612 <v-flex xs4 class="pt-4 subheading">
1607 <label class="right hidden-xs-only hidden-sm-only">Roll Number:</label> 1613 <label class="right hidden-xs-only hidden-sm-only">Roll Number:</label>
1608 <label 1614 <label
1609 class="right hidden-lg-only hidden-md-only hidden-xl-only" 1615 class="right hidden-lg-only hidden-md-only hidden-xl-only"
1610 >Roll No:</label> 1616 >Roll No:</label>
1611 </v-flex> 1617 </v-flex>
1612 <v-flex xs8 class="ml-3"> 1618 <v-flex xs8 class="ml-3">
1613 <v-text-field 1619 <v-text-field
1614 v-model="addStudents.rollNo" 1620 v-model="addStudents.rollNo"
1615 placeholder="Fill your Roll Number" 1621 placeholder="Fill your Roll Number"
1616 required 1622 required
1617 ></v-text-field> 1623 ></v-text-field>
1618 </v-flex> 1624 </v-flex>
1619 </v-layout> 1625 </v-layout>
1620 </v-flex> 1626 </v-flex>
1621 <v-flex xs12 sm6> 1627 <v-flex xs12 sm6>
1622 <v-layout> 1628 <v-layout>
1623 <v-flex xs4 class="pt-4 subheading"> 1629 <v-flex xs4 class="pt-4 subheading">
1624 <label 1630 <label
1625 class="right hidden-xs-only hidden-sm-only" 1631 class="right hidden-xs-only hidden-sm-only"
1626 >Medical Notes:</label> 1632 >Medical Notes:</label>
1627 <label 1633 <label
1628 class="right hidden-lg-only hidden-md-only hidden-xl-only" 1634 class="right hidden-lg-only hidden-md-only hidden-xl-only"
1629 >Medical:</label> 1635 >Medical:</label>
1630 </v-flex> 1636 </v-flex>
1631 <v-flex xs8 class="ml-3"> 1637 <v-flex xs8 class="ml-3">
1632 <v-text-field 1638 <v-text-field
1633 v-model="addStudents.medicalNotes" 1639 v-model="addStudents.medicalNotes"
1634 placeholder="Fill your Medical Notes" 1640 placeholder="Fill your Medical Notes"
1635 required 1641 required
1636 ></v-text-field> 1642 ></v-text-field>
1637 </v-flex> 1643 </v-flex>
1638 </v-layout> 1644 </v-layout>
1639 </v-flex> 1645 </v-flex>
1640 </v-layout> 1646 </v-layout>
1641 <v-layout wrap> 1647 <v-layout wrap>
1642 <v-flex xs12 sm6> 1648 <v-flex xs12 sm6>
1643 <v-layout> 1649 <v-layout>
1644 <v-flex xs4 class="pt-4 subheading"> 1650 <v-flex xs4 class="pt-4 subheading">
1645 <label class="right">Height:</label> 1651 <label class="right">Height:</label>
1646 </v-flex> 1652 </v-flex>
1647 <v-flex xs8 class="ml-3"> 1653 <v-flex xs8 class="ml-3">
1648 <v-text-field 1654 <v-text-field
1649 v-model="addStudents.height" 1655 v-model="addStudents.height"
1650 placeholder="Fill your Height" 1656 placeholder="Fill your Height"
1651 required 1657 required
1652 ></v-text-field> 1658 ></v-text-field>
1653 </v-flex> 1659 </v-flex>
1654 </v-layout> 1660 </v-layout>
1655 </v-flex> 1661 </v-flex>
1656 <v-flex xs12 sm6> 1662 <v-flex xs12 sm6>
1657 <v-layout> 1663 <v-layout>
1658 <v-flex xs4 class="pt-4 subheading"> 1664 <v-flex xs4 class="pt-4 subheading">
1659 <label class="right">Weight:</label> 1665 <label class="right">Weight:</label>
1660 </v-flex> 1666 </v-flex>
1661 <v-flex xs8 class="ml-3"> 1667 <v-flex xs8 class="ml-3">
1662 <v-text-field 1668 <v-text-field
1663 v-model="addStudents.weight" 1669 v-model="addStudents.weight"
1664 placeholder="Fill your Weight" 1670 placeholder="Fill your Weight"
1665 required 1671 required
1666 ></v-text-field> 1672 ></v-text-field>
1667 </v-flex> 1673 </v-flex>
1668 </v-layout> 1674 </v-layout>
1669 </v-flex> 1675 </v-flex>
1670 </v-layout> 1676 </v-layout>
1671 <v-layout wrap> 1677 <v-layout wrap>
1672 <v-flex xs12 sm6> 1678 <v-flex xs12 sm6>
1673 <v-layout> 1679 <v-layout>
1674 <v-flex xs4 class="pt-4 subheading"> 1680 <v-flex xs4 class="pt-4 subheading">
1675 <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label> 1681 <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label>
1676 <label 1682 <label
1677 class="right hidden-lg-only hidden-md-only hidden-xl-only" 1683 class="right hidden-lg-only hidden-md-only hidden-xl-only"
1678 >Uplaod :</label> 1684 >Uplaod :</label>
1679 </v-flex> 1685 </v-flex>
1680 <v-flex xs8 class="ml-3"> 1686 <v-flex xs8 class="ml-3">
1681 <v-text-field 1687 <v-text-field
1682 label="Select Image" 1688 label="Select Image"
1683 @click="pickFile" 1689 @click="pickFile"
1684 v-model="imageName" 1690 v-model="imageName"
1685 append-icon="attach_file" 1691 append-icon="attach_file"
1686 ></v-text-field> 1692 ></v-text-field>
1687 </v-flex> 1693 </v-flex>
1688 </v-layout> 1694 </v-layout>
1689 </v-flex> 1695 </v-flex>
1690 <v-flex xs12 sm6> 1696 <v-flex xs12 sm6>
1691 <v-layout> 1697 <v-layout>
1692 <v-flex xs4 class="pt-4 subheading"> 1698 <v-flex xs4 class="pt-4 subheading">
1693 <label 1699 <label
1694 class="right hidden-xs-only hidden-sm-only" 1700 class="right hidden-xs-only hidden-sm-only"
1695 >Academic Year:</label> 1701 >Academic Year:</label>
1696 <label 1702 <label
1697 class="right hidden-lg-only hidden-md-only hidden-xl-only" 1703 class="right hidden-lg-only hidden-md-only hidden-xl-only"
1698 >Year:</label> 1704 >Year:</label>
1699 </v-flex> 1705 </v-flex>
1700 <v-flex xs8 class="ml-3"> 1706 <v-flex xs8 class="ml-3">
1701 <v-text-field 1707 <v-text-field
1702 v-model="addStudents.establishmentYear" 1708 v-model="addStudents.establishmentYear"
1703 placeholder="fill your Academic Year" 1709 placeholder="fill your Academic Year"
1704 name="state" 1710 name="state"
1705 type="number" 1711 type="number"
1706 :rules="establishmentYearRules" 1712 :rules="establishmentYearRules"
1707 required 1713 required
1708 ></v-text-field> 1714 ></v-text-field>
1709 </v-flex> 1715 </v-flex>
1710 </v-layout> 1716 </v-layout>
1711 </v-flex> 1717 </v-flex>
1712 </v-layout> 1718 </v-layout>
1713 <v-layout wrap class="hidden-xs-only hidden-sm-only"> 1719 <v-layout wrap class="hidden-xs-only hidden-sm-only">
1714 <v-flex xs12 sm6> 1720 <v-flex xs12 sm6>
1715 <v-layout> 1721 <v-layout>
1716 <v-flex xs4 sm4 class="pt-4 subheading"> 1722 <v-flex xs4 sm4 class="pt-4 subheading">
1717 <label class="right">Present Address:</label> 1723 <label class="right">Present Address:</label>
1718 </v-flex> 1724 </v-flex>
1719 <v-flex xs8 sm8 class="ml-3"> 1725 <v-flex xs8 sm8 class="ml-3">
1720 <v-text-field 1726 <v-text-field
1721 v-model="addStudents.presentAddress" 1727 v-model="addStudents.presentAddress"
1722 :rules="presentAddress" 1728 :rules="presentAddress"
1723 placeholder="fill Your present Address" 1729 placeholder="fill Your present Address"
1724 @keyup="copyData" 1730 @keyup="copyData"
1725 ></v-text-field> 1731 ></v-text-field>
1726 </v-flex> 1732 </v-flex>
1727 </v-layout> 1733 </v-layout>
1728 </v-flex> 1734 </v-flex>
1729 <v-flex xs12 sm6> 1735 <v-flex xs12 sm6>
1730 <v-layout> 1736 <v-layout>
1731 <v-flex xs4 sm4 class="pt-4 subheading addressForm"> 1737 <v-flex xs4 sm4 class="pt-4 subheading addressForm">
1732 <label class="right">Permanent Address:</label> 1738 <label class="right">Permanent Address:</label>
1733 </v-flex> 1739 </v-flex>
1734 <v-flex xs12 sm8 class="ml-3"> 1740 <v-flex xs12 sm8 class="ml-3">
1735 <v-switch 1741 <v-switch
1736 v-model="addStudents.permanentAddress" 1742 v-model="addStudents.permanentAddress"
1737 label="Select Permanent Address" 1743 label="Select Permanent Address"
1738 :value="addStudents.presentAddress" 1744 :value="addStudents.presentAddress"
1739 ></v-switch> 1745 ></v-switch>
1740 </v-flex> 1746 </v-flex>
1741 </v-layout> 1747 </v-layout>
1742 </v-flex> 1748 </v-flex>
1743 </v-layout> 1749 </v-layout>
1744 <v-layout class="hidden-xs-only hidden-sm-only"> 1750 <v-layout class="hidden-xs-only hidden-sm-only">
1745 <v-flex xs12 sm6> 1751 <v-flex xs12 sm6>
1746 <v-layout> 1752 <v-layout>
1747 <v-flex xs4 sm4 class="pt-4 subheading addressForm"> 1753 <v-flex xs4 sm4 class="pt-4 subheading addressForm">
1748 <label class="right">Permanent Address:</label> 1754 <label class="right">Permanent Address:</label>
1749 </v-flex> 1755 </v-flex>
1750 <v-flex xs12 sm8 class="ml-3"> 1756 <v-flex xs12 sm8 class="ml-3">
1751 <v-text-field 1757 <v-text-field
1752 v-model="addStudents.permanentAddress" 1758 v-model="addStudents.permanentAddress"
1753 :rules="permanentAddress" 1759 :rules="permanentAddress"
1754 placeholder="fill Your Permanent Address" 1760 placeholder="fill Your Permanent Address"
1755 ></v-text-field> 1761 ></v-text-field>
1756 </v-flex> 1762 </v-flex>
1757 </v-layout> 1763 </v-layout>
1758 </v-flex> 1764 </v-flex>
1759 </v-layout> 1765 </v-layout>
1760 <v-layout class="hidden-lg-only hidden-md-only hidden-xl-only" wrap> 1766 <v-layout class="hidden-lg-only hidden-md-only hidden-xl-only" wrap>
1761 <v-flex xs12 sm12> 1767 <v-flex xs12 sm12>
1762 <v-layout> 1768 <v-layout>
1763 <v-flex xs12 sm12 class="pt-4 subheading text-xs-center"> 1769 <v-flex xs12 sm12 class="pt-4 subheading text-xs-center">
1764 <label class>Present Address:</label> 1770 <label class>Present Address:</label>
1765 </v-flex> 1771 </v-flex>
1766 </v-layout> 1772 </v-layout>
1767 <v-layout> 1773 <v-layout>
1768 <v-flex xs12 sm12> 1774 <v-flex xs12 sm12>
1769 <v-textarea 1775 <v-textarea
1770 name="input-4-3" 1776 name="input-4-3"
1771 v-model="addStudents.presentAddress" 1777 v-model="addStudents.presentAddress"
1772 :rules="presentAddress" 1778 :rules="presentAddress"
1773 placeholder="fill Your present Address" 1779 placeholder="fill Your present Address"
1774 required 1780 required
1775 ></v-textarea> 1781 ></v-textarea>
1776 </v-flex> 1782 </v-flex>
1777 </v-layout> 1783 </v-layout>
1778 </v-flex> 1784 </v-flex>
1779 <v-flex xs12 sm12> 1785 <v-flex xs12 sm12>
1780 <v-layout> 1786 <v-layout>
1781 <v-flex 1787 <v-flex
1782 xs12 1788 xs12
1783 sm12 1789 sm12
1784 class="pt-4 pr-4 subheading text-xs-center addressForm" 1790 class="pt-4 pr-4 subheading text-xs-center addressForm"
1785 > 1791 >
1786 <label>Permanent Address:</label> 1792 <label>Permanent Address:</label>
1787 </v-flex> 1793 </v-flex>
1788 </v-layout> 1794 </v-layout>
1789 <v-layout> 1795 <v-layout>
1790 <v-flex xs12 sm12> 1796 <v-flex xs12 sm12>
1791 <v-textarea 1797 <v-textarea
1792 name="input-4-3" 1798 name="input-4-3"
1793 v-model="addStudents.permanentAddress" 1799 v-model="addStudents.permanentAddress"
1794 :rules="permanentAddress" 1800 :rules="permanentAddress"
1795 placeholder="fill Your Permanent Address" 1801 placeholder="fill Your Permanent Address"
1796 required 1802 required
1797 ></v-textarea> 1803 ></v-textarea>
1798 </v-flex> 1804 </v-flex>
1799 </v-layout> 1805 </v-layout>
1800 </v-flex> 1806 </v-flex>
1801 </v-layout> 1807 </v-layout>
1802 <v-layout> 1808 <v-layout>
1803 <v-flex xs12 sm11 offset-sm1> 1809 <v-flex xs12 sm11 offset-sm1>
1804 <v-layout> 1810 <v-layout>
1805 <v-flex xs6> 1811 <v-flex xs6>
1806 <v-btn round dark @click="e2 = 1">Back</v-btn> 1812 <v-btn round dark @click="e2 = 1">Back</v-btn>
1807 </v-flex> 1813 </v-flex>
1808 <v-flex xs6> 1814 <v-flex xs6>
1809 <v-btn 1815 <v-btn
1810 @click="submit" 1816 @click="submit"
1811 round 1817 round
1812 dark 1818 dark
1813 :loading="loading" 1819 :loading="loading"
1814 class="right" 1820 class="right"
1815 >Add</v-btn> 1821 >Add</v-btn>
1816 </v-flex> 1822 </v-flex>
1817 </v-layout> 1823 </v-layout>
1818 </v-flex> 1824 </v-flex>
1819 </v-layout> 1825 </v-layout>
1820 </v-form> 1826 </v-form>
1821 </v-flex> 1827 </v-flex>
1822 </v-stepper-content> 1828 </v-stepper-content>
1823 </v-stepper-items> 1829 </v-stepper-items>
1824 </v-stepper> 1830 </v-stepper>
1825 </v-app> 1831 </v-app>
1826 </div> 1832 </div>
1827 </v-flex> 1833 </v-flex>
1828 </v-layout> 1834 </v-layout>
1829 </v-container> 1835 </v-container>
1830 </v-tab-item> 1836 </v-tab-item>
1831 </v-tabs> 1837 </v-tabs>
1832 <div class="loader" v-if="showLoader"> 1838 <div class="loader" v-if="showLoader">
1833 <v-progress-circular indeterminate color="white"></v-progress-circular> 1839 <v-progress-circular indeterminate color="white"></v-progress-circular>
1834 </div> 1840 </div>
1835 </div> 1841 </div>
1836 </template> 1842 </template>
1837 1843
1838 <script> 1844 <script>
1839 import http from "@/Services/http.js"; 1845 import http from "@/Services/http.js";
1840 import moment from "moment"; 1846 import moment from "moment";
1841 import countryList from "@/script/country.js"; 1847 import countryList from "@/script/country.js";
1842 import parent from "@/script/parents.js"; 1848 import parent from "@/script/parents.js";
1843 1849
1844 export default { 1850 export default {
1845 data: () => ({ 1851 data: () => ({
1846 e2: 0, 1852 e2: 0,
1847 showParent: true, 1853 showParent: true,
1848 showNext: false, 1854 showNext: false,
1849 snackbar: false, 1855 snackbar: false,
1850 y: "top", 1856 y: "top",
1851 x: "right", 1857 x: "right",
1852 mode: "", 1858 mode: "",
1853 timeout: 3000, 1859 timeout: 3000,
1854 text: "", 1860 text: "",
1855 showLoader: false, 1861 showLoader: false,
1856 loading: false, 1862 loading: false,
1857 editLoading: false, 1863 editLoading: false,
1858 date: null, 1864 date: null,
1859 search: "", 1865 search: "",
1860 menu: false, 1866 menu: false,
1861 menu1: false, 1867 menu1: false,
1862 dialog: false, 1868 dialog: false,
1863 dialog1: false, 1869 dialog1: false,
1864 valid: true, 1870 valid: true,
1865 isActive: true, 1871 isActive: true,
1866 newActive: false, 1872 newActive: false,
1867 addclass: [], 1873 addclass: [],
1868 addSection: [], 1874 addSection: [],
1869 gender: ["Male", "Female"], 1875 gender: ["Male", "Female"],
1870 pagination: { 1876 pagination: {
1871 rowsPerPage: 15 1877 rowsPerPage: 15
1872 }, 1878 },
1873 imageData: {}, 1879 imageData: {},
1874 imageName: "", 1880 imageName: "",
1875 imageUrl: "", 1881 imageUrl: "",
1876 imageFile: "", 1882 imageFile: "",
1877 editImageName: "", 1883 editImageName: "",
1878 editImageUrl: "", 1884 editImageUrl: "",
1879 nameRules: [v => !!v || " Full Name is required"], 1885 nameRules: [v => !!v || " Full Name is required"],
1880 dateRules: [v => !!v || " DOB is required"], 1886 dateRules: [v => !!v || " DOB is required"],
1881 cityRules: [v => !!v || " City Name is required"], 1887 cityRules: [v => !!v || " City Name is required"],
1882 pincode: [v => !!v || " Pincode is required"], 1888 pincode: [v => !!v || " Pincode is required"],
1883 country: [v => !!v || " Country Name is required"], 1889 country: [v => !!v || " Country Name is required"],
1884 permanentAddress: [v => !!v || " Permanent Address is required"], 1890 permanentAddress: [v => !!v || " Permanent Address is required"],
1885 presentAddress: [v => !!v || " Present Address is required"], 1891 presentAddress: [v => !!v || " Present Address is required"],
1886 stateRules: [v => !!v || "State Name is required"], 1892 stateRules: [v => !!v || "State Name is required"],
1887 classRules: [v => !!v || " Class Name is required"], 1893 classRules: [v => !!v || " Class Name is required"],
1888 sectionRules: [v => !!v || " Section Name is required"], 1894 sectionRules: [v => !!v || " Section Name is required"],
1889 genderRules: [v => !!v || " Select Gender is required"], 1895 genderRules: [v => !!v || " Select Gender is required"],
1890 fatheCellNoRules: [ 1896 fatheCellNoRules: [
1891 v => !!v || " father Cell Number is required", 1897 v => !!v || " father Cell Number is required",
1892 v => v <= 10000000000 || "Max 10 characters is required" 1898 v => v <= 10000000000 || "Max 10 characters is required"
1893 ], 1899 ],
1894 mobileNoRule: [v => !!v || " Mobile Number is required"], 1900 mobileNoRule: [v => !!v || " Mobile Number is required"],
1895 establishmentYearRules: [v => !!v || " Academic Year is required"], 1901 establishmentYearRules: [v => !!v || " Academic Year is required"],
1896 errorMessages: "", 1902 errorMessages: "",
1897 countries: [], 1903 countries: [],
1898 headers: [ 1904 headers: [
1899 { 1905 {
1900 text: "Roll No.", 1906 text: "Roll No.",
1901 align: "center", 1907 align: "center",
1902 sortable: false, 1908 sortable: false,
1903 value: "rollNo" 1909 value: "rollNo"
1904 }, 1910 },
1905 { 1911 {
1906 text: "Profile Pic", 1912 text: "Profile Pic",
1907 value: "profilePicUrl", 1913 value: "profilePicUrl",
1908 sortable: false, 1914 sortable: false,
1909 align: "center" 1915 align: "center"
1910 }, 1916 },
1911 { text: "Name", value: "name", sortable: false, align: "center" }, 1917 { text: "Name", value: "name", sortable: false, align: "center" },
1912 { text: "Email", value: "email", sortable: false, align: "center" }, 1918 { text: "Email", value: "email", sortable: false, align: "center" },
1913 { text: "Dob", value: "dob", sortable: false, align: "center" }, 1919 { text: "Dob", value: "dob", sortable: false, align: "center" },
1914 { text: "Gender", value: "gender", sortable: false, align: "center" }, 1920 { text: "Gender", value: "gender", sortable: false, align: "center" },
1915 { 1921 {
1916 text: "Father Name", 1922 text: "Father Name",
1917 value: "fatherName", 1923 value: "fatherName",
1918 sortable: false, 1924 sortable: false,
1919 align: "center" 1925 align: "center"
1920 }, 1926 },
1921 { 1927 {
1922 text: "Mother Name", 1928 text: "Mother Name",
1923 value: "motherName", 1929 value: "motherName",
1924 sortable: false, 1930 sortable: false,
1925 align: "center" 1931 align: "center"
1926 }, 1932 },
1927 { 1933 {
1928 text: "Academic Year", 1934 text: "Academic Year",
1929 value: "establishmentYear", 1935 value: "establishmentYear",
1930 sortable: false, 1936 sortable: false,
1931 align: "center" 1937 align: "center"
1932 }, 1938 },
1933 { text: "Mobile No", value: "mobile", sortable: false, align: "center" }, 1939 { text: "Mobile No", value: "mobile", sortable: false, align: "center" },
1940 {
1941 text: "Status",
1942 value: "status",
1943 sortable: false,
1944 align: "center"
1945 },
1934 { text: "Action", value: "", sortable: false, align: "center" } 1946 { text: "Action", value: "", sortable: false, align: "center" }
1935 ], 1947 ],
1936 desserts: [], 1948 desserts: [],
1937 parentId: "", 1949 parentId: "",
1938 editedIndex: -1, 1950 editedIndex: -1,
1939 parentData: {}, 1951 parentData: {},
1940 addStudents: { 1952 addStudents: {
1941 role: "STUDENT", 1953 role: "STUDENT",
1942 name: "", 1954 name: "",
1943 email: "", 1955 email: "",
1944 date: "", 1956 date: "",
1945 city: "", 1957 city: "",
1946 pincode: "", 1958 pincode: "",
1947 country: "", 1959 country: "",
1948 permanentAddress: "", 1960 permanentAddress: "",
1949 presentAddress: "", 1961 presentAddress: "",
1950 mobile: "", 1962 mobile: "",
1951 state: "", 1963 state: "",
1952 gender: "", 1964 gender: "",
1953 select: "", 1965 select: "",
1954 selectSection: "", 1966 selectSection: "",
1955 bloodGroup: "", 1967 bloodGroup: "",
1956 allergies: "", 1968 allergies: "",
1957 medicalNotes: "", 1969 medicalNotes: "",
1958 height: "", 1970 height: "",
1959 weight: "", 1971 weight: "",
1960 rollNo: "", 1972 rollNo: "",
1961 establishmentYear: new Date().getFullYear() 1973 establishmentYear: new Date().getFullYear()
1962 }, 1974 },
1963 selectStudents: { 1975 selectStudents: {
1964 select: "", 1976 select: "",
1965 selectSection: "" 1977 selectSection: ""
1966 }, 1978 },
1967 editedItem: { 1979 editedItem: {
1968 role: "STUDENT", 1980 role: "STUDENT",
1969 name: "", 1981 name: "",
1970 email: "", 1982 email: "",
1971 dob: "", 1983 dob: "",
1972 city: "", 1984 city: "",
1973 pincode: "", 1985 pincode: "",
1974 country: "", 1986 country: "",
1975 permanentAddress: "", 1987 permanentAddress: "",
1976 presentAddress: "", 1988 presentAddress: "",
1977 mobile: "", 1989 mobile: "",
1978 state: "", 1990 state: "",
1979 gender: "", 1991 gender: "",
1980 select: "", 1992 select: "",
1981 selectSection: "", 1993 selectSection: "",
1982 bloodGroup: "", 1994 bloodGroup: "",
1983 allergies: "", 1995 allergies: "",
1984 medicalNotes: "", 1996 medicalNotes: "",
1985 height: "", 1997 height: "",
1986 weight: "", 1998 weight: "",
1987 rollNo: "", 1999 rollNo: "",
1988 establishmentYear: new Date().getFullYear() 2000 establishmentYear: new Date().getFullYear()
1989 } 2001 }
1990 }), 2002 }),
1991 watch: { 2003 watch: {
1992 menu(val) { 2004 menu(val) {
1993 val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); 2005 val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR"));
1994 }, 2006 },
1995 menu1(val) { 2007 menu1(val) {
1996 val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); 2008 val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR"));
1997 } 2009 }
1998 }, 2010 },
1999 methods: { 2011 methods: {
2000 findStudents() { 2012 findStudents() {
2001 this.showLoader = true; 2013 this.showLoader = true;
2002 http() 2014 http()
2003 .get("/getStudentWithClass", { 2015 .get("/getStudentWithClass", {
2004 params: { 2016 params: {
2005 classId: this.selectStudents.select, 2017 classId: this.selectStudents.select,
2006 sectionId: this.selectStudents.selectSection 2018 sectionId: this.selectStudents.selectSection
2007 } 2019 }
2008 }) 2020 })
2009 .then(response => { 2021 .then(response => {
2010 this.desserts = response.data.data; 2022 this.desserts = response.data.data;
2011 this.showLoader = false; 2023 this.showLoader = false;
2012 }) 2024 })
2013 .catch(err => { 2025 .catch(err => {
2014 console.log("err====>", err); 2026 console.log("err====>", err);
2015 this.showLoader = false; 2027 this.showLoader = false;
2016 }); 2028 });
2017 }, 2029 },
2018 getSections(_id) { 2030 getSections(_id) {
2019 var token = this.$store.state.token; 2031 var token = this.$store.state.token;
2020 this.showLoader = true; 2032 this.showLoader = true;
2021 http() 2033 http()
2022 .get( 2034 .get(
2023 "/getSectionsList", 2035 "/getSectionsList",
2024 { params: { classId: _id } }, 2036 { params: { classId: _id } },
2025 { 2037 {
2026 headers: { Authorization: "Bearer " + token } 2038 headers: { Authorization: "Bearer " + token }
2027 } 2039 }
2028 ) 2040 )
2029 .then(response => { 2041 .then(response => {
2030 this.addSection = response.data.data; 2042 this.addSection = response.data.data;
2031 this.showLoader = false; 2043 this.showLoader = false;
2032 }) 2044 })
2033 .catch(err => { 2045 .catch(err => {
2034 this.showLoader = false; 2046 this.showLoader = false;
2035 // console.log("err====>", err); 2047 // console.log("err====>", err);
2036 // this.$router.replace({ path: '/' }); 2048 // this.$router.replace({ path: '/' });
2037 }); 2049 });
2038 }, 2050 },
2039 getSection(_id) { 2051 getSection(_id) {
2040 var token = this.$store.state.token; 2052 var token = this.$store.state.token;
2041 this.showLoader = true; 2053 this.showLoader = true;
2042 http() 2054 http()
2043 .get( 2055 .get(
2044 "/getSectionsList", 2056 "/getSectionsList",
2045 { params: { classId: _id } }, 2057 { params: { classId: _id } },
2046 { 2058 {
2047 headers: { Authorization: "Bearer " + token } 2059 headers: { Authorization: "Bearer " + token }
2048 } 2060 }
2049 ) 2061 )
2050 .then(response => { 2062 .then(response => {
2051 this.addSection = response.data.data; 2063 this.addSection = response.data.data;
2052 this.showLoader = false; 2064 this.showLoader = false;
2053 // console.log("getSectionsList=====>", this.addSection); 2065 // console.log("getSectionsList=====>", this.addSection);
2054 }) 2066 })
2055 .catch(err => { 2067 .catch(err => {
2056 this.showLoader = false; 2068 this.showLoader = false;
2057 // console.log("err====>", err); 2069 // console.log("err====>", err);
2058 // this.$router.replace({ path: '/' }); 2070 // this.$router.replace({ path: '/' });
2059 }); 2071 });
2060 }, 2072 },
2061 pickFile() { 2073 pickFile() {
2062 this.$refs.image.click(); 2074 this.$refs.image.click();
2063 }, 2075 },
2064 pickEditFile() { 2076 pickEditFile() {
2065 this.$refs.editDataImage.click(); 2077 this.$refs.editDataImage.click();
2066 }, 2078 },
2067 dates: function(date) { 2079 dates: function(date) {
2068 return moment(date).format("MMMM DD, YYYY"); 2080 return moment(date).format("MMMM DD, YYYY");
2069 }, 2081 },
2070 onFilePicked(e) { 2082 onFilePicked(e) {
2071 // console.log(e) 2083 // console.log(e)
2072 const files = e.target.files; 2084 const files = e.target.files;
2073 this.imageData.upload = e.target.files[0]; 2085 this.imageData.upload = e.target.files[0];
2074 if (files[0] !== undefined) { 2086 if (files[0] !== undefined) {
2075 this.imageName = files[0].name; 2087 this.imageName = files[0].name;
2076 if (this.imageName.lastIndexOf(".") <= 0) { 2088 if (this.imageName.lastIndexOf(".") <= 0) {
2077 return; 2089 return;
2078 } 2090 }
2079 const fr = new FileReader(); 2091 const fr = new FileReader();
2080 fr.readAsDataURL(files[0]); 2092 fr.readAsDataURL(files[0]);
2081 fr.addEventListener("load", () => { 2093 fr.addEventListener("load", () => {
2082 this.imageUrl = fr.result; 2094 this.imageUrl = fr.result;
2083 this.imageFile = files[0]; // this is an image file that can be sent to server... 2095 this.imageFile = files[0]; // this is an image file that can be sent to server...
2084 this.imageData.imageUrl = URL.createObjectURL(this.imageFile); 2096 this.imageData.imageUrl = URL.createObjectURL(this.imageFile);
2085 }); 2097 });
2086 } else { 2098 } else {
2087 this.imageName = ""; 2099 this.imageName = "";
2088 this.imageFile = ""; 2100 this.imageFile = "";
2089 this.imageUrl = ""; 2101 this.imageUrl = "";
2090 } 2102 }
2091 }, 2103 },
2092 onEditFilePicked(e) { 2104 onEditFilePicked(e) {
2093 console.log(e); 2105 console.log(e);
2094 const files = e.target.files; 2106 const files = e.target.files;
2095 if (files[0] !== undefined) { 2107 if (files[0] !== undefined) {
2096 this.editImageName = files[0].name; 2108 this.editImageName = files[0].name;
2097 console.log("this.editImageName", this.editImageName); 2109 console.log("this.editImageName", this.editImageName);
2098 2110
2099 if (this.editImageName.lastIndexOf(".") <= 0) { 2111 if (this.editImageName.lastIndexOf(".") <= 0) {
2100 return; 2112 return;
2101 } 2113 }
2102 const fr = new FileReader(); 2114 const fr = new FileReader();
2103 fr.readAsDataURL(files[0]); 2115 fr.readAsDataURL(files[0]);
2104 fr.addEventListener("load", () => { 2116 fr.addEventListener("load", () => {
2105 this.editImageUrl = fr.result; 2117 this.editImageUrl = fr.result;
2106 this.editiImageFile = files[0]; // this is an image file that can be sent to server... 2118 this.editiImageFile = files[0]; // this is an image file that can be sent to server...
2107 }); 2119 });
2108 } else { 2120 } else {
2109 this.editImageName = ""; 2121 this.editImageName = "";
2110 this.editiImageFile = ""; 2122 this.editiImageFile = "";
2111 } 2123 }
2112 }, 2124 },
2113 editItem(item) { 2125 editItem(item) {
2114 this.editedIndex = this.desserts.indexOf(item); 2126 this.editedIndex = this.desserts.indexOf(item);
2115 this.editedItem = Object.assign({}, item); 2127 this.editedItem = Object.assign({}, item);
2116 this.editedItem.fatherName = item.parentId.fatherName; 2128 this.editedItem.fatherName = item.parentId.fatherName;
2117 this.editedItem.fatherCellNo = item.parentId.fatherCellNo; 2129 this.editedItem.fatherCellNo = item.parentId.fatherCellNo;
2118 this.editedItem.motherName = item.parentId.motherName; 2130 this.editedItem.motherName = item.parentId.motherName;
2119 this.editedItem.motherCellNo = item.parentId.motherCellNo; 2131 this.editedItem.motherCellNo = item.parentId.motherCellNo;
2120 this.editedItem.dob = 2132 this.editedItem.dob =
2121 this.editedItem.dob != undefined 2133 this.editedItem.dob != undefined
2122 ? (this.editedItem.dob = this.editedItem.dob.substring(0, 10)) 2134 ? (this.editedItem.dob = this.editedItem.dob.substring(0, 10))
2123 : (this.editedItem.dob = ""); 2135 : (this.editedItem.dob = "");
2124 this.dialog = true; 2136 this.dialog = true;
2125 }, 2137 },
2126 profile(item) { 2138 profile(item) {
2127 // console.log("item", item); 2139 // console.log("item", item);
2128 this.editedIndex = this.desserts.indexOf(item); 2140 this.editedIndex = this.desserts.indexOf(item);
2129 this.editedItem = Object.assign({}, item); 2141 this.editedItem = Object.assign({}, item);
2130 this.editedItem.fatherName = item.parentId.fatherName; 2142 this.editedItem.fatherName = item.parentId.fatherName;
2131 this.editedItem.fatherCellNo = item.parentId.fatherCellNo; 2143 this.editedItem.fatherCellNo = item.parentId.fatherCellNo;
2132 this.editedItem.motherName = item.parentId.motherName; 2144 this.editedItem.motherName = item.parentId.motherName;
2133 this.editedItem.motherCellNo = item.parentId.motherCellNo; 2145 this.editedItem.motherCellNo = item.parentId.motherCellNo;
2134 2146
2135 this.dialog1 = true; 2147 this.dialog1 = true;
2136 }, 2148 },
2137 deleteItem(item) { 2149 deleteItem(item) {
2138 let deleteStudent = { 2150 let deleteStudent = {
2139 studentId: item._id 2151 studentId: item._id
2140 }; 2152 };
2141 http() 2153 http()
2142 .delete( 2154 .delete(
2143 "/deleteStudent", 2155 "/deleteStudent",
2144 confirm("Are you sure you want to delete this?") && { 2156 confirm("Are you sure you want to delete this?") && {
2145 params: deleteStudent 2157 params: deleteStudent
2146 } 2158 }
2147 ) 2159 )
2148 .then(response => { 2160 .then(response => {
2149 // console.log("deleteUers",deleteStudent) 2161 // console.log("deleteUers",deleteStudent)
2150 this.snackbar = true; 2162 this.snackbar = true;
2151 this.text = "Successfully delete Existing Student"; 2163 this.text = "Successfully delete Existing Student";
2152 this.findStudents(); 2164 this.findStudents();
2153 }) 2165 })
2154 .catch(error => { 2166 .catch(error => {
2155 // console.log(error); 2167 // console.log(error);
2156 }); 2168 });
2157 }, 2169 },
2158 activeTab(type) { 2170 activeTab(type) {
2159 switch (type) { 2171 switch (type) {
2160 case "existing": 2172 case "existing":
2161 this.newActive = false; 2173 this.newActive = false;
2162 this.isActive = true; 2174 this.isActive = true;
2163 break; 2175 break;
2164 2176
2165 default: 2177 default:
2166 this.newActive = true; 2178 this.newActive = true;
2167 this.isActive = false; 2179 this.isActive = false;
2168 break; 2180 break;
2169 } 2181 }
2170 }, 2182 },
2171 close() { 2183 close() {
2172 this.dialog = false; 2184 this.dialog = false;
2173 setTimeout(() => { 2185 setTimeout(() => {
2174 this.editedItem = Object.assign({}, this.defaultItem); 2186 this.editedItem = Object.assign({}, this.defaultItem);
2175 this.editedIndex = -1; 2187 this.editedIndex = -1;
2176 }, 300); 2188 }, 300);
2177 }, 2189 },
2178 close1() { 2190 close1() {
2179 this.dialog1 = false; 2191 this.dialog1 = false;
2180 }, 2192 },
2181 copyData() { 2193 copyData() {
2182 this.addStudents.permanentAddress = this.addStudents.presentAddress; 2194 this.addStudents.permanentAddress = this.addStudents.presentAddress;
2183 }, 2195 },
2184 submit() { 2196 submit() {
2185 if (this.$refs.form.validate()) { 2197 if (this.$refs.form.validate()) {
2186 let addStudent = { 2198 let addStudent = {
2187 parentId: this.parentId, 2199 parentId: this.parentId,
2188 name: this.addStudents.name, 2200 name: this.addStudents.name,
2189 email: this.addStudents.email, 2201 email: this.addStudents.email,
2190 role: this.addStudents.role, 2202 role: this.addStudents.role,
2191 dob: this.addStudents.date, 2203 dob: this.addStudents.date,
2192 city: this.addStudents.city, 2204 city: this.addStudents.city,
2193 pincode: this.addStudents.pincode, 2205 pincode: this.addStudents.pincode,
2194 country: this.addStudents.country, 2206 country: this.addStudents.country,
2195 permanentAddress: this.addStudents.permanentAddress, 2207 permanentAddress: this.addStudents.permanentAddress,
2196 presentAddress: this.addStudents.presentAddress, 2208 presentAddress: this.addStudents.presentAddress,
2197 mobile: this.addStudents.mobile, 2209 mobile: this.addStudents.mobile,
2198 state: this.addStudents.state, 2210 state: this.addStudents.state,
2199 gender: this.addStudents.gender, 2211 gender: this.addStudents.gender,
2200 establishmentYear: this.addStudents.establishmentYear, 2212 establishmentYear: this.addStudents.establishmentYear,
2201 classId: this.addStudents.select, 2213 classId: this.addStudents.select,
2202 sectionId: this.addStudents.selectSection, 2214 sectionId: this.addStudents.selectSection,
2203 bloodGroup: this.addStudents.bloodGroup, 2215 bloodGroup: this.addStudents.bloodGroup,
2204 medicalNotes: this.addStudents.medicalNotes, 2216 medicalNotes: this.addStudents.medicalNotes,
2205 height: this.addStudents.height, 2217 height: this.addStudents.height,
2206 weight: this.addStudents.weight, 2218 weight: this.addStudents.weight,
2207 rollNo: this.addStudents.rollNo 2219 rollNo: this.addStudents.rollNo
2208 }; 2220 };
2209 if (this.imageUrl) { 2221 if (this.imageUrl) {
2210 var str = this.imageUrl; 2222 var str = this.imageUrl;
2211 const [baseUrl, imageUrl] = str.split(/,/); 2223 const [baseUrl, imageUrl] = str.split(/,/);
2212 addStudent.upload = imageUrl; 2224 addStudent.upload = imageUrl;
2213 } 2225 }
2214 this.loading = true; 2226 this.loading = true;
2215 http() 2227 http()
2216 .post("/createStudent", addStudent) 2228 .post("/createStudent", addStudent)
2217 .then(response => { 2229 .then(response => {
2218 // console.log(addStudent); 2230 // console.log(addStudent);
2219 this.snackbar = true; 2231 this.snackbar = true;
2220 this.text = "New Student added successfully"; 2232 this.text = "New Student added successfully";
2221 // this.getStudentList(); 2233 // this.getStudentList();
2222 this.clear(); 2234 this.clear();
2223 this.clearParents(); 2235 this.clearParents();
2224 this.loading = false; 2236 this.loading = false;
2225 }) 2237 })
2226 .catch(error => { 2238 .catch(error => {
2227 // console.log(error); 2239 // console.log(error);
2228 this.snackbar = true; 2240 this.snackbar = true;
2229 this.text = error.response.data.message; 2241 this.text = error.response.data.message;
2230 this.loading = false; 2242 this.loading = false;
2231 }); 2243 });
2232 } 2244 }
2233 }, 2245 },
2234 clear() { 2246 clear() {
2235 this.$refs.form.reset(); 2247 this.$refs.form.reset();
2236 this.imageUrl = ""; 2248 this.imageUrl = "";
2237 }, 2249 },
2238 clearParents() { 2250 clearParents() {
2239 this.$refs.parentForm.reset(); 2251 this.$refs.parentForm.reset();
2240 }, 2252 },
2241 save() { 2253 save() {
2242 let editStudent = { 2254 let editStudent = {
2243 studentId: this.editedItem._id, 2255 studentId: this.editedItem._id,
2244 name: this.editedItem.name, 2256 name: this.editedItem.name,
2245 email: this.editedItem.email, 2257 email: this.editedItem.email,
2246 role: this.editedItem.role, 2258 role: this.editedItem.role,
2247 dob: this.editedItem.dob, 2259 dob: this.editedItem.dob,
2248 city: this.editedItem.city, 2260 city: this.editedItem.city,
2249 pincode: this.editedItem.pincode, 2261 pincode: this.editedItem.pincode,
2250 country: this.editedItem.country, 2262 country: this.editedItem.country,
2251 permanentAddress: this.editedItem.permanentAddress, 2263 permanentAddress: this.editedItem.permanentAddress,
2252 presentAddress: this.editedItem.presentAddress, 2264 presentAddress: this.editedItem.presentAddress,
2253 mobile: this.editedItem.mobile, 2265 mobile: this.editedItem.mobile,
2254 state: this.editedItem.state, 2266 state: this.editedItem.state,
2255 gender: this.editedItem.gender, 2267 gender: this.editedItem.gender,
2256 establishmentYear: this.editedItem.establishmentYear, 2268 establishmentYear: this.editedItem.establishmentYear,
2257 classId: this.editedItem.select, 2269 classId: this.editedItem.select,
2258 sectionId: this.editedItem.selectSection, 2270 sectionId: this.editedItem.selectSection,
2259 bloodGroup: this.editedItem.bloodGroup, 2271 bloodGroup: this.editedItem.bloodGroup,
2260 medicalNotes: this.editedItem.medicalNotes, 2272 medicalNotes: this.editedItem.medicalNotes,
2261 height: this.editedItem.height, 2273 height: this.editedItem.height,
2262 weight: this.editedItem.weight, 2274 weight: this.editedItem.weight,
2263 rollNo: this.editedItem.rollNo 2275 rollNo: this.editedItem.rollNo
2264 }; 2276 };
2265 if (this.editImageUrl) { 2277 if (this.editImageUrl) {
2266 var str = this.editImageUrl; 2278 var str = this.editImageUrl;
2267 const [baseUrl, editImageUrl] = str.split(/,/); 2279 const [baseUrl, editImageUrl] = str.split(/,/);
2268 editStudent.upload = editImageUrl; 2280 editStudent.upload = editImageUrl;
2269 } 2281 }
2270 this.editLoading = true; 2282 this.editLoading = true;
2271 http() 2283 http()
2272 .put("/updateStudent", editStudent) 2284 .put("/updateStudent", editStudent)
2273 .then(response => { 2285 .then(response => {
2274 this.snackbar = true; 2286 this.snackbar = true;
2275 this.text = response.data.message; 2287 this.text = response.data.message;
2276 this.imageUrl = ""; 2288 this.imageUrl = "";
2277 this.findStudents(); 2289 this.findStudents();
2278 this.close(); 2290 this.close();
2279 this.editLoading = false; 2291 this.editLoading = false;
2280 }) 2292 })
2281 .catch(error => { 2293 .catch(error => {
2282 // console.log(error); 2294 // console.log(error);
2283 this.snackbar = true; 2295 this.snackbar = true;
2284 this.text = error.response.data.statusText; 2296 this.text = error.response.data.statusText;
2285 this.editLoading = false; 2297 this.editLoading = false;
2286 }); 2298 });
2287 }, 2299 },
2288 submitParentDetails() { 2300 submitParentDetails() {
2289 if (this.$refs.parentForm.validate()) { 2301 if (this.$refs.parentForm.validate()) {
2290 this.parentData.fatherCellNo = this.parentData.fatherCellNo; 2302 this.parentData.fatherCellNo = this.parentData.fatherCellNo;
2291 this.parentData.motherCellNo = this.parentData.motherCellNo; 2303 this.parentData.motherCellNo = this.parentData.motherCellNo;
2292 let addparentDetails = { 2304 let addparentDetails = {
2293 email: this.parentData.email, 2305 email: this.parentData.email,
2294 fatherName: this.parentData.fatherName, 2306 fatherName: this.parentData.fatherName,
2295 fatherCellNo: this.parentData.fatherCellNo, 2307 fatherCellNo: this.parentData.fatherCellNo,
2296 motherName: this.parentData.motherName, 2308 motherName: this.parentData.motherName,
2297 motherCellNo: this.parentData.motherCellNo, 2309 motherCellNo: this.parentData.motherCellNo,
2298 fatherProfession: this.parentData.fatherProfession, 2310 fatherProfession: this.parentData.fatherProfession,
2299 motherProfession: this.parentData.motherProfession, 2311 motherProfession: this.parentData.motherProfession,
2300 role: "PARENT" 2312 role: "PARENT"
2301 }; 2313 };
2302 this.loading = true; 2314 this.loading = true;
2303 http() 2315 http()
2304 .post("/createParent", addparentDetails) 2316 .post("/createParent", addparentDetails)
2305 .then(response => { 2317 .then(response => {
2306 this.parentId = response.data.data.id; 2318 this.parentId = response.data.data.id;
2307 this.e2 = 2; 2319 this.e2 = 2;
2308 this.snackbar = true; 2320 this.snackbar = true;
2309 this.text = "successfully"; 2321 this.text = "successfully";
2310 // this.getStudentList(); 2322 // this.getStudentList();
2311 this.clear(); 2323 this.clear();
2312 this.loading = false; 2324 this.loading = false;
2313 }) 2325 })
2314 .catch(error => { 2326 .catch(error => {
2315 this.snackbar = true; 2327 this.snackbar = true;
2316 this.text = error.response.data.message; 2328 this.text = error.response.data.message;
2317 this.text = error.response.data.statusText; 2329 this.text = error.response.data.statusText;
2318 this.loading = false; 2330 this.loading = false;
2319 }); 2331 });
2320 } 2332 }
2321 }, 2333 },
2322 getParentDetails() { 2334 getParentDetails() {
2323 if (this.parentData.fatherCellNo.length > 9) { 2335 if (this.parentData.fatherCellNo.length > 9) {
2324 this.showLoader = true; 2336 this.showLoader = true;
2325 http() 2337 http()
2326 .get("getParticularParent", { 2338 .get("getParticularParent", {
2327 params: { fatherCellNo: this.parentData.fatherCellNo }, 2339 params: { fatherCellNo: this.parentData.fatherCellNo },
2328 headers: { 2340 headers: {
2329 Authorization: "Bearer " + this.$store.state.token 2341 Authorization: "Bearer " + this.$store.state.token
2330 } 2342 }
2331 }) 2343 })
2332 .then(response => { 2344 .then(response => {
2333 this.showNext = true; 2345 this.showNext = true;
2334 this.showParent = false; 2346 this.showParent = false;
2335 this.parentData = response.data.data; 2347 this.parentData = response.data.data;
2336 this.parentId = response.data.data._id; 2348 this.parentId = response.data.data._id;
2337 this.showLoader = false; 2349 this.showLoader = false;
2338 }) 2350 })
2339 .catch(error => { 2351 .catch(error => {
2340 console.log("err====>", error.response.data.message); 2352 console.log("err====>", error.response.data.message);
2341 this.text = error.response.data.message; 2353 this.text = error.response.data.message;
2342 this.snackbar = true; 2354 this.snackbar = true;
2343 if (this.text === "Data not found!") { 2355 if (this.text === "Data not found!") {
2344 this.showNext = false; 2356 this.showNext = false;
2345 this.showParent = true; 2357 this.showParent = true;
2346 this.parentData.email = ""; 2358 this.parentData.email = "";
2347 this.parentData.fatherName = ""; 2359 this.parentData.fatherName = "";
2348 this.parentData.motherName = ""; 2360 this.parentData.motherName = "";
2349 this.parentData.motherCellNo = ""; 2361 this.parentData.motherCellNo = "";
2350 this.parentData.fatherProfession = ""; 2362 this.parentData.fatherProfession = "";
2351 this.parentData.motherProfession = ""; 2363 this.parentData.motherProfession = "";
2352 } 2364 }
2353 this.showLoader = false; 2365 this.showLoader = false;
2354 }); 2366 });
2355 } 2367 }
2368 },
2369 suspendStudentStatus(status, id) {
2370 let suspendStudentData = {
2371 studentId: id,
2372 status: status
2373 };
2374 http()
2375 .put("/suspendStudentAccount", suspendStudentData)
2376 .then(response => {
2377 this.findStudents()();
2378 this.text = response.data.message;
2379 this.snackbar = true;
2380 })
2381 .catch(error => {
2382 // console.log(error.response.data.data);
2383 this.text = error.response.data.message;
2384 });
2356 } 2385 }
2357 }, 2386 },
2358 mounted() { 2387 mounted() {
2359 const getCountryList = countryList(); 2388 const getCountryList = countryList();
2360 this.countries = getCountryList; 2389 this.countries = getCountryList;
2361 var token = this.$store.state.token; 2390 var token = this.$store.state.token;
2362 http() 2391 http()
2363 .get("/getClassesList", { 2392 .get("/getClassesList", {
2364 headers: { Authorization: "Bearer " + token } 2393 headers: { Authorization: "Bearer " + token }
2365 }) 2394 })
2366 .then(response => { 2395 .then(response => {
2367 this.addclass = response.data.data; 2396 this.addclass = response.data.data;
2368 }) 2397 })
2369 .catch(error => { 2398 .catch(error => {
2370 this.showLoader = false; 2399 this.showLoader = false;
2371 if (error.response.status === 401) { 2400 if (error.response.status === 401) {
2372 this.$router.replace({ path: "/" }); 2401 this.$router.replace({ path: "/" });
2373 this.$store.dispatch("setToken", null); 2402 this.$store.dispatch("setToken", null);
2374 this.$store.dispatch("Id", null); 2403 this.$store.dispatch("Id", null);
2375 this.$store.dispatch("Role", null); 2404 this.$store.dispatch("Role", null);
2376 } 2405 }
2377 }); 2406 });
2378 }, 2407 },
2379 created() { 2408 created() {
2380 this.$root.$on("app:search", search => { 2409 this.$root.$on("app:search", search => {
2381 this.search = search; 2410 this.search = search;
2382 }); 2411 });
2383 }, 2412 },
2384 beforeDestroy() { 2413 beforeDestroy() {
2385 // dont forget to remove the listener 2414 // dont forget to remove the listener
2386 this.$root.$off("app:search"); 2415 this.$root.$off("app:search");
2387 } 2416 }
2388 }; 2417 };
2389 </script> 2418 </script>
2390 <style scoped> 2419 <style scoped>
2391 .active { 2420 .active {
2392 background-color: gray; 2421 background-color: gray;
2393 color: white !important; 2422 color: white !important;
2394 } 2423 }
2395 .activebtn { 2424 .activebtn {
2396 color: black !important; 2425 color: black !important;
2397 } 2426 }
2398 </style> 2427 </style>
src/pages/Teachers/teachers.vue
1 <template> 1 <template>
2 <v-app id="pages-dasboard"> 2 <v-app id="pages-dasboard">
3 <v-tabs grow slider-color="gray"> 3 <v-tabs grow slider-color="gray">
4 <v-tab 4 <v-tab
5 ripple 5 ripple
6 @click="activeTab('existing')" 6 @click="activeTab('existing')"
7 v-bind:class="{ active: isActive }" 7 v-bind:class="{ active: isActive }"
8 id="tab" 8 id="tab"
9 class="subheading" 9 class="subheading"
10 >Existing Teachers</v-tab> 10 >Existing Teachers</v-tab>
11 <v-tab 11 <v-tab
12 ripple 12 ripple
13 @click="activeTab('new')" 13 @click="activeTab('new')"
14 v-bind:class="{ active: newActive }" 14 v-bind:class="{ active: newActive }"
15 id="tab1" 15 id="tab1"
16 User 16 User
17 class="subheading" 17 class="subheading"
18 >Add New Teachers</v-tab> 18 >Add New Teachers</v-tab>
19 <!-- ****** EDIT TEACHERS DETAILS ****** --> 19 <!-- ****** EDIT TEACHERS DETAILS ****** -->
20 <v-tab-item> 20 <v-tab-item>
21 <v-snackbar 21 <v-snackbar
22 :timeout="timeout" 22 :timeout="timeout"
23 :top="y === 'top'" 23 :top="y === 'top'"
24 :right="x === 'right'" 24 :right="x === 'right'"
25 :vertical="mode === 'vertical'" 25 :vertical="mode === 'vertical'"
26 v-model="snackbar" 26 v-model="snackbar"
27 color="success" 27 color="success"
28 >{{ text }}</v-snackbar> 28 >{{ text }}</v-snackbar>
29 <v-dialog v-model="dialog" max-width="1400px" scrollable> 29 <v-dialog v-model="dialog" max-width="1400px" scrollable>
30 <v-card flat> 30 <v-card flat>
31 <v-toolbar color="grey lighten-2" flat> 31 <v-toolbar color="grey lighten-2" flat>
32 <v-spacer></v-spacer> 32 <v-spacer></v-spacer>
33 <v-toolbar-title>Edit Teacher Profile</v-toolbar-title> 33 <v-toolbar-title>Edit Teacher Profile</v-toolbar-title>
34 <v-spacer></v-spacer> 34 <v-spacer></v-spacer>
35 </v-toolbar> 35 </v-toolbar>
36 <v-card-text style="height: 740px;"> 36 <v-card-text style="height: 740px;">
37 <v-layout> 37 <v-layout>
38 <v-flex 38 <v-flex
39 xs12 39 xs12
40 class="text-xs-center text-sm-center text-md-center text-lg-center my-4" 40 class="text-xs-center text-sm-center text-md-center text-lg-center my-4"
41 > 41 >
42 <v-avatar size="160px"> 42 <v-avatar size="160px">
43 <img src="/static/icon/user.png" v-if="!editedItem.profilePicUrl && !imageUrl" /> 43 <img src="/static/icon/user.png" v-if="!editedItem.profilePicUrl && !imageUrl" />
44 <img 44 <img
45 :src="editedItem.profilePicUrl" 45 :src="editedItem.profilePicUrl"
46 v-else-if="editedItem.profilePicUrl && !imageUrl" 46 v-else-if="editedItem.profilePicUrl && !imageUrl"
47 /> 47 />
48 <img 48 <img
49 v-if="imageUrl" 49 v-if="imageUrl"
50 :src="imageUrl" 50 :src="imageUrl"
51 height="150" 51 height="150"
52 style="border-radius:50%; width:200px" 52 style="border-radius:50%; width:200px"
53 /> 53 />
54 </v-avatar> 54 </v-avatar>
55 <input 55 <input
56 type="file" 56 type="file"
57 style="display:none" 57 style="display:none"
58 ref="image" 58 ref="image"
59 accept="image/*" 59 accept="image/*"
60 @change="onFilePicked" 60 @change="onFilePicked"
61 /> 61 />
62 </v-flex> 62 </v-flex>
63 </v-layout> 63 </v-layout>
64 <v-layout wrap> 64 <v-layout wrap>
65 <v-flex xs12 sm6> 65 <v-flex xs12 sm6>
66 <v-layout> 66 <v-layout>
67 <v-flex xs4 sm4 class="pt-4 subheading"> 67 <v-flex xs4 sm4 class="pt-4 subheading">
68 <label class="right hidden-xs-only hidden-sm-only">Full Name:</label> 68 <label class="right hidden-xs-only hidden-sm-only">Full Name:</label>
69 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Name:</label> 69 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Name:</label>
70 </v-flex> 70 </v-flex>
71 <v-flex xs8 sm6 class="ml-3"> 71 <v-flex xs8 sm6 class="ml-3">
72 <v-text-field 72 <v-text-field
73 v-model="editedItem.name" 73 v-model="editedItem.name"
74 placeholder="fill your full Name" 74 placeholder="fill your full Name"
75 type="text" 75 type="text"
76 required 76 required
77 ></v-text-field> 77 ></v-text-field>
78 </v-flex> 78 </v-flex>
79 </v-layout> 79 </v-layout>
80 </v-flex> 80 </v-flex>
81 <v-flex xs12 sm6> 81 <v-flex xs12 sm6>
82 <v-layout> 82 <v-layout>
83 <v-flex xs4 sm4 class="pt-4 subheading"> 83 <v-flex xs4 sm4 class="pt-4 subheading">
84 <label class="right">Email ID:</label> 84 <label class="right">Email ID:</label>
85 </v-flex> 85 </v-flex>
86 <v-flex xs8 sm6 class="ml-3"> 86 <v-flex xs8 sm6 class="ml-3">
87 <v-text-field 87 <v-text-field
88 placeholder="fill your email" 88 placeholder="fill your email"
89 v-model="editedItem.email" 89 v-model="editedItem.email"
90 type="text" 90 type="text"
91 required 91 required
92 ></v-text-field> 92 ></v-text-field>
93 </v-flex> 93 </v-flex>
94 </v-layout> 94 </v-layout>
95 </v-flex> 95 </v-flex>
96 </v-layout> 96 </v-layout>
97 <v-layout wrap> 97 <v-layout wrap>
98 <v-flex xs12 sm6> 98 <v-flex xs12 sm6>
99 <v-layout> 99 <v-layout>
100 <v-flex xs4 sm4 class="pt-4 subheading"> 100 <v-flex xs4 sm4 class="pt-4 subheading">
101 <label class="right hidden-sm-only hidden-xs-only">Date of Birth:</label> 101 <label class="right hidden-sm-only hidden-xs-only">Date of Birth:</label>
102 <label class="right hidden-lg-only hidden-xl-only hidden-md-only">D.O.B:</label> 102 <label class="right hidden-lg-only hidden-xl-only hidden-md-only">D.O.B:</label>
103 </v-flex> 103 </v-flex>
104 <v-flex xs8 sm6 class="ml-3"> 104 <v-flex xs8 sm6 class="ml-3">
105 <v-menu 105 <v-menu
106 ref="menu" 106 ref="menu"
107 :close-on-content-click="false" 107 :close-on-content-click="false"
108 v-model="menu2" 108 v-model="menu2"
109 :nudge-right="40" 109 :nudge-right="40"
110 lazy 110 lazy
111 transition="scale-transition" 111 transition="scale-transition"
112 offset-y 112 offset-y
113 full-width 113 full-width
114 min-width="290px" 114 min-width="290px"
115 > 115 >
116 <v-text-field 116 <v-text-field
117 slot="activator" 117 slot="activator"
118 v-model="editedItem.dob" 118 v-model="editedItem.dob"
119 placeholder="Select date" 119 placeholder="Select date"
120 ></v-text-field> 120 ></v-text-field>
121 <v-date-picker 121 <v-date-picker
122 ref="picker" 122 ref="picker"
123 v-model="editedItem.dob" 123 v-model="editedItem.dob"
124 :max="new Date().toISOString().substr(0, 10)" 124 :max="new Date().toISOString().substr(0, 10)"
125 min="1950-01-01" 125 min="1950-01-01"
126 @input="menu2 = false" 126 @input="menu2 = false"
127 ></v-date-picker> 127 ></v-date-picker>
128 </v-menu> 128 </v-menu>
129 </v-flex> 129 </v-flex>
130 </v-layout> 130 </v-layout>
131 </v-flex> 131 </v-flex>
132 <v-flex xs12 sm6> 132 <v-flex xs12 sm6>
133 <v-layout> 133 <v-layout>
134 <v-flex xs4 class="pt-4 subheading"> 134 <v-flex xs4 class="pt-4 subheading">
135 <label class="right">City:</label> 135 <label class="right">City:</label>
136 </v-flex> 136 </v-flex>
137 <v-flex xs8 sm6 class="ml-3"> 137 <v-flex xs8 sm6 class="ml-3">
138 <v-text-field 138 <v-text-field
139 v-model="editedItem.city" 139 v-model="editedItem.city"
140 placeholder="fill your City Name" 140 placeholder="fill your City Name"
141 type="text" 141 type="text"
142 required 142 required
143 ></v-text-field> 143 ></v-text-field>
144 </v-flex> 144 </v-flex>
145 </v-layout> 145 </v-layout>
146 </v-flex> 146 </v-flex>
147 </v-layout> 147 </v-layout>
148 <v-layout wrap> 148 <v-layout wrap>
149 <v-flex xs12 sm6> 149 <v-flex xs12 sm6>
150 <v-layout> 150 <v-layout>
151 <v-flex xs4 class="pt-4 subheading"> 151 <v-flex xs4 class="pt-4 subheading">
152 <label class="right">State:</label> 152 <label class="right">State:</label>
153 </v-flex> 153 </v-flex>
154 <v-flex xs8 sm6 class="ml-3"> 154 <v-flex xs8 sm6 class="ml-3">
155 <v-text-field 155 <v-text-field
156 v-model="editedItem.state" 156 v-model="editedItem.state"
157 placeholder="fill your State Name" 157 placeholder="fill your State Name"
158 type="text" 158 type="text"
159 required 159 required
160 ></v-text-field> 160 ></v-text-field>
161 </v-flex> 161 </v-flex>
162 </v-layout> 162 </v-layout>
163 </v-flex> 163 </v-flex>
164 <v-flex xs12 sm6> 164 <v-flex xs12 sm6>
165 <v-layout> 165 <v-layout>
166 <v-flex xs4 class="pt-4 subheading"> 166 <v-flex xs4 class="pt-4 subheading">
167 <label class="right">PinCode:</label> 167 <label class="right">PinCode:</label>
168 </v-flex> 168 </v-flex>
169 <v-flex xs8 sm6 class="ml-3"> 169 <v-flex xs8 sm6 class="ml-3">
170 <v-text-field 170 <v-text-field
171 v-model="editedItem.pincode" 171 v-model="editedItem.pincode"
172 placeholder="fill your pincode" 172 placeholder="fill your pincode"
173 type="number" 173 type="number"
174 required 174 required
175 ></v-text-field> 175 ></v-text-field>
176 </v-flex> 176 </v-flex>
177 </v-layout> 177 </v-layout>
178 </v-flex> 178 </v-flex>
179 </v-layout> 179 </v-layout>
180 <v-layout wrap> 180 <v-layout wrap>
181 <v-flex xs12 sm6> 181 <v-flex xs12 sm6>
182 <v-layout> 182 <v-layout>
183 <v-flex xs4 class="pt-4 subheading"> 183 <v-flex xs4 class="pt-4 subheading">
184 <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label> 184 <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label>
185 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Mobile:</label> 185 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Mobile:</label>
186 </v-flex> 186 </v-flex>
187 <v-flex xs8 sm6 class="ml-3"> 187 <v-flex xs8 sm6 class="ml-3">
188 <v-text-field 188 <v-text-field
189 v-model="editedItem.mobileNo" 189 v-model="editedItem.mobileNo"
190 placeholder="fill your MobileNo" 190 placeholder="fill your MobileNo"
191 type="number" 191 type="number"
192 required 192 required
193 ></v-text-field> 193 ></v-text-field>
194 </v-flex> 194 </v-flex>
195 </v-layout> 195 </v-layout>
196 </v-flex> 196 </v-flex>
197 <v-flex xs12 sm6> 197 <v-flex xs12 sm6>
198 <v-layout> 198 <v-layout>
199 <v-flex xs4 class="pt-4 subheading"> 199 <v-flex xs4 class="pt-4 subheading">
200 <label class="right hidden-xs-only hidden-sm-only">Select Country:</label> 200 <label class="right hidden-xs-only hidden-sm-only">Select Country:</label>
201 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Country:</label> 201 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Country:</label>
202 </v-flex> 202 </v-flex>
203 <v-flex xs8 sm6 class="ml-3"> 203 <v-flex xs8 sm6 class="ml-3">
204 <v-autocomplete 204 <v-autocomplete
205 v-model="editedItem.country" 205 v-model="editedItem.country"
206 :items="countries" 206 :items="countries"
207 placeholder="Select Country Name" 207 placeholder="Select Country Name"
208 required 208 required
209 ></v-autocomplete> 209 ></v-autocomplete>
210 </v-flex> 210 </v-flex>
211 </v-layout> 211 </v-layout>
212 </v-flex> 212 </v-flex>
213 </v-layout> 213 </v-layout>
214 <v-layout wrap> 214 <v-layout wrap>
215 <v-flex xs12 sm6> 215 <v-flex xs12 sm6>
216 <v-layout> 216 <v-layout>
217 <v-flex xs4 class="pt-4 subheading"> 217 <v-flex xs4 class="pt-4 subheading">
218 <label class="right">Join Date:</label> 218 <label class="right">Join Date:</label>
219 </v-flex> 219 </v-flex>
220 <v-flex xs8 sm6 class="ml-3"> 220 <v-flex xs8 sm6 class="ml-3">
221 <v-menu 221 <v-menu
222 ref="menu" 222 ref="menu"
223 :close-on-content-click="false" 223 :close-on-content-click="false"
224 v-model="menu3" 224 v-model="menu3"
225 :nudge-right="40" 225 :nudge-right="40"
226 lazy 226 lazy
227 transition="scale-transition" 227 transition="scale-transition"
228 offset-y 228 offset-y
229 full-width 229 full-width
230 min-width="290px" 230 min-width="290px"
231 > 231 >
232 <v-text-field 232 <v-text-field
233 slot="activator" 233 slot="activator"
234 v-model="editedItem.joinDate" 234 v-model="editedItem.joinDate"
235 placeholder="Select date" 235 placeholder="Select date"
236 ></v-text-field> 236 ></v-text-field>
237 <v-date-picker 237 <v-date-picker
238 ref="picker" 238 ref="picker"
239 v-model="editedItem.joinDate" 239 v-model="editedItem.joinDate"
240 :max="new Date().toISOString().substr(0, 10)" 240 :max="new Date().toISOString().substr(0, 10)"
241 min="1950-01-01" 241 min="1950-01-01"
242 @input="menu3 = false" 242 @input="menu3 = false"
243 ></v-date-picker> 243 ></v-date-picker>
244 </v-menu> 244 </v-menu>
245 </v-flex> 245 </v-flex>
246 </v-layout> 246 </v-layout>
247 </v-flex> 247 </v-flex>
248 <v-flex xs12 sm6> 248 <v-flex xs12 sm6>
249 <v-layout> 249 <v-layout>
250 <v-flex xs4 class="pt-4 subheading"> 250 <v-flex xs4 class="pt-4 subheading">
251 <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label> 251 <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label>
252 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod :</label> 252 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod :</label>
253 </v-flex> 253 </v-flex>
254 <v-flex xs8 sm6 class="ml-3"> 254 <v-flex xs8 sm6 class="ml-3">
255 <v-text-field 255 <v-text-field
256 label="Select Image" 256 label="Select Image"
257 @click="pickFile" 257 @click="pickFile"
258 v-model="imageName" 258 v-model="imageName"
259 append-icon="attach_file" 259 append-icon="attach_file"
260 ></v-text-field> 260 ></v-text-field>
261 </v-flex> 261 </v-flex>
262 </v-layout> 262 </v-layout>
263 </v-flex> 263 </v-flex>
264 </v-layout> 264 </v-layout>
265 <v-layout class="hidden-xs-only hidden-sm-only" wrap> 265 <v-layout class="hidden-xs-only hidden-sm-only" wrap>
266 <v-flex xs12 sm6> 266 <v-flex xs12 sm6>
267 <v-layout> 267 <v-layout>
268 <v-flex xs4 sm4 class="pt-4 subheading"> 268 <v-flex xs4 sm4 class="pt-4 subheading">
269 <label class="right">Present Address:</label> 269 <label class="right">Present Address:</label>
270 </v-flex> 270 </v-flex>
271 <v-flex xs8 sm6 class="ml-3"> 271 <v-flex xs8 sm6 class="ml-3">
272 <v-text-field 272 <v-text-field
273 name="input-4-3" 273 name="input-4-3"
274 v-model="editedItem.presentAddress" 274 v-model="editedItem.presentAddress"
275 placeholder="fill Your present Address" 275 placeholder="fill Your present Address"
276 required 276 required
277 ></v-text-field> 277 ></v-text-field>
278 </v-flex> 278 </v-flex>
279 </v-layout> 279 </v-layout>
280 </v-flex> 280 </v-flex>
281 <v-flex xs12 sm6> 281 <v-flex xs12 sm6>
282 <v-layout> 282 <v-layout>
283 <v-flex xs4 sm4 class="pt-4 subheading"> 283 <v-flex xs4 sm4 class="pt-4 subheading">
284 <label class="right">Permanent Address:</label> 284 <label class="right">Permanent Address:</label>
285 </v-flex> 285 </v-flex>
286 <v-flex xs12 sm6 class="ml-3"> 286 <v-flex xs12 sm6 class="ml-3">
287 <v-text-field 287 <v-text-field
288 name="input-4-3" 288 name="input-4-3"
289 v-model="editedItem.permanentAddress" 289 v-model="editedItem.permanentAddress"
290 placeholder="fill Your Permanent Address" 290 placeholder="fill Your Permanent Address"
291 required 291 required
292 ></v-text-field> 292 ></v-text-field>
293 </v-flex> 293 </v-flex>
294 </v-layout> 294 </v-layout>
295 </v-flex> 295 </v-flex>
296 </v-layout> 296 </v-layout>
297 <v-layout class="hidden-lg-only hidden-md-only hidden-xl-only" wrap> 297 <v-layout class="hidden-lg-only hidden-md-only hidden-xl-only" wrap>
298 <v-flex xs12 sm12> 298 <v-flex xs12 sm12>
299 <v-layout> 299 <v-layout>
300 <v-flex xs12 sm3 class="pt-4 subheading text-xs-center"> 300 <v-flex xs12 sm3 class="pt-4 subheading text-xs-center">
301 <label class>Present Address:</label> 301 <label class>Present Address:</label>
302 </v-flex> 302 </v-flex>
303 </v-layout> 303 </v-layout>
304 <v-layout> 304 <v-layout>
305 <v-flex xs12 sm12> 305 <v-flex xs12 sm12>
306 <v-textarea 306 <v-textarea
307 name="input-4-3" 307 name="input-4-3"
308 v-model="editedItem.presentAddress" 308 v-model="editedItem.presentAddress"
309 placeholder="fill Your present Address" 309 placeholder="fill Your present Address"
310 required 310 required
311 ></v-textarea> 311 ></v-textarea>
312 </v-flex> 312 </v-flex>
313 </v-layout> 313 </v-layout>
314 </v-flex> 314 </v-flex>
315 <v-flex xs12 sm12> 315 <v-flex xs12 sm12>
316 <v-layout> 316 <v-layout>
317 <v-flex xs12 sm3 class="pt-4 pr-4 subheading text-xs-center addressForm"> 317 <v-flex xs12 sm3 class="pt-4 pr-4 subheading text-xs-center addressForm">
318 <label>Permanent Address:</label> 318 <label>Permanent Address:</label>
319 </v-flex> 319 </v-flex>
320 </v-layout> 320 </v-layout>
321 <v-layout> 321 <v-layout>
322 <v-flex xs12 sm12> 322 <v-flex xs12 sm12>
323 <v-textarea 323 <v-textarea
324 name="input-4-3" 324 name="input-4-3"
325 v-model="editedItem.permanentAddress" 325 v-model="editedItem.permanentAddress"
326 placeholder="fill Your Permanent Address" 326 placeholder="fill Your Permanent Address"
327 required 327 required
328 ></v-textarea> 328 ></v-textarea>
329 </v-flex> 329 </v-flex>
330 </v-layout> 330 </v-layout>
331 </v-flex> 331 </v-flex>
332 </v-layout> 332 </v-layout>
333 <v-layout> 333 <v-layout>
334 <v-flex xs12 sm10 offset-sm1> 334 <v-flex xs12 sm10 offset-sm1>
335 <v-layout> 335 <v-layout>
336 <v-flex xs6> 336 <v-flex xs6>
337 <v-btn round dark @click.native="close">Cancel</v-btn> 337 <v-btn round dark @click.native="close">Cancel</v-btn>
338 </v-flex> 338 </v-flex>
339 <v-flex xs6> 339 <v-flex xs6>
340 <v-btn @click="save" round dark :loading="loading" class="right">Save</v-btn> 340 <v-btn @click="save" round dark :loading="loading" class="right">Save</v-btn>
341 </v-flex> 341 </v-flex>
342 </v-layout> 342 </v-layout>
343 </v-flex> 343 </v-flex>
344 </v-layout> 344 </v-layout>
345 </v-card-text> 345 </v-card-text>
346 </v-card> 346 </v-card>
347 </v-dialog> 347 </v-dialog>
348 348
349 <!-- ****** PROFILE VIEW TEACHERS DETAILS ****** --> 349 <!-- ****** PROFILE VIEW TEACHERS DETAILS ****** -->
350 350
351 <v-dialog v-model="dialog1" max-width="600px" scrollable> 351 <v-dialog v-model="dialog1" max-width="600px" scrollable>
352 <v-card> 352 <v-card>
353 <v-toolbar color="grey lighten-2" flat> 353 <v-toolbar color="grey lighten-2" flat>
354 <v-spacer></v-spacer> 354 <v-spacer></v-spacer>
355 <v-toolbar-title> 355 <v-toolbar-title>
356 <h3>Teacher Profile</h3> 356 <h3>Teacher Profile</h3>
357 </v-toolbar-title> 357 </v-toolbar-title>
358 <v-spacer></v-spacer> 358 <v-spacer></v-spacer>
359 <v-icon @click="close1">close</v-icon> 359 <v-icon @click="close1">close</v-icon>
360 </v-toolbar> 360 </v-toolbar>
361 <v-card-text style="height: 700px;"> 361 <v-card-text style="height: 700px;">
362 <v-container grid-list-md> 362 <v-container grid-list-md>
363 <v-layout wrap> 363 <v-layout wrap>
364 <v-flex> 364 <v-flex>
365 <v-flex align-center justify-center layout text-xs-center> 365 <v-flex align-center justify-center layout text-xs-center>
366 <v-avatar size="160px"> 366 <v-avatar size="160px">
367 <img src="/static/icon/user.png" v-if="!editedItem.profilePicUrl" /> 367 <img src="/static/icon/user.png" v-if="!editedItem.profilePicUrl" />
368 <img :src="editedItem.profilePicUrl" v-else-if="editedItem.profilePicUrl" /> 368 <img :src="editedItem.profilePicUrl" v-else-if="editedItem.profilePicUrl" />
369 </v-avatar> 369 </v-avatar>
370 </v-flex> 370 </v-flex>
371 <v-layout> 371 <v-layout>
372 <v-flex xs5 sm6> 372 <v-flex xs5 sm6>
373 <h5 class="right my-1"> 373 <h5 class="right my-1">
374 <b>Full Name:</b> 374 <b>Full Name:</b>
375 </h5> 375 </h5>
376 </v-flex> 376 </v-flex>
377 <v-flex sm6 xs8> 377 <v-flex sm6 xs8>
378 <h5 class="my-1">{{ editedItem.name }}</h5> 378 <h5 class="my-1">{{ editedItem.name }}</h5>
379 </v-flex> 379 </v-flex>
380 </v-layout> 380 </v-layout>
381 <v-layout> 381 <v-layout>
382 <v-flex xs5 sm6> 382 <v-flex xs5 sm6>
383 <h5 class="right my-1"> 383 <h5 class="right my-1">
384 <b>Email:</b> 384 <b>Email:</b>
385 </h5> 385 </h5>
386 </v-flex> 386 </v-flex>
387 <v-flex sm6 xs8> 387 <v-flex sm6 xs8>
388 <h5 class="my-1">{{ editedItem.email }}</h5> 388 <h5 class="my-1">{{ editedItem.email }}</h5>
389 </v-flex> 389 </v-flex>
390 </v-layout> 390 </v-layout>
391 <v-layout> 391 <v-layout>
392 <v-flex xs5 sm6> 392 <v-flex xs5 sm6>
393 <h5 class="right my-1"> 393 <h5 class="right my-1">
394 <b>City:</b> 394 <b>City:</b>
395 </h5> 395 </h5>
396 </v-flex> 396 </v-flex>
397 <v-flex sm6 xs8> 397 <v-flex sm6 xs8>
398 <h5 class="my-1">{{ editedItem.city }}</h5> 398 <h5 class="my-1">{{ editedItem.city }}</h5>
399 </v-flex> 399 </v-flex>
400 </v-layout> 400 </v-layout>
401 <v-layout> 401 <v-layout>
402 <v-flex xs5 sm6> 402 <v-flex xs5 sm6>
403 <h5 class="right my-1"> 403 <h5 class="right my-1">
404 <b>State:</b> 404 <b>State:</b>
405 </h5> 405 </h5>
406 </v-flex> 406 </v-flex>
407 <v-flex sm6 xs8> 407 <v-flex sm6 xs8>
408 <h5 class="my-1">{{ editedItem.state }}</h5> 408 <h5 class="my-1">{{ editedItem.state }}</h5>
409 </v-flex> 409 </v-flex>
410 </v-layout> 410 </v-layout>
411 <v-layout> 411 <v-layout>
412 <v-flex xs5 sm6> 412 <v-flex xs5 sm6>
413 <h5 class="right my-1"> 413 <h5 class="right my-1">
414 <b>Country:</b> 414 <b>Country:</b>
415 </h5> 415 </h5>
416 </v-flex> 416 </v-flex>
417 <v-flex sm6 xs8> 417 <v-flex sm6 xs8>
418 <h5 class="my-1">{{ editedItem.country }}</h5> 418 <h5 class="my-1">{{ editedItem.country }}</h5>
419 </v-flex> 419 </v-flex>
420 </v-layout> 420 </v-layout>
421 <v-layout> 421 <v-layout>
422 <v-flex xs5 sm6> 422 <v-flex xs5 sm6>
423 <h5 class="right my-1"> 423 <h5 class="right my-1">
424 <b>Pincode:</b> 424 <b>Pincode:</b>
425 </h5> 425 </h5>
426 </v-flex> 426 </v-flex>
427 <v-flex sm6 xs8> 427 <v-flex sm6 xs8>
428 <h5 class="my-1">{{ editedItem.pincode }}</h5> 428 <h5 class="my-1">{{ editedItem.pincode }}</h5>
429 </v-flex> 429 </v-flex>
430 </v-layout> 430 </v-layout>
431 <v-layout> 431 <v-layout>
432 <v-flex xs5 sm6> 432 <v-flex xs5 sm6>
433 <h5 class="right my-1"> 433 <h5 class="right my-1">
434 <b>Mobile No:</b> 434 <b>Mobile No:</b>
435 </h5> 435 </h5>
436 </v-flex> 436 </v-flex>
437 <v-flex sm6 xs8> 437 <v-flex sm6 xs8>
438 <h5 class="my-1">{{ editedItem.mobileNo }}</h5> 438 <h5 class="my-1">{{ editedItem.mobileNo }}</h5>
439 </v-flex> 439 </v-flex>
440 </v-layout> 440 </v-layout>
441 <v-layout> 441 <v-layout>
442 <v-flex xs5 sm6> 442 <v-flex xs5 sm6>
443 <h5 class="right my-1"> 443 <h5 class="right my-1">
444 <b>Join Date:</b> 444 <b>Join Date:</b>
445 </h5> 445 </h5>
446 </v-flex> 446 </v-flex>
447 <v-flex sm6 xs8> 447 <v-flex sm6 xs8>
448 <h5 class="my-1">{{ dates(editedItem.joinDate) }}</h5> 448 <h5 class="my-1">{{ dates(editedItem.joinDate) }}</h5>
449 </v-flex> 449 </v-flex>
450 </v-layout> 450 </v-layout>
451 <v-layout> 451 <v-layout>
452 <v-flex xs5 sm6> 452 <v-flex xs5 sm6>
453 <h5 class="right my-1"> 453 <h5 class="right my-1">
454 <b>D.O.B :</b> 454 <b>D.O.B :</b>
455 </h5> 455 </h5>
456 </v-flex> 456 </v-flex>
457 <v-flex sm6 xs8> 457 <v-flex sm6 xs8>
458 <h5 class="my-1">{{ dates(editedItem.dob) }}</h5> 458 <h5 class="my-1">{{ dates(editedItem.dob) }}</h5>
459 </v-flex> 459 </v-flex>
460 </v-layout> 460 </v-layout>
461 <v-layout> 461 <v-layout>
462 <v-flex xs6 sm6> 462 <v-flex xs6 sm6>
463 <h5 class="right my-1"> 463 <h5 class="right my-1">
464 <b>Permanent Address:</b> 464 <b>Permanent Address:</b>
465 </h5> 465 </h5>
466 </v-flex> 466 </v-flex>
467 <v-flex sm6 xs8> 467 <v-flex sm6 xs8>
468 <h5 class="my-1">{{ editedItem.permanentAddress }}</h5> 468 <h5 class="my-1">{{ editedItem.permanentAddress }}</h5>
469 </v-flex> 469 </v-flex>
470 </v-layout> 470 </v-layout>
471 <v-layout> 471 <v-layout>
472 <v-flex xs6 sm6> 472 <v-flex xs6 sm6>
473 <h5 class="right my-1"> 473 <h5 class="right my-1">
474 <b>present Address:</b> 474 <b>present Address:</b>
475 </h5> 475 </h5>
476 </v-flex> 476 </v-flex>
477 <v-flex sm6 xs8> 477 <v-flex sm6 xs8>
478 <h5 class="my-1">{{ editedItem.presentAddress }}</h5> 478 <h5 class="my-1">{{ editedItem.presentAddress }}</h5>
479 </v-flex> 479 </v-flex>
480 </v-layout> 480 </v-layout>
481 </v-flex> 481 </v-flex>
482 </v-layout> 482 </v-layout>
483 </v-container> 483 </v-container>
484 </v-card-text> 484 </v-card-text>
485 </v-card> 485 </v-card>
486 </v-dialog> 486 </v-dialog>
487 <v-snackbar 487 <v-snackbar
488 :timeout="timeout" 488 :timeout="timeout"
489 :top="y === 'top'" 489 :top="y === 'top'"
490 :right="x === 'right'" 490 :right="x === 'right'"
491 :vertical="mode === 'vertical'" 491 :vertical="mode === 'vertical'"
492 v-model="snackbar" 492 v-model="snackbar"
493 color="success" 493 color="success"
494 >{{ text }}</v-snackbar> 494 >{{ text }}</v-snackbar>
495 495
496 <!-- ****** EXISTING-Teachers TABLE DATA****** --> 496 <!-- ****** EXISTING-Teachers TABLE DATA****** -->
497 497
498 <v-data-table 498 <v-data-table
499 :headers="headers" 499 :headers="headers"
500 :items="desserts" 500 :items="desserts"
501 :pagination.sync="pagination" 501 :pagination.sync="pagination"
502 :search="search" 502 :search="search"
503 > 503 >
504 <template slot="items" slot-scope="props"> 504 <template slot="items" slot-scope="props">
505 <td id="td" class="text-xs-center">{{ props.index + 1}}</td> 505 <td id="td" class="text-xs-center">{{ props.index + 1}}</td>
506 <td id="td" class="text-xs-center"> 506 <td id="td" class="text-xs-center">
507 <v-avatar> 507 <v-avatar>
508 <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> 508 <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" />
509 <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> 509 <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" />
510 </v-avatar> 510 </v-avatar>
511 </td> 511 </td>
512 <td id="td" class="text-xs-center">{{ props.item.name}}</td> 512 <td id="td" class="text-xs-center">{{ props.item.name}}</td>
513 <td id="td" class="text-xs-center">{{ props.item.email }}</td> 513 <td id="td" class="text-xs-center">{{ props.item.email }}</td>
514 <td id="td" class="text-xs-center">{{ dates(props.item.dob) }}</td> 514 <td id="td" class="text-xs-center">{{ dates(props.item.dob) }}</td>
515 <td id="td" class="text-xs-center">{{ dates(props.item.joinDate)}}</td> 515 <td id="td" class="text-xs-center">{{ dates(props.item.joinDate)}}</td>
516 <td id="td" class="text-xs-center">{{ props.item.mobileNo }}</td> 516 <td id="td" class="text-xs-center">{{ props.item.mobileNo }}</td>
517 <td id="td">
518 <v-switch
519 class="pl-3"
520 v-model="props.item.status"
521 @change="suspendStatus(props.item.status,props.item._id)"
522 ></v-switch>
523 </td>
517 <td class="text-xs-center"> 524 <td class="text-xs-center">
518 <span> 525 <span>
519 <v-tooltip top> 526 <v-tooltip top>
520 <img 527 <img
521 slot="activator" 528 slot="activator"
522 style="cursor:pointer; width:25px; height:18px; " 529 style="cursor:pointer; width:25px; height:18px; "
523 class="mr5" 530 class="mr5"
524 @click="profile(props.item)" 531 @click="profile(props.item)"
525 src="/static/icon/eye1.png" 532 src="/static/icon/eye1.png"
526 /> 533 />
527 <span>View</span> 534 <span>View</span>
528 </v-tooltip> 535 </v-tooltip>
529 <v-tooltip top> 536 <v-tooltip top>
530 <img 537 <img
531 slot="activator" 538 slot="activator"
532 style="cursor:pointer; width:20px; height:18px; " 539 style="cursor:pointer; width:20px; height:18px; "
533 class="mr5" 540 class="mr5"
534 @click="editItem(props.item)" 541 @click="editItem(props.item)"
535 src="/static/icon/edit1.png" 542 src="/static/icon/edit1.png"
536 /> 543 />
537 <span>Edit</span> 544 <span>Edit</span>
538 </v-tooltip> 545 </v-tooltip>
539 <v-tooltip top> 546 <v-tooltip top>
540 <img 547 <img
541 slot="activator" 548 slot="activator"
542 style="cursor:pointer; width:20px; height:20px; " 549 style="cursor:pointer; width:20px; height:20px; "
543 class="mr5" 550 class="mr5"
544 @click="deleteItem(props.item)" 551 @click="deleteItem(props.item)"
545 src="/static/icon/delete1.png" 552 src="/static/icon/delete1.png"
546 /> 553 />
547 <span>Delete</span> 554 <span>Delete</span>
548 </v-tooltip> 555 </v-tooltip>
549 </span> 556 </span>
550 </td> 557 </td>
551 </template> 558 </template>
552 <v-alert 559 <v-alert
553 slot="no-results" 560 slot="no-results"
554 :value="true" 561 :value="true"
555 color="error" 562 color="error"
556 icon="warning" 563 icon="warning"
557 >Your search for "{{ search }}" found no results.</v-alert> 564 >Your search for "{{ search }}" found no results.</v-alert>
558 </v-data-table> 565 </v-data-table>
559 </v-tab-item> 566 </v-tab-item>
560 567
561 <!-- ****** Add Teachers Data****** --> 568 <!-- ****** Add Teachers Data****** -->
562 <v-tab-item> 569 <v-tab-item>
563 <v-container fluid> 570 <v-container fluid>
564 <v-snackbar 571 <v-snackbar
565 :timeout="timeout" 572 :timeout="timeout"
566 :top="y === 'top'" 573 :top="y === 'top'"
567 :right="x === 'right'" 574 :right="x === 'right'"
568 :vertical="mode === 'vertical'" 575 :vertical="mode === 'vertical'"
569 v-model="snackbar" 576 v-model="snackbar"
570 color="success" 577 color="success"
571 >{{ text }}</v-snackbar> 578 >{{ text }}</v-snackbar>
572 <v-flex xs12 sm12 class="my-4"> 579 <v-flex xs12 sm12 class="my-4">
573 <v-card flat> 580 <v-card flat>
574 <v-form ref="form" v-model="valid" lazy-validation> 581 <v-form ref="form" v-model="valid" lazy-validation>
575 <v-container fluid> 582 <v-container fluid>
576 <v-layout> 583 <v-layout>
577 <v-flex 584 <v-flex
578 xs12 585 xs12
579 class="text-xs-center text-sm-center text-md-center text-lg-center my-4" 586 class="text-xs-center text-sm-center text-md-center text-lg-center my-4"
580 > 587 >
581 <v-avatar size="100px"> 588 <v-avatar size="100px">
582 <img src="/static/icon/user.png" v-if="!imageUrl" /> 589 <img src="/static/icon/user.png" v-if="!imageUrl" />
583 </v-avatar> 590 </v-avatar>
584 <img 591 <img
585 :src="imageUrl" 592 :src="imageUrl"
586 height="150" 593 height="150"
587 v-if="imageUrl" 594 v-if="imageUrl"
588 style="border-radius:50%; width:200px" 595 style="border-radius:50%; width:200px"
589 /> 596 />
590 </v-flex> 597 </v-flex>
591 </v-layout> 598 </v-layout>
592 <v-layout> 599 <v-layout>
593 <v-flex xs12 sm6> 600 <v-flex xs12 sm6>
594 <v-layout> 601 <v-layout>
595 <v-flex xs4 class="pt-4 subheading"> 602 <v-flex xs4 class="pt-4 subheading">
596 <label class="right hidden-sm-only hidden-xs-only">Full Name:</label> 603 <label class="right hidden-sm-only hidden-xs-only">Full Name:</label>
597 <label 604 <label
598 class="right hidden-lg-only hidden-xl-only hidden-md-only" 605 class="right hidden-lg-only hidden-xl-only hidden-md-only"
599 >Full Name</label> 606 >Full Name</label>
600 </v-flex> 607 </v-flex>
601 <v-flex xs8 class="ml-3"> 608 <v-flex xs8 class="ml-3">
602 <v-text-field 609 <v-text-field
603 v-model="addTeachers.name" 610 v-model="addTeachers.name"
604 placeholder="fill your full Name" 611 placeholder="fill your full Name"
605 name="name" 612 name="name"
606 type="text" 613 type="text"
607 :rules="nameRules" 614 :rules="nameRules"
608 required 615 required
609 ></v-text-field> 616 ></v-text-field>
610 </v-flex> 617 </v-flex>
611 </v-layout> 618 </v-layout>
612 </v-flex> 619 </v-flex>
613 <v-flex xs12 sm6> 620 <v-flex xs12 sm6>
614 <v-layout> 621 <v-layout>
615 <v-flex xs4 class="pt-4 subheading"> 622 <v-flex xs4 class="pt-4 subheading">
616 <label class="right">Email ID:</label> 623 <label class="right">Email ID:</label>
617 </v-flex> 624 </v-flex>
618 <v-flex xs8 class="ml-3"> 625 <v-flex xs8 class="ml-3">
619 <v-text-field 626 <v-text-field
620 placeholder="fill your email" 627 placeholder="fill your email"
621 v-model="addTeachers.email" 628 v-model="addTeachers.email"
622 type="text" 629 type="text"
623 name="email" 630 name="email"
624 required 631 required
625 ></v-text-field> 632 ></v-text-field>
626 </v-flex> 633 </v-flex>
627 </v-layout> 634 </v-layout>
628 </v-flex> 635 </v-flex>
629 </v-layout> 636 </v-layout>
630 <v-layout> 637 <v-layout>
631 <v-flex xs12 sm6> 638 <v-flex xs12 sm6>
632 <v-layout> 639 <v-layout>
633 <v-flex xs4 sm4 class="pt-4 subheading"> 640 <v-flex xs4 sm4 class="pt-4 subheading">
634 <label class="right hidden-sm-only hidden-xs-only">Date of Birth:</label> 641 <label class="right hidden-sm-only hidden-xs-only">Date of Birth:</label>
635 <label class="right hidden-lg-only hidden-xl-only hidden-md-only">D.O.B:</label> 642 <label class="right hidden-lg-only hidden-xl-only hidden-md-only">D.O.B:</label>
636 </v-flex> 643 </v-flex>
637 <v-flex xs8 class="ml-3"> 644 <v-flex xs8 class="ml-3">
638 <v-menu 645 <v-menu
639 ref="menu" 646 ref="menu"
640 :close-on-content-click="false" 647 :close-on-content-click="false"
641 v-model="menu" 648 v-model="menu"
642 :nudge-right="40" 649 :nudge-right="40"
643 lazy 650 lazy
644 transition="scale-transition" 651 transition="scale-transition"
645 offset-y 652 offset-y
646 full-width 653 full-width
647 min-width="290px" 654 min-width="290px"
648 > 655 >
649 <v-text-field 656 <v-text-field
650 slot="activator" 657 slot="activator"
651 :rules="dateRules" 658 :rules="dateRules"
652 v-model="addTeachers.date" 659 v-model="addTeachers.date"
653 placeholder="Select date" 660 placeholder="Select date"
654 ></v-text-field> 661 ></v-text-field>
655 <v-date-picker 662 <v-date-picker
656 ref="picker" 663 ref="picker"
657 v-model="addTeachers.date" 664 v-model="addTeachers.date"
658 :max="new Date().toISOString().substr(0, 10)" 665 :max="new Date().toISOString().substr(0, 10)"
659 min="1950-01-01" 666 min="1950-01-01"
660 @input="menu = false" 667 @input="menu = false"
661 ></v-date-picker> 668 ></v-date-picker>
662 </v-menu> 669 </v-menu>
663 </v-flex> 670 </v-flex>
664 </v-layout> 671 </v-layout>
665 </v-flex> 672 </v-flex>
666 <v-flex xs12 sm6> 673 <v-flex xs12 sm6>
667 <v-layout> 674 <v-layout>
668 <v-flex xs4 class="pt-4 subheading"> 675 <v-flex xs4 class="pt-4 subheading">
669 <label class="right">City:</label> 676 <label class="right">City:</label>
670 </v-flex> 677 </v-flex>
671 <v-flex xs8 class="ml-3"> 678 <v-flex xs8 class="ml-3">
672 <v-text-field 679 <v-text-field
673 v-model="addTeachers.city" 680 v-model="addTeachers.city"
674 placeholder="fill your City Name" 681 placeholder="fill your City Name"
675 name="City" 682 name="City"
676 type="text" 683 type="text"
677 :rules="cityRules" 684 :rules="cityRules"
678 required 685 required
679 ></v-text-field> 686 ></v-text-field>
680 </v-flex> 687 </v-flex>
681 </v-layout> 688 </v-layout>
682 </v-flex> 689 </v-flex>
683 </v-layout> 690 </v-layout>
684 <v-layout> 691 <v-layout>
685 <v-flex xs12 sm6> 692 <v-flex xs12 sm6>
686 <v-layout> 693 <v-layout>
687 <v-flex xs4 class="pt-4 subheading"> 694 <v-flex xs4 class="pt-4 subheading">
688 <label class="right">State:</label> 695 <label class="right">State:</label>
689 </v-flex> 696 </v-flex>
690 <v-flex xs8 class="ml-3"> 697 <v-flex xs8 class="ml-3">
691 <v-text-field 698 <v-text-field
692 v-model="addTeachers.state" 699 v-model="addTeachers.state"
693 placeholder="fill your State Name" 700 placeholder="fill your State Name"
694 name="state" 701 name="state"
695 type="text" 702 type="text"
696 :rules="stateRules" 703 :rules="stateRules"
697 required 704 required
698 ></v-text-field> 705 ></v-text-field>
699 </v-flex> 706 </v-flex>
700 </v-layout> 707 </v-layout>
701 </v-flex> 708 </v-flex>
702 <v-flex xs12 sm6> 709 <v-flex xs12 sm6>
703 <v-layout> 710 <v-layout>
704 <v-flex xs4 class="pt-4 subheading"> 711 <v-flex xs4 class="pt-4 subheading">
705 <label class="right">PinCode:</label> 712 <label class="right">PinCode:</label>
706 </v-flex> 713 </v-flex>
707 <v-flex xs8 class="ml-3"> 714 <v-flex xs8 class="ml-3">
708 <v-text-field 715 <v-text-field
709 v-model="addTeachers.pincode" 716 v-model="addTeachers.pincode"
710 placeholder="fill your pincode" 717 placeholder="fill your pincode"
711 name="pincode" 718 name="pincode"
712 type="number" 719 type="number"
713 :rules="pincode" 720 :rules="pincode"
714 required 721 required
715 ></v-text-field> 722 ></v-text-field>
716 </v-flex> 723 </v-flex>
717 </v-layout> 724 </v-layout>
718 </v-flex> 725 </v-flex>
719 </v-layout> 726 </v-layout>
720 <v-layout> 727 <v-layout>
721 <v-flex xs12 sm6> 728 <v-flex xs12 sm6>
722 <v-layout> 729 <v-layout>
723 <v-flex xs4 class="pt-4 subheading"> 730 <v-flex xs4 class="pt-4 subheading">
724 <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label> 731 <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label>
725 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Mobile:</label> 732 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Mobile:</label>
726 </v-flex> 733 </v-flex>
727 <v-flex xs8 class="ml-3"> 734 <v-flex xs8 class="ml-3">
728 <v-text-field 735 <v-text-field
729 v-model="addTeachers.mobileNo" 736 v-model="addTeachers.mobileNo"
730 placeholder="fill your Mobile No." 737 placeholder="fill your Mobile No."
731 name="mobileNo" 738 name="mobileNo"
732 type="number" 739 type="number"
733 :rules="mobileNoRules" 740 :rules="mobileNoRules"
734 required 741 required
735 ></v-text-field> 742 ></v-text-field>
736 </v-flex> 743 </v-flex>
737 </v-layout> 744 </v-layout>
738 </v-flex> 745 </v-flex>
739 <v-flex xs12 sm6> 746 <v-flex xs12 sm6>
740 <v-layout> 747 <v-layout>
741 <v-flex xs4 class="pt-4 subheading"> 748 <v-flex xs4 class="pt-4 subheading">
742 <label class="right hidden-xs-only hidden-sm-only">Select Country:</label> 749 <label class="right hidden-xs-only hidden-sm-only">Select Country:</label>
743 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Country:</label> 750 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Country:</label>
744 </v-flex> 751 </v-flex>
745 <v-flex xs8 class="ml-3"> 752 <v-flex xs8 class="ml-3">
746 <v-autocomplete 753 <v-autocomplete
747 v-model="addTeachers.country" 754 v-model="addTeachers.country"
748 :rules="country" 755 :rules="country"
749 :items="countries" 756 :items="countries"
750 placeholder="Select Country Name" 757 placeholder="Select Country Name"
751 required 758 required
752 ></v-autocomplete> 759 ></v-autocomplete>
753 </v-flex> 760 </v-flex>
754 </v-layout> 761 </v-layout>
755 </v-flex> 762 </v-flex>
756 </v-layout> 763 </v-layout>
757 <v-layout> 764 <v-layout>
758 <v-flex xs12 sm6> 765 <v-flex xs12 sm6>
759 <v-layout> 766 <v-layout>
760 <v-flex xs4 class="pt-4 subheading"> 767 <v-flex xs4 class="pt-4 subheading">
761 <label class="right">Join Date:</label> 768 <label class="right">Join Date:</label>
762 </v-flex> 769 </v-flex>
763 <v-flex xs8 class="ml-3"> 770 <v-flex xs8 class="ml-3">
764 <v-menu 771 <v-menu
765 ref="menu1" 772 ref="menu1"
766 :close-on-content-click="false" 773 :close-on-content-click="false"
767 v-model="menu1" 774 v-model="menu1"
768 :nudge-right="40" 775 :nudge-right="40"
769 lazy 776 lazy
770 transition="scale-transition" 777 transition="scale-transition"
771 offset-y 778 offset-y
772 full-width 779 full-width
773 min-width="290px" 780 min-width="290px"
774 > 781 >
775 <v-text-field 782 <v-text-field
776 slot="activator" 783 slot="activator"
777 :rules="joinDateRules" 784 :rules="joinDateRules"
778 v-model="addTeachers.joinDate" 785 v-model="addTeachers.joinDate"
779 placeholder="Select date" 786 placeholder="Select date"
780 ></v-text-field> 787 ></v-text-field>
781 <v-date-picker 788 <v-date-picker
782 ref="picker" 789 ref="picker"
783 v-model="addTeachers.joinDate" 790 v-model="addTeachers.joinDate"
784 :max="new Date().toISOString().substr(0, 10)" 791 :max="new Date().toISOString().substr(0, 10)"
785 min="1950-01-01" 792 min="1950-01-01"
786 @input="menu1 = false" 793 @input="menu1 = false"
787 ></v-date-picker> 794 ></v-date-picker>
788 </v-menu> 795 </v-menu>
789 </v-flex> 796 </v-flex>
790 </v-layout> 797 </v-layout>
791 </v-flex> 798 </v-flex>
792 <v-flex xs12 sm6> 799 <v-flex xs12 sm6>
793 <v-layout> 800 <v-layout>
794 <v-flex xs4 class="pt-4 subheading"> 801 <v-flex xs4 class="pt-4 subheading">
795 <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label> 802 <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label>
796 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod:</label> 803 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod:</label>
797 </v-flex> 804 </v-flex>
798 <v-flex xs8 class="ml-3"> 805 <v-flex xs8 class="ml-3">
799 <v-text-field 806 <v-text-field
800 label="Select Image" 807 label="Select Image"
801 @click="pickFile" 808 @click="pickFile"
802 v-model="imageName" 809 v-model="imageName"
803 append-icon="attach_file" 810 append-icon="attach_file"
804 ></v-text-field> 811 ></v-text-field>
805 <input 812 <input
806 type="file" 813 type="file"
807 style="display:none" 814 style="display:none"
808 ref="image" 815 ref="image"
809 accept="image/*" 816 accept="image/*"
810 @change="onFilePicked" 817 @change="onFilePicked"
811 /> 818 />
812 </v-flex> 819 </v-flex>
813 </v-layout> 820 </v-layout>
814 </v-flex> 821 </v-flex>
815 </v-layout> 822 </v-layout>
816 <v-layout class="hidden-xs-only hidden-sm-only"> 823 <v-layout class="hidden-xs-only hidden-sm-only">
817 <v-flex xs12 sm6> 824 <v-flex xs12 sm6>
818 <v-layout> 825 <v-layout>
819 <v-flex xs4 md4 class="pt-4 subheading"> 826 <v-flex xs4 md4 class="pt-4 subheading">
820 <label class="right">Present Address:</label> 827 <label class="right">Present Address:</label>
821 </v-flex> 828 </v-flex>
822 <v-flex xs8 md8 class="ml-3"> 829 <v-flex xs8 md8 class="ml-3">
823 <v-text-field 830 <v-text-field
824 name="input-4-3" 831 name="input-4-3"
825 v-model="addTeachers.presentAddress" 832 v-model="addTeachers.presentAddress"
826 :rules="presentAddress" 833 :rules="presentAddress"
827 placeholder="fill Your present Address" 834 placeholder="fill Your present Address"
828 @keyup="copyData" 835 @keyup="copyData"
829 ></v-text-field> 836 ></v-text-field>
830 </v-flex> 837 </v-flex>
831 </v-layout> 838 </v-layout>
832 </v-flex> 839 </v-flex>
833 <v-flex xs12 sm6> 840 <v-flex xs12 sm6>
834 <v-layout> 841 <v-layout>
835 <v-flex xs4 md4 class="pt-4 subheading addressForm"> 842 <v-flex xs4 md4 class="pt-4 subheading addressForm">
836 <label class="right">Permanent Address:</label> 843 <label class="right">Permanent Address:</label>
837 </v-flex> 844 </v-flex>
838 <v-flex xs12 md8 class="ml-3"> 845 <v-flex xs12 md8 class="ml-3">
839 <v-switch 846 <v-switch
840 v-model="addTeachers.permanentAddress" 847 v-model="addTeachers.permanentAddress"
841 label="Select Permanent Address" 848 label="Select Permanent Address"
842 :value="addTeachers.presentAddress" 849 :value="addTeachers.presentAddress"
843 ></v-switch> 850 ></v-switch>
844 </v-flex> 851 </v-flex>
845 </v-layout> 852 </v-layout>
846 </v-flex> 853 </v-flex>
847 </v-layout> 854 </v-layout>
848 <v-layout class="hidden-xs-only hidden-sm-only"> 855 <v-layout class="hidden-xs-only hidden-sm-only">
849 <v-flex xs12 sm6> 856 <v-flex xs12 sm6>
850 <v-layout> 857 <v-layout>
851 <v-flex xs4 md4 class="pt-4 subheading addressForm"> 858 <v-flex xs4 md4 class="pt-4 subheading addressForm">
852 <label class="right">Permanent Address:</label> 859 <label class="right">Permanent Address:</label>
853 </v-flex> 860 </v-flex>
854 <v-flex xs12 md8 class="ml-3"> 861 <v-flex xs12 md8 class="ml-3">
855 <v-text-field 862 <v-text-field
856 name="input-4-3" 863 name="input-4-3"
857 v-model="addTeachers.permanentAddress" 864 v-model="addTeachers.permanentAddress"
858 :rules="permanentAddress" 865 :rules="permanentAddress"
859 placeholder="fill Your Permanent Address" 866 placeholder="fill Your Permanent Address"
860 required 867 required
861 ></v-text-field> 868 ></v-text-field>
862 </v-flex> 869 </v-flex>
863 </v-layout> 870 </v-layout>
864 </v-flex> 871 </v-flex>
865 </v-layout> 872 </v-layout>
866 <v-layout class="hidden-lg-only hidden-md-only hidden-xl-only"> 873 <v-layout class="hidden-lg-only hidden-md-only hidden-xl-only">
867 <v-flex xs12 sm12> 874 <v-flex xs12 sm12>
868 <v-layout> 875 <v-layout>
869 <v-flex xs12 sm12 class="pt-4 subheading text-xs-center"> 876 <v-flex xs12 sm12 class="pt-4 subheading text-xs-center">
870 <label class>Present Addres:</label> 877 <label class>Present Addres:</label>
871 </v-flex> 878 </v-flex>
872 </v-layout> 879 </v-layout>
873 <v-layout> 880 <v-layout>
874 <v-flex xs12 sm12> 881 <v-flex xs12 sm12>
875 <v-textarea 882 <v-textarea
876 name="input-4-3" 883 name="input-4-3"
877 v-model="addTeachers.presentAddress" 884 v-model="addTeachers.presentAddress"
878 :rules="presentAddress" 885 :rules="presentAddress"
879 placeholder="fill Your present Address" 886 placeholder="fill Your present Address"
880 required 887 required
881 ></v-textarea> 888 ></v-textarea>
882 </v-flex> 889 </v-flex>
883 </v-layout> 890 </v-layout>
884 </v-flex> 891 </v-flex>
885 <v-flex xs12 sm12> 892 <v-flex xs12 sm12>
886 <v-layout> 893 <v-layout>
887 <v-flex xs12 sm12 class="pt-4 pr-4 subheading text-xs-center addressForm"> 894 <v-flex xs12 sm12 class="pt-4 pr-4 subheading text-xs-center addressForm">
888 <label>Permanent Address:</label> 895 <label>Permanent Address:</label>
889 </v-flex> 896 </v-flex>
890 </v-layout> 897 </v-layout>
891 <v-layout> 898 <v-layout>
892 <v-flex xs12 sm12> 899 <v-flex xs12 sm12>
893 <v-textarea 900 <v-textarea
894 name="input-4-3" 901 name="input-4-3"
895 v-model="addTeachers.permanentAddress" 902 v-model="addTeachers.permanentAddress"
896 :rules="permanentAddress" 903 :rules="permanentAddress"
897 placeholder="fill Your Permanent Address" 904 placeholder="fill Your Permanent Address"
898 required 905 required
899 ></v-textarea> 906 ></v-textarea>
900 </v-flex> 907 </v-flex>
901 </v-layout> 908 </v-layout>
902 </v-flex> 909 </v-flex>
903 </v-layout> 910 </v-layout>
904 <v-layout class="mx-2"> 911 <v-layout class="mx-2">
905 <v-flex xs12 sm11 offset-sm1> 912 <v-flex xs12 sm11 offset-sm1>
906 <v-layout> 913 <v-layout>
907 <v-flex xs6 class> 914 <v-flex xs6 class>
908 <v-btn @click="clear" round dark>clear</v-btn> 915 <v-btn @click="clear" round dark>clear</v-btn>
909 </v-flex> 916 </v-flex>
910 <v-flex xs6> 917 <v-flex xs6>
911 <v-btn @click="submit" round dark :loading="loading" class="right">Add</v-btn> 918 <v-btn @click="submit" round dark :loading="loading" class="right">Add</v-btn>
912 </v-flex> 919 </v-flex>
913 </v-layout> 920 </v-layout>
914 </v-flex> 921 </v-flex>
915 </v-layout> 922 </v-layout>
916 </v-container> 923 </v-container>
917 </v-form> 924 </v-form>
918 </v-card> 925 </v-card>
919 </v-flex> 926 </v-flex>
920 </v-container> 927 </v-container>
921 </v-tab-item> 928 </v-tab-item>
922 </v-tabs> 929 </v-tabs>
923 <div class="loader" v-if="showLoader"> 930 <div class="loader" v-if="showLoader">
924 <v-progress-circular indeterminate color="white"></v-progress-circular> 931 <v-progress-circular indeterminate color="white"></v-progress-circular>
925 </div> 932 </div>
926 </v-app> 933 </v-app>
927 </template> 934 </template>
928 935
929 <script> 936 <script>
930 import http from "@/Services/http.js"; 937 import http from "@/Services/http.js";
931 import moment from "moment"; 938 import moment from "moment";
932 import countryList from "@/script/country.js"; 939 import countryList from "@/script/country.js";
933 940
934 export default { 941 export default {
935 data: () => ({ 942 data: () => ({
936 component: "report-generate", 943 component: "report-generate",
937 snackbar: false, 944 snackbar: false,
938 y: "top", 945 y: "top",
939 x: "right", 946 x: "right",
940 mode: "", 947 mode: "",
941 timeout: 3000, 948 timeout: 3000,
942 text: "", 949 text: "",
943 showLoader: false, 950 showLoader: false,
944 loading: false, 951 loading: false,
945 date: null, 952 date: null,
946 search: "", 953 search: "",
947 menu: false, 954 menu: false,
948 menu1: false, 955 menu1: false,
949 menu2: false, 956 menu2: false,
950 menu3: false, 957 menu3: false,
951 dialog: false, 958 dialog: false,
952 dialog1: false, 959 dialog1: false,
953 valid: true, 960 valid: true,
954 isActive: true, 961 isActive: true,
955 newActive: false, 962 newActive: false,
956 pagination: { 963 pagination: {
957 rowsPerPage: 15 964 rowsPerPage: 15
958 }, 965 },
959 imageData: {}, 966 imageData: {},
960 imageName: "", 967 imageName: "",
961 imageUrl: "", 968 imageUrl: "",
962 imageFile: "", 969 imageFile: "",
963 nameRules: [v => !!v || " Full Name is required"], 970 nameRules: [v => !!v || " Full Name is required"],
964 dateRules: [v => !!v || " DOB is required"], 971 dateRules: [v => !!v || " DOB is required"],
965 cityRules: [v => !!v || " City Name is required"], 972 cityRules: [v => !!v || " City Name is required"],
966 pincode: [v => !!v || " Pincode is required"], 973 pincode: [v => !!v || " Pincode is required"],
967 country: [v => !!v || " Country Name is required"], 974 country: [v => !!v || " Country Name is required"],
968 permanentAddress: [v => !!v || " Permanent Address is required"], 975 permanentAddress: [v => !!v || " Permanent Address is required"],
969 presentAddress: [v => !!v || " Present Address is required"], 976 presentAddress: [v => !!v || " Present Address is required"],
970 mobileNoRules: [v => !!v || "Mobile Number is required"], 977 mobileNoRules: [v => !!v || "Mobile Number is required"],
971 stateRules: [v => !!v || "State Name is required"], 978 stateRules: [v => !!v || "State Name is required"],
972 joinDateRules: [v => !!v || " Join Date is required"], 979 joinDateRules: [v => !!v || " Join Date is required"],
973 errorMessages: "", 980 errorMessages: "",
981 switch1: true,
974 countries: [], 982 countries: [],
975 headers: [ 983 headers: [
976 { 984 {
977 text: "No", 985 text: "No",
978 align: "center", 986 align: "center",
979 sortable: false, 987 sortable: false,
980 value: "No" 988 value: "No"
981 }, 989 },
982 { 990 {
983 text: "Profile Pic", 991 text: "Profile Pic",
984 value: "profilePicUrl", 992 value: "profilePicUrl",
985 sortable: false, 993 sortable: false,
986 align: "center" 994 align: "center"
987 }, 995 },
988 { text: "Name", value: "name", sortable: false, align: "center" }, 996 { text: "Name", value: "name", sortable: false, align: "center" },
989 { text: "Email", value: "email", sortable: false, align: "center" }, 997 { text: "Email", value: "email", sortable: false, align: "center" },
990 { text: "DOB", value: "dob", sortable: false, align: "center" }, 998 { text: "DOB", value: "dob", sortable: false, align: "center" },
991 { 999 {
992 text: "Join Date", 1000 text: "Join Date",
993 value: "joinDate", 1001 value: "joinDate",
994 sortable: false, 1002 sortable: false,
995 align: "center" 1003 align: "center"
996 }, 1004 },
997 { 1005 {
998 text: "Mobile No", 1006 text: "Mobile No",
999 value: "mobileNo", 1007 value: "mobileNo",
1000 sortable: false, 1008 sortable: false,
1001 align: "center" 1009 align: "center"
1002 }, 1010 },
1011 {
1012 text: "Status",
1013 value: "status",
1014 sortable: false,
1015 align: "center"
1016 },
1003 { text: "Action", value: "", sortable: false, align: "center" } 1017 { text: "Action", value: "", sortable: false, align: "center" }
1004 ], 1018 ],
1005 desserts: [], 1019 desserts: [],
1006 editedIndex: -1, 1020 editedIndex: -1,
1007 upload: "", 1021 upload: "",
1008 editedItem: { 1022 editedItem: {
1009 role: "TEACHER", 1023 role: "TEACHER",
1010 name: "", 1024 name: "",
1011 email: "", 1025 email: "",
1012 date: null, 1026 date: null,
1013 city: "", 1027 city: "",
1014 pincode: "", 1028 pincode: "",
1015 country: "", 1029 country: "",
1016 permanentAddress: "", 1030 permanentAddress: "",
1017 presentAddress: "", 1031 presentAddress: "",
1018 mobileNo: "", 1032 mobileNo: "",
1019 state: "", 1033 state: "",
1020 joinDate: null 1034 joinDate: null
1021 }, 1035 },
1022 addTeachers: { 1036 addTeachers: {
1023 role: "TEACHER", 1037 role: "TEACHER",
1024 name: "", 1038 name: "",
1025 email: "", 1039 email: "",
1026 date: null, 1040 date: null,
1027 city: "", 1041 city: "",
1028 pincode: "", 1042 pincode: "",
1029 country: "", 1043 country: "",
1030 permanentAddress: "", 1044 permanentAddress: "",
1031 presentAddress: "", 1045 presentAddress: "",
1032 mobileNo: "", 1046 mobileNo: "",
1033 state: "", 1047 state: "",
1034 joinDate: null 1048 joinDate: null
1035 }, 1049 },
1036 defaultItem: { 1050 defaultItem: {
1037 role: "TEACHER", 1051 role: "TEACHER",
1038 name: "", 1052 name: "",
1039 email: "" 1053 email: ""
1040 } 1054 },
1055 status: ""
1041 }), 1056 }),
1042 watch: { 1057 watch: {
1043 menu(val) { 1058 menu(val) {
1044 val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); 1059 val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR"));
1045 }, 1060 },
1046 menu1(val) { 1061 menu1(val) {
1047 val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); 1062 val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR"));
1048 } 1063 }
1049 }, 1064 },
1050 methods: { 1065 methods: {
1051 save(date) { 1066 save(date) {
1052 this.$refs.menu.save(date); 1067 this.$refs.menu.save(date);
1053 }, 1068 },
1054 save(date) { 1069 save(date) {
1055 this.$refs.menu1.save(date); 1070 this.$refs.menu1.save(date);
1056 }, 1071 },
1057 pickFile() { 1072 pickFile() {
1058 this.$refs.image.click(); 1073 this.$refs.image.click();
1059 }, 1074 },
1060 onFilePicked(e) { 1075 onFilePicked(e) {
1061 // console.log(e) 1076 // console.log(e)
1062 const files = e.target.files; 1077 const files = e.target.files;
1063 this.upload = e.target.files[0]; 1078 this.upload = e.target.files[0];
1064 console.log("imageData-upload========>", this.upload); 1079 console.log("imageData-upload========>", this.upload);
1065 if (files[0] !== undefined) { 1080 if (files[0] !== undefined) {
1066 this.imageName = files[0].name; 1081 this.imageName = files[0].name;
1067 if (this.imageName.lastIndexOf(".") <= 0) { 1082 if (this.imageName.lastIndexOf(".") <= 0) {
1068 return; 1083 return;
1069 } 1084 }
1070 const fr = new FileReader(); 1085 const fr = new FileReader();
1071 fr.readAsDataURL(files[0]); 1086 fr.readAsDataURL(files[0]);
1072 fr.addEventListener("load", () => { 1087 fr.addEventListener("load", () => {
1073 this.imageUrl = fr.result; 1088 this.imageUrl = fr.result;
1074 this.imageFile = files[0]; // this is an image file that can be sent to server... 1089 this.imageFile = files[0]; // this is an image file that can be sent to server...
1075 // this.imageData.imageUrl = URL.createObjectURL(this.imageFile); 1090 // this.imageData.imageUrl = URL.createObjectURL(this.imageFile);
1076 // console.log("upload=======>", this.imageData.imageUrl); 1091 // console.log("upload=======>", this.imageData.imageUrl);
1077 console.log("imageFile", this.imageUrl); 1092 console.log("imageFile", this.imageUrl);
1078 }); 1093 });
1079 } else { 1094 } else {
1080 this.imageName = ""; 1095 this.imageName = "";
1081 this.imageFile = ""; 1096 this.imageFile = "";
1082 this.imageUrl = ""; 1097 this.imageUrl = "";
1083 } 1098 }
1084 }, 1099 },
1085 dates: function(date) { 1100 dates: function(date) {
1086 return moment(date).format("MMMM DD, YYYY"); 1101 return moment(date).format("MMMM DD, YYYY");
1087 }, 1102 },
1088 getTeacherList() { 1103 getTeacherList() {
1089 this.showLoader = true; 1104 this.showLoader = true;
1090 var token = this.$store.state.token; 1105 var token = this.$store.state.token;
1091 http() 1106 http()
1092 .get("/getTeachersList", { 1107 .get("/getTeachersList", {
1093 headers: { Authorization: "Bearer " + token } 1108 headers: { Authorization: "Bearer " + token }
1094 }) 1109 })
1095 .then(response => { 1110 .then(response => {
1096 this.desserts = response.data.data; 1111 this.desserts = response.data.data;
1097 this.showLoader = false; 1112 this.showLoader = false;
1098 // console.log("getTeacherList=====>",this.desserts) 1113 // console.log("getTeacherList=====>",this.desserts)
1099 }) 1114 })
1100 .catch(error => { 1115 .catch(error => {
1101 this.showLoader = false; 1116 this.showLoader = false;
1102 if (error.response.status === 401) { 1117 if (error.response.status === 401) {
1103 this.$router.replace({ path: "/" }); 1118 this.$router.replace({ path: "/" });
1104 this.$store.dispatch("setToken", null); 1119 this.$store.dispatch("setToken", null);
1105 this.$store.dispatch("Id", null); 1120 this.$store.dispatch("Id", null);
1106 } 1121 }
1107 }); 1122 });
1108 }, 1123 },
1109 editItem(item) { 1124 editItem(item) {
1110 this.editedIndex = this.desserts.indexOf(item); 1125 this.editedIndex = this.desserts.indexOf(item);
1111 this.editedItem = Object.assign({}, item); 1126 this.editedItem = Object.assign({}, item);
1112 this.editedItem.dob = 1127 this.editedItem.dob =
1113 this.editedItem.dob != undefined 1128 this.editedItem.dob != undefined
1114 ? (this.editedItem.dob = this.editedItem.dob.substring(0, 10)) 1129 ? (this.editedItem.dob = this.editedItem.dob.substring(0, 10))
1115 : (this.editedItem.dob = ""); 1130 : (this.editedItem.dob = "");
1116 this.editedItem.joinDate = 1131 this.editedItem.joinDate =
1117 this.editedItem.joinDate != undefined 1132 this.editedItem.joinDate != undefined
1118 ? (this.editedItem.joinDate = this.editedItem.joinDate.substring( 1133 ? (this.editedItem.joinDate = this.editedItem.joinDate.substring(
1119 0, 1134 0,
1120 10 1135 10
1121 )) 1136 ))
1122 : (this.editedItem.joinDate = ""); 1137 : (this.editedItem.joinDate = "");
1123 1138
1124 this.dialog = true; 1139 this.dialog = true;
1125 }, 1140 },
1126 profile(item) { 1141 profile(item) {
1127 this.editedIndex = this.desserts.indexOf(item); 1142 this.editedIndex = this.desserts.indexOf(item);
1128 this.editedItem = Object.assign({}, item); 1143 this.editedItem = Object.assign({}, item);
1129 this.dialog1 = true; 1144 this.dialog1 = true;
1130 }, 1145 },
1131 deleteItem(item) { 1146 deleteItem(item) {
1132 let deleteTeachers = { 1147 let deleteTeachers = {
1133 teacherId: item._id 1148 teacherId: item._id
1134 }; 1149 };
1135 // console.log("deleteUers",deleteTeachers) 1150 // console.log("deleteUers",deleteTeachers)
1136 http() 1151 http()
1137 .delete( 1152 .delete(
1138 "/deleteTeacher", 1153 "/deleteTeacher",
1139 confirm("Are you sure you want to delete this?") && { 1154 confirm("Are you sure you want to delete this?") && {
1140 params: deleteTeachers 1155 params: deleteTeachers
1141 } 1156 }
1142 ) 1157 )
1143 .then(response => { 1158 .then(response => {
1144 // console.log("deleteUers",deleteTeachers) 1159 // console.log("deleteUers",deleteTeachers)
1145 if ((this.snackbar = true)) { 1160 if ((this.snackbar = true)) {
1146 this.text = "Successfully delete Existing Teacher"; 1161 this.text = "Successfully delete Existing Teacher";
1147 } 1162 }
1148 this.getTeacherList(); 1163 this.getTeacherList();
1149 }) 1164 })
1150 .catch(error => { 1165 .catch(error => {
1151 console.log(error); 1166 console.log(error);
1152 }); 1167 });
1153 }, 1168 },
1154 activeTab(type) { 1169 activeTab(type) {
1155 switch (type) { 1170 switch (type) {
1156 case "existing": 1171 case "existing":
1157 this.newActive = false; 1172 this.newActive = false;
1158 this.isActive = true; 1173 this.isActive = true;
1159 break; 1174 break;
1160 1175
1161 default: 1176 default:
1162 this.newActive = true; 1177 this.newActive = true;
1163 this.isActive = false; 1178 this.isActive = false;
1164 break; 1179 break;
1165 } 1180 }
1166 }, 1181 },
1167 close() { 1182 close() {
1168 this.dialog = false; 1183 this.dialog = false;
1169 setTimeout(() => { 1184 setTimeout(() => {
1170 this.editedItem = Object.assign({}, this.defaultItem); 1185 this.editedItem = Object.assign({}, this.defaultItem);
1171 this.editedIndex = -1; 1186 this.editedIndex = -1;
1172 }, 300); 1187 }, 300);
1173 }, 1188 },
1174 close1() { 1189 close1() {
1175 this.dialog1 = false; 1190 this.dialog1 = false;
1176 }, 1191 },
1177 copyData() { 1192 copyData() {
1178 this.addTeachers.permanentAddress = this.addTeachers.presentAddress; 1193 this.addTeachers.permanentAddress = this.addTeachers.presentAddress;
1179 }, 1194 },
1180 submit() { 1195 submit() {
1181 if (this.$refs.form.validate()) { 1196 if (this.$refs.form.validate()) {
1182 let addTeacher = { 1197 let addTeacher = {
1183 name: this.addTeachers.name, 1198 name: this.addTeachers.name,
1184 email: this.addTeachers.email, 1199 email: this.addTeachers.email,
1185 role: this.addTeachers.role, 1200 role: this.addTeachers.role,
1186 dob: this.addTeachers.date, 1201 dob: this.addTeachers.date,
1187 city: this.addTeachers.city, 1202 city: this.addTeachers.city,
1188 pincode: this.addTeachers.pincode, 1203 pincode: this.addTeachers.pincode,
1189 country: this.addTeachers.country, 1204 country: this.addTeachers.country,
1190 permanentAddress: this.addTeachers.permanentAddress, 1205 permanentAddress: this.addTeachers.permanentAddress,
1191 presentAddress: this.addTeachers.presentAddress, 1206 presentAddress: this.addTeachers.presentAddress,
1192 mobileNo: this.addTeachers.mobileNo, 1207 mobileNo: this.addTeachers.mobileNo,
1193 state: this.addTeachers.state, 1208 state: this.addTeachers.state,
1194 joinDate: this.addTeachers.joinDate 1209 joinDate: this.addTeachers.joinDate
1195 }; 1210 };
1196 if (this.imageUrl) { 1211 if (this.imageUrl) {
1197 var str = this.imageUrl; 1212 var str = this.imageUrl;
1198 const [baseUrl, imageUrl] = str.split(/,/); 1213 const [baseUrl, imageUrl] = str.split(/,/);
1199 addTeacher.upload = imageUrl; 1214 addTeacher.upload = imageUrl;
1200 } 1215 }
1201 this.loading = true; 1216 this.loading = true;
1202 http() 1217 http()
1203 .post("/createTeacher", addTeacher) 1218 .post("/createTeacher", addTeacher)
1204 .then(response => { 1219 .then(response => {
1205 this.imageUrl = ""; 1220 this.imageUrl = "";
1206 this.getTeacherList(); 1221 this.getTeacherList();
1207 this.snackbar = true; 1222 this.snackbar = true;
1208 this.text = "New Teacher added successfully"; 1223 this.text = "New Teacher added successfully";
1209 this.clear(); 1224 this.clear();
1210 this.loading = false; 1225 this.loading = false;
1211 }) 1226 })
1212 .catch(error => { 1227 .catch(error => {
1213 // console.log(error); 1228 // console.log(error);
1214 if ((this.snackbar = true)) { 1229 if ((this.snackbar = true)) {
1215 this.text = error.response.data.message; 1230 this.text = error.response.data.message;
1216 } 1231 }
1217 this.loading = false; 1232 this.loading = false;
1218 }); 1233 });
1219 } 1234 }
1220 }, 1235 },
1221 clear() { 1236 clear() {
1222 this.$refs.form.reset(); 1237 this.$refs.form.reset();
1223 this.imageUrl = ""; 1238 this.imageUrl = "";
1224 }, 1239 },
1225 save() { 1240 save() {
1226 this.loading = true; 1241 this.loading = true;
1227 let editTeacher = { 1242 let editTeacher = {
1228 teacherId: this.editedItem._id, 1243 teacherId: this.editedItem._id,
1229 name: this.editedItem.name, 1244 name: this.editedItem.name,
1230 email: this.editedItem.email, 1245 email: this.editedItem.email,
1231 role: this.editedItem.role, 1246 role: this.editedItem.role,
1232 dob: this.editedItem.dob, 1247 dob: this.editedItem.dob,
1233 city: this.editedItem.city, 1248 city: this.editedItem.city,
1234 pincode: this.editedItem.pincode, 1249 pincode: this.editedItem.pincode,
1235 country: this.editedItem.country, 1250 country: this.editedItem.country,
1236 permanentAddress: this.editedItem.permanentAddress, 1251 permanentAddress: this.editedItem.permanentAddress,
1237 presentAddress: this.editedItem.presentAddress, 1252 presentAddress: this.editedItem.presentAddress,
1238 mobileNo: this.editedItem.mobileNo, 1253 mobileNo: this.editedItem.mobileNo,
1239 state: this.editedItem.state, 1254 state: this.editedItem.state,
1240 joinDate: this.editedItem.joinDate 1255 joinDate: this.editedItem.joinDate
1241 }; 1256 };
1242 if (this.imageUrl) { 1257 if (this.imageUrl) {
1243 var str = this.imageUrl; 1258 var str = this.imageUrl;
1244 const [baseUrl, imageUrl] = str.split(/,/); 1259 const [baseUrl, imageUrl] = str.split(/,/);
1245 editTeacher.upload = imageUrl; 1260 editTeacher.upload = imageUrl;
1246 } 1261 }
1247 http() 1262 http()
1248 .put("/updateTeacher", editTeacher) 1263 .put("/suspendAccount", editTeacher)
1249 .then(response => { 1264 .then(response => {
1250 console.log("editTeacher", editTeacher); 1265 console.log("editTeacher", editTeacher);
1251 this.snackbar = true; 1266 this.snackbar = true;
1252 this.text = "Successfully Edit Existing Teacher"; 1267 this.text = "Successfully Edit Existing Teacher";
1253 this.loading = false; 1268 this.loading = false;
1254 this.getTeacherList(); 1269 this.getTeacherList();
1255 this.close(); 1270 this.close();
1256 }) 1271 })
1257 .catch(error => { 1272 .catch(error => {
1258 console.log(error); 1273 console.log(error);
1259 this.loading = false; 1274 this.loading = false;
1260 }); 1275 });
1276 },
1277 suspendStatus(suspendStatus, id) {
1278 if (suspendStatus == true) {
1279 this.status = "ON";
1280 } else if (suspendStatus == false) {
1281 this.status = "OFF";
1282 }
1283 let suspendStatusData = {
1284 teacherId: id,
1285 status: suspendStatus
1286 };
1287 http()
1288 .put("/suspendAccount", suspendStatusData)
1289 .then(response => {
1290 this.getTeacherList();
1291 this.text = response.data.message;
1292 this.snackbar = true;
1293 })
1294 .catch(error => {
1295 // console.log(error.response.data.data);
1296 this.text = error.response.data.message;
1297 });
1261 } 1298 }
1262 }, 1299 },
1263 mounted() { 1300 mounted() {
1264 const getCountryList = countryList(); 1301 const getCountryList = countryList();
1265 this.countries = getCountryList; 1302 this.countries = getCountryList;
1266 this.getTeacherList(); 1303 this.getTeacherList();
1267 }, 1304 },
1268 created() { 1305 created() {
1269 this.$root.$on("app:search", search => { 1306 this.$root.$on("app:search", search => {
1270 this.search = search; 1307 this.search = search;
1271 }); 1308 });
1272 }, 1309 },
1273 beforeDestroy() { 1310 beforeDestroy() {
1274 // dont forget to remove the listener 1311 // dont forget to remove the listener
1275 this.$root.$off("app:search"); 1312 this.$root.$off("app:search");
1276 } 1313 }
1277 }; 1314 };
1278 </script> 1315 </script>
1279 <style scoped> 1316 <style scoped>
1280 .active { 1317 .active {
1281 background-color: gray; 1318 background-color: gray;
1282 color: white !important; 1319 color: white !important;
1283 } 1320 }
1284 .activebtn { 1321 .activebtn {
1285 color: black !important; 1322 color: black !important;
1286 } 1323 }
1287 </style> 1324 </style>