cellRequenstFromEvent change

This commit is contained in:
arc-alex
2023-11-26 14:23:12 +01:00
parent 54c4a7f68c
commit 8fc70fa162
+1 -8
View File
@@ -133,17 +133,10 @@ class sheet {
},
});
//TODO: this is a mess
const titleCol = Object.values(rundownMetadata)
// .filter(([key, value]) => value !== undefined)
.reduce((accumulator: number, val) => Math.min(accumulator, val['col']), Number.MAX_VALUE);
if (titleCol == Number.MAX_VALUE) {
throw new Error(`could not finde starting title column`);
}
//update the corespunding row with event data
rundown.forEach((entry, index) =>
updateRundown.push(
cellRequenstFromEvent(entry, index, this.worksheetId, rundownMetadata, titleCol as number),
cellRequenstFromEvent(entry, index, this.worksheetId, rundownMetadata),
),
);
const writeResponds = await sheets({ version: 'v4', auth: sheet.client }).spreadsheets.batchUpdate({