
* WIP: add scheduler commands * refactor scheduler commands page * WIP on CRUD for ScheduledCommands * more refactoring, finish CRUD On scheduled pages * Add info text about Scheduler service * Finish recurring commands add/edit * add more texts * fix server status behavior on not-loaded-yet state; adjust texts; lint fixes * add link to the help pages in the commands palette * Move Commands Panel to ServerSchedulesPage * Rename Server Schedules to Server Actions * more texts, a bit changed visual of the actions page, lint fix * add docs * fix tests * Add UTC label to scheduled command create/edit
16 lines
480 B
TypeScript
16 lines
480 B
TypeScript
import { useQuery } from "@tanstack/react-query";
|
|
import { useDataProvider } from "react-admin";
|
|
|
|
import { useAppContext } from "../../../../Context";
|
|
|
|
export const useRecurringCommands = () => {
|
|
const { etkeccAdmin } = useAppContext();
|
|
const dataProvider = useDataProvider();
|
|
const { data, isLoading, error } = useQuery({
|
|
queryKey: ["recurringCommands"],
|
|
queryFn: () => dataProvider.getRecurringCommands(etkeccAdmin),
|
|
});
|
|
|
|
return { data, isLoading, error };
|
|
};
|