Skip to content

Commit

Permalink
avoid type error in initClassInfo; use KExternalLink to redirect in a…
Browse files Browse the repository at this point in the history
…uthmessage w/ urls
  • Loading branch information
nucleogenesis committed Oct 25, 2024
1 parent 826a1f1 commit c8a6c37
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 5 additions & 2 deletions kolibri/core/assets/src/views/AuthMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
/>
</p>
<p v-else>
<KRouterLink
<KExternalLink
:text="$tr('goBackToHomeAction')"
:to="{ path: '/' }"
:href="rootUrl"
appearance="basic-link"
/>
</p>
Expand Down Expand Up @@ -65,6 +65,9 @@
},
computed: {
...mapGetters(['isUserLoggedIn']),
rootUrl() {
return urls['kolibri:core:redirect_user']();
},
detailsText() {
return this.details || this.$tr(this.authorizedRole);
},
Expand Down
8 changes: 5 additions & 3 deletions kolibri/plugins/coach/assets/src/modules/pluginModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,11 @@ export default {
return Promise.all([
// Make sure we load any class list data, so that we know
// whether this user has access to multiple classes or not.
store
.dispatch('classSummary/loadClassSummary', classId)
.then(summary => store.dispatch('setClassList', summary.facility_id)),
store.dispatch('classSummary/loadClassSummary', classId).then(summary => {
if (summary?.facility_id) {
store.dispatch('setClassList', summary?.facility_id);
}
}),
store.dispatch('coachNotifications/fetchNotificationsForClass', classId),
]).catch(error => {
store.dispatch('handleApiError', { error, reloadOnReconnect: true });
Expand Down

0 comments on commit c8a6c37

Please sign in to comment.