refactor: type cleanup and test improvements

This commit is contained in:
Carlos Valente
2025-05-16 21:02:48 +02:00
committed by arc-alex
parent a1505606cf
commit c7b2f0e89c
4 changed files with 32 additions and 4 deletions
@@ -203,6 +203,11 @@ export async function reorderEntry(eventId: EntryId, from: number, to: number):
return newRundown;
}
/**
* Applies a delay into the rundown effectively changing the schedule
* The applied delay is deleted
* @param delayId
*/
export async function applyDelay(delayId: EntryId) {
const scopedMutation = cache.mutateCache(cache.applyDelay);
await scopedMutation({ delayId });
@@ -275,6 +275,7 @@ function processEntry<T extends OntimeEntry>(
} else if (isOntimeDelay(currentEntry)) {
// !!! this must happen after handling the links
processedData.totalDelay += currentEntry.duration;
currentEntry.parent = childOfBlock;
}
if (!childOfBlock) {