Merge branch 'dev' into dev-yj

This commit is contained in:
nohyoungjoo 2025-01-31 09:43:31 +09:00
commit 7c36c1210c

View File

@ -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' }}>