mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-05 06:19:11 +00:00
feat: allow dissolving a block
This commit is contained in:
@@ -214,6 +214,22 @@ export async function applyDelay(delayId: EntryId) {
|
||||
notifyChanges({ timer: true, external: true });
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a block from the rundown and moves all its children to the top level
|
||||
*/
|
||||
export async function dissolveBlock(blockId: EntryId) {
|
||||
const scopedMutation = cache.mutateCache(cache.dissolveBlock);
|
||||
const { newRundown } = await scopedMutation({ blockId });
|
||||
|
||||
// notify runtime that rundown has changed
|
||||
updateRuntimeOnChange();
|
||||
|
||||
// we dont need to modify the timer since the grouping does not affect the runtime
|
||||
notifyChanges({ external: true });
|
||||
|
||||
return newRundown;
|
||||
}
|
||||
|
||||
/**
|
||||
* swaps two events
|
||||
* @param {string} from - id of event from
|
||||
|
||||
Reference in New Issue
Block a user