feat: add flag property

This commit is contained in:
Carlos Valente
2025-07-13 12:43:33 +02:00
parent e9dda817e5
commit 637454f73d
22 changed files with 98 additions and 23 deletions
@@ -69,6 +69,7 @@ export const parseExcel = (
let colourIndex: number | null = null;
// options: booleans
let flagIndex: number | null = null;
let skipIndex: number | null = null;
let countToEndIndex: number | null = null;
@@ -123,6 +124,10 @@ export const parseExcel = (
titleIndex = col;
rundownMetadata['title'] = { row, col };
},
[importMap.flag]: (row: number, col: number) => {
flagIndex = col;
rundownMetadata['flag'] = { row, col };
},
[importMap.countToEnd]: (row: number, col: number) => {
countToEndIndex = col;
rundownMetadata['countToEnd'] = { row, col };
@@ -197,6 +202,8 @@ export const parseExcel = (
entry.duration = parseExcelDate(column);
} else if (j === cueIndex) {
entry.cue = makeString(column, '');
} else if (j === flagIndex) {
entry.flag = parseBooleanString(column);
} else if (j === countToEndIndex) {
entry.countToEnd = parseBooleanString(column);
} else if (j === skipIndex) {
@@ -88,6 +88,7 @@ export function createEventPatch(originalEvent: OntimeEvent, patchEvent: Partial
return {
id: originalEvent.id,
type: SupportedEntry.Event,
flag: typeof patchEvent.flag === 'boolean' ? patchEvent.flag : originalEvent.flag,
title: makeString(patchEvent.title, originalEvent.title),
timeStart,
timeEnd,