From 4ac1f0b647b28da9f270136cddc0816fd9d48930 Mon Sep 17 00:00:00 2001 From: sanguu516 Date: Tue, 9 Jul 2024 17:29:04 +0900 Subject: [PATCH] =?UTF-8?q?router=20=EC=9E=84=EC=8B=9C=20=ED=97=88?= =?UTF-8?q?=EC=9A=A9=20=EB=B0=8F=20rightmenu=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/containers/flight/ControlApprovalsContainer.js | 2 +- src/router/hoc/authenticationCheck.tsx | 12 ++++++++++-- src/router/routes/index.js | 9 ++++++++- src/views/controlMenuView.js | 1 - 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/containers/flight/ControlApprovalsContainer.js b/src/containers/flight/ControlApprovalsContainer.js index a37fdd37..7e5bbddb 100644 --- a/src/containers/flight/ControlApprovalsContainer.js +++ b/src/containers/flight/ControlApprovalsContainer.js @@ -212,7 +212,7 @@ export default function ControlApprovalsContainer({ mode }) { window.screenY + window.outerHeight / 2 - popupHeight / 2 ); const option = `width=${popupWidth},height=${popupHeight},left=${popupX},top=${popupY}`; - popupRef.current = window.open('/rightMenu', 'NewWindow', option); + popupRef.current = window.open('/control/rightMenu', 'NewWindow', option); // setPopupOption(option); setPopup(popupRef.current); }; diff --git a/src/router/hoc/authenticationCheck.tsx b/src/router/hoc/authenticationCheck.tsx index 03a1c544..3753707d 100644 --- a/src/router/hoc/authenticationCheck.tsx +++ b/src/router/hoc/authenticationCheck.tsx @@ -35,8 +35,16 @@ export default function (SpecificComponent: ReactNode, option: IOption) { if (user?.cptAuthCode === 'DF0002') { const pathname = history.location.pathname; - if (!(pathname == '/operation/approvals' || pathname == '/rightMenu')) { - props.history.replace('/operation/approvals'); + if ( + !( + pathname == '/operation/approvals' || + pathname == '/rightMenu' || + pathname == 'control/approvals' || + pathname == 'control/rightMenu' + ) + ) { + // id 나누면 주석 풀 것!!! + // props.history.replace('/operation/approvals'); return; } } diff --git a/src/router/routes/index.js b/src/router/routes/index.js index 66e434cd..361a9fe3 100644 --- a/src/router/routes/index.js +++ b/src/router/routes/index.js @@ -254,7 +254,14 @@ const GimpoControlRoutes = [ authRoute: true } }, - + { + path: 'control/rightMenu', + component: lazy(() => import('../../views/controlMenuView')), + layout: 'BlankLayout', + meta: { + authRoute: true + } + }, { path: '/rightMenu', component: lazy(() => import('../../views/rightMenuView')), diff --git a/src/views/controlMenuView.js b/src/views/controlMenuView.js index 2f658507..235e4771 100644 --- a/src/views/controlMenuView.js +++ b/src/views/controlMenuView.js @@ -2,7 +2,6 @@ import '@styles/react/libs/flatpickr/flatpickr.scss'; import '@styles/react/libs/tables/react-dataTable-component.scss'; import '../assets/css/custom.css'; import ControlRightMenuContainer from '../containers/controlRightMenuContainer'; -import FlightApprovalsContainer from '../containers/flight/flightApprovalsContainer'; export default function rightMenuView() { return (