ordering-ui-react-native 0.21.31-testing → 0.21.32-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 +6 -4
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/types/index.tsx +3 -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 +23 -14
- package/themes/business/src/components/DriverMap/index.tsx +36 -23
- package/themes/business/src/components/FloatingButton/index.tsx +34 -31
- package/themes/business/src/components/GoogleMap/index.tsx +15 -8
- package/themes/business/src/components/Home/index.tsx +5 -1
- package/themes/business/src/components/LanguageSelector/index.tsx +1 -2
- package/themes/business/src/components/LanguageSelector/lang_country.json +515 -70
- package/themes/business/src/components/MapView/index.tsx +16 -9
- package/themes/business/src/components/MessagesOption/index.tsx +2 -1
- package/themes/business/src/components/NewOrderNotification/index.tsx +163 -115
- 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 +61 -54
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +52 -20
- 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 -130
- package/themes/business/src/components/PhoneInputNumber/index.tsx +8 -5
- package/themes/business/src/components/PreviousOrders/OrderItem.tsx +36 -38
- package/themes/business/src/components/PreviousOrders/OrderList.tsx +18 -13
- package/themes/business/src/components/PreviousOrders/index.tsx +80 -66
- 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 +107 -53
- 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 +15 -2
- package/themes/business/src/utils/index.tsx +5 -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/Checkout/index.tsx +6 -0
- package/themes/kiosk/src/components/LoginForm/index.tsx +7 -4
- 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 +27 -12
- package/themes/original/src/components/AddressForm/styles.tsx +1 -1
- package/themes/original/src/components/AddressList/index.tsx +18 -4
- 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 +7 -10
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +1 -1
- package/themes/original/src/components/BusinessController/index.tsx +18 -10
- 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 +47 -358
- 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 +35 -19
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +2 -2
- 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 +160 -63
- 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 +9 -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/ForgotPasswordForm/index.tsx +5 -0
- 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/Help/index.tsx +7 -0
- package/themes/original/src/components/HelpAccountAndPayment/index.tsx +5 -0
- package/themes/original/src/components/HelpGuide/index.tsx +5 -0
- package/themes/original/src/components/HelpOrder/index.tsx +5 -0
- 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 +4 -16
- package/themes/original/src/components/LoginForm/index.tsx +8 -3
- package/themes/original/src/components/MessageListing/index.tsx +6 -0
- package/themes/original/src/components/Messages/index.tsx +9 -7
- package/themes/original/src/components/Messages/styles.tsx +1 -1
- package/themes/original/src/components/MomentOption/index.tsx +19 -4
- package/themes/original/src/components/MultiCart/index.tsx +1 -1
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +1 -0
- 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 +28 -28
- package/themes/original/src/components/NavBar/index.tsx +5 -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 +9 -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 +709 -665
- package/themes/original/src/components/OrderDetails/styles.tsx +24 -8
- package/themes/original/src/components/OrderProgress/index.tsx +24 -4
- 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 +10 -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/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 +51 -6
- package/themes/original/src/components/PreviousOrders/index.tsx +2 -0
- package/themes/original/src/components/ProductForm/ActionButton.tsx +122 -0
- package/themes/original/src/components/ProductForm/ExtraOptions.tsx +56 -0
- package/themes/original/src/components/ProductForm/index.tsx +67 -155
- 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 +105 -91
- package/themes/original/src/components/ProfessionalProfile/styles.tsx +3 -3
- package/themes/original/src/components/Promotions/index.tsx +13 -11
- package/themes/original/src/components/Promotions/styles.tsx +0 -2
- package/themes/original/src/components/ReviewDriver/index.tsx +5 -0
- package/themes/original/src/components/ReviewDriver/styles.tsx +1 -1
- package/themes/original/src/components/ReviewOrder/index.tsx +5 -0
- package/themes/original/src/components/ReviewOrder/styles.tsx +1 -1
- package/themes/original/src/components/ReviewProducts/index.tsx +5 -0
- 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/Sessions/index.tsx +5 -0
- package/themes/original/src/components/SignupForm/index.tsx +66 -59
- package/themes/original/src/components/SingleOrderCard/index.tsx +3 -2
- 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 +74 -59
- package/themes/original/src/components/StripeElementsForm/naked.tsx +47 -0
- 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 +123 -75
- 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 +5 -0
- package/themes/original/src/components/WalletTransactions/styles.tsx +1 -0
- package/themes/original/src/components/Wallets/index.tsx +8 -4
- 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 +1 -0
- package/themes/original/src/utils/index.tsx +12 -1
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
|
@@ -20,7 +20,8 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
20
20
|
handleToggleMap,
|
|
21
21
|
locations,
|
|
22
22
|
isIntGeoCoder,
|
|
23
|
-
businessZones
|
|
23
|
+
businessZones,
|
|
24
|
+
delta
|
|
24
25
|
} = props
|
|
25
26
|
|
|
26
27
|
const [, t] = useLanguage()
|
|
@@ -31,8 +32,8 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
31
32
|
const [region, setRegion] = useState({
|
|
32
33
|
latitude: location.lat,
|
|
33
34
|
longitude: location.lng,
|
|
34
|
-
latitudeDelta: 0.0010,
|
|
35
|
-
longitudeDelta: 0.0010 * ASPECT_RATIO
|
|
35
|
+
latitudeDelta: delta ?? 0.0010,
|
|
36
|
+
longitudeDelta: (delta ?? 0.0010) * ASPECT_RATIO
|
|
36
37
|
})
|
|
37
38
|
const [MARKERS, SETMARKERS] = useState(locations)
|
|
38
39
|
let mapRef = useRef<any>(null)
|
|
@@ -83,7 +84,7 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
83
84
|
}
|
|
84
85
|
handleChangeAddressMap && handleChangeAddressMap(address, details)
|
|
85
86
|
setSaveLocation && setSaveLocation(false)
|
|
86
|
-
if(!isMovingRegion){
|
|
87
|
+
if(!isMovingRegion){
|
|
87
88
|
handleToggleMap && handleToggleMap()
|
|
88
89
|
}
|
|
89
90
|
} else {
|
|
@@ -265,7 +266,7 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
265
266
|
)}
|
|
266
267
|
{(businessZone.type === 5 && businessZone?.data?.distance) && (
|
|
267
268
|
<Circle
|
|
268
|
-
center={{ latitude:
|
|
269
|
+
center={{ latitude: center.lat, longitude: center.lng}}
|
|
269
270
|
radius={businessZone?.data.distance * units[businessZone?.data?.unit]}
|
|
270
271
|
fillColor={fillStyles.fillColor}
|
|
271
272
|
strokeColor={fillStyles.strokeColor}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
|
+
import { useTheme } from 'styled-components/native';
|
|
2
3
|
import { Platform, RefreshControl } from 'react-native'
|
|
3
4
|
import { HelpParams } from '../../types'
|
|
4
5
|
import { useLanguage } from 'ordering-components/native'
|
|
@@ -17,6 +18,7 @@ export const Help = (props: HelpParams) => {
|
|
|
17
18
|
navigation
|
|
18
19
|
} = props
|
|
19
20
|
const [, t] = useLanguage()
|
|
21
|
+
const theme = useTheme()
|
|
20
22
|
const [refreshing] = useState(false);
|
|
21
23
|
const [refresh, setRefresh] = useState(false)
|
|
22
24
|
|
|
@@ -46,6 +48,11 @@ export const Help = (props: HelpParams) => {
|
|
|
46
48
|
onActionLeft={goToBack}
|
|
47
49
|
showCall={false}
|
|
48
50
|
btnStyle={{ paddingLeft: 0 }}
|
|
51
|
+
buttonProps={{
|
|
52
|
+
bgColor: theme.colors.white,
|
|
53
|
+
borderColor: theme.colors.white,
|
|
54
|
+
textStyle: { color: theme.colors.btnFont }
|
|
55
|
+
}}
|
|
49
56
|
/>
|
|
50
57
|
<HelpSubItem
|
|
51
58
|
onPress={() => onRedirect('HelpOrder')}
|
|
@@ -37,6 +37,11 @@ export const HelpAccountAndPayment = (props: HelpAccountAndPaymentParams) => {
|
|
|
37
37
|
onActionLeft={goToBack}
|
|
38
38
|
btnStyle={{ paddingLeft: 0 }}
|
|
39
39
|
showCall={false}
|
|
40
|
+
buttonProps={{
|
|
41
|
+
bgColor: theme.colors.white,
|
|
42
|
+
borderColor: theme.colors.white,
|
|
43
|
+
textStyle: { color: theme.colors.btnFont }
|
|
44
|
+
}}
|
|
40
45
|
/>
|
|
41
46
|
<Content>
|
|
42
47
|
<OText mBottom={20}>
|
|
@@ -43,6 +43,11 @@ export const HelpGuide = (props: HelpGuideParams) => {
|
|
|
43
43
|
onActionLeft={goToBack}
|
|
44
44
|
btnStyle={{ paddingLeft: 0 }}
|
|
45
45
|
showCall={false}
|
|
46
|
+
buttonProps={{
|
|
47
|
+
bgColor: theme.colors.white,
|
|
48
|
+
borderColor: theme.colors.white,
|
|
49
|
+
textStyle: { color: theme.colors.btnFont }
|
|
50
|
+
}}
|
|
46
51
|
/>
|
|
47
52
|
<Content>
|
|
48
53
|
<OText mBottom={15}>
|
|
@@ -39,6 +39,11 @@ export const HelpOrder = (props: HelpOrderParams) => {
|
|
|
39
39
|
onActionLeft={goToBack}
|
|
40
40
|
btnStyle={{ paddingLeft: 0 }}
|
|
41
41
|
showCall={false}
|
|
42
|
+
buttonProps={{
|
|
43
|
+
bgColor: theme.colors.white,
|
|
44
|
+
borderColor: theme.colors.white,
|
|
45
|
+
textStyle: { color: theme.colors.btnFont }
|
|
46
|
+
}}
|
|
42
47
|
/>
|
|
43
48
|
<Content>
|
|
44
49
|
<OText mBottom={20}>
|
|
@@ -56,7 +56,7 @@ const HighestRatedBusinessesUI = (props: HighestRatedBusinessesParams) => {
|
|
|
56
56
|
showsHorizontalScrollIndicator={false}
|
|
57
57
|
nestedScrollEnabled
|
|
58
58
|
horizontal
|
|
59
|
-
style={{ height:
|
|
59
|
+
style={{ height: 325, paddingHorizontal: 20 }}
|
|
60
60
|
>
|
|
61
61
|
{[
|
|
62
62
|
...Array(10).keys()
|
|
@@ -162,4 +162,4 @@ export const HighestRatedBusinesses = (props: any) => {
|
|
|
162
162
|
};
|
|
163
163
|
|
|
164
164
|
return <BusinessesListingController {...highestRatedBusinessesProps} />;
|
|
165
|
-
};
|
|
165
|
+
};
|
|
@@ -62,6 +62,7 @@ export const Home = (props: any) => {
|
|
|
62
62
|
bgColor={theme.colors.primaryContrast}
|
|
63
63
|
borderColor={theme.colors.primaryContrast}
|
|
64
64
|
style={styles.buttons}
|
|
65
|
+
textStyle={{ color: 'black' }}
|
|
65
66
|
onClick={() => onNavigationRedirect('Signup')}
|
|
66
67
|
imgRightSrc={null}
|
|
67
68
|
/>
|
|
@@ -92,7 +93,7 @@ const styles = StyleSheet.create({
|
|
|
92
93
|
flex: 1,
|
|
93
94
|
alignItems: 'center',
|
|
94
95
|
justifyContent: 'space-between',
|
|
95
|
-
paddingHorizontal:
|
|
96
|
+
paddingHorizontal: 20,
|
|
96
97
|
},
|
|
97
98
|
logo: {
|
|
98
99
|
marginTop: 64,
|
|
@@ -40,19 +40,19 @@ export const Otp = (props: otpParams) => {
|
|
|
40
40
|
onSubmit()
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
const handleChangeCode = (code
|
|
43
|
+
const handleChangeCode = (code: string) => {
|
|
44
44
|
if (code?.length === pinCount) {
|
|
45
|
-
setCheckingCode(true)
|
|
45
|
+
setCheckingCode && setCheckingCode(true)
|
|
46
46
|
handleLoginOtp(code)
|
|
47
47
|
inputRef.current?.reset && inputRef.current.reset()
|
|
48
48
|
setTimeout(() => inputRef.current?.focus && inputRef.current.focus(), 100)
|
|
49
49
|
}
|
|
50
|
-
setOtpError(null)
|
|
50
|
+
setOtpError && setOtpError(null)
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
const handleCloseOtp = () => {
|
|
54
54
|
setWillVerifyOtpState(false)
|
|
55
|
-
setOtpError(null)
|
|
55
|
+
setOtpError && setOtpError(null)
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
useEffect(() => {
|
|
@@ -108,18 +108,6 @@ export const Otp = (props: otpParams) => {
|
|
|
108
108
|
return (
|
|
109
109
|
<SafeAreaView style={{ flex: 1, backgroundColor: theme.colors.backgroundPage }}>
|
|
110
110
|
<OTPContainer>
|
|
111
|
-
<View
|
|
112
|
-
style={loginStyle.closeContainer}>
|
|
113
|
-
<TouchableOpacity onPress={() => handleCloseOtp()} style={loginStyle.wrapperIcon}>
|
|
114
|
-
<OIcon
|
|
115
|
-
src={theme.images.general.close}
|
|
116
|
-
width={22}
|
|
117
|
-
/>
|
|
118
|
-
</TouchableOpacity>
|
|
119
|
-
<OText size={22}>
|
|
120
|
-
{t('ENTER_VERIFICATION_CODE', 'Enter verification code')}
|
|
121
|
-
</OText>
|
|
122
|
-
</View>
|
|
123
111
|
<OText size={24}>
|
|
124
112
|
{formatSeconds(otpLeftTime)}
|
|
125
113
|
</OText>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState, useRef } from 'react';
|
|
2
|
-
import { StyleSheet, View, Keyboard, Modal } from 'react-native';
|
|
2
|
+
import { StyleSheet, View, Keyboard, Modal, Platform } from 'react-native';
|
|
3
3
|
import Spinner from 'react-native-loading-spinner-overlay';
|
|
4
4
|
import { useForm, Controller } from 'react-hook-form';
|
|
5
5
|
import { PhoneInputNumber } from '../PhoneInputNumber';
|
|
@@ -108,7 +108,7 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
108
108
|
|
|
109
109
|
const googleLoginEnabled = configs?.google_login_enabled?.value === '1' || !configs?.google_login_enabled?.enabled
|
|
110
110
|
const facebookLoginEnabled = configs?.facebook_login_enabled?.value === '1' || !configs?.facebook_login_enabled?.enabled
|
|
111
|
-
const appleLoginEnabled = configs?.apple_login_enabled?.value === '1' || !configs?.apple_login_enabled?.enabled
|
|
111
|
+
const appleLoginEnabled = Platform.OS === 'ios' && (configs?.apple_login_enabled?.value === '1' || !configs?.apple_login_enabled?.enabled)
|
|
112
112
|
|
|
113
113
|
const loginStyle = StyleSheet.create({
|
|
114
114
|
btnOutline: {
|
|
@@ -412,6 +412,11 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
412
412
|
btnStyle={{ paddingLeft: 0 }}
|
|
413
413
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
414
414
|
titleStyle={{ marginRight: 0, marginLeft: 0 }}
|
|
415
|
+
buttonProps={{
|
|
416
|
+
bgColor: theme.colors.white,
|
|
417
|
+
borderColor: theme.colors.white,
|
|
418
|
+
textStyle: { color: theme.colors.btnFont }
|
|
419
|
+
}}
|
|
415
420
|
/>
|
|
416
421
|
)}
|
|
417
422
|
<FormSide>
|
|
@@ -802,7 +807,7 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
802
807
|
handleSuccessGoogleLogin={handleSuccessFacebook}
|
|
803
808
|
/>
|
|
804
809
|
)}
|
|
805
|
-
{(configs?.apple_login_client_id?.value !== '' && configs?.
|
|
810
|
+
{(configs?.apple_login_client_id?.value !== '' && configs?.apple_login_client_id?.value !== null) && appleLoginEnabled && (
|
|
806
811
|
<AppleLogin
|
|
807
812
|
notificationState={notificationState}
|
|
808
813
|
handleErrors={(err: any) => { showToast(ToastType.Error, err), vibrateApp() }}
|
|
@@ -237,6 +237,7 @@ export const MessageListing = (props: MessageListingParams) => {
|
|
|
237
237
|
const [seletedOrder, setSeletedOrder] = useState<any>()
|
|
238
238
|
const [openMessages, setOpenMessges] = useState(false)
|
|
239
239
|
const [, t] = useLanguage()
|
|
240
|
+
const theme = useTheme()
|
|
240
241
|
|
|
241
242
|
const goToBack = () => {
|
|
242
243
|
navigation?.canGoBack() && navigation.goBack()
|
|
@@ -265,6 +266,11 @@ export const MessageListing = (props: MessageListingParams) => {
|
|
|
265
266
|
showCall={false}
|
|
266
267
|
paddingTop={Platform.OS === 'ios' ? 20 : 10}
|
|
267
268
|
btnStyle={{ paddingLeft: 0 }}
|
|
269
|
+
buttonProps={{
|
|
270
|
+
bgColor: theme.colors.white,
|
|
271
|
+
borderColor: theme.colors.white,
|
|
272
|
+
textStyle: { color: theme.colors.btnFont }
|
|
273
|
+
}}
|
|
268
274
|
/>
|
|
269
275
|
<OrderListing
|
|
270
276
|
ordersLength={{ activeOrdersLength: 0, previousOrdersLength: 0 }}
|
|
@@ -127,12 +127,12 @@ const MessagesUI = (props: MessagesParams) => {
|
|
|
127
127
|
return message.change?.attribute !== 'driver_id'
|
|
128
128
|
?
|
|
129
129
|
`${t('ORDER', 'Order')} ${t(message.change.attribute.toUpperCase(), message.change.attribute.replace('_', ' '))} ${t('CHANGED_FROM', 'Changed from')} ${filterSpecialStatus.includes(message.change.attribute)
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
130
|
+
? `${message.change.old === null ? '0' : message.change.old} ${t('TO', 'to')} ${message.change.new} ${t('MINUTES', 'Minutes')}`
|
|
131
|
+
: `${message.change?.attribute !== 'logistic_status'
|
|
132
|
+
? message.change.old !== null && t(ORDER_STATUS[parseInt(message.change.old, 10)])
|
|
133
|
+
: message.change.old !== null && getLogisticTag(message.change.old)} ${t('TO', 'to')} ${message.change?.attribute !== 'logistic_status'
|
|
134
|
+
? t(ORDER_STATUS[parseInt(message.change.new, 10)])
|
|
135
|
+
: getLogisticTag(message.change.new)}`
|
|
136
136
|
}`
|
|
137
137
|
: message.change.new
|
|
138
138
|
?
|
|
@@ -152,6 +152,7 @@ const MessagesUI = (props: MessagesParams) => {
|
|
|
152
152
|
}
|
|
153
153
|
const newMessage: any = [];
|
|
154
154
|
messages.messages.map((message: any) => {
|
|
155
|
+
if (message.change?.attribute === 'driver_group_id') return
|
|
155
156
|
if (business && message.type !== 0 && (messagesToShow?.messages?.length || message?.can_see?.includes('2'))) {
|
|
156
157
|
newMessage.push({
|
|
157
158
|
_id: message?.id,
|
|
@@ -460,7 +461,7 @@ const MessagesUI = (props: MessagesParams) => {
|
|
|
460
461
|
active={business}
|
|
461
462
|
>
|
|
462
463
|
<OIcon
|
|
463
|
-
url={order?.business?.logo
|
|
464
|
+
url={order?.business?.logo}
|
|
464
465
|
width={32}
|
|
465
466
|
height={32}
|
|
466
467
|
style={{ borderRadius: 32 }}
|
|
@@ -502,6 +503,7 @@ const MessagesUI = (props: MessagesParams) => {
|
|
|
502
503
|
scrollToBottom
|
|
503
504
|
renderAvatarOnTop
|
|
504
505
|
renderUsernameOnMessage
|
|
506
|
+
renderAvatar={() => null}
|
|
505
507
|
renderInputToolbar={renderInputToolbar}
|
|
506
508
|
renderComposer={renderComposer}
|
|
507
509
|
renderSend={renderSend}
|
|
@@ -10,7 +10,7 @@ export const Header = styled.View`
|
|
|
10
10
|
background-color: ${(props: any) => props.theme.colors.white};
|
|
11
11
|
box-shadow: 0 2px 2px #0000001A;
|
|
12
12
|
padding-bottom: 10px;
|
|
13
|
-
padding-horizontal:
|
|
13
|
+
padding-horizontal: 10px;
|
|
14
14
|
`
|
|
15
15
|
|
|
16
16
|
export const TitleHeader = styled.View``
|
|
@@ -327,8 +327,8 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
327
327
|
<>
|
|
328
328
|
<Container
|
|
329
329
|
style={{
|
|
330
|
-
paddingLeft: !cateringPreorder || isPage ?
|
|
331
|
-
paddingRight: !cateringPreorder || isPage ?
|
|
330
|
+
paddingLeft: !cateringPreorder || isPage ? 20 : 0,
|
|
331
|
+
paddingRight: !cateringPreorder || isPage ? 20 : 0
|
|
332
332
|
}}
|
|
333
333
|
nestedScrollEnabled
|
|
334
334
|
>
|
|
@@ -343,6 +343,11 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
343
343
|
titleAlign={'center'}
|
|
344
344
|
titleStyle={{ fontSize: 20, marginRight: 0, marginLeft: 0 }}
|
|
345
345
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
346
|
+
buttonProps={{
|
|
347
|
+
bgColor: theme.colors.white,
|
|
348
|
+
borderColor: theme.colors.white,
|
|
349
|
+
textStyle: { color: theme.colors.btnFont }
|
|
350
|
+
}}
|
|
346
351
|
/>
|
|
347
352
|
)}
|
|
348
353
|
{(preorderMinimumDays === 0 && preorderLeadTime === 0) || !cateringPreorder && (
|
|
@@ -394,6 +399,7 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
394
399
|
<View style={{ flex: 1 }}>
|
|
395
400
|
{selectDate && datesWhitelist[0]?.start !== null && (
|
|
396
401
|
<CalendarStrip
|
|
402
|
+
locale={locale}
|
|
397
403
|
scrollable
|
|
398
404
|
style={styles.calendar}
|
|
399
405
|
calendarHeaderContainerStyle={styles.calendarHeaderContainer}
|
|
@@ -467,8 +473,17 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
467
473
|
<Spinner visible={momentState.isLoading === 1} />
|
|
468
474
|
</Container>
|
|
469
475
|
{!isCart && !cateringPreorder && (
|
|
470
|
-
<View style={{ position: 'absolute', bottom: bottom, paddingBottom: 20, paddingHorizontal:
|
|
471
|
-
<OButton
|
|
476
|
+
<View style={{ position: 'absolute', bottom: bottom, paddingBottom: 20, paddingHorizontal: 20, backgroundColor: 'white', width: '100%' }}>
|
|
477
|
+
<OButton
|
|
478
|
+
onClick={() => handleChangeMoment()}
|
|
479
|
+
bgColor={theme.colors.primary}
|
|
480
|
+
borderColor={theme.colors.primary}
|
|
481
|
+
isDisabled={!selectedTime}
|
|
482
|
+
text={t('CONTINUE', 'Continue')}
|
|
483
|
+
style={{ borderRadius: 7.6, height: 44, shadowOpacity: 0 }}
|
|
484
|
+
textStyle={{ color: 'white', fontSize: 14 }}
|
|
485
|
+
showNextIcon
|
|
486
|
+
/>
|
|
472
487
|
</View>
|
|
473
488
|
)}
|
|
474
489
|
</>
|
|
@@ -11,7 +11,7 @@ export const MultiCartUI = () => {
|
|
|
11
11
|
const theme = useTheme();
|
|
12
12
|
return (
|
|
13
13
|
<Container noPadding>
|
|
14
|
-
<ChContainer style={{ paddingHorizontal:
|
|
14
|
+
<ChContainer style={{ paddingHorizontal: 20 }}>
|
|
15
15
|
<ChSection>
|
|
16
16
|
<ChUserDetails>
|
|
17
17
|
<Placeholder Animation={Fade}>
|
|
@@ -233,6 +233,7 @@ const MultiCartsPaymethodsAndWalletsUI = (props: any) => {
|
|
|
233
233
|
toSave
|
|
234
234
|
businessId={businessIds[0]}
|
|
235
235
|
businessIds={businessIds}
|
|
236
|
+
businessNames={openCarts?.map?.((cart : any) => cart?.business?.name)}
|
|
236
237
|
publicKey={paymethodSelected?.data?.publishable}
|
|
237
238
|
requirements={props.clientSecret}
|
|
238
239
|
handleSource={handlePaymethodDataChange}
|