Skip to content

Commit

Permalink
Merge pull request #8715 from sairina/learner-device-link
Browse files Browse the repository at this point in the history
Updates "View learner devices" link to appear in all reports pages
  • Loading branch information
rtibbles committed Nov 17, 2021
2 parents 58634a1 + a559bf9 commit cdbbea6
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<slot></slot>
<div class="report-controls-buttons">
<KRouterLink
v-if="isQuizTab"
v-if="isMainReport"
:text="$tr('viewLearners')"
appearance="basic-link"
:to="classLearnersListRoute"
Expand Down Expand Up @@ -63,8 +63,13 @@
// Always disable in app mode until we add the ability to download files.
return isEmbeddedWebView || this.disableExport;
},
isQuizTab() {
return this.$route.name === 'ReportsQuizListPage';
isMainReport() {
return (
this.$route.name === 'ReportsQuizListPage' ||
this.$route.name === 'ReportsGroupListPage' ||
this.$route.name === 'ReportsLearnerListPage' ||
this.$route.name === 'ReportsLessonListPage'
);
},
classLearnersListRoute() {
const { query } = this.$route;
Expand Down

0 comments on commit cdbbea6

Please sign in to comment.