[O] Use Date for date instead of string

This commit is contained in:
Hykilpikonna
2019-11-06 17:16:49 -05:00
parent 4b512d64d9
commit 750c768848
2 changed files with 22 additions and 22 deletions
+21 -21
View File
@@ -18,19 +18,19 @@ import {FormatUtils} from '@/utils/format-utils';
*/
export interface Assignment
{
id: number,
scoreId: number,
type: string,
typeId: number,
description: string,
date: string,
complete: string,
include: boolean,
display: boolean,
id: number
scoreId: number
type: string
typeId: number
description: string
date: Date
complete: string
include: boolean
display: boolean
unread: boolean,
unread: boolean
scoreMax: number,
scoreMax: number
score: number
}
@@ -39,21 +39,21 @@ export interface Assignment
*/
export interface Course
{
assignmentsId: number,
id: number,
name: string,
teacherName: string,
status: string,
assignmentsId: number
id: number
name: string
teacherName: string
status: string
letterGrade?: string,
numericGrade?: number,
letterGrade?: string
numericGrade?: number
level: string,
scaleUp: number,
level: string
scaleUp: number
grading:
{
method: string,
method: string
weightingMap: {[index: string]: number}
}
+1 -1
View File
@@ -21,7 +21,7 @@ export default class JsonUtils
type: assignment.assignment_type,
typeId: assignment.assignment_type_id,
description: assignment.assignment_description,
date: assignment._date,
date: new Date(assignment._date),
complete: assignment.completion_status,
include: assignment.include_in_calculated_grade == 1,
display: assignment.display_grade == 1,