entry, now 로그 수정

This commit is contained in:
opacity@t-win.kr
2025-09-29 18:09:48 +09:00
parent 64117df3da
commit b701c91989
3 changed files with 33 additions and 22 deletions

View File

@@ -20,7 +20,8 @@ const initialState = {
}, },
broadcast: {}, broadcast: {},
httpHeader: null, httpHeader: null,
isGnbOpened: false, popup: { isGnbOpened: false,
popup: {
popupVisible: false, popupVisible: false,
activePopup: null, activePopup: null,
secondaryPopup: null, secondaryPopup: null,
@@ -32,7 +33,7 @@ const initialState = {
optionalTermsConfirmSelected: false, optionalTermsConfirmSelected: false,
}, },
termsFlag: null, termsFlag: null,
termsLoading: false, // 25.06.16 추가 termsLoading: false, // 25.06.16 추가
introTermsAgree: undefined, // Y, N introTermsAgree: undefined, // Y, N
checkoutTermsAgree: undefined, checkoutTermsAgree: undefined,
useLog: true, useLog: true,
@@ -85,9 +86,9 @@ const initialState = {
// 선택약관 팝업 상태 관리 (TV 환경 최적화) // 선택약관 팝업 상태 관리 (TV 환경 최적화)
optionalTermsPopupFlow: { optionalTermsPopupFlow: {
popupShown: false, // 팝업 표시 여부 popupShown: false, // 팝업 표시 여부
userDecision: null, // 'agreed' | 'declined' | null userDecision: null, // 'agreed' | 'declined' | null
agreedInSession: false, // 세션 내 동의 여부 (로컬 상태 기반) agreedInSession: false, // 세션 내 동의 여부 (로컬 상태 기반)
}, },
}; };
@@ -184,7 +185,8 @@ export const commonReducer = (state = initialState, action) => {
secondaryPopupVisible: false, secondaryPopupVisible: false,
secondaryPopup: null, secondaryPopup: null,
}, },
}; case types.SET_HIDE_SECONDARY_POPUP: };
case types.SET_HIDE_SECONDARY_POPUP:
return { return {
...state, ...state,
popup: { popup: {
@@ -233,8 +235,13 @@ export const commonReducer = (state = initialState, action) => {
} }
case types.GET_TERMS_AGREE_YN_SUCCESS: { case types.GET_TERMS_AGREE_YN_SUCCESS: {
const { privacyTerms, serviceTerms, purchaseTerms, paymentTerms, optionalTerms } = const {
action.payload; privacyTerms,
serviceTerms,
purchaseTerms,
paymentTerms,
optionalTerms,
} = action.payload;
const introTermsAgree = privacyTerms === "Y" && serviceTerms === "Y"; const introTermsAgree = privacyTerms === "Y" && serviceTerms === "Y";
const checkoutTermsAgree = purchaseTerms === "Y" && paymentTerms === "Y"; const checkoutTermsAgree = purchaseTerms === "Y" && paymentTerms === "Y";
@@ -262,9 +269,11 @@ export const commonReducer = (state = initialState, action) => {
case types.GET_HOME_TERMS: { case types.GET_HOME_TERMS: {
const newTermsStatus = { ...state.termsAgreementStatus }; const newTermsStatus = { ...state.termsAgreementStatus };
if (action.payload?.data?.terms) { if (action.payload?.data?.terms) {
action.payload.data.terms.forEach(term => { action.payload.data.terms.forEach((term) => {
if (Object.prototype.hasOwnProperty.call(newTermsStatus, term.trmsTpCd)) { if (
newTermsStatus[term.trmsTpCd] = term.trmsAgrFlag === 'Y'; Object.prototype.hasOwnProperty.call(newTermsStatus, term.trmsTpCd)
) {
newTermsStatus[term.trmsTpCd] = term.trmsAgrFlag === "Y";
} }
}); });
} }
@@ -279,7 +288,7 @@ export const commonReducer = (state = initialState, action) => {
const newTermsStatus = { ...state.termsAgreementStatus }; const newTermsStatus = { ...state.termsAgreementStatus };
// action payload에 담겨온 동의한 약관 코드 리스트를 기반으로 상태 업데이트 // action payload에 담겨온 동의한 약관 코드 리스트를 기반으로 상태 업데이트
if (action.payload?.agreedTermCodes) { if (action.payload?.agreedTermCodes) {
action.payload.agreedTermCodes.forEach(termCode => { action.payload.agreedTermCodes.forEach((termCode) => {
if (Object.prototype.hasOwnProperty.call(newTermsStatus, termCode)) { if (Object.prototype.hasOwnProperty.call(newTermsStatus, termCode)) {
newTermsStatus[termCode] = true; newTermsStatus[termCode] = true;
} }
@@ -288,7 +297,7 @@ export const commonReducer = (state = initialState, action) => {
return { return {
...state, ...state,
termsLoading: false, termsLoading: false,
termsAgreementStatus: newTermsStatus termsAgreementStatus: newTermsStatus,
}; };
} }
case types.SET_MYPAGE_TERMS_AGREE_FAIL: case types.SET_MYPAGE_TERMS_AGREE_FAIL:
@@ -310,7 +319,7 @@ export const commonReducer = (state = initialState, action) => {
...state.termsAgreementStatus, ...state.termsAgreementStatus,
MST00401: true, MST00401: true,
MST00402: true, MST00402: true,
} },
}; };
} else { } else {
return state; return state;
@@ -398,7 +407,7 @@ export const commonReducer = (state = initialState, action) => {
optionalTermsPopupFlow: { optionalTermsPopupFlow: {
...state.optionalTermsPopupFlow, ...state.optionalTermsPopupFlow,
userDecision: action.payload, userDecision: action.payload,
agreedInSession: action.payload === 'agreed', agreedInSession: action.payload === "agreed",
}, },
}; };
} }

View File

@@ -1,4 +1,4 @@
import React, { useCallback, useEffect, useMemo, useRef } from "react"; import React, { use, useCallback, useEffect, useMemo, useRef } from "react";
import { useDispatch, useSelector } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
@@ -96,13 +96,13 @@ export default function ShowOption({
inDt: formatGMTString(new Date()), inDt: formatGMTString(new Date()),
linkTpCd: panelInfo?.linkTpCd ?? "", linkTpCd: panelInfo?.linkTpCd ?? "",
logTpNo: LOG_TP_NO.DETAIL.THEME_DETAIL, logTpNo: LOG_TP_NO.DETAIL.THEME_DETAIL,
patncNm: themeInfo?.patncNm ?? "", patncNm: themeInfo?.productInfos[selectedIndex]?.patncNm ?? "",
patnrId: themeInfo?.patnrId ?? "", patnrId: themeInfo?.productInfos[selectedIndex]?.patnrId ?? "",
}; };
detailLogParamsRef.current = params; detailLogParamsRef.current = params;
return () => dispatch(sendLogDetail(params)); dispatch(sendLogDetail(params));
} }
}, [productData]); }, [productData]);

View File

@@ -361,9 +361,11 @@ const PlayerPanel = ({
prevNowMenuRef.current = nowMenuRef.current; prevNowMenuRef.current = nowMenuRef.current;
return () => dispatch(sendLogGNB(prevNowMenuRef.current)); return () => dispatch(sendLogGNB(prevNowMenuRef.current));
} else if (panelInfo?.modal) {
dispatch(sendLogGNB(entryMenu));
} }
// 통합로그 관련 : al_banner_shown 관련
// else if (panelInfo?.modal) {
// dispatch(sendLogGNB(entryMenu));
// }
}, [panelInfo?.modal, panelInfo?.shptmBanrTpNm]); }, [panelInfo?.modal, panelInfo?.shptmBanrTpNm]);
// creating live log params // creating live log params