mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-21 15:09:10 +00:00
chore: rename time-to-end to count-to-end
This commit is contained in:
committed by
Carlos Valente
parent
c9ef2465f8
commit
2f2c26ed00
@@ -61,7 +61,7 @@ export default function EventEditor(props: EventEditorProps) {
|
||||
duration={event.duration}
|
||||
timeStrategy={event.timeStrategy}
|
||||
linkStart={event.linkStart}
|
||||
isTimeToEnd={event.isTimeToEnd}
|
||||
countToEnd={event.countToEnd}
|
||||
delay={event.delay ?? 0}
|
||||
isPublic={event.isPublic}
|
||||
endAction={event.endAction}
|
||||
|
||||
@@ -18,7 +18,7 @@ interface EventEditorTimesProps {
|
||||
duration: number;
|
||||
timeStrategy: TimeStrategy;
|
||||
linkStart: MaybeString;
|
||||
isTimeToEnd: boolean;
|
||||
countToEnd: boolean;
|
||||
delay: number;
|
||||
isPublic: boolean;
|
||||
endAction: EndAction;
|
||||
@@ -27,7 +27,7 @@ interface EventEditorTimesProps {
|
||||
timeDanger: number;
|
||||
}
|
||||
|
||||
type HandledActions = 'isTimeToEnd' | 'timerType' | 'endAction' | 'isPublic' | 'timeWarning' | 'timeDanger';
|
||||
type HandledActions = 'countToEnd' | 'timerType' | 'endAction' | 'isPublic' | 'timeWarning' | 'timeDanger';
|
||||
|
||||
function EventEditorTimes(props: EventEditorTimesProps) {
|
||||
const {
|
||||
@@ -37,7 +37,7 @@ function EventEditorTimes(props: EventEditorTimesProps) {
|
||||
duration,
|
||||
timeStrategy,
|
||||
linkStart,
|
||||
isTimeToEnd,
|
||||
countToEnd,
|
||||
delay,
|
||||
isPublic,
|
||||
endAction,
|
||||
@@ -53,8 +53,8 @@ function EventEditorTimes(props: EventEditorTimesProps) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (field === 'isTimeToEnd') {
|
||||
updateEvent({ id: eventId, isTimeToEnd: !(value as boolean) });
|
||||
if (field === 'countToEnd') {
|
||||
updateEvent({ id: eventId, countToEnd: !(value as boolean) });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -91,13 +91,12 @@ function EventEditorTimes(props: EventEditorTimesProps) {
|
||||
timeStrategy={timeStrategy}
|
||||
linkStart={linkStart}
|
||||
delay={delay}
|
||||
isTimeToEnd={isTimeToEnd}
|
||||
countToEnd={countToEnd}
|
||||
/>
|
||||
</div>
|
||||
<div className={style.delayLabel}>{delayLabel}</div>
|
||||
</div>
|
||||
|
||||
<Editor.Title>Event behaviour</Editor.Title>
|
||||
<div className={style.splitTwo}>
|
||||
<div>
|
||||
<Editor.Label htmlFor='endAction'>End Action</Editor.Label>
|
||||
@@ -116,22 +115,21 @@ function EventEditorTimes(props: EventEditorTimesProps) {
|
||||
</Select>
|
||||
</div>
|
||||
<div>
|
||||
<Editor.Label htmlFor='timeToEnd'>Target Event Scheduled End</Editor.Label>
|
||||
<Editor.Label htmlFor='countToEnd'>Count to End</Editor.Label>
|
||||
<Editor.Label className={style.switchLabel}>
|
||||
<Switch
|
||||
id='timeToEnd'
|
||||
id='countToEnd'
|
||||
size='md'
|
||||
isChecked={isTimeToEnd}
|
||||
onChange={() => handleSubmit('isTimeToEnd', isTimeToEnd)}
|
||||
isChecked={countToEnd}
|
||||
onChange={() => handleSubmit('countToEnd', countToEnd)}
|
||||
variant='ontime'
|
||||
/>
|
||||
{isTimeToEnd ? 'On' : 'Off'}
|
||||
{countToEnd ? 'On' : 'Off'}
|
||||
</Editor.Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className={style.column}>
|
||||
<Editor.Title>Display options</Editor.Title>
|
||||
<div className={style.splitTwo}>
|
||||
<div>
|
||||
<Editor.Label htmlFor='timerType'>Timer Type</Editor.Label>
|
||||
|
||||
@@ -29,7 +29,6 @@ const EventEditorTitles = (props: EventEditorTitlesProps) => {
|
||||
|
||||
return (
|
||||
<div className={style.column}>
|
||||
<Editor.Title>Event data</Editor.Title>
|
||||
<div className={style.splitTwo}>
|
||||
<div>
|
||||
<Editor.Label htmlFor='eventId'>Event ID (read only)</Editor.Label>
|
||||
|
||||
Reference in New Issue
Block a user