From a7b914407cc8c06321fcb8889eb208379aef4bbb Mon Sep 17 00:00:00 2001 From: SeongHyun Kim Date: Tue, 7 Apr 2026 18:46:18 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=B1=84=EB=B2=88=EA=B7=9C=EC=B9=99=20?= =?UTF-8?q?=ED=95=84=EB=93=9C=EB=A5=BC=20=EC=9E=85=EA=B3=A0/=EC=B6=9C?= =?UTF-8?q?=EA=B3=A0=20=EC=9E=A5=EB=B0=94=EA=B5=AC=EB=8B=88=20=ED=99=94?= =?UTF-8?q?=EB=A9=B4=EC=97=90=EC=84=9C=EB=A7=8C=20=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - SettingField에 showOnlyForScreens 옵션 추가 - 입고번호 채번: inbound-cart에서만 표시 - 출고번호 채번: outbound-cart에서만 표시 - 구매입고/판매출고/유형선택 등 다른 화면에서는 채번 필드 숨김 이로써 채번 설정의 컨텍스트가 명확해짐 --- .../(main)/admin/screenMng/popSettingsMng/page.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/frontend/app/(main)/admin/screenMng/popSettingsMng/page.tsx b/frontend/app/(main)/admin/screenMng/popSettingsMng/page.tsx index b00c69ad..619c3675 100644 --- a/frontend/app/(main)/admin/screenMng/popSettingsMng/page.tsx +++ b/frontend/app/(main)/admin/screenMng/popSettingsMng/page.tsx @@ -171,11 +171,12 @@ interface SettingField { options?: { value: string; label: string }[]; fields?: { key: string; label: string; type: string }[]; tableFilter?: string; // numbering-rule용: inbound/outbound 등 + showOnlyForScreens?: string[]; // 특정 화면 ID에서만 표시 (예: ["inbound-cart"]) } const SETTINGS_SCHEMA: Record = { inbound: [ - { key: "numberingRuleId", label: "📋 입고번호 채번규칙", description: "입고 확정 시 사용할 채번규칙을 선택합니다", type: "numbering-rule", tableFilter: "inbound" }, + { key: "numberingRuleId", label: "📋 입고번호 채번규칙", description: "입고 확정 시 사용할 채번규칙을 선택합니다", type: "numbering-rule", tableFilter: "inbound", showOnlyForScreens: ["inbound-cart"] }, { key: "barcodeEnabled", label: "바코드 스캔 (미구현)", description: "바코드/QR 스캔 기능을 사용합니다", type: "toggle" }, { key: "inspectionRequired", label: "검사 필수 (미구현)", description: "입고 시 검사 항목을 필수로 표시합니다", type: "toggle" }, { key: "photoUpload", label: "사진 첨부 (미구현)", description: "입고 확정 시 사진 첨부를 허용합니다", type: "toggle" }, @@ -183,7 +184,7 @@ const SETTINGS_SCHEMA: Record = { { key: "defectSeparation", label: "불량 분리 (미구현)", description: "양품/불량 수량을 분리 입력합니다", type: "toggle" }, ], outbound: [ - { key: "numberingRuleId", label: "📋 출고번호 채번규칙", description: "출고 확정 시 사용할 채번규칙을 선택합니다", type: "numbering-rule", tableFilter: "outbound" }, + { key: "numberingRuleId", label: "📋 출고번호 채번규칙", description: "출고 확정 시 사용할 채번규칙을 선택합니다", type: "numbering-rule", tableFilter: "outbound", showOnlyForScreens: ["outbound-cart"] }, { key: "barcodeEnabled", label: "바코드 스캔 (미구현)", description: "바코드/QR 스캔 기능을 사용합니다", type: "toggle" }, { key: "photoUpload", label: "사진 첨부 (미구현)", description: "출고 시 사진 첨부를 허용합니다", type: "toggle" }, ], @@ -944,7 +945,12 @@ export default function PopSettingsMngPage() { // ---- Current screen schema values ---- const currentSettingsKey = selectedScreen?.settingsKey || "inbound"; - const currentFields = SETTINGS_SCHEMA[currentSettingsKey] || []; + const allFields = SETTINGS_SCHEMA[currentSettingsKey] || []; + // showOnlyForScreens 옵션이 있으면 현재 화면 ID와 일치할 때만 표시 + const currentFields = allFields.filter((f) => { + if (!f.showOnlyForScreens) return true; + return selectedScreen?.id ? f.showOnlyForScreens.includes(selectedScreen.id) : false; + }); const currentValues = (settings.screens as Record>)[currentSettingsKey] || {}; return (