mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-10 00:29:41 +00:00
* fix: prevent add filter from submitting form * refactor: event clarifies whether automations exist but are disabled * refactor: improve readability of automation form * refactor: add affordance for field warnings * refactor: improve visibility of automation off state * refactor: apply warning styles to other feature toggles * Adding playback actions to automations (#2024) * adding intial automation actions * cleaning up * fixing formatting * ran oxfmt * switching action names to playback- to match the dropdown strings * fixing flicker that was caused by scroll arrows gettting unmounted --------- Co-authored-by: Cameron Slipp <cdslipp@gmail.com>
This commit is contained in:
@@ -13,6 +13,7 @@ import { TbFlagFilled } from 'react-icons/tb';
|
||||
import { Virtuoso, VirtuosoHandle } from 'react-virtuoso';
|
||||
|
||||
import { useEntryActionsContext } from '../../common/context/EntryActionsContext';
|
||||
import useAutomationSettings from '../../common/hooks-query/useAutomationSettings';
|
||||
import { useEntryCopy } from '../../common/stores/entryCopyStore';
|
||||
import { RundownMetadataObject, lastMetadataKey } from '../../common/utils/rundownMetadata';
|
||||
import { AppMode } from '../../ontimeConfig';
|
||||
@@ -49,6 +50,8 @@ export default function Rundown({ order, flatOrder, entries, id, rundownMetadata
|
||||
// invoke the compiler for the component
|
||||
'use memo';
|
||||
|
||||
const { data: automationSettings, status: automationStatus } = useAutomationSettings();
|
||||
const automationsEnabled = automationStatus === 'pending' ? undefined : automationSettings.enabledAutomations;
|
||||
const [sortableData, setSortableData] = useState<EntryId[]>(() => makeSortableList(order, entries));
|
||||
const [metadata, setMetadata] = useState<RundownMetadataObject>(rundownMetadata);
|
||||
|
||||
@@ -263,6 +266,7 @@ export default function Rundown({ order, flatOrder, entries, id, rundownMetadata
|
||||
isPast={entryMetadata.isPast}
|
||||
eventIndex={entryMetadata.eventIndex}
|
||||
data={entry}
|
||||
automationsEnabled={automationsEnabled}
|
||||
loaded={entryMetadata.isLoaded}
|
||||
hasCursor={hasCursor}
|
||||
isNext={isNext}
|
||||
@@ -282,7 +286,18 @@ export default function Rundown({ order, flatOrder, entries, id, rundownMetadata
|
||||
</Fragment>
|
||||
);
|
||||
},
|
||||
[entries, metadata, getIsCollapsed, isEditMode, cursor, nextEventId, playback, lastEntryId, handleCollapseGroup],
|
||||
[
|
||||
entries,
|
||||
metadata,
|
||||
getIsCollapsed,
|
||||
isEditMode,
|
||||
cursor,
|
||||
nextEventId,
|
||||
playback,
|
||||
lastEntryId,
|
||||
handleCollapseGroup,
|
||||
automationsEnabled,
|
||||
],
|
||||
);
|
||||
|
||||
if (sortableData.length < 1) {
|
||||
|
||||
Reference in New Issue
Block a user