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