From 750c768848ff35baf4f319a505a117658cc52c99 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Wed, 6 Nov 2019 17:16:49 -0500 Subject: [PATCH] [O] Use Date for date instead of string --- src/components/app/app.ts | 42 +++++++++++++++++++-------------------- src/utils/json-utils.ts | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/components/app/app.ts b/src/components/app/app.ts index 3aa81d9..0937250 100644 --- a/src/components/app/app.ts +++ b/src/components/app/app.ts @@ -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} } diff --git a/src/utils/json-utils.ts b/src/utils/json-utils.ts index df5f592..e076725 100644 --- a/src/utils/json-utils.ts +++ b/src/utils/json-utils.ts @@ -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,