[WelcomeEventPanel] IF-LGSP-LOG-008, ShopByMobile 이력 수정
This commit is contained in:
@@ -37,6 +37,18 @@ const Container = SpotlightContainerDecorator(
|
||||
{ enterTo: "last-focused" },
|
||||
"div"
|
||||
);
|
||||
|
||||
const getShopTpNm = (evntTpCd) => {
|
||||
switch (evntTpCd) {
|
||||
case "EVT00101":
|
||||
return "coupon";
|
||||
case "EVT00103":
|
||||
return "prizeevent";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
};
|
||||
|
||||
const WelcomeEventPanel = ({ spotlightId }) => {
|
||||
const { sendLogShopByMobile } = useLogService();
|
||||
|
||||
@@ -111,16 +123,7 @@ const WelcomeEventPanel = ({ spotlightId }) => {
|
||||
dispatch(getEventIssuedStaus({ evntTpCd, evntId }));
|
||||
}
|
||||
}
|
||||
}, [
|
||||
billCpnSno,
|
||||
dispatch,
|
||||
eventDatas,
|
||||
eventInfo,
|
||||
evntTpCd,
|
||||
sendLogShopByMobile,
|
||||
userNumber,
|
||||
eventIssuedStatusSuccess,
|
||||
]);
|
||||
}, [billCpnSno, dispatch, eventDatas, evntId, evntTpCd, userNumber]);
|
||||
|
||||
useEffect(() => {
|
||||
if (eventIssuedStatusSuccess === 0 && eventIssuedStatusSuccess !== null) {
|
||||
@@ -145,7 +148,7 @@ const WelcomeEventPanel = ({ spotlightId }) => {
|
||||
revwGrd: "",
|
||||
rewdAplyFlag: "N",
|
||||
shopByMobileFlag: "Y",
|
||||
shopTpNm: "", // pyh, 문의 후 작성
|
||||
shopTpNm: getShopTpNm(evntTpCd),
|
||||
showId: "",
|
||||
showNm: "",
|
||||
trmsAgrFlag: "N",
|
||||
@@ -161,14 +164,15 @@ const WelcomeEventPanel = ({ spotlightId }) => {
|
||||
dispatch(setShowPopup(Config.ACTIVE_POPUP.alertPopup));
|
||||
}
|
||||
}, [
|
||||
billCpnSno,
|
||||
dispatch,
|
||||
eventDatas,
|
||||
eventInfo,
|
||||
eventInfo?.evntId,
|
||||
eventInfo?.evntNm,
|
||||
eventInfo?.shptmLnkInfo?.lnkCurationId,
|
||||
eventInfo?.shptmLnkInfo?.lnkLgCatCd,
|
||||
eventInfo?.shptmLnkInfo?.lnkPatnrId,
|
||||
eventIssuedStatusSuccess,
|
||||
evntTpCd,
|
||||
sendLogShopByMobile,
|
||||
userNumber,
|
||||
eventIssuedStatusSuccess,
|
||||
]);
|
||||
|
||||
const onClose = useCallback(() => {
|
||||
@@ -305,6 +309,13 @@ const WelcomeEventPanel = ({ spotlightId }) => {
|
||||
dispatch(alertToast($L("Downloading coupon complete.")));
|
||||
}, [dispatch]);
|
||||
|
||||
const closePanelAndNavigate = useCallback(() => {
|
||||
dispatch(popPanel(Config.panel_names.WELCOME_EVENT_PANEL));
|
||||
if (shptmLnkInfo?.shptmLnkTpCd) {
|
||||
navigateToLinkByTypeCode();
|
||||
}
|
||||
}, [dispatch, navigateToLinkByTypeCode, shptmLnkInfo]);
|
||||
|
||||
useEffect(() => {
|
||||
// EVT00101 & EVT00103 Welcome & Welcome+Priczes 이벤트
|
||||
if (regDeviceInfoData && regDeviceInfoData?.retCode === 0) {
|
||||
@@ -313,7 +324,7 @@ const WelcomeEventPanel = ({ spotlightId }) => {
|
||||
}
|
||||
}
|
||||
return;
|
||||
}, [dispatch, regDeviceInfoData, couponDownloadSuccess, activePopup]);
|
||||
}, [activePopup, closePanelAndNavigate, regDeviceInfoData]);
|
||||
|
||||
useEffect(() => {
|
||||
// EVT00106 Welcome Billing Coupon Event 이벤트
|
||||
@@ -323,14 +334,12 @@ const WelcomeEventPanel = ({ spotlightId }) => {
|
||||
closePanelAndNavigate();
|
||||
}
|
||||
}
|
||||
}, [dispatch, couponDownloadSuccess, shptmLnkInfo, activePopup]);
|
||||
|
||||
const closePanelAndNavigate = useCallback(() => {
|
||||
dispatch(popPanel(Config.panel_names.WELCOME_EVENT_PANEL));
|
||||
if (shptmLnkInfo?.shptmLnkTpCd) {
|
||||
navigateToLinkByTypeCode();
|
||||
}
|
||||
}, [shptmLnkInfo, dispatch]);
|
||||
}, [
|
||||
closePanelAndNavigate,
|
||||
couponDownloadSuccess,
|
||||
toastAlertMessage,
|
||||
webOSVersion,
|
||||
]);
|
||||
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
@@ -404,7 +413,7 @@ const WelcomeEventPanel = ({ spotlightId }) => {
|
||||
className={css.tab}
|
||||
selectedIndex={0}
|
||||
contents={[$L("Terms & Conditions")]}
|
||||
spotlightDisabled={true}
|
||||
spotlightDisabled
|
||||
/>
|
||||
|
||||
<TButtonScroller
|
||||
|
||||
Reference in New Issue
Block a user