From 937e89ce5f00075af8c53d2a6c9f40ae9bcdc2d6 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sat, 9 Nov 2019 14:38:57 -0500 Subject: [PATCH] [M] Move assignment interface from app.ts to course.ts --- src/components/app/app.ts | 23 ------------------ src/logic/course.ts | 24 ++++++++++++++++++- src/logic/utils/gpa-utils.ts | 3 +-- src/logic/utils/json-utils.ts | 2 +- .../assignment-type-head.vue | 2 +- src/pages/course/course-page.vue | 3 +-- .../course/course-scatter/course-scatter.ts | 3 +-- .../assignment-entry/assignment-entry.vue | 2 +- .../overall/overall-course/overall-course.ts | 4 ++-- 9 files changed, 31 insertions(+), 35 deletions(-) diff --git a/src/components/app/app.ts b/src/components/app/app.ts index 3146426..81f9c17 100644 --- a/src/components/app/app.ts +++ b/src/components/app/app.ts @@ -11,29 +11,6 @@ import CoursePage from '@/pages/course/course-page.vue'; import Course from '@/logic/course'; -/** - * Objects of this interface represent assignment grades. - */ -export interface Assignment -{ - id: number - scoreId: number - type: string - typeId: number - description: string - date: Date - complete: string - include: boolean - display: boolean - - unread: boolean - - scoreMax: number - score: number - - gradingPeriod: number -} - @Component({ components: {Login, Navigation, Overall, Loading, CoursePage}, }) diff --git a/src/logic/course.ts b/src/logic/course.ts index b6c7305..4fc1772 100644 --- a/src/logic/course.ts +++ b/src/logic/course.ts @@ -1,10 +1,32 @@ -import {Assignment} from '@/components/app/app'; import JsonUtils from '@/logic/utils/json-utils'; import {FormatUtils} from '@/logic/utils/format-utils'; import {CourseUtils} from '@/logic/utils/course-utils'; import Navigation from '@/components/navigation/navigation'; import {GPAUtils} from '@/logic/utils/gpa-utils'; +/** + * Objects of this interface represent assignment grades. + */ +export interface Assignment +{ + id: number + scoreId: number + type: string + typeId: number + description: string + date: Date + complete: string + include: boolean + display: boolean + + unread: boolean + + scoreMax: number + score: number + + gradingPeriod: number +} + export default class Course { id: number; diff --git a/src/logic/utils/gpa-utils.ts b/src/logic/utils/gpa-utils.ts index 66bbb10..9890d31 100644 --- a/src/logic/utils/gpa-utils.ts +++ b/src/logic/utils/gpa-utils.ts @@ -1,5 +1,4 @@ -import Course from '@/logic/course'; -import {Assignment} from '@/components/app/app'; +import Course, {Assignment} from '@/logic/course'; export interface Scale { diff --git a/src/logic/utils/json-utils.ts b/src/logic/utils/json-utils.ts index 0b77062..fb370ac 100644 --- a/src/logic/utils/json-utils.ts +++ b/src/logic/utils/json-utils.ts @@ -1,4 +1,4 @@ -import {Assignment} from '@/components/app/app'; +import {Assignment} from '@/logic/course'; export default class JsonUtils { diff --git a/src/pages/course/assignment-type-head/assignment-type-head.vue b/src/pages/course/assignment-type-head/assignment-type-head.vue index 0857b99..4ec67fd 100644 --- a/src/pages/course/assignment-type-head/assignment-type-head.vue +++ b/src/pages/course/assignment-type-head/assignment-type-head.vue @@ -16,8 +16,8 @@