diff --git a/com.twin.app.shoptime/src/actions/couponActions.js b/com.twin.app.shoptime/src/actions/couponActions.js index 66159bbe..03b0410c 100644 --- a/com.twin.app.shoptime/src/actions/couponActions.js +++ b/com.twin.app.shoptime/src/actions/couponActions.js @@ -38,11 +38,21 @@ export const getProductCouponTotDownload = (props) => (dispatch, getState) => { const onSuccess = (response) => { console.log("getProductCouponTotDownload onSuccess ", response.data); - - dispatch({ - type: types.GET_PRODUCT_COUPON_TOTDOWNLOAD, - payload: response.data.data, - }); + if(response.data.retCode === 0){ + dispatch({ + type: types.GET_PRODUCT_COUPON_TOTDOWNLOAD, + payload: response.data.data, + }); + } else { + dispatch( + showError( + response.data.retCode, + response.data.retMsg, + false, + response.data.retDetailCode + ) + ); + } }; const onFail = (error) => { diff --git a/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx b/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx index b0e8ae92..68dbf77f 100644 --- a/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx +++ b/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx @@ -366,7 +366,7 @@ export default function ProductAllSection({ dispatch( getProductCouponDownload({ mbrNo: userNumber, cpnSno: cpnSno }) ); - }; + }; return ( onFocus(index)} onBlur={onBlur} - onClick={handleDownloadClick} + onClick={downloadYn === "N" ? null : handleDownloadClick} >
-
0 && - downloadCouponArr.includes(cpnSno) && - css.disable, - downloadYn === "N" && css.disable, - duplDwldYn === "N" && downloadYn === "Y" && css.disable, - !downloadCouponArr.includes(cpnSno) && - index === selectedCouponIndex && - focused && - css.focused - )} - aria-label="Download Button" - > - {downloadCouponArr.length > 0 && - downloadCouponArr.includes(cpnSno) - ? $L("DOWNLOAD COMPLETED") - : $L("DOWNLOAD")} -
+ {downloadYn !== "N" && ( +
0 && + downloadCouponArr.includes(cpnSno) && + css.disable, + duplDwldYn === "N" && downloadYn === "Y" && css.disable, + !downloadCouponArr.includes(cpnSno) && + index === selectedCouponIndex && + focused && + css.focused + )} + aria-label="Download Button" + > + {downloadCouponArr.length > 0 && + downloadCouponArr.includes(cpnSno) + ? $L("DOWNLOAD COMPLETED") + : $L("DOWNLOAD")} +
+ )}
);