CanvasMenu case문 모듈,회로구성/견적서/발전시뮬레이션 탭

4,5,6 -> 'module', 'estimate', 'simulation' 변경
This commit is contained in:
basssy 2025-02-25 10:07:38 +09:00
parent 960046813b
commit 4da4bd5959
2 changed files with 4 additions and 5 deletions

View File

@ -222,7 +222,7 @@ export default function CanvasMenu(props) {
} }
await reloadCanvasStatus(objectNo, pid) await reloadCanvasStatus(objectNo, pid)
break break
case 4: case 'module':
if (selectedMenu < menu.index) { if (selectedMenu < menu.index) {
if (!checkMenuAndCanvasState()) { if (!checkMenuAndCanvasState()) {
swalFire({ text: getMessage('menu.validation.canvas.roof') }) swalFire({ text: getMessage('menu.validation.canvas.roof') })
@ -236,7 +236,7 @@ export default function CanvasMenu(props) {
} }
await reloadCanvasStatus(objectNo, pid) await reloadCanvasStatus(objectNo, pid)
break break
case 5: case 'estimate':
setIsGlobalLoading(true) setIsGlobalLoading(true)
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) {
@ -257,7 +257,7 @@ export default function CanvasMenu(props) {
} }
}) })
break break
case 6: case 'simulation':
setIsGlobalLoading(true) setIsGlobalLoading(true)
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) {
@ -283,7 +283,6 @@ export default function CanvasMenu(props) {
setCurrentMenu(menu.title) setCurrentMenu(menu.title)
} }
if (pathname !== '/floor-plan') { if (pathname !== '/floor-plan') {
// if (menu.index !== 0 ) {
// or .. // or ..
if (menu.type !== 'drawing' && menu.type !== 'estimate' && menu.type !== 'simulation') { if (menu.type !== 'drawing' && menu.type !== 'estimate' && menu.type !== 'simulation') {
router.push(`/floor-plan?pid=${pid}&objectNo=${objectNo}`) router.push(`/floor-plan?pid=${pid}&objectNo=${objectNo}`)

View File

@ -14,7 +14,7 @@ export const selectedMenuState = atom({
export const menusState = atom({ export const menusState = atom({
key: 'menusState', key: 'menusState',
default: [ default: [
{ type: 'drawing', name: 'plan.menu.plan.drawing', icon: 'con00', title: MENU.PLAN_DRAWING }, //. 도면 작성 { type: 'drawing', name: 'plan.menu.plan.drawing', icon: 'con00', title: MENU.PLAN_DRAWING }, //. 물건정보
{ {
type: 'placement', // 배치면 초기설정 type: 'placement', // 배치면 초기설정
name: 'plan.menu.placement.surface.initial.setting', name: 'plan.menu.placement.surface.initial.setting',