Commit add6421d55951776a8edf5c86d5ac309e0acf509

Authored by Shikha Mishra
1 parent d10c266324

Improve updateCourseDetail API and improve design in course detail screen

src/pages/Course/courseDetail.vue
1 <template> 1 <template>
2 <v-container fluid class="body-color"> 2 <v-container fluid class="body-color">
3 <!-- ****** Edit Chapter detail ****** --> 3 <!-- ****** Edit Chapter detail ****** -->
4 <v-dialog v-model="editCourseDetailDialog" max-width="1000px" scrollable> 4 <v-dialog v-model="editCourseDetailDialog" max-width="1000px" scrollable>
5 <v-card class="card-style pa-2" dark> 5 <v-card class="card-style pa-2" dark>
6 <v-layout> 6 <v-layout>
7 <v-flex xs12> 7 <v-flex xs12>
8 <label class="title text-xs-center">Edit Chapter</label> 8 <label class="title text-xs-center">Edit Chapter</label>
9 <v-icon size="24" class="right" @click="editCourseDetailDialog = false">cancel</v-icon> 9 <v-icon size="24" class="right" @click="editCourseDetailDialog = false">cancel</v-icon>
10 </v-flex> 10 </v-flex>
11 </v-layout> 11 </v-layout>
12 <v-card-text> 12 <v-card-text>
13 <v-layout wrap> 13 <v-layout wrap>
14 <v-flex xs12 sm12> 14 <v-flex xs12 sm12>
15 <v-layout> 15 <v-layout>
16 <v-flex xs4 class="pt-4 subheading"> 16 <v-flex xs4 class="pt-4 subheading">
17 <label class="right">Select Class:</label> 17 <label class="right">Select Class:</label>
18 </v-flex> 18 </v-flex>
19 <v-flex xs8 sm6 class="ml-3"> 19 <v-flex xs8 sm6 class="ml-3">
20 <v-select 20 <v-select
21 small 21 small
22 :items="addclass" 22 :items="addclass"
23 label="Select Class" 23 label="Select Class"
24 v-model="editedCourse.classId" 24 v-model="editedCourse.classId"
25 item-text="classNum" 25 item-text="classNum"
26 item-value="_id" 26 item-value="_id"
27 name="Select Class" 27 name="Select Class"
28 @change="getCourses(editedCourse.classId)" 28 @change="getCourses(editedCourse.classId)"
29 class="mr-2" 29 class="mr-2"
30 required 30 required
31 ></v-select> 31 ></v-select>
32 </v-flex> 32 </v-flex>
33 </v-layout> 33 </v-layout>
34 </v-flex> 34 </v-flex>
35 <v-flex xs12 sm12> 35 <v-flex xs12 sm12>
36 <v-layout> 36 <v-layout>
37 <v-flex xs4 class="pt-4 subheading"> 37 <v-flex xs4 class="pt-4 subheading">
38 <label class="right">Select Course:</label> 38 <label class="right">Select Course:</label>
39 </v-flex> 39 </v-flex>
40 <v-flex xs8 sm6 class="ml-3"> 40 <v-flex xs8 sm6 class="ml-3">
41 <v-select 41 <v-select
42 :items="courseData" 42 :items="courseData"
43 label="Select Course" 43 label="Select Course"
44 v-model="editedCourse.courseId" 44 v-model="editedCourse.courseId"
45 item-text="courseName" 45 item-text="courseName"
46 item-value="_id" 46 item-value="_id"
47 required 47 required
48 class="ml-2" 48 class="ml-2"
49 ></v-select> 49 ></v-select>
50 </v-flex> 50 </v-flex>
51 </v-layout> 51 </v-layout>
52 </v-flex> 52 </v-flex>
53 </v-layout> 53 </v-layout>
54 <v-layout> 54 <v-layout>
55 <v-flex xs12 sm12 md11 lg11> 55 <v-flex xs12 sm12 md11 lg11>
56 <v-card-actions class="hidden-xs-only hidden-sm-only"> 56 <v-card-actions class="hidden-xs-only hidden-sm-only">
57 <v-spacer></v-spacer> 57 <v-spacer></v-spacer>
58 <v-btn round dark @click="save" :loading="editLoading" class="add-button mr-4">Save</v-btn> 58 <v-btn round dark @click="save" :loading="editLoading" class="add-button mr-4">Save</v-btn>
59 </v-card-actions> 59 </v-card-actions>
60 <v-card-actions class="hidden-md-only hidden-lg-only hidden-xl-only"> 60 <v-card-actions class="hidden-md-only hidden-lg-only hidden-xl-only">
61 <v-spacer></v-spacer> 61 <v-spacer></v-spacer>
62 <v-btn round dark @click="save" :loading="editLoading" class="add-button">Save</v-btn> 62 <v-btn round dark @click="save" :loading="editLoading" class="add-button">Save</v-btn>
63 <v-spacer></v-spacer> 63 <v-spacer></v-spacer>
64 </v-card-actions> 64 </v-card-actions>
65 </v-flex> 65 </v-flex>
66 </v-layout> 66 </v-layout>
67 </v-card-text> 67 </v-card-text>
68 </v-card> 68 </v-card>
69 </v-dialog> 69 </v-dialog>
70 <!-- DIALOG BOX - EDIT CHAPTER--> 70 <!-- DIALOG BOX - EDIT CHAPTER-->
71 <v-dialog v-model="editChapterDetailDialog" max-width="1000px" scrollable> 71 <v-dialog v-model="editChapterDetailDialog" max-width="1000px" scrollable>
72 <v-card class="card-style pa-2" dark> 72 <v-card class="card-style pa-2" dark>
73 <v-layout> 73 <v-layout>
74 <v-flex xs12> 74 <v-flex xs12>
75 <label class="title text-xs-center">Edit Chapter</label> 75 <label class="title text-xs-center">Edit Chapter</label>
76 <v-icon 76 <v-icon
77 size="24" 77 size="24"
78 class="right" 78 class="right"
79 @click="editChapterDetailDialog = false; trigger = 'reset'; emptyPdf = 'reset' " 79 @click="editChapterDetailDialog = false; trigger = 'reset'; emptyPdf = 'reset' "
80 >cancel</v-icon> 80 >cancel</v-icon>
81 </v-flex> 81 </v-flex>
82 </v-layout> 82 </v-layout>
83 <v-card-text> 83 <v-card-text>
84 <v-layout wrap> 84 <v-layout wrap>
85 <!-- CHAPTER NAME --> 85 <!-- CHAPTER NAME -->
86 <v-flex xs12 sm12> 86 <v-flex xs12 sm12>
87 <v-layout> 87 <v-layout>
88 <v-flex xs4 class="pt-4 subheading"> 88 <v-flex xs4 class="pt-4 subheading">
89 <label class="right">Chapter Name:</label> 89 <label class="right">Chapter Name:</label>
90 </v-flex> 90 </v-flex>
91 <v-flex xs8 sm6 class="ml-3"> 91 <v-flex xs8 sm6 class="ml-3">
92 <v-text-field 92 <v-text-field
93 v-model="editChapter.chapterName" 93 v-model="editChapter.chapterName"
94 placeholder="fill your Title" 94 placeholder="fill your Title"
95 type="text" 95 type="text"
96 required 96 required
97 ></v-text-field> 97 ></v-text-field>
98 </v-flex> 98 </v-flex>
99 </v-layout> 99 </v-layout>
100 </v-flex> 100 </v-flex>
101 <!-- DESCRIPTION --> 101 <!-- DESCRIPTION -->
102 <v-flex xs12 sm12> 102 <v-flex xs12 sm12>
103 <v-layout> 103 <v-layout>
104 <v-flex xs4 class="pt-4 subheading"> 104 <v-flex xs4 class="pt-4 subheading">
105 <label class="right">Description:</label> 105 <label class="right">Description:</label>
106 </v-flex> 106 </v-flex>
107 <v-flex xs8 sm6 class="ml-3"> 107 <v-flex xs8 sm6 class="ml-3">
108 <v-text-field 108 <v-text-field
109 placeholder="fill your Description" 109 placeholder="fill your Description"
110 v-model="editChapter.description" 110 v-model="editChapter.description"
111 type="text" 111 type="text"
112 required 112 required
113 ></v-text-field> 113 ></v-text-field>
114 </v-flex> 114 </v-flex>
115 </v-layout> 115 </v-layout>
116 </v-flex> 116 </v-flex>
117 <!-- UPLOAD PPT --> 117 <!-- UPLOAD PPT -->
118 <!-- <v-flex xs12> 118 <!-- <v-flex xs12>
119 <v-layout> 119 <v-layout>
120 <v-flex xs4 class="pt-4 subheading"> 120 <v-flex xs4 class="pt-4 subheading">
121 <label class="right">Upload PPT:</label> 121 <label class="right">Upload PPT:</label>
122 </v-flex> 122 </v-flex>
123 <v-flex xs8 sm6 class="ml-3"> 123 <v-flex xs8 sm6 class="ml-3">
124 <UploadFiles 124 <UploadFiles
125 @fileSelected="fileSelected($event,'uploadPPT')" 125 @fileSelected="fileSelected($event,'uploadPPT')"
126 label="Add PPT" 126 label="Add PPT"
127 reference="EditPpt" 127 reference="EditPpt"
128 id="editPptInput" 128 id="editPptInput"
129 :trigger="trigger" 129 :trigger="trigger"
130 ></UploadFiles> 130 ></UploadFiles>
131 </v-flex> 131 </v-flex>
132 </v-layout> 132 </v-layout>
133 </v-flex>--> 133 </v-flex>-->
134 <!-- UPLOAD PDF --> 134 <!-- UPLOAD PDF -->
135 <v-flex xs12> 135 <v-flex xs12>
136 <v-layout> 136 <v-layout>
137 <v-flex xs4 class="pt-4 subheading"> 137 <v-flex xs4 class="pt-4 subheading">
138 <label class="right">Upload PDF:</label> 138 <label class="right">Upload PDF:</label>
139 </v-flex> 139 </v-flex>
140 <v-flex xs8 sm6 class="ml-3"> 140 <v-flex xs8 sm6 class="ml-3">
141 <UploadPdf 141 <UploadPdf
142 @pdfFileSelected="pdfFileSelected($event,'uploadPDF')" 142 @pdfFileSelected="pdfFileSelected($event,'uploadPDF')"
143 label="Add PDF" 143 label="Add PDF"
144 reference="editPdf" 144 reference="editPdf"
145 id="editPdfInput" 145 id="editPdfInput"
146 :emptyPdf="emptyPdf" 146 :emptyPdf="emptyPdf"
147 ></UploadPdf> 147 ></UploadPdf>
148 </v-flex> 148 </v-flex>
149 </v-layout> 149 </v-layout>
150 </v-flex> 150 </v-flex>
151 </v-layout> 151 </v-layout>
152 <!-- <v-flex xs12 v-if="editChapter.chapterPoints.length != 0"> 152 <!-- <v-flex xs12 v-if="editChapter.chapterPoints.length != 0">
153 <v-layout 153 <v-layout
154 wrap 154 wrap
155 v-for="(editChapterPoint,index) in editChapter.chapterPoints" 155 v-for="(editChapterPoint,index) in editChapter.chapterPoints"
156 :key="index" 156 :key="index"
157 > 157 >
158 <v-flex xs12 sm12 md4 class="pt-4 subheading"> 158 <v-flex xs12 sm12 md4 class="pt-4 subheading">
159 <label class="right hidden-xs-only hidden-sm-only">Chapter Points:</label> 159 <label class="right hidden-xs-only hidden-sm-only">Chapter Points:</label>
160 <label class="hidden-md-only hidden-lg-only hidden-xl-only">Chapter Points:</label> 160 <label class="hidden-md-only hidden-lg-only hidden-xl-only">Chapter Points:</label>
161 </v-flex> 161 </v-flex>
162 <v-layout> 162 <v-layout>
163 <v-flex xs10 sm10 sm5 md9 class="ml-3"> 163 <v-flex xs10 sm10 sm5 md9 class="ml-3">
164 <v-text-field :value="editChapterPoint" type="text" required></v-text-field> 164 <v-text-field :value="editChapterPoint" type="text" required></v-text-field>
165 </v-flex> 165 </v-flex>
166 <v-flex xs2 class="pt-4"> 166 <v-flex xs2 class="pt-4">
167 <v-icon @click="deleteUrl(index)">cancel</v-icon> 167 <v-icon @click="deleteUrl(index)">cancel</v-icon>
168 </v-flex> 168 </v-flex>
169 </v-layout> 169 </v-layout>
170 </v-layout> 170 </v-layout>
171 </v-flex>--> 171 </v-flex>-->
172 <v-flex xs12> 172 <v-flex xs12>
173 <div v-for="(updateImage,index) in updates" :key="index"> 173 <div v-for="(updateImage,index) in updates" :key="index">
174 <v-layout wrap> 174 <v-layout wrap>
175 <v-flex xs12 sm12 md4 class="pt-4 subheading"> 175 <v-flex xs12 sm12 md4 class="pt-4 subheading">
176 <label class="right hidden-xs-only hidden-sm-only">Chapter Points:</label> 176 <label class="right hidden-xs-only hidden-sm-only">Chapter Points:</label>
177 <label class="hidden-md-only hidden-lg-only hidden-xl-only">Chapter Points:</label> 177 <label class="hidden-md-only hidden-lg-only hidden-xl-only">Chapter Points:</label>
178 </v-flex> 178 </v-flex>
179 <v-layout> 179 <v-layout>
180 <v-flex xs10 sm12 md9 class="ml-3"> 180 <v-flex xs10 sm12 md9 class="ml-3">
181 <v-text-field 181 <v-text-field
182 v-model="updateImage.value" 182 v-model="updateImage.value"
183 placeholder="Upload new Chapter Points" 183 placeholder="Upload new Chapter Points"
184 required 184 required
185 ></v-text-field> 185 ></v-text-field>
186 </v-flex> 186 </v-flex>
187 <v-flex xs2 class="pt-4"> 187 <v-flex xs2 class="pt-4">
188 <v-icon @click="deleteUpdate(index)" v-if="index !=0">cancel</v-icon> 188 <v-icon @click="deleteUpdate(index)" v-if="index !=0">cancel</v-icon>
189 <v-icon @click="update">add_circle</v-icon> 189 <v-icon @click="update">add_circle</v-icon>
190 </v-flex> 190 </v-flex>
191 </v-layout> 191 </v-layout>
192 </v-layout> 192 </v-layout>
193 </div> 193 </div>
194 </v-flex> 194 </v-flex>
195 <v-layout> 195 <v-layout>
196 <v-flex xs12 sm12 md11 lg11> 196 <v-flex xs12 sm12 md11 lg11>
197 <v-card-actions class="hidden-xs-only hidden-sm-only"> 197 <v-card-actions class="hidden-xs-only hidden-sm-only">
198 <v-spacer></v-spacer> 198 <v-spacer></v-spacer>
199 <v-btn 199 <v-btn
200 round 200 round
201 dark 201 dark
202 @click="saveChapter" 202 @click="saveChapter"
203 :loading="editLoading" 203 :loading="editLoading"
204 class="add-button mr-4" 204 class="add-button mr-4"
205 >Save</v-btn> 205 >Save</v-btn>
206 </v-card-actions> 206 </v-card-actions>
207 <v-card-actions class="hidden-md-only hidden-lg-only hidden-xl-only"> 207 <v-card-actions class="hidden-md-only hidden-lg-only hidden-xl-only">
208 <v-spacer></v-spacer> 208 <v-spacer></v-spacer>
209 <v-btn 209 <v-btn
210 round 210 round
211 dark 211 dark
212 @click="saveChapter" 212 @click="saveChapter"
213 :loading="editLoading" 213 :loading="editLoading"
214 class="add-button" 214 class="add-button"
215 >Save</v-btn> 215 >Save</v-btn>
216 <v-spacer></v-spacer> 216 <v-spacer></v-spacer>
217 </v-card-actions> 217 </v-card-actions>
218 </v-flex> 218 </v-flex>
219 </v-layout> 219 </v-layout>
220 </v-card-text> 220 </v-card-text>
221 </v-card> 221 </v-card>
222 </v-dialog> 222 </v-dialog>
223 <!-- ADD NEW CHAPTER--> 223 <!-- ADD NEW CHAPTER-->
224 <v-dialog v-model="addChapterDialog" max-width="1000px" scrollable> 224 <v-dialog v-model="addChapterDialog" max-width="1000px" scrollable>
225 <v-card class="card-style pa-2" dark> 225 <v-card class="card-style pa-2" dark>
226 <v-layout> 226 <v-layout>
227 <v-flex xs12> 227 <v-flex xs12>
228 <label class="title text-xs-center">Add Chapter Detail</label> 228 <label class="title text-xs-center">Add Chapter Detail</label>
229 <v-icon 229 <v-icon
230 size="24" 230 size="24"
231 class="right" 231 class="right"
232 @click="addChapterDialog = false; trigger = 'reset'; emptyPdf = 'reset' " 232 @click="addChapterDialog = false; trigger = 'reset'; emptyPdf = 'reset' "
233 >cancel</v-icon> 233 >cancel</v-icon>
234 </v-flex> 234 </v-flex>
235 </v-layout> 235 </v-layout>
236 <v-card-text> 236 <v-card-text>
237 <v-layout wrap> 237 <v-layout wrap>
238 <v-flex xs12 sm12> 238 <v-flex xs12 sm12>
239 <v-layout> 239 <v-layout>
240 <v-flex xs4 class="pt-4 subheading"> 240 <v-flex xs4 class="pt-4 subheading">
241 <label class="right">Chapter Name:</label> 241 <label class="right">Chapter Name:</label>
242 </v-flex> 242 </v-flex>
243 <v-flex xs8 sm6 class="ml-3"> 243 <v-flex xs8 sm6 class="ml-3">
244 <v-text-field 244 <v-text-field
245 v-model="addChapterItem.chapterName" 245 v-model="addChapterItem.chapterName"
246 placeholder="fill your Title" 246 placeholder="fill your Title"
247 type="text" 247 type="text"
248 required 248 required
249 ></v-text-field> 249 ></v-text-field>
250 </v-flex> 250 </v-flex>
251 </v-layout> 251 </v-layout>
252 </v-flex> 252 </v-flex>
253 <v-flex xs12 sm12> 253 <v-flex xs12 sm12>
254 <v-layout> 254 <v-layout>
255 <v-flex xs4 class="pt-4 subheading"> 255 <v-flex xs4 class="pt-4 subheading">
256 <label class="right">Description:</label> 256 <label class="right">Description:</label>
257 </v-flex> 257 </v-flex>
258 <v-flex xs8 sm6 class="ml-3"> 258 <v-flex xs8 sm6 class="ml-3">
259 <v-text-field 259 <v-text-field
260 placeholder="fill your Description" 260 placeholder="fill your Description"
261 v-model="addChapterItem.description" 261 v-model="addChapterItem.description"
262 type="text" 262 type="text"
263 required 263 required
264 ></v-text-field> 264 ></v-text-field>
265 </v-flex> 265 </v-flex>
266 </v-layout> 266 </v-layout>
267 </v-flex> 267 </v-flex>
268 <!-- UPLOAD PPT --> 268 <!-- UPLOAD PPT -->
269 <!-- <v-flex xs12> 269 <!-- <v-flex xs12>
270 <v-layout> 270 <v-layout>
271 <v-flex xs4 class="pt-4 subheading"> 271 <v-flex xs4 class="pt-4 subheading">
272 <label class="right">Upload PPT:</label> 272 <label class="right">Upload PPT:</label>
273 </v-flex> 273 </v-flex>
274 <v-flex xs8 sm6 class="ml-3"> 274 <v-flex xs8 sm6 class="ml-3">
275 <UploadFiles 275 <UploadFiles
276 @fileSelected="fileSelected($event,'uploadPPT')" 276 @fileSelected="fileSelected($event,'uploadPPT')"
277 label="Add PPT" 277 label="Add PPT"
278 reference="newChapterPpt" 278 reference="newChapterPpt"
279 id="newChapterPptInput" 279 id="newChapterPptInput"
280 :trigger="trigger" 280 :trigger="trigger"
281 ></UploadFiles> 281 ></UploadFiles>
282 </v-flex> 282 </v-flex>
283 </v-layout> 283 </v-layout>
284 </v-flex>--> 284 </v-flex>-->
285 <!-- UPLOAD PDF --> 285 <!-- UPLOAD PDF -->
286 <v-flex xs12> 286 <v-flex xs12>
287 <v-layout> 287 <v-layout>
288 <v-flex xs4 class="pt-4 subheading"> 288 <v-flex xs4 class="pt-4 subheading">
289 <label class="right">Upload PDF:</label> 289 <label class="right">Upload PDF:</label>
290 </v-flex> 290 </v-flex>
291 <v-flex xs8 sm6 class="ml-3"> 291 <v-flex xs8 sm6 class="ml-3">
292 <UploadPdf 292 <UploadPdf
293 @pdfFileSelected="pdfFileSelected($event,'uploadPDF')" 293 @pdfFileSelected="pdfFileSelected($event,'uploadPDF')"
294 label="Add PDF" 294 label="Add PDF"
295 reference="newChapterPdf" 295 reference="newChapterPdf"
296 id="newChapterPdfInput" 296 id="newChapterPdfInput"
297 :emptyPdf="emptyPdf" 297 :emptyPdf="emptyPdf"
298 ></UploadPdf> 298 ></UploadPdf>
299 </v-flex> 299 </v-flex>
300 </v-layout> 300 </v-layout>
301 </v-flex> 301 </v-flex>
302 </v-layout> 302 </v-layout>
303 <v-flex xs12> 303 <v-flex xs12>
304 <div v-for="(chapterPoints,index) in findsChapterPoint" :key="index"> 304 <div v-for="(chapterPoints,index) in findsChapterPoint" :key="index">
305 <v-layout> 305 <v-layout>
306 <v-flex xs4 class="pt-4 subheading"> 306 <v-flex xs4 class="pt-4 subheading">
307 <label class="right">Chapter Points:</label> 307 <label class="right">Chapter Points:</label>
308 </v-flex> 308 </v-flex>
309 <v-flex xs8 sm8 md6 class="ml-3"> 309 <v-flex xs8 sm8 md6 class="ml-3">
310 <v-text-field 310 <v-text-field
311 placeholder="fill your Chapter Points" 311 placeholder="fill your Chapter Points"
312 v-model="chapterPoints.value" 312 v-model="chapterPoints.value"
313 type="text" 313 type="text"
314 name="link" 314 name="link"
315 required 315 required
316 ></v-text-field> 316 ></v-text-field>
317 </v-flex> 317 </v-flex>
318 <v-flex xs2 class="pt-4"> 318 <v-flex xs2 class="pt-4">
319 <v-icon @click="deleteChapterPoint(index)" v-if="index !=0 ">cancel</v-icon> 319 <v-icon @click="deleteChapterPoint(index)" v-if="index !=0 ">cancel</v-icon>
320 <v-icon @click="addChapterPoint()">add_circle</v-icon> 320 <v-icon @click="addChapterPoint()">add_circle</v-icon>
321 </v-flex> 321 </v-flex>
322 </v-layout> 322 </v-layout>
323 </div> 323 </div>
324 </v-flex> 324 </v-flex>
325 <v-layout> 325 <v-layout>
326 <v-flex xs12 sm12 md11 lg11> 326 <v-flex xs12 sm12 md11 lg11>
327 <v-card-actions class="hidden-xs-only hidden-sm-only"> 327 <v-card-actions class="hidden-xs-only hidden-sm-only">
328 <v-spacer></v-spacer> 328 <v-spacer></v-spacer>
329 <v-btn 329 <v-btn
330 round 330 round
331 dark 331 dark
332 @click="submitChapter" 332 @click="submitChapter"
333 :loading="editLoading" 333 :loading="editLoading"
334 class="add-button mr-4" 334 class="add-button mr-4"
335 >Submit</v-btn> 335 >Submit</v-btn>
336 </v-card-actions> 336 </v-card-actions>
337 <v-card-actions class="hidden-md-only hidden-lg-only hidden-xl-only"> 337 <v-card-actions class="hidden-md-only hidden-lg-only hidden-xl-only">
338 <v-spacer></v-spacer> 338 <v-spacer></v-spacer>
339 <v-btn round dark @click="save" :loading="editLoading" class="add-button">Save</v-btn> 339 <v-btn round dark @click="save" :loading="editLoading" class="add-button">Save</v-btn>
340 <v-spacer></v-spacer> 340 <v-spacer></v-spacer>
341 </v-card-actions> 341 </v-card-actions>
342 </v-flex> 342 </v-flex>
343 </v-layout> 343 </v-layout>
344 </v-card-text> 344 </v-card-text>
345 </v-card> 345 </v-card>
346 </v-dialog> 346 </v-dialog>
347 347
348 <!-- ****** PROFILE Gallery ****** --> 348 <!-- ****** PROFILE Gallery ****** -->
349 349
350 <v-dialog v-model="viewProfileGallery" max-width="1000" scrollable> 350 <v-dialog v-model="viewProfileGallery" max-width="1000" scrollable>
351 <v-card flat class="card-style pa-3" dark> 351 <v-card flat class="card-style pa-3" dark>
352 <v-layout> 352 <v-layout>
353 <v-flex xs12> 353 <v-flex xs12>
354 <label class="title text-xs-center">View Course Detail</label> 354 <label class="title text-xs-center">View Course Detail</label>
355 <v-icon size="24" class="right" @click="closeProfileGallery">cancel</v-icon> 355 <v-icon size="24" class="right" @click="closeProfileGallery">cancel</v-icon>
356 </v-flex> 356 </v-flex>
357 </v-layout> 357 </v-layout>
358 <v-card-text> 358 <v-card-text>
359 <v-container grid-list-md> 359 <v-container grid-list-md>
360 <v-layout wrap> 360 <v-layout wrap>
361 <v-flex xs12> 361 <v-flex xs12>
362 <v-layout> 362 <v-layout>
363 <v-flex xs4 sm6> 363 <v-flex xs4 sm6>
364 <h5 class="right my-1"> 364 <h5 class="right my-1">
365 <b>Chapter Name:</b> 365 <b>Chapter Name:</b>
366 </h5> 366 </h5>
367 </v-flex> 367 </v-flex>
368 <v-flex sm6 xs8> 368 <v-flex sm6 xs8>
369 <h5 class="my-1">{{ editedItem.chapterName }}</h5> 369 <h5 class="my-1">{{ editedItem.chapterName }}</h5>
370 </v-flex> 370 </v-flex>
371 </v-layout> 371 </v-layout>
372 <v-layout> 372 <v-layout>
373 <v-flex xs4 sm6> 373 <v-flex xs4 sm6>
374 <h5 class="right my-1"> 374 <h5 class="right my-1">
375 <b>Description:</b> 375 <b>Description:</b>
376 </h5> 376 </h5>
377 </v-flex> 377 </v-flex>
378 <v-flex sm6 xs8> 378 <v-flex sm6 xs8>
379 <h5 class="my-1">{{ editedItem.description }}</h5> 379 <h5 class="my-1">{{ editedItem.description }}</h5>
380 </v-flex> 380 </v-flex>
381 </v-layout> 381 </v-layout>
382 <v-layout> 382 <v-layout>
383 <v-flex xs5 sm6> 383 <v-flex xs5 sm6>
384 <h5 class="right my-1"> 384 <h5 class="right my-1">
385 <b>Chapter Points:</b> 385 <b>Chapter Points:</b>
386 </h5> 386 </h5>
387 </v-flex> 387 </v-flex>
388 <v-flex sm6 xs8> 388 <v-flex sm6 xs8>
389 <h5 class="my-1"> 389 <h5 class="my-1">
390 <ul v-for="chapterPoint in editedItem.chapterPoints" :key="chapterPoint"> 390 <ul v-for="chapterPoint in editedItem.chapterPoints" :key="chapterPoint">
391 <li>{{ chapterPoint}}</li> 391 <li>{{ chapterPoint}}</li>
392 </ul> 392 </ul>
393 </h5> 393 </h5>
394 </v-flex> 394 </v-flex>
395 </v-layout> 395 </v-layout>
396 <!-- LINK TO PDF --> 396 <!-- LINK TO PDF -->
397 <v-layout row justify-center> 397 <v-layout row justify-center>
398 <v-flex xs6> 398 <v-flex xs6>
399 <div style="width: 100%;"> 399 <div style="width: 100%;">
400 <a 400 <a
401 :href="editedItem.pdfFileUrl" 401 :href="editedItem.pdfFileUrl"
402 target="_blank" 402 target="_blank"
403 style="text-decoration: none!important;" 403 style="text-decoration: none!important;"
404 > 404 >
405 <v-btn flat block> 405 <v-btn flat block>
406 <span> 406 <span>
407 <h5> 407 <h5>
408 <b>Open PDF</b> 408 <b>Open PDF</b>
409 </h5> 409 </h5>
410 </span> 410 </span>
411 </v-btn> 411 </v-btn>
412 </a> 412 </a>
413 </div> 413 </div>
414 </v-flex> 414 </v-flex>
415 </v-layout> 415 </v-layout>
416 </v-flex> 416 </v-flex>
417 </v-layout> 417 </v-layout>
418 </v-container> 418 </v-container>
419 </v-card-text> 419 </v-card-text>
420 </v-card> 420 </v-card>
421 </v-dialog> 421 </v-dialog>
422 422
423 <!-- ****** Course Detail TABLE ****** --> 423 <!-- ****** Course Detail TABLE ****** -->
424 <v-container grid-list-lg class="pa-0"> 424 <v-toolbar color="transparent" flat>
425 <v-layout row wrap> 425 <!-- <v-flex xs1>
426 <!-- <v-btn 426 <v-btn round class="open-dialog-button" dark @click="addCourseDetailDialog = true">
427 fab 427 <v-icon size="20">add</v-icon>
428 dark
429 class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only"
430 small
431 @click="addCourseDetailDialog = true"
432 >
433 <v-icon dark>add</v-icon>
434 </v-btn>-->
435 <v-flex xs12 sm4>
436 <v-btn block round class="open-dialog-button" dark @click="addCourseDetailDialog = true">
437 <v-icon class="white--text pr-1" size="20">add</v-icon>
438 <span class="hidden-sm-and-down">Add Course Detail</span> 428 <span class="hidden-sm-and-down">Add Course Detail</span>
439 <span class="hidden-md-and-up">Add</span> 429 <span class="hidden-md-and-up">Add</span>
440 </v-btn> 430 </v-btn>
441 </v-flex> 431 </v-flex>-->
432 <v-btn
433 fab
434 dark
435 class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only"
436 small
437 @click="addCourseDetailDialog = true"
438 >
439 <v-icon dark>add</v-icon>
440 </v-btn>
441 <v-flex xs1 class="hidden-sm-only hidden-xs-only">
442 <v-btn round class="open-dialog-button" dark @click="addCourseDetailDialog = true">
443 <v-icon class="white--text pr-1" size="20">add</v-icon>Add Course Detail
444 </v-btn>
445 </v-flex>
446 <v-spacer></v-spacer>
447 <v-flex xs12 sm4 md2>
448 <v-select
449 :items="addclass"
450 label="Select Class"
451 v-model="getCourse.classId"
452 item-text="classNum"
453 item-value="_id"
454 name="Select Class"
455 @change="getCourses(getCourse.classId)"
456 required
457 ></v-select>
458 </v-flex>
459 <v-flex xs12 sm4 md2 class="ml-2">
460 <v-select
461 :items="courseData"
462 label="Select Course"
463 v-model="getCourse.courseId"
464 item-text="courseName"
465 item-value="_id"
466 required
467 @change="getCourseDetailsList(getCourse.courseId)"
468 ></v-select>
469 </v-flex>
442 470
443 <v-flex xs12 sm4 md2> 471 <v-flex xs12 sm1 v-if="show">
444 <v-select 472 <v-btn icon large flat @click="show = false;showSearch = true;">
445 :items="addclass" 473 <v-avatar size="27">
446 label="Select Class" 474 <img src="/static/icon/search.png" alt="icon" />
447 v-model="getCourse.classId" 475 </v-avatar>
448 item-text="classNum" 476 </v-btn>
449 item-value="_id" 477 </v-flex>
450 name="Select Class"
451 @change="getCourses(getCourse.classId)"
452 required
453 ></v-select>
454 </v-flex>
455 <v-flex xs12 sm4 md2>
456 <v-select
457 :items="courseData"
458 label="Select Course"
459 v-model="getCourse.courseId"
460 item-text="courseName"
461 item-value="_id"
462 required
463 @change="getCourseDetailsList(getCourse.courseId)"
464 ></v-select>
465 </v-flex>
466 478
467 <v-flex xs12 sm1 v-if="show"> 479 <v-flex xs12 sm3 md3 v-if="showSearch" class="ml-2">
468 <v-btn icon large flat @click="show = false;showSearch = true;"> 480 <div style="display: inline-block;width: 70%;">
469 <v-avatar size="27"> 481 <v-text-field
470 <img src="/static/icon/search.png" alt="icon" /> 482 autofocus
471 </v-avatar> 483 v-model="search"
472 </v-btn> 484 label="Search"
473 </v-flex> 485 prepend-inner-icon="search"
486 color="primary"
487 ></v-text-field>
488 </div>
489 <div style="display: inline-block;">
490 <v-icon @click="closeSearch" color="error">close</v-icon>
491 </div>
492 </v-flex>
493 </v-toolbar>
474 494
475 <v-flex xs12 sm3 md3 v-if="showSearch">
476 <div style="display: inline-block;width: 70%;">
477 <v-text-field
478 autofocus
479 v-model="search"
480 label="Search"
481 prepend-inner-icon="search"
482 color="primary"
483 ></v-text-field>
484 </div>
485 <div style="display: inline-block;">
486 <v-icon @click="closeSearch" color="error">close</v-icon>
487 </div>
488 </v-flex>
489 </v-layout>
490 </v-container>
491 <v-data-table 495 <v-data-table
492 :headers="headers" 496 :headers="headers"
493 :items="CourseDetailsList" 497 :items="CourseDetailsList"
494 :pagination.sync="pagination" 498 :pagination.sync="pagination"
495 :search="search" 499 :search="search"
496 item-key="_id" 500 item-key="_id"
497 > 501 >
498 <template slot="items" slot-scope="props"> 502 <template slot="items" slot-scope="props">
499 <tr class="tr" @click="courseTableRow(props.item._id)"> 503 <tr class="tr" @click="courseTableRow(props.item._id)">
500 <td class="td td-row">{{ props.index + 1}}</td> 504 <td class="td td-row">{{ props.index + 1}}</td>
501 <td class="td td-row text-xs-center">{{ props.item.classId.classNum }}</td> 505 <td class="td td-row text-xs-center">{{ props.item.classId.classNum }}</td>
502 <td class="td td-row text-xs-center">{{ props.item.courseId.courseName }}</td> 506 <td class="td td-row text-xs-center">{{ props.item.courseId.courseName }}</td>
503 <td class="td td-row text-xs-center"> 507 <td class="td td-row text-xs-center">
504 <div style="vertical-align: top;"> 508 <div style="vertical-align: top;">
505 <v-tooltip top> 509 <v-tooltip top>
506 <v-icon 510 <v-icon
507 slot="activator" 511 slot="activator"
508 style="cursor:pointer;font-size:22px;position: relative;top: -4px; " 512 style="cursor:pointer;font-size:22px;position: relative;top: -4px; "
509 class="mr-3" 513 class="mr-3"
510 @click="addChapters(props.item)" 514 @click="addChapters(props.item)"
511 >add_circle_outline</v-icon> 515 >add_circle_outline</v-icon>
512 <span>Add</span> 516 <span>Add</span>
513 </v-tooltip> 517 </v-tooltip>
514 <v-tooltip top> 518 <v-tooltip top>
515 <img 519 <img
516 slot="activator" 520 slot="activator"
517 style="cursor:pointer; width:25px; height:25px; " 521 style="cursor:pointer; width:25px; height:25px; "
518 class="mr-3" 522 class="mr-3"
519 @click="props.expanded = !props.expanded" 523 @click="props.expanded = !props.expanded"
520 src="/static/icon/view.png" 524 src="/static/icon/view.png"
521 /> 525 />
522 <span>View</span> 526 <span>View</span>
523 </v-tooltip> 527 </v-tooltip>
524 <v-tooltip top> 528 <v-tooltip top>
525 <img 529 <img
526 slot="activator" 530 slot="activator"
527 style="cursor:pointer; width:20px; height:18px; " 531 style="cursor:pointer; width:20px; height:18px; "
528 class="mr-3" 532 class="mr-3"
529 @click="editItem(props.item)" 533 @click="editItem(props.item)"
530 src="/static/icon/edit.png" 534 src="/static/icon/edit.png"
531 /> 535 />
532 <span>Edit</span> 536 <span>Edit</span>
533 </v-tooltip> 537 </v-tooltip>
534 <v-tooltip top> 538 <v-tooltip top>
535 <img 539 <img
536 slot="activator" 540 slot="activator"
537 style="cursor:pointer; width:20px; height:20px; " 541 style="cursor:pointer; width:20px; height:20px; "
538 class="mr-3" 542 class="mr-3"
539 @click="deleteItem(props.item)" 543 @click="deleteItem(props.item)"
540 src="/static/icon/delete.png" 544 src="/static/icon/delete.png"
541 /> 545 />
542 <span>Delete</span> 546 <span>Delete</span>
543 </v-tooltip> 547 </v-tooltip>
544 </div> 548 </div>
545 </td> 549 </td>
546 </tr> 550 </tr>
547 </template> 551 </template>
548 <!-- CHAPTERS IN A COURSE --> 552 <!-- CHAPTERS IN A COURSE -->
549 <template slot="expand"> 553 <template slot="expand">
550 <v-data-table :items="chapters" hide-actions item-key="chapterName" style="width: auto;"> 554 <v-data-table :items="chapters" hide-actions item-key="chapterName" style="width: auto;">
551 <template slot="items" slot-scope="props"> 555 <template slot="items" slot-scope="props">
552 <tr class="tr" @click="props.expanded = !props.expanded"> 556 <tr class="tr" @click="props.expanded = !props.expanded">
553 <td class="td td-row">{{ props.index + 1}}</td> 557 <td class="td td-row">{{ props.index + 1}}</td>
554 <td class="text-xs-center td td-row">{{ props.item.chapterName}}</td> 558 <td class="text-xs-center td td-row">{{ props.item.chapterName}}</td>
555 <td class="text-xs-center td td-row">{{ props.item.description }}</td> 559 <td class="text-xs-center td td-row">{{ props.item.description }}</td>
556 <td class="text-xs-center td td-row"> 560 <td class="text-xs-center td td-row">
557 <v-tooltip top> 561 <v-tooltip top>
558 <v-icon 562 <v-icon
559 slot="activator" 563 slot="activator"
560 style="cursor:pointer;font-size:22px;position: relative;top: -4px; " 564 style="cursor:pointer;font-size:22px;position: relative;top: -4px; "
561 class="mr-3" 565 class="mr-3"
562 @click="$router.push({name: 'Live Online Class', query: {chapterId: props.item._id, chapterName: props.item.chapterName, courseId: getCourse.courseId, classId: getCourse.classId }})" 566 @click="$router.push({name: 'Live Online Class', query: {chapterId: props.item._id, chapterName: props.item.chapterName, courseId: getCourse.courseId, classId: getCourse.classId }})"
563 >video_call</v-icon> 567 >video_call</v-icon>
564 <span>Live Session</span> 568 <span>Live Session</span>
565 </v-tooltip> 569 </v-tooltip>
566 <v-tooltip top> 570 <v-tooltip top>
567 <img 571 <img
568 slot="activator" 572 slot="activator"
569 style="cursor:pointer; width:25px; height:25px; " 573 style="cursor:pointer; width:25px; height:25px; "
570 class="mr-3" 574 class="mr-3"
571 @click="profile(props.item)" 575 @click="profile(props.item)"
572 src="/static/icon/view.png" 576 src="/static/icon/view.png"
573 /> 577 />
574 <span>View</span> 578 <span>View</span>
575 </v-tooltip> 579 </v-tooltip>
576 <v-tooltip top> 580 <v-tooltip top>
577 <img 581 <img
578 slot="activator" 582 slot="activator"
579 style="cursor:pointer; width:20px; height:18px; " 583 style="cursor:pointer; width:20px; height:18px; "
580 class="mr-3" 584 class="mr-3"
581 @click="editChapterItem(props.item)" 585 @click="editChapterItem(props.item)"
582 src="/static/icon/edit.png" 586 src="/static/icon/edit.png"
583 /> 587 />
584 <span>Edit</span> 588 <span>Edit</span>
585 </v-tooltip> 589 </v-tooltip>
586 <v-tooltip top> 590 <v-tooltip top>
587 <img 591 <img
588 slot="activator" 592 slot="activator"
589 style="cursor:pointer; width:20px; height:20px; " 593 style="cursor:pointer; width:20px; height:20px; "
590 class="mr-3" 594 class="mr-3"
591 @click="deleteChapters(props.item)" 595 @click="deleteChapters(props.item)"
592 src="/static/icon/delete.png" 596 src="/static/icon/delete.png"
593 /> 597 />
594 <span>Delete Chapter</span> 598 <span>Delete Chapter</span>
595 </v-tooltip> 599 </v-tooltip>
596 </td> 600 </td>
597 </tr> 601 </tr>
598 </template> 602 </template>
599 </v-data-table> 603 </v-data-table>
600 </template> 604 </template>
601 605
602 <v-alert 606 <v-alert
603 slot="no-results" 607 slot="no-results"
604 :value="true" 608 :value="true"
605 color="error" 609 color="error"
606 icon="warning" 610 icon="warning"
607 >Your search for "{{ search }}" found no results.</v-alert> 611 >Your search for "{{ search }}" found no results.</v-alert>
608 </v-data-table> 612 </v-data-table>
609 <!-- ****** ADD Course Detail ****** --> 613 <!-- ****** ADD Course Detail ****** -->
610 <v-dialog v-model="addCourseDetailDialog" max-width="600px" persistent> 614 <v-dialog v-model="addCourseDetailDialog" max-width="600px" persistent>
611 <v-card flat class="card-style pa-2" dark> 615 <v-card flat class="card-style pa-2" dark>
612 <v-layout> 616 <v-layout>
613 <v-flex xs12> 617 <v-flex xs12>
614 <label class="title text-xs-center">Add Course Details</label> 618 <label class="title text-xs-center">Add Course Details</label>
615 <v-icon 619 <v-icon
616 size="24" 620 size="24"
617 class="right" 621 class="right"
618 @click="addCourseDetailDialog = false; clear() ; trigger = 'reset' ; emptyPdf = 'reset' " 622 @click="addCourseDetailDialog = false; clear() ; trigger = 'reset' ; emptyPdf = 'reset' "
619 >cancel</v-icon> 623 >cancel</v-icon>
620 </v-flex> 624 </v-flex>
621 </v-layout> 625 </v-layout>
622 <v-form ref="form" v-model="valid" lazy-validation> 626 <v-form ref="form" v-model="valid" lazy-validation>
623 <v-container fluid> 627 <v-container fluid>
624 <v-flex xs12> 628 <v-flex xs12>
625 <v-layout> 629 <v-layout>
626 <v-flex xs4 class="pt-4 subheading"> 630 <v-flex xs4 class="pt-4 subheading">
627 <label class="right hidden-xs-only hidden-sm-only">Select Class:</label> 631 <label class="right hidden-xs-only hidden-sm-only">Select Class:</label>
628 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Class:</label> 632 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Class:</label>
629 </v-flex> 633 </v-flex>
630 <v-flex xs8 sm8 md7 class="ml-3"> 634 <v-flex xs8 sm8 md7 class="ml-3">
631 <v-select 635 <v-select
632 :items="addclass" 636 :items="addclass"
633 label="Select Class" 637 label="Select Class"
634 v-model="addCourseDetail.classId" 638 v-model="addCourseDetail.classId"
635 item-text="classNum" 639 item-text="classNum"
636 item-value="_id" 640 item-value="_id"
637 name="Select Class" 641 name="Select Class"
638 :rules="clsssRules" 642 :rules="clsssRules"
639 @change="getCourses(addCourseDetail.classId)" 643 @change="getCourses(addCourseDetail.classId)"
640 required 644 required
641 ></v-select> 645 ></v-select>
642 </v-flex> 646 </v-flex>
643 </v-layout> 647 </v-layout>
644 </v-flex> 648 </v-flex>
645 <v-flex xs12> 649 <v-flex xs12>
646 <v-layout> 650 <v-layout>
647 <v-flex xs4 class="pt-4 subheading"> 651 <v-flex xs4 class="pt-4 subheading">
648 <label class="right hidden-xs-only hidden-sm-only">Select Course:</label> 652 <label class="right hidden-xs-only hidden-sm-only">Select Course:</label>
649 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Course:</label> 653 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Course:</label>
650 </v-flex> 654 </v-flex>
651 <v-flex xs8 sm8 md7 class="ml-3"> 655 <v-flex xs8 sm8 md7 class="ml-3">
652 <v-select 656 <v-select
653 :items="courseData" 657 :items="courseData"
654 label="Select Course" 658 label="Select Course"
655 v-model="addCourseDetail.courseId" 659 v-model="addCourseDetail.courseId"
656 item-text="courseName" 660 item-text="courseName"
657 item-value="_id" 661 item-value="_id"
658 :rules="courseRules" 662 :rules="courseRules"
659 required 663 required
660 ></v-select> 664 ></v-select>
661 </v-flex> 665 </v-flex>
662 </v-layout> 666 </v-layout>
663 </v-flex> 667 </v-flex>
664 <v-flex xs12> 668 <v-flex xs12>
665 <v-layout> 669 <v-layout>
666 <v-flex xs4 class="pt-4 subheading"> 670 <v-flex xs4 class="pt-4 subheading">
667 <label class="right">Chapter Name:</label> 671 <label class="right">Chapter Name:</label>
668 </v-flex> 672 </v-flex>
669 <v-flex xs8 sm8 md7 class="ml-3"> 673 <v-flex xs8 sm8 md7 class="ml-3">
670 <v-text-field 674 <v-text-field
671 v-model="addCourseDetail.chapterName" 675 v-model="addCourseDetail.chapterName"
672 placeholder="fill your Title" 676 placeholder="fill your Title"
673 name="name" 677 name="name"
674 type="text" 678 type="text"
675 :rules="chapterNameRules" 679 :rules="chapterNameRules"
676 required 680 required
677 ></v-text-field> 681 ></v-text-field>
678 </v-flex> 682 </v-flex>
679 </v-layout> 683 </v-layout>
680 </v-flex> 684 </v-flex>
681 <!-- DESCRIPTION --> 685 <!-- DESCRIPTION -->
682 <v-flex xs12> 686 <v-flex xs12>
683 <v-layout> 687 <v-layout>
684 <v-flex xs4 class="pt-4 subheading"> 688 <v-flex xs4 class="pt-4 subheading">
685 <label class="right">Description:</label> 689 <label class="right">Description:</label>
686 </v-flex> 690 </v-flex>
687 <v-flex xs8 sm8 md7 class="ml-3"> 691 <v-flex xs8 sm8 md7 class="ml-3">
688 <v-text-field 692 <v-text-field
689 placeholder="fill your Description" 693 placeholder="fill your Description"
690 :rules="descriptionRules" 694 :rules="descriptionRules"
691 v-model="addCourseDetail.description" 695 v-model="addCourseDetail.description"
692 type="text" 696 type="text"
693 name="email" 697 name="email"
694 required 698 required
695 ></v-text-field> 699 ></v-text-field>
696 </v-flex> 700 </v-flex>
697 </v-layout> 701 </v-layout>
698 </v-flex> 702 </v-flex>
699 <!-- UPLOAD PPT --> 703 <!-- UPLOAD PPT -->
700 <!-- <v-flex xs12> 704 <!-- <v-flex xs12>
701 <v-layout> 705 <v-layout>
702 <v-flex xs4 class="pt-4 subheading"> 706 <v-flex xs4 class="pt-4 subheading">
703 <label class="right">Upload PPT:</label> 707 <label class="right">Upload PPT:</label>
704 </v-flex> 708 </v-flex>
705 <v-flex xs8 sm8 md7 class="ml-3"> 709 <v-flex xs8 sm8 md7 class="ml-3">
706 <UploadFiles 710 <UploadFiles
707 @fileSelected="fileSelected($event,'uploadPPT')" 711 @fileSelected="fileSelected($event,'uploadPPT')"
708 label="Add PPT" 712 label="Add PPT"
709 reference="newCoursePpt" 713 reference="newCoursePpt"
710 id="newCoursePptInput" 714 id="newCoursePptInput"
711 :trigger="trigger" 715 :trigger="trigger"
712 ></UploadFiles> 716 ></UploadFiles>
713 </v-flex> 717 </v-flex>
714 </v-layout> 718 </v-layout>
715 </v-flex>--> 719 </v-flex>-->
716 <!-- UPLOAD PDF --> 720 <!-- UPLOAD PDF -->
717 <v-flex xs12> 721 <v-flex xs12>
718 <v-layout> 722 <v-layout>
719 <v-flex xs4 class="pt-4 subheading"> 723 <v-flex xs4 class="pt-4 subheading">
720 <label class="right">Upload PDF:</label> 724 <label class="right">Upload PDF:</label>
721 </v-flex> 725 </v-flex>
722 <v-flex xs8 sm8 md7 class="ml-3"> 726 <v-flex xs8 sm8 md7 class="ml-3">
723 <UploadPdf 727 <UploadPdf
724 @pdfFileSelected="pdfFileSelected($event,'uploadPDF')" 728 @pdfFileSelected="pdfFileSelected($event,'uploadPDF')"
725 label="Add PDF" 729 label="Add PDF"
726 reference="newCoursePdf" 730 reference="newCoursePdf"
727 id="newCoursePdfInput" 731 id="newCoursePdfInput"
728 :emptyPdf="emptyPdf" 732 :emptyPdf="emptyPdf"
729 ></UploadPdf> 733 ></UploadPdf>
730 </v-flex> 734 </v-flex>
731 </v-layout> 735 </v-layout>
732 </v-flex> 736 </v-flex>
733 <v-layout> 737 <v-layout>
734 <v-flex xs12> 738 <v-flex xs12>
735 <div v-for="(chapterPoints,index) in finds" :key="index"> 739 <div v-for="(chapterPoints,index) in finds" :key="index">
736 <v-layout> 740 <v-layout>
737 <v-flex xs4 class="pt-4 subheading"> 741 <v-flex xs4 class="pt-4 subheading">
738 <label class="right">Chapter Points:</label> 742 <label class="right">Chapter Points:</label>
739 </v-flex> 743 </v-flex>
740 <v-flex xs8 sm8 md6 class="ml-3"> 744 <v-flex xs8 sm8 md6 class="ml-3">
741 <v-text-field 745 <v-text-field
742 placeholder="fill your Chapter Points" 746 placeholder="fill your Chapter Points"
743 v-model="chapterPoints.value" 747 v-model="chapterPoints.value"
744 type="text" 748 type="text"
745 required 749 required
746 ></v-text-field> 750 ></v-text-field>
747 </v-flex> 751 </v-flex>
748 <v-flex xs2 class="pt-4"> 752 <v-flex xs2 class="pt-4">
749 <v-icon @click="deleteFind(index)" v-if="index !=0 ">cancel</v-icon> 753 <v-icon @click="deleteFind(index)" v-if="index !=0 ">cancel</v-icon>
750 <v-icon @click="addFind">add_circle</v-icon> 754 <v-icon @click="addFind">add_circle</v-icon>
751 </v-flex> 755 </v-flex>
752 </v-layout> 756 </v-layout>
753 </div> 757 </div>
754 </v-flex> 758 </v-flex>
755 </v-layout> 759 </v-layout>
756 <v-layout> 760 <v-layout>
757 <v-flex xs12 sm12> 761 <v-flex xs12 sm12>
758 <v-layout class="right"> 762 <v-layout class="right">
759 <v-btn @click="clear();" round dark class="clear-button">Clear</v-btn> 763 <v-btn @click="clear();" round dark class="clear-button">Clear</v-btn>
760 <v-btn @click="submit" round dark :loading="loading" class="add-button">Add</v-btn> 764 <v-btn @click="submit" round dark :loading="loading" class="add-button">Add</v-btn>
761 </v-layout> 765 </v-layout>
762 </v-flex> 766 </v-flex>
763 </v-layout> 767 </v-layout>
764 </v-container> 768 </v-container>
765 </v-form> 769 </v-form>
766 </v-card> 770 </v-card>
767 </v-dialog> 771 </v-dialog>
768 <v-snackbar 772 <v-snackbar
769 :timeout="timeout" 773 :timeout="timeout"
770 :top="y === 'top'" 774 :top="y === 'top'"
771 :right="x === 'right'" 775 :right="x === 'right'"
772 :vertical="mode === 'vertical'" 776 :vertical="mode === 'vertical'"
773 v-model="snackbar" 777 v-model="snackbar"
774 :color="color" 778 :color="color"
775 >{{ text }}</v-snackbar> 779 >{{ text }}</v-snackbar>
776 <div class="loader" v-if="showLoader"> 780 <div class="loader" v-if="showLoader">
777 <v-progress-circular indeterminate color="white"></v-progress-circular> 781 <v-progress-circular indeterminate color="white"></v-progress-circular>
778 </div> 782 </div>
779 </v-container> 783 </v-container>
780 </template> 784 </template>
781 785
782 <script> 786 <script>
783 import http from "@/Services/http.js"; 787 import http from "@/Services/http.js";
784 import UploadFiles from "@/pages/Common/UploadFiles.vue"; 788 import UploadFiles from "@/pages/Common/UploadFiles.vue";
785 import UploadPdf from "@/pages/Common/UploadPdf.vue"; 789 import UploadPdf from "@/pages/Common/UploadPdf.vue";
786 import AllApiCalls from "@/Services/AllApiCalls.js"; 790 import AllApiCalls from "@/Services/AllApiCalls.js";
787 791
788 export default { 792 export default {
789 mixins: [AllApiCalls], 793 mixins: [AllApiCalls],
790 components: { 794 components: {
791 UploadFiles, 795 UploadFiles,
792 UploadPdf, 796 UploadPdf,
793 }, 797 },
794 data: () => ({ 798 data: () => ({
795 snackbar: false, 799 snackbar: false,
796 y: "top", 800 y: "top",
797 x: "right", 801 x: "right",
798 mode: "", 802 mode: "",
799 timeout: 3000, 803 timeout: 3000,
800 text: "", 804 text: "",
801 loading: false, 805 loading: false,
802 color: "", 806 color: "",
803 date: null, 807 date: null,
804 search: "", 808 search: "",
805 show: true, 809 show: true,
806 addCourseDetailDialog: false, 810 addCourseDetailDialog: false,
807 showSearch: false, 811 showSearch: false,
808 showLoader: false, 812 showLoader: false,
809 editCourseDetailDialog: false, 813 editCourseDetailDialog: false,
810 editChapterDetailDialog: false, 814 editChapterDetailDialog: false,
811 viewProfileGallery: false, 815 viewProfileGallery: false,
812 valid: true, 816 valid: true,
813 editLoading: false, 817 editLoading: false,
814 addclass: [], 818 addclass: [],
815 courseData: [], 819 courseData: [],
816 addSection: [], 820 addSection: [],
817 getCourse: {}, 821 getCourse: {},
818 finds: [{ value: "" }], 822 finds: [{ value: "" }],
819 findsChapterPoint: [{ value: "" }], 823 findsChapterPoint: [{ value: "" }],
820 updates: [], 824 updates: [],
821 youTubeLink: {}, 825 youTubeLink: {},
822 addCourseDetail: { 826 addCourseDetail: {
823 chapters: [ 827 chapters: [
824 { 828 {
825 chapterName: "", 829 chapterName: "",
826 description: "", 830 description: "",
827 chapterPoints: [], 831 chapterPoints: [],
828 }, 832 },
829 ], 833 ],
830 }, 834 },
831 chapters: [], 835 chapters: [],
832 pagination: { 836 pagination: {
833 rowsPerPage: 10, 837 rowsPerPage: 10,
834 }, 838 },
835 editFiles: [], 839 editFiles: [],
836 files: [], 840 files: [],
837 courseData: [], 841 courseData: [],
838 token: "", 842 token: "",
839 courseId: "", 843 courseId: "",
840 clsssRules: [(v) => !!v || " Class is required"], 844 clsssRules: [(v) => !!v || " Class is required"],
841 courseRules: [(v) => !!v || " Course is required"], 845 courseRules: [(v) => !!v || " Course is required"],
842 chapterNameRules: [(v) => !!v || " Tilte is required"], 846 chapterNameRules: [(v) => !!v || " Tilte is required"],
843 descriptionRules: [(v) => !!v || " Description is required"], 847 descriptionRules: [(v) => !!v || " Description is required"],
844 headers: [ 848 headers: [
845 { 849 {
846 align: "", 850 align: "",
847 text: "No", 851 text: "No",
848 sortable: false, 852 sortable: false,
849 value: "index", 853 value: "index",
850 }, 854 },
851 { 855 {
852 text: "Class Name", 856 text: "Class Name",
853 value: "classNum", 857 value: "classNum",
854 sortable: false, 858 sortable: false,
855 align: "center", 859 align: "center",
856 }, 860 },
857 { 861 {
858 text: "Course Name", 862 text: "Course Name",
859 value: "courseName", 863 value: "courseName",
860 sortable: false, 864 sortable: false,
861 align: "center", 865 align: "center",
862 }, 866 },
863 { text: "Action", value: "", sortable: false, align: "center" }, 867 { text: "Action", value: "", sortable: false, align: "center" },
864 ], 868 ],
865 CourseDetailsList: [], 869 CourseDetailsList: [],
866 editedIndex: -1, 870 editedIndex: -1,
867 editedItem: {}, 871 editedItem: {},
868 editedCourse: {}, 872 editedCourse: {},
869 editChapter: { 873 editChapter: {
870 chapterPoints: [], 874 chapterPoints: [],
871 }, 875 },
872 index: "", 876 index: "",
873 addChapterItem: {}, 877 addChapterItem: {},
874 addChapterItemObj: {}, 878 addChapterItemObj: {},
875 addChapterDialog: false, 879 addChapterDialog: false,
876 showData: false, 880 showData: false,
877 }), 881 }),
878 methods: { 882 methods: {
879 getCourses(classId) { 883 getCourses(classId) {
880 this.showLoader = true; 884 this.showLoader = true;
881 http() 885 http()
882 .get("/getCourseesList", { 886 .get("/getCourseesList", {
883 params: { 887 params: {
884 classId: classId, 888 classId: classId,
885 }, 889 },
886 }) 890 })
887 .then((response) => { 891 .then((response) => {
888 this.editChapter.courseId = ""; 892 this.editChapter.courseId = "";
889 this.courseData = response.data.data; 893 this.courseData = response.data.data;
890 // console.log("this.courseData", this.courseData); 894 // console.log("this.courseData", this.courseData);
891 this.showLoader = false; 895 this.showLoader = false;
892 }) 896 })
893 .catch((err) => { 897 .catch((err) => {
894 console.log("err====>", err); 898 console.log("err====>", err);
895 this.showLoader = false; 899 this.showLoader = false;
896 }); 900 });
897 }, 901 },
898 getCourseDetailsList() { 902 getCourseDetailsList() {
899 this.showLoader = true; 903 this.showLoader = true;
900 http() 904 http()
901 .get("/getParticularCourseDetail", { 905 .get("/getParticularCourseDetail", {
902 params: { 906 params: {
903 courseId: this.getCourse.courseId, 907 courseId: this.getCourse.courseId,
904 }, 908 },
905 }) 909 })
906 .then((response) => { 910 .then((response) => {
907 this.CourseDetailsList = response.data.data; 911 this.CourseDetailsList = response.data.data;
908 if (this.CourseDetailsList.length === 0) { 912 if (this.CourseDetailsList.length === 0) {
909 this.showLoader = false; 913 this.showLoader = false;
910 this.snackbar = true; 914 this.snackbar = true;
911 this.text = "Data not found!"; 915 this.text = "Data not found!";
912 this.color = "error"; 916 this.color = "error";
913 return; 917 return;
914 } 918 }
915 this.showData = true; 919 this.showData = true;
916 if (response.data.data[0]) { 920 if (response.data.data[0]) {
917 this.chapters = response.data.data[0].chapters; 921 this.chapters = response.data.data[0].chapters;
918 } 922 }
919 this.showLoader = false; 923 this.showLoader = false;
920 }) 924 })
921 .catch((error) => { 925 .catch((error) => {
922 // console.log("err====>", err); 926 // console.log("err====>", err);
923 this.showLoader = false; 927 this.showLoader = false;
924 if (error.response.status === 401) { 928 if (error.response.status === 401) {
925 this.$router.replace({ path: "/" }); 929 this.$router.replace({ path: "/" });
926 this.$store.dispatch("setToken", null); 930 this.$store.dispatch("setToken", null);
927 this.$store.dispatch("Id", null); 931 this.$store.dispatch("Id", null);
928 } 932 }
929 }); 933 });
930 }, 934 },
931 courseTableRow(id) { 935 courseTableRow(id) {
932 this.courseId = id; 936 this.courseId = id;
933 }, 937 },
934 addChapters(item) { 938 addChapters(item) {
935 this.editedIndex = this.CourseDetailsList.indexOf(item); 939 this.editedIndex = this.CourseDetailsList.indexOf(item);
936 this.addChapterItemObj = Object.assign({}, item); 940 this.addChapterItemObj = Object.assign({}, item);
937 this.addChapterItem.courseDetailId = this.addChapterItemObj._id; 941 this.addChapterItem.courseDetailId = this.addChapterItemObj._id;
938 this.addChapterDialog = true; 942 this.addChapterDialog = true;
939 }, 943 },
940 submitChapter() { 944 submitChapter() {
941 this.addChapterItem.chapterPoints = []; 945 this.addChapterItem.chapterPoints = [];
942 for (let i = 0; i < this.findsChapterPoint.length; i++) { 946 for (let i = 0; i < this.findsChapterPoint.length; i++) {
943 this.addChapterItem.chapterPoints.push(this.findsChapterPoint[i].value); 947 this.addChapterItem.chapterPoints.push(this.findsChapterPoint[i].value);
944 } 948 }
945 this.loading = true; 949 this.loading = true;
946 http() 950 http()
947 .put("/addChapters", this.addChapterItem) 951 .put("/addChapters", this.addChapterItem)
948 .then((response) => { 952 .then((response) => {
949 this.addChapterDialog = false; 953 this.addChapterDialog = false;
950 this.loading = false; 954 this.loading = false;
951 this.snackbar = true; 955 this.snackbar = true;
952 this.text = response.data.message; 956 this.text = response.data.message;
953 this.color = "green"; 957 this.color = "green";
954 this.addChapterItem = {}; 958 this.addChapterItem = {};
955 this.removeChapterPoint(); 959 this.removeChapterPoint();
956 this.getCourseDetailsList(); 960 this.getCourseDetailsList();
957 }) 961 })
958 .catch((error) => { 962 .catch((error) => {
959 this.snackbar = true; 963 this.snackbar = true;
960 this.text = error.response.data.message; 964 this.text = error.response.data.message;
961 this.color = "error"; 965 this.color = "error";
962 this.loading = false; 966 this.loading = false;
963 }); 967 });
964 }, 968 },
965 profile(item) { 969 profile(item) {
966 console.log("chaper - ", item); 970 console.log("chaper - ", item);
967 this.editedIndex = this.chapters.indexOf(item); 971 this.editedIndex = this.chapters.indexOf(item);
968 this.editedItem = Object.assign({}, item); 972 this.editedItem = Object.assign({}, item);
969 this.viewProfileGallery = true; 973 this.viewProfileGallery = true;
970 }, 974 },
971 editItem(item) { 975 editItem(item) {
972 this.editedIndex = this.CourseDetailsList.indexOf(item); 976 this.editedIndex = this.CourseDetailsList.indexOf(item);
973 this.editedCourse = Object.assign({}, item); 977 this.editedCourse = Object.assign({}, item);
974 this.editCourseDetailDialog = true; 978 this.editCourseDetailDialog = true;
975 }, 979 },
976 editChapterItem(item) { 980 editChapterItem(item) {
977 this.editedIndex = this.chapters.indexOf(item); 981 this.editedIndex = this.chapters.indexOf(item);
978 this.editChapter = Object.assign({}, item); 982 this.editChapter = Object.assign({}, item);
979 this.updates = []; 983 this.updates = [];
980 for (let i = 0; i < this.editChapter.chapterPoints.length; i++) { 984 for (let i = 0; i < this.editChapter.chapterPoints.length; i++) {
981 this.updates.push({ value: this.editChapter.chapterPoints[i] }); 985 this.updates.push({ value: this.editChapter.chapterPoints[i] });
982 } 986 }
983 this.editChapterDetailDialog = true; 987 this.editChapterDetailDialog = true;
984 }, 988 },
985 deleteItem(item) { 989 deleteItem(item) {
986 let deleteGallery = { 990 let deleteGallery = {
987 courseDetailId: item._id, 991 courseDetailId: item._id,
988 }; 992 };
989 http() 993 http()
990 .delete( 994 .delete(
991 "/deleteCourseDetail", 995 "/deleteCourseDetail",
992 confirm("Are you sure you want to delete this?") && { 996 confirm("Are you sure you want to delete this?") && {
993 params: deleteGallery, 997 params: deleteGallery,
994 headers: { 998 headers: {
995 Authorization: "Bearer " + this.token, 999 Authorization: "Bearer " + this.token,
996 }, 1000 },
997 } 1001 }
998 ) 1002 )
999 .then((response) => { 1003 .then((response) => {
1000 this.snackbar = true; 1004 this.snackbar = true;
1001 this.text = "Successfully delete Course Details"; 1005 this.text = "Successfully delete Course Details";
1002 this.color = "green"; 1006 this.color = "green";
1003 this.getCourseDetailsList(); 1007 this.getCourseDetailsList();
1004 }) 1008 })
1005 .catch((error) => { 1009 .catch((error) => {
1006 // console.log(error); 1010 // console.log(error);
1007 this.snackbar = true; 1011 this.snackbar = true;
1008 this.text = error.response.data.message; 1012 this.text = error.response.data.message;
1009 this.color = "error"; 1013 this.color = "error";
1010 }); 1014 });
1011 }, 1015 },
1012 deleteChapters(item) { 1016 deleteChapters(item) {
1013 // console.log("item", item); 1017 // console.log("item", item);
1014 let deleteChapters = { 1018 let deleteChapters = {
1015 courseDetailId: this.courseId, 1019 courseDetailId: this.courseId,
1016 chapterId: item._id, 1020 chapterId: item._id,
1017 }; 1021 };
1018 http() 1022 http()
1019 .put( 1023 .put(
1020 "/deleteChapters", 1024 "/deleteChapters",
1021 confirm("Are you sure you want to delete this?") && deleteChapters 1025 confirm("Are you sure you want to delete this?") && deleteChapters
1022 ) 1026 )
1023 .then((response) => { 1027 .then((response) => {
1024 this.snackbar = true; 1028 this.snackbar = true;
1025 this.text = "Successfully delete Chapters"; 1029 this.text = "Successfully delete Chapters";
1026 this.color = "green"; 1030 this.color = "green";
1027 this.getCourseDetailsList(); 1031 this.getCourseDetailsList();
1028 }) 1032 })
1029 .catch((error) => { 1033 .catch((error) => {
1030 // console.log(error); 1034 // console.log(error);
1031 this.snackbar = true; 1035 this.snackbar = true;
1032 this.text = error.response.data.message; 1036 this.text = error.response.data.message;
1033 this.color = "error"; 1037 this.color = "error";
1034 }); 1038 });
1035 }, 1039 },
1036 close() { 1040 close() {
1037 this.editCourseDetailDialog = false; 1041 this.editCourseDetailDialog = false;
1038 }, 1042 },
1039 closeProfileGallery() { 1043 closeProfileGallery() {
1040 this.viewProfileGallery = false; 1044 this.viewProfileGallery = false;
1041 }, 1045 },
1042 submit() { 1046 submit() {
1043 let chapters = []; 1047 let chapters = [];
1044 var chapterPoints = []; 1048 var chapterPoints = [];
1045 for (let i = 0; i < this.finds.length; i++) { 1049 for (let i = 0; i < this.finds.length; i++) {
1046 chapterPoints.push(this.finds[i].value); 1050 chapterPoints.push(this.finds[i].value);
1047 // console.log("this.finds[i].value", this.finds[i].value); 1051 // console.log("this.finds[i].value", this.finds[i].value);
1048 chapters = [ 1052 chapters = [
1049 { 1053 {
1050 chapterName: this.addCourseDetail.chapterName, 1054 chapterName: this.addCourseDetail.chapterName,
1051 description: this.addCourseDetail.description, 1055 description: this.addCourseDetail.description,
1052 chapterPoints: chapterPoints, 1056 chapterPoints: chapterPoints,
1053 uploadPdf: this.pdfFile, 1057 uploadPdf: this.pdfFile,
1054 uploadPpt: this.pptFile, 1058 uploadPpt: this.pptFile,
1055 }, 1059 },
1056 ]; 1060 ];
1057 } 1061 }
1058 if (this.$refs.form.validate()) { 1062 if (this.$refs.form.validate()) {
1059 // console.log("this.addCourseDetail", this.addCourseDetail); 1063 // console.log("this.addCourseDetail", this.addCourseDetail);
1060 var courseDetailsData = { 1064 var courseDetailsData = {
1061 classId: this.addCourseDetail.classId, 1065 classId: this.addCourseDetail.classId,
1062 courseId: this.addCourseDetail.courseId, 1066 courseId: this.addCourseDetail.courseId,
1063 chapters: chapters, 1067 chapters: chapters,
1064 }; 1068 };
1065 this.loading = true; 1069 this.loading = true;
1066 http() 1070 http()
1067 .post("/createCourseDetail", courseDetailsData) 1071 .post("/createCourseDetail", courseDetailsData)
1068 .then((response) => { 1072 .then((response) => {
1069 this.addCourseDetailDialog = false; 1073 this.addCourseDetailDialog = false;
1070 this.loading = false; 1074 this.loading = false;
1071 this.snackbar = true; 1075 this.snackbar = true;
1072 this.text = response.data.message; 1076 this.text = response.data.message;
1073 this.color = "green"; 1077 this.color = "green";
1074 this.clear(); 1078 this.clear();
1075 this.trigger = "reset"; 1079 this.trigger = "reset";
1076 this.emptyPdf = "reset"; 1080 this.emptyPdf = "reset";
1077 this.removeAddFind(); 1081 this.removeAddFind();
1078 }) 1082 })
1079 .catch((error) => { 1083 .catch((error) => {
1080 this.snackbar = true; 1084 this.snackbar = true;
1081 this.text = error.response.data.message; 1085 this.text = error.response.data.message;
1082 this.color = "error"; 1086 this.color = "error";
1083 this.loading = false; 1087 this.loading = false;
1084 }); 1088 });
1085 } 1089 }
1086 }, 1090 },
1087 clear() { 1091 clear() {
1088 this.$refs.form.reset(); 1092 this.$refs.form.reset();
1089 }, 1093 },
1090 saveChapter() { 1094 saveChapter() {
1091 this.editedItem.courseDetailId = this.editedItem._id; 1095 this.editedItem.courseDetailId = this.editedItem._id;
1092 // console.log("this.updates", this.updates); 1096 // console.log("this.updates", this.updates);
1093 var chapterPoints = []; 1097 var chapterPoints = [];
1094 for (let i = 0; i < this.updates.length; i++) { 1098 for (let i = 0; i < this.updates.length; i++) {
1095 chapterPoints.push(this.updates[i].value); 1099 chapterPoints.push(this.updates[i].value);
1096 } 1100 }
1097 var updateData = { 1101 var updateData = {
1098 courseDetailId: this.courseId, 1102 courseDetailId: this.courseId,
1099 chapterId: this.editChapter._id, 1103 chapterId: this.editChapter._id,
1100 chapterName: this.editChapter.chapterName, 1104 chapterName: this.editChapter.chapterName,
1101 description: this.editChapter.description, 1105 description: this.editChapter.description,
1102 chapterPoints: chapterPoints, 1106 chapterPoints: chapterPoints,
1103 uploadPdf: this.pdfFile, 1107 uploadPdf: this.pdfFile,
1104 uploadPpt: this.pptFile, 1108 uploadPpt: this.pptFile,
1105 }; 1109 };
1106 this.editLoading = true; 1110 this.editLoading = true;
1107 http() 1111 http()
1108 .put("/updateChapters", updateData) 1112 .put("/updateChapters", updateData)
1109 .then((response) => { 1113 .then((response) => {
1110 this.editChapterDetailDialog = false; 1114 this.editChapterDetailDialog = false;
1111 this.snackbar = true; 1115 this.snackbar = true;
1112 this.text = response.data.message; 1116 this.text = response.data.message;
1113 this.color = "green"; 1117 this.color = "green";
1114 this.editLoading = false; 1118 this.editLoading = false;
1115 // this.removeUpdatePoints(); 1119 // this.removeUpdatePoints();
1116 this.trigger = "reset"; 1120 this.trigger = "reset";
1117 this.emptyPdf = "reset"; 1121 this.emptyPdf = "reset";
1118 this.getCourseDetailsList(); 1122 this.getCourseDetailsList();
1119 }) 1123 })
1120 .catch((error) => { 1124 .catch((error) => {
1121 this.editLoading = false; 1125 this.editLoading = false;
1122 this.snackbar = true; 1126 this.snackbar = true;
1123 this.text = error.response.data.message; 1127 this.text = error.response.data.message;
1124 this.color = "error"; 1128 this.color = "error";
1125 }); 1129 });
1126 }, 1130 },
1127 save() { 1131 save() {
1128 var updateData = { 1132 var updateData = {
1129 courseDetailId: this.editedCourse._id, 1133 courseDetailId: this.editedCourse._id,
1130 courseId: this.editedCourse.courseId, 1134 courseId: this.editedCourse.courseId._id,
1131 classId: this.editedCourse.classId, 1135 classId: this.editedCourse.classId._id,
1132 }; 1136 };
1133 this.editLoading = true; 1137 this.editLoading = true;
1134 http() 1138 http()
1135 .put("/updateCourseDetail", updateData) 1139 .put("/updateCourseDetail", updateData)
1136 .then((response) => { 1140 .then((response) => {
1137 this.getCourseDetailsList(); 1141 this.getCourseDetailsList();
1138 this.editCourseDetailDialog = false; 1142 this.editCourseDetailDialog = false;
1139 this.snackbar = true; 1143 this.snackbar = true;
1140 this.text = response.data.message; 1144 this.text = response.data.message;
1141 this.color = "green"; 1145 this.color = "green";
1142 this.editLoading = false; 1146 this.editLoading = false;
1143 // this.editChapterPointName = ""; 1147 // this.editChapterPointName = "";
1144 this.editFiles = []; 1148 this.editFiles = [];
1145 }) 1149 })
1146 .catch((error) => { 1150 .catch((error) => {
1147 this.editLoading = false; 1151 this.editLoading = false;
1148 this.snackbar = true; 1152 this.snackbar = true;
1149 this.text = error.response.data.message; 1153 this.text = error.response.data.message;
1150 this.color = "error"; 1154 this.color = "error";
1151 }); 1155 });
1152 }, 1156 },
1153 getAllClasses() { 1157 getAllClasses() {
1154 http() 1158 http()
1155 .get("/getClassesList", { 1159 .get("/getClassesList", {
1156 headers: { Authorization: "Bearer " + this.token }, 1160 headers: { Authorization: "Bearer " + this.token },
1157 }) 1161 })
1158 .then((response) => { 1162 .then((response) => {
1159 this.addclass = response.data.data; 1163 this.addclass = response.data.data;
1160 }) 1164 })
1161 .catch((err) => { 1165 .catch((err) => {
1162 // console.log("err====>", err); 1166 // console.log("err====>", err);
1163 }); 1167 });
1164 }, 1168 },
1165 removeChapterPoint: function () { 1169 removeChapterPoint: function () {
1166 this.findsChapterPoint = [{ value: "" }]; 1170 this.findsChapterPoint = [{ value: "" }];
1167 }, 1171 },
1168 removeAddFind: function () { 1172 removeAddFind: function () {
1169 this.finds = [{ value: "" }]; 1173 this.finds = [{ value: "" }];
1170 }, 1174 },
1171 addFind: function () { 1175 addFind: function () {
1172 this.finds.push({ value: "" }); 1176 this.finds.push({ value: "" });
src/pages/Report/admitCard.vue
1 <template> 1 <template>
2 <v-container fluid class="body-color"> 2 <v-container fluid class="body-color">
3 <!-- **** Admit Card Table **** --> 3 <!-- **** Admit Card Table **** -->
4 <v-card flat class="elevation-0 transparent"> 4 <v-card flat class="elevation-0 transparent">
5 <v-form ref="form" v-model="valid" lazy-validation> 5 <v-form ref="form" v-model="valid" lazy-validation>
6 <v-flex xs12 sm12 lg12> 6 <v-flex xs12 sm12 lg12>
7 <v-layout wrap> 7 <v-layout wrap>
8 <v-flex xs12 sm12 lg3> 8 <v-flex xs12 sm12 lg3>
9 <v-layout> 9 <v-layout>
10 <v-flex xs12 sm12 lg10 class="ml-2"> 10 <v-flex xs12 sm12 lg10 class="ml-2">
11 <v-autocomplete 11 <v-autocomplete
12 v-model="getReport.examId" 12 v-model="getReport.examId"
13 label="Please Select Exam" 13 label="Please Select Exam"
14 :items="examData" 14 :items="examData"
15 item-text="examName" 15 item-text="examName"
16 item-value="_id" 16 item-value="_id"
17 :rules="examRules" 17 :rules="examRules"
18 @change="getExamList" 18 @change="getExamList"
19 required 19 required
20 ></v-autocomplete> 20 ></v-autocomplete>
21 </v-flex> 21 </v-flex>
22 </v-layout> 22 </v-layout>
23 </v-flex> 23 </v-flex>
24 24
25 <v-flex xs12 sm12 lg3 v-if="getReport.examId"> 25 <v-flex xs12 sm12 lg3 v-if="getReport.examId">
26 <v-layout> 26 <v-layout>
27 <v-flex xs12 sm12 lg10 class="ml-2"> 27 <v-flex xs12 sm12 lg10 class="ml-2">
28 <v-select 28 <v-select
29 v-model="getReport.classId" 29 v-model="getReport.classId"
30 label="Select your class" 30 label="Select your class"
31 type="text" 31 type="text"
32 :items="classList" 32 :items="classList"
33 item-text="classNum" 33 item-text="classNum"
34 item-value="_id" 34 item-value="_id"
35 :rules="classRules" 35 :rules="classRules"
36 @change="getSections(getReport.classId)" 36 @change="getSections(getReport.classId)"
37 required 37 required
38 ></v-select> 38 ></v-select>
39 </v-flex> 39 </v-flex>
40 </v-layout> 40 </v-layout>
41 </v-flex> 41 </v-flex>
42 <v-flex xs12 sm12 lg3 v-if="getReport.classId"> 42 <v-flex xs12 sm12 lg3 v-if="getReport.classId">
43 <v-layout> 43 <v-layout>
44 <v-flex xs12 sm12 lg10 class="ml-2"> 44 <v-flex xs12 sm12 lg10 class="ml-2">
45 <v-select 45 <v-select
46 :items="addSection" 46 :items="addSection"
47 label="Select your Section" 47 label="Select your Section"
48 v-model="getReport.sectionId" 48 v-model="getReport.sectionId"
49 item-text="name" 49 item-text="name"
50 item-value="_id" 50 item-value="_id"
51 name="Select Section" 51 name="Select Section"
52 @change="getStudents" 52 @change="getStudents"
53 :rules="sectionRules" 53 :rules="sectionRules"
54 required 54 required
55 ></v-select> 55 ></v-select>
56 </v-flex> 56 </v-flex>
57 </v-layout> 57 </v-layout>
58 </v-flex> 58 </v-flex>
59 <v-flex xs12 sm12 lg3 v-if="getReport.sectionId"> 59 <v-flex xs12 sm12 lg3 v-if="getReport.sectionId">
60 <v-layout> 60 <v-layout>
61 <v-flex xs12 sm12 lg10 class="ml-2"> 61 <v-flex xs12 sm12 lg10 class="ml-2">
62 <v-select 62 <v-select
63 :items="getStudentsList" 63 :items="getStudentsList"
64 label="Select your student" 64 label="Select your student"
65 v-model="getReport.studentId" 65 v-model="getReport.studentId"
66 item-text="name" 66 item-text="name"
67 item-value="_id" 67 item-value="_id"
68 :rules="studentRules" 68 :rules="studentRules"
69 required 69 required
70 ></v-select> 70 ></v-select>
71 </v-flex> 71 </v-flex>
72 </v-layout> 72 </v-layout>
73 </v-flex> 73 </v-flex>
74 74
75 <v-flex xs12 sm12 lg3> 75 <v-flex xs12 sm12 lg3>
76 <v-layout> 76 <v-layout>
77 <v-flex xs12 sm12 lg10 class="ml-2"> 77 <v-flex xs12 sm12 lg10 class="ml-2">
78 <v-autocomplete 78 <v-autocomplete
79 label="Please Select View Type" 79 label="Please Select View Type"
80 type="text" 80 type="text"
81 :rules="typeRules" 81 :rules="typeRules"
82 :items="typeList" 82 :items="typeList"
83 v-model="getReport.form" 83 v-model="getReport.form"
84 item-text="name" 84 item-text="name"
85 item-value="value" 85 item-value="value"
86
87 required 86 required
88 ></v-autocomplete> 87 ></v-autocomplete>
89 </v-flex> 88 </v-flex>
90 </v-layout> 89 </v-layout>
91 </v-flex> 90 </v-flex>
92 <v-flex xs12 sm12 lg3> 91 <v-flex xs12 sm12 lg3>
93 <v-btn 92 <v-btn
94 @click="getSchedule" 93 @click="getSchedule"
95 round 94 round
96 dark 95 dark
97 :loading="loading" 96 :loading="loading"
98 class="open-dialog-button mt-3" 97 class="open-dialog-button mt-3"
99 >Get Report</v-btn> 98 >Get Report</v-btn>
100 </v-flex> 99 </v-flex>
101 </v-layout> 100 </v-layout>
102 </v-flex> 101 </v-flex>
103 </v-form> 102 </v-form>
104 </v-card> 103 </v-card>
105 <div v-show="showTable"> 104 <div v-show="showTable">
106 <v-flex xs12 sm12 md10 style="margin:auto"> 105 <v-flex xs12 sm12 md10 style="margin:auto">
107 <v-layout> 106 <v-layout>
108 <v-flex xs12> 107 <v-flex xs12>
109 <v-btn class="open-dialog-button right" round dark @click="printAdmitReport()"> 108 <v-btn class="open-dialog-button right" round dark @click="printAdmitReport()">
110 Print 109 Print
111 <v-icon right dark>print</v-icon> 110 <v-icon right dark>print</v-icon>
112 </v-btn> 111 </v-btn>
113 </v-flex> 112 </v-flex>
114 </v-layout> 113 </v-layout>
115 <div id="printMe" v-if="frontPart"> 114 <div id="printMe" v-if="frontPart">
116 <v-card 115 <v-card
117 style=" 116 style="
118 background-color: #fff; 117 background-color: #fff;
119 border: 1px solid #ddd; 118 border: 1px solid #ddd;
120 color: rgba(0,0,0,0.87); 119 color: rgba(0,0,0,0.87);
121 overflow-x: auto; 120 overflow-x: auto;
122 display: block; 121 display: block;
123 padding:14px !important; 122 padding:14px !important;
124 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; 123 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;
125 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;" 124 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;"
126 > 125 >
127 <v-layout style="border-bottom: 1px solid #ddd;margin: 8px; auto"> 126 <v-layout style="border-bottom: 1px solid #ddd;margin: 8px; auto">
128 <v-flex xs3 style="margin-bottom:0px"> 127 <v-flex xs3 style="margin-bottom:0px">
129 <img 128 <img
130 :src="userData.schoolLogoUrl" 129 :src="userData.schoolLogoUrl"
131 style="widht:80px;height:80px;" 130 style="widht:80px;height:80px;"
132 alt="logo" 131 alt="logo"
133 v-if="userData.schoolLogoUrl" 132 v-if="userData.schoolLogoUrl"
134 /> 133 />
135 <img 134 <img
136 src="/static/default_thumb.png" 135 src="/static/default_thumb.png"
137 style="widht:80px;height:80px;" 136 style="widht:80px;height:80px;"
138 v-else-if="!userData.schoolLogoUrl" 137 v-else-if="!userData.schoolLogoUrl"
139 /> 138 />
140 </v-flex> 139 </v-flex>
141 <v-flex xs5 style="text-align:center;margin-bottom:0px"> 140 <v-flex xs5 style="text-align:center;margin-bottom:0px">
142 <p 141 <p
143 style="font-size:24px;color: #700CE8;letter-spacing:1px;margin-bottom: 4px" 142 style="font-size:24px;color: #700CE8;letter-spacing:1px;margin-bottom: 4px"
144 >{{ userData.name }}</p> 143 >{{ userData.name }}</p>
145 <p>{{ userData.address }}, {{ userData.pinCode }}</p> 144 <p>{{ userData.address }} {{ userData.pinCode }}</p>
146 <div> 145 <div>
147 <h4>{{ getScheduleList.scheduleData[0].examId.examName }} Exam Admit Card</h4> 146 <h4>{{ getScheduleList.scheduleData[0].examId.examName }} Exam Admit Card</h4>
148 </div> 147 </div>
149 </v-flex> 148 </v-flex>
150 <v-flex xs4 style="text-align:center;margin-bottom:0px"> 149 <v-flex xs4 style="text-align:center;margin-bottom:0px">
151 <!-- <img 150 <!-- <img
152 v-if="getScheduleList.studentData.profilePicUrl" 151 v-if="getScheduleList.studentData.profilePicUrl"
153 :src="getScheduleList.studentData.profilePicUrl" 152 :src="getScheduleList.studentData.profilePicUrl"
154 style="widht:80px;height:80px;" 153 style="widht:80px;height:80px;"
155 /> 154 />
156 <img 155 <img
157 v-if="!getScheduleList.studentData.profilePicUrl" 156 v-if="!getScheduleList.studentData.profilePicUrl"
158 src="/static/icon/user.png" 157 src="/static/icon/user.png"
159 style="widht:80px;" 158 style="widht:80px;"
160 /> --> 159 />-->
161 <img 160 <img
162 src="/static/icon/user.png" 161 src="/static/icon/user.png"
163 v-if="!getScheduleList.studentData.profilePicUrl" 162 v-if="!getScheduleList.studentData.profilePicUrl"
164 width="80" 163 width="80"
165 /> 164 />
166 <img 165 <img
167 :src="getScheduleList.studentData.profilePicUrl" 166 :src="getScheduleList.studentData.profilePicUrl"
168 onerror="this.src='/static/icon/user.png';" 167 onerror="this.src='/static/icon/user.png';"
169 v-if="getScheduleList.studentData.profilePicUrl" 168 v-if="getScheduleList.studentData.profilePicUrl"
170 width="80" 169 width="80"
171 /> 170 />
172 </v-flex> 171 </v-flex>
173 </v-layout> 172 </v-layout>
174 <v-layout> 173 <v-layout>
175 <v-flex xs5 style="margin-bottom:10px"> 174 <v-flex xs5 style="margin-bottom:10px">
176 <p style="font-size: 16px;margin:0px;margin-bottom:8px;"> 175 <p style="font-size: 16px;margin:0px;margin-bottom:8px;">
177 <b>Name :</b> 176 <b>Name :</b>
178 <span>{{getScheduleList.studentData.name}}</span> 177 <span>{{getScheduleList.studentData.name}}</span>
179 </p> 178 </p>
180 <p style="font-size: 16px;margin:0px;margin-bottom:8px;"> 179 <p style="font-size: 16px;margin:0px;margin-bottom:8px;">
181 <b>Class :</b> 180 <b>Class :</b>
182 <span>{{getScheduleList.studentData.classId.classNum}}</span> 181 <span>{{getScheduleList.studentData.classId.classNum}}</span>
183 </p> 182 </p>
184 <p style="font-size: 16px;margin:0px;margin-bottom:8px;"> 183 <p style="font-size: 16px;margin:0px;margin-bottom:8px;">
185 <b>Roll :</b> 184 <b>Roll :</b>
186 <span>{{getScheduleList.studentData.rollNo}}</span> 185 <span>{{getScheduleList.studentData.rollNo}}</span>
187 </p> 186 </p>
188 </v-flex> 187 </v-flex>
189 <v-flex xs5 style="margin-bottom:10px"> 188 <v-flex xs5 style="margin-bottom:10px">
190 <p style="font-size: 16px;margin:0px;margin-bottom:8px;"> 189 <p style="font-size: 16px;margin:0px;margin-bottom:8px;">
191 <b>Section :</b> 190 <b>Section :</b>
192 <span>{{getScheduleList.studentData.sectionId.name }}</span> 191 <span>{{getScheduleList.studentData.sectionId.name }}</span>
193 </p> 192 </p>
194 <p style="font-size: 16px;margin:0px;margin-bottom:8px;"> 193 <p style="font-size: 16px;margin:0px;margin-bottom:8px;">
195 <b>Blood Group :</b> 194 <b>Blood Group :</b>
196 <span style="color: #707478">{{getScheduleList.studentData.bloodGroup }}</span> 195 <span style="color: #707478">{{getScheduleList.studentData.bloodGroup }}</span>
197 </p> 196 </p>
198 <p style="font-size: 16px;margin:0px;margin-bottom:8px;">Subject in which Appearing</p> 197 <p style="font-size: 16px;margin:0px;margin-bottom:8px;">Subject in which Appearing</p>
199 </v-flex> 198 </v-flex>
200 </v-layout> 199 </v-layout>
201 <table 200 <table
202 class="mb-5 tableRsponsive feeTypeTable" 201 class="mb-5 tableRsponsive feeTypeTable"
203 style="border: 1px solid lightgrey; 202 style="border: 1px solid lightgrey;
204 border-collapse: collapse;!important 203 border-collapse: collapse;!important
205 table-layout: auto !important; 204 table-layout: auto !important;
206 width: 100% !important;" 205 width: 100% !important;"
207 > 206 >
208 <thead style="border: 1px solid lightgrey !important;"> 207 <thead style="border: 1px solid lightgrey !important;">
209 <tr style="border: 1px solid lightgrey !important;padding:4px;"> 208 <tr style="border: 1px solid lightgrey !important;padding:4px;">
210 <td style="border: 1px solid lightgrey !important;padding: 6px;">No</td> 209 <td style="border: 1px solid lightgrey !important;padding: 6px;">No</td>
211 <td style="border: 1px solid lightgrey !important;padding: 6px;">Exam Date</td> 210 <td style="border: 1px solid lightgrey !important;padding: 6px;">Exam Date</td>
212 <td style="border: 1px solid lightgrey !important;padding: 6px;">Start Time</td> 211 <td style="border: 1px solid lightgrey !important;padding: 6px;">Start Time</td>
213 <td style="border: 1px solid lightgrey !important;padding: 6px;">End Time</td> 212 <td style="border: 1px solid lightgrey !important;padding: 6px;">End Time</td>
214 <td style="border: 1px solid lightgrey !important;padding: 6px;">Subject Name</td> 213 <td style="border: 1px solid lightgrey !important;padding: 6px;">Subject Name</td>
215 </tr> 214 </tr>
216 </thead> 215 </thead>
217 <tbody style="border: 1px solid lightgrey !important;"> 216 <tbody style="border: 1px solid lightgrey !important;">
218 <tr v-for="(scheduleData,i) in getScheduleList.scheduleData" :key="i"> 217 <tr v-for="(scheduleData,i) in getScheduleList.scheduleData" :key="i">
219 <td style="border:1px solid lightgrey !important; padding:6px;">{{ i + 1 }}</td> 218 <td style="border:1px solid lightgrey !important; padding:6px;">{{ i + 1 }}</td>
220 <td 219 <td
221 style="border: 1px solid lightgrey !important;padding: 6px;" 220 style="border: 1px solid lightgrey !important;padding: 6px;"
222 >{{ scheduleData.date ? scheduleData.date : '-' }}</td> 221 >{{ scheduleData.date ? scheduleData.date : '-' }}</td>
223 <td 222 <td
224 style="border: 1px solid lightgrey !important;padding: 6px;" 223 style="border: 1px solid lightgrey !important;padding: 6px;"
225 >{{ scheduleData.timeFrom ? scheduleData.timeFrom : "-" }}</td> 224 >{{ scheduleData.timeFrom ? scheduleData.timeFrom : "-" }}</td>
226 <td 225 <td
227 style="border: 1px solid lightgrey !important;padding: 6px;" 226 style="border: 1px solid lightgrey !important;padding: 6px;"
228 >{{ scheduleData.timeTo ? scheduleData.timeTo : "-"}}</td> 227 >{{ scheduleData.timeTo ? scheduleData.timeTo : "-"}}</td>
229 <td 228 <td
230 style="border: 1px solid lightgrey !important;padding: 6px;" 229 style="border: 1px solid lightgrey !important;padding: 6px;"
231 >{{ scheduleData.subjectName ? scheduleData.subjectName : "-" }}</td> 230 >{{ scheduleData.subjectName ? scheduleData.subjectName : "-" }}</td>
232 </tr> 231 </tr>
233 <tr v-if="getScheduleList.scheduleData.length === 0"> 232 <tr v-if="getScheduleList.scheduleData.length === 0">
234 <td style="border: 1px soild lightgrey !importand;padding:6px;">-</td> 233 <td style="border: 1px soild lightgrey !importand;padding:6px;">-</td>
235 <td style="border: 1px solid lightgrey !important;padding: 6px;">-</td> 234 <td style="border: 1px solid lightgrey !important;padding: 6px;">-</td>
236 <td style="border: 1px solid lightgrey !important;padding: 6px;">-</td> 235 <td style="border: 1px solid lightgrey !important;padding: 6px;">-</td>
237 <td style="border: 1px solid lightgrey !important;padding: 6px;">-</td> 236 <td style="border: 1px solid lightgrey !important;padding: 6px;">-</td>
238 <td style="border: 1px solid lightgrey !important;padding: 6px;">-</td> 237 <td style="border: 1px solid lightgrey !important;padding: 6px;">-</td>
239 </tr> 238 </tr>
240 </tbody> 239 </tbody>
241 </table> 240 </table>
242 </v-card> 241 </v-card>
243 </div> 242 </div>
244 <div id="printMe" v-if="backPart"> 243 <div id="printMe" v-if="backPart">
245 <v-card 244 <v-card
246 style=" 245 style="
247 text-align:center 246 text-align:center
248 background-color: #fff; 247 background-color: #fff;
249 border: 1px solid #ddd; 248 border: 1px solid #ddd;
250 color: rgba(0,0,0,0.87); 249 color: rgba(0,0,0,0.87);
251 overflow-x: auto; 250 overflow-x: auto;
252 display: block; 251 display: block;
253 padding:14px !important; 252 padding:14px !important;
254 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; 253 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;
255 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;" 254 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;"
256 > 255 >
257 <div 256 <div
258 style=" 257 style="
259 margin-bottom: 16px; 258 margin-bottom: 16px;
260 overflow: hidden; 259 overflow: hidden;
261 padding: 50px 90px;" 260 padding: 50px 90px;"
262 > 261 >
263 <ol style=" 262 <ol style="
264 margin: 0; 263 margin: 0;
265 margin-bottom: 10px;"> 264 margin-bottom: 10px;">
266 <p 265 <p
267 style=" 266 style="
268 margin-bottom: 16px; 267 margin-bottom: 16px;
269 line-height: 20px; 268 line-height: 20px;
270 text-align: left;" 269 text-align: left;"
271 > 270 >
272 <b>1. Do not Carry these Electronic Gadgets:</b> 271 <b>1. Do not Carry these Electronic Gadgets:</b>
273 Electronic gadgets(Bluetooth devices,head phones,pen/buttonhole cameras,scanner,calculator,storage devices etc) 272 Electronic gadgets(Bluetooth devices,head phones,pen/buttonhole cameras,scanner,calculator,storage devices etc)
274 in the examination lab. These items are strictly prohibited from examination lab. 273 in the examination lab. These items are strictly prohibited from examination lab.
275 </p> 274 </p>
276 <p 275 <p
277 style=" 276 style="
278 margin-bottom: 16px; 277 margin-bottom: 16px;
279 line-height: 20px; 278 line-height: 20px;
280 text-align: left;" 279 text-align: left;"
281 > 280 >
282 <b>2. Do not Carry these Ornaments:</b> 281 <b>2. Do not Carry these Ornaments:</b>
283 Candidates should also not wear charms,veil,items containing such as rings,bracelet,earings,nose-pin,chains, 282 Candidates should also not wear charms,veil,items containing such as rings,bracelet,earings,nose-pin,chains,
284 necklace,pendants,badge,broach,hair-pin,hair-band. 283 necklace,pendants,badge,broach,hair-pin,hair-band.
285 </p> 284 </p>
286 <p 285 <p
287 style=" 286 style="
288 margin-bottom: 16px; 287 margin-bottom: 16px;
289 line-height: 20px; 288 line-height: 20px;
290 text-align: left;" 289 text-align: left;"
291 > 290 >
292 <b>3. What Candidates wear to Examination hall:</b> 291 <b>3. What Candidates wear to Examination hall:</b>
293 Candidates should not wear clothes with full sleeves or big button,etc. Candidates are adviced to wear open footwear 292 Candidates should not wear clothes with full sleeves or big button,etc. Candidates are adviced to wear open footwear
294 like slippers,sandals instead of shoes as the candidates could be asked to remove shoes by the frisking staff. 293 like slippers,sandals instead of shoes as the candidates could be asked to remove shoes by the frisking staff.
295 </p> 294 </p>
296 <p 295 <p
297 style=" 296 style="
298 margin-bottom: 16px; 297 margin-bottom: 16px;
299 line-height: 20px; 298 line-height: 20px;
300 text-align: left;" 299 text-align: left;"
301 > 300 >
302 <b>4. Do not carry Stationary:</b> 301 <b>4. Do not carry Stationary:</b>
303 Pen/pencil and paper for rough work would be provided in examination lab. Electronic watch (timer)will be available 302 Pen/pencil and paper for rough work would be provided in examination lab. Electronic watch (timer)will be available
304 on the computer screen alloted to the candidates. 303 on the computer screen alloted to the candidates.
305 </p> 304 </p>
306 <p 305 <p
307 style=" 306 style="
308 margin-bottom: 16px; 307 margin-bottom: 16px;
309 line-height: 20px; 308 line-height: 20px;
310 text-align: left;" 309 text-align: left;"
311 > 310 >
312 <b>5. Do not Carry Bags:</b> 311 <b>5. Do not Carry Bags:</b>
313 Don not Carry back pack, College bag or any other bag like hand bag. If candidates brings any bag, they must make a 312 Don not Carry back pack, College bag or any other bag like hand bag. If candidates brings any bag, they must make a
314 arrangement for safe custody of these items.The Commission shall not make any arrangement nor be responsible for the 313 arrangement for safe custody of these items.The Commission shall not make any arrangement nor be responsible for the
315 safe custody of such items. 314 safe custody of such items.
316 </p> 315 </p>
317 <p 316 <p
318 style=" 317 style="
319 margin-bottom: 16px; 318 margin-bottom: 16px;
320 line-height: 20px; 319 line-height: 20px;
321 text-align: left;" 320 text-align: left;"
322 > 321 >
323 <b>6. What will Happen if you carry Prohibited items to Exam Hall:</b> 322 <b>6. What will Happen if you carry Prohibited items to Exam Hall:</b>
324 If any such prohibited item is found in the possession of a candidate in examination lab, his/her candidature is liable 323 If any such prohibited item is found in the possession of a candidate in examination lab, his/her candidature is liable
325 to be canceled and legal/criminal proceedings could be initiated against him/her. He/she would also liable to be debarred 324 to be canceled and legal/criminal proceedings could be initiated against him/her. He/she would also liable to be debarred
326 from appearing in future examinations of the Commission for a period of 3 years. 325 from appearing in future examinations of the Commission for a period of 3 years.
327 </p> 326 </p>
328 <p 327 <p
329 style=" 328 style="
330 margin-bottom: 16px; 329 margin-bottom: 16px;
331 line-height: 20px; 330 line-height: 20px;
332 text-align: left; 331 text-align: left;
333 " 332 "
334 > 333 >
335 <b>7. Candidate should not create Disturbance in Exam Hall:</b> 334 <b>7. Candidate should not create Disturbance in Exam Hall:</b>
336 If any candidate is found obstructing the conduct of examination or creating disturbances at the examination venue, 335 If any candidate is found obstructing the conduct of examination or creating disturbances at the examination venue,
337 his/her candidature shall be summarily canceled. 336 his/her candidature shall be summarily canceled.
338 </p> 337 </p>
339 </ol> 338 </ol>
340 </div> 339 </div>
341 </v-card> 340 </v-card>
342 </div> 341 </div>
343 </v-flex> 342 </v-flex>
344 </div> 343 </div>
345 <v-snackbar 344 <v-snackbar
346 :timeout="timeout" 345 :timeout="timeout"
347 :top="y === 'top'" 346 :top="y === 'top'"
348 :right="x === 'right'" 347 :right="x === 'right'"
349 :vertical="mode === 'vertical'" 348 :vertical="mode === 'vertical'"
350 v-model="snackbar" 349 v-model="snackbar"
351 :color="color" 350 :color="color"
352 >{{ text }}</v-snackbar> 351 >{{ text }}</v-snackbar>
353 <div class="loader" v-if="showLoader"> 352 <div class="loader" v-if="showLoader">
354 <v-progress-circular indeterminate color="white"></v-progress-circular> 353 <v-progress-circular indeterminate color="white"></v-progress-circular>
355 </div> 354 </div>
356 </v-container> 355 </v-container>
357 </template> 356 </template>
358 <script> 357 <script>
359 import http from "@/Services/http.js"; 358 import http from "@/Services/http.js";
360 import moment from "moment"; 359 import moment from "moment";
361 import _ from "underscore"; 360 import _ from "underscore";
362 361
363 export default { 362 export default {
364 data: () => ({ 363 data: () => ({
365 snackbar: false, 364 snackbar: false,
366 color: "", 365 color: "",
367 y: "top", 366 y: "top",
368 x: "right", 367 x: "right",
369 mode: "", 368 mode: "",
370 timeout: 10000, 369 timeout: 10000,
371 text: "", 370 text: "",
372 showLoader: false, 371 showLoader: false,
373 valid: true, 372 valid: true,
374 userData: {}, 373 userData: {},
375 frontPart: false, 374 frontPart: false,
376 backPart: false, 375 backPart: false,
377 loading: false, 376 loading: false,
378 showTable: false, 377 showTable: false,
379 showData: false, 378 showData: false,
380 hideprintAdmitReport: false, 379 hideprintAdmitReport: false,
381 examRules: [v => !!v || "Exam Field is required"], 380 examRules: [(v) => !!v || "Exam Field is required"],
382 classRules: [v => !!v || "Class Field Required"], 381 classRules: [(v) => !!v || "Class Field Required"],
383 sectionRules: [v => !!v || "Section Field is required"], 382 sectionRules: [(v) => !!v || "Section Field is required"],
384 studentRules: [v => !!v || "Student Field is required"], 383 studentRules: [(v) => !!v || "Student Field is required"],
385 typeRules: [v => !!v || "Type Field is required"], 384 typeRules: [(v) => !!v || "Type Field is required"],
386 backgroundRules: [v => !!v || "Background Field is required"], 385 backgroundRules: [(v) => !!v || "Background Field is required"],
387 386
388 pagination: { 387 pagination: {
389 rowsPerPage: 10 388 rowsPerPage: 10,
390 }, 389 },
391 search: "", 390 search: "",
392 391
393 classList: [], 392 classList: [],
394 studentData: {}, 393 studentData: {},
395 scheduleData: {}, 394 scheduleData: {},
396 examData: [], 395 examData: [],
397 addSection: [], 396 addSection: [],
398 getStudentsList: [], 397 getStudentsList: [],
399 getScheduleList: [], 398 getScheduleList: [],
400 getScheduleListArray: [], 399 getScheduleListArray: [],
401 getReport: {}, 400 getReport: {},
402 examName: [], 401 examName: [],
403 typeList: [ 402 typeList: [
404 { 403 {
405 name: "Front Part", 404 name: "Front Part",
406 value: "frontPart" 405 value: "frontPart",
407 }, 406 },
408 { 407 {
409 name: "Back Part", 408 name: "Back Part",
410 value: "backPart" 409 value: "backPart",
411 } 410 },
412 ], 411 ],
413 backgroundList: ["Yes", "No"], 412 backgroundList: ["Yes", "No"],
414 headers: [ 413 headers: [
415 { 414 {
416 text: "No", 415 text: "No",
417 align: "", 416 align: "",
418 sortable: false, 417 sortable: false,
419 value: "No" 418 value: "No",
420 }, 419 },
421 { 420 {
422 text: "Exam Date", 421 text: "Exam Date",
423 align: "center", 422 align: "center",
424 sortable: false, 423 sortable: false,
425 value: "date" 424 value: "date",
426 }, 425 },
427 { 426 {
428 text: "Start Time", 427 text: "Start Time",
429 align: "center", 428 align: "center",
430 sortable: false, 429 sortable: false,
431 value: "timeFrom" 430 value: "timeFrom",
432 }, 431 },
433 { 432 {
434 text: "End Time", 433 text: "End Time",
435 align: "center", 434 align: "center",
436 sortable: false, 435 sortable: false,
437 value: "timeTo" 436 value: "timeTo",
438 }, 437 },
439 { 438 {
440 text: "Subject Name", 439 text: "Subject Name",
441 align: "center", 440 align: "center",
442 sortable: false, 441 sortable: false,
443 value: "subjectName" 442 value: "subjectName",
444 } 443 },
445 ] 444 ],
446 }), 445 }),
447 446
448 mounted() { 447 mounted() {
449 this.token = this.$store.state.token; 448 this.token = this.$store.state.token;
450 this.getClass(); 449 this.getClass();
451 this.getExamList(); 450 this.getExamList();
452 this.getUserData(); 451 this.getUserData();
453 }, 452 },
454 453
455 methods: { 454 methods: {
456 getExamList() { 455 getExamList() {
457 this.showLoader = true; 456 this.showLoader = true;
458 this.loadingSearch = true; 457 this.loadingSearch = true;
459 http() 458 http()
460 .get("/getExamsList", { 459 .get("/getExamsList", {
461 headers: { Authorization: "Bearer " + this.token } 460 headers: { Authorization: "Bearer " + this.token },
462 }) 461 })
463 .then(response => { 462 .then((response) => {
464 this.examData = response.data.data; 463 this.examData = response.data.data;
465 this.showLoader = false; 464 this.showLoader = false;
466 this.loadingSearch = false; 465 this.loadingSearch = false;
467 }) 466 })
468 .catch(error => { 467 .catch((error) => {
469 this.showLoader = false; 468 this.showLoader = false;
470 this.loadingSearch = false; 469 this.loadingSearch = false;
471 this.snackbar = true; 470 this.snackbar = true;
472 this.text = error.response.data.message; 471 this.text = error.response.data.message;
473 if (error.response.status === 401) { 472 if (error.response.status === 401) {
474 this.$router.replace({ path: "/" }); 473 this.$router.replace({ path: "/" });
475 this.$store.dispatch("setToken", null); 474 this.$store.dispatch("setToken", null);
476 this.$store.dispatch("Id", null); 475 this.$store.dispatch("Id", null);
477 } 476 }
478 }); 477 });
479 }, 478 },
480 getClass() { 479 getClass() {
481 this.showLoader = true; 480 this.showLoader = true;
482 http() 481 http()
483 .get("/getClassesList", { 482 .get("/getClassesList", {
484 headers: { Authorization: "Bearer " + this.token } 483 headers: { Authorization: "Bearer " + this.token },
485 }) 484 })
486 .then(response => { 485 .then((response) => {
487 this.classList = response.data.data; 486 this.classList = response.data.data;
488 this.showLoader = false; 487 this.showLoader = false;
489 }) 488 })
490 .catch(error => { 489 .catch((error) => {
491 this.showLoader = false; 490 this.showLoader = false;
492 // console.log("err====>", err); 491 // console.log("err====>", err);
493 }); 492 });
494 }, 493 },
495 getSections(_id) { 494 getSections(_id) {
496 this.showLoader = true; 495 this.showLoader = true;
497 http() 496 http()
498 .get( 497 .get(
499 "/getSectionsList", 498 "/getSectionsList",
500 { params: { classId: _id } }, 499 { params: { classId: _id } },
501 { 500 {
502 headers: { Authorization: "Bearer " + this.token } 501 headers: { Authorization: "Bearer " + this.token },
503 } 502 }
504 ) 503 )
505 .then(response => { 504 .then((response) => {
506 this.addSection = response.data.data; 505 this.addSection = response.data.data;
507 this.showLoader = false; 506 this.showLoader = false;
508 }) 507 })
509 .catch(err => { 508 .catch((err) => {
510 this.showLoader = false; 509 this.showLoader = false;
511 // console.log("err====>", err); 510 // console.log("err====>", err);
512 }); 511 });
513 }, 512 },
514 getStudents() { 513 getStudents() {
515 this.showLoader = true; 514 this.showLoader = true;
516 http() 515 http()
517 .get("/getStudentWithClass", { 516 .get("/getStudentWithClass", {
518 params: { 517 params: {
519 classId: this.getReport.classId, 518 classId: this.getReport.classId,
520 sectionId: this.getReport.sectionId 519 sectionId: this.getReport.sectionId,
521 } 520 },
522 }) 521 })
523 .then(response => { 522 .then((response) => {
524 this.getStudentsList = response.data.data; 523 this.getStudentsList = response.data.data;
525 this.showLoader = false; 524 this.showLoader = false;
526 }) 525 })
527 .catch(error => { 526 .catch((error) => {
528 console.log("err====>", error); 527 console.log("err====>", error);
529 this.showLoader = false; 528 this.showLoader = false;
530 }); 529 });
531 }, 530 },
532 getSchedule() { 531 getSchedule() {
533 if (this.$refs.form.validate()) { 532 if (this.$refs.form.validate()) {
534 this.showLoader = true; 533 this.showLoader = true;
535 http() 534 http()
536 .get("/getScheduleForParticularStudent", { 535 .get("/getScheduleForParticularStudent", {
537 params: { 536 params: {
538 examId: this.getReport.examId, 537 examId: this.getReport.examId,
539 classId: this.getReport.classId, 538 classId: this.getReport.classId,
540 sectionId: this.getReport.sectionId, 539 sectionId: this.getReport.sectionId,
541 studentId: this.getReport.studentId 540 studentId: this.getReport.studentId,
542 } 541 },
543 }) 542 })
544 .then(response => { 543 .then((response) => {
545 this.showTable = true; 544 this.showTable = true;
546 this.getScheduleList = response.data.data; 545 this.getScheduleList = response.data.data;
547 if (response.data.data.scheduleData.length === 0) { 546 if (response.data.data.scheduleData.length === 0) {
548 this.showLoader = false; 547 this.showLoader = false;
549 this.snackbar = true; 548 this.snackbar = true;
550 this.text = 'Data not found!'; 549 this.text = "Data not found!";
551 this.color = "error"; 550 this.color = "error";
552 return; 551 return;
553 } 552 }
554 this.showData = true; 553 this.showData = true;
555 if (this.getReport.form === "frontPart") { 554 if (this.getReport.form === "frontPart") {
556 this.frontPart = true; 555 this.frontPart = true;
557 this.backPart = false; 556 this.backPart = false;
558 } 557 }
559 if (this.getReport.form === "backPart") { 558 if (this.getReport.form === "backPart") {
560 this.frontPart = false; 559 this.frontPart = false;
561 this.backPart = true; 560 this.backPart = true;
562 } 561 }
563 this.showLoader = false; 562 this.showLoader = false;
564 }) 563 })
565 .catch(error => { 564 .catch((error) => {
566 this.showLoader = false; 565 this.showLoader = false;
567 }); 566 });
568 } 567 }
569 }, 568 },
570 569
571 printAdmitReport() { 570 printAdmitReport() {
572 // Pass the element id here 571 // Pass the element id here
573 this.$htmlToPaper("printMe"); 572 this.$htmlToPaper("printMe");
574 }, 573 },
575 getUserData() { 574 getUserData() {
576 http() 575 http()
577 .get("/getParticularUserDetail") 576 .get("/getParticularUserDetail")
578 .then(response => { 577 .then((response) => {
579 this.userData = response.data.data; 578 this.userData = response.data.data;
580 }) 579 })
581 .catch(error => { 580 .catch((error) => {
582 if (error.response.status === 401) { 581 if (error.response.status === 401) {
583 this.$router.replace({ path: "/" }); 582 this.$router.replace({ path: "/" });
584 this.$store.dispatch("setToken", null); 583 this.$store.dispatch("setToken", null);
585 this.$store.dispatch("Id", null); 584 this.$store.dispatch("Id", null);
586 } 585 }
587 }); 586 });
588 } 587 },
589 // created() { 588 // created() {
590 // this.$root.$on("app:search", search => { 589 // this.$root.$on("app:search", search => {
591 // this.search = search; 590 // this.search = search;
592 // }); 591 // });
593 // }, 592 // },
594 // beforeDestroy() { 593 // beforeDestroy() {
595 // // dont forget to remove the listener 594 // // dont forget to remove the listener
596 // this.$root.$off("app:search"); 595 // this.$root.$off("app:search");
597 // } 596 // }
598 } 597 },
599 }; 598 };
600 </script> 599 </script>
601 <style> 600 <style>
602 .admincardreport { 601 .admincardreport {
603 border: 1px solid #ddd; 602 border: 1px solid #ddd;
604 overflow: hidden; 603 overflow: hidden;
605 padding: 20px 50px; 604 padding: 20px 50px;
606 /* margin-bottom: 10px; 605 /* margin-bottom: 10px;
607 min-height: 443px; */ 606 min-height: 443px; */
608 } 607 }
609 .line { 608 .line {
610 border-bottom: 1px solid #ddd; 609 border-bottom: 1px solid #ddd;
611 overflow: hidden; 610 overflow: hidden;
612 padding-bottom: 10px; 611 padding-bottom: 10px;
613 vertical-align: middle; 612 vertical-align: middle;
614 /* margin-bottom: 4px; */ 613 /* margin-bottom: 4px; */
615 } 614 }
616 .school-logo { 615 .school-logo {
617 float: left; 616 float: left;
618 } 617 }
619 .student-logo { 618 .student-logo {
620 position: absolute; 619 position: absolute;
621 top: 221px; 620 top: 221px;
622 right: 221px; 621 right: 221px;
623 } 622 }
624 .school-name { 623 .school-name {
625 box-sizing: border-box; 624 box-sizing: border-box;
626 align-items: center; 625 align-items: center;
627 } 626 }
628 /* .student-info { 627 /* .student-info {
629 float: left; 628 float: left;
630 width: max-content; 629 width: max-content;
631 text-align: initial; 630 text-align: initial;
632 } */ 631 } */
633 .student-info { 632 .student-info {
634 width: 50%; 633 width: 50%;
635 float: left; 634 float: left;
636 text-align: initial; 635 text-align: initial;
637 } 636 }
638 .student-info p { 637 .student-info p {
639 width: 50%; 638 width: 50%;
640 float: left; 639 float: left;
641 margin-bottom: 1px; 640 margin-bottom: 1px;
642 padding: 0 0px; 641 padding: 0 0px;
643 font-size: 12px; 642 font-size: 12px;
644 } 643 }
645 .admitcardreportbackend ol { 644 .admitcardreportbackend ol {
646 margin: 0; 645 margin: 0;
647 margin-bottom: 10px; 646 margin-bottom: 10px;
648 } 647 }
649 .admitcardreportbackend p { 648 .admitcardreportbackend p {
650 line-height: 20px; 649 line-height: 20px;
651 text-align: left; 650 text-align: left;
652 } 651 }
653 </style> 652 </style>