260321:1700 Correct Coresspondence / Doing RFA

This commit is contained in:
admin
2026-03-21 17:00:41 +07:00
parent dcf55f4d08
commit 03d16cfd64
57 changed files with 1923 additions and 663 deletions
+3 -2
View File
@@ -6,6 +6,7 @@ import {
EvaluateWorkflowDto,
GetAvailableActionsDto,
} from '@/types/dto/workflow-engine/workflow-engine.dto';
import { Workflow } from '@/types/workflow';
export const workflowKeys = {
all: ['workflows'] as const,
@@ -14,14 +15,14 @@ export const workflowKeys = {
};
export const useWorkflowDefinitions = () => {
return useQuery({
return useQuery<Workflow[]>({
queryKey: workflowKeys.definitions(),
queryFn: () => workflowEngineService.getDefinitions(),
});
};
export const useWorkflowDefinition = (id: string | number) => {
return useQuery({
return useQuery<Workflow>({
queryKey: workflowKeys.definition(id),
queryFn: () => workflowEngineService.getDefinitionById(id),
enabled: !!id,