mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-07 08:23:55 +00:00
e9a7cd0400
* add dayOffset to OntimeEvent * refactor: isNewLatest * calculate totalDays * refactor: getTimeFromPrevious * add gap as dataset in OntimeEvent * use in ui * format overlap is just a simple text formatting, big test is not needed * add new fields where needed * update apply delay * show nex day eaven if there is no gap * create test * use buildin day offset in timeline * remove todo * consistent naming * make a calculateDayOffset util for rundownCache * refactor: checkIsNextDay to use dayOffset * spelling Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com> * remove unneeded test * remove todo * update test db * use data-testid * spelling Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com> * update comments * remove null option --------- Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
44 lines
794 B
TypeScript
44 lines
794 B
TypeScript
import {
|
|
EndAction,
|
|
OntimeBlock,
|
|
OntimeDelay,
|
|
OntimeEvent,
|
|
SupportedEvent,
|
|
TimeStrategy,
|
|
TimerType,
|
|
} from 'ontime-types';
|
|
|
|
export const event: Omit<OntimeEvent, 'id' | 'cue'> = {
|
|
title: '',
|
|
note: '',
|
|
endAction: EndAction.None,
|
|
timerType: TimerType.CountDown,
|
|
timeStrategy: TimeStrategy.LockDuration,
|
|
linkStart: null,
|
|
countToEnd: false,
|
|
timeStart: 0,
|
|
timeEnd: 0,
|
|
duration: 0,
|
|
isPublic: false,
|
|
skip: false,
|
|
colour: '',
|
|
type: SupportedEvent.Event,
|
|
revision: 0,
|
|
delay: 0,
|
|
dayOffset: 0,
|
|
gap: 0,
|
|
timeWarning: 120000,
|
|
timeDanger: 60000,
|
|
custom: {},
|
|
};
|
|
|
|
export const delay: Omit<OntimeDelay, 'id'> = {
|
|
duration: 0,
|
|
type: SupportedEvent.Delay,
|
|
};
|
|
|
|
export const block: Omit<OntimeBlock, 'id'> = {
|
|
title: '',
|
|
type: SupportedEvent.Block,
|
|
};
|