발전시뮬레이션 메뉴 이동 시, 견적서 번호 체크 추가

This commit is contained in:
LEEYONGJAE 2025-02-18 10:15:10 +09:00
parent 3cdfe24b6c
commit 1f5351fc59
2 changed files with 2 additions and 2 deletions

View File

@ -245,7 +245,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.estimateDate !== null) {
if (estimateDetail.estimateDate !== null && estimateDetail.docNo) {
setMenuNumber(menu.index)
setCurrentMenu(menu.title)
router.push(`/floor-plan/simulator/${menu.index}?pid=${selectedPlan.planNo}&objectNo=${objectNo}`)

View File

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