feat: resolve times on excel import, refs #508

This commit is contained in:
cv
2023-09-29 20:12:53 +02:00
parent a0d4f40bec
commit cf7f6bdbf7
6 changed files with 137 additions and 42 deletions
-14
View File
@@ -1,7 +1,6 @@
import { generateId } from 'ontime-utils';
import {
Alias,
EndAction,
OntimeRundown,
OSCSettings,
OscSubscription,
@@ -9,7 +8,6 @@ import {
ProjectData,
Settings,
TimerLifeCycle,
TimerType,
UserFields,
ViewSettings,
} from 'ontime-types';
@@ -45,18 +43,6 @@ export const parseRundown = (data): OntimeRundown => {
continue;
}
// validate the right endAction is used
if (e.endAction && !Object.values(EndAction).includes(e.endAction)) {
e.endAction = EndAction.None;
console.log('WARNING: invalid End Action provided, using default');
}
// validate the right timerType is used
if (e.timerType && !Object.values(TimerType).includes(e.timerType)) {
e.timerType = TimerType.CountDown;
console.log('WARNING: invalid Timer Type provided, using default');
}
if (e.type === 'event') {
eventIndex += 1;
const event = validateEvent(e, eventIndex.toString());