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

View File

@@ -87,6 +87,10 @@
font-weight: normal; font-weight: normal;
font-size: 28px; font-size: 28px;
&.rucInput {
margin-right: 8px;
}
&:focus { &:focus {
&::after { &::after {
.focused(); .focused();