-
{
- handleChangeInput(e, currentAngleType === 'slope' ? 'pitch' : 'angle', index)
- }}
- defaultValue={currentAngleType === 'slope' ? roof.pitch : roof.angle}
- />
+
+
+
+
+ handleChangeRoofMaterial(e, index)}
+ />
+
+ {index === 0 &&
{getMessage('modal.roof.alloc.default.roof.material')}}
+ {index !== 0 &&
}
-
{pitchText}
-
- {(roof.widAuth || roof.lenAuth) && (
- {roof.widAuth && (
-
-
W
-
-
-
+
+
{getMessage('slope')}
+
+ {
+ handleChangeInput(e, currentAngleType === 'slope' ? 'pitch' : 'angle', index)
+ }}
+ defaultValue={currentAngleType === 'slope' ? roof.pitch : roof.angle}
+ />
- )}
- {roof.lenAuth && (
-
- )}
+
{pitchText}
+
- )}
- {(roof.raftAuth || roof.roofPchAuth) && (
-
- {roof.raftAuth && (
-
+ {(roof.widAuth || roof.lenAuth) && (
+
+ {roof.widAuth && (
-
{getMessage('modal.placement.initial.setting.rafter')}
- {raftCodes.length > 0 && (
-
-
-
- )}
-
-
- )}
- {roof.roofPchAuth && (
-
-
-
{getMessage('hajebichi')}
-
-
- )}
-
- )}
-
-
-
-
+ )}
+ {roof.lenAuth && (
+
+ )}
+
+ )}
+ {(roof.raftAuth || roof.roofPchAuth) && (
+
+ {roof.raftAuth && (
+
+
+
{getMessage('modal.placement.initial.setting.rafter')}
+ {raftCodes.length > 0 && (
+
+
+
+ )}
+
+
+ )}
+ {roof.roofPchAuth && (
+
+
+
{getMessage('hajebichi')}
+
+
+
+
+
+ )}
+
+ )}
+
+
+
+
+
-
- )
- })}
+ )
+ })}
{/* 시스템용량 */}
-
{getMessage('simulator.title.sub3')}
+
{getMessage('simulator.title.sub3')}
{objectDetail.capacity ? `${convertNumberToPriceDecimal(objectDetail.capacity)} kW` : ''}
{/* 연간예측발전량 */}
@@ -257,7 +244,7 @@ export default function Simulator() {
{/* 적설조건 */}
{getMessage('simulator.title.sub7')}
-
{objectDetail.snowfall} cm
+
{objectDetail.snowfall ? `${objectDetail.snowfall}cm` : ''}
{/* 풍속조건 */}
@@ -356,7 +343,10 @@ export default function Simulator() {
{/* 지붕면 */}
{moduleInfo.roofSurface} |
{/* 경사각 */}
- {convertNumberToPriceDecimal(moduleInfo.slopeAngle)}{moduleInfo.classType == 0 ? "寸":"º"} |
+
+ {convertNumberToPriceDecimal(moduleInfo.slopeAngle)}
+ {moduleInfo.classType == 0 ? '寸' : 'º'}
+ |
{/* 방위각(도) */}
{convertNumberToPriceDecimal(moduleInfo.azimuth)} |
{/* 태양전지모듈 */}
diff --git a/src/hooks/common/useRoofFn.js b/src/hooks/common/useRoofFn.js
index 40eb7b2f..84416370 100644
--- a/src/hooks/common/useRoofFn.js
+++ b/src/hooks/common/useRoofFn.js
@@ -22,8 +22,8 @@ export function useRoofFn() {
const ratio = window.devicePixelRatio || 1
const layout = roofMaterial.layout
- let width = (roofMaterial.width ?? 226) / 10
- let height = (roofMaterial.length ?? 158) / 10
+ let width = (roofMaterial.width || 226) / 10
+ let height = (roofMaterial.length || 158) / 10
const index = roofMaterial.index ?? 0
let roofStyle = 2
const inputPatternSize = { width: width, height: height } //임시 사이즈
diff --git a/src/hooks/roofcover/useRoofAllocationSetting.js b/src/hooks/roofcover/useRoofAllocationSetting.js
index 546ebe0b..1488fb26 100644
--- a/src/hooks/roofcover/useRoofAllocationSetting.js
+++ b/src/hooks/roofcover/useRoofAllocationSetting.js
@@ -42,7 +42,7 @@ export function useRoofAllocationSetting(id) {
const [currentRoofMaterial, setCurrentRoofMaterial] = useState(roofMaterials[0]) // 팝업 내 기준 지붕재
const [roofList, setRoofList] = useRecoilState(addedRoofsState) // 배치면 초기설정에서 선택한 지붕재 배열
const [editingLines, setEditingLines] = useState([])
- const [currentRoofList, setCurrentRoofList] = useState(null)
+ const [currentRoofList, setCurrentRoofList] = useState([])
const currentAngleType = useRecoilValue(currentAngleTypeSelector)
const globalLocaleState = useRecoilValue(globalLocaleStore)
const [basicInfo, setBasicInfo] = useState(null)
diff --git a/src/hooks/usePlan.js b/src/hooks/usePlan.js
index fb743828..a0733e57 100644
--- a/src/hooks/usePlan.js
+++ b/src/hooks/usePlan.js
@@ -215,7 +215,6 @@ export function usePlan(params = {}) {
const estimateDetail = res.data
if (pathname === '/floor-plan/estimate/5') {
if (estimateDetail.tempFlg === '0' && estimateDetail.estimateDate !== null) {
- console.log('이동')
res.data.resetFlag = 'N'
if (res.data.itemList.length > 0) {
@@ -238,9 +237,12 @@ export function usePlan(params = {}) {
swalFire({ text: getMessage('estimate.menu.move.valid1') })
}
} else {
- //발전시뮬레이션
- // 클릭한 플랜 탭으로 이동
- // updateCurrentPlan(newCurrentId)
+ // 발전시뮬레이션
+ if (estimateDetail.tempFlg === '0') {
+ updateCurrentPlan(newCurrentId)
+ } else {
+ swalFire({ text: getMessage('simulator.menu.move.valid1') })
+ }
}
}
})