[MyPagePanel] Log, IF-LGSP-LOG-010, Reminders - Alert on / off 반영

This commit is contained in:
younghoon100.park
2024-05-16 17:20:12 +09:00
parent 41dc727360
commit 3805700576
4 changed files with 52 additions and 2 deletions

View File

@@ -41,6 +41,10 @@ export const getUrlByLogTpNo = (logTpNo) => {
case LOG_TP_NO.PARTNERS:
return URLS.LOG_PARTNERS;
// IF-LGSP-LOG-010 / Reminder - Alert On/Off
case LOG_TP_NO.MY_PAGE.ALERT_FLAG:
return URLS.LOG_MY_PAGE_ALERT_FLAG;
// IF-LGSP-LOG-013 / 검색 이력
case LOG_TP_NO.SEACH:
return URLS.LOG_SEARCH;

View File

@@ -309,6 +309,38 @@ export default function useLogService() {
[dispatch]
);
/**
* IF-LGSP-LOG-010 / Reminder - Alert On/Off
*
* (M) alertFlag 설정 여부, On / Off
*
* (M) entryMenu 진입 메뉴
*
* (M) logTpNo 로그 타입 넘버
*
* (M) nowMenu 현재 메뉴
*/
const sendLogMyPageAlert = useCallback(
(params) => {
const { logTpNo } = params;
const menuMap = {
[LOG_TP_NO.MY_PAGE.ALERT_FLAG]: LOG_MENU.MY_PAGE,
};
const menu = menuMap[logTpNo] || "";
const newParams = {
...params,
entryMenu: menu,
nowMenu: menu,
};
dispatch(postLog(newParams));
},
[dispatch]
);
/**
* IF-LGSP-LOG-013 / 검색 이력
*
@@ -492,6 +524,7 @@ export default function useLogService() {
sendLogCuration,
sendLogGNB,
sendLogShopByMobile,
sendLogMyPageAlert,
sendLogSearch,
sendLogSearchClick,
sendLogPartners,

View File

@@ -117,6 +117,10 @@ export const LOG_TP_NO = {
MY_INFO: {},
MY_PAGE: {
ALERT_FLAG: "250",
},
COUPON: {},
CART: {},
@@ -148,6 +152,8 @@ export const LOG_MENU = {
DETAIL: "Detail",
PLAYER: "Player",
MY_PAGE: "My Page",
LIVE_CHANNELS: "WatchNow/Live Channels",
LIVE_CHANNELS_BANNER: "WatchNow/Live Channels/Banner",
ITEM_ON_THE_SHOW: "WatchNow/SHOP NOW",
@@ -160,7 +166,6 @@ export const LOG_MENU = {
SUB_PAGE: "Sub Page",
SUB_PAGE_UPCOMING: "Sub Page/Upcoming",
MYPAGE: "My Page",
MYPAGE_FAVORITES: "My Page/Favorites",
MYPAGE_MY_INFO: "My Page/My Info",
MYPAGE_RECENTLY_VIEWED: "My Page/Recentry Viewed",

View File

@@ -23,6 +23,7 @@ import { $L } from "../../../../utils/helperMethods";
import { SpotlightIds } from "../../../../utils/SpotlightIds";
import css from "./Reminders.module.less";
import RemindersCard, { SIZES } from "./RemindersCard";
import useLogService from "../../../../hooks/useLogService";
const HeaderButtonContainer = SpotlightContainerDecorator(
{
@@ -32,6 +33,8 @@ const HeaderButtonContainer = SpotlightContainerDecorator(
);
export default function Reminders({ title, cbScrollTo }) {
const { sendLogMyPageAlert } = useLogService();
const dispatch = useDispatch();
const { upComingAlertShow } = useSelector(
@@ -60,7 +63,12 @@ export default function Reminders({ title, cbScrollTo }) {
dispatch(setMyUpcomingUseAlert({ upcomingAlamUseFlag: flag }));
setUseAlarm(!useAlarm);
}, [dispatch, useAlarm]);
sendLogMyPageAlert({
alertFlag: flag === "N" ? "off" : "on",
logTpNo: Config.LOG_TP_NO.MY_PAGE.ALERT_FLAG,
});
}, [dispatch, sendLogMyPageAlert, useAlarm]);
const handleDeleteBtnClick = useCallback(() => {
if (activeDelete) {