Blame view

src/pages/Teachers/teachers.vue 47 KB
93a68cfa1   Jatinder Singh   first commit
1
  <template>
6b6e4e83d   Neeraj Sharma   design modified i...
2
    <v-app id="pages-dasboard">
687e0b929   Neeraj Sharma   add user,attenden...
3
      <v-tabs grow slider-color="gray">
6b6e4e83d   Neeraj Sharma   design modified i...
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
        <v-tab
          ripple
          @click="activeTab('existing')"
          v-bind:class="{ active: isActive }"
          id="tab"
          class="subheading"
        >Existing Teachers</v-tab>
        <v-tab
          ripple
          @click="activeTab('new')"
          v-bind:class="{ active: newActive }"
          id="tab1"
          User
          class="subheading"
        >Add New Teachers</v-tab>
        <!-- ****** EDIT TEACHERS DETAILS ****** -->
        <v-tab-item>
          <v-snackbar
            :timeout="timeout"
            :top="y === 'top'"
            :right="x === 'right'"
            :vertical="mode === 'vertical'"
            v-model="snackbar"
            color="success"
          >{{ text }}</v-snackbar>
79006bdcb   Neeraj Sharma   uplaod images all...
29
          <v-dialog v-model="dialog" max-width="1100px" scrollable>
813e55a79   Neeraj Sharma   implement parents...
30
31
            <v-card flat>
              <v-toolbar color="grey lighten-2" flat>
6b6e4e83d   Neeraj Sharma   design modified i...
32
                <v-spacer></v-spacer>
fc82ac667   Neeraj Sharma   fix design and re...
33
                <v-toolbar-title>Edit Teacher Profile</v-toolbar-title>
6b6e4e83d   Neeraj Sharma   design modified i...
34
                <v-spacer></v-spacer>
813e55a79   Neeraj Sharma   implement parents...
35
36
              </v-toolbar>
              <v-card-text style="height: 800px;">
f4df757fe   Neeraj Sharma   responsive vie in...
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
                <v-layout>
                  <v-flex
                    xs12
                    class="text-xs-center text-sm-center text-md-center text-lg-center my-4"
                  >
                    <v-avatar size="160px">
                      <img src="/static/icon/user.png" v-if="!editedItem.profilePicUrl && !imageUrl" />
                      <img
                        :src="editedItem.profilePicUrl"
                        v-else-if="editedItem.profilePicUrl && !imageUrl"
                      />
                      <img
                        v-if="imageUrl"
                        :src="imageUrl"
                        height="150"
                        style="border-radius:50%; width:200px"
                      />
                    </v-avatar>
                    <input
                      type="file"
                      style="display:none"
                      ref="image"
                      accept="image/*"
                      @change="onFilePicked"
                    />
                  </v-flex>
                </v-layout>
                <v-layout wrap>
                  <v-flex xs12 sm6>
6b6e4e83d   Neeraj Sharma   design modified i...
66
                    <v-layout>
f4df757fe   Neeraj Sharma   responsive vie in...
67
68
69
70
71
72
73
74
75
76
77
                      <v-flex xs4 sm4 class="pt-4 subheading">
                        <label class="right hidden-xs-only hidden-sm-only">Full Name:</label>
                        <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Name:</label>
                      </v-flex>
                      <v-flex xs8 sm6 class="ml-3">
                        <v-text-field
                          v-model="editedItem.name"
                          placeholder="fill your full Name"
                          type="text"
                          required
                        ></v-text-field>
6b6e4e83d   Neeraj Sharma   design modified i...
78
79
                      </v-flex>
                    </v-layout>
f4df757fe   Neeraj Sharma   responsive vie in...
80
81
                  </v-flex>
                  <v-flex xs12 sm6>
6b6e4e83d   Neeraj Sharma   design modified i...
82
                    <v-layout>
f4df757fe   Neeraj Sharma   responsive vie in...
83
84
                      <v-flex xs4 sm4 class="pt-4 subheading">
                        <label class="right">Email ID:</label>
6b6e4e83d   Neeraj Sharma   design modified i...
85
                      </v-flex>
0551a0f15   Neeraj Sharma   implemnet functio...
86
                      <v-flex xs8 sm6 class="ml-3">
f4df757fe   Neeraj Sharma   responsive vie in...
87
88
89
90
91
92
                        <v-text-field
                          placeholder="fill your email"
                          v-model="editedItem.email"
                          type="text"
                          required
                        ></v-text-field>
6b6e4e83d   Neeraj Sharma   design modified i...
93
94
                      </v-flex>
                    </v-layout>
f4df757fe   Neeraj Sharma   responsive vie in...
95
96
97
98
                  </v-flex>
                </v-layout>
                <v-layout wrap>
                  <v-flex xs12 sm6>
6b6e4e83d   Neeraj Sharma   design modified i...
99
                    <v-layout>
f4df757fe   Neeraj Sharma   responsive vie in...
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
                      <v-flex xs4 sm4 class="pt-4 subheading">
                        <label class="right hidden-sm-only hidden-xs-only">Date of Birth:</label>
                        <label class="right hidden-lg-only hidden-xl-only hidden-md-only">D.O.B:</label>
                      </v-flex>
                      <v-flex xs8 sm6 class="ml-3">
                        <v-menu
                          ref="menu"
                          :close-on-content-click="false"
                          v-model="menu2"
                          :nudge-right="40"
                          lazy
                          transition="scale-transition"
                          offset-y
                          full-width
                          min-width="290px"
                        >
                          <v-text-field
                            slot="activator"
                            v-model="editedItem.dob"
                            placeholder="Select date"
                          ></v-text-field>
                          <v-date-picker
                            ref="picker"
                            v-model="editedItem.dob"
                            :max="new Date().toISOString().substr(0, 10)"
                            min="1950-01-01"
                            @input="menu2 = false"
                          ></v-date-picker>
                        </v-menu>
6b6e4e83d   Neeraj Sharma   design modified i...
129
                      </v-flex>
f4df757fe   Neeraj Sharma   responsive vie in...
130
131
132
133
134
135
136
137
138
139
140
141
142
143
                    </v-layout>
                  </v-flex>
                  <v-flex xs12 sm6>
                    <v-layout>
                      <v-flex xs4 class="pt-4 subheading">
                        <label class="right">City:</label>
                      </v-flex>
                      <v-flex xs8 sm6 class="ml-3">
                        <v-text-field
                          v-model="editedItem.city"
                          placeholder="fill your City Name"
                          type="text"
                          required
                        ></v-text-field>
6b6e4e83d   Neeraj Sharma   design modified i...
144
145
                      </v-flex>
                    </v-layout>
f4df757fe   Neeraj Sharma   responsive vie in...
146
147
148
149
                  </v-flex>
                </v-layout>
                <v-layout wrap>
                  <v-flex xs12 sm6>
6b6e4e83d   Neeraj Sharma   design modified i...
150
                    <v-layout>
f4df757fe   Neeraj Sharma   responsive vie in...
151
152
                      <v-flex xs4 class="pt-4 subheading">
                        <label class="right">State:</label>
6b6e4e83d   Neeraj Sharma   design modified i...
153
                      </v-flex>
f4df757fe   Neeraj Sharma   responsive vie in...
154
155
156
157
158
159
160
                      <v-flex xs8 sm6 class="ml-3">
                        <v-text-field
                          v-model="editedItem.state"
                          placeholder="fill your State Name"
                          type="text"
                          required
                        ></v-text-field>
6b6e4e83d   Neeraj Sharma   design modified i...
161
162
                      </v-flex>
                    </v-layout>
f4df757fe   Neeraj Sharma   responsive vie in...
163
164
                  </v-flex>
                  <v-flex xs12 sm6>
6b6e4e83d   Neeraj Sharma   design modified i...
165
                    <v-layout>
f4df757fe   Neeraj Sharma   responsive vie in...
166
167
                      <v-flex xs4 class="pt-4 subheading">
                        <label class="right">PinCode:</label>
6b6e4e83d   Neeraj Sharma   design modified i...
168
                      </v-flex>
f4df757fe   Neeraj Sharma   responsive vie in...
169
170
171
172
173
174
175
                      <v-flex xs8 sm6 class="ml-3">
                        <v-text-field
                          v-model="editedItem.pincode"
                          placeholder="fill your pincode"
                          type="number"
                          required
                        ></v-text-field>
6b6e4e83d   Neeraj Sharma   design modified i...
176
177
                      </v-flex>
                    </v-layout>
f4df757fe   Neeraj Sharma   responsive vie in...
178
179
180
181
                  </v-flex>
                </v-layout>
                <v-layout wrap>
                  <v-flex xs12 sm6>
6b6e4e83d   Neeraj Sharma   design modified i...
182
                    <v-layout>
f4df757fe   Neeraj Sharma   responsive vie in...
183
184
185
186
187
188
189
190
191
192
193
                      <v-flex xs4 class="pt-4 subheading">
                        <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label>
                        <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Mobile:</label>
                      </v-flex>
                      <v-flex xs8 sm6 class="ml-3">
                        <v-text-field
                          v-model="editedItem.mobileNo"
                          placeholder="fill your MobileNo"
                          type="number"
                          required
                        ></v-text-field>
6b6e4e83d   Neeraj Sharma   design modified i...
194
                      </v-flex>
f4df757fe   Neeraj Sharma   responsive vie in...
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
                    </v-layout>
                  </v-flex>
                  <v-flex xs12 sm6>
                    <v-layout>
                      <v-flex xs4 class="pt-4 subheading">
                        <label class="right hidden-xs-only hidden-sm-only">Select Country:</label>
                        <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Country:</label>
                      </v-flex>
                      <v-flex xs8 sm6 class="ml-3">
                        <v-autocomplete
                          v-model="editedItem.country"
                          :items="countries"
                          placeholder="Select Country Name"
                          required
                        ></v-autocomplete>
6b6e4e83d   Neeraj Sharma   design modified i...
210
211
                      </v-flex>
                    </v-layout>
f4df757fe   Neeraj Sharma   responsive vie in...
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
                  </v-flex>
                </v-layout>
                <v-layout wrap>
                  <v-flex xs12 sm6>
                    <v-layout>
                      <v-flex xs4 class="pt-4 subheading">
                        <label class="right">Join Date:</label>
                      </v-flex>
                      <v-flex xs8 sm6 class="ml-3">
                        <v-menu
                          ref="menu"
                          :close-on-content-click="false"
                          v-model="menu3"
                          :nudge-right="40"
                          lazy
                          transition="scale-transition"
                          offset-y
                          full-width
                          min-width="290px"
                        >
                          <v-text-field
                            slot="activator"
                            v-model="editedItem.joinDate"
                            placeholder="Select date"
                          ></v-text-field>
                          <v-date-picker
                            ref="picker"
                            v-model="editedItem.joinDate"
                            :max="new Date().toISOString().substr(0, 10)"
                            min="1950-01-01"
                            @input="menu3 = false"
                          ></v-date-picker>
                        </v-menu>
6b6e4e83d   Neeraj Sharma   design modified i...
245
                      </v-flex>
f4df757fe   Neeraj Sharma   responsive vie in...
246
247
248
249
250
251
252
253
                    </v-layout>
                  </v-flex>
                  <v-flex xs12 sm6>
                    <v-layout>
                      <v-flex xs4 class="pt-4 subheading">
                        <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label>
                        <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod :</label>
                      </v-flex>
0551a0f15   Neeraj Sharma   implemnet functio...
254
                      <v-flex xs8 sm6 class="ml-3">
f4df757fe   Neeraj Sharma   responsive vie in...
255
256
257
258
259
260
                        <v-text-field
                          label="Select Image"
                          @click="pickFile"
                          v-model="imageName"
                          append-icon="attach_file"
                        ></v-text-field>
6b6e4e83d   Neeraj Sharma   design modified i...
261
262
                      </v-flex>
                    </v-layout>
f4df757fe   Neeraj Sharma   responsive vie in...
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
                  </v-flex>
                </v-layout>
                <v-layout class="hidden-xs-only hidden-sm-only" wrap>
                  <v-flex xs12 sm12>
                    <v-layout>
                      <v-flex xs4 sm2 class="pt-4 subheading ml-5">
                        <label class="right pr-2">Present Address:</label>
                      </v-flex>
                      <v-flex xs8 sm10>
                        <v-text-field
                          name="input-4-3"
                          v-model="editedItem.presentAddress"
                          placeholder="fill Your present Address"
                          required
                        ></v-text-field>
                      </v-flex>
                    </v-layout>
                  </v-flex>
                  <v-flex xs12 sm12>
                    <v-layout>
                      <v-flex xs4 sm2 class="pt-4 subheading ml-5 addressForm">
                        <label class="pr-2">Permanent Address:</label>
                      </v-flex>
                      <v-flex xs12 sm10>
                        <v-text-field
                          name="input-4-3"
                          v-model="editedItem.permanentAddress"
                          placeholder="fill Your Permanent Address"
                          required
                        ></v-text-field>
                      </v-flex>
                    </v-layout>
                  </v-flex>
                </v-layout>
                <v-layout class="hidden-lg-only hidden-md-only hidden-xl-only" wrap>
                  <v-flex xs12 sm12>
                    <v-layout>
                      <v-flex xs12 sm3 class="pt-4 subheading text-xs-center">
                        <label class>Present Address:</label>
aa8fc5033   Neeraj Sharma   implenment all pa...
302
                      </v-flex>
f4df757fe   Neeraj Sharma   responsive vie in...
303
304
                    </v-layout>
                    <v-layout>
aa8fc5033   Neeraj Sharma   implenment all pa...
305
                      <v-flex xs12 sm12>
f4df757fe   Neeraj Sharma   responsive vie in...
306
307
308
309
310
311
312
313
314
315
316
317
318
                        <v-textarea
                          name="input-4-3"
                          v-model="editedItem.presentAddress"
                          placeholder="fill Your present Address"
                          required
                        ></v-textarea>
                      </v-flex>
                    </v-layout>
                  </v-flex>
                  <v-flex xs12 sm12>
                    <v-layout>
                      <v-flex xs12 sm3 class="pt-4 pr-4 subheading text-xs-center addressForm">
                        <label>Permanent Address:</label>
aa8fc5033   Neeraj Sharma   implenment all pa...
319
320
                      </v-flex>
                    </v-layout>
f4df757fe   Neeraj Sharma   responsive vie in...
321
                    <v-layout>
6b6e4e83d   Neeraj Sharma   design modified i...
322
                      <v-flex xs12 sm12>
f4df757fe   Neeraj Sharma   responsive vie in...
323
324
325
326
327
328
                        <v-textarea
                          name="input-4-3"
                          v-model="editedItem.permanentAddress"
                          placeholder="fill Your Permanent Address"
                          required
                        ></v-textarea>
6b6e4e83d   Neeraj Sharma   design modified i...
329
330
                      </v-flex>
                    </v-layout>
f4df757fe   Neeraj Sharma   responsive vie in...
331
332
333
334
335
336
337
338
339
340
341
342
343
344
                  </v-flex>
                </v-layout>
                <v-layout>
                  <v-flex xs12 sm12>
                    <v-layout>
                      <v-flex xs6>
                        <v-btn round dark @click.native="close">Cancel</v-btn>
                      </v-flex>
                      <v-flex xs6>
                        <v-btn @click="save" round dark :loading="loading" class="right">Save</v-btn>
                      </v-flex>
                    </v-layout>
                  </v-flex>
                </v-layout>
813e55a79   Neeraj Sharma   implement parents...
345
346
              </v-card-text>
            </v-card>
6b6e4e83d   Neeraj Sharma   design modified i...
347
          </v-dialog>
813e55a79   Neeraj Sharma   implement parents...
348
          <!-- ****** PROFILE VIEW TEACHERS DETAILS ******  -->
6b6e4e83d   Neeraj Sharma   design modified i...
349

79006bdcb   Neeraj Sharma   uplaod images all...
350
351
352
          <v-dialog v-model="dialog1" max-width="600px" scrollable>
            <v-card>
              <v-toolbar color="grey lighten-2" flat>
813e55a79   Neeraj Sharma   implement parents...
353
354
355
356
357
358
359
                <v-spacer></v-spacer>
                <v-toolbar-title>
                  <h3>Teacher Profile</h3>
                </v-toolbar-title>
                <v-spacer></v-spacer>
                <v-icon @click="close1">close</v-icon>
              </v-toolbar>
79006bdcb   Neeraj Sharma   uplaod images all...
360
              <v-card-text style="height: 700px;">
6b6e4e83d   Neeraj Sharma   design modified i...
361
362
363
                <v-container grid-list-md>
                  <v-layout wrap>
                    <v-flex>
813e55a79   Neeraj Sharma   implement parents...
364
365
366
367
368
                      <v-flex align-center justify-center layout text-xs-center>
                        <v-avatar size="160px">
                          <img src="/static/icon/user.png" v-if="!editedItem.profilePicUrl" />
                          <img :src="editedItem.profilePicUrl" v-else-if="editedItem.profilePicUrl" />
                        </v-avatar>
79006bdcb   Neeraj Sharma   uplaod images all...
369
                      </v-flex>
6b6e4e83d   Neeraj Sharma   design modified i...
370
371
                      <v-layout>
                        <v-flex xs5 sm6>
aa8fc5033   Neeraj Sharma   implenment all pa...
372
373
374
                          <h5 class="right my-1">
                            <b>Full Name:</b>
                          </h5>
03dcbf0c1   Neeraj Sharma   fix all api and r...
375
                        </v-flex>
6b6e4e83d   Neeraj Sharma   design modified i...
376
377
                        <v-flex sm6 xs8>
                          <h5 class="my-1">{{ editedItem.name }}</h5>
03dcbf0c1   Neeraj Sharma   fix all api and r...
378
379
                        </v-flex>
                      </v-layout>
03dcbf0c1   Neeraj Sharma   fix all api and r...
380
                      <v-layout>
6b6e4e83d   Neeraj Sharma   design modified i...
381
                        <v-flex xs5 sm6>
aa8fc5033   Neeraj Sharma   implenment all pa...
382
383
384
                          <h5 class="right my-1">
                            <b>Email:</b>
                          </h5>
03dcbf0c1   Neeraj Sharma   fix all api and r...
385
                        </v-flex>
6b6e4e83d   Neeraj Sharma   design modified i...
386
387
                        <v-flex sm6 xs8>
                          <h5 class="my-1">{{ editedItem.email }}</h5>
03dcbf0c1   Neeraj Sharma   fix all api and r...
388
389
                        </v-flex>
                      </v-layout>
6b6e4e83d   Neeraj Sharma   design modified i...
390
391
                      <v-layout>
                        <v-flex xs5 sm6>
aa8fc5033   Neeraj Sharma   implenment all pa...
392
393
394
                          <h5 class="right my-1">
                            <b>City:</b>
                          </h5>
03dcbf0c1   Neeraj Sharma   fix all api and r...
395
                        </v-flex>
6b6e4e83d   Neeraj Sharma   design modified i...
396
397
                        <v-flex sm6 xs8>
                          <h5 class="my-1">{{ editedItem.city }}</h5>
03dcbf0c1   Neeraj Sharma   fix all api and r...
398
                        </v-flex>
6b6e4e83d   Neeraj Sharma   design modified i...
399
400
401
                      </v-layout>
                      <v-layout>
                        <v-flex xs5 sm6>
aa8fc5033   Neeraj Sharma   implenment all pa...
402
403
404
                          <h5 class="right my-1">
                            <b>State:</b>
                          </h5>
6b6e4e83d   Neeraj Sharma   design modified i...
405
406
407
408
409
410
411
                        </v-flex>
                        <v-flex sm6 xs8>
                          <h5 class="my-1">{{ editedItem.state }}</h5>
                        </v-flex>
                      </v-layout>
                      <v-layout>
                        <v-flex xs5 sm6>
aa8fc5033   Neeraj Sharma   implenment all pa...
412
413
414
                          <h5 class="right my-1">
                            <b>Country:</b>
                          </h5>
6b6e4e83d   Neeraj Sharma   design modified i...
415
416
417
418
419
420
421
                        </v-flex>
                        <v-flex sm6 xs8>
                          <h5 class="my-1">{{ editedItem.country }}</h5>
                        </v-flex>
                      </v-layout>
                      <v-layout>
                        <v-flex xs5 sm6>
aa8fc5033   Neeraj Sharma   implenment all pa...
422
423
424
                          <h5 class="right my-1">
                            <b>Pincode:</b>
                          </h5>
6b6e4e83d   Neeraj Sharma   design modified i...
425
426
427
428
429
                        </v-flex>
                        <v-flex sm6 xs8>
                          <h5 class="my-1">{{ editedItem.pincode }}</h5>
                        </v-flex>
                      </v-layout>
813e55a79   Neeraj Sharma   implement parents...
430
                      <v-layout>
6b6e4e83d   Neeraj Sharma   design modified i...
431
                        <v-flex xs5 sm6>
aa8fc5033   Neeraj Sharma   implenment all pa...
432
433
434
                          <h5 class="right my-1">
                            <b>Mobile No:</b>
                          </h5>
6b6e4e83d   Neeraj Sharma   design modified i...
435
436
437
438
439
440
441
                        </v-flex>
                        <v-flex sm6 xs8>
                          <h5 class="my-1">{{ editedItem.mobileNo }}</h5>
                        </v-flex>
                      </v-layout>
                      <v-layout>
                        <v-flex xs5 sm6>
aa8fc5033   Neeraj Sharma   implenment all pa...
442
443
444
                          <h5 class="right my-1">
                            <b>Join Date:</b>
                          </h5>
6b6e4e83d   Neeraj Sharma   design modified i...
445
446
                        </v-flex>
                        <v-flex sm6 xs8>
506be6fd7   Neeraj Sharma   implemet dyamic i...
447
                          <h5 class="my-1">{{ dates(editedItem.joinDate) }}</h5>
6b6e4e83d   Neeraj Sharma   design modified i...
448
449
450
451
                        </v-flex>
                      </v-layout>
                      <v-layout>
                        <v-flex xs5 sm6>
aa8fc5033   Neeraj Sharma   implenment all pa...
452
453
454
                          <h5 class="right my-1">
                            <b>D.O.B :</b>
                          </h5>
6b6e4e83d   Neeraj Sharma   design modified i...
455
456
                        </v-flex>
                        <v-flex sm6 xs8>
506be6fd7   Neeraj Sharma   implemet dyamic i...
457
                          <h5 class="my-1">{{ dates(editedItem.dob) }}</h5>
6b6e4e83d   Neeraj Sharma   design modified i...
458
459
460
                        </v-flex>
                      </v-layout>
                      <v-layout>
813e55a79   Neeraj Sharma   implement parents...
461
                        <v-flex xs6 sm6>
aa8fc5033   Neeraj Sharma   implenment all pa...
462
463
464
                          <h5 class="right my-1">
                            <b>Permanent Address:</b>
                          </h5>
813e55a79   Neeraj Sharma   implement parents...
465
466
467
468
                        </v-flex>
                        <v-flex sm6 xs8>
                          <h5 class="my-1">{{ editedItem.permanentAddress }}</h5>
                        </v-flex>
6b6e4e83d   Neeraj Sharma   design modified i...
469
470
                      </v-layout>
                      <v-layout>
813e55a79   Neeraj Sharma   implement parents...
471
                        <v-flex xs6 sm6>
aa8fc5033   Neeraj Sharma   implenment all pa...
472
473
474
                          <h5 class="right my-1">
                            <b>present Address:</b>
                          </h5>
813e55a79   Neeraj Sharma   implement parents...
475
476
477
478
                        </v-flex>
                        <v-flex sm6 xs8>
                          <h5 class="my-1">{{ editedItem.presentAddress }}</h5>
                        </v-flex>
6b6e4e83d   Neeraj Sharma   design modified i...
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
                      </v-layout>
                    </v-flex>
                  </v-layout>
                </v-container>
              </v-card-text>
            </v-card>
          </v-dialog>
          <v-snackbar
            :timeout="timeout"
            :top="y === 'top'"
            :right="x === 'right'"
            :vertical="mode === 'vertical'"
            v-model="snackbar"
            color="success"
          >{{ text }}</v-snackbar>
1c1942362   Neeraj Sharma   commit code Schoo...
494

6b6e4e83d   Neeraj Sharma   design modified i...
495
          <!-- ****** EXISTING-Teachers TABLE DATA****** -->
d791fb8d2   Neeraj Sharma   edit image solve ...
496

6b6e4e83d   Neeraj Sharma   design modified i...
497
498
499
500
501
502
503
          <v-data-table
            :headers="headers"
            :items="desserts"
            :pagination.sync="pagination"
            :search="search"
          >
            <template slot="items" slot-scope="props">
aa8fc5033   Neeraj Sharma   implenment all pa...
504
              <td id="td" class="text-xs-center">{{ props.index + 1}}</td>
79006bdcb   Neeraj Sharma   uplaod images all...
505
              <td id="td" class="text-xs-center">
813e55a79   Neeraj Sharma   implement parents...
506
507
508
509
510
                <v-avatar>
                  <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" />
                  <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" />
                </v-avatar>
              </td>
6b6e4e83d   Neeraj Sharma   design modified i...
511
512
              <td id="td" class="text-xs-center">{{ props.item.name}}</td>
              <td id="td" class="text-xs-center">{{ props.item.email }}</td>
506be6fd7   Neeraj Sharma   implemet dyamic i...
513
514
              <td id="td" class="text-xs-center">{{ dates(props.item.dob) }}</td>
              <td id="td" class="text-xs-center">{{ dates(props.item.joinDate)}}</td>
6b6e4e83d   Neeraj Sharma   design modified i...
515
516
517
              <td id="td" class="text-xs-center">{{ props.item.mobileNo }}</td>
              <td class="text-xs-center">
                <span>
495e4037c   Neeraj Sharma   update
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
                  <v-tooltip top>
                    <img
                      slot="activator"
                      style="cursor:pointer; width:25px; height:18px; "
                      class="mr5"
                      @click="profile(props.item)"
                      src="/static/icon/eye1.png"
                    />
                    <span>View</span>
                  </v-tooltip>
                  <v-tooltip top>
                    <img
                      slot="activator"
                      style="cursor:pointer; width:20px; height:18px; "
                      class="mr5"
                      @click="editItem(props.item)"
                      src="/static/icon/edit1.png"
                    />
                    <span>Edit</span>
                  </v-tooltip>
                  <v-tooltip top>
                    <img
                      slot="activator"
                      style="cursor:pointer; width:20px; height:20px; "
                      class="mr5"
                      @click="deleteItem(props.item)"
                      src="/static/icon/delete1.png"
                    />
                    <span>Delete</span>
                  </v-tooltip>
6b6e4e83d   Neeraj Sharma   design modified i...
548
549
550
551
552
553
554
555
556
557
558
                </span>
              </td>
            </template>
            <v-alert
              slot="no-results"
              :value="true"
              color="error"
              icon="warning"
            >Your search for "{{ search }}" found no results.</v-alert>
          </v-data-table>
        </v-tab-item>
1c1942362   Neeraj Sharma   commit code Schoo...
559

6b6e4e83d   Neeraj Sharma   design modified i...
560
561
        <!-- ****** Add Teachers Data****** -->
        <v-tab-item>
aa8fc5033   Neeraj Sharma   implenment all pa...
562
          <v-container fluid>
6b6e4e83d   Neeraj Sharma   design modified i...
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
            <v-snackbar
              :timeout="timeout"
              :top="y === 'top'"
              :right="x === 'right'"
              :vertical="mode === 'vertical'"
              v-model="snackbar"
              color="success"
            >{{ text }}</v-snackbar>
            <v-flex xs12 sm12 class="my-4">
              <v-card flat>
                <v-form ref="form" v-model="valid" lazy-validation>
                  <v-container fluid>
                    <v-layout>
                      <v-flex
                        xs12
f4df757fe   Neeraj Sharma   responsive vie in...
578
                        class="text-xs-center text-sm-center text-md-center text-lg-center my-4"
6b6e4e83d   Neeraj Sharma   design modified i...
579
580
                      >
                        <v-avatar size="100px">
813e55a79   Neeraj Sharma   implement parents...
581
                          <img src="/static/icon/user.png" v-if="!imageUrl" />
6b6e4e83d   Neeraj Sharma   design modified i...
582
                        </v-avatar>
6b6e4e83d   Neeraj Sharma   design modified i...
583
                        <img
2b0e316ee   Neeraj Sharma   upload mytiple im...
584
                          :src="imageUrl"
6b6e4e83d   Neeraj Sharma   design modified i...
585
586
587
                          height="150"
                          v-if="imageUrl"
                          style="border-radius:50%; width:200px"
813e55a79   Neeraj Sharma   implement parents...
588
                        />
6b6e4e83d   Neeraj Sharma   design modified i...
589
590
                      </v-flex>
                    </v-layout>
03dcbf0c1   Neeraj Sharma   fix all api and r...
591
                    <v-layout>
6b6e4e83d   Neeraj Sharma   design modified i...
592
593
594
                      <v-flex xs12 sm6>
                        <v-layout>
                          <v-flex xs4 class="pt-4 subheading">
0551a0f15   Neeraj Sharma   implemnet functio...
595
596
597
598
                            <label class="right hidden-sm-only hidden-xs-only">Full Name:</label>
                            <label
                              class="right hidden-lg-only hidden-xl-only hidden-md-only"
                            >Full Name</label>
6b6e4e83d   Neeraj Sharma   design modified i...
599
600
601
602
603
604
605
606
607
608
609
610
                          </v-flex>
                          <v-flex xs8 class="ml-3">
                            <v-text-field
                              v-model="addTeachers.name"
                              placeholder="fill your full Name"
                              name="name"
                              type="text"
                              :rules="nameRules"
                              required
                            ></v-text-field>
                          </v-flex>
                        </v-layout>
03dcbf0c1   Neeraj Sharma   fix all api and r...
611
                      </v-flex>
6b6e4e83d   Neeraj Sharma   design modified i...
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
                      <v-flex xs12 sm6>
                        <v-layout>
                          <v-flex xs4 class="pt-4 subheading">
                            <label class="right">Email ID:</label>
                          </v-flex>
                          <v-flex xs8 class="ml-3">
                            <v-text-field
                              placeholder="fill your email"
                              :rules="emailRules"
                              v-model="addTeachers.email"
                              type="text"
                              name="email"
                              required
                            ></v-text-field>
                          </v-flex>
                        </v-layout>
03dcbf0c1   Neeraj Sharma   fix all api and r...
628
629
                      </v-flex>
                    </v-layout>
0cefd6eff   Neeraj Sharma   add country input...
630
                    <v-layout>
6b6e4e83d   Neeraj Sharma   design modified i...
631
632
                      <v-flex xs12 sm6>
                        <v-layout>
aa8fc5033   Neeraj Sharma   implenment all pa...
633
634
635
                          <v-flex xs4 sm4 class="pt-4 subheading">
                            <label class="right hidden-sm-only hidden-xs-only">Date of Birth:</label>
                            <label class="right hidden-lg-only hidden-xl-only hidden-md-only">D.O.B:</label>
6b6e4e83d   Neeraj Sharma   design modified i...
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
                          </v-flex>
                          <v-flex xs8 class="ml-3">
                            <v-menu
                              ref="menu"
                              :close-on-content-click="false"
                              v-model="menu"
                              :nudge-right="40"
                              lazy
                              transition="scale-transition"
                              offset-y
                              full-width
                              min-width="290px"
                            >
                              <v-text-field
                                slot="activator"
                                :rules="dateRules"
                                v-model="addTeachers.date"
                                placeholder="Select date"
                              ></v-text-field>
                              <v-date-picker
                                ref="picker"
                                v-model="addTeachers.date"
                                :max="new Date().toISOString().substr(0, 10)"
                                min="1950-01-01"
                                @input="menu = false"
                              ></v-date-picker>
                            </v-menu>
                          </v-flex>
                        </v-layout>
03dcbf0c1   Neeraj Sharma   fix all api and r...
665
                      </v-flex>
6b6e4e83d   Neeraj Sharma   design modified i...
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
                      <v-flex xs12 sm6>
                        <v-layout>
                          <v-flex xs4 class="pt-4 subheading">
                            <label class="right">City:</label>
                          </v-flex>
                          <v-flex xs8 class="ml-3">
                            <v-text-field
                              v-model="addTeachers.city"
                              placeholder="fill your City Name"
                              name="City"
                              type="text"
                              :rules="cityRules"
                              required
                            ></v-text-field>
                          </v-flex>
                        </v-layout>
03dcbf0c1   Neeraj Sharma   fix all api and r...
682
683
                      </v-flex>
                    </v-layout>
6b6e4e83d   Neeraj Sharma   design modified i...
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
                    <v-layout>
                      <v-flex xs12 sm6>
                        <v-layout>
                          <v-flex xs4 class="pt-4 subheading">
                            <label class="right">State:</label>
                          </v-flex>
                          <v-flex xs8 class="ml-3">
                            <v-text-field
                              v-model="addTeachers.state"
                              placeholder="fill your State Name"
                              name="state"
                              type="text"
                              :rules="stateRules"
                              required
                            ></v-text-field>
                          </v-flex>
                        </v-layout>
                      </v-flex>
                      <v-flex xs12 sm6>
                        <v-layout>
                          <v-flex xs4 class="pt-4 subheading">
                            <label class="right">PinCode:</label>
                          </v-flex>
                          <v-flex xs8 class="ml-3">
                            <v-text-field
                              v-model="addTeachers.pincode"
                              placeholder="fill your pincode"
                              name="pincode"
                              type="number"
                              :rules="pincode"
                              required
                            ></v-text-field>
                          </v-flex>
                        </v-layout>
03dcbf0c1   Neeraj Sharma   fix all api and r...
718
                      </v-flex>
03dcbf0c1   Neeraj Sharma   fix all api and r...
719
                    </v-layout>
6b6e4e83d   Neeraj Sharma   design modified i...
720
721
722
723
                    <v-layout>
                      <v-flex xs12 sm6>
                        <v-layout>
                          <v-flex xs4 class="pt-4 subheading">
aa8fc5033   Neeraj Sharma   implenment all pa...
724
725
                            <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label>
                            <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Mobile:</label>
6b6e4e83d   Neeraj Sharma   design modified i...
726
727
728
729
                          </v-flex>
                          <v-flex xs8 class="ml-3">
                            <v-text-field
                              v-model="addTeachers.mobileNo"
f4df757fe   Neeraj Sharma   responsive vie in...
730
                              placeholder="fill your Mobile No."
6b6e4e83d   Neeraj Sharma   design modified i...
731
732
733
734
735
736
737
738
739
740
741
                              name="mobileNo"
                              type="number"
                              :rules="mobileNoRules"
                              required
                            ></v-text-field>
                          </v-flex>
                        </v-layout>
                      </v-flex>
                      <v-flex xs12 sm6>
                        <v-layout>
                          <v-flex xs4 class="pt-4 subheading">
aa8fc5033   Neeraj Sharma   implenment all pa...
742
743
                            <label class="right hidden-xs-only hidden-sm-only">Select Country:</label>
                            <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Country:</label>
6b6e4e83d   Neeraj Sharma   design modified i...
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
                          </v-flex>
                          <v-flex xs8 class="ml-3">
                            <v-autocomplete
                              v-model="addTeachers.country"
                              :rules="country"
                              :items="countries"
                              placeholder="Select Country Name"
                              required
                            ></v-autocomplete>
                          </v-flex>
                        </v-layout>
                      </v-flex>
                    </v-layout>
                    <v-layout>
                      <v-flex xs12 sm6>
                        <v-layout>
                          <v-flex xs4 class="pt-4 subheading">
f4df757fe   Neeraj Sharma   responsive vie in...
761
                            <label class="right">Join Date:</label>
6b6e4e83d   Neeraj Sharma   design modified i...
762
                          </v-flex>
813e55a79   Neeraj Sharma   implement parents...
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
                          <v-flex xs8 class="ml-3">
                            <v-menu
                              ref="menu1"
                              :close-on-content-click="false"
                              v-model="menu1"
                              :nudge-right="40"
                              lazy
                              transition="scale-transition"
                              offset-y
                              full-width
                              min-width="290px"
                            >
                              <v-text-field
                                slot="activator"
                                :rules="joinDateRules"
                                v-model="addTeachers.joinDate"
                                placeholder="Select date"
                              ></v-text-field>
                              <v-date-picker
                                ref="picker"
                                v-model="addTeachers.joinDate"
                                :max="new Date().toISOString().substr(0, 10)"
                                min="1950-01-01"
                                @input="menu1 = false"
                              ></v-date-picker>
                            </v-menu>
                          </v-flex>
6b6e4e83d   Neeraj Sharma   design modified i...
790
791
792
793
794
                        </v-layout>
                      </v-flex>
                      <v-flex xs12 sm6>
                        <v-layout>
                          <v-flex xs4 class="pt-4 subheading">
aa8fc5033   Neeraj Sharma   implenment all pa...
795
                            <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label>
f4df757fe   Neeraj Sharma   responsive vie in...
796
                            <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod:</label>
6b6e4e83d   Neeraj Sharma   design modified i...
797
798
799
800
801
802
                          </v-flex>
                          <v-flex xs8 class="ml-3">
                            <v-text-field
                              label="Select Image"
                              @click="pickFile"
                              v-model="imageName"
fc82ac667   Neeraj Sharma   fix design and re...
803
                              append-icon="attach_file"
6b6e4e83d   Neeraj Sharma   design modified i...
804
                            ></v-text-field>
813e55a79   Neeraj Sharma   implement parents...
805
806
807
808
809
810
811
                            <input
                              type="file"
                              style="display:none"
                              ref="image"
                              accept="image/*"
                              @change="onFilePicked"
                            />
6b6e4e83d   Neeraj Sharma   design modified i...
812
813
814
815
                          </v-flex>
                        </v-layout>
                      </v-flex>
                    </v-layout>
aa8fc5033   Neeraj Sharma   implenment all pa...
816
                    <v-layout class="hidden-xs-only hidden-sm-only">
006544386   Neeraj Sharma   implement task
817
                      <v-flex xs12 sm6>
aa8fc5033   Neeraj Sharma   implenment all pa...
818
                        <v-layout>
006544386   Neeraj Sharma   implement task
819
820
                          <v-flex xs4 md4 class="pt-4 subheading">
                            <label class="right">Present Address:</label>
aa8fc5033   Neeraj Sharma   implenment all pa...
821
                          </v-flex>
006544386   Neeraj Sharma   implement task
822
                          <v-flex xs8 md8 class="ml-3">
aa8fc5033   Neeraj Sharma   implenment all pa...
823
824
825
826
827
828
829
830
831
832
                            <v-text-field
                              name="input-4-3"
                              v-model="addTeachers.presentAddress"
                              :rules="presentAddress"
                              placeholder="fill Your present Address"
                              required
                            ></v-text-field>
                          </v-flex>
                        </v-layout>
                      </v-flex>
006544386   Neeraj Sharma   implement task
833
                      <v-flex xs12 sm6>
aa8fc5033   Neeraj Sharma   implenment all pa...
834
                        <v-layout>
006544386   Neeraj Sharma   implement task
835
836
                          <v-flex xs4 md4 class="pt-4 subheading addressForm">
                            <label class="right">Permanent Address:</label>
aa8fc5033   Neeraj Sharma   implenment all pa...
837
                          </v-flex>
006544386   Neeraj Sharma   implement task
838
                          <v-flex xs12 md8 class="ml-3">
aa8fc5033   Neeraj Sharma   implenment all pa...
839
840
841
842
843
844
845
846
847
848
                            <v-text-field
                              name="input-4-3"
                              v-model="addTeachers.permanentAddress"
                              :rules="permanentAddress"
                              placeholder="fill Your Permanent Address"
                              required
                            ></v-text-field>
                          </v-flex>
                        </v-layout>
                      </v-flex>
6b6e4e83d   Neeraj Sharma   design modified i...
849
                    </v-layout>
aa8fc5033   Neeraj Sharma   implenment all pa...
850
851
852
                    <v-layout class="hidden-lg-only hidden-md-only hidden-xl-only">
                      <v-flex xs12 sm12>
                        <v-layout>
0551a0f15   Neeraj Sharma   implemnet functio...
853
                          <v-flex xs12 sm12 class="pt-4 subheading text-xs-center">
f4df757fe   Neeraj Sharma   responsive vie in...
854
                            <label class>Present Addres:</label>
aa8fc5033   Neeraj Sharma   implenment all pa...
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
                          </v-flex>
                        </v-layout>
                        <v-layout>
                          <v-flex xs12 sm12>
                            <v-textarea
                              name="input-4-3"
                              v-model="addTeachers.presentAddress"
                              :rules="presentAddress"
                              placeholder="fill Your present Address"
                              required
                            ></v-textarea>
                          </v-flex>
                        </v-layout>
                      </v-flex>
                      <v-flex xs12 sm12>
                        <v-layout>
0551a0f15   Neeraj Sharma   implemnet functio...
871
                          <v-flex xs12 sm12 class="pt-4 pr-4 subheading text-xs-center addressForm">
f4df757fe   Neeraj Sharma   responsive vie in...
872
                            <label>Permanent Address:</label>
aa8fc5033   Neeraj Sharma   implenment all pa...
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
                          </v-flex>
                        </v-layout>
                        <v-layout>
                          <v-flex xs12 sm12>
                            <v-textarea
                              name="input-4-3"
                              v-model="addTeachers.permanentAddress"
                              :rules="permanentAddress"
                              placeholder="fill Your Permanent Address"
                              required
                            ></v-textarea>
                          </v-flex>
                        </v-layout>
                      </v-flex>
                    </v-layout>
                    <v-layout class="mx-2">
006544386   Neeraj Sharma   implement task
889
                      <v-flex xs12 sm11 offset-sm1>
aa8fc5033   Neeraj Sharma   implenment all pa...
890
                        <v-layout>
495e4037c   Neeraj Sharma   update
891
                          <v-flex xs6 class>
aa8fc5033   Neeraj Sharma   implenment all pa...
892
893
894
895
896
897
                            <v-btn @click="clear" round dark>clear</v-btn>
                          </v-flex>
                          <v-flex xs6>
                            <v-btn @click="submit" round dark :loading="loading" class="right">Add</v-btn>
                          </v-flex>
                        </v-layout>
6b6e4e83d   Neeraj Sharma   design modified i...
898
899
900
901
902
903
904
905
906
                      </v-flex>
                    </v-layout>
                  </v-container>
                </v-form>
              </v-card>
            </v-flex>
          </v-container>
        </v-tab-item>
      </v-tabs>
36fc987df   Neeraj Sharma   add loader in all...
907
908
909
      <div class="loader" v-if="showLoader">
        <v-progress-circular indeterminate color="white"></v-progress-circular>
      </div>
6b6e4e83d   Neeraj Sharma   design modified i...
910
    </v-app>
93a68cfa1   Jatinder Singh   first commit
911
912
913
  </template>
  
  <script>
03dcbf0c1   Neeraj Sharma   fix all api and r...
914
  import http from "@/Services/http.js";
506be6fd7   Neeraj Sharma   implemet dyamic i...
915
  import moment from "moment";
495e4037c   Neeraj Sharma   update
916
  import countryList from "@/script/country.js";
03dcbf0c1   Neeraj Sharma   fix all api and r...
917

93a68cfa1   Jatinder Singh   first commit
918
  export default {
93a68cfa1   Jatinder Singh   first commit
919
    data: () => ({
03dcbf0c1   Neeraj Sharma   fix all api and r...
920
921
922
923
924
925
926
      component: "report-generate",
      snackbar: false,
      y: "top",
      x: "right",
      mode: "",
      timeout: 3000,
      text: "",
813e55a79   Neeraj Sharma   implement parents...
927
      showLoader: false,
03dcbf0c1   Neeraj Sharma   fix all api and r...
928
      loading: false,
6b6e4e83d   Neeraj Sharma   design modified i...
929
930
      date: null,
      search: "",
ac10393a4   Neeraj Sharma   add calender date...
931
      menu: false,
6b6e4e83d   Neeraj Sharma   design modified i...
932
      menu1: false,
813e55a79   Neeraj Sharma   implement parents...
933
      menu2: false,
6b6e4e83d   Neeraj Sharma   design modified i...
934
      menu3: false,
93a68cfa1   Jatinder Singh   first commit
935
      dialog: false,
c35a8dafd   Jatinder Singh   minor changes
936
      dialog1: false,
c35a8dafd   Jatinder Singh   minor changes
937
      valid: true,
ee83012b3   Jatinder Singh   changes
938
939
      isActive: true,
      newActive: false,
5ac5570a9   Jatinder Singh   datatable changes
940
      pagination: {
03dcbf0c1   Neeraj Sharma   fix all api and r...
941
        rowsPerPage: 15
5ac5570a9   Jatinder Singh   datatable changes
942
      },
6b6e4e83d   Neeraj Sharma   design modified i...
943
944
945
946
      imageData: {},
      imageName: "",
      imageUrl: "",
      imageFile: "",
5f2dd99ed   Neeraj Sharma   add full name in ...
947
      nameRules: [v => !!v || " Full Name is required"],
6b6e4e83d   Neeraj Sharma   design modified i...
948
949
950
951
952
953
954
955
956
957
      dateRules: [v => !!v || " DOB is required"],
      cityRules: [v => !!v || " City Name is required"],
      pincode: [v => !!v || " Pincode is required"],
      country: [v => !!v || " Country Name is required"],
      permanentAddress: [v => !!v || " Permanent Address is required"],
      presentAddress: [v => !!v || " Present Address  is required"],
      mobileNoRules: [v => !!v || "Mobile Number is required"],
      stateRules: [v => !!v || "State Name is required"],
      joinDateRules: [v => !!v || " Join Date is required"],
      errorMessages: "",
c35a8dafd   Jatinder Singh   minor changes
958
      emailRules: [
03dcbf0c1   Neeraj Sharma   fix all api and r...
959
        v => !!v || "E-mail is required",
6b6e4e83d   Neeraj Sharma   design modified i...
960
961
962
963
        v =>
          /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) ||
          "E-mail must be valid"
      ],
495e4037c   Neeraj Sharma   update
964
      countries: [],
93a68cfa1   Jatinder Singh   first commit
965
966
      headers: [
        {
03dcbf0c1   Neeraj Sharma   fix all api and r...
967
968
          text: "No",
          align: "center",
93a68cfa1   Jatinder Singh   first commit
969
          sortable: false,
03dcbf0c1   Neeraj Sharma   fix all api and r...
970
          value: "No"
c35a8dafd   Jatinder Singh   minor changes
971
        },
813e55a79   Neeraj Sharma   implement parents...
972
973
974
975
976
977
        {
          text: "Profile Pic",
          value: "profilePicUrl",
          sortable: false,
          align: "center"
        },
03dcbf0c1   Neeraj Sharma   fix all api and r...
978
979
        { text: "Name", value: "name", sortable: false, align: "center" },
        { text: "Email", value: "email", sortable: false, align: "center" },
6b6e4e83d   Neeraj Sharma   design modified i...
980
        { text: "DOB", value: "dob", sortable: false, align: "center" },
813e55a79   Neeraj Sharma   implement parents...
981
982
983
984
985
986
987
988
989
990
991
992
        {
          text: "Join Date",
          value: "joinDate",
          sortable: false,
          align: "center"
        },
        {
          text: "Mobile No",
          value: "mobileNo",
          sortable: false,
          align: "center"
        },
6b6e4e83d   Neeraj Sharma   design modified i...
993
        { text: "Action", value: "", sortable: false, align: "center" }
93a68cfa1   Jatinder Singh   first commit
994
      ],
03dcbf0c1   Neeraj Sharma   fix all api and r...
995
      desserts: [],
93a68cfa1   Jatinder Singh   first commit
996
      editedIndex: -1,
813e55a79   Neeraj Sharma   implement parents...
997
      upload: "",
93a68cfa1   Jatinder Singh   first commit
998
      editedItem: {
e3e2a04c6   Neeraj Sharma   first commit
999
        role: "TEACHER",
03dcbf0c1   Neeraj Sharma   fix all api and r...
1000
        name: "",
03dcbf0c1   Neeraj Sharma   fix all api and r...
1001
        email: "",
6b6e4e83d   Neeraj Sharma   design modified i...
1002
1003
1004
1005
1006
1007
1008
1009
1010
        date: null,
        city: "",
        pincode: "",
        country: "",
        permanentAddress: "",
        presentAddress: "",
        mobileNo: "",
        state: "",
        joinDate: null
93a68cfa1   Jatinder Singh   first commit
1011
      },
6b6e4e83d   Neeraj Sharma   design modified i...
1012
      addTeachers: {
e3e2a04c6   Neeraj Sharma   first commit
1013
        role: "TEACHER",
03dcbf0c1   Neeraj Sharma   fix all api and r...
1014
        name: "",
03dcbf0c1   Neeraj Sharma   fix all api and r...
1015
        email: "",
6b6e4e83d   Neeraj Sharma   design modified i...
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
        date: null,
        city: "",
        pincode: "",
        country: "",
        permanentAddress: "",
        presentAddress: "",
        mobileNo: "",
        state: "",
        joinDate: null
      },
      defaultItem: {
        role: "TEACHER",
        name: "",
        email: ""
aa8fc5033   Neeraj Sharma   implenment all pa...
1030
      }
93a68cfa1   Jatinder Singh   first commit
1031
    }),
6b6e4e83d   Neeraj Sharma   design modified i...
1032
1033
1034
    watch: {
      menu(val) {
        val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR"));
ac10393a4   Neeraj Sharma   add calender date...
1035
      },
6b6e4e83d   Neeraj Sharma   design modified i...
1036
1037
      menu1(val) {
        val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR"));
ac10393a4   Neeraj Sharma   add calender date...
1038
      }
6b6e4e83d   Neeraj Sharma   design modified i...
1039
1040
    },
    methods: {
813e55a79   Neeraj Sharma   implement parents...
1041
1042
      save(date) {
        this.$refs.menu.save(date);
6b6e4e83d   Neeraj Sharma   design modified i...
1043
      },
813e55a79   Neeraj Sharma   implement parents...
1044
1045
      save(date) {
        this.$refs.menu1.save(date);
6b6e4e83d   Neeraj Sharma   design modified i...
1046
1047
      },
      pickFile() {
813e55a79   Neeraj Sharma   implement parents...
1048
        this.$refs.image.click();
6b6e4e83d   Neeraj Sharma   design modified i...
1049
      },
6b6e4e83d   Neeraj Sharma   design modified i...
1050
1051
1052
1053
      onFilePicked(e) {
        // console.log(e)
        const files = e.target.files;
        this.upload = e.target.files[0];
813e55a79   Neeraj Sharma   implement parents...
1054
        console.log("imageData-upload========>", this.upload);
6b6e4e83d   Neeraj Sharma   design modified i...
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
        if (files[0] !== undefined) {
          this.imageName = files[0].name;
          if (this.imageName.lastIndexOf(".") <= 0) {
            return;
          }
          const fr = new FileReader();
          fr.readAsDataURL(files[0]);
          fr.addEventListener("load", () => {
            this.imageUrl = fr.result;
            this.imageFile = files[0]; // this is an image file that can be sent to server...
            // this.imageData.imageUrl = URL.createObjectURL(this.imageFile);
            // console.log("upload=======>", this.imageData.imageUrl);
813e55a79   Neeraj Sharma   implement parents...
1067
            console.log("imageFile", this.imageUrl);
6b6e4e83d   Neeraj Sharma   design modified i...
1068
1069
1070
1071
1072
1073
1074
          });
        } else {
          this.imageName = "";
          this.imageFile = "";
          this.imageUrl = "";
        }
      },
506be6fd7   Neeraj Sharma   implemet dyamic i...
1075
1076
1077
      dates: function(date) {
        return moment(date).format("MMMM DD, YYYY");
      },
e3e2a04c6   Neeraj Sharma   first commit
1078
      getTeacherList() {
36fc987df   Neeraj Sharma   add loader in all...
1079
        this.showLoader = true;
03dcbf0c1   Neeraj Sharma   fix all api and r...
1080
        var token = this.$store.state.token;
6b6e4e83d   Neeraj Sharma   design modified i...
1081
1082
1083
1084
        http()
          .get("/getTeachersList", {
            headers: { Authorization: "Bearer " + token }
          })
e173bab21   Jatinder Singh   api
1085
          .then(response => {
e3e2a04c6   Neeraj Sharma   first commit
1086
            this.desserts = response.data.data;
36fc987df   Neeraj Sharma   add loader in all...
1087
            this.showLoader = false;
1c1942362   Neeraj Sharma   commit code Schoo...
1088
            // console.log("getTeacherList=====>",this.desserts)
03dcbf0c1   Neeraj Sharma   fix all api and r...
1089
          })
a17c68a03   Neeraj Sharma   implement two rou...
1090
          .catch(error => {
36fc987df   Neeraj Sharma   add loader in all...
1091
            this.showLoader = false;
a17c68a03   Neeraj Sharma   implement two rou...
1092
1093
1094
1095
1096
            if (error.response.status === 401) {
              this.$router.replace({ path: "/" });
              this.$store.dispatch("setToken", null);
              this.$store.dispatch("Id", null);
            }
03dcbf0c1   Neeraj Sharma   fix all api and r...
1097
          });
e173bab21   Jatinder Singh   api
1098
      },
03dcbf0c1   Neeraj Sharma   fix all api and r...
1099
      editItem(item) {
93a68cfa1   Jatinder Singh   first commit
1100
1101
        this.editedIndex = this.desserts.indexOf(item);
        this.editedItem = Object.assign({}, item);
813e55a79   Neeraj Sharma   implement parents...
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
        this.editedItem.dob =
          this.editedItem.dob != undefined
            ? (this.editedItem.dob = this.editedItem.dob.substring(0, 10))
            : (this.editedItem.dob = "");
        this.editedItem.joinDate =
          this.editedItem.joinDate != undefined
            ? (this.editedItem.joinDate = this.editedItem.joinDate.substring(
                0,
                10
              ))
            : (this.editedItem.joinDate = "");
33cfa4432   Neeraj Sharma   solve bugs J-date...
1113

93a68cfa1   Jatinder Singh   first commit
1114
1115
        this.dialog = true;
      },
03dcbf0c1   Neeraj Sharma   fix all api and r...
1116
      profile(item) {
c35a8dafd   Jatinder Singh   minor changes
1117
1118
1119
1120
        this.editedIndex = this.desserts.indexOf(item);
        this.editedItem = Object.assign({}, item);
        this.dialog1 = true;
      },
03dcbf0c1   Neeraj Sharma   fix all api and r...
1121
      deleteItem(item) {
e3e2a04c6   Neeraj Sharma   first commit
1122
1123
        let deleteTeachers = {
          teacherId: item._id
03dcbf0c1   Neeraj Sharma   fix all api and r...
1124
        };
1c1942362   Neeraj Sharma   commit code Schoo...
1125
        //  console.log("deleteUers",deleteTeachers)
03dcbf0c1   Neeraj Sharma   fix all api and r...
1126
        http()
6b6e4e83d   Neeraj Sharma   design modified i...
1127
1128
1129
1130
1131
1132
          .delete(
            "/deleteTeacher",
            confirm("Are you sure you want to delete this?") && {
              params: deleteTeachers
            }
          )
03dcbf0c1   Neeraj Sharma   fix all api and r...
1133
          .then(response => {
1c1942362   Neeraj Sharma   commit code Schoo...
1134
            // console.log("deleteUers",deleteTeachers)
03dcbf0c1   Neeraj Sharma   fix all api and r...
1135
            if ((this.snackbar = true)) {
5f1d4b444   Neeraj Sharma   fix design and fi...
1136
              this.text = "Successfully delete Existing Teacher";
6b6e4e83d   Neeraj Sharma   design modified i...
1137
            }
e3e2a04c6   Neeraj Sharma   first commit
1138
            this.getTeacherList();
03dcbf0c1   Neeraj Sharma   fix all api and r...
1139
1140
          })
          .catch(error => {
e3e2a04c6   Neeraj Sharma   first commit
1141
            console.log(error);
03dcbf0c1   Neeraj Sharma   fix all api and r...
1142
          });
93a68cfa1   Jatinder Singh   first commit
1143
      },
03dcbf0c1   Neeraj Sharma   fix all api and r...
1144
      activeTab(type) {
ee83012b3   Jatinder Singh   changes
1145
        switch (type) {
03dcbf0c1   Neeraj Sharma   fix all api and r...
1146
          case "existing":
ee83012b3   Jatinder Singh   changes
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
            this.newActive = false;
            this.isActive = true;
            break;
  
          default:
            this.newActive = true;
            this.isActive = false;
            break;
        }
      },
03dcbf0c1   Neeraj Sharma   fix all api and r...
1157
      close() {
93a68cfa1   Jatinder Singh   first commit
1158
        this.dialog = false;
813e55a79   Neeraj Sharma   implement parents...
1159
        setTimeout(() => {
93a68cfa1   Jatinder Singh   first commit
1160
1161
1162
1163
          this.editedItem = Object.assign({}, this.defaultItem);
          this.editedIndex = -1;
        }, 300);
      },
03dcbf0c1   Neeraj Sharma   fix all api and r...
1164
      close1() {
c35a8dafd   Jatinder Singh   minor changes
1165
1166
        this.dialog1 = false;
      },
03dcbf0c1   Neeraj Sharma   fix all api and r...
1167
      submit() {
c35a8dafd   Jatinder Singh   minor changes
1168
        if (this.$refs.form.validate()) {
1c1942362   Neeraj Sharma   commit code Schoo...
1169
          let addTeacher = {
6b6e4e83d   Neeraj Sharma   design modified i...
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
            name: this.addTeachers.name,
            email: this.addTeachers.email,
            role: this.addTeachers.role,
            dob: this.addTeachers.date,
            city: this.addTeachers.city,
            pincode: this.addTeachers.pincode,
            country: this.addTeachers.country,
            permanentAddress: this.addTeachers.permanentAddress,
            presentAddress: this.addTeachers.presentAddress,
            mobileNo: this.addTeachers.mobileNo,
            state: this.addTeachers.state,
ebe04cc1d   Neeraj Sharma   solve issue uploa...
1181
            joinDate: this.addTeachers.joinDate
03dcbf0c1   Neeraj Sharma   fix all api and r...
1182
          };
ebe04cc1d   Neeraj Sharma   solve issue uploa...
1183
1184
1185
1186
1187
          if (this.imageUrl) {
            var str = this.imageUrl;
            const [baseUrl, imageUrl] = str.split(/,/);
            addTeacher.upload = imageUrl;
          }
5f1d4b444   Neeraj Sharma   fix design and fi...
1188
          this.loading = true;
03dcbf0c1   Neeraj Sharma   fix all api and r...
1189
          http()
1c1942362   Neeraj Sharma   commit code Schoo...
1190
            .post("/createTeacher", addTeacher)
03dcbf0c1   Neeraj Sharma   fix all api and r...
1191
            .then(response => {
0551a0f15   Neeraj Sharma   implemnet functio...
1192
              this.imageUrl = "";
e3e2a04c6   Neeraj Sharma   first commit
1193
              this.getTeacherList();
0551a0f15   Neeraj Sharma   implemnet functio...
1194
1195
              this.snackbar = true;
              this.text = "New Teacher added successfully";
6b6e4e83d   Neeraj Sharma   design modified i...
1196
              this.clear();
5f1d4b444   Neeraj Sharma   fix design and fi...
1197
              this.loading = false;
03dcbf0c1   Neeraj Sharma   fix all api and r...
1198
1199
            })
            .catch(error => {
4d962bb59   Neeraj Sharma   fix name & email ...
1200
              // console.log(error);
6b6e4e83d   Neeraj Sharma   design modified i...
1201
1202
1203
              if ((this.snackbar = true)) {
                this.text = error.response.data.message;
              }
5f1d4b444   Neeraj Sharma   fix design and fi...
1204
              this.loading = false;
03dcbf0c1   Neeraj Sharma   fix all api and r...
1205
            });
c35a8dafd   Jatinder Singh   minor changes
1206
1207
        }
      },
03dcbf0c1   Neeraj Sharma   fix all api and r...
1208
      clear() {
ee83012b3   Jatinder Singh   changes
1209
        this.$refs.form.reset();
0551a0f15   Neeraj Sharma   implemnet functio...
1210
        this.imageUrl = "";
ee83012b3   Jatinder Singh   changes
1211
      },
03dcbf0c1   Neeraj Sharma   fix all api and r...
1212
      save() {
813e55a79   Neeraj Sharma   implement parents...
1213
        this.loading = true;
1c1942362   Neeraj Sharma   commit code Schoo...
1214
        let editTeacher = {
6b6e4e83d   Neeraj Sharma   design modified i...
1215
          teacherId: this.editedItem._id,
5f2dd99ed   Neeraj Sharma   add full name in ...
1216
          name: this.editedItem.name,
03dcbf0c1   Neeraj Sharma   fix all api and r...
1217
          email: this.editedItem.email,
6b6e4e83d   Neeraj Sharma   design modified i...
1218
1219
1220
1221
1222
1223
1224
1225
1226
          role: this.editedItem.role,
          dob: this.editedItem.date,
          city: this.editedItem.city,
          pincode: this.editedItem.pincode,
          country: this.editedItem.country,
          permanentAddress: this.editedItem.permanentAddress,
          presentAddress: this.editedItem.presentAddress,
          mobileNo: this.editedItem.mobileNo,
          state: this.editedItem.state,
813e55a79   Neeraj Sharma   implement parents...
1227
          joinDate: this.editedItem.joinDate
03dcbf0c1   Neeraj Sharma   fix all api and r...
1228
        };
813e55a79   Neeraj Sharma   implement parents...
1229
        if (this.imageUrl) {
ebe04cc1d   Neeraj Sharma   solve issue uploa...
1230
1231
1232
          var str = this.imageUrl;
          const [baseUrl, imageUrl] = str.split(/,/);
          editTeacher.upload = imageUrl;
813e55a79   Neeraj Sharma   implement parents...
1233
        }
03dcbf0c1   Neeraj Sharma   fix all api and r...
1234
        http()
1c1942362   Neeraj Sharma   commit code Schoo...
1235
          .put("/updateTeacher", editTeacher)
03dcbf0c1   Neeraj Sharma   fix all api and r...
1236
          .then(response => {
813e55a79   Neeraj Sharma   implement parents...
1237
            console.log("editTeacher", editTeacher);
0551a0f15   Neeraj Sharma   implemnet functio...
1238
1239
            this.snackbar = true;
            this.text = "Successfully Edit Existing Teacher";
d791fb8d2   Neeraj Sharma   edit image solve ...
1240
            this.loading = false;
6b6e4e83d   Neeraj Sharma   design modified i...
1241
            this.getTeacherList();
d791fb8d2   Neeraj Sharma   edit image solve ...
1242
            this.close();
03dcbf0c1   Neeraj Sharma   fix all api and r...
1243
1244
          })
          .catch(error => {
6b6e4e83d   Neeraj Sharma   design modified i...
1245
            console.log(error);
d791fb8d2   Neeraj Sharma   edit image solve ...
1246
            this.loading = false;
03dcbf0c1   Neeraj Sharma   fix all api and r...
1247
          });
93a68cfa1   Jatinder Singh   first commit
1248
      }
4413a8d93   Jatinder Singh   changes
1249
    },
03dcbf0c1   Neeraj Sharma   fix all api and r...
1250
    mounted() {
495e4037c   Neeraj Sharma   update
1251
1252
      const getCountryList = countryList();
      this.countries = getCountryList;
e3e2a04c6   Neeraj Sharma   first commit
1253
      this.getTeacherList();
f7979ec1a   Neeraj Sharma   add seach in heal...
1254
    },
a17c68a03   Neeraj Sharma   implement two rou...
1255
1256
1257
1258
1259
1260
1261
1262
    created() {
      this.$root.$on("app:search", search => {
        this.search = search;
      });
    },
    beforeDestroy() {
      // dont forget to remove the listener
      this.$root.$off("app:search");
e173bab21   Jatinder Singh   api
1263
    }
93a68cfa1   Jatinder Singh   first commit
1264
  };
93a68cfa1   Jatinder Singh   first commit
1265
  </script>
04e3fbc56   Jatinder Singh   minor fix
1266
  <style scoped>
ee83012b3   Jatinder Singh   changes
1267
  .active {
687e0b929   Neeraj Sharma   add user,attenden...
1268
    background-color: gray;
ee83012b3   Jatinder Singh   changes
1269
    color: white !important;
269061695   Jatinder Singh   changes
1270
  }
ab72cb628   Jatinder Singh   report changes
1271
1272
1273
  .activebtn {
    color: black !important;
  }
04e3fbc56   Jatinder Singh   minor fix
1274
  </style>