mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-28 18:39:12 +00:00
refactor: block event xlsx import (#1623)
This commit is contained in:
@@ -96,6 +96,7 @@ describe('makeTable()', () => {
|
|||||||
"Is Public? (x)",
|
"Is Public? (x)",
|
||||||
"Skip?",
|
"Skip?",
|
||||||
"lighting",
|
"lighting",
|
||||||
|
"Type",
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"00:00:00",
|
"00:00:00",
|
||||||
@@ -109,6 +110,7 @@ describe('makeTable()', () => {
|
|||||||
"x",
|
"x",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
|
"",
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
`);
|
`);
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ export const makeTable = (headerData: ProjectData, rundown: OntimeRundown, custo
|
|||||||
'isPublic',
|
'isPublic',
|
||||||
'skip',
|
'skip',
|
||||||
...customFieldKeys,
|
...customFieldKeys,
|
||||||
|
'type',
|
||||||
];
|
];
|
||||||
|
|
||||||
const fieldTitles = [
|
const fieldTitles = [
|
||||||
@@ -73,6 +74,7 @@ export const makeTable = (headerData: ProjectData, rundown: OntimeRundown, custo
|
|||||||
'Is Public? (x)',
|
'Is Public? (x)',
|
||||||
'Skip?',
|
'Skip?',
|
||||||
...customFieldLabels,
|
...customFieldLabels,
|
||||||
|
'Type',
|
||||||
];
|
];
|
||||||
|
|
||||||
// add header row to data
|
// add header row to data
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ export const parseExcel = (
|
|||||||
const maybeTimeType = makeString(column, '');
|
const maybeTimeType = makeString(column, '');
|
||||||
if (maybeTimeType === 'block') {
|
if (maybeTimeType === 'block') {
|
||||||
event.type = SupportedEvent.Block;
|
event.type = SupportedEvent.Block;
|
||||||
} else if (maybeTimeType === '' || isKnownTimerType(maybeTimeType)) {
|
} else if (maybeTimeType === '' || maybeTimeType === 'event' || isKnownTimerType(maybeTimeType)) {
|
||||||
event.type = SupportedEvent.Event;
|
event.type = SupportedEvent.Event;
|
||||||
event.timerType = validateTimerType(maybeTimeType);
|
event.timerType = validateTimerType(maybeTimeType);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user