diff --git a/src/components/floor-plan/modal/basic/step/Trestle.jsx b/src/components/floor-plan/modal/basic/step/Trestle.jsx index 9fd2a7aa..0afbc92c 100644 --- a/src/components/floor-plan/modal/basic/step/Trestle.jsx +++ b/src/components/floor-plan/modal/basic/step/Trestle.jsx @@ -240,13 +240,14 @@ const Trestle = forwardRef((props, ref) => { return { ...selectedRoof, hajebichi, + lenBase: lengthBase, eavesMargin, ridgeMargin, kerabaMargin, roofIndex: selectedRoof.index, trestle: { hajebichi: hajebichi, - lengthBase: lengthBase, + length: lengthBase, ...selectedRaftBase, ...selectedTrestle, ...selectedConstMthd, @@ -273,12 +274,13 @@ const Trestle = forwardRef((props, ref) => { if (i === selectedRoof?.index) { return { ...selectedRoof, + length: lengthBase, eavesMargin, ridgeMargin, kerabaMargin, roofIndex: roof.index, trestle: { - lengthBase: lengthBase, + length: lengthBase, hajebichi: hajebichi, ...selectedRaftBase, ...selectedTrestle, @@ -309,7 +311,7 @@ const Trestle = forwardRef((props, ref) => { if (!roof.construction?.constTp) result = false if (roof.lenAuth === 'C') { - if (!roof.trestle?.lengthBase) result = false + if (!roof.trestle?.length) result = false } if (['C', 'R'].includes(roof.raftAuth)) { if (!roof?.raftBaseCd) result = false diff --git a/src/hooks/module/useModuleTrestle.js b/src/hooks/module/useModuleTrestle.js index 14e93de3..3d14d600 100644 --- a/src/hooks/module/useModuleTrestle.js +++ b/src/hooks/module/useModuleTrestle.js @@ -85,7 +85,7 @@ export function useModuleTrestle(props) { setEavesMargin(selectedRoof?.eavesMargin ?? 0) setRidgeMargin(selectedRoof?.ridgeMargin ?? 0) setKerabaMargin(selectedRoof?.kerabaMargin ?? 0) - setLengthBase(Math.round(selectedRoof?.trestle?.lengthBase ?? 0)) + setLengthBase(Math.round(selectedRoof?.length ?? 0)) setCvrYn(selectedRoof?.construction?.cvrYn ?? 'N') setCvrChecked(selectedRoof?.construction?.cvrChecked ?? false) setSnowGdPossYn(selectedRoof?.construction?.snowGdPossYn ?? 'N')