This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user