발전시뮬레이션 메뉴 이동 시, 견적서 번호 체크 추가
This commit is contained in:
parent
3cdfe24b6c
commit
1f5351fc59
@ -245,7 +245,7 @@ export default function CanvasMenu(props) {
|
|||||||
promiseGet({ url: `/api/estimate/${objectNo}/${selectedPlan.planNo}/detail` }).then((res) => {
|
promiseGet({ url: `/api/estimate/${objectNo}/${selectedPlan.planNo}/detail` }).then((res) => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
const estimateDetail = res.data
|
const estimateDetail = res.data
|
||||||
if (estimateDetail.estimateDate !== null) {
|
if (estimateDetail.estimateDate !== null && estimateDetail.docNo) {
|
||||||
setMenuNumber(menu.index)
|
setMenuNumber(menu.index)
|
||||||
setCurrentMenu(menu.title)
|
setCurrentMenu(menu.title)
|
||||||
router.push(`/floor-plan/simulator/${menu.index}?pid=${selectedPlan.planNo}&objectNo=${objectNo}`)
|
router.push(`/floor-plan/simulator/${menu.index}?pid=${selectedPlan.planNo}&objectNo=${objectNo}`)
|
||||||
|
|||||||
@ -312,7 +312,7 @@ export function usePlan(params = {}) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 발전시뮬레이션
|
// 발전시뮬레이션
|
||||||
if (estimateDetail.estimateDate !== null) {
|
if (estimateDetail.estimateDate !== null && estimateDetail.docNo) {
|
||||||
setCurrentCanvasPlan(plans.find((plan) => plan.id === newCurrentId))
|
setCurrentCanvasPlan(plans.find((plan) => plan.id === newCurrentId))
|
||||||
setPlans((plans) => plans.map((plan) => ({ ...plan, isCurrent: plan.id === newCurrentId })))
|
setPlans((plans) => plans.map((plan) => ({ ...plan, isCurrent: plan.id === newCurrentId })))
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user