chore: improve convention entry <> event

This commit is contained in:
Carlos Valente
2025-04-17 12:40:32 +02:00
committed by arc-alex
parent 3754c374c3
commit 3118c20719
28 changed files with 245 additions and 245 deletions
@@ -8,7 +8,7 @@ import {
Runtime,
Settings,
SimpleTimerState,
SupportedEvent,
SupportedEntry,
TimerType,
ViewSettings,
} from 'ontime-types';
@@ -63,7 +63,7 @@ const withData = <P extends WithDataProps>(Component: ComponentType<P>) => {
const publicEvents = useMemo(() => {
if (Array.isArray(rundownData)) {
return rundownData.filter((e) => e.type === SupportedEvent.Event && e.title && e.isPublic);
return rundownData.filter((e) => e.type === SupportedEntry.Event && e.title && e.isPublic);
}
return [];
}, [rundownData]);
@@ -7,7 +7,7 @@ import {
ProjectData,
Runtime,
Settings,
SupportedEvent,
SupportedEntry,
TimerPhase,
} from 'ontime-types';
@@ -63,7 +63,7 @@ export default function Countdown(props: CountdownProps) {
}
let followThis: OntimeEvent | null = null;
const events: OntimeEvent[] = [...backstageEvents].filter((event) => event.type === SupportedEvent.Event);
const events: OntimeEvent[] = [...backstageEvents].filter((event) => event.type === SupportedEntry.Event);
if (eventId !== null) {
followThis = events.find((event) => event.id === eventId) || null;
@@ -1,5 +1,5 @@
import { Link } from 'react-router-dom';
import { OntimeEntry, OntimeEvent, SupportedEvent } from 'ontime-types';
import { OntimeEntry, OntimeEvent, SupportedEntry } from 'ontime-types';
import Empty from '../../../common/components/state/Empty';
import { formatTime } from '../../../common/utils/time';
@@ -19,7 +19,7 @@ export default function CountdownSelect(props: CountdownSelectProps) {
const { events } = props;
const { getLocalizedString } = useTranslation();
const filteredEvents = events.filter((event: OntimeEntry) => event.type === SupportedEvent.Event) as OntimeEvent[];
const filteredEvents = events.filter((event: OntimeEntry) => event.type === SupportedEntry.Event) as OntimeEvent[];
return (
<div className='event-select' data-testid='countdown__select'>