refactor: block event xlsx import (#1623)

This commit is contained in:
Shobhit Nagpal
2025-06-02 10:26:46 +05:30
committed by GitHub
parent 0dcea4f2d7
commit 8723bcbd33
3 changed files with 5 additions and 1 deletions
@@ -96,6 +96,7 @@ describe('makeTable()', () => {
"Is Public? (x)",
"Skip?",
"lighting",
"Type",
],
[
"00:00:00",
@@ -109,6 +110,7 @@ describe('makeTable()', () => {
"x",
"",
"",
"",
],
]
`);
@@ -59,6 +59,7 @@ export const makeTable = (headerData: ProjectData, rundown: OntimeRundown, custo
'isPublic',
'skip',
...customFieldKeys,
'type',
];
const fieldTitles = [
@@ -73,6 +74,7 @@ export const makeTable = (headerData: ProjectData, rundown: OntimeRundown, custo
'Is Public? (x)',
'Skip?',
...customFieldLabels,
'Type',
];
// add header row to data
+1 -1
View File
@@ -215,7 +215,7 @@ export const parseExcel = (
const maybeTimeType = makeString(column, '');
if (maybeTimeType === 'block') {
event.type = SupportedEvent.Block;
} else if (maybeTimeType === '' || isKnownTimerType(maybeTimeType)) {
} else if (maybeTimeType === '' || maybeTimeType === 'event' || isKnownTimerType(maybeTimeType)) {
event.type = SupportedEvent.Event;
event.timerType = validateTimerType(maybeTimeType);
} else {