Blame view

src/pages/Report/admitCard.vue 22.6 KB
e56d46b13   Shikha Mishra   admit card option...
1
2
3
4
5
6
7
8
9
  <template>
    <v-container fluid class="body-color">
      <!-- **** Admit Card Table **** -->
      <v-card flat class="elevation-0 transparent">
        <v-form ref="form" v-model="valid" lazy-validation>
          <v-flex xs12 sm12 lg12>
            <v-layout wrap>
              <v-flex xs12 sm12 lg3>
                <v-layout>
fe0d05d29   Neeraj Sharma   complete design a...
10
                  <v-flex xs12 sm12 lg10 class="ml-2">
e56d46b13   Shikha Mishra   admit card option...
11
12
                    <v-autocomplete
                      v-model="getReport.examId"
fe0d05d29   Neeraj Sharma   complete design a...
13
                      label="Please Select Exam"
e56d46b13   Shikha Mishra   admit card option...
14
15
16
17
18
19
20
21
22
23
                      :items="examData"
                      item-text="examName"
                      item-value="_id"
                      :rules="examRules"
                      @change="getExamList"
                      required
                    ></v-autocomplete>
                  </v-flex>
                </v-layout>
              </v-flex>
558365e7b   Shikha Mishra   graph change in d...
24
              <v-flex xs12 sm12 lg3 v-if="getReport.examId">
e56d46b13   Shikha Mishra   admit card option...
25
                <v-layout>
fe0d05d29   Neeraj Sharma   complete design a...
26
                  <v-flex xs12 sm12 lg10 class="ml-2">
e56d46b13   Shikha Mishra   admit card option...
27
28
29
30
31
32
33
34
35
36
37
38
39
40
                    <v-select
                      v-model="getReport.classId"
                      label="Select your class"
                      type="text"
                      :items="classList"
                      item-text="classNum"
                      item-value="_id"
                      :rules="classRules"
                      @change="getSections(getReport.classId)"
                      required
                    ></v-select>
                  </v-flex>
                </v-layout>
              </v-flex>
558365e7b   Shikha Mishra   graph change in d...
41
              <v-flex xs12 sm12 lg3 v-if="getReport.classId">
e56d46b13   Shikha Mishra   admit card option...
42
                <v-layout>
fe0d05d29   Neeraj Sharma   complete design a...
43
                  <v-flex xs12 sm12 lg10 class="ml-2">
e56d46b13   Shikha Mishra   admit card option...
44
45
46
47
48
49
50
51
52
53
54
55
56
57
                    <v-select
                      :items="addSection"
                      label="Select your Section"
                      v-model="getReport.sectionId"
                      item-text="name"
                      item-value="_id"
                      name="Select Section"
                      @change="getStudents"
                      :rules="sectionRules"
                      required
                    ></v-select>
                  </v-flex>
                </v-layout>
              </v-flex>
558365e7b   Shikha Mishra   graph change in d...
58
              <v-flex xs12 sm12 lg3 v-if="getReport.sectionId">
e56d46b13   Shikha Mishra   admit card option...
59
                <v-layout>
fe0d05d29   Neeraj Sharma   complete design a...
60
                  <v-flex xs12 sm12 lg10 class="ml-2">
e56d46b13   Shikha Mishra   admit card option...
61
62
63
64
65
66
67
68
69
70
71
72
                    <v-select
                      :items="getStudentsList"
                      label="Select your student"
                      v-model="getReport.studentId"
                      item-text="name"
                      item-value="_id"
                      :rules="studentRules"
                      required
                    ></v-select>
                  </v-flex>
                </v-layout>
              </v-flex>
fe0d05d29   Neeraj Sharma   complete design a...
73
              <v-flex xs12 sm12 lg3>
e56d46b13   Shikha Mishra   admit card option...
74
                <v-layout>
fe0d05d29   Neeraj Sharma   complete design a...
75
                  <v-flex xs12 sm12 lg10 class="ml-2">
e56d46b13   Shikha Mishra   admit card option...
76
                    <v-autocomplete
fe0d05d29   Neeraj Sharma   complete design a...
77
                      label="Please Select View Type"
e56d46b13   Shikha Mishra   admit card option...
78
79
80
81
82
83
                      type="text"
                      :rules="typeRules"
                      :items="typeList"
                      v-model="getReport.form"
                      item-text="name"
                      item-value="value"
e56d46b13   Shikha Mishra   admit card option...
84
85
86
87
88
                      required
                    ></v-autocomplete>
                  </v-flex>
                </v-layout>
              </v-flex>
fe0d05d29   Neeraj Sharma   complete design a...
89
              <v-flex xs12 sm12 lg3>
e56d46b13   Shikha Mishra   admit card option...
90
91
92
93
94
                <v-btn
                  @click="getSchedule"
                  round
                  dark
                  :loading="loading"
fe0d05d29   Neeraj Sharma   complete design a...
95
                  class="open-dialog-button mt-3"
e56d46b13   Shikha Mishra   admit card option...
96
97
98
99
100
101
                >Get Report</v-btn>
              </v-flex>
            </v-layout>
          </v-flex>
        </v-form>
      </v-card>
fe0d05d29   Neeraj Sharma   complete design a...
102
103
104
105
106
107
108
109
110
111
      <div v-show="showTable">
        <v-flex xs12 sm12 md10 style="margin:auto">
          <v-layout>
            <v-flex xs12>
              <v-btn class="open-dialog-button right" round dark @click="printAdmitReport()">
                Print
                <v-icon right dark>print</v-icon>
              </v-btn>
            </v-flex>
          </v-layout>
b372c241b   Amber Dev   added gap in admi...
112
          <!-- ADMIT CARDS -->
fe0d05d29   Neeraj Sharma   complete design a...
113
114
          <div id="printMe" v-if="frontPart">
            <v-card
58fac10b4   Shikha Mishra   set enroll teache...
115
116
117
              v-for="(student,index) in getScheduleList.studentData"
              :key="index"
              class="mt-3"
aafc67337   Amber Dev   added gap in admi...
118
119
              style=" 
              page-break-after: always;   
fe0d05d29   Neeraj Sharma   complete design a...
120
121
122
123
124
125
126
127
128
            background-color: #fff;
            border: 1px solid #ddd;
            color: rgba(0,0,0,0.87);
            overflow-x: auto;
            display: block;
            padding:14px !important;
            webkit-box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.2), 0px 0px 0px 0px rgba(0,0,0,0.14), 0px 0px 0px 0px rgba(0,0,0,0.12) !important;
            box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.2), 0px 0px 0px 0px rgba(0,0,0,0.14), 0px 0px 0px 0px rgba(0,0,0,0.12) !important;"
            >
58fac10b4   Shikha Mishra   set enroll teache...
129
              <v-layout style="border-bottom: 1px solid #ddd;margin: 8px; auto">
aafc67337   Amber Dev   added gap in admi...
130
                <v-flex xs3 style="margin-bottom:0px">
fe0d05d29   Neeraj Sharma   complete design a...
131
132
                  <img
                    :src="userData.schoolLogoUrl"
9b444e5c3   Neeraj Sharma   add logo in login...
133
                    style="widht:80px;height:80px;"
fe0d05d29   Neeraj Sharma   complete design a...
134
135
136
137
138
                    alt="logo"
                    v-if="userData.schoolLogoUrl"
                  />
                  <img
                    src="/static/default_thumb.png"
9b444e5c3   Neeraj Sharma   add logo in login...
139
                    style="widht:80px;height:80px;"
fe0d05d29   Neeraj Sharma   complete design a...
140
141
                    v-else-if="!userData.schoolLogoUrl"
                  />
57a3ca1d6   Shikha Mishra   show uploader nam...
142
                  <div class="school-name">
3f2e2025c   Amber Dev   admit card printig
143
144
                    <div class="body-1">{{ student.schoolId.address }}</div>
                    <div class="body-1">{{ student.schoolId.mobile }}</div>
57a3ca1d6   Shikha Mishra   show uploader nam...
145
                  </div>
fe0d05d29   Neeraj Sharma   complete design a...
146
147
148
149
                </v-flex>
                <v-flex xs5 style="text-align:center;margin-bottom:0px">
                  <p
                    style="font-size:24px;color: #700CE8;letter-spacing:1px;margin-bottom: 4px"
3f2e2025c   Amber Dev   admit card printig
150
151
                  >{{ student.schoolId.name }}</p>
                  <p>{{ student.schoolId.email }}</p>
57a3ca1d6   Shikha Mishra   show uploader nam...
152

fe0d05d29   Neeraj Sharma   complete design a...
153
                  <div>
a76a6f135   Neeraj Sharma   implelement task
154
                    <h4>{{ getScheduleList.scheduleData[0].examId.examName }} Exam Admit Card</h4>
fe0d05d29   Neeraj Sharma   complete design a...
155
156
157
                  </div>
                </v-flex>
                <v-flex xs4 style="text-align:center;margin-bottom:0px">
58fac10b4   Shikha Mishra   set enroll teache...
158
                  <img src="/static/icon/user.png" v-if="!student.profilePicUrl" width="80" />
add6421d5   Shikha Mishra   Improve updateCou...
159
                  <img
3f2e2025c   Amber Dev   admit card printig
160
                    :src="student.profilePicUrl"
add6421d5   Shikha Mishra   Improve updateCou...
161
                    onerror="this.src='/static/icon/user.png';"
3f2e2025c   Amber Dev   admit card printig
162
                    v-if="student.profilePicUrl"
add6421d5   Shikha Mishra   Improve updateCou...
163
164
                    width="80"
                  />
fe0d05d29   Neeraj Sharma   complete design a...
165
166
167
168
169
170
                </v-flex>
              </v-layout>
              <v-layout>
                <v-flex xs5 style="margin-bottom:10px">
                  <p style="font-size: 16px;margin:0px;margin-bottom:8px;">
                    <b>Name :</b>
3f2e2025c   Amber Dev   admit card printig
171
                    <span>{{student.name}}</span>
fe0d05d29   Neeraj Sharma   complete design a...
172
173
174
                  </p>
                  <p style="font-size: 16px;margin:0px;margin-bottom:8px;">
                    <b>Class :</b>
3f2e2025c   Amber Dev   admit card printig
175
                    <span>{{student.classId.classNum}}</span>
fe0d05d29   Neeraj Sharma   complete design a...
176
177
178
                  </p>
                  <p style="font-size: 16px;margin:0px;margin-bottom:8px;">
                    <b>Roll :</b>
3f2e2025c   Amber Dev   admit card printig
179
                    <span>{{student.rollNo}}</span>
fe0d05d29   Neeraj Sharma   complete design a...
180
181
182
183
184
                  </p>
                </v-flex>
                <v-flex xs5 style="margin-bottom:10px">
                  <p style="font-size: 16px;margin:0px;margin-bottom:8px;">
                    <b>Section :</b>
3f2e2025c   Amber Dev   admit card printig
185
                    <span>{{student.sectionId.name }}</span>
fe0d05d29   Neeraj Sharma   complete design a...
186
187
188
                  </p>
                  <p style="font-size: 16px;margin:0px;margin-bottom:8px;">
                    <b>Blood Group :</b>
3f2e2025c   Amber Dev   admit card printig
189
                    <span style="color: #707478">{{student.bloodGroup }}</span>
fe0d05d29   Neeraj Sharma   complete design a...
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
                  </p>
                  <p style="font-size: 16px;margin:0px;margin-bottom:8px;">Subject in which Appearing</p>
                </v-flex>
              </v-layout>
              <table
                class="mb-5 tableRsponsive feeTypeTable"
                style="border: 1px solid lightgrey;
                    border-collapse: collapse;!important
                    table-layout: auto !important;
                    width: 100% !important;"
              >
                <thead style="border: 1px solid lightgrey !important;">
                  <tr style="border: 1px solid lightgrey !important;padding:4px;">
                    <td style="border: 1px solid lightgrey !important;padding: 6px;">No</td>
                    <td style="border: 1px solid lightgrey !important;padding: 6px;">Exam Date</td>
                    <td style="border: 1px solid lightgrey !important;padding: 6px;">Start Time</td>
                    <td style="border: 1px solid lightgrey !important;padding: 6px;">End Time</td>
                    <td style="border: 1px solid lightgrey !important;padding: 6px;">Subject Name</td>
                  </tr>
                </thead>
                <tbody style="border: 1px solid lightgrey !important;">
                  <tr v-for="(scheduleData,i) in getScheduleList.scheduleData" :key="i">
                    <td style="border:1px solid lightgrey !important; padding:6px;">{{ i + 1 }}</td>
                    <td
                      style="border: 1px solid lightgrey !important;padding: 6px;"
                    >{{ scheduleData.date ? scheduleData.date : '-' }}</td>
                    <td
                      style="border: 1px solid lightgrey !important;padding: 6px;"
                    >{{ scheduleData.timeFrom ? scheduleData.timeFrom : "-" }}</td>
                    <td
                      style="border: 1px solid lightgrey !important;padding: 6px;"
                    >{{ scheduleData.timeTo ? scheduleData.timeTo : "-"}}</td>
                    <td
                      style="border: 1px solid lightgrey !important;padding: 6px;"
                    >{{ scheduleData.subjectName ? scheduleData.subjectName : "-" }}</td>
                  </tr>
                  <tr v-if="getScheduleList.scheduleData.length === 0">
                    <td style="border: 1px soild lightgrey !importand;padding:6px;">-</td>
                    <td style="border: 1px solid lightgrey !important;padding: 6px;">-</td>
                    <td style="border: 1px solid lightgrey !important;padding: 6px;">-</td>
                    <td style="border: 1px solid lightgrey !important;padding: 6px;">-</td>
                    <td style="border: 1px solid lightgrey !important;padding: 6px;">-</td>
                  </tr>
                </tbody>
              </table>
            </v-card>
          </div>
          <div id="printMe" v-if="backPart">
            <v-card
              style=" 
             text-align:center
             background-color: #fff;
             border: 1px solid #ddd;
             color: rgba(0,0,0,0.87);
             overflow-x: auto;
             display: block;
             padding:14px !important;
             webkit-box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.2), 0px 0px 0px 0px rgba(0,0,0,0.14), 0px 0px 0px 0px rgba(0,0,0,0.12) !important;
             box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.2), 0px 0px 0px 0px rgba(0,0,0,0.14), 0px 0px 0px 0px rgba(0,0,0,0.12) !important;"
            >
              <div
                style=" 
               margin-bottom: 16px;
               overflow: hidden;
               padding: 50px 90px;"
              >
                <ol style="
                 margin: 0;
                 margin-bottom: 10px;">
                  <p
                    style="
                 margin-bottom: 16px;
                 line-height: 20px;
                 text-align: left;"
e56d46b13   Shikha Mishra   admit card option...
264
                  >
fe0d05d29   Neeraj Sharma   complete design a...
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
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
                    <b>1. Do not Carry these Electronic Gadgets:</b>
                    Electronic gadgets(Bluetooth devices,head phones,pen/buttonhole cameras,scanner,calculator,storage devices etc)
                    in the examination lab. These items are strictly prohibited from examination lab.
                  </p>
                  <p
                    style="
                 margin-bottom: 16px;
                 line-height: 20px;
                 text-align: left;"
                  >
                    <b>2. Do not Carry these Ornaments:</b>
                    Candidates should also not wear charms,veil,items containing such as rings,bracelet,earings,nose-pin,chains,
                    necklace,pendants,badge,broach,hair-pin,hair-band.
                  </p>
                  <p
                    style="
                 margin-bottom: 16px;
                 line-height: 20px;
                 text-align: left;"
                  >
                    <b>3. What Candidates wear to Examination hall:</b>
                    Candidates should not wear clothes with full sleeves or big button,etc. Candidates are adviced to wear open footwear
                    like slippers,sandals instead of shoes as the candidates could be asked to remove shoes by the frisking staff.
                  </p>
                  <p
                    style="
                margin-bottom: 16px;
                 line-height: 20px;
                 text-align: left;"
                  >
                    <b>4. Do not carry Stationary:</b>
                    Pen/pencil and paper for rough work would be provided in examination lab. Electronic watch (timer)will be available
                    on the computer screen alloted to the candidates.
                  </p>
                  <p
                    style="
                margin-bottom: 16px;
                 line-height: 20px;
                 text-align: left;"
                  >
                    <b>5. Do not Carry Bags:</b>
                    Don not Carry back pack, College bag or any other bag like hand bag. If candidates brings any bag, they must make a
                    arrangement for safe custody of these items.The Commission shall not make any arrangement nor be responsible for the
                    safe custody of such items.
                  </p>
                  <p
                    style="
                margin-bottom: 16px;
                 line-height: 20px;
                 text-align: left;"
                  >
                    <b>6. What will Happen if you carry Prohibited items to Exam Hall:</b>
                    If any such prohibited item is found in the possession of a candidate in examination lab, his/her candidature is liable
                    to be canceled and legal/criminal proceedings could be initiated against him/her. He/she would also liable to be debarred
                    from appearing in future examinations of the Commission for a period of 3 years.
                  </p>
                  <p
                    style="
                margin-bottom: 16px;
                 line-height: 20px;
                 text-align: left;
                 "
                  >
                    <b>7. Candidate should not create Disturbance in Exam Hall:</b>
                    If any candidate is found obstructing the conduct of examination or creating disturbances at the examination venue,
                    his/her candidature shall be summarily canceled.
                  </p>
                </ol>
              </div>
            </v-card>
          </div>
        </v-flex>
e56d46b13   Shikha Mishra   admit card option...
337
      </div>
fe0d05d29   Neeraj Sharma   complete design a...
338
339
340
341
342
343
344
345
346
347
      <v-snackbar
        :timeout="timeout"
        :top="y === 'top'"
        :right="x === 'right'"
        :vertical="mode === 'vertical'"
        v-model="snackbar"
        :color="color"
      >{{ text }}</v-snackbar>
      <div class="loader" v-if="showLoader">
        <v-progress-circular indeterminate color="white"></v-progress-circular>
e56d46b13   Shikha Mishra   admit card option...
348
349
350
351
352
353
354
      </div>
    </v-container>
  </template>
  <script>
  import http from "@/Services/http.js";
  import moment from "moment";
  import _ from "underscore";
d23a27a41   Amber Dev   added select All ...
355
  var qs = require("qs");
e56d46b13   Shikha Mishra   admit card option...
356
357
358
  
  export default {
    data: () => ({
fe0d05d29   Neeraj Sharma   complete design a...
359
360
361
362
363
364
365
366
      snackbar: false,
      color: "",
      y: "top",
      x: "right",
      mode: "",
      timeout: 10000,
      text: "",
      showLoader: false,
e56d46b13   Shikha Mishra   admit card option...
367
368
369
370
371
372
373
374
      valid: true,
      userData: {},
      frontPart: false,
      backPart: false,
      loading: false,
      showTable: false,
      showData: false,
      hideprintAdmitReport: false,
add6421d5   Shikha Mishra   Improve updateCou...
375
376
377
378
379
380
      examRules: [(v) => !!v || "Exam Field is required"],
      classRules: [(v) => !!v || "Class Field Required"],
      sectionRules: [(v) => !!v || "Section Field is required"],
      studentRules: [(v) => !!v || "Student Field is required"],
      typeRules: [(v) => !!v || "Type Field is required"],
      backgroundRules: [(v) => !!v || "Background Field is required"],
e56d46b13   Shikha Mishra   admit card option...
381
382
  
      pagination: {
add6421d5   Shikha Mishra   Improve updateCou...
383
        rowsPerPage: 10,
e56d46b13   Shikha Mishra   admit card option...
384
385
386
387
388
389
390
391
      },
      search: "",
  
      classList: [],
      studentData: {},
      scheduleData: {},
      examData: [],
      addSection: [],
d23a27a41   Amber Dev   added select All ...
392
      getStudentsList: [{ name: "Select All", _id: "selectAll" }],
e56d46b13   Shikha Mishra   admit card option...
393
394
      getScheduleList: [],
      getScheduleListArray: [],
5d5315b0f   Shikha Mishra   close add-notific...
395
      getReport: {},
b3f2f7ad7   Shikha Mishra   show exam name
396
      examName: [],
e56d46b13   Shikha Mishra   admit card option...
397
      typeList: [
fe0d05d29   Neeraj Sharma   complete design a...
398
399
        {
          name: "Front Part",
add6421d5   Shikha Mishra   Improve updateCou...
400
          value: "frontPart",
fe0d05d29   Neeraj Sharma   complete design a...
401
402
403
        },
        {
          name: "Back Part",
add6421d5   Shikha Mishra   Improve updateCou...
404
405
          value: "backPart",
        },
e56d46b13   Shikha Mishra   admit card option...
406
407
      ],
      backgroundList: ["Yes", "No"],
e56d46b13   Shikha Mishra   admit card option...
408
409
410
411
412
      headers: [
        {
          text: "No",
          align: "",
          sortable: false,
add6421d5   Shikha Mishra   Improve updateCou...
413
          value: "No",
e56d46b13   Shikha Mishra   admit card option...
414
415
416
417
418
        },
        {
          text: "Exam Date",
          align: "center",
          sortable: false,
add6421d5   Shikha Mishra   Improve updateCou...
419
          value: "date",
e56d46b13   Shikha Mishra   admit card option...
420
421
422
423
424
        },
        {
          text: "Start Time",
          align: "center",
          sortable: false,
add6421d5   Shikha Mishra   Improve updateCou...
425
          value: "timeFrom",
e56d46b13   Shikha Mishra   admit card option...
426
427
428
429
430
        },
        {
          text: "End Time",
          align: "center",
          sortable: false,
add6421d5   Shikha Mishra   Improve updateCou...
431
          value: "timeTo",
e56d46b13   Shikha Mishra   admit card option...
432
433
434
435
436
        },
        {
          text: "Subject Name",
          align: "center",
          sortable: false,
add6421d5   Shikha Mishra   Improve updateCou...
437
438
439
          value: "subjectName",
        },
      ],
e56d46b13   Shikha Mishra   admit card option...
440
441
442
443
444
445
446
447
448
449
    }),
  
    mounted() {
      this.token = this.$store.state.token;
      this.getClass();
      this.getExamList();
      this.getUserData();
    },
  
    methods: {
e56d46b13   Shikha Mishra   admit card option...
450
451
452
453
454
      getExamList() {
        this.showLoader = true;
        this.loadingSearch = true;
        http()
          .get("/getExamsList", {
add6421d5   Shikha Mishra   Improve updateCou...
455
            headers: { Authorization: "Bearer " + this.token },
e56d46b13   Shikha Mishra   admit card option...
456
          })
add6421d5   Shikha Mishra   Improve updateCou...
457
          .then((response) => {
e56d46b13   Shikha Mishra   admit card option...
458
459
460
461
            this.examData = response.data.data;
            this.showLoader = false;
            this.loadingSearch = false;
          })
add6421d5   Shikha Mishra   Improve updateCou...
462
          .catch((error) => {
e56d46b13   Shikha Mishra   admit card option...
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
            this.showLoader = false;
            this.loadingSearch = false;
            this.snackbar = true;
            this.text = error.response.data.message;
            if (error.response.status === 401) {
              this.$router.replace({ path: "/" });
              this.$store.dispatch("setToken", null);
              this.$store.dispatch("Id", null);
            }
          });
      },
      getClass() {
        this.showLoader = true;
        http()
          .get("/getClassesList", {
add6421d5   Shikha Mishra   Improve updateCou...
478
            headers: { Authorization: "Bearer " + this.token },
e56d46b13   Shikha Mishra   admit card option...
479
          })
add6421d5   Shikha Mishra   Improve updateCou...
480
          .then((response) => {
e56d46b13   Shikha Mishra   admit card option...
481
482
483
            this.classList = response.data.data;
            this.showLoader = false;
          })
add6421d5   Shikha Mishra   Improve updateCou...
484
          .catch((error) => {
e56d46b13   Shikha Mishra   admit card option...
485
486
487
488
489
490
491
492
493
494
495
            this.showLoader = false;
            // console.log("err====>", err);
          });
      },
      getSections(_id) {
        this.showLoader = true;
        http()
          .get(
            "/getSectionsList",
            { params: { classId: _id } },
            {
add6421d5   Shikha Mishra   Improve updateCou...
496
              headers: { Authorization: "Bearer " + this.token },
e56d46b13   Shikha Mishra   admit card option...
497
498
            }
          )
add6421d5   Shikha Mishra   Improve updateCou...
499
          .then((response) => {
e56d46b13   Shikha Mishra   admit card option...
500
501
502
            this.addSection = response.data.data;
            this.showLoader = false;
          })
add6421d5   Shikha Mishra   Improve updateCou...
503
          .catch((err) => {
e56d46b13   Shikha Mishra   admit card option...
504
505
506
507
508
509
510
511
512
513
            this.showLoader = false;
            // console.log("err====>", err);
          });
      },
      getStudents() {
        this.showLoader = true;
        http()
          .get("/getStudentWithClass", {
            params: {
              classId: this.getReport.classId,
add6421d5   Shikha Mishra   Improve updateCou...
514
515
              sectionId: this.getReport.sectionId,
            },
e56d46b13   Shikha Mishra   admit card option...
516
          })
add6421d5   Shikha Mishra   Improve updateCou...
517
          .then((response) => {
d23a27a41   Amber Dev   added select All ...
518
519
520
            for (var i = 0; i < response.data.data.length; i++) {
              this.getStudentsList.push(response.data.data[i]);
            }
e56d46b13   Shikha Mishra   admit card option...
521
522
            this.showLoader = false;
          })
add6421d5   Shikha Mishra   Improve updateCou...
523
          .catch((error) => {
860da881d   Shikha Mishra   comment all consoles
524
            //   console.log("err====>", error);
e56d46b13   Shikha Mishra   admit card option...
525
            this.showLoader = false;
860da881d   Shikha Mishra   comment all consoles
526
527
528
            this.snackbar = true;
            this.color = "error";
            this.text = error.response.data.message;
e56d46b13   Shikha Mishra   admit card option...
529
530
531
          });
      },
      getSchedule() {
fe0d05d29   Neeraj Sharma   complete design a...
532
533
        if (this.$refs.form.validate()) {
          this.showLoader = true;
d23a27a41   Amber Dev   added select All ...
534
535
536
537
538
539
540
          let studentId = [];
          if (this.getReport.studentId == "selectAll") {
            studentId = [];
            for (var i = 1; i < this.getStudentsList.length; i++) {
              studentId.push(this.getStudentsList[i]._id);
            }
          } else {
3f2e2025c   Amber Dev   admit card printig
541
            studentId.push(this.getReport.studentId);
d23a27a41   Amber Dev   added select All ...
542
          }
58fac10b4   Shikha Mishra   set enroll teache...
543
544
545
546
547
548
549
          // console.log("this.getReport.studentId - ", studentId);
          var admitPayload = {
            examId: this.getReport.examId,
            classId: this.getReport.classId,
            sectionId: this.getReport.sectionId,
            studentId: studentId,
          };
fe0d05d29   Neeraj Sharma   complete design a...
550
          http()
58fac10b4   Shikha Mishra   set enroll teache...
551
            .put("/getScheduleForParticularStudent", admitPayload, {
d23a27a41   Amber Dev   added select All ...
552
553
              paramsSerializer: (params) => {
                return qs.stringify(params);
add6421d5   Shikha Mishra   Improve updateCou...
554
              },
fe0d05d29   Neeraj Sharma   complete design a...
555
            })
add6421d5   Shikha Mishra   Improve updateCou...
556
            .then((response) => {
fe0d05d29   Neeraj Sharma   complete design a...
557
558
              this.showTable = true;
              this.getScheduleList = response.data.data;
860da881d   Shikha Mishra   comment all consoles
559
              // console.log(" getScheduleList - ", this.getScheduleList);
3f2e2025c   Amber Dev   admit card printig
560
              // this.schoolData = response.data.data.studentData.schoolId;
5d5315b0f   Shikha Mishra   close add-notific...
561
562
563
              if (response.data.data.scheduleData.length === 0) {
                this.showLoader = false;
                this.snackbar = true;
add6421d5   Shikha Mishra   Improve updateCou...
564
                this.text = "Data not found!";
027cf4522   Shikha Mishra   change color of s...
565
                this.color = "error";
5d5315b0f   Shikha Mishra   close add-notific...
566
567
                return;
              }
fe0d05d29   Neeraj Sharma   complete design a...
568
              this.showData = true;
5d5315b0f   Shikha Mishra   close add-notific...
569
570
571
572
573
574
575
576
              if (this.getReport.form === "frontPart") {
                this.frontPart = true;
                this.backPart = false;
              }
              if (this.getReport.form === "backPart") {
                this.frontPart = false;
                this.backPart = true;
              }
fe0d05d29   Neeraj Sharma   complete design a...
577
578
              this.showLoader = false;
            })
add6421d5   Shikha Mishra   Improve updateCou...
579
            .catch((error) => {
fe0d05d29   Neeraj Sharma   complete design a...
580
581
582
              this.showLoader = false;
            });
        }
e56d46b13   Shikha Mishra   admit card option...
583
584
585
586
587
588
589
590
591
      },
  
      printAdmitReport() {
        // Pass the element id here
        this.$htmlToPaper("printMe");
      },
      getUserData() {
        http()
          .get("/getParticularUserDetail")
add6421d5   Shikha Mishra   Improve updateCou...
592
          .then((response) => {
e56d46b13   Shikha Mishra   admit card option...
593
594
            this.userData = response.data.data;
          })
add6421d5   Shikha Mishra   Improve updateCou...
595
          .catch((error) => {
fe0d05d29   Neeraj Sharma   complete design a...
596
597
598
599
600
            if (error.response.status === 401) {
              this.$router.replace({ path: "/" });
              this.$store.dispatch("setToken", null);
              this.$store.dispatch("Id", null);
            }
e56d46b13   Shikha Mishra   admit card option...
601
          });
add6421d5   Shikha Mishra   Improve updateCou...
602
      },
e56d46b13   Shikha Mishra   admit card option...
603
604
605
606
607
608
609
610
611
      // created() {
      //     this.$root.$on("app:search", search => {
      //     this.search = search;
      //     });
      // },
      // beforeDestroy() {
      //     // dont forget to remove the listener
      //     this.$root.$off("app:search");
      // }
add6421d5   Shikha Mishra   Improve updateCou...
612
    },
e56d46b13   Shikha Mishra   admit card option...
613
614
  };
  </script>
fe0d05d29   Neeraj Sharma   complete design a...
615
  <style>
e56d46b13   Shikha Mishra   admit card option...
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
  .admincardreport {
    border: 1px solid #ddd;
    overflow: hidden;
    padding: 20px 50px;
    /* margin-bottom: 10px;
    min-height: 443px; */
  }
  .line {
    border-bottom: 1px solid #ddd;
    overflow: hidden;
    padding-bottom: 10px;
    vertical-align: middle;
    /* margin-bottom: 4px; */
  }
  .school-logo {
    float: left;
  }
  .student-logo {
    position: absolute;
    top: 221px;
    right: 221px;
  }
  .school-name {
    box-sizing: border-box;
    align-items: center;
  }
  /* .student-info {
    float: left;
    width: max-content;
    text-align: initial;
  } */
  .student-info {
    width: 50%;
    float: left;
    text-align: initial;
  }
  .student-info p {
    width: 50%;
    float: left;
    margin-bottom: 1px;
    padding: 0 0px;
    font-size: 12px;
  }
e56d46b13   Shikha Mishra   admit card option...
659
  .admitcardreportbackend ol {
fe0d05d29   Neeraj Sharma   complete design a...
660
661
    margin: 0;
    margin-bottom: 10px;
e56d46b13   Shikha Mishra   admit card option...
662
663
  }
  .admitcardreportbackend p {
fe0d05d29   Neeraj Sharma   complete design a...
664
665
    line-height: 20px;
    text-align: left;
e56d46b13   Shikha Mishra   admit card option...
666
667
  }
  </style>