ordering-ui-react-native 0.22.45 → 0.22.46-release
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/package.json +6 -8
- package/src/DeliveryApp.tsx +1 -1
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/Checkout/index.tsx +40 -39
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/context/OfflineActions/index.tsx +236 -0
- package/src/providers/AlertProvider.tsx +3 -1
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +9 -6
- package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +1 -0
- package/themes/business/src/components/BusinessController/index.tsx +8 -3
- package/themes/business/src/components/BusinessProductList/index.tsx +3 -2
- package/themes/business/src/components/Chat/index.tsx +15 -3
- package/themes/business/src/components/DriverMap/index.tsx +44 -33
- package/themes/business/src/components/FloatingButton/index.tsx +3 -2
- package/themes/business/src/components/LanguageSelector/index.tsx +1 -1
- package/themes/business/src/components/LoginForm/index.tsx +123 -98
- package/themes/business/src/components/LogoutButton/index.tsx +13 -4
- package/themes/business/src/components/MapView/index.tsx +42 -22
- package/themes/business/src/components/NewOrderNotification/index.tsx +38 -19
- package/themes/business/src/components/OrderDetails/Business.tsx +88 -20
- package/themes/business/src/components/OrderDetails/Delivery.tsx +134 -53
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +155 -45
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +51 -28
- package/themes/business/src/components/OrderDetails/styles.tsx +39 -3
- package/themes/business/src/components/OrderDetails/usePrinterCommands.tsx +17 -16
- package/themes/business/src/components/OrderDetailsLogistic/index.tsx +3 -2
- package/themes/business/src/components/OrderSummary/index.tsx +63 -42
- package/themes/business/src/components/OrdersListManager/index.tsx +13 -1
- package/themes/business/src/components/OrdersOption/index.tsx +332 -231
- package/themes/business/src/components/OrdersOption/styles.tsx +14 -0
- package/themes/business/src/components/PreviousMessages/index.tsx +26 -3
- package/themes/business/src/components/PreviousOrders/OrderItem.tsx +30 -18
- package/themes/business/src/components/PreviousOrders/index.tsx +74 -66
- package/themes/business/src/components/PreviousOrders/styles.tsx +2 -1
- package/themes/business/src/components/PrinterEdition/MessageAlert.tsx +33 -0
- package/themes/business/src/components/PrinterEdition/index.tsx +143 -75
- package/themes/business/src/components/PrinterEdition/printerList.tsx +23 -0
- package/themes/business/src/components/PrinterSettings/index.tsx +1 -1
- package/themes/business/src/components/ProductItemAccordion/index.tsx +3 -2
- package/themes/business/src/components/ReviewCustomer/index.tsx +2 -0
- package/themes/business/src/components/StoresList/index.tsx +2 -2
- package/themes/business/src/components/UserProfileForm/index.tsx +48 -10
- package/themes/business/src/components/UserProfileForm/styles.tsx +7 -0
- package/themes/business/src/components/WebsocketStatus/index.tsx +2 -2
- package/themes/business/src/components/shared/OTextarea.tsx +8 -9
- package/themes/business/src/config/currency.tsx +1010 -0
- package/themes/business/src/hooks/useLocation.tsx +16 -12
- package/themes/business/src/layouts/SafeAreaContainer.tsx +35 -19
- package/themes/business/src/types/index.tsx +22 -7
- package/themes/business/src/utils/index.tsx +28 -3
- package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
- package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/kiosk/src/components/Checkout/index.tsx +9 -5
- package/themes/kiosk/src/components/CustomerName/index.tsx +1 -1
- package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
- package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
- package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
- package/themes/kiosk/src/components/PaymentOptions/index.tsx +121 -57
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/original/index.tsx +9 -1
- package/themes/original/src/components/AddressForm/index.tsx +19 -19
- package/themes/original/src/components/AddressList/index.tsx +0 -13
- package/themes/original/src/components/AppleLogin/index.tsx +4 -4
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +1 -1
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +14 -6
- package/themes/original/src/components/BusinessListingSearch/BusinessSearchFooter.tsx +103 -92
- package/themes/original/src/components/BusinessListingSearch/BusinessSearchHeader.tsx +8 -6
- package/themes/original/src/components/BusinessListingSearch/index.tsx +1 -2
- package/themes/original/src/components/BusinessPreorder/index.tsx +46 -28
- package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/index.tsx +73 -70
- package/themes/original/src/components/BusinessProductsList/index.tsx +6 -7
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +10 -6
- package/themes/original/src/components/BusinessTypeFilter/index.tsx +9 -8
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +2 -1
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/index.tsx +0 -1
- package/themes/original/src/components/Cart/index.tsx +49 -15
- package/themes/original/src/components/CartContent/index.tsx +2 -4
- package/themes/original/src/components/Checkout/index.tsx +109 -88
- package/themes/original/src/components/CitiesControl/index.tsx +0 -3
- package/themes/original/src/components/CouponControl/index.tsx +1 -3
- package/themes/original/src/components/DriverTips/index.tsx +1 -3
- package/themes/original/src/components/Favorite/index.tsx +1 -10
- package/themes/original/src/components/FavoriteList/index.tsx +0 -1
- package/themes/original/src/components/ForgotPasswordForm/index.tsx +5 -12
- package/themes/original/src/components/GiftCard/GiftCardUI/index.tsx +15 -17
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/index.tsx +3 -7
- package/themes/original/src/components/GiftCard/RedeemGiftCard/index.tsx +24 -32
- package/themes/original/src/components/GiftCard/SendGiftCard/index.tsx +7 -9
- package/themes/original/src/components/GiftCard/VerticalGiftCardOrdersLayout/index.tsx +11 -12
- package/themes/original/src/components/GoogleMap/index.tsx +39 -18
- package/themes/original/src/components/Help/index.tsx +0 -5
- package/themes/original/src/components/HelpAccountAndPayment/index.tsx +0 -5
- package/themes/original/src/components/HelpGuide/index.tsx +0 -5
- package/themes/original/src/components/HelpOrder/index.tsx +0 -5
- package/themes/original/src/components/HighestRatedBusinesses/index.tsx +1 -1
- package/themes/original/src/components/Home/index.tsx +35 -19
- package/themes/original/src/components/LoginForm/Otp/index.tsx +0 -3
- package/themes/original/src/components/LoginForm/index.tsx +12 -14
- package/themes/original/src/components/MessageListing/index.tsx +1 -6
- package/themes/original/src/components/Messages/index.tsx +20 -13
- package/themes/original/src/components/MomentOption/TimeListItem.tsx +56 -0
- package/themes/original/src/components/MomentOption/index.tsx +80 -57
- package/themes/original/src/components/MomentSelector/index.tsx +5 -2
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +7 -4
- package/themes/original/src/components/MultiCheckout/index.tsx +55 -27
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +1 -0
- package/themes/original/src/components/MyOrders/index.tsx +2 -7
- package/themes/original/src/components/NavBar/index.tsx +7 -6
- package/themes/original/src/components/NetworkError/index.tsx +0 -5
- package/themes/original/src/components/NotFoundSource/index.tsx +0 -3
- package/themes/original/src/components/Notifications/index.tsx +0 -5
- package/themes/original/src/components/OrderDetails/OrderEta.tsx +4 -3
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +16 -11
- package/themes/original/src/components/OrderDetails/index.tsx +44 -21
- package/themes/original/src/components/OrderDetails/styles.tsx +0 -1
- package/themes/original/src/components/OrderProgress/index.tsx +4 -3
- package/themes/original/src/components/OrderSummary/index.tsx +32 -11
- package/themes/original/src/components/OrderTypeSelector/index.tsx +7 -11
- package/themes/original/src/components/OrdersOption/index.tsx +3 -6
- package/themes/original/src/components/PaymentOptionStripe/index.tsx +0 -5
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
- package/themes/original/src/components/PaymentOptions/index.tsx +462 -461
- package/themes/original/src/components/PhoneInputNumber/index.tsx +92 -7
- package/themes/original/src/components/PlaceSpot/index.tsx +1 -3
- package/themes/original/src/components/PreviousOrders/index.tsx +1 -4
- package/themes/original/src/components/ProductForm/ActionButton.tsx +7 -12
- package/themes/original/src/components/ProductForm/index.tsx +107 -102
- package/themes/original/src/components/ProductItemAccordion/index.tsx +30 -38
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +16 -8
- package/themes/original/src/components/ProfessionalProfile/index.tsx +4 -5
- package/themes/original/src/components/Promotions/index.tsx +2 -7
- package/themes/original/src/components/ReviewDriver/index.tsx +1 -6
- package/themes/original/src/components/ReviewOrder/index.tsx +2 -7
- package/themes/original/src/components/ReviewProducts/index.tsx +1 -6
- package/themes/original/src/components/ReviewTrigger/index.tsx +2 -2
- package/themes/original/src/components/ServiceForm/index.tsx +52 -54
- package/themes/original/src/components/Sessions/index.tsx +3 -8
- package/themes/original/src/components/SignupForm/index.tsx +44 -37
- package/themes/original/src/components/SingleOrderCard/index.tsx +6 -4
- package/themes/original/src/components/SingleProductCard/index.tsx +5 -5
- package/themes/original/src/components/SingleProductCard/styles.tsx +0 -3
- package/themes/original/src/components/StripeCardForm/index.tsx +0 -3
- package/themes/original/src/components/StripeCardsList/index.tsx +16 -3
- package/themes/original/src/components/StripeElementsForm/index.tsx +8 -4
- package/themes/original/src/components/StripeElementsForm/naked.tsx +1 -1
- package/themes/original/src/components/StripeRedirectForm/index.tsx +0 -3
- package/themes/original/src/components/TaxInformation/index.tsx +3 -2
- package/themes/original/src/components/UpsellingProducts/UpsellingContent.tsx +8 -5
- package/themes/original/src/components/UpsellingProducts/UpsellingLayout.tsx +8 -3
- package/themes/original/src/components/UserDetails/index.tsx +17 -16
- package/themes/original/src/components/UserFormDetails/index.tsx +113 -73
- package/themes/original/src/components/UserProfile/index.tsx +9 -1
- package/themes/original/src/components/UserProfileForm/index.tsx +0 -5
- package/themes/original/src/components/UserVerification/index.tsx +18 -5
- package/themes/original/src/components/Wallets/index.tsx +1 -3
- package/themes/original/src/components/WebsocketStatus/index.tsx +1 -4
- package/themes/original/src/components/shared/OAlert.tsx +2 -1
- package/themes/original/src/components/shared/OButton.tsx +5 -4
- package/themes/original/src/components/shared/OInput.tsx +4 -8
- package/themes/original/src/components/shared/OModal.tsx +7 -2
- package/themes/original/src/types/index.tsx +12 -4
- package/themes/original/src/utils/index.tsx +29 -0
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
|
@@ -35,10 +35,17 @@ export const ProductOptionSubOptionUI = (props: any) => {
|
|
|
35
35
|
disabled,
|
|
36
36
|
setIsScrollAvailable,
|
|
37
37
|
image,
|
|
38
|
-
enableIntersection
|
|
38
|
+
enableIntersection,
|
|
39
|
+
usePizzaValidation,
|
|
40
|
+
pizzaState
|
|
39
41
|
} = props
|
|
40
42
|
|
|
41
|
-
const disableIncrement =
|
|
43
|
+
const disableIncrement =
|
|
44
|
+
option?.with_half_option
|
|
45
|
+
? pizzaState?.[`option:${option?.id}`]?.value === option?.max
|
|
46
|
+
: option?.limit_suboptions_by_max
|
|
47
|
+
? (balance === option?.max || state.quantity === suboption.max)
|
|
48
|
+
: state.quantity === suboption?.max || (!state.selected && balance === option?.max)
|
|
42
49
|
const price = option?.with_half_option && suboption?.half_price && state.position !== 'whole' ? suboption?.half_price : suboption?.price
|
|
43
50
|
|
|
44
51
|
const theme = useTheme();
|
|
@@ -65,8 +72,9 @@ export const ProductOptionSubOptionUI = (props: any) => {
|
|
|
65
72
|
const handleSuboptionClick = () => {
|
|
66
73
|
toggleSelect()
|
|
67
74
|
setIsDirty(true)
|
|
75
|
+
const minMaxValidation = option?.with_half_option ? usePizzaValidation : (balance === option?.max && option?.suboptions?.length > balance && !(option?.min === 1 && option?.max === 1))
|
|
68
76
|
|
|
69
|
-
if (
|
|
77
|
+
if (!state.selected && minMaxValidation) {
|
|
70
78
|
setShowMessage(true)
|
|
71
79
|
}
|
|
72
80
|
}
|
|
@@ -86,7 +94,7 @@ export const ProductOptionSubOptionUI = (props: any) => {
|
|
|
86
94
|
if (!(balance === option?.max && option?.suboptions?.length > balance && !(option?.min === 1 && option?.max === 1))) {
|
|
87
95
|
setShowMessage(false)
|
|
88
96
|
}
|
|
89
|
-
}, [balance])
|
|
97
|
+
}, [balance, pizzaState?.[`option:${option?.id}`]?.value])
|
|
90
98
|
|
|
91
99
|
return (
|
|
92
100
|
<InView onChange={(inView: boolean) => handleChangeInterSection(inView)} triggerOnce={true}>
|
|
@@ -122,7 +130,7 @@ export const ProductOptionSubOptionUI = (props: any) => {
|
|
|
122
130
|
{suboption?.name}
|
|
123
131
|
</OText>
|
|
124
132
|
</IconControl>
|
|
125
|
-
{option?.allow_suboption_quantity && state?.selected && (
|
|
133
|
+
{!(option?.max === 1 && option?.min === 1) && option?.allow_suboption_quantity && state?.selected && (
|
|
126
134
|
<QuantityControl>
|
|
127
135
|
<>
|
|
128
136
|
<Checkbox disabled={disabled || state.quantity === 0} onPress={decrement}>
|
|
@@ -135,11 +143,11 @@ export const ProductOptionSubOptionUI = (props: any) => {
|
|
|
135
143
|
<OText size={12}>
|
|
136
144
|
{state.quantity}
|
|
137
145
|
</OText>
|
|
138
|
-
<Checkbox disabled={disabled || disableIncrement} onPress={increment}>
|
|
146
|
+
<Checkbox disabled={disabled || disableIncrement || usePizzaValidation} onPress={increment}>
|
|
139
147
|
<IconAntDesign
|
|
140
148
|
name='pluscircleo'
|
|
141
149
|
size={iconsSize}
|
|
142
|
-
color={disableIncrement || disabled ? theme.colors.disabled : theme.colors.primary}
|
|
150
|
+
color={disableIncrement || disabled || usePizzaValidation ? theme.colors.disabled : theme.colors.primary}
|
|
143
151
|
/>
|
|
144
152
|
</Checkbox>
|
|
145
153
|
</>
|
|
@@ -157,7 +165,7 @@ export const ProductOptionSubOptionUI = (props: any) => {
|
|
|
157
165
|
style={styles.inverse}
|
|
158
166
|
/>
|
|
159
167
|
</Circle>
|
|
160
|
-
<Circle disabled={disabled} onPress={() => changePosition('whole')}>
|
|
168
|
+
<Circle disabled={disabled || (pizzaState?.[`option:${option?.id}`]?.value === option?.max)} onPress={() => changePosition('whole')}>
|
|
161
169
|
<OIcon
|
|
162
170
|
src={theme.images.general.half_f}
|
|
163
171
|
color={state.selected && state.position === 'whole' ? theme.colors.primary : '#cbcbcb'}
|
|
@@ -233,7 +233,7 @@ export const ProfessionalProfile = (props: ProfessionalProfileParams) => {
|
|
|
233
233
|
<CalendarWrapper>
|
|
234
234
|
{(timeList?.length > 0 && isEnabled) ? (
|
|
235
235
|
<SelectDropdown
|
|
236
|
-
ref={dropdownRef}
|
|
236
|
+
ref={dropdownRef}
|
|
237
237
|
data={timeList}
|
|
238
238
|
onSelect={(selectedItem, index) => {
|
|
239
239
|
console.log(selectedItem.value)
|
|
@@ -244,7 +244,7 @@ export const ProfessionalProfile = (props: ProfessionalProfileParams) => {
|
|
|
244
244
|
rowTextForSelection={(item, index) => {
|
|
245
245
|
return item.text
|
|
246
246
|
}}
|
|
247
|
-
buttonStyle={{borderRadius: 7.6, ...styles.selectOption}}
|
|
247
|
+
buttonStyle={{ borderRadius: 7.6, ...styles.selectOption }}
|
|
248
248
|
buttonTextStyle={{
|
|
249
249
|
color: theme.colors.disabled,
|
|
250
250
|
fontSize: 14,
|
|
@@ -267,7 +267,7 @@ export const ProfessionalProfile = (props: ProfessionalProfileParams) => {
|
|
|
267
267
|
}}
|
|
268
268
|
renderCustomizedRowChild={(item, index) => {
|
|
269
269
|
return (
|
|
270
|
-
<Text style={[styles.dropDownRow, { color: isBusyTime(professional, getMomentTime(item.value)) ? theme.colors.lightGray : theme.colors.primary }
|
|
270
|
+
<Text style={[styles.dropDownRow, { color: isBusyTime(professional, getMomentTime(item.value)) ? theme.colors.lightGray : theme.colors.primary }]}>
|
|
271
271
|
{item.text}
|
|
272
272
|
</Text>
|
|
273
273
|
)
|
|
@@ -326,11 +326,10 @@ export const ProfessionalProfile = (props: ProfessionalProfileParams) => {
|
|
|
326
326
|
</ScheduleWrapper>
|
|
327
327
|
<ButtonWrapper>
|
|
328
328
|
<OButton
|
|
329
|
-
bgColor={theme.colors.primary}
|
|
330
329
|
onClick={() => handleSelectProfessional()}
|
|
331
330
|
text={t('BOOK', 'Book')}
|
|
332
331
|
style={styles.buttonStyle}
|
|
333
|
-
textStyle={{ fontSize: 14
|
|
332
|
+
textStyle={{ fontSize: 14 }}
|
|
334
333
|
/>
|
|
335
334
|
</ButtonWrapper>
|
|
336
335
|
</Container>
|
|
@@ -113,11 +113,6 @@ const PromotionsUI = (props: PromotionParams) => {
|
|
|
113
113
|
paddingTop={Platform.OS === 'ios' ? 20 : 10}
|
|
114
114
|
style={{ paddingVertical: 0 }}
|
|
115
115
|
btnStyle={{ paddingLeft: 0 }}
|
|
116
|
-
buttonProps={{
|
|
117
|
-
bgColor: theme.colors.white,
|
|
118
|
-
borderColor: theme.colors.white,
|
|
119
|
-
textStyle: { color: theme.colors.btnFont }
|
|
120
|
-
}}
|
|
121
116
|
/>
|
|
122
117
|
<PromotionsContainer>
|
|
123
118
|
<SearchBarContainer>
|
|
@@ -176,7 +171,7 @@ const PromotionsUI = (props: PromotionParams) => {
|
|
|
176
171
|
onClick={() => handleClickOffer(offer)}
|
|
177
172
|
text={t('VIEW', 'View')}
|
|
178
173
|
style={styles.buttonStyle}
|
|
179
|
-
textStyle={{ fontSize: 14,
|
|
174
|
+
textStyle={{ fontSize: 14, flexWrap: 'nowrap' }}
|
|
180
175
|
/>
|
|
181
176
|
</WrapperSingleOffer>
|
|
182
177
|
))}
|
|
@@ -240,7 +235,7 @@ const PromotionsUI = (props: PromotionParams) => {
|
|
|
240
235
|
onClick={() => handleBusinessClick(business)}
|
|
241
236
|
text={t('GO_TO_BUSINESSS', 'Go to business')}
|
|
242
237
|
style={styles.modalButtonStyle}
|
|
243
|
-
textStyle={{ fontSize: 10
|
|
238
|
+
textStyle={{ fontSize: 10 }}
|
|
244
239
|
/>
|
|
245
240
|
</BusinessInfo>
|
|
246
241
|
</SingleBusinessOffer>
|
|
@@ -192,11 +192,6 @@ const ReviewDriverUI = (props: ReviewDriverParams) => {
|
|
|
192
192
|
style={{ flexDirection: 'column', alignItems: 'flex-start' }}
|
|
193
193
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
194
194
|
titleStyle={{ marginRight: 0, marginLeft: 0 }}
|
|
195
|
-
buttonProps={{
|
|
196
|
-
bgColor: theme.colors.white,
|
|
197
|
-
borderColor: theme.colors.white,
|
|
198
|
-
textStyle: { color: theme.colors.btnFont }
|
|
199
|
-
}}
|
|
200
195
|
/>
|
|
201
196
|
<DriverPhotoContainer>
|
|
202
197
|
<View
|
|
@@ -298,7 +293,7 @@ const ReviewDriverUI = (props: ReviewDriverParams) => {
|
|
|
298
293
|
<FloatingBottomContainer>
|
|
299
294
|
<ActionContainer>
|
|
300
295
|
<OButton
|
|
301
|
-
textStyle={{
|
|
296
|
+
textStyle={{ paddingRight: 10 }}
|
|
302
297
|
text={t('SEND_REVIEW', 'Send Review')}
|
|
303
298
|
style={{ borderRadius: 8 }}
|
|
304
299
|
imgRightStyle={{ tintColor: theme.colors.white, right: 5, margin: 5 }}
|
|
@@ -215,11 +215,6 @@ export const ReviewOrderUI = (props: ReviewOrderParams) => {
|
|
|
215
215
|
style={{ flexDirection: 'column', alignItems: 'flex-start' }}
|
|
216
216
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
217
217
|
titleStyle={{ marginRight: 0, marginLeft: 0 }}
|
|
218
|
-
buttonProps={{
|
|
219
|
-
bgColor: theme.colors.white,
|
|
220
|
-
borderColor: theme.colors.white,
|
|
221
|
-
textStyle: { color: theme.colors.btnFont }
|
|
222
|
-
}}
|
|
223
218
|
/>
|
|
224
219
|
<BusinessLogo isMulti={order?.business?.length > 1}>
|
|
225
220
|
{typeof order?.logo === 'string' || !order?.logo ? (
|
|
@@ -232,7 +227,7 @@ export const ReviewOrderUI = (props: ReviewOrderParams) => {
|
|
|
232
227
|
</View>
|
|
233
228
|
) : (
|
|
234
229
|
<MultiLogosContainer>
|
|
235
|
-
{order?.logo?.map((logo
|
|
230
|
+
{order?.logo?.map((logo: string, i: number) => (
|
|
236
231
|
<React.Fragment key={logo}>
|
|
237
232
|
<View style={styles.logoWrapper}>
|
|
238
233
|
<OIcon
|
|
@@ -338,7 +333,7 @@ export const ReviewOrderUI = (props: ReviewOrderParams) => {
|
|
|
338
333
|
<OText weight={700} size={18} color={theme.colors.textNormal}>{t('FRONT_VISUALS_SKIP', 'Skip')}</OText>
|
|
339
334
|
</SkipButton>
|
|
340
335
|
<OButton
|
|
341
|
-
textStyle={{
|
|
336
|
+
textStyle={{ paddingRight: 10 }}
|
|
342
337
|
text={t('CONTINUE', 'Continue')}
|
|
343
338
|
style={{ borderRadius: 8 }}
|
|
344
339
|
imgRightSrc={theme.images.general.arrow_right}
|
|
@@ -73,11 +73,6 @@ const ReviewProductsUI = (props: ReviewProductParams) => {
|
|
|
73
73
|
style={{ flexDirection: 'column', alignItems: 'flex-start' }}
|
|
74
74
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
75
75
|
titleStyle={{ marginRight: 0, marginLeft: 0 }}
|
|
76
|
-
buttonProps={{
|
|
77
|
-
bgColor: theme.colors.white,
|
|
78
|
-
borderColor: theme.colors.white,
|
|
79
|
-
textStyle: { color: theme.colors.btnFont }
|
|
80
|
-
}}
|
|
81
76
|
/>
|
|
82
77
|
{order?.products && order.products.length > 0 && order?.products.map(productsOrder => (
|
|
83
78
|
productsOrder?.length ? productsOrder?.map((product: any, i: any) => !product?.deleted ?
|
|
@@ -109,7 +104,7 @@ const ReviewProductsUI = (props: ReviewProductParams) => {
|
|
|
109
104
|
<OText weight={700} size={18} color={theme.colors.textNormal}>{t('FRONT_VISUALS_SKIP', 'Skip')}</OText>
|
|
110
105
|
</SkipButton>
|
|
111
106
|
<OButton
|
|
112
|
-
textStyle={{
|
|
107
|
+
textStyle={{ paddingRight: 10 }}
|
|
113
108
|
text={order?.driver && !order?.user_review ? t('CONTINUE', 'Continue') : t('SEND_REVIEW', 'Send Review')}
|
|
114
109
|
style={{ borderRadius: 8 }}
|
|
115
110
|
imgRightSrc={theme.images.general.arrow_right}
|
|
@@ -90,7 +90,7 @@ export const ReviewTrigger = (props: any) => {
|
|
|
90
90
|
</View>
|
|
91
91
|
) : (
|
|
92
92
|
<MultiLogosContainer>
|
|
93
|
-
{order?.logo?.map((logo
|
|
93
|
+
{order?.logo?.map((logo: string, i: number) => (
|
|
94
94
|
<React.Fragment key={logo}>
|
|
95
95
|
<View style={styles.logoWrapper}>
|
|
96
96
|
<OIcon
|
|
@@ -122,7 +122,7 @@ export const ReviewTrigger = (props: any) => {
|
|
|
122
122
|
<FloatingBottomContainer borderTopWidth={0} borderRadius={10}>
|
|
123
123
|
<ActionContainer>
|
|
124
124
|
<OButton
|
|
125
|
-
textStyle={{
|
|
125
|
+
textStyle={{ paddingRight: 10 }}
|
|
126
126
|
text={t('GOTO_REVIEW', 'Go to review')}
|
|
127
127
|
style={{ borderRadius: 8 }}
|
|
128
128
|
imgRightSrc={theme.images.general.arrow_right}
|
|
@@ -57,9 +57,9 @@ const ServiceFormUI = (props: ServiceFormParams) => {
|
|
|
57
57
|
const [{ optimizeImage, parsePrice, parseDate }] = useUtils()
|
|
58
58
|
const { top } = useSafeAreaInsets()
|
|
59
59
|
const [{ configs }] = useConfig()
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
const [orderState] = useOrder()
|
|
61
|
+
const [{ auth }] = useSession()
|
|
62
|
+
const { product, loading, error } = productObject;
|
|
63
63
|
|
|
64
64
|
const [selectDate, setSelectedDate] = useState<any>(new Date())
|
|
65
65
|
const [timeList, setTimeList] = useState<any>([])
|
|
@@ -77,8 +77,8 @@ const ServiceFormUI = (props: ServiceFormParams) => {
|
|
|
77
77
|
const styles = StyleSheet.create({
|
|
78
78
|
photoStyle: {
|
|
79
79
|
width: 45,
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
height: 45,
|
|
81
|
+
borderRadius: 7.6
|
|
82
82
|
},
|
|
83
83
|
buttonStyle: {
|
|
84
84
|
borderRadius: 7.6,
|
|
@@ -144,7 +144,7 @@ const ServiceFormUI = (props: ServiceFormParams) => {
|
|
|
144
144
|
return (moment.utc(item?.start).local().valueOf() <= moment(selectedMoment).valueOf() &&
|
|
145
145
|
moment(selectedMoment).valueOf() < moment.utc(item?.end).local().valueOf()) ||
|
|
146
146
|
(moment.utc(item?.start).local().valueOf() < moment(selectedMoment).add(duration, 'minutes').valueOf() &&
|
|
147
|
-
|
|
147
|
+
moment(selectedMoment).add(duration, 'minutes').valueOf() < moment.utc(item?.end).local().valueOf())
|
|
148
148
|
})
|
|
149
149
|
return valid
|
|
150
150
|
}
|
|
@@ -166,9 +166,9 @@ const ServiceFormUI = (props: ServiceFormParams) => {
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
const handleUpdateGuest = () => {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
169
|
+
const guestToken = uuid.v4()
|
|
170
|
+
if (guestToken) handleCreateGuestUser({ guest_token: guestToken })
|
|
171
|
+
}
|
|
172
172
|
|
|
173
173
|
const customDayHeaderStylesCallback = () => {
|
|
174
174
|
return {
|
|
@@ -193,11 +193,11 @@ const ServiceFormUI = (props: ServiceFormParams) => {
|
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
const handleRedirectLogin = () => {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
196
|
+
navigation && navigation.navigate('Login', {
|
|
197
|
+
store_slug: props.businessSlug
|
|
198
|
+
});
|
|
199
199
|
onClose && onClose()
|
|
200
|
-
|
|
200
|
+
};
|
|
201
201
|
|
|
202
202
|
const getTimes = (curdate: any, menu: any) => {
|
|
203
203
|
validateSelectedDate(curdate, menu)
|
|
@@ -290,7 +290,7 @@ const ServiceFormUI = (props: ServiceFormParams) => {
|
|
|
290
290
|
setSelectedDate(moment.utc(productCart?.calendar_event?.start).local())
|
|
291
291
|
setTimeSelected(moment.utc(productCart?.calendar_event?.start).local().format('HH:mm'))
|
|
292
292
|
}, [productCart])
|
|
293
|
-
|
|
293
|
+
|
|
294
294
|
return (
|
|
295
295
|
<>
|
|
296
296
|
{loading && !error && (
|
|
@@ -450,7 +450,7 @@ const ServiceFormUI = (props: ServiceFormParams) => {
|
|
|
450
450
|
<CalendarWrapper>
|
|
451
451
|
{(timeList?.length > 0 && isEnabled) ? (
|
|
452
452
|
<SelectDropdown
|
|
453
|
-
ref={dropdownRef}
|
|
453
|
+
ref={dropdownRef}
|
|
454
454
|
defaultValueByIndex={timeList.findIndex((item: any) => item.value === timeSelected)}
|
|
455
455
|
data={timeList}
|
|
456
456
|
onSelect={(selectedItem, index) => {
|
|
@@ -462,7 +462,7 @@ const ServiceFormUI = (props: ServiceFormParams) => {
|
|
|
462
462
|
rowTextForSelection={(item, index) => {
|
|
463
463
|
return item.text
|
|
464
464
|
}}
|
|
465
|
-
buttonStyle={{borderRadius: 7.6, ...styles.selectOption}}
|
|
465
|
+
buttonStyle={{ borderRadius: 7.6, ...styles.selectOption }}
|
|
466
466
|
buttonTextStyle={{
|
|
467
467
|
color: theme.colors.disabled,
|
|
468
468
|
fontSize: 14,
|
|
@@ -485,7 +485,7 @@ const ServiceFormUI = (props: ServiceFormParams) => {
|
|
|
485
485
|
}}
|
|
486
486
|
renderCustomizedRowChild={(item, index) => {
|
|
487
487
|
return (
|
|
488
|
-
<Text style={[styles.dropDownRow, { color: isBusyTime(currentProfessional, getMomentTime(item.value)) ? theme.colors.lightGray : theme.colors.primary }
|
|
488
|
+
<Text style={[styles.dropDownRow, { color: isBusyTime(currentProfessional, getMomentTime(item.value)) ? theme.colors.lightGray : theme.colors.primary }]}>
|
|
489
489
|
{item.text}
|
|
490
490
|
</Text>
|
|
491
491
|
)
|
|
@@ -553,7 +553,6 @@ const ServiceFormUI = (props: ServiceFormParams) => {
|
|
|
553
553
|
auth &&
|
|
554
554
|
orderState.options?.address_id)) && (
|
|
555
555
|
<OButton
|
|
556
|
-
bgColor={theme.colors.primary}
|
|
557
556
|
onClick={() => handleSaveService()}
|
|
558
557
|
text={orderState.loading
|
|
559
558
|
? t('LOADING', 'Loading')
|
|
@@ -562,7 +561,7 @@ const ServiceFormUI = (props: ServiceFormParams) => {
|
|
|
562
561
|
: t('BOOK', 'Book'))}
|
|
563
562
|
style={styles.buttonStyle}
|
|
564
563
|
isDisabled={isSoldOut || maxProductQuantity <= 0 || !currentProfessional?.id || !dateSelected || isBusyTime(currentProfessional, dateSelected)}
|
|
565
|
-
textStyle={{ fontSize: 14
|
|
564
|
+
textStyle={{ fontSize: 14 }}
|
|
566
565
|
/>
|
|
567
566
|
)}
|
|
568
567
|
{auth &&
|
|
@@ -577,45 +576,44 @@ const ServiceFormUI = (props: ServiceFormParams) => {
|
|
|
577
576
|
) : (
|
|
578
577
|
<OButton onClick={() => addressRedirect()} />
|
|
579
578
|
))}
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
{
|
|
599
|
-
|
|
600
|
-
{
|
|
601
|
-
<
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
)}
|
|
579
|
+
{!auth && (
|
|
580
|
+
<OButton
|
|
581
|
+
isDisabled={isSoldOut || maxProductQuantity <= 0}
|
|
582
|
+
onClick={() => handleRedirectLogin()}
|
|
583
|
+
text={
|
|
584
|
+
isSoldOut || maxProductQuantity <= 0
|
|
585
|
+
? t('SOLD_OUT', 'Sold out')
|
|
586
|
+
: t('LOGIN_SIGNUP', 'Login / Sign Up')
|
|
587
|
+
}
|
|
588
|
+
imgRightSrc=""
|
|
589
|
+
textStyle={{ color: theme.colors.primary, fontSize: 14 }}
|
|
590
|
+
style={{
|
|
591
|
+
height: 44,
|
|
592
|
+
backgroundColor: theme.colors.white,
|
|
593
|
+
}}
|
|
594
|
+
/>
|
|
595
|
+
)}
|
|
596
|
+
{!auth && guestCheckoutEnabled && orderTypeEnabled && (
|
|
597
|
+
<TouchableOpacity style={{ marginTop: 10 }} onPress={handleUpdateGuest}>
|
|
598
|
+
{actionStatus?.loading ? (
|
|
599
|
+
<Placeholder Animation={Fade}>
|
|
600
|
+
<PlaceholderLine width={60} height={20} />
|
|
601
|
+
</Placeholder>
|
|
602
|
+
) : (
|
|
603
|
+
<OText color={theme.colors.primary} size={13}>{t('AS_GUEST_USER', 'As guest user')}</OText>
|
|
604
|
+
)}
|
|
605
|
+
</TouchableOpacity>
|
|
606
|
+
)}
|
|
609
607
|
</ButtonWrapper>
|
|
610
608
|
</Container>
|
|
611
609
|
)}
|
|
612
610
|
|
|
613
611
|
<OModal
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
612
|
+
open={isOpen}
|
|
613
|
+
onClose={() => setIsOpen(false)}
|
|
614
|
+
entireModal
|
|
615
|
+
>
|
|
616
|
+
<ScrollView contentContainerStyle={styles.professionalList}>
|
|
619
617
|
<View style={{ paddingVertical: 11 }}>
|
|
620
618
|
<OText
|
|
621
619
|
size={14}
|
|
@@ -671,7 +669,7 @@ const ServiceFormUI = (props: ServiceFormParams) => {
|
|
|
671
669
|
</TouchableOpacity>
|
|
672
670
|
))}
|
|
673
671
|
</ScrollView>
|
|
674
|
-
|
|
672
|
+
</OModal>
|
|
675
673
|
</>
|
|
676
674
|
)
|
|
677
675
|
}
|
|
@@ -72,11 +72,6 @@ export const SessionsUI = (props: SessionsParams) => {
|
|
|
72
72
|
showCall={false}
|
|
73
73
|
paddingTop={10}
|
|
74
74
|
btnStyle={{ paddingLeft: 0 }}
|
|
75
|
-
buttonProps={{
|
|
76
|
-
bgColor: theme.colors.white,
|
|
77
|
-
borderColor: theme.colors.white,
|
|
78
|
-
textStyle: { color: theme.colors.btnFont }
|
|
79
|
-
}}
|
|
80
75
|
/>
|
|
81
76
|
{user?.session_strategy === 'jwt_session' ? (
|
|
82
77
|
<>
|
|
@@ -116,14 +111,14 @@ export const SessionsUI = (props: SessionsParams) => {
|
|
|
116
111
|
<OButton
|
|
117
112
|
text={t('DELETE_ALL_SESSIONS', 'Delete all sessions')}
|
|
118
113
|
isDisabled={actionState.loading}
|
|
119
|
-
textStyle={{
|
|
114
|
+
textStyle={{ fontSize: 14 }}
|
|
120
115
|
onClick={() => onDeleteAllSessions(false, true)}
|
|
121
116
|
style={{ borderRadius: 7.6, marginTop: 30 }}
|
|
122
117
|
/>
|
|
123
118
|
<OButton
|
|
124
119
|
text={t('DELETE_ALL_SESSIONS_EXCEPT_CURRENT', 'Delete all sessions except current')}
|
|
125
120
|
isDisabled={actionState.loading}
|
|
126
|
-
textStyle={{
|
|
121
|
+
textStyle={{ fontSize: 14 }}
|
|
127
122
|
onClick={() => onDeleteAllSessions(false, false)}
|
|
128
123
|
style={{ borderRadius: 7.6, marginTop: 20 }}
|
|
129
124
|
/>
|
|
@@ -141,7 +136,7 @@ export const SessionsUI = (props: SessionsParams) => {
|
|
|
141
136
|
<OButton
|
|
142
137
|
text={t('ACTIVE_SESSIONS', 'Active sessions')}
|
|
143
138
|
isDisabled={actionState.loading}
|
|
144
|
-
textStyle={{
|
|
139
|
+
textStyle={{ fontSize: 14 }}
|
|
145
140
|
onClick={() => onDeleteAllSessions(true, false)}
|
|
146
141
|
style={{ borderRadius: 7.6, marginTop: 20 }}
|
|
147
142
|
/>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
-
import { View, Pressable, StyleSheet, Linking, Platform, TouchableOpacity } from 'react-native';
|
|
2
|
+
import { View, Pressable, StyleSheet, Linking, Platform, TouchableOpacity, Modal } from 'react-native';
|
|
3
3
|
import { useForm, Controller } from 'react-hook-form';
|
|
4
4
|
import Spinner from 'react-native-loading-spinner-overlay';
|
|
5
5
|
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
|
|
@@ -32,11 +32,9 @@ import {
|
|
|
32
32
|
} from '../LoginForm/styles';
|
|
33
33
|
|
|
34
34
|
import NavBar from '../NavBar';
|
|
35
|
-
import { VerifyPhone } from '../VerifyPhone';
|
|
36
35
|
|
|
37
36
|
import Alert from '../../../../../src/providers/AlertProvider'
|
|
38
37
|
import { OText, OButton, OInput } from '../shared';
|
|
39
|
-
import { OModal } from '../../../../../src/components/shared';
|
|
40
38
|
import { SignupParams } from '../../types';
|
|
41
39
|
import { sortInputFields } from '../../utils';
|
|
42
40
|
import { GoogleLogin } from '../GoogleLogin';
|
|
@@ -85,7 +83,8 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
85
83
|
useSignUpFullDetails,
|
|
86
84
|
useSignUpOtpEmail,
|
|
87
85
|
useSignUpOtpCellphone,
|
|
88
|
-
isGuest
|
|
86
|
+
isGuest,
|
|
87
|
+
setCellphoneStartZero
|
|
89
88
|
} = props;
|
|
90
89
|
|
|
91
90
|
const theme = useTheme();
|
|
@@ -141,6 +140,8 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
141
140
|
const [recaptchaConfig, setRecaptchaConfig] = useState<any>({})
|
|
142
141
|
const [recaptchaVerified, setRecaptchaVerified] = useState(false)
|
|
143
142
|
const [tabLayouts, setTabLayouts] = useState<any>({})
|
|
143
|
+
const [isCheckingCode, setCheckingCode] = useState(false)
|
|
144
|
+
const [otpError, setOtpError] = useState(null)
|
|
144
145
|
|
|
145
146
|
const tabsRef = useRef<any>(null)
|
|
146
147
|
const nameRef = useRef<any>(null);
|
|
@@ -153,9 +154,9 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
153
154
|
const recaptchaRef = useRef<any>({});
|
|
154
155
|
|
|
155
156
|
const showInputPhoneNumber = (validationFields?.fields?.checkout?.cellphone?.enabled ?? false) || configs?.verification_phone_required?.value === '1'
|
|
156
|
-
const googleLoginEnabled = configs?.google_login_enabled?.value === '1'
|
|
157
|
-
const facebookLoginEnabled = configs?.facebook_login_enabled?.value === '1'
|
|
158
|
-
const appleLoginEnabled = Platform.OS === 'ios' &&
|
|
157
|
+
const googleLoginEnabled = configs?.google_login_enabled?.value === '1'
|
|
158
|
+
const facebookLoginEnabled = configs?.facebook_login_enabled?.value === '1'
|
|
159
|
+
const appleLoginEnabled = Platform.OS === 'ios' && configs?.apple_login_enabled?.value === '1'
|
|
159
160
|
|
|
160
161
|
const closeAlert = () => {
|
|
161
162
|
setAlertState({
|
|
@@ -366,6 +367,19 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
366
367
|
handleReCaptcha && handleReCaptcha({ code: token, version: recaptchaConfig?.version })
|
|
367
368
|
}
|
|
368
369
|
|
|
370
|
+
const handleChangePhoneNumber = (number: any, rawNumber: any) => {
|
|
371
|
+
setPhoneInputData({
|
|
372
|
+
...phoneInputData,
|
|
373
|
+
...number,
|
|
374
|
+
phone: {
|
|
375
|
+
...phoneInputData.phone,
|
|
376
|
+
...number.phone,
|
|
377
|
+
country_code: phoneInputData.phone.country_code
|
|
378
|
+
}
|
|
379
|
+
})
|
|
380
|
+
setCellphoneStartZero && setCellphoneStartZero(rawNumber?.number && rawNumber?.countryCallingCode ? rawNumber?.number : null)
|
|
381
|
+
}
|
|
382
|
+
|
|
369
383
|
useEffect(() => {
|
|
370
384
|
if (configs && Object.keys(configs).length > 0 && enableReCaptcha) {
|
|
371
385
|
if (configs?.security_recaptcha_type?.value === 'v3' &&
|
|
@@ -467,9 +481,16 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
467
481
|
|
|
468
482
|
useEffect(() => {
|
|
469
483
|
if (checkPhoneCodeState?.result?.error) {
|
|
470
|
-
|
|
484
|
+
const titleText = (
|
|
485
|
+
typeof checkPhoneCodeState?.result?.result === 'string'
|
|
486
|
+
? checkPhoneCodeState?.result?.result
|
|
487
|
+
: checkPhoneCodeState?.result?.result[0].toString()
|
|
488
|
+
) || t('ERROR', 'Error')
|
|
489
|
+
setCheckingCode(false)
|
|
490
|
+
setOtpError(titleText)
|
|
491
|
+
checkPhoneCodeState?.generate && setAlertState({
|
|
471
492
|
open: true,
|
|
472
|
-
title:
|
|
493
|
+
title: titleText,
|
|
473
494
|
content: []
|
|
474
495
|
})
|
|
475
496
|
}
|
|
@@ -488,11 +509,6 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
488
509
|
btnStyle={{ paddingLeft: 0 }}
|
|
489
510
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
490
511
|
titleStyle={{ marginLeft: 0, marginRight: 0 }}
|
|
491
|
-
buttonProps={{
|
|
492
|
-
bgColor: theme.colors.white,
|
|
493
|
-
borderColor: theme.colors.white,
|
|
494
|
-
textStyle: { color: theme.colors.btnFont }
|
|
495
|
-
}}
|
|
496
512
|
/>
|
|
497
513
|
)}
|
|
498
514
|
<FormSide>
|
|
@@ -655,15 +671,7 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
655
671
|
<View style={{ marginBottom: 25 }}>
|
|
656
672
|
<PhoneInputNumber
|
|
657
673
|
data={phoneInputData}
|
|
658
|
-
handleData={
|
|
659
|
-
...phoneInputData,
|
|
660
|
-
...val,
|
|
661
|
-
phone: {
|
|
662
|
-
...phoneInputData.phone,
|
|
663
|
-
...val.phone,
|
|
664
|
-
country_code: phoneInputData.phone.country_code
|
|
665
|
-
}
|
|
666
|
-
})}
|
|
674
|
+
handleData={handleChangePhoneNumber}
|
|
667
675
|
forwardRef={phoneRef}
|
|
668
676
|
changeCountry={(val: any) => setPhoneInputData({
|
|
669
677
|
...phoneInputData,
|
|
@@ -794,9 +802,9 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
794
802
|
<OButton
|
|
795
803
|
imgRightSrc={null}
|
|
796
804
|
text={t('TERMS_AND_CONDITIONS', 'Terms & Conditions')}
|
|
797
|
-
bgColor=
|
|
798
|
-
borderColor=
|
|
799
|
-
style={{ paddingLeft: 0, paddingRight: 0, height: 30, shadowColor:
|
|
805
|
+
bgColor={theme.colors.white}
|
|
806
|
+
borderColor={theme.colors.white}
|
|
807
|
+
style={{ paddingLeft: 0, paddingRight: 0, height: 30, shadowColor: theme.colors.white }}
|
|
800
808
|
textStyle={{ color: theme.colors.primary, marginLeft: 0, marginRight: 0 }}
|
|
801
809
|
onClick={() => handleOpenTermsUrl(configs?.terms_and_conditions_url?.value)}
|
|
802
810
|
/>
|
|
@@ -840,6 +848,7 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
840
848
|
/>
|
|
841
849
|
)
|
|
842
850
|
}
|
|
851
|
+
autoCapitalize='none'
|
|
843
852
|
value={value}
|
|
844
853
|
onChange={(val: any) => onChange(val)}
|
|
845
854
|
returnKeyType="done"
|
|
@@ -881,9 +890,7 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
881
890
|
<OButton
|
|
882
891
|
onClick={handleSubmit(onSubmit)}
|
|
883
892
|
text={t('GET_VERIFY_CODE', 'Get Verify Code')}
|
|
884
|
-
borderColor={theme.colors.primary}
|
|
885
893
|
imgRightSrc={null}
|
|
886
|
-
textStyle={{ color: 'white' }}
|
|
887
894
|
isLoading={isLoadingVerifyModal}
|
|
888
895
|
indicatorColor={theme.colors.white}
|
|
889
896
|
style={{ borderRadius: 7.6, marginTop: 6 }}
|
|
@@ -892,9 +899,6 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
892
899
|
<OButton
|
|
893
900
|
onClick={handleSubmit(onSubmit)}
|
|
894
901
|
text={signupButtonText}
|
|
895
|
-
bgColor={theme.colors.primary}
|
|
896
|
-
borderColor={theme.colors.primary}
|
|
897
|
-
textStyle={{ color: 'white' }}
|
|
898
902
|
imgRightSrc={null}
|
|
899
903
|
isDisabled={formState.loading || validationFields.loading}
|
|
900
904
|
style={{ borderRadius: 7.6, marginTop: 6, shadowOpacity: 0 }}
|
|
@@ -976,13 +980,16 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
976
980
|
)
|
|
977
981
|
)}
|
|
978
982
|
</FormSide>
|
|
979
|
-
<
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
title={t('ENTER_VERIFICATION_CODE', 'Enter verification code')}
|
|
983
|
+
<Modal
|
|
984
|
+
visible={willVerifyOtpState}
|
|
985
|
+
onDismiss={() => setWillVerifyOtpState && setWillVerifyOtpState(false)}
|
|
986
|
+
animationType='slide'
|
|
984
987
|
>
|
|
985
988
|
<Otp
|
|
989
|
+
isCheckingCode={isCheckingCode}
|
|
990
|
+
setCheckingCode={setCheckingCode}
|
|
991
|
+
otpError={otpError}
|
|
992
|
+
setOtpError={setOtpError}
|
|
986
993
|
pinCount={numOtpInputs || 6}
|
|
987
994
|
willVerifyOtpState={willVerifyOtpState || false}
|
|
988
995
|
setWillVerifyOtpState={() => setWillVerifyOtpState && setWillVerifyOtpState(false)}
|
|
@@ -990,7 +997,7 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
990
997
|
onSubmit={onSubmit}
|
|
991
998
|
setAlertState={setAlertState}
|
|
992
999
|
/>
|
|
993
|
-
</
|
|
1000
|
+
</Modal>
|
|
994
1001
|
<Spinner
|
|
995
1002
|
visible={formState.loading || validationFields.loading || isFBLoading}
|
|
996
1003
|
/>
|