From f0e13bd233f3e398fa49cd4f22e8a5b4e0ce272b Mon Sep 17 00:00:00 2001 From: changkyu choi Date: Mon, 10 Feb 2025 16:56:50 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A7=80=EB=B6=95=EC=9E=AC=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20=EC=A7=80=EB=B6=95=EC=9E=AC=20select=20=ED=95=9C/?= =?UTF-8?q?=EC=9D=BC=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../circuitTrestle/CircuitTrestleSetting.jsx | 1 + .../ContextRoofAllocationSetting.jsx | 16 ++++++++++++---- .../roofAllocation/RoofAllocationSetting.jsx | 14 ++++++++++---- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx b/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx index d0cee8ba..f1362fca 100644 --- a/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx +++ b/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx @@ -364,6 +364,7 @@ export default function CircuitTrestleSetting({ id }) { if (allocationType === ALLOCATION_TYPE.PASSIVITY) { setAllocationType(ALLOCATION_TYPE.AUTO) + setTabNum(1) } else { setTabNum(1) } diff --git a/src/components/floor-plan/modal/roofAllocation/ContextRoofAllocationSetting.jsx b/src/components/floor-plan/modal/roofAllocation/ContextRoofAllocationSetting.jsx index 2374c582..a4cfa8dd 100644 --- a/src/components/floor-plan/modal/roofAllocation/ContextRoofAllocationSetting.jsx +++ b/src/components/floor-plan/modal/roofAllocation/ContextRoofAllocationSetting.jsx @@ -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) { {getMessage('modal.roof.alloc.select.roof.material')}
{ + 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) {
{ + 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)} diff --git a/src/components/floor-plan/modal/roofAllocation/RoofAllocationSetting.jsx b/src/components/floor-plan/modal/roofAllocation/RoofAllocationSetting.jsx index acd2291c..9ceeb9e0 100644 --- a/src/components/floor-plan/modal/roofAllocation/RoofAllocationSetting.jsx +++ b/src/components/floor-plan/modal/roofAllocation/RoofAllocationSetting.jsx @@ -62,13 +62,15 @@ export default function RoofAllocationSetting(props) { {getMessage('modal.roof.alloc.select.roof.material')}
{ + 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) {
{ + 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)}