mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-06-21 15:26:32 +03:00
call scheduler immediate from dashboard
This commit is contained in:
@@ -134,9 +134,13 @@ const SchedulerDialog = ({
|
||||
const { send: executeSchedule } = useRequest(
|
||||
(id: string) => callAction({ action: 'executeSchedule', param: id }),
|
||||
{ immediate: false }
|
||||
).onError((error) => {
|
||||
toast.error(String(error.error?.message || 'An error occurred'));
|
||||
});
|
||||
)
|
||||
.onSuccess(() => {
|
||||
toast.success(LL.EXECUTE_SCHEDULE_SENT());
|
||||
})
|
||||
.onError((error) => {
|
||||
toast.error(String(error.error?.message || 'An error occurred'));
|
||||
});
|
||||
|
||||
const execute = async () => {
|
||||
await executeSchedule(editItem.name);
|
||||
|
||||
Reference in New Issue
Block a user