Commit b82d0d998b496b44f909ec0fb03a28ccb6bb7edc
1 parent
d75967ec20
Exists in
master
and in
3 other branches
changes and modified in students and techers
Showing
1 changed file
with
1518 additions
and
478 deletions
Show diff stats
src/pages/Students/students.vue
1 | 1 | <template> |
2 | -<v-app id="pages-dasboard"> | |
3 | - <v-toolbar | |
4 | - color="grey" | |
5 | - fixed | |
6 | - app | |
7 | - > | |
8 | - <v-toolbar-title class="ml-0 pl-3"> | |
9 | - <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon> | |
10 | - </v-toolbar-title> | |
11 | -<!-- ****** SEARCH ALL EXISTING StudentS ****** --> | |
12 | - <v-flex xs7 sm3 class="userSearch"> | |
13 | - <v-text-field | |
14 | - flat | |
15 | - prepend-icon="search" | |
16 | - label="Find your Teachers" | |
17 | - v-model="search" | |
18 | - color="black" | |
19 | - @change="getStudentList" | |
20 | - > | |
21 | - </v-text-field> | |
22 | - </v-flex> | |
2 | + <v-app id="pages-dasboard"> | |
3 | + <v-toolbar class="fixcolors" fixed app> | |
4 | + <v-toolbar-title class="ml-0 pl-3"> | |
5 | + <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon> | |
6 | + </v-toolbar-title> | |
7 | + <!-- ****** SEARCH ALL EXISTING StudentS ****** --> | |
8 | + <v-flex xs7 sm3 class="userSearch"> | |
9 | + <v-text-field | |
10 | + flat | |
11 | + append-icon="search" | |
12 | + label="Find your Students" | |
13 | + v-model="search" | |
14 | + color="white" | |
15 | + dark | |
16 | + ></v-text-field> | |
17 | + </v-flex> | |
23 | 18 | <v-spacer></v-spacer> |
24 | 19 | <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition"> |
25 | - <v-btn icon large flat slot="activator"> | |
20 | + <v-btn icon large flat slot="activator"> | |
26 | 21 | <v-avatar size="40px"> |
27 | - <img src="/static/icon/user.png"/> | |
22 | + <img src="/static/icon/user.png"> | |
28 | 23 | </v-avatar> |
29 | - </v-btn> | |
24 | + </v-btn> | |
30 | 25 | <v-list class="pa-0"> |
31 | - <v-list-tile v-for="(item,index) in items" :to="!item.href ? { name: item.name } : null" :href="item.href" @click="item.click" ripple="ripple" :disabled="item.disabled" :target="item.target" rel="noopener" :key="index"> | |
32 | - <v-list-tile-action v-if="item.icon"> | |
26 | + <v-list-tile | |
27 | + v-for="(item,index) in items" | |
28 | + :to="!item.href ? { name: item.name } : null" | |
29 | + :href="item.href" | |
30 | + @click="item.click" | |
31 | + ripple="ripple" | |
32 | + :disabled="item.disabled" | |
33 | + :target="item.target" | |
34 | + rel="noopener" | |
35 | + :key="index" | |
36 | + > | |
37 | + <v-list-tile-action v-if="item.icon"> | |
33 | 38 | <v-icon>{{ item.icon }}</v-icon> |
34 | 39 | </v-list-tile-action> |
35 | 40 | <v-list-tile-content> |
36 | 41 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
37 | 42 | </v-list-tile-content> |
38 | 43 | </v-list-tile> |
39 | - </v-list> | |
44 | + </v-list> | |
40 | 45 | </v-menu> |
41 | - </v-toolbar> | |
42 | - <v-tabs grow slider-color="black"> | |
43 | - <v-tab | |
44 | - ripple | |
45 | - @click="activeTab('existing')" | |
46 | - v-bind:class="{ active: isActive }" | |
47 | - id="tab" | |
48 | - class="subheading" | |
49 | - >Existing Students</v-tab> | |
50 | - <v-tab | |
51 | - ripple | |
52 | - @click="activeTab('new')" | |
53 | - v-bind:class="{ active: newActive }" | |
54 | - id="tab1"User | |
55 | - class="subheading" | |
56 | - >Add New Students</v-tab> | |
57 | -<!-- ****** EDITS StudentS Dtails ****** --> | |
58 | - <v-tab-item> | |
59 | - <v-snackbar | |
60 | - :timeout="timeout" | |
61 | - :top="y === 'top'" | |
62 | - :right="x === 'right'" | |
63 | - :vertical="mode === 'vertical'" | |
64 | - v-model="snackbar" | |
65 | - color="success" | |
66 | - >{{ text }}</v-snackbar> | |
67 | - <v-dialog v-model="dialog" max-width="500px"> | |
68 | - <v-toolbar color="white"> | |
69 | - <v-spacer></v-spacer> | |
70 | - <v-toolbar-title>Edit Profile</v-toolbar-title> | |
71 | - <v-spacer></v-spacer> | |
72 | - </v-toolbar> | |
73 | - <v-card> | |
74 | - <!-- <v-flex align-center justify-center layout text-xs-center> | |
75 | - <v-avatar size="50px" style="position:absolute; top:10px; "> | |
76 | - <img src="/static/icon/user.png"> | |
77 | - </v-avatar> | |
78 | - </v-flex> --> | |
79 | - <v-card-text> | |
80 | - <v-container> | |
81 | - <v-layout wrap justify-center> | |
82 | - <v-flex xs12 sm9> | |
83 | - <v-form ref="form" v-model="valid" lazy-validation> | |
84 | - <v-layout style="position:relative;"> | |
85 | - <v-flex xs4 class="pt-4 subheading"> | |
86 | - <label>Full Name:</label> | |
46 | + </v-toolbar> | |
47 | + <v-tabs grow slider-color="black"> | |
48 | + <v-tab | |
49 | + ripple | |
50 | + @click="activeTab('existing')" | |
51 | + v-bind:class="{ active: isActive }" | |
52 | + id="tab" | |
53 | + class="subheading" | |
54 | + >Existing Students</v-tab> | |
55 | + <v-tab | |
56 | + ripple | |
57 | + @click="activeTab('new')" | |
58 | + v-bind:class="{ active: newActive }" | |
59 | + id="tab1" | |
60 | + User | |
61 | + class="subheading" | |
62 | + >Add New Students</v-tab> | |
63 | + | |
64 | + <!-- ****** EDITS STUDENTS DETAILS ****** --> | |
65 | + | |
66 | + <v-tab-item> | |
67 | + <v-snackbar | |
68 | + :timeout="timeout" | |
69 | + :top="y === 'top'" | |
70 | + :right="x === 'right'" | |
71 | + :vertical="mode === 'vertical'" | |
72 | + v-model="snackbar" | |
73 | + color="success" | |
74 | + >{{ text }}</v-snackbar> | |
75 | + <v-dialog v-model="dialog" max-width="1000px"> | |
76 | + <v-flex xs12 sm12 class=""> | |
77 | + <v-toolbar color="white"> | |
78 | + <v-spacer></v-spacer> | |
79 | + <v-toolbar-title>Edit Profile</v-toolbar-title> | |
80 | + <v-spacer></v-spacer> | |
81 | + </v-toolbar> | |
82 | + <v-card flat> | |
83 | + <v-form ref="form"> | |
84 | + <v-container fluid> | |
85 | + <v-layout> | |
86 | + <v-flex | |
87 | + xs12 | |
88 | + class="text-xs-center text-sm-center text-md-center text-lg-center mr-4" | |
89 | + > | |
90 | + <v-avatar size="100px"> | |
91 | + <img src="/static/icon/user.png" v-if="!imageUrl"> | |
92 | + </v-avatar> | |
93 | + <input | |
94 | + type="file" | |
95 | + style="display: none" | |
96 | + ref="image" | |
97 | + accept="image/*" | |
98 | + @change="onFilePicked" | |
99 | + > | |
100 | + <img | |
101 | + :src="imageData.imageUrl" | |
102 | + height="150" | |
103 | + v-if="imageUrl" | |
104 | + style="border-radius:50%; width:200px" | |
105 | + > | |
106 | + </v-flex> | |
107 | + </v-layout> | |
108 | + <v-layout> | |
109 | + <v-flex xs12 sm6> | |
110 | + <v-layout> | |
111 | + <v-flex xs4 class="pt-4 subheading"> | |
112 | + <label class="right">Select Class:</label> | |
113 | + </v-flex> | |
114 | + <v-flex xs8 class="ml-3"> | |
115 | + <v-select | |
116 | + :items="addclass" | |
117 | + label="Select Class" | |
118 | + v-model="editedItem.select" | |
119 | + item-text="classNum" | |
120 | + item-value="_id" | |
121 | + name="Select Class" | |
122 | + @change="getSections(editedItem.select)" | |
123 | + required | |
124 | + ></v-select> | |
125 | + </v-flex> | |
126 | + </v-layout> | |
127 | + </v-flex> | |
128 | + <v-flex xs12 sm6> | |
129 | + <v-layout> | |
130 | + <v-flex xs4 class="pt-4 subheading"> | |
131 | + <label class="right">Select Section:</label> | |
132 | + </v-flex> | |
133 | + <v-flex xs8 class="ml-3"> | |
134 | + <v-select | |
135 | + :items="addSection" | |
136 | + label="Select Section" | |
137 | + v-model="editedItem.selectSection" | |
138 | + item-text="name" | |
139 | + item-value="_id" | |
140 | + name="Select Section" | |
141 | + required | |
142 | + ></v-select> | |
143 | + </v-flex> | |
144 | + </v-layout> | |
145 | + </v-flex> | |
146 | + </v-layout> | |
147 | + <v-layout> | |
148 | + <v-flex xs12 sm6> | |
149 | + <v-layout> | |
150 | + <v-flex xs4 class="pt-4 subheading"> | |
151 | + <label class="right">Full Name:</label> | |
152 | + </v-flex> | |
153 | + <v-flex xs8 class="ml-3"> | |
154 | + <v-text-field | |
155 | + v-model="editedItem.name" | |
156 | + placeholder="fill your full Name" | |
157 | + name="name" | |
158 | + type="text" | |
159 | + required | |
160 | + ></v-text-field> | |
161 | + </v-flex> | |
162 | + </v-layout> | |
163 | + </v-flex> | |
164 | + <v-flex xs12 sm6> | |
165 | + <v-layout> | |
166 | + <v-flex xs4 class="pt-4 subheading"> | |
167 | + <label class="right">Email ID:</label> | |
168 | + </v-flex> | |
169 | + <v-flex xs8 class="ml-3"> | |
170 | + <v-text-field | |
171 | + placeholder="fill your email" | |
172 | + v-model="editedItem.email" | |
173 | + type="text" | |
174 | + name="email" | |
175 | + required | |
176 | + ></v-text-field> | |
177 | + </v-flex> | |
178 | + </v-layout> | |
179 | + </v-flex> | |
180 | + </v-layout> | |
181 | + <v-layout> | |
182 | + <v-flex xs12 sm6> | |
183 | + <v-layout> | |
184 | + <v-flex xs4 class="pt-4 subheading"> | |
185 | + <label class="right">Date of Birth:</label> | |
186 | + </v-flex> | |
187 | + <v-flex xs8 class="ml-3"> | |
188 | + <v-menu | |
189 | + ref="menu" | |
190 | + :close-on-content-click="false" | |
191 | + v-model="menu1" | |
192 | + :nudge-right="40" | |
193 | + lazy | |
194 | + transition="scale-transition" | |
195 | + offset-y | |
196 | + full-width | |
197 | + min-width="290px" | |
198 | + > | |
199 | + <v-text-field | |
200 | + slot="activator" | |
201 | + v-model="editedItem.date" | |
202 | + placeholder="Select date" | |
203 | + ></v-text-field> | |
204 | + <v-date-picker | |
205 | + ref="picker" | |
206 | + v-model="editedItem.date" | |
207 | + :max="new Date().toISOString().substr(0, 10)" | |
208 | + min="1950-01-01" | |
209 | + @input="menu1 = false" | |
210 | + ></v-date-picker> | |
211 | + </v-menu> | |
212 | + </v-flex> | |
213 | + </v-layout> | |
214 | + </v-flex> | |
215 | + <v-flex xs12 sm6> | |
216 | + <v-layout> | |
217 | + <v-flex xs4 class="pt-4 subheading"> | |
218 | + <label class="right">City:</label> | |
219 | + </v-flex> | |
220 | + <v-flex xs8 class="ml-3"> | |
221 | + <v-text-field | |
222 | + v-model="editedItem.city" | |
223 | + placeholder="fill your City Name" | |
224 | + name="City" | |
225 | + type="text" | |
226 | + required | |
227 | + ></v-text-field> | |
228 | + </v-flex> | |
229 | + </v-layout> | |
230 | + </v-flex> | |
231 | + </v-layout> | |
232 | + <v-layout> | |
233 | + <v-flex xs12 sm6> | |
234 | + <v-layout> | |
235 | + <v-flex xs4 class="pt-4 subheading"> | |
236 | + <label class="right">State:</label> | |
237 | + </v-flex> | |
238 | + <v-flex xs8 class="ml-3"> | |
239 | + <v-text-field | |
240 | + v-model="editedItem.state" | |
241 | + placeholder="fill your State Name" | |
242 | + name="state" | |
243 | + type="text" | |
244 | + required | |
245 | + ></v-text-field> | |
246 | + </v-flex> | |
247 | + </v-layout> | |
248 | + </v-flex> | |
249 | + <v-flex xs12 sm6> | |
250 | + <v-layout> | |
251 | + <v-flex xs4 class="pt-4 subheading"> | |
252 | + <label class="right">Pincode:</label> | |
253 | + </v-flex> | |
254 | + <v-flex xs8 class="ml-3"> | |
255 | + <v-text-field | |
256 | + v-model="editedItem.pincode" | |
257 | + placeholder="fill your pincode" | |
258 | + name="pincode" | |
259 | + type="number" | |
260 | + required | |
261 | + ></v-text-field> | |
262 | + </v-flex> | |
263 | + </v-layout> | |
264 | + </v-flex> | |
265 | + </v-layout> | |
266 | + <v-layout> | |
267 | + <v-flex xs12 sm6> | |
268 | + <v-layout> | |
269 | + <v-flex xs4 class="pt-4 subheading"> | |
270 | + <label class="right">Mobile No:</label> | |
271 | + </v-flex> | |
272 | + <v-flex xs8 class="ml-3"> | |
273 | + <v-text-field | |
274 | + v-model="editedItem.mobile" | |
275 | + placeholder="fill your MobileNo" | |
276 | + name="mobileNo" | |
277 | + type="number" | |
278 | + required | |
279 | + ></v-text-field> | |
280 | + </v-flex> | |
281 | + </v-layout> | |
282 | + </v-flex> | |
283 | + <v-flex xs12 sm6> | |
284 | + <v-layout> | |
285 | + <v-flex xs4 class="pt-4 subheading"> | |
286 | + <label class="right">Select Country:</label> | |
287 | + </v-flex> | |
288 | + <v-flex xs8 class="ml-3"> | |
289 | + <v-autocomplete | |
290 | + v-model="editedItem.country" | |
291 | + :items="countries" | |
292 | + placeholder="Select Country Name" | |
293 | + required | |
294 | + ></v-autocomplete> | |
295 | + </v-flex> | |
296 | + </v-layout> | |
297 | + </v-flex> | |
298 | + </v-layout> | |
299 | + <v-layout> | |
300 | + <v-flex xs12 sm6> | |
301 | + <v-layout> | |
302 | + <v-flex xs4 class="pt-4 subheading"> | |
303 | + <label class="right">Gender:</label> | |
304 | + </v-flex> | |
305 | + <v-flex xs8 class="ml-3"> | |
306 | + <v-select | |
307 | + :items="gender" | |
308 | + v-model="editedItem.gender" | |
309 | + label="Select Gender" | |
310 | + required | |
311 | + ></v-select> | |
312 | + </v-flex> | |
313 | + </v-layout> | |
314 | + </v-flex> | |
315 | + <v-flex xs12 sm6> | |
316 | + <v-layout> | |
317 | + <v-flex xs4 class="pt-4 subheading"> | |
318 | + <label class="right">Father Name:</label> | |
319 | + </v-flex> | |
320 | + <v-flex xs8 class="ml-3"> | |
321 | + <v-text-field | |
322 | + v-model="editedItem.fatherName" | |
323 | + :items="countries" | |
324 | + placeholder="Fill your father Name" | |
325 | + required | |
326 | + ></v-text-field> | |
327 | + </v-flex> | |
328 | + </v-layout> | |
329 | + </v-flex> | |
330 | + </v-layout> | |
331 | + <v-layout> | |
332 | + <v-flex xs12 sm6> | |
333 | + <v-layout> | |
334 | + <v-flex xs4 class="pt-4 subheading"> | |
335 | + <label class="right">Father Cell No:</label> | |
336 | + </v-flex> | |
337 | + <v-flex xs8 class="ml-3"> | |
338 | + <v-text-field | |
339 | + v-model="editedItem.fatherCellNo" | |
340 | + placeholder="fill your father Cell Number" | |
341 | + name="state" | |
342 | + type="number" | |
343 | + required | |
344 | + ></v-text-field> | |
345 | + </v-flex> | |
346 | + </v-layout> | |
347 | + </v-flex> | |
348 | + <v-flex xs12 sm6> | |
349 | + <v-layout> | |
350 | + <v-flex xs4 class="pt-4 subheading"> | |
351 | + <label class="right">Mother Name:</label> | |
352 | + </v-flex> | |
353 | + <v-flex xs8 class="ml-3"> | |
354 | + <v-text-field | |
355 | + v-model="editedItem.motherName" | |
356 | + placeholder="fill your Mother Name" | |
357 | + name="state" | |
358 | + type="text" | |
359 | + required | |
360 | + ></v-text-field> | |
361 | + </v-flex> | |
362 | + </v-layout> | |
363 | + </v-flex> | |
364 | + </v-layout> | |
365 | + <v-layout> | |
366 | + <v-flex xs12 sm6> | |
367 | + <v-layout> | |
368 | + <v-flex xs4 class="pt-4 subheading"> | |
369 | + <label class="right">Mother Cell No:</label> | |
370 | + </v-flex> | |
371 | + <v-flex xs8 class="ml-3"> | |
372 | + <v-text-field | |
373 | + v-model="editedItem.motherCellNo" | |
374 | + placeholder="fill your Mother Cell Number" | |
375 | + name="state" | |
376 | + type="number" | |
377 | + required | |
378 | + ></v-text-field> | |
379 | + </v-flex> | |
380 | + </v-layout> | |
381 | + </v-flex> | |
382 | + <v-flex xs12 sm6> | |
383 | + <v-layout> | |
384 | + <v-flex xs4 class="pt-4 subheading"> | |
385 | + <label class="right">Academic Year:</label> | |
386 | + </v-flex> | |
387 | + <v-flex xs8 class="ml-3"> | |
388 | + <v-text-field | |
389 | + v-model="editedItem.establishmentYear" | |
390 | + placeholder="fill your Mother Name" | |
391 | + name="state" | |
392 | + type="number" | |
393 | + required | |
394 | + ></v-text-field> | |
395 | + </v-flex> | |
396 | + </v-layout> | |
397 | + </v-flex> | |
398 | + </v-layout> | |
399 | + <v-layout> | |
400 | + <v-flex xs12 sm6> | |
401 | + <v-layout> | |
402 | + <v-flex xs4 class="pt-4 subheading"> | |
403 | + <label class="right">Uplaod Image:</label> | |
404 | + </v-flex> | |
405 | + <v-flex xs8 class="ml-3"> | |
406 | + <v-text-field | |
407 | + label="Select Image" | |
408 | + @click="pickFile" | |
409 | + v-model="imageName" | |
410 | + prepend-icon="attach_file" | |
411 | + ></v-text-field> | |
412 | + </v-flex> | |
413 | + </v-layout> | |
414 | + </v-flex> | |
415 | + <v-flex xs12 sm6> | |
416 | + <v-layout> | |
417 | + <v-flex xs4 class="pt-4 subheading"> | |
418 | + <label class="right">Present Address:</label> | |
419 | + </v-flex> | |
420 | + <v-flex xs8 class="ml-3"> | |
421 | + <v-text-field | |
422 | + v-model="editedItem.presentAddress" | |
423 | + placeholder="fill Your present Address" | |
424 | + required | |
425 | + ></v-text-field> | |
426 | + </v-flex> | |
427 | + </v-layout> | |
428 | + </v-flex> | |
429 | + </v-layout> | |
430 | + <v-flex xs12 sm12> | |
431 | + <v-layout> | |
432 | + <v-flex xs3 class="pt-4 subheading" style="max-width: 17%;"> | |
433 | + <label>Permanent Address:</label> | |
434 | + </v-flex> | |
435 | + <v-flex xs12> | |
436 | + <v-text-field | |
437 | + name="input-4-3" | |
438 | + v-model="editedItem.permanentAddress" | |
439 | + placeholder="fill Your Permanent Address" | |
440 | + required | |
441 | + ></v-text-field> | |
442 | + </v-flex> | |
443 | + </v-layout> | |
444 | + </v-flex> | |
445 | + </v-layout> | |
446 | + <v-layout> | |
447 | + <v-flex xs12 sm12> | |
448 | + <v-card-actions> | |
449 | + <v-btn round dark @click.native="close">Cancel</v-btn> | |
450 | + <v-spacer></v-spacer> | |
451 | + <v-btn round dark @click="save">Save</v-btn> | |
452 | + </v-card-actions> | |
453 | + </v-flex> | |
454 | + </v-layout> | |
455 | + </v-container> | |
456 | + </v-form> | |
457 | + </v-card> | |
458 | + </v-flex> | |
459 | + </v-dialog> | |
460 | + | |
461 | + <!-- ****** PROFILE VIEW STUDENTS DEATILS ****** --> | |
462 | + <v-dialog v-model="dialog1" max-width="600px"> | |
463 | + <v-toolbar color="white"> | |
464 | + <v-spacer></v-spacer> | |
465 | + <v-toolbar-title>Profile</v-toolbar-title> | |
466 | + <v-spacer></v-spacer> | |
467 | + <v-icon @click="close1">close</v-icon> | |
468 | + </v-toolbar> | |
469 | + <v-card> | |
470 | + <v-flex align-center justify-center layout text-xs-center> | |
471 | + <v-avatar size="50px" style="position:absolute; top:20px;"> | |
472 | + <img src="/static/icon/user.png"> | |
473 | + </v-avatar> | |
474 | + </v-flex> | |
475 | + <v-card-text> | |
476 | + <v-container grid-list-md> | |
477 | + <v-layout wrap> | |
478 | + <v-flex> | |
479 | + <br> | |
480 | + <br> | |
481 | + <v-layout> | |
482 | + <v-flex xs5 sm6> | |
483 | + <h5 class="right my-1">Full Name:</h5> | |
87 | 484 | </v-flex> |
88 | - <v-flex xs8> | |
89 | - <v-text-field | |
90 | - v-model="editedItem.name" | |
91 | - v-validate="'required'" | |
92 | - :rules="nameRules" | |
93 | - data-vv-name="Name" | |
94 | - required | |
95 | - ></v-text-field> | |
485 | + <v-flex sm6 xs8> | |
486 | + <h5 class="my-1">{{ editedItem.name }}</h5> | |
96 | 487 | </v-flex> |
97 | 488 | </v-layout> |
98 | - <v-layout> | |
99 | - <v-flex xs4 class="pt-4 subheading"> | |
100 | - <label>Email No.:</label> | |
489 | + <v-layout> | |
490 | + <v-flex xs5 sm6> | |
491 | + <h5 class="right my-1">Email:</h5> | |
101 | 492 | </v-flex> |
102 | - <v-flex xs8> | |
103 | - <v-text-field | |
104 | - v-model="editedItem.email" | |
105 | - required | |
106 | - ></v-text-field> | |
493 | + <v-flex sm6 xs8> | |
494 | + <h5 class="my-1">{{ editedItem.email }}</h5> | |
107 | 495 | </v-flex> |
108 | 496 | </v-layout> |
109 | 497 | <v-layout> |
110 | - <v-flex xs4 class="pt-4 subheading"> | |
111 | - <label>Mobile No.:</label> | |
498 | + <v-flex xs6 sm6> | |
499 | + <h5 class="right my-1">Gender:</h5> | |
112 | 500 | </v-flex> |
113 | - <v-flex xs8> | |
114 | - <v-text-field | |
115 | - v-model="editedItem.mobile" | |
116 | - required | |
117 | - ></v-text-field> | |
501 | + <v-flex sm6 xs8> | |
502 | + <h5 class="my-1">{{ editedItem.gender }}</h5> | |
503 | + </v-flex> | |
504 | + </v-layout> | |
505 | + <v-layout> | |
506 | + <v-flex xs5 sm6> | |
507 | + <h5 class="right my-1">City:</h5> | |
508 | + </v-flex> | |
509 | + <v-flex sm6 xs8> | |
510 | + <h5 class="my-1">{{ editedItem.city }}</h5> | |
511 | + </v-flex> | |
512 | + </v-layout> | |
513 | + <v-layout> | |
514 | + <v-flex xs5 sm6> | |
515 | + <h5 class="right my-1">State:</h5> | |
516 | + </v-flex> | |
517 | + <v-flex sm6 xs8> | |
518 | + <h5 class="my-1">{{ editedItem.state }}</h5> | |
519 | + </v-flex> | |
520 | + </v-layout> | |
521 | + <v-layout> | |
522 | + <v-flex xs5 sm6> | |
523 | + <h5 class="right my-1">Country:</h5> | |
524 | + </v-flex> | |
525 | + <v-flex sm6 xs8> | |
526 | + <h5 class="my-1">{{ editedItem.country }}</h5> | |
527 | + </v-flex> | |
528 | + </v-layout> | |
529 | + <v-layout> | |
530 | + <v-flex xs5 sm6> | |
531 | + <h5 class="right my-1">Pincode:</h5> | |
532 | + </v-flex> | |
533 | + <v-flex sm6 xs8> | |
534 | + <h5 class="my-1">{{ editedItem.pincode }}</h5> | |
118 | 535 | </v-flex> |
119 | 536 | </v-layout> |
120 | 537 | <v-layout> |
121 | - <v-flex xs4 class="pt-4 subheading"> | |
122 | - <label>Date of Birth:</label> | |
538 | + <v-flex xs5 sm6> | |
539 | + <h5 class="right my-1">Mobile No:</h5> | |
123 | 540 | </v-flex> |
124 | - <v-flex xs8> | |
125 | - <v-menu | |
126 | - ref="menu1" | |
127 | - :close-on-content-click="false" | |
128 | - v-model="menu1" | |
129 | - :nudge-right="40" | |
130 | - lazy | |
131 | - transition="scale-transition" | |
132 | - offset-y | |
133 | - full-width | |
134 | - min-width="290px" | |
135 | - > | |
136 | - <v-text-field | |
137 | - slot="activator" | |
138 | - v-model="editedItem.dob" | |
139 | - placeholder="Select date" | |
140 | - ></v-text-field> | |
141 | - <v-date-picker | |
142 | - ref="picker" | |
143 | - v-model="editedItem.dob" | |
144 | - :max="new Date().toISOString().substr(0, 10)" | |
145 | - min="1950-01-01" | |
146 | - @input="menu1 = false" | |
147 | - ></v-date-picker> | |
148 | - </v-menu> | |
541 | + <v-flex sm6 xs8> | |
542 | + <h5 class="my-1">{{ editedItem.mobile }}</h5> | |
149 | 543 | </v-flex> |
150 | 544 | </v-layout> |
151 | - <v-card-actions> | |
152 | - <v-btn round dark @click.native="close">Cancel</v-btn> | |
153 | - <v-spacer></v-spacer> | |
154 | - <v-btn round dark @click="save">Save</v-btn> | |
155 | - </v-card-actions> | |
156 | - </v-form> | |
157 | - </v-flex> | |
158 | - </v-layout> | |
159 | - </v-container> | |
160 | - </v-card-text> | |
161 | - </v-card> | |
162 | - </v-dialog> | |
163 | - | |
164 | -<!-- ****** PROFILE VIEW StudentS Details ****** --> | |
165 | - | |
166 | - <v-dialog v-model="dialog1" max-width="600px"> | |
167 | - <v-toolbar color="white"> | |
168 | - <v-spacer></v-spacer> | |
169 | - <v-toolbar-title>Profile</v-toolbar-title> | |
170 | - <v-spacer></v-spacer> | |
171 | - <v-icon @click="close1">close</v-icon> | |
172 | - </v-toolbar> | |
173 | - <v-card> | |
174 | - <v-flex align-center justify-center layout text-xs-center> | |
175 | - <v-avatar size="50px" style="position:absolute; top:20px;"> | |
176 | - <img src="/static/icon/user.png"> | |
177 | - </v-avatar> | |
178 | - </v-flex> | |
179 | - <v-card-text> | |
180 | - <v-container grid-list-md> | |
181 | - <v-layout wrap> | |
182 | - <v-flex><br><br> | |
183 | - <v-layout> | |
184 | - <v-flex xs5 sm6> | |
185 | - <h5 class="right my-1">Full Name:</h5> | |
186 | - </v-flex> | |
187 | - <v-flex sm6 xs8> | |
188 | - <h5 class="my-1">{{ editedItem.name }}</h5> | |
189 | - </v-flex> | |
190 | - </v-layout> | |
191 | - <v-layout> | |
192 | - <v-flex xs5 sm6> | |
193 | - <h5 class="right my-1">Email:</h5> | |
194 | - </v-flex> | |
195 | - <v-flex sm6 xs8> | |
196 | - <h5 class="my-1">{{ editedItem.email }}</h5> | |
197 | - </v-flex> | |
198 | - </v-layout> | |
199 | - <v-layout> | |
545 | + <v-layout> | |
546 | + <v-flex xs5 sm6> | |
547 | + <h5 class="right my-1">Academic Year:</h5> | |
548 | + </v-flex> | |
549 | + <v-flex sm6 xs8> | |
550 | + <h5 class="my-1">{{ editedItem.establishmentYear }}</h5> | |
551 | + </v-flex> | |
552 | + </v-layout> | |
553 | + <v-layout> | |
554 | + <v-flex xs5 sm6> | |
555 | + <h5 class="right my-1">Fahter Name:</h5> | |
556 | + </v-flex> | |
557 | + <v-flex sm6 xs8> | |
558 | + <h5 class="my-1">{{ editedItem.fatherName }}</h5> | |
559 | + </v-flex> | |
560 | + </v-layout> | |
561 | + <v-layout> | |
562 | + <v-flex xs5 sm6> | |
563 | + <h5 class="right my-1">Mother Name:</h5> | |
564 | + </v-flex> | |
565 | + <v-flex sm6 xs8> | |
566 | + <h5 class="my-1">{{ editedItem.motherName }}</h5> | |
567 | + </v-flex> | |
568 | + </v-layout> | |
569 | + <v-layout> | |
570 | + <v-flex xs5 sm6> | |
571 | + <h5 class="right my-1">Father Cell No:</h5> | |
572 | + </v-flex> | |
573 | + <v-flex sm6 xs8> | |
574 | + <h5 class="my-1">{{ editedItem.fatherCellNo }}</h5> | |
575 | + </v-flex> | |
576 | + </v-layout> | |
577 | + <v-layout> | |
578 | + <v-flex xs5 sm6> | |
579 | + <h5 class="right my-1">Mother Cell No:</h5> | |
580 | + </v-flex> | |
581 | + <v-flex sm6 xs8> | |
582 | + <h5 class="my-1">{{ editedItem.motherCellNo }}</h5> | |
583 | + </v-flex> | |
584 | + </v-layout> | |
585 | + <v-layout> | |
586 | + <v-flex xs5 sm6> | |
587 | + <h5 class="right my-1">Date Of Birth:</h5> | |
588 | + </v-flex> | |
589 | + <v-flex sm6 xs8> | |
590 | + <h5 class="my-1">{{ editedItem.dob }}</h5> | |
591 | + </v-flex> | |
592 | + </v-layout> | |
593 | + <v-layout> | |
200 | 594 | <v-flex xs6 sm6 > |
201 | - <h5 class="right my-1">Mobile No. :</h5> | |
595 | + <h5 class="right my-1">Permanent Address:</h5> | |
202 | 596 | </v-flex> |
203 | 597 | <v-flex sm6 xs8> |
204 | - <h5 class="my-1">{{ editedItem.mobile }}</h5> | |
598 | + <h5 class="my-1">{{ editedItem.permanentAddress }}</h5> | |
205 | 599 | </v-flex> |
206 | - </v-layout> | |
207 | - <v-layout> | |
600 | + </v-layout> | |
601 | + <v-layout> | |
208 | 602 | <v-flex xs6 sm6 > |
209 | - <h5 class="right my-1">Date Of Birth:</h5> | |
603 | + <h5 class="right my-1">present Address:</h5> | |
210 | 604 | </v-flex> |
211 | 605 | <v-flex sm6 xs8> |
212 | - <h5 class="my-1">{{ editedItem.dob }}</h5> | |
606 | + <h5 class="my-1">{{ editedItem.presentAddress }}</h5> | |
213 | 607 | </v-flex> |
214 | - </v-layout> | |
215 | - </v-flex> | |
216 | - </v-layout> | |
217 | - </v-container> | |
218 | - </v-card-text> | |
219 | - </v-card> | |
220 | - </v-dialog> | |
221 | - | |
222 | - <v-snackbar | |
223 | - :timeout="timeout" | |
224 | - :top="y === 'top'" | |
225 | - :right="x === 'right'" | |
226 | - :vertical="mode === 'vertical'" | |
227 | - v-model="snackbar" | |
228 | - color="success" | |
229 | - >{{ text }}</v-snackbar> | |
230 | - | |
231 | -<!-- ****** EXISTING-USERS StudentS Table ****** --> | |
608 | + </v-layout> | |
609 | + </v-flex> | |
610 | + </v-layout> | |
611 | + </v-container> | |
612 | + </v-card-text> | |
613 | + </v-card> | |
614 | + </v-dialog> | |
232 | 615 | |
233 | - <v-data-table | |
234 | - :headers="headers" | |
235 | - :items="desserts" | |
236 | - :pagination.sync="pagination" | |
237 | - :search="search" | |
238 | - > | |
239 | - <template slot="items" slot-scope="props"> | |
240 | - <td id="td" class="text-xs-center">{{ props.index}}</td> | |
241 | - <td id="td" class="text-xs-center">{{ props.item.name}}</td> | |
242 | - <!-- <td id="td" class="text-xs-center">{{ props.item.dob }}</td> --> | |
243 | - <td id="td" class="text-xs-center">{{ props.item.mobile}}</td> | |
616 | + <v-snackbar | |
617 | + :timeout="timeout" | |
618 | + :top="y === 'top'" | |
619 | + :right="x === 'right'" | |
620 | + :vertical="mode === 'vertical'" | |
621 | + v-model="snackbar" | |
622 | + color="success" | |
623 | + >{{ text }}</v-snackbar> | |
244 | 624 | |
245 | - <td class="text-xs-center"> | |
246 | - <span> | |
247 | - <img | |
248 | - style="cursor:pointer; width:25px; height:18px; " | |
249 | - class="mr-5" | |
250 | - @click="profile(props.item)" | |
251 | - src="/static/icon/eye1.png" | |
252 | - > | |
253 | - <img | |
254 | - style="cursor:pointer; width:20px; height:18px; " | |
255 | - class="mr-5" | |
256 | - @click="editItem(props.item)" | |
257 | - src="/static/icon/edit1.png" | |
258 | - > | |
259 | - <img | |
260 | - style="cursor:pointer; height:20px; " | |
261 | - class="mr-5" | |
262 | - @click="deleteItem(props.item)" | |
263 | - src="/static/icon/delete1.png" | |
264 | - > | |
265 | - </span> | |
266 | - </td> | |
267 | - </template> | |
268 | - <v-alert | |
269 | - slot="no-results" | |
270 | - :value="true" | |
271 | - color="error" | |
272 | - icon="warning" | |
273 | - >Your search for "{{ search }}" found no results.</v-alert> | |
274 | - </v-data-table> | |
275 | - </v-tab-item> | |
625 | + <!-- ****** EXISTING-USERS STUDENTS TABLE ****** --> | |
626 | + <v-data-table | |
627 | + :headers="headers" | |
628 | + :items="desserts" | |
629 | + :pagination.sync="pagination" | |
630 | + :search="search" | |
631 | + > | |
632 | + <template slot="items" slot-scope="props"> | |
633 | + <td id="td" class="text-xs-center">{{ props.index}}</td> | |
634 | + <td id="td" class="text-xs-center">{{ props.item.name}}</td> | |
635 | + <td id="td" class="text-xs-center">{{ props.item.email }}</td> | |
636 | + <td id="td" class="text-xs-center">{{ props.item.dob }}</td> | |
637 | + <td id="td" class="text-xs-center">{{ props.item.gender }}</td> | |
638 | + <td id="td" class="text-xs-center">{{ props.item.fatherName }}</td> | |
639 | + <td id="td" class="text-xs-center">{{ props.item.motherName }}</td> | |
640 | + <td id="td" class="text-xs-center">{{ props.item.establishmentYear }}</td> | |
641 | + <td id="td" class="text-xs-center">{{ props.item.mobile}}</td> | |
276 | 642 | |
277 | -<!-- ****** ADD multiple Students ****** --> | |
643 | + <td class="text-xs-center"> | |
644 | + <span> | |
645 | + <img | |
646 | + style="cursor:pointer; width:25px; height:18px; " | |
647 | + class="mr-5" | |
648 | + @click="profile(props.item)" | |
649 | + src="/static/icon/eye1.png" | |
650 | + > | |
651 | + <img | |
652 | + style="cursor:pointer; width:20px; height:18px; " | |
653 | + class="mr-5" | |
654 | + @click="editItem(props.item)" | |
655 | + src="/static/icon/edit1.png" | |
656 | + > | |
657 | + <img | |
658 | + style="cursor:pointer; height:20px; " | |
659 | + class="mr-5" | |
660 | + @click="deleteItem(props.item)" | |
661 | + src="/static/icon/delete1.png" | |
662 | + > | |
663 | + </span> | |
664 | + </td> | |
665 | + </template> | |
666 | + <v-alert | |
667 | + slot="no-results" | |
668 | + :value="true" | |
669 | + color="error" | |
670 | + icon="warning" | |
671 | + >Your search for "{{ search }}" found no results.</v-alert> | |
672 | + </v-data-table> | |
673 | + </v-tab-item> | |
278 | 674 | |
279 | - <v-tab-item> | |
280 | - <v-container> | |
281 | - <v-snackbar | |
282 | - :timeout="timeout" | |
283 | - :top="y === 'top'" | |
284 | - :right="x === 'right'" | |
285 | - :vertical="mode === 'vertical'" | |
286 | - v-model="snackbar" | |
287 | - color="success" | |
288 | - >{{ text }}</v-snackbar> | |
289 | - <v-flex xs12 sm8 offset-sm2 class="top"> | |
290 | - <v-card flat> | |
291 | - <v-container fluid fill-height> | |
292 | - <v-layout align-center> | |
293 | - <v-flex xs12> | |
294 | - <v-flex offset-xs5> | |
295 | - <v-avatar size="55px"> | |
296 | - <img src="/static/icon/user.png"> | |
297 | - </v-avatar> | |
298 | - </v-flex> | |
299 | - <v-form ref="form" v-model="valid" lazy-validation> | |
675 | + <!-- ****** ADD MULTIPLE STUDENTS ****** --> | |
676 | + | |
677 | + <v-tab-item> | |
678 | + <v-container> | |
679 | + <v-snackbar | |
680 | + :timeout="timeout" | |
681 | + :top="y === 'top'" | |
682 | + :right="x === 'right'" | |
683 | + :vertical="mode === 'vertical'" | |
684 | + v-model="snackbar" | |
685 | + color="success" | |
686 | + >{{ text }}</v-snackbar> | |
687 | + <v-flex xs12 sm12 class="my-4"> | |
688 | + <v-card flat> | |
689 | + <v-form ref="form" v-model="valid" lazy-validation> | |
690 | + <v-container fluid> | |
300 | 691 | <v-layout> |
301 | - <v-flex xs4 class="pt-4 subheading"> | |
302 | - <label class="right">Full Name:</label> | |
303 | - </v-flex> | |
304 | - <v-flex xs6 class="ml-3"> | |
305 | - <v-text-field | |
306 | - v-model="editedItem.name" | |
307 | - placeholder="fill your full Name" | |
308 | - name="name" | |
309 | - type="text" | |
310 | - :rules="nameRules" | |
311 | - required | |
312 | - ></v-text-field> | |
692 | + <v-flex | |
693 | + xs12 | |
694 | + class="text-xs-center text-sm-center text-md-center text-lg-center my-4 mr-4" | |
695 | + > | |
696 | + <v-avatar size="100px"> | |
697 | + <img src="/static/icon/user.png" v-if="!imageUrl"> | |
698 | + </v-avatar> | |
699 | + <input | |
700 | + type="file" | |
701 | + style="display: none" | |
702 | + ref="image" | |
703 | + accept="image/*" | |
704 | + @change="onFilePicked" | |
705 | + > | |
706 | + <img | |
707 | + :src="imageData.imageUrl" | |
708 | + height="150" | |
709 | + v-if="imageUrl" | |
710 | + style="border-radius:50%; width:200px" | |
711 | + > | |
313 | 712 | </v-flex> |
314 | 713 | </v-layout> |
315 | 714 | <v-layout> |
316 | - <v-flex xs4 class="pt-4 subheading"> | |
317 | - <label class="right">Email ID:</label> | |
318 | - </v-flex> | |
319 | - <v-flex xs6 class="ml-3"> | |
320 | - <v-text-field | |
321 | - placeholder="fill your email" | |
322 | - :rules="emailRules" | |
323 | - v-model="editedItem.email" | |
324 | - type="text" | |
325 | - name="email" | |
326 | - required | |
327 | - ></v-text-field> | |
715 | + <v-flex xs12 sm6> | |
716 | + <v-layout> | |
717 | + <v-flex xs4 class="pt-4 subheading"> | |
718 | + <label class="right">Select Class:</label> | |
719 | + </v-flex> | |
720 | + <v-flex xs8 class="ml-3"> | |
721 | + <v-select | |
722 | + :items="addclass" | |
723 | + label="Select Class" | |
724 | + v-model="addStudents.select" | |
725 | + item-text="classNum" | |
726 | + item-value="_id" | |
727 | + name="Select Class" | |
728 | + :rules="classRules" | |
729 | + @change="getSections(addStudents.select)" | |
730 | + required | |
731 | + ></v-select> | |
732 | + </v-flex> | |
733 | + </v-layout> | |
734 | + </v-flex> | |
735 | + <v-flex xs12 sm6> | |
736 | + <v-layout> | |
737 | + <v-flex xs4 class="pt-4 subheading"> | |
738 | + <label class="right">Select Section:</label> | |
739 | + </v-flex> | |
740 | + <v-flex xs8 class="ml-3"> | |
741 | + <v-select | |
742 | + :items="addSection" | |
743 | + label="Select Section" | |
744 | + v-model="addStudents.selectSection" | |
745 | + item-text="name" | |
746 | + item-value="_id" | |
747 | + name="Select Section" | |
748 | + :rules="classRules" | |
749 | + required | |
750 | + ></v-select> | |
751 | + </v-flex> | |
752 | + </v-layout> | |
328 | 753 | </v-flex> |
329 | 754 | </v-layout> |
330 | - <!-- <v-layout> | |
331 | - <v-flex xs4 class="pt-4 subheading"> | |
332 | - <label class="right">Date of Birth:</label> | |
333 | - </v-flex> | |
334 | - <v-flex xs6 class="ml-3"> | |
335 | - <v-menu | |
336 | - ref="menu" | |
337 | - :close-on-content-click="false" | |
338 | - v-model="menu" | |
339 | - :nudge-right="40" | |
340 | - lazy | |
341 | - transition="scale-transition" | |
342 | - offset-y | |
343 | - full-width | |
344 | - min-width="290px" | |
345 | - > | |
346 | - <v-text-field | |
347 | - slot="activator" | |
348 | - v-model="editedItem.date" | |
349 | - placeholder="Select date" | |
350 | - ></v-text-field> | |
351 | - <v-date-picker | |
352 | - ref="picker" | |
353 | - v-model="editedItem.date" | |
354 | - :max="new Date().toISOString().substr(0, 10)" | |
355 | - min="1950-01-01" | |
356 | - @input="menu = false" | |
357 | - ></v-date-picker> | |
358 | - </v-menu> | |
359 | - </v-flex> | |
360 | - </v-layout> --> | |
361 | - <v-layout> | |
362 | - <v-flex xs12 sm9 offset-sm2> | |
363 | - <v-card-actions> | |
364 | - <v-btn @click="clear" round dark>clear</v-btn> | |
365 | - <v-spacer></v-spacer> | |
366 | - <v-btn @click="submit" round dark :loading="loading">Add</v-btn> | |
367 | - </v-card-actions> | |
368 | - </v-flex> | |
755 | + <v-layout> | |
756 | + <v-flex xs12 sm6> | |
757 | + <v-layout> | |
758 | + <v-flex xs4 class="pt-4 subheading"> | |
759 | + <label class="right">Full Name:</label> | |
760 | + </v-flex> | |
761 | + <v-flex xs8 class="ml-3"> | |
762 | + <v-text-field | |
763 | + v-model="addStudents.name" | |
764 | + placeholder="fill your full Name" | |
765 | + name="name" | |
766 | + type="text" | |
767 | + :rules="nameRules" | |
768 | + required | |
769 | + ></v-text-field> | |
770 | + </v-flex> | |
771 | + </v-layout> | |
772 | + </v-flex> | |
773 | + <v-flex xs12 sm6> | |
774 | + <v-layout> | |
775 | + <v-flex xs4 class="pt-4 subheading"> | |
776 | + <label class="right">Email ID:</label> | |
777 | + </v-flex> | |
778 | + <v-flex xs8 class="ml-3"> | |
779 | + <v-text-field | |
780 | + placeholder="fill your email" | |
781 | + :rules="emailRules" | |
782 | + v-model="addStudents.email" | |
783 | + type="text" | |
784 | + name="email" | |
785 | + required | |
786 | + ></v-text-field> | |
787 | + </v-flex> | |
788 | + </v-layout> | |
789 | + </v-flex> | |
369 | 790 | </v-layout> |
370 | - </v-form> | |
371 | - </v-flex> | |
372 | - </v-layout> | |
373 | - </v-container> | |
374 | - </v-card> | |
375 | - </v-flex> | |
376 | - </v-container> | |
377 | - </v-tab-item> | |
378 | - </v-tabs> | |
379 | -</v-app> | |
791 | + <v-layout> | |
792 | + <v-flex xs12 sm6> | |
793 | + <v-layout> | |
794 | + <v-flex xs4 class="pt-4 subheading"> | |
795 | + <label class="right">Date of Birth:</label> | |
796 | + </v-flex> | |
797 | + <v-flex xs8 class="ml-3"> | |
798 | + <v-menu | |
799 | + ref="menu" | |
800 | + :close-on-content-click="false" | |
801 | + v-model="menu" | |
802 | + :nudge-right="40" | |
803 | + lazy | |
804 | + transition="scale-transition" | |
805 | + offset-y | |
806 | + full-width | |
807 | + min-width="290px" | |
808 | + > | |
809 | + <v-text-field | |
810 | + slot="activator" | |
811 | + :rules="dateRules" | |
812 | + v-model="addStudents.date" | |
813 | + placeholder="Select date" | |
814 | + ></v-text-field> | |
815 | + <v-date-picker | |
816 | + ref="picker" | |
817 | + v-model="addStudents.date" | |
818 | + :max="new Date().toISOString().substr(0, 10)" | |
819 | + min="1950-01-01" | |
820 | + @input="menu = false" | |
821 | + ></v-date-picker> | |
822 | + </v-menu> | |
823 | + </v-flex> | |
824 | + </v-layout> | |
825 | + </v-flex> | |
826 | + <v-flex xs12 sm6> | |
827 | + <v-layout> | |
828 | + <v-flex xs4 class="pt-4 subheading"> | |
829 | + <label class="right">City:</label> | |
830 | + </v-flex> | |
831 | + <v-flex xs8 class="ml-3"> | |
832 | + <v-text-field | |
833 | + v-model="addStudents.city" | |
834 | + placeholder="fill your City Name" | |
835 | + name="City" | |
836 | + type="text" | |
837 | + :rules="cityRules" | |
838 | + required | |
839 | + ></v-text-field> | |
840 | + </v-flex> | |
841 | + </v-layout> | |
842 | + </v-flex> | |
843 | + </v-layout> | |
844 | + <v-layout> | |
845 | + <v-flex xs12 sm6> | |
846 | + <v-layout> | |
847 | + <v-flex xs4 class="pt-4 subheading"> | |
848 | + <label class="right">State:</label> | |
849 | + </v-flex> | |
850 | + <v-flex xs8 class="ml-3"> | |
851 | + <v-text-field | |
852 | + v-model="addStudents.state" | |
853 | + placeholder="fill your State Name" | |
854 | + name="state" | |
855 | + type="text" | |
856 | + :rules="stateRules" | |
857 | + required | |
858 | + ></v-text-field> | |
859 | + </v-flex> | |
860 | + </v-layout> | |
861 | + </v-flex> | |
862 | + <v-flex xs12 sm6> | |
863 | + <v-layout> | |
864 | + <v-flex xs4 class="pt-4 subheading"> | |
865 | + <label class="right">Pincode:</label> | |
866 | + </v-flex> | |
867 | + <v-flex xs8 class="ml-3"> | |
868 | + <v-text-field | |
869 | + v-model="addStudents.pincode" | |
870 | + placeholder="fill your pincode" | |
871 | + name="pincode" | |
872 | + type="number" | |
873 | + :rules="pincode" | |
874 | + required | |
875 | + ></v-text-field> | |
876 | + </v-flex> | |
877 | + </v-layout> | |
878 | + </v-flex> | |
879 | + </v-layout> | |
880 | + <v-layout> | |
881 | + <v-flex xs12 sm6> | |
882 | + <v-layout> | |
883 | + <v-flex xs4 class="pt-4 subheading"> | |
884 | + <label class="right">Mobile No:</label> | |
885 | + </v-flex> | |
886 | + <v-flex xs8 class="ml-3"> | |
887 | + <v-text-field | |
888 | + v-model="addStudents.mobile" | |
889 | + placeholder="fill your MobileNo" | |
890 | + name="mobileNo" | |
891 | + type="number" | |
892 | + :rules="mobileNoRules" | |
893 | + required | |
894 | + ></v-text-field> | |
895 | + </v-flex> | |
896 | + </v-layout> | |
897 | + </v-flex> | |
898 | + <v-flex xs12 sm6> | |
899 | + <v-layout> | |
900 | + <v-flex xs4 class="pt-4 subheading"> | |
901 | + <label class="right">Select Country:</label> | |
902 | + </v-flex> | |
903 | + <v-flex xs8 class="ml-3"> | |
904 | + <v-autocomplete | |
905 | + v-model="addStudents.country" | |
906 | + :rules="country" | |
907 | + :items="countries" | |
908 | + placeholder="Select Country Name" | |
909 | + required | |
910 | + ></v-autocomplete> | |
911 | + </v-flex> | |
912 | + </v-layout> | |
913 | + </v-flex> | |
914 | + </v-layout> | |
915 | + <v-layout> | |
916 | + <v-flex xs12 sm6> | |
917 | + <v-layout> | |
918 | + <v-flex xs4 class="pt-4 subheading"> | |
919 | + <label class="right">Gender:</label> | |
920 | + </v-flex> | |
921 | + <v-flex xs8 class="ml-3"> | |
922 | + <v-select | |
923 | + :items="gender" | |
924 | + v-model="addStudents.gender" | |
925 | + :rules="genderRules" | |
926 | + label="Select Gender" | |
927 | + required | |
928 | + ></v-select> | |
929 | + </v-flex> | |
930 | + </v-layout> | |
931 | + </v-flex> | |
932 | + <v-flex xs12 sm6> | |
933 | + <v-layout> | |
934 | + <v-flex xs4 class="pt-4 subheading"> | |
935 | + <label class="right">Father Name:</label> | |
936 | + </v-flex> | |
937 | + <v-flex xs8 class="ml-3"> | |
938 | + <v-text-field | |
939 | + v-model="addStudents.fatherName" | |
940 | + :rules="fatherNameRules" | |
941 | + :items="countries" | |
942 | + placeholder="Fill your father Name" | |
943 | + required | |
944 | + ></v-text-field> | |
945 | + </v-flex> | |
946 | + </v-layout> | |
947 | + </v-flex> | |
948 | + </v-layout> | |
949 | + <v-layout> | |
950 | + <v-flex xs12 sm6> | |
951 | + <v-layout> | |
952 | + <v-flex xs4 class="pt-4 subheading"> | |
953 | + <label class="right">Father Cell No:</label> | |
954 | + </v-flex> | |
955 | + <v-flex xs8 class="ml-3"> | |
956 | + <v-text-field | |
957 | + v-model="addStudents.fatherCellNo" | |
958 | + placeholder="fill your father Cell Number" | |
959 | + name="state" | |
960 | + type="number" | |
961 | + :rules="fatheCellNoRules" | |
962 | + required | |
963 | + ></v-text-field> | |
964 | + </v-flex> | |
965 | + </v-layout> | |
966 | + </v-flex> | |
967 | + <v-flex xs12 sm6> | |
968 | + <v-layout> | |
969 | + <v-flex xs4 class="pt-4 subheading"> | |
970 | + <label class="right">Mother Name:</label> | |
971 | + </v-flex> | |
972 | + <v-flex xs8 class="ml-3"> | |
973 | + <v-text-field | |
974 | + v-model="addStudents.motherName" | |
975 | + placeholder="fill your Mother Name" | |
976 | + name="state" | |
977 | + type="text" | |
978 | + :rules="motherNameRules" | |
979 | + required | |
980 | + ></v-text-field> | |
981 | + </v-flex> | |
982 | + </v-layout> | |
983 | + </v-flex> | |
984 | + </v-layout> | |
985 | + <v-layout> | |
986 | + <v-flex xs12 sm6> | |
987 | + <v-layout> | |
988 | + <v-flex xs4 class="pt-4 subheading"> | |
989 | + <label class="right">Mother Cell No:</label> | |
990 | + </v-flex> | |
991 | + <v-flex xs8 class="ml-3"> | |
992 | + <v-text-field | |
993 | + v-model="addStudents.motherCellNo" | |
994 | + placeholder="fill your Mother Cell Number" | |
995 | + name="state" | |
996 | + type="number" | |
997 | + :rules="motherCellNoRules" | |
998 | + required | |
999 | + ></v-text-field> | |
1000 | + </v-flex> | |
1001 | + </v-layout> | |
1002 | + </v-flex> | |
1003 | + <v-flex xs12 sm6> | |
1004 | + <v-layout> | |
1005 | + <v-flex xs4 class="pt-4 subheading"> | |
1006 | + <label class="right">Academic Year:</label> | |
1007 | + </v-flex> | |
1008 | + <v-flex xs8 class="ml-3"> | |
1009 | + <v-text-field | |
1010 | + v-model="addStudents.establishmentYear" | |
1011 | + placeholder="fill your Mother Name" | |
1012 | + name="state" | |
1013 | + type="number" | |
1014 | + :rules="establishmentYearRules" | |
1015 | + required | |
1016 | + ></v-text-field> | |
1017 | + </v-flex> | |
1018 | + </v-layout> | |
1019 | + </v-flex> | |
1020 | + </v-layout> | |
1021 | + <v-layout> | |
1022 | + <v-flex xs12 sm6> | |
1023 | + <v-layout> | |
1024 | + <v-flex xs4 class="pt-4 subheading"> | |
1025 | + <label class="right">Uplaod Image:</label> | |
1026 | + </v-flex> | |
1027 | + <v-flex xs8 class="ml-3"> | |
1028 | + <v-text-field | |
1029 | + label="Select Image" | |
1030 | + @click="pickFile" | |
1031 | + v-model="imageName" | |
1032 | + prepend-icon="attach_file" | |
1033 | + ></v-text-field> | |
1034 | + </v-flex> | |
1035 | + </v-layout> | |
1036 | + </v-flex> | |
1037 | + </v-layout> | |
1038 | + <v-layout> | |
1039 | + <v-flex xs12 sm12> | |
1040 | + <v-layout> | |
1041 | + <v-flex xs3 class="pt-4 subheading pl-4" style="max-width: 17%;"> | |
1042 | + <label class>Present Address:</label> | |
1043 | + </v-flex> | |
1044 | + <v-flex xs12> | |
1045 | + <v-text-field | |
1046 | + name="input-4-3" | |
1047 | + v-model="addStudents.presentAddress" | |
1048 | + :rules="presentAddress" | |
1049 | + placeholder="fill Your present Address" | |
1050 | + required | |
1051 | + ></v-text-field> | |
1052 | + </v-flex> | |
1053 | + </v-layout> | |
1054 | + </v-flex> | |
1055 | + <v-flex xs12 sm12> | |
1056 | + <v-layout> | |
1057 | + <v-flex xs3 class="pt-4 subheading" style="max-width: 17%;"> | |
1058 | + <label>Permanent Address:</label> | |
1059 | + </v-flex> | |
1060 | + <v-flex xs12> | |
1061 | + <v-text-field | |
1062 | + name="input-4-3" | |
1063 | + v-model="addStudents.permanentAddress" | |
1064 | + :rules="permanentAddress" | |
1065 | + placeholder="fill Your Permanent Address" | |
1066 | + required | |
1067 | + ></v-text-field> | |
1068 | + </v-flex> | |
1069 | + </v-layout> | |
1070 | + </v-flex> | |
1071 | + </v-layout> | |
1072 | + <v-layout> | |
1073 | + <v-flex xs12 sm12> | |
1074 | + <v-card-actions> | |
1075 | + <v-btn @click="clear" round dark>clear</v-btn> | |
1076 | + <v-spacer></v-spacer> | |
1077 | + <v-btn @click="submit" round dark :loading="loading">Add</v-btn> | |
1078 | + </v-card-actions> | |
1079 | + </v-flex> | |
1080 | + </v-layout> | |
1081 | + </v-container> | |
1082 | + </v-form> | |
1083 | + </v-card> | |
1084 | + </v-flex> | |
1085 | + </v-container> | |
1086 | + </v-tab-item> | |
1087 | + </v-tabs> | |
1088 | + </v-app> | |
380 | 1089 | </template> |
381 | 1090 | |
382 | 1091 | <script> |
... | ... | @@ -392,41 +1101,256 @@ export default { |
392 | 1101 | timeout: 3000, |
393 | 1102 | text: "", |
394 | 1103 | loading: false, |
395 | - date:null, | |
396 | - search: '', | |
397 | - modal: false, | |
398 | - modaledit:false, | |
1104 | + date: null, | |
1105 | + search: "", | |
399 | 1106 | menu: false, |
400 | - menu1:false, | |
1107 | + menu1: false, | |
401 | 1108 | dialog: false, |
402 | 1109 | dialog1: false, |
403 | - dialog2: false, | |
404 | 1110 | valid: true, |
405 | 1111 | isActive: true, |
406 | 1112 | newActive: false, |
407 | - loader: null, | |
408 | - loading: false, | |
409 | - loading2: false, | |
410 | - loading3: false, | |
411 | - loading4: false, | |
412 | - details: [], | |
1113 | + addclass: [], | |
1114 | + addSection: [], | |
1115 | + gender: ["Male", "Female"], | |
413 | 1116 | AddUsercredentials: {}, |
414 | 1117 | pagination: { |
415 | 1118 | rowsPerPage: 15 |
416 | 1119 | }, |
417 | - // rules: { | |
418 | - // required: value => !!value || "Date of Birth is Required.", | |
419 | - // min: v => | |
420 | - // (/^(0?[1-9]|[12][0-9]|3[01])[\/\-](0?[1-9]|1[012])[\/\-]\d{4}$/.test( | |
421 | - // v | |
422 | - // ) && | |
423 | - // v.length > 0) || | |
424 | - // "Please enter a date in the format dd/mm/yyyy" | |
425 | - // }, | |
1120 | + imageData: {}, | |
1121 | + imageName: "", | |
1122 | + imageUrl: "", | |
1123 | + imageFile: "", | |
426 | 1124 | nameRules: [v => !!v || " Full Name is required"], |
1125 | + dateRules: [v => !!v || " DOB is required"], | |
1126 | + cityRules: [v => !!v || " City Name is required"], | |
1127 | + pincode: [v => !!v || " Pincode is required"], | |
1128 | + country: [v => !!v || " Country Name is required"], | |
1129 | + permanentAddress: [v => !!v || " Permanent Address is required"], | |
1130 | + presentAddress: [v => !!v || " Present Address is required"], | |
1131 | + mobileNoRules: [v => !!v || "Mobile Number is required"], | |
1132 | + stateRules: [v => !!v || "State Name is required"], | |
1133 | + classRules: [v => !!v || " Class Name is required"], | |
1134 | + genderRules: [v => !!v || " Select Gender is required"], | |
1135 | + fatherNameRules: [v => !!v || " Father Name is required"], | |
1136 | + fatheCellNoRules: [v => !!v || " father Cell Number is required"], | |
1137 | + motherNameRules: [v => !!v || " Mother Name is required"], | |
1138 | + motherCellNoRules: [v => !!v || " Mother Cell Number is required"], | |
1139 | + establishmentYearRules: [v => !!v || " Academic Year is required"], | |
1140 | + errorMessages: "", | |
427 | 1141 | emailRules: [ |
428 | 1142 | v => !!v || "E-mail is required", |
429 | - v => /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 'E-mail must be valid' | |
1143 | + v => | |
1144 | + /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || | |
1145 | + "E-mail must be valid" | |
1146 | + ], | |
1147 | + countries: [ | |
1148 | + "Afghanistan", | |
1149 | + "Albania", | |
1150 | + "Algeria", | |
1151 | + "Andorra", | |
1152 | + "Angola", | |
1153 | + "Anguilla", | |
1154 | + "Antigua & Barbuda", | |
1155 | + "Argentina", | |
1156 | + "Armenia", | |
1157 | + "Aruba", | |
1158 | + "Australia", | |
1159 | + "Austria", | |
1160 | + "Azerbaijan", | |
1161 | + "Bahamas", | |
1162 | + "Bahrain", | |
1163 | + "Bangladesh", | |
1164 | + "Barbados", | |
1165 | + "Belarus", | |
1166 | + "Belgium", | |
1167 | + "Belize", | |
1168 | + "Benin", | |
1169 | + "Bermuda", | |
1170 | + "Bhutan", | |
1171 | + "Bolivia", | |
1172 | + "Bosnia & Herzegovina", | |
1173 | + "Botswana", | |
1174 | + "Brazil", | |
1175 | + "British Virgin Islands", | |
1176 | + "Brunei", | |
1177 | + "Bulgaria", | |
1178 | + "Burkina Faso", | |
1179 | + "Burundi", | |
1180 | + "Cambodia", | |
1181 | + "Cameroon", | |
1182 | + "Cape Verde", | |
1183 | + "Cayman Islands", | |
1184 | + "Chad", | |
1185 | + "Chile", | |
1186 | + "China", | |
1187 | + "Colombia", | |
1188 | + "Congo", | |
1189 | + "Cook Islands", | |
1190 | + "Costa Rica", | |
1191 | + "Cote D Ivoire", | |
1192 | + "Croatia", | |
1193 | + "Cruise Ship", | |
1194 | + "Cuba", | |
1195 | + "Cyprus", | |
1196 | + "Czech Republic", | |
1197 | + "Denmark", | |
1198 | + "Djibouti", | |
1199 | + "Dominica", | |
1200 | + "Dominican Republic", | |
1201 | + "Ecuador", | |
1202 | + "Egypt", | |
1203 | + "El Salvador", | |
1204 | + "Equatorial Guinea", | |
1205 | + "Estonia", | |
1206 | + "Ethiopia", | |
1207 | + "Falkland Islands", | |
1208 | + "Faroe Islands", | |
1209 | + "Fiji", | |
1210 | + "Finland", | |
1211 | + "France", | |
1212 | + "French Polynesia", | |
1213 | + "French West Indies", | |
1214 | + "Gabon", | |
1215 | + "Gambia", | |
1216 | + "Georgia", | |
1217 | + "Germany", | |
1218 | + "Ghana", | |
1219 | + "Gibraltar", | |
1220 | + "Greece", | |
1221 | + "Greenland", | |
1222 | + "Grenada", | |
1223 | + "Guam", | |
1224 | + "Guatemala", | |
1225 | + "Guernsey", | |
1226 | + "Guinea", | |
1227 | + "Guinea Bissau", | |
1228 | + "Guyana", | |
1229 | + "Haiti", | |
1230 | + "Honduras", | |
1231 | + "Hong Kong", | |
1232 | + "Hungary", | |
1233 | + "Iceland", | |
1234 | + "India", | |
1235 | + "Indonesia", | |
1236 | + "Iran", | |
1237 | + "Iraq", | |
1238 | + "Ireland", | |
1239 | + "Isle of Man", | |
1240 | + "Israel", | |
1241 | + "Italy", | |
1242 | + "Jamaica", | |
1243 | + "Japan", | |
1244 | + "Jersey", | |
1245 | + "Jordan", | |
1246 | + "Kazakhstan", | |
1247 | + "Kenya", | |
1248 | + "Kuwait", | |
1249 | + "Kyrgyz Republic", | |
1250 | + "Laos", | |
1251 | + "Latvia", | |
1252 | + "Lebanon", | |
1253 | + "Lesotho", | |
1254 | + "Liberia", | |
1255 | + "Libya", | |
1256 | + "Liechtenstein", | |
1257 | + "Lithuania", | |
1258 | + "Luxembourg", | |
1259 | + "Macau", | |
1260 | + "Macedonia", | |
1261 | + "Madagascar", | |
1262 | + "Malawi", | |
1263 | + "Malaysia", | |
1264 | + "Maldives", | |
1265 | + "Mali", | |
1266 | + "Malta", | |
1267 | + "Mauritania", | |
1268 | + "Mauritius", | |
1269 | + "Mexico", | |
1270 | + "Moldova", | |
1271 | + "Monaco", | |
1272 | + "Mongolia", | |
1273 | + "Montenegro", | |
1274 | + "Montserrat", | |
1275 | + "Morocco", | |
1276 | + "Mozambique", | |
1277 | + "Namibia", | |
1278 | + "Nepal", | |
1279 | + "Netherlands", | |
1280 | + "Netherlands Antilles", | |
1281 | + "New Caledonia", | |
1282 | + "New Zealand", | |
1283 | + "Nicaragua", | |
1284 | + "Niger", | |
1285 | + "Nigeria", | |
1286 | + "Norway", | |
1287 | + "Oman", | |
1288 | + "Pakistan", | |
1289 | + "Palestine", | |
1290 | + "Panama", | |
1291 | + "Papua New Guinea", | |
1292 | + "Paraguay", | |
1293 | + "Peru", | |
1294 | + "Philippines", | |
1295 | + "Poland", | |
1296 | + "Portugal", | |
1297 | + "Puerto Rico", | |
1298 | + "Qatar", | |
1299 | + "Reunion", | |
1300 | + "Romania", | |
1301 | + "Russia", | |
1302 | + "Rwanda", | |
1303 | + "Saint Pierre & Miquelon", | |
1304 | + "Samoa", | |
1305 | + "San Marino", | |
1306 | + "Satellite", | |
1307 | + "Saudi Arabia", | |
1308 | + "Senegal", | |
1309 | + "Serbia", | |
1310 | + "Seychelles", | |
1311 | + "Sierra Leone", | |
1312 | + "Singapore", | |
1313 | + "Slovakia", | |
1314 | + "Slovenia", | |
1315 | + "South Africa", | |
1316 | + "South Korea", | |
1317 | + "Spain", | |
1318 | + "Sri Lanka", | |
1319 | + "St Kitts & Nevis", | |
1320 | + "St Lucia", | |
1321 | + "St Vincent", | |
1322 | + "St. Lucia", | |
1323 | + "Sudan", | |
1324 | + "Suriname", | |
1325 | + "Swaziland", | |
1326 | + "Sweden", | |
1327 | + "Switzerland", | |
1328 | + "Syria", | |
1329 | + "Taiwan", | |
1330 | + "Tajikistan", | |
1331 | + "Tanzania", | |
1332 | + "Thailand", | |
1333 | + "Timor L'Este", | |
1334 | + "Togo", | |
1335 | + "Tonga", | |
1336 | + "Trinidad & Tobago", | |
1337 | + "Tunisia", | |
1338 | + "Turkey", | |
1339 | + "Turkmenistan", | |
1340 | + "Turks & Caicos", | |
1341 | + "Uganda", | |
1342 | + "Ukraine", | |
1343 | + "United Arab Emirates", | |
1344 | + "United Kingdom", | |
1345 | + "United States", | |
1346 | + "Uruguay", | |
1347 | + "Uzbekistan", | |
1348 | + "Venezuela", | |
1349 | + "Vietnam", | |
1350 | + "Virgin Islands (US)", | |
1351 | + "Yemen", | |
1352 | + "Zambia", | |
1353 | + "Zimbabwe" | |
430 | 1354 | ], |
431 | 1355 | headers: [ |
432 | 1356 | { |
... | ... | @@ -436,23 +1360,65 @@ export default { |
436 | 1360 | value: "No" |
437 | 1361 | }, |
438 | 1362 | { text: "Name", value: "name", sortable: false, align: "center" }, |
439 | - // { text: "Email", value: "email", sortable: false, align: "center" }, | |
440 | - { text: "Mobile", value: "mobile", sortable: false, align: "center" }, | |
441 | - { text: "", value: "", sortable: false, align: "center" } | |
1363 | + { text: "Email", value: "email", sortable: false, align: "center" }, | |
1364 | + { text: "Dob", value: "dob", sortable: false, align: "center" }, | |
1365 | + { text: "Gender", value: "gender", sortable: false, align: "center" }, | |
1366 | + { text: "Father Name", value: "fatherName", sortable: false, align: "center" }, | |
1367 | + { text: "Mother Name", value: "motherName", sortable: false, align: "center" }, | |
1368 | + { text: "Academic Year", value: "establishmentYear", sortable: false, align: "center" }, | |
1369 | + { text: "Mobile No", value: "mobile", sortable: false, align: "center" }, | |
1370 | + { text: "Action", value: "", sortable: false, align: "center" } | |
442 | 1371 | ], |
443 | 1372 | desserts: [], |
444 | 1373 | editedIndex: -1, |
1374 | + addStudents: { | |
1375 | + role: "STUDENT", | |
1376 | + name: "", | |
1377 | + email: "", | |
1378 | + date: "", | |
1379 | + city: "", | |
1380 | + pincode: "", | |
1381 | + country: "", | |
1382 | + permanentAddress: "", | |
1383 | + presentAddress: "", | |
1384 | + mobile: "", | |
1385 | + state: "", | |
1386 | + gender: "", | |
1387 | + fatherName: "", | |
1388 | + fatheCellNo: "", | |
1389 | + motherName: "", | |
1390 | + motherCellNo: "", | |
1391 | + select: "", | |
1392 | + selectSection: "", | |
1393 | + establishmentYear: new Date().getFullYear() | |
1394 | + }, | |
445 | 1395 | editedItem: { |
446 | 1396 | role: "STUDENT", |
447 | 1397 | name: "", |
448 | 1398 | email: "", |
1399 | + date: "", | |
1400 | + city: "", | |
1401 | + pincode: "", | |
1402 | + country: "", | |
1403 | + permanentAddress: "", | |
1404 | + presentAddress: "", | |
1405 | + mobile: "", | |
1406 | + state: "", | |
1407 | + gender: "", | |
1408 | + fatherName: "", | |
1409 | + fatheCellNo: "", | |
1410 | + motherName: "", | |
1411 | + motherCellNo: "", | |
1412 | + select: "", | |
1413 | + selectSection: "", | |
1414 | + establishmentYear: new Date().getFullYear() | |
449 | 1415 | }, |
450 | 1416 | defaultItem: { |
451 | 1417 | role: "STUDENT", |
452 | 1418 | name: "", |
453 | - email: "", | |
1419 | + email: "" | |
454 | 1420 | }, |
455 | - userName:'', | |
1421 | + userName: "", | |
456 | 1422 | items: [ |
457 | 1423 | { |
458 | 1424 | href: "/changepassword", |
... | ... | @@ -470,29 +1436,75 @@ export default { |
470 | 1436 | } |
471 | 1437 | ] |
472 | 1438 | }), |
473 | - watch: { | |
474 | - menu (val) { | |
475 | - val && this.$nextTick(() => (this.$refs.picker.activePicker = 'YEAR')) | |
1439 | + watch: { | |
1440 | + menu(val) { | |
1441 | + val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); | |
476 | 1442 | }, |
477 | - menu1 (val) { | |
478 | - val && this.$nextTick(() => (this.$refs.picker.activePicker = 'YEAR')) | |
1443 | + menu1(val) { | |
1444 | + val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); | |
479 | 1445 | } |
480 | - }, | |
481 | - methods: { | |
1446 | + }, | |
1447 | + methods: { | |
1448 | + getSections(_id) { | |
1449 | + var token = this.$store.state.token; | |
1450 | + http() | |
1451 | + .get( | |
1452 | + "/getSectionsList", | |
1453 | + { params: { classId: _id } }, | |
1454 | + { | |
1455 | + headers: { Authorization: "Bearer " + token } | |
1456 | + } | |
1457 | + ) | |
1458 | + .then(response => { | |
1459 | + this.addSection = response.data.data; | |
1460 | + console.log("getSectionsList=====>", this.addSection); | |
1461 | + }) | |
1462 | + .catch(err => { | |
1463 | + // console.log("err====>", err); | |
1464 | + // this.$router.replace({ path: '/' }); | |
1465 | + }); | |
1466 | + }, | |
1467 | + pickFile() { | |
1468 | + this.$refs.image.click(); | |
1469 | + }, | |
1470 | + | |
1471 | + onFilePicked(e) { | |
1472 | + // console.log(e) | |
1473 | + const files = e.target.files; | |
1474 | + this.imageData.upload = e.target.files[0]; | |
1475 | + if (files[0] !== undefined) { | |
1476 | + this.imageName = files[0].name; | |
1477 | + if (this.imageName.lastIndexOf(".") <= 0) { | |
1478 | + return; | |
1479 | + } | |
1480 | + const fr = new FileReader(); | |
1481 | + fr.readAsDataURL(files[0]); | |
1482 | + fr.addEventListener("load", () => { | |
1483 | + this.imageUrl = fr.result; | |
1484 | + this.imageFile = files[0]; // this is an image file that can be sent to server... | |
1485 | + this.imageData.imageUrl = URL.createObjectURL(this.imageFile); | |
1486 | + console.log("upload=======>", this.imageData.imageUrl); | |
1487 | + console.log("imageFile", this.imageFile); | |
1488 | + }); | |
1489 | + } else { | |
1490 | + this.imageName = ""; | |
1491 | + this.imageFile = ""; | |
1492 | + this.imageUrl = ""; | |
1493 | + } | |
1494 | + }, | |
482 | 1495 | getStudentList() { |
483 | 1496 | var token = this.$store.state.token; |
484 | - http() | |
485 | - .get("/getStudentsList", { | |
486 | - headers: { Authorization: "Bearer " + token } | |
487 | - }) | |
1497 | + http() | |
1498 | + .get("/getStudentsList", { | |
1499 | + headers: { Authorization: "Bearer " + token } | |
1500 | + }) | |
488 | 1501 | .then(response => { |
489 | 1502 | this.desserts = response.data.data; |
490 | 1503 | // console.log("getStudentList=====>",this.desserts) |
491 | - | |
492 | 1504 | }) |
493 | 1505 | .catch(err => { |
494 | 1506 | // console.log("err====>", err); |
495 | - this.$router.replace({ path: '/' }); | |
1507 | + this.$router.replace({ path: "/" }); | |
496 | 1508 | }); |
497 | 1509 | }, |
498 | 1510 | editItem(item) { |
... | ... | @@ -508,7 +1520,7 @@ export default { |
508 | 1520 | // report(item) { |
509 | 1521 | // this.editedIndex = this.desserts.indexOf(item); |
510 | 1522 | // this.editedItem = Object.assign({}, item); |
511 | - // this.dialog2 = true; | |
1523 | + // this.dialog2 = true; | |
512 | 1524 | // }, |
513 | 1525 | |
514 | 1526 | deleteItem(item) { |
... | ... | @@ -516,12 +1528,17 @@ export default { |
516 | 1528 | studentId: item._id |
517 | 1529 | }; |
518 | 1530 | http() |
519 | - .delete("/deleteStudent", confirm('Are you sure you want to delete this?') && { params: deleteStudent }) | |
1531 | + .delete( | |
1532 | + "/deleteStudent", | |
1533 | + confirm("Are you sure you want to delete this?") && { | |
1534 | + params: deleteStudent | |
1535 | + } | |
1536 | + ) | |
520 | 1537 | .then(response => { |
521 | 1538 | // console.log("deleteUers",deleteStudent) |
522 | 1539 | if ((this.snackbar = true)) { |
523 | 1540 | this.text = "Successfully delete Existing User"; |
524 | - } | |
1541 | + } | |
525 | 1542 | this.getStudentList(); |
526 | 1543 | }) |
527 | 1544 | .catch(error => { |
... | ... | @@ -541,34 +1558,6 @@ export default { |
541 | 1558 | break; |
542 | 1559 | } |
543 | 1560 | }, |
544 | - activebtn(type) { | |
545 | - switch (type) { | |
546 | - case "existing": | |
547 | - this.Activebtn3 = false; | |
548 | - this.Activebtn2 = false; | |
549 | - this.Activebtn1 = false; | |
550 | - this.isActivebtn = true; | |
551 | - break; | |
552 | - case "new": | |
553 | - this.Activebtn3 = false; | |
554 | - this.Activebtn2 = false; | |
555 | - this.Activebtn1 = true; | |
556 | - this.isActivebtn = false; | |
557 | - break; | |
558 | - case "new1": | |
559 | - this.Activebtn3 = false; | |
560 | - this.Activebtn2 = true; | |
561 | - this.Activebtn1 = false; | |
562 | - this.isActivebtn = false; | |
563 | - break; | |
564 | - default: | |
565 | - this.Activebtn3 = true; | |
566 | - this.Activebtn2 = false; | |
567 | - this.Activebtn1 = false; | |
568 | - this.isActivebtn = false; | |
569 | - break; | |
570 | - } | |
571 | - }, | |
572 | 1561 | close() { |
573 | 1562 | this.dialog = false; |
574 | 1563 | setTimeout(() => { |
... | ... | @@ -579,49 +1568,86 @@ export default { |
579 | 1568 | close1() { |
580 | 1569 | this.dialog1 = false; |
581 | 1570 | }, |
582 | - close2() { | |
583 | - this.dialog2 = false; | |
584 | - }, | |
1571 | + // close2() { | |
1572 | + // this.dialog2 = false; | |
1573 | + // }, | |
585 | 1574 | submit() { |
586 | 1575 | if (this.$refs.form.validate()) { |
1576 | + let imageData = new FormData(); | |
1577 | + imageData.append("upload", this.imageFile); | |
1578 | + console.log(imageData); | |
587 | 1579 | let addStudent = { |
588 | - name: this.editedItem.name, | |
589 | - email: this.editedItem.email, | |
590 | - role: this.editedItem.role | |
1580 | + name: this.addStudents.name, | |
1581 | + email: this.addStudents.email, | |
1582 | + role: this.addStudents.role, | |
1583 | + dob: this.addStudents.date, | |
1584 | + city: this.addStudents.city, | |
1585 | + pincode: this.addStudents.pincode, | |
1586 | + country: this.addStudents.country, | |
1587 | + permanentAddress: this.addStudents.permanentAddress, | |
1588 | + presentAddress: this.addStudents.presentAddress, | |
1589 | + mobile: this.addStudents.mobile, | |
1590 | + state: this.addStudents.state, | |
1591 | + gender: this.addStudents.gender, | |
1592 | + fatherName: this.addStudents.fatherName, | |
1593 | + fatherCellNo: this.addStudents.fatherCellNo, | |
1594 | + motherName: this.addStudents.motherName, | |
1595 | + motherCellNo: this.addStudents.motherCellNo, | |
1596 | + establishmentYear: this.addStudents.establishmentYear, | |
1597 | + classId: this.addStudents.select, | |
1598 | + sectionId: this.addStudents.selectSection, | |
1599 | + imageData | |
1600 | + // upload:this.imageFile | |
591 | 1601 | }; |
592 | - // console.log(addStudent) | |
593 | 1602 | http() |
594 | 1603 | .post("/createStudent", addStudent) |
595 | 1604 | .then(response => { |
596 | - this.getStudentList(); | |
597 | - if (this.snackbar = true) { | |
1605 | + // console.log(addStudent) | |
1606 | + if ((this.snackbar = true)) { | |
598 | 1607 | this.text = "New user added successfully"; |
599 | 1608 | } |
600 | - | |
601 | - this.clear(); | |
1609 | + this.getStudentList(); | |
1610 | + this.clear(); | |
602 | 1611 | }) |
603 | 1612 | .catch(error => { |
604 | 1613 | // console.log(error); |
605 | - if (this.snackbar = true) { | |
606 | - this.text = error.response.data.message; | |
607 | - } | |
1614 | + if ((this.snackbar = true)) { | |
1615 | + this.text = error.response.data.message; | |
1616 | + } | |
608 | 1617 | }); |
609 | 1618 | } |
610 | 1619 | }, |
611 | - mail() { | |
612 | - }, | |
613 | - download() { | |
614 | - }, | |
1620 | + mail() {}, | |
1621 | + download() {}, | |
615 | 1622 | clear() { |
616 | 1623 | this.$refs.form.reset(); |
617 | 1624 | }, |
618 | 1625 | save() { |
1626 | + let imageData = new FormData(); | |
1627 | + imageData.append("upload", this.imageFile); | |
1628 | + console.log(imageData); | |
619 | 1629 | let editStudent = { |
620 | - name: this.editedItem.name, | |
621 | - email: this.editedItem.email, | |
622 | - mobile: this.editedItem.mobile, | |
623 | - dob: this.editedItem.mobile, | |
624 | - studentId: this.editedItem._id | |
1630 | + studentId:this.editedItem._id, | |
1631 | + name: this.editedItem.name, | |
1632 | + email: this.editedItem.email, | |
1633 | + role: this.editedItem.role, | |
1634 | + dob: this.editedItem.date, | |
1635 | + city: this.editedItem.city, | |
1636 | + pincode: this.editedItem.pincode, | |
1637 | + country: this.editedItem.country, | |
1638 | + permanentAddress: this.editedItem.permanentAddress, | |
1639 | + presentAddress: this.editedItem.presentAddress, | |
1640 | + mobile: this.editedItem.mobile, | |
1641 | + state: this.editedItem.state, | |
1642 | + gender: this.editedItem.gender, | |
1643 | + fatherName: this.editedItem.fatherName, | |
1644 | + fatherCellNo: this.editedItem.fatherCellNo, | |
1645 | + motherName: this.editedItem.motherName, | |
1646 | + motherCellNo: this.editedItem.motherCellNo, | |
1647 | + establishmentYear: this.editedItem.establishmentYear, | |
1648 | + classId: this.editedItem.select, | |
1649 | + sectionId: this.editedItem.selectSection, | |
1650 | + imageData | |
625 | 1651 | }; |
626 | 1652 | http() |
627 | 1653 | .put("/updateStudent", editStudent) |
... | ... | @@ -630,10 +1656,10 @@ export default { |
630 | 1656 | if ((this.snackbar = true)) { |
631 | 1657 | this.text = "Successfully Edit Existing User"; |
632 | 1658 | } |
633 | - this.getStudentList(); | |
1659 | + this.getStudentList(); | |
634 | 1660 | }) |
635 | 1661 | .catch(error => { |
636 | - // console.log(error); | |
1662 | + // console.log(error); | |
637 | 1663 | }); |
638 | 1664 | this.close(); |
639 | 1665 | }, |
... | ... | @@ -646,10 +1672,24 @@ export default { |
646 | 1672 | }, |
647 | 1673 | mounted() { |
648 | 1674 | this.getStudentList(); |
649 | - // console.log("Id",this.$store.state.id) | |
650 | - // console.log("token",this.$store.state.token) | |
1675 | + var token = this.$store.state.token; | |
1676 | + http() | |
1677 | + .get("/getClassesList", { | |
1678 | + headers: { Authorization: "Bearer " + token } | |
1679 | + }) | |
1680 | + .then(response => { | |
1681 | + this.addclass = response.data.data; | |
1682 | + // console.log("getClassesList=====>",this.addclass) | |
1683 | + }) | |
1684 | + .catch(err => { | |
1685 | + // console.log("err====>", err); | |
1686 | + this.$router.replace({ path: "/" }); | |
1687 | + }); | |
651 | 1688 | }, |
652 | - computed:{ | |
1689 | + | |
1690 | + // console.log("Id",this.$store.state.id) | |
1691 | + // console.log("token",this.$store.state.token) | |
1692 | + computed: { | |
653 | 1693 | toolbarColor() { |
654 | 1694 | return this.$vuetify.options.extra.mainNav; |
655 | 1695 | } |
... | ... | @@ -658,18 +1698,18 @@ export default { |
658 | 1698 | </script> |
659 | 1699 | <style scoped> |
660 | 1700 | .v-tabs__div { |
661 | - text-transform: none; | |
1701 | + text-transform: none; | |
662 | 1702 | } |
663 | 1703 | .v-input__prepend-outer { |
664 | - margin-right: 0px !important; | |
1704 | + margin-right: 0px !important; | |
665 | 1705 | } |
666 | 1706 | .v-card__actions .v-btn { |
667 | 1707 | margin: 0 15px; |
668 | 1708 | min-width: 120px; |
669 | 1709 | } |
670 | - .primary { | |
671 | - background-color: #aaa !important; | |
672 | - border-color: #aaa !important; | |
1710 | +.primary { | |
1711 | + background-color: #aaa !important; | |
1712 | + border-color: #aaa !important; | |
673 | 1713 | } |
674 | 1714 | h4 { |
675 | 1715 | background-repeat: no-repeat; |
... | ... | @@ -734,51 +1774,51 @@ h4 { |
734 | 1774 | #flex { |
735 | 1775 | height: 300px; |
736 | 1776 | } |
737 | -.top{ | |
738 | - margin-top:100px; | |
1777 | +.top { | |
1778 | + margin-top: 100px; | |
739 | 1779 | } |
740 | -.v-tabs__item a{ | |
741 | - font-size:16px !important; | |
1780 | +.v-tabs__item a { | |
1781 | + font-size: 16px !important; | |
742 | 1782 | } |
743 | -@media screen and (max-width: 769px){ | |
744 | - .top{ | |
745 | - margin-top:0 !important; | |
746 | - } | |
1783 | +@media screen and (max-width: 769px) { | |
1784 | + .top { | |
1785 | + margin-top: 0 !important; | |
1786 | + } | |
747 | 1787 | .userSearch .v-icon { |
748 | 1788 | font-size: 20px !important; |
749 | - margin-left: 20px ; | |
1789 | + margin-left: 20px; | |
750 | 1790 | } |
751 | 1791 | } |
752 | 1792 | @media screen and (max-width: 380px) { |
753 | -.right { | |
1793 | + .right { | |
754 | 1794 | float: none !important; |
755 | -} | |
756 | -.subheading { | |
1795 | + } | |
1796 | + .subheading { | |
757 | 1797 | font-size: 14px !important; |
758 | -} | |
759 | -.v-card__actions .v-btn{ | |
1798 | + } | |
1799 | + .v-card__actions .v-btn { | |
760 | 1800 | margin: 0 0px; |
761 | 1801 | min-width: 100px; |
762 | -} | |
763 | -/* .searchIcon .v-icon { | |
1802 | + } | |
1803 | + /* .searchIcon .v-icon { | |
764 | 1804 | font-size: 20px; |
765 | 1805 | margin-left: 20px; |
766 | 1806 | } */ |
767 | -.subheading { | |
1807 | + .subheading { | |
768 | 1808 | font-size: 12px !important; |
769 | -} | |
770 | -h5 { | |
1809 | + } | |
1810 | + h5 { | |
771 | 1811 | font-size: 13px; |
1812 | + } | |
772 | 1813 | } |
1814 | +.v-icon { | |
1815 | + font-size: 30px; | |
773 | 1816 | } |
774 | -.v-icon{ | |
775 | - font-size:30px; | |
776 | -} | |
777 | -@media screen and (min-width: 1270px){ | |
778 | -.hide{ | |
779 | - display: none; | |
780 | -} | |
781 | -/* } | |
1817 | +@media screen and (min-width: 1270px) { | |
1818 | + .hide { | |
1819 | + display: none; | |
1820 | + } | |
1821 | + /* } | |
782 | 1822 | @media screen and (max-width: 962px) { |
783 | 1823 | .imglogo{ |
784 | 1824 | position: absolute; |
... | ... | @@ -788,19 +1828,19 @@ h5 { |
788 | 1828 | height: 24px; |
789 | 1829 | } */ |
790 | 1830 | } |
791 | -@media screen and (max-width: 420px){ | |
792 | -.userSearch .v-text-field .v-label{ | |
793 | - line-height: 24px !important; | |
794 | -} | |
795 | -.userSearch .v-label{ | |
796 | - font-size: 13px !important; | |
797 | -} | |
798 | -.v-list__tile { | |
799 | - font-size:14px; | |
800 | - padding: 0 10px; | |
801 | -} | |
802 | -.name{ | |
803 | - font-size:15px; | |
804 | -} | |
1831 | +@media screen and (max-width: 420px) { | |
1832 | + .userSearch .v-text-field .v-label { | |
1833 | + line-height: 24px !important; | |
1834 | + } | |
1835 | + .userSearch .v-label { | |
1836 | + font-size: 13px !important; | |
1837 | + } | |
1838 | + .v-list__tile { | |
1839 | + font-size: 14px; | |
1840 | + padding: 0 10px; | |
1841 | + } | |
1842 | + .name { | |
1843 | + font-size: 15px; | |
1844 | + } | |
805 | 1845 | } |
806 | 1846 | </style> |
807 | 1847 | \ No newline at end of file | ... | ... |