Compare commits
No commits in common. "ce7c90eb6fcc307d6278bfd00d7a47919f3a4dcd" and "2e60e848c8933deb820029cdd7561b21c936b691" have entirely different histories.
ce7c90eb6f
...
2e60e848c8
@ -18,7 +18,6 @@ const Trestle = forwardRef((props, ref) => {
|
|||||||
const [selectedRoof, setSelectedRoof] = useState()
|
const [selectedRoof, setSelectedRoof] = useState()
|
||||||
const {
|
const {
|
||||||
trestleState,
|
trestleState,
|
||||||
trestleDetail,
|
|
||||||
dispatch,
|
dispatch,
|
||||||
raftBaseList,
|
raftBaseList,
|
||||||
trestleList,
|
trestleList,
|
||||||
@ -225,7 +224,6 @@ const Trestle = forwardRef((props, ref) => {
|
|||||||
snowGdPossYn,
|
snowGdPossYn,
|
||||||
cvrChecked,
|
cvrChecked,
|
||||||
snowGdChecked,
|
snowGdChecked,
|
||||||
trestleDetail,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return { ...roof }
|
return { ...roof }
|
||||||
@ -274,9 +272,6 @@ const Trestle = forwardRef((props, ref) => {
|
|||||||
...roof.construction,
|
...roof.construction,
|
||||||
...moduleSelectionData.roofConstructions[index].construction,
|
...moduleSelectionData.roofConstructions[index].construction,
|
||||||
},
|
},
|
||||||
trestleDetail: {
|
|
||||||
...roof.trestleDetail,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
|||||||
@ -64,7 +64,6 @@ export function useModuleTrestle(props) {
|
|||||||
const [ridgeMargin, setRidgeMargin] = useState(0)
|
const [ridgeMargin, setRidgeMargin] = useState(0)
|
||||||
const [kerabaMargin, setKerabaMargin] = useState(0)
|
const [kerabaMargin, setKerabaMargin] = useState(0)
|
||||||
const [trestleState, dispatch] = useReducer(trestleReducer, null)
|
const [trestleState, dispatch] = useReducer(trestleReducer, null)
|
||||||
const [trestleDetail, setTrestleDetail] = useState(null)
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const raftCodeList = findCommonCode(RAFT_BASE_CODE)
|
const raftCodeList = findCommonCode(RAFT_BASE_CODE)
|
||||||
@ -91,7 +90,6 @@ export function useModuleTrestle(props) {
|
|||||||
setConstMthdList([])
|
setConstMthdList([])
|
||||||
setRoofBaseList([])
|
setRoofBaseList([])
|
||||||
setConstructionList([])
|
setConstructionList([])
|
||||||
setTrestleDetail(null)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,20 +97,17 @@ export function useModuleTrestle(props) {
|
|||||||
if (!trestleState.constMthdCd) {
|
if (!trestleState.constMthdCd) {
|
||||||
setRoofBaseList([])
|
setRoofBaseList([])
|
||||||
setConstructionList([])
|
setConstructionList([])
|
||||||
setTrestleDetail(null)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
handleSetRoofBaseList()
|
handleSetRoofBaseList()
|
||||||
if (!trestleState.roofBaseCd) {
|
if (!trestleState.roofBaseCd) {
|
||||||
setConstructionList([])
|
setConstructionList([])
|
||||||
setTrestleDetail(null)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
handleSetConstructionList()
|
handleSetConstructionList()
|
||||||
if (!trestleState.constTp) {
|
if (!trestleState.constTp) {
|
||||||
setTrestleDetail(null)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,7 +193,6 @@ export function useModuleTrestle(props) {
|
|||||||
setEavesMargin(res[0].data.eaveIntvl)
|
setEavesMargin(res[0].data.eaveIntvl)
|
||||||
setRidgeMargin(res[0].data.ridgeIntvl)
|
setRidgeMargin(res[0].data.ridgeIntvl)
|
||||||
setKerabaMargin(res[0].data.kerabaIntvl)
|
setKerabaMargin(res[0].data.kerabaIntvl)
|
||||||
setTrestleDetail(res[0].data)
|
|
||||||
// dispatch({
|
// dispatch({
|
||||||
// type: 'SET_TRESTLE_DETAIL',
|
// type: 'SET_TRESTLE_DETAIL',
|
||||||
// roof: {
|
// roof: {
|
||||||
@ -214,7 +208,6 @@ export function useModuleTrestle(props) {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
trestleState,
|
trestleState,
|
||||||
trestleDetail,
|
|
||||||
dispatch,
|
dispatch,
|
||||||
raftBaseList,
|
raftBaseList,
|
||||||
trestleList,
|
trestleList,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user