From bfd9d446a393e1271a621fecde0d6fbc05d20174 Mon Sep 17 00:00:00 2001 From: ysCha Date: Fri, 15 May 2026 11:09:28 +0900 Subject: [PATCH] =?UTF-8?q?[1423]=202=EC=B0=A8=20user=20=ED=8C=90=EB=A7=A4?= =?UTF-8?q?=EC=A0=90=20select=20=ED=95=AD=EC=83=81=20enable=20+=20?= =?UTF-8?q?=E8=A8=AD=E8=A8=88=E4=BE=9D=E9=A0=BC=20=EB=A7=A4=ED=95=91=20?= =?UTF-8?q?=EC=8B=A4=ED=8C=A8=20=EC=8B=9C=20=EB=B3=B8=EC=9D=B8=20=EC=B4=88?= =?UTF-8?q?=EA=B8=B0=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/management/StuffDetail.jsx | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/components/management/StuffDetail.jsx b/src/components/management/StuffDetail.jsx index 0d6f12a8..b1328188 100644 --- a/src/components/management/StuffDetail.jsx +++ b/src/components/management/StuffDetail.jsx @@ -1051,6 +1051,18 @@ export default function StuffDetail() { form.setValue('saleStoreName', info.saleStoreName) form.setValue('saleStoreLevel', info.saleStoreLevel) } else { + // [PLANREQ-MATCH 2026-05-15] 2차 user: 매핑 실패 시 planReqNo 클리어 + 본인 store 로 초기화 → 2차 select disable 자동 해제 + if (session?.storeLvl === '2') { + const matched = otherSaleStoreList.some((o) => o.saleStoreId === info.saleStoreId) + if (!matched) { + form.setValue('planReqNo', '') + setOtherSelOptions(session?.storeId) + form.setValue('otherSaleStoreId', session?.storeId) + form.setValue('otherSaleStoreName', '') + form.setValue('otherSaleStoreLevel', session?.storeLvl) + return + } + } setOtherSelOptions(info.saleStoreId) form.setValue('otherSaleStoreId', info.saleStoreId) form.setValue('otherSaleStoreName', info.saleStoreName) @@ -2051,13 +2063,12 @@ export default function StuffDetail() { getOptionLabel={(x) => x.saleStoreName} getOptionValue={(x) => x.saleStoreId} isDisabled={ + // [PLANREQ-MATCH 2026-05-15] 2차 user 는 하위 store 선택이 가능해야 하므로 항상 enable session?.storeLvl === '1' ? otherSaleStoreList.length > 0 ? false : true - : otherSaleStoreList.length === 1 - ? true - : false + : false } isClearable={true} value={otherSaleStoreList.filter(function (option) { @@ -2650,15 +2661,14 @@ export default function StuffDetail() { getOptionLabel={(x) => x.saleStoreName} getOptionValue={(x) => x.saleStoreId} isDisabled={ + // [PLANREQ-MATCH 2026-05-15] 2차 user 는 하위 store 선택이 가능해야 하므로 항상 enable (tempFlg='0' 잠금만 유지) managementState?.tempFlg === '0' ? true : session?.storeLvl === '1' ? otherSaleStoreList.length > 0 ? false : true - : otherSaleStoreList.length === 1 - ? true - : false + : false } isClearable={managementState?.tempFlg === '0' ? false : true} value={otherSaleStoreList.filter(function (option) {