ordering-ui-react-native 0.21.15 → 0.21.16-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 +7 -6
- package/src/DeliveryApp.tsx +43 -1
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/PaymentOptionsWebView/index.tsx +1 -0
- package/src/components/StripeMethodForm/index.tsx +4 -4
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/types/index.tsx +2 -1
- package/src/utils/index.tsx +2 -2
- package/themes/business/index.tsx +4 -0
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +9 -2
- package/themes/business/src/components/BusinessController/index.tsx +19 -17
- package/themes/business/src/components/BusinessProductList/AccordionDropdown.tsx +63 -0
- package/themes/business/src/components/BusinessProductList/IterateCategories.tsx +108 -0
- package/themes/business/src/components/BusinessProductList/ProductList.tsx +196 -0
- package/themes/business/src/components/BusinessProductList/index.tsx +196 -0
- package/themes/business/src/components/BusinessProductList/styles.tsx +10 -0
- package/themes/business/src/components/Chat/index.tsx +41 -13
- package/themes/business/src/components/DriverMap/index.tsx +4 -3
- package/themes/business/src/components/DriverSchedule/index.tsx +5 -5
- package/themes/business/src/components/FloatingButton/index.tsx +34 -31
- package/themes/business/src/components/Home/index.tsx +5 -1
- package/themes/business/src/components/MapView/index.tsx +11 -7
- package/themes/business/src/components/MessagesOption/index.tsx +22 -94
- package/themes/business/src/components/NewOrderNotification/index.tsx +163 -113
- package/themes/business/src/components/OrderDetails/Business.tsx +50 -2
- package/themes/business/src/components/OrderDetails/Delivery.tsx +23 -11
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +60 -53
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +54 -23
- package/themes/business/src/components/OrderDetails/usePrinterCommands.tsx +220 -0
- package/themes/business/src/components/OrderDetailsLogistic/index.tsx +6 -1
- package/themes/business/src/components/OrderSummary/index.tsx +240 -76
- package/themes/business/src/components/OrdersListManager/index.tsx +7 -2
- package/themes/business/src/components/OrdersListManager/utils.tsx +1 -1
- package/themes/business/src/components/OrdersOption/index.tsx +125 -48
- package/themes/business/src/components/PreviousMessages/FooterMessageComponent.tsx +103 -0
- package/themes/business/src/components/PreviousMessages/index.tsx +97 -55
- package/themes/business/src/components/PreviousOrders/OrderItem.tsx +26 -34
- package/themes/business/src/components/PreviousOrders/OrderList.tsx +93 -0
- package/themes/business/src/components/PreviousOrders/OrdersGroupedItem.tsx +1 -1
- package/themes/business/src/components/PreviousOrders/index.tsx +194 -220
- package/themes/business/src/components/PreviousOrders/styles.tsx +10 -0
- package/themes/business/src/components/PrinterSettings/index.tsx +279 -0
- package/themes/business/src/components/PrinterSettings/styles.tsx +17 -0
- package/themes/business/src/components/ProductItemAccordion/index.tsx +2 -2
- package/themes/business/src/components/ReviewCustomer/index.tsx +2 -0
- package/themes/business/src/components/SearchBar/index.tsx +2 -1
- package/themes/business/src/components/Sessions/index.tsx +187 -0
- package/themes/business/src/components/Sessions/styles.tsx +20 -0
- package/themes/business/src/components/StoresList/index.tsx +5 -3
- package/themes/business/src/components/UserFormDetails/index.tsx +111 -107
- package/themes/business/src/components/UserProfileForm/index.tsx +98 -43
- package/themes/business/src/components/WebsocketStatus/index.tsx +171 -0
- package/themes/business/src/components/WebsocketStatus/styles.tsx +28 -0
- package/themes/business/src/components/shared/OInput.tsx +2 -0
- package/themes/business/src/hooks/useLocation.tsx +5 -4
- package/themes/business/src/types/index.tsx +21 -1
- 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 +6 -0
- package/themes/kiosk/src/components/LoginForm/index.tsx +124 -96
- 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/shared/OButton.tsx +5 -18
- package/themes/original/index.tsx +9 -4
- package/themes/original/src/components/AddressDetails/index.tsx +20 -10
- package/themes/original/src/components/AddressForm/index.tsx +10 -6
- package/themes/original/src/components/AddressForm/styles.tsx +1 -1
- package/themes/original/src/components/AddressList/index.tsx +4 -7
- package/themes/original/src/components/AddressList/styles.tsx +4 -4
- package/themes/original/src/components/AnalyticsSegment/index.tsx +6 -6
- package/themes/original/src/components/AppleLogin/index.tsx +4 -4
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +4 -4
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +1 -1
- package/themes/original/src/components/BusinessController/index.tsx +20 -12
- package/themes/original/src/components/BusinessController/styles.tsx +8 -7
- package/themes/original/src/components/BusinessInformation/styles.tsx +2 -2
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +11 -7
- package/themes/original/src/components/BusinessListingSearch/BusinessSearchFooter.tsx +317 -0
- package/themes/original/src/components/BusinessListingSearch/BusinessSearchHeader.tsx +96 -0
- package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +1 -1
- package/themes/original/src/components/BusinessListingSearch/index.tsx +56 -361
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +1 -1
- package/themes/original/src/components/BusinessPreorder/index.tsx +2 -3
- package/themes/original/src/components/BusinessProductsCategories/index.tsx +1 -1
- package/themes/original/src/components/BusinessProductsList/index.tsx +3 -3
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +51 -20
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +3 -4
- package/themes/original/src/components/BusinessReviews/index.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +5 -5
- package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListFooter.tsx +69 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListHeader.tsx +406 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListing.tsx +76 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +24 -404
- 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 +32 -9
- package/themes/original/src/components/CartContent/index.tsx +96 -58
- package/themes/original/src/components/CartStoresListing/styles.tsx +2 -2
- package/themes/original/src/components/Checkout/index.tsx +190 -66
- package/themes/original/src/components/Checkout/styles.tsx +17 -0
- package/themes/original/src/components/CitiesControl/styles.tsx +1 -1
- package/themes/original/src/components/DatePicker/index.tsx +33 -0
- package/themes/original/src/components/DatePicker/styles.tsx +20 -0
- package/themes/original/src/components/Favorite/index.tsx +4 -9
- package/themes/original/src/components/Favorite/styles.tsx +0 -2
- package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
- package/themes/original/src/components/GPSButton/index.tsx +1 -1
- package/themes/original/src/components/GiftCard/GiftCardOrdersList/index.tsx +64 -0
- package/themes/original/src/components/GiftCard/GiftCardOrdersList/styles.tsx +8 -0
- package/themes/original/src/components/GiftCard/GiftCardUI/index.tsx +8 -3
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/index.tsx +36 -3
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/GiftCard/RedeemGiftCard/index.tsx +67 -4
- package/themes/original/src/components/GiftCard/RedeemGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/GiftCard/SendGiftCard/index.tsx +2 -2
- package/themes/original/src/components/GiftCard/SendGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/GiftCard/SingleGiftCard/index.tsx +101 -0
- package/themes/original/src/components/GiftCard/SingleGiftCard/styles.tsx +4 -0
- package/themes/original/src/components/GiftCard/VerticalGiftCardOrdersLayout/index.tsx +83 -0
- package/themes/original/src/components/GiftCard/VerticalGiftCardOrdersLayout/styles.tsx +9 -0
- package/themes/original/src/components/GoogleMap/index.tsx +6 -5
- package/themes/original/src/components/HighestRatedBusinesses/index.tsx +2 -2
- package/themes/original/src/components/HighestRatedBusinesses/styles.tsx +1 -1
- package/themes/original/src/components/Home/index.tsx +2 -1
- package/themes/original/src/components/LastOrder/index.tsx +2 -1
- package/themes/original/src/components/LastOrders/index.tsx +2 -1
- package/themes/original/src/components/LoginForm/Otp/index.tsx +48 -39
- package/themes/original/src/components/LoginForm/index.tsx +5 -0
- package/themes/original/src/components/Messages/index.tsx +9 -4
- package/themes/original/src/components/Messages/styles.tsx +1 -1
- package/themes/original/src/components/MomentOption/index.tsx +3 -3
- package/themes/original/src/components/MultiCart/index.tsx +1 -1
- package/themes/original/src/components/MultiCheckout/index.tsx +208 -21
- package/themes/original/src/components/MultiCheckout/styles.tsx +17 -0
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +20 -15
- package/themes/original/src/components/MyOrders/index.tsx +24 -29
- package/themes/original/src/components/NavBar/index.tsx +3 -1
- package/themes/original/src/components/NetworkError/index.tsx +2 -3
- package/themes/original/src/components/NetworkError/styles.tsx +2 -2
- package/themes/original/src/components/Notifications/index.tsx +4 -8
- package/themes/original/src/components/Notifications/styles.tsx +0 -1
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +1 -1
- package/themes/original/src/components/OrderDetails/index.tsx +716 -668
- package/themes/original/src/components/OrderDetails/styles.tsx +24 -8
- package/themes/original/src/components/OrderProgress/index.tsx +28 -6
- package/themes/original/src/components/OrderProgress/styles.tsx +1 -1
- package/themes/original/src/components/OrderSummary/index.tsx +3 -1
- package/themes/original/src/components/OrderTypeSelector/index.tsx +5 -6
- package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/styles.tsx +1 -1
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/styles.tsx +1 -1
- package/themes/original/src/components/OrdersOption/index.tsx +3 -5
- package/themes/original/src/components/OrdersOption/styles.tsx +1 -1
- package/themes/original/src/components/PageBanner/index.tsx +3 -0
- package/themes/original/src/components/PaymentOptionCard/index.tsx +4 -2
- package/themes/original/src/components/PaymentOptionStripe/styles.tsx +3 -0
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
- package/themes/original/src/components/PaymentOptions/index.tsx +72 -6
- package/themes/original/src/components/PhoneInputNumber/index.tsx +15 -1
- package/themes/original/src/components/ProductForm/ActionButton.tsx +120 -0
- package/themes/original/src/components/ProductForm/ExtraOptions.tsx +56 -0
- package/themes/original/src/components/ProductForm/index.tsx +74 -165
- package/themes/original/src/components/ProductItemAccordion/index.tsx +54 -44
- package/themes/original/src/components/ProductItemAccordion/styles.tsx +3 -4
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +123 -82
- package/themes/original/src/components/ProductOptionSubOption/styles.tsx +6 -1
- package/themes/original/src/components/ProfessionalProfile/styles.tsx +3 -3
- package/themes/original/src/components/Promotions/index.tsx +4 -4
- package/themes/original/src/components/Promotions/styles.tsx +0 -2
- package/themes/original/src/components/ReviewDriver/styles.tsx +1 -1
- package/themes/original/src/components/ReviewOrder/styles.tsx +1 -1
- package/themes/original/src/components/ReviewProducts/styles.tsx +1 -1
- package/themes/original/src/components/ServiceForm/index.tsx +2 -2
- package/themes/original/src/components/ServiceForm/styles.tsx +4 -4
- package/themes/original/src/components/SingleOrderCard/index.tsx +5 -4
- package/themes/original/src/components/SingleProductCard/index.tsx +2 -2
- package/themes/original/src/components/SingleProductCard/styles.tsx +0 -3
- package/themes/original/src/components/StripeCardsList/index.tsx +17 -36
- package/themes/original/src/components/StripeElementsForm/index.tsx +9 -4
- package/themes/original/src/components/UpsellingProducts/UpsellingContent.tsx +170 -0
- package/themes/original/src/components/UpsellingProducts/UpsellingLayout.tsx +86 -0
- package/themes/original/src/components/UpsellingProducts/index.tsx +15 -199
- package/themes/original/src/components/UpsellingProducts/styles.tsx +19 -0
- package/themes/original/src/components/UserFormDetails/index.tsx +54 -8
- package/themes/original/src/components/UserFormDetails/styles.tsx +7 -0
- package/themes/original/src/components/UserProfile/index.tsx +3 -2
- package/themes/original/src/components/UserProfileForm/index.tsx +30 -36
- package/themes/original/src/components/UserVerification/index.tsx +3 -1
- package/themes/original/src/components/WalletTransactions/styles.tsx +1 -0
- package/themes/original/src/components/Wallets/index.tsx +8 -9
- package/themes/original/src/components/Wallets/styles.tsx +1 -1
- package/themes/original/src/components/WebsocketStatus/index.tsx +172 -0
- package/themes/original/src/components/WebsocketStatus/styles.tsx +28 -0
- package/themes/original/src/components/shared/HeaderTitle.tsx +1 -1
- package/themes/original/src/components/shared/OButton.tsx +5 -5
- package/themes/original/src/components/shared/OInput.tsx +1 -4
- package/themes/original/src/components/shared/OModal.tsx +12 -14
- package/themes/original/src/layouts/Container.tsx +5 -3
- package/themes/original/src/types/index.tsx +4 -0
- package/themes/original/src/utils/index.tsx +124 -0
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
- package/src/navigators/BottomNavigator.tsx +0 -117
- package/src/navigators/CheckoutNavigator.tsx +0 -66
- package/src/navigators/HomeNavigator.tsx +0 -202
- package/src/navigators/NavigationRef.tsx +0 -7
- package/src/navigators/RootNavigator.tsx +0 -269
- package/src/pages/Account.tsx +0 -34
- package/src/pages/AddressForm.tsx +0 -62
- package/src/pages/AddressList.tsx +0 -24
- package/src/pages/BusinessProductsList.tsx +0 -81
- package/src/pages/BusinessesListing.tsx +0 -43
- package/src/pages/CartList.tsx +0 -49
- package/src/pages/Checkout.tsx +0 -101
- package/src/pages/ForgotPassword.tsx +0 -24
- package/src/pages/Help.tsx +0 -23
- package/src/pages/HelpAccountAndPayment.tsx +0 -23
- package/src/pages/HelpGuide.tsx +0 -23
- package/src/pages/HelpOrder.tsx +0 -23
- package/src/pages/Home.tsx +0 -36
- package/src/pages/IntroductoryTutorial.tsx +0 -170
- package/src/pages/Login.tsx +0 -47
- package/src/pages/MomentOption.tsx +0 -30
- package/src/pages/MultiCheckout.tsx +0 -31
- package/src/pages/MultiOrdersDetails.tsx +0 -27
- package/src/pages/MyOrders.tsx +0 -40
- package/src/pages/NetworkError.tsx +0 -24
- package/src/pages/NotFound.tsx +0 -22
- package/src/pages/OrderDetails.tsx +0 -25
- package/src/pages/ProductDetails.tsx +0 -55
- package/src/pages/Profile.tsx +0 -36
- package/src/pages/ReviewDriver.tsx +0 -30
- package/src/pages/ReviewOrder.tsx +0 -32
- package/src/pages/ReviewProducts.tsx +0 -30
- package/src/pages/Sessions.tsx +0 -22
- package/src/pages/Signup.tsx +0 -53
- package/src/pages/SpinnerLoader.tsx +0 -10
- package/src/pages/Splash.tsx +0 -21
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import { useLanguage, useUtils, WebsocketStatus as WebsocketStatusController } from 'ordering-components/native'
|
|
3
|
+
import { TouchableOpacity, View, StyleSheet } from 'react-native'
|
|
4
|
+
import MaterialIcon from 'react-native-vector-icons/MaterialCommunityIcons';
|
|
5
|
+
import { useTheme } from 'styled-components/native'
|
|
6
|
+
import RNRestart from 'react-native-restart'
|
|
7
|
+
import { OModal, OButton, OText, OIcon } from '../shared'
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
Container,
|
|
11
|
+
ModalContainer,
|
|
12
|
+
ModalTitle,
|
|
13
|
+
StatusItemWrapper,
|
|
14
|
+
StatusText
|
|
15
|
+
} from './styles'
|
|
16
|
+
|
|
17
|
+
const SocketStatusUI = (props: any) => {
|
|
18
|
+
const {
|
|
19
|
+
socketStatus,
|
|
20
|
+
connectedDate
|
|
21
|
+
} = props
|
|
22
|
+
|
|
23
|
+
const theme = useTheme()
|
|
24
|
+
const [, t] = useLanguage()
|
|
25
|
+
const [{ parseDate }] = useUtils()
|
|
26
|
+
const [openModal, setOpenModal] = useState(false)
|
|
27
|
+
|
|
28
|
+
const styles = StyleSheet.create({
|
|
29
|
+
btnBackArrow: {
|
|
30
|
+
borderWidth: 0,
|
|
31
|
+
width: 32,
|
|
32
|
+
height: 32,
|
|
33
|
+
tintColor: theme.colors.textGray,
|
|
34
|
+
backgroundColor: theme.colors.clear,
|
|
35
|
+
borderColor: theme.colors.clear,
|
|
36
|
+
shadowColor: theme.colors.clear,
|
|
37
|
+
paddingLeft: 0,
|
|
38
|
+
paddingRight: 0,
|
|
39
|
+
marginBottom: 30,
|
|
40
|
+
marginTop: 30
|
|
41
|
+
},
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
const getStatusColor = (status: number) => {
|
|
45
|
+
switch (status) {
|
|
46
|
+
case 0:
|
|
47
|
+
return '#FF9922';
|
|
48
|
+
case 1:
|
|
49
|
+
return '#00D27A';
|
|
50
|
+
case 2:
|
|
51
|
+
return '#E63757';
|
|
52
|
+
default:
|
|
53
|
+
return '#FF9922';
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<Container>
|
|
59
|
+
<TouchableOpacity
|
|
60
|
+
style={{
|
|
61
|
+
flexDirection: 'row',
|
|
62
|
+
alignItems: 'center',
|
|
63
|
+
justifyContent: 'center',
|
|
64
|
+
backgroundColor: theme.colors.inputChat,
|
|
65
|
+
borderRadius: 7.6,
|
|
66
|
+
marginVertical: 10,
|
|
67
|
+
paddingVertical: 10,
|
|
68
|
+
paddingHorizontal: 15,
|
|
69
|
+
}}
|
|
70
|
+
activeOpacity={0.6}
|
|
71
|
+
onPress={() => setOpenModal(true)}
|
|
72
|
+
>
|
|
73
|
+
<OText
|
|
74
|
+
style={{ color: theme.colors.backArrow, fontSize: 16, marginBottom: 0, lineHeight: 16 }}
|
|
75
|
+
>
|
|
76
|
+
{t('CONNECTION_STATUS_SHORT', 'Status')}
|
|
77
|
+
</OText>
|
|
78
|
+
<MaterialIcon
|
|
79
|
+
name='circle'
|
|
80
|
+
size={12}
|
|
81
|
+
color={getStatusColor(socketStatus)}
|
|
82
|
+
style={{ marginLeft: 8 }}
|
|
83
|
+
/>
|
|
84
|
+
</TouchableOpacity>
|
|
85
|
+
|
|
86
|
+
<OModal
|
|
87
|
+
open={openModal}
|
|
88
|
+
onClose={() => setOpenModal(false)}
|
|
89
|
+
entireModal
|
|
90
|
+
customClose
|
|
91
|
+
>
|
|
92
|
+
<ModalContainer nestedScrollEnabled={true}>
|
|
93
|
+
<TouchableOpacity
|
|
94
|
+
onPress={() => setOpenModal(false)}
|
|
95
|
+
style={styles.btnBackArrow}
|
|
96
|
+
>
|
|
97
|
+
<OIcon src={theme.images.general.arrow_left} color={theme.colors.textGray} />
|
|
98
|
+
</TouchableOpacity>
|
|
99
|
+
<View>
|
|
100
|
+
<ModalTitle>{t('CONNECTION_STATUS', 'Connection status')}</ModalTitle>
|
|
101
|
+
<OText style={{ marginBottom: 20 }}>
|
|
102
|
+
{t('LAST_UPDATE', 'Last update')}: {parseDate(connectedDate)}
|
|
103
|
+
</OText>
|
|
104
|
+
<StatusItemWrapper>
|
|
105
|
+
<MaterialIcon
|
|
106
|
+
name='circle'
|
|
107
|
+
size={12}
|
|
108
|
+
color={getStatusColor(1)}
|
|
109
|
+
style={{ marginTop: 10, marginHorizontal: 8 }}
|
|
110
|
+
/>
|
|
111
|
+
<View style={{ marginLeft: 16 }}>
|
|
112
|
+
<StatusText>{t('OK', 'Ok')}</StatusText>
|
|
113
|
+
<OText style={{ color: theme.colors.backArrow, fontSize: 14 }}>{t('WEBSOCKET_OK', 'The websocket works normally.')}</OText>
|
|
114
|
+
</View>
|
|
115
|
+
</StatusItemWrapper>
|
|
116
|
+
<StatusItemWrapper>
|
|
117
|
+
<MaterialIcon
|
|
118
|
+
name='circle'
|
|
119
|
+
size={12}
|
|
120
|
+
color={getStatusColor(0)}
|
|
121
|
+
style={{ marginTop: 10, marginHorizontal: 8 }}
|
|
122
|
+
/>
|
|
123
|
+
<View style={{ marginLeft: 16 }}>
|
|
124
|
+
<StatusText>{t('CONNECTING', 'Connecting')}</StatusText>
|
|
125
|
+
<OText style={{ color: theme.colors.backArrow, fontSize: 14 }}>{t('WEBSOCKET_CONNECTING', 'The websocket is connecting.')}</OText>
|
|
126
|
+
</View>
|
|
127
|
+
</StatusItemWrapper>
|
|
128
|
+
<StatusItemWrapper>
|
|
129
|
+
<MaterialIcon
|
|
130
|
+
name='circle'
|
|
131
|
+
size={12}
|
|
132
|
+
color={getStatusColor(2)}
|
|
133
|
+
style={{ marginTop: 10, marginHorizontal: 8 }}
|
|
134
|
+
/>
|
|
135
|
+
<View style={{ marginLeft: 16 }}>
|
|
136
|
+
<StatusText>{t('DISCONNECTED', 'Disconnected')}</StatusText>
|
|
137
|
+
<OText style={{ color: theme.colors.backArrow, fontSize: 14 }}>{t('WEBSOCKET_DISCONNECTED', 'The server is slow, please reload.')}</OText>
|
|
138
|
+
</View>
|
|
139
|
+
</StatusItemWrapper>
|
|
140
|
+
|
|
141
|
+
<View style={{ flexDirection: 'row', marginTop: 50 }}>
|
|
142
|
+
<OButton
|
|
143
|
+
onClick={() => setOpenModal(false)}
|
|
144
|
+
bgColor={theme.colors.white}
|
|
145
|
+
borderColor={theme.colors.primary}
|
|
146
|
+
textStyle={{ color: theme.colors.primary }}
|
|
147
|
+
style={{ borderRadius: 8, height: 48 }}
|
|
148
|
+
text={t('CLOSE', 'Close')}
|
|
149
|
+
/>
|
|
150
|
+
<OButton
|
|
151
|
+
onClick={() => RNRestart.Restart()}
|
|
152
|
+
borderColor={theme.colors.primary}
|
|
153
|
+
textStyle={{ color: theme.colors.white }}
|
|
154
|
+
style={{ borderRadius: 8, marginLeft: 16, height: 48 }}
|
|
155
|
+
text={t('UPDATE', 'Update')}
|
|
156
|
+
/>
|
|
157
|
+
</View>
|
|
158
|
+
</View>
|
|
159
|
+
</ModalContainer>
|
|
160
|
+
</OModal>
|
|
161
|
+
</Container>
|
|
162
|
+
)
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export const WebsocketStatus = (props: any) => {
|
|
166
|
+
const socketProps = {
|
|
167
|
+
...props,
|
|
168
|
+
UIComponent: SocketStatusUI
|
|
169
|
+
}
|
|
170
|
+
return <WebsocketStatusController {...socketProps} />
|
|
171
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import styled from 'styled-components/native'
|
|
2
|
+
|
|
3
|
+
export const Container = styled.View`
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
`
|
|
7
|
+
export const ModalContainer = styled.ScrollView`
|
|
8
|
+
padding: 0px 30px;
|
|
9
|
+
`
|
|
10
|
+
export const ModalTitle = styled.Text`
|
|
11
|
+
font-family: Poppins;
|
|
12
|
+
font-style: normal;
|
|
13
|
+
font-weight: bold;
|
|
14
|
+
font-size: 20px;
|
|
15
|
+
color: ${(props: any) => props.theme.colors.textGray};
|
|
16
|
+
margin-bottom: 10px;
|
|
17
|
+
`
|
|
18
|
+
export const StatusItemWrapper = styled.View`
|
|
19
|
+
flex-direction: row;
|
|
20
|
+
margin-bottom: 16px;
|
|
21
|
+
`
|
|
22
|
+
export const StatusText = styled.Text`
|
|
23
|
+
font-family: Poppins;
|
|
24
|
+
font-style: normal;
|
|
25
|
+
font-weight: 500;
|
|
26
|
+
font-size: 18px;
|
|
27
|
+
color: ${(props: any) => props.theme.colors.textGray};
|
|
28
|
+
`
|
|
@@ -64,6 +64,7 @@ interface Props extends TextInputProps {
|
|
|
64
64
|
onSubmitEditing?: any;
|
|
65
65
|
blurOnSubmit?: any;
|
|
66
66
|
color?: any;
|
|
67
|
+
isValueSync?: boolean
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
const OInput = (props: Props): React.ReactElement => {
|
|
@@ -118,6 +119,7 @@ const OInput = (props: Props): React.ReactElement => {
|
|
|
118
119
|
selectionColor={props.selectionColor}
|
|
119
120
|
color={props.color}
|
|
120
121
|
maxLength={props.maxLength || 1000}
|
|
122
|
+
value={props.isValueSync && props.value}
|
|
121
123
|
/>
|
|
122
124
|
|
|
123
125
|
{props.iconRight && (
|
|
@@ -48,8 +48,8 @@ export const useLocation = () => {
|
|
|
48
48
|
GeoLocation.getCurrentPosition(
|
|
49
49
|
({ coords }) => {
|
|
50
50
|
resolve({
|
|
51
|
-
latitude: coords.latitude,
|
|
52
|
-
longitude: coords.longitude,
|
|
51
|
+
latitude: typeof coords.latitude === 'number' && !Number.isNaN(coords.latitude) ? coords.latitude : 0,
|
|
52
|
+
longitude: typeof coords.longitude === 'number' && !Number.isNaN(coords.longitude) ? coords.longitude : 0,
|
|
53
53
|
speed: coords.speed,
|
|
54
54
|
});
|
|
55
55
|
},
|
|
@@ -63,9 +63,10 @@ export const useLocation = () => {
|
|
|
63
63
|
watchId.current = GeoLocation.watchPosition(
|
|
64
64
|
({ coords }) => {
|
|
65
65
|
if (!isMounted.current) return;
|
|
66
|
+
if (typeof coords.latitude !== 'number' || typeof coords.longitude !== 'number') return
|
|
66
67
|
const location: Location = {
|
|
67
|
-
latitude: coords.latitude,
|
|
68
|
-
longitude: coords.longitude,
|
|
68
|
+
latitude: coords.latitude || 0,
|
|
69
|
+
longitude: coords.longitude || 0,
|
|
69
70
|
speed: coords.speed,
|
|
70
71
|
};
|
|
71
72
|
setUserLocation(location);
|
|
@@ -57,6 +57,9 @@ export interface ProfileParams {
|
|
|
57
57
|
showField?: any;
|
|
58
58
|
isRequiredField?: any;
|
|
59
59
|
isAlsea?: boolean;
|
|
60
|
+
isShowDriverStatus?: boolean;
|
|
61
|
+
isFocused?: boolean;
|
|
62
|
+
isBusinessApp?: boolean;
|
|
60
63
|
}
|
|
61
64
|
|
|
62
65
|
export interface AddressListParams {
|
|
@@ -172,6 +175,7 @@ export interface BusinessControllerParams {
|
|
|
172
175
|
isBusinessOpen?: boolean;
|
|
173
176
|
businessWillCloseSoonMinutes?: number;
|
|
174
177
|
updateBusiness?: (id: any, value: any) => {};
|
|
178
|
+
navigation?: any;
|
|
175
179
|
}
|
|
176
180
|
export interface BusinessProductsListingParams {
|
|
177
181
|
navigation?: any;
|
|
@@ -300,6 +304,7 @@ export interface OrdersOptionParams {
|
|
|
300
304
|
filtered?: any;
|
|
301
305
|
handleClickOrder?: any;
|
|
302
306
|
orderGroupStatusCustom?: {
|
|
307
|
+
active?: Array<number>;
|
|
303
308
|
pending?: Array<number>;
|
|
304
309
|
inProgress?: Array<number>;
|
|
305
310
|
completed?: Array<number>;
|
|
@@ -365,6 +370,12 @@ export interface PreviousMessagesParams {
|
|
|
365
370
|
loadMessages?: (id: any) => {};
|
|
366
371
|
handleReorder?: (order: any) => {};
|
|
367
372
|
onNavigationRedirect?: (route: string, params?: any) => {};
|
|
373
|
+
getOrders?: any;
|
|
374
|
+
loading?: boolean;
|
|
375
|
+
reload?: boolean;
|
|
376
|
+
tabs?: any;
|
|
377
|
+
loadMore: any
|
|
378
|
+
error?: boolean
|
|
368
379
|
}
|
|
369
380
|
export interface OrderDetailsParams {
|
|
370
381
|
handleUpdateLocationDriver?: () => {};
|
|
@@ -381,7 +392,7 @@ export interface OrderDetailsParams {
|
|
|
381
392
|
urlToShare?: string;
|
|
382
393
|
messages?: any;
|
|
383
394
|
handleAssignDriver?: (id: any) => {};
|
|
384
|
-
handleChangeOrderStatus?: (status: any) => {};
|
|
395
|
+
handleChangeOrderStatus?: (status: any, isAcceptOrReject: any) => {};
|
|
385
396
|
order?: any;
|
|
386
397
|
isFromRoot?: any;
|
|
387
398
|
handleOrderRedirect?: () => {};
|
|
@@ -485,6 +496,7 @@ export interface FloatingButtonParams {
|
|
|
485
496
|
firstColorCustom?: string;
|
|
486
497
|
secondColorCustom?: string;
|
|
487
498
|
paddingBottomIos?: any;
|
|
499
|
+
isHideRejectButtons?: boolean
|
|
488
500
|
}
|
|
489
501
|
export interface MomentOptionParams {
|
|
490
502
|
navigation: any;
|
|
@@ -619,3 +631,11 @@ export interface OrderDetailsLogisticParams {
|
|
|
619
631
|
orderAssingId: number,
|
|
620
632
|
order: any
|
|
621
633
|
}
|
|
634
|
+
|
|
635
|
+
export interface SessionsParams {
|
|
636
|
+
navigation: any,
|
|
637
|
+
sessionsList: any,
|
|
638
|
+
actionState: any,
|
|
639
|
+
handleDeleteSession: any,
|
|
640
|
+
handleDeleteAllSessions: any
|
|
641
|
+
}
|
|
@@ -197,7 +197,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
197
197
|
{isFarAway && (
|
|
198
198
|
<FarAwayMessage style={styles.farAwayMsg}>
|
|
199
199
|
<Ionicons name='md-warning-outline' style={styles.iconStyle} />
|
|
200
|
-
<OText size={12} numberOfLines={1} ellipsizeMode={'tail'} color={theme.colors.textNormal}>{t('YOU_ARE_FAR_FROM_ADDRESS', '
|
|
200
|
+
<OText size={12} numberOfLines={1} ellipsizeMode={'tail'} color={theme.colors.textNormal}>{t('YOU_ARE_FAR_FROM_ADDRESS', 'Your are far from this address')}</OText>
|
|
201
201
|
</FarAwayMessage>
|
|
202
202
|
)}
|
|
203
203
|
{!auth && (
|
|
@@ -410,8 +410,7 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
410
410
|
textInputProps={{
|
|
411
411
|
returnKeyType: 'next',
|
|
412
412
|
onSubmitEditing: () => inputRef?.current?.focus?.(),
|
|
413
|
-
style: { borderWidth: 0, fontSize: 12 }
|
|
414
|
-
maxLength: 10
|
|
413
|
+
style: { borderWidth: 0, fontSize: 12 }
|
|
415
414
|
}}
|
|
416
415
|
textWrapStyle={{ borderColor: theme.colors.clear, borderWidth: 0, height: 40, paddingStart: 0 }}
|
|
417
416
|
/>
|
|
@@ -155,7 +155,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
155
155
|
{isFarAway && (
|
|
156
156
|
<FarAwayMessage style={styles.farAwayMsg}>
|
|
157
157
|
<Ionicons name='md-warning-outline' style={styles.iconStyle} />
|
|
158
|
-
<OText size={12} numberOfLines={1} ellipsizeMode={'tail'} color={theme.colors.textNormal}>{t('YOU_ARE_FAR_FROM_ADDRESS', '
|
|
158
|
+
<OText size={12} numberOfLines={1} ellipsizeMode={'tail'} color={theme.colors.textNormal}>{t('YOU_ARE_FAR_FROM_ADDRESS', 'Your are far from this address')}</OText>
|
|
159
159
|
</FarAwayMessage>
|
|
160
160
|
)}
|
|
161
161
|
<View style={styles.wrapperOrderOptions}>
|
|
@@ -50,6 +50,12 @@ const CheckoutUI = (props: any) => {
|
|
|
50
50
|
}
|
|
51
51
|
}, [cart])
|
|
52
52
|
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
if (!cartState.loading && cart && !cart?.valid && cart?.status === 2) {
|
|
55
|
+
navigation?.canGoBack() && navigation.goBack()
|
|
56
|
+
}
|
|
57
|
+
}, [cart])
|
|
58
|
+
|
|
53
59
|
return (
|
|
54
60
|
<>
|
|
55
61
|
<PaymentOptions
|
|
@@ -44,15 +44,15 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
44
44
|
useLoginByCellphone,
|
|
45
45
|
useLoginByEmail,
|
|
46
46
|
loginTab,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
otpType,
|
|
48
|
+
setOtpType,
|
|
49
|
+
generateOtpCode,
|
|
50
|
+
useLoginOtpEmail,
|
|
51
|
+
useLoginOtpCellphone,
|
|
52
52
|
} = props;
|
|
53
53
|
|
|
54
54
|
const theme = useTheme()
|
|
55
|
-
const [{ configs }] = useConfig()
|
|
55
|
+
const [{ configs }, { refreshConfigs }] = useConfig()
|
|
56
56
|
const [ordering, { setOrdering }] = useApi();
|
|
57
57
|
const [, { showToast }] = useToast();
|
|
58
58
|
const [, t] = useLanguage();
|
|
@@ -82,31 +82,32 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
82
82
|
});
|
|
83
83
|
|
|
84
84
|
const isOtpEmail = loginTab === 'otp' && otpType === 'email'
|
|
85
|
-
|
|
85
|
+
const isOtpCellphone = loginTab === 'otp' && otpType === 'cellphone'
|
|
86
|
+
const isDeviceLoginEnabled = configs?.device_code_login_enabled?.value === '1'
|
|
86
87
|
|
|
87
88
|
const mainLogin = (values) => {
|
|
88
89
|
if (loginTab === 'otp') {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
90
|
+
if (phoneInputData.error && (loginTab !== 'otp' || (otpType === 'cellphone' && loginTab === 'otp'))) {
|
|
91
|
+
showToast(ToastType.Error, t('INVALID_PHONE_NUMBER', 'Invalid phone number'));
|
|
92
|
+
return
|
|
93
|
+
}
|
|
94
|
+
if (loginTab === 'otp') {
|
|
95
|
+
generateOtpCode({
|
|
96
|
+
...values,
|
|
97
|
+
...phoneInputData.phone
|
|
98
|
+
})
|
|
99
|
+
}
|
|
100
|
+
setWillVerifyOtpState(true)
|
|
101
|
+
} else {
|
|
102
|
+
if (phoneInputData.error) {
|
|
103
|
+
showToast(ToastType.Error, phoneInputData.error);
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
handleButtonLoginClick({
|
|
107
|
+
...values,
|
|
108
|
+
...phoneInputData.phone,
|
|
109
|
+
});
|
|
110
|
+
}
|
|
110
111
|
}
|
|
111
112
|
|
|
112
113
|
const onSubmit = (values: any) => {
|
|
@@ -199,23 +200,23 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
199
200
|
borderColor: theme.colors.inputSignup,
|
|
200
201
|
},
|
|
201
202
|
borderStyleBase: {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
203
|
+
width: 30,
|
|
204
|
+
height: 45
|
|
205
|
+
},
|
|
206
|
+
borderStyleHighLighted: {
|
|
207
|
+
borderColor: "#03DAC6",
|
|
208
|
+
},
|
|
209
|
+
underlineStyleBase: {
|
|
210
|
+
width: 45,
|
|
211
|
+
height: 60,
|
|
212
|
+
borderWidth: 1,
|
|
213
|
+
fontSize: 16
|
|
214
|
+
},
|
|
215
|
+
underlineStyleHighLighted: {
|
|
216
|
+
borderColor: theme.colors.primary,
|
|
217
|
+
color: theme.colors.primary,
|
|
218
|
+
fontSize: 16
|
|
219
|
+
},
|
|
219
220
|
});
|
|
220
221
|
|
|
221
222
|
useEffect(() => {
|
|
@@ -311,32 +312,32 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
311
312
|
};
|
|
312
313
|
|
|
313
314
|
const handleChangeOtpType = (type: string) => {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
315
|
+
handleChangeTab('otp', type)
|
|
316
|
+
setOtpType(type)
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
const handleLoginOtp = (code: string) => {
|
|
320
|
+
handleButtonLoginClick({ code })
|
|
321
|
+
setWillVerifyOtpState(false)
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
const closeAlert = () => {
|
|
325
|
+
setAlertState({
|
|
326
|
+
open: false,
|
|
327
|
+
title: '',
|
|
328
|
+
content: []
|
|
329
|
+
})
|
|
330
|
+
}
|
|
330
331
|
|
|
331
332
|
useEffect(() => {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
333
|
+
if (checkPhoneCodeState?.result?.error) {
|
|
334
|
+
setAlertState({
|
|
335
|
+
open: true,
|
|
336
|
+
content: t(checkPhoneCodeState?.result?.error, checkPhoneCodeState?.result?.error),
|
|
337
|
+
title: ''
|
|
338
|
+
})
|
|
339
|
+
}
|
|
340
|
+
}, [checkPhoneCodeState])
|
|
340
341
|
|
|
341
342
|
useEffect(() => {
|
|
342
343
|
const projectInputTimeout = setTimeout(() => {
|
|
@@ -348,7 +349,13 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
348
349
|
}
|
|
349
350
|
}, 1500)
|
|
350
351
|
return () => clearTimeout(projectInputTimeout);
|
|
351
|
-
}, [projectName])
|
|
352
|
+
}, [projectName, isDeviceLoginEnabled])
|
|
353
|
+
|
|
354
|
+
useEffect(() => {
|
|
355
|
+
if (ordering?.project) {
|
|
356
|
+
refreshConfigs()
|
|
357
|
+
}
|
|
358
|
+
}, [ordering?.project])
|
|
352
359
|
|
|
353
360
|
const logo = (
|
|
354
361
|
<LogoWrapper>
|
|
@@ -442,7 +449,7 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
442
449
|
</View>
|
|
443
450
|
)}
|
|
444
451
|
|
|
445
|
-
{(Number(useLoginByEmail) + Number(useLoginOtpEmail) + Number(useLoginOtpCellphone) > 1) && (
|
|
452
|
+
{!isDeviceLoginEnabled && (Number(useLoginByEmail) + Number(useLoginOtpEmail) + Number(useLoginOtpCellphone) > 1) && (
|
|
446
453
|
<LoginWith>
|
|
447
454
|
<ScrollView
|
|
448
455
|
ref={scrollRefTab}
|
|
@@ -553,7 +560,7 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
553
560
|
style={{
|
|
554
561
|
width: '100%',
|
|
555
562
|
borderBottomColor:
|
|
556
|
-
|
|
563
|
+
isOtpCellphone
|
|
557
564
|
? theme.colors.black
|
|
558
565
|
: theme.colors.border,
|
|
559
566
|
borderBottomWidth: 2,
|
|
@@ -592,8 +599,29 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
592
599
|
)}
|
|
593
600
|
/>
|
|
594
601
|
)}
|
|
595
|
-
|
|
596
|
-
|
|
602
|
+
{isDeviceLoginEnabled && (
|
|
603
|
+
<Controller
|
|
604
|
+
control={control}
|
|
605
|
+
render={({ onChange, value }: any) => (
|
|
606
|
+
<OInput
|
|
607
|
+
placeholder={t('DEVICE_CODE', 'Device Code')}
|
|
608
|
+
style={styles.inputStyle}
|
|
609
|
+
value={value}
|
|
610
|
+
inputStyle={{ textAlign: 'center' }}
|
|
611
|
+
onChange={(val: any) => onChange(val)}
|
|
612
|
+
/>
|
|
613
|
+
)}
|
|
614
|
+
name="device_code"
|
|
615
|
+
rules={{
|
|
616
|
+
required: t(
|
|
617
|
+
'VALIDATION_ERROR_DEVICE_CODE_REQUIRED',
|
|
618
|
+
'The field DEVICE_CODE is required',
|
|
619
|
+
).replace('_attribute_', t('DEVICE_CODE', 'Device Code')),
|
|
620
|
+
}}
|
|
621
|
+
defaultValue=""
|
|
622
|
+
/>
|
|
623
|
+
)}
|
|
624
|
+
{!isDeviceLoginEnabled && ((useLoginByEmail && loginTab === 'email') || (loginTab === 'otp' && otpType === 'email')) && (
|
|
597
625
|
<Controller
|
|
598
626
|
control={control}
|
|
599
627
|
render={({ onChange, value }: any) => (
|
|
@@ -628,7 +656,7 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
628
656
|
/>
|
|
629
657
|
)}
|
|
630
658
|
|
|
631
|
-
{((useLoginByCellphone && loginTab === 'cellphone') || (loginTab === 'otp' && otpType === 'cellphone')) && (
|
|
659
|
+
{!isDeviceLoginEnabled && ((useLoginByCellphone && loginTab === 'cellphone') || (loginTab === 'otp' && otpType === 'cellphone')) && (
|
|
632
660
|
<View style={{ marginBottom: 20 }}>
|
|
633
661
|
<PhoneInputNumber
|
|
634
662
|
data={phoneInputData}
|
|
@@ -642,7 +670,7 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
642
670
|
</View>
|
|
643
671
|
)}
|
|
644
672
|
|
|
645
|
-
{loginTab !== 'otp' && (
|
|
673
|
+
{!isDeviceLoginEnabled && loginTab !== 'otp' && (
|
|
646
674
|
<Controller
|
|
647
675
|
control={control}
|
|
648
676
|
render={({ onChange, value }: any) => (
|
|
@@ -732,26 +760,26 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
732
760
|
)}
|
|
733
761
|
</View>
|
|
734
762
|
<OModal
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
763
|
+
open={willVerifyOtpState}
|
|
764
|
+
onClose={() => setWillVerifyOtpState(false)}
|
|
765
|
+
entireModal
|
|
766
|
+
title={t('ENTER_VERIFICATION_CODE', 'Enter verification code')}
|
|
767
|
+
>
|
|
768
|
+
<Otp
|
|
769
|
+
willVerifyOtpState={willVerifyOtpState}
|
|
770
|
+
setWillVerifyOtpState={setWillVerifyOtpState}
|
|
771
|
+
handleLoginOtp={handleLoginOtp}
|
|
772
|
+
onSubmit={onSubmit}
|
|
773
|
+
setAlertState={setAlertState}
|
|
774
|
+
/>
|
|
775
|
+
</OModal>
|
|
776
|
+
<Alert
|
|
777
|
+
open={alertState.open}
|
|
778
|
+
content={alertState.content}
|
|
779
|
+
title={alertState.title || ''}
|
|
780
|
+
onAccept={closeAlert}
|
|
781
|
+
onClose={closeAlert}
|
|
782
|
+
/>
|
|
755
783
|
</View>
|
|
756
784
|
);
|
|
757
785
|
};
|