From 666e75244dd5e415dca1d5ac0ce3f3d9b01b66a1 Mon Sep 17 00:00:00 2001 From: "DESKTOP-6E8S9S5\\LEE" Date: Mon, 15 Jun 2026 15:59:50 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=EB=B0=9C=EC=A0=84=EC=8B=9C=EB=AE=AC?= =?UTF-8?q?=EB=A0=88=EC=9D=B4=EC=85=98=20=ED=8C=9D=EC=97=85=EC=B0=BD=20?= =?UTF-8?q?=EC=98=A4=ED=94=88=20=EC=86=8C=EC=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 ++ .env.local.dev | 2 ++ .env.localhost | 2 ++ .env.production | 2 ++ src/components/header/Header.jsx | 30 ++++++++++++++++++++++++++++++ src/locales/ja.json | 1 + src/locales/ko.json | 1 + 7 files changed, 40 insertions(+) diff --git a/.env.development b/.env.development index 6b3844f8..0d44ce67 100644 --- a/.env.development +++ b/.env.development @@ -15,6 +15,8 @@ NEXT_PUBLIC_CONVERTER_DXF_API_URL="https://v2.convertapi.com/convert/dxf/to/png? NEXT_PUBLIC_Q_ORDER_AUTO_LOGIN_URL="https://q-order-dev.q-cells.jp/eos/login/autoLogin" NEXT_PUBLIC_Q_MUSUBI_AUTO_LOGIN_URL="https://q-musubi-dev.q-cells.jp/qm/login/autoLogin" +NEXT_PUBLIC_ECONOMIC_SIMULATION_AUTH_URL="https://q-order-dev.q-cells.jp/eos/simulation/auth" +NEXT_PUBLIC_ECONOMIC_SIMULATION_URL="https://q-order-dev.q-cells.jp/eos/simulation/list" # 테스트용 # AWS_REGION="ap-northeast-2" diff --git a/.env.local.dev b/.env.local.dev index a53524ca..8b31ac6e 100644 --- a/.env.local.dev +++ b/.env.local.dev @@ -14,6 +14,8 @@ NEXT_PUBLIC_CONVERTER_API_URL="https://v2.convertapi.com/convert/dwg/to/png?Secr NEXT_PUBLIC_Q_ORDER_AUTO_LOGIN_URL="http://q-order-stg.q-cells.jp:8120/eos/login/autoLogin" NEXT_PUBLIC_Q_MUSUBI_AUTO_LOGIN_URL="http://q-musubi-stg.q-cells.jp:8120/qm/login/autoLogin" +NEXT_PUBLIC_ECONOMIC_SIMULATION_AUTH_URL="http://q-order-stg.q-cells.jp:8120/eos/simulation/auth" +NEXT_PUBLIC_ECONOMIC_SIMULATION_URL="http://q-order-stg.q-cells.jp:8120/eos/simulation/list" # 테스트용 # AWS_REGION="ap-northeast-2" diff --git a/.env.localhost b/.env.localhost index 7cab2757..cd3a3245 100644 --- a/.env.localhost +++ b/.env.localhost @@ -15,6 +15,8 @@ NEXT_PUBLIC_CONVERTER_DXF_API_URL="https://v2.convertapi.com/convert/dxf/to/png? NEXT_PUBLIC_Q_ORDER_AUTO_LOGIN_URL="http://q-order-stg.q-cells.jp:8120/eos/login/autoLogin" NEXT_PUBLIC_Q_MUSUBI_AUTO_LOGIN_URL="http://q-musubi-stg.q-cells.jp:8120/qm/login/autoLogin" +NEXT_PUBLIC_ECONOMIC_SIMULATION_AUTH_URL="http://q-order-stg.q-cells.jp:8120/eos/simulation/auth" +NEXT_PUBLIC_ECONOMIC_SIMULATION_URL="http://q-order-stg.q-cells.jp:8120/eos/simulation/list" # 테스트용 # AWS_REGION="ap-northeast-2" diff --git a/.env.production b/.env.production index 50904369..e421b123 100644 --- a/.env.production +++ b/.env.production @@ -15,6 +15,8 @@ NEXT_PUBLIC_CONVERTER_DXF_API_URL="https://v2.convertapi.com/convert/dxf/to/png? NEXT_PUBLIC_Q_ORDER_AUTO_LOGIN_URL="https://q-order.q-cells.jp/eos/login/autoLogin" NEXT_PUBLIC_Q_MUSUBI_AUTO_LOGIN_URL="https://q-musubi.q-cells.jp/qm/login/autoLogin" +NEXT_PUBLIC_ECONOMIC_SIMULATION_AUTH_URL="https://q-order.q-cells.jp/eos/simulation/auth" +NEXT_PUBLIC_ECONOMIC_SIMULATION_URL="https://q-order.q-cells.jp/eos/simulation/list" # AWS_REGION="ap-northeast-2" # AMPLIFY_BUCKET="interplug" diff --git a/src/components/header/Header.jsx b/src/components/header/Header.jsx index 8c2ccbff..689bac59 100644 --- a/src/components/header/Header.jsx +++ b/src/components/header/Header.jsx @@ -164,6 +164,29 @@ export default function Header(props) { getAutoLoginParam() }, [userSession]) + const openEconomicSimulation = async () => { + const encRes = await promiseGet({ + url: '/api/pwrGnrSimulation/encData', + params: { saleStoreId: sessionState.saleStoreId, userId: sessionState.userId }, + }) + const { encSaleStoreId, encUserId } = encRes.data + + if (!encSaleStoreId || !encUserId) return + + const authRes = await fetch(process.env.NEXT_PUBLIC_ECONOMIC_SIMULATION_AUTH_URL, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ encSaleStoreId, encUserId }), + }) + + if (authRes.ok) { + window.open(process.env.NEXT_PUBLIC_ECONOMIC_SIMULATION_URL, 'economicSimulation', `height=${screen.height},width=${screen.width},fullscreen=yes`) + } else { + const body = await authRes.json() + swalFire({ text: body.resultMessage, type: 'error' }) + } + } + const menus = [ { id: 0, name: 'header.menus.home', url: '/', children: [] }, { @@ -187,6 +210,7 @@ export default function Header(props) { ], }, { id: 8, name: 'qna.title', url: '/community/qna', children: [] }, + { id: 9, name: 'header.menus.economic.simulation', action: openEconomicSimulation, children: [] }, ] const syncSession = useCallback(() => { @@ -237,6 +261,11 @@ export default function Header(props) { onMouseLeave={(e) => ToggleonMouse(e, 'remove', 'nav > ul')} > {menu.children.length === 0 ? ( + menu.action ? ( + + ) : ( {getMessage(menu.name)} + ) ) : ( diff --git a/src/locales/ja.json b/src/locales/ja.json index 0eb938ad..3932290e 100644 --- a/src/locales/ja.json +++ b/src/locales/ja.json @@ -10,6 +10,7 @@ "header.menus.community.notice": "お知らせ", "header.menus.community.faq": "FAQ", "header.menus.community.archive": "各種資料ダウンロード", + "header.menus.economic.simulation": "経済シミュレーション管理", "header.logout": "ログアウト", "header.go": "移動", "header.online.warranty.system": "オンライン保証システム", diff --git a/src/locales/ko.json b/src/locales/ko.json index 7d0a94f0..68d0d476 100644 --- a/src/locales/ko.json +++ b/src/locales/ko.json @@ -10,6 +10,7 @@ "header.menus.community.notice": "공지사항", "header.menus.community.faq": "FAQ", "header.menus.community.archive": "각종 자료 다운로드", + "header.menus.economic.simulation": "경제시뮬레이션 관리", "header.logout": "로그아웃", "header.go": "이동", "header.online.warranty.system": "온라인보증시스템", -- 2.47.2 From 7423f7a05a3657c25f195dd915318befd6c6e815 Mon Sep 17 00:00:00 2001 From: "DESKTOP-6E8S9S5\\LEE" Date: Mon, 15 Jun 2026 16:01:26 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=EB=B0=9C=EC=A0=84=EC=8B=9C=EB=AE=AC?= =?UTF-8?q?=EB=A0=88=EC=9D=B4=EC=85=98=20=ED=8C=9D=EC=97=85=EC=B0=BD=20?= =?UTF-8?q?=EC=98=A4=ED=94=88=20=EC=86=8C=EC=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/header/Header.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/header/Header.jsx b/src/components/header/Header.jsx index 689bac59..13105ad8 100644 --- a/src/components/header/Header.jsx +++ b/src/components/header/Header.jsx @@ -210,7 +210,9 @@ export default function Header(props) { ], }, { id: 8, name: 'qna.title', url: '/community/qna', children: [] }, - { id: 9, name: 'header.menus.economic.simulation', action: openEconomicSimulation, children: [] }, + ...(process.env.NEXT_PUBLIC_RUN_MODE !== 'production' + ? [{ id: 9, name: 'header.menus.economic.simulation', action: openEconomicSimulation, children: [] }] + : []), ] const syncSession = useCallback(() => { -- 2.47.2