1
0

chore: Minor changes
All checks were successful
Remote Deploy / deploy (push) Successful in 1m18s

This commit is contained in:
2026-03-15 16:34:11 +01:00
parent eab7ddf30e
commit 8e2cbbaadb
2 changed files with 39 additions and 5 deletions

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*/
import ExcelJS, { Worksheet, Cell } from "exceljs"
import ExcelJS, { Worksheet } from "exceljs"
import fs from "fs"
import parseAbsence, { AbsenceResult } from "../utils/parseAbsence.js"
import parseTeachers from "../utils/parseTeachers.js"
@@ -127,9 +127,6 @@ export default async function parseV1V2(downloadedFilePath: string) {
}
})
// Use an array directly, initialized with nulls or sparse array logic
// The original code used `let final2 = []` but treated it as object `final2[parsedKey] = ...`
// Then `Array.from(final2)` converts it to array.
let final2: (string | null)[] = [];
for (const key of allKeys) {
@@ -140,7 +137,7 @@ export default async function parseV1V2(downloadedFilePath: string) {
try {
const regex = /^úklid\s+(?:\d+\s+)?[A-Za-z]{2}$/;
const cellText = cell.text || "";
// @ts-ignore - fgColor is missing in type definition for some versions or intricate structure
// @ts-ignore
const fgColor = cell.fill?.fgColor;
if (regex.test(cellText.trim()) || cellText.trim().length == 0 || fgColor === undefined) {
d = false;