feat: Enhance approval request modal functionality

- Added user search capability with debouncing to improve performance and user experience.
- Updated approver management to utilize user data, including user ID, name, position, and department.
- Refactored local ID generation for approvers to a more concise function.
- Integrated approval request handling in button actions, allowing for modal opening with relevant data.
- Improved UI elements for better clarity and user guidance in the approval process.

Made-with: Cursor
This commit is contained in:
DDD1542
2026-03-04 11:19:57 +09:00
parent 6a30038785
commit c22b468599
6 changed files with 1157 additions and 241 deletions

View File

@@ -976,6 +976,35 @@ export class ImprovedButtonActionExecutor {
return await this.executeTransferDataAction(buttonConfig, formData, context);
}
// 결재 요청 모달 열기
if (buttonConfig.actionType === "approval") {
const actionConfig = (buttonConfig as any).componentConfig?.action || buttonConfig;
const selectedRow = context.selectedRows?.[0] || context.formData || formData;
const targetTable = actionConfig.approvalTargetTable || "";
const recordIdField = actionConfig.approvalRecordIdField || "id";
const targetRecordId = selectedRow[recordIdField] || "";
window.dispatchEvent(
new CustomEvent("open-approval-modal", {
detail: {
targetTable,
targetRecordId: String(targetRecordId),
targetRecordData: selectedRow,
definitionId: actionConfig.approvalDefinitionId || undefined,
screenId: context.screenId ? Number(context.screenId) : undefined,
buttonComponentId: context.buttonId,
},
}),
);
return {
success: true,
message: "결재 요청 모달이 열렸습니다",
executionTime: performance.now() - startTime,
data: { actionType: "approval", targetTable, targetRecordId },
};
}
// 기존 액션들 (임시 구현)
const result = {
success: true,