Compare commits
No commits in common. "29ccf72c5ebaac79b09845e3f15e9001d74caf7a" and "06812b77af2e08fc2b15d0d14f51d39a89b299d6" have entirely different histories.
29ccf72c5e
...
06812b77af
@ -186,7 +186,15 @@ export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) {
|
||||
// return
|
||||
// }
|
||||
trestleRef.current.isComplete().then((res) => {
|
||||
if (!res) return
|
||||
if (!res) {
|
||||
Swal.fire({
|
||||
title: getMessage('construction.length.difference'),
|
||||
icon: 'warning',
|
||||
})
|
||||
return
|
||||
} else {
|
||||
// setTabNum(tabNum + 1)
|
||||
}
|
||||
})
|
||||
//물건정보 갱신일 수정
|
||||
} else {
|
||||
|
||||
@ -175,15 +175,15 @@ export const Orientation = forwardRef((props, ref) => {
|
||||
return
|
||||
}
|
||||
if (e === '0-') {
|
||||
setInputCompasDeg('-0')
|
||||
setCompasDeg('-0')
|
||||
return
|
||||
}
|
||||
if (Number(e) >= -180 && Number(e) <= 180) {
|
||||
if (numberCheck(Number(e))) {
|
||||
setInputCompasDeg(Number(e))
|
||||
setCompasDeg(Number(e))
|
||||
}
|
||||
} else {
|
||||
setInputCompasDeg(compasDeg)
|
||||
setCompasDeg(compasDeg)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -8,7 +8,6 @@ import { roofsState } from '@/store/roofAtom'
|
||||
import { moduleSelectionDataState, selectedModuleState } from '@/store/selectedModuleOptions'
|
||||
import { forwardRef, useContext, useEffect, useImperativeHandle, useRef, useState } from 'react'
|
||||
import { useRecoilState, useRecoilValue } from 'recoil'
|
||||
import Swal from 'sweetalert2'
|
||||
|
||||
const Trestle = forwardRef((props, ref) => {
|
||||
const { tabNum, setTabNum, trestleTrigger, roofs, setRoofs, moduleSelectionData, setModuleSelectionData, setRoofsStore } = props
|
||||
@ -304,122 +303,30 @@ const Trestle = forwardRef((props, ref) => {
|
||||
})
|
||||
|
||||
let result = true
|
||||
console.log(newAddedRoofs)
|
||||
for (let i = 0; i < newAddedRoofs.length; i++) {
|
||||
const roof = newAddedRoofs[i]
|
||||
|
||||
if (!roof.trestle?.trestleMkrCd) {
|
||||
Swal.fire({
|
||||
title: getMessage('modal.module.basic.settting.module.error1', [roof.nameJp]), // 가대메이커를 선택해주세요.
|
||||
icon: 'warning',
|
||||
})
|
||||
result = false
|
||||
return false
|
||||
}
|
||||
|
||||
if (!roof.trestle?.constMthdCd) {
|
||||
Swal.fire({
|
||||
title: getMessage('modal.module.basic.settting.module.error2', [roof.nameJp]), // 공법을 선택해주세요.
|
||||
icon: 'warning',
|
||||
})
|
||||
result = false
|
||||
return false
|
||||
}
|
||||
if (!roof.trestle?.roofBaseCd) {
|
||||
Swal.fire({
|
||||
title: getMessage('modal.module.basic.settting.module.error3', [roof.nameJp]), // 지붕밑바탕탕을 선택해주세요.
|
||||
icon: 'warning',
|
||||
})
|
||||
result = false
|
||||
return false
|
||||
}
|
||||
if (!roof.construction?.constTp) {
|
||||
Swal.fire({
|
||||
title: getMessage('modal.module.basic.settting.module.error4', [roof.nameJp]), // 시공법법을 선택해주세요.
|
||||
icon: 'warning',
|
||||
})
|
||||
result = false
|
||||
return false
|
||||
}
|
||||
newAddedRoofs.forEach((roof) => {
|
||||
if (!roof?.eavesMargin || !roof?.ridgeMargin || !roof?.kerabaMargin) result = false
|
||||
if (!roof.trestle?.trestleMkrCd) result = false
|
||||
if (!roof.trestle?.constMthdCd) result = false
|
||||
if (!roof.trestle?.roofBaseCd) result = false
|
||||
if (!roof.construction?.constTp) result = false
|
||||
|
||||
if (roof.lenAuth === 'C') {
|
||||
if (!roof.trestle?.length) {
|
||||
Swal.fire({
|
||||
title: getMessage('modal.module.basic.settting.module.error5', [roof.nameJp]), // L 값을 입력해주세요.
|
||||
icon: 'warning',
|
||||
})
|
||||
result = false
|
||||
return false
|
||||
}
|
||||
if (!roof.trestle?.length) result = false
|
||||
}
|
||||
if (['C', 'R'].includes(roof.raftAuth)) {
|
||||
if (!roof?.raftBaseCd) {
|
||||
Swal.fire({
|
||||
title: getMessage('modal.module.basic.settting.module.error6', [roof.nameJp]), // 서까래 간격을 입력해주세요.
|
||||
icon: 'warning',
|
||||
})
|
||||
result = false
|
||||
return false
|
||||
}
|
||||
if (!roof?.raftBaseCd) result = false
|
||||
}
|
||||
|
||||
if (['C', 'R'].includes(roof.roofPchAuth)) {
|
||||
if (!roof?.roofPchBase) {
|
||||
Swal.fire({
|
||||
title: getMessage('modal.module.basic.settting.module.error7', [roof.nameJp]), // 하제비치를 입력해주세요.
|
||||
icon: 'warning',
|
||||
})
|
||||
result = false
|
||||
return false
|
||||
}
|
||||
if (!roof?.roofPchBase) result = false
|
||||
}
|
||||
})
|
||||
|
||||
if (!roof?.eavesMargin || !roof?.ridgeMargin || !roof?.kerabaMargin) {
|
||||
Swal.fire({
|
||||
title: getMessage('modal.module.basic.settting.module.error8', [roof.nameJp]), // 모듈 배치 영영 값을 입력해주세요.
|
||||
icon: 'warning',
|
||||
})
|
||||
result = false
|
||||
return false
|
||||
}
|
||||
|
||||
if (roof.trestle.trestleMkrCd !== 'NO_DATA') {
|
||||
// 가매 없음이 아닐때는 가대 정보보다 작을 수 없음
|
||||
if (roof.trestleDetail?.eaveIntvl > roof.eavesMargin) {
|
||||
Swal.fire({
|
||||
title: getMessage('modal.module.basic.settting.module.error9', [roof.trestleDetail?.eaveIntvl, roof.nameJp]), // 모듈 배치 영역은 {0}mm 이상이어야 합니다.
|
||||
icon: 'warning',
|
||||
})
|
||||
result = false
|
||||
return false
|
||||
}
|
||||
|
||||
if (roof.trestleDetail?.ridgeIntvl > roof.ridgeMargin) {
|
||||
Swal.fire({
|
||||
title: getMessage('modal.module.basic.settting.module.error10', [roof.trestleDetail?.ridgeIntvl, roof.nameJp]), // 모듈 배치 영역은 {0}mm 이상이어야 합니다.
|
||||
icon: 'warning',
|
||||
})
|
||||
result = false
|
||||
return false
|
||||
}
|
||||
|
||||
if (roof.trestleDetail?.kerabaIntvl > roof.kerabaMargin) {
|
||||
Swal.fire({
|
||||
title: getMessage('modal.module.basic.settting.module.error11', [roof.trestleDetail?.kerabaIntvl, roof.nameJp]), // 모듈 배치 영역은 {0}mm 이상이어야 합니다.
|
||||
icon: 'warning',
|
||||
})
|
||||
result = false
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const newRoofs = newAddedRoofs.map((roof) => {
|
||||
const { addRoof, construction, trestle, trestleDetail, roofConstructions, ...rest } = roof
|
||||
return rest
|
||||
})
|
||||
if (result) {
|
||||
const newRoofs = newAddedRoofs.map((roof) => {
|
||||
const { addRoof, construction, trestle, trestleDetail, roofConstructions, ...rest } = roof
|
||||
return rest
|
||||
})
|
||||
|
||||
setModuleSelectionData({
|
||||
...moduleSelectionData,
|
||||
roofConstructions: newAddedRoofs.map((roof, index) => ({
|
||||
@ -481,8 +388,6 @@ const Trestle = forwardRef((props, ref) => {
|
||||
return false
|
||||
}
|
||||
|
||||
const onMarginCheck = (target, data) => {}
|
||||
|
||||
useImperativeHandle(ref, () => ({
|
||||
isComplete,
|
||||
}))
|
||||
@ -675,7 +580,7 @@ const Trestle = forwardRef((props, ref) => {
|
||||
className="input-origin block"
|
||||
value={eavesMargin ?? 0}
|
||||
// onChange={(e) => dispatch({ type: 'SET_TRESTLE_DETAIL', roof: { ...trestleState, eavesMargin: e.target.value } })}
|
||||
onChange={(e) => setEavesMargin(+e.target.value)}
|
||||
onChange={(e) => setEavesMargin(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<span className="thin">mm</span>
|
||||
@ -688,7 +593,7 @@ const Trestle = forwardRef((props, ref) => {
|
||||
className="input-origin block"
|
||||
value={ridgeMargin ?? 0}
|
||||
// onChange={(e) => dispatch({ type: 'SET_TRESTLE_DETAIL', roof: { ...trestleState, ridgeMargin: e.target.value } })}
|
||||
onChange={(e) => setRidgeMargin(+e.target.value)}
|
||||
onChange={(e) => setRidgeMargin(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<span className="thin">mm</span>
|
||||
@ -701,7 +606,7 @@ const Trestle = forwardRef((props, ref) => {
|
||||
className="input-origin block"
|
||||
value={kerabaMargin ?? 0}
|
||||
// onChange={(e) => dispatch({ type: 'SET_TRESTLE_DETAIL', roof: { ...trestleState, kerabaMargin: e.target.value } })}
|
||||
onChange={(e) => setKerabaMargin(+e.target.value)}
|
||||
onChange={(e) => setKerabaMargin(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<span className="thin">mm</span>
|
||||
|
||||
@ -114,17 +114,6 @@
|
||||
"modal.module.basic.setting.module.eaves.bar.fitting": "軒カバーの設置",
|
||||
"modal.module.basic.setting.module.blind.metal.fitting": "落雪防止金具設置",
|
||||
"modal.module.basic.setting.module.select": "モジュール/架台選択",
|
||||
"modal.module.basic.settting.module.error1": "가대메이커를 선택해주세요.(지붕재: {0})(JA)",
|
||||
"modal.module.basic.settting.module.error2": "공법를 선택해주세요.(지붕재: {0})(JA)",
|
||||
"modal.module.basic.settting.module.error3": "지붕밑바탕을 선택해주세요.(지붕재: {0})(JA)",
|
||||
"modal.module.basic.settting.module.error4": "시공법을 선택해주세요.(지붕재: {0})(JA)",
|
||||
"modal.module.basic.settting.module.error5": "L 을 입력해주세요.(지붕재: {0})(JA)",
|
||||
"modal.module.basic.settting.module.error6": "서까래 간격을 입력해주세요.(지붕재: {0})(JA)",
|
||||
"modal.module.basic.settting.module.error7": "하제비치를 입력해주세요.(지붕재: {0})(JA)",
|
||||
"modal.module.basic.settting.module.error8": "모듈 배치 영영 값을 입력해주세요.(지붕재: {0})(JA)",
|
||||
"modal.module.basic.settting.module.error9": "처마쪽 값은 {0}mm 이상이어야 합니다.(지붕재: {1})(JA)",
|
||||
"modal.module.basic.settting.module.error10": "용마루쪽 값은 {0}mm 이상이어야 합니다.(지붕재: {1})(JA)",
|
||||
"modal.module.basic.settting.module.error11": "케라바쪽 값은 {0}mm 이상이어야 합니다.(지붕재: {1})(JA)",
|
||||
"modal.module.basic.setting.module.placement": "モジュールの配置",
|
||||
"modal.module.basic.setting.module.placement.select.fitting.type": "設置形態を選択してください。",
|
||||
"modal.module.basic.setting.module.placement.waterfowl.arrangement": "千鳥配置",
|
||||
|
||||
@ -114,17 +114,6 @@
|
||||
"modal.module.basic.setting.module.eaves.bar.fitting": "처마커버설치",
|
||||
"modal.module.basic.setting.module.blind.metal.fitting": "적설방지금구설치",
|
||||
"modal.module.basic.setting.module.select": "모듈/가대 선택",
|
||||
"modal.module.basic.settting.module.error1": "가대메이커를 선택해주세요.(지붕재: {0})",
|
||||
"modal.module.basic.settting.module.error2": "공법를 선택해주세요.(지붕재: {0})",
|
||||
"modal.module.basic.settting.module.error3": "지붕밑바탕을 선택해주세요.(지붕재: {0})",
|
||||
"modal.module.basic.settting.module.error4": "시공법을 선택해주세요.(지붕재: {0})",
|
||||
"modal.module.basic.settting.module.error5": "L 을 입력해주세요.(지붕재: {0})",
|
||||
"modal.module.basic.settting.module.error6": "서까래 간격을 입력해주세요.(지붕재: {0})",
|
||||
"modal.module.basic.settting.module.error7": "하제비치를 입력해주세요.(지붕재: {0})",
|
||||
"modal.module.basic.settting.module.error8": "모듈 배치 영영 값을 입력해주세요.(지붕재: {0})",
|
||||
"modal.module.basic.settting.module.error9": "처마쪽 값은 {0}mm 이상이어야 합니다.(지붕재: {1})",
|
||||
"modal.module.basic.settting.module.error10": "용마루쪽 값은 {0}mm 이상이어야 합니다.(지붕재: {1})",
|
||||
"modal.module.basic.settting.module.error11": "케라바쪽 값은 {0}mm 이상이어야 합니다.(지붕재: {1})",
|
||||
"modal.module.basic.setting.module.placement": "모듈 배치",
|
||||
"modal.module.basic.setting.module.placement.select.fitting.type": "설치형태를 선택합니다.",
|
||||
"modal.module.basic.setting.module.placement.waterfowl.arrangement": "물떼새 배치",
|
||||
@ -139,7 +128,6 @@
|
||||
"modal.module.basic.setting.module.placement.arrangement.standard.eaves": "처마쪽",
|
||||
"modal.module.basic.setting.module.placement.arrangement.standard.ridge": "용마루쪽",
|
||||
"modal.module.basic.setting.module.placement.maximum": "최대배치",
|
||||
"modal.module.basic.setting.module.placement.margin.check1": "가대메이커를 선택해주세요.",
|
||||
"modal.module.basic.setting.pitch.module.placement.standard.setting": "배치기준 설정",
|
||||
"modal.module.basic.setting.pitch.module.placement.standard.setting.south": "남향설치",
|
||||
"modal.module.basic.setting.pitch.module.placement.standard.setting.select": "지정한 변을 기준으로 설치",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user