ordering-ui-react-native 0.18.55 → 0.18.56-crash-driver-1
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 -4
- package/src/components/BusinessInformation/index.tsx +10 -9
- package/src/components/PaymentOptionsWebView/index.tsx +30 -8
- package/src/components/PhoneInputNumber/index.tsx +6 -2
- package/src/components/StripeMethodForm/index.tsx +60 -55
- package/src/components/shared/OToast.tsx +3 -2
- package/src/types/index.tsx +3 -1
- package/src/utils/index.tsx +2 -2
- package/themes/business/index.tsx +6 -0
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +15 -8
- 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 +48 -19
- package/themes/business/src/components/DriverMap/index.tsx +36 -23
- 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 +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/LoginForm/index.tsx +2 -2
- package/themes/business/src/components/LogoutButton/index.tsx +1 -1
- package/themes/business/src/components/MapView/index.tsx +28 -17
- package/themes/business/src/components/MessagesOption/index.tsx +22 -94
- package/themes/business/src/components/NewOrderNotification/index.tsx +162 -106
- package/themes/business/src/components/NotFoundSource/index.tsx +2 -2
- package/themes/business/src/components/OrderDetails/Business.tsx +53 -3
- package/themes/business/src/components/OrderDetails/Delivery.tsx +209 -13
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +107 -75
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +79 -41
- package/themes/business/src/components/OrderDetails/usePrinterCommands.tsx +220 -0
- package/themes/business/src/components/OrderDetailsLogistic/index.tsx +7 -2
- package/themes/business/src/components/OrderMessage/index.tsx +1 -1
- package/themes/business/src/components/OrderSummary/index.tsx +245 -82
- 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/PhoneInputNumber/index.tsx +8 -5
- 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 +43 -41
- 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 +195 -221
- package/themes/business/src/components/PreviousOrders/styles.tsx +10 -0
- package/themes/business/src/components/PrinterEdition/index.tsx +363 -0
- package/themes/business/src/components/PrinterEdition/styles.tsx +61 -0
- package/themes/business/src/components/PrinterSettings/index.tsx +267 -0
- package/themes/business/src/components/PrinterSettings/styles.tsx +30 -0
- package/themes/business/src/components/ProductItemAccordion/index.tsx +2 -2
- package/themes/business/src/components/ReviewCustomer/index.tsx +1 -1
- 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 +4 -3
- package/themes/business/src/components/UserFormDetails/index.tsx +111 -107
- package/themes/business/src/components/UserProfileForm/index.tsx +103 -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 +21 -1
- package/themes/business/src/utils/index.tsx +5 -0
- package/themes/kiosk/src/components/Checkout/index.tsx +5 -3
- package/themes/kiosk/src/components/CustomerName/index.tsx +1 -1
- package/themes/kiosk/src/components/Intro/index.tsx +16 -1
- package/themes/kiosk/src/components/LoginForm/index.tsx +131 -101
- package/themes/kiosk/src/components/PaymentOptions/index.tsx +57 -121
- package/themes/original/index.tsx +11 -3
- package/themes/original/src/components/AddressDetails/index.tsx +20 -10
- package/themes/original/src/components/AddressForm/index.tsx +41 -20
- package/themes/original/src/components/AddressForm/styles.tsx +1 -1
- package/themes/original/src/components/AddressList/index.tsx +22 -11
- package/themes/original/src/components/AddressList/styles.tsx +4 -4
- package/themes/original/src/components/AnalyticsSegment/index.tsx +10 -7
- package/themes/original/src/components/AppleLogin/styles.tsx +3 -1
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +8 -11
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +1 -1
- package/themes/original/src/components/BusinessController/index.tsx +40 -43
- package/themes/original/src/components/BusinessController/styles.tsx +12 -12
- package/themes/original/src/components/BusinessInformation/index.tsx +45 -17
- 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 +57 -361
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +1 -1
- package/themes/original/src/components/BusinessPreorder/index.tsx +9 -7
- package/themes/original/src/components/BusinessProductsCategories/index.tsx +2 -3
- package/themes/original/src/components/BusinessProductsList/index.tsx +5 -4
- package/themes/original/src/components/BusinessProductsListing/index.tsx +67 -28
- 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 +2 -2
- package/themes/original/src/components/Cart/index.tsx +51 -40
- package/themes/original/src/components/CartContent/index.tsx +98 -54
- package/themes/original/src/components/CartStoresListing/styles.tsx +2 -2
- package/themes/original/src/components/Checkout/index.tsx +308 -75
- 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/DriverTips/index.tsx +6 -3
- package/themes/original/src/components/FacebookLogin/styles.tsx +3 -1
- package/themes/original/src/components/Favorite/index.tsx +8 -4
- 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 +7 -5
- 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 +84 -8
- 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/GoogleLogin/styles.tsx +1 -1
- package/themes/original/src/components/GoogleMap/index.tsx +52 -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 +1 -1
- package/themes/original/src/components/HighestRatedBusinesses/styles.tsx +1 -1
- package/themes/original/src/components/Home/index.tsx +3 -2
- 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 +79 -25
- package/themes/original/src/components/LoginForm/index.tsx +38 -14
- package/themes/original/src/components/MessageListing/index.tsx +6 -0
- package/themes/original/src/components/Messages/index.tsx +9 -3
- package/themes/original/src/components/Messages/styles.tsx +1 -1
- package/themes/original/src/components/MomentOption/index.tsx +20 -5
- 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 +48 -15
- package/themes/original/src/components/MultiCheckout/index.tsx +295 -56
- package/themes/original/src/components/MultiCheckout/styles.tsx +20 -1
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +21 -16
- package/themes/original/src/components/MyOrders/index.tsx +37 -39
- package/themes/original/src/components/NavBar/index.tsx +15 -14
- 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/OrderEta.tsx +21 -6
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +14 -5
- package/themes/original/src/components/OrderDetails/index.tsx +718 -667
- package/themes/original/src/components/OrderDetails/styles.tsx +24 -7
- package/themes/original/src/components/OrderProgress/index.tsx +50 -14
- package/themes/original/src/components/OrderProgress/styles.tsx +1 -1
- package/themes/original/src/components/OrderSummary/index.tsx +26 -34
- package/themes/original/src/components/OrderTypeSelector/index.tsx +5 -0
- 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 +14 -6
- 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 +182 -0
- package/themes/original/src/components/PaymentOptionStripe/styles.tsx +3 -0
- package/themes/original/src/components/PaymentOptions/index.tsx +118 -37
- package/themes/original/src/components/PhoneInputNumber/index.tsx +15 -1
- 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 +193 -267
- package/themes/original/src/components/ProductForm/styles.tsx +1 -1
- package/themes/original/src/components/ProductItemAccordion/index.tsx +55 -42
- package/themes/original/src/components/ProductItemAccordion/styles.tsx +3 -4
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +120 -79
- 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 +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/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/Sessions/index.tsx +5 -0
- package/themes/original/src/components/SignupForm/index.tsx +76 -60
- package/themes/original/src/components/SingleOrderCard/index.tsx +6 -5
- package/themes/original/src/components/SingleProductCard/index.tsx +5 -4
- package/themes/original/src/components/SingleProductCard/styles.tsx +0 -5
- package/themes/original/src/components/StripeCardsList/index.tsx +26 -8
- package/themes/original/src/components/StripeElementsForm/index.tsx +80 -62
- package/themes/original/src/components/StripeElementsForm/naked.tsx +59 -1
- package/themes/original/src/components/UpsellingProducts/UpsellingContent.tsx +170 -0
- package/themes/original/src/components/UpsellingProducts/UpsellingLayout.tsx +91 -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 +128 -79
- package/themes/original/src/components/UserFormDetails/styles.tsx +8 -1
- package/themes/original/src/components/UserProfile/index.tsx +5 -4
- package/themes/original/src/components/UserProfileForm/index.tsx +35 -36
- 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/styles.tsx +1 -0
- package/themes/original/src/components/Wallets/index.tsx +35 -49
- package/themes/original/src/components/Wallets/styles.tsx +3 -4
- 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 +7 -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 +13 -2
- package/themes/original/src/utils/index.tsx +124 -22
- 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
|
@@ -2,13 +2,14 @@ import React, { useState, useEffect } from 'react'
|
|
|
2
2
|
import { useLanguage } from 'ordering-components/native';
|
|
3
3
|
import { View, StyleSheet, RefreshControl, Platform } from 'react-native';
|
|
4
4
|
import AntDesignIcon from 'react-native-vector-icons/AntDesign'
|
|
5
|
-
|
|
5
|
+
import { GiftCardOrdersList } from '../GiftCard/GiftCardOrdersList'
|
|
6
6
|
import { OrdersOption } from '../OrdersOption'
|
|
7
7
|
import { HeaderTitle, OButton, OText } from '../shared'
|
|
8
8
|
import { ScrollView } from 'react-native-gesture-handler';
|
|
9
9
|
import { Tab } from './styles'
|
|
10
10
|
import { useTheme } from 'styled-components/native';
|
|
11
11
|
import { Container } from '../../layouts/Container';
|
|
12
|
+
import NavBar from '../NavBar'
|
|
12
13
|
|
|
13
14
|
export const MyOrders = (props: any) => {
|
|
14
15
|
const {
|
|
@@ -40,7 +41,8 @@ export const MyOrders = (props: any) => {
|
|
|
40
41
|
const MyOrdersMenu = [
|
|
41
42
|
{ key: 'orders', value: t('ORDERS', 'Orders'), disabled: false },
|
|
42
43
|
{ key: 'business', value: t('BUSINESS', 'Business'), disabled: hideBusinessTab },
|
|
43
|
-
{ key: 'products', value: t('PRODUCTS', 'Products'), disabled: hideProductsTab }
|
|
44
|
+
{ key: 'products', value: t('PRODUCTS', 'Products'), disabled: hideProductsTab },
|
|
45
|
+
{ key: 'giftCards', value: t('GIFT_CARD', 'Gift card'), disabled: false }
|
|
44
46
|
]
|
|
45
47
|
const goToBack = () => navigation?.canGoBack() && navigation.goBack()
|
|
46
48
|
|
|
@@ -87,34 +89,25 @@ export const MyOrders = (props: any) => {
|
|
|
87
89
|
display: 'flex',
|
|
88
90
|
flexDirection: 'row',
|
|
89
91
|
alignItems: 'center',
|
|
90
|
-
paddingHorizontal:
|
|
92
|
+
paddingHorizontal: 20,
|
|
91
93
|
},
|
|
92
94
|
...props.titleStyle
|
|
93
95
|
}}>
|
|
94
96
|
{!props.hideBackBtn && (!isChewLayout || (isChewLayout && hideOrdersTheme)) && (
|
|
95
|
-
<
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
paddingRight: 0,
|
|
107
|
-
marginTop: 30,
|
|
108
|
-
}}
|
|
109
|
-
onClick={goToBack}
|
|
110
|
-
icon={AntDesignIcon}
|
|
111
|
-
iconProps={{
|
|
112
|
-
name: 'arrowleft',
|
|
113
|
-
size: 26
|
|
97
|
+
<NavBar
|
|
98
|
+
title={t('MY_ORDERS', 'My Orders')}
|
|
99
|
+
titleAlign={'center'}
|
|
100
|
+
onActionLeft={goToBack}
|
|
101
|
+
showCall={false}
|
|
102
|
+
paddingTop={30}
|
|
103
|
+
btnStyle={{ paddingLeft: 0 }}
|
|
104
|
+
buttonProps={{
|
|
105
|
+
bgColor: theme.colors.white,
|
|
106
|
+
borderColor: theme.colors.white,
|
|
107
|
+
textStyle: { color: theme.colors.btnFont }
|
|
114
108
|
}}
|
|
115
109
|
/>
|
|
116
110
|
)}
|
|
117
|
-
<HeaderTitle ph={10} text={t('MY_ORDERS', 'My Orders')} />
|
|
118
111
|
</View>
|
|
119
112
|
)}
|
|
120
113
|
{!hideOrders && !isChewLayout && !showNavbar && (
|
|
@@ -124,7 +117,7 @@ export const MyOrders = (props: any) => {
|
|
|
124
117
|
<ScrollView
|
|
125
118
|
horizontal
|
|
126
119
|
style={{ ...styles.container, borderBottomWidth: 1 }}
|
|
127
|
-
contentContainerStyle={{ paddingHorizontal: !!businessesSearchList ? 0 :
|
|
120
|
+
contentContainerStyle={{ paddingHorizontal: !!businessesSearchList ? 0 : 20 }}
|
|
128
121
|
showsHorizontalScrollIndicator={false}
|
|
129
122
|
scrollEventThrottle={16}
|
|
130
123
|
>
|
|
@@ -148,19 +141,17 @@ export const MyOrders = (props: any) => {
|
|
|
148
141
|
)}
|
|
149
142
|
{selectedOption === 'orders' && (
|
|
150
143
|
<>
|
|
151
|
-
{
|
|
152
|
-
<
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
)}
|
|
163
|
-
<View style={{ paddingHorizontal: isChewLayout ? 20 : 40 }}>
|
|
144
|
+
<View style={{ paddingHorizontal: 20 }}>
|
|
145
|
+
<OrdersOption
|
|
146
|
+
{...props}
|
|
147
|
+
preOrders
|
|
148
|
+
ordersLength={ordersLength}
|
|
149
|
+
setOrdersLength={setOrdersLength}
|
|
150
|
+
setRefreshOrders={setRefreshOrders}
|
|
151
|
+
refreshOrders={refreshOrders}
|
|
152
|
+
/>
|
|
153
|
+
</View>
|
|
154
|
+
<View style={{ paddingHorizontal: 20 }}>
|
|
164
155
|
<OrdersOption
|
|
165
156
|
{...props}
|
|
166
157
|
activeOrders
|
|
@@ -170,7 +161,7 @@ export const MyOrders = (props: any) => {
|
|
|
170
161
|
refreshOrders={refreshOrders}
|
|
171
162
|
/>
|
|
172
163
|
</View>
|
|
173
|
-
<View style={{ paddingHorizontal:
|
|
164
|
+
<View style={{ paddingHorizontal: 20 }}>
|
|
174
165
|
<OrdersOption
|
|
175
166
|
{...props}
|
|
176
167
|
ordersLength={ordersLength}
|
|
@@ -217,7 +208,14 @@ export const MyOrders = (props: any) => {
|
|
|
217
208
|
setOrdersLength={setOrdersLength}
|
|
218
209
|
/>
|
|
219
210
|
)}
|
|
220
|
-
</Container>
|
|
221
211
|
|
|
212
|
+
{selectedOption === 'giftCards' && (
|
|
213
|
+
<View style={{ paddingHorizontal: 20 }}>
|
|
214
|
+
<GiftCardOrdersList
|
|
215
|
+
onNavigationRedirect={props?.onNavigationRedirect}
|
|
216
|
+
/>
|
|
217
|
+
</View>
|
|
218
|
+
)}
|
|
219
|
+
</Container>
|
|
222
220
|
)
|
|
223
221
|
}
|
|
@@ -9,7 +9,6 @@ const TitleWrapper = styled.View`
|
|
|
9
9
|
padding-horizontal: 10px;
|
|
10
10
|
`
|
|
11
11
|
const TitleTopWrapper = styled.View`
|
|
12
|
-
flex: 1;
|
|
13
12
|
flex-direction: row;
|
|
14
13
|
align-items: center;
|
|
15
14
|
`
|
|
@@ -44,6 +43,8 @@ interface Props {
|
|
|
44
43
|
paddingTop?: number,
|
|
45
44
|
isVertical?: boolean,
|
|
46
45
|
noMargin?: any
|
|
46
|
+
hideArrowLeft?: boolean
|
|
47
|
+
buttonProps?: any
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
const NavBar = (props: Props) => {
|
|
@@ -54,8 +55,6 @@ const NavBar = (props: Props) => {
|
|
|
54
55
|
background-color: ${theme.colors.white};
|
|
55
56
|
padding: 10px 20px 20px 0px;
|
|
56
57
|
flex-direction: row;
|
|
57
|
-
justify-content: center;
|
|
58
|
-
align-items: center;
|
|
59
58
|
position: relative;
|
|
60
59
|
`
|
|
61
60
|
|
|
@@ -64,16 +63,19 @@ const NavBar = (props: Props) => {
|
|
|
64
63
|
}
|
|
65
64
|
return (
|
|
66
65
|
<Wrapper style={{ paddingTop: props.paddingTop, ...{ flexDirection: props.isVertical ? 'column' : 'row', alignItems: props.isVertical ? 'flex-start' : 'center' }, ...props.style }}>
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
66
|
+
{!props.hideArrowLeft && (
|
|
67
|
+
<OButton
|
|
68
|
+
{...props.buttonProps}
|
|
69
|
+
iconProps={{
|
|
70
|
+
name: 'arrowleft',
|
|
71
|
+
size: 26
|
|
72
|
+
}}
|
|
73
|
+
icon={AntDesignIcon}
|
|
74
|
+
imgRightSrc={null}
|
|
75
|
+
style={{ ...btnBackArrow, ...props.btnStyle, ...props.isVertical ? (I18nManager.isRTL ? { paddingRight: 0 } : { paddingLeft: 0 }) : {} }}
|
|
76
|
+
onClick={props?.onActionLeft}
|
|
77
|
+
/>
|
|
78
|
+
)}
|
|
77
79
|
<TitleTopWrapper>
|
|
78
80
|
{props.withIcon
|
|
79
81
|
? (
|
|
@@ -92,7 +94,6 @@ const NavBar = (props: Props) => {
|
|
|
92
94
|
<TitleWrapper style={{ ...{ paddingHorizontal: props.isVertical ? 0 : 10 }, ...props.titleWrapStyle }}>
|
|
93
95
|
<OText
|
|
94
96
|
size={20}
|
|
95
|
-
lineHeight={36}
|
|
96
97
|
weight={Platform.OS === 'ios' ? '600' : 'bold'}
|
|
97
98
|
style={
|
|
98
99
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { useLanguage
|
|
2
|
+
import { useLanguage } from 'ordering-components/native'
|
|
3
3
|
import { Dimensions } from 'react-native'
|
|
4
4
|
import RNRestart from 'react-native-restart'
|
|
5
5
|
import { OText, OIcon, OButton } from '../shared'
|
|
@@ -16,8 +16,7 @@ export const NetworkError = (props: NoNetworkParams) => {
|
|
|
16
16
|
} = props
|
|
17
17
|
const theme = useTheme()
|
|
18
18
|
const [, t] = useLanguage()
|
|
19
|
-
const
|
|
20
|
-
const urlimage = orderingTheme?.theme?.no_internet?.components?.image
|
|
19
|
+
const urlimage = theme?.no_internet?.components?.image
|
|
21
20
|
const noNetworkImage = image || theme.images.general.noNetwork
|
|
22
21
|
const deviceWidth = Dimensions.get('screen').width
|
|
23
22
|
|
|
@@ -2,10 +2,10 @@ import styled from 'styled-components/native'
|
|
|
2
2
|
|
|
3
3
|
export const Container = styled.View`
|
|
4
4
|
flex: 1;
|
|
5
|
-
padding: 20px
|
|
5
|
+
padding: 20px;
|
|
6
6
|
`
|
|
7
7
|
export const ImageContainer = styled.View`
|
|
8
8
|
flex: 1;
|
|
9
9
|
align-items: center;
|
|
10
10
|
justify-content: center;
|
|
11
|
-
`
|
|
11
|
+
`
|
|
@@ -3,7 +3,6 @@ import {
|
|
|
3
3
|
UserFormDetails as NotificationsController,
|
|
4
4
|
useLanguage,
|
|
5
5
|
useSession,
|
|
6
|
-
useOrderingTheme,
|
|
7
6
|
useToast,
|
|
8
7
|
ToastType,
|
|
9
8
|
} from 'ordering-components/native'
|
|
@@ -28,7 +27,6 @@ const NotificationsUI = (props: any) => {
|
|
|
28
27
|
const [{ user: userSession }] = useSession()
|
|
29
28
|
const [, t] = useLanguage();
|
|
30
29
|
const [, { showToast }] = useToast();
|
|
31
|
-
const [orderingTheme] = useOrderingTheme()
|
|
32
30
|
|
|
33
31
|
const user = userData || userSession
|
|
34
32
|
|
|
@@ -45,8 +43,8 @@ const NotificationsUI = (props: any) => {
|
|
|
45
43
|
})
|
|
46
44
|
|
|
47
45
|
const goToBack = () => navigation?.canGoBack() && navigation.goBack()
|
|
48
|
-
const showCustomerPromotions = !
|
|
49
|
-
const showNotifications = !
|
|
46
|
+
const showCustomerPromotions = !theme?.profile?.components?.promotions?.hidden
|
|
47
|
+
const showNotifications = !theme?.profile?.components?.notification_settings?.hidden
|
|
50
48
|
|
|
51
49
|
const handleEditNotifications = (key: any, value: any) => {
|
|
52
50
|
setNotificationsList({
|
|
@@ -75,10 +73,13 @@ const NotificationsUI = (props: any) => {
|
|
|
75
73
|
titleAlign={'center'}
|
|
76
74
|
onActionLeft={goToBack}
|
|
77
75
|
showCall={false}
|
|
78
|
-
style={{
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
76
|
+
style={{ paddingVertical: 0 }}
|
|
77
|
+
btnStyle={{ paddingLeft: 0 }}
|
|
78
|
+
buttonProps={{
|
|
79
|
+
bgColor: theme.colors.white,
|
|
80
|
+
borderColor: theme.colors.white,
|
|
81
|
+
textStyle: { color: theme.colors.btnFont }
|
|
82
|
+
}}
|
|
82
83
|
/>
|
|
83
84
|
{showCustomerPromotions && showNotifications && (
|
|
84
85
|
<>
|
|
@@ -12,14 +12,31 @@ export const OrderEta = (props: any) => {
|
|
|
12
12
|
const [estimatedDeliveryTime, setEstimatedDeliveryTime] = useState(null)
|
|
13
13
|
|
|
14
14
|
const getEstimatedDeliveryTime = () => {
|
|
15
|
-
let
|
|
15
|
+
let estimatedUtcTime = null
|
|
16
16
|
let totalEta = 0
|
|
17
|
+
if (order?.delivered_in) totalEta += order?.delivered_in
|
|
18
|
+
if (order?.prepared_in) totalEta += order?.prepared_in
|
|
19
|
+
if (order?.delivery_type === 1 && order?.eta_drive_time) {
|
|
20
|
+
totalEta += order?.eta_drive_time
|
|
21
|
+
}
|
|
22
|
+
|
|
17
23
|
const _delivery = order?.delivery_datetime_utc
|
|
18
24
|
? order?.delivery_datetime_utc
|
|
19
25
|
: order?.delivery_datetime
|
|
26
|
+
|
|
20
27
|
if (order?.eta_current_status_time) {
|
|
21
28
|
const currentStatueEta = order?.eta_current_status_time
|
|
22
29
|
totalEta += currentStatueEta
|
|
30
|
+
let previousStatusTimes = 0
|
|
31
|
+
if (order?.eta_previous_status_times) {
|
|
32
|
+
Object.keys(order.eta_previous_status_times).map(key => {
|
|
33
|
+
if (!key.includes('status_penalty')) {
|
|
34
|
+
previousStatusTimes += order.eta_previous_status_times[key]
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
totalEta += previousStatusTimes
|
|
39
|
+
|
|
23
40
|
let nextStatusTimes = 0
|
|
24
41
|
if (order?.eta_next_status_times) {
|
|
25
42
|
Object.keys(order.eta_next_status_times).map(key => {
|
|
@@ -28,7 +45,6 @@ export const OrderEta = (props: any) => {
|
|
|
28
45
|
}
|
|
29
46
|
})
|
|
30
47
|
}
|
|
31
|
-
|
|
32
48
|
totalEta += nextStatusTimes
|
|
33
49
|
|
|
34
50
|
const diffTimeAsSeconds = moment.utc(order?.reporting_data?.at[`status:${order.status}`]).add(order?.eta_current_status_time, 'minutes').diff(moment().utc(), 'seconds')
|
|
@@ -36,12 +52,11 @@ export const OrderEta = (props: any) => {
|
|
|
36
52
|
if (diffTimeAsMinutes <= 0) {
|
|
37
53
|
totalEta += (Math.floor(Math.abs(diffTimeAsMinutes / order?.eta_current_status_time) + 1) * order?.eta_current_status_penalty_time)
|
|
38
54
|
}
|
|
39
|
-
_estimatedTime = moment.utc(_delivery).add(totalEta, 'minutes')
|
|
40
55
|
} else {
|
|
41
|
-
|
|
56
|
+
totalEta = order?.eta_time + totalEta
|
|
42
57
|
}
|
|
43
|
-
|
|
44
|
-
_estimatedTime = outputFormat ? moment(
|
|
58
|
+
estimatedUtcTime = moment.utc(_delivery).add(totalEta, 'minutes')
|
|
59
|
+
const _estimatedTime = outputFormat ? moment(estimatedUtcTime).local().format(outputFormat) : parseDate(estimatedUtcTime, { utc: false })
|
|
45
60
|
setEstimatedDeliveryTime(_estimatedTime)
|
|
46
61
|
}
|
|
47
62
|
|
|
@@ -33,7 +33,7 @@ export const OrderHistory = (props: any) => {
|
|
|
33
33
|
paddingVertical: 16
|
|
34
34
|
},
|
|
35
35
|
container: {
|
|
36
|
-
paddingHorizontal:
|
|
36
|
+
paddingHorizontal: 20,
|
|
37
37
|
paddingVertical: 15
|
|
38
38
|
}
|
|
39
39
|
});
|
|
@@ -107,8 +107,12 @@ export const OrderHistory = (props: any) => {
|
|
|
107
107
|
ellipsizeMode='tail'
|
|
108
108
|
>
|
|
109
109
|
{t('ORDER_PLACED', 'Order placed')} {' '}
|
|
110
|
-
{
|
|
111
|
-
|
|
110
|
+
{!props.hideViaText && (
|
|
111
|
+
<>
|
|
112
|
+
{t('VIA', 'Via')}{' '}
|
|
113
|
+
{order.app_id ? t(order.app_id.toUpperCase(), order.app_id) : t('OTHER', 'Other')}
|
|
114
|
+
</>
|
|
115
|
+
)}
|
|
112
116
|
</OText>
|
|
113
117
|
<OText size={12}>{parseDate(order?.created_at, { outputFormat: 'MMM DD, hh:mm A' })}</OText>
|
|
114
118
|
</View>
|
|
@@ -129,7 +133,7 @@ export const OrderHistory = (props: any) => {
|
|
|
129
133
|
<OText
|
|
130
134
|
size={14}
|
|
131
135
|
weight='bold'
|
|
132
|
-
numberOfLines={message.change?.attribute
|
|
136
|
+
numberOfLines={message.change?.attribute.includes(['delivered_in', 'prepared_in']) ? 2 : 1}
|
|
133
137
|
ellipsizeMode='tail'
|
|
134
138
|
>
|
|
135
139
|
{message.change?.attribute === 'logistic_status'
|
|
@@ -140,7 +144,12 @@ export const OrderHistory = (props: any) => {
|
|
|
140
144
|
{formatSeconds(parseInt(message.change.new, 10))}
|
|
141
145
|
</>
|
|
142
146
|
)
|
|
143
|
-
:
|
|
147
|
+
: message.change?.attribute === 'prepared_in' ? (
|
|
148
|
+
<>
|
|
149
|
+
{t('TIME_ADDED_BY_BUSINESS', 'Time added by business')}{'\n'}
|
|
150
|
+
{formatSeconds(parseInt(message.change.new, 10))}
|
|
151
|
+
</>
|
|
152
|
+
) : t(ORDER_STATUS[parseInt(message.change.new, 10)])
|
|
144
153
|
}
|
|
145
154
|
</OText>
|
|
146
155
|
) : (
|