[+] Reload directly when selected time is changed
This commit is contained in:
@@ -242,4 +242,15 @@ export default class App extends Vue
|
|||||||
// Refresh
|
// Refresh
|
||||||
window.location.reload();
|
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>
|
<login v-if="showLogin" v-on:login:token="onLogin"></login>
|
||||||
<navigation :courses="filteredCourses"
|
<navigation :courses="filteredCourses"
|
||||||
:activeIndex.sync="selectedTab"
|
:activeIndex.sync="selectedTab"
|
||||||
v-on:sign-out="signOut">
|
@sign-out="signOut" @select-time="selectTime">
|
||||||
</navigation>
|
</navigation>
|
||||||
|
|
||||||
<div id="app-content" v-if="assignmentsReady && loading === ''">
|
<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.$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