오류 수정
This commit is contained in:
parent
22c115c92d
commit
10cd2fdda5
@ -56,6 +56,7 @@ export default function Module({ setTabNum }) {
|
||||
}, [installHeight, verticalSnowCover])
|
||||
|
||||
useEffect(() => {
|
||||
if (isObjectNotEmpty(tempModuleSelectionData)) {
|
||||
if (tempModuleSelectionData.roofConstructions.length > 0) {
|
||||
if (tempModuleSelectionData.common.moduleItemId && isObjectNotEmpty(tempModuleSelectionData.module)) {
|
||||
//저장된 temp데이터가 지붕재(addedRoofs) 개수와 같으면 모듈 선택 저장
|
||||
@ -65,6 +66,7 @@ export default function Module({ setTabNum }) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}, [tempModuleSelectionData])
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@ -360,7 +360,7 @@ export function useModuleBasicSetting(tabNum) {
|
||||
|
||||
useEffect(() => {
|
||||
if (canvasSetting.roofSizeSet !== '3') {
|
||||
if (moduleSelectionData.common.saleStoreNorthFlg === '1') {
|
||||
if (isObjectNotEmpty(moduleSelectionData) && moduleSelectionData.common.saleStoreNorthFlg === '1') {
|
||||
setSaleStoreNorthFlg(true)
|
||||
}
|
||||
}
|
||||
|
||||
@ -287,7 +287,7 @@ export function useModuleTabContents({ tabIndex, addRoof, setAddedRoofs, roofTab
|
||||
construction: selectedConstruction,
|
||||
}
|
||||
|
||||
const index = tempModuleSelectionData.roofConstructions.findIndex((obj) => obj.roofIndex === tabIndex)
|
||||
const index = moduleSelectionData.roofConstructions.findIndex((obj) => obj.roofIndex === tabIndex)
|
||||
|
||||
if (index > -1) {
|
||||
const newArray = [
|
||||
|
||||
@ -476,7 +476,7 @@ export function useCanvasSetting() {
|
||||
|
||||
//모듈 선택 데이터 초기화
|
||||
resetModuleSelectionData()
|
||||
moduleSelectedDataTrigger('')
|
||||
moduleSelectedDataTrigger({ common: {}, module: {}, roofConstructions: [] })
|
||||
|
||||
const isModuleExist = canvas.getObjects().some((obj) => obj.name === POLYGON_TYPE.MODULE)
|
||||
if (!isModuleExist) {
|
||||
|
||||
@ -193,12 +193,12 @@ export function useCircuitTrestle() {
|
||||
const tempHeader = [
|
||||
{ name: getMessage('simulator.table.sub1'), prop: 'name' },
|
||||
{ name: getMessage('modal.circuit.trestle.setting.circuit.allocation.passivity.circuit'), prop: 'circuit' },
|
||||
...moduleSelectionData.module?.itemList?.map((module) => {
|
||||
return {
|
||||
name: module.itemNm,
|
||||
prop: module.itemId,
|
||||
}
|
||||
}),
|
||||
// ...moduleSelectionData.module?.itemList?.map((module) => {
|
||||
// return {
|
||||
// name: module.itemNm,
|
||||
// prop: module.itemId,
|
||||
// }
|
||||
// }),
|
||||
{ name: `${getMessage('modal.panel.batch.statistic.power.generation.amount')}(kW)`, prop: 'wpOut' },
|
||||
]
|
||||
const surfaceObjects = {}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user