지붕면 할당 각도 오류 수정

This commit is contained in:
hyojun.choi 2025-02-05 10:46:34 +09:00
parent 14e8909f64
commit d7fb15c2e9
3 changed files with 4 additions and 3 deletions

View File

@ -31,6 +31,7 @@ export default function ContextRoofAllocationSetting(props) {
handleSaveContext, handleSaveContext,
currentRoofList, currentRoofList,
handleChangeInput, handleChangeInput,
handleChangePitch,
} = useRoofAllocationSetting(id) } = useRoofAllocationSetting(id)
const { findCommonCode } = useCommonCode() const { findCommonCode } = useCommonCode()
@ -123,7 +124,7 @@ export default function ContextRoofAllocationSetting(props) {
type="text" type="text"
className="input-origin block" className="input-origin block"
onChange={(e) => { onChange={(e) => {
handleChangeInput(e, currentAngleType === 'slope' ? 'pitch' : 'angle', index) handleChangePitch(e, index)
}} }}
defaultValue={currentAngleType === 'slope' ? roof.pitch : roof.angle} defaultValue={currentAngleType === 'slope' ? roof.pitch : roof.angle}
/> />

View File

@ -33,6 +33,7 @@ export default function RoofAllocationSetting(props) {
handleChangeLayout, handleChangeLayout,
currentRoofList, currentRoofList,
handleChangeInput, handleChangeInput,
handleChangePitch,
} = useRoofAllocationSetting(id) } = useRoofAllocationSetting(id)
const pitchText = useRecoilValue(pitchTextSelector) const pitchText = useRecoilValue(pitchTextSelector)
const { findCommonCode } = useCommonCode() const { findCommonCode } = useCommonCode()
@ -125,7 +126,7 @@ export default function RoofAllocationSetting(props) {
type="text" type="text"
className="input-origin block" className="input-origin block"
onChange={(e) => { onChange={(e) => {
handleChangeInput(e, currentAngleType === 'slope' ? 'pitch' : 'angle', index) handleChangePitch(e, index)
}} }}
defaultValue={currentAngleType === 'slope' ? roof.pitch : roof.angle} defaultValue={currentAngleType === 'slope' ? roof.pitch : roof.angle}
/> />

View File

@ -341,7 +341,6 @@ export function useRoofAllocationSetting(id) {
const newRoofList = currentRoofList.map((roof, idx) => { const newRoofList = currentRoofList.map((roof, idx) => {
return { ...roof, index: idx, ...basicInfo } return { ...roof, index: idx, ...basicInfo }
}) })
console.log('basicInfo', newRoofList)
setBasicSetting((prev) => { setBasicSetting((prev) => {
return { return {