diff --git a/src/components/header/Header.jsx b/src/components/header/Header.jsx index 13105ad8..dce8e874 100644 --- a/src/components/header/Header.jsx +++ b/src/components/header/Header.jsx @@ -27,6 +27,7 @@ import { roofMaterialsAtom } from '@/store/settingAtom' import { useMasterController } from '@/hooks/common/useMasterController' import { ROOF_MATERIAL_LAYOUT } from '@/components/floor-plan/modal/placementShape/PlacementShapeSetting' import { useSwal } from '@/hooks/useSwal' +import { logger } from '@/util/logger' export const ToggleonMouse = (e, act, target) => { const listWrap = e.target.closest(target) @@ -164,11 +165,12 @@ export default function Header(props) { getAutoLoginParam() }, [userSession]) - const openEconomicSimulation = async () => { + const openEconomicSimulation = async () => { const encRes = await promiseGet({ url: '/api/pwrGnrSimulation/encData', - params: { saleStoreId: sessionState.saleStoreId, userId: sessionState.userId }, + option: { params: { saleStoreId: sessionState.storeId, userId: sessionState.userId } }, }) + const { encSaleStoreId, encUserId } = encRes.data if (!encSaleStoreId || !encUserId) return @@ -176,7 +178,7 @@ export default function Header(props) { const authRes = await fetch(process.env.NEXT_PUBLIC_ECONOMIC_SIMULATION_AUTH_URL, { method: 'POST', headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ encSaleStoreId, encUserId }), + body: JSON.stringify({ encStoreId: encSaleStoreId, encRegId: encUserId }), }) if (authRes.ok) {