add freeze feature to rundown (#1106)

* add frozen flag to runtime store

* add middleware for when frozen

* prevent rundown editing when frozen

* add endpoint to router to set frozen state

* add frozen property to rundown placeholder in client
This commit is contained in:
2024-07-19 07:14:59 -05:00
committed by GitHub
parent edc7f20d7a
commit e6e00c0d4a
8 changed files with 48 additions and 4 deletions
@@ -21,6 +21,7 @@ import { runtimeService } from '../runtime-service/RuntimeService.js';
import * as cache from './rundownCache.js';
import { getPlayableEvents } from './rundownUtils.js';
import { eventStore } from '../../stores/EventStore.js';
type PatchWithId = (Partial<OntimeEvent> | Partial<OntimeBlock> | Partial<OntimeDelay>) & { id: string };
@@ -262,3 +263,7 @@ export async function initRundown(rundown: Readonly<OntimeRundown>, customFields
// notify timer of change
notifyChanges({ timer: true });
}
export async function setFrozenState(state: boolean) {
eventStore.set('frozen', state);
}