call scheduler immediate from dashboard

This commit is contained in:
proddy
2026-06-07 12:37:34 +02:00
parent cbfebabfa3
commit cfcc84d0c4
18 changed files with 195 additions and 124 deletions

View File

@@ -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);