flow-widgdt 인라인 편집 및 검색 하이라이트 기능 추가

This commit is contained in:
dohyeons
2025-12-08 16:06:43 +09:00
parent 2cc0a7b309
commit 11a99a5c2e
6 changed files with 1293 additions and 193 deletions

View File

@@ -837,4 +837,53 @@ export class FlowController {
});
}
};
/**
* 스텝 데이터 업데이트 (인라인 편집)
*/
updateStepData = async (req: Request, res: Response): Promise<void> => {
try {
const { flowId, stepId, recordId } = req.params;
const updateData = req.body;
const userId = (req as any).user?.userId || "system";
const userCompanyCode = (req as any).user?.companyCode;
if (!flowId || !stepId || !recordId) {
res.status(400).json({
success: false,
message: "flowId, stepId, and recordId are required",
});
return;
}
if (!updateData || Object.keys(updateData).length === 0) {
res.status(400).json({
success: false,
message: "Update data is required",
});
return;
}
const result = await this.flowExecutionService.updateStepData(
parseInt(flowId),
parseInt(stepId),
recordId,
updateData,
userId,
userCompanyCode
);
res.json({
success: true,
message: "Data updated successfully",
data: result,
});
} catch (error: any) {
console.error("Error updating step data:", error);
res.status(500).json({
success: false,
message: error.message || "Failed to update step data",
});
}
};
}