지붕재 설정 지붕재 select 한/일 처리

This commit is contained in:
changkyu choi 2025-02-10 16:56:50 +09:00
parent 83f0e54dc5
commit f0e13bd233
3 changed files with 23 additions and 8 deletions

View File

@ -364,6 +364,7 @@ export default function CircuitTrestleSetting({ id }) {
if (allocationType === ALLOCATION_TYPE.PASSIVITY) {
setAllocationType(ALLOCATION_TYPE.AUTO)
setTabNum(1)
} else {
setTabNum(1)
}

View File

@ -10,6 +10,7 @@ import { basicSettingState } from '@/store/settingAtom'
import { ROOF_MATERIAL_LAYOUT } from '@/components/floor-plan/modal/placementShape/PlacementShapeSetting'
import { useCanvasSetting } from '@/hooks/option/useCanvasSetting'
import { useCommonCode } from '@/hooks/common/useCommonCode'
import { globalLocaleStore } from '@/store/localeAtom'
import { currentAngleTypeSelector, pitchTextSelector } from '@/store/canvasAtom'
export default function ContextRoofAllocationSetting(props) {
@ -36,6 +37,7 @@ export default function ContextRoofAllocationSetting(props) {
const { findCommonCode } = useCommonCode()
const pitchText = useRecoilValue(pitchTextSelector)
const globalLocale = useRecoilValue(globalLocaleStore)
const currentAngleType = useRecoilValue(currentAngleTypeSelector)
const [raftCodes, setRaftCodes] = useState([])
useEffect(() => {
@ -60,13 +62,15 @@ export default function ContextRoofAllocationSetting(props) {
<span>{getMessage('modal.roof.alloc.select.roof.material')}</span>
<div className="grid-select">
<QSelectBox
options={roofMaterials}
options={roofMaterials.map((roof) => {
return { ...roof, name: globalLocale === 'ko' ? roof.roofMatlNm : roof.roofMatlNmJp }
})}
value={roofMaterials[0]}
onChange={(e) => {
// const selected = roofMaterials.find((roofMaterial) => roofMaterial.roofMatlCd === e.id)
setCurrentRoofMaterial(e)
}}
showKey={'roofMatlNm'}
showKey="name"
sourceKey={'roofMatlCd'}
targetKey={'roofMatlCd'}
/>
@ -100,9 +104,13 @@ export default function ContextRoofAllocationSetting(props) {
<div className="flex-ment">
<div className="grid-select">
<QSelectBox
options={roofMaterials}
// options={roofMaterials}
options={roofMaterials.map((roof2) => {
return { ...roof2, name: globalLocale === 'ko' ? roof2.roofMatlNm : roof2.roofMatlNmJp }
})}
value={roof}
showKey={'roofMatlNm'}
//showKey={'roofMatlNm'}
showKey="name"
sourceKey={'roofMatlCd'}
targetKey={'roofMatlCd'}
onChange={(e) => handleChangeRoofMaterial(e, index)}

View File

@ -62,13 +62,15 @@ export default function RoofAllocationSetting(props) {
<span>{getMessage('modal.roof.alloc.select.roof.material')}</span>
<div className="grid-select">
<QSelectBox
options={roofMaterials}
options={roofMaterials.map((roof) => {
return { ...roof, name: globalLocale === 'ko' ? roof.roofMatlNm : roof.roofMatlNmJp }
})}
value={roofMaterials[0]}
onChange={(e) => {
// const selected = roofMaterials.find((roofMaterial) => roofMaterial.roofMatlCd === e.id)
setCurrentRoofMaterial(e)
}}
showKey={'roofMatlNm'}
showKey="name"
sourceKey={'roofMatlCd'}
targetKey={'roofMatlCd'}
/>
@ -102,9 +104,13 @@ export default function RoofAllocationSetting(props) {
<div className="flex-ment">
<div className="grid-select">
<QSelectBox
options={roofMaterials}
//options={roofMaterials}
options={roofMaterials.map((roof2) => {
return { ...roof2, name: globalLocale === 'ko' ? roof2.roofMatlNm : roof2.roofMatlNmJp }
})}
value={roof}
showKey={'roofMatlNm'}
//showKey={'roofMatlNm'}
showKey="name"
sourceKey={'roofMatlCd'}
targetKey={'roofMatlCd'}
onChange={(e) => handleChangeRoofMaterial(e, index)}