diff --git a/apps/backend/src/modules/schedule/typedefs/schedule.ts b/apps/backend/src/modules/schedule/typedefs/schedule.ts index 14d7c382f..e32f2addb 100644 --- a/apps/backend/src/modules/schedule/typedefs/schedule.ts +++ b/apps/backend/src/modules/schedule/typedefs/schedule.ts @@ -3,7 +3,7 @@ import { gql } from "graphql-tag"; const typedef = gql` type SelectedClass { class: Class! - selectedSections: [String!] + selectedSections: [Int!] } type Event { @@ -16,7 +16,7 @@ const typedef = gql` } type Schedule { - _id: ID + _id: ID! name: String! createdBy: String! year: Int! @@ -45,7 +45,7 @@ const typedef = gql` subject: String! courseNumber: String! number: String! - sections: [String!]! + sections: [Int!]! } input UpdateScheduleInput { diff --git a/apps/frontend/schema.graphql b/apps/frontend/schema.graphql index af63ffd82..4875ca3f4 100644 --- a/apps/frontend/schema.graphql +++ b/apps/frontend/schema.graphql @@ -57,6 +57,13 @@ type Query { classNumber: String! number: String! ): Section + enrollment( + year: Int! + semester: Semester! + subject: String! + courseNumber: String! + number: String! + ): Section! } input BookmarkedCourseInput { @@ -131,7 +138,7 @@ enum Semester { type SelectedClass { class: Class! - selectedSections: [String!] + selectedSections: [Int!] } type Event { @@ -144,7 +151,7 @@ type Event { } type Schedule { - _id: ID + _id: ID! name: String! createdBy: String! year: Int! @@ -168,7 +175,7 @@ input SelectedClassInput { subject: String! courseNumber: String! number: String! - sections: [String!]! + sections: [Int!]! } input UpdateScheduleInput { diff --git a/apps/frontend/src/app/Plan/Term/Catalog/Catalog.module.scss b/apps/frontend/src/app/Plan/Term/Catalog/Catalog.module.scss index e32621815..b538d42fc 100644 --- a/apps/frontend/src/app/Plan/Term/Catalog/Catalog.module.scss +++ b/apps/frontend/src/app/Plan/Term/Catalog/Catalog.module.scss @@ -1,9 +1,7 @@ .content { height: 100dvh; - position: fixed; left: 0; top: 0; - z-index: 989; display: flex; flex-direction: column; diff --git a/apps/frontend/src/app/Schedule/Editor/SideBar/Catalog/Catalog.module.scss b/apps/frontend/src/app/Schedule/Editor/SideBar/Catalog/Catalog.module.scss index 6bb641259..3fe96c55e 100644 --- a/apps/frontend/src/app/Schedule/Editor/SideBar/Catalog/Catalog.module.scss +++ b/apps/frontend/src/app/Schedule/Editor/SideBar/Catalog/Catalog.module.scss @@ -1,9 +1,7 @@ .content { height: 100dvh; - position: fixed; left: 0; top: 0; - z-index: 989; display: flex; flex-direction: column; diff --git a/apps/frontend/src/app/Schedule/Editor/SideBar/Class/Class.module.scss b/apps/frontend/src/app/Schedule/Editor/SideBar/Class/Class.module.scss index 0192ffe32..6a8600774 100644 --- a/apps/frontend/src/app/Schedule/Editor/SideBar/Class/Class.module.scss +++ b/apps/frontend/src/app/Schedule/Editor/SideBar/Class/Class.module.scss @@ -1,6 +1,27 @@ .root { display: flex; + &:global(.draggable-mirror) { + border-color: var(--blue-500); + z-index: 999; + box-shadow: 0 4px 16px rgb(0 0 0 / 10%); + } + + &:global(.draggable-source--is-dragging) { + background-color: transparent; + box-shadow: unset; + border-style: dashed; + + .body { + visibility: hidden; + } + } + + &:not(:global(.draggable-source--is-dragging)) { + box-shadow: 0 1px 2px rgb(0 0 0 / 2.5%); + background-color: var(--foreground-color); + } + .border { width: 8px; background-color: var(--purple-500); @@ -100,4 +121,4 @@ } } } -} \ No newline at end of file +} diff --git a/apps/frontend/src/app/Schedule/Editor/SideBar/Class/index.tsx b/apps/frontend/src/app/Schedule/Editor/SideBar/Class/index.tsx index 99f8d315a..00c27a737 100644 --- a/apps/frontend/src/app/Schedule/Editor/SideBar/Class/index.tsx +++ b/apps/frontend/src/app/Schedule/Editor/SideBar/Class/index.tsx @@ -49,7 +49,7 @@ export default function Class({ }, [_class]); return ( -