Merge resolve conflicts
This commit is contained in:
@@ -20,7 +20,10 @@ import {
|
|||||||
setShowPopup,
|
setShowPopup,
|
||||||
} from '../../../actions/commonActions';
|
} from '../../../actions/commonActions';
|
||||||
import { sendLogTotalRecommend } from '../../../actions/logActions';
|
import { sendLogTotalRecommend } from '../../../actions/logActions';
|
||||||
import { popPanel } from '../../../actions/panelActions';
|
import {
|
||||||
|
popPanel,
|
||||||
|
pushPanel,
|
||||||
|
} from '../../../actions/panelActions';
|
||||||
import TButton from '../../../components/TButton/TButton';
|
import TButton from '../../../components/TButton/TButton';
|
||||||
import TPopUp from '../../../components/TPopUp/TPopUp';
|
import TPopUp from '../../../components/TPopUp/TPopUp';
|
||||||
import TQRCode from '../../../components/TQRCode/TQRCode';
|
import TQRCode from '../../../components/TQRCode/TQRCode';
|
||||||
@@ -249,13 +252,25 @@ export default function InformationContainer({
|
|||||||
);
|
);
|
||||||
|
|
||||||
const handleCancel = useCallback(() => {
|
const handleCancel = useCallback(() => {
|
||||||
dispatch(setHidePopup());
|
// dispatch(setHidePopup());
|
||||||
}, [dispatch]);
|
const { patnrId, prdtId } = checkoutData.productList[0];
|
||||||
|
|
||||||
const handleDone = useCallback(() => {
|
|
||||||
dispatch(setHidePopup());
|
|
||||||
dispatch(popPanel());
|
dispatch(popPanel());
|
||||||
}, [dispatch]);
|
dispatch(
|
||||||
|
pushPanel({
|
||||||
|
name: Config.panel_names.DETAIL_PANEL,
|
||||||
|
panelInfo: { patnrId, prdtId },
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}, [dispatch, checkoutData]);
|
||||||
|
|
||||||
|
const { shippingAddressList, billingAddressList, cardInfo } = checkoutData || {};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!shippingAddressList || !billingAddressList || !cardInfo) {
|
||||||
|
// if (shippingAddressList || billingAddressList || cardInfo) { //확인용도로 반대로 테스트중.
|
||||||
|
dispatch(setShowPopup(Config.ACTIVE_POPUP.qrPopup));
|
||||||
|
}
|
||||||
|
}, [shippingAddressList, billingAddressList, cardInfo, dispatch])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -282,8 +297,8 @@ export default function InformationContainer({
|
|||||||
>
|
>
|
||||||
ADD/EDIT
|
ADD/EDIT
|
||||||
</TButton>
|
</TButton>
|
||||||
{checkoutData?.shippingAddressList && (
|
{shippingAddressList && (
|
||||||
<ShippingAddressCard list={checkoutData.shippingAddressList} onFocus={handleFocus} />
|
<ShippingAddressCard list={shippingAddressList} onFocus={handleFocus} />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className={css.listBox}>
|
<div className={css.listBox}>
|
||||||
@@ -300,8 +315,8 @@ export default function InformationContainer({
|
|||||||
{/* <div style={{ padding: '10px', textAlign: 'center', color: '#999' }}>
|
{/* <div style={{ padding: '10px', textAlign: 'center', color: '#999' }}>
|
||||||
Mock Billing Address
|
Mock Billing Address
|
||||||
</div> */}
|
</div> */}
|
||||||
{checkoutData?.billingAddressList && (
|
{billingAddressList && (
|
||||||
<BillingAddressCard list={checkoutData.billingAddressList} onFocus={handleFocus} />
|
<BillingAddressCard list={billingAddressList} onFocus={handleFocus} />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className={css.listBox}>
|
<div className={css.listBox}>
|
||||||
@@ -314,7 +329,7 @@ export default function InformationContainer({
|
|||||||
>
|
>
|
||||||
ADD/EDIT
|
ADD/EDIT
|
||||||
</TButton>
|
</TButton>
|
||||||
{checkoutData?.cardInfo && <PaymentCard list={checkoutData.cardInfo} />}
|
{cardInfo && <PaymentCard list={cardInfo} />}
|
||||||
</div>
|
</div>
|
||||||
<div className={css.listBox}>
|
<div className={css.listBox}>
|
||||||
<Subject title="OFFERS & PROMOTION" />
|
<Subject title="OFFERS & PROMOTION" />
|
||||||
@@ -355,7 +370,7 @@ export default function InformationContainer({
|
|||||||
'Please update your information and complete the payment on your mobile. By clicking the OK button, you will be redirected to the product details page'
|
'Please update your information and complete the payment on your mobile. By clicking the OK button, you will be redirected to the product details page'
|
||||||
)}
|
)}
|
||||||
</h3>
|
</h3>
|
||||||
<TButton className={css.popupBtn} onClick={handleDone}>
|
<TButton className={css.popupBtn} onClick={handleCancel}>
|
||||||
{$L('OK')}
|
{$L('OK')}
|
||||||
</TButton>
|
</TButton>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,6 +9,12 @@ import usePriceInfo from '../../../../../hooks/usePriceInfo';
|
|||||||
import { $L } from '../../../../../utils/helperMethods';
|
import { $L } from '../../../../../utils/helperMethods';
|
||||||
import css from './ShopByMobilePriceDisplay.module.less';
|
import css from './ShopByMobilePriceDisplay.module.less';
|
||||||
|
|
||||||
|
// 파트너명에서 "Peacock | Shop The Moment" 형식일 때 "Peacock"만 추출
|
||||||
|
const extractPartnerName = (name) => {
|
||||||
|
if (!name) return name;
|
||||||
|
return name.includes(' | ') ? name.split(' | ')[0].trim() : name;
|
||||||
|
};
|
||||||
|
|
||||||
export default function ShopByMobilePriceDisplay({
|
export default function ShopByMobilePriceDisplay({
|
||||||
priceData,
|
priceData,
|
||||||
priceInfo,
|
priceInfo,
|
||||||
@@ -26,6 +32,10 @@ export default function ShopByMobilePriceDisplay({
|
|||||||
orderPhnNo,
|
orderPhnNo,
|
||||||
} = priceData;
|
} = priceData;
|
||||||
|
|
||||||
|
// 파트너명 정규화
|
||||||
|
const cleanPatncNm = useMemo(() => extractPartnerName(patncNm), [patncNm]);
|
||||||
|
const cleanPatnrName = useMemo(() => extractPartnerName(patnrName), [patnrName]);
|
||||||
|
|
||||||
const {
|
const {
|
||||||
discountRate,
|
discountRate,
|
||||||
rewardFlag,
|
rewardFlag,
|
||||||
@@ -50,6 +60,8 @@ export default function ShopByMobilePriceDisplay({
|
|||||||
[isOriginalPriceEmpty, isDiscountedPriceEmpty, price5, offerInfo]
|
[isOriginalPriceEmpty, isDiscountedPriceEmpty, price5, offerInfo]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const renderPriceItem = useCallback(() => {
|
const renderPriceItem = useCallback(() => {
|
||||||
if (priceData && !promotionCode) {
|
if (priceData && !promotionCode) {
|
||||||
if (rewd) {
|
if (rewd) {
|
||||||
@@ -57,9 +69,9 @@ export default function ShopByMobilePriceDisplay({
|
|||||||
<div className={css.wrapper}>
|
<div className={css.wrapper}>
|
||||||
<div className={css.rewdTopLayer}>
|
<div className={css.rewdTopLayer}>
|
||||||
<span>
|
<span>
|
||||||
{patncNm
|
{cleanPatncNm
|
||||||
? patncNm + " " + $L("Price") + " "
|
? cleanPatncNm + " " + $L("Price") + " "
|
||||||
: patnrName + " " + $L("Price") + " "}
|
: cleanPatnrName + " " + $L("Price") + " "}
|
||||||
</span>
|
</span>
|
||||||
<span className={css.partnerPrc}>
|
<span className={css.partnerPrc}>
|
||||||
{TYPE_CASE.case5 || TYPE_CASE.case8
|
{TYPE_CASE.case5 || TYPE_CASE.case8
|
||||||
@@ -95,9 +107,9 @@ export default function ShopByMobilePriceDisplay({
|
|||||||
return (
|
return (
|
||||||
<div className={css.wrapper}>
|
<div className={css.wrapper}>
|
||||||
<span className={css.name}>
|
<span className={css.name}>
|
||||||
{patncNm
|
{cleanPatncNm
|
||||||
? patncNm + " " + $L("Price")
|
? cleanPatncNm + " " + $L("Price")
|
||||||
: patnrName + " " + $L("Price")}
|
: cleanPatnrName + " " + $L("Price")}
|
||||||
</span>
|
</span>
|
||||||
<div className={css.btmLayer}>
|
<div className={css.btmLayer}>
|
||||||
<span className={classNames(css.price, css.case01)}>
|
<span className={classNames(css.price, css.case01)}>
|
||||||
@@ -111,9 +123,9 @@ export default function ShopByMobilePriceDisplay({
|
|||||||
<div className={css.wrapper}>
|
<div className={css.wrapper}>
|
||||||
<div className={css.topLayer}>
|
<div className={css.topLayer}>
|
||||||
<span className={css.name}>
|
<span className={css.name}>
|
||||||
{patncNm
|
{cleanPatncNm
|
||||||
? patncNm + " " + $L("Price")
|
? cleanPatncNm + " " + $L("Price")
|
||||||
: patnrName + $L("Price")}
|
: cleanPatnrName + $L("Price")}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{discountRate && Number(discountRate.replace("%", "")) > 4 && (
|
{discountRate && Number(discountRate.replace("%", "")) > 4 && (
|
||||||
@@ -140,9 +152,9 @@ export default function ShopByMobilePriceDisplay({
|
|||||||
<div className={css.wrapper}>
|
<div className={css.wrapper}>
|
||||||
<div className={css.topLayer}>
|
<div className={css.topLayer}>
|
||||||
<span className={css.name}>
|
<span className={css.name}>
|
||||||
{patncNm
|
{cleanPatncNm
|
||||||
? patncNm + " " + $L("Price")
|
? cleanPatncNm + " " + $L("Price")
|
||||||
: patnrName + " " + $L("Price")}
|
: cleanPatnrName + " " + $L("Price")}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{discountRate && Number(discountRate.replace("%", "")) > 4 && (
|
{discountRate && Number(discountRate.replace("%", "")) > 4 && (
|
||||||
@@ -194,7 +206,7 @@ export default function ShopByMobilePriceDisplay({
|
|||||||
return (
|
return (
|
||||||
<div className={css.wrapper}>
|
<div className={css.wrapper}>
|
||||||
<span className={css.partnerName}>
|
<span className={css.partnerName}>
|
||||||
{patncNm ? patncNm + " " + $L("Price") : patnrName + $L("Price")}
|
{cleanPatncNm ? cleanPatncNm + " " + $L("Price") : cleanPatnrName + $L("Price")}
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
className={css.offerInfo}
|
className={css.offerInfo}
|
||||||
@@ -204,7 +216,8 @@ export default function ShopByMobilePriceDisplay({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}, [
|
}, [
|
||||||
patnrName,
|
cleanPatnrName,
|
||||||
|
cleanPatncNm,
|
||||||
priceInfo,
|
priceInfo,
|
||||||
isOriginalPriceEmpty,
|
isOriginalPriceEmpty,
|
||||||
isDiscountedPriceEmpty,
|
isDiscountedPriceEmpty,
|
||||||
@@ -214,4 +227,4 @@ export default function ShopByMobilePriceDisplay({
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
return <div>{renderPriceItem()}</div>;
|
return <div>{renderPriceItem()}</div>;
|
||||||
}
|
}
|
||||||
@@ -77,7 +77,7 @@ export default function THeaderCustom({
|
|||||||
if(onBackButtonFocus){
|
if(onBackButtonFocus){
|
||||||
onBackButtonFocus();
|
onBackButtonFocus();
|
||||||
}
|
}
|
||||||
},[onBackButtonFocus])
|
},[onBackButtonFocus])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container className={classNames(css.tHeaderCustom, className)} {...rest}>
|
<Container className={classNames(css.tHeaderCustom, className)} {...rest}>
|
||||||
@@ -113,7 +113,7 @@ export default function THeaderCustom({
|
|||||||
marqueeDisabled={marqueeDisabled}
|
marqueeDisabled={marqueeDisabled}
|
||||||
aria-label={ariaLabel}
|
aria-label={ariaLabel}
|
||||||
>
|
>
|
||||||
{prdtId && <span className={css.prdtId}>ID : {prdtId}</span>}
|
{(prdtId && patnrId !== "21") && <span className={css.prdtId}>ID : {prdtId}</span>}
|
||||||
{convertedTitle && (
|
{convertedTitle && (
|
||||||
<span dangerouslySetInnerHTML={{ __html: convertedTitle }} />
|
<span dangerouslySetInnerHTML={{ __html: convertedTitle }} />
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user