[+] Reload directly when selected time is changed
This commit is contained in:
@@ -242,4 +242,15 @@ export default class App extends Vue
|
||||
// Refresh
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* Select time (Eg. Term 1, Term 2, All Year, etc.)
|
||||
*
|
||||
* @param code
|
||||
*/
|
||||
public selectTime(code: number)
|
||||
{
|
||||
// TODO: Optimize
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<login v-if="showLogin" v-on:login:token="onLogin"></login>
|
||||
<navigation :courses="filteredCourses"
|
||||
:activeIndex.sync="selectedTab"
|
||||
v-on:sign-out="signOut">
|
||||
@sign-out="signOut" @select-time="selectTime">
|
||||
</navigation>
|
||||
|
||||
<div id="app-content" v-if="assignmentsReady && loading === ''">
|
||||
|
||||
@@ -32,7 +32,7 @@ export default class Navigation extends Vue
|
||||
{
|
||||
this.$cookies.set('va.selected-time', this.selectedTime, '10y');
|
||||
}
|
||||
this.selectTime(this.$cookies.get('va.selected-time'));
|
||||
this.selectedTime = this.$cookies.get('va.selected-time');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user