fix: resolve remaining clippy warnings and improve workflow frontend
- Collapse nested if-let in user_service.rs search filter - Suppress dead_code warning on ApiDoc struct - Refactor server routing: nest all routes under /api/v1 prefix - Simplify health check route path - Improve workflow ProcessDesigner with edit mode and loading states - Update workflow pages with enhanced UX - Add Phase 2 implementation plan document
This commit is contained in:
@@ -4,6 +4,7 @@ import type { ColumnsType } from 'antd/es/table';
|
||||
import {
|
||||
listProcessDefinitions,
|
||||
createProcessDefinition,
|
||||
updateProcessDefinition,
|
||||
publishProcessDefinition,
|
||||
type ProcessDefinitionInfo,
|
||||
type CreateProcessDefinitionRequest,
|
||||
@@ -57,14 +58,19 @@ export default function ProcessDefinitions() {
|
||||
}
|
||||
};
|
||||
|
||||
const handleSave = async (req: CreateProcessDefinitionRequest) => {
|
||||
const handleSave = async (req: CreateProcessDefinitionRequest, id?: string) => {
|
||||
try {
|
||||
await createProcessDefinition(req);
|
||||
message.success('创建成功');
|
||||
if (id) {
|
||||
await updateProcessDefinition(id, req);
|
||||
message.success('更新成功');
|
||||
} else {
|
||||
await createProcessDefinition(req);
|
||||
message.success('创建成功');
|
||||
}
|
||||
setDesignerOpen(false);
|
||||
fetch();
|
||||
} catch {
|
||||
message.error('创建失败');
|
||||
message.error(id ? '更新失败' : '创建失败');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user