ordering-ui-react-native 0.18.2 → 0.18.3-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 +9 -7
- package/src/DeliveryApp.tsx +43 -1
- package/src/components/BusinessInformation/index.tsx +10 -9
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/OrderCreating/index.tsx +0 -20
- package/src/components/PaymentOptionsWebView/index.tsx +29 -8
- package/src/components/PhoneInputNumber/index.tsx +6 -2
- package/src/components/StripeMethodForm/index.tsx +136 -102
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/components/shared/OToast.tsx +3 -2
- package/src/types/index.tsx +5 -0
- package/src/utils/index.tsx +7 -2
- package/themes/business/index.tsx +2 -0
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +36 -26
- 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 +163 -123
- package/themes/business/src/components/DriverMap/index.tsx +17 -6
- package/themes/business/src/components/DriverSchedule/index.tsx +45 -8
- package/themes/business/src/components/FloatingButton/index.tsx +34 -31
- package/themes/business/src/components/GoogleMap/index.tsx +58 -57
- package/themes/business/src/components/LoginForm/index.tsx +5 -2
- package/themes/business/src/components/MapView/index.tsx +14 -10
- package/themes/business/src/components/MessagesOption/index.tsx +22 -94
- package/themes/business/src/components/NewOrderNotification/index.tsx +123 -96
- package/themes/business/src/components/NotFoundSource/index.tsx +2 -2
- package/themes/business/src/components/OrderDetails/Business.tsx +1 -1
- package/themes/business/src/components/OrderDetails/Delivery.tsx +205 -12
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +67 -39
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +47 -23
- package/themes/business/src/components/OrderDetailsLogistic/index.tsx +9 -4
- package/themes/business/src/components/OrderMessage/index.tsx +1 -1
- package/themes/business/src/components/OrderSummary/index.tsx +114 -123
- 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 +43 -32
- 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 +21 -29
- 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 +193 -221
- package/themes/business/src/components/PreviousOrders/styles.tsx +10 -0
- package/themes/business/src/components/ReviewCustomer/index.tsx +3 -1
- package/themes/business/src/components/SearchBar/index.tsx +2 -1
- package/themes/business/src/components/StoresList/index.tsx +6 -5
- package/themes/business/src/components/UserProfileForm/index.tsx +14 -15
- 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/OModal.tsx +16 -9
- package/themes/business/src/types/index.tsx +8 -0
- package/themes/business/src/utils/index.tsx +4 -4
- 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/Intro/index.tsx +16 -1
- package/themes/kiosk/src/components/LoginForm/index.tsx +7 -5
- 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/PhoneInputNumber/index.tsx +2 -2
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/original/index.tsx +7 -3
- package/themes/original/src/components/AddressDetails/index.tsx +19 -3
- package/themes/original/src/components/AddressForm/index.tsx +33 -15
- package/themes/original/src/components/AddressForm/styles.tsx +1 -1
- package/themes/original/src/components/AddressList/index.tsx +5 -8
- package/themes/original/src/components/AddressList/styles.tsx +4 -4
- package/themes/original/src/components/AnalyticsSegment/index.tsx +193 -10
- package/themes/original/src/components/AppleLogin/index.tsx +4 -4
- package/themes/original/src/components/AppleLogin/styles.tsx +3 -1
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +74 -38
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +11 -13
- package/themes/original/src/components/BusinessController/index.tsx +35 -44
- package/themes/original/src/components/BusinessController/styles.tsx +12 -5
- package/themes/original/src/components/BusinessFeaturedController/index.tsx +21 -54
- package/themes/original/src/components/BusinessFeaturedController/styles.tsx +8 -0
- package/themes/original/src/components/BusinessInformation/index.tsx +140 -85
- package/themes/original/src/components/BusinessInformation/styles.tsx +2 -2
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +25 -26
- 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 +133 -438
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +1 -19
- package/themes/original/src/components/BusinessPreorder/index.tsx +105 -22
- package/themes/original/src/components/BusinessPreorder/styles.tsx +14 -0
- package/themes/original/src/components/BusinessProductsCategories/index.tsx +2 -3
- package/themes/original/src/components/BusinessProductsList/index.tsx +15 -7
- package/themes/original/src/components/BusinessProductsList/styles.tsx +8 -3
- package/themes/original/src/components/BusinessProductsListing/UpsellingRedirect.tsx +1 -1
- package/themes/original/src/components/BusinessProductsListing/index.tsx +162 -39
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +4 -5
- package/themes/original/src/components/BusinessReviews/index.tsx +4 -2
- 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 +37 -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 +49 -47
- package/themes/original/src/components/CartContent/index.tsx +99 -38
- package/themes/original/src/components/CartContent/styles.tsx +6 -6
- package/themes/original/src/components/CartStoresListing/styles.tsx +2 -2
- package/themes/original/src/components/Checkout/index.tsx +324 -43
- package/themes/original/src/components/Checkout/styles.tsx +17 -0
- package/themes/original/src/components/CitiesControl/index.tsx +1 -1
- package/themes/original/src/components/CitiesControl/styles.tsx +1 -1
- package/themes/original/src/components/CouponControl/index.tsx +10 -3
- package/themes/original/src/components/DatePicker/index.tsx +17 -0
- package/themes/original/src/components/DatePicker/styles.tsx +20 -0
- package/themes/original/src/components/DriverTips/index.tsx +6 -3
- package/themes/original/src/components/FacebookLogin/styles.tsx +3 -1
- 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 +7 -5
- package/themes/original/src/components/GiftCard/GiftCardUI/index.tsx +8 -3
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/index.tsx +42 -5
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/styles.tsx +3 -1
- package/themes/original/src/components/GiftCard/RedeemGiftCard/index.tsx +84 -8
- package/themes/original/src/components/GiftCard/RedeemGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/GiftCard/SendGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/GoogleLogin/styles.tsx +1 -1
- package/themes/original/src/components/GoogleMap/index.tsx +63 -7
- package/themes/original/src/components/HighestRatedBusinesses/index.tsx +1 -1
- package/themes/original/src/components/HighestRatedBusinesses/styles.tsx +1 -1
- package/themes/original/src/components/Home/index.tsx +14 -5
- 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 +91 -25
- package/themes/original/src/components/LoginForm/index.tsx +64 -34
- package/themes/original/src/components/LottieAnimation/index.tsx +88 -63
- package/themes/original/src/components/MessageListing/index.tsx +9 -2
- package/themes/original/src/components/Messages/index.tsx +15 -4
- package/themes/original/src/components/Messages/styles.tsx +1 -1
- package/themes/original/src/components/MomentOption/index.tsx +9 -10
- package/themes/original/src/components/MomentSelector/index.tsx +1 -1
- package/themes/original/src/components/MultiCart/index.tsx +1 -1
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +161 -49
- package/themes/original/src/components/MultiCheckout/index.tsx +348 -70
- package/themes/original/src/components/MultiCheckout/styles.tsx +3 -1
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +2 -2
- package/themes/original/src/components/MyOrders/index.tsx +16 -5
- package/themes/original/src/components/NavBar/index.tsx +20 -13
- 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/NotFoundSource/index.tsx +14 -10
- 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/OrderEta.tsx +76 -0
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +22 -6
- package/themes/original/src/components/OrderDetails/index.tsx +721 -670
- package/themes/original/src/components/OrderDetails/styles.tsx +24 -8
- package/themes/original/src/components/OrderItAgain/index.tsx +3 -1
- package/themes/original/src/components/OrderProgress/index.tsx +34 -25
- package/themes/original/src/components/OrderProgress/styles.tsx +1 -1
- package/themes/original/src/components/OrderSummary/index.tsx +62 -57
- 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/index.tsx +13 -13
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/styles.tsx +1 -1
- package/themes/original/src/components/OrdersOption/index.tsx +44 -21
- package/themes/original/src/components/OrdersOption/styles.tsx +2 -2
- package/themes/original/src/components/PageBanner/index.tsx +65 -29
- package/themes/original/src/components/PageBanner/styles.tsx +0 -3
- package/themes/original/src/components/PaymentOptionCard/index.tsx +180 -0
- 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 +100 -34
- package/themes/original/src/components/PhoneInputNumber/index.tsx +18 -4
- 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 +106 -170
- package/themes/original/src/components/ProductForm/styles.tsx +3 -3
- package/themes/original/src/components/ProductItemAccordion/index.tsx +13 -6
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +49 -20
- package/themes/original/src/components/ProductOptionSubOption/styles.tsx +10 -9
- package/themes/original/src/components/ProfessionalProfile/styles.tsx +3 -3
- package/themes/original/src/components/Promotions/index.tsx +6 -6
- package/themes/original/src/components/Promotions/styles.tsx +3 -3
- 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/index.tsx +16 -7
- package/themes/original/src/components/ReviewProducts/styles.tsx +1 -1
- package/themes/original/src/components/ScheduleAccordion/index.tsx +3 -3
- 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/SignupForm/index.tsx +27 -16
- package/themes/original/src/components/SingleOrderCard/index.tsx +44 -20
- package/themes/original/src/components/SingleOrderCard/styles.tsx +1 -1
- package/themes/original/src/components/SingleProductCard/index.tsx +13 -10
- package/themes/original/src/components/SingleProductCard/styles.tsx +8 -3
- package/themes/original/src/components/SingleProductReview/styles.tsx +1 -1
- package/themes/original/src/components/StripeCardsList/index.tsx +61 -5
- package/themes/original/src/components/StripeElementsForm/index.tsx +48 -34
- package/themes/original/src/components/StripeElementsForm/naked.tsx +12 -1
- 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 +16 -205
- package/themes/original/src/components/UpsellingProducts/styles.tsx +19 -0
- package/themes/original/src/components/UserDetails/index.tsx +3 -1
- package/themes/original/src/components/UserFormDetails/index.tsx +100 -22
- package/themes/original/src/components/UserFormDetails/styles.tsx +1 -1
- package/themes/original/src/components/UserProfile/index.tsx +8 -26
- package/themes/original/src/components/UserProfileForm/index.tsx +30 -31
- package/themes/original/src/components/UserVerification/index.tsx +55 -50
- package/themes/original/src/components/WalletTransactionItem/index.tsx +2 -2
- package/themes/original/src/components/WalletTransactions/index.tsx +3 -3
- package/themes/original/src/components/WalletTransactions/styles.tsx +1 -0
- package/themes/original/src/components/Wallets/index.tsx +48 -60
- package/themes/original/src/components/Wallets/styles.tsx +3 -4
- package/themes/original/src/components/shared/HeaderTitle.tsx +1 -1
- package/themes/original/src/components/shared/OButton.tsx +3 -3
- package/themes/original/src/components/shared/OInput.tsx +4 -5
- package/themes/original/src/components/shared/OModal.tsx +15 -17
- package/themes/original/src/layouts/Container.tsx +5 -3
- package/themes/original/src/types/index.tsx +28 -6
- package/themes/original/src/utils/index.tsx +180 -13
- 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
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
1
|
+
import React, { useEffect, useState } from 'react'
|
|
2
2
|
import { RefreshControl, ScrollView, View } from 'react-native'
|
|
3
3
|
import { OText } from '../shared'
|
|
4
|
-
import { useLanguage, useSession } from 'ordering-components/native'
|
|
4
|
+
import { useLanguage, useSession, useUtils } from 'ordering-components/native'
|
|
5
5
|
import { DayContainer } from './styles'
|
|
6
6
|
import { useTheme } from 'styled-components/native'
|
|
7
7
|
export const DriverSchedule = (props: any) => {
|
|
@@ -9,7 +9,9 @@ export const DriverSchedule = (props: any) => {
|
|
|
9
9
|
const [, t] = useLanguage()
|
|
10
10
|
const theme = useTheme()
|
|
11
11
|
const [, { refreshUserInfo }] = useSession()
|
|
12
|
+
const [{ parseDate }] = useUtils()
|
|
12
13
|
const [refreshing] = useState(false);
|
|
14
|
+
const [driverSchedule, setDriverSchedule] = useState([]);
|
|
13
15
|
|
|
14
16
|
const daysOfWeek = [
|
|
15
17
|
t('SUNDAY_ABBREVIATION', 'Sun'),
|
|
@@ -21,11 +23,43 @@ export const DriverSchedule = (props: any) => {
|
|
|
21
23
|
t('SATURDAY_ABBREVIATION', 'Sat')
|
|
22
24
|
]
|
|
23
25
|
|
|
26
|
+
const getNextDate = (day) => {
|
|
27
|
+
const now = new Date()
|
|
28
|
+
now.setDate(now.getDate() + (day + (7 - now.getDay())) % 7)
|
|
29
|
+
return now
|
|
30
|
+
}
|
|
31
|
+
|
|
24
32
|
const scheduleFormatted = ({ hour, minute }: any) => {
|
|
25
33
|
const checkTime = (val: number) => val < 10 ? `0${val}` : val
|
|
26
34
|
return `${checkTime(hour)}:${checkTime(minute)}`
|
|
27
35
|
}
|
|
28
36
|
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
if (schedule) {
|
|
39
|
+
setDriverSchedule(schedule)
|
|
40
|
+
} else {
|
|
41
|
+
const _schedule: any = []
|
|
42
|
+
for (let i = 0; i < 7; i++) {
|
|
43
|
+
_schedule.push({
|
|
44
|
+
enabled: true,
|
|
45
|
+
lapses: [
|
|
46
|
+
{
|
|
47
|
+
open: {
|
|
48
|
+
hour: 0,
|
|
49
|
+
minute: 0
|
|
50
|
+
},
|
|
51
|
+
close: {
|
|
52
|
+
hour: 23,
|
|
53
|
+
minute: 59
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
})
|
|
58
|
+
}
|
|
59
|
+
setDriverSchedule(_schedule)
|
|
60
|
+
}
|
|
61
|
+
}, [schedule])
|
|
62
|
+
|
|
29
63
|
return (
|
|
30
64
|
<ScrollView
|
|
31
65
|
refreshControl={<RefreshControl
|
|
@@ -37,22 +71,25 @@ export const DriverSchedule = (props: any) => {
|
|
|
37
71
|
{t('SCHEDULE', 'Schedule')}
|
|
38
72
|
</OText>
|
|
39
73
|
<View style={{ padding: 30 }}>
|
|
40
|
-
{
|
|
74
|
+
{driverSchedule.map((item: any, i: number) => (
|
|
41
75
|
<DayContainer key={daysOfWeek[i]}>
|
|
42
|
-
<
|
|
43
|
-
|
|
76
|
+
<View style={{ flex: 1 }}>
|
|
77
|
+
<OText size={22} weight={700}>{daysOfWeek[i]}</OText>
|
|
78
|
+
<OText size={14}>{parseDate(getNextDate(i), { outputFormat: 'YYYY-MM-DD' })}</OText>
|
|
79
|
+
</View>
|
|
80
|
+
<View style={{ flex: 1 }}>
|
|
44
81
|
<>
|
|
45
82
|
{item?.enabled ? (
|
|
46
|
-
<View>
|
|
83
|
+
<View style={{ width: '100%' }}>
|
|
47
84
|
{item?.lapses.map((lapse: any, i: number) => (
|
|
48
85
|
<View key={`${daysOfWeek[i]}_${i}`} style={{ marginTop: 3, marginBottom: 20, flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
49
|
-
<OText size={18} style={{
|
|
86
|
+
<OText size={18} style={{ flex: 1 }}>
|
|
50
87
|
{scheduleFormatted(lapse.open)}
|
|
51
88
|
</OText>
|
|
52
89
|
<OText size={18} style={{ width: 15 }}>
|
|
53
90
|
-
|
|
54
91
|
</OText>
|
|
55
|
-
<OText size={18} style={{
|
|
92
|
+
<OText size={18} style={{ flex: 1, textAlign: 'right' }}>
|
|
56
93
|
{scheduleFormatted(lapse.close)}
|
|
57
94
|
</OText>
|
|
58
95
|
</View>
|
|
@@ -25,6 +25,7 @@ const FloatingButtonUI = (props: FloatingButtonParams) => {
|
|
|
25
25
|
secondButton,
|
|
26
26
|
widthButton,
|
|
27
27
|
isPadding,
|
|
28
|
+
isHideRejectButtons
|
|
28
29
|
} = props;
|
|
29
30
|
|
|
30
31
|
const theme = useTheme();
|
|
@@ -61,39 +62,41 @@ const FloatingButtonUI = (props: FloatingButtonParams) => {
|
|
|
61
62
|
width: '100%',
|
|
62
63
|
justifyContent: 'space-between',
|
|
63
64
|
}}>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
{
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
{
|
|
83
|
-
|
|
65
|
+
{!isHideRejectButtons && (
|
|
66
|
+
<Button
|
|
67
|
+
secondButton={secondButton}
|
|
68
|
+
style={[
|
|
69
|
+
{
|
|
70
|
+
borderWidth: colorTxt1 ? 1 : 0,
|
|
71
|
+
borderColor: colorTxt1 ? colorTxt1 : null,
|
|
72
|
+
},
|
|
73
|
+
secondButton
|
|
74
|
+
? { backgroundColor: firstColorCustom || styles.primaryBtn }
|
|
75
|
+
: color
|
|
76
|
+
? { backgroundColor: color }
|
|
77
|
+
: styles.primaryBtn,
|
|
78
|
+
,
|
|
79
|
+
{ width: widthButton },
|
|
80
|
+
]}
|
|
81
|
+
onPress={firstButtonClick}
|
|
82
|
+
disabled={disabled}>
|
|
83
|
+
<OText color={theme.colors.white} size={16} mLeft={20}>
|
|
84
|
+
{btnLeftValueShow ? btnLeftValue : ''}
|
|
85
|
+
</OText>
|
|
84
86
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
<OText
|
|
88
|
+
style={styles.btnTextStyle}
|
|
89
|
+
color={colorTxt1 ? colorTxt1 : theme.colors.white}
|
|
90
|
+
numberOfLines={2}
|
|
91
|
+
adjustsFontSizeToFit>
|
|
92
|
+
{btnText}
|
|
93
|
+
</OText>
|
|
92
94
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
<OText color={theme.colors.white} size={16} mRight={20}>
|
|
96
|
+
{btnRightValueShow ? btnRightValue : ''}
|
|
97
|
+
</OText>
|
|
98
|
+
</Button>
|
|
99
|
+
)}
|
|
97
100
|
|
|
98
101
|
{secondButton && (
|
|
99
102
|
<Button
|
|
@@ -80,9 +80,9 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
80
80
|
locations.map((location: { lat: number; lng: number; level: number }) => {
|
|
81
81
|
return location.level === 4 && driverLocation?.lat
|
|
82
82
|
? {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
latitude: driverLocation?.lat,
|
|
84
|
+
longitude: driverLocation?.lng,
|
|
85
|
+
}
|
|
86
86
|
: { latitude: location.lat, longitude: location.lng };
|
|
87
87
|
});
|
|
88
88
|
|
|
@@ -107,7 +107,7 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
107
107
|
}
|
|
108
108
|
let data = null;
|
|
109
109
|
const details = {
|
|
110
|
-
geometry: { location: { lat: pos
|
|
110
|
+
geometry: { location: { lat: pos?.latitude, lng: pos?.longitude } },
|
|
111
111
|
};
|
|
112
112
|
if (isSetInputs) {
|
|
113
113
|
data = {
|
|
@@ -165,8 +165,8 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
165
165
|
const lat1 = pointA.lat;
|
|
166
166
|
const lon1 = pointA.lng;
|
|
167
167
|
|
|
168
|
-
const lat2 = pointB
|
|
169
|
-
const lon2 = pointB
|
|
168
|
+
const lat2 = pointB?.latitude;
|
|
169
|
+
const lon2 = pointB?.longitude;
|
|
170
170
|
|
|
171
171
|
const R = 6371e3;
|
|
172
172
|
const φ1 = lat1 * (Math.PI / 180);
|
|
@@ -201,11 +201,11 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
201
201
|
content: !(errKey === 'ERROR_MAX_LIMIT_LOCATION_TO')
|
|
202
202
|
? [t(errKey, mapErrors[errKey])]
|
|
203
203
|
: [
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
204
|
+
`${t(errKey, mapErrors[errKey])} ${maxLimitLocation} ${t(
|
|
205
|
+
'METTERS',
|
|
206
|
+
'meters',
|
|
207
|
+
)}`,
|
|
208
|
+
],
|
|
209
209
|
key: errKey,
|
|
210
210
|
});
|
|
211
211
|
};
|
|
@@ -237,9 +237,9 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
237
237
|
MARKERS = locations.map((location: { lat: number; lng: number; level: number }) => {
|
|
238
238
|
return location.level === 4 && driverLocation?.lat
|
|
239
239
|
? {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
240
|
+
latitude: driverLocation?.lat,
|
|
241
|
+
longitude: driverLocation?.lng,
|
|
242
|
+
}
|
|
243
243
|
: { latitude: location.lat, longitude: location.lng };
|
|
244
244
|
})
|
|
245
245
|
fitAllMarkers();
|
|
@@ -284,7 +284,7 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
284
284
|
onRegionChangeComplete={
|
|
285
285
|
!readOnly
|
|
286
286
|
? coordinates => handleChangeRegion(coordinates)
|
|
287
|
-
: () => {}
|
|
287
|
+
: () => { }
|
|
288
288
|
}
|
|
289
289
|
zoomTapEnabled
|
|
290
290
|
zoomEnabled
|
|
@@ -302,12 +302,13 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
302
302
|
i: number,
|
|
303
303
|
) => (
|
|
304
304
|
<React.Fragment key={i}>
|
|
305
|
-
<Marker
|
|
306
|
-
coordinate={location}
|
|
307
|
-
onPress={() => {
|
|
305
|
+
<Marker
|
|
306
|
+
coordinate={location}
|
|
307
|
+
onPress={() => {
|
|
308
308
|
mapRef.current?.animateCamera({
|
|
309
|
-
|
|
310
|
-
|
|
309
|
+
center: { latitude: location?.latitude, longitude: location?.longitude },
|
|
310
|
+
})
|
|
311
|
+
}}
|
|
311
312
|
>
|
|
312
313
|
<Icon
|
|
313
314
|
name="map-marker"
|
|
@@ -328,46 +329,46 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
328
329
|
<Callout
|
|
329
330
|
onPress={() => {
|
|
330
331
|
showLocation({
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
332
|
+
latitude: location?.latitude,
|
|
333
|
+
longitude: location?.longitude,
|
|
334
|
+
sourceLatitude: userLocation?.latitude,
|
|
335
|
+
sourceLongitude: userLocation.longitude,
|
|
336
|
+
naverCallerName: 'com.businessapp',
|
|
337
|
+
dialogTitle: t('SHOW_IN_OTHER_MAPS', 'Show in other maps'),
|
|
338
|
+
dialogMessage: t('WHAT_APP_WOULD_YOU_USE', 'What app would you like to use?'),
|
|
339
|
+
cancelText: t('CANCEL', 'Cancel'),
|
|
339
340
|
})
|
|
340
341
|
}}
|
|
341
342
|
>
|
|
342
|
-
<View style={{flex: 1,width: 250, paddingRight: 10, paddingLeft: 10, justifyContent:'space-between' }}>
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
343
|
+
<View style={{ flex: 1, width: 250, paddingRight: 10, paddingLeft: 10, justifyContent: 'space-between' }}>
|
|
344
|
+
<View style={{ flex: 1, marginBottom: 20 }}>
|
|
345
|
+
<OText size={16} weight={'bold'} style={{ paddingTop: 10, marginBottom: 10 }}>{locations[i]?.title}</OText>
|
|
346
|
+
{locations[i]?.address && (
|
|
347
|
+
<>
|
|
348
|
+
<OText size={16} >{locations[i]?.address.addressName}</OText>
|
|
349
|
+
<OText size={16} >{locations[i]?.address.zipcode}</OText>
|
|
350
|
+
</>
|
|
351
|
+
)}
|
|
352
|
+
</View>
|
|
353
|
+
<OButton
|
|
354
|
+
text={t('GO_TO_THIS_LOCATION', 'Go to this location')}
|
|
355
|
+
imgRightSrc={null}
|
|
356
|
+
textStyle={{
|
|
357
|
+
color: theme.colors.white,
|
|
358
|
+
fontFamily: 'Poppins',
|
|
359
|
+
fontStyle: 'normal',
|
|
360
|
+
fontWeight: 'normal',
|
|
361
|
+
fontSize: 16
|
|
362
|
+
}}
|
|
363
|
+
style={{
|
|
364
|
+
alignContent: 'center',
|
|
365
|
+
borderRadius: 10,
|
|
366
|
+
height: 35,
|
|
367
|
+
bottom: 10
|
|
368
|
+
}}
|
|
369
|
+
bgColor={theme.colors.primary}
|
|
370
|
+
borderColor={theme.colors.primary}
|
|
371
|
+
/>
|
|
371
372
|
</View>
|
|
372
373
|
</Callout>
|
|
373
374
|
</Marker>
|
|
@@ -209,11 +209,11 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
209
209
|
props.handleChangeTab(val);
|
|
210
210
|
|
|
211
211
|
if (loginTab === 'email') {
|
|
212
|
-
scrollRefTab.current?.scrollToEnd({ animated: true });
|
|
212
|
+
scrollRefTab?.current?.scrollToEnd && scrollRefTab.current?.scrollToEnd({ animated: true });
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
if (loginTab === 'cellphone') {
|
|
216
|
-
scrollRefTab.current?.scrollTo({ animated: true });
|
|
216
|
+
scrollRefTab?.current?.scrollTo && scrollRefTab.current?.scrollTo({ animated: true });
|
|
217
217
|
}
|
|
218
218
|
};
|
|
219
219
|
|
|
@@ -476,6 +476,8 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
476
476
|
borderRadius: 7.6,
|
|
477
477
|
borderColor: theme.colors.inputSignup,
|
|
478
478
|
backgroundColor: theme.colors.transparent,
|
|
479
|
+
minHeight: 50,
|
|
480
|
+
maxHeight : 50
|
|
479
481
|
},
|
|
480
482
|
btn: {
|
|
481
483
|
borderRadius: 7.6,
|
|
@@ -941,3 +943,4 @@ export const LoginForm = (props: any) => {
|
|
|
941
943
|
|
|
942
944
|
return <LoginFormController {...loginProps} />;
|
|
943
945
|
};
|
|
946
|
+
|
|
@@ -42,7 +42,7 @@ const MapViewComponent = (props: MapViewParams) => {
|
|
|
42
42
|
followUserLocation
|
|
43
43
|
} = useLocation();
|
|
44
44
|
|
|
45
|
-
const location = { lat: userLocation
|
|
45
|
+
const location = { lat: userLocation?.latitude, lng: userLocation?.longitude }
|
|
46
46
|
const haveOrders = Object.values(markerGroups)?.length > 0 && Object.values(customerMarkerGroups)?.length > 0
|
|
47
47
|
const closeAlert = () => {
|
|
48
48
|
setAlertState({
|
|
@@ -57,8 +57,8 @@ const MapViewComponent = (props: MapViewParams) => {
|
|
|
57
57
|
[
|
|
58
58
|
{ latitude: location.latitude, longitude: location.longitude },
|
|
59
59
|
{
|
|
60
|
-
latitude: userLocation
|
|
61
|
-
longitude: userLocation
|
|
60
|
+
latitude: userLocation?.latitude,
|
|
61
|
+
longitude: userLocation?.longitude,
|
|
62
62
|
},
|
|
63
63
|
],
|
|
64
64
|
{
|
|
@@ -132,6 +132,10 @@ const MapViewComponent = (props: MapViewParams) => {
|
|
|
132
132
|
|
|
133
133
|
const RenderMarker = ({ marker, customer, orderIds }: { marker: any, customer?: boolean, orderIds?: Array<number> }) => {
|
|
134
134
|
const markerRef = useRef<any>()
|
|
135
|
+
|
|
136
|
+
let coordinateLat = (customer ? marker?.customer?.location?.lat : marker?.business?.location?.lat) ?? initialPosition?.latitude
|
|
137
|
+
let coordinateLng = (customer ? marker?.customer?.location?.lng : marker?.business?.location?.lng) ?? initialPosition?.longitude
|
|
138
|
+
|
|
135
139
|
useEffect(() => {
|
|
136
140
|
if (
|
|
137
141
|
markerRef?.current?.props?.coordinate?.latitude === locationSelected?.latitude &&
|
|
@@ -145,8 +149,8 @@ const MapViewComponent = (props: MapViewParams) => {
|
|
|
145
149
|
<Marker
|
|
146
150
|
key={customer ? marker?.customer?.id : marker?.business?.id}
|
|
147
151
|
coordinate={{
|
|
148
|
-
latitude:
|
|
149
|
-
longitude:
|
|
152
|
+
latitude: coordinateLat,
|
|
153
|
+
longitude: coordinateLng
|
|
150
154
|
}}
|
|
151
155
|
onPress={() =>
|
|
152
156
|
setLocationSelected({
|
|
@@ -213,10 +217,10 @@ const MapViewComponent = (props: MapViewParams) => {
|
|
|
213
217
|
}
|
|
214
218
|
|
|
215
219
|
useEffect(() => {
|
|
216
|
-
if (userLocation
|
|
220
|
+
if (userLocation?.latitude !== 0 && userLocation?.longitude !== 0) {
|
|
217
221
|
const location = {
|
|
218
|
-
lat: userLocation
|
|
219
|
-
lng: userLocation
|
|
222
|
+
lat: userLocation?.latitude,
|
|
223
|
+
lng: userLocation?.longitude
|
|
220
224
|
}
|
|
221
225
|
setDriverLocation({ location })
|
|
222
226
|
}
|
|
@@ -231,8 +235,8 @@ const MapViewComponent = (props: MapViewParams) => {
|
|
|
231
235
|
ref={mapRef}
|
|
232
236
|
provider={PROVIDER_GOOGLE}
|
|
233
237
|
initialRegion={{
|
|
234
|
-
latitude: initialPosition
|
|
235
|
-
longitude: initialPosition
|
|
238
|
+
latitude: initialPosition?.latitude,
|
|
239
|
+
longitude: initialPosition?.longitude,
|
|
236
240
|
latitudeDelta: haveOrders ? 0.01 : 0.1,
|
|
237
241
|
longitudeDelta: haveOrders ? 0.01 * ASPECT_RATIO : 0.1 * ASPECT_RATIO,
|
|
238
242
|
}}
|
|
@@ -2,20 +2,18 @@ import React, { useState, useEffect } from 'react';
|
|
|
2
2
|
import {
|
|
3
3
|
View,
|
|
4
4
|
Pressable,
|
|
5
|
-
StyleSheet
|
|
6
|
-
Dimensions,
|
|
7
|
-
ScrollView,
|
|
8
|
-
RefreshControl,
|
|
5
|
+
StyleSheet
|
|
9
6
|
} from 'react-native';
|
|
10
7
|
import { Contacts, useLanguage } from 'ordering-components/native';
|
|
11
8
|
import { useTheme } from 'styled-components/native';
|
|
12
|
-
import {
|
|
13
|
-
import { OText, OButton } from '../shared';
|
|
9
|
+
import { OText } from '../shared';
|
|
14
10
|
import { NotFoundSource } from '../NotFoundSource';
|
|
15
11
|
import { PreviousMessages } from '../PreviousMessages';
|
|
16
12
|
import { FiltersTab, TabsContainer, TagsContainer, Tag } from './styles';
|
|
17
13
|
import { MessagesOptionParams } from '../../types';
|
|
18
14
|
import { useDeviceOrientation } from '../../../../../src/hooks/DeviceOrientation';
|
|
15
|
+
import { WebsocketStatus } from '../WebsocketStatus'
|
|
16
|
+
|
|
19
17
|
const MessagesOptionUI = (props: MessagesOptionParams) => {
|
|
20
18
|
const {
|
|
21
19
|
orders,
|
|
@@ -65,12 +63,6 @@ const MessagesOptionUI = (props: MessagesOptionParams) => {
|
|
|
65
63
|
),
|
|
66
64
|
);
|
|
67
65
|
|
|
68
|
-
const [orientation, setOrientation] = useState(
|
|
69
|
-
Dimensions.get('window').width < Dimensions.get('window').height
|
|
70
|
-
? 'Portrait'
|
|
71
|
-
: 'Landscape',
|
|
72
|
-
);
|
|
73
|
-
|
|
74
66
|
const getTagFilter = (key: number) => {
|
|
75
67
|
return tags.find(value => value.key === key)?.text;
|
|
76
68
|
};
|
|
@@ -114,14 +106,6 @@ const MessagesOptionUI = (props: MessagesOptionParams) => {
|
|
|
114
106
|
);
|
|
115
107
|
}, [orders]);
|
|
116
108
|
|
|
117
|
-
Dimensions.addEventListener('change', ({ window: { width, height } }) => {
|
|
118
|
-
if (width < height) {
|
|
119
|
-
setOrientation('Portrait');
|
|
120
|
-
} else {
|
|
121
|
-
setOrientation('Landscape');
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
|
|
125
109
|
const styles = StyleSheet.create({
|
|
126
110
|
header: {
|
|
127
111
|
marginBottom: 25,
|
|
@@ -180,7 +164,7 @@ const MessagesOptionUI = (props: MessagesOptionParams) => {
|
|
|
180
164
|
<View style={styles.header}>
|
|
181
165
|
<OText style={styles.title}>{t('MESSAGES', 'Messages')}</OText>
|
|
182
166
|
</View>
|
|
183
|
-
|
|
167
|
+
<WebsocketStatus />
|
|
184
168
|
<FiltersTab>
|
|
185
169
|
<TabsContainer width={dimensions.width - 42}>
|
|
186
170
|
{tabs.map((tab: any) => (
|
|
@@ -242,35 +226,28 @@ const MessagesOptionUI = (props: MessagesOptionParams) => {
|
|
|
242
226
|
!error
|
|
243
227
|
? t('NO_RESULTS_FOUND', 'Sorry, no results found')
|
|
244
228
|
: error[0]?.message ||
|
|
245
|
-
|
|
246
|
-
|
|
229
|
+
error[0] ||
|
|
230
|
+
t('NETWORK_ERROR', 'Network Error')
|
|
247
231
|
}
|
|
248
232
|
image={theme.images.general.notFound}
|
|
249
233
|
conditioned={false}
|
|
250
234
|
/>
|
|
251
235
|
)}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
{
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
setOrders={setOrders}
|
|
268
|
-
messages={messages}
|
|
269
|
-
onNavigationRedirect={onNavigationRedirect}
|
|
270
|
-
/>
|
|
271
|
-
)}
|
|
272
|
-
|
|
273
|
-
{/* {!reload &&
|
|
236
|
+
<PreviousMessages
|
|
237
|
+
orders={values}
|
|
238
|
+
messages={messages}
|
|
239
|
+
onNavigationRedirect={onNavigationRedirect}
|
|
240
|
+
getOrders={getOrders}
|
|
241
|
+
pagination={pagination}
|
|
242
|
+
loading={loading}
|
|
243
|
+
reload={reload}
|
|
244
|
+
tabs={tabs}
|
|
245
|
+
tabsFilter={tabsFilter}
|
|
246
|
+
setOrders={setOrders}
|
|
247
|
+
loadMore={loadMore}
|
|
248
|
+
error={error}
|
|
249
|
+
/>
|
|
250
|
+
{/* {!reload &&
|
|
274
251
|
!error &&
|
|
275
252
|
orders.length > 0 &&
|
|
276
253
|
JSON.stringify(tabsFilter) === JSON.stringify(tabs[1].tags) && (
|
|
@@ -283,55 +260,6 @@ const MessagesOptionUI = (props: MessagesOptionParams) => {
|
|
|
283
260
|
onNavigationRedirect={onNavigationRedirect}
|
|
284
261
|
/>
|
|
285
262
|
)} */}
|
|
286
|
-
|
|
287
|
-
{(loading || reload) && (
|
|
288
|
-
<>
|
|
289
|
-
<View>
|
|
290
|
-
{[...Array(5)].map((item, i) => (
|
|
291
|
-
<Placeholder key={i} Animation={Fade}>
|
|
292
|
-
<View
|
|
293
|
-
style={{
|
|
294
|
-
width: '100%',
|
|
295
|
-
flexDirection: 'row',
|
|
296
|
-
marginBottom: 10,
|
|
297
|
-
}}>
|
|
298
|
-
<PlaceholderLine
|
|
299
|
-
width={orientation === 'Portrait' ? 22 : 11}
|
|
300
|
-
height={74}
|
|
301
|
-
style={{
|
|
302
|
-
marginRight: 20,
|
|
303
|
-
marginBottom: 20,
|
|
304
|
-
borderRadius: 7.6,
|
|
305
|
-
}}
|
|
306
|
-
/>
|
|
307
|
-
<Placeholder>
|
|
308
|
-
<PlaceholderLine width={30} style={{ marginTop: 5 }} />
|
|
309
|
-
<PlaceholderLine width={50} />
|
|
310
|
-
<PlaceholderLine width={20} />
|
|
311
|
-
</Placeholder>
|
|
312
|
-
</View>
|
|
313
|
-
</Placeholder>
|
|
314
|
-
))}
|
|
315
|
-
</View>
|
|
316
|
-
</>
|
|
317
|
-
)}
|
|
318
|
-
|
|
319
|
-
{pagination?.totalPages &&
|
|
320
|
-
!loading &&
|
|
321
|
-
!reload &&
|
|
322
|
-
JSON.stringify(tabsFilter) === JSON.stringify(tabs[0].tags) &&
|
|
323
|
-
pagination?.currentPage < pagination?.totalPages && (
|
|
324
|
-
<OButton
|
|
325
|
-
onClick={() => loadMore && loadMore()}
|
|
326
|
-
text={t('LOAD_MORE_ORDERS', 'Load more orders')}
|
|
327
|
-
imgRightSrc={null}
|
|
328
|
-
textStyle={styles.loadButtonText}
|
|
329
|
-
style={styles.loadButton}
|
|
330
|
-
bgColor={theme.colors.primary}
|
|
331
|
-
borderColor={theme.colors.primary}
|
|
332
|
-
/>
|
|
333
|
-
)}
|
|
334
|
-
</ScrollView>
|
|
335
263
|
</>
|
|
336
264
|
);
|
|
337
265
|
};
|