[1423] 2차 user 판매점 select 항상 enable + 設計依頼 매핑 실패 시 본인 초기화

This commit is contained in:
ysCha 2026-05-15 11:09:28 +09:00
parent e915a386cc
commit bfd9d446a3

View File

@ -1051,6 +1051,18 @@ export default function StuffDetail() {
form.setValue('saleStoreName', info.saleStoreName) form.setValue('saleStoreName', info.saleStoreName)
form.setValue('saleStoreLevel', info.saleStoreLevel) form.setValue('saleStoreLevel', info.saleStoreLevel)
} else { } 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) setOtherSelOptions(info.saleStoreId)
form.setValue('otherSaleStoreId', info.saleStoreId) form.setValue('otherSaleStoreId', info.saleStoreId)
form.setValue('otherSaleStoreName', info.saleStoreName) form.setValue('otherSaleStoreName', info.saleStoreName)
@ -2051,13 +2063,12 @@ export default function StuffDetail() {
getOptionLabel={(x) => x.saleStoreName} getOptionLabel={(x) => x.saleStoreName}
getOptionValue={(x) => x.saleStoreId} getOptionValue={(x) => x.saleStoreId}
isDisabled={ isDisabled={
// [PLANREQ-MATCH 2026-05-15] 2 user store enable
session?.storeLvl === '1' session?.storeLvl === '1'
? otherSaleStoreList.length > 0 ? otherSaleStoreList.length > 0
? false ? false
: true : true
: otherSaleStoreList.length === 1 : false
? true
: false
} }
isClearable={true} isClearable={true}
value={otherSaleStoreList.filter(function (option) { value={otherSaleStoreList.filter(function (option) {
@ -2650,15 +2661,14 @@ export default function StuffDetail() {
getOptionLabel={(x) => x.saleStoreName} getOptionLabel={(x) => x.saleStoreName}
getOptionValue={(x) => x.saleStoreId} getOptionValue={(x) => x.saleStoreId}
isDisabled={ isDisabled={
// [PLANREQ-MATCH 2026-05-15] 2 user store enable (tempFlg='0' )
managementState?.tempFlg === '0' managementState?.tempFlg === '0'
? true ? true
: session?.storeLvl === '1' : session?.storeLvl === '1'
? otherSaleStoreList.length > 0 ? otherSaleStoreList.length > 0
? false ? false
: true : true
: otherSaleStoreList.length === 1 : false
? true
: false
} }
isClearable={managementState?.tempFlg === '0' ? false : true} isClearable={managementState?.tempFlg === '0' ? false : true}
value={otherSaleStoreList.filter(function (option) { value={otherSaleStoreList.filter(function (option) {