diff --git a/src/components/shared/WorkflowDefinitionModal.tsx b/src/components/shared/WorkflowDefinitionModal.tsx
index a4020f5..30c72c7 100644
--- a/src/components/shared/WorkflowDefinitionModal.tsx
+++ b/src/components/shared/WorkflowDefinitionModal.tsx
@@ -99,7 +99,7 @@ const workflowSchema = z
name: z.string().min(1, "Name is required"),
code: z.string().min(1, "Code is required"),
description: z.string().optional(),
- entity_type: z.enum(["document", "capa", "supplier", "training"]),
+ entity_type: z.string().min(1, "entity_type is required").max(100, "entity_type must be at most 100 characters"),
status: z.enum(["draft", "active", "deprecated", "archived"]),
source_module: z.array(z.string()).optional(),
source_module_id: z
@@ -235,7 +235,7 @@ export const WorkflowDefinitionModal = ({
name: "",
code: "",
description: "",
- entity_type: "document",
+ entity_type: "",
status: "draft",
source_module: [],
source_module_id: [],
@@ -350,7 +350,7 @@ export const WorkflowDefinitionModal = ({
name: "",
code: "",
description: "",
- entity_type: "document",
+ entity_type: "",
status: "draft",
source_module: [],
source_module_id: [],
@@ -591,7 +591,14 @@ export const WorkflowDefinitionModal = ({
error={errors.description?.message as any}
/>
-
+ {/* (
@@ -610,7 +617,7 @@ export const WorkflowDefinitionModal = ({
disabled={isEdit}
/>
)}
- />
+ /> */}
(
-
+
{wf.entity_type}
),
diff --git a/src/services/workflow-service.ts b/src/services/workflow-service.ts
index 4da9356..e66a54e 100644
--- a/src/services/workflow-service.ts
+++ b/src/services/workflow-service.ts
@@ -30,7 +30,7 @@ class WorkflowService {
}
async getDefinition(id: string, tenantId?: string): Promise {
- const params = tenantId ? { tenant_id: tenantId } : {};
+ const params = tenantId ? { tenantId: tenantId } : {};
const response = await apiClient.get(`${this.baseUrl}/definitions/${id}`, { params });
return response.data;
}