Fix ontime aux actions (#1684)

* switch to base ui

* ensure all action types is part of the valitation

* update test

* atempt to do it in the base-ui way

* fix fixing

* allow undefide visible on set timer message

* fix set time not showing

* correct time data for aux set automation

---------

Co-authored-by: Carlos Valente <carlosvalente@pm.me>
This commit is contained in:
Alex Christoffer Rasmussen
2025-07-09 13:14:23 +02:00
committed by GitHub
parent 8d68a4554d
commit 4d359445a7
12 changed files with 141 additions and 89 deletions
@@ -55,6 +55,7 @@ export default function AutomationForm(props: AutomationFormProps) {
setError,
setFocus,
setValue,
watch,
formState: { errors, isSubmitting, isDirty, isValid },
} = useForm<AutomationDTO>({
mode: 'onChange',
@@ -106,8 +107,7 @@ export default function AutomationForm(props: AutomationFormProps) {
};
const handleAddnewOntimeAction = () => {
// @ts-expect-error -- we dont want to choose an action
appendOutput({ type: 'ontime', action: undefined });
appendOutput({ type: 'ontime', action: 'aux1-start' });
};
const handleTestOSCOutput = async (index: number) => {
@@ -428,6 +428,7 @@ export default function AutomationForm(props: AutomationFormProps) {
register={register}
rowErrors={rowErrors}
setValue={setValue}
watch={watch}
>
<span>&nbsp;</span>
<Panel.InlineElements relation='inner'>