Commit ab4a9d6ee47b672b90b8fc5b393b31cd90b48b63
1 parent
e5699315cd
Exists in
master
and in
2 other branches
file name issue solved in syllabus and assignment screen
Showing
2 changed files
with
31 additions
and
23 deletions
Show diff stats
src/pages/Academic/assignment.vue
... | ... | @@ -264,12 +264,13 @@ |
264 | 264 | v-if="role === 'ADMIN'" |
265 | 265 | >{{ props.item.schoolId.name }}</td> |
266 | 266 | <td class="text-xs-center td td-row"> |
267 | - <v-btn | |
268 | - class="add-button" | |
269 | - @click="generatePDF2Canvas(props.item)" | |
270 | - :loading="loadingPdf" | |
271 | - dark | |
272 | - >{{ props.item.fileType }}</v-btn> | |
267 | + <a :href="props.item.fileName" target="_blank" style="text-decoration: none!important;"> | |
268 | + <v-btn flat block @click="generatePDF2Canvas(props.item)" :loading="loadingPdf"> | |
269 | + <span> | |
270 | + <h5>{{props.item.fileName}}</h5> | |
271 | + </span> | |
272 | + </v-btn> | |
273 | + </a> | |
273 | 274 | </td> |
274 | 275 | <td class="text-xs-center td td-row"> |
275 | 276 | <span> |
... | ... | @@ -715,13 +716,13 @@ export default { |
715 | 716 | addAssignment.upload = imageUrl; |
716 | 717 | addAssignment.fileType = detectMimeType(imageUrl); |
717 | 718 | } |
718 | - console.log("data===>", addAssignment); | |
719 | + // console.log("data===>", addAssignment); | |
719 | 720 | http() |
720 | 721 | .post("/createAssignment", addAssignment) |
721 | 722 | .then((response) => { |
722 | 723 | this.getAssignmentList(); |
723 | 724 | this.snackbar = true; |
724 | - this.text = "Syllabus added successfully"; | |
725 | + this.text = "Assignment added successfully"; | |
725 | 726 | this.color = "green"; |
726 | 727 | this.addAssignmentDialog = false; |
727 | 728 | this.clear(); | ... | ... |
src/pages/Academic/syllabus.vue
... | ... | @@ -201,12 +201,19 @@ |
201 | 201 | >{{ props.item.teacherId.name }}</td> |
202 | 202 | <td class="text-xs-center td td-row" v-else>{{ props.item.schoolId.name }}</td> |
203 | 203 | <td class="text-xs-center td td-row"> |
204 | - <v-btn | |
204 | + <!-- <v-btn | |
205 | 205 | class="add-button" |
206 | 206 | @click="generatePDF2Canvas(props.item)" |
207 | 207 | :loading="loadingPdf" |
208 | 208 | dark |
209 | - >{{ props.item.fileType }}</v-btn> | |
209 | + >{{ props.item.fileName }}</v-btn>--> | |
210 | + <a :href="props.item.fileName" target="_blank" style="text-decoration: none!important;"> | |
211 | + <v-btn flat block @click="generatePDF2Canvas(props.item)" :loading="loadingPdf"> | |
212 | + <span> | |
213 | + <h5>{{props.item.fileName}}</h5> | |
214 | + </span> | |
215 | + </v-btn> | |
216 | + </a> | |
210 | 217 | </td> |
211 | 218 | <td class="text-xs-center td td-row"> |
212 | 219 | <span> |
... | ... | @@ -534,13 +541,13 @@ export default { |
534 | 541 | // fileType: this.addSyllabus.fileType |
535 | 542 | // }; |
536 | 543 | var signatures = { |
537 | - JVBERi0: "other", | |
538 | - iVBORw0KGgo: "image", | |
539 | - UEsDBBQ: "other", | |
540 | - "/": "image", | |
541 | - AAABAA: "image", | |
542 | - IywiV2hhdC: "other", | |
543 | - bmFtZSxl: "other", | |
544 | + // JVBERi0: "other", | |
545 | + // iVBORw0KGgo: "image", | |
546 | + // UEsDBBQ: "other", | |
547 | + // "/": "image", | |
548 | + // AAABAA: "image", | |
549 | + // IywiV2hhdC: "other", | |
550 | + // bmFtZSxl: "other", | |
544 | 551 | }; |
545 | 552 | function detectMimeType(b64) { |
546 | 553 | for (var s in signatures) { |
... | ... | @@ -613,12 +620,12 @@ export default { |
613 | 620 | }; |
614 | 621 | this.editLoading = true; |
615 | 622 | var signatures = { |
616 | - JVBERi0: "other", | |
617 | - iVBORw0KGgo: "image", | |
618 | - UEsDBBQ: "other", | |
619 | - "/": "image", | |
620 | - AAABAA: "image", | |
621 | - IywiV2hhdC: "other", | |
623 | + // JVBERi0: "other", | |
624 | + // iVBORw0KGgo: "image", | |
625 | + // UEsDBBQ: "other", | |
626 | + // "/": "image", | |
627 | + // AAABAA: "image", | |
628 | + // IywiV2hhdC: "other", | |
622 | 629 | }; |
623 | 630 | function detectMimeType(b64) { |
624 | 631 | for (var s in signatures) { | ... | ... |