From c27bf3c390930db584578e881b3cdc5152f462b0 Mon Sep 17 00:00:00 2001 From: Abhinav Chadaga Date: Sun, 18 Feb 2024 01:26:13 -0600 Subject: [PATCH] Modify story to use proper course info --- src/stories/injected/CoursePopup2.stories.ts | 51 ++++++++++++++++++-- 1 file changed, 48 insertions(+), 3 deletions(-) diff --git a/src/stories/injected/CoursePopup2.stories.ts b/src/stories/injected/CoursePopup2.stories.ts index 1ea17832..b57f2af5 100644 --- a/src/stories/injected/CoursePopup2.stories.ts +++ b/src/stories/injected/CoursePopup2.stories.ts @@ -3,18 +3,21 @@ import { Course, Status } from 'src/shared/types/Course'; import { CourseMeeting, DAY_MAP } from 'src/shared/types/CourseMeeting'; import { CourseSchedule } from 'src/shared/types/CourseSchedule'; import Instructor from 'src/shared/types/Instructor'; +import { UserSchedule } from 'src/shared/types/UserSchedule'; import CoursePopup from 'src/views/components/injected/CoursePopup/CoursePopup'; const exampleCourse: Course = new Course({ uniqueId: 50805, number: '314', - fullName: 'CS314 Data Structures', - courseName: 'Data Structures', + fullName: 'C S 314 DATA STRUCTURES', + courseName: 'DATA STRUCTURES', department: 'C S', creditHours: 3, status: Status.OPEN, - instructors: [new Instructor({ fullName: 'Michael Scott', firstName: 'Michael', lastName: 'Scott' })], + instructors: [ + new Instructor({ fullName: 'SCOTT, MICHAEL', firstName: 'MICHAEL', lastName: 'SCOTT', middleInitial: 'D' }), + ], isReserved: true, description: [ 'Second part of a two-part sequence in programming. Introduction to specifications, simple unit testing, and debugging; building and using canonical data structures; algorithm analysis and reasoning techniques such as assertions and invariants.', @@ -43,11 +46,53 @@ const exampleCourse: Course = new Course({ flags: ['Writing', 'Independent Inquiry'], instructionMode: 'In Person', semester: { + code: '12345', year: 2024, season: 'Spring', }, }); +// const exampleCourse: Course = new Course({ +// courseName: 'ELEMS OF COMPTRS/PROGRAMMNG-WB', +// creditHours: 3, +// department: 'C S', +// description: [ +// 'Problem solving and fundamental algorithms for various applications in science, business, and on the World Wide Web, and introductory programming in a modern object-oriented programming language.', +// 'Only one of the following may be counted: Computer Science 303E, 312, 312H. Credit for Computer Science 303E may not be earned after a student has received credit for Computer Science 314, or 314H. May not be counted toward a degree in computer science.', +// 'May be counted toward the Quantitative Reasoning flag requirement.', +// 'Designed to accommodate 100 or more students.', +// 'Taught as a Web-based course.', +// ], +// flags: ['Quantitative Reasoning'], +// fullName: 'C S 303E ELEMS OF COMPTRS/PROGRAMMNG-WB', +// instructionMode: 'Online', +// instructors: [], +// isReserved: false, +// number: '303E', +// schedule: { +// meetings: [ +// new CourseMeeting({ +// days: ['Tuesday', 'Thursday'], +// endTime: 660, +// startTime: 570, +// }), +// ], +// }, +// semester: { +// code: '12345', +// season: 'Spring', +// year: 2024, +// }, +// status: Status.CANCELLED, +// uniqueId: 12345, +// url: 'https://utdirect.utexas.edu/apps/registrar/course_schedule/20242/12345/', +// }); + +const exampleSchedule: UserSchedule = new UserSchedule({ + courses: [exampleCourse], + name: 'Example Schedule', +}); + const meta: Meta = { title: 'Components/Injected/CoursePopup2', component: CoursePopup,