1
0

refactor: Some minor refinements
Remote Deploy / deploy (push) Successful in 1m28s

This commit is contained in:
2026-06-05 18:24:54 +02:00
parent e94c43ca6e
commit 8fe2bd3bf2
7 changed files with 46 additions and 296 deletions
+2 -3
View File
@@ -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]?/;