1
0

Compare commits

..

2 Commits

Author SHA1 Message Date
1d743c5553 fix: Takes place
All checks were successful
Remote Deploy / deploy (push) Successful in 6s
2026-02-08 19:38:22 +01:00
dc845edef0 fix: This 2026-02-08 19:29:17 +01:00
2 changed files with 26 additions and 14 deletions

View File

@@ -60,8 +60,8 @@ export default async function parseV1V2(downloadedFilePath) {
}
const upcomingSheets = Object.values(sheetsByDate).map((sheets) => {
if (sheets.length === 1) return sheets[0].name.toLowerCase();
return (sheets.find((s) => s.state !== "hidden") ?? sheets[0]).name.toLowerCase();
if (sheets.length === 1) return sheets[0].name;
return (sheets.find((s) => s.state !== "hidden") ?? sheets[0]).name;
});
const final = [];

View File

@@ -202,26 +202,38 @@ function extractTakesPlace(sheet) {
if (!cell.isMerged) {
return "";
}
let str = "";
try {
str = cell.master.value.trim();
let str = cell.master?.value?.trim() || "";
let i = 5;
while (true) {
const nextCell = sheet.getCell(`B${i}`);
if (!nextCell.isMerged) {
break;
}
if (nextCell.isMerged) {
const cell = nextCell.master
str += `\n${cell.value.trim()}`
i++;
continue;
}
} catch {}
return str;
const tryCells = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K"];
const threshold = 20;
for (const cellTest of tryCells) {
const cellTry = sheet.getCell(`${cellTest}${i}`)
const cellValue = cellTry?.value?.trim() || "";
if (cellValue.length >= threshold) {
str += `\n${cellValue}`;
i++;
continue;
}
}
break;
}
return str.trim();
}
function extractReservedRooms(sheet) {