1. myOrder cancel / focus
2. checkOut QRCode
This commit is contained in:
@@ -10,20 +10,23 @@ import { changeAppStatus, getTermsAgreeYn } from "./commonActions";
|
||||
let getMyinfoOrderSearchKey = null;
|
||||
let lastMyinfoOrderSearchParams = {};
|
||||
export const getMyinfoOrderSearch =
|
||||
(params, orderInfoDataIdx = 1, key, loading = true) =>
|
||||
(params, forceUpdate = false, orderInfoDataIdx = 1, key, loading = true) =>
|
||||
(dispatch, getState) => {
|
||||
const { mbrNo, srchMonth, cancelOrderYn } = params;
|
||||
let limitNum = params.limitNum || GET_MY_INFO_ORDER_SEARCH_LIMIT;
|
||||
|
||||
if (orderInfoDataIdx === 1) {
|
||||
if (
|
||||
JSON.stringify(lastMyinfoOrderSearchParams) === JSON.stringify(params)
|
||||
) {
|
||||
console.log("getMyinfoOrderSearch ignore patch");
|
||||
return;
|
||||
}
|
||||
// if (
|
||||
// JSON.stringify(lastMyinfoOrderSearchParams) ===
|
||||
// JSON.stringify(params) &&
|
||||
// !forceUpdate
|
||||
// ) {
|
||||
// console.log("getMyinfoOrderSearch ignore patch");
|
||||
// return;
|
||||
// }
|
||||
|
||||
lastMyinfoOrderSearchParams = params;
|
||||
dispatch(clearMyinfoOrderSearch());
|
||||
}
|
||||
|
||||
if (loading) {
|
||||
@@ -96,7 +99,17 @@ export const getMyinfoOrderSearch =
|
||||
export const continueGetMyinfoOrderSearch =
|
||||
(orderInfoDataIdx = 2) =>
|
||||
(dispatch, getState) => {
|
||||
const orderInfoData = getState().order.orderInfoData || {};
|
||||
const state = getState();
|
||||
const orderSearchParams = state.order.orderSearchParams;
|
||||
const isCancelOrder = orderSearchParams.cancelOrderYn === "Y";
|
||||
const orderInfoData = isCancelOrder
|
||||
? state.order.cancelOrderInfoData
|
||||
: state.order.orderInfoData;
|
||||
|
||||
if (!orderInfoData || !orderInfoData.orderInfo) {
|
||||
return;
|
||||
}
|
||||
|
||||
const totalCount = orderInfoData.orderInfoCount ?? 0;
|
||||
const startIndex = GET_MY_INFO_ORDER_SEARCH_LIMIT * (orderInfoDataIdx - 1);
|
||||
|
||||
@@ -107,6 +120,7 @@ export const continueGetMyinfoOrderSearch =
|
||||
dispatch(
|
||||
getMyinfoOrderSearch(
|
||||
{ ...lastMyinfoOrderSearchParams },
|
||||
false,
|
||||
orderInfoDataIdx,
|
||||
getMyinfoOrderSearchKey,
|
||||
false
|
||||
@@ -114,7 +128,7 @@ export const continueGetMyinfoOrderSearch =
|
||||
);
|
||||
};
|
||||
|
||||
export const clearMyinfoOrderSearch = () => ({
|
||||
const clearMyinfoOrderSearch = () => ({
|
||||
type: types.CLEAR_MY_INFO_ORDER_SEARCH,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user