[MobileSendPopUp] SHOPTIME- 2757

- RUC 일 때 +7이 화면에 자동으로 표시 처리
- spotlightId props 추가
- RUC 자동 포맷팅으로 앞에 8 추가 되어 sms 송신 오류 현상 수정
This commit is contained in:
jiwon93.son
2024-07-02 16:54:47 +09:00
parent 0f521ae2a8
commit 50b0825383
2 changed files with 17 additions and 3 deletions

View File

@@ -71,6 +71,7 @@ export default function MobileSendPopUp({
hotelNm,
hotelDtlUrl,
shopByMobileLogRef,
spotlightId,
}) {
const { sendLogShopByMobile } = useLogService();
const deviceInfo = useSelector((state) => state.device.deviceInfo);
@@ -106,7 +107,7 @@ export default function MobileSendPopUp({
} else return 10;
}, []);
const MSG_SUCCESS_SENT = $L("Text Send") + " " + mobileNumber;
const MSG_SUCCESS_SENT = $L("Text Send to") + " " + mobileNumber;
const MSG_SEND_LINK = $L("Send a purchase link for this item via SMS");
const handleClickSelect = (_phoneNumber) => {
@@ -141,6 +142,9 @@ export default function MobileSendPopUp({
numberProto,
PhoneNumberFormat.NATIONAL
);
if (deviceCountryCode === "RU" && rawPhoneNumber.startsWith("8")) {
rawPhoneNumber = rawPhoneNumber.substring(1);
}
} else {
let formattedNumber = "";
@@ -396,7 +400,9 @@ export default function MobileSendPopUp({
sendLogShopByMobile(params);
shopByMobileLogRef.current = null;
Spotlight.focus();
if (spotlightId) {
Spotlight.focus(spotlightId);
} else Spotlight.focus();
}
}, 3000);
@@ -408,6 +414,7 @@ export default function MobileSendPopUp({
smsRetCodeResData,
regDeviceInfoRetCode,
curationCouponSuccess,
spotlightId,
]);
useEffect(() => {
@@ -542,7 +549,10 @@ export default function MobileSendPopUp({
onClick={handleInputClick}
spotlightDisabled={spotlightDisabled}
>
{mobileNumber}
{deviceCountryCode === "RU" && (
<span className={css.rucInput}>{"+7 "}</span>
)}
<span>{mobileNumber}</span>
</SpottableComponent>
</InputContainer>
{keyPadOff ? (