Commit 115a1b77bd124267025279d1a77ed13ca621a67b
1 parent
4ecd35af27
Exists in
master
and in
2 other branches
show action bar in subjects while admin login
Showing
1 changed file
with
13 additions
and
3 deletions
Show diff stats
src/pages/Academic/subject.vue
... | ... | @@ -313,7 +313,7 @@ |
313 | 313 | <td class="text-xs-center td td-row">{{ props.item.finalMarks }}</td> |
314 | 314 | <td class="text-xs-center td td-row">{{ props.item.type }}</td> |
315 | 315 | |
316 | - <!-- <td class="text-xs-center td td-row"> | |
316 | + <td class="text-xs-center td td-row" v-if="role === 'ADMIN' "> | |
317 | 317 | <span> |
318 | 318 | <v-tooltip top> |
319 | 319 | <img |
... | ... | @@ -346,7 +346,7 @@ |
346 | 346 | <span>Delete</span> |
347 | 347 | </v-tooltip> |
348 | 348 | </span> |
349 | - </td>--> | |
349 | + </td> | |
350 | 350 | </tr> |
351 | 351 | </template> |
352 | 352 | <v-alert |
... | ... | @@ -615,7 +615,6 @@ export default { |
615 | 615 | sortable: false, |
616 | 616 | align: "center", |
617 | 617 | }, |
618 | - // { text: "Action", value: "", sortable: false, align: "center" } | |
619 | 618 | ], |
620 | 619 | subjectList: [], |
621 | 620 | classList: [], |
... | ... | @@ -637,6 +636,16 @@ export default { |
637 | 636 | }, |
638 | 637 | }, |
639 | 638 | methods: { |
639 | + addActionInHeaders() { | |
640 | + if (this.role === "ADMIN") { | |
641 | + this.headers.push({ | |
642 | + text: "Action", | |
643 | + value: "", | |
644 | + sortable: false, | |
645 | + align: "center", | |
646 | + }); | |
647 | + } | |
648 | + }, | |
640 | 649 | pickFile() { |
641 | 650 | this.$refs.image.click(); |
642 | 651 | }, |
... | ... | @@ -808,6 +817,7 @@ export default { |
808 | 817 | this.getClass(); |
809 | 818 | this.getTeacherList(); |
810 | 819 | this.role = this.$store.state.role; |
820 | + this.addActionInHeaders(); | |
811 | 821 | }, |
812 | 822 | }; |
813 | 823 | </script> |
814 | 824 | \ No newline at end of file | ... | ... |