mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-22 15:39:11 +00:00
chore: upgrade client dependencies
This commit is contained in:
committed by
Carlos Valente
parent
9c5116f197
commit
166160dda9
@@ -232,7 +232,10 @@ export default function AutomationForm({ automation, onClose }: AutomationFormPr
|
||||
Runtime data source
|
||||
<Select
|
||||
value={watch(`filters.${index}.field`)}
|
||||
onValueChange={(value) => setValue(`filters.${index}.field`, value, { shouldDirty: true })}
|
||||
onValueChange={(value: string | null) => {
|
||||
if (value === null) return;
|
||||
setValue(`filters.${index}.field`, value, { shouldDirty: true });
|
||||
}}
|
||||
options={fieldList.map(({ value, label }) => ({ value, label }))}
|
||||
aria-label='Event field'
|
||||
/>
|
||||
@@ -242,11 +245,14 @@ export default function AutomationForm({ automation, onClose }: AutomationFormPr
|
||||
Matching condition
|
||||
<Select
|
||||
value={watch(`filters.${index}.operator`)}
|
||||
onValueChange={(value) =>
|
||||
setValue(`filters.${index}.operator`, value as 'equals' | 'not_equals' | 'contains', {
|
||||
shouldDirty: true,
|
||||
})
|
||||
}
|
||||
onValueChange={(value: string | null) => {
|
||||
if (value === null) return;
|
||||
setValue(
|
||||
`filters.${index}.operator`,
|
||||
value as 'equals' | 'not_equals' | 'greater_than' | 'less_than' | 'contains' | 'not_contains',
|
||||
{ shouldDirty: true },
|
||||
);
|
||||
}}
|
||||
options={[
|
||||
{ value: 'equals', label: 'equals' },
|
||||
{ value: 'not_equals', label: 'not equals' },
|
||||
|
||||
@@ -44,8 +44,9 @@ export default function OntimeActionForm({
|
||||
<label>
|
||||
Action
|
||||
<Select
|
||||
onValueChange={(value) => {
|
||||
handleSetAction(value as OntimeActionKey);
|
||||
onValueChange={(value: OntimeActionKey | null) => {
|
||||
if (value === null) return;
|
||||
handleSetAction(value);
|
||||
}}
|
||||
value={watch(`outputs.${index}.action`)}
|
||||
options={[
|
||||
@@ -96,7 +97,8 @@ export default function OntimeActionForm({
|
||||
<label>
|
||||
Visibility
|
||||
<Select
|
||||
onValueChange={(value) => {
|
||||
onValueChange={(value: boolean | 'untouched' | null) => {
|
||||
if (value === null) return;
|
||||
// we need to translate the undefined value to 'untouched'
|
||||
const translatedValue = value === 'untouched' ? undefined : (value as boolean | undefined);
|
||||
setValue(`outputs.${index}.visible`, translatedValue, { shouldDirty: true });
|
||||
@@ -117,7 +119,8 @@ export default function OntimeActionForm({
|
||||
<label>
|
||||
Timer secondary source
|
||||
<Select
|
||||
onValueChange={(value) => {
|
||||
onValueChange={(value: SecondarySource | null) => {
|
||||
if (value === null) return;
|
||||
setValue(`outputs.${index}.secondarySource`, value as SecondarySource, { shouldDirty: true });
|
||||
}}
|
||||
value={watch(`outputs.${index}.secondarySource`)}
|
||||
|
||||
@@ -106,7 +106,10 @@ export default function TriggerForm({
|
||||
Lifecycle trigger
|
||||
<Select
|
||||
value={watch('trigger')}
|
||||
onValueChange={(value) => setValue('trigger', value as TimerLifeCycle, { shouldDirty: true })}
|
||||
onValueChange={(value) => {
|
||||
if (value === null) return;
|
||||
setValue('trigger', value as TimerLifeCycle, { shouldDirty: true });
|
||||
}}
|
||||
options={cycles.map((cycle) => ({ value: cycle.value, label: cycle.label }))}
|
||||
aria-label='Lifecycle trigger'
|
||||
/>
|
||||
@@ -116,7 +119,10 @@ export default function TriggerForm({
|
||||
Automation title
|
||||
<Select
|
||||
value={watch('automationId')}
|
||||
onValueChange={(value) => setValue('automationId', value, { shouldDirty: true })}
|
||||
onValueChange={(value: string | null) => {
|
||||
if (value === null) return;
|
||||
setValue('automationId', value, { shouldDirty: true });
|
||||
}}
|
||||
options={automationSelect}
|
||||
aria-label='Automation title'
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user