mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-24 16:39:13 +00:00
feat: add flag property
This commit is contained in:
@@ -7,6 +7,7 @@ describe('cloneEvent()', () => {
|
|||||||
const original: OntimeEvent = {
|
const original: OntimeEvent = {
|
||||||
id: 'unique',
|
id: 'unique',
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
|
flag: false,
|
||||||
title: 'title',
|
title: 'title',
|
||||||
cue: 'cue',
|
cue: 'cue',
|
||||||
note: 'note',
|
note: 'note',
|
||||||
@@ -40,6 +41,7 @@ describe('cloneEvent()', () => {
|
|||||||
|
|
||||||
expect(cloned).toMatchObject({
|
expect(cloned).toMatchObject({
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
|
flag: original.flag,
|
||||||
title: original.title,
|
title: original.title,
|
||||||
note: original.note,
|
note: original.note,
|
||||||
timeStart: original.timeStart,
|
timeStart: original.timeStart,
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ type ClonedEvent = Omit<OntimeEvent, 'id' | 'cue'>;
|
|||||||
export const cloneEvent = (event: OntimeEvent): ClonedEvent => {
|
export const cloneEvent = (event: OntimeEvent): ClonedEvent => {
|
||||||
return {
|
return {
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
|
flag: event.flag,
|
||||||
title: event.title,
|
title: event.title,
|
||||||
note: event.note,
|
note: event.note,
|
||||||
timeStart: event.timeStart,
|
timeStart: event.timeStart,
|
||||||
|
|||||||
+2
@@ -5,6 +5,7 @@ export type NamedImportMap = typeof namedImportMap;
|
|||||||
// Record of label and import name
|
// Record of label and import name
|
||||||
const namedImportMap = {
|
const namedImportMap = {
|
||||||
Worksheet: 'event schedule',
|
Worksheet: 'event schedule',
|
||||||
|
Flag: 'flag',
|
||||||
Start: 'time start',
|
Start: 'time start',
|
||||||
'Link start': 'link start',
|
'Link start': 'link start',
|
||||||
End: 'time end',
|
End: 'time end',
|
||||||
@@ -42,6 +43,7 @@ export function convertToImportMap(namedImportMap: NamedImportMap): ImportMap {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
worksheet: namedImportMap.Worksheet,
|
worksheet: namedImportMap.Worksheet,
|
||||||
|
flag: namedImportMap.Flag,
|
||||||
timeStart: namedImportMap.Start,
|
timeStart: namedImportMap.Start,
|
||||||
linkStart: namedImportMap['Link start'],
|
linkStart: namedImportMap['Link start'],
|
||||||
timeEnd: namedImportMap.End,
|
timeEnd: namedImportMap.End,
|
||||||
|
|||||||
+3
@@ -35,6 +35,7 @@ export default function PreviewRundown(props: PreviewRundownProps) {
|
|||||||
<th>Type</th>
|
<th>Type</th>
|
||||||
<th>Cue</th>
|
<th>Cue</th>
|
||||||
<th>Title</th>
|
<th>Title</th>
|
||||||
|
<th>Flag</th>
|
||||||
<th>Time Start</th>
|
<th>Time Start</th>
|
||||||
<th>Time End</th>
|
<th>Time End</th>
|
||||||
<th>Duration</th>
|
<th>Duration</th>
|
||||||
@@ -75,6 +76,7 @@ export default function PreviewRundown(props: PreviewRundownProps) {
|
|||||||
const colour = entry.colour ? getAccessibleColour(entry.colour) : {};
|
const colour = entry.colour ? getAccessibleColour(entry.colour) : {};
|
||||||
const countToEnd = booleanToText(entry.countToEnd);
|
const countToEnd = booleanToText(entry.countToEnd);
|
||||||
const skip = booleanToText(entry.skip);
|
const skip = booleanToText(entry.skip);
|
||||||
|
const flag = booleanToText(entry.flag);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment key={entry.id}>
|
<Fragment key={entry.id}>
|
||||||
@@ -87,6 +89,7 @@ export default function PreviewRundown(props: PreviewRundownProps) {
|
|||||||
</td>
|
</td>
|
||||||
<td className={style.nowrap}>{entry.cue}</td>
|
<td className={style.nowrap}>{entry.cue}</td>
|
||||||
<td>{entry.title}</td>
|
<td>{entry.title}</td>
|
||||||
|
<td className={style.center}>{flag && <Tag>{flag}</Tag>}</td>
|
||||||
<td className={style.flex}>
|
<td className={style.flex}>
|
||||||
<span className={entry.linkStart ? style.subdued : undefined}>{millisToString(entry.timeStart)}</span>
|
<span className={entry.linkStart ? style.subdued : undefined}>{millisToString(entry.timeStart)}</span>
|
||||||
{entry.linkStart && <IoLink className={style.linkStartActive} />}
|
{entry.linkStart && <IoLink className={style.linkStartActive} />}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { IoArrowDown, IoArrowUp, IoBan, IoFlag, IoTime } from 'react-icons/io5';
|
import { IoArrowDown, IoArrowUp, IoBan, IoTime } from 'react-icons/io5';
|
||||||
|
import { LuArrowDownToLine } from 'react-icons/lu';
|
||||||
import { TimerPhase, TimerType } from 'ontime-types';
|
import { TimerPhase, TimerType } from 'ontime-types';
|
||||||
|
|
||||||
import { Corner } from '../../../common/components/editor-utils/EditorUtils';
|
import { Corner } from '../../../common/components/editor-utils/EditorUtils';
|
||||||
@@ -101,7 +102,7 @@ export default function TimerPreview() {
|
|||||||
className={style.statusIcon}
|
className={style.statusIcon}
|
||||||
data-active={countToEnd}
|
data-active={countToEnd}
|
||||||
>
|
>
|
||||||
<IoFlag />
|
<LuArrowDownToLine />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -177,6 +177,7 @@ export default function RundownEntry({
|
|||||||
duration={data.duration}
|
duration={data.duration}
|
||||||
timeStrategy={data.timeStrategy}
|
timeStrategy={data.timeStrategy}
|
||||||
linkStart={data.linkStart}
|
linkStart={data.linkStart}
|
||||||
|
flag={data.flag}
|
||||||
countToEnd={data.countToEnd}
|
countToEnd={data.countToEnd}
|
||||||
endAction={data.endAction}
|
endAction={data.endAction}
|
||||||
timerType={data.timerType}
|
timerType={data.timerType}
|
||||||
|
|||||||
@@ -72,6 +72,13 @@
|
|||||||
row-gap: 1rem;
|
row-gap: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.splitThree {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr 1fr;
|
||||||
|
column-gap: 1rem;
|
||||||
|
row-gap: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
.tooltipIcon {
|
.tooltipIcon {
|
||||||
color: $blue-500;
|
color: $blue-500;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|||||||
@@ -59,10 +59,10 @@ export default function EventEditor({ event }: EventEditorProps) {
|
|||||||
key={`${event.id}-titles`}
|
key={`${event.id}-titles`}
|
||||||
eventId={event.id}
|
eventId={event.id}
|
||||||
cue={event.cue}
|
cue={event.cue}
|
||||||
|
flag={event.flag}
|
||||||
title={event.title}
|
title={event.title}
|
||||||
note={event.note}
|
note={event.note}
|
||||||
colour={event.colour}
|
colour={event.colour}
|
||||||
handleSubmit={handleSubmit}
|
|
||||||
/>
|
/>
|
||||||
<div className={style.column}>
|
<div className={style.column}>
|
||||||
<Editor.Title>
|
<Editor.Title>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ interface EventEditorImageProps {
|
|||||||
export default function EventEditorImage({ src }: EventEditorImageProps) {
|
export default function EventEditorImage({ src }: EventEditorImageProps) {
|
||||||
return (
|
return (
|
||||||
<div className={style.imageContainer}>
|
<div className={style.imageContainer}>
|
||||||
<img loading='lazy' src={src} />
|
{Boolean(src) && <img loading='lazy' src={src} />}
|
||||||
<div className={style.imageOverlay} />
|
<div className={style.imageOverlay} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ import { sanitiseCue } from 'ontime-utils';
|
|||||||
import * as Editor from '../../../../common/components/editor-utils/EditorUtils';
|
import * as Editor from '../../../../common/components/editor-utils/EditorUtils';
|
||||||
import SwatchSelect from '../../../../common/components/input/colour-input/SwatchSelect';
|
import SwatchSelect from '../../../../common/components/input/colour-input/SwatchSelect';
|
||||||
import Input from '../../../../common/components/input/input/Input';
|
import Input from '../../../../common/components/input/input/Input';
|
||||||
import { type EventEditorUpdateFields } from '../EventEditor';
|
import Switch from '../../../../common/components/switch/Switch';
|
||||||
|
import { useEntryActions } from '../../../../common/hooks/useEntryAction';
|
||||||
|
|
||||||
import EventTextArea from './EventTextArea';
|
import EventTextArea from './EventTextArea';
|
||||||
import EntryEditorTextInput from './EventTextInput';
|
import EntryEditorTextInput from './EventTextInput';
|
||||||
@@ -14,22 +15,32 @@ import style from '../EntryEditor.module.scss';
|
|||||||
interface EventEditorTitlesProps {
|
interface EventEditorTitlesProps {
|
||||||
eventId: string;
|
eventId: string;
|
||||||
cue: string;
|
cue: string;
|
||||||
|
flag: boolean;
|
||||||
title: string;
|
title: string;
|
||||||
note: string;
|
note: string;
|
||||||
colour: string;
|
colour: string;
|
||||||
handleSubmit: (field: EventEditorUpdateFields, value: string) => void;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default memo(EventEditorTitles);
|
export default memo(EventEditorTitles);
|
||||||
function EventEditorTitles({ eventId, cue, title, note, colour, handleSubmit }: EventEditorTitlesProps) {
|
function EventEditorTitles({ eventId, cue, flag, title, note, colour }: EventEditorTitlesProps) {
|
||||||
|
const { updateEntry } = useEntryActions();
|
||||||
|
|
||||||
const cueSubmitHandler = (_field: string, newValue: string) => {
|
const cueSubmitHandler = (_field: string, newValue: string) => {
|
||||||
handleSubmit('cue', sanitiseCue(newValue));
|
updateEntry({ id: eventId, cue: sanitiseCue(newValue) });
|
||||||
|
};
|
||||||
|
|
||||||
|
const flagSubmitHandler = (newValue: boolean) => {
|
||||||
|
updateEntry({ id: eventId, flag: newValue });
|
||||||
|
};
|
||||||
|
|
||||||
|
const textSubmitHandler = (field: string, newValue: string) => {
|
||||||
|
updateEntry({ id: eventId, [field]: newValue });
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={style.column}>
|
<div className={style.column}>
|
||||||
<Editor.Title>Event Data</Editor.Title>
|
<Editor.Title>Event Data</Editor.Title>
|
||||||
<div className={style.splitTwo}>
|
<div className={style.splitThree}>
|
||||||
<div>
|
<div>
|
||||||
<Editor.Label htmlFor='eventId'>Event ID (read only)</Editor.Label>
|
<Editor.Label htmlFor='eventId'>Event ID (read only)</Editor.Label>
|
||||||
<Input id='eventId' data-testid='input-textfield' value={eventId} readOnly fluid />
|
<Input id='eventId' data-testid='input-textfield' value={eventId} readOnly fluid />
|
||||||
@@ -41,13 +52,20 @@ function EventEditorTitles({ eventId, cue, title, note, colour, handleSubmit }:
|
|||||||
submitHandler={cueSubmitHandler}
|
submitHandler={cueSubmitHandler}
|
||||||
maxLength={10}
|
maxLength={10}
|
||||||
/>
|
/>
|
||||||
|
<div>
|
||||||
|
<Editor.Label htmlFor='flag'>Flag</Editor.Label>
|
||||||
|
<Editor.Label className={style.switchLabel}>
|
||||||
|
<Switch id='flag' checked={flag} onCheckedChange={flagSubmitHandler} />
|
||||||
|
{flag ? 'On' : 'Off'}
|
||||||
|
</Editor.Label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Editor.Label>Colour</Editor.Label>
|
<Editor.Label>Colour</Editor.Label>
|
||||||
<SwatchSelect name='colour' value={colour} handleChange={handleSubmit} />
|
<SwatchSelect name='colour' value={colour} handleChange={textSubmitHandler} />
|
||||||
</div>
|
</div>
|
||||||
<EntryEditorTextInput field='title' label='Title' initialValue={title} submitHandler={handleSubmit} />
|
<EntryEditorTextInput field='title' label='Title' initialValue={title} submitHandler={textSubmitHandler} />
|
||||||
<EventTextArea field='note' label='Note' initialValue={note} submitHandler={handleSubmit} />
|
<EventTextArea field='note' label='Note' initialValue={note} submitHandler={textSubmitHandler} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { MouseEvent, useEffect, useLayoutEffect, useRef, useState } from 'react'
|
|||||||
import {
|
import {
|
||||||
IoAdd,
|
IoAdd,
|
||||||
IoDuplicateOutline,
|
IoDuplicateOutline,
|
||||||
|
IoFlag,
|
||||||
IoFolder,
|
IoFolder,
|
||||||
IoLink,
|
IoLink,
|
||||||
IoReorderTwo,
|
IoReorderTwo,
|
||||||
@@ -33,6 +34,7 @@ interface RundownEventProps {
|
|||||||
duration: number;
|
duration: number;
|
||||||
timeStrategy: TimeStrategy;
|
timeStrategy: TimeStrategy;
|
||||||
linkStart: boolean;
|
linkStart: boolean;
|
||||||
|
flag: boolean;
|
||||||
countToEnd: boolean;
|
countToEnd: boolean;
|
||||||
eventIndex: number;
|
eventIndex: number;
|
||||||
endAction: EndAction;
|
endAction: EndAction;
|
||||||
@@ -74,6 +76,7 @@ export default function RundownEvent({
|
|||||||
duration,
|
duration,
|
||||||
timeStrategy,
|
timeStrategy,
|
||||||
linkStart,
|
linkStart,
|
||||||
|
flag,
|
||||||
countToEnd,
|
countToEnd,
|
||||||
eventIndex,
|
eventIndex,
|
||||||
endAction,
|
endAction,
|
||||||
@@ -118,7 +121,6 @@ export default function RundownEvent({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'item',
|
type: 'item',
|
||||||
|
|
||||||
label: 'Unlink from previous',
|
label: 'Unlink from previous',
|
||||||
icon: IoUnlink,
|
icon: IoUnlink,
|
||||||
onClick: () =>
|
onClick: () =>
|
||||||
@@ -135,7 +137,6 @@ export default function RundownEvent({
|
|||||||
: [
|
: [
|
||||||
{
|
{
|
||||||
type: 'item',
|
type: 'item',
|
||||||
|
|
||||||
label: 'Toggle link to previous',
|
label: 'Toggle link to previous',
|
||||||
icon: IoLink,
|
icon: IoLink,
|
||||||
onClick: () =>
|
onClick: () =>
|
||||||
@@ -144,18 +145,25 @@ export default function RundownEvent({
|
|||||||
value: linkStart,
|
value: linkStart,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
{ type: 'divider' },
|
|
||||||
|
|
||||||
{
|
{
|
||||||
type: 'item',
|
type: 'item',
|
||||||
|
label: flag ? 'Remove flag' : 'Add flag',
|
||||||
|
icon: IoFlag,
|
||||||
|
onClick: () =>
|
||||||
|
actionHandler('update', {
|
||||||
|
field: 'flag',
|
||||||
|
value: !flag,
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
{ type: 'divider' },
|
||||||
|
{
|
||||||
|
type: 'item',
|
||||||
label: 'Add to swap',
|
label: 'Add to swap',
|
||||||
icon: IoAdd,
|
icon: IoAdd,
|
||||||
onClick: () => setSelectedEventId(eventId),
|
onClick: () => setSelectedEventId(eventId),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'item',
|
type: 'item',
|
||||||
|
|
||||||
label: `Swap this event with ${selectedEventId ?? ''}`,
|
label: `Swap this event with ${selectedEventId ?? ''}`,
|
||||||
icon: IoSwapVertical,
|
icon: IoSwapVertical,
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
|
|||||||
@@ -3,13 +3,13 @@ import {
|
|||||||
IoArrowDown,
|
IoArrowDown,
|
||||||
IoArrowUp,
|
IoArrowUp,
|
||||||
IoBan,
|
IoBan,
|
||||||
IoFlag,
|
|
||||||
IoFlash,
|
IoFlash,
|
||||||
IoPlay,
|
IoPlay,
|
||||||
IoPlayForward,
|
IoPlayForward,
|
||||||
IoPlaySkipForward,
|
IoPlaySkipForward,
|
||||||
IoTime,
|
IoTime,
|
||||||
} from 'react-icons/io5';
|
} from 'react-icons/io5';
|
||||||
|
import { LuArrowDownToLine } from 'react-icons/lu';
|
||||||
import { EndAction, Playback, TimerType, TimeStrategy } from 'ontime-types';
|
import { EndAction, Playback, TimerType, TimeStrategy } from 'ontime-types';
|
||||||
|
|
||||||
import Tooltip from '../../../common/components/tooltip/Tooltip';
|
import Tooltip from '../../../common/components/tooltip/Tooltip';
|
||||||
@@ -143,7 +143,7 @@ function RundownEventInner({
|
|||||||
<EndActionIcon action={endAction} className={style.statusIcon} />
|
<EndActionIcon action={endAction} className={style.statusIcon} />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip text={`${countToEnd ? 'Count to End' : 'Count duration'}`} render={<span />}>
|
<Tooltip text={`${countToEnd ? 'Count to End' : 'Count duration'}`} render={<span />}>
|
||||||
<IoFlag className={`${style.statusIcon} ${countToEnd ? style.active : style.disabled}`} />
|
<LuArrowDownToLine className={`${style.statusIcon} ${countToEnd ? style.active : style.disabled}`} />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip text='Event has Triggers' render={<span />}>
|
<Tooltip text='Event has Triggers' render={<span />}>
|
||||||
<IoFlash className={`${style.statusIcon} ${hasTriggers ? style.active : style.disabled}`} />
|
<IoFlash className={`${style.statusIcon} ${hasTriggers ? style.active : style.disabled}`} />
|
||||||
|
|||||||
@@ -53,11 +53,11 @@ $table-header-font-size: calc(1rem - 2px);
|
|||||||
|
|
||||||
.actionColumn {
|
.actionColumn {
|
||||||
padding-inline: 0.5rem;
|
padding-inline: 0.5rem;
|
||||||
|
padding-top: 0.5rem !important; // fighting the table styles
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: start;
|
align-items: start;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
line-height: 2rem; // match input height
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.indexColumn {
|
.indexColumn {
|
||||||
@@ -69,7 +69,7 @@ $table-header-font-size: calc(1rem - 2px);
|
|||||||
font-size: $table-header-font-size;
|
font-size: $table-header-font-size;
|
||||||
line-height: 2rem; // match input height
|
line-height: 2rem; // match input height
|
||||||
background-color: $gray-1300; // will be overridden inline
|
background-color: $gray-1300; // will be overridden inline
|
||||||
font-weight: 600;;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tableHeader {
|
.tableHeader {
|
||||||
|
|||||||
+1
-1
@@ -55,7 +55,7 @@ function EditableImage({ initialValue, updateValue }: EditableImageProps) {
|
|||||||
Delete
|
Delete
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<img loading='lazy' src={initialValue} className={style.image} />
|
{Boolean(initialValue) && <img loading='lazy' src={initialValue} className={style.image} />}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ export const parseExcel = (
|
|||||||
let colourIndex: number | null = null;
|
let colourIndex: number | null = null;
|
||||||
|
|
||||||
// options: booleans
|
// options: booleans
|
||||||
|
let flagIndex: number | null = null;
|
||||||
let skipIndex: number | null = null;
|
let skipIndex: number | null = null;
|
||||||
let countToEndIndex: number | null = null;
|
let countToEndIndex: number | null = null;
|
||||||
|
|
||||||
@@ -123,6 +124,10 @@ export const parseExcel = (
|
|||||||
titleIndex = col;
|
titleIndex = col;
|
||||||
rundownMetadata['title'] = { row, col };
|
rundownMetadata['title'] = { row, col };
|
||||||
},
|
},
|
||||||
|
[importMap.flag]: (row: number, col: number) => {
|
||||||
|
flagIndex = col;
|
||||||
|
rundownMetadata['flag'] = { row, col };
|
||||||
|
},
|
||||||
[importMap.countToEnd]: (row: number, col: number) => {
|
[importMap.countToEnd]: (row: number, col: number) => {
|
||||||
countToEndIndex = col;
|
countToEndIndex = col;
|
||||||
rundownMetadata['countToEnd'] = { row, col };
|
rundownMetadata['countToEnd'] = { row, col };
|
||||||
@@ -197,6 +202,8 @@ export const parseExcel = (
|
|||||||
entry.duration = parseExcelDate(column);
|
entry.duration = parseExcelDate(column);
|
||||||
} else if (j === cueIndex) {
|
} else if (j === cueIndex) {
|
||||||
entry.cue = makeString(column, '');
|
entry.cue = makeString(column, '');
|
||||||
|
} else if (j === flagIndex) {
|
||||||
|
entry.flag = parseBooleanString(column);
|
||||||
} else if (j === countToEndIndex) {
|
} else if (j === countToEndIndex) {
|
||||||
entry.countToEnd = parseBooleanString(column);
|
entry.countToEnd = parseBooleanString(column);
|
||||||
} else if (j === skipIndex) {
|
} else if (j === skipIndex) {
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ export function createEventPatch(originalEvent: OntimeEvent, patchEvent: Partial
|
|||||||
return {
|
return {
|
||||||
id: originalEvent.id,
|
id: originalEvent.id,
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
|
flag: typeof patchEvent.flag === 'boolean' ? patchEvent.flag : originalEvent.flag,
|
||||||
title: makeString(patchEvent.title, originalEvent.title),
|
title: makeString(patchEvent.title, originalEvent.title),
|
||||||
timeStart,
|
timeStart,
|
||||||
timeEnd,
|
timeEnd,
|
||||||
|
|||||||
@@ -185,6 +185,7 @@ export const startServer = async (): Promise<{ message: string; serverPort: numb
|
|||||||
eventNext: state.eventNext,
|
eventNext: state.eventNext,
|
||||||
blockNow: null,
|
blockNow: null,
|
||||||
blockNext: null,
|
blockNext: null,
|
||||||
|
nextFlag: null,
|
||||||
auxtimer1: {
|
auxtimer1: {
|
||||||
duration: timerConfig.auxTimerDefault,
|
duration: timerConfig.auxTimerDefault,
|
||||||
current: timerConfig.auxTimerDefault,
|
current: timerConfig.auxTimerDefault,
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ export const demoDb: DatabaseModel = {
|
|||||||
},
|
},
|
||||||
'32d31': {
|
'32d31': {
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
|
flag: false,
|
||||||
id: '32d31',
|
id: '32d31',
|
||||||
cue: 'SF1.01',
|
cue: 'SF1.01',
|
||||||
title: 'Albania',
|
title: 'Albania',
|
||||||
@@ -88,6 +89,7 @@ export const demoDb: DatabaseModel = {
|
|||||||
},
|
},
|
||||||
'21cd2': {
|
'21cd2': {
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
|
flag: false,
|
||||||
id: '21cd2',
|
id: '21cd2',
|
||||||
cue: 'SF1.02',
|
cue: 'SF1.02',
|
||||||
title: 'Latvia',
|
title: 'Latvia',
|
||||||
@@ -117,6 +119,7 @@ export const demoDb: DatabaseModel = {
|
|||||||
},
|
},
|
||||||
'0b371': {
|
'0b371': {
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
|
flag: false,
|
||||||
id: '0b371',
|
id: '0b371',
|
||||||
cue: 'SF1.03',
|
cue: 'SF1.03',
|
||||||
title: 'Lithuania',
|
title: 'Lithuania',
|
||||||
@@ -146,6 +149,7 @@ export const demoDb: DatabaseModel = {
|
|||||||
},
|
},
|
||||||
'3cd28': {
|
'3cd28': {
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
|
flag: false,
|
||||||
id: '3cd28',
|
id: '3cd28',
|
||||||
cue: 'SF1.04',
|
cue: 'SF1.04',
|
||||||
title: 'Switzerland',
|
title: 'Switzerland',
|
||||||
@@ -175,6 +179,7 @@ export const demoDb: DatabaseModel = {
|
|||||||
},
|
},
|
||||||
e457f: {
|
e457f: {
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
|
flag: false,
|
||||||
id: 'e457f',
|
id: 'e457f',
|
||||||
cue: 'SF1.05',
|
cue: 'SF1.05',
|
||||||
title: 'Slovenia',
|
title: 'Slovenia',
|
||||||
@@ -221,6 +226,7 @@ export const demoDb: DatabaseModel = {
|
|||||||
},
|
},
|
||||||
'1c420': {
|
'1c420': {
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
|
flag: false,
|
||||||
id: '1c420',
|
id: '1c420',
|
||||||
cue: 'SF1.06',
|
cue: 'SF1.06',
|
||||||
title: 'Ukraine',
|
title: 'Ukraine',
|
||||||
@@ -250,6 +256,7 @@ export const demoDb: DatabaseModel = {
|
|||||||
},
|
},
|
||||||
b7737: {
|
b7737: {
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
|
flag: false,
|
||||||
id: 'b7737',
|
id: 'b7737',
|
||||||
cue: 'SF1.07',
|
cue: 'SF1.07',
|
||||||
title: 'Bulgaria',
|
title: 'Bulgaria',
|
||||||
@@ -279,6 +286,7 @@ export const demoDb: DatabaseModel = {
|
|||||||
},
|
},
|
||||||
d3a80: {
|
d3a80: {
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
|
flag: false,
|
||||||
id: 'd3a80',
|
id: 'd3a80',
|
||||||
cue: 'SF1.08',
|
cue: 'SF1.08',
|
||||||
title: 'Netherlands',
|
title: 'Netherlands',
|
||||||
@@ -308,6 +316,7 @@ export const demoDb: DatabaseModel = {
|
|||||||
},
|
},
|
||||||
'8276c': {
|
'8276c': {
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
|
flag: false,
|
||||||
id: '8276c',
|
id: '8276c',
|
||||||
cue: 'SF1.09',
|
cue: 'SF1.09',
|
||||||
title: 'Moldova',
|
title: 'Moldova',
|
||||||
@@ -337,6 +346,7 @@ export const demoDb: DatabaseModel = {
|
|||||||
},
|
},
|
||||||
'2340b': {
|
'2340b': {
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
|
flag: false,
|
||||||
id: '2340b',
|
id: '2340b',
|
||||||
cue: 'SF1.10',
|
cue: 'SF1.10',
|
||||||
title: 'Portugal',
|
title: 'Portugal',
|
||||||
@@ -383,6 +393,7 @@ export const demoDb: DatabaseModel = {
|
|||||||
},
|
},
|
||||||
'503c4': {
|
'503c4': {
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
|
flag: false,
|
||||||
id: '503c4',
|
id: '503c4',
|
||||||
cue: 'SF1.11',
|
cue: 'SF1.11',
|
||||||
title: 'Croatia',
|
title: 'Croatia',
|
||||||
@@ -412,6 +423,7 @@ export const demoDb: DatabaseModel = {
|
|||||||
},
|
},
|
||||||
'5e965': {
|
'5e965': {
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
|
flag: false,
|
||||||
id: '5e965',
|
id: '5e965',
|
||||||
cue: 'SF1.12',
|
cue: 'SF1.12',
|
||||||
title: 'Denmark',
|
title: 'Denmark',
|
||||||
@@ -441,6 +453,7 @@ export const demoDb: DatabaseModel = {
|
|||||||
},
|
},
|
||||||
bab4a: {
|
bab4a: {
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
|
flag: false,
|
||||||
id: 'bab4a',
|
id: 'bab4a',
|
||||||
cue: 'SF1.13',
|
cue: 'SF1.13',
|
||||||
title: 'Austria',
|
title: 'Austria',
|
||||||
@@ -470,6 +483,7 @@ export const demoDb: DatabaseModel = {
|
|||||||
},
|
},
|
||||||
d3eb1: {
|
d3eb1: {
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
|
flag: false,
|
||||||
id: 'd3eb1',
|
id: 'd3eb1',
|
||||||
cue: 'SF1.14',
|
cue: 'SF1.14',
|
||||||
title: 'Greece',
|
title: 'Greece',
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import {
|
|||||||
|
|
||||||
export const event: Omit<OntimeEvent, 'id' | 'cue'> = {
|
export const event: Omit<OntimeEvent, 'id' | 'cue'> = {
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
|
flag: false,
|
||||||
title: '',
|
title: '',
|
||||||
note: '',
|
note: '',
|
||||||
endAction: EndAction.None,
|
endAction: EndAction.None,
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ describe('cellRequestFromEvent()', () => {
|
|||||||
test('string to string', () => {
|
test('string to string', () => {
|
||||||
const event: OntimeEvent = {
|
const event: OntimeEvent = {
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
|
flag: false,
|
||||||
cue: '1',
|
cue: '1',
|
||||||
title: 'Fancy',
|
title: 'Fancy',
|
||||||
note: 'Blue button on the right',
|
note: 'Blue button on the right',
|
||||||
@@ -70,6 +71,7 @@ describe('cellRequestFromEvent()', () => {
|
|||||||
test('number to timer', () => {
|
test('number to timer', () => {
|
||||||
const event: OntimeEvent = {
|
const event: OntimeEvent = {
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
|
flag: false,
|
||||||
cue: '1',
|
cue: '1',
|
||||||
title: 'Fancy',
|
title: 'Fancy',
|
||||||
note: 'Blue button on the right',
|
note: 'Blue button on the right',
|
||||||
@@ -120,6 +122,7 @@ describe('cellRequestFromEvent()', () => {
|
|||||||
test('boolean to TRUE', () => {
|
test('boolean to TRUE', () => {
|
||||||
const event: OntimeEvent = {
|
const event: OntimeEvent = {
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
|
flag: false,
|
||||||
cue: '1',
|
cue: '1',
|
||||||
title: 'Fancy',
|
title: 'Fancy',
|
||||||
note: 'Blue button on the right',
|
note: 'Blue button on the right',
|
||||||
@@ -168,6 +171,7 @@ describe('cellRequestFromEvent()', () => {
|
|||||||
test('spacing in metadata', () => {
|
test('spacing in metadata', () => {
|
||||||
const event: OntimeEvent = {
|
const event: OntimeEvent = {
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
|
flag: false,
|
||||||
cue: '1',
|
cue: '1',
|
||||||
title: 'Fancy',
|
title: 'Fancy',
|
||||||
note: 'Blue button on the right',
|
note: 'Blue button on the right',
|
||||||
@@ -204,6 +208,7 @@ describe('cellRequestFromEvent()', () => {
|
|||||||
test('metadata offset from zero', () => {
|
test('metadata offset from zero', () => {
|
||||||
const event: OntimeEvent = {
|
const event: OntimeEvent = {
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
|
flag: false,
|
||||||
cue: '1',
|
cue: '1',
|
||||||
title: 'Fancy',
|
title: 'Fancy',
|
||||||
note: 'Blue button on the right',
|
note: 'Blue button on the right',
|
||||||
@@ -241,6 +246,7 @@ describe('cellRequestFromEvent()', () => {
|
|||||||
test('sheet setup', () => {
|
test('sheet setup', () => {
|
||||||
const event: OntimeEvent = {
|
const event: OntimeEvent = {
|
||||||
type: SupportedEntry.Event,
|
type: SupportedEntry.Event,
|
||||||
|
flag: false,
|
||||||
cue: '1',
|
cue: '1',
|
||||||
title: 'Fancy',
|
title: 'Fancy',
|
||||||
note: 'Blue button on the right',
|
note: 'Blue button on the right',
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ export type OntimeBlock = OntimeBaseEvent & {
|
|||||||
|
|
||||||
export type OntimeEvent = OntimeBaseEvent & {
|
export type OntimeEvent = OntimeBaseEvent & {
|
||||||
type: SupportedEntry.Event;
|
type: SupportedEntry.Event;
|
||||||
|
flag: boolean;
|
||||||
cue: string;
|
cue: string;
|
||||||
title: string;
|
title: string;
|
||||||
note: string;
|
note: string;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ export type ImportMap = typeof defaultImportMap & { custom: ImportCustom };
|
|||||||
// Record of ontime name and import name
|
// Record of ontime name and import name
|
||||||
export const defaultImportMap = {
|
export const defaultImportMap = {
|
||||||
worksheet: 'event schedule',
|
worksheet: 'event schedule',
|
||||||
|
flag: 'flag',
|
||||||
timeStart: 'time start',
|
timeStart: 'time start',
|
||||||
linkStart: 'link start',
|
linkStart: 'link start',
|
||||||
timeEnd: 'time end',
|
timeEnd: 'time end',
|
||||||
|
|||||||
Reference in New Issue
Block a user