ordering-ui-react-native 0.21.7 → 0.21.8-release
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -5
- 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/PaymentOptionsWebView/index.tsx +1 -0
- package/src/components/StripeMethodForm/index.tsx +4 -4
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/components/shared/OToast.tsx +3 -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 -2
- 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 +161 -106
- package/themes/business/src/components/OrderDetails/Business.tsx +47 -1
- package/themes/business/src/components/OrderDetails/Delivery.tsx +21 -11
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +56 -50
- 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 +27 -35
- 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 +192 -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/UserProfileForm/index.tsx +98 -44
- 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 +2 -2
- 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/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 +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 +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 +43 -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 +30 -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 +17 -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 +1 -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 +53 -47
- package/themes/original/src/components/LoginForm/index.tsx +6 -1
- 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 +251 -53
- 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 +7 -3
- package/themes/original/src/components/OrderDetails/index.tsx +716 -667
- package/themes/original/src/components/OrderDetails/styles.tsx +24 -8
- package/themes/original/src/components/OrderProgress/index.tsx +28 -9
- 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 +75 -166
- package/themes/original/src/components/ProductItemAccordion/index.tsx +13 -9
- package/themes/original/src/components/ProductItemAccordion/styles.tsx +3 -1
- 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 +53 -7
- 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 +55 -50
- 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 +6 -1
- 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
|
@@ -6,12 +6,14 @@ import { Placeholder, PlaceholderLine, Fade } from 'rn-placeholder';
|
|
|
6
6
|
import FeatherIcon from 'react-native-vector-icons/Feather';
|
|
7
7
|
import FontistoIcon from 'react-native-vector-icons/Fontisto'
|
|
8
8
|
import AntDesignIcon from 'react-native-vector-icons/AntDesign'
|
|
9
|
+
|
|
9
10
|
import { useTheme } from 'styled-components/native';
|
|
10
11
|
import { DeviceOrientationMethods } from '../../../../../src/hooks/DeviceOrientation'
|
|
11
12
|
import { NotificationSetting } from '../../../../../src/components/NotificationSetting'
|
|
12
13
|
import { NewOrderNotification } from '../NewOrderNotification';
|
|
14
|
+
import { WebsocketStatus } from '../WebsocketStatus'
|
|
13
15
|
|
|
14
|
-
import { OText, OButton, OModal,
|
|
16
|
+
import { OText, OButton, OModal, OInput, OIcon } from '../shared';
|
|
15
17
|
import { NotFoundSource } from '../NotFoundSource';
|
|
16
18
|
import {
|
|
17
19
|
FiltersTab,
|
|
@@ -48,6 +50,7 @@ const { useDeviceOrientation, PORTRAIT } = DeviceOrientationMethods
|
|
|
48
50
|
|
|
49
51
|
const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
50
52
|
const {
|
|
53
|
+
navigation,
|
|
51
54
|
setCurrentFilters,
|
|
52
55
|
tabs,
|
|
53
56
|
currentTabSelected,
|
|
@@ -73,6 +76,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
73
76
|
|
|
74
77
|
const defaultSearchList = {
|
|
75
78
|
id: '',
|
|
79
|
+
external_id: '',
|
|
76
80
|
state: '',
|
|
77
81
|
city: '',
|
|
78
82
|
business: '',
|
|
@@ -92,35 +96,11 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
92
96
|
const [{ parseDate }] = useUtils()
|
|
93
97
|
const [configState] = useConfig()
|
|
94
98
|
const [orientationState] = useDeviceOrientation();
|
|
95
|
-
const [, { showToast }] = useToast();
|
|
96
99
|
const [openSearchModal, setOpenSearchModal] = useState(false)
|
|
97
100
|
const [openSLASettingModal, setOpenSLASettingModal] = useState(false)
|
|
98
101
|
const [slaSettingTime, setSlaSettingTime] = useState(6000)
|
|
99
102
|
const [currentDeliveryType, setCurrentDeliveryType] = useState('Delivery')
|
|
100
103
|
const [search, setSearch] = useState(defaultSearchList)
|
|
101
|
-
const [selectedTabStatus, setSelectedTabStatus] = useState<any>([])
|
|
102
|
-
const [hour, setHour] = useState(0)
|
|
103
|
-
const [minute, setMinute] = useState(0)
|
|
104
|
-
const [openedSelect, setOpenedSelect] = useState('')
|
|
105
|
-
const WIDTH_SCREEN = orientationState?.dimensions?.width
|
|
106
|
-
const HEIGHT_SCREEN = orientationState?.dimensions?.height
|
|
107
|
-
const IS_PORTRAIT = orientationState.orientation === PORTRAIT
|
|
108
|
-
|
|
109
|
-
const preorderTypeList = [
|
|
110
|
-
{ key: null, name: t('SLA', 'SLA\'s') },
|
|
111
|
-
{ key: 'in_time', name: t('OK', 'Ok') },
|
|
112
|
-
{ key: 'at_risk', name: t('AT_RISK', 'At Risk') },
|
|
113
|
-
{ key: 'delayed', name: t('DELAYED', 'Delayed') }
|
|
114
|
-
]
|
|
115
|
-
|
|
116
|
-
const defaultOrderTypes = [
|
|
117
|
-
{ key: 1, name: t('DELIVERY', 'Delivery') },
|
|
118
|
-
{ key: 2, name: t('PICKUP', 'Pickup') },
|
|
119
|
-
{ key: 3, name: t('EAT_IN', 'Eat in') },
|
|
120
|
-
{ key: 4, name: t('CURBSIDE', 'Curbside') },
|
|
121
|
-
{ key: 5, name: t('DRIVE_THRU', 'Drive thru') }
|
|
122
|
-
]
|
|
123
|
-
|
|
124
104
|
const deliveryStatus = [
|
|
125
105
|
{
|
|
126
106
|
key: t('OK', 'Ok'),
|
|
@@ -144,6 +124,27 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
144
124
|
backColor: '#E63757'
|
|
145
125
|
}
|
|
146
126
|
]
|
|
127
|
+
const combineTabs = configState?.configs?.combine_pending_and_progress_orders?.value === '1'
|
|
128
|
+
const [selectedTabStatus, setSelectedTabStatus] = useState<any>(deliveryStatus)
|
|
129
|
+
const [openedSelect, setOpenedSelect] = useState('')
|
|
130
|
+
|
|
131
|
+
const HEIGHT_SCREEN = orientationState?.dimensions?.height
|
|
132
|
+
const IS_PORTRAIT = orientationState.orientation === PORTRAIT
|
|
133
|
+
|
|
134
|
+
const preorderTypeList = [
|
|
135
|
+
{ key: null, name: t('SLA', 'SLA\'s') },
|
|
136
|
+
{ key: 'in_time', name: t('OK', 'Ok') },
|
|
137
|
+
{ key: 'at_risk', name: t('AT_RISK', 'At Risk') },
|
|
138
|
+
{ key: 'delayed', name: t('DELAYED', 'Delayed') }
|
|
139
|
+
]
|
|
140
|
+
|
|
141
|
+
const defaultOrderTypes = [
|
|
142
|
+
{ key: 1, name: t('DELIVERY', 'Delivery') },
|
|
143
|
+
{ key: 2, name: t('PICKUP', 'Pickup') },
|
|
144
|
+
{ key: 3, name: t('EAT_IN', 'Eat in') },
|
|
145
|
+
{ key: 4, name: t('CURBSIDE', 'Curbside') },
|
|
146
|
+
{ key: 5, name: t('DRIVE_THRU', 'Drive thru') }
|
|
147
|
+
]
|
|
147
148
|
|
|
148
149
|
const styles = StyleSheet.create({
|
|
149
150
|
header: {
|
|
@@ -385,15 +386,21 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
385
386
|
setTags({ values: [] })
|
|
386
387
|
}, [currentTabSelected])
|
|
387
388
|
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
389
|
+
useEffect(() => {
|
|
390
|
+
const unsubcribe = navigation.addListener('focus', () => {
|
|
391
|
+
currentTabSelected === 'logisticOrders' ? loadLogisticOrders() : loadOrders && loadOrders({ newFetch: true })
|
|
392
|
+
})
|
|
393
|
+
return unsubcribe
|
|
394
|
+
}, [navigation, loadOrders, loadLogisticOrders])
|
|
391
395
|
|
|
392
396
|
return (
|
|
393
397
|
<>
|
|
394
398
|
<View style={styles.header}>
|
|
395
399
|
<OText style={styles.title}>{t('MY_ORDERS', 'My orders')}</OText>
|
|
396
400
|
<IconWrapper>
|
|
401
|
+
<View style={{ marginRight: 10 }}>
|
|
402
|
+
<WebsocketStatus />
|
|
403
|
+
</View>
|
|
397
404
|
<FeatherIcon
|
|
398
405
|
name='refresh-cw'
|
|
399
406
|
color={theme.colors.backgroundDark}
|
|
@@ -411,7 +418,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
411
418
|
</View>
|
|
412
419
|
{configState?.configs?.order_deadlines_enabled?.value === '1' && (
|
|
413
420
|
<View style={styles.SLAwrapper}>
|
|
414
|
-
<View style={{ flex: 0.5 }}>
|
|
421
|
+
{/* <View style={{ flex: 0.5 }}>
|
|
415
422
|
<OButton
|
|
416
423
|
text={t('SLA_SETTING', 'SLA’s Settings')}
|
|
417
424
|
textStyle={{ color: theme.colors.backArrow }}
|
|
@@ -425,9 +432,9 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
425
432
|
}}
|
|
426
433
|
onClick={onClickSetting}
|
|
427
434
|
/>
|
|
428
|
-
</View>
|
|
429
|
-
<View style={{ width: 10, height: '100%' }} />
|
|
430
|
-
<View style={{ flex: 0.5, justifyContent: 'center' }}>
|
|
435
|
+
</View> */}
|
|
436
|
+
{/* <View style={{ width: 10, height: '100%' }} /> */}
|
|
437
|
+
{/* <View style={{ flex: 0.5, justifyContent: 'center' }}>
|
|
431
438
|
<SelectDropdown
|
|
432
439
|
defaultButtonText={t('SLA', 'SLA\'s')}
|
|
433
440
|
data={preorderTypeList}
|
|
@@ -457,7 +464,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
457
464
|
);
|
|
458
465
|
}}
|
|
459
466
|
/>
|
|
460
|
-
</View>
|
|
467
|
+
</View> */}
|
|
461
468
|
</View>
|
|
462
469
|
)}
|
|
463
470
|
<FiltersTab>
|
|
@@ -469,7 +476,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
469
476
|
nestedScrollEnabled={true}
|
|
470
477
|
>
|
|
471
478
|
<TabsContainer>
|
|
472
|
-
{(isLogisticActivated && !isBusinessApp) && (
|
|
479
|
+
{(isLogisticActivated && !isBusinessApp && !combineTabs) && (
|
|
473
480
|
<Pressable
|
|
474
481
|
style={styles.pressable}
|
|
475
482
|
onPress={() => setCurrentTabSelected('logisticOrders')}>
|
|
@@ -610,6 +617,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
610
617
|
orderTitle={props.orderDetailsProps?.orderTitle}
|
|
611
618
|
handleChangeOrderStatus={handleChangeOrderStatus}
|
|
612
619
|
handleSendCustomerReview={handleSendCustomerReview}
|
|
620
|
+
isBusinessApp={isBusinessApp}
|
|
613
621
|
/>
|
|
614
622
|
)}
|
|
615
623
|
{!logisticOrders?.error?.length &&
|
|
@@ -620,6 +628,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
620
628
|
onNavigationRedirect={onNavigationRedirect}
|
|
621
629
|
getOrderStatus={getOrderStatus}
|
|
622
630
|
handleClickLogisticOrder={handleClickLogisticOrder}
|
|
631
|
+
isBusinessApp={isBusinessApp}
|
|
623
632
|
isLogisticOrder
|
|
624
633
|
/>
|
|
625
634
|
)
|
|
@@ -715,6 +724,39 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
715
724
|
{openSearchModal && (
|
|
716
725
|
<SearchModalContent>
|
|
717
726
|
<ModalTitle>{t('SEARCH_ORDERS', 'Search orders')}</ModalTitle>
|
|
727
|
+
<InputContainer style={{ marginBottom: 24 }}>
|
|
728
|
+
<SelectDropdown
|
|
729
|
+
defaultButtonText={search?.timeStatus
|
|
730
|
+
? preorderTypeList.find(type => type.key === search?.timeStatus)?.name
|
|
731
|
+
: t('SLA', 'SLA\'s')}
|
|
732
|
+
data={preorderTypeList}
|
|
733
|
+
onSelect={(selectedItem, index) => {
|
|
734
|
+
setSearch({ ...search, timeStatus: selectedItem?.key })
|
|
735
|
+
}}
|
|
736
|
+
buttonTextAfterSelection={(selectedItem, index) => {
|
|
737
|
+
return selectedItem.name
|
|
738
|
+
}}
|
|
739
|
+
rowTextForSelection={(item, index) => {
|
|
740
|
+
return item.key
|
|
741
|
+
}}
|
|
742
|
+
buttonStyle={styles.selectOption}
|
|
743
|
+
buttonTextStyle={styles.buttonTextStyle}
|
|
744
|
+
renderDropdownIcon={isOpened => {
|
|
745
|
+
return <FeatherIcon name={isOpened ? 'chevron-up' : 'chevron-down'} color={'#444'} size={18} />;
|
|
746
|
+
}}
|
|
747
|
+
dropdownStyle={styles.dropdownStyle}
|
|
748
|
+
dropdownOverlayColor='transparent'
|
|
749
|
+
rowStyle={styles.rowStyle}
|
|
750
|
+
renderCustomizedRowChild={(item, index) => {
|
|
751
|
+
return (
|
|
752
|
+
<SlaOption>
|
|
753
|
+
{index !== 0 && <OrderStatus timeState={item?.key} />}
|
|
754
|
+
<View><OText size={14} color={'#748194'} >{item?.name}</OText></View>
|
|
755
|
+
</SlaOption>
|
|
756
|
+
);
|
|
757
|
+
}}
|
|
758
|
+
/>
|
|
759
|
+
</InputContainer>
|
|
718
760
|
<InputContainer>
|
|
719
761
|
<OInput
|
|
720
762
|
value={search.id}
|
|
@@ -730,6 +772,21 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
730
772
|
onPress={() => setSearch({ ...search, id: '' })}
|
|
731
773
|
/>
|
|
732
774
|
</InputContainer>
|
|
775
|
+
<InputContainer>
|
|
776
|
+
<OInput
|
|
777
|
+
value={search.external_id}
|
|
778
|
+
onChange={(value: any) => setSearch({ ...search, external_id: value })}
|
|
779
|
+
style={styles.inputStyle}
|
|
780
|
+
placeholder={t('EXTERNAL_ID', 'External id')}
|
|
781
|
+
autoCorrect={false}
|
|
782
|
+
/>
|
|
783
|
+
<AntDesignIcon
|
|
784
|
+
name='close'
|
|
785
|
+
size={20}
|
|
786
|
+
style={{ position: 'absolute', right: 12, top: 13 }}
|
|
787
|
+
onPress={() => setSearch({ ...search, external_id: '' })}
|
|
788
|
+
/>
|
|
789
|
+
</InputContainer>
|
|
733
790
|
<OrdersOptionDate
|
|
734
791
|
{...props}
|
|
735
792
|
search={search}
|
|
@@ -919,7 +976,7 @@ export const Timer = () => {
|
|
|
919
976
|
return (
|
|
920
977
|
<TimerInputWrapper>
|
|
921
978
|
<OText style={styles.settingTime} color={theme.colors.disabled}>{configs?.order_deadlines_delayed_time?.value}</OText>
|
|
922
|
-
<OText>{t('
|
|
979
|
+
<OText>{t('TIME_MIN', 'min')}</OText>
|
|
923
980
|
</TimerInputWrapper>
|
|
924
981
|
)
|
|
925
982
|
}
|
|
@@ -927,8 +984,8 @@ export const Timer = () => {
|
|
|
927
984
|
export const OrdersOption = (props: OrdersOptionParams) => {
|
|
928
985
|
const [, t] = useLanguage();
|
|
929
986
|
const [configState] = useConfig()
|
|
930
|
-
const theme = useTheme()
|
|
931
987
|
const [checkNotificationStatus, setCheckNotificationStatus] = useState({ open: false, checked: false })
|
|
988
|
+
const combineTabs = configState?.configs?.combine_pending_and_progress_orders?.value === '1'
|
|
932
989
|
const ordersProps = {
|
|
933
990
|
...props,
|
|
934
991
|
UIComponent: OrdersOptionUI,
|
|
@@ -1015,32 +1072,52 @@ export const OrdersOption = (props: OrdersOptionParams) => {
|
|
|
1015
1072
|
text: t('ORDER_DRIVER_ON_WAY', 'Driver on way')
|
|
1016
1073
|
}
|
|
1017
1074
|
],
|
|
1018
|
-
tabs: [
|
|
1075
|
+
tabs: combineTabs ? [
|
|
1019
1076
|
{
|
|
1020
1077
|
key: 0,
|
|
1021
|
-
text: t('
|
|
1022
|
-
tags: props?.orderGroupStatusCustom?.
|
|
1023
|
-
title: '
|
|
1078
|
+
text: t('ACTIVE', 'Active'),
|
|
1079
|
+
tags: props?.orderGroupStatusCustom?.active ?? [0, 3, 4, 7, 8, 9, 13, 14, 18, 19, 20, 21, 22, 23],
|
|
1080
|
+
title: 'active',
|
|
1024
1081
|
},
|
|
1025
1082
|
{
|
|
1026
1083
|
key: 1,
|
|
1027
|
-
text: t('IN_PROGRESS', 'In Progress'),
|
|
1028
|
-
tags: props?.orderGroupStatusCustom?.inProgress ?? [3, 4, 7, 8, 9, 14, 18, 19, 20, 21, 22, 23],
|
|
1029
|
-
title: 'inProgress',
|
|
1030
|
-
},
|
|
1031
|
-
{
|
|
1032
|
-
key: 2,
|
|
1033
1084
|
text: t('COMPLETED', 'Completed'),
|
|
1034
1085
|
tags: props?.orderGroupStatusCustom?.completed ?? [1, 11, 15],
|
|
1035
1086
|
title: 'completed',
|
|
1036
1087
|
},
|
|
1037
1088
|
{
|
|
1038
|
-
key:
|
|
1089
|
+
key: 2,
|
|
1039
1090
|
text: t('CANCELLED', 'Cancelled'),
|
|
1040
1091
|
tags: props?.orderGroupStatusCustom?.cancelled ?? [2, 5, 6, 10, 12, 16, 17],
|
|
1041
1092
|
title: 'cancelled',
|
|
1042
1093
|
},
|
|
1043
|
-
]
|
|
1094
|
+
] :
|
|
1095
|
+
[
|
|
1096
|
+
{
|
|
1097
|
+
key: 0,
|
|
1098
|
+
text: t('PENDING', 'Pending'),
|
|
1099
|
+
tags: props?.orderGroupStatusCustom?.pending ?? [0, 13],
|
|
1100
|
+
title: 'pending'
|
|
1101
|
+
},
|
|
1102
|
+
{
|
|
1103
|
+
key: 1,
|
|
1104
|
+
text: t('IN_PROGRESS', 'In Progress'),
|
|
1105
|
+
tags: props?.orderGroupStatusCustom?.inProgress ?? [3, 4, 7, 8, 9, 14, 18, 19, 20, 21, 22, 23],
|
|
1106
|
+
title: 'inProgress',
|
|
1107
|
+
},
|
|
1108
|
+
{
|
|
1109
|
+
key: 2,
|
|
1110
|
+
text: t('COMPLETED', 'Completed'),
|
|
1111
|
+
tags: props?.orderGroupStatusCustom?.completed ?? [1, 11, 15],
|
|
1112
|
+
title: 'completed',
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
key: 3,
|
|
1116
|
+
text: t('CANCELLED', 'Cancelled'),
|
|
1117
|
+
tags: props?.orderGroupStatusCustom?.cancelled ?? [2, 5, 6, 10, 12, 16, 17],
|
|
1118
|
+
title: 'cancelled',
|
|
1119
|
+
},
|
|
1120
|
+
]
|
|
1044
1121
|
};
|
|
1045
1122
|
|
|
1046
1123
|
return (<>
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import { Dimensions, View, StyleSheet } from 'react-native'
|
|
3
|
+
import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder'
|
|
4
|
+
import { OButton } from '../shared'
|
|
5
|
+
import { useTheme } from 'styled-components/native'
|
|
6
|
+
import { useLanguage } from 'ordering-components/native'
|
|
7
|
+
|
|
8
|
+
export const FooterComponent = (props : any) => {
|
|
9
|
+
const {
|
|
10
|
+
loading,
|
|
11
|
+
reload,
|
|
12
|
+
pagination,
|
|
13
|
+
tabsFilter,
|
|
14
|
+
tabs,
|
|
15
|
+
loadMore
|
|
16
|
+
} = props
|
|
17
|
+
|
|
18
|
+
const theme = useTheme()
|
|
19
|
+
const [, t] = useLanguage()
|
|
20
|
+
|
|
21
|
+
const [orientation, setOrientation] = useState(
|
|
22
|
+
Dimensions.get('window').width < Dimensions.get('window').height
|
|
23
|
+
? 'Portrait'
|
|
24
|
+
: 'Landscape',
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
Dimensions.addEventListener('change', ({ window: { width, height } }) => {
|
|
28
|
+
if (width < height) {
|
|
29
|
+
setOrientation('Portrait');
|
|
30
|
+
} else {
|
|
31
|
+
setOrientation('Landscape');
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const styles = StyleSheet.create({
|
|
36
|
+
loadButton: {
|
|
37
|
+
borderRadius: 7.6,
|
|
38
|
+
height: 44,
|
|
39
|
+
marginRight: 10,
|
|
40
|
+
marginBottom: 10,
|
|
41
|
+
marginTop: 5,
|
|
42
|
+
},
|
|
43
|
+
loadButtonText: {
|
|
44
|
+
color: theme.colors.white,
|
|
45
|
+
fontFamily: 'Poppins',
|
|
46
|
+
fontStyle: 'normal',
|
|
47
|
+
fontWeight: 'normal',
|
|
48
|
+
fontSize: 18,
|
|
49
|
+
},
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<>
|
|
54
|
+
{(loading || reload) && (
|
|
55
|
+
<>
|
|
56
|
+
<View>
|
|
57
|
+
{[...Array(5)].map((item, i) => (
|
|
58
|
+
<Placeholder key={i} Animation={Fade}>
|
|
59
|
+
<View
|
|
60
|
+
style={{
|
|
61
|
+
width: '100%',
|
|
62
|
+
flexDirection: 'row',
|
|
63
|
+
marginBottom: 10,
|
|
64
|
+
}}>
|
|
65
|
+
<PlaceholderLine
|
|
66
|
+
width={orientation === 'Portrait' ? 22 : 11}
|
|
67
|
+
height={74}
|
|
68
|
+
style={{
|
|
69
|
+
marginRight: 20,
|
|
70
|
+
marginBottom: 20,
|
|
71
|
+
borderRadius: 7.6,
|
|
72
|
+
}}
|
|
73
|
+
/>
|
|
74
|
+
<Placeholder>
|
|
75
|
+
<PlaceholderLine width={30} style={{ marginTop: 5 }} />
|
|
76
|
+
<PlaceholderLine width={50} />
|
|
77
|
+
<PlaceholderLine width={20} />
|
|
78
|
+
</Placeholder>
|
|
79
|
+
</View>
|
|
80
|
+
</Placeholder>
|
|
81
|
+
))}
|
|
82
|
+
</View>
|
|
83
|
+
</>
|
|
84
|
+
)}
|
|
85
|
+
|
|
86
|
+
{pagination?.totalPages &&
|
|
87
|
+
!loading &&
|
|
88
|
+
!reload &&
|
|
89
|
+
JSON.stringify(tabsFilter) === JSON.stringify(tabs[0].tags) &&
|
|
90
|
+
pagination?.currentPage < pagination?.totalPages && (
|
|
91
|
+
<OButton
|
|
92
|
+
onClick={() => loadMore && loadMore()}
|
|
93
|
+
text={t('LOAD_MORE_ORDERS', 'Load more orders')}
|
|
94
|
+
imgRightSrc={null}
|
|
95
|
+
textStyle={styles.loadButtonText}
|
|
96
|
+
style={styles.loadButton}
|
|
97
|
+
bgColor={theme.colors.primary}
|
|
98
|
+
borderColor={theme.colors.primary}
|
|
99
|
+
/>
|
|
100
|
+
)}
|
|
101
|
+
</>
|
|
102
|
+
)
|
|
103
|
+
}
|
|
@@ -1,17 +1,31 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StyleSheet, TouchableOpacity,
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { StyleSheet, TouchableOpacity, FlatList, RefreshControl } from 'react-native';
|
|
3
3
|
import { useTheme } from 'styled-components/native';
|
|
4
4
|
import { useLanguage, useUtils } from 'ordering-components/native';
|
|
5
5
|
import { Card, Logo, Information, Header, Badge } from './styles';
|
|
6
6
|
import { OIcon, OText } from '../shared';
|
|
7
7
|
import { PreviousMessagesParams } from '../../types';
|
|
8
|
+
import { FooterComponent } from './FooterMessageComponent';
|
|
8
9
|
|
|
9
10
|
export const PreviousMessages = (props: PreviousMessagesParams) => {
|
|
10
|
-
const {
|
|
11
|
+
const {
|
|
12
|
+
orders,
|
|
13
|
+
onNavigationRedirect,
|
|
14
|
+
setOrders,
|
|
15
|
+
getOrders,
|
|
16
|
+
pagination,
|
|
17
|
+
loading,
|
|
18
|
+
reload,
|
|
19
|
+
tabs,
|
|
20
|
+
loadMore,
|
|
21
|
+
tabsFilter,
|
|
22
|
+
error
|
|
23
|
+
} = props;
|
|
11
24
|
|
|
12
25
|
const [, t] = useLanguage();
|
|
13
26
|
const theme = useTheme();
|
|
14
27
|
const [{ parseDate, optimizeImage }] = useUtils();
|
|
28
|
+
const [refreshing] = useState(false);
|
|
15
29
|
|
|
16
30
|
const handlePressOrder = (order: any) => {
|
|
17
31
|
const uuid = order?.id;
|
|
@@ -253,63 +267,91 @@ export const PreviousMessages = (props: PreviousMessagesParams) => {
|
|
|
253
267
|
fontStyle: 'normal',
|
|
254
268
|
fontWeight: 'normal',
|
|
255
269
|
color: theme.colors.orderTypeColor,
|
|
256
|
-
}
|
|
270
|
+
}
|
|
257
271
|
});
|
|
258
272
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
273
|
+
const MessageComponent = (props : any) => {
|
|
274
|
+
const order = props.item
|
|
275
|
+
return (
|
|
276
|
+
<>
|
|
277
|
+
{!reload &&
|
|
278
|
+
!error &&
|
|
279
|
+
JSON.stringify(tabsFilter) === JSON.stringify(tabs[0].tags) && (
|
|
280
|
+
<TouchableOpacity
|
|
281
|
+
key={order?.id}
|
|
282
|
+
onPress={() => handlePressOrder(order)}
|
|
283
|
+
style={styles.cardButton}
|
|
284
|
+
activeOpacity={1}>
|
|
285
|
+
<Card key={order?.id}>
|
|
286
|
+
<Logo style={styles.logo}>
|
|
287
|
+
<OIcon
|
|
288
|
+
url={optimizeImage(order?.business?.logo, 'h_300,c_limit')}
|
|
289
|
+
src={!order?.business?.logo && theme?.images?.dummies?.businessLogo}
|
|
290
|
+
style={styles.icon}
|
|
291
|
+
/>
|
|
292
|
+
</Logo>
|
|
293
|
+
<Information>
|
|
294
|
+
<Header>
|
|
295
|
+
<OText numberOfLines={1} style={styles.title}>
|
|
296
|
+
{order?.business?.name}
|
|
297
|
+
</OText>
|
|
281
298
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
299
|
+
{order?.unread_count > 0 && (
|
|
300
|
+
<Badge>
|
|
301
|
+
<OText size={14} style={styles.badge}>
|
|
302
|
+
{order?.unread_count}
|
|
303
|
+
</OText>
|
|
304
|
+
</Badge>
|
|
305
|
+
)}
|
|
306
|
+
</Header>
|
|
290
307
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
308
|
+
<OText
|
|
309
|
+
style={styles.date}
|
|
310
|
+
numberOfLines={1}
|
|
311
|
+
adjustsFontSizeToFit
|
|
312
|
+
size={20}>
|
|
313
|
+
{t('INVOICE_ORDER_NO', 'Order No.') + order.id + ' · '}
|
|
314
|
+
{order?.delivery_datetime_utc
|
|
315
|
+
? parseDate(order?.delivery_datetime_utc)
|
|
316
|
+
: parseDate(order?.delivery_datetime, { utc: false })}
|
|
317
|
+
</OText>
|
|
301
318
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
319
|
+
<OText
|
|
320
|
+
style={styles.orderType}
|
|
321
|
+
mRight={5}
|
|
322
|
+
numberOfLines={1}
|
|
323
|
+
adjustsFontSizeToFit>
|
|
324
|
+
{getOrderStatus(order?.status)?.value}
|
|
325
|
+
</OText>
|
|
326
|
+
</Information>
|
|
327
|
+
</Card>
|
|
328
|
+
</TouchableOpacity>
|
|
329
|
+
)}
|
|
330
|
+
</>
|
|
331
|
+
)
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
return (
|
|
335
|
+
<>
|
|
336
|
+
<FlatList
|
|
337
|
+
data={orders}
|
|
338
|
+
renderItem={MessageComponent}
|
|
339
|
+
keyExtractor={(order) => order?.id}
|
|
340
|
+
showsVerticalScrollIndicator={false}
|
|
341
|
+
style={{ flex: 1 }}
|
|
342
|
+
refreshControl={<RefreshControl
|
|
343
|
+
refreshing={refreshing}
|
|
344
|
+
onRefresh={() => getOrders?.()}
|
|
345
|
+
/>}
|
|
346
|
+
ListFooterComponent={<FooterComponent
|
|
347
|
+
loading={loading}
|
|
348
|
+
reload={reload}
|
|
349
|
+
pagination={pagination}
|
|
350
|
+
tabsFilter={tabsFilter}
|
|
351
|
+
tabs={tabs}
|
|
352
|
+
loadMore={loadMore}
|
|
353
|
+
/>}
|
|
354
|
+
/>
|
|
313
355
|
</>
|
|
314
356
|
);
|
|
315
357
|
};
|