물건상세 설치높이 0으로 셋팅되는 문제 수정
This commit is contained in:
parent
4ede2bb12d
commit
834785133f
@ -454,7 +454,6 @@ export default function StuffDetail() {
|
||||
firstList = res
|
||||
favList = res.filter((row) => row.priority !== 'B')
|
||||
otherList = res.filter((row) => row.firstAgentYn === 'N')
|
||||
|
||||
setSaleStoreList(firstList)
|
||||
setFavoriteStoreList(firstList)
|
||||
setShowSaleStoreList(firstList)
|
||||
@ -531,6 +530,11 @@ export default function StuffDetail() {
|
||||
get({ url: url }).then((res) => {
|
||||
if (!isEmptyArray(res)) {
|
||||
if (session?.storeId === 'T01') {
|
||||
//즐겨찾기 구분 추가
|
||||
res.map((row) => {
|
||||
row.value = row.saleStoreId
|
||||
row.label = row.saleStoreName
|
||||
})
|
||||
firstList = res.filter((row) => row.saleStoreLevel === '1')
|
||||
firstList.sort((a, b) => (a.saleStoreId !== 'T01') - (b.saleStoreId !== 'T01') || a.saleStoreId - b.saleStoreId)
|
||||
favList = firstList.filter((row) => row.saleStoreId === 'T01' || row.priority !== 'B')
|
||||
@ -653,7 +657,7 @@ export default function StuffDetail() {
|
||||
//염해지역용아이템사용 saltAreaFlg 1이면 true
|
||||
form.setValue('saltAreaFlg', managementState.saltAreaFlg === '1' ? true : false)
|
||||
//설치높이
|
||||
let installHeight = managementState.installHeight ? managementState.installHeight.split('.')[0] : '0'
|
||||
let installHeight = managementState.installHeight ? managementState.installHeight.split('.')[0] : ''
|
||||
form.setValue('installHeight', installHeight)
|
||||
//계약조건 null로 내려오면 0으로 디폴트셋팅
|
||||
if (managementState.conType === null) {
|
||||
@ -989,7 +993,7 @@ export default function StuffDetail() {
|
||||
form.setValue('saltAreaFlg', false)
|
||||
}
|
||||
|
||||
let installHeight = info.installHeight ? info.installHeight.split('.')[0] : '0'
|
||||
let installHeight = info.installHeight ? info.installHeight.split('.')[0] : ''
|
||||
|
||||
form.setValue('installHeight', installHeight)
|
||||
form.setValue('remarks', info.remarks)
|
||||
@ -1407,7 +1411,6 @@ export default function StuffDetail() {
|
||||
// 수정모드일때는 PUT
|
||||
await promisePut({ url: apiUrl, data: params })
|
||||
.then((res) => {
|
||||
console.log('수정::::::::::::', params)
|
||||
setIsGlobalLoading(true)
|
||||
|
||||
if (res.status === 201) {
|
||||
@ -1656,6 +1659,32 @@ export default function StuffDetail() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const CustomOption = (props) => {
|
||||
const { data, innerRef, innerProps, isSelected, isFocused, isDisabled } = props
|
||||
const customClass = data.saleStoreId === 'T01' || data.priority !== 'B' ? 'special-option' : ''
|
||||
// 기본 선택/호버 상태 적용
|
||||
const optionClass = `${customClass} ${isSelected ? 'custom__option--is-selected' : ''} ${isFocused ? 'custom__option--is-focused' : ''} ${isDisabled ? 'custom__option--is-disabled' : ''}`
|
||||
|
||||
return (
|
||||
<div ref={innerRef} {...innerProps} className={`custom__option ${optionClass}`}>
|
||||
{data.label}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const CustomOption2 = (props) => {
|
||||
const { data, innerRef, innerProps, isSelected, isFocused, isDisabled } = props
|
||||
const customClass = data.priority !== 'B' ? 'special-option' : ''
|
||||
// 기본 선택/호버 상태 적용
|
||||
const optionClass = `${customClass} ${isSelected ? 'custom__option--is-selected' : ''} ${isFocused ? 'custom__option--is-focused' : ''} ${isDisabled ? 'custom__option--is-disabled' : ''}`
|
||||
return (
|
||||
<div ref={innerRef} {...innerProps} className={`custom__option ${optionClass}`}>
|
||||
{data.label}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{(editMode === 'NEW' && (
|
||||
@ -1823,6 +1852,7 @@ export default function StuffDetail() {
|
||||
value={saleStoreList.filter(function (option) {
|
||||
return option.saleStoreId === selOptions
|
||||
})}
|
||||
components={{ Option: CustomOption }}
|
||||
></Select>
|
||||
</div>
|
||||
<div className="input-wrap" style={{ width: '216px' }}>
|
||||
@ -1855,6 +1885,7 @@ export default function StuffDetail() {
|
||||
value={showSaleStoreList.filter(function (option) {
|
||||
return option.saleStoreId === selOptions
|
||||
})}
|
||||
// components={{ Option: CustomOption }}
|
||||
></Select>
|
||||
</div>
|
||||
<div className="input-wrap" style={{ width: '216px' }}>
|
||||
@ -1886,6 +1917,7 @@ export default function StuffDetail() {
|
||||
value={showSaleStoreList.filter(function (option) {
|
||||
return option.saleStoreId === selOptions
|
||||
})}
|
||||
// components={{ Option: CustomOption }}
|
||||
></Select>
|
||||
</div>
|
||||
<div className="input-wrap" style={{ width: '216px' }}>
|
||||
@ -1938,11 +1970,11 @@ export default function StuffDetail() {
|
||||
? true
|
||||
: false
|
||||
}
|
||||
// isDisabled={otherSaleStoreList != null && otherSaleStoreList.length === 1 ? true : false}
|
||||
isClearable={true}
|
||||
value={otherSaleStoreList.filter(function (option) {
|
||||
return option.saleStoreId === otherSelOptions
|
||||
})}
|
||||
components={{ Option: CustomOption2 }}
|
||||
/>
|
||||
</div>
|
||||
<div className="input-wrap" style={{ width: '216px' }}>
|
||||
@ -2389,7 +2421,7 @@ export default function StuffDetail() {
|
||||
<>
|
||||
<div className="select-wrap mr5" style={{ width: '567px' }}>
|
||||
<Select
|
||||
menuPlacement={'auto'}
|
||||
// menuPlacement={'auto'}
|
||||
id="long-value-select1"
|
||||
instanceId="long-value-select1"
|
||||
className="react-select-custom"
|
||||
@ -2405,6 +2437,7 @@ export default function StuffDetail() {
|
||||
value={saleStoreList.filter(function (option) {
|
||||
return option.saleStoreId === selOptions
|
||||
})}
|
||||
components={{ Option: CustomOption }}
|
||||
/>
|
||||
</div>
|
||||
<div className="input-wrap" style={{ width: '216px' }}>
|
||||
@ -2445,6 +2478,7 @@ export default function StuffDetail() {
|
||||
value={showSaleStoreList.filter(function (option) {
|
||||
return option.saleStoreId === selOptions
|
||||
})}
|
||||
// components={{ Option: CustomOption }}
|
||||
/>
|
||||
</div>
|
||||
<div className="input-wrap" style={{ width: '216px' }}>
|
||||
@ -2479,6 +2513,7 @@ export default function StuffDetail() {
|
||||
return option.saleStoreId
|
||||
}
|
||||
})}
|
||||
// components={{ Option: CustomOption }}
|
||||
/>
|
||||
</div>
|
||||
<div className="input-wrap" style={{ width: '216px' }}>
|
||||
@ -2533,6 +2568,7 @@ export default function StuffDetail() {
|
||||
value={otherSaleStoreList.filter(function (option) {
|
||||
return option.saleStoreId === otherSelOptions
|
||||
})}
|
||||
// components={{ Option: CustomOption2 }}
|
||||
/>
|
||||
</div>
|
||||
<div className="input-wrap" style={{ width: '216px' }}>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user