[쿠폰] 버튼 처리 및 retcode 0 아닐떄 처리
- 다운로드 쿠폰이 아니면 다운로드 버튼 노출 및 다운 안되도록 변경 - 전체 다운로드시 retcode0 아닐때 노출 처리.
This commit is contained in:
@@ -38,11 +38,21 @@ export const getProductCouponTotDownload = (props) => (dispatch, getState) => {
|
||||
|
||||
const onSuccess = (response) => {
|
||||
console.log("getProductCouponTotDownload onSuccess ", response.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) => {
|
||||
|
||||
@@ -375,7 +375,7 @@ export default function ProductAllSection({
|
||||
{...rest}
|
||||
onFocus={() => onFocus(index)}
|
||||
onBlur={onBlur}
|
||||
onClick={handleDownloadClick}
|
||||
onClick={downloadYn === "N" ? null : handleDownloadClick}
|
||||
>
|
||||
<div
|
||||
className={css.couponItem}
|
||||
@@ -412,13 +412,13 @@ export default function ProductAllSection({
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{downloadYn !== "N" && (
|
||||
<div
|
||||
className={classNames(
|
||||
css.couponBottomButton,
|
||||
downloadCouponArr.length > 0 &&
|
||||
downloadCouponArr.includes(cpnSno) &&
|
||||
css.disable,
|
||||
downloadYn === "N" && css.disable,
|
||||
duplDwldYn === "N" && downloadYn === "Y" && css.disable,
|
||||
!downloadCouponArr.includes(cpnSno) &&
|
||||
index === selectedCouponIndex &&
|
||||
@@ -432,6 +432,7 @@ export default function ProductAllSection({
|
||||
? $L("DOWNLOAD COMPLETED")
|
||||
: $L("DOWNLOAD")}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</SpottableComponent>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user