mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-01 04:19:12 +00:00
refactor(rundown): keep runtime views on the loaded rundown
Only the editor and the cuesheet can be pointed at a background rundown. Everything else always works against the rundown being played, so it has no business taking part in a rundown scope. Split the readers by that assumption: - useRundownById holds the query and the shared derivation - useRundown reads from the enclosing scope, for the editor and cuesheet - useLoadedRundown resolves the loaded rundown directly, for the viewers, the operator, app settings and the overview This drops the app wide scope provider, so views which read no rundown (studio, project info) no longer subscribe to the rundown list, and a scope becomes what it claims to be: a panel concern which throws when used outside a panel. It also fixes the overview, which reads runtime ids (the playing group, the next flag). Those only exist in the loaded rundown, so resolving them against a scope returned nothing while a background rundown was open in the cuesheet. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011a5cbVjNC5XXF88b2PkUCa
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { CustomFields, ProjectData, RundownEntries, Settings, ViewSettings } from 'ontime-types';
|
||||
|
||||
import useCustomFields from '../../common/hooks-query/useCustomFields';
|
||||
import { useLoadedRundown } from '../../common/hooks-query/useLoadedRundown';
|
||||
import useProjectData from '../../common/hooks-query/useProjectData';
|
||||
import useRundown from '../../common/hooks-query/useRundown';
|
||||
import useSettings from '../../common/hooks-query/useSettings';
|
||||
import useViewSettings from '../../common/hooks-query/useViewSettings';
|
||||
import { useViewOptionsStore } from '../../common/stores/viewOptions';
|
||||
@@ -26,7 +26,7 @@ export function useTimerData(): ViewData<TimerData> {
|
||||
const { data: viewSettings, status: viewSettingsStatus } = useViewSettings();
|
||||
const { data: settings, status: settingsStatus } = useSettings();
|
||||
const { data: customFields, status: customFieldsStatus } = useCustomFields();
|
||||
const { data: rundown, status: rundownStatus } = useRundown();
|
||||
const { data: rundown, status: rundownStatus } = useLoadedRundown();
|
||||
const { entries } = rundown;
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user