feat: Enhance approval request handling and user management

- Updated the approval request controller to include target_record_id in query parameters for improved filtering.
- Refactored the approval request creation logic to merge approval_mode into target_record_data, allowing for better handling of approval processes.
- Enhanced the user search functionality in the approval request modal to accommodate additional user attributes such as position and department.
- Improved error handling messages for clarity regarding required fields in the approval request modal.
- Added new menu item for accessing the approval box directly from user dropdown and app layout.

Made-with: Cursor
This commit is contained in:
DDD1542
2026-03-04 18:26:16 +09:00
parent c22b468599
commit f6a2668bdc
18 changed files with 2054 additions and 65 deletions

View File

@@ -979,17 +979,17 @@ export class ImprovedButtonActionExecutor {
// 결재 요청 모달 열기
if (buttonConfig.actionType === "approval") {
const actionConfig = (buttonConfig as any).componentConfig?.action || buttonConfig;
const selectedRow = context.selectedRows?.[0] || context.formData || formData;
const selectedRow = context.selectedRows?.[0] || context.formData || formData || {};
const targetTable = actionConfig.approvalTargetTable || "";
const recordIdField = actionConfig.approvalRecordIdField || "id";
const targetRecordId = selectedRow[recordIdField] || "";
const targetRecordId = selectedRow?.[recordIdField] || "";
window.dispatchEvent(
new CustomEvent("open-approval-modal", {
detail: {
targetTable,
targetRecordId: String(targetRecordId),
targetRecordData: selectedRow,
targetRecordId: targetRecordId ? String(targetRecordId) : "",
targetRecordData: Object.keys(selectedRow).length > 0 ? selectedRow : undefined,
definitionId: actionConfig.approvalDefinitionId || undefined,
screenId: context.screenId ? Number(context.screenId) : undefined,
buttonComponentId: context.buttonId,