ordering-ui-external 14.1.7 → 14.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/{7.ordering-ui.d53641b81f759911f36f.js → 7.ordering-ui.8deae335e250e653c308.js} +1 -1
- package/_bundles/ordering-ui.8deae335e250e653c308.js +2 -0
- package/_modules/components/BusinessesMap/index.js +14 -5
- package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +1 -1
- package/_modules/themes/callcenterOriginal/src/components/AddressForm/index.js +32 -11
- package/_modules/themes/callcenterOriginal/src/components/AddressForm/styles.js +7 -6
- package/_modules/themes/callcenterOriginal/src/components/AddressList/index.js +12 -5
- package/_modules/themes/callcenterOriginal/src/components/AddressList/styles.js +7 -6
- package/_modules/themes/callcenterOriginal/src/components/InputPhoneNumber/styles.js +1 -1
- package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +10 -11
- package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +3 -4
- package/_modules/themes/callcenterOriginal/src/components/SignUpForm/index.js +3 -3
- package/_modules/themes/callcenterOriginal/src/components/UserDetails/index.js +12 -6
- package/_modules/themes/callcenterOriginal/src/components/UserDetails/styles.js +6 -3
- package/_modules/themes/callcenterOriginal/src/styles/Buttons/index.js +5 -6
- package/_modules/themes/five/src/components/AddressDetails/styles.js +2 -2
- package/_modules/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +5 -3
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +14 -2
- package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +1 -1
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +2 -8
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/OrdersSection/index.js +1 -1
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +2 -2
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +1 -1
- package/_modules/themes/five/src/components/Cart/index.js +1 -1
- package/_modules/themes/five/src/components/Cart/styles.js +5 -2
- package/_modules/themes/five/src/components/Checkout/index.js +2 -2
- package/_modules/themes/five/src/components/Checkout/styles.js +5 -4
- package/_modules/themes/five/src/components/OrderDetails/index.js +12 -5
- package/_modules/themes/five/src/components/OrdersOption/styles.js +1 -1
- package/_modules/themes/five/src/components/ProductOptionSubOption/index.js +6 -5
- package/_modules/themes/five/src/components/SingleOrderCard/styles.js +1 -1
- package/_modules/themes/five/src/components/UserDetails/index.js +7 -7
- package/_modules/themes/five/src/components/UserDetails/styles.js +8 -7
- package/_modules/themes/five/src/components/UserFormDetails/index.js +5 -5
- package/package.json +2 -2
- package/src/components/BusinessesMap/index.js +11 -5
- package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +1 -1
- package/src/themes/callcenterOriginal/src/components/AddressForm/index.js +49 -16
- package/src/themes/callcenterOriginal/src/components/AddressForm/styles.js +10 -8
- package/src/themes/callcenterOriginal/src/components/AddressList/index.js +9 -3
- package/src/themes/callcenterOriginal/src/components/AddressList/styles.js +6 -6
- package/src/themes/callcenterOriginal/src/components/InputPhoneNumber/styles.js +1 -1
- package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +6 -8
- package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +1 -1
- package/src/themes/callcenterOriginal/src/components/SignUpForm/index.js +3 -3
- package/src/themes/callcenterOriginal/src/components/UserDetails/index.js +5 -5
- package/src/themes/callcenterOriginal/src/components/UserDetails/styles.js +3 -1
- package/src/themes/callcenterOriginal/src/styles/Buttons/index.js +3 -3
- package/src/themes/five/src/components/AddressDetails/styles.js +2 -4
- package/src/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +3 -2
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +17 -6
- package/src/themes/five/src/components/BusinessBasicInformation/styles.js +6 -1
- package/src/themes/five/src/components/BusinessProductsListing/index.js +2 -9
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/OrdersSection/index.js +1 -1
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +2 -2
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +1 -1
- package/src/themes/five/src/components/Cart/index.js +7 -1
- package/src/themes/five/src/components/Cart/styles.js +6 -0
- package/src/themes/five/src/components/Checkout/index.js +20 -20
- package/src/themes/five/src/components/Checkout/styles.js +8 -0
- package/src/themes/five/src/components/FavoriteList/index.js +9 -8
- package/src/themes/five/src/components/FavoriteList/styles.js +1 -0
- package/src/themes/five/src/components/OrderDetails/index.js +38 -3
- package/src/themes/five/src/components/OrdersOption/styles.js +1 -1
- package/src/themes/five/src/components/ProductOptionSubOption/index.js +2 -1
- package/src/themes/five/src/components/SingleOrderCard/styles.js +1 -1
- package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +1 -1
- package/src/themes/five/src/components/UserDetails/index.js +8 -8
- package/src/themes/five/src/components/UserDetails/styles.js +16 -9
- package/src/themes/five/src/components/UserFormDetails/index.js +2 -4
- package/_bundles/ordering-ui.d53641b81f759911f36f.js +0 -2
- /package/_bundles/{0.ordering-ui.d53641b81f759911f36f.js → 0.ordering-ui.8deae335e250e653c308.js} +0 -0
- /package/_bundles/{1.ordering-ui.d53641b81f759911f36f.js → 1.ordering-ui.8deae335e250e653c308.js} +0 -0
- /package/_bundles/{2.ordering-ui.d53641b81f759911f36f.js → 2.ordering-ui.8deae335e250e653c308.js} +0 -0
- /package/_bundles/{4.ordering-ui.d53641b81f759911f36f.js → 4.ordering-ui.8deae335e250e653c308.js} +0 -0
- /package/_bundles/{5.ordering-ui.d53641b81f759911f36f.js → 5.ordering-ui.8deae335e250e653c308.js} +0 -0
- /package/_bundles/{6.ordering-ui.d53641b81f759911f36f.js → 6.ordering-ui.8deae335e250e653c308.js} +0 -0
- /package/_bundles/{7.ordering-ui.d53641b81f759911f36f.js.LICENSE.txt → 7.ordering-ui.8deae335e250e653c308.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-ui.d53641b81f759911f36f.js → 8.ordering-ui.8deae335e250e653c308.js} +0 -0
- /package/_bundles/{9.ordering-ui.d53641b81f759911f36f.js → 9.ordering-ui.8deae335e250e653c308.js} +0 -0
- /package/_bundles/{ordering-ui.d53641b81f759911f36f.js.LICENSE.txt → ordering-ui.8deae335e250e653c308.js.LICENSE.txt} +0 -0
|
@@ -39,7 +39,8 @@ import {
|
|
|
39
39
|
IconContainer,
|
|
40
40
|
NoValidProductMessage,
|
|
41
41
|
DriverTipContainer,
|
|
42
|
-
SpinnerCart
|
|
42
|
+
SpinnerCart,
|
|
43
|
+
WarningText
|
|
43
44
|
} from './styles'
|
|
44
45
|
import { getCateringValues, verifyDecimals } from '../../../../../utils'
|
|
45
46
|
import BsInfoCircle from '@meronex/icons/bs/BsInfoCircle'
|
|
@@ -660,6 +661,11 @@ const CartUI = (props) => {
|
|
|
660
661
|
/>
|
|
661
662
|
</div>
|
|
662
663
|
)}
|
|
664
|
+
{!cart?.valid_address && cart?.status !== 2 && !isCheckout && (
|
|
665
|
+
<WarningText>
|
|
666
|
+
{t('INVALID_CART_ADDRESS', 'Selected address is invalid, please select a closer address.')}
|
|
667
|
+
</WarningText>
|
|
668
|
+
)}
|
|
663
669
|
{(onClickCheckout || isForceOpenCart) && !isCheckout && cart?.valid && (!isMultiCheckout || isStore || !cart?.business_id) && (
|
|
664
670
|
<CheckoutAction>
|
|
665
671
|
<p>{cart?.total >= 1 && parsePrice(cart?.total)}</p>
|
|
@@ -136,7 +136,7 @@ const CheckoutUI = (props) => {
|
|
|
136
136
|
|
|
137
137
|
const shouldActivateOrderDetailModal = ordering?.project?.includes('alsea')
|
|
138
138
|
const cardsMethods = ['stripe', 'credomatic']
|
|
139
|
-
const stripePaymethods = ['stripe', '
|
|
139
|
+
const stripePaymethods = ['stripe', 'stripe_connect', 'stripe_redirect']
|
|
140
140
|
const businessConfigs = businessDetails?.business?.configs ?? []
|
|
141
141
|
const isTableNumberEnabled = configs?.table_numer_enabled?.value
|
|
142
142
|
const isWalletCashEnabled = businessConfigs.find(config => config.key === 'wallet_cash_enabled')?.value === '1'
|
|
@@ -594,24 +594,24 @@ const CheckoutUI = (props) => {
|
|
|
594
594
|
|
|
595
595
|
{
|
|
596
596
|
!!(!isMultiDriverTips && driverTipsField) &&
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
597
|
+
<>
|
|
598
|
+
<DriverTipContainer>
|
|
599
|
+
<h1>{t('DRIVER_TIPS', 'Driver Tips')}</h1>
|
|
600
|
+
<p>{t('100%_OF_THE_TIP_YOUR_DRIVER', '100% of the tip goes to your driver')}</p>
|
|
601
|
+
<DriverTips
|
|
602
|
+
businessId={cart?.business_id}
|
|
603
|
+
driverTipsOptions={driverTipsOptions}
|
|
604
|
+
isFixedPrice={parseInt(configs?.driver_tip_type?.value, 10) === 1}
|
|
605
|
+
isDriverTipUseCustom={!!parseInt(configs?.driver_tip_use_custom?.value, 10)}
|
|
606
|
+
driverTip={parseInt(configs?.driver_tip_type?.value, 10) === 1
|
|
607
|
+
? cart?.driver_tip
|
|
608
|
+
: cart?.driver_tip_rate}
|
|
609
|
+
cart={cart}
|
|
610
|
+
useOrderContext
|
|
611
|
+
/>
|
|
612
|
+
</DriverTipContainer>
|
|
613
|
+
<DriverTipDivider />
|
|
614
|
+
</>
|
|
615
615
|
}
|
|
616
616
|
{!cartState.loading && placeSpotsEnabled && cart?.business_id && (
|
|
617
617
|
<SelectSpotContainer>
|
|
@@ -692,7 +692,7 @@ const CheckoutUI = (props) => {
|
|
|
692
692
|
`${t('MAXIMUM_SUBTOTAL_ORDER', 'Maximum subtotal order')}: ${parsePrice(cart?.maximum)}`
|
|
693
693
|
) : (!cart?.valid_minimum && !(cart?.discount_type === 1 && cart?.discount_rate === 100)) ? (
|
|
694
694
|
`${t('MINIMUN_SUBTOTAL_ORDER', 'Minimum subtotal order:')} ${parsePrice(cart?.minimum)}`
|
|
695
|
-
) : placing ? t('
|
|
695
|
+
) : placing ? t('PLACING_ORDER', 'Placing order') : t('PLACE_ORDER', 'Place Order')}
|
|
696
696
|
</Button>
|
|
697
697
|
</WrapperPlaceOrderButton>
|
|
698
698
|
)}
|
|
@@ -95,6 +95,7 @@ export const DriverTipContainer = styled(PaymentMethodContainer)`
|
|
|
95
95
|
|
|
96
96
|
export const CartContainer = styled(PaymentMethodContainer)`
|
|
97
97
|
margin-bottom: 20px;
|
|
98
|
+
position: relative;
|
|
98
99
|
`
|
|
99
100
|
|
|
100
101
|
export const WalletPaymentOptionContainer = styled(PaymentMethodContainer)`
|
|
@@ -378,3 +379,10 @@ export const OrderDetailContainer = styled.div`
|
|
|
378
379
|
flex-direction: column;
|
|
379
380
|
padding: 10px 30px 20px;
|
|
380
381
|
`
|
|
382
|
+
|
|
383
|
+
export const SpinnerContainer = styled.div`
|
|
384
|
+
position: absolute;
|
|
385
|
+
width: 100%;
|
|
386
|
+
left: 0;
|
|
387
|
+
top: -100%;
|
|
388
|
+
`
|
|
@@ -363,18 +363,19 @@ const FavoriteListUI = (props) => {
|
|
|
363
363
|
<FavPopupView>
|
|
364
364
|
{(favProduct?.images) && (
|
|
365
365
|
<Image>
|
|
366
|
-
|
|
366
|
+
<img src={favProduct.images} alt={`product-${i}`} width='150px' height='150px' loading='lazy' />
|
|
367
367
|
</Image>
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
{favProduct?.businesses && favProduct?.businesses?.length > 1
|
|
368
|
+
)}
|
|
369
|
+
<h2>
|
|
370
|
+
{favProduct?.name}
|
|
371
|
+
</h2>
|
|
372
|
+
<h2>
|
|
373
|
+
{ favProduct?.businesses && favProduct?.businesses?.length > 1
|
|
374
374
|
? t('AVAILABLE_BUSINESSES_FOR_PRODUCT', 'Available businesses for this product')
|
|
375
375
|
: favProduct?.businesses && favProduct?.businesses?.length == 1
|
|
376
376
|
? t('AVAILABLE_BUSINESSE_FOR_PRODUCT', 'Available business for this product')
|
|
377
|
-
: t('NOT_AVAILABLE_BUSINESSE', 'Business is not available for this product')
|
|
377
|
+
: t('NOT_AVAILABLE_BUSINESSE', 'Business is not available for this product')
|
|
378
|
+
}
|
|
378
379
|
</h2>
|
|
379
380
|
<div>
|
|
380
381
|
{favProduct?.businesses?.map(business => {
|
|
@@ -100,7 +100,8 @@ const OrderDetailsUI = (props) => {
|
|
|
100
100
|
reorderState,
|
|
101
101
|
handleReorder,
|
|
102
102
|
orderTypes,
|
|
103
|
-
handleRemoveCart
|
|
103
|
+
handleRemoveCart,
|
|
104
|
+
hideStaticMap
|
|
104
105
|
} = props
|
|
105
106
|
const [, t] = useLanguage()
|
|
106
107
|
const [{ configs }] = useConfig()
|
|
@@ -183,8 +184,8 @@ const OrderDetailsUI = (props) => {
|
|
|
183
184
|
}
|
|
184
185
|
try {
|
|
185
186
|
const image = new Image()
|
|
187
|
+
image.onload = resolve
|
|
186
188
|
image.src = src
|
|
187
|
-
image.complete ? resolve(true) : resolve(false)
|
|
188
189
|
} catch (err) {
|
|
189
190
|
resolve(false)
|
|
190
191
|
}
|
|
@@ -521,7 +522,7 @@ const OrderDetailsUI = (props) => {
|
|
|
521
522
|
</>
|
|
522
523
|
)}
|
|
523
524
|
</OrderInfo>
|
|
524
|
-
{!isGiftCardOrder && (
|
|
525
|
+
{!isGiftCardOrder && !hideStaticMap && (
|
|
525
526
|
<OrderBusiness>
|
|
526
527
|
<BusinessExternalWrapper>
|
|
527
528
|
<BusinessWrapper
|
|
@@ -640,6 +641,40 @@ const OrderDetailsUI = (props) => {
|
|
|
640
641
|
}
|
|
641
642
|
/>
|
|
642
643
|
)}
|
|
644
|
+
{hideStaticMap && (
|
|
645
|
+
<OrderCustomer>
|
|
646
|
+
<WrapperDriver>
|
|
647
|
+
{isShowBusinessLogo && order?.business?.logo && (
|
|
648
|
+
<PhotoBlock src={order?.business?.logo} />
|
|
649
|
+
)}
|
|
650
|
+
<div>
|
|
651
|
+
<p>{order?.business?.name}</p>
|
|
652
|
+
<ActionsSection
|
|
653
|
+
{...ActionsSectionProps}
|
|
654
|
+
actionType='business'
|
|
655
|
+
showPhone={!hideBusinessPhone}
|
|
656
|
+
showMessages={!hideBusinessMessages}
|
|
657
|
+
/>
|
|
658
|
+
{!hideBusinessEmail && (
|
|
659
|
+
<p>{order?.business?.email}</p>
|
|
660
|
+
)}
|
|
661
|
+
{!hideBusinessPhone && (
|
|
662
|
+
<p>{order?.business?.cellphone}</p>
|
|
663
|
+
)}
|
|
664
|
+
{!hideBusinessAddress && (
|
|
665
|
+
<p>{order?.business?.address}</p>
|
|
666
|
+
)}
|
|
667
|
+
{order?.place?.name && (
|
|
668
|
+
<PlaceSpotSection>
|
|
669
|
+
<p>
|
|
670
|
+
{yourSpotString}: {order?.place?.name}
|
|
671
|
+
</p>
|
|
672
|
+
</PlaceSpotSection>
|
|
673
|
+
)}
|
|
674
|
+
</div>
|
|
675
|
+
</WrapperDriver>
|
|
676
|
+
</OrderCustomer>
|
|
677
|
+
)}
|
|
643
678
|
<OrderCustomer>
|
|
644
679
|
<WrapperDriver>
|
|
645
680
|
{!hideCustomerPhoto && order?.customer?.photo && (
|
|
@@ -60,6 +60,7 @@ const ProductOptionSubOptionUI = React.memo((props) => {
|
|
|
60
60
|
? (balance === option?.max || state.quantity === suboption.max)
|
|
61
61
|
: state.quantity === suboption?.max || (!state.selected && balance === option?.max)
|
|
62
62
|
|
|
63
|
+
const quesoYSalsa = option?.name?.toLowerCase?.() === 'queso y salsa'
|
|
63
64
|
const price = option?.with_half_option && suboption?.half_price && state.position !== 'whole' ? suboption?.half_price : suboption?.price
|
|
64
65
|
const [, t] = useLanguage()
|
|
65
66
|
const [{ parsePrice }] = useUtils()
|
|
@@ -187,7 +188,7 @@ const ProductOptionSubOptionUI = React.memo((props) => {
|
|
|
187
188
|
)
|
|
188
189
|
}
|
|
189
190
|
</PositionControl>
|
|
190
|
-
{option?.with_half_option && state?.selected && isAlsea && (
|
|
191
|
+
{(option?.with_half_option || quesoYSalsa) && state?.selected && isAlsea && (
|
|
191
192
|
<ExtraControl>
|
|
192
193
|
{(state.quantity >= 2) ? (
|
|
193
194
|
<ExtraItem
|
|
@@ -12,7 +12,8 @@ import {
|
|
|
12
12
|
TitleContainer,
|
|
13
13
|
CountryFlag,
|
|
14
14
|
PhoneContainer,
|
|
15
|
-
SkeletonsContainer
|
|
15
|
+
SkeletonsContainer,
|
|
16
|
+
ChangeCustomerText
|
|
16
17
|
} from './styles'
|
|
17
18
|
import MdClose from '@meronex/icons/md/MdClose'
|
|
18
19
|
import PhoneInput from 'react-phone-number-input'
|
|
@@ -177,13 +178,7 @@ const UserDetailsUI = (props) => {
|
|
|
177
178
|
{!isModal && (
|
|
178
179
|
<h1>{t('CUSTOMER_DETAILS', 'Customer Details')}</h1>
|
|
179
180
|
)}
|
|
180
|
-
{cartStatus !== 2 && (
|
|
181
|
-
!isEdit ? (
|
|
182
|
-
<span onClick={() => toggleIsEdit()}>{t('CHANGE_USER_DETAILS', 'Change customer details')}</span>
|
|
183
|
-
) : (
|
|
184
|
-
<FcCancel className='cancel' onClick={() => toggleEditState()} />
|
|
185
|
-
)
|
|
186
|
-
)}
|
|
181
|
+
{cartStatus !== 2 && isEdit && <FcCancel className='cancel' onClick={() => toggleEditState()} />}
|
|
187
182
|
</Header>
|
|
188
183
|
)}
|
|
189
184
|
|
|
@@ -211,6 +206,11 @@ const UserDetailsUI = (props) => {
|
|
|
211
206
|
</p>
|
|
212
207
|
</PhoneContainer>
|
|
213
208
|
)}
|
|
209
|
+
<ChangeCustomerText>
|
|
210
|
+
{cartStatus !== 2 && (
|
|
211
|
+
<span onClick={() => toggleIsEdit()}>{t('CHANGE_USER_DETAILS', 'Change customer details')}</span>
|
|
212
|
+
)}
|
|
213
|
+
</ChangeCustomerText>
|
|
214
214
|
</UserData>
|
|
215
215
|
) : (
|
|
216
216
|
<SideForm>
|
|
@@ -27,15 +27,6 @@ export const Header = styled.div`
|
|
|
27
27
|
cursor: pointer;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
span {
|
|
31
|
-
font-size: 13px;
|
|
32
|
-
color: ${props => props.theme.colors.primary};
|
|
33
|
-
cursor: pointer;
|
|
34
|
-
user-select: none;
|
|
35
|
-
&:hover {
|
|
36
|
-
text-decoration: underline;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
30
|
`
|
|
40
31
|
|
|
41
32
|
export const SideForm = styled.div`
|
|
@@ -114,8 +105,24 @@ export const PhoneContainer = styled.div`
|
|
|
114
105
|
display: flex;
|
|
115
106
|
align-items: center;
|
|
116
107
|
height: 30px;
|
|
108
|
+
p {
|
|
109
|
+
margin: 1rem 0;
|
|
110
|
+
}
|
|
117
111
|
`
|
|
118
112
|
|
|
119
113
|
export const SkeletonsContainer = styled.div`
|
|
120
114
|
margin-top: 25px;
|
|
121
115
|
`
|
|
116
|
+
|
|
117
|
+
export const ChangeCustomerText = styled.div`
|
|
118
|
+
|
|
119
|
+
span {
|
|
120
|
+
font-size: 13px;
|
|
121
|
+
color: ${props => props.theme.colors.primary};
|
|
122
|
+
cursor: pointer;
|
|
123
|
+
user-select: none;
|
|
124
|
+
&:hover {
|
|
125
|
+
text-decoration: underline;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
`
|
|
@@ -135,15 +135,13 @@ export const UserFormDetailsUI = (props) => {
|
|
|
135
135
|
|
|
136
136
|
const onSubmit = () => {
|
|
137
137
|
const isPhoneNumberValid = userPhoneNumber && showInputPhoneNumber ? isValidPhoneNumber : true
|
|
138
|
-
const requiredPhone = (user?.guest_id && requiredFields?.includes?.('cellphone')) || (validationFields?.fields?.checkout?.cellphone?.enabled && validationFields?.fields?.checkout?.cellphone?.required)
|
|
138
|
+
const requiredPhone = (user?.guest_id && requiredFields?.includes?.('cellphone')) || (validationFields?.fields?.checkout?.cellphone?.enabled && validationFields?.fields?.checkout?.cellphone?.required && !user?.guest_id)
|
|
139
139
|
const content = []
|
|
140
140
|
if (requiredFields?.includes?.('birthdate') && !birthdate) {
|
|
141
141
|
content.push(t('VALIDATION_ERROR_BIRTHDATE_REQUIRED', 'Birthdate is required'))
|
|
142
142
|
}
|
|
143
143
|
if (!userPhoneNumber &&
|
|
144
|
-
((
|
|
145
|
-
validationFields?.fields?.checkout?.cellphone?.required) ||
|
|
146
|
-
configs?.verification_phone_required?.value === '1')
|
|
144
|
+
(requiredPhone || (configs?.verification_phone_required?.value === '1'))
|
|
147
145
|
) {
|
|
148
146
|
content.push(t('VALIDATION_ERROR_MOBILE_PHONE_REQUIRED', 'The field Phone Number is required.'))
|
|
149
147
|
setAlertState({
|