Blame view

src/pages/Report/progressCardReport.vue 27.6 KB
006544386   Neeraj Sharma   implement task
1
  <template>
68d742034   Neeraj Sharma   implement new des...
2
    <v-container fluid class="body-color">
495e4037c   Neeraj Sharma   update
3
      <!-- ******  Progress Card Report Table****** -->
68d742034   Neeraj Sharma   implement new des...
4
      <v-card flat class="elevation-0 transparent">
495e4037c   Neeraj Sharma   update
5
6
7
8
9
10
11
12
        <v-form ref="form" v-model="valid" lazy-validation>
          <v-flex xs12 sm12 lg12>
            <v-layout wrap>
              <v-flex xs12 sm12 lg3>
                <v-layout>
                  <v-flex xs3 sm6 lg2 class="subheading mt-4">
                    <label class="right">Class:</label>
                  </v-flex>
79583580d   Neeraj Sharma   implement task ma...
13
                  <v-flex xs9 sm6 lg8 class="ml-2">
495e4037c   Neeraj Sharma   update
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
                    <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>
              <v-flex xs12 sm12 lg3>
                <v-layout>
                  <v-flex xs3 sm6 lg2 class="subheading mt-4">
                    <label class="right">Section:</label>
                  </v-flex>
79583580d   Neeraj Sharma   implement task ma...
33
                  <v-flex xs9 sm6 lg8 class="ml-2">
495e4037c   Neeraj Sharma   update
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
                    <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>
              <v-flex xs12 sm12 lg3>
                <v-layout>
                  <v-flex xs3 sm6 lg2 class="subheading mt-4">
                    <label class="right">Student:</label>
                  </v-flex>
ec5677f43   Neeraj Sharma   implement print o...
53
                  <v-flex xs9 sm6 lg8 class="ml-2">
495e4037c   Neeraj Sharma   update
54
55
56
57
58
59
60
                    <v-select
                      :items="getStudentsList"
                      label="Select your student"
                      v-model="getReport.studentId"
                      item-text="name"
                      item-value="_id"
                      :rules="studentRules"
e03bf1f92   Neeraj Sharma   solved bugs add i...
61
                      @change="selectAllStudent()"
495e4037c   Neeraj Sharma   update
62
63
64
65
66
                      required
                    ></v-select>
                  </v-flex>
                </v-layout>
              </v-flex>
3e79b2f9f   Neeraj Sharma   implement functio...
67
              <v-flex xs12 sm12 lg3 class="hidden-xs-only hidden-sm-only">
79583580d   Neeraj Sharma   implement task ma...
68
69
70
71
72
                <v-btn
                  @click="getMarkReportList"
                  round
                  dark
                  :loading="loading"
3e79b2f9f   Neeraj Sharma   implement functio...
73
                  class="open-dialog-button mt-3"
79583580d   Neeraj Sharma   implement task ma...
74
                >Get Report</v-btn>
495e4037c   Neeraj Sharma   update
75
76
77
78
              </v-flex>
            </v-layout>
          </v-flex>
        </v-form>
006544386   Neeraj Sharma   implement task
79
      </v-card>
d4735dce7   Shikha Mishra   show school logo ...
80
81
82
      <v-layout v-show="showReport">
        <v-flex xs12>
          <v-card class="transparent elevation-0">
3e79b2f9f   Neeraj Sharma   implement functio...
83
            <!-- <v-layout>
d4735dce7   Shikha Mishra   show school logo ...
84
85
86
87
88
89
              <v-flex xs12>
                <v-btn class="open-dialog-button right" round dark @click="printProgressReport()">
                  Print
                  <v-icon right dark>print</v-icon>
                </v-btn>
              </v-flex>
e03bf1f92   Neeraj Sharma   solved bugs add i...
90
            </v-layout>-->
46993dc1d   Shikha Mishra   solve issue login
91
            <v-container grid-list-md v-show="showReport" class="report">
d4735dce7   Shikha Mishra   show school logo ...
92
93
94
95
              <v-flex xs12 sm12 id="printMe">
                <v-layout wrap>
                  <!-- ****** TABLE DATA MARK  ****** -->
                  <v-flex xs12 sm12 md12>
c62132b75   Shikha Mishra   invoice,progress-...
96
                    <!-- <v-card
d4735dce7   Shikha Mishra   show school logo ...
97
98
                      v-for="(value, id, index) in filterData"
                      :key="index"
710438de6   Shikha Mishra   added teacher mod...
99
                      :items="newData"
d4735dce7   Shikha Mishra   show school logo ...
100
101
                      flat
                      style="border: 1px solid lightgrey;margin-bottom:14px;padding:20px"
c62132b75   Shikha Mishra   invoice,progress-...
102
                    >-->
3e79b2f9f   Neeraj Sharma   implement functio...
103
104
                    <v-layout>
                      <v-flex xs12>
e03bf1f92   Neeraj Sharma   solved bugs add i...
105
                        <v-btn class="open-dialog-button" round dark @click="printProgressReport()">
3e79b2f9f   Neeraj Sharma   implement functio...
106
107
108
109
110
                          Print
                          <v-icon right dark>print</v-icon>
                        </v-btn>
                      </v-flex>
                    </v-layout>
c62132b75   Shikha Mishra   invoice,progress-...
111
                    <v-card flat style="border: 1px solid lightgrey;margin-bottom:14px;padding:20px">
25205ccca   Shikha Mishra   show school logo ...
112
                      <v-layout>
3e79b2f9f   Neeraj Sharma   implement functio...
113
114
115
                        <v-flex xs12 sm12 md12>
                          <!-- {{userData}} -->
                          <div>
46993dc1d   Shikha Mishra   solve issue login
116
                            <div class="school-logo">
c62132b75   Shikha Mishra   invoice,progress-...
117
118
119
120
121
122
123
124
                              <!-- <img :src="userData.schoolLogoUrl" width="140" alt="logo" /> -->
                              <v-avatar>
                                <img :src="userData.schoolLogoUrl" v-if="userData.schoolLogoUrl" />
                                <img
                                  src="/static/schoolIcons/INTRACK_White.png"
                                  v-else-if="!userData.schoolLogoUrl"
                                />
                              </v-avatar>
46993dc1d   Shikha Mishra   solve issue login
125
126
127
128
129
                            </div>
                            <div class="school-name">
                              <h2>{{ userData.name }}</h2>
                            </div>
                          </div>
3e79b2f9f   Neeraj Sharma   implement functio...
130
131
132
133
134
135
                          <hr
                            style="border:1px solid #ddd;
                            overflow: hidden;
                            vertical-align: middle;
                            margin-bottom: 4px;"
                          />
46993dc1d   Shikha Mishra   solve issue login
136
                          <div class="school-info">
3e79b2f9f   Neeraj Sharma   implement functio...
137
138
139
                            <v-layout>
                              <v-flex xs5 class="pl-3">
                                <p style="font-size:20px;">{{ userData.name }}</p>
46993dc1d   Shikha Mishra   solve issue login
140
                                <p
3e79b2f9f   Neeraj Sharma   implement functio...
141
142
                                  style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;"
                                >{{ userData.address }}</p>
46993dc1d   Shikha Mishra   solve issue login
143
                                <p
3e79b2f9f   Neeraj Sharma   implement functio...
144
145
                                  style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;"
                                >{{ userData.mobile }}</p>
46993dc1d   Shikha Mishra   solve issue login
146
                                <p
3e79b2f9f   Neeraj Sharma   implement functio...
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
                                  style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;"
                                >{{ userData.email }}</p>
                              </v-flex>
                              <v-flex xs5>
                                <div v-if="cardData !=''">
                                  <p style="font-size:20px;">{{ cardData[0].studentId.name }}</p>
                                  <p
                                    style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;"
                                  >
                                    Class :
                                    <b>{{ cardData[0].classId.classNum }}</b>
                                  </p>
                                  <p
                                    style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;"
                                  >
                                    Section :
                                    <b>{{ cardData[0].sectionId.name }}</b>
                                  </p>
                                  <p
                                    style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;"
                                  >
                                    Roll NO :
                                    <b>{{ cardData[0].studentId.rollNo }}</b>
                                  </p>
                                </div>
                              </v-flex>
                              <v-flex xs2 v-if="cardData !=''">
                                <v-avatar size="100" style="padding-top:20px">
                                  <img
                                    src="/static/icon/user.png"
                                    v-if="!cardData[0].studentId.profilePicUrl"
                                  />
                                  <img
                                    :src="cardData[0].studentId.profilePicUrl"
                                    v-else-if="cardData[0].studentId.profilePicUrl"
                                  />
                                </v-avatar>
                              </v-flex>
                            </v-layout>
46993dc1d   Shikha Mishra   solve issue login
186
                          </div>
d4735dce7   Shikha Mishra   show school logo ...
187
188
                        </v-flex>
                      </v-layout>
c62132b75   Shikha Mishra   invoice,progress-...
189
190
191
192
193
194
                      <v-card class="student-table" xs6 sm6 md6>
                        <table
                          v-for="(value, id, index) in filterData"
                          :key="index"
                          class="mb-5 tableRsponsive feeTypeTable subheading"
                          style="border: 1px solid black;
d4735dce7   Shikha Mishra   show school logo ...
195
196
197
                          border-collapse: collapse;!important
                          table-layout: auto !important;
                          width: 100% !important;
819c223ec   Shikha Mishra   improve school an...
198
                          overflow: hidden;"
c62132b75   Shikha Mishra   invoice,progress-...
199
                        >
3e79b2f9f   Neeraj Sharma   implement functio...
200
201
202
203
204
205
206
207
208
209
210
                          <thead style="border: 1px solid transparent !important">
                            <tr style="border: 1px solid transparent !important">
                              <td
                                colspan="4"
                                style="text-align: inherit !important;
                                border-right: inherit;
                                border-top: inherit;
                                padding:14px;"
                              >{{value[0].examId.examName}}</td>
                            </tr>
                            <!-- <v-card-title class="subheading" colspan="4">{{value[0].examId.examName}}</v-card-title> -->
c62132b75   Shikha Mishra   invoice,progress-...
211
                            <tr style="border: 1px solid lightgrey !important;padding:4px;">
d4735dce7   Shikha Mishra   show school logo ...
212
                              <td
c62132b75   Shikha Mishra   invoice,progress-...
213
214
215
                                rowspan="2"
                                style="border: 1px solid lightgrey !important;padding: 10px;"
                              >Subject</td>
3e79b2f9f   Neeraj Sharma   implement functio...
216
217
                              <!-- <template v-for="studentData in  value"> -->
                              <!-- <td
c62132b75   Shikha Mishra   invoice,progress-...
218
219
220
                                  colspan="4"
                                  style="border: 1px solid lightgrey !important;padding: 10px;"
                                >{{value[0].examId.examName}}</td>
3e79b2f9f   Neeraj Sharma   implement functio...
221
                                <td
c62132b75   Shikha Mishra   invoice,progress-...
222
223
                                  colspan="2"
                                  style="border: 1px solid lightgrey !important;padding: 10px;"
3e79b2f9f   Neeraj Sharma   implement functio...
224
                                ></td>
c62132b75   Shikha Mishra   invoice,progress-...
225
226
227
                                <td
                                  colspan="2"
                                  style="border: 1px solid lightgrey !important;padding: 10px;"
3e79b2f9f   Neeraj Sharma   implement functio...
228
229
                              >Total</td>-->
                              <!-- <td
c62132b75   Shikha Mishra   invoice,progress-...
230
231
                                  colspan="2"
                                  style="border: 1px solid lightgrey !important;padding: 10px;"
3e79b2f9f   Neeraj Sharma   implement functio...
232
233
                              >Grade</td>-->
                              <!-- <td
c62132b75   Shikha Mishra   invoice,progress-...
234
235
                                  colspan="2"
                                  style="border: 1px solid lightgrey !important;padding: 10px;"
3e79b2f9f   Neeraj Sharma   implement functio...
236
237
                              >Points</td>-->
                              <!-- <td
c62132b75   Shikha Mishra   invoice,progress-...
238
239
240
                                  colspan="2"
                                  v-for="studentMark in studentData.studentsMarks"
                                  style="border: 1px solid lightgrey !important;padding: 10px;"
3e79b2f9f   Neeraj Sharma   implement functio...
241
242
                              >{{studentMark.markDistributionId.distributionType}}</td>-->
                              <!-- <td
c62132b75   Shikha Mishra   invoice,progress-...
243
                                  style="border: 1px solid lightgrey !important;padding: 10px;"
3e79b2f9f   Neeraj Sharma   implement functio...
244
245
246
247
                              >Total Marks</td>-->
                              <!-- </template> -->
                              <!-- </tr> -->
                              <!-- <tr
c62132b75   Shikha Mishra   invoice,progress-...
248
249
250
                              v-for="(subject, ind) in value"
                              v-if="ind == 0"
                              style="border: 1px solid lightgrey !important;"
3e79b2f9f   Neeraj Sharma   implement functio...
251
                              >-->
c62132b75   Shikha Mishra   invoice,progress-...
252
253
254
255
256
257
258
                              <!-- <template v-for="(exam, i) in subject.studentsMarks"> -->
                              <template v-for="studentData in  value">
                                <td
                                  colspan="2"
                                  v-for="studentMark in studentData.studentsMarks"
                                  style="border: 1px solid lightgrey !important;padding: 10px;"
                                >{{studentMark.markDistributionId.distributionType}}</td>
3e79b2f9f   Neeraj Sharma   implement functio...
259
260
261
                                <td
                                  style="border: 1px solid lightgrey !important;padding: 10px;"
                                >Total Marks</td>
c62132b75   Shikha Mishra   invoice,progress-...
262
263
264
265
266
267
268
269
                                <!-- <td
                                  style="border: 1px solid lightgrey !important;padding: 10px;"
                                >Marks</td>
                                <td
                                  style="border: 1px solid lightgrey !important;padding: 10px;"
                                >Highest Marks</td>-->
                              </template>
                            </tr>
3e79b2f9f   Neeraj Sharma   implement functio...
270
271
272
273
274
275
276
277
278
279
280
281
282
283
                            <tr
                              v-for="(subject, ind) in value"
                              v-if="ind == 0"
                              style="border: 1px solid lightgrey !important;"
                            >
                              <template v-for="(exam, i) in subject.studentsMarks">
                                <td
                                  style="border: 1px solid lightgrey !important;padding: 10px;"
                                >Marks</td>
                                <td
                                  style="border: 1px solid lightgrey !important;padding: 10px;"
                                >Highest Marks</td>
                              </template>
                            </tr>
c62132b75   Shikha Mishra   invoice,progress-...
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
                          </thead>
                          <tbody style="border: 1px solid lightgrey !important;">
                            <tr
                              v-for="subject in value"
                              style="border: 1px solid lightgrey !important;"
                            >
                              <td
                                style="border: 1px solid lightgrey !important;padding: 10px;"
                              >{{subject.subjectName}}</td>
                              <template v-for="(exam, i) in subject.studentsMarks">
                                <td
                                  style="border: 1px solid lightgrey !important;padding: 10px;"
                                >{{exam.marksScored}}</td>
                                <td
                                  style="border: 1px solid lightgrey !important;padding: 10px;"
                                >{{exam.markDistributionId.markValue}}</td>
                              </template>
                              <td
                                style="border: 1px solid lightgrey !important;padding: 10px;"
                              >{{subject.totalMarks}}</td>
                            </tr>
                          </tbody>
                          <!-- <tfoot>
                            <tr v-for="subject in value"
                              style="border: 1px solid lightgrey !important;">
                              <td colspan="5">
                                <span class="right subheding">Total Marks :</span>
                              </td>
                              <td
                                  style="border: 1px solid lightgrey !important;padding: 10px;"
                              >{{subject.totalMarks}}</td>
                            </tr>
                            <tr>
                              <td colspan="5">
                                <span class="right subheding">Average Mark :</span>
                              </td>
                              <td
                                  style="border: 1px solid lightgrey !important;padding: 10px;"
                              >{{subject.averageMark}}</td>
                            </tr>
                            <tr>
                              <td colspan="5">
                                <span class="right subheding">GPA :</span>
                              </td>
                              <td
                                  style="border: 1px solid lightgrey !important;padding: 10px;"
                              >{{subject.gpa}}</td>
                            </tr>
                          </tfoot>-->
3e79b2f9f   Neeraj Sharma   implement functio...
333
334
                          <!-- <v-card> -->
                          <tr style="border: 1px solid lightgrey !important;">
c62132b75   Shikha Mishra   invoice,progress-...
335
                            <td colspan="5">
3e79b2f9f   Neeraj Sharma   implement functio...
336
                              <span class="subheding">Total Marks</span>
c62132b75   Shikha Mishra   invoice,progress-...
337
                            </td>
710438de6   Shikha Mishra   added teacher mod...
338
                            <td
3e79b2f9f   Neeraj Sharma   implement functio...
339
                              colspan="7"
710438de6   Shikha Mishra   added teacher mod...
340
                              style="border: 1px solid lightgrey !important;padding: 10px;"
3e79b2f9f   Neeraj Sharma   implement functio...
341
342
343
                            >
                              <b>{{ totalMarks }}</b>
                            </td>
d4735dce7   Shikha Mishra   show school logo ...
344
                          </tr>
c62132b75   Shikha Mishra   invoice,progress-...
345
346
                          <tr>
                            <td colspan="5">
3e79b2f9f   Neeraj Sharma   implement functio...
347
                              <span class="right subheding">Average Mark</span>
c62132b75   Shikha Mishra   invoice,progress-...
348
                            </td>
3e79b2f9f   Neeraj Sharma   implement functio...
349
350
351
352
                            <td
                              colspan="7"
                              style="border: 1px solid lightgrey !important;padding: 10px;"
                            ></td>
c62132b75   Shikha Mishra   invoice,progress-...
353
354
355
                          </tr>
                          <tr>
                            <td colspan="5">
3e79b2f9f   Neeraj Sharma   implement functio...
356
                              <span class="right subheding">GPA</span>
c62132b75   Shikha Mishra   invoice,progress-...
357
                            </td>
3e79b2f9f   Neeraj Sharma   implement functio...
358
359
360
361
                            <td
                              colspan="7"
                              style="border: 1px solid lightgrey !important;padding: 10px;"
                            ></td>
c62132b75   Shikha Mishra   invoice,progress-...
362
                          </tr>
3e79b2f9f   Neeraj Sharma   implement functio...
363
364
                          <!-- </v-card> -->
                          <!-- <tbody style="border: 1px solid lightgrey !important;">
c62132b75   Shikha Mishra   invoice,progress-...
365
                          <tr
d4735dce7   Shikha Mishra   show school logo ...
366
367
                            v-for="subject in value"
                            style="border: 1px solid lightgrey !important;"
c62132b75   Shikha Mishra   invoice,progress-...
368
                          >
3e79b2f9f   Neeraj Sharma   implement functio...
369
370
                          <td style="border: 1px solid lightgrey !important;padding: 10px;"></td>-->
                          <!-- <td
d4735dce7   Shikha Mishra   show school logo ...
371
                              style="border: 1px solid lightgrey !important;padding: 10px;"
3e79b2f9f   Neeraj Sharma   implement functio...
372
373
                          >{{subject.subjectName}}</td>-->
                          <!-- <template v-for="(exam, i) in subject.studentsMarks">
d4735dce7   Shikha Mishra   show school logo ...
374
375
376
377
378
379
380
381
382
383
                              <td
                                style="border: 1px solid lightgrey !important;padding: 10px;"
                              >{{exam.marksScored}}</td>
                              <td
                                style="border: 1px solid lightgrey !important;padding: 10px;"
                              >{{exam.markDistributionId.markValue}}</td>
                            </template>
                            <td
                              style="border: 1px solid lightgrey !important;padding: 10px;"
                            >{{subject.totalMarks}}</td>
c62132b75   Shikha Mishra   invoice,progress-...
384
                          </tr>
3e79b2f9f   Neeraj Sharma   implement functio...
385
386
387
                          </tbody>-->
                        </table>
                      </v-card>
d4735dce7   Shikha Mishra   show school logo ...
388
389
390
391
392
393
                    </v-card>
                  </v-flex>
                </v-layout>
              </v-flex>
            </v-container>
          </v-card>
79583580d   Neeraj Sharma   implement task ma...
394
        </v-flex>
d4735dce7   Shikha Mishra   show school logo ...
395
      </v-layout>
006544386   Neeraj Sharma   implement task
396
397
398
      <div class="loader" v-if="showLoader">
        <v-progress-circular indeterminate color="white"></v-progress-circular>
      </div>
68d742034   Neeraj Sharma   implement new des...
399
    </v-container>
006544386   Neeraj Sharma   implement task
400
401
402
403
404
  </template>
  
  <script>
  import http from "@/Services/http.js";
  import moment from "moment";
79583580d   Neeraj Sharma   implement task ma...
405
  import _ from "underscore";
006544386   Neeraj Sharma   implement task
406
407
408
  
  export default {
    data: () => ({
006544386   Neeraj Sharma   implement task
409
      showLoader: false,
c62132b75   Shikha Mishra   invoice,progress-...
410
      cardData: [],
79583580d   Neeraj Sharma   implement task ma...
411
412
413
414
      token: "",
      markDistributions: [],
      markParticularDistributionData: [],
      loading: false,
495e4037c   Neeraj Sharma   update
415
      valid: true,
79583580d   Neeraj Sharma   implement task ma...
416
417
      loading: false,
      showReport: false,
006544386   Neeraj Sharma   implement task
418
      addSection: [],
79583580d   Neeraj Sharma   implement task ma...
419
420
      filterData: [],
      getStudentsList: [],
495e4037c   Neeraj Sharma   update
421
422
423
      classRules: [v => !!v || "Class is required"],
      sectionRules: [v => !!v || "Class is required"],
      studentRules: [v => !!v || "Student is required"],
495e4037c   Neeraj Sharma   update
424
      getReport: {},
ec5677f43   Neeraj Sharma   implement print o...
425
      classList: [],
c0b01ae20   Neeraj Sharma   solve bugs in pro...
426
      output: null,
710438de6   Shikha Mishra   added teacher mod...
427
428
      userData: {},
      newData: [],
c62132b75   Shikha Mishra   invoice,progress-...
429
430
431
432
433
      gradeAPlus: "A+",
      gradeA: "A",
      gradeBPlus: "B+",
      gradeB: "B",
      gradeCPlus: "C+",
3e79b2f9f   Neeraj Sharma   implement functio...
434
435
      gradeC: "C",
      totalMarks: ""
006544386   Neeraj Sharma   implement task
436
    }),
79583580d   Neeraj Sharma   implement task ma...
437
438
439
    mounted() {
      this.token = this.$store.state.token;
      this.getClass();
c0b01ae20   Neeraj Sharma   solve bugs in pro...
440
      this.getUserData();
79583580d   Neeraj Sharma   implement task ma...
441
    },
006544386   Neeraj Sharma   implement task
442
    methods: {
495e4037c   Neeraj Sharma   update
443
444
445
      clear() {
        this.$refs.form.reset();
      },
006544386   Neeraj Sharma   implement task
446
      getClass() {
ec5677f43   Neeraj Sharma   implement print o...
447
        this.showLoader = true;
006544386   Neeraj Sharma   implement task
448
449
450
451
452
453
        http()
          .get("/getClassesList", {
            headers: { Authorization: "Bearer " + this.token }
          })
          .then(response => {
            this.classList = response.data.data;
ec5677f43   Neeraj Sharma   implement print o...
454
            this.showLoader = false;
006544386   Neeraj Sharma   implement task
455
          })
c0b01ae20   Neeraj Sharma   solve bugs in pro...
456
          .catch(error => {
ec5677f43   Neeraj Sharma   implement print o...
457
            this.showLoader = false;
006544386   Neeraj Sharma   implement task
458
459
460
461
            // console.log("err====>", err);
          });
      },
      getSections(_id) {
c0b01ae20   Neeraj Sharma   solve bugs in pro...
462
        this.showLoader = true;
006544386   Neeraj Sharma   implement task
463
464
465
466
467
468
469
470
471
472
        http()
          .get(
            "/getSectionsList",
            { params: { classId: _id } },
            {
              headers: { Authorization: "Bearer " + this.token }
            }
          )
          .then(response => {
            this.addSection = response.data.data;
c0b01ae20   Neeraj Sharma   solve bugs in pro...
473
            this.showLoader = false;
006544386   Neeraj Sharma   implement task
474
475
          })
          .catch(err => {
c0b01ae20   Neeraj Sharma   solve bugs in pro...
476
            this.showLoader = false;
006544386   Neeraj Sharma   implement task
477
478
479
480
481
482
483
484
            // console.log("err====>", err);
          });
      },
      getStudents() {
        this.showLoader = true;
        http()
          .get("/getStudentWithClass", {
            params: {
495e4037c   Neeraj Sharma   update
485
486
              classId: this.getReport.classId,
              sectionId: this.getReport.sectionId
006544386   Neeraj Sharma   implement task
487
488
489
            }
          })
          .then(response => {
e03bf1f92   Neeraj Sharma   solved bugs add i...
490
491
492
493
            response.data.data.unshift({
              name: "Select All",
              _id: "Select All"
            });
006544386   Neeraj Sharma   implement task
494
495
            this.getStudentsList = response.data.data;
            this.showLoader = false;
c0b01ae20   Neeraj Sharma   solve bugs in pro...
496
            // console.log("getSectionsList=====>", response.data.data);
006544386   Neeraj Sharma   implement task
497
498
499
500
501
502
          })
          .catch(error => {
            console.log("err====>", error);
            this.showLoader = false;
          });
      },
e03bf1f92   Neeraj Sharma   solved bugs add i...
503
504
505
506
507
508
509
510
511
512
513
514
515
516
      selectAllStudent() {
        // console.log("this.studentId", this.getReport.studentId);
        // this.invoiceData.students = [];
        if (this.getReport.studentId === "Select All") {
          for (let i = 1; i < this.getStudentsList.length; i++) {
            // this.invoiceData.students.push(this.getStudentsList[i]._id);
            console.log("data", this.getStudentsList[i]._id);
            // data.push(this.studentList[i]._id);
            // console.log("data", data);
          }
        } else {
          this.invoiceData.students.push(this.invoiceData.studentId);
        }
      },
79583580d   Neeraj Sharma   implement task ma...
517
      getMarkReportList() {
c0b01ae20   Neeraj Sharma   solve bugs in pro...
518
        // this.showLoader = true;
79583580d   Neeraj Sharma   implement task ma...
519
        this.showReport = true;
c62132b75   Shikha Mishra   invoice,progress-...
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
548
549
550
551
        // http()
        //   .get("/getParticularMark", {
        //     params: { studentId: this.getReport.studentId },
        //     headers: { Authorization: "Bearer " + this.token }
        //   })
        //   .then(response => {
        //     this.showLoader = false;
        //     this.cardData = response.data.data;
        //     let newData = response.data.data;
        //     for (var i = 0; i < newData.length; i++) {
        //       newData[i].examination = newData[i].examId._id;
        //     }
        //     this.filterData = _.groupBy(newData, ["examination"]);
        //     for (let data in this.filterData) {
  
        //       for (let item in this.filterData[data]) {
        //         var totalMarks = 0;
        //         for (
        //           let i = 0;
        //           i < this.filterData[data][item].studentsMarks.length;
        //           i++
        //         ) {
        //           totalMarks += this.filterData[data][item].studentsMarks[i]
        //             .marksScored;
        //         }
        //         this.filterData[data][item].totalMarks = totalMarks;
        //         var total = 0;
        //         total += this.filterData[data][item].totalMarks  ;
        //         console.log("total", total);
        //       }
        //     }
        //   })
79583580d   Neeraj Sharma   implement task ma...
552
553
554
555
556
557
        http()
          .get("/getParticularMark", {
            params: { studentId: this.getReport.studentId },
            headers: { Authorization: "Bearer " + this.token }
          })
          .then(response => {
c62132b75   Shikha Mishra   invoice,progress-...
558
            this.cardData = response.data.data;
79583580d   Neeraj Sharma   implement task ma...
559
            let newData = response.data.data;
c62132b75   Shikha Mishra   invoice,progress-...
560
            // console.log("newData", newData);
79583580d   Neeraj Sharma   implement task ma...
561
562
563
564
            for (var i = 0; i < newData.length; i++) {
              newData[i].examination = newData[i].examId._id;
            }
            this.filterData = _.groupBy(newData, ["examination"]);
c62132b75   Shikha Mishra   invoice,progress-...
565
            // console.log("this.filterData", this.filterData);
79583580d   Neeraj Sharma   implement task ma...
566
            for (let data in this.filterData) {
79583580d   Neeraj Sharma   implement task ma...
567
              for (let item in this.filterData[data]) {
79583580d   Neeraj Sharma   implement task ma...
568
569
570
571
572
573
                var totalMarks = 0;
                for (
                  let i = 0;
                  i < this.filterData[data][item].studentsMarks.length;
                  i++
                ) {
c62132b75   Shikha Mishra   invoice,progress-...
574
575
                  // console.log("this.filterData[data][item].studentsMarks[i]",this.filterData[data][item].studentsMarks[i]
                  //   .marksScored)
79583580d   Neeraj Sharma   implement task ma...
576
577
578
579
                  totalMarks += this.filterData[data][item].studentsMarks[i]
                    .marksScored;
                }
                this.filterData[data][item].totalMarks = totalMarks;
3e79b2f9f   Neeraj Sharma   implement functio...
580
581
                console.log("totalMarks", totalMarks);
                this.totalMarks = totalMarks;
c62132b75   Shikha Mishra   invoice,progress-...
582
583
584
585
586
587
588
589
590
591
592
593
594
595
                // console.log("this.filterData[data][item].grade", this.filterData[data][item].grade);
                if (totalMarks > 90) {
                  this.filterData[data][item].grade = this.gradeAPlus;
                } else if (totalMarks > 80 && totalMarks < 90) {
                  this.filterData[data][item].grade = this.gradeA;
                } else if (totalMarks > 70 && totalMarks < 80) {
                  this.filterData[data][item].grade = this.gradeBPlus;
                } else if (totalMarks > 60 && totalMarks < 70) {
                  this.filterData[data][item].grade = this.gradeB;
                } else if (totalMarks > 50 && totalMarks < 60) {
                  this.filterData[data][item].grade = this.gradeCPlus;
                } else if (totalMarks > 40 && totalMarks < 50) {
                  this.filterData[data][item].grade = this.gradeC;
                }
79583580d   Neeraj Sharma   implement task ma...
596
597
              }
            }
c62132b75   Shikha Mishra   invoice,progress-...
598
            this.showLoader = false;
79583580d   Neeraj Sharma   implement task ma...
599
600
601
602
603
          })
          .catch(error => {
            // console.log("err====>", err);
            this.showLoader = false;
            this.snackbar = true;
710438de6   Shikha Mishra   added teacher mod...
604
605
606
607
608
609
            // 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);
            // }
79583580d   Neeraj Sharma   implement task ma...
610
          });
ec5677f43   Neeraj Sharma   implement print o...
611
      },
d4735dce7   Shikha Mishra   show school logo ...
612
      printProgressReport() {
ec5677f43   Neeraj Sharma   implement print o...
613
614
        // Pass the element id here
        this.$htmlToPaper("printMe");
c0b01ae20   Neeraj Sharma   solve bugs in pro...
615
616
617
618
619
620
621
622
      },
      getUserData() {
        http()
          .get("/getParticularUserDetail")
          .then(response => {
            this.userData = response.data.data;
          })
          .catch(error => {
25205ccca   Shikha Mishra   show school logo ...
623
624
625
626
627
            // if (error.response.status === 401) {
            //   this.$router.replace({ path: "/" });
            //   this.$store.dispatch("setToken", null);
            //   this.$store.dispatch("Id", null);
            // }
c0b01ae20   Neeraj Sharma   solve bugs in pro...
628
          });
006544386   Neeraj Sharma   implement task
629
      }
006544386   Neeraj Sharma   implement task
630
631
632
    }
  };
  </script>
79583580d   Neeraj Sharma   implement task ma...
633

006544386   Neeraj Sharma   implement task
634
  <style scoped>
79583580d   Neeraj Sharma   implement task ma...
635
636
637
638
639
640
641
642
643
644
  table {
    border-collapse: collapse;
    border: 1px solid #e2e7eb;
  }
  
  th,
  td {
    border: 1px solid #e2e7eb;
    padding: 10px;
    text-align: center;
006544386   Neeraj Sharma   implement task
645
  }
79583580d   Neeraj Sharma   implement task ma...
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
  table.feeTypeTable {
    table-layout: auto !important;
    width: 100% !important;
  }
  .bg-sky {
    background-color: #98b2cc !important;
  }
  .bg-sky-light {
    background-color: #89a0b8;
  }
  .bg-purple {
    background-color: #9583ac;
  }
  .bg-skyDark {
    background-color: #956785;
  }
46993dc1d   Shikha Mishra   solve issue login
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
  
  /* .report {
    overflow: hidden;
    max-width: 794px;
    margin: 0px auto;
    margin-bottom: 10px;
    padding: 30px;
  } */
  .line {
    border-bottom: 1px solid #ddd;
    overflow: hidden;
    padding-bottom: 10px;
    vertical-align: middle;
    margin-bottom: 4px;
  }
  .school-logo {
    float: left;
  }
  .school-name {
    box-sizing: border-box;
  }
  .school-info {
    width: 100%;
    overflow: hidden;
  }
  .school-address {
    float: left;
    width: 40%;
  }
  .student-data {
    float: right;
    width: 40%;
  }
  .student-info {
    float: left;
  }
79583580d   Neeraj Sharma   implement task ma...
698
699
  @media screen and (max-width: 380px) {
    .tableRsponsive {
d4735dce7   Shikha Mishra   show school logo ...
700
      /* display: block; */
79583580d   Neeraj Sharma   implement task ma...
701
702
703
      position: relative;
      overflow: scroll;
    }
006544386   Neeraj Sharma   implement task
704
  }
79583580d   Neeraj Sharma   implement task ma...
705
  </style> s