Compare commits

..

No commits in common. "43e5853ed0993cfb427344a599ae44eb5530911d" and "072e80b64dacad0e75941ebe2ca65d8e2d3dc53d" have entirely different histories.

2 changed files with 18 additions and 25 deletions

View File

@ -186,7 +186,7 @@ export default function ContextRoofAllocationSetting(props) {
<input <input
type="text" type="text"
className="input-origin block" className="input-origin block"
value={roof.hajebichi === '' ? '0' : roof.hajebichi} value={parseInt(roof.hajebichi)}
readOnly={roof.roofPchAuth === 'R'} readOnly={roof.roofPchAuth === 'R'}
onChange={(e) => handleChangeInput(e, 'hajebichi', index)} onChange={(e) => handleChangeInput(e, 'hajebichi', index)}
/> />
@ -205,8 +205,8 @@ export default function ContextRoofAllocationSetting(props) {
// handleChangeInput(e, currentAngleType === 'slope' ? 'pitch' : 'angle', index) // handleChangeInput(e, currentAngleType === 'slope' ? 'pitch' : 'angle', index)
handleChangePitch(e, index) handleChangePitch(e, index)
}} }}
value={currentAngleType === 'slope' ? (roof.pitch || '0') : (roof.angle || '0')} value={currentAngleType === 'slope' ? roof.pitch : roof.angle}
defaultValue={currentAngleType === 'slope' ? (roof.pitch || '0') : (roof.angle || '0')} defaultValue={currentAngleType === 'slope' ? roof.pitch : roof.angle}
/> />
</div> </div>
<span className="absol">{pitchText}</span> <span className="absol">{pitchText}</span>

View File

@ -127,25 +127,21 @@ export function useRoofAllocationSetting(id) {
} }
}) })
} else { } else {
if(roofList.length > 0){ roofsArray = [
roofsArray = roofList {
}else{ planNo: planNo,
roofsArray = [ roofApply: true,
{ roofSeq: 0,
planNo: planNo, roofMatlCd: 'ROOF_ID_WA_53A',
roofApply: true, roofWidth: 265,
roofSeq: 0, roofHeight: 235,
roofMatlCd: 'ROOF_ID_WA_53A', roofHajebichi: 0,
roofWidth: 265, roofGap: 'HEI_455',
roofHeight: 235, roofLayout: 'P',
roofHajebichi: 0, roofPitch: 4,
roofGap: 'HEI_455', roofAngle: 21.8,
roofLayout: 'P', },
roofPitch: 4, ]
roofAngle: 21.8,
},
]
}
} }
/** /**
@ -186,9 +182,6 @@ export function useRoofAllocationSetting(id) {
roofSizeSet: '' + res[0].roofSizeSet, roofSizeSet: '' + res[0].roofSizeSet,
roofAngleSet: '' + res[0].roofAngleSet, roofAngleSet: '' + res[0].roofAngleSet,
}) })
//데이터 동기화
setCurrentRoofList(selectRoofs)
}) })
} catch (error) { } catch (error) {
console.error('Data fetching error:', error) console.error('Data fetching error:', error)