지붕재별 가대정보 저장 로직수정
This commit is contained in:
parent
b8dad62116
commit
35708f65e9
@ -92,7 +92,7 @@ const Trestle = forwardRef((props, ref) => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (raftBaseList.length > 0) {
|
if (raftBaseList.length > 0) {
|
||||||
setSelectedRaftBase(raftBaseList.find((raft) => raft.clCode === trestleState?.raftBaseCd) ?? null)
|
setSelectedRaftBase(raftBaseList.find((raft) => raft.clCode === selectedRoof?.raft) ?? null)
|
||||||
} else {
|
} else {
|
||||||
setSelectedRaftBase(null)
|
setSelectedRaftBase(null)
|
||||||
}
|
}
|
||||||
@ -157,7 +157,7 @@ const Trestle = forwardRef((props, ref) => {
|
|||||||
length: e,
|
length: e,
|
||||||
moduleTpCd: selectedModules.itemTp ?? '',
|
moduleTpCd: selectedModules.itemTp ?? '',
|
||||||
roofMatlCd: selectedRoof?.roofMatlCd ?? '',
|
roofMatlCd: selectedRoof?.roofMatlCd ?? '',
|
||||||
raftBaseCd: selectedRaftBase?.clCode,
|
raft: selectedRaftBase?.clCode,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -169,7 +169,7 @@ const Trestle = forwardRef((props, ref) => {
|
|||||||
roof: {
|
roof: {
|
||||||
moduleTpCd: selectedModules.itemTp ?? '',
|
moduleTpCd: selectedModules.itemTp ?? '',
|
||||||
roofMatlCd: selectedRoof?.roofMatlCd ?? '',
|
roofMatlCd: selectedRoof?.roofMatlCd ?? '',
|
||||||
raftBaseCd: e.clCode,
|
raft: e.clCode,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -181,7 +181,7 @@ const Trestle = forwardRef((props, ref) => {
|
|||||||
roof: {
|
roof: {
|
||||||
moduleTpCd: selectedModules.itemTp ?? '',
|
moduleTpCd: selectedModules.itemTp ?? '',
|
||||||
roofMatlCd: selectedRoof?.roofMatlCd ?? '',
|
roofMatlCd: selectedRoof?.roofMatlCd ?? '',
|
||||||
raftBaseCd: selectedRaftBase?.clCode,
|
raft: selectedRaftBase?.clCode,
|
||||||
trestleMkrCd: e.trestleMkrCd,
|
trestleMkrCd: e.trestleMkrCd,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -194,7 +194,7 @@ const Trestle = forwardRef((props, ref) => {
|
|||||||
roof: {
|
roof: {
|
||||||
moduleTpCd: selectedModules.itemTp ?? '',
|
moduleTpCd: selectedModules.itemTp ?? '',
|
||||||
roofMatlCd: selectedRoof?.roofMatlCd ?? '',
|
roofMatlCd: selectedRoof?.roofMatlCd ?? '',
|
||||||
raftBaseCd: selectedRaftBase?.clCode,
|
raft: selectedRaftBase?.clCode,
|
||||||
trestleMkrCd: selectedTrestle.trestleMkrCd,
|
trestleMkrCd: selectedTrestle.trestleMkrCd,
|
||||||
constMthdCd: e.constMthdCd,
|
constMthdCd: e.constMthdCd,
|
||||||
},
|
},
|
||||||
@ -208,7 +208,7 @@ const Trestle = forwardRef((props, ref) => {
|
|||||||
roof: {
|
roof: {
|
||||||
moduleTpCd: selectedModules.itemTp ?? '',
|
moduleTpCd: selectedModules.itemTp ?? '',
|
||||||
roofMatlCd: selectedRoof?.roofMatlCd ?? '',
|
roofMatlCd: selectedRoof?.roofMatlCd ?? '',
|
||||||
raftBaseCd: selectedRaftBase?.clCode,
|
raft: selectedRaftBase?.clCode,
|
||||||
trestleMkrCd: selectedTrestle.trestleMkrCd,
|
trestleMkrCd: selectedTrestle.trestleMkrCd,
|
||||||
constMthdCd: selectedConstMthd.constMthdCd,
|
constMthdCd: selectedConstMthd.constMthdCd,
|
||||||
roofBaseCd: e.roofBaseCd,
|
roofBaseCd: e.roofBaseCd,
|
||||||
@ -229,7 +229,7 @@ const Trestle = forwardRef((props, ref) => {
|
|||||||
roof: {
|
roof: {
|
||||||
moduleTpCd: selectedModules.itemTp ?? '',
|
moduleTpCd: selectedModules.itemTp ?? '',
|
||||||
roofMatlCd: selectedRoof?.roofMatlCd ?? '',
|
roofMatlCd: selectedRoof?.roofMatlCd ?? '',
|
||||||
raftBaseCd: selectedRaftBase?.clCode,
|
raft: selectedRaftBase?.clCode,
|
||||||
trestleMkrCd: selectedTrestle.trestleMkrCd,
|
trestleMkrCd: selectedTrestle.trestleMkrCd,
|
||||||
constMthdCd: selectedConstMthd.constMthdCd,
|
constMthdCd: selectedConstMthd.constMthdCd,
|
||||||
roofBaseCd: selectedRoofBase.roofBaseCd,
|
roofBaseCd: selectedRoofBase.roofBaseCd,
|
||||||
@ -266,6 +266,7 @@ const Trestle = forwardRef((props, ref) => {
|
|||||||
ridgeMargin,
|
ridgeMargin,
|
||||||
kerabaMargin,
|
kerabaMargin,
|
||||||
roofIndex: selectedRoof.index,
|
roofIndex: selectedRoof.index,
|
||||||
|
raft: selectedRaftBase?.clCode,
|
||||||
trestle: {
|
trestle: {
|
||||||
hajebichi: hajebichi,
|
hajebichi: hajebichi,
|
||||||
length: lengthBase,
|
length: lengthBase,
|
||||||
@ -302,6 +303,7 @@ const Trestle = forwardRef((props, ref) => {
|
|||||||
ridgeMargin,
|
ridgeMargin,
|
||||||
kerabaMargin,
|
kerabaMargin,
|
||||||
roofIndex: roof.index,
|
roofIndex: roof.index,
|
||||||
|
raft: selectedRaftBase?.clCode,
|
||||||
trestle: {
|
trestle: {
|
||||||
length: lengthBase,
|
length: lengthBase,
|
||||||
hajebichi: hajebichi,
|
hajebichi: hajebichi,
|
||||||
@ -374,7 +376,7 @@ const Trestle = forwardRef((props, ref) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (['C', 'R'].includes(roof.raftAuth)) {
|
if (['C', 'R'].includes(roof.raftAuth)) {
|
||||||
if (!roof?.raftBaseCd) {
|
if (!roof?.raft) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: getMessage('modal.module.basic.settting.module.error6', [roof.nameJp]), // 서까래 간격을 입력해주세요.
|
title: getMessage('modal.module.basic.settting.module.error6', [roof.nameJp]), // 서까래 간격을 입력해주세요.
|
||||||
icon: 'warning',
|
icon: 'warning',
|
||||||
@ -477,7 +479,7 @@ const Trestle = forwardRef((props, ref) => {
|
|||||||
addRoof: newRoofs[index],
|
addRoof: newRoofs[index],
|
||||||
trestle: {
|
trestle: {
|
||||||
...roof.trestle,
|
...roof.trestle,
|
||||||
raftBaseCd: roof.raftBaseCd,
|
raft: roof.raftBaseCd,
|
||||||
},
|
},
|
||||||
construction: {
|
construction: {
|
||||||
// ...constructionList.find((construction) => newAddedRoofs[index].construction.constTp === construction.constTp),
|
// ...constructionList.find((construction) => newAddedRoofs[index].construction.constTp === construction.constTp),
|
||||||
@ -502,8 +504,6 @@ const Trestle = forwardRef((props, ref) => {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
const onMarginCheck = (target, data) => {}
|
|
||||||
|
|
||||||
useImperativeHandle(ref, () => ({
|
useImperativeHandle(ref, () => ({
|
||||||
isComplete,
|
isComplete,
|
||||||
}))
|
}))
|
||||||
|
|||||||
@ -25,7 +25,7 @@ const trestleReducer = (state, action) => {
|
|||||||
moduleTpCd: action.roof.module?.itemTp ?? '',
|
moduleTpCd: action.roof.module?.itemTp ?? '',
|
||||||
roofMatlCd: action.roof?.roofMatlCd ?? '',
|
roofMatlCd: action.roof?.roofMatlCd ?? '',
|
||||||
hajebichi: action.roof?.hajebichi ?? 0,
|
hajebichi: action.roof?.hajebichi ?? 0,
|
||||||
raftBaseCd: action.roof?.raft ?? null,
|
raft: action.roof?.raft ?? null,
|
||||||
trestleMkrCd: action.roof.trestle?.trestleMkrCd ?? null,
|
trestleMkrCd: action.roof.trestle?.trestleMkrCd ?? null,
|
||||||
constMthdCd: action.roof.trestle?.constMthdCd ?? null,
|
constMthdCd: action.roof.trestle?.constMthdCd ?? null,
|
||||||
constTp: action.roof.construction?.constTp ?? null,
|
constTp: action.roof.construction?.constTp ?? null,
|
||||||
@ -72,7 +72,6 @@ export function useModuleTrestle(props) {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const raftCodeList = findCommonCode(RAFT_BASE_CODE)
|
const raftCodeList = findCommonCode(RAFT_BASE_CODE)
|
||||||
|
|
||||||
setRaftBaseList(raftCodeList)
|
setRaftBaseList(raftCodeList)
|
||||||
setTrestleList([])
|
setTrestleList([])
|
||||||
setConstMthdList([])
|
setConstMthdList([])
|
||||||
@ -150,7 +149,7 @@ export function useModuleTrestle(props) {
|
|||||||
getTrestleList({
|
getTrestleList({
|
||||||
moduleTpCd: trestleState?.moduleTpCd ?? '',
|
moduleTpCd: trestleState?.moduleTpCd ?? '',
|
||||||
roofMatlCd: trestleState?.roofMatlCd ?? '',
|
roofMatlCd: trestleState?.roofMatlCd ?? '',
|
||||||
raftBaseCd: trestleState?.raftBaseCd ?? '',
|
raftBaseCd: trestleState?.raft ?? '',
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res?.data) setTrestleList(res.data)
|
if (res?.data) setTrestleList(res.data)
|
||||||
@ -166,7 +165,7 @@ export function useModuleTrestle(props) {
|
|||||||
getTrestleList({
|
getTrestleList({
|
||||||
moduleTpCd: trestleState?.moduleTpCd ?? '',
|
moduleTpCd: trestleState?.moduleTpCd ?? '',
|
||||||
roofMatlCd: trestleState?.roofMatlCd ?? '',
|
roofMatlCd: trestleState?.roofMatlCd ?? '',
|
||||||
raftBaseCd: trestleState?.raftBaseCd ?? '',
|
raftBaseCd: trestleState?.raft ?? '',
|
||||||
trestleMkrCd: trestleState?.trestleMkrCd ?? '',
|
trestleMkrCd: trestleState?.trestleMkrCd ?? '',
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
@ -183,7 +182,7 @@ export function useModuleTrestle(props) {
|
|||||||
getTrestleList({
|
getTrestleList({
|
||||||
moduleTpCd: trestleState?.moduleTpCd ?? '',
|
moduleTpCd: trestleState?.moduleTpCd ?? '',
|
||||||
roofMatlCd: trestleState?.roofMatlCd ?? '',
|
roofMatlCd: trestleState?.roofMatlCd ?? '',
|
||||||
raftBaseCd: trestleState?.raftBaseCd ?? '',
|
raftBaseCd: trestleState?.raft ?? '',
|
||||||
trestleMkrCd: trestleState?.trestleMkrCd ?? '',
|
trestleMkrCd: trestleState?.trestleMkrCd ?? '',
|
||||||
constMthdCd: trestleState?.constMthdCd ?? '',
|
constMthdCd: trestleState?.constMthdCd ?? '',
|
||||||
})
|
})
|
||||||
@ -209,7 +208,7 @@ export function useModuleTrestle(props) {
|
|||||||
stdWindSpeed: trestleState.stdWindSpeed ?? '',
|
stdWindSpeed: trestleState.stdWindSpeed ?? '',
|
||||||
stdSnowLd: trestleState.stdSnowLd ?? '',
|
stdSnowLd: trestleState.stdSnowLd ?? '',
|
||||||
inclCd: trestleState.inclCd ?? '',
|
inclCd: trestleState.inclCd ?? '',
|
||||||
raftBaseCd: trestleState.raftBaseCd ?? '',
|
raftBaseCd: trestleState.raft ?? '',
|
||||||
roofPitch: Math.round(trestleState.roofPitch) ?? '',
|
roofPitch: Math.round(trestleState.roofPitch) ?? '',
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user