refactor(rundown): add scoped rundown data primitives

Centralise rundown identity, queries, entry actions, and selection state so a surface can safely target either the loaded or a background rundown.
This commit is contained in:
Carlos Valente
2026-09-13 20:20:02 +02:00
parent b07544ab84
commit 2a992a8595
10 changed files with 555 additions and 172 deletions
+8
View File
@@ -22,6 +22,14 @@ export const CLIENT_LIST = ['clientList'];
export const REPORT = ['report'];
export const TRANSLATION = ['translation'];
/**
* Cache key holding the data for a rundown.
* Before the loaded rundown is known there is no id to key by,
* and the data lives under the bootstrap alias.
*/
export const getRundownCacheKey = (rundownId: string) =>
rundownId ? getRundownQueryKey(rundownId) : CURRENT_RUNDOWN_QUERY_KEY;
// API URLs
export const apiEntryUrl = `${serverURL}/data`;