[CheckoutPanel, ConfirmPanel] IF-LGSP-LOG-005 (GNB), 반영
This commit is contained in:
@@ -108,6 +108,7 @@ export default function useLogService() {
|
|||||||
const sendLogVOD = useCallback(
|
const sendLogVOD = useCallback(
|
||||||
(params) => {
|
(params) => {
|
||||||
// todo pyh, add case return
|
// todo pyh, add case return
|
||||||
|
// const { watchStrtDt } = params;
|
||||||
|
|
||||||
const newParams = {
|
const newParams = {
|
||||||
...params,
|
...params,
|
||||||
@@ -270,7 +271,7 @@ export default function useLogService() {
|
|||||||
dispatch({ type: types.SET_GNB_MENU, payload: menu });
|
dispatch({ type: types.SET_GNB_MENU, payload: menu });
|
||||||
dispatch(postLog(newParams));
|
dispatch(postLog(newParams));
|
||||||
},
|
},
|
||||||
[dispatch]
|
[dispatch, menuMovSnoRef, nowMenuRef]
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -276,6 +276,7 @@ export const LOG_MENU = {
|
|||||||
FULL_LIVE_CHANNELS: "Full/Live Channels", // completed
|
FULL_LIVE_CHANNELS: "Full/Live Channels", // completed
|
||||||
FULL_FEATURED_SHOWS: "Full/Featured Shows", // completed
|
FULL_FEATURED_SHOWS: "Full/Featured Shows", // completed
|
||||||
|
|
||||||
CHECKOUT_PIN_CODE: "Checkout/PIN Code",
|
CHECKOUT: "Checkout/Checkout", // pyh todo, 문의, completed
|
||||||
CHECKOUT_ORDER_COMPLETE: "Checkout/Order Complete",
|
CHECKOUT_PIN_CODE: "Checkout/PIN Code", // completed
|
||||||
|
CHECKOUT_ORDER_COMPLETE: "Checkout/Order Complete", // completed
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import THeader from "../../components/THeader/THeader";
|
|||||||
import TPanel from "../../components/TPanel/TPanel";
|
import TPanel from "../../components/TPanel/TPanel";
|
||||||
import TPopUp from "../../components/TPopUp/TPopUp";
|
import TPopUp from "../../components/TPopUp/TPopUp";
|
||||||
import TQRCode from "../../components/TQRCode/TQRCode";
|
import TQRCode from "../../components/TQRCode/TQRCode";
|
||||||
|
import useLogService from "../../hooks/useLogService";
|
||||||
import useScrollTo from "../../hooks/useScrollTo";
|
import useScrollTo from "../../hooks/useScrollTo";
|
||||||
import * as Config from "../../utils/Config";
|
import * as Config from "../../utils/Config";
|
||||||
import { $L, scaleH, scaleW } from "../../utils/helperMethods";
|
import { $L, scaleH, scaleW } from "../../utils/helperMethods";
|
||||||
@@ -37,6 +38,7 @@ import OrderItemsSideBar from "./container/OrderItemsSideBar";
|
|||||||
import SummaryContainer from "./container/SummaryCotainer";
|
import SummaryContainer from "./container/SummaryCotainer";
|
||||||
|
|
||||||
export default function CheckOutPanel() {
|
export default function CheckOutPanel() {
|
||||||
|
const { sendLogGNB } = useLogService();
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const panels = useSelector((state) => state.panels.panels);
|
const panels = useSelector((state) => state.panels.panels);
|
||||||
const { userNumber } = useSelector(
|
const { userNumber } = useSelector(
|
||||||
@@ -76,6 +78,18 @@ export default function CheckOutPanel() {
|
|||||||
|
|
||||||
const spotJob = useRef(new Job((func) => func(), 0));
|
const spotJob = useRef(new Job((func) => func(), 0));
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
let nowMenu;
|
||||||
|
|
||||||
|
if (!placeOrderPopup || popupVisible) {
|
||||||
|
nowMenu = Config.LOG_MENU.CHECKOUT;
|
||||||
|
} else if (placeOrderPopup) {
|
||||||
|
nowMenu = Config.LOG_MENU.CHECKOUT_PIN_CODE;
|
||||||
|
}
|
||||||
|
|
||||||
|
sendLogGNB(nowMenu);
|
||||||
|
}, [placeOrderPopup, popupVisible, sendLogGNB]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
isMounted.current = true;
|
isMounted.current = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,20 @@
|
|||||||
import React, { useCallback } from "react";
|
import React, { useCallback, useEffect } from "react";
|
||||||
|
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
|
|
||||||
import { popPanel, pushPanel, resetPanels } from "../../actions/panelActions";
|
import { popPanel, pushPanel, resetPanels } from "../../actions/panelActions";
|
||||||
import TButton from "../../components/TButton/TButton";
|
import TButton from "../../components/TButton/TButton";
|
||||||
import TPanel from "../../components/TPanel/TPanel";
|
import TPanel from "../../components/TPanel/TPanel";
|
||||||
|
import useLogService from "../../hooks/useLogService";
|
||||||
import * as Config from "../../utils/Config";
|
import * as Config from "../../utils/Config";
|
||||||
import { $L } from "../../utils/helperMethods";
|
import { $L } from "../../utils/helperMethods";
|
||||||
import css from "./ConfirmPanel.module.less";
|
import css from "./ConfirmPanel.module.less";
|
||||||
|
|
||||||
export default function ConfirmPanel({ spotlightId }) {
|
export default function ConfirmPanel({ spotlightId }) {
|
||||||
|
const { sendLogGNB } = useLogService();
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
|
const popupVisible = useSelector((state) => state.common.popup.popupVisible);
|
||||||
const panels = useSelector((state) => state.panels.panels);
|
const panels = useSelector((state) => state.panels.panels);
|
||||||
const panelInfo = panels.find(
|
const panelInfo = panels.find(
|
||||||
(panel) => panel.name === "confirmpanel"
|
(panel) => panel.name === "confirmpanel"
|
||||||
@@ -40,6 +43,12 @@ export default function ConfirmPanel({ spotlightId }) {
|
|||||||
} = panelInfo?.orderInfo || {};
|
} = panelInfo?.orderInfo || {};
|
||||||
const auctProdYn = panelInfo?.auctProdYn || {};
|
const auctProdYn = panelInfo?.auctProdYn || {};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!popupVisible) {
|
||||||
|
sendLogGNB(Config.LOG_MENU.CHECKOUT_ORDER_COMPLETE);
|
||||||
|
}
|
||||||
|
}, [popupVisible, sendLogGNB]);
|
||||||
|
|
||||||
const handleCancel = useCallback((e) => {
|
const handleCancel = useCallback((e) => {
|
||||||
if (e && typeof e.preventDefault === "function") {
|
if (e && typeof e.preventDefault === "function") {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|||||||
Reference in New Issue
Block a user