핫픽스쿠폰수정
This commit is contained in:
@@ -1,43 +1,62 @@
|
||||
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
||||
import React, {
|
||||
useCallback,
|
||||
useEffect,
|
||||
useMemo,
|
||||
useState,
|
||||
} from 'react';
|
||||
|
||||
import classNames from "classnames";
|
||||
import classNames from 'classnames';
|
||||
import {
|
||||
AsYouTypeFormatter,
|
||||
PhoneNumberFormat,
|
||||
PhoneNumberUtil,
|
||||
} from "google-libphonenumber";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
} from 'google-libphonenumber';
|
||||
import {
|
||||
useDispatch,
|
||||
useSelector,
|
||||
} from 'react-redux';
|
||||
|
||||
import { off, on } from "@enact/core/dispatcher";
|
||||
import { SpotlightContainerDecorator } from "@enact/spotlight/SpotlightContainerDecorator";
|
||||
import { Spottable } from "@enact/spotlight/Spottable";
|
||||
import {
|
||||
off,
|
||||
on,
|
||||
} from '@enact/core/dispatcher';
|
||||
import {
|
||||
SpotlightContainerDecorator,
|
||||
} from '@enact/spotlight/SpotlightContainerDecorator';
|
||||
import { Spottable } from '@enact/spotlight/Spottable';
|
||||
|
||||
import defaultImage from "../../../assets/images/img-thumb-empty-144@3x.png";
|
||||
import { types } from "../../actions/actionTypes";
|
||||
import { clearSMS, sendSms } from "../../actions/appDataActions";
|
||||
import defaultImage from '../../../assets/images/img-thumb-empty-144@3x.png';
|
||||
import { types } from '../../actions/actionTypes';
|
||||
import {
|
||||
clearSMS,
|
||||
sendSms,
|
||||
} from '../../actions/appDataActions';
|
||||
import {
|
||||
changeLocalSettings,
|
||||
setHidePopup,
|
||||
setShowPopup,
|
||||
} from "../../actions/commonActions";
|
||||
} from '../../actions/commonActions';
|
||||
import {
|
||||
clearRegisterDeviceInfo,
|
||||
getDeviceAdditionInfo,
|
||||
registerDeviceInfo,
|
||||
} from "../../actions/deviceActions";
|
||||
} from '../../actions/deviceActions';
|
||||
import {
|
||||
clearCurationCoupon,
|
||||
setEventIssueReq,
|
||||
} from "../../actions/eventActions";
|
||||
import useLogService from "../../hooks/useLogService";
|
||||
import { ACTIVE_POPUP, LOG_TP_NO } from "../../utils/Config";
|
||||
import { $L } from "../../utils/helperMethods";
|
||||
import CustomImage from "../CustomImage/CustomImage";
|
||||
import TButton from "../TButton/TButton";
|
||||
import TPopUp from "../TPopUp/TPopUp";
|
||||
import HistoryPhoneNumber from "./HistoryPhoneNumber/HistoryPhoneNumber";
|
||||
import css from "./MobileSendPopUp.module.less";
|
||||
import SMSNumKeyPad from "./SMSNumKeyPad";
|
||||
} from '../../actions/eventActions';
|
||||
import useLogService from '../../hooks/useLogService';
|
||||
import {
|
||||
ACTIVE_POPUP,
|
||||
LOG_TP_NO,
|
||||
} from '../../utils/Config';
|
||||
import { $L } from '../../utils/helperMethods';
|
||||
import CustomImage from '../CustomImage/CustomImage';
|
||||
import TButton from '../TButton/TButton';
|
||||
import TPopUp from '../TPopUp/TPopUp';
|
||||
import HistoryPhoneNumber from './HistoryPhoneNumber/HistoryPhoneNumber';
|
||||
import css from './MobileSendPopUp.module.less';
|
||||
import SMSNumKeyPad from './SMSNumKeyPad';
|
||||
|
||||
const Container = SpotlightContainerDecorator(
|
||||
{ enterTo: "last-focused" },
|
||||
@@ -73,6 +92,7 @@ export default function MobileSendPopUp({
|
||||
const [keyPadOff, setKeyPadOff] = useState(false);
|
||||
const [smsRetCode, setSmsRetCode] = useState(undefined);
|
||||
const [chkAgreeBtn, setChkAgreeBtn] = useState(false);
|
||||
const [popText, setPopText] = useState(false);
|
||||
const { httpHeader } = useSelector((state) => state.common);
|
||||
const regDeviceInfoRetCode = useSelector(
|
||||
(state) => state.device?.regDeviceInfoData?.retCode
|
||||
@@ -335,6 +355,16 @@ export default function MobileSendPopUp({
|
||||
})
|
||||
);
|
||||
}
|
||||
if (evntTpCd === "EVT00102") {
|
||||
dispatch(
|
||||
setEventIssueReq({
|
||||
evntTpCd,
|
||||
evntId,
|
||||
mbphNo: naturalNumber,
|
||||
cntryCd: deviceCountryCode,
|
||||
})
|
||||
);
|
||||
}
|
||||
}, [
|
||||
dispatch,
|
||||
mobileNumber,
|
||||
@@ -463,7 +493,6 @@ export default function MobileSendPopUp({
|
||||
const retCodeError =
|
||||
(smsRetCode !== undefined && smsRetCode !== 0) ||
|
||||
(curationCouponSuccess !== undefined && curationCouponSuccess !== 0);
|
||||
|
||||
return (
|
||||
<>
|
||||
{smsRetCode === undefined &&
|
||||
|
||||
@@ -4,59 +4,66 @@ 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 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 { clearSMS } from "../../actions/appDataActions";
|
||||
import { clearSMS } from '../../actions/appDataActions';
|
||||
import {
|
||||
alertToast,
|
||||
setHidePopup,
|
||||
setShowPopup,
|
||||
} from "../../actions/commonActions";
|
||||
} from '../../actions/commonActions';
|
||||
import {
|
||||
clearGetProductCouponDownload,
|
||||
getProductCouponDownload,
|
||||
} from "../../actions/couponActions";
|
||||
import { setEventIssueReq } from "../../actions/eventActions";
|
||||
import { getThemeCurationInfo } from "../../actions/homeActions";
|
||||
} from '../../actions/couponActions';
|
||||
import { setEventIssueReq } from '../../actions/eventActions';
|
||||
import { getThemeCurationInfo } from '../../actions/homeActions';
|
||||
import {
|
||||
popPanel,
|
||||
pushPanel,
|
||||
resetPanels,
|
||||
updatePanel,
|
||||
} from "../../actions/panelActions";
|
||||
} from '../../actions/panelActions';
|
||||
import {
|
||||
finishVideoPreview,
|
||||
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 { launchMembershipApp } from "../../lunaSend";
|
||||
import * as Config from "../../utils/Config";
|
||||
import { LOG_TP_NO, panel_names } from "../../utils/Config";
|
||||
import { $L } from "../../utils/helperMethods";
|
||||
import { SpotlightIds } from "../../utils/SpotlightIds";
|
||||
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/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 { launchMembershipApp } from '../../lunaSend';
|
||||
import * as Config from '../../utils/Config';
|
||||
import {
|
||||
LOG_TP_NO,
|
||||
panel_names,
|
||||
} from '../../utils/Config';
|
||||
import { $L } from '../../utils/helperMethods';
|
||||
import { SpotlightIds } from '../../utils/SpotlightIds';
|
||||
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");
|
||||
|
||||
@@ -379,14 +386,19 @@ export default function HotPicksPanel({ panelInfo, isOnTop, spotlightId }) {
|
||||
}
|
||||
}, [webOSVersion]);
|
||||
|
||||
const handlePopupOpen = useCallback(
|
||||
(patnrId, curationId, evntId, evntTpCd, eventInfoV2) => {
|
||||
useEffect(() => {
|
||||
if (activePopup !== "hotPicksSmsPopup") {
|
||||
setSmsTpCode("");
|
||||
setIsCurationEvnt(false);
|
||||
setPopPatnrId(null);
|
||||
setPopCurationId(null);
|
||||
setPopEvntId(null);
|
||||
setPopEventInfo(null);
|
||||
}
|
||||
}, [activePopup]);
|
||||
|
||||
const handlePopupOpen = useCallback(
|
||||
(patnrId, curationId, evntId, evntTpCd, eventInfoV2) => {
|
||||
//coupon
|
||||
if (eventInfoV2 && eventInfoV2.evntTpCd === "EVT00102") {
|
||||
setIsCurationEvnt(true);
|
||||
|
||||
@@ -138,7 +138,7 @@ export default function TCFI({
|
||||
})
|
||||
);
|
||||
} else {
|
||||
changePop(patnrId, curationId, evntId, evntTpCd, eventInfoV2);
|
||||
changePop(patnrId, curationId, evntId, evntTpCd, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user