mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-10 01:43:43 +00:00
feat: add flag property
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user