배치면초기설정 미저장 plan에서 저장한 plan 이동 시 배치면초기설정 화면 닫힘 처리
This commit is contained in:
parent
12f12385b5
commit
e99236fd30
@ -33,6 +33,7 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
|
|||||||
const { findCommonCode } = useCommonCode()
|
const { findCommonCode } = useCommonCode()
|
||||||
const [raftCodes, setRaftCodes] = useState([]) // 서까래 정보
|
const [raftCodes, setRaftCodes] = useState([]) // 서까래 정보
|
||||||
const [currentRoof, setCurrentRoof] = useState(null) // 현재 선택된 지붕재 정보
|
const [currentRoof, setCurrentRoof] = useState(null) // 현재 선택된 지붕재 정보
|
||||||
|
const { closePopup } = usePopup() // usePopup에서 closeAll 함수 가져오기
|
||||||
|
|
||||||
const roofRef = {
|
const roofRef = {
|
||||||
roofCd: useRef(null),
|
roofCd: useRef(null),
|
||||||
@ -213,6 +214,9 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
|
|||||||
roofInfo,
|
roofInfo,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/* 저장 후 화면 닫기 */
|
||||||
|
closePopup(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -139,7 +139,7 @@ export function useCanvasSetting() {
|
|||||||
|
|
||||||
const selectedRoofMaterial = useRecoilValue(selectedRoofMaterialSelector) // 선택된 지붕재 정보
|
const selectedRoofMaterial = useRecoilValue(selectedRoofMaterialSelector) // 선택된 지붕재 정보
|
||||||
const { floorPlanState } = useContext(FloorPlanContext) // 플랜 상태
|
const { floorPlanState } = useContext(FloorPlanContext) // 플랜 상태
|
||||||
const { closeAll } = usePopup() // 팝업 닫기
|
const { closePopup } = usePopup() // 팝업 닫기
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const tempFetchRoofMaterials = !fetchRoofMaterials
|
const tempFetchRoofMaterials = !fetchRoofMaterials
|
||||||
@ -338,6 +338,11 @@ export function useCanvasSetting() {
|
|||||||
roofAngle: item.roofAngle,
|
roofAngle: item.roofAngle,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/* 데이터 존재 시 화면 닫기(메뉴/저장 클릭 시 제외) */
|
||||||
|
if (openPoint !== 'canvasMenus' && openPoint !== 'basicSettingSave') {
|
||||||
|
closePopup(popupId)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
roofsRow = [
|
roofsRow = [
|
||||||
{
|
{
|
||||||
@ -475,11 +480,8 @@ export function useCanvasSetting() {
|
|||||||
roofSizeSet: String(params.roofSizeSet),
|
roofSizeSet: String(params.roofSizeSet),
|
||||||
})
|
})
|
||||||
|
|
||||||
/* 배치면초기설정 조회 */
|
|
||||||
fetchBasicSettings(params.planNo, null)
|
|
||||||
|
|
||||||
/* 메뉴 설정 */
|
/* 메뉴 설정 */
|
||||||
if (['2', '3'].includes(basicSetting?.roofSizeSet)) {
|
if (['2', '3'].includes(params.roofSizeSet)) {
|
||||||
setMenuNumber(3)
|
setMenuNumber(3)
|
||||||
setType('surface')
|
setType('surface')
|
||||||
setCurrentMenu(MENU.BATCH_CANVAS.BATCH_DRAWING)
|
setCurrentMenu(MENU.BATCH_CANVAS.BATCH_DRAWING)
|
||||||
@ -489,6 +491,9 @@ export function useCanvasSetting() {
|
|||||||
setCurrentMenu(MENU.ROOF_COVERING.EXTERIOR_WALL_LINE)
|
setCurrentMenu(MENU.ROOF_COVERING.EXTERIOR_WALL_LINE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 배치면초기설정 조회 */
|
||||||
|
fetchBasicSettings(params.planNo, 'basicSettingSave')
|
||||||
|
|
||||||
/* 모듈 선택 데이터 초기화 */
|
/* 모듈 선택 데이터 초기화 */
|
||||||
resetModuleSelectionData()
|
resetModuleSelectionData()
|
||||||
moduleSelectedDataTrigger({ common: {}, module: {}, roofConstructions: [] })
|
moduleSelectedDataTrigger({ common: {}, module: {}, roofConstructions: [] })
|
||||||
@ -536,9 +541,6 @@ export function useCanvasSetting() {
|
|||||||
roofSizeSet: String(params.roofSizeSet),
|
roofSizeSet: String(params.roofSizeSet),
|
||||||
})
|
})
|
||||||
|
|
||||||
/* 배치면초기설정 조회 */
|
|
||||||
fetchBasicSettings(Number(params.planNo), null)
|
|
||||||
|
|
||||||
/* 메뉴 설정 */
|
/* 메뉴 설정 */
|
||||||
if (['2', '3'].includes(params?.roofSizeSet)) {
|
if (['2', '3'].includes(params?.roofSizeSet)) {
|
||||||
setMenuNumber(3)
|
setMenuNumber(3)
|
||||||
@ -550,6 +552,9 @@ export function useCanvasSetting() {
|
|||||||
setCurrentMenu(MENU.ROOF_COVERING.EXTERIOR_WALL_LINE)
|
setCurrentMenu(MENU.ROOF_COVERING.EXTERIOR_WALL_LINE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 배치면초기설정 조회 */
|
||||||
|
fetchBasicSettings(Number(params.planNo), null)
|
||||||
|
|
||||||
/* 모듈 선택 데이터 초기화 */
|
/* 모듈 선택 데이터 초기화 */
|
||||||
resetModuleSelectionData()
|
resetModuleSelectionData()
|
||||||
moduleSelectedDataTrigger({ common: {}, module: {}, roofConstructions: [] })
|
moduleSelectedDataTrigger({ common: {}, module: {}, roofConstructions: [] })
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user