This commit is contained in:
+2
-3
@@ -136,7 +136,7 @@ export default async function parseV3(workbook: Workbook, downloadedFilePath: st
|
||||
|
||||
for (const { dateKey, sheet } of resolvedDays) {
|
||||
const ann = announcements[dateKey];
|
||||
const allFlags = ann.map(a => a.flags).flat();
|
||||
const allFlags = ann?.map(a => a.flags)?.flat() || [];
|
||||
|
||||
const { changes, absence, inWork, takesPlace, reservedRooms } = extractDaySchedule(sheet, teacherMap, themeColors, allFlags);
|
||||
|
||||
@@ -155,7 +155,7 @@ export default async function parseV3(workbook: Workbook, downloadedFilePath: st
|
||||
schedule,
|
||||
};
|
||||
|
||||
fs.writeFileSync("volume/db/v3.json", JSON.stringify(data, null, 2));
|
||||
return data;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -238,7 +238,6 @@ function isPripravaSheet(name: string) {
|
||||
//
|
||||
|
||||
function extractClassChanges(sheet: Worksheet, themeColors: ThemeColors | null, flags: Flag[]) {
|
||||
console.log(flags)
|
||||
const ignoreColors = flags.includes(Flag.SHOW_ALL_ENTRIES)
|
||||
const classRegex = /[AEC][0-4][a-c]?\s*\/.*/s;
|
||||
const prefixRegex = /[AEC][0-4][a-c]?/;
|
||||
|
||||
Reference in New Issue
Block a user