From e14fa043cb0f697c402672912bd3eb023956d480 Mon Sep 17 00:00:00 2001 From: "hyunwoo93.cha" Date: Tue, 21 May 2024 16:10:54 +0900 Subject: [PATCH] =?UTF-8?q?[=EC=A0=84=EC=B2=B4]=20userInfo=20->=20userNumb?= =?UTF-8?q?er=20=EB=B3=80=EA=B2=BD=20/=20reducer=20appStatus.loginUserData?= =?UTF-8?q?=20=EA=B5=AC=EC=A1=B0=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- com.twin.app.shoptime/src/App/App.js | 59 +++++++----- .../src/actions/actionTypes.js | 3 + .../src/actions/empActions.js | 30 ++++++ com.twin.app.shoptime/src/api/apiConfig.js | 3 + .../src/components/TabLayout/TabLayout.jsx | 69 ++++++++------ com.twin.app.shoptime/src/lunaSend/account.js | 77 ++++++++-------- .../src/reducers/commonReducer.js | 12 ++- .../src/reducers/empReducer.js | 18 ++++ .../src/views/CheckOutPanel/CheckOutPanel.jsx | 14 +-- .../CheckOutPanel/container/FixedSideBar.jsx | 4 - .../container/OrderItemsSideBar.jsx | 2 - .../container/SummaryCotainer.jsx | 50 ++++------ .../SingleProduct/SingleOption.jsx | 74 +++++++++------ .../EventPopUpBanner/EventPopUpBanner.jsx | 30 ++++-- .../src/views/HotPicksPanel/HotPicksPanel.jsx | 80 +++++++++------- .../MyPagePanel/MyPageSub/MyInfo/MyInfo.jsx | 91 +++++++++++-------- .../MyPageSub/MyOrders/MyOrders.jsx | 60 +++++++----- .../WelcomeEventPanel/WelcomeEventPanel.jsx | 54 ++++++----- 18 files changed, 434 insertions(+), 296 deletions(-) create mode 100644 com.twin.app.shoptime/src/actions/empActions.js create mode 100644 com.twin.app.shoptime/src/reducers/empReducer.js diff --git a/com.twin.app.shoptime/src/App/App.js b/com.twin.app.shoptime/src/App/App.js index 7142a139..19335587 100644 --- a/com.twin.app.shoptime/src/App/App.js +++ b/com.twin.app.shoptime/src/App/App.js @@ -1,36 +1,53 @@ -import React, { useCallback, useEffect, useState } from "react"; +import React, { + useCallback, + useEffect, + useState, +} from 'react'; -import { useDispatch, useSelector } from "react-redux"; +import { + useDispatch, + useSelector, +} from 'react-redux'; -import platform from "@enact/core/platform"; -import ThemeDecorator from "@enact/sandstone/ThemeDecorator"; +import platform from '@enact/core/platform'; +import ThemeDecorator from '@enact/sandstone/ThemeDecorator'; -import appinfo from "../../webos-meta/appinfo.json"; +import appinfo from '../../webos-meta/appinfo.json'; import { changeAppStatus, getDeviceId, getHttpHeaderForServiceRequest, getSystemSettings, setExitApp, -} from "../actions/commonActions"; -import { getHomeMenu, getHomeTerms } from "../actions/homeActions"; +} from '../actions/commonActions'; +import { + getHomeMenu, + getHomeTerms, +} from '../actions/homeActions'; import { getMyRecommandedKeyword, getMyUpcomingAlertShow, setMyTermsWithdraw, -} from "../actions/myPageActions"; -import { pushPanel } from "../actions/panelActions"; -import { countryCode, ricCode } from "../api/apiConfig"; -import TPopUp from "../components/TPopUp/TPopUp"; -import usePrevious from "../hooks/usePrevious"; -import { logoutAccount } from "../lunaSend"; -import { checkValidCountry } from "../lunaSend/common"; -import { lunaTest } from "../lunaSend/lunaTest"; -import * as Config from "../utils/Config"; -import { $L, clearLaunchParams, getLaunchParams } from "../utils/helperMethods"; -import MainView from "../views/MainView/MainView"; -import css from "./App.module.less"; -import { handleDeepLink } from "./deepLinkHandler"; +} from '../actions/myPageActions'; +import { pushPanel } from '../actions/panelActions'; +import { + countryCode, + ricCode, +} from '../api/apiConfig'; +import TPopUp from '../components/TPopUp/TPopUp'; +import usePrevious from '../hooks/usePrevious'; +import { logoutAccount } from '../lunaSend'; +import { checkValidCountry } from '../lunaSend/common'; +import { lunaTest } from '../lunaSend/lunaTest'; +import * as Config from '../utils/Config'; +import { + $L, + clearLaunchParams, + getLaunchParams, +} from '../utils/helperMethods'; +import MainView from '../views/MainView/MainView'; +import css from './App.module.less'; +import { handleDeepLink } from './deepLinkHandler'; let foreGroundChangeTimer = null; @@ -188,7 +205,7 @@ function AppBase(props) { ); dispatch( getHomeTerms({ - mbrNo: appStatus.loginUserData.userInfo, + mbrNo: appStatus.loginUserData.userNumber, trmsTpCdList: "MST00401, MST00402", }) ); diff --git a/com.twin.app.shoptime/src/actions/actionTypes.js b/com.twin.app.shoptime/src/actions/actionTypes.js index 3c89a1d9..6c3564df 100644 --- a/com.twin.app.shoptime/src/actions/actionTypes.js +++ b/com.twin.app.shoptime/src/actions/actionTypes.js @@ -155,4 +155,7 @@ export const types = { "GET_MY_INFO_ORDER_CANCEL_COLUMNS_SEARCH", UPDATE_ORDER_PARTIAL_CANCEL: "UPDATE_ORDER_PARTIAL_CANCEL", PAYMENT_TOTAL_CANCEL: "PAYMENT_TOTAL_CANCEL", + + // emp actions + GET_SHOPTIME_TERMS: "GET_SHOPTIME_TERMS", }; diff --git a/com.twin.app.shoptime/src/actions/empActions.js b/com.twin.app.shoptime/src/actions/empActions.js new file mode 100644 index 00000000..6e6ba8bd --- /dev/null +++ b/com.twin.app.shoptime/src/actions/empActions.js @@ -0,0 +1,30 @@ +import { URLS } from '../api/apiConfig'; +import { TAxios } from '../api/TAxios'; +import { types } from './actionTypes'; + +// IF-LGSPM-373 EMP Shoptime 선택 약관 조회 +export const getShoptimeTerms = () => (dispatch, getState) => { + const onSuccess = (response) => { + console.log("getShoptimeTerms onSuccess ", response.data); + + dispatch({ + type: types.GET_SHOPTIME_TERMS, + payload: response.data.data, + }); + }; + + const onFail = (error) => { + console.error("getShoptimeTerms onFail ", error); + }; + + TAxios( + dispatch, + getState, + "get", + URLS.GET_SHOPTIME_TERMS, + {}, + {}, + onSuccess, + onFail + ); +}; diff --git a/com.twin.app.shoptime/src/api/apiConfig.js b/com.twin.app.shoptime/src/api/apiConfig.js index 994073b0..a4feee95 100644 --- a/com.twin.app.shoptime/src/api/apiConfig.js +++ b/com.twin.app.shoptime/src/api/apiConfig.js @@ -125,6 +125,9 @@ export const URLS = { UPDATE_ORDER_PARTIAL_CANCEL: "/lgsp/v1/myinfo/order/orderPartialCancel.lge", PAYMENT_TOTAL_CANCEL: "/lgsp/v1/myinfo/order/paymentTotalCancel.lge", + // emp controller + GET_SHOPTIME_TERMS: "/lgsp/m/v1/emp/shoptime/terms.lge", + // IF-LGSP-LOG-001 log live controller LOG_LIVE: "/lgsp/v1/log/live.lge", diff --git a/com.twin.app.shoptime/src/components/TabLayout/TabLayout.jsx b/com.twin.app.shoptime/src/components/TabLayout/TabLayout.jsx index f812aacb..c3133a83 100644 --- a/com.twin.app.shoptime/src/components/TabLayout/TabLayout.jsx +++ b/com.twin.app.shoptime/src/components/TabLayout/TabLayout.jsx @@ -4,41 +4,50 @@ import React, { useMemo, useRef, useState, -} from "react"; +} from 'react'; -import classNames from "classnames"; -import { useDispatch, useSelector } from "react-redux"; +import classNames from 'classnames'; +import { + useDispatch, + useSelector, +} from 'react-redux'; //아이콘 -import { Job } from "@enact/core/util"; +import { Job } from '@enact/core/util'; //enact -import Skinnable from "@enact/sandstone/Skinnable"; -import Spotlight from "@enact/spotlight"; -import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator"; -import { Cancelable } from "@enact/ui/Cancelable"; +import Skinnable from '@enact/sandstone/Skinnable'; +import Spotlight from '@enact/spotlight'; +import SpotlightContainerDecorator + from '@enact/spotlight/SpotlightContainerDecorator'; +import { Cancelable } from '@enact/ui/Cancelable'; //이미지 -import shoptimeFullIcon from "../../../assets/images/icons/ic-lnb-logo-shoptime@3x.png"; -import { gnbOpened } from "../../actions/commonActions"; -import { updateSpotlightId } from "../../actions/homeActions"; -import { resetPanels } from "../../actions/panelActions"; -import useLogService from "../../hooks/useLogService"; -import useScrollTo from "../../hooks/useScrollTo"; -import { LOG_MENU, LOG_TP_NO, panel_names } from "../../utils/Config"; -import { formatGMTString } from "../../utils/helperMethods"; -import { SpotlightIds } from "../../utils/SpotlightIds"; -import TScroller from "../TScroller/TScroller"; -import CategoryIcon from "./iconComponents/CategoryIcon"; -import FeaturedBrandIcon from "./iconComponents/FeaturedBrandIcon"; -import HomeIcon from "./iconComponents/HomeIcon"; -import HotPicksIcon from "./iconComponents/HotPicksIcon"; -import MyPageIcon from "./iconComponents/MyPageIcon"; -import OnSaleIcon from "./iconComponents/OnSaleIcon"; -import SearchIcon from "./iconComponents/SearchIcon"; -import TrendingNowIcon from "./iconComponents/TrendingNowIcon"; -import TabItem from "./TabItem"; -import TabItemSub from "./TabItemSub"; -import css from "./TabLayout.module.less"; +import shoptimeFullIcon + from '../../../assets/images/icons/ic-lnb-logo-shoptime@3x.png'; +import { gnbOpened } from '../../actions/commonActions'; +import { updateSpotlightId } from '../../actions/homeActions'; +import { resetPanels } from '../../actions/panelActions'; +import useLogService from '../../hooks/useLogService'; +import useScrollTo from '../../hooks/useScrollTo'; +import { + LOG_MENU, + LOG_TP_NO, + panel_names, +} from '../../utils/Config'; +import { formatGMTString } from '../../utils/helperMethods'; +import { SpotlightIds } from '../../utils/SpotlightIds'; +import TScroller from '../TScroller/TScroller'; +import CategoryIcon from './iconComponents/CategoryIcon'; +import FeaturedBrandIcon from './iconComponents/FeaturedBrandIcon'; +import HomeIcon from './iconComponents/HomeIcon'; +import HotPicksIcon from './iconComponents/HotPicksIcon'; +import MyPageIcon from './iconComponents/MyPageIcon'; +import OnSaleIcon from './iconComponents/OnSaleIcon'; +import SearchIcon from './iconComponents/SearchIcon'; +import TrendingNowIcon from './iconComponents/TrendingNowIcon'; +import TabItem from './TabItem'; +import TabItemSub from './TabItemSub'; +import css from './TabLayout.module.less'; const Container = SpotlightContainerDecorator( { enterTo: "default-element", preserveId: true }, @@ -257,7 +266,7 @@ export default function TabLayout({ topPanelName, onTabActivated, panelInfo }) { ], })) .filter((item) => { - if (loginUserData.userInfo === null) { + if (loginUserData.userNumber === null) { return item.title !== "My Orders"; } return true; diff --git a/com.twin.app.shoptime/src/lunaSend/account.js b/com.twin.app.shoptime/src/lunaSend/account.js index 55791178..9bad7d1d 100644 --- a/com.twin.app.shoptime/src/lunaSend/account.js +++ b/com.twin.app.shoptime/src/lunaSend/account.js @@ -74,44 +74,43 @@ export const getLoginUserData = ( } } else { onSuccess({ - "subscribed": false, - "returnValue": true, - "multipleLoginUserData": [ - ], - "id": "twin@t-win.kr", - "inactiveID": "", - "lastSignInUserNo": "US2210240095608", - "userData": { - "sdpUserNumber": "80995804", - "needToSetNickname": false, - "adultAuthStatus": "needAge", - "serverId": "twin@t-win.kr", - "countryCode": "US", - "userNumber": "US2210240095608", - "defaultNick": false, - "isRequiredTerm": false, - "id": "twin@t-win.kr", - "userID": "twin@t-win.kr", - "serviceList": [ - { - "svcName": "LG Smart World(TV)", - "svcCode": "SVC301", - "joinDate": "02-13-2024", - "isService": "Y" - }, - { - "svcName": "MC OAuth", - "svcCode": "SVC710", - "joinDate": "02-13-2024", - "isService": "Y" - } - ], - "profileNick": "LGEUSER0", - "iconNick": "L", - "needToCheckTerms": false, - "accountType": "LGE", - "profileBg": "#7360E7" - } + subscribed: false, + returnValue: true, + multipleLoginUserData: [], + id: "twin@t-win.kr", + inactiveID: "", + lastSignInUserNo: "US2210240095608", + userData: { + sdpUserNumber: "80995804", + needToSetNickname: false, + adultAuthStatus: "needAge", + serverId: "twin@t-win.kr", + countryCode: "US", + userNumber: "US2210240095608", + defaultNick: false, + isRequiredTerm: false, + id: "twin@t-win.kr", + userID: "twin@t-win.kr", + serviceList: [ + { + svcName: "LG Smart World(TV)", + svcCode: "SVC301", + joinDate: "02-13-2024", + isService: "Y", + }, + { + svcName: "MC OAuth", + svcCode: "SVC710", + joinDate: "02-13-2024", + isService: "Y", + }, + ], + profileNick: "LGEUSER0", + iconNick: "L", + needToCheckTerms: false, + accountType: "LGE", + profileBg: "#7360E7", + }, }); } }; @@ -136,7 +135,7 @@ export const logoutAccount = ( } } else { onSuccess({ - useId: null, + userId: null, userInfo: null, email: null, returnValue: true, diff --git a/com.twin.app.shoptime/src/reducers/commonReducer.js b/com.twin.app.shoptime/src/reducers/commonReducer.js index d733b7c0..b990af27 100644 --- a/com.twin.app.shoptime/src/reducers/commonReducer.js +++ b/com.twin.app.shoptime/src/reducers/commonReducer.js @@ -1,4 +1,4 @@ -import { types } from "../actions/actionTypes"; +import { types } from '../actions/actionTypes'; const initialState = { appStatus: { @@ -12,7 +12,7 @@ const initialState = { loginUserData: {}, toast: false, toastText: null, - captionEnable: false + captionEnable: false, }, httpHeader: null, isGnbOpened: false, @@ -78,13 +78,15 @@ export const commonReducer = (state = initialState, action) => { ...state, httpHeader: action.payload, }; - case types.GET_LOGIN_USER_DATA:{ - const userInfo = action.payload?.userData?.userNumber ? action.payload.userData.userNumber: action.payload?.userInfo; + + case types.GET_LOGIN_USER_DATA: { + const userData = action.payload?.userData; + return { ...state, appStatus: { ...state.appStatus, - loginUserData: {userInfo}, + loginUserData: { ...userData }, }, }; } diff --git a/com.twin.app.shoptime/src/reducers/empReducer.js b/com.twin.app.shoptime/src/reducers/empReducer.js new file mode 100644 index 00000000..64262d0e --- /dev/null +++ b/com.twin.app.shoptime/src/reducers/empReducer.js @@ -0,0 +1,18 @@ +import { types } from '../actions/actionTypes'; + +const initialState = { + empTermsData: {}, +}; + +export const empReducer = (state = initialState, action) => { + switch (action.type) { + case types.GET_SHOPTIME_TERMS: + return { + ...state, + empTermsData: action.payload, + }; + + default: + return state; + } +}; diff --git a/com.twin.app.shoptime/src/views/CheckOutPanel/CheckOutPanel.jsx b/com.twin.app.shoptime/src/views/CheckOutPanel/CheckOutPanel.jsx index 628cc621..41dc8503 100644 --- a/com.twin.app.shoptime/src/views/CheckOutPanel/CheckOutPanel.jsx +++ b/com.twin.app.shoptime/src/views/CheckOutPanel/CheckOutPanel.jsx @@ -14,6 +14,7 @@ import { getTaxInfos, } from '../../actions/checkoutActions'; import { changeAppStatus } from '../../actions/commonActions'; +import { getShoptimeTerms } from '../../actions/empActions'; import { popPanel } from '../../actions/panelActions'; import TBody from '../../components/TBody/TBody'; import THeader from '../../components/THeader/THeader'; @@ -31,7 +32,7 @@ import SummaryContainer from './container/SummaryCotainer'; export default function CheckOutPanel() { const dispatch = useDispatch(); const panels = useSelector((state) => state.panels.panels); - const { userInfo } = useSelector( + const { userNumber } = useSelector( (state) => state.common.appStatus.loginUserData ); const checkoutPanelInfo = panels.find( @@ -46,13 +47,12 @@ export default function CheckOutPanel() { const [orderSideBarOpen, setOrderSideBarOpen] = useState(false); const [offerSideBarOpen, setOfferSideBarOpen] = useState(false); - console.log("chw", infoForCheckoutData); - console.log("chw", productData); - useEffect(() => { + dispatch(getShoptimeTerms()); + dispatch( getMyInfoCheckoutInfo({ - mbrNo: userInfo, + mbrNo: userNumber, dirPurcSelYn: "Y", cartList: [ { @@ -69,7 +69,7 @@ export default function CheckOutPanel() { useEffect(() => { dispatch( getTaxInfos({ - mbrNo: userInfo, + mbrNo: userNumber, bilAddrSno: infoForCheckoutData?.bilAddrSno, dlvrAddrSno: infoForCheckoutData?.dlvrAddrSno, reqCheckoutTaxInfoItemList: [ @@ -114,7 +114,7 @@ export default function CheckOutPanel() { onClick={onBackClick} />
- +
COUPON
-
- {$L("Maximum Benefit")} - -
diff --git a/com.twin.app.shoptime/src/views/CheckOutPanel/container/OrderItemsSideBar.jsx b/com.twin.app.shoptime/src/views/CheckOutPanel/container/OrderItemsSideBar.jsx index 39427bfb..6091eb4f 100644 --- a/com.twin.app.shoptime/src/views/CheckOutPanel/container/OrderItemsSideBar.jsx +++ b/com.twin.app.shoptime/src/views/CheckOutPanel/container/OrderItemsSideBar.jsx @@ -19,8 +19,6 @@ export default function OrderItemsSideBar({ closeSideBar }) { (state) => state.checkout?.checkoutData?.productList ); - console.log("chw", orderItemList); - const renderItem = useCallback( ({ index, ...rest }) => { const item = orderItemList[index]; diff --git a/com.twin.app.shoptime/src/views/CheckOutPanel/container/SummaryCotainer.jsx b/com.twin.app.shoptime/src/views/CheckOutPanel/container/SummaryCotainer.jsx index 2606ac8a..a3acb895 100644 --- a/com.twin.app.shoptime/src/views/CheckOutPanel/container/SummaryCotainer.jsx +++ b/com.twin.app.shoptime/src/views/CheckOutPanel/container/SummaryCotainer.jsx @@ -26,6 +26,17 @@ const Container = SpotlightContainerDecorator( "div" ); +const DEFAULT_SUMMARY = { + itemPrice: "0", + shPrice: "0", + couponPrice: "0", + itemsTotal: "0", + taxTotal: "0", + itemsTaxTotal: "0", + currSign: "", + currSignLoc: "", +}; + export default function SummaryContainer({ userInfo }) { const dispatch = useDispatch(); @@ -33,11 +44,9 @@ export default function SummaryContainer({ userInfo }) { const termsData = useSelector((state) => state.home.termsData); const taxInfosData = useSelector((state) => state.checkout?.taxInfosData); - console.log("chw", taxInfosData); - const checkoutTermsData = useMemo( () => - termsData?.data?.terms + (termsData?.data?.terms || []) .filter( (item) => item.trmsTpCd === "MST00403" || item.trmsTpCd === "MST00404" ) @@ -51,20 +60,11 @@ export default function SummaryContainer({ userInfo }) { [termsData] ); - const [summary, setSummary] = useState({ - itemPrice: "0", - shPrice: "0", - couponPrice: "0", - itemsTotal: "0", - taxTotal: "0", - itemsTaxTotal: "0", - currSign: "", - currSignLoc: "", - }); + const [summary, setSummary] = useState(DEFAULT_SUMMARY); const itemSetting = useCallback( (productList) => { - if (!productList || productList.length === 0) return; + if (!productList?.length) return; let itemCnt = 0; // 상품 함계 let shCnt = 0; // 배송비 합계 @@ -77,10 +77,9 @@ export default function SummaryContainer({ userInfo }) { productList.forEach((info) => { const itemPrice = info.price3 || info.price2; itemCnt += itemPrice * parseInt(info.prodQty, 10); - shCnt += parseFloat(info.shippingCharge || 0); - if (info.prdtCoupon && info.prdtCoupon.length > 0) { + if (info.prdtCoupon?.length) { couponCnt += info.prdtCoupon.reduce( (acc, coupon) => acc + parseFloat(coupon.discountAmount || 0), 0 @@ -88,19 +87,8 @@ export default function SummaryContainer({ userInfo }) { } }); - if ( - taxInfosData.totDlvrAmt !== null && - taxInfosData.totDlvrAmt !== undefined - ) { - shCnt = taxInfosData.totDlvrAmt; - } - - if ( - taxInfosData.billing?.taxTotAmt !== null && - taxInfosData.billing?.taxTotAmt !== undefined - ) { - taxCnt = taxInfosData.billing.taxTotAmt; - } + shCnt = taxInfosData.totDlvrAmt ?? shCnt; + taxCnt = taxInfosData.billing?.taxTotAmt ?? taxCnt; itemsTotal = itemCnt + shCnt; itemsTaxTotal = itemsTotal + taxCnt; @@ -118,14 +106,12 @@ export default function SummaryContainer({ userInfo }) { currSign: productList[0]?.currSign || "", currSignLoc: productList[0]?.currSignLoc || "", })); - - console.log("chw", summary); }, [taxInfosData] ); useEffect(() => { - if (productList && productList.length > 0) { + if (productList?.length) { itemSetting(productList); } }, [productList, itemSetting]); diff --git a/com.twin.app.shoptime/src/views/DetailPanel/SingleProduct/SingleOption.jsx b/com.twin.app.shoptime/src/views/DetailPanel/SingleProduct/SingleOption.jsx index 96be5cf6..867660ff 100644 --- a/com.twin.app.shoptime/src/views/DetailPanel/SingleProduct/SingleOption.jsx +++ b/com.twin.app.shoptime/src/views/DetailPanel/SingleProduct/SingleOption.jsx @@ -1,30 +1,43 @@ -import React, { useCallback, useEffect, useRef, useState } from "react"; +import React, { + useCallback, + useEffect, + useRef, + useState, +} from 'react'; -import classNames from "classnames"; -import { useDispatch, useSelector } from "react-redux"; +import classNames from 'classnames'; +import { + useDispatch, + useSelector, +} from 'react-redux'; -import Spotlight from "@enact/spotlight"; -import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator"; -import Spottable from "@enact/spotlight/Spottable"; +import Spotlight from '@enact/spotlight'; +import SpotlightContainerDecorator + from '@enact/spotlight/SpotlightContainerDecorator'; +import Spottable from '@enact/spotlight/Spottable'; -import { setHidePopup, setShowPopup } from "../../../actions/commonActions"; +import { + setHidePopup, + setShowPopup, +} from '../../../actions/commonActions'; import { getProductCouponDownload, getProductCouponSearch, getProductCouponTotDownload, -} from "../../../actions/couponActions"; -import { pushPanel } from "../../../actions/panelActions"; -import { getProductOption } from "../../../actions/productActions"; -import TButton from "../../../components/TButton/TButton"; -import TPopUp from "../../../components/TPopUp/TPopUp"; -import TQRCode from "../../../components/TQRCode/TQRCode"; -import TScroller from "../../../components/TScroller/TScroller"; -import TVirtualGridList from "../../../components/TVirtualGridList/TVirtualGridList"; -import usePriceInfo from "../../../hooks/usePriceInfo"; -import * as Config from "../../../utils/Config"; -import { $L } from "../../../utils/helperMethods"; -import FavoriteBtn from "../components/FavoriteBtn"; -import css from "./SingleOption.module.less"; +} from '../../../actions/couponActions'; +import { pushPanel } from '../../../actions/panelActions'; +import { getProductOption } from '../../../actions/productActions'; +import TButton from '../../../components/TButton/TButton'; +import TPopUp from '../../../components/TPopUp/TPopUp'; +import TQRCode from '../../../components/TQRCode/TQRCode'; +import TScroller from '../../../components/TScroller/TScroller'; +import TVirtualGridList + from '../../../components/TVirtualGridList/TVirtualGridList'; +import usePriceInfo from '../../../hooks/usePriceInfo'; +import * as Config from '../../../utils/Config'; +import { $L } from '../../../utils/helperMethods'; +import FavoriteBtn from '../components/FavoriteBtn'; +import css from './SingleOption.module.less'; const Container = SpotlightContainerDecorator( { enterTo: "default-element" }, @@ -50,7 +63,7 @@ export default function SingleOption({ const { popupVisible, activePopup } = useSelector( (state) => state.common.popup ); - const { userInfo } = useSelector( + const { userNumber } = useSelector( (state) => state.common.appStatus.loginUserData ); @@ -96,7 +109,7 @@ export default function SingleOption({ getProductCouponSearch({ patnrId: selectedPatnrId, prdtId: selectedPrdtId, - mbrNo: userInfo, + mbrNo: userNumber, }) ); }, [dispatch, selectedPatnrId, selectedPrdtId, productData]); @@ -167,7 +180,7 @@ export default function SingleOption({ }, [activePopup, selectedBtnOptIdx, selectedOptionItemIndex]); const handleLoginPopup = useCallback(() => { - if (!loginUserData.userInfo) { + if (!loginUserData.userNumber) { dispatch(setShowPopup(Config.ACTIVE_POPUP.loginPopup)); } else { dispatch( @@ -188,7 +201,7 @@ export default function SingleOption({ const handleCouponClick = useCallback( (idx, promotion) => { - if (!loginUserData.userInfo) { + if (!loginUserData.userNumber) { dispatch(setShowPopup(Config.ACTIVE_POPUP.loginPopup)); return; } else if (promotion === "SPECIAL PROMOTION") { @@ -203,17 +216,20 @@ export default function SingleOption({ ); const handleCouponTotDownload = useCallback(() => { - if (selectedCoupon && userInfo) { + if (selectedCoupon && userNumber) { const couponCodesArray = couponCodes .split(",") .map((code) => parseInt(code.trim())); setDownloadCouponArr((prevArr) => [...prevArr, ...couponCodesArray]); dispatch( - getProductCouponTotDownload({ mbrNo: userInfo, cpnSnoAll: couponCodes }) + getProductCouponTotDownload({ + mbrNo: userNumber, + cpnSnoAll: couponCodes, + }) ); } - }, [dispatch, selectedCoupon, userInfo, couponCodes]); + }, [dispatch, selectedCoupon, userNumber, couponCodes]); const onClose = useCallback(() => { Spotlight.focus("tbody"); @@ -320,7 +336,9 @@ export default function SingleOption({ return; } setDownloadCouponArr((prevArr) => [...prevArr, cpnSno]); - dispatch(getProductCouponDownload({ mbrNo: userInfo, cpnSno: cpnSno })); + dispatch( + getProductCouponDownload({ mbrNo: userNumber, cpnSno: cpnSno }) + ); }; return ( diff --git a/com.twin.app.shoptime/src/views/HomePanel/EventPopUpBanner/EventPopUpBanner.jsx b/com.twin.app.shoptime/src/views/HomePanel/EventPopUpBanner/EventPopUpBanner.jsx index ee804dfc..ed8d691c 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/EventPopUpBanner/EventPopUpBanner.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/EventPopUpBanner/EventPopUpBanner.jsx @@ -1,14 +1,24 @@ -import React, { useCallback, useEffect, useState } from "react"; +import React, { + useCallback, + useEffect, + useState, +} from 'react'; -import { useDispatch, useSelector } from "react-redux"; +import { + useDispatch, + useSelector, +} from 'react-redux'; -import { setHidePopup, setShowPopup } from "../../../actions/commonActions"; -import { getEventIssuedStaus } from "../../../actions/eventActions"; -import MobileSendPopUp from "../../../components/MobileSend/MobileSendPopUp"; -import TPopUp from "../../../components/TPopUp/TPopUp"; -import { ACTIVE_POPUP } from "../../../utils/Config"; -import { $L } from "../../../utils/helperMethods"; -import css from "../EventPopUpBanner/EventPopUpBanner.module.less"; +import { + setHidePopup, + setShowPopup, +} from '../../../actions/commonActions'; +import { getEventIssuedStaus } from '../../../actions/eventActions'; +import MobileSendPopUp from '../../../components/MobileSend/MobileSendPopUp'; +import TPopUp from '../../../components/TPopUp/TPopUp'; +import { ACTIVE_POPUP } from '../../../utils/Config'; +import { $L } from '../../../utils/helperMethods'; +import css from '../EventPopUpBanner/EventPopUpBanner.module.less'; export default function EventPopUpBanner({ open = true }) { const dispatch = useDispatch(); @@ -51,7 +61,7 @@ export default function EventPopUpBanner({ open = true }) { case "EVT00106": console.log("Direct Coupon"); - if (!loginUserData.userInfo) { + if (!loginUserData.userNumber) { dispatch(setShowPopup(ACTIVE_POPUP.loginPopup)); } else { console.log("Direct Coupon"); diff --git a/com.twin.app.shoptime/src/views/HotPicksPanel/HotPicksPanel.jsx b/com.twin.app.shoptime/src/views/HotPicksPanel/HotPicksPanel.jsx index 1aedb264..b48e028e 100644 --- a/com.twin.app.shoptime/src/views/HotPicksPanel/HotPicksPanel.jsx +++ b/com.twin.app.shoptime/src/views/HotPicksPanel/HotPicksPanel.jsx @@ -1,45 +1,57 @@ -import React, { useCallback, useEffect, useRef, useState } from "react"; +import React, { + useCallback, + useEffect, + useRef, + useState, +} from 'react'; -import classNames from "classnames"; -import { useDispatch, useSelector } from "react-redux"; +import classNames from 'classnames'; +import { + useDispatch, + useSelector, +} from 'react-redux'; -import { Job } from "@enact/core/util"; -import Spotlight from "@enact/spotlight"; -import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator"; -import Spottable from "@enact/spotlight/Spottable"; +import { Job } from '@enact/core/util'; +import Spotlight from '@enact/spotlight'; +import SpotlightContainerDecorator + from '@enact/spotlight/SpotlightContainerDecorator'; +import Spottable from '@enact/spotlight/Spottable'; import { alertToast, setHidePopup, setShowPopup, -} from "../../actions/commonActions"; -import { getProductCouponDownload } from "../../actions/couponActions"; -import { getThemeCurationInfo } from "../../actions/homeActions"; +} from '../../actions/commonActions'; +import { getProductCouponDownload } from '../../actions/couponActions'; +import { getThemeCurationInfo } from '../../actions/homeActions'; import { pushPanel, resetPanels, updatePanel, -} from "../../actions/panelActions"; -import { startVideoPlayer } from "../../actions/playActions"; -import MobileSendPopUp from "../../components/MobileSend/MobileSendPopUp"; -import TBody from "../../components/TBody/TBody"; -import TPanel from "../../components/TPanel/TPanel"; -import useLogService from "../../hooks/useLogService"; -import usePrevious from "../../hooks/usePrevious"; -import useScrollTo from "../../hooks/useScrollTo"; -import * as Config from "../../utils/Config"; -import { LOG_TP_NO, panel_names } from "../../utils/Config"; -import { $L } from "../../utils/helperMethods"; -import css from "./HotPicks.module.less"; -import TCFI from "./Type/TCFI/TCFI"; -import TCFI_2 from "./Type/TCFI_2/TCFI_2"; -import TCFI_3 from "./Type/TCFI_3/TCFI_3"; -import TCFI_4 from "./Type/TCFI_4/TCFI_4"; -import TCFV from "./Type/TCFV/TCFV"; -import TCFV_2 from "./Type/TCFV_2/TCFV_2"; -import TCFV_3 from "./Type/TCFV_3/TCFV_3"; -import TCFV_4 from "./Type/TCFV_4/TCFV_4"; -import TCHH from "./Type/TCHH/TCHH"; +} from '../../actions/panelActions'; +import { startVideoPlayer } from '../../actions/playActions'; +import MobileSendPopUp from '../../components/MobileSend/MobileSendPopUp'; +import TBody from '../../components/TBody/TBody'; +import TPanel from '../../components/TPanel/TPanel'; +import useLogService from '../../hooks/useLogService'; +import usePrevious from '../../hooks/usePrevious'; +import useScrollTo from '../../hooks/useScrollTo'; +import * as Config from '../../utils/Config'; +import { + LOG_TP_NO, + panel_names, +} from '../../utils/Config'; +import { $L } from '../../utils/helperMethods'; +import css from './HotPicks.module.less'; +import TCFI from './Type/TCFI/TCFI'; +import TCFI_2 from './Type/TCFI_2/TCFI_2'; +import TCFI_3 from './Type/TCFI_3/TCFI_3'; +import TCFI_4 from './Type/TCFI_4/TCFI_4'; +import TCFV from './Type/TCFV/TCFV'; +import TCFV_2 from './Type/TCFV_2/TCFV_2'; +import TCFV_3 from './Type/TCFV_3/TCFV_3'; +import TCFV_4 from './Type/TCFV_4/TCFV_4'; +import TCHH from './Type/TCHH/TCHH'; const SpottableComponent = Spottable("button"); @@ -65,8 +77,8 @@ export default function HotPicksPanel({ panelInfo }) { const { popupVisible, activePopup } = useSelector( (state) => state.common.popup ); - const userInfo = useSelector( - (state) => state.common?.appStatus.loginUserData.userInfo + const userNumber = useSelector( + (state) => state.common?.appStatus.loginUserData.userNumber ); const [movingPage, setMovingPage] = useState(false); @@ -219,7 +231,7 @@ export default function HotPicksPanel({ panelInfo }) { if (evntTpCd === "EVT00107") { dispatch( getProductCouponDownload({ - mbrNo: userInfo, + mbrNo: userNumber, cpnSno: eventInfoV2.billCpnSno, }) ); diff --git a/com.twin.app.shoptime/src/views/MyPagePanel/MyPageSub/MyInfo/MyInfo.jsx b/com.twin.app.shoptime/src/views/MyPagePanel/MyPageSub/MyInfo/MyInfo.jsx index b424f547..e2b8ee5f 100644 --- a/com.twin.app.shoptime/src/views/MyPagePanel/MyPageSub/MyInfo/MyInfo.jsx +++ b/com.twin.app.shoptime/src/views/MyPagePanel/MyPageSub/MyInfo/MyInfo.jsx @@ -1,37 +1,52 @@ -import React, { useCallback, useEffect, useRef, useState } from "react"; +import React, { + useCallback, + useEffect, + useRef, + useState, +} from 'react'; -import { useDispatch, useSelector } from "react-redux"; +import { + useDispatch, + useSelector, +} from 'react-redux'; -import Spotlight from "@enact/spotlight"; -import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator"; +import Spotlight from '@enact/spotlight'; +import SpotlightContainerDecorator + from '@enact/spotlight/SpotlightContainerDecorator'; -import ic_profile from "../../../../../assets/images/icons/ic-profile.svg"; -import myinfo_login from "../../../../../assets/images/img-banner-myinfo-login@3x.png"; -import { getMyInfoBillingSearch } from "../../../../actions/billingActions"; -import { getMyInfoCardSearch } from "../../../../actions/cardActions"; +import ic_profile from '../../../../../assets/images/icons/ic-profile.svg'; +import myinfo_login + from '../../../../../assets/images/img-banner-myinfo-login@3x.png'; +import { getMyInfoBillingSearch } from '../../../../actions/billingActions'; +import { getMyInfoCardSearch } from '../../../../actions/cardActions'; import { launchMembershipApp, logoutAccount, setHidePopup, setShowPopup, -} from "../../../../actions/commonActions"; -import { getProductCouponInfo } from "../../../../actions/couponActions"; -import { getMyInfoShippingSearch } from "../../../../actions/shippingActions"; -import TBody from "../../../../components/TBody/TBody"; -import TButton, { SIZES, TYPES } from "../../../../components/TButton/TButton"; +} from '../../../../actions/commonActions'; +import { getProductCouponInfo } from '../../../../actions/couponActions'; +import { getMyInfoShippingSearch } from '../../../../actions/shippingActions'; +import TBody from '../../../../components/TBody/TBody'; +import TButton, { + SIZES, + TYPES, +} from '../../../../components/TButton/TButton'; import TButtonTab, { LIST_TYPE, -} from "../../../../components/TButtonTab/TButtonTab"; -import THeader from "../../../../components/THeader/THeader"; -import TPopUp from "../../../../components/TPopUp/TPopUp"; -import TQRCode from "../../../../components/TQRCode/TQRCode"; -import * as Config from "../../../../utils/Config"; -import { $L } from "../../../../utils/helperMethods"; -import css from "../MyInfo/MyInfo.module.less"; -import BillingAddressTab from "./MyInfoTabContents/BillingAddressTab/BillingAddressTab"; -import CouponTab from "./MyInfoTabContents/CouponTab/CouponTab"; -import PaymentTab from "./MyInfoTabContents/PaymentTab/PaymentTab"; -import ShippingAddressTab from "./MyInfoTabContents/ShippingAddressTab/ShippingAddressTab"; +} from '../../../../components/TButtonTab/TButtonTab'; +import THeader from '../../../../components/THeader/THeader'; +import TPopUp from '../../../../components/TPopUp/TPopUp'; +import TQRCode from '../../../../components/TQRCode/TQRCode'; +import * as Config from '../../../../utils/Config'; +import { $L } from '../../../../utils/helperMethods'; +import css from '../MyInfo/MyInfo.module.less'; +import BillingAddressTab + from './MyInfoTabContents/BillingAddressTab/BillingAddressTab'; +import CouponTab from './MyInfoTabContents/CouponTab/CouponTab'; +import PaymentTab from './MyInfoTabContents/PaymentTab/PaymentTab'; +import ShippingAddressTab + from './MyInfoTabContents/ShippingAddressTab/ShippingAddressTab'; const TabContainer = SpotlightContainerDecorator( { enterTo: "last-focused" }, @@ -63,7 +78,7 @@ export default function MyInfo({ title, cbScrollTo }) { const dispatch = useDispatch(); - const { userId, userInfo, email } = useSelector( + const { id, userNumber, userID } = useSelector( (state) => state.common.appStatus.loginUserData ); const { popupVisible, activePopup } = useSelector( @@ -97,13 +112,13 @@ export default function MyInfo({ title, cbScrollTo }) { useEffect(() => { setTab(panelInfos.panelInfo.menuOrd ? panelInfos.panelInfo.menuOrd : 0); - if (userInfo) { - dispatch(getMyInfoCardSearch({ mbrNo: userInfo })); - dispatch(getMyInfoBillingSearch({ mbrNo: userInfo })); - dispatch(getMyInfoShippingSearch({ mbrNo: userInfo })); - dispatch(getProductCouponInfo({ mbrNo: userInfo })); + if (userNumber) { + dispatch(getMyInfoCardSearch({ mbrNo: userNumber })); + dispatch(getMyInfoBillingSearch({ mbrNo: userNumber })); + dispatch(getMyInfoShippingSearch({ mbrNo: userNumber })); + dispatch(getProductCouponInfo({ mbrNo: userNumber })); } - }, [userInfo, dispatch, panelInfos]); + }, [userNumber, dispatch, panelInfos]); const handleItemClick = useCallback( ({ index }) => { @@ -115,7 +130,7 @@ export default function MyInfo({ title, cbScrollTo }) { ); useEffect(() => { - if (userInfo) { + if (userNumber) { const initFoucsedItem = document.querySelector( '[data-spotlight-id="tab-0"]' ); @@ -128,7 +143,7 @@ export default function MyInfo({ title, cbScrollTo }) { Spotlight.focus("mypage-login-button"); }, 0); } - }, [userInfo]); + }, [userNumber]); useEffect(() => { return () => { @@ -171,17 +186,17 @@ export default function MyInfo({ title, cbScrollTo }) {
- {userInfo - ? $L("Hi, {userId}").replace("{userId}", userId) + {userNumber + ? $L("Hi, {userId}").replace("{userId}", id) : $L("Please log in to use your LG Shoptime.")}
Email
-
{userInfo ? email : "-"}
+
{userNumber ? userID : "-"}
- {userInfo ? ( + {userNumber ? (
- {userInfo ? ( + {userNumber ? ( <> {buttonTabList && buttonTabList.length > 0 && ( diff --git a/com.twin.app.shoptime/src/views/MyPagePanel/MyPageSub/MyOrders/MyOrders.jsx b/com.twin.app.shoptime/src/views/MyPagePanel/MyPageSub/MyOrders/MyOrders.jsx index 6e140b30..56ca4ad6 100644 --- a/com.twin.app.shoptime/src/views/MyPagePanel/MyPageSub/MyOrders/MyOrders.jsx +++ b/com.twin.app.shoptime/src/views/MyPagePanel/MyPageSub/MyOrders/MyOrders.jsx @@ -1,10 +1,19 @@ -import React, { useCallback, useEffect, useRef, useState } from "react"; +import React, { + useCallback, + useEffect, + useRef, + useState, +} from 'react'; -import classNames from "classnames"; -import { useDispatch, useSelector } from "react-redux"; +import classNames from 'classnames'; +import { + useDispatch, + useSelector, +} from 'react-redux'; -import Spotlight from "@enact/spotlight"; -import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator"; +import Spotlight from '@enact/spotlight'; +import SpotlightContainerDecorator + from '@enact/spotlight/SpotlightContainerDecorator'; // getMyinfoOrderCancelColumnsSearch : 회원 주문 취소/반품/교환 사유 조회 // getMyinfoOrderCancelSearch : 회원 주문 취소/반품/교환 조회 - 디테일 @@ -15,7 +24,7 @@ import { getMyinfoOrderCancelSearch, paymentTotalCancel, updateOrderPartialCancel, -} from "../../../../actions/cancelActions"; +} from '../../../../actions/cancelActions'; // getMyinfoOrderSearch : 회원 주문 정보 조회 // getMyinfoOrderDetailSearch : 회원 주문 상세 정보 조회 - 디테일 // getMyinfoOrderShippingSearch : 회원 주문 배송 상세 정보 조회 @@ -23,21 +32,22 @@ import { getMyinfoOrderDetailSearch, getMyinfoOrderSearch, getMyinfoOrderShippingSearch, -} from "../../../../actions/orderActions"; -import TBody from "../../../../components/TBody/TBody"; -import TButtonScroller from "../../../../components/TButtonScroller/TButtonScroller"; +} from '../../../../actions/orderActions'; +import TBody from '../../../../components/TBody/TBody'; +import TButtonScroller + from '../../../../components/TButtonScroller/TButtonScroller'; import TButtonTab, { LIST_TYPE, -} from "../../../../components/TButtonTab/TButtonTab"; -import TDropDown from "../../../../components/TDropDown/TDropDown"; -import THeader from "../../../../components/THeader/THeader"; -import TPopUp from "../../../../components/TPopUp/TPopUp"; -import TScroller from "../../../../components/TScroller/TScroller"; -import { $L } from "../../../../utils/helperMethods"; -import css from "./MyOrders.module.less"; -import MyOrdersPopUp from "./MyOrdersPopUp"; -import CancelOrderList from "./OrderList/CancelOrderList"; -import OrderList from "./OrderList/OrderList"; +} from '../../../../components/TButtonTab/TButtonTab'; +import TDropDown from '../../../../components/TDropDown/TDropDown'; +import THeader from '../../../../components/THeader/THeader'; +import TPopUp from '../../../../components/TPopUp/TPopUp'; +import TScroller from '../../../../components/TScroller/TScroller'; +import { $L } from '../../../../utils/helperMethods'; +import css from './MyOrders.module.less'; +import MyOrdersPopUp from './MyOrdersPopUp'; +import CancelOrderList from './OrderList/CancelOrderList'; +import OrderList from './OrderList/OrderList'; const TabContainer = SpotlightContainerDecorator( { enterTo: "last-focused" }, @@ -57,7 +67,7 @@ export default function MyOrders({ title, cbScrollTo }) { const tabList = [$L("ORDERS"), $L("CANCELLED ORDERS")]; const dispatch = useDispatch(); - const { userInfo } = useSelector( + const { userNumber } = useSelector( (state) => state.common.appStatus.loginUserData ); @@ -156,7 +166,7 @@ export default function MyOrders({ title, cbScrollTo }) { timerRef.current = setTimeout(() => { Spotlight.focus(initFoucsedItem); }, 0); - }, [userInfo]); + }, [userNumber]); useEffect(() => { return () => { @@ -169,11 +179,11 @@ export default function MyOrders({ title, cbScrollTo }) { if ( appStatus && appStatus.loginUserData && - appStatus.loginUserData.userInfo + appStatus.loginUserData.userNumber ) { dispatch( getMyinfoOrderSearch({ - mbrNo: appStatus.loginUserData.userInfo, + mbrNo: appStatus.loginUserData.userNumber, srchMonth: dropDownTab === 0 ? 3 : 6, cancelOrderYn: "N", }) @@ -186,11 +196,11 @@ export default function MyOrders({ title, cbScrollTo }) { if ( appStatus && appStatus.loginUserData && - appStatus.loginUserData.userInfo + appStatus.loginUserData.userNumber ) { dispatch( getMyinfoOrderSearch({ - mbrNo: appStatus.loginUserData.userInfo, + mbrNo: appStatus.loginUserData.userNumber, srchMonth: dropDownTab === 0 ? 3 : 6, cancelOrderYn: "Y", }) diff --git a/com.twin.app.shoptime/src/views/WelcomeEventPanel/WelcomeEventPanel.jsx b/com.twin.app.shoptime/src/views/WelcomeEventPanel/WelcomeEventPanel.jsx index 40a1977f..aa345b74 100644 --- a/com.twin.app.shoptime/src/views/WelcomeEventPanel/WelcomeEventPanel.jsx +++ b/com.twin.app.shoptime/src/views/WelcomeEventPanel/WelcomeEventPanel.jsx @@ -1,28 +1,40 @@ -import React, { useCallback, useEffect, useMemo, useState } from "react"; +import React, { + useCallback, + useEffect, + useMemo, + useState, +} from 'react'; -import { useDispatch, useSelector } from "react-redux"; +import { + useDispatch, + useSelector, +} from 'react-redux'; -import Spotlight from "@enact/spotlight"; -import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator"; +import Spotlight from '@enact/spotlight'; +import SpotlightContainerDecorator + from '@enact/spotlight/SpotlightContainerDecorator'; import { alertToast, launchMembershipApp, setHidePopup, setShowPopup, -} from "../../actions/commonActions"; -import { getProductCouponDownload } from "../../actions/couponActions"; -import { getWelcomeEventInfo } from "../../actions/eventActions"; -import { popPanel, pushPanel } from "../../actions/panelActions"; -import { startVideoPlayer } from "../../actions/playActions"; -import MobileSendPopUp from "../../components/MobileSend/MobileSendPopUp"; -import TButton, { TYPES } from "../../components/TButton/TButton"; -import TButtonScroller from "../../components/TButtonScroller/TButtonScroller"; -import TPanel from "../../components/TPanel/TPanel"; -import TPopUp from "../../components/TPopUp/TPopUp"; -import * as Config from "../../utils/Config"; -import { $L } from "../../utils/helperMethods"; -import css from "../WelcomeEventPanel/WelcomeEventPanel.module.less"; +} from '../../actions/commonActions'; +import { getProductCouponDownload } from '../../actions/couponActions'; +import { getWelcomeEventInfo } from '../../actions/eventActions'; +import { + popPanel, + pushPanel, +} from '../../actions/panelActions'; +import { startVideoPlayer } from '../../actions/playActions'; +import MobileSendPopUp from '../../components/MobileSend/MobileSendPopUp'; +import TButton, { TYPES } from '../../components/TButton/TButton'; +import TButtonScroller from '../../components/TButtonScroller/TButtonScroller'; +import TPanel from '../../components/TPanel/TPanel'; +import TPopUp from '../../components/TPopUp/TPopUp'; +import * as Config from '../../utils/Config'; +import { $L } from '../../utils/helperMethods'; +import css from '../WelcomeEventPanel/WelcomeEventPanel.module.less'; const Container = SpotlightContainerDecorator( { enterTo: "last-focused" }, @@ -35,8 +47,8 @@ const WelcomeEventPanel = () => { const { billCpnSno, shptmLnkInfo } = useSelector( (state) => state.event.eventData?.eventInfo ); - const userInfo = useSelector( - (state) => state.common?.appStatus.loginUserData.userInfo + const userNumber = useSelector( + (state) => state.common?.appStatus.loginUserData.userNumber ); const { popupVisible, activePopup } = useSelector( (state) => state.common.popup @@ -75,7 +87,7 @@ const WelcomeEventPanel = () => { // 상품 쿠폰 다운로드 (IF-LGSP-318) dispatch( getProductCouponDownload({ - mbrNo: userInfo, + mbrNo: userNumber, cpnSno: billCpnSno, }) ); @@ -83,7 +95,7 @@ const WelcomeEventPanel = () => { } else { dispatch(setShowPopup(Config.ACTIVE_POPUP.smsPopup)); } - }, [dispatch, evntTpCd, userInfo]); + }, [dispatch, evntTpCd, userNumber]); const onClose = useCallback(() => { dispatch(setHidePopup());