From dff27c522fc791f34690cd6f75fddb4c96f133d0 Mon Sep 17 00:00:00 2001 From: kjs Date: Wed, 4 Feb 2026 09:40:02 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=B2=84=ED=8A=BC=20=EC=BB=B4=ED=8F=AC?= =?UTF-8?q?=EB=84=8C=ED=8A=B8=EC=9D=98=20=EC=84=B1=EA=B3=B5=20=EB=A9=94?= =?UTF-8?q?=EC=8B=9C=EC=A7=80=20=ED=91=9C=EC=8B=9C=20=EB=A1=9C=EC=A7=81=20?= =?UTF-8?q?=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 성공 메시지를 표시하는 액션을 'save', 'delete', 'submit'으로 제한하여 불필요한 토스트 메시지를 방지하도록 수정하였습니다. - 조용히 처리되는 액션에 대한 주석을 업데이트하여 코드 가독성을 향상시켰습니다. --- .../v2-button-primary/ButtonPrimaryComponent.tsx | 12 +++++------- frontend/lib/utils/buttonActions.ts | 11 ++++------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/frontend/lib/registry/components/v2-button-primary/ButtonPrimaryComponent.tsx b/frontend/lib/registry/components/v2-button-primary/ButtonPrimaryComponent.tsx index aee5e36e..83a7771d 100644 --- a/frontend/lib/registry/components/v2-button-primary/ButtonPrimaryComponent.tsx +++ b/frontend/lib/registry/components/v2-button-primary/ButtonPrimaryComponent.tsx @@ -641,19 +641,17 @@ export const ButtonPrimaryComponent: React.FC = ({ } // 성공한 경우에만 성공 토스트 표시 - // edit, modal, navigate, excel_upload, barcode_scan 액션은 조용히 처리 - // (UI 전환만 하거나 모달 내부에서 자체적으로 메시지 표시) - const silentSuccessActions = ["edit", "modal", "navigate", "excel_upload", "barcode_scan"]; - if (!silentSuccessActions.includes(actionConfig.type)) { + // save, delete, submit 액션에서만 성공 메시지 표시 + // 그 외 액션은 조용히 처리 (불필요한 "완료되었습니다" 토스트 방지) + const successToastActions = ["save", "delete", "submit"]; + if (successToastActions.includes(actionConfig.type)) { // 기본 성공 메시지 결정 const defaultSuccessMessage = actionConfig.type === "save" ? "저장되었습니다." : actionConfig.type === "delete" ? "삭제되었습니다." - : actionConfig.type === "submit" - ? "제출되었습니다." - : "완료되었습니다."; + : "제출되었습니다."; // 커스텀 메시지 사용 조건: // 1. 커스텀 메시지가 있고 diff --git a/frontend/lib/utils/buttonActions.ts b/frontend/lib/utils/buttonActions.ts index 12972b15..d19885cb 100644 --- a/frontend/lib/utils/buttonActions.ts +++ b/frontend/lib/utils/buttonActions.ts @@ -3063,10 +3063,8 @@ export class ButtonActionExecutor { window.dispatchEvent(modalEvent); - // 성공 메시지 (autoDetectDataSource 모드에서만) - if (autoDetectDataSource && config.successMessage) { - toast.success(config.successMessage); - } + // 모달 열기는 UI 전환이므로 성공 토스트를 표시하지 않음 + // (저장 등 실제 액션 완료 시에만 토스트 표시) return true; } @@ -3255,8 +3253,7 @@ export class ButtonActionExecutor { window.dispatchEvent(modalEvent); - // 성공 메시지 (간단하게) - toast.success(config.successMessage || "다음 단계로 진행합니다."); + // 모달 열기는 UI 전환이므로 성공 토스트를 표시하지 않음 return true; } else { @@ -7122,7 +7119,7 @@ export const DEFAULT_BUTTON_ACTIONS: Record