diff --git a/client-course-schedulizer/src/utilities/helpers/caseFunctions.ts b/client-course-schedulizer/src/utilities/helpers/caseFunctions.ts index 8f8cea62..f926938e 100644 --- a/client-course-schedulizer/src/utilities/helpers/caseFunctions.ts +++ b/client-course-schedulizer/src/utilities/helpers/caseFunctions.ts @@ -1,5 +1,6 @@ import { cloneDeep, forEach } from "lodash"; import moment from "moment"; +import { Case } from "runtypes"; import { emptyMeeting } from "utilities/constants"; import { Course, Day, Meeting, Section, SemesterLength, Term } from "utilities/interfaces"; @@ -233,6 +234,15 @@ export const sectionCallback = (value: string, params: CaseCallbackParams) => { } }; +export const meetingPatternCallback = (value: string, params: CaseCallbackParams) => { + const meetingDays = value.split("|")[0]; + const startTime = value.split(" ")[2]; + const endTime = value.split(" ")[4]; + + daysCallback(meetingDays, params); + timeCallback(startTime + " - " + endTime, params); +} + export const timeCallback = (value: string, params: CaseCallbackParams) => { const [startTime] = value.split(" ").join("").split("-"); startTimeCallback(startTime, params); diff --git a/client-course-schedulizer/src/utilities/helpers/readCSV.ts b/client-course-schedulizer/src/utilities/helpers/readCSV.ts index 0bc232d0..5864efc5 100644 --- a/client-course-schedulizer/src/utilities/helpers/readCSV.ts +++ b/client-course-schedulizer/src/utilities/helpers/readCSV.ts @@ -60,10 +60,11 @@ const registrarSpreadsheetFields: ValidFields = { Instructors: cf.instructorCallback, LastEditTimestamp: cf.timestampCallback, Location1: cf.locationCallback, - Location2: cf.locationCallback, + // Location2: cf.locationCallback, // LocalMax: cf.localMaxCallback, MeetingDays: cf.daysCallback, MeetingDurationMinutes: cf.durationCallback, + MeetingPatterns: cf.meetingPatternCallback, MeetingStart: cf.startTimeCallback, MeetingTime: cf.timeCallback, MinimumCredits: cf.studentHoursCallback,