[M] Rename type Grade to type Assignment

This commit is contained in:
Hykilpikonna
2019-10-05 10:22:40 -04:00
parent 39cd5bf1a2
commit b52f3d2617
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ import {GPAUtils} from '@/utils/gpa-utils';
/** /**
* Objects of this interface represent assignment grades. * Objects of this interface represent assignment grades.
*/ */
export interface Grade export interface Assignment
{ {
type: string, type: string,
description: string, description: string,
@@ -48,7 +48,7 @@ export interface Course
weightingMap: {[index: string]: number} weightingMap: {[index: string]: number}
} }
assignments: Grade[] assignments: Assignment[]
} }
@Component({ @Component({
+4 -4
View File
@@ -1,4 +1,4 @@
import {Grade} from '@/components/app/app'; import {Assignment} from '@/components/app/app';
export default class JsonUtils export default class JsonUtils
{ {
@@ -6,11 +6,11 @@ export default class JsonUtils
* This method filters the information provided in an assignments json. * This method filters the information provided in an assignments json.
* *
* @param assignments Assignments object * @param assignments Assignments object
* @returns Grade[] Filtered assignment grade object list * @returns Assignment[] Filtered assignment grade object list
*/ */
public static filterAssignments(assignments: any): Grade[] public static filterAssignments(assignments: any): Assignment[]
{ {
let result: Grade[] = []; let result: Assignment[] = [];
assignments.assignments.forEach((assignment: any) => assignments.assignments.forEach((assignment: any) =>
{ {