발전시뮬레이션 탭 이동 조건 수정

This commit is contained in:
LEEYONGJAE 2025-02-06 10:33:09 +09:00
parent c3f7b0667a
commit 4ef736015f
2 changed files with 2 additions and 2 deletions

View File

@ -200,7 +200,7 @@ export default function CanvasMenu(props) {
promiseGet({ url: `/api/estimate/${objectNo}/${selectedPlan.planNo}/detail` }).then((res) => {
if (res.status === 200) {
const estimateDetail = res.data
if (estimateDetail.tempFlg === '0') {
if (estimateDetail.estimateDate !== null) {
setMenuNumber(menu.index)
setCurrentMenu(menu.title)
router.push(`/floor-plan/simulator/${menu.index}?pid=${selectedPlan.planNo}&objectNo=${objectNo}`)

View File

@ -265,7 +265,7 @@ export function usePlan(params = {}) {
}
} else {
// 발전시뮬레이션
if (estimateDetail.tempFlg === '0') {
if (estimateDetail.estimateDate !== null) {
setCurrentCanvasPlan(plans.find((plan) => plan.id === newCurrentId))
setPlans((plans) => plans.map((plan) => ({ ...plan, isCurrent: plan.id === newCurrentId })))
} else {