Options
All
  • Public
  • Public/Protected
  • All
Menu

course-planner - v0.16.0

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

CampusOptions

CampusOptions: CAMPUS | "All"

Defines the possibilities of campus filter values

CourseInstanceModalData

CourseInstanceModalData: ModalData & object

CourseListing

CourseListing: ReactElement<object>

DayBlock

DayBlock: ReactElement<DayBlockProps>

DayBlockBodyProps

DayBlockBodyProps: Pick<DayBlockProps, "children" | "numRows" | "rowHeight">

Takes the children, numRows, and rowHeight props from the parent DayBlock

DayBlockHeadingProps

DayBlockHeadingProps: object

The DayBlockHeading should only accept the DayBlock heading as a child

Type declaration

  • children: DayBlockProps["heading"]

DayBlockWrapperProps

DayBlockWrapperProps: Pick<DayBlockProps, "column">

Take the column prop from the DayBlock

DegreeProgramEvent

DegreeProgramEvent: ChangeEvent<HTMLSelectElement> & object

DispatchMessage

DispatchMessage: Dispatch<MessageReducerAction>

A function that passes down a message to the queue

EnrollmentField

EnrollmentField: object

Representative of an enrollment field (e.g "Pre-registration") along with the associated icon, value and list key. This type is to enforce consistency between list items

Type declaration

  • Optional count?: number
  • icon: IconDefinition
  • key: keyof Instance & "preEnrollment" | "studyCardEnrollment" | "actualEnrollment"
  • name: string

FacultyFilterState

FacultyFilterState: object

Describes the top level of filters for the Faculty page

Type declaration

GetterFunction

GetterFunction: function

Type declaration

    • (filters: FilterState, genericFilterUpdate: function, filterOptions?: Record<string, object[]>): ReactElement
    • Parameters

      • filters: FilterState
      • genericFilterUpdate: function
          • (field: string, value: string): void
          • Parameters

            • field: string
            • value: string

            Returns void

      • Optional filterOptions: Record<string, object[]>

      Returns ReactElement

Inspectable

Inspectable: Record<string, unknown> | Record<string, unknown>[] | Writable[] | unknown[]

Represents more complex objects that should be passed through util.inspect before they can be meaningfully written to the console.

Loggable

Loggable<T>: T extends Writable ? Writable : T extends Record<Writable, unknown> ? Inspectable : unknown

A general type for any data that can be logged by the logger

Type parameters

  • T

MetadataUpdater

MetadataUpdater: function

Type declaration

NonClassMeetingsApiResponse

NonClassMeetingsApiResponse: Record<string, NonClassMeetingResponseDTO[]>

OpenModalCallback

OpenModalCallback: function

Type declaration

ReportRangeUpdate

ReportRangeUpdate: Pick<ReportRange, "startYear"> | Pick<ReportRange, "endYear">

Typed so that only one of startYear/endYear can be provided

SemesterFilterState

SemesterFilterState: object

Describes the semester specific filter(s)

Type declaration

  • absence: object
    • type: string

SessionBlock

SessionBlock: ReactElement<SessionBlockProps>

SessionBlockBodyProps

SessionBlockBodyProps: Pick<SessionBlockProps, "children">

Takes the children from the SessionBlock

SessionBlockBodyWrapperProps

SessionBlockBodyWrapperProps: Pick<SessionBlockProps, "isPopoverVisible">

Takes the isPopoverVisible prop from the SessionBlock

SessionBlockHeadingProps

SessionBlockHeadingProps: object

Takes as children the prefix prop from the SessionBlock

Type declaration

  • children: SessionBlockProps["prefix"]

TermKey

TermKey: "fall" | "spring"

TestData

WeekBlockWrapperProps

WeekBlockWrapperProps: Pick<WeekBlockProps, "numRows" | "numColumns" | "rowHeight">

Takes the numRows and rowHeight props from the WeekBlock

Writable

Writable: string | number

Represents a value that can be directly written to the logs, without needing to go through util.inspect

formattableMeeting

formattableMeeting: Pick<CourseInstanceResponseMeeting, "startTime" | "endTime" | "day"> & object

Variables

CLIENT_URL

CLIENT_URL: string

Const CellLayout

CellLayout: string & StyledComponentBase<"div", DefaultTheme, __type, never> & object = styled.div`display: flex;align-items: flex-start;justify-content: space-between;padding: ${fromTheme('ws', 'xsmall')};`

Const CourseListing

CourseListing: string & StyledComponentBase<"li", DefaultTheme, __type, never> & object = styled.li`font-size: .8em;color: #000000;text-align: left;`

The listing for the catalog number of a single course within a session block

Const CourseListingButton

CourseListingButton: string & StyledComponentBase<"button", DefaultTheme, object & CourseListingButtonProps, "type"> & object = styled.button.attrs({type: 'button',})<CourseListingButtonProps>`background-color: ${({ isHighlighted }) => (isHighlighted ? 'rgba(255, 255, 255, 0.5)' : 'transparent')};border: none;font-size: inherit;&:disabled {color: ${fromTheme('color', 'text', 'medium')};opacity: 0.8;}padding: 0;margin: 0;width: 100%;cursor: ${({ disabled }) => (disabled ? '' : 'pointer')};text-align: left;`

An essentially unstyled button used to trigger the Popover containing the course details

Const DayBlockBody

DayBlockBody: string & StyledComponentBase<"div", DefaultTheme, object, never> & object = styled.div<DayBlockBodyProps>`display: grid;grid-row: 2/ ${({ numRows }) => numRows};grid-template-columns: repeat(auto-fit, minmax(30px, 1fr));grid-template-rows: ${({ numRows, rowHeight }) => (`repeat(${numRows - 1}, ${rowHeight})`)};border-left: 1px solid #ccc;border-right: 1px solid #ccc;border-bottom: 2px solid #ccc;`

An internal grid within the DayBlock, into which the SessionBlocks will be placed. For visual consistency, the row height and number of rows should match the WeekBlock.

Const DayBlockHeading

DayBlockHeading: string & StyledComponentBase<"h3", DefaultTheme, object, never> & object = styled.h3<DayBlockHeadingProps>`grid-row: 1;border: 1px solid #ccc;border-bottom: none;text-align: center;padding-top: 0.5em;`

Displays the name of the day of the week at the top of the DayBlock

Const DayBlockWrapper

DayBlockWrapper: string & StyledComponentBase<"div", DefaultTheme, object, never> & object = styled.div<DayBlockWrapperProps>`background: rgba(255,255,255,0);grid-row: 1;grid-column: ${({ column }) => column + 2};display: grid;grid-template-rows: 3em auto;`

A top level wrapper around the full day, which mainly handles placement within the WeekGrid

Const FIRST_HOUR

FIRST_HOUR: 8 = 8

Parameters for how the schedule view should be displayed. Currently using static values. Parameters for how the schedule view should be displayed. Currently using static values.

TODO: Consider deriving start and end times from schedule data

TODO: Consider deriving start and end times from schedule data

Const GlobalMessageWrapper

GlobalMessageWrapper: string & StyledComponentBase<"div", DefaultTheme, __type, never> & object = styled.div`position: fixed;bottom: 0;left: 0;width: 100%;`

A wrapper component for the Global Message component to position it at the bottom of the page

HTTPS_ON

HTTPS_ON: string

HTTPS_PRIVATE_KEY

HTTPS_PRIVATE_KEY: string

HTTPS_PUBLIC_CERT

HTTPS_PUBLIC_CERT: string

Const HUID

HUID: "88888888" = "88888888"

An 8-character numeric string representing a Harvard ID

Const HourHead

HourHead: string & StyledComponentBase<"div", DefaultTheme, HourHeadProps, never> & object = styled.div<HourHeadProps>`grid-column: 1;grid-row: ${({ row }) => row + 2};`

A heading for the hour that appears in the left margin of the week

Const InstructionalTextBox

InstructionalTextBox: string & StyledComponentBase<"div", DefaultTheme, __type, never> & object = styled.div`border: ${fromTheme('border', 'light')};margin-top: ${fromTheme('ws', 'xsmall')};margin-bottom: ${fromTheme('ws', 'xsmall')};padding: ${fromTheme('ws', 'xsmall')};font-family: ${fromTheme('font', 'note', 'family')};font-size: ${fromTheme('font', 'note', 'size')};& p {margin-bottom: 0.5em;}`

Const InstructorListItem

InstructorListItem: string & StyledComponentBase<"li", DefaultTheme, ListItemProps, never> & object = styled(ListItem)`display: flex;justify-content: start;align-items: baseline;& .instructor-name {flex-grow: 1;}`

Implement flexbox inside our ListItem to handle row spacing for handling spacing inside the instructor list entries

Const InstructorModalBody

InstructorModalBody: string & StyledComponentBase<ForwardRefExoticComponent<object & object>, DefaultTheme, __type, never> & object = styled(ModalBody)`min-height: 32em;`

Sets a min-height double the max-height of the Combobox dropdown, to keep it visible when adding instructors

Const LAST_HOUR

LAST_HOUR: 22 = 22

Const MANDATORY_COLUMNS

MANDATORY_COLUMNS: COURSE_TABLE_COLUMN[] = [COURSE_TABLE_COLUMN.AREA,COURSE_TABLE_COLUMN.CATALOG_NUMBER,]

These columns are ALWAYS shown regardless of user choice

Const MINUTE_RESOLUTION

MINUTE_RESOLUTION: 5 = 5

Const MULTILINE_SEPARATOR

MULTILINE_SEPARATOR: ";" = ";"

A single defined string to use at the end of multiline fields in the Excel report, i.e. meetings and isntructors

Const MeetingGrid

MeetingGrid: string & StyledComponentBase<"div", DefaultTheme, __type, never> & object = styled.div`display: grid;grid-template-areas: "time campus room";column-gap: ${fromTheme('ws', 'xsmall')};align-items: baseline;`

Utility component to style the data about a meeting

Const MeetingGridSection

MeetingGridSection: string & StyledComponentBase<"div", DefaultTheme, object, never> & object = styled.div<{area: string}>`grid-area: ${({ area }): string => area};display: flex;flex-direction: column;align-items: flex-start;`

Handles the placement of a single piece of the meeting data

Const MeetingModalBodyGrid

MeetingModalBodyGrid: string & StyledComponentBase<"div", DefaultTheme, __type, never> & object = styled.div`width: 75vw;height: 75vh;display: grid;grid-template-areas:"meet room""note room";grid-template-rows: 'auto 1fr';grid-template-columns: 1fr 1fr;grid-column-gap: ${fromTheme('ws', 'xlarge')};`

Utility component to style content within meeting modal body

Const MeetingScheduler

MeetingScheduler: string & StyledComponentBase<"div", DefaultTheme, __type, never> & object = styled.div`display: flex;flex-direction: column;grid-area: meet;`

Contains the meeting scheduler section of the meeting modal

Const MeetingSchedulerBody

MeetingSchedulerBody: string & StyledComponentBase<"div", DefaultTheme, __type, never> & object = styled.div`flex: 1;overflow: auto;`

Contains the MeetingScheduler and RoomAvailability sections of the Meeting Modal

Const MeetingSchedulerHeader

MeetingSchedulerHeader: string & StyledComponentBase<"h3", DefaultTheme, __type, never> & object = styled.h3`flex: 0;`

The header of the meeting scheduler section of the Meeting Modal

Const MemoizedCourseInstanceTableBody

MemoizedCourseInstanceTableBody: NamedExoticComponent<CourseInstanceTableBodyProps> = memo(CourseInstanceTableBody)

Memoize the table body in order to allow users to quickly see what they type in the text filter fields without having to re-render the entire table contents in between key strokes.

Const MessageContext

MessageContext: Context<function> = createContext<DispatchMessage>(null)

Global message provider

Const MetadataContext

MetadataContext: Context<MetadataContextValue> = createContext<MetadataContextValue>(null)

Manage the current metadata through Context

NODE_ENV

NODE_ENV: string

Const NUM_SEMESTERS

NUM_SEMESTERS: number = NUM_YEARS * 2

Defines the number of semesters that will be displayed in the multi-year plan table.

Const NUM_YEARS

NUM_YEARS: 4 = 4

Defines the number of years worth of semesters that will be displayed in the multi-year plan table.

Const NotesSection

NotesSection: string & StyledComponentBase<"div", DefaultTheme, __type, never> & object = styled.div`grid-area: note;`

PUBLIC_CLIENT_URL

PUBLIC_CLIENT_URL: string

Const PrefixButton

PrefixButton: string & StyledComponentBase<FunctionComponent<ButtonProps>, DefaultTheme, ButtonProps & object, never> & object = styled(Button) <ButtonProps & { prefix: string, isPrefixActive: boolean; }>`margin: ${fromTheme('ws', 'small')};opacity : ${({ isPrefixActive }) => (isPrefixActive ? '' : 0.5)};background-color: ${({ prefix }) => getCatPrefixColor(prefix)};`

A button to filter course prefixes and fade sessionblock based on selected value

Const RoomAvailability

RoomAvailability: string & StyledComponentBase<"div", DefaultTheme, __type, never> & object = styled.div`display: flex;flex-direction: column;grid-area: room;`

Contains the room availability section of the meeting modal

Const RoomAvailabilityBody

RoomAvailabilityBody: string & StyledComponentBase<"div", DefaultTheme, __type, never> & object = styled.div`flex: 1;overflow-y: auto;`

Placeholder for the room availability table of the meeting modal for display purposes

Const RoomAvailabilityHeader

RoomAvailabilityHeader: string & StyledComponentBase<"h3", DefaultTheme, __type, never> & object = styled.h3`flex: 0;`

The header of the room availability section of the Meeting Modal

Const RoomSelectionPrompt

RoomSelectionPrompt: string & StyledComponentBase<"div", DefaultTheme, __type, never> & object = styled.div`border: ${fromTheme('border', 'light')};border-top: none;text-align: center;font-weight: ${fromTheme('font', 'bold', 'weight')};font-size: ${fromTheme('font', 'bold', 'size')};font-family: ${fromTheme('font', 'bold', 'family')};padding: ${fromTheme('ws', 'medium')};`

A textbox that will appear before a meeting day/time has been selected

Const RoomSelectorWrapper

RoomSelectorWrapper: string & StyledComponentBase<"span", DefaultTheme, __type, never> & object = styled.span`padding-right: 25%;min-width: 50em;`

A wrapper component used to format the Room Selector

SERVER_PORT

SERVER_PORT: string

SERVER_URL

SERVER_URL: string

Const SessionBlockBody

SessionBlockBody: string & StyledComponentBase<"ul", DefaultTheme, object, never> & object = styled.ul<SessionBlockBodyProps>`list-style: none;padding-left: ${fromTheme('ws', 'xsmall')};padding-right: ${fromTheme('ws', 'xsmall')};`

An unordered list of courses that appear at the same time with the same catalog prefix

Const SessionBlockBodyWrapper

SessionBlockBodyWrapper: string & StyledComponentBase<"div", DefaultTheme, object, never> & object = styled.div<SessionBlockBodyWrapperProps>`overflow-y: hidden;position: absolute;width: 100%;top: 2em;bottom: 0;border-top: 1px solid rgba(255,255,255,0.5);&:hover {overflow-y: ${({ isPopoverVisible }): string => (isPopoverVisible? 'hidden': 'auto')};}`

A wrapper around the table to handle scrolling within the list only.

Const SessionBlockHeading

SessionBlockHeading: string & StyledComponentBase<"h4", DefaultTheme, object, never> & object = styled.h4<SessionBlockHeadingProps>`background-color: inherit;position: absolute;top: 0;width: 100%;padding-left: ${fromTheme('ws', 'xsmall')};padding-right: ${fromTheme('ws', 'xsmall')};font-size: 1.2em;text-transform: uppercase;`

The title that appears at the top of the SessionBlock, representing the catalog prefix for all courses during the session

Const SessionBlockWrapper

SessionBlockWrapper: string & StyledComponentBase<"div", DefaultTheme, SessionBlockWrapperProps, never> & object = styled.div<SessionBlockWrapperProps>`background-color: ${({ prefix }) => getCatPrefixColor(prefix)};grid-row: ${({ startRow, duration }) => `${startRow}/ span ${duration}`};border-left: 1px solid #fff;border-right: 1px solid #fff;border-bottom: 1px solid #fff;min-width: 3.5em;position: relative;opacity: ${({ isFaded }) => (isFaded ? '0.6' : '1')};::-webkit-scrollbar {width: 0.2em;height: 0.2em}${({ hasBottomOverflow, theme }) => (// Show down indicator when there are courses overflowing the bottomhasBottomOverflow? `&:after {content: '${OVERFLOW.DOWN}';position: absolute;bottom: ${theme.ws.zero};right: ${theme.ws.small};color: ${theme.color.text.medium};}`: null)};${({ hasTopOverflow, theme }) => (// Show up indicator when there are courses overflowing the tophasTopOverflow? `&:before {content: '${OVERFLOW.UP}';position: absolute;top: 2em;right: ${theme.ws.small};color: ${theme.color.text.medium};}`: null)};`

The top level of the SessionBlock, which handles setting the placement within the DayBlock grid and the background color

Const StyledButtonLayout

StyledButtonLayout: string & StyledComponentBase<"div", DefaultTheme, __type, never> & object = styled(ButtonLayout)`margin-top: ${fromTheme('ws', 'xsmall')};margin-bottom: ${fromTheme('ws', 'xsmall')};`

Const StyledCampusIcon

StyledCampusIcon: string & StyledComponentBase<"strong", DefaultTheme, __type, never> & object = styled.strong`display: flex;align-items: center;justify-content: center;background-color: ${fromTheme('color', 'text', 'dark')};text-transform: capitalize;color: ${fromTheme('color', 'text', 'light')};border-radius: 50%;width: 1.5em;height: 1.5em;font-size: ${fromTheme('font', 'bold', 'size')};font-weight: ${fromTheme('font', 'bold', 'weight')};font-family: ${fromTheme('font', 'bold', 'family')};user-select: none;cursor: default;`

Const StyledDay

StyledDay: string & StyledComponentBase<"span", DefaultTheme, __type, never> & object = styled.span`grid-area: day;display: inline-block;max-width: max-content;min-width: max-content;`

Const StyledDeleteButton

StyledDeleteButton: string & StyledComponentBase<"span", DefaultTheme, __type, never> & object = styled.span`grid-area: delete;justify-self: start;`

Const StyledEditButton

StyledEditButton: string & StyledComponentBase<"span", DefaultTheme, __type, never> & object = styled.span`grid-area: edit;justify-self: end;`

Const StyledEnd

StyledEnd: string & StyledComponentBase<"span", DefaultTheme, __type, never> & object = styled.span`grid-area: end;min-width: max-content;`

Const StyledError

StyledError: string & StyledComponentBase<"span", DefaultTheme, __type, never> & object = styled.span`grid-area: error;justify-self: start;`

Const StyledFacultyNote

StyledFacultyNote: string & StyledComponentBase<"span", DefaultTheme, __type, never> & object = styled.span`font-style: italic;`

A component that applies styling for text that indicates the faculty has no associated notes

Const StyledMeetingInfo

StyledMeetingInfo: string & StyledComponentBase<"span", DefaultTheme, __type, never> & object = styled.span`grid-area: info;`

Const StyledMeetingRow

StyledMeetingRow: string & StyledComponentBase<"li", DefaultTheme, StyledMeetingRowProps, never> & object = styled.li<StyledMeetingRowProps>`display: grid;align-items: center;border-bottom: ${fromTheme('border', 'light')};grid-template-areas: ${({ isRowExpanded }) => (generateGrid(isRowExpanded))};grid-template-columns: min-content;grid-template-rows: ${({ isRowExpanded }) => (isRowExpanded? 'repeat(4, minmax(22px, auto));': '')};padding: ${fromTheme('ws', 'xsmall')} 0px;`

Const StyledRoom

StyledRoom: string & StyledComponentBase<"div", DefaultTheme, __type, never> & object = styled.div`grid-area: room;`

Const StyledShowCloseButtons

StyledShowCloseButtons: string & StyledComponentBase<"div", DefaultTheme, __type, never> & object = styled.div`grid-area: showclose;justify-self: end;> * {margin-left: ${fromTheme('ws', 'xsmall')};}`

Const StyledStart

StyledStart: string & StyledComponentBase<"span", DefaultTheme, __type, never> & object = styled.span`grid-area: start;min-width: max-content;`

Const StyledTimeslot

StyledTimeslot: string & StyledComponentBase<"span", DefaultTheme, __type, never> & object = styled.span`grid-area: timeslot;height: 100%;justify-self: end;`

Const StyledVerticalSpace

StyledVerticalSpace: string & StyledComponentBase<"div", DefaultTheme, __type, never> & object = styled.div`margin-top: ${fromTheme('ws', 'xsmall')};margin-bottom: ${fromTheme('ws', 'xsmall')};`

Const TimeRule

TimeRule: string & StyledComponentBase<"div", DefaultTheme, TimeRuleProps, never> & object = styled.div<TimeRuleProps>`grid-row: ${({ row }) => row + 2};grid-column: 1 / -1;border-top: ${({ rowStyle }) => `2px ${rowStyle} #ccc`};margin-left: 3em;`

A solid (for hour marks) or dashed (for 15-minute marks) rule that extends across the week display

Const UserContext

UserContext: Context<User> = createContext<User>(null)

Manage the currently logged-in user throught Context

Const WeekBlockWrapper

WeekBlockWrapper: string & StyledComponentBase<"div", DefaultTheme, object, never> & object = styled.div<WeekBlockWrapperProps>`display: grid;grid-template-columns: ${({ numColumns }) => `3em repeat(${numColumns}, auto)`};grid-template-rows: ${({ numRows, rowHeight }) => `3em repeat(${numRows}, ${rowHeight})`};grid-gap: 0em;padding: 0em;min-width: max-content;`

A wrapper around the entire week, which sets up the time-based grid

Const absences

absences: object[] = [{type: ABSENCE_TYPE.PARENTAL_LEAVE,faculty: 'Malan',},{type: ABSENCE_TYPE.PRESENT,faculty: 'Rycroft',},{type: ABSENCE_TYPE.PRESENT,faculty: 'Waldo',},{type: ABSENCE_TYPE.RESEARCH_LEAVE,faculty: 'Smith',},{type: ABSENCE_TYPE.PRESENT,faculty: 'Protopapas',},{type: ABSENCE_TYPE.RESEARCH_LEAVE,faculty: 'Rader',},{type: ABSENCE_TYPE.SABBATICAL_ELIGIBLE,faculty: 'Tanner',},{type: ABSENCE_TYPE.PRESENT,faculty: 'Narang',},{type: ABSENCE_TYPE.SABBATICAL,faculty: 'Moyer',},{type: ABSENCE_TYPE.PRESENT,faculty: 'Mundy',},{type: ABSENCE_TYPE.SABBATICAL,faculty: 'Rosen',},{type: ABSENCE_TYPE.SABBATICAL_ELIGIBLE,faculty: 'Wood',},{type: ABSENCE_TYPE.PRESENT,faculty: 'Glickman',},{type: ABSENCE_TYPE.SABBATICAL_ELIGIBLE,faculty: 'Tamer',},{type: ABSENCE_TYPE.PRESENT,faculty: 'Kozinsky',},{type: ABSENCE_TYPE.TEACHING_RELIEF,faculty: 'Lewis',},]

Const acadYear

acadYear: 2022 = 2022

Const adminRoomsResponse

adminRoomsResponse: RoomAdminResponse[] = [secRoomResponse,oxfordRoomResponse,bauerRoomResponse,]

An array of room responses, for use in testing the room admin table

Const adminUser

adminUser: User = new User({firstName: 'Admin',lastName: 'User',eppn: 'ABCDEFGHIJKLMN@harvard.edu',email: 'adminUser@seas.harvard.edu',groups: [GROUP.ADMIN],})

Const appVersion

appVersion: string = process.env.APP_VERSION

Const appliedMathFacultyMember

appliedMathFacultyMember: Faculty & object = Object.assign(new Faculty(), {id: '01ac81d4-9644-4d6b-9daa-022b26903130',area: Object.assign(new Area(), {id: 'ee5d2d73-801e-44a2-8e89-45942bf2de43',name: 'AM',}),firstName: 'Susan',lastName: 'Lee',HUID: '90132717',jointWith: 'PHYS (0.5 FTE SEAS)',notes: 'Prefers Allston campus',category: FACULTY_TYPE.LADDER,})

An example Faculty entry representing an applied math faculty member

Const areas

areas: object[] = [{ name: 'ACS' },{ name: 'AM' },{ name: 'AP' },{ name: 'BE' },{ name: 'CS' },{ name: 'EE' },{ name: 'ESE' },{ name: 'Mat & ME' },{ name: 'SEMINAR' },{ name: 'MDE' },]

Example of a list of academic areas A list of Area names that can be used to populate the database

Const array

array: string[] = ['Life', 'Universe', 'Everything']

An array of strings

Const bioengineeringFacultyMember

bioengineeringFacultyMember: Faculty & object = Object.assign(new Faculty(), {id: '38ae66ec-7589-4948-8e21-41d142db4d3b',area: 'BE',firstName: 'Amanda',lastName: 'Su',HUID: '50602117',category: FACULTY_TYPE.LADDER,})

An example Faculty entry representing an bio engineering faculty member

Const buildings

buildings: object[] = [{campus: 'Cambridge',name: 'Maxwell Dworkin',},{campus: 'Cambridge',name: 'Pierce Hall',},{campus: 'Cambridge',name: 'Northwest Building',},{campus: 'Allston',name: 'SEC',},{campus: 'Allston',name: '114 Western Avenue',},]

A list of building/campus associations that can be used to populate the database

Const campuses

campuses: object[] = [{ name: 'Allston' },{ name: 'Cambridge' },]

Example of campuses along with their building and room information A list of campuses that can be used to populate the database

Const catalogPrefixes

catalogPrefixes: string[] = ['AC', 'AM', 'AP', 'BE', 'CS', 'ES', 'ESE', 'GENED', 'SEMINAR']

Example of a list of catalog prefixes

Const courses

courses: object[] = [{title: 'Introduction to CS',area: 'CS',prefix: 'CS',number: '50',isUndergraduate: true,notes: '',private: false,sameAs: '',termPattern: TERM_PATTERN.FALL,isSEAS: IS_SEAS.Y,instances: {facultyHUIDs: ['11111111'],meetings: [{day: DAY.MON,startTime: '15:00:00',endTime: '17:00:00',room: 'Maxwell Dworkin G115',}],},},{title: 'Solving and Optimizing',area: 'AM',prefix: 'AM',number: '22A',isUndergraduate: false,notes: '',private: false,sameAs: '',termPattern: TERM_PATTERN.FALL,isSEAS: IS_SEAS.Y,instances: {facultyHUIDs: ['13131313'],meetings: [{day: DAY.MON,startTime: '10:30:00',endTime: '11:45:00',room: 'Maxwell Dworkin 220',},{day: DAY.WED,startTime: '10:30:00',endTime: '11:45:00',room: 'Maxwell Dworkin 220',},{day: DAY.FRI,startTime: '10:30:00',endTime: '11:45:00',room: 'Maxwell Dworkin 220',}],},},{title: 'Advanced Scientific Computing: Numerical Methods',area: 'AM',prefix: 'AM',number: '205',isUndergraduate: false,notes: '',private: false,sameAs: '',termPattern: TERM_PATTERN.FALL,isSEAS: IS_SEAS.Y,instances: {facultyHUIDs: ['12121212'],meetings: [{day: DAY.TUE,startTime: '10:30:00',endTime: '11:45:00',room: 'Maxwell Dworkin 220',},{day: DAY.THU,startTime: '10:30:00',endTime: '11:45:00',room: 'Maxwell Dworkin 220',}],},},{title: 'Critical Thinking in Data Science',area: 'ACS',prefix: 'AC',number: '221',isUndergraduate: false,notes: '',private: false,sameAs: '',termPattern: TERM_PATTERN.SPRING,isSEAS: IS_SEAS.Y,instances: {facultyHUIDs: ['13131313', '14141414'],meetings: [{day: DAY.TUE,startTime: '12:00:00',endTime: '13:15:00',room: 'SEC 2112',},{day: DAY.THU,startTime: '12:00:00',endTime: '13:15:00',room: 'SEC 2112',}],},},{title: 'Data Science 1: Introduction to Data Science',area: 'CS',prefix: 'CS',number: '109A',isUndergraduate: true,notes: '',private: false,sameAs: 'AC 209A, Stats 121A',termPattern: TERM_PATTERN.FALL,isSEAS: IS_SEAS.Y,instances: {facultyHUIDs: ['15151515','16161616','17171717',],meetings: [{day: DAY.MON,startTime: '13:30:00',endTime: '14:45:00',room: 'Northwest Building B101',},{day: DAY.WED,startTime: '13:30:00',endTime: '14:45:00',room: 'Northwest Building B101',}],},},{title: 'Data Science 1: Introduction to Data Science',area: 'ACS',prefix: 'AC',number: '209A',isUndergraduate: false,notes: '',private: false,sameAs: 'CS 109A',termPattern: TERM_PATTERN.FALL,isSEAS: IS_SEAS.Y,instances: {facultyHUIDs: [],meetings: [],},},{title: 'Data Science 1: Introduction to Data Science',area: 'ACS',prefix: 'STATS',number: '109A',isUndergraduate: true,notes: '',private: false,sameAs: 'CS 109A',termPattern: TERM_PATTERN.FALL,isSEAS: IS_SEAS.N,instances: {facultyHUIDs: [],meetings: [],},},{title: 'Data Science 2: Advanced Topics in Data Science',area: 'CS',prefix: 'CS',number: '109B',isUndergraduate: true,notes: '',private: false,sameAs: '',termPattern: TERM_PATTERN.SPRING,isSEAS: IS_SEAS.Y,instances: {facultyHUIDs: ['15151515','23232323','17171717',],meetings: [{day: DAY.MON,startTime: '15:00:00',endTime: '16:00:00',room: 'Northwest Building B101',},{day: DAY.WED,startTime: '15:00:00',endTime: '16:00:00',room: 'Northwest Building B101',}],},},{title: 'Data Science 2: Advanced Topics in Data Science',area: 'ACS',prefix: 'AC',number: '209B',isUndergraduate: false,notes: '',private: false,sameAs: 'CS 109B',termPattern: TERM_PATTERN.SPRING,isSEAS: IS_SEAS.Y,instances: {facultyHUIDs: [],meetings: [],},},{title: 'Data Science 2: Advanced Topics in Data Science',area: 'ACS',prefix: 'STATS',number: '109B',isUndergraduate: true,notes: '',private: false,sameAs: 'CS 109B',termPattern: TERM_PATTERN.SPRING,isSEAS: IS_SEAS.N,instances: {facultyHUIDs: [],meetings: [],},},{title: 'Computational Physics of Solids and Fields',area: 'AP',prefix: 'AP',number: '278',isUndergraduate: false,notes: '',private: false,sameAs: '',termPattern: TERM_PATTERN.FALL,isSEAS: IS_SEAS.Y,instances: {facultyHUIDs: ['18181818'],meetings: [{day: DAY.TUE,startTime: '13:30:00',endTime: '14:45:00',room: 'Pierce Hall 301',},{day: DAY.THU,startTime: '13:30:00',endTime: '14:45:00',room: 'Pierce Hall 301',}],},},{title: 'Introduction to Biomedical Imaging and Systems',area: 'BE',prefix: 'BE',number: '128',isUndergraduate: true,notes: '',private: false,sameAs: '',termPattern: TERM_PATTERN.SPRING,isSEAS: IS_SEAS.Y,instances: {facultyHUIDs: ['19191919'],meetings: [{day: DAY.TUE,startTime: '15:00:00',endTime: '16:15:00',room: '114 Western Avenue 200',},{day: DAY.THU,startTime: '15:00:00',endTime: '16:15:00',room: '114 Western Avenue 200',}],},},{title: 'Introduction to Solid State Physics',area: 'AP',prefix: 'AP',number: '195',isUndergraduate: true,notes: '',private: false,sameAs: '',termPattern: TERM_PATTERN.FALL,isSEAS: IS_SEAS.N,instances: {facultyHUIDs: ['20202020'],meetings: [{day: DAY.MON,startTime: '15:00:00',endTime: '16:30:00',room: 'Northwest Building 201',},{day: DAY.WED,startTime: '15:00:00',endTime: '16:30:00',room: 'Northwest Building 201',}],},},{title: 'Introduction to Solid State Physics',area: 'AP',prefix: 'PHYSICS',number: '195',isUndergraduate: true,notes: '',private: false,sameAs: 'AP 195',termPattern: TERM_PATTERN.FALL,isSEAS: IS_SEAS.N,instances: {facultyHUIDs: [],meetings: [],},},{title: 'Materials Selection',area: 'Mat & ME',prefix: 'ES',number: '1XX',isUndergraduate: true,notes: '',private: true,sameAs: '',termPattern: TERM_PATTERN.BOTH,isSEAS: IS_SEAS.Y,instances: {facultyHUIDs: [],meetings: [],},},{title: 'Computer-Aided Machine Design',area: 'Mat & ME',prefix: 'ES',number: '51',isUndergraduate: true,notes: '',private: false,sameAs: '',termPattern: TERM_PATTERN.BOTH,isSEAS: IS_SEAS.Y,instances: {facultyHUIDs: ['21212121'],meetings: [{day: DAY.MON,startTime: '15:00:00',endTime: '16:00:00',room: 'Maxwell Dworkin B151',},{day: DAY.WED,startTime: '15:00:00',endTime: '16:00:00',room: 'Maxwell Dworkin B151',},{day: DAY.FRI,startTime: '15:00:00',endTime: '16:00:00',room: 'Maxwell Dworkin B151',}],},},{title: 'IACS Seminar',area: 'SEMINAR',prefix: 'SEMINAR',number: 'IACS',isUndergraduate: false,notes: '',private: false,sameAs: '',termPattern: TERM_PATTERN.BOTH,isSEAS: IS_SEAS.Y,instances: {facultyHUIDs: [],meetings: [{day: DAY.FRI,startTime: '13:30:00',endTime: '14:45:00',room: 'Maxwell Dworkin G125',}],},},{title: 'Engineering the Acoustical World',area: 'EE',prefix: 'ES',number: '25',isUndergraduate: true,notes: '',private: false,sameAs: '',termPattern: TERM_PATTERN.FALL,isSEAS: IS_SEAS.Y,instances: {facultyHUIDs: ['22222222'],meetings: [{day: DAY.MON,startTime: '15:00:00',endTime: '16:00:00',room: 'SEC G500',},{day: DAY.WED,startTime: '15:00:00',endTime: '16:00:00',room: 'SEC G500',},{day: DAY.FRI,startTime: '15:00:00',endTime: '16:00:00',room: 'SEC G500',}],},},{title: 'Mechanical Systems',area: 'EE',prefix: 'ES',number: '125',isUndergraduate: true,notes: '',private: false,sameAs: '',termPattern: TERM_PATTERN.FALL,isSEAS: IS_SEAS.Y,instances: {facultyHUIDs: ['24242424'],meetings: [{day: DAY.MON,startTime: '15:00:00',endTime: '17:00:00',room: 'SEC 2112',},{day: DAY.WED,startTime: '15:00:00',endTime: '17:00:00',room: 'SEC 2112',},],},},{title: 'Introduction to Soft Matter',area: 'AP',prefix: 'AP',number: '225',isUndergraduate: true,notes: '',private: false,sameAs: '',termPattern: TERM_PATTERN.FALL,isSEAS: IS_SEAS.Y,instances: {facultyHUIDs: ['25252525'],meetings: [{day: DAY.MON,startTime: '15:00:00',endTime: '17:00:00',room: 'Northwest Building B101',},{day: DAY.WED,startTime: '15:00:00',endTime: '17:00:00',room: 'Northwest Building B101',},],},},{title: 'Special Topics in Computer Science',area: 'CS',prefix: 'CS',number: '299R',isUndergraduate: true,notes: '',private: false,sameAs: '',termPattern: TERM_PATTERN.BOTH,isSEAS: IS_SEAS.Y,instances: {facultyHUIDs: ['13131313',],meetings: [],},},]

A list of courses, with associated faculty, meetings, and rooms, which can used to populate the database

Const cs200Course

cs200Course: Course & object = Object.assign(new Course(), {id: '295976e9-3c36-4785-843e-84906668a924',area: {id: '735fb5ae-8716-4c53-8e07-b0dc5a2db24b',name: 'CS',},sameAs: null,title: 'Introduction to Computer Science',prefix: 'CS',number: '200',isSEAS: IS_SEAS.Y,termPattern: TERM_PATTERN.SPRING,isUndergraduate: true,})

An example Course representing CS 200.

Const cs50Course

cs50Course: Course & object = Object.assign(new Course(), {id: 'b8bc8456-51fd-48ef-b111-5a5990671cd1',area: {id: 'a49edd11-0f2d-4d8f-9096-a4062955a11a',name: 'CS',},sameAs: null,title: 'Introduction to Computer Science',prefix: 'CS',number: '050',isSEAS: IS_SEAS.Y,termPattern: TERM_PATTERN.FALL,isUndergraduate: true,})

An example Course representing CS 50.

Const currentAcademicYear

currentAcademicYear: 2021 = 2021

Example of an academic year

Const days

days: string[] = Object.values(DAY).map(dayEnumToString)

An array of days that guarantees the order from Monday to Friday.

Const defaultView

defaultView: COURSE_TABLE_COLUMN[] = [...MANDATORY_COLUMNS,COURSE_TABLE_COLUMN.MEETINGS,COURSE_TABLE_COLUMN.IS_SEAS,COURSE_TABLE_COLUMN.OFFERED,COURSE_TABLE_COLUMN.INSTRUCTORS,COURSE_TABLE_COLUMN.NOTES,]

Default View

This is the hard-coded default view that is shown when a user loads the page if there is no view saved in session Storage.

Const email

email: "help@seas.harvard.edu" = "help@seas.harvard.edu"

A string representing an email address

Const emptyCourse

emptyCourse: Course = new Course()

Empty instance of a Course entity with no properties set. Useful for testing that something of type Course was returned, or passed to a method

Const endpointTests

endpointTests: Endpoint[] = [{path: '/api/courses/',method: 'get',expectAnonymousAccess: false,expectAllowedGroup: GROUP.ADMIN,},{path: '/api/courses/',method: 'post',expectAnonymousAccess: false,expectAllowedGroup: GROUP.ADMIN,requestBody: dummy.createCourseDtoExample,},{path: `/api/courses/${dummy.uuid}`,method: 'put',expectAnonymousAccess: false,expectAllowedGroup: GROUP.ADMIN,requestBody: dummy.updateCourseExample,},{path: `/api/course-instances/?acadYear=${dummy.year}`,method: 'get',expectAnonymousAccess: false,expectAllowedGroup: GROUP.READ_ONLY,},{path: '/api/course-instances/multi-year-plan',method: 'get',expectAnonymousAccess: true,expectAllowedGroup: null,},{path: '/api/course-instances/schedule',method: 'get',expectAnonymousAccess: true,expectAllowedGroup: null,},{path: `/api/course-instances/${dummy.uuid}/instructors`,method: 'put',expectAnonymousAccess: false,expectAllowedGroup: GROUP.ADMIN,requestBody: { instructors: [] },},{path: '/api/faculty/',method: 'get',expectAnonymousAccess: false,expectAllowedGroup: GROUP.ADMIN,},{path: '/api/faculty/instructors',method: 'get',expectAnonymousAccess: false,expectAllowedGroup: GROUP.ADMIN,},{path: '/api/faculty/schedule',method: 'get',expectAnonymousAccess: false,expectAllowedGroup: GROUP.READ_ONLY,},{path: `/api/faculty/absence/${dummy.uuid}`,method: 'put',expectAnonymousAccess: false,expectAllowedGroup: GROUP.ADMIN,requestBody: dummy.facultyAbsenceRequest,},{path: `/api/faculty/${dummy.uuid}`,method: 'put',expectAnonymousAccess: false,expectAllowedGroup: GROUP.ADMIN,requestBody: dummy.appliedMathFacultyMemberRequest,},{path: '/health-check/',method: 'get',expectAnonymousAccess: true,expectAllowedGroup: null,},{path: '/api/rooms/',method: 'get',expectAnonymousAccess: false,expectAllowedGroup: GROUP.ADMIN,},{path: '/api/rooms/availability',method: 'get',expectAnonymousAccess: false,expectAllowedGroup: GROUP.ADMIN,},{path: `/api/meetings/${dummy.uuid}`,method: 'put',expectAnonymousAccess: false,expectAllowedGroup: GROUP.ADMIN,requestBody: dummy.mondayMeetingWithRoom,},{path: '/api/metadata/',method: 'get',expectAnonymousAccess: true,expectAllowedGroup: null,},{path: '/api/non-class-events/',method: 'get',expectAnonymousAccess: false,expectAllowedGroup: GROUP.NON_CLASS,},{path: '/api/non-class-events/',method: 'post',expectAnonymousAccess: false,expectAllowedGroup: GROUP.NON_CLASS,requestBody: dummy.createNonClassParent,},{path: `/api/non-class-events/${dummy.uuid}`,method: 'put',expectAnonymousAccess: false,expectAllowedGroup: GROUP.NON_CLASS,requestBody: dummy.createNonClassParent,},{path: '/api/users/current/',method: 'get',expectAnonymousAccess: false,expectAllowedGroup: null,},{path: `/api/course-instances/${dummy.uuid}`,method: 'put',expectAnonymousAccess: false,expectAllowedGroup: GROUP.ADMIN,},{path: '/report/courses',method: 'get',expectAnonymousAccess: false,expectAllowedGroup: GROUP.READ_ONLY,},]

Const enrollmentFields

enrollmentFields: EnrollmentField[] = [{name: 'Pre-Registration',key: 'preEnrollment',icon: null,},{name: 'Enrollment Deadline',key: 'studyCardEnrollment',icon: null,},{name: 'Final Enrollment',key: 'actualEnrollment',icon: null,},]

Array of enrollment fields used to generate the form in the modal

Const error

error: Error = new Error('Error')

An error

Const exec

exec: __promisify__ = promisify(child.exec)

Wraps Node's exec function for a promise interface

Const faculty

faculty: object[] = [{firstName: 'David',lastName: 'Malan',email: 'dmalan@seas.harvard.edu',HUID: '11111111',jointWith: null,category: FACULTY_TYPE.NON_LADDER,area: 'CS',notes: 'Prefers Cambridge campus',},{firstName: 'Christopher',lastName: 'Rycroft',email: 'crycroft@seas.harvard.edu',HUID: '12121212',jointWith: null,category: FACULTY_TYPE.LADDER,area: 'AM',notes: 'Prefers Allston campus',},{firstName: 'James',lastName: 'Waldo',email: 'jwaldo@seas.harvard.edu',HUID: '13131313',jointWith: null,category: FACULTY_TYPE.NON_LADDER,area: 'CS',notes: '',},{firstName: 'Michael',lastName: 'Smith',email: 'msmith@seas.harvard.edu',HUID: '14141414',jointWith: null,category: FACULTY_TYPE.LADDER,area: 'CS',notes: 'Prefers Cambridge campus',},{firstName: 'Pavlos',lastName: 'Protopapas',email: 'pprotopapas@seas.harvard.edu',HUID: '15151515',jointWith: null,category: FACULTY_TYPE.NON_LADDER,area: 'ACS',notes: 'Requesting room in MD',},{firstName: 'Kevin',lastName: 'Rader',email: 'krader@stats.harvard.edu',HUID: '16161616',jointWith: null,category: FACULTY_TYPE.NON_LADDER,area: 'ACS',notes: '',},{firstName: 'Christopher',lastName: 'Tanner',email: 'ctanner@seas.harvard.edu',HUID: '17171717',jointWith: null,category: FACULTY_TYPE.NON_LADDER,area: 'ACS',notes: 'Requesting room in SEC',},{firstName: 'Prineha',lastName: 'Narang',email: 'pnarang@seas.harvard.edu',HUID: '18181818',jointWith: null,category: FACULTY_TYPE.LADDER,area: 'Mat & ME',notes: 'Prefers Cambridge campus',},{firstName: 'Linsey',lastName: 'Moyer',email: 'lmoyer@seas.harvard.edu',HUID: '19191919',jointWith: null,category: FACULTY_TYPE.NON_LADDER,area: 'BE',notes: 'Requesting room in SEC',},{firstName: 'Julia',lastName: 'Mundy',email: 'jmundy@seas.harvard.edu',HUID: '20202020',jointWith: null,category: FACULTY_TYPE.NON_SEAS_LADDER,area: 'AP',notes: 'Requesting room in SEC',},{firstName: 'Michelle',lastName: 'Rosen',email: 'mrosen@seas.harvard.edu',HUID: '21212121',jointWith: null,category: FACULTY_TYPE.NON_LADDER,area: 'Mat & ME',notes: '',},{firstName: 'Robert',lastName: 'Wood',email: 'rwood@seas.harvard.edu',HUID: '22222222',jointWith: null,category: FACULTY_TYPE.LADDER,area: 'Mat & ME',notes: '',},{firstName: 'Mark',lastName: 'Glickman',email: 'mglickman@stats.harvard.edu',HUID: '23232323',jointWith: null,category: FACULTY_TYPE.NON_LADDER,area: 'ACS',notes: 'Prefers Allston campus',},{firstName: 'Elie',lastName: 'Tamer',email: 'etamer@stats.harvard.edu',HUID: '26262626',jointWith: null,category: FACULTY_TYPE.NON_LADDER,area: 'ACS',notes: '',},{firstName: 'Boris',lastName: 'Kozinsky',email: 'bkozinsky@seas.harvard.edu',HUID: '24242424',jointWith: null,category: FACULTY_TYPE.LADDER,area: 'EE',notes: 'Prefers Allston campus',},{firstName: 'Jennifer',lastName: 'Lewis',email: 'jlewis@seas.harvard.edu',HUID: '25252525',jointWith: null,category: FACULTY_TYPE.LADDER,area: 'AP',notes: 'Prefers Cambridge campus',},]

A list of faculty with associated Areas that can be used to populate the database

Const generalErrorMessage

generalErrorMessage: "Please fill in the required fields and try again. If the problem persists, contact SEAS Computing." = "Please fill in the required fields and try again. If the problem persists, contact SEAS Computing."

Const getCourseReport

getCourseReport: (Anonymous function) = ((range: ReportRange): Promise<void> => getReport(range, 'courses'))

Calls the getReport function for courses for a specified range

Const getFacultyReport

getFacultyReport: (Anonymous function) = ((range: ReportRange): Promise<void> => getReport(range, 'faculty'))

Calls the getReport function for faculty for a specified range

Const int

int: 42 = 42

An integer

Const meetingTimeSlots

meetingTimeSlots: object[] = [{label: '8:00 AM-9:00 AM',start: '08:00',end: '09:00',},{label: '9:00 AM-10:00 AM',start: '09:00',end: '10:00',},{label: '10:00 AM-11:00 AM',start: '10:00',end: '11:00',},{label: '11:00 AM-12:00 PM',start: '11:00',end: '12:00',},{label: '12:00 PM-1:00 PM',start: '12:00',end: '13:00',},{label: '1:00 PM-2:00 PM',start: '13:00',end: '14:00',},{label: '2:00 PM-3:00 PM',start: '14:00',end: '15:00',},{label: '3:00 PM-4:00 PM',start: '15:00',end: '16:00',},{label: '4:00 PM-5:00 PM',start: '16:00',end: '17:00',},{label: '5:00 PM-6:00 PM',start: '17:00',end: '18:00',},{label: '6:00 PM-7:00 PM',start: '18:00',end: '19:00',},{label: '7:00 PM-8:00 PM',start: '19:00',end: '20:00',},]

A placeholder list of one hour meeting times to prepopulate the meeting modal start and end times. This will be replaced with an official list of meeting times in the future.

Const modalFields

modalFields: ModalFieldsColumn[] = [{name: 'Area',key: 'area',columnGroup: COURSE_TABLE_COLUMN_GROUP.COURSE,viewColumn: COURSE_TABLE_COLUMN.AREA,},{name: 'Course',key: 'catalog-number',columnGroup: COURSE_TABLE_COLUMN_GROUP.COURSE,viewColumn: COURSE_TABLE_COLUMN.CATALOG_NUMBER,},{name: 'Title',key: 'title',columnGroup: COURSE_TABLE_COLUMN_GROUP.COURSE,viewColumn: COURSE_TABLE_COLUMN.TITLE,},{name: 'Same As',key: 'same-as',columnGroup: COURSE_TABLE_COLUMN_GROUP.COURSE,viewColumn: COURSE_TABLE_COLUMN.SAME_AS,},{name: 'Is SEAS?',key: 'is-seas',columnGroup: COURSE_TABLE_COLUMN_GROUP.COURSE,viewColumn: COURSE_TABLE_COLUMN.IS_SEAS,},{name: 'Is Undergraduate?',key: 'is-undergraduate',columnGroup: COURSE_TABLE_COLUMN_GROUP.COURSE,viewColumn: COURSE_TABLE_COLUMN.IS_UNDERGRADUATE,},{name: 'Offered',key: 'offered',columnGroup: COURSE_TABLE_COLUMN_GROUP.SEMESTER,viewColumn: COURSE_TABLE_COLUMN.OFFERED,},{name: 'Instructors',key: 'instructors',columnGroup: COURSE_TABLE_COLUMN_GROUP.SEMESTER,viewColumn: COURSE_TABLE_COLUMN.INSTRUCTORS,},{name: 'Meetings',key: 'meetings',columnGroup: COURSE_TABLE_COLUMN_GROUP.SEMESTER,viewColumn: COURSE_TABLE_COLUMN.MEETINGS,},{name: 'Enrollment',key: 'enrollment',columnGroup: COURSE_TABLE_COLUMN_GROUP.SEMESTER,viewColumn: COURSE_TABLE_COLUMN.ENROLLMENT,},{name: 'Notes',key: 'notes',columnGroup: COURSE_TABLE_COLUMN_GROUP.META,viewColumn: COURSE_TABLE_COLUMN.NOTES,},]

An array of objects that define the data in the [[CourseInstanceList]], and provide a method for outputting it in the correct format.

Const module

module: NodeModule & object

Const nonClassEventManager

nonClassEventManager: User = new User({firstName: 'Non-class Event',lastName: 'Manager',eppn: 'MLKJIHGFEDCBAZ@harvard.edu',email: 'nonClasseventManager@seas.harvard.edu',groups: [GROUP.NON_CLASS],})

A User authorized to manage non-class events

Const nonClassMeetings

nonClassMeetings: (object | object)[] = [{title: 'Computer Science Area Meeting',contactName: 'James Waldo',contactEmail: 'j.waldo@harvard.edu',contactPhone: '(123)-456-7890',expectedSize: 16,notes: null,private: false,meetings: [{day: DAY.TUE,startTime: '11:00:00',endTime: '12:00:00',room: 'Maxwell Dworkin B151',},],},{title: 'Active Learning Labs Staff Meeting',contactName: 'Nishant V. Sule',contactEmail: '',contactPhone: '(111)-222-3333',expectedSize: 26,notes: 'some notes',private: false,meetings: [{day: DAY.THU,startTime: '11:00:00',endTime: '12:00:00',room: '114 Western Avenue 200',},],},{title: 'Quantum Lab Meeting',contactName: 'Pri Narang',contactEmail: '',contactPhone: '',expectedSize: null,private: false,meetings: [],},]

Const nullUser

nullUser: User = new User()

A "blank" user to simulate anonymous sessions

Const physicsCourse

physicsCourse: Course & object = Object.assign(new Course(), {id: 'a1a13689-a925-4d0b-a4fc-21c93263c6d2',area: {id: 'b8bc8456-51fd-48ef-b111-5a5990671cd1',name: 'AP',},title: 'Introduction to Quantum Theory of Solids',prefix: 'AP',number: '295a',isSEAS: IS_SEAS.Y,termPattern: TERM_PATTERN.SPRING,isUndergraduate: true,})

An example Course representing AP 295a.

Const rawAreaList

rawAreaList: object[] = [{ name: 'ACS' },{ name: 'AM' },{ name: 'AP' },{ name: 'BE' },{ name: 'CS' },{ name: 'EE' },{ name: 'ESE' },{ name: 'General' },{ name: 'Mat & ME' },{ name: 'MDE' },{ name: 'MSMBA' },{ name: 'SEM' },]

A collection of area data, as returned by the database query in [[AreaService#find]]

Const rawCatalogPrefixList

rawCatalogPrefixList: object[] = [{ prefix: 'AC' },{ prefix: 'AM' },{ prefix: 'AP' },{ prefix: 'BE' },{ prefix: 'CS' },{ prefix: 'ES' },{ prefix: 'ESE' },{ prefix: 'GENED' },{ prefix: 'SEMINAR' },]

A collection of catalog prefix data, as returned by the database query in [[CourseService#getCatalogPrefixList]]

Const rawSemesterList

rawSemesterList: object[] = [{ term: 'SPRING', year: 2018, termOrder: 1 },{ term: 'FALL', year: 2018, termOrder: 2 },{ term: 'SPRING', year: 2019, termOrder: 1 },{ term: 'FALL', year: 2019, termOrder: 2 },{ term: 'SPRING', year: 2020, termOrder: 1 },{ term: 'FALL', year: 2020, termOrder: 2 },{ term: 'SPRING', year: 2021, termOrder: 1 },{ term: 'FALL', year: 2021, termOrder: 2 },{ term: 'SPRING', year: 2022, termOrder: 1 },]

A collection of semester data, as returned by the database query in [[SemesterService#getSemesterList]]

Const rawYearList

rawYearList: object[] = [{ year: '2018' },{ year: '2019' },{ year: '2020' },{ year: '2021' },]

A collection of year data, as returned by the database query in [[SemesterService#getYearList]]

Const readOnlyUser

readOnlyUser: User = new User({firstName: 'ReadOnly',lastName: 'User',eppn: 'ZYXWVUTSRQPONM@harvard.edu',email: 'readOnlyUser@seas.harvard.edu',groups: [GROUP.READ_ONLY],})

Const refDate

refDate: Date = new Date(2021, 0, 1)

A reference date of January 1, 2021 to use for date comparisons. This date is chosen because:

  1. It's not in Daylight Savings Time
  2. Timezone errors should be very apparent, since the previous date is December 31, 2020

Const regularUser

regularUser: User = new User({firstName: 'Regular',lastName: 'User',eppn: '4A2849CF119852@harvard.edu',email: 'regularUser@seas.harvard.edu',})

Const roomSelectionPromptMessage

roomSelectionPromptMessage: "Add meeting time and click "Show Rooms" to view availability" = "Add meeting time and click "Show Rooms" to view availability"

The message shown inside the Room Selection prompt

Const rooms

rooms: object[] = [{building: 'Maxwell Dworkin',name: 'G115',capacity: 200,},{building: 'Maxwell Dworkin',name: 'G125',capacity: 100,},{building: 'Maxwell Dworkin',name: 'B151',capacity: 23,},{building: 'Maxwell Dworkin',name: '220',capacity: 42,},{building: 'Pierce Hall',name: '301',capacity: 200,},{building: 'Northwest Building',name: 'B101',capacity: 300,},{building: 'Northwest Building',name: '201',capacity: 64,},{building: 'SEC',name: 'G500',capacity: 500,},{building: 'SEC',name: '2112',capacity: 87,},{building: '114 Western Avenue',name: '200',capacity: 141,},]

A list of room name and building associations that can be used to populate the database

Const rowHeight

rowHeight: "0.5em" = "0.5em"

Const safeString

safeString: "dont-panic" = "dont-panic"

A single string with no spaces or special characters

Const semesters

semesters: object[] = [{ academicYear: 2017, term: TERM.FALL },{ academicYear: 2018, term: TERM.SPRING },{ academicYear: 2018, term: TERM.FALL },{ academicYear: 2019, term: TERM.SPRING },{ academicYear: 2019, term: TERM.FALL },{ academicYear: 2020, term: TERM.SPRING },{ academicYear: 2020, term: TERM.FALL },{ academicYear: 2021, term: TERM.SPRING },{ academicYear: 2021, term: TERM.FALL },{ academicYear: 2022, term: TERM.SPRING },]

Example of a list of semesters A list of semesters that can be used to populate the database

Const string

string: "Don't Panic" = "Don't Panic"

A single string

Const tableFields

tableFields: CourseInstanceListColumn[] = [{name: 'Area',key: 'area',columnGroup: COURSE_TABLE_COLUMN_GROUP.COURSE,viewColumn: COURSE_TABLE_COLUMN.AREA,FieldContent: retrieveValue('area'),getFilter: generateDropdown('area'),},{name: 'Course',key: 'catalog-number',columnGroup: COURSE_TABLE_COLUMN_GROUP.COURSE,viewColumn: COURSE_TABLE_COLUMN.CATALOG_NUMBER,FieldContent: retrieveValue('catalogNumber'),getFilter: generateTextField('catalogNumber'),},{name: 'Title',key: 'title',columnGroup: COURSE_TABLE_COLUMN_GROUP.COURSE,viewColumn: COURSE_TABLE_COLUMN.TITLE,FieldContent: retrieveValue('title'),getFilter: generateTextField('title'),},{name: 'Same As',key: 'same-as',columnGroup: COURSE_TABLE_COLUMN_GROUP.COURSE,viewColumn: COURSE_TABLE_COLUMN.SAME_AS,FieldContent: retrieveValue('sameAs'),},{name: 'Is SEAS?',key: 'is-seas',columnGroup: COURSE_TABLE_COLUMN_GROUP.COURSE,viewColumn: COURSE_TABLE_COLUMN.IS_SEAS,FieldContent: retrieveValue('isSEAS'),getFilter: generateDropdown('isSEAS'),},{name: 'Is Undergraduate?',key: 'is-undergraduate',columnGroup: COURSE_TABLE_COLUMN_GROUP.COURSE,viewColumn: COURSE_TABLE_COLUMN.IS_UNDERGRADUATE,FieldContent: retrieveValue('isUndergraduate'),},{name: 'Offered',key: 'offered-fall',columnGroup: COURSE_TABLE_COLUMN_GROUP.FALL,viewColumn: COURSE_TABLE_COLUMN.OFFERED,FieldContent: formatOffered(TERM.FALL),getFilter: generateDropdown('fall', 'offered'),},{name: 'Instructors',key: 'instructors-fall',columnGroup: COURSE_TABLE_COLUMN_GROUP.FALL,viewColumn: COURSE_TABLE_COLUMN.INSTRUCTORS,FieldContent: formatInstructors(TERM.FALL),getFilter: generateTextField('fall', 'instructors'),},{name: 'Meetings',key: 'meetings-fall',columnGroup: COURSE_TABLE_COLUMN_GROUP.FALL,viewColumn: COURSE_TABLE_COLUMN.MEETINGS,FieldContent: formatMeetings(TERM.FALL),},{name: 'Enrollment',key: 'enrollment-fall',columnGroup: COURSE_TABLE_COLUMN_GROUP.FALL,viewColumn: COURSE_TABLE_COLUMN.ENROLLMENT,FieldContent: formatEnrollment(TERM.FALL),},{name: 'Offered',key: 'offered-spring',columnGroup: COURSE_TABLE_COLUMN_GROUP.SPRING,viewColumn: COURSE_TABLE_COLUMN.OFFERED,FieldContent: formatOffered(TERM.SPRING),getFilter: generateDropdown('spring', 'offered'),},{name: 'Instructors',key: 'instructors-spring',columnGroup: COURSE_TABLE_COLUMN_GROUP.SPRING,viewColumn: COURSE_TABLE_COLUMN.INSTRUCTORS,FieldContent: formatInstructors(TERM.SPRING),getFilter: generateTextField('spring', 'instructors'),},{name: 'Meetings',key: 'meetings-spring',columnGroup: COURSE_TABLE_COLUMN_GROUP.SPRING,viewColumn: COURSE_TABLE_COLUMN.MEETINGS,FieldContent: formatMeetings(TERM.SPRING),},{name: 'Enrollment',key: 'enrollment-spring',columnGroup: COURSE_TABLE_COLUMN_GROUP.SPRING,viewColumn: COURSE_TABLE_COLUMN.ENROLLMENT,FieldContent: formatEnrollment(TERM.SPRING),},{name: 'Notes',key: 'notes',columnGroup: COURSE_TABLE_COLUMN_GROUP.META,viewColumn: COURSE_TABLE_COLUMN.NOTES,FieldContent: ({course,openNotesModal,buttonRef,}: FieldContentProps): ReactElement => {const { notes } = course;const hasNotes = notes && notes.trim().length > 0;const titleText = `Open notes for ${course.catalogNumber}`;return (<BorderlessButtonid={`notes-${course.id}`}variant={VARIANT.INFO}onClick={({ currentTarget }) => {openNotesModal(course, currentTarget.id);}}aria-label={titleText}forwardRef={buttonRef}><FontAwesomeIcontitle={titleText}icon={hasNotes ? withNotes : withoutNotes}/></BorderlessButton>);},},]

An array of objects that define the data in the [[CourseInstanceList]], and provide a method for outputting it in the correct format.

Const testCourseScheduleData

testCourseScheduleData: ScheduleViewResponseDTO[] = [{id: 'CSMON09001015FALL2018',coursePrefix: 'CS',weekday: DAY.MON,startHour: 9,startMinute: 0,endHour: 10,endMinute: 15,duration: 75,courses: [{id: '0b4adc13-5a53-489d-97e5-8cce379148a7',instanceId: 'da806338-6ad8-4e54-a49e-f25d9c29da38',courseNumber: '165',isUndergraduate: true,campus: 'Cambridge',room: 'LISE Lab for Integrated Science &amp; Engr LISE_300_Third Floor Open Area',},{id: '737fda78-bae4-49ea-b166-96218b642dfe',instanceId: '51000705-1754-419d-8d5d-ddd599058f84',courseNumber: '282r',isUndergraduate: false,campus: 'Cambridge',room: 'Science Center ScienceCtr_Hall D',},],},{id: 'ESMON09001015FALL2018',coursePrefix: 'ES',weekday: DAY.MON,startHour: 9,startMinute: 0,endHour: 10,endMinute: 15,duration: 75,courses: [{id: 'b234a6d1-2ade-45bc-91fb-690ca41877f9',instanceId: '7988f5f6-f45d-4b70-ab54-437ab7fa0737',courseNumber: '121',isUndergraduate: true,campus: 'Cambridge',room: 'Bauer Laboratory Bauer G18 SCRB Lobby',},],},{id: 'CSWED09001015FALL2018',coursePrefix: 'CS',weekday: DAY.WED,startHour: 9,startMinute: 0,endHour: 10,endMinute: 15,duration: 75,courses: [{id: 'b97a0c74-3034-4856-bbc8-e7624070ddcc',instanceId: 'da806338-6ad8-4e54-a49e-f25d9c29da38',courseNumber: '165',isUndergraduate: true,campus: 'Cambridge',room: 'LISE Lab for Integrated Science &amp; Engr LISE_300_Third Floor Open Area',},{id: 'c4b7b26b-6acf-43e7-8ba2-cbb21c28063e',instanceId: '51000705-1754-419d-8d5d-ddd599058f84',courseNumber: '282r',isUndergraduate: false,campus: 'Cambridge',room: 'Science Center ScienceCtr_Hall D',},],},{id: 'CSFRI09001015FALL2018',coursePrefix: 'CS',weekday: DAY.FRI,startHour: 9,startMinute: 0,endHour: 10,endMinute: 15,duration: 75,courses: [{id: '58e2d8a0-38e6-49ad-9f86-e8f932b3036a',instanceId: 'da806338-6ad8-4e54-a49e-f25d9c29da38',courseNumber: '165',isUndergraduate: true,campus: 'Cambridge',room: 'LISE Lab for Integrated Science &amp; Engr LISE_300_Third Floor Open Area',},{id: '168ad602-f328-4168-876f-b9ab8754e7e2',instanceId: '51000705-1754-419d-8d5d-ddd599058f84',courseNumber: '282r',isUndergraduate: false,campus: 'Cambridge',room: 'Science Center ScienceCtr_Hall D',},],},]

A fake set of data for the Schedule interface in the UI

Const testFourYearPlan

testFourYearPlan: MultiYearPlanResponseDTO[] = [{id: '37b66373-5000-43f2-9c14-8c2426273785',catalogPrefix: 'AP',catalogNumber: 'AP 275',title: 'Computational Design of Materials',semesters: [{id: 'ecf56c0b-0ba9-4532-b1ba-177071aac2e1',academicYear: '2020',calendarYear: '2019',term: TERM.FALL,instance: {id: '4dcef6f9-4e3e-49c0-a369-c30ab9615b96',faculty: [{id: '4dcef6f9-4e3e-49c0-a369-c30ab9615b96',displayName: 'Masahiro, Morii',instructorOrder: 0,},],},},{id: '49372311-991d-45a7-a1bf-2ba967d62663',academicYear: '2020',calendarYear: '2020',term: TERM.SPRING,instance: {id: '85d2ecdf-6015-4510-98ed-3b55991d2aea',faculty: [{id: '4dcef6f9-4e3e-49c0-a369-c30ab9615b96',displayName: 'Masahiro, Morii',instructorOrder: 0,},{id: 'f696d531-aef2-413f-9922-f480aa9d6039',displayName: 'Rycroft, Christopher',instructorOrder: 1,},{id: '05d04a88-8db2-46fe-8b87-aa70244ad655',displayName: 'Yacoby, Amir',instructorOrder: 2,},],},},{id: '7dd78af1-8821-4aba-b617-279922b7ffab',academicYear: '2021',calendarYear: '2020',term: TERM.FALL,instance: {id: '441c517f-bc48-46e3-86c2-4949d1908c5d',faculty: [{id: '4dcef6f9-4e3e-49c0-a369-c30ab9615b96',displayName: 'Masahiro, Morii',instructorOrder: 0,},],},},{id: '5f700cd5-9ff9-48a7-875d-2a7b7dc290ea',academicYear: '2021',calendarYear: '2021',term: TERM.SPRING,instance: {id: '127b33e4-e59a-43cb-a832-d5fc62a702ec',faculty: [{id: '4dcef6f9-4e3e-49c0-a369-c30ab9615b96',displayName: 'Masahiro, Morii',instructorOrder: 0,},{id: 'f696d531-aef2-413f-9922-f480aa9d6039',displayName: 'Rycroft, Christopher',instructorOrder: 1,},{id: '05d04a88-8db2-46fe-8b87-aa70244ad655',displayName: 'Yacoby, Amir',instructorOrder: 2,},],},},{id: '73d1ee13-8b05-46d9-86fc-9e86442f94bd',academicYear: '2022',calendarYear: '2021',term: TERM.FALL,instance: {id: 'bbc7492a-71b2-489b-a9ec-a0a052c4f5c8',faculty: [{id: '4dcef6f9-4e3e-49c0-a369-c30ab9615b96',displayName: 'Masahiro, Morii',instructorOrder: 0,},{id: '513e9576-cdc5-4911-8d1c-3f95c1bdc6cd',displayName: 'Golub, Benjamin',instructorOrder: 1,},],},},{id: '0dfa51cc-673b-4238-abc7-0908e9e57468',academicYear: '2022',calendarYear: '2022',term: TERM.SPRING,instance: {id: 'a9db3a67-f688-4474-a9ef-ae05d1327f4f',faculty: [{id: '4dcef6f9-4e3e-49c0-a369-c30ab9615b96',displayName: 'Masahiro, Morii',instructorOrder: 0,},{id: 'f696d531-aef2-413f-9922-f480aa9d6039',displayName: 'Rycroft, Christopher',instructorOrder: 1,},],},},{id: '83f73535-dbae-48b1-a73e-e3792358ab8d',academicYear: '2023',calendarYear: '2022',term: TERM.FALL,instance: {id: '61c48ebb-8025-43be-9d01-df057df74674',faculty: [],},},{id: '1e6e51ba-adc9-4526-a0b1-0dcb71e3d38e',academicYear: '2023',calendarYear: '2023',term: TERM.SPRING,instance: {id: '1f8cc026-d8bf-429d-9fdb-32b89cfdce9d',faculty: [],},},],},{id: '9a07e8a3-d6d5-4e89-9d32-8ad04785b9ab',catalogPrefix: 'ES',catalogNumber: 'ES 115',title: 'Mathematical Modeling',semesters: [{id: 'ecf56c0b-0ba9-4532-b1ba-177071aac2e1',academicYear: '2020',calendarYear: '2019',term: TERM.FALL,instance: {id: '7dd78af1-8821-4aba-b617-279922b7ffab',faculty: [{id: 'be64ce4b-081d-4987-8414-681bc5ca3193',displayName: 'Klecker, Nancy',instructorOrder: 0,},],},},{id: '49372311-991d-45a7-a1bf-2ba967d62663',academicYear: '2020',calendarYear: '2020',term: TERM.SPRING,instance: {id: 'be64ce4b-081d-4987-8414-681bc5ca3193',faculty: [{id: '441c517f-bc48-46e3-86c2-4949d1908c5d',displayName: 'Chen, Yiling',instructorOrder: 0,},{id: 'be64ce4b-081d-4987-8414-681bc5ca3193',displayName: 'Klecker, Nancy',instructorOrder: 1,},],},},{id: '7dd78af1-8821-4aba-b617-279922b7ffab',academicYear: '2021',calendarYear: '2020',term: TERM.FALL,instance: {id: 'e3c785a1-d917-44a2-8349-829d05103de6',faculty: [{id: '441c517f-bc48-46e3-86c2-4949d1908c5d',displayName: 'Chen, Yiling',instructorOrder: 0,},{id: 'be64ce4b-081d-4987-8414-681bc5ca3193',displayName: 'Klecker, Nancy',instructorOrder: 1,},{id: '91c44209-68ff-4f3e-91b8-288709a49f26',displayName: 'Shapiro, Avi',instructorOrder: 2,},],},},{id: '5f700cd5-9ff9-48a7-875d-2a7b7dc290ea',academicYear: '2021',calendarYear: '2021',term: TERM.SPRING,instance: {id: 'bbc7492a-71b2-489b-a9ec-a0a052c4f5c8',faculty: [{id: '91c44209-68ff-4f3e-91b8-288709a49f26',displayName: 'Shapiro, Avi',instructorOrder: 0,},],},},{id: '73d1ee13-8b05-46d9-86fc-9e86442f94bd',academicYear: '2022',calendarYear: '2021',term: TERM.FALL,instance: {id: 'cb489cc5-a7bd-4e29-b465-71d88ca73b71',faculty: [{id: 'be64ce4b-081d-4987-8414-681bc5ca3193',displayName: 'Klecker, Nancy',instructorOrder: 0,},{id: '91c44209-68ff-4f3e-91b8-288709a49f26',displayName: 'Shapiro, Avi',instructorOrder: 1,},],},},{id: '0dfa51cc-673b-4238-abc7-0908e9e57468',academicYear: '2022',calendarYear: '2022',term: TERM.SPRING,instance: {id: '5f700cd5-9ff9-48a7-875d-2a7b7dc290ea',faculty: [{id: 'be64ce4b-081d-4987-8414-681bc5ca3193',displayName: 'Klecker, Nancy',instructorOrder: 0,},{id: '441c517f-bc48-46e3-86c2-4949d1908c5d',displayName: 'Chen, Yiling',instructorOrder: 1,},],},},{id: '83f73535-dbae-48b1-a73e-e3792358ab8d',academicYear: '2023',calendarYear: '2022',term: TERM.FALL,instance: {id: '127b33e4-e59a-43cb-a832-d5fc62a702ec',faculty: [{id: 'be64ce4b-081d-4987-8414-681bc5ca3193',displayName: 'Klecker, Nancy',instructorOrder: 0,},],},},{id: '1e6e51ba-adc9-4526-a0b1-0dcb71e3d38e',academicYear: '2023',calendarYear: '2023',term: TERM.SPRING,instance: {id: 'c1b15206-8df8-483b-91e3-58a3911d15e7',faculty: [{id: 'be64ce4b-081d-4987-8414-681bc5ca3193',displayName: 'Klecker, Nancy',instructorOrder: 0,},{id: '441c517f-bc48-46e3-86c2-4949d1908c5d',displayName: 'Chen, Yiling',instructorOrder: 1,},{id: '91c44209-68ff-4f3e-91b8-288709a49f26',displayName: 'Shapiro, Avi',instructorOrder: 2,},],},},],},{id: 'b7dfe6fa-668a-4b89-912a-520c8aac8e6a',catalogPrefix: 'CS',catalogNumber: 'CS 223',title: 'Probabilistic Analysis and Algorithms',semesters: [{id: 'ecf56c0b-0ba9-4532-b1ba-177071aac2e1',academicYear: '2020',calendarYear: '2019',term: TERM.FALL,instance: {id: '2ca4b43f-1c73-4e17-a7d4-bd6f347d30d6',faculty: [{id: 'd1130416-cf7f-41eb-8a16-e93d97205142',displayName: 'Brooks, David',instructorOrder: 0,},{id: '50b38487-e035-4e40-a48d-9b603ac7dfe1',displayName: 'Goldsmith, Mara',instructorOrder: 1,},],},},{id: '49372311-991d-45a7-a1bf-2ba967d62663',academicYear: '2020',calendarYear: '2020',term: TERM.SPRING,instance: {id: '508cacd5-6e75-4c3c-83a3-d274c00770e4',faculty: [{id: 'd1130416-cf7f-41eb-8a16-e93d97205142',displayName: 'Brooks, David',instructorOrder: 0,},{id: '50b38487-e035-4e40-a48d-9b603ac7dfe1',displayName: 'Goldsmith, Mara',instructorOrder: 1,},{id: '54284de9-2b2c-4aac-915f-f960f319d3db',displayName: 'Dawson, Emily',instructorOrder: 2,},],},},{id: '7dd78af1-8821-4aba-b617-279922b7ffab',academicYear: '2021',calendarYear: '2020',term: TERM.FALL,instance: {id: 'abefdab5-49e7-4865-a22c-7a6b04a7ac42',faculty: [{id: 'd1130416-cf7f-41eb-8a16-e93d97205142',displayName: 'Brooks, David',instructorOrder: 0,},{id: '50b38487-e035-4e40-a48d-9b603ac7dfe1',displayName: 'Goldsmith, Mara',instructorOrder: 1,},{id: '54284de9-2b2c-4aac-915f-f960f319d3db',displayName: 'Dawson, Emily',instructorOrder: 2,},],},},{id: '5f700cd5-9ff9-48a7-875d-2a7b7dc290ea',academicYear: '2021',calendarYear: '2021',term: TERM.SPRING,instance: {id: 'b3eadbe3-816f-4219-836a-9fca021dcc86',faculty: [{id: 'd1130416-cf7f-41eb-8a16-e93d97205142',displayName: 'Brooks, David',instructorOrder: 0,},{id: '54284de9-2b2c-4aac-915f-f960f319d3db',displayName: 'Dawson, Emily',instructorOrder: 1,},],},},{id: '73d1ee13-8b05-46d9-86fc-9e86442f94bd',academicYear: '2022',calendarYear: '2021',term: TERM.FALL,instance: {id: '155938bd-a4fb-47c1-9dfb-2c33480535ef',faculty: [{id: '54284de9-2b2c-4aac-915f-f960f319d3db',displayName: 'Dawson, Emily',instructorOrder: 0,},],},},{id: '0dfa51cc-673b-4238-abc7-0908e9e57468',academicYear: '2022',calendarYear: '2022',term: TERM.SPRING,instance: {id: 'a2bdd06f-44b7-49c5-a4c6-ae3a01c07e7d',faculty: [{id: 'd1130416-cf7f-41eb-8a16-e93d97205142',displayName: 'Brooks, David',instructorOrder: 0,},{id: '50b38487-e035-4e40-a48d-9b603ac7dfe1',displayName: 'Goldsmith, Mara',instructorOrder: 1,},{id: '54284de9-2b2c-4aac-915f-f960f319d3db',displayName: 'Dawson, Emily',instructorOrder: 2,},],},},{id: '83f73535-dbae-48b1-a73e-e3792358ab8d',academicYear: '2023',calendarYear: '2022',term: TERM.FALL,instance: {id: 'f397e975-75db-4cf0-a4d7-7f929e376e83',faculty: [{id: '54284de9-2b2c-4aac-915f-f960f319d3db',displayName: 'Dawson, Emily',instructorOrder: 0,},],},},{id: '1e6e51ba-adc9-4526-a0b1-0dcb71e3d38e',academicYear: '2023',calendarYear: '2023',term: TERM.SPRING,instance: {id: 'be77d84c-dc60-44c0-8d74-77187d63ce20',faculty: [{id: 'd1130416-cf7f-41eb-8a16-e93d97205142',displayName: 'Brooks, David',instructorOrder: 0,},{id: '50b38487-e035-4e40-a48d-9b603ac7dfe1',displayName: 'Goldsmith, Mara',instructorOrder: 1,},],},},],}]

Data representing a four year plan, which contains semesters from Spring 2019 to Fall 2022. This four year plan contains data for AP 275, ES 115, and CS 223.

Const testFourYearPlanAcademicYears

testFourYearPlanAcademicYears: number[] = [2020, 2021, 2022, 2023]

The academic years corresponding to testFourYearPlan

Const testMetadata

testMetadata: MetadataContextValue = new MetadataContextValue(currentMetadata, (update) => {Object.assign(currentMetadata, update);})

Const testMultiYearPlanStartYear

testMultiYearPlanStartYear: 2020 = 2020

The starting academic year for the multi year plan test data

Const testRoomScheduleData

testRoomScheduleData: RoomScheduleResponseDTO[] = [{id: 'AM10MON10301200FALL2022',catalogNumber: 'AM 10',title: 'Applied Math for Computation',isUndergraduate: true,faculty: [{id: '5c8e015f-eae6-4586-9eb0-fc7d243403bf',displayName: 'Rogers, Chris',notes: 'Prefers room with whiteboard',instructorOrder: 1,},{id: 'effb8b1f-0525-42d0-bcbe-29206121d8ac',displayName: 'Waldo, James',notes: 'Prefers Allston campus',instructorOrder: 0,},],weekday: DAY.MON,startHour: 10,startMinute: 0,endHour: 12,endMinute: 30,duration: 150,},{id: 'CS226TUE10301230FALL2022',catalogNumber: 'CS 226',title: 'Sketching Algorithms for Big Data',isUndergraduate: false,faculty: [{id: '907bcf6a-7000-449d-ba54-16f9954ee4ba',displayName: 'Malan, David',notes: 'Prefers Cambridge campus',instructorOrder: 0,},{id: '1c852f5d-8b8c-46f5-87c9-fa59bf7c53cf',displayName: 'Yu, Brian',notes: 'Prefers Allston campus',instructorOrder: 1,},],weekday: DAY.TUE,startHour: 11,startMinute: 30,endHour: 12,endMinute: 30,duration: 120,},{id: 'CHEM060THU01300330FALL2022',catalogNumber: 'CHEM 060',title: 'Foundations of Physical Chemistry',isUndergraduate: true,faculty: [{id: 'cb61d580-646a-487e-9151-6f0ee6fd692e',displayName: 'Tamer, Elie',notes: '',instructorOrder: 0,},{id: '9fd2b512-b832-427f-b91c-6472d01dec9d',displayName: 'Shapiro, Avi',notes: '',instructorOrder: 1,},],weekday: DAY.THU,startHour: 1,startMinute: 30,endHour: 3,endMinute: 30,duration: 120,},]

A fake set of data for the Room Schedule interface in the UI

Const testThreeYearPlan

testThreeYearPlan: MultiYearPlanResponseDTO[] = [{id: '37b66373-5000-43f2-9c14-8c2426273785',catalogPrefix: 'AP',catalogNumber: 'AP 275',title: 'Computational Design of Materials',semesters: [{id: 'ecf56c0b-0ba9-4532-b1ba-177071aac2e1',academicYear: '2020',calendarYear: '2019',term: TERM.FALL,instance: {id: '4dcef6f9-4e3e-49c0-a369-c30ab9615b96',faculty: [{id: '4dcef6f9-4e3e-49c0-a369-c30ab9615b96',displayName: 'Masahiro, Morii',instructorOrder: 0,},],},},{id: '49372311-991d-45a7-a1bf-2ba967d62663',academicYear: '2020',calendarYear: '2020',term: TERM.SPRING,instance: {id: '85d2ecdf-6015-4510-98ed-3b55991d2aea',faculty: [{id: 'f696d531-aef2-413f-9922-f480aa9d6039',displayName: 'Rycroft, Christopher',instructorOrder: 0,},{id: '4dcef6f9-4e3e-49c0-a369-c30ab9615b96',displayName: 'Masahiro, Morii',instructorOrder: 1,},{id: '05d04a88-8db2-46fe-8b87-aa70244ad655',displayName: 'Yacoby, Amir',instructorOrder: 2,},],},},{id: '7dd78af1-8821-4aba-b617-279922b7ffab',academicYear: '2021',calendarYear: '2020',term: TERM.FALL,instance: {id: '441c517f-bc48-46e3-86c2-4949d1908c5d',faculty: [{id: '4dcef6f9-4e3e-49c0-a369-c30ab9615b96',displayName: 'Masahiro, Morii',instructorOrder: 0,},],},},{id: '5f700cd5-9ff9-48a7-875d-2a7b7dc290ea',academicYear: '2021',calendarYear: '2021',term: TERM.SPRING,instance: {id: '127b33e4-e59a-43cb-a832-d5fc62a702ec',faculty: [{id: 'f696d531-aef2-413f-9922-f480aa9d6039',displayName: 'Rycroft, Christopher',instructorOrder: 0,},{id: '4dcef6f9-4e3e-49c0-a369-c30ab9615b96',displayName: 'Masahiro, Morii',instructorOrder: 1,},{id: '05d04a88-8db2-46fe-8b87-aa70244ad655',displayName: 'Yacoby, Amir',instructorOrder: 2,},],},},{id: '73d1ee13-8b05-46d9-86fc-9e86442f94bd',academicYear: '2022',calendarYear: '2021',term: TERM.FALL,instance: {id: 'bbc7492a-71b2-489b-a9ec-a0a052c4f5c8',faculty: [{id: '513e9576-cdc5-4911-8d1c-3f95c1bdc6cd',displayName: 'Golub, Benjamin',instructorOrder: 0,},{id: '4dcef6f9-4e3e-49c0-a369-c30ab9615b96',displayName: 'Masahiro, Morii',instructorOrder: 1,},],},},{id: '0dfa51cc-673b-4238-abc7-0908e9e57468',academicYear: '2022',calendarYear: '2022',term: TERM.SPRING,instance: {id: 'a9db3a67-f688-4474-a9ef-ae05d1327f4f',faculty: [{id: 'f696d531-aef2-413f-9922-f480aa9d6039',displayName: 'Rycroft, Christopher',instructorOrder: 0,},{id: '4dcef6f9-4e3e-49c0-a369-c30ab9615b96',displayName: 'Masahiro, Morii',instructorOrder: 1,},],},},],},{id: '9a07e8a3-d6d5-4e89-9d32-8ad04785b9ab',catalogPrefix: 'ES',catalogNumber: 'ES 115',title: 'Mathematical Modeling',semesters: [{id: 'ecf56c0b-0ba9-4532-b1ba-177071aac2e1',academicYear: '2020',calendarYear: '2019',term: TERM.FALL,instance: {id: '7dd78af1-8821-4aba-b617-279922b7ffab',faculty: [{id: 'be64ce4b-081d-4987-8414-681bc5ca3193',displayName: 'Klecker, Nancy',instructorOrder: 0,},],},},{id: '49372311-991d-45a7-a1bf-2ba967d62663',academicYear: '2020',calendarYear: '2020',term: TERM.SPRING,instance: {id: 'be64ce4b-081d-4987-8414-681bc5ca3193',faculty: [{id: 'be64ce4b-081d-4987-8414-681bc5ca3193',displayName: 'Klecker, Nancy',instructorOrder: 0,},{id: '441c517f-bc48-46e3-86c2-4949d1908c5d',displayName: 'Chen, Yiling',instructorOrder: 1,},],},},{id: '7dd78af1-8821-4aba-b617-279922b7ffab',academicYear: '2021',calendarYear: '2020',term: TERM.FALL,instance: {id: 'e3c785a1-d917-44a2-8349-829d05103de6',faculty: [{id: 'be64ce4b-081d-4987-8414-681bc5ca3193',displayName: 'Klecker, Nancy',instructorOrder: 0,},{id: '441c517f-bc48-46e3-86c2-4949d1908c5d',displayName: 'Chen, Yiling',instructorOrder: 1,},{id: '91c44209-68ff-4f3e-91b8-288709a49f26',displayName: 'Shapiro, Avi',instructorOrder: 2,},],},},{id: '5f700cd5-9ff9-48a7-875d-2a7b7dc290ea',academicYear: '2021',calendarYear: '2021',term: TERM.SPRING,instance: {id: 'bbc7492a-71b2-489b-a9ec-a0a052c4f5c8',faculty: [{id: '91c44209-68ff-4f3e-91b8-288709a49f26',displayName: 'Shapiro, Avi',instructorOrder: 0,},],},},{id: '73d1ee13-8b05-46d9-86fc-9e86442f94bd',academicYear: '2022',calendarYear: '2021',term: TERM.FALL,instance: {id: 'cb489cc5-a7bd-4e29-b465-71d88ca73b71',faculty: [{id: 'be64ce4b-081d-4987-8414-681bc5ca3193',displayName: 'Klecker, Nancy',instructorOrder: 0,},{id: '91c44209-68ff-4f3e-91b8-288709a49f26',displayName: 'Shapiro, Avi',instructorOrder: 1,},],},},{id: '0dfa51cc-673b-4238-abc7-0908e9e57468',academicYear: '2022',calendarYear: '2022',term: TERM.SPRING,instance: {id: '5f700cd5-9ff9-48a7-875d-2a7b7dc290ea',faculty: [{id: 'be64ce4b-081d-4987-8414-681bc5ca3193',displayName: 'Klecker, Nancy',instructorOrder: 0,},{id: '441c517f-bc48-46e3-86c2-4949d1908c5d',displayName: 'Chen, Yiling',instructorOrder: 1,},],},},],},{id: 'b7dfe6fa-668a-4b89-912a-520c8aac8e6a',catalogPrefix: 'CS',catalogNumber: 'CS 223',title: 'Probabilistic Analysis and Algorithms',semesters: [{id: 'ecf56c0b-0ba9-4532-b1ba-177071aac2e1',academicYear: '2020',calendarYear: '2019',term: TERM.FALL,instance: {id: '2ca4b43f-1c73-4e17-a7d4-bd6f347d30d6',faculty: [{id: 'd1130416-cf7f-41eb-8a16-e93d97205142',displayName: 'Brooks, David',instructorOrder: 0,},{id: '50b38487-e035-4e40-a48d-9b603ac7dfe1',displayName: 'Goldsmith, Mara',instructorOrder: 1,},],},},{id: '49372311-991d-45a7-a1bf-2ba967d62663',academicYear: '2020',calendarYear: '2020',term: TERM.SPRING,instance: {id: '508cacd5-6e75-4c3c-83a3-d274c00770e4',faculty: [{id: 'd1130416-cf7f-41eb-8a16-e93d97205142',displayName: 'Brooks, David',instructorOrder: 0,},{id: '50b38487-e035-4e40-a48d-9b603ac7dfe1',displayName: 'Goldsmith, Mara',instructorOrder: 1,},{id: '54284de9-2b2c-4aac-915f-f960f319d3db',displayName: 'Dawson, Emily',instructorOrder: 2,},],},},{id: '7dd78af1-8821-4aba-b617-279922b7ffab',academicYear: '2021',calendarYear: '2020',term: TERM.FALL,instance: {id: 'abefdab5-49e7-4865-a22c-7a6b04a7ac42',faculty: [{id: 'd1130416-cf7f-41eb-8a16-e93d97205142',displayName: 'Brooks, David',instructorOrder: 0,},{id: '50b38487-e035-4e40-a48d-9b603ac7dfe1',displayName: 'Goldsmith, Mara',instructorOrder: 1,},{id: '54284de9-2b2c-4aac-915f-f960f319d3db',displayName: 'Dawson, Emily',instructorOrder: 2,},],},},{id: '5f700cd5-9ff9-48a7-875d-2a7b7dc290ea',academicYear: '2021',calendarYear: '2021',term: TERM.SPRING,instance: {id: 'b3eadbe3-816f-4219-836a-9fca021dcc86',faculty: [{id: 'd1130416-cf7f-41eb-8a16-e93d97205142',displayName: 'Brooks, David',instructorOrder: 0,},{id: '54284de9-2b2c-4aac-915f-f960f319d3db',displayName: 'Dawson, Emily',instructorOrder: 1,},],},},{id: '73d1ee13-8b05-46d9-86fc-9e86442f94bd',academicYear: '2022',calendarYear: '2021',term: TERM.FALL,instance: {id: '155938bd-a4fb-47c1-9dfb-2c33480535ef',faculty: [{id: '54284de9-2b2c-4aac-915f-f960f319d3db',displayName: 'Dawson, Emily',instructorOrder: 0,},],},},{id: '0dfa51cc-673b-4238-abc7-0908e9e57468',academicYear: '2022',calendarYear: '2022',term: TERM.SPRING,instance: {id: 'a2bdd06f-44b7-49c5-a4c6-ae3a01c07e7d',faculty: [{id: 'd1130416-cf7f-41eb-8a16-e93d97205142',displayName: 'Brooks, David',instructorOrder: 0,},{id: '50b38487-e035-4e40-a48d-9b603ac7dfe1',displayName: 'Goldsmith, Mara',instructorOrder: 1,},{id: '54284de9-2b2c-4aac-915f-f960f319d3db',displayName: 'Dawson, Emily',instructorOrder: 2,},],},},],}]

Data representing a three year plan, which contains semesters from Fall 2020 to Spring 2022. This three year plan contains data for AP 275, ES 115, and CS 223.

Const testThreeYearPlanAcademicYears

testThreeYearPlanAcademicYears: number[] = [2020, 2021, 2022]

The academic years corresponding to testThreeYearPlan

Const testUsers

testUsers: object[] = [{...dummy.regularUser,firstName: 'Unprivileged',groups: [],},{...dummy.regularUser,firstName: 'Read Only',groups: [GROUP.READ_ONLY],},{...dummy.regularUser,firstName: 'Admin',groups: [GROUP.ADMIN],},]

A set of test users, one for each of our permission levels, redefined here to ensure that only the expected groups are included

Const uuid

uuid: "be0c4160-4ea6-4638-bb6b-021556ae7149" = "be0c4160-4ea6-4638-bb6b-021556ae7149"

Random UUIDv4 UUID.

Generated completely arbitarily using https://www.uuidgenerator.net this is used for test cases where you need to use a UUID for something but the actual UUID value is irrelevant

Const year

year: 2018 = 2018

A single number representing a year

Functions

Const App

  • App(): ReactElement
  • The primary app component. Fetches the current user from the server when it mounts, then saves it to the UserContext to pass down to other components

    Returns ReactElement

Const AppHeader

  • AppHeader(): Element

Const AppRouter

  • AppRouter(): ReactElement
  • Selects which body component to render based on the current URL path. The options will dynamically change based on the permissions of the logged-in users (or not logged in, for the info.seas view)

    Returns ReactElement

Const CampusIcon

  • CampusIcon(__namedParameters: object): ReactElement
  • Renders the first letter of the campus name as white text in a black circle, then renders the remaining characters as hiddent text so that the full campus name will be read by screen readers.

    Parameters

    • __namedParameters: object
      • children: string

    Returns ReactElement

Const CourseAdmin

  • CourseAdmin(): ReactElement

Const CourseInstanceTable

  • CourseInstanceTable(__namedParameters: object): ReactElement

Const CourseInstanceTableBody

  • CourseInstanceTableBody(__namedParameters: object): ReactElement

Const CourseModal

  • CourseModal(__namedParameters: object): ReactElement

Const CoursesPage

  • CoursesPage(): ReactElement

Const CreateRoomModal

  • CreateRoomModal(__namedParameters: object): ReactElement

Const DayBlock

  • DayBlock(__namedParameters: object): Element
  • Defines an entire Day within the week view of our schedule component.

    The publicly exported component primarily handles props and placement for its sub-components, the heading and body. The contents of the day, the SessionBlocks, should be defined by the parent component.

    Parameters

    Returns Element

DoesNotMatch

  • DoesNotMatch<DTO>(property: string & keyof DTO, validationOptions?: ValidationOptions): PropertyDecorator
  • Compare the current field against another in the same DTO to ensure that the two do not match.

    Type parameters

    • DTO

    Parameters

    • property: string & keyof DTO

      The field to compare against

    • Optional validationOptions: ValidationOptions

      ValidationOptions

    Returns PropertyDecorator

Const EditRoomModal

  • EditRoomModal(__namedParameters: object): ReactElement
  • This component represents the Edit Room modal, which will be used to update the room name and capacity for existing rooms.

    Parameters

    • __namedParameters: object
      • currentRoom: RoomAdminResponse
      • isVisible: boolean
      • onClose: function
          • (): void
          • Returns void

      • onSuccess: function
          • (): void
          • Returns void

    Returns ReactElement

Const EnrollmentModal

  • EnrollmentModal(__namedParameters: object): ReactElement

Const FacultyAbsenceModal

  • FacultyAbsenceModal(__namedParameters: object): ReactElement

Const FacultyAdmin

  • FacultyAdmin(): ReactElement

Const FacultyModal

  • FacultyModal(__namedParameters: object): ReactElement

Const FacultySchedule

  • FacultySchedule(): ReactElement

Const FacultyScheduleTable

  • FacultyScheduleTable(__namedParameters: object): ReactElement
  • Component representing the Faculty Schedules for a given academic year

    Parameters

    • __namedParameters: object
      • academicYear: number
      • editButtonRef: bivarianceHack | RefObject<HTMLButtonElement>
      • facultySchedules: FacultyResponseDTO[]
      • filters: object
      • genericFilterUpdate: function
          • (field: string, value: string): void
          • Parameters

            • field: string
            • value: string

            Returns void

      • onEdit: function
          • (FacultyResponseDTO: any, AbsenceResponseDTO: any): void
          • Parameters

            • FacultyResponseDTO: any
            • AbsenceResponseDTO: any

            Returns void

    Returns ReactElement

Const ForbiddenPage

  • ForbiddenPage(): Element

Const InstructorModal

  • InstructorModal(__namedParameters: object): ReactElement

IsMutuallyExclusiveWith

  • IsMutuallyExclusiveWith<DTO>(properties: (string & keyof DTO)[], validationOptions?: ValidationOptions): PropertyDecorator
  • Validator to confirm that only one from a set of fields exists in a DTO. Exactly one of the fields in the set must be included. Any additional validators on the undefined fields will be ignored, so you can stack additional decorators (e.g. @isUUID) on each field and they will only run on the one field that is defined.

    For examples, a Meeting can belong to a CourseInstance or a NonClassEvent, but not both. So when we send a request to create/edit a meeting, we need to confirm that a value for exactly one those fields is provided.

    Type parameters

    • DTO

    Parameters

    • properties: (string & keyof DTO)[]
    • Optional validationOptions: ValidationOptions

    Returns PropertyDecorator

IsOccurringAfter

  • IsOccurringAfter<DTO>(property: string & keyof DTO, validationOptions?: ValidationOptions): PropertyDecorator
  • Validation decorator to check that a time field occurs after another field in the same object. This will be used to check that the endTime of a course meeting is after the startTime.

    Type parameters

    • DTO

    Parameters

    • property: string & keyof DTO
    • Optional validationOptions: ValidationOptions

    Returns PropertyDecorator

IsOccurringBefore

  • IsOccurringBefore<DTO>(property: string & keyof DTO, validationOptions?: ValidationOptions): PropertyDecorator
  • Validation decorator to check that a time field occurs before another field in the same object. This will be used to check that the startTime of a course meeting is before the endTime.

    Type parameters

    • DTO

    Parameters

    • property: string & keyof DTO
    • Optional validationOptions: ValidationOptions

    Returns PropertyDecorator

Const MeetingModal

  • MeetingModal(__namedParameters: object): ReactElement

Const MeetingTimesList

  • MeetingTimesList(__namedParameters: object): ReactElement

Const Messagable

  • Messagable(__namedParameters: object): Element
  • A component that includes the content of the queue of messages. This functional component is needed in order to use the hook useReducer. This component gets passed into the renderWithMessaging function.

    Parameters

    • __namedParameters: object
      • children: string | number | false | true | __type | ReactElement<any, string | function | object> | ReactNodeArray | ReactPortal
      • metadataContext: MetadataContextValue
      • routerEntries: string[]

    Returns Element

Const Message

  • Message(__namedParameters: object): ReactElement

Const MultiYearPlan

  • MultiYearPlan(): ReactElement

Const NoMatch

  • NoMatch(): ReactElement
  • The component represents the 404 page. When a user visits a URL path that is not defined, they will see this NoMatch component render on the page.

    Returns ReactElement

Const NonClassMeetingsPage

  • NonClassMeetingsPage(): ReactElement

Const NonClassMeetingsTable

  • NonClassMeetingsTable(__namedParameters: object): ReactElement

Const NotesModal

  • NotesModal(__namedParameters: object): ReactElement

Const OfferedModal

  • OfferedModal(__namedParameters: object): ReactElement

Const ReportDownloadModal

  • ReportDownloadModal(__namedParameters: object): Element

Const RoomAdmin

  • RoomAdmin(): ReactElement

Const RoomSchedule

  • RoomSchedule(): Element

Const RoomSelection

  • Wrapper component that handles fetching the list of rooms based on the data provided, then rendering it into a table

    Parameters

    • __namedParameters: object
      • currentRoomId: string
      • roomHandler: function
          • (roomData: CourseInstanceResponseMeeting["room"]): void
          • Parameters

            • roomData: CourseInstanceResponseMeeting["room"]

            Returns void

      • roomRequestData: RoomRequest

    Returns ReactElement<RoomSelectionProps>

Const RoomSelectionTable

Const SchedulePage

  • SchedulePage(): Element

Const ScheduleView

  • ScheduleView(__namedParameters: object): Element
  • Handles rendering the complete course schedule, setting up the necessary grids for the week and days, then placing in the individual blocks for the different Sessions.

    Parameters

    • __namedParameters: object
      • days: string[]
      • degreeProgram: DEGREE_PROGRAM
      • firstHour: number
      • isPrefixActive: function
          • (prefix: string): boolean
          • Parameters

            • prefix: string

            Returns boolean

      • lastHour: number
      • minuteResolution: 1 | 15 | 3 | 5
      • rowHeight: string
      • schedule: ScheduleViewResponseDTO[]

    Returns Element

Const SemesterTable

  • SemesterTable(__namedParameters: object): ReactElement

Const SessionBlock

  • SessionBlock(__namedParameters: object): Element
  • Defines a group of courses that share the same time/day and catalog prefix

    This publicly exported component mainly handles the placement and props for the individual styled sub-components

    Parameters

    • __namedParameters: object
      • catalogNumber: string
      • children: ReactElement<object, string | function | object> | ReactElement<object, string | function | object>[] | ReactElement<object, string | function | object> & string | ReactElement<object, string | function | object> & number | ReactElement<object, string | function | object> & false | ReactElement<object, string | function | object> & true | ReactElement<object, string | function | object> & ReactElement<any, string | function | object> | ReactElement<object, string | function | object> & ReactNodeArray | ReactElement<object, string | function | object> & ReactPortal | ReactElement<object, string | function | object>[] & string | ReactElement<object, string | function | object>[] & number | ReactElement<object, string | function | object>[] & false | ReactElement<object, string | function | object>[] & true | ReactElement<object, string | function | object>[] & ReactElement<any, string | function | object> | ReactElement<object, string | function | object>[] & ReactNodeArray | ReactElement<object, string | function | object>[] & ReactPortal
      • duration: number
      • isFaded: boolean
      • isPopoverVisible: boolean
      • popovers: Element[]
      • prefix: string
      • startRow: number

    Returns Element

Const UnauthorizedPage

  • UnauthorizedPage(): Element

Const ViewModal

  • ViewModal(__namedParameters: object): ReactElement

Const WeekBlock

  • WeekBlock(__namedParameters: object): Element
  • Represents the view of the entire week. Includes slots for days of the week, and uses the same row grid as each DayBlock to display horizontal rules across the week at 15-minute intervals

    Parameters

    • __namedParameters: object
      • children: ReactElement<DayBlockProps, string | function | object> | ReactElement<DayBlockProps, string | function | object>[] | ReactElement<DayBlockProps, string | function | object> & string | ReactElement<DayBlockProps, string | function | object> & number | ReactElement<DayBlockProps, string | function | object> & false | ReactElement<DayBlockProps, string | function | object> & true | ReactElement<DayBlockProps, string | function | object> & ReactElement<any, string | function | object> | ReactElement<DayBlockProps, string | function | object> & ReactNodeArray | ReactElement<DayBlockProps, string | function | object> & ReactPortal | ReactElement<DayBlockProps, string | function | object>[] & string | ReactElement<DayBlockProps, string | function | object>[] & number | ReactElement<DayBlockProps, string | function | object>[] & false | ReactElement<DayBlockProps, string | function | object>[] & true | ReactElement<DayBlockProps, string | function | object>[] & ReactElement<any, string | function | object> | ReactElement<DayBlockProps, string | function | object>[] & ReactNodeArray | ReactElement<DayBlockProps, string | function | object>[] & ReactPortal
      • firstHour: number
      • minuteResolution: 1 | 15 | 3 | 5
      • numColumns: number
      • numRows: number
      • onClick: bivarianceHack
      • rowHeight: string

    Returns Element

Const absenceEnumToTitleCase

  • absenceEnumToTitleCase(str: string): string
  • A helper function that converts the faculty absence enum into the desired format for the Faculty table The string is split on the hyphen and joined with a space. Only the first letter of each word is capitalized. (e.g. 'SABBATICAL_INELIGIBLE' becomes 'Sabbatical Ineligible')

    Parameters

    • str: string

    Returns string

Const absenceTitleCaseToEnum

  • absenceTitleCaseToEnum(absence: keyof object): ABSENCE_TYPE

Const absenceToVariant

Const allDataValidYears

  • Verifies that the academic years within faculty data returned matches the expected years (based on what years were requested)

    Parameters

    Returns boolean

bootstrap

  • bootstrap(): Promise<void>

Const calculateSemesters

  • calculateSemesters(startingAcademicYear: number, numSemesters: number): SemesterInfo[]
  • Gets the list of semesters for the multi-year plan table starting with the given year and specified number of semesters. This function was separated from getSemestersFromYear to allow easier unit testing.

    Parameters

    • startingAcademicYear: number
    • numSemesters: number

    Returns SemesterInfo[]

Const camelCaseToTitleCase

  • camelCaseToTitleCase(original: string): string
  • A helper function to convert a string from camel case to title case

    Parameters

    • original: string

    Returns string

Const checkUserGroup

  • checkUserGroup(user: User, requiredGroup: GROUP): boolean

Const computeEditAbsenceButtonId

Const computeEditCourseButtonId

Const computeEditFacultyButtonId

Const createCourse

Const createFaculty

Const createRoom

Const customRender

  • In order to streamline our tests, we are redefining the render function to include the Memory Router, Theme Provider, and Message Context Provider to avoid having to redefine an App Stub for each test

    Parameters

    Returns RenderResult

Const dayEnumToString

  • dayEnumToString(dayEnum: DAY): string

Const displayAvailability

  • displayAvailability(__namedParameters: object, currentRoomId: string): string

Const downloadAttachment

  • downloadAttachment(response: Response): Promise<void>

Const editCourse

Const editFaculty

Const editRoom

Const facultyTypeEnumToTitleCase

  • facultyTypeEnumToTitleCase(facultyType: FACULTY_TYPE): string

Const filterCoursesByInstructors

Const filterPlansByInstructors

Const formatEnrollment

Const formatFacultyNotes

Const formatInstructors

Const formatMeetingForReport

Const formatMeetings

Const formatOffered

generateDropdown

  • generateDropdown<Field, Subfield>(field: Field, subField?: Field extends "spring" | "fall" ? Subfield : never): function
  • A function that creates a Dropdown element, which will be used as a filter field, for the field that is provided.

    Type parameters

    • Field: keyof FilterState

    • Subfield: keyof FilterState[Field]

    Parameters

    • field: Field
    • Optional subField: Field extends "spring" | "fall" ? Subfield : never

    Returns function

      • (filters: FilterState, genericFilterUpdate: function, filterOptions?: Record<string, object[]>): ReactElement
      • Parameters

        • filters: FilterState
        • genericFilterUpdate: function
            • (field: string, value: string): void
            • Parameters

              • field: string
              • value: string

              Returns void

        • Optional filterOptions: Record<string, object[]>

        Returns ReactElement

Const generateGrid

  • generateGrid(isRowExpanded: boolean): string

generateTextField

  • generateTextField<Field, Subfield>(field: Field, subField?: Field extends "spring" | "fall" ? Subfield : never): function
  • A function that creates a Text Input element, which will be used as a filter field, for the field that is provided.

    Type parameters

    • Field: keyof FilterState

    • Subfield: keyof FilterState[Field]

    Parameters

    • field: Field
    • Optional subField: Field extends "spring" | "fall" ? Subfield : never

    Returns function

      • (filters: FilterState, genericFilterUpdate: function, filterOptions?: Record<string, object[]>): ReactElement
      • Parameters

        • filters: FilterState
        • genericFilterUpdate: function
            • (field: string, value: string): void
            • Parameters

              • field: string
              • value: string

              Returns void

        • Optional filterOptions: Record<string, object[]>

        Returns ReactElement

Const getAcademicYearOptions

  • getAcademicYearOptions(semesters: string[]): DropdownOptionProps[]

Const getAdminRooms

Const getAllCourses

Const getAllFacultyMembers

Const getAllInstructors

Const getAreaColor

  • getAreaColor(area: string): string
  • Helper function that safely returns the hex string for the color associated with a given area, or else returns '' if there is no color for the given value.

    Parameters

    • area: string

    Returns string

Const getCatPrefixColor

  • getCatPrefixColor(catalogprefix: string): string
  • Helper function that safely returns the hex string for the color associated with a given catalogprefix, or else returns '' if there is no color for the given value.

    Parameters

    • catalogprefix: string

    Returns string

Const getCourseInstancesForYear

Const getCourseScheduleForSemester

Const getCurrentUser

  • getCurrentUser(): Promise<User>

Const getFacultySchedulesForYear

Const getFutureTerms

Const getHostname

  • getHostname(): string

Const getInstanceIdentifier

Const getMetadata

Const getMultiYearPlan

Const getNonClassMeetings

Const getReport

  • getReport(range: ReportRange, reportType: string): Promise<void>

Const getRoomAvailability

Const getRoomScheduleForSemester

  • Given a room id, calendar year, and term, this will retrieve the course information for the courses that will occur in the requested room and semester.

    Parameters

    • roomId: string
    • calendarYear: number
    • term: TERM

    Returns Promise<RoomScheduleResponseDTO[]>

Const getRooms

Const getSemestersFromYear

  • getSemestersFromYear(startingAcademicYear: number): SemesterInfo[]

Const instructorDisplayNameToFirstLast

  • instructorDisplayNameToFirstLast(displayName: string): string
  • Converts the display name of an instructor to be in the first-last name format (e.g. converts "Levine, Margo" to "Margo Levine"). Empty strings as inputs and one word strings as inputs themselves will be returned as the output.

    Parameters

    • displayName: string

    Returns string

Const isSEASEnumToString

  • isSEASEnumToString(isSEASEnum: IS_SEAS): string | null

Const listFilter

  • listFilter<T>(list: T[], filter: object): T[]

Const messageReducer

Const messageTypeToVariant

Const mockAdapter

  • mockAdapter(app: Server): (Anonymous function)
  • This creates a mock adapter that replaces the underlying xhr/http request method used by Axios with one based on supertest/superagent. This is somewhat complicated as the two libraries have very different request and response formats, but this should map the minimum number of fields necessary to run tests of our client code against our actual API backend.

    To use in a test, you'll need to first initialize a NestJS testing module then get a reference to the underlying HTTP server (as you would if using supertest on its own). Then you'll need to import our client/api/request axios instance and set it to use the return value of this function as its default adapter:

    const testModule = await Test.createTestingModule({ ... }).compile(); const nestApp = await testModule.init(); const api = nestApp.getHttpServer(); request.defaults.adapter = mockAdapter(api);

    Parameters

    • app: Server

    Returns (Anonymous function)

Const offeredEnumToString

  • offeredEnumToString(offeredEnum: OFFERED): string | null

Const renderWithMessaging

Const requestMethod

  • requestMethod(api: HttpServer, endpoint: Endpoint): Promise<request.Response>

Const resolveAcademicYear

  • resolveAcademicYear(semester: Partial<Semester>): number
  • Calculate the academic year a Semester occurs in.

    Since the academicYear property of Semester objects is actually calendar year, not academic year (despite the name). This helper function exists to convert a Semester to a calendar year and abstract away the annoying off-by-one math that goes with that.

    Parameters

    • semester: Partial<Semester>

    Returns number

Const retrieveValue

  • retrieveValue(prop: keyof CourseInstanceResponseDTO | keyof CourseInstanceResponseDTO[TermKey], sem?: TERM): FunctionComponent<FieldContentProps>
  • Simple helper function that takes a property name and optionally a semester and returns a function component that renders the text value associated with the property/semester.property.

    This is mainly a way to simplify the looping logic required in the CourseInstanceList

    Parameters

    • prop: keyof CourseInstanceResponseDTO | keyof CourseInstanceResponseDTO[TermKey]
    • Optional sem: TERM

    Returns FunctionComponent<FieldContentProps>

Const sortResults

Const sqlAfter

  • sqlAfter(a: string, b: string): boolean
  • Account for the way null is sorted in SQL. In SQL, nulls are ordered last by default. I.e., if a is null (or undefined) and b is not null (or undefined) or if a is greater than b, then a is sorted after b.

    Parameters

    • a: string

      The first value

    • b: string

      The second value

    Returns boolean

    true if a is sorted after b, false otherwise

Const sqlBefore

  • sqlBefore(a: string, b: string): boolean
  • Account for the way null is sorted in SQL. In SQL, nulls are ordered last by default. I.e., if a is not null (or undefined) and b is null (or undefined) or if a is less than b, then a is sorted before b.

    Parameters

    • a: string

      The first value

    • b: string

      The second value

    Returns boolean

    true if a is sorted before b, false otherwise

Const termEnumToTitleCase

  • termEnumToTitleCase(term: TERM): string

Const termPatternEnumToString

  • termPatternEnumToString(termPatternEnum: TERM_PATTERN): string | null

Const toTitleCase

  • toTitleCase(original: string): string
  • A helper function to convert a string to title case

    Parameters

    • original: string

    Returns string

Const trimString

  • trimString(value?: string): string
  • A helper function that removes the whitespace from the beginning and end of a string. This will be used to sanitize text input submitted by the user.

    Parameters

    • Default value value: string = ""

    Returns string

Const updateCourseInstance

Const updateFacultyAbsence

Const updateInstructorList

Const updateMeetingList

  • Update the list of meetings associated with the courseInstance or nonClassMeeting given in the first parameter, returning the saved meetings.

    The meetingList parameter will replace the existing list of meetings; any existing meetings that are not included will be removed.

    Parameters

    Returns Promise<MeetingResponseDTO[]>

Const useGroupGuard

Const useHasStorage

  • useHasStorage(type: "sessionStorage" | "localStorage"): boolean

useStoredState

  • useStoredState<STATE>(key: string, fallbackValue?: STATE | function, storageType?: "sessionStorage" | "localStorage"): [STATE, Dispatch<SetStateAction<STATE>>]
  • Wraps the existing useState function with an extra handler that persists the state value in storage. If the specified key already exists in storage, that storage value will be used instead of the fallbackValue, if provided. Optionally allows for choosing between sessionStorage and localStorage, defaulting to the former.

    If the Storage API is not avaialable, it will fall back to the default useState implementation.

    Type parameters

    • STATE

    Parameters

    • key: string
    • Default value fallbackValue: STATE | function = null
    • Default value storageType: "sessionStorage" | "localStorage" = "sessionStorage"

    Returns [STATE, Dispatch<SetStateAction<STATE>>]

Const validHUID

  • validHUID(huid: string): boolean

Object literals

Const AREA_COLORS

AREA_COLORS: object

Defines colors associated with the different academic areas at SEAS. These are based on the school's official color palette and should not be adjusted capriciously.

ACS

ACS: string = "#da373e"

AM

AM: string = "#4eadab"

AP

AP: string = "#cedb51"

BE

BE: string = "#f0b643"

CS

CS: string = "#6797db"

EE

EE: string = "#f9df57"

ESE

ESE: string = "#75c3d5"

General

General: string = "#95b5df"

MDE

MDE: string = "#c0c0c0"

MSMBA

MSMBA: string = "#946eb7"

Mat & ME

Mat & ME: string = "#b18cbb"

SEM

SEM: string = "#ec8f9c"

Const AcademicYearUtils

AcademicYearUtils: object

getAcademicYearOptions

getAcademicYearOptions: getAcademicYearOptions

Const CATALOG_PREFIX_COLORS

CATALOG_PREFIX_COLORS: object

Defines colors associated with the different academic catalog prefixs at SEAS. These are based on the school's official color palette and should not be adjusted capriciously.

AC

AC: string = "#da373e"

AM

AM: string = "#4eadab"

AP

AP: string = "#cedb51"

BE

BE: string = "#f0b643"

CS

CS: string = "#6797db"

EPS

EPS: string = "#946EB7"

ES

ES: string = "#f9df57"

ESE

ESE: string = "#75c3d5"

FRSEMR

FRSEMR: string = "#c0c0c0"

GenEd

GenEd: string = "#c0c0c0"

General

General: string = "#95b5df"

SEMINAR

SEMINAR: string = "#ec8f9c"

Const CourseAPI

CourseAPI: object

createCourse

createCourse: createCourse

editCourse

editCourse: editCourse

getAllCourses

getAllCourses: getAllCourses

getCourseInstancesForYear

getCourseInstancesForYear: getCourseInstancesForYear

getCourseScheduleForSemester

getCourseScheduleForSemester: getCourseScheduleForSemester

getRoomScheduleForSemester

getRoomScheduleForSemester: getRoomScheduleForSemester

updateCourseInstance

updateCourseInstance: updateCourseInstance

updateInstructorList

updateInstructorList: updateInstructorList

Const FacultyAPI

FacultyAPI: object

createFaculty

createFaculty: createFaculty

editFaculty

editFaculty: editFaculty

getAllFacultyMembers

getAllFacultyMembers: getAllFacultyMembers

getFacultySchedulesForYear

getFacultySchedulesForYear: getFacultySchedulesForYear

updateFacultyAbsence

updateFacultyAbsence: updateFacultyAbsence

Const LocationAPI

LocationAPI: object

createRoom

createRoom: createRoom

editRoom

editRoom: editRoom

getAdminRooms

getAdminRooms: getAdminRooms

getRoomAvailability

getRoomAvailability: getRoomAvailability

getRooms

getRooms: getRooms

Const MeetingAPI

MeetingAPI: object

updateMeetingList

updateMeetingList: updateMeetingList

Const MetadataAPI

MetadataAPI: object

getMetadata

getMetadata: getMetadata

Const MultiYearPlanAPI

MultiYearPlanAPI: object

getMultiYearPlan

getMultiYearPlan: getMultiYearPlan

Const NonClassMeetingApi

NonClassMeetingApi: object

getNonClassMeetings

getNonClassMeetings: getNonClassMeetings

Const UserAPI

UserAPI: object

Export the methods as part of an object so that they are stubbable. See: https://github.com/sinonjs/sinon/issues/562

getCurrentUser

getCurrentUser: getCurrentUser

Const WindowUtils

WindowUtils: object

getHostname

getHostname: getHostname

Const absenceTitleCaseToEnumMap

absenceTitleCaseToEnumMap: object

Define the map here to avoid a new object being created on each call to absenceTitleCaseToEnum

No Longer Active

No Longer Active: ABSENCE_TYPE = ABSENCE_TYPE.NO_LONGER_ACTIVE

Parental Leave

Parental Leave: ABSENCE_TYPE = ABSENCE_TYPE.PARENTAL_LEAVE

Present

Present: ABSENCE_TYPE = ABSENCE_TYPE.PRESENT

Research Leave

Research Leave: ABSENCE_TYPE = ABSENCE_TYPE.RESEARCH_LEAVE

Sabbatical

Sabbatical: ABSENCE_TYPE = ABSENCE_TYPE.SABBATICAL

Sabbatical Eligible

Sabbatical Eligible: ABSENCE_TYPE = ABSENCE_TYPE.SABBATICAL_ELIGIBLE

Sabbatical Ineligible

Sabbatical Ineligible: ABSENCE_TYPE = ABSENCE_TYPE.SABBATICAL_INELIGIBLE

Teaching Relief

Teaching Relief: ABSENCE_TYPE = ABSENCE_TYPE.TEACHING_RELIEF

Const ac209aCourseInstance

ac209aCourseInstance: object

Data representing the graduate intro to data science course, AC 209A, in the 2019 academic year. This course is offered in the fall, has multiple meetings and multiple instructors, and has notes and sameAs data.

area

area: string = "ACS"

catalogNumber

catalogNumber: string = "AC 209a"

id

id: string = "42a3fb1b-55ff-4d50-9a3f-d637f759119a"

isSEAS

isSEAS: Y = IS_SEAS.Y

isUndergraduate

isUndergraduate: false = false

notes

notes: string = "Same as CS 109a, STATS 121a"

sameAs

sameAs: string = "CS 109a, STATS 121a"

termPattern

termPattern: FALL = TERM_PATTERN.FALL

title

title: string = "Data Science 1: Introduction to Data Science"

fall

fall: object

actualEnrollment

actualEnrollment: number = 66

calendarYear

calendarYear: string = "2018"

id

id: string = "b0aca4ce-e90b-47e4-97be-2187b3b7a621"

instructors

instructors: object[] = [{id: 'dcf88d99-1b7f-4863-93d3-d0b0bb43c8e7',displayName: 'Rader, Kevin',notes: 'Prefers Cambridge campus',},{id: '78f75a40-b0bd-43af-84d8-0ec68f313dba',displayName: 'Protopapas, Pavlos',notes: 'No preference on campus',},]

meetings

meetings: (object | object)[] = [{id: '0a3b2708-6191-4e1a-857b-6d3352836955',day: DAY.MON,startTime: '13:30:00',endTime: '14:45:00',room: {id: '533bc88d-3652-43c9-9936-56e280b57d6f',campus: 'Cambridge',name: 'Northwest Building B101',},},{id: '533bc88d-3652-43c9-9936-56e280b57d6e',day: DAY.WED,startTime: '13:30:00',endTime: '14:45:00',room: {id: '533bc88d-3652-43c9-9936-56e280b57d6f',campus: 'Cambridge',name: 'Northwest Building B101',},},]

offered

offered: Y = OFFERED.Y

preEnrollment

preEnrollment: null = null

studyCardEnrollment

studyCardEnrollment: number = 77

spring

spring: object

actualEnrollment

actualEnrollment: null = null

calendarYear

calendarYear: string = "2019"

id

id: string = "62b375fa-f922-406f-bc08-7725edab27ac"

instructors

instructors: undefined[] = []

meetings

meetings: undefined[] = []

offered

offered: BLANK = OFFERED.BLANK

preEnrollment

preEnrollment: null = null

studyCardEnrollment

studyCardEnrollment: null = null

Const ac209aCourseInstanceWithoutRooms

ac209aCourseInstanceWithoutRooms: object

Data representing the graduate intro to data science course, AC 209A, in the 2019 academic year. This course is offered in the fall, has multiple meetings and multiple instructors, and has notes and sameAs data.

area

area: string = "ACS"

catalogNumber

catalogNumber: string = "AC 209a"

id

id: string = "42a3fb1b-55ff-4d50-9a3f-d637f759119a"

isSEAS

isSEAS: Y = IS_SEAS.Y

isUndergraduate

isUndergraduate: false = false

notes

notes: string = "Same as CS 109a, STATS 121a"

sameAs

sameAs: string = "CS 109a, STATS 121a"

termPattern

termPattern: FALL = TERM_PATTERN.FALL

title

title: string = "Data Science 1: Introduction to Data Science"

fall

fall: object

actualEnrollment

actualEnrollment: number = 66

calendarYear

calendarYear: string = "2018"

id

id: string = "b0aca4ce-e90b-47e4-97be-2187b3b7a621"

instructors

instructors: object[] = [{id: 'dcf88d99-1b7f-4863-93d3-d0b0bb43c8e7',displayName: 'Rader, Kevin',notes: 'Prefers Cambridge campus',},{id: '78f75a40-b0bd-43af-84d8-0ec68f313dba',displayName: 'Protopapas, Pavlos',notes: 'No preference on campus',},]

meetings

meetings: (object | object)[] = [{id: '0a3b2708-6191-4e1a-857b-6d3352836955',day: DAY.MON,startTime: '13:30:00',endTime: '14:45:00',room: null,},{id: '533bc88d-3652-43c9-9936-56e280b57d6e',day: DAY.WED,startTime: '13:30:00',endTime: '14:45:00',room: null,},]

offered

offered: Y = OFFERED.Y

preEnrollment

preEnrollment: null = null

studyCardEnrollment

studyCardEnrollment: number = 77

spring

spring: object

actualEnrollment

actualEnrollment: null = null

calendarYear

calendarYear: string = "2019"

id

id: string = "62b375fa-f922-406f-bc08-7725edab27ac"

instructors

instructors: undefined[] = []

meetings

meetings: undefined[] = []

offered

offered: BLANK = OFFERED.BLANK

preEnrollment

preEnrollment: null = null

studyCardEnrollment

studyCardEnrollment: null = null

Const am105CourseInstance

am105CourseInstance: object

The data object representing the Ordinary and Partial Differential Equations course, AM 105, in the 2018 academic year. This course is only offered in the spring, with one instructor and one meeting. It has no notes or sameAs data.

area

area: string = "AM"

catalogNumber

catalogNumber: string = "AM 105"

id

id: string = "6cdaede1-f5b4-47c1-8f96-a52524e49f86"

isSEAS

isSEAS: Y = IS_SEAS.Y

isUndergraduate

isUndergraduate: true = true

notes

notes: null = null

sameAs

sameAs: string = ""

termPattern

termPattern: SPRING = TERM_PATTERN.SPRING

title

title: string = "Ordinary and Partial Differential Equations"

fall

fall: object

actualEnrollment

actualEnrollment: null = null

calendarYear

calendarYear: string = "2018"

id

id: string = "117b1fec-f46c-49f3-9e20-349f2472571a"

instructors

instructors: undefined[] = []

meetings

meetings: undefined[] = []

offered

offered: BLANK = OFFERED.BLANK

preEnrollment

preEnrollment: null = null

studyCardEnrollment

studyCardEnrollment: null = null

spring

spring: object

actualEnrollment

actualEnrollment: number = 123

calendarYear

calendarYear: string = "2017"

id

id: string = "336248cd-003d-4e61-8c9e-ad71ff8c0858"

instructors

instructors: object[] = [{id: 'e2fed2a7-9f13-46e2-a46c-901f6f902f57',displayName: 'Levine, Margo',},]

meetings

meetings: object[] = [{id: '86bff820-6378-4d37-b017-6862f099c5c8',day: DAY.THU,startTime: '10:00:00',endTime: '12:00:00',room: {id: 'a176d455-a04b-4da8-a6b9-a3cf9ff5f6d4',campus: 'Cambridge',name: 'Sanders Theater',},},]

offered

offered: Y = OFFERED.Y

preEnrollment

preEnrollment: null = null

studyCardEnrollment

studyCardEnrollment: number = 140

Const anotherPhysicsFacultyMemberResponse

anotherPhysicsFacultyMemberResponse: object

An ManageFacultyResponseDTO response representing a physics faculty member

HUID

HUID: string = "84938288"

category

category: NON_LADDER = FACULTY_TYPE.NON_LADDER

firstName

firstName: string = "Michelle"

id

id: string = "1f31a245-e069-407c-a8f5-449245e6a18e"

lastName

lastName: string = "Kenney"

area

area: object

id

id: string = "140bd70d-08e2-4164-ab8e-29934f315760"

name

name: string = "AP"

Const appliedMath

appliedMath: object

An example of an Area entity

courses

courses: undefined[] = []

createdAt

createdAt: Date = new Date()

faculty

faculty: undefined[] = []

id

id: string = "4d4e622a-a843-43e1-8f53-c99532583178"

name

name: string = "AM"

nonClassParents

nonClassParents: undefined[] = []

updatedAt

updatedAt: Date = new Date()

Const appliedMathFacultyMemberRequest

appliedMathFacultyMemberRequest: object

An example request to create an applied math faculty member

HUID

HUID: string = appliedMathFacultyMember.HUID

area

area: string = appliedMathFacultyMember.area.name

category

category: FACULTY_TYPE = appliedMathFacultyMember.category

firstName

firstName: string = appliedMathFacultyMember.firstName

jointWith

jointWith: string = appliedMathFacultyMember.jointWith

lastName

lastName: string = appliedMathFacultyMember.lastName

notes

notes: string = appliedMathFacultyMember.notes

Const appliedMathFacultyMemberResponse

appliedMathFacultyMemberResponse: object

An example ManageFacultyResponseDTO response representing an applied math faculty member

area

area: object

Const appliedMathFacultyScheduleResponse

appliedMathFacultyScheduleResponse: object

An example FacultyResponseDTO response representing a schedule of an applied math faculty member

area

area: string = "AM"

category

category: LADDER = FACULTY_TYPE.LADDER

firstName

firstName: string = "Sean"

id

id: string = "e8a7f24e-d6d0-4c9d-bfb6-89d070d21091"

jointWith

jointWith: string = ""

lastName

lastName: string = "Garrison"

fall

fall: object

academicYear

academicYear: number = 2021

courses

courses: object[] = [{id: '37b66373-5000-43f2-9c14-8c2426273785',catalogNumber: 'AM 10',},{id: '6cfaf5af-d2bc-4959-81cc-9f87bf38f9d3',catalogNumber: 'AM 20',},]

id

id: string = "677143a4-314f-4d85-aac7-e446b9bf5eca"

absence

absence: object

id

id: string = "e8a7f24e-d6d0-4c9d-bfb6-89d070d21091"

type

type: PRESENT = ABSENCE_TYPE.PRESENT

spring

spring: object

academicYear

academicYear: number = 2021

courses

courses: object[] = [{id: '37b66373-5000-43f2-9c14-8c2426273785',catalogNumber: 'AM 10',},]

id

id: string = "cc6b661b-b423-4da7-9248-88a56e070905"

absence

absence: object

id

id: string = "8db77575-7f0a-4c5e-9126-c46c5c99ac33"

type

type: SABBATICAL_ELIGIBLE = ABSENCE_TYPE.SABBATICAL_ELIGIBLE

Const appliedMathematicsReadingGroup

appliedMathematicsReadingGroup: object

Applied Math Reading Group

Non-class parent for applied math reading group formatted to match NonClassMeetingResponseDTO.

area

area: string = "AM"

contactEmail

contactEmail: string = "ctaube@fas.harvard.edu"

contactName

contactName: string = "Cliff Taube"

contactPhone

contactPhone: null = null

expectedSize

expectedSize: null = null

id

id: string = "6512a306-3d2f-4a03-97fe-2dc7aac37107"

notes

notes: string = "This reading group is usually well attended"

title

title: string = "Applied mathematics reading group"

fall

fall: object

calendarYear

calendarYear: string = "2020"

id

id: string = "44f22dbb-d6c7-4673-8a7d-f70aa0562350"

meetings

meetings: (object | object)[] = [{id: '732c4b36-9239-4aa6-b131-c8d5cd15908d',day: DAY.WED,startTime: '08:00:00',endTime: '10:00:00',room: {id: '17d19e35-617d-486d-9b40-f30197342c18',name: 'Maxwell Dworkin G115 Lecture Theatre',campus: 'Cambridge',},},{id: '59be22e9-29b4-4b98-87f5-e157cbbc76ee',day: DAY.TUE,startTime: '10:00:00',endTime: '11:10:00',room: {id: '17d19e35-617d-486d-9b40-f30197342c18',name: 'Maxwell Dworkin G115 Lecture Theatre',campus: 'Cambridge',},},]

spring

spring: object

calendarYear

calendarYear: string = "2020"

id

id: string = "1cdcc7f4-2f0b-42f5-bd41-51dba7deda16"

meetings

meetings: (object | object)[] = [{id: 'b5916e2b-42d6-46f3-acb7-dea1e3541a00',day: DAY.FRI,startTime: '12:14:00',endTime: '12:17:00',room: {id: '17d19e35-617d-486d-9b40-f30197342c18',name: 'Maxwell Dworkin G115 Lecture Theatre',campus: 'Cambridge',},},{id: 'dbe4a352-6755-4ffb-b0ca-e58e13fa8320',day: DAY.TUE,startTime: '16:00:00',endTime: '17:00:00',room: {id: '17d19e35-617d-486d-9b40-f30197342c18',name: 'Maxwell Dworkin G115 Lecture Theatre',campus: 'Cambridge',},},]

Const bauerRoomResponse

bauerRoomResponse: object

A room response object, for use in testing the room admin table

capacity

capacity: number = 100

id

id: string = "7298b3fb-ad0a-42aa-ba1e-62052984e1e0"

name

name: string = "Bauer G18 Naito Lobby"

building

building: object

id

id: string = "d0dbf5ae-ed8f-4b39-bcab-dd644aff4c4f"

name

name: string = "Bauer Laboratory"

campus

campus: object

id

id: string = "aa6099b1-8d07-478d-94ba-abd2a97c1920"

name

name: string = "Cambridge"

Const bioengineeringFacultyMemberResponse

bioengineeringFacultyMemberResponse: object

An example ManageFacultyResponseDTO response representing a bioengineering faculty member

HUID

HUID: string = "50602117"

category

category: LADDER = FACULTY_TYPE.LADDER

firstName

firstName: string = "Amanda"

id

id: string = "38ae66ec-7589-4948-8e21-41d142db4d3b"

lastName

lastName: string = "Su"

area

area: object

id

id: string = "29b70622-271b-4d1c-b70a-306e217758e9"

name

name: string = "BE"

Const bookedFASRoom

bookedFASRoom: object

A room response for an Non-SEAS room with meetings booked

campus

campus: string = "Non-SEAS"

capacity

capacity: number = 140

id

id: string = "6b923cb4-0215-4fa6-b7cf-db2b0b456b45"

meetingTitles

meetingTitles: string[] = ['ABCD Meeting']

name

name: string = "William James Hall B101"

Const bookedRoom

bookedRoom: object

A room response where another course has already booked the room

campus

campus: string = "Cambridge"

capacity

capacity: number = 120

id

id: string = "608ec29b-0e9e-4efe-87b6-73a52f098f62"

meetingTitles

meetingTitles: string[] = ['AC 209a']

name

name: string = "Pierce Hall 121"

Const computationalModelingofFluidsReadingGroup

computationalModelingofFluidsReadingGroup: object

Data Science Reading Group

Non-class parent for data science reading group formatted to match NonClassMeetingResponseDTO.

area

area: string = "ACS"

contactEmail

contactEmail: string = "jwaldo@harvard.edu"

contactName

contactName: string = "Jim Waldo"

contactPhone

contactPhone: null = null

expectedSize

expectedSize: null = null

id

id: string = "ad9a6a86-4cd1-4063-bd6d-c7379f10c540"

notes

notes: string = "Some notes"

title

title: string = "Computational Modeling of Fluids and Soft Matter Reading Group"

fall

fall: object

calendarYear

calendarYear: string = "2020"

id

id: string = "dfd31de2-d794-457a-bf46-908618afb7ca"

meetings

meetings: (object | object)[] = [{id: '8bf44cd9-6aaa-4e39-a295-65794daf45cf',day: DAY.FRI,startTime: '12:14:00',endTime: '12:17:00',room: {id: '17d19e35-617d-486d-9b40-f30197342c18',name: 'Maxwell Dworkin G115 Lecture Theatre',campus: 'Cambridge',},},{id: 'ac220eec-6775-4974-9950-700a2459979e',day: DAY.MON,startTime: '12:08:00',endTime: '12:10:00',room: {id: '17d19e35-617d-486d-9b40-f30197342c18',name: 'Maxwell Dworkin G115 Lecture Theatre',campus: 'Cambridge',},},]

spring

spring: object

calendarYear

calendarYear: string = "2020"

id

id: string = "3086f1be-a15f-491f-b82b-e991f3e747b1"

meetings

meetings: (object | object)[] = [{id: '69c72509-3cf0-431a-a1d1-924dcdd43b01',day: DAY.FRI,startTime: '12:14:00',endTime: '12:17:00',room: {id: '17d19e35-617d-486d-9b40-f30197342c18',name: 'Maxwell Dworkin G115 Lecture Theatre',campus: 'Cambridge',},},{id: 'afef329c-90af-4d67-9f86-74568a466d26',day: DAY.MON,startTime: '12:08:00',endTime: '12:10:00',room: {id: '17d19e35-617d-486d-9b40-f30197342c18',name: 'Maxwell Dworkin G115 Lecture Theatre',campus: 'Cambridge',},},]

Const computerScienceCourseQueryResult

computerScienceCourseQueryResult: object

An example FindCoursesQueryResult response representing CS 50.

areaId

areaId: string = computerScienceCourseResponse.area.id

areaName

areaName: string = computerScienceCourseResponse.area.name

catalogNumber

catalogNumber: string = computerScienceCourseResponse.catalogNumber

id

id: string = computerScienceCourseResponse.id

isSEAS

isSEAS: IS_SEAS = computerScienceCourseResponse.isSEAS

isUndergraduate

isUndergraduate: boolean = computerScienceCourseResponse.isUndergraduate

number

number: string = computerScienceCourseResponse.number

prefix

prefix: string = computerScienceCourseResponse.prefix

private

private: boolean = computerScienceCourseResponse.private

sameAs

sameAs: string = computerScienceCourseResponse.sameAs

termPattern

termPattern: TERM_PATTERN = computerScienceCourseResponse.termPattern

title

title: string = computerScienceCourseResponse.title

Const computerScienceCourseResponse

computerScienceCourseResponse: object

An example ManageCourseResponseDTO response representing CS 50.

catalogNumber

catalogNumber: string = `${createCourseDtoExample.prefix} ${createCourseDtoExample.number}`

id

id: string = "b8bc8456-51fd-48ef-b111-5a5990671cd1"

isSEAS

isSEAS: IS_SEAS = createCourseDtoExample.isSEAS

isUndergraduate

isUndergraduate: boolean = createCourseDtoExample.isUndergraduate

number

number: string = createCourseDtoExample.number

prefix

prefix: string = createCourseDtoExample.prefix

private

private: boolean = createCourseDtoExample.private

sameAs

sameAs: string = createCourseDtoExample.sameAs

termPattern

termPattern: TERM_PATTERN = createCourseDtoExample.termPattern

title

title: string = createCourseDtoExample.title

area

area: object

id

id: string = "a49edd11-0f2d-4d8f-9096-a4062955a11a"

name

name: string = createCourseDtoExample.area

Const computerScienceFacultyScheduleResponse

computerScienceFacultyScheduleResponse: object

An example FacultyResponseDTO response representing a schedule of a computer science faculty member

area

area: string = "CS"

category

category: LADDER = FACULTY_TYPE.LADDER

firstName

firstName: string = "David"

id

id: string = "6a0af269-3128-48b9-ac33-22f3dea36b31"

jointWith

jointWith: string = ""

lastName

lastName: string = "Malan"

fall

fall: object

academicYear

academicYear: number = 2021

courses

courses: object[] = [{id: '92abefb7-d0b3-4ec0-b4a4-9050867aa927',catalogNumber: 'CS 50',},]

id

id: string = "f13c95ba-ea08-421a-9597-4152bb8ae69a"

absence

absence: object

id

id: string = "32dea373-1c18-4eab-bf93-b0482f8c843d"

type

type: PRESENT = ABSENCE_TYPE.PRESENT

spring

spring: object

academicYear

academicYear: number = 2021

courses

courses: object[] = [{id: 'bbb0d395-3176-4752-b08d-1af1e20d1c21',catalogNumber: 'CS 226',},]

id

id: string = "e92eea2d-543c-4988-a68f-3e7ca82d306d"

absence

absence: object

id

id: string = "1efd670a-f05e-49d4-8c9f-119c4f298f73"

type

type: PRESENT = ABSENCE_TYPE.PRESENT

Const createCourseDtoExample

createCourseDtoExample: object

An example of CreateCourse representing CS 50

area

area: string = cs50Course.area.name

isSEAS

isSEAS: IS_SEAS = cs50Course.isSEAS

isUndergraduate

isUndergraduate: boolean = cs50Course.isUndergraduate

number

number: string = cs50Course.number

prefix

prefix: string = cs50Course.prefix

private

private: boolean = cs50Course.private

sameAs

sameAs: any = cs50Course.sameAs

termPattern

termPattern: TERM_PATTERN = cs50Course.termPattern

title

title: string = cs50Course.title

Const createNonClassParent

createNonClassParent: object

Create Non-class Parent

Version of dataScienceReadingGroup but changed to match CreateNonClassParentDTO.

area

area: string = "e257e0bb-9875-4688-a7f8-91906c45fce2"

contactEmail

contactEmail: null = null

contactName

contactName: string = "Jim Waldo"

contactPhone

contactPhone: string = "(617) 555-0123"

expectedSize

expectedSize: number = 190

notes

notes: null = null

title

title: string = "Data Science Reading Group"

Const createSEC555Room

createSEC555Room: object

building

building: string = "SEC"

campus

campus: string = "Allston"

capacity

capacity: number = 70

name

name: string = "555"

Const cs50CourseInstance

cs50CourseInstance: object

The data object representing the intro to computer science course CS 50 in the 2018 academic year. This course is only offered in the fall, with one instructor and one meeting. It has no notes or sameAs data.

area

area: string = "CS"

catalogNumber

catalogNumber: string = "CS 050"

id

id: string = "ae6c6e2a-ffc4-4ac9-ae6d-d47b545be93e"

isSEAS

isSEAS: Y = IS_SEAS.Y

isUndergraduate

isUndergraduate: true = true

notes

notes: null = null

sameAs

sameAs: string = ""

termPattern

termPattern: FALL = TERM_PATTERN.FALL

title

title: string = "Introduction to Computer Science"

fall

fall: object

actualEnrollment

actualEnrollment: number = 694

calendarYear

calendarYear: string = "2017"

id

id: string = "1ee96ccd-a36a-4602-8793-88e1b862add4"

instructors

instructors: object[] = [{id: '8d2c8320-dfe5-4d6b-9722-525f94401c7d',displayName: 'Malan, David',notes: 'Prefers Sanders Theater',},{id: '4d952d8a-21a1-425b-876e-321ce708dea8',displayName: 'Waldo, James',notes: '',},{id: 'cec66944-8c43-4094-a05e-5fdccca2e04c',displayName: 'Amin, Nada',notes: null,},]

meetings

meetings: (object | object | object)[] = [{id: 'afc4ee36-b0cf-4cd7-97b7-b51b3323280a',day: DAY.FRI,startTime: '10:00:00',endTime: '12:00:00',room: {id: 'afc4ee36-b0cf-4cd7-97b7-b51b3323280d',campus: 'Cambridge',name: 'Sanders Theater',},},{id: 'f21f783c-2204-4f32-8459-4b84095bbcc0',day: DAY.TUE,startTime: '10:00:00',endTime: '12:00:00',room: {id: 'afc4ee36-b0cf-4cd7-97b7-b51b3323280d',campus: 'Cambridge',name: 'Sanders Theater',},},{id: 'be6235a9-3425-4b03-aa90-9a69997ad1cf',day: DAY.THU,startTime: '11:00:00',endTime: '23:30:00',room: null,},]

offered

offered: Y = OFFERED.Y

preEnrollment

preEnrollment: null = null

studyCardEnrollment

studyCardEnrollment: number = 697

spring

spring: object

actualEnrollment

actualEnrollment: null = null

calendarYear

calendarYear: string = "2018"

id

id: string = "6cdaf745-4ab3-486b-b3fc-60ceba4ef621"

instructors

instructors: undefined[] = []

meetings

meetings: undefined[] = []

offered

offered: BLANK = OFFERED.BLANK

preEnrollment

preEnrollment: null = null

studyCardEnrollment

studyCardEnrollment: null = null

Const cs50FallInstanceUpdate

cs50FallInstanceUpdate: object

The data object represents the request offered and enrollment data for the fall instance of Intro to Computer Science course CS 50. This object can be used as the request object to update the offered or enrollment data for the semester course instance.

actualEnrollment

actualEnrollment: number = cs50CourseInstance.fall.actualEnrollment

offered

offered: OFFERED = cs50CourseInstance.fall.offered

preEnrollment

preEnrollment: number = cs50CourseInstance.fall.preEnrollment

studyCardEnrollment

studyCardEnrollment: number = cs50CourseInstance.fall.studyCardEnrollment

Const currentMetadata

currentMetadata: object

Const dataScienceReadingGroup

dataScienceReadingGroup: object

Data Science Reading Group

Non-class parent for data science reading group formatted to match NonClassMeetingResponseDTO.

area

area: string = "FAS"

contactEmail

contactEmail: null = null

contactName

contactName: string = "Jim Waldo"

contactPhone

contactPhone: string = "(617) 555-0123"

expectedSize

expectedSize: number = 190

id

id: string = "9548f85e-d613-48d2-94fe-63dbaf95084c"

notes

notes: null = null

title

title: string = "Data Science Reading Group"

fall

fall: object

calendarYear

calendarYear: string = "2020"

id

id: string = "613778f2-ef61-475e-8ca3-71a6416de9a4"

meetings

meetings: (object | object)[] = [{id: 'bd572431-e00e-4a78-9975-1aa90d86c15b',day: DAY.FRI,startTime: '12:14:00',endTime: '12:17:00',room: {id: '17d19e35-617d-486d-9b40-f30197342c18',name: 'Maxwell Dworkin G115 Lecture Theatre',campus: 'Cambridge',},},{id: 'afa76436-4523-4f3b-a952-95ec76c1294d',day: DAY.MON,startTime: '12:08:00',endTime: '12:10:00',room: {id: '17d19e35-617d-486d-9b40-f30197342c18',name: 'Maxwell Dworkin G115 Lecture Theatre',campus: 'Cambridge',},},]

spring

spring: object

calendarYear

calendarYear: string = "2020"

id

id: string = "59d737ac-aadc-4e67-8d7a-7db2299d0026"

meetings

meetings: (object | object)[] = [{id: '06369a12-24f0-4a5c-8ecc-9e0124179f75',day: DAY.FRI,startTime: '12:14:00',endTime: '12:17:00',room: {id: '17d19e35-617d-486d-9b40-f30197342c18',name: 'Maxwell Dworkin G115 Lecture Theatre',campus: 'Cambridge',},},{id: '968bd796-0cfb-402a-91e3-59b44c2c9ab9',day: DAY.MON,startTime: '12:08:00',endTime: '12:10:00',room: {id: '17d19e35-617d-486d-9b40-f30197342c18',name: 'Maxwell Dworkin G115 Lecture Theatre',campus: 'Cambridge',},},]

Const defaultOptions

defaultOptions: object

Reasonable defaults for creating a testing db container. In cases where you would need multiple containers running, each would need a different name and port, at a minimum.

containerName

containerName: string = "testing-database"

databaseName

databaseName: string = "testing"

password

password: string = "testpwd"

port

port: number = 7654

user

user: string = "testuser"

Const displayNames

displayNames: object = enrollmentFields.reduce((obj, item) => Object.assign(obj, { [item.key]: item.name }), {})

A mapping of each form field property name to its display name A mapping from each of the modal form fields to their display names

campus

campus: string = "Campus"

capacity

capacity: string = "Capacity"

catalogPrefix

catalogPrefix: string = "Catalog Prefix"

courseNumber

courseNumber: string = "Course Number"

courseTitle

courseTitle: string = "Course Title"

existingArea

existingArea: string = "Existing Area"

existingBuilding

existingBuilding: string = "Existing Building"

isSEAS

isSEAS: string = "Is SEAS"

isUndergraduate

isUndergraduate: string = "Undergraduate"

newArea

newArea: string = "New Area"

newBuilding

newBuilding: string = "New Building"

notes

notes: string = "Notes"

roomName

roomName: string = "Room Number"

sameAs

sameAs: string = "Same As"

termPattern

termPattern: string = "Term Pattern"

Const electricalEngineeringFacultyScheduleResponse

electricalEngineeringFacultyScheduleResponse: object

An example FacultyResponseDTO response representing a schedule of an applied math faculty member

area

area: string = "EE"

category

category: NON_LADDER = FACULTY_TYPE.NON_LADDER

firstName

firstName: string = "Avi"

id

id: string = "aef568df-969d-41d9-9fa5-746cbf734dce"

jointWith

jointWith: string = ""

lastName

lastName: string = "Demler"

fall

fall: object

academicYear

academicYear: number = 2021

courses

courses: object[] = [{id: '22225da5-5213-4787-b819-955f554eca4e',catalogNumber: 'EE 100',},{id: '05d04a88-8db2-46fe-8b87-aa70244ad655',catalogNumber: 'EE 20',},{id: 'bbc7492a-71b2-489b-a9ec-a0a052c4f5c8',catalogNumber: 'EE 210',},]

id

id: string = "cc6b661b-b423-4da7-9248-88a56e070905"

absence

absence: object

id

id: string = "e8a7f24e-d6d0-4c9d-bfb6-89d070d21091"

type

type: SABBATICAL_ELIGIBLE = ABSENCE_TYPE.SABBATICAL_ELIGIBLE

spring

spring: object

academicYear

academicYear: number = 2021

courses

courses: object[] = [{id: '441c517f-bc48-46e3-86c2-4949d1908c5d',catalogNumber: 'EE 204',},{id: '73d1ee13-8b05-46d9-86fc-9e86442f94bd',catalogNumber: 'EE 130',},{id: 'bbc7492a-71b2-489b-a9ec-a0a052c4f5c8',catalogNumber: 'EE 210',},{id: 'c6d3e613-fc0e-4ad4-91d3-7396dbb364f8',catalogNumber: 'EE 300',},]

id

id: string = "a2b0c918-04ea-4629-8e43-5a1b9f02ea6b"

absence

absence: object

id

id: string = "5f700cd5-9ff9-48a7-875d-2a7b7dc290ea"

type

type: PRESENT = ABSENCE_TYPE.PRESENT

Const emptyFilters

emptyFilters: object

The initial, empty state for the filters

area

area: string = "All"

catalogNumber

catalogNumber: string = ""

isSEAS

isSEAS: "All" = "All"

title

title: string = ""

fall

fall: object

instructors

instructors: string = ""

offered

offered: "All" = "All"

spring

spring: object

instructors

instructors: string = ""

offered

offered: "All" = "All"

Const es095CourseInstance

es095CourseInstance: object

Data representing ES 95, which is offered in both fall and spring, with one meeting and one instructor in each. It has no notes or sameAs data.

area

area: string = "General"

catalogNumber

catalogNumber: string = "ES 095r"

id

id: string = "89c23511-3fcb-4436-aa2d-106f7c2aace0"

isSEAS

isSEAS: Y = IS_SEAS.Y

isUndergraduate

isUndergraduate: true = true

notes

notes: null = null

sameAs

sameAs: string = ""

termPattern

termPattern: BOTH = TERM_PATTERN.BOTH

title

title: string = "Startup R & D"

fall

fall: object

actualEnrollment

actualEnrollment: number = 45

calendarYear

calendarYear: string = "2017"

id

id: string = "213734a5-21d3-4476-9818-680761c19fee"

instructors

instructors: object[] = [{id: 'ae3948c7-b254-4cfb-aa9f-5c54c13a1a86',displayName: 'Bottino, Paul',notes: '',},]

meetings

meetings: object[] = [{id: 'a405c124-391d-4584-b7f2-6c4442dcd4a4',day: DAY.THU,startTime: '16:00:00',endTime: '18:00:00',room: {id: 'bb64bef2-584c-4a40-8d3f-34137580472f',campus: 'Cambridge',name: 'Maxwell Dworkin G110',},},]

offered

offered: Y = OFFERED.Y

preEnrollment

preEnrollment: null = null

studyCardEnrollment

studyCardEnrollment: number = 39

spring

spring: object

actualEnrollment

actualEnrollment: number = 33

calendarYear

calendarYear: string = "2018"

id

id: string = "a311b26f-e033-4b41-8a74-5dcb7e390199"

instructors

instructors: object[] = [{id: 'ae3948c7-b254-4cfb-aa9f-5c54c13a1a86',displayName: 'Bottino, Paul',notes: '',},]

meetings

meetings: object[] = [{id: 'bb64bef2-584c-4a40-8d3f-34137580472e',day: DAY.TUE,startTime: '15:00:00',endTime: '17:45:00',room: {id: 'bb64bef2-584c-4a40-8d3f-34137580472f',campus: 'Cambridge',name: 'Maxwell Dworkin G110',},},]

offered

offered: Y = OFFERED.Y

preEnrollment

preEnrollment: null = null

studyCardEnrollment

studyCardEnrollment: number = 25

Const es247RetiredCourseInstance

es247RetiredCourseInstance: object

The data object representing the retired Fracture Mechanics course, ES 247, in the 2018 academic year.

area

area: string = "ES"

catalogNumber

catalogNumber: string = "ES 247"

id

id: string = "4a2909c7-92d1-4613-b53b-cf75fdef7d26"

isSEAS

isSEAS: Y = IS_SEAS.Y

isUndergraduate

isUndergraduate: true = true

notes

notes: null = null

sameAs

sameAs: string = ""

termPattern

termPattern: SPRING = TERM_PATTERN.SPRING

title

title: string = "Fracture Mechanics"

fall

fall: object

actualEnrollment

actualEnrollment: null = null

calendarYear

calendarYear: string = "2018"

id

id: string = "c4bd3649-0841-4a7a-a317-8d856821e16e"

instructors

instructors: undefined[] = []

meetings

meetings: undefined[] = []

offered

offered: RETIRED = OFFERED.RETIRED

preEnrollment

preEnrollment: null = null

studyCardEnrollment

studyCardEnrollment: null = null

spring

spring: object

actualEnrollment

actualEnrollment: number = 123

calendarYear

calendarYear: string = "2017"

id

id: string = "a16fa199-8b57-4082-b02c-207cd998ac8a"

instructors

instructors: object[] = [{id: '373b53a0-8bc7-4af0-be21-5e0479a2215d',displayName: 'Suo, Zhigang',},]

meetings

meetings: object[] = [{id: 'f5fa6fbb-c1d7-47c3-ac0f-39d32628b64a',day: DAY.FRI,startTime: '10:00:00',endTime: '12:00:00',room: {id: '1a2f2a93-132c-4bef-bf2d-4f431703f91d',campus: 'Cambridge',name: '1414 Massachusetts Avenue 437',},},]

offered

offered: RETIRED = OFFERED.RETIRED

preEnrollment

preEnrollment: null = null

studyCardEnrollment

studyCardEnrollment: number = 140

Const facultyAbsenceRequest

facultyAbsenceRequest: object

id

id: string = "a2b0c918-04ea-4629-8e43-5a1b9f02ea6b"

type

type: SABBATICAL = ABSENCE_TYPE.SABBATICAL

Const facultyAbsenceResponse

facultyAbsenceResponse: object

id

id: string = "a2b0c918-04ea-4629-8e43-5a1b9f02ea6b"

type

type: RESEARCH_LEAVE = ABSENCE_TYPE.RESEARCH_LEAVE

Const facultyTypeEnumToTitleCaseMap

facultyTypeEnumToTitleCaseMap: object

Define the map here to avoid a new object being created on each call to facultyTypeEnumToTitleCase

__computed

__computed: string = "Non-Ladder"

Const fall

fall: object

The first Semester of academic year 2020. This Semester is part of the same academic year as spring

absences

absences: undefined[] = []

academicYear

academicYear: string = "2020"

courseInstances

courseInstances: undefined[] = []

createdAt

createdAt: Date = new Date()

id

id: string = ""

nonClassEvents

nonClassEvents: undefined[] = []

term

term: FALL = TERM.FALL

updatedAt

updatedAt: Date = new Date()

Const freeFASRoom

freeFASRoom: object

A room response for an Non-SEAS room with no meetings booked

campus

campus: string = "Non-SEAS"

capacity

capacity: number = 240

id

id: string = "7a1918d1-173c-4628-baac-cd6cf10a9b95"

meetingTitles

meetingTitles: undefined[] = []

name

name: string = "Science Center Auditorium C"

Const freeRoom

freeRoom: object

A room response where the room is available

campus

campus: string = "Allston"

capacity

capacity: number = 65

id

id: string = "e559c201-1913-4698-888f-91e3f13c8498"

meetingTitles

meetingTitles: undefined[] = []

name

name: string = "SEC 2121"

Const initialMessageState

initialMessageState: object

Define our initial values for the queue and currentMessage, both of which should be empty

currentMessage

currentMessage: null = null

queue

queue: undefined[] = []

Const metadata

metadata: object

Example of the data returned from the /api/metadata endpoint, used for populating certain fields throughout the app.

areas

areas: string[]

campuses

campuses: CampusResponse[]

catalogPrefixes

catalogPrefixes: string[]

currentAcademicYear

currentAcademicYear: number

semesters

semesters: string[]

Const mockAreaRepository

mockAreaRepository: object

findOneOrFail

findOneOrFail: SinonStub<any[], any> = stub()

Const mockNonClassEventService

mockNonClassEventService: object

createWithNonClassEvents

createWithNonClassEvents: SinonStub<any[], any> = stub()

find

find: SinonStub<any[], any> = stub()

Const mockParentRepository

mockParentRepository: object

findOne

findOne: SinonStub<any[], any> = stub()

Const mondayMeetingReponseWithRoom

mondayMeetingReponseWithRoom: object

day

day: MON = DAY.MON

endTime

endTime: string = "10:30:00"

id

id: string = "d7668e5e-a2f6-4c63-b265-c981a15a170a"

startTime

startTime: string = "09:00:00"

room

room: object

campus

campus: string = "Cambridge"

id

id: string = "dc913de7-9707-4d49-a5dd-97b66e54d25e"

name

name: string = "Maxwell Dworkin G125"

Const mondayMeetingWithRoom

mondayMeetingWithRoom: object

A collection of fake meetings to use for testing meeting behaviors

day

day: MON = DAY.MON

endTime

endTime: string = "10:30:00"

roomId

roomId: string = "dc913de7-9707-4d49-a5dd-97b66e54d25e"

startTime

startTime: string = "09:00:00"

Const mondayMeetingWithoutRoom

mondayMeetingWithoutRoom: object

day

day: MON = DAY.MON

endTime

endTime: string = "10:30:00"

roomId

roomId: null = null

startTime

startTime: string = "09:00:00"

Const multiBookedRoom

multiBookedRoom: object

A room response where multiple courses have already booked the room

campus

campus: string = "Cambridge"

capacity

capacity: number = 120

id

id: string = "17fe9fe8-aaed-4757-90f4-31c38b51aa17"

meetingTitles

meetingTitles: string[] = ['AC 209a', 'ES 100', 'AM 112']

name

name: string = "Maxwell Dworkin G125"

Const newAppliedPhysicsFacultyMember

newAppliedPhysicsFacultyMember: object

An example CreateFacultyDTO representing an applied physics faculty member

HUID

HUID: string = "41297905"

area

area: string = "AP"

category

category: NON_LADDER = FACULTY_TYPE.NON_LADDER

firstName

firstName: string = "Sam"

lastName

lastName: string = "Conwell"

Const newAreaCourseResponse

newAreaCourseResponse: object

An example ManageCourseResponseDTO response representing a course with a non-existing area

catalogNumber

catalogNumber: string = "NA 100"

id

id: string = "a1a13689-a925-4d0b-a4fc-21c93263c6d3"

isSEAS

isSEAS: Y = IS_SEAS.Y

isUndergraduate

isUndergraduate: true = true

number

number: string = "100"

prefix

prefix: string = "NA"

private

private: true = true

sameAs

sameAs: null = null

termPattern

termPattern: SPRING = TERM_PATTERN.SPRING

title

title: string = "Introduction to New Area"

area

area: object

id

id: string = "2213e1f8-31be-4e67-be06-a1eabd32ee0b"

name

name: string = "NA"

Const newAreaFacultyMemberRequest

newAreaFacultyMemberRequest: object

An example CreateFacultyDTO representing a faculty member in a new area

HUID

HUID: string = "80598351"

area

area: string = "NA"

category

category: NON_SEAS_LADDER = FACULTY_TYPE.NON_SEAS_LADDER

firstName

firstName: string = "Jessie"

jointWith

jointWith: string = "AM 110"

lastName

lastName: string = "Lawson"

notes

notes: string = "Prefers Cambridge campus"

Const newAreaFacultyMemberResponse

newAreaFacultyMemberResponse: object

An example ManageFacultyResponseDTO response representing a faculty member categorized under a new area

HUID

HUID: string = "80598351"

category

category: NON_SEAS_LADDER = FACULTY_TYPE.NON_SEAS_LADDER

firstName

firstName: string = "Jessie"

id

id: string = "f696d531-aef2-413f-9922-f480aa9d6039"

jointWith

jointWith: string = "AM 110"

lastName

lastName: string = "Lawson"

notes

notes: string = "Prefers Cambridge campus"

area

area: object

id

id: string = "26526d71-2c22-4943-a012-bb5dba7cf2a5"

name

name: string = "NA"

Const newAreaFacultyScheduleResponse

newAreaFacultyScheduleResponse: object

An example FacultyResponseDTO response representing a schedule of a faculty member in an area that does not yet exist for the purpose of testing that the backgroundColor prop is not passed when area does not exist

area

area: string = "NA"

category

category: LADDER = FACULTY_TYPE.LADDER

firstName

firstName: string = "Penelope"

id

id: string = "441c517f-bc48-46e3-86c2-4949d1908c5d"

jointWith

jointWith: string = ""

lastName

lastName: string = "Watson"

fall

fall: object

academicYear

academicYear: number = 2021

courses

courses: object[] = [{id: '37b66373-5000-43f2-9c14-8c2426273785',catalogNumber: 'NA 100',},{id: '6cfaf5af-d2bc-4959-81cc-9f87bf38f9d3',catalogNumber: 'NA 210',},]

id

id: string = "a2b0c918-04ea-4629-8e43-5a1b9f02ea6b"

absence

absence: object

id

id: string = "e8a7f24e-d6d0-4c9d-bfb6-89d070d21091"

type

type: SABBATICAL_ELIGIBLE = ABSENCE_TYPE.SABBATICAL_ELIGIBLE

spring

spring: object

academicYear

academicYear: number = 2021

courses

courses: object[] = [{id: '37b66373-5000-43f2-9c14-8c2426273785',catalogNumber: 'NA 310',},]

id

id: string = "677143a4-314f-4d85-aac7-e446b9bf5eca"

absence

absence: object

id

id: string = "e8a7f24e-d6d0-4c9d-bfb6-89d070d21091"

type

type: SABBATICAL_ELIGIBLE = ABSENCE_TYPE.SABBATICAL_ELIGIBLE

Const noLongerActiveAbsence

noLongerActiveAbsence: object

An example No Longer Active FacultyAbsence with an id and type

id

id: string = "8339ef34-18af-4901-9085-7d9b741261bf"

type

type: NO_LONGER_ACTIVE = ABSENCE_TYPE.NO_LONGER_ACTIVE

Const nonClassParent

nonClassParent: object

A version of dataScienceReadingGroup but re-shaped to match NonClassParent.

contactEmail

contactEmail: null = null

contactName

contactName: string = "Jim Waldo"

contactPhone

contactPhone: string = "(617) 555-0123"

expectedSize

expectedSize: number = 190

id

id: string = "49ac4edb-26ce-46d1-9e17-cc552939a3be"

notes

notes: null = null

title

title: string = "Data Science Reading Group"

Const notActiveACSFacultyScheduleResponse

notActiveACSFacultyScheduleResponse: object

An example FacultyResponseDTO response representing a schedule of a non Active Applied ComputationalScience

area

area: string = "ACS"

category

category: NON_LADDER = FACULTY_TYPE.NON_LADDER

firstName

firstName: string = "Schutt"

id

id: string = "adacda77-0941-48de-8128-24f92787b2ae"

jointWith

jointWith: string = ""

lastName

lastName: string = "Rachel"

fall

fall: object

academicYear

academicYear: number = 2020

courses

courses: object[] = [{id: 'bbc7492a-5fc2-40b3-9c8d-a0a052c4f5c8',catalogNumber: 'ACS 21',},]

id

id: string = "74f52c12-5fc2-40b3-9c8d-dfb62252346a"

absence

absence: object

id

id: string = "007fa61c-6824-449d-b56d-02400a94553e"

type

type: NO_LONGER_ACTIVE = ABSENCE_TYPE.NO_LONGER_ACTIVE

spring

spring: object

academicYear

academicYear: number = 2021

courses

courses: object[] = [{id: 'caa6382b-54c5-484f-bf6c-a0a052c4f5c8',catalogNumber: 'ACS 33',},]

id

id: string = "d7fc148d-54c5-484f-bf6c-532850ca4eda"

absence

absence: object

id

id: string = "0604e7d5-2230-4bf2-8cb5-a8066ff78072"

type

type: NO_LONGER_ACTIVE = ABSENCE_TYPE.NO_LONGER_ACTIVE

Const oxfordRoomResponse

oxfordRoomResponse: object

A room response object, for use in testing the room admin table

capacity

capacity: number = 60

id

id: string = "2d545f2e-ebc7-48d2-a7e3-59bb120233a2"

name

name: string = "330"

building

building: object

id

id: string = "ec635477-d92f-4ebd-a3a1-322c899488e3"

name

name: string = "60 Oxford Street"

campus

campus: object

id

id: string = "def023e0-d47a-4346-bdfb-bf7daed9e18d"

name

name: string = "Cambridge"

Const parentalLeaveAbsence

parentalLeaveAbsence: object

An example Parental Leave FacultyAbsence with an id and type

id

id: string = "2bb45c1d-ea20-4ad1-80fc-e502e70613d1"

type

type: PARENTAL_LEAVE = ABSENCE_TYPE.PARENTAL_LEAVE

Const partiallyActiveAMFacultyScheduleResponse

partiallyActiveAMFacultyScheduleResponse: object

An example FacultyResponseDTO response representing a schedule of a partially Active Applied ComputationalScience

area

area: string = "AM"

category

category: NON_LADDER = FACULTY_TYPE.NON_LADDER

firstName

firstName: string = ""Elizabeth""

id

id: string = "594df85e-46c1-422e-b17b-72ea0cb354a2"

jointWith

jointWith: string = ""

lastName

lastName: string = "Chen"

fall

fall: object

academicYear

academicYear: number = 2020

courses

courses: object[] = [{id: 'bbc7492a-5fc2-40b3-9c8d-a0a052c4f5c8',catalogNumber: 'AM 45',},]

id

id: string = "74f52c12-5fc2-40b3-9c8d-dfb62252346a"

absence

absence: object

id

id: string = "c31f48c9-f26c-4c44-8724-abbaf1e93452"

type

type: PRESENT = ABSENCE_TYPE.PRESENT

spring

spring: object

academicYear

academicYear: number = 2021

courses

courses: object[] = [{id: 'caa6382b-54c5-484f-bf6c-a0a052c4f5c8',catalogNumber: 'AM 23',},]

id

id: string = "d7fc148d-54c5-484f-bf6c-532850ca4eda"

absence

absence: object

id

id: string = "09553d71-527e-4b71-8a45-abbf01e94a32"

type

type: NO_LONGER_ACTIVE = ABSENCE_TYPE.NO_LONGER_ACTIVE

Const physicsCourseQueryResult

physicsCourseQueryResult: object

An example FindCoursesQueryResult response representing AP 295a.

areaId

areaId: string = physicsCourseResponse.area.id

areaName

areaName: string = physicsCourseResponse.area.name

catalogNumber

catalogNumber: string = physicsCourseResponse.catalogNumber

id

id: string = physicsCourseResponse.id

isSEAS

isSEAS: IS_SEAS = physicsCourseResponse.isSEAS

isUndergraduate

isUndergraduate: boolean = physicsCourseResponse.isUndergraduate

number

number: string = physicsCourseResponse.number

prefix

prefix: string = physicsCourseResponse.prefix

private

private: boolean = physicsCourseResponse.private

sameAs

sameAs: string = physicsCourseResponse.sameAs

termPattern

termPattern: TERM_PATTERN = physicsCourseResponse.termPattern

title

title: string = physicsCourseResponse.title

Const physicsCourseResponse

physicsCourseResponse: object

An example ManageCourseResponseDTO response representing AP 295a.

catalogNumber

catalogNumber: string = "AP 295a"

id

id: string = "a1a13689-a925-4d0b-a4fc-21c93263c6d2"

isSEAS

isSEAS: Y = IS_SEAS.Y

isUndergraduate

isUndergraduate: true = true

number

number: string = "295a"

prefix

prefix: string = "AP"

private

private: true = true

sameAs

sameAs: null = null

termPattern

termPattern: SPRING = TERM_PATTERN.SPRING

title

title: string = "Introduction to Quantum Theory of Solids"

area

area: object

id

id: string = "2213e1f8-31be-4e67-be06-a1eabd32ee0a"

name

name: string = "AP"

Const physicsFacultyMemberResponse

physicsFacultyMemberResponse: object

An example ManageFacultyResponseDTO response representing a physics faculty member

HUID

HUID: string = "41297905"

category

category: NON_LADDER = FACULTY_TYPE.NON_LADDER

firstName

firstName: string = "Sam"

id

id: string = "4a13c3b7-45ed-4aa9-94b7-29e70c9cd6b0"

lastName

lastName: string = "Conwell"

area

area: object

id

id: string = "140bd70d-08e2-4164-ab8e-29934f315760"

name

name: string = "AP"

Const presentAbsence

presentAbsence: object

An example Present FacultyAbsence with an id and type

id

id: string = "c4582348-08b4-4997-b3ff-61e8befe76b3"

type

type: PRESENT = ABSENCE_TYPE.PRESENT

Const researchLeaveAbsence

researchLeaveAbsence: object

An example Research Leave FacultyAbsence with an id and type

id

id: string = "47a0cf09-9d4b-4cea-b2de-7afe39133770"

type

type: RESEARCH_LEAVE = ABSENCE_TYPE.RESEARCH_LEAVE

Const roomRequest

roomRequest: object

A room request object, for use in testing

calendarYear

calendarYear: string = "2020"

day

day: MON = DAY.MON

endTime

endTime: string = "15:00:00"

startTime

startTime: string = "13:00:00"

term

term: FALL = TERM.FALL

Const sabbaticalAbsence

sabbaticalAbsence: object

An example Sabbatical FacultyAbsence with an id and type

id

id: string = "30f57dc3-5c40-4ab4-a796-dc0516014ab2"

type

type: SABBATICAL = ABSENCE_TYPE.SABBATICAL

Const sabbaticalEligibleAbsence

sabbaticalEligibleAbsence: object

An example Sabbatical Eligible FacultyAbsence with an id and type

id

id: string = "044d3e45-6645-45c0-b518-16e7111ca850"

type

type: SABBATICAL_ELIGIBLE = ABSENCE_TYPE.SABBATICAL_ELIGIBLE

Const sabbaticalIneligibleAbsence

sabbaticalIneligibleAbsence: object

An example Sabbatical Ineligible FacultyAbsence with an id and type

id

id: string = "c2945883-b6da-4b3b-8de3-4a8030569a6c"

type

type: SABBATICAL_INELIGIBLE = ABSENCE_TYPE.SABBATICAL_INELIGIBLE

Const sec555RoomResponse

sec555RoomResponse: object

capacity

capacity: number = createSEC555Room.capacity

id

id: string = "c149f216-553f-421d-91e0-6bde970045f9"

name

name: string = createSEC555Room.name

building

building: object

id

id: string = "2de0aaac-dc6e-4871-acc5-7569d2a72548"

name

name: string = createSEC555Room.building

campus

campus: object

id

id: string = "acda43fe-db55-4a68-87db-b10dd9bf4a84"

name

name: string = createSEC555Room.campus

Const secRoomResponse

secRoomResponse: object

A room response object, for use in testing the room admin table

capacity

capacity: number = 20

id

id: string = "36f876da-f152-4b62-b254-55cee104ceb4"

name

name: string = "101A"

building

building: object

id

id: string = "9b22ae2d-20a8-4e3d-a6ed-7096ee50cd19"

name

name: string = "SEC"

campus

campus: object

id

id: string = "73016f1f-11d3-4a60-95a4-34f2864c9408"

name

name: string = "Allston"

Const spring

spring: object

The second Semester of academic year 2020. This Semester is part of the same academic year as spring

absences

absences: undefined[] = []

academicYear

academicYear: string = "2020"

courseInstances

courseInstances: undefined[] = []

createdAt

createdAt: Date = new Date()

id

id: string = ""

nonClassEvents

nonClassEvents: undefined[] = []

term

term: SPRING = TERM.SPRING

updatedAt

updatedAt: Date = new Date()

Const teachingReliefAbsence

teachingReliefAbsence: object

An example Teaching Relief FacultyAbsence with an id and type

id

id: string = "eab7c74e-881d-469a-9f0d-7bd369889993"

type

type: TEACHING_RELIEF = ABSENCE_TYPE.TEACHING_RELIEF

Const updateCourseExample

updateCourseExample: object

An example UpdateCourseDTO response representing CS 50

area

area: string = cs50Course.area.name

id

id: string = cs50Course.id

isSEAS

isSEAS: IS_SEAS = cs50Course.isSEAS

isUndergraduate

isUndergraduate: boolean = cs50Course.isUndergraduate

number

number: string = cs50Course.number

prefix

prefix: string = cs50Course.prefix

private

private: boolean = cs50Course.private

sameAs

sameAs: any = cs50Course.sameAs

termPattern

termPattern: TERM_PATTERN = cs50Course.termPattern

title

title: string = cs50Course.title

Const updateNonClassParent

updateNonClassParent: object

Update Non-class Parent

Version of dataScienceReadingGroup but changed to match UpdateNonClassParentDTO. Since all fields on this DTO are optional, some fields have been deliberately omitted from this data structure to demonstrate that fact.

The fields that remain were chosen to try and give a wide variety of types. Of the remaining fields, there are:

  • A UUID
  • A string
  • A null field
  • A numeric field
  • A phone number

area

area: string = "e257e0bb-9875-4688-a7f8-91906c45fce2"

contactName

contactName: string = "Jim Waldo"

contactPhone

contactPhone: string = "(617) 555-0123"

expectedSize

expectedSize: number = 190

notes

notes: null = null

title

title: string = "A new title"

Const updateSEC555Room

updateSEC555Room: object

A room request object, for use in testing updating a room

capacity

capacity: number = 95

id

id: string = secRoomResponse.id

name

name: string = "555a"

Const updateSECRoomResponse

updateSECRoomResponse: object

A room response object, for use in testing the outcome of updating a room

building

building: BuildingInfo = sec555RoomResponse.building

capacity

capacity: number = updateSEC555Room.capacity

id

id: string = sec555RoomResponse.id

name

name: string = updateSEC555Room.name

Const wednesdayMeetingReponseWithoutRoom

wednesdayMeetingReponseWithoutRoom: object

day

day: WED = DAY.WED

endTime

endTime: string = "10:30:00"

id

id: string = "1ebdaad0-75a4-49b8-b2e5-f09354f9339b"

startTime

startTime: string = "09:00:00"

room

room: object

campus

campus: string = "Cambridge"

id

id: string = "dc913de7-9707-4d49-a5dd-97b66e54d25e"

name

name: string = "Maxwell Dworkin G125"

Const wednesdayMeetingWithRoom

wednesdayMeetingWithRoom: object

day

day: WED = DAY.WED

endTime

endTime: string = "10:30:00"

roomId

roomId: string = "dc913de7-9707-4d49-a5dd-97b66e54d25e"

startTime

startTime: string = "09:00:00"

Const wednesdayMeetingWithoutRoom

wednesdayMeetingWithoutRoom: object

day

day: WED = DAY.WED

endTime

endTime: string = "10:30:00"

roomId

roomId: null = null

startTime

startTime: string = "09:00:00"

Generated using TypeDoc