[-] Remove unnecessary public

This commit is contained in:
Hykilpikonna
2019-12-07 17:08:19 -05:00
parent d69b74571a
commit 43174bf294
+12 -12
View File
@@ -20,12 +20,12 @@ export default class Navigation extends Vue
private gradingPeriod: string = 'All Year'; private gradingPeriod: string = 'All Year';
// Instance // Instance
public static instance: Navigation; static instance: Navigation;
/** /**
* This is called when the instance is created. * This is called when the instance is created.
*/ */
public created() created()
{ {
// Check selected time // Check selected time
if (!this.$cookies.isKey('va.grading-period')) if (!this.$cookies.isKey('va.grading-period'))
@@ -38,7 +38,7 @@ export default class Navigation extends Vue
/** /**
* This is called when the instance is loaded. * This is called when the instance is loaded.
*/ */
public mounted() mounted()
{ {
// Set instance // Set instance
Navigation.instance = this; Navigation.instance = this;
@@ -66,7 +66,7 @@ export default class Navigation extends Vue
}; };
} }
public formatCourseIndex(course: Course) formatCourseIndex(course: Course)
{ {
return CourseUtils.formatTabIndex(course); return CourseUtils.formatTabIndex(course);
} }
@@ -77,7 +77,7 @@ export default class Navigation extends Vue
* @param index The index selected * @param index The index selected
* @param indexPath The path of the index * @param indexPath The path of the index
*/ */
public onSelect(index: string, indexPath: string) onSelect(index: string, indexPath: string)
{ {
// Update active index // Update active index
this.updateIndex(index); this.updateIndex(index);
@@ -89,7 +89,7 @@ export default class Navigation extends Vue
* @param newIndex New index * @param newIndex New index
* @param history Record in history or not (Default true) * @param history Record in history or not (Default true)
*/ */
public updateIndex(newIndex: string, history?: boolean) updateIndex(newIndex: string, history?: boolean)
{ {
// Call custom event // Call custom event
this.$emit('update:activeIndex', newIndex); this.$emit('update:activeIndex', newIndex);
@@ -116,7 +116,7 @@ export default class Navigation extends Vue
* *
* @param index Index * @param index Index
*/ */
public getTitle(index: string) getTitle(index: string)
{ {
// Course // Course
if (index.startsWith('course')) if (index.startsWith('course'))
@@ -133,7 +133,7 @@ export default class Navigation extends Vue
* *
* @param indexOffset Index offset (Eg. 1 for next) * @param indexOffset Index offset (Eg. 1 for next)
*/ */
public nextCourse(indexOffset: number) nextCourse(indexOffset: number)
{ {
// Set tab to the next index // Set tab to the next index
this.updateIndex(CourseUtils.formatTabIndex(this.findNextCourse(indexOffset))) this.updateIndex(CourseUtils.formatTabIndex(this.findNextCourse(indexOffset)))
@@ -144,7 +144,7 @@ export default class Navigation extends Vue
* *
* @param indexOffset Index offset (Eg. 1 for next) * @param indexOffset Index offset (Eg. 1 for next)
*/ */
public findNextCourse(indexOffset: number) findNextCourse(indexOffset: number)
{ {
return this.findCourse(this.activeIndex.split('/')[1], indexOffset); return this.findCourse(this.activeIndex.split('/')[1], indexOffset);
} }
@@ -155,7 +155,7 @@ export default class Navigation extends Vue
* @param courseId Course ID * @param courseId Course ID
* @param indexOffset Index offset (Eg. 1 for next) * @param indexOffset Index offset (Eg. 1 for next)
*/ */
public findCourse(courseId: string, indexOffset: number) findCourse(courseId: string, indexOffset: number)
{ {
// Find current course index // Find current course index
let courseIndex = this.courses.findIndex(c => c.id == +courseId); let courseIndex = this.courses.findIndex(c => c.id == +courseId);
@@ -169,7 +169,7 @@ export default class Navigation extends Vue
* *
* @param command Term 1, Term 2, All Year, etc. * @param command Term 1, Term 2, All Year, etc.
*/ */
public selectGradingPeriod(command: string) selectGradingPeriod(command: string)
{ {
this.gradingPeriod = command; this.gradingPeriod = command;
this.$cookies.set('va.grading-period', command, '10y'); this.$cookies.set('va.grading-period', command, '10y');
@@ -181,7 +181,7 @@ export default class Navigation extends Vue
/** /**
* Get code for selected time * Get code for selected time
*/ */
public getSelectedTerm(): number getSelectedTerm(): number
{ {
if (this.gradingPeriod == 'All Year') return -1; if (this.gradingPeriod == 'All Year') return -1;
else return +this.gradingPeriod.replace('Term ', '') - 1; else return +this.gradingPeriod.replace('Term ', '') - 1;