mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-13 11:23:50 +00:00
feat: parse timeToEnd from excel
This commit is contained in:
committed by
Carlos Valente
parent
0f3feca7ab
commit
df1cf7a96b
@@ -110,6 +110,7 @@ export const parseExcel = (
|
||||
// options: booleans
|
||||
let isPublicIndex: number | null = null;
|
||||
let skipIndex: number | null = null;
|
||||
let isTimeToEndIndex: number | null = null;
|
||||
|
||||
let linkStartIndex: number | null = null;
|
||||
|
||||
@@ -159,6 +160,10 @@ export const parseExcel = (
|
||||
titleIndex = col;
|
||||
rundownMetadata['title'] = { row, col };
|
||||
},
|
||||
[importMap.isTimeToEnd]: (row: number, col: number) => {
|
||||
isTimeToEndIndex = col;
|
||||
rundownMetadata['isTimeToEnd'] = { row, col };
|
||||
},
|
||||
[importMap.isPublic]: (row: number, col: number) => {
|
||||
isPublicIndex = col;
|
||||
rundownMetadata['isPublic'] = { row, col };
|
||||
@@ -226,6 +231,8 @@ export const parseExcel = (
|
||||
event.duration = parseExcelDate(column);
|
||||
} else if (j === cueIndex) {
|
||||
event.cue = makeString(column, '');
|
||||
} else if (j === isTimeToEndIndex) {
|
||||
event.isTimeToEnd = parseBooleanString(column);
|
||||
} else if (j === isPublicIndex) {
|
||||
event.isPublic = parseBooleanString(column);
|
||||
} else if (j === skipIndex) {
|
||||
@@ -271,7 +278,6 @@ export const parseExcel = (
|
||||
|
||||
// if any data was found in row, push to array
|
||||
const keysFound = Object.keys(event).length + Object.keys(eventCustomFields).length;
|
||||
console.log('keys found ---->', event)
|
||||
if (keysFound > 0) {
|
||||
// if it is a Block type drop all other filed
|
||||
if (isOntimeBlock(event)) {
|
||||
|
||||
Reference in New Issue
Block a user