[Log] IF-LGSP-LOG-104, My Orders > 취소 사유 Click 반영

This commit is contained in:
younghoon100.park
2024-07-08 10:17:05 +09:00
parent 1387320df0
commit 04e7760ede
4 changed files with 46 additions and 2 deletions

View File

@@ -120,6 +120,9 @@ export const getUrlByLogTpNo = (logTpNo) => {
case LOG_TP_NO.ORDER_BTN_CLICK:
return URLS.LOG_ORDER_BTN_CLICK;
// IF-LGSP-LOG-104 / Order 취소/반품/교환 이력
case LOG_TP_NO.ORDER_CHANGE:
return URLS.LOG_ORDER_CHANGE;
default:
return;
}

View File

@@ -1111,6 +1111,41 @@ export default function useLogService() {
[dispatch, entryMenuRef, nowMenuRef]
);
/**
* IF-LGSP-LOG-104 / Order 취소/반품/교환 이력 (반품/교환 삭제)
*
* (M) entryMenu 진입 메뉴
*
* (M) logTpNo 로그 타입 넘버
*
* (M) nowMenu 현재 메뉴
*
* (M) reqRsn 요청 사유
*
* (M) reqTpNm 요청 유형 이름 ("Cancel", "Return", "Exchange")
*
*/
const sendLogOrderChange = useCallback(
(params) => {
const { reqRsn, reqTpNm } = params;
if (!reqRsn || !reqTpNm) {
console.error("sendLogOrderChange invalid params", params);
return;
}
const newParams = {
...params,
entryMenu: entryMenuRef.current,
logTpNo: LOG_TP_NO.ORDER_CHANGE,
nowMenu: nowMenuRef.current,
};
dispatch(postLog(newParams));
},
[dispatch, entryMenuRef, nowMenuRef]
);
/**
* IF-LGSP-LOG-110 / Featured Brands View 이력
*
@@ -1187,6 +1222,7 @@ export default function useLogService() {
sendLogTerms,
sendLogLgAccountLogin,
sendLogOrderBtnClick,
sendLogOrderChange,
sendLogFeaturedBrands,
};
}

View File

@@ -221,6 +221,8 @@ export const LOG_TP_NO = {
LG_ACCOUNT_LOGIN: "700",
ORDER_BTN_CLICK: "702",
ORDER_CHANGE: "703",
};
// TV log update

View File

@@ -81,7 +81,7 @@ const getButtonTabList = () => {
};
export default function MyOrders({ title, panelInfo, isOnTop }) {
const { sendLogOrderBtnClick } = useLogService();
const { sendLogOrderBtnClick, sendLogOrderChange } = useLogService();
const buttonTabList = useMemo(() => getButtonTabList(), []);
const dispatch = useDispatch();
@@ -405,10 +405,13 @@ export default function MyOrders({ title, panelInfo, isOnTop }) {
const onClickSecondaryPopupOkButton = useCallback(() => {
const params = popup.secondaryData;
const { reqChngRsn: reqRsn } = params;
const reqTpNm = "Cancel";
dispatch(setHidePopup());
dispatch(paymentTotalCancel(params, moveToCancelTab));
}, [dispatch, popup, moveToCancelTab]);
sendLogOrderChange({ reqRsn, reqTpNm });
}, [dispatch, popup, moveToCancelTab, sendLogOrderChange]);
useEffect(() => {
Spotlight.focus();