floor-plan 인입 시 FloorPlanProvider Warning 확인
This commit is contained in:
parent
00aaea8b9c
commit
a81a330b3d
@ -48,14 +48,14 @@ const FloorPlanProvider = ({ children }) => {
|
|||||||
const objectNo = searchParams.get('objectNo')
|
const objectNo = searchParams.get('objectNo')
|
||||||
const pid = searchParams.get('pid')
|
const pid = searchParams.get('pid')
|
||||||
|
|
||||||
useEffect(() => { // 오류 발생으로 useEffect 사용
|
//useEffect(() => { // 오류 발생으로 useEffect 사용
|
||||||
if (pathname === '/floor-plan') {
|
if (pathname === '/floor-plan') {
|
||||||
if (pid === undefined || pid === '' || pid === null || objectNo === undefined || objectNo === '' || objectNo === null) {
|
if (pid === undefined || pid === '' || pid === null || objectNo === undefined || objectNo === '' || objectNo === null) {
|
||||||
notFound()
|
notFound()
|
||||||
}
|
}
|
||||||
setCurrentObjectNo(objectNo)
|
setCurrentObjectNo(objectNo)
|
||||||
}
|
}
|
||||||
}, [pid, objectNo])
|
//}, [pid, objectNo])
|
||||||
|
|
||||||
const [floorPlanState, setFloorPlanState] = useState({
|
const [floorPlanState, setFloorPlanState] = useState({
|
||||||
// 플랜 파일 업로드 모달 오픈 제어
|
// 플랜 파일 업로드 모달 오픈 제어
|
||||||
|
|||||||
@ -260,7 +260,7 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, set
|
|||||||
title={
|
title={
|
||||||
currentRoof?.roofSizeSet === '3' ? getMessage('modal.placement.initial.setting.size.none.pitch') : currentRoof?.roofMatlNm
|
currentRoof?.roofSizeSet === '3' ? getMessage('modal.placement.initial.setting.size.none.pitch') : currentRoof?.roofMatlNm
|
||||||
}
|
}
|
||||||
ref={roofRef.roofCd}
|
//ref={roofRef.roofCd}
|
||||||
options={roofMaterials.map((roof) => {
|
options={roofMaterials.map((roof) => {
|
||||||
return { ...roof, name: globalLocale === 'ko' ? roof.roofMatlNm : roof.roofMatlNmJp }
|
return { ...roof, name: globalLocale === 'ko' ? roof.roofMatlNm : roof.roofMatlNmJp }
|
||||||
})}
|
})}
|
||||||
@ -346,7 +346,7 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, set
|
|||||||
<div className="select-wrap" style={{ width: '160px' }}>
|
<div className="select-wrap" style={{ width: '160px' }}>
|
||||||
<QSelectBox
|
<QSelectBox
|
||||||
options={raftCodes}
|
options={raftCodes}
|
||||||
ref={roofRef.rafter}
|
//ref={roofRef.rafter}
|
||||||
title={
|
title={
|
||||||
raftCodes?.find((r) => r.clCode === (currentRoof?.raft === undefined ? currentRoof?.raftBaseCd : currentRoof?.raft))
|
raftCodes?.find((r) => r.clCode === (currentRoof?.raft === undefined ? currentRoof?.raftBaseCd : currentRoof?.raft))
|
||||||
.clCodeNm
|
.clCodeNm
|
||||||
|
|||||||
@ -290,7 +290,7 @@ export function useCanvasSetting() {
|
|||||||
let roofsRow = {}
|
let roofsRow = {}
|
||||||
let roofsArray = {}
|
let roofsArray = {}
|
||||||
|
|
||||||
if (res.length > 0) {
|
if (res) {
|
||||||
roofsRow = res.map((item) => {
|
roofsRow = res.map((item) => {
|
||||||
return {
|
return {
|
||||||
roofSizeSet: String(item.roofSizeSet),
|
roofSizeSet: String(item.roofSizeSet),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user