mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-20 14:39:06 +00:00
refactor: show running gap in UI
This commit is contained in:
committed by
Carlos Valente
parent
f5936e5254
commit
73db14c383
@@ -11,14 +11,7 @@ import {
|
||||
OntimeRundownEntry,
|
||||
PlayableEvent,
|
||||
} from 'ontime-types';
|
||||
import {
|
||||
generateId,
|
||||
insertAtIndex,
|
||||
reorderArray,
|
||||
swapEventData,
|
||||
getTimeFromPrevious,
|
||||
checkIsNextDay,
|
||||
} from 'ontime-utils';
|
||||
import { generateId, insertAtIndex, reorderArray, swapEventData, getTimeFromPrevious, isNewLatest } from 'ontime-utils';
|
||||
import { getDataProvider } from '../../classes/data-provider/DataProvider.js';
|
||||
import { createPatch } from '../../utils/parser.js';
|
||||
import { apply } from './delayUtils.js';
|
||||
@@ -140,11 +133,7 @@ export function generate(
|
||||
currentEntry.delay = totalDelay;
|
||||
|
||||
// lastEntry is the event with the latest end time
|
||||
if (
|
||||
lastEntry === null ||
|
||||
currentEntry.timeEnd > lastEntry.timeEnd ||
|
||||
checkIsNextDay(lastEntry.timeStart, currentEntry.timeStart, lastEntry.duration)
|
||||
) {
|
||||
if (isNewLatest(currentEntry.timeStart, currentEntry.timeEnd, lastEntry?.timeStart, lastEntry?.timeEnd)) {
|
||||
lastEntry = currentEntry;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user