ordering-ui-react-native 0.15.98 → 0.16.0-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 +8 -3
- package/src/DeliveryApp.tsx +43 -1
- package/src/components/ActiveOrders/index.tsx +61 -63
- package/src/components/ActiveOrders/styles.tsx +8 -14
- package/src/components/AddressForm/index.tsx +18 -2
- package/src/components/BusinessBasicInformation/index.tsx +11 -19
- package/src/components/BusinessController/index.tsx +10 -8
- package/src/components/BusinessInformation/index.tsx +22 -0
- package/src/components/BusinessTypeFilter/index.tsx +1 -2
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/Checkout/index.tsx +2 -1
- package/src/components/DriverTips/index.tsx +11 -6
- package/src/components/LanguageSelector/index.tsx +21 -16
- package/src/components/LoginForm/index.tsx +120 -30
- package/src/components/LoginForm/styles.tsx +6 -0
- package/src/components/Messages/index.tsx +2 -2
- package/src/components/NotificationSetting/index.tsx +85 -0
- package/src/components/OrderDetails/index.tsx +7 -21
- package/src/components/OrdersOption/index.tsx +54 -56
- package/src/components/PaymentOptions/index.tsx +335 -365
- package/src/components/PaymentOptionsWebView/index.tsx +120 -121
- package/src/components/ReviewDriver/index.tsx +1 -1
- package/src/components/ReviewOrder/index.tsx +2 -1
- package/src/components/ReviewProducts/index.tsx +11 -0
- package/src/components/SignupForm/index.tsx +145 -61
- package/src/components/SingleProductReview/index.tsx +8 -5
- package/src/components/StripeElementsForm/index.tsx +25 -16
- package/src/components/StripeMethodForm/index.tsx +22 -24
- package/src/components/UpsellingProducts/index.tsx +1 -1
- package/src/components/UserProfileForm/index.tsx +63 -6
- package/src/components/UserProfileForm/styles.tsx +8 -0
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/components/shared/OBottomPopup.tsx +6 -2
- package/src/components/shared/OModal.tsx +1 -1
- package/src/index.tsx +2 -0
- package/src/navigators/CheckoutNavigator.tsx +6 -0
- package/src/navigators/HomeNavigator.tsx +6 -0
- package/src/pages/BusinessesListing.tsx +7 -6
- package/src/pages/MultiCheckout.tsx +31 -0
- package/src/pages/MultiOrdersDetails.tsx +27 -0
- package/src/pages/OrderDetails.tsx +1 -1
- package/src/pages/ReviewDriver.tsx +2 -2
- package/src/pages/ReviewOrder.tsx +2 -2
- package/src/theme.json +0 -1
- package/src/types/@fatnlazycat/react-native-recaptcha-v3/index.d.ts +1 -0
- package/src/types/index.tsx +15 -9
- package/src/utils/index.tsx +0 -1
- package/themes/business/index.tsx +4 -0
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +1 -1
- package/themes/business/src/components/BusinessController/index.tsx +2 -2
- package/themes/business/src/components/Chat/index.tsx +42 -34
- package/themes/business/src/components/DriverMap/index.tsx +12 -8
- package/themes/business/src/components/DriverSchedule/index.tsx +71 -0
- package/themes/business/src/components/DriverSchedule/styles.tsx +6 -0
- package/themes/business/src/components/LoginForm/index.tsx +111 -74
- package/themes/business/src/components/LogoutButton/index.tsx +1 -1
- package/themes/business/src/components/MapView/index.tsx +1 -1
- package/themes/business/src/components/MessagesOption/index.tsx +11 -1
- package/themes/business/src/components/OrderDetails/Business.tsx +1 -1
- package/themes/business/src/components/OrderDetails/Delivery.tsx +3 -3
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +25 -18
- package/themes/business/src/components/OrdersListManager/index.tsx +10 -3
- package/themes/business/src/components/OrdersOption/index.tsx +65 -21
- package/themes/business/src/components/OrdersOption/styles.tsx +5 -1
- package/themes/business/src/components/OrdersOptionBusiness/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionCity/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionDate/index.tsx +19 -6
- package/themes/business/src/components/OrdersOptionDelivery/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionDriver/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionPaymethod/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionStatus/index.tsx +10 -1
- package/themes/business/src/components/PreviousMessages/index.tsx +17 -18
- package/themes/business/src/components/PreviousOrders/index.tsx +21 -23
- package/themes/business/src/components/ProductItemAccordion/index.tsx +5 -4
- package/themes/business/src/components/ReviewCustomer/index.tsx +1 -1
- package/themes/business/src/components/ScheduleBlocked/index.tsx +53 -0
- package/themes/business/src/components/UserFormDetails/index.tsx +5 -2
- package/themes/business/src/components/UserProfileForm/index.tsx +28 -4
- package/themes/business/src/components/shared/ODropDown.tsx +42 -8
- package/themes/business/src/components/shared/ODropDownCalendar.tsx +36 -7
- package/themes/business/src/components/shared/OModal.tsx +41 -38
- package/themes/business/src/types/index.tsx +14 -9
- package/themes/business/src/utils/index.tsx +10 -0
- 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/BusinessMenu/index.tsx +2 -1
- package/themes/kiosk/src/components/CartBottomSheet/index.tsx +9 -2
- package/themes/kiosk/src/components/CartContent/index.tsx +0 -11
- package/themes/kiosk/src/components/CartItem/index.tsx +4 -3
- package/themes/kiosk/src/components/CategoriesMenu/index.tsx +70 -31
- package/themes/kiosk/src/components/Checkout/index.tsx +18 -3
- package/themes/kiosk/src/components/CustomerName/index.tsx +0 -6
- package/themes/kiosk/src/components/DrawerView/index.tsx +1 -0
- package/themes/kiosk/src/components/DrawerView/styles.tsx +2 -2
- package/themes/kiosk/src/components/LoginForm/index.tsx +121 -10
- package/themes/kiosk/src/components/LoginForm/styles.tsx +5 -0
- 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/OrderDetails/index.tsx +2 -2
- package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
- package/themes/kiosk/src/components/PaymentOptions/index.tsx +1 -1
- package/themes/kiosk/src/components/ProductForm/index.tsx +6 -7
- package/themes/kiosk/src/components/UpsellingProducts/index.tsx +16 -5
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/kiosk/src/types/index.d.ts +3 -0
- package/themes/original/index.tsx +22 -0
- package/themes/original/src/components/ActiveOrders/index.tsx +15 -132
- package/themes/original/src/components/ActiveOrders/styles.tsx +0 -54
- package/themes/original/src/components/AddressForm/index.tsx +137 -134
- package/themes/original/src/components/AddressList/index.tsx +2 -2
- package/themes/original/src/components/AppleLogin/index.tsx +4 -4
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +302 -160
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +6 -2
- package/themes/original/src/components/BusinessController/index.tsx +179 -96
- package/themes/original/src/components/BusinessController/styles.tsx +5 -0
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +12 -9
- package/themes/original/src/components/BusinessItemAccordion/styles.tsx +3 -1
- package/themes/original/src/components/BusinessListingSearch/BusinessControllerSkeletons/index.tsx +57 -0
- package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +59 -0
- package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/styles.tsx +13 -0
- package/themes/original/src/components/BusinessListingSearch/index.tsx +106 -126
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +18 -13
- package/themes/original/src/components/BusinessPreorder/index.tsx +1 -1
- package/themes/original/src/components/BusinessProductsCategories/index.tsx +2 -2
- package/themes/original/src/components/BusinessProductsList/CategoryDescription/index.tsx +44 -0
- package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/index.tsx +87 -0
- package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/styles.tsx +12 -0
- package/themes/original/src/components/BusinessProductsList/index.tsx +66 -73
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +298 -178
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +18 -0
- package/themes/original/src/components/BusinessReviews/index.tsx +6 -1
- package/themes/original/src/components/BusinessTypeFilter/index.tsx +106 -38
- package/themes/original/src/components/BusinessTypeFilter/styles.tsx +2 -0
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +561 -0
- package/themes/original/src/components/BusinessesListing/{styles.tsx → Layout/Appointment/styles.tsx} +24 -2
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +673 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +137 -0
- package/themes/original/src/components/BusinessesListing/index.tsx +102 -464
- package/themes/original/src/components/Cart/index.tsx +82 -37
- package/themes/original/src/components/Cart/styles.tsx +4 -0
- package/themes/original/src/components/CartContent/index.tsx +22 -16
- package/themes/original/src/components/Checkout/index.tsx +107 -67
- package/themes/original/src/components/Checkout/styles.tsx +0 -1
- package/themes/original/src/components/DriverTips/index.tsx +11 -6
- package/themes/original/src/components/Favorite/index.tsx +92 -0
- package/themes/original/src/components/Favorite/styles.tsx +22 -0
- package/themes/original/src/components/FavoriteList/index.tsx +317 -0
- package/themes/original/src/components/FavoriteList/styles.tsx +5 -0
- package/themes/original/src/components/GPSButton/index.tsx +25 -17
- package/themes/original/src/components/GoogleMap/index.tsx +21 -12
- package/themes/original/src/components/HelpAccountAndPayment/index.tsx +8 -3
- package/themes/original/src/components/HelpGuide/index.tsx +8 -3
- package/themes/original/src/components/HelpOrder/index.tsx +8 -3
- package/themes/original/src/components/HighestRatedBusinesses/index.tsx +18 -1
- package/themes/original/src/components/LoginForm/Otp/index.tsx +3 -2
- package/themes/original/src/components/LoginForm/index.tsx +86 -43
- package/themes/original/src/components/Messages/index.tsx +17 -17
- package/themes/original/src/components/MomentSelector/index.tsx +197 -0
- package/themes/original/src/components/MomentSelector/styles.tsx +6 -0
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +243 -0
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/styles.tsx +46 -0
- package/themes/original/src/components/MultiCheckout/index.tsx +304 -0
- package/themes/original/src/components/MultiCheckout/styles.tsx +59 -0
- package/themes/original/src/components/MultiOrdersDetails/SingleOrderCard.tsx +372 -0
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +262 -0
- package/themes/original/src/components/MultiOrdersDetails/styles.tsx +50 -0
- package/themes/original/src/components/MyOrders/index.tsx +132 -27
- package/themes/original/src/components/MyOrders/styles.tsx +8 -1
- package/themes/original/src/components/NavBar/index.tsx +11 -5
- package/themes/original/src/components/NotFoundSource/index.tsx +2 -1
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +167 -0
- package/themes/original/src/components/OrderDetails/index.tsx +138 -58
- package/themes/original/src/components/OrderDetails/styles.tsx +5 -2
- package/themes/original/src/components/OrderItAgain/index.tsx +73 -0
- package/themes/original/src/components/OrderItAgain/styles.tsx +10 -0
- package/themes/original/src/components/OrderProgress/index.tsx +8 -2
- package/themes/original/src/components/OrderSummary/index.tsx +2 -35
- package/themes/original/src/components/OrderTypeSelector/index.tsx +84 -36
- package/themes/original/src/components/OrderTypeSelector/styles.tsx +19 -1
- package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +140 -0
- package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/styles.tsx +6 -0
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +56 -0
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/styles.tsx +6 -0
- package/themes/original/src/components/OrdersOption/index.tsx +143 -47
- package/themes/original/src/components/OrdersOption/styles.tsx +4 -1
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +15 -23
- package/themes/original/src/components/PaymentOptions/index.tsx +57 -37
- package/themes/original/src/components/PhoneInputNumber/index.tsx +4 -10
- package/themes/original/src/components/PlaceSpot/index.tsx +243 -47
- package/themes/original/src/components/PlaceSpot/styles.tsx +0 -2
- package/themes/original/src/components/PreviousOrders/index.tsx +18 -147
- package/themes/original/src/components/ProductForm/index.tsx +697 -649
- package/themes/original/src/components/ProductForm/styles.tsx +9 -7
- package/themes/original/src/components/ProductItemAccordion/index.tsx +38 -25
- package/themes/original/src/components/ProductOption/index.tsx +1 -1
- package/themes/original/src/components/ProfessionalFilter/index.tsx +128 -0
- package/themes/original/src/components/ProfessionalFilter/styles.tsx +0 -0
- package/themes/original/src/components/ProfessionalProfile/index.tsx +298 -0
- package/themes/original/src/components/ProfessionalProfile/styles.tsx +46 -0
- package/themes/original/src/components/ReviewDriver/index.tsx +6 -6
- package/themes/original/src/components/ReviewOrder/index.tsx +18 -3
- package/themes/original/src/components/ReviewProducts/index.tsx +1 -1
- package/themes/original/src/components/ReviewTrigger/index.tsx +118 -0
- package/themes/original/src/components/ReviewTrigger/styles.tsx +34 -0
- package/themes/original/src/components/SearchBar/index.tsx +13 -5
- package/themes/original/src/components/ServiceForm/index.tsx +579 -0
- package/themes/original/src/components/ServiceForm/styles.tsx +50 -0
- package/themes/original/src/components/SignupForm/index.tsx +307 -159
- package/themes/original/src/components/SingleOrderCard/index.tsx +316 -0
- package/themes/original/src/components/SingleOrderCard/styles.tsx +54 -0
- package/themes/original/src/components/SingleProductCard/index.tsx +215 -95
- package/themes/original/src/components/SingleProductCard/styles.tsx +2 -2
- package/themes/original/src/components/SingleProductReview/index.tsx +30 -3
- package/themes/original/src/components/SingleProductReview/styles.tsx +12 -0
- package/themes/original/src/components/StripeElementsForm/index.tsx +25 -9
- package/themes/original/src/components/StripeElementsForm/naked.tsx +2 -2
- package/themes/original/src/components/UpsellingProducts/index.tsx +7 -3
- package/themes/original/src/components/UserDetails/index.tsx +32 -18
- package/themes/original/src/components/UserFormDetails/index.tsx +108 -74
- package/themes/original/src/components/UserProfile/index.tsx +4 -0
- package/themes/original/src/components/UserProfileForm/index.tsx +15 -10
- package/themes/original/src/components/UserVerification/index.tsx +178 -192
- package/themes/original/src/components/WalletTransactions/index.tsx +76 -0
- package/themes/original/src/components/WalletTransactions/styles.tsx +13 -0
- package/themes/original/src/components/Wallets/index.tsx +176 -162
- package/themes/original/src/components/Wallets/styles.tsx +10 -8
- package/themes/original/src/components/shared/OBottomPopup.tsx +47 -14
- package/themes/original/src/components/shared/OButton.tsx +10 -3
- package/themes/original/src/components/shared/OInput.tsx +3 -2
- package/themes/original/src/components/shared/OModal.tsx +4 -2
- package/themes/original/src/layouts/FloatingBottomContainer.tsx +5 -1
- package/themes/original/src/types/index.tsx +200 -47
- package/themes/original/src/utils/index.tsx +77 -0
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
TextInput,
|
|
8
8
|
SafeAreaView,
|
|
9
9
|
TouchableOpacity,
|
|
10
|
+
ScrollView,
|
|
10
11
|
} from 'react-native';
|
|
11
12
|
import {
|
|
12
13
|
UserVerification as UserVerificationController,
|
|
@@ -81,7 +82,6 @@ const UserVerificationUI = (props: any) => {
|
|
|
81
82
|
const [containerIsFocused, setContainerIsFocused] = useState(false);
|
|
82
83
|
|
|
83
84
|
const [phoneState, setPhoneState] = useState<any>(null)
|
|
84
|
-
const [modalIsOpen, setModalIsOpen] = useState(false)
|
|
85
85
|
const [verificationState, setVerificationState] = useState({ email: false, phone: false })
|
|
86
86
|
|
|
87
87
|
const codeDigitsArray = new Array(CODE_LENGTH).fill(0);
|
|
@@ -155,7 +155,7 @@ const UserVerificationUI = (props: any) => {
|
|
|
155
155
|
|
|
156
156
|
const containerStyle =
|
|
157
157
|
containerIsFocused && isFocused
|
|
158
|
-
? {...style.inputContainer, ...style.inputContainerFocused}
|
|
158
|
+
? { ...style.inputContainer, ...style.inputContainerFocused }
|
|
159
159
|
: style.inputContainer;
|
|
160
160
|
|
|
161
161
|
return (
|
|
@@ -250,8 +250,8 @@ const UserVerificationUI = (props: any) => {
|
|
|
250
250
|
showToast(
|
|
251
251
|
ToastType.Error,
|
|
252
252
|
verifyEmailState?.errorSendCode?.[0]
|
|
253
|
-
|
|
254
|
-
|
|
253
|
+
?? verifyEmailState?.errorCheckCode?.[0]
|
|
254
|
+
?? t('ERROR', 'Error'),
|
|
255
255
|
);
|
|
256
256
|
setTimeout(() => {
|
|
257
257
|
cleanErrorsState();
|
|
@@ -264,8 +264,8 @@ const UserVerificationUI = (props: any) => {
|
|
|
264
264
|
showToast(
|
|
265
265
|
ToastType.Error,
|
|
266
266
|
verifyPhoneState?.errorSendCode?.[0]
|
|
267
|
-
|
|
268
|
-
|
|
267
|
+
?? verifyPhoneState?.errorCheckCode?.[0]
|
|
268
|
+
?? t('ERROR', 'Error'),
|
|
269
269
|
);
|
|
270
270
|
setTimeout(() => {
|
|
271
271
|
cleanErrorsState();
|
|
@@ -296,209 +296,195 @@ const UserVerificationUI = (props: any) => {
|
|
|
296
296
|
|
|
297
297
|
return (
|
|
298
298
|
<SafeAreaView style={{ flex: 1 }}>
|
|
299
|
-
<
|
|
300
|
-
<
|
|
301
|
-
<
|
|
302
|
-
<
|
|
303
|
-
{
|
|
304
|
-
|
|
305
|
-
{isEmailVerifyRequired && (
|
|
306
|
-
<OText size={14} color={theme.colors.disabled} style={{ textAlign: 'center', paddingVertical: 20 }}>
|
|
307
|
-
{!verificationState.email ? (
|
|
308
|
-
t('VERIFICATION_EMAIL_CODE_MESSAGE', 'In order to continue using our platform please verify your email')
|
|
309
|
-
) : (
|
|
310
|
-
t('VERIFICATION_EMAIL_CODE_SENT_MESSAGE', 'Please type the verification code sent to your email')
|
|
311
|
-
)}
|
|
299
|
+
<ScrollView>
|
|
300
|
+
<Container>
|
|
301
|
+
<WrapperActions>
|
|
302
|
+
<WrapperText>
|
|
303
|
+
<OText size={22} weight='bold' style={{ marginBottom: 10 }}>
|
|
304
|
+
{t('VERIFICATION_CODE', 'Verification Code')}
|
|
312
305
|
</OText>
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
{timer}
|
|
349
|
-
</OText>
|
|
350
|
-
</CountDownContainer>
|
|
351
|
-
</WrappCountdown>
|
|
352
|
-
|
|
353
|
-
<InputsSection>
|
|
354
|
-
<OtpSection>
|
|
355
|
-
<DigitInput
|
|
356
|
-
disabled={otpState.length === CODE_LENGTH}
|
|
357
|
-
onPress={handleOnPress}
|
|
358
|
-
>
|
|
359
|
-
{codeDigitsArray.map(toDigitInput)}
|
|
360
|
-
</DigitInput>
|
|
361
|
-
<TextInput
|
|
362
|
-
ref={ref}
|
|
363
|
-
value={otpState}
|
|
364
|
-
placeholder='0'
|
|
365
|
-
onChangeText={setOtpState}
|
|
366
|
-
onSubmitEditing={handleOnBlur}
|
|
367
|
-
keyboardType="number-pad"
|
|
368
|
-
returnKeyType="done"
|
|
369
|
-
textContentType="oneTimeCode"
|
|
370
|
-
maxLength={CODE_LENGTH}
|
|
371
|
-
style={style.hiddenCodeInput}
|
|
372
|
-
/>
|
|
373
|
-
</OtpSection>
|
|
374
|
-
</InputsSection>
|
|
375
|
-
|
|
376
|
-
<WrapperText>
|
|
377
|
-
<TouchableOpacity
|
|
378
|
-
onPress={() => handleSendOtp()}
|
|
379
|
-
>
|
|
380
|
-
<OText color={theme.colors.primary}>
|
|
381
|
-
{t('RESEND_AGAIN', 'Resend again?')}
|
|
382
|
-
</OText>
|
|
383
|
-
</TouchableOpacity>
|
|
384
|
-
</WrapperText>
|
|
385
|
-
</>
|
|
386
|
-
)
|
|
387
|
-
)}
|
|
388
|
-
|
|
389
|
-
{isPhoneVerifyRequired && !isEmailVerifyRequired && (
|
|
390
|
-
!verificationState.phone ? (
|
|
391
|
-
phoneState?.formatted ? (
|
|
392
|
-
<>
|
|
393
|
-
<InputWrapper phone>
|
|
394
|
-
<PhoneInputNumber
|
|
395
|
-
handleData={() => {}}
|
|
396
|
-
defaultValue={phoneState?.cellphone}
|
|
397
|
-
defaultCode={phoneState?.country_phone_code.replace('+', '')}
|
|
398
|
-
boxStyle={style.phoneSelect}
|
|
399
|
-
inputStyle={style.phoneInputStyle}
|
|
400
|
-
textStyle={{ color: theme.colors.textNormal, fontSize: 12, padding: 0 }}
|
|
401
|
-
noDropIcon
|
|
402
|
-
isDisabled
|
|
403
|
-
/>
|
|
404
|
-
</InputWrapper>
|
|
405
|
-
</>
|
|
306
|
+
{isEmailVerifyRequired && (
|
|
307
|
+
<OText size={14} color={theme.colors.disabled} style={{ textAlign: 'center', paddingVertical: 20 }}>
|
|
308
|
+
{!verificationState.email ? (
|
|
309
|
+
t('VERIFICATION_EMAIL_CODE_MESSAGE', 'In order to continue using our platform please verify your email')
|
|
310
|
+
) : (
|
|
311
|
+
t('VERIFICATION_EMAIL_CODE_SENT_MESSAGE', 'Please type the verification code sent to your email')
|
|
312
|
+
)}
|
|
313
|
+
</OText>
|
|
314
|
+
)}
|
|
315
|
+
|
|
316
|
+
{isPhoneVerifyRequired && !isEmailVerifyRequired && (
|
|
317
|
+
<OText size={14} color={theme.colors.disabled} style={{ textAlign: 'center', paddingVertical: 20 }}>
|
|
318
|
+
{!verificationState.phone ? (
|
|
319
|
+
t('VERIFICATION_PHONE_CODE_MESSAGE', 'In order to continue using our platform please verify your phone number')
|
|
320
|
+
) : (
|
|
321
|
+
t('VERIFICATION_PHONE_CODE_SENT_MESSAGE', 'Please, enter the verification code we sent to your mobile ending with :number').replace(':number', lastNumbers)
|
|
322
|
+
)}
|
|
323
|
+
</OText>
|
|
324
|
+
)}
|
|
325
|
+
</WrapperText>
|
|
326
|
+
<View style={{ position: 'absolute', top: 0, right: 0 }}>
|
|
327
|
+
<LogoutButton iconSize={20} />
|
|
328
|
+
</View>
|
|
329
|
+
</WrapperActions>
|
|
330
|
+
|
|
331
|
+
{isEmailVerifyRequired && (
|
|
332
|
+
!verificationState.email ? (
|
|
333
|
+
<InputWrapper>
|
|
334
|
+
<OInput
|
|
335
|
+
placeholder={user?.email}
|
|
336
|
+
style={style.inputStyle}
|
|
337
|
+
icon={theme.images.general.email}
|
|
338
|
+
isDisabled
|
|
339
|
+
/>
|
|
340
|
+
</InputWrapper>
|
|
406
341
|
) : (
|
|
407
342
|
<>
|
|
343
|
+
<WrappCountdown>
|
|
344
|
+
<CountDownContainer color={timer === '00:00' ? theme.colors.error : theme.colors.success}>
|
|
345
|
+
<OText
|
|
346
|
+
size={26}
|
|
347
|
+
color={timer === '00:00' ? theme.colors.error : theme.colors.success}
|
|
348
|
+
>
|
|
349
|
+
{timer}
|
|
350
|
+
</OText>
|
|
351
|
+
</CountDownContainer>
|
|
352
|
+
</WrappCountdown>
|
|
353
|
+
|
|
354
|
+
<InputsSection>
|
|
355
|
+
<OtpSection>
|
|
356
|
+
<DigitInput
|
|
357
|
+
disabled={otpState.length === CODE_LENGTH}
|
|
358
|
+
onPress={handleOnPress}
|
|
359
|
+
>
|
|
360
|
+
{codeDigitsArray.map(toDigitInput)}
|
|
361
|
+
</DigitInput>
|
|
362
|
+
<TextInput
|
|
363
|
+
ref={ref}
|
|
364
|
+
value={otpState}
|
|
365
|
+
placeholder='0'
|
|
366
|
+
onChangeText={setOtpState}
|
|
367
|
+
onSubmitEditing={handleOnBlur}
|
|
368
|
+
keyboardType="number-pad"
|
|
369
|
+
returnKeyType="done"
|
|
370
|
+
textContentType="oneTimeCode"
|
|
371
|
+
maxLength={CODE_LENGTH}
|
|
372
|
+
style={style.hiddenCodeInput}
|
|
373
|
+
/>
|
|
374
|
+
</OtpSection>
|
|
375
|
+
</InputsSection>
|
|
376
|
+
|
|
377
|
+
<WrapperText>
|
|
378
|
+
<TouchableOpacity
|
|
379
|
+
onPress={() => handleSendOtp()}
|
|
380
|
+
>
|
|
381
|
+
<OText color={theme.colors.primary}>
|
|
382
|
+
{t('RESEND_AGAIN', 'Resend again?')}
|
|
383
|
+
</OText>
|
|
384
|
+
</TouchableOpacity>
|
|
385
|
+
</WrapperText>
|
|
386
|
+
</>
|
|
387
|
+
)
|
|
388
|
+
)}
|
|
389
|
+
|
|
390
|
+
{isPhoneVerifyRequired && !isEmailVerifyRequired && (
|
|
391
|
+
!verificationState.phone ? (
|
|
392
|
+
phoneState?.formatted ? (
|
|
393
|
+
<>
|
|
394
|
+
<InputWrapper phone>
|
|
395
|
+
<PhoneInputNumber
|
|
396
|
+
handleData={() => { }}
|
|
397
|
+
defaultValue={phoneState?.cellphone}
|
|
398
|
+
defaultCode={phoneState?.country_phone_code.replace('+', '')}
|
|
399
|
+
boxStyle={style.phoneSelect}
|
|
400
|
+
inputStyle={style.phoneInputStyle}
|
|
401
|
+
textStyle={{ color: theme.colors.textNormal, fontSize: 12, padding: 0 }}
|
|
402
|
+
noDropIcon
|
|
403
|
+
isDisabled
|
|
404
|
+
/>
|
|
405
|
+
</InputWrapper>
|
|
406
|
+
</>
|
|
407
|
+
) : (
|
|
408
408
|
<OText size={14} color={theme.colors.disabled} style={{ textAlign: 'center', paddingVertical: 20 }}>
|
|
409
409
|
{t('WARNING_PHONE_CODE_VALIDATION', 'Please update your phone number to continue')}
|
|
410
410
|
</OText>
|
|
411
|
+
)
|
|
412
|
+
) : (
|
|
413
|
+
<>
|
|
414
|
+
<WrappCountdown>
|
|
415
|
+
<CountDownContainer color={timer === '00:00' ? theme.colors.error : theme.colors.success}>
|
|
416
|
+
<OText
|
|
417
|
+
size={26}
|
|
418
|
+
color={timer === '00:00' ? theme.colors.error : theme.colors.success}
|
|
419
|
+
>
|
|
420
|
+
{timer}
|
|
421
|
+
</OText>
|
|
422
|
+
</CountDownContainer>
|
|
423
|
+
</WrappCountdown>
|
|
424
|
+
|
|
425
|
+
<InputsSection>
|
|
426
|
+
<OtpSection>
|
|
427
|
+
<DigitInput
|
|
428
|
+
disabled={otpState.length === CODE_LENGTH}
|
|
429
|
+
onPress={handleOnPress}
|
|
430
|
+
>
|
|
431
|
+
{codeDigitsArray.map(toDigitInput)}
|
|
432
|
+
</DigitInput>
|
|
433
|
+
<TextInput
|
|
434
|
+
ref={ref}
|
|
435
|
+
value={otpState}
|
|
436
|
+
placeholder='0'
|
|
437
|
+
onChangeText={setOtpState}
|
|
438
|
+
onSubmitEditing={handleOnBlur}
|
|
439
|
+
keyboardType="number-pad"
|
|
440
|
+
returnKeyType="done"
|
|
441
|
+
textContentType="oneTimeCode"
|
|
442
|
+
maxLength={CODE_LENGTH}
|
|
443
|
+
style={style.hiddenCodeInput}
|
|
444
|
+
/>
|
|
445
|
+
</OtpSection>
|
|
446
|
+
</InputsSection>
|
|
447
|
+
|
|
411
448
|
<WrapperText>
|
|
412
449
|
<TouchableOpacity
|
|
413
|
-
onPress={() =>
|
|
450
|
+
onPress={() => handleSendOtp('phone')}
|
|
451
|
+
disabled={verifyPhoneState?.loadingSendCode || verifyPhoneState?.loadingCheckCode}
|
|
414
452
|
>
|
|
415
453
|
<OText color={theme.colors.primary}>
|
|
416
|
-
{t('
|
|
454
|
+
{t('RESEND_AGAIN', 'Resend again?')}
|
|
417
455
|
</OText>
|
|
418
456
|
</TouchableOpacity>
|
|
419
457
|
</WrapperText>
|
|
420
458
|
</>
|
|
421
459
|
)
|
|
422
|
-
)
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
onChangeText={setOtpState}
|
|
448
|
-
onSubmitEditing={handleOnBlur}
|
|
449
|
-
keyboardType="number-pad"
|
|
450
|
-
returnKeyType="done"
|
|
451
|
-
textContentType="oneTimeCode"
|
|
452
|
-
maxLength={CODE_LENGTH}
|
|
453
|
-
style={style.hiddenCodeInput}
|
|
454
|
-
/>
|
|
455
|
-
</OtpSection>
|
|
456
|
-
</InputsSection>
|
|
457
|
-
|
|
458
|
-
<WrapperText>
|
|
459
|
-
<TouchableOpacity
|
|
460
|
-
onPress={() => handleSendOtp('phone')}
|
|
461
|
-
disabled={verifyPhoneState?.loadingSendCode || verifyPhoneState?.loadingCheckCode}
|
|
462
|
-
>
|
|
463
|
-
<OText color={theme.colors.primary}>
|
|
464
|
-
{t('RESEND_AGAIN', 'Resend again?')}
|
|
465
|
-
</OText>
|
|
466
|
-
</TouchableOpacity>
|
|
467
|
-
</WrapperText>
|
|
468
|
-
</>
|
|
469
|
-
)
|
|
470
|
-
)}
|
|
471
|
-
|
|
472
|
-
</Container>
|
|
473
|
-
<ButtonsActions>
|
|
474
|
-
<View style={{ width: '100%' }}>
|
|
475
|
-
<OButton
|
|
476
|
-
onClick={(verificationState.email || verificationState.phone)
|
|
477
|
-
? () => setVerificationState({ email: false, phone: false })
|
|
478
|
-
: () => handleSendOtp(isPhoneVerifyRequired && !isEmailVerifyRequired ? 'phone' : '')
|
|
479
|
-
}
|
|
480
|
-
text={(verificationState.email || verificationState.phone) ? t('CANCEL', 'Cancel') : t('SEND_CODE', 'Send code')}
|
|
481
|
-
bgColor={(verificationState.email || verificationState.phone) ? theme.colors.secundary : theme.colors.primary}
|
|
482
|
-
borderColor={(verificationState.email || verificationState.phone) ? theme.colors.secundary : theme.colors.primary}
|
|
483
|
-
textStyle={{ color: (verificationState.email || verificationState.phone) ? 'black' : 'white' }}
|
|
484
|
-
imgRightSrc={null}
|
|
485
|
-
isLoading={verifyEmailState?.loadingSendCode || verifyEmailState?.loadingCheckCode || verifyPhoneState?.loadingSendCode || verifyPhoneState?.loadingCheckCode}
|
|
486
|
-
style={(verificationState.email || verificationState.phone) ? style.btnStyle : { borderRadius: 7.6 }}
|
|
460
|
+
)}
|
|
461
|
+
|
|
462
|
+
</Container>
|
|
463
|
+
<ButtonsActions>
|
|
464
|
+
<View style={{ width: '100%' }}>
|
|
465
|
+
<OButton
|
|
466
|
+
onClick={(verificationState.email || verificationState.phone)
|
|
467
|
+
? () => setVerificationState({ email: false, phone: false })
|
|
468
|
+
: () => handleSendOtp(isPhoneVerifyRequired && !isEmailVerifyRequired ? 'phone' : '')
|
|
469
|
+
}
|
|
470
|
+
text={(verificationState.email || verificationState.phone) ? t('CANCEL', 'Cancel') : t('SEND_CODE', 'Send code')}
|
|
471
|
+
bgColor={(verificationState.email || verificationState.phone) ? theme.colors.secundary : theme.colors.primary}
|
|
472
|
+
borderColor={(verificationState.email || verificationState.phone) ? theme.colors.secundary : theme.colors.primary}
|
|
473
|
+
textStyle={{ color: (verificationState.email || verificationState.phone) ? 'black' : 'white' }}
|
|
474
|
+
imgRightSrc={null}
|
|
475
|
+
isLoading={verifyEmailState?.loadingSendCode || verifyEmailState?.loadingCheckCode || verifyPhoneState?.loadingSendCode || verifyPhoneState?.loadingCheckCode}
|
|
476
|
+
style={(verificationState.email || verificationState.phone) ? style.btnStyle : { borderRadius: 7.6 }}
|
|
477
|
+
/>
|
|
478
|
+
</View>
|
|
479
|
+
</ButtonsActions>
|
|
480
|
+
<View style={{ paddingHorizontal: 20, paddingBottom: 80 }}>
|
|
481
|
+
<UserDetails
|
|
482
|
+
user={user}
|
|
483
|
+
isEdit
|
|
484
|
+
isVerifiedPhone
|
|
487
485
|
/>
|
|
488
486
|
</View>
|
|
489
|
-
</
|
|
490
|
-
|
|
491
|
-
<OModal
|
|
492
|
-
open={modalIsOpen}
|
|
493
|
-
entireModal
|
|
494
|
-
customClose
|
|
495
|
-
onClose={() => setModalIsOpen(false)}
|
|
496
|
-
>
|
|
497
|
-
<UserDetails
|
|
498
|
-
user={user}
|
|
499
|
-
handleSuccessUpdate={() => setModalIsOpen(false)}
|
|
500
|
-
/>
|
|
501
|
-
</OModal>
|
|
487
|
+
</ScrollView>
|
|
502
488
|
</SafeAreaView>
|
|
503
489
|
)
|
|
504
490
|
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View } from 'react-native'
|
|
3
|
+
import { useLanguage } from 'ordering-components/native'
|
|
4
|
+
import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
|
|
5
|
+
import { useTheme } from 'styled-components/native'
|
|
6
|
+
import { OText } from '../shared';
|
|
7
|
+
import { WalletTransactionItem } from '../WalletTransactionItem'
|
|
8
|
+
import { NotFoundSource } from '../NotFoundSource';
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
Container,
|
|
12
|
+
TransactionsWrapper
|
|
13
|
+
} from './styles'
|
|
14
|
+
|
|
15
|
+
export const WalletTransactions = (props: any) => {
|
|
16
|
+
const {
|
|
17
|
+
transactionsList,
|
|
18
|
+
currentWalletSelected
|
|
19
|
+
} = props
|
|
20
|
+
|
|
21
|
+
const theme = useTheme()
|
|
22
|
+
const [, t] = useLanguage()
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<Container>
|
|
26
|
+
<View style={{ width: '100%', paddingHorizontal: 1, paddingBottom: 40 }}>
|
|
27
|
+
{!transactionsList?.loading &&
|
|
28
|
+
!transactionsList?.error &&
|
|
29
|
+
transactionsList.list?.[`wallet:${currentWalletSelected?.id}`]?.length > 0 &&
|
|
30
|
+
(
|
|
31
|
+
<>
|
|
32
|
+
<OText style={{fontSize: 20, color: theme.colors.textNormal, marginBottom: 30}}>
|
|
33
|
+
{t('TRANSACTIONS_HISTORY', 'Transactions history')}
|
|
34
|
+
</OText>
|
|
35
|
+
<TransactionsWrapper>
|
|
36
|
+
{transactionsList.list?.[`wallet:${currentWalletSelected?.id}`]?.map((transaction: any, i: number) =>(
|
|
37
|
+
<WalletTransactionItem
|
|
38
|
+
idx={i}
|
|
39
|
+
type={currentWalletSelected?.type}
|
|
40
|
+
key={transaction.id}
|
|
41
|
+
item={transaction}
|
|
42
|
+
withFormatPrice={currentWalletSelected?.type === 'cash'}
|
|
43
|
+
/>
|
|
44
|
+
))}
|
|
45
|
+
</TransactionsWrapper>
|
|
46
|
+
</>
|
|
47
|
+
)}
|
|
48
|
+
|
|
49
|
+
{(transactionsList?.loading || !transactionsList.list?.[`wallet:${currentWalletSelected?.id}`]) && (
|
|
50
|
+
<View>
|
|
51
|
+
{[...Array(4).keys()].map(i => (
|
|
52
|
+
<View style={{ marginBottom: 10 }} key={i}>
|
|
53
|
+
<Placeholder Animation={Fade}>
|
|
54
|
+
<PlaceholderLine width={100} height={100} style={{ marginBottom: 0, borderRadius: 8 }} />
|
|
55
|
+
</Placeholder>
|
|
56
|
+
</View>
|
|
57
|
+
))}
|
|
58
|
+
</View>
|
|
59
|
+
)}
|
|
60
|
+
|
|
61
|
+
{!transactionsList?.loading &&
|
|
62
|
+
!(transactionsList?.loading && transactionsList.list?.[`wallet:${currentWalletSelected?.id}`]) &&
|
|
63
|
+
(transactionsList?.error ||
|
|
64
|
+
!transactionsList.list?.[`wallet:${currentWalletSelected?.id}`]?.length) &&
|
|
65
|
+
(
|
|
66
|
+
<NotFoundSource
|
|
67
|
+
content={transactionsList?.error
|
|
68
|
+
? t('ERROR_NOT_FOUND_TRANSACTIONS', 'Sorry, an error has occurred')
|
|
69
|
+
: t('NOT_FOUND_TRANSACTIONS', 'No transactions to show at this time.')
|
|
70
|
+
}
|
|
71
|
+
/>
|
|
72
|
+
)}
|
|
73
|
+
</View>
|
|
74
|
+
</Container>
|
|
75
|
+
)
|
|
76
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import styled from 'styled-components/native'
|
|
2
|
+
|
|
3
|
+
export const Container = styled.View`
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
`
|
|
7
|
+
|
|
8
|
+
export const TransactionsWrapper = styled.View`
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
border-left-width: 2px;
|
|
12
|
+
border-left-color: ${(props: any) => props.theme.colors.disabled};
|
|
13
|
+
`
|