Merge pull request '[1136]하제비치값 변경 안되는 현상 수정' (#165) from dev into prd-deploy

Reviewed-on: #165
This commit is contained in:
ysCha 2025-07-01 14:56:33 +09:00
commit a8e0eaadbd
2 changed files with 8 additions and 1 deletions

View File

@ -176,6 +176,13 @@ const Trestle = forwardRef((props, ref) => {
const onChangeHajebichi = (e) => {
setHajebichi(e)
// roofs selectedRoof.index
if (selectedRoof && selectedRoof.index !== undefined) {
const updatedRoofs = roofs.map((roof, index) => (index === selectedRoof.index ? { ...roof, hajebichi: Number(e) } : roof))
setRoofs(updatedRoofs)
}
dispatch({
type: 'SET_HAJEBICHI',
roof: {

View File

@ -2544,7 +2544,7 @@ export const useTrestle = () => {
mixMatlNo: module.mixMatlNo,
raftBaseCd: addRoof.raft ?? addRoof.raftBaseCd,
inclCd: addRoof.pitch,
roofPitch: !addRoof.roofPchBase ? addRoof.roofPchBase : Number(addRoof.roofPchBase),
roofPitch: !!addRoof.hajebichi ? addRoof.hajebichi : Number(addRoof.roofPchBase),
exposedLowerBottomTotCnt: result.exposedBottom, // 노출 최하면 갯수
exposedHalfBottomTotCnt: result.exposedHalfBottom, // 노출 반하면 갯수
exposedTopTotCnt: result.exposedTop, // 노출 상면 총 수