[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 export interface Assignment
{ {
id: number, id: number
scoreId: number, scoreId: number
type: string, type: string
typeId: number, typeId: number
description: string, description: string
date: string, date: Date
complete: string, complete: string
include: boolean, include: boolean
display: boolean, display: boolean
unread: boolean, unread: boolean
scoreMax: number, scoreMax: number
score: number score: number
} }
@@ -39,21 +39,21 @@ export interface Assignment
*/ */
export interface Course export interface Course
{ {
assignmentsId: number, assignmentsId: number
id: number, id: number
name: string, name: string
teacherName: string, teacherName: string
status: string, status: string
letterGrade?: string, letterGrade?: string
numericGrade?: number, numericGrade?: number
level: string, level: string
scaleUp: number, scaleUp: number
grading: grading:
{ {
method: string, method: string
weightingMap: {[index: string]: number} weightingMap: {[index: string]: number}
} }
+1 -1
View File
@@ -21,7 +21,7 @@ export default class JsonUtils
type: assignment.assignment_type, type: assignment.assignment_type,
typeId: assignment.assignment_type_id, typeId: assignment.assignment_type_id,
description: assignment.assignment_description, description: assignment.assignment_description,
date: assignment._date, date: new Date(assignment._date),
complete: assignment.completion_status, complete: assignment.completion_status,
include: assignment.include_in_calculated_grade == 1, include: assignment.include_in_calculated_grade == 1,
display: assignment.display_grade == 1, display: assignment.display_grade == 1,