mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 21:24:11 +00:00
fix: parse nested events in rundown
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
import { SupportedEntry, OntimeEvent, OntimeDelay, OntimeBlock, Rundown, CustomField } from 'ontime-types';
|
||||
import {
|
||||
SupportedEntry,
|
||||
OntimeEvent,
|
||||
OntimeDelay,
|
||||
OntimeBlock,
|
||||
Rundown,
|
||||
CustomField,
|
||||
OntimeMilestone,
|
||||
} from 'ontime-types';
|
||||
|
||||
import { defaultRundown } from '../../../models/dataModel.js';
|
||||
|
||||
@@ -13,6 +21,12 @@ const baseBlock = {
|
||||
entries: [],
|
||||
};
|
||||
|
||||
const baseMilestone = {
|
||||
type: SupportedEntry.Milestone,
|
||||
cue: '',
|
||||
title: '',
|
||||
};
|
||||
|
||||
/**
|
||||
* Utility to create a Ontime event
|
||||
*/
|
||||
@@ -37,6 +51,13 @@ export function makeOntimeBlock(patch: Partial<OntimeBlock>): OntimeBlock {
|
||||
return { id: 'block', ...baseBlock, ...patch } as OntimeBlock;
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility to create a block event
|
||||
*/
|
||||
export function makeOntimeMilestone(patch: Partial<OntimeMilestone>): OntimeMilestone {
|
||||
return { id: 'milestone', ...baseMilestone, ...patch } as OntimeMilestone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility to create a rundown object
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user