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
|
@@ -5,12 +5,11 @@ export const OrderDetailsContainer = styled.ScrollView`
|
|
|
5
5
|
`
|
|
6
6
|
|
|
7
7
|
export const NavBack = styled.TouchableOpacity`
|
|
8
|
-
|
|
9
8
|
`
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
export const Header = styled.View`
|
|
13
|
-
padding: 10px
|
|
12
|
+
padding: 10px 20px;
|
|
14
13
|
flex: 1;
|
|
15
14
|
`
|
|
16
15
|
|
|
@@ -24,7 +23,7 @@ export const OrderContent = styled.View`
|
|
|
24
23
|
export const OrderBusiness = styled.View`
|
|
25
24
|
position: relative;
|
|
26
25
|
padding-vertical: 10px;
|
|
27
|
-
padding-horizontal:
|
|
26
|
+
padding-horizontal: 20px;
|
|
28
27
|
background-color: ${(props: any) => props.theme.colors.white};
|
|
29
28
|
align-items: flex-start;
|
|
30
29
|
`
|
|
@@ -64,7 +63,7 @@ export const SectionTitle = styled.View`
|
|
|
64
63
|
`
|
|
65
64
|
|
|
66
65
|
export const OrderCustomer = styled.View`
|
|
67
|
-
padding: 20px
|
|
66
|
+
padding: 20px 20px 10px;
|
|
68
67
|
background-color: ${(props: any) => props.theme.colors.white};
|
|
69
68
|
`
|
|
70
69
|
|
|
@@ -86,7 +85,7 @@ export const InfoBlock = styled.View`
|
|
|
86
85
|
export const HeaderInfo = styled.View`
|
|
87
86
|
flex: 1;
|
|
88
87
|
background-color: ${(props: any) => props.theme.colors.backgroundGray100};
|
|
89
|
-
padding: 20px
|
|
88
|
+
padding: 20px 20px;
|
|
90
89
|
`
|
|
91
90
|
|
|
92
91
|
export const OrderProducts = styled(OrderCustomer)``
|
|
@@ -100,7 +99,7 @@ export const Table = styled.View`
|
|
|
100
99
|
`
|
|
101
100
|
|
|
102
101
|
export const OrderBill = styled.View`
|
|
103
|
-
padding-horizontal:
|
|
102
|
+
padding-horizontal: 20px;
|
|
104
103
|
padding-vertical: 10px;
|
|
105
104
|
flex: 1;
|
|
106
105
|
background-color: ${(props: any) => props.theme.colors.white};
|
|
@@ -130,7 +129,7 @@ export const OrderAction = styled.View`
|
|
|
130
129
|
`
|
|
131
130
|
|
|
132
131
|
export const PlaceSpotWrapper = styled.View`
|
|
133
|
-
padding-horizontal:
|
|
132
|
+
padding-horizontal: 20px;
|
|
134
133
|
`
|
|
135
134
|
|
|
136
135
|
export const ProfessionalPhoto = styled.ImageBackground`
|
|
@@ -141,4 +140,21 @@ export const ProfessionalPhoto = styled.ImageBackground`
|
|
|
141
140
|
width: 80px;
|
|
142
141
|
resize-mode: cover;
|
|
143
142
|
margin-right: 10px;
|
|
144
|
-
`;
|
|
143
|
+
`;
|
|
144
|
+
|
|
145
|
+
export const TopActions = styled.TouchableOpacity`
|
|
146
|
+
height: 60px;
|
|
147
|
+
justify-content: center;
|
|
148
|
+
min-width: 30px;
|
|
149
|
+
padding-right: 15px;
|
|
150
|
+
`;
|
|
151
|
+
|
|
152
|
+
export const TopHeader = styled.View`
|
|
153
|
+
width: 100%;
|
|
154
|
+
flex-direction: row;
|
|
155
|
+
align-items: center;
|
|
156
|
+
justify-content: space-between;
|
|
157
|
+
z-index: 1;
|
|
158
|
+
height: 60px;
|
|
159
|
+
min-height: 60px;
|
|
160
|
+
`
|
|
@@ -20,7 +20,8 @@ export const OrderItAgain = (props: OrderItAgainParams) => {
|
|
|
20
20
|
currentCart,
|
|
21
21
|
handleUpdateProducts,
|
|
22
22
|
navigation,
|
|
23
|
-
searchValue
|
|
23
|
+
searchValue,
|
|
24
|
+
businessSingleId
|
|
24
25
|
} = props
|
|
25
26
|
|
|
26
27
|
const [, t] = useLanguage()
|
|
@@ -65,6 +66,7 @@ export const OrderItAgain = (props: OrderItAgainParams) => {
|
|
|
65
66
|
handleUpdateProducts={handleUpdateProducts}
|
|
66
67
|
navigation={navigation}
|
|
67
68
|
isPreviously
|
|
69
|
+
businessSingleId={businessSingleId}
|
|
68
70
|
/>
|
|
69
71
|
</ProductWrapper>
|
|
70
72
|
))}
|
|
@@ -2,7 +2,8 @@ import React, { useEffect, useState } from 'react'
|
|
|
2
2
|
import {
|
|
3
3
|
OrderList,
|
|
4
4
|
useLanguage,
|
|
5
|
-
useUtils
|
|
5
|
+
useUtils,
|
|
6
|
+
useConfig
|
|
6
7
|
} from 'ordering-components/native'
|
|
7
8
|
import { useTheme } from 'styled-components/native';
|
|
8
9
|
import IconAntDesign from 'react-native-vector-icons/AntDesign'
|
|
@@ -12,6 +13,7 @@ import { NotFoundSource } from '../NotFoundSource'
|
|
|
12
13
|
import { View, StyleSheet, TouchableOpacity, Platform } from 'react-native'
|
|
13
14
|
import { Placeholder, Fade, PlaceholderLine } from "rn-placeholder";
|
|
14
15
|
import FastImage from 'react-native-fast-image'
|
|
16
|
+
import { OrderEta } from '../OrderDetails/OrderEta'
|
|
15
17
|
import {
|
|
16
18
|
ProgressContentWrapper,
|
|
17
19
|
ProgressBar,
|
|
@@ -20,7 +22,7 @@ import {
|
|
|
20
22
|
OrderInfoWrapper,
|
|
21
23
|
OrderProgressWrapper
|
|
22
24
|
} from './styles'
|
|
23
|
-
import { getOrderStatus } from '../../utils'
|
|
25
|
+
import { getOrderStatuPickUp, getOrderStatus } from '../../utils'
|
|
24
26
|
|
|
25
27
|
const OrderProgressUI = (props: any) => {
|
|
26
28
|
const {
|
|
@@ -33,10 +35,12 @@ const OrderProgressUI = (props: any) => {
|
|
|
33
35
|
const theme = useTheme();
|
|
34
36
|
|
|
35
37
|
const [, t] = useLanguage()
|
|
36
|
-
const [{ optimizeImage,
|
|
38
|
+
const [{ optimizeImage, parseTime, parseDate }] = useUtils()
|
|
39
|
+
const [{ configs }] = useConfig()
|
|
37
40
|
const [lastOrder, setLastOrder] = useState<any>(null)
|
|
38
41
|
const imageFails = theme.images.general.emptyActiveOrders
|
|
39
42
|
const [initialLoaded, setInitialLoaded] = useState(false)
|
|
43
|
+
const statusToShow = [0, 3, 4, 7, 8, 9, 13, 14, 18, 19, 20, 21, 22, 23]
|
|
40
44
|
|
|
41
45
|
const styles = StyleSheet.create({
|
|
42
46
|
main: {
|
|
@@ -76,15 +80,6 @@ const OrderProgressUI = (props: any) => {
|
|
|
76
80
|
}
|
|
77
81
|
});
|
|
78
82
|
|
|
79
|
-
const convertDiffToHours = (order: any) => {
|
|
80
|
-
const minute = order?.eta_time
|
|
81
|
-
const deliveryTime = order?.delivery_datetime_utc
|
|
82
|
-
? parseDate(order?.delivery_datetime_utc, { outputFormat: 'YYYY-MM-DD HH:mm' })
|
|
83
|
-
: parseDate(order?.delivery_datetime, { utc: false, outputFormat: 'YYYY-MM-DD HH:mm' })
|
|
84
|
-
const returnedDate = moment(deliveryTime).add(minute, 'minutes').format('hh:mm A')
|
|
85
|
-
return returnedDate
|
|
86
|
-
}
|
|
87
|
-
|
|
88
83
|
const handleGoToOrder = (index: string) => {
|
|
89
84
|
navigation && navigation.navigate(index)
|
|
90
85
|
}
|
|
@@ -92,7 +87,15 @@ const OrderProgressUI = (props: any) => {
|
|
|
92
87
|
useEffect(() => {
|
|
93
88
|
if (orderList?.orders.length > 0) {
|
|
94
89
|
const sortedOrders = orderList.orders.sort((a: any, b: any) => a.id > b.id ? -1 : 1)
|
|
95
|
-
|
|
90
|
+
const orderInProgress = sortedOrders.find((order: any) => (statusToShow.includes(order.status)))
|
|
91
|
+
|
|
92
|
+
let _lastOrder = null
|
|
93
|
+
if (orderInProgress) {
|
|
94
|
+
_lastOrder = orderInProgress
|
|
95
|
+
} else {
|
|
96
|
+
_lastOrder = sortedOrders[0]
|
|
97
|
+
}
|
|
98
|
+
setLastOrder(_lastOrder)
|
|
96
99
|
}
|
|
97
100
|
}, [orderList?.orders])
|
|
98
101
|
|
|
@@ -107,6 +110,8 @@ const OrderProgressUI = (props: any) => {
|
|
|
107
110
|
setInitialLoaded(true)
|
|
108
111
|
}, [orderList.loading, initialLoaded])
|
|
109
112
|
|
|
113
|
+
const progressBarObjt = lastOrder?.delivery_type && lastOrder?.delivery_type === 2 ? getOrderStatuPickUp : getOrderStatus
|
|
114
|
+
|
|
110
115
|
return (
|
|
111
116
|
<>
|
|
112
117
|
{(orderList?.loading && !initialLoaded) && (
|
|
@@ -125,11 +130,11 @@ const OrderProgressUI = (props: any) => {
|
|
|
125
130
|
<View style={styles.logoWrapper}>
|
|
126
131
|
<FastImage
|
|
127
132
|
style={{ width: 50, height: 50 }}
|
|
128
|
-
source={{
|
|
133
|
+
source={orderList?.orders.length === 1 ? {
|
|
129
134
|
uri: optimizeImage(lastOrder?.business?.logo, 'h_50,c_limit'),
|
|
130
135
|
priority: FastImage.priority.normal,
|
|
131
|
-
}}
|
|
132
|
-
resizeMode={FastImage.resizeMode.
|
|
136
|
+
} : theme.images.logos.logotype}
|
|
137
|
+
resizeMode={FastImage.resizeMode.contain}
|
|
133
138
|
/>
|
|
134
139
|
</View>
|
|
135
140
|
<View style={{
|
|
@@ -143,8 +148,7 @@ const OrderProgressUI = (props: any) => {
|
|
|
143
148
|
fontWeight: 'bold',
|
|
144
149
|
marginBottom: 3
|
|
145
150
|
}}
|
|
146
|
-
>{t('ORDER_IN_PROGRESS', 'Order in progress')}</OText>
|
|
147
|
-
<OText size={11} numberOfLines={1} ellipsizeMode='tail'>{t('RESTAURANT_PREPARING_YOUR_ORDER', 'The restaurant is preparing your order')}</OText>
|
|
151
|
+
>{statusToShow.includes(lastOrder?.status) ? t('ORDER_IN_PROGRESS', 'Order in progress') : t('ORDER', 'Order')}</OText>
|
|
148
152
|
<TouchableOpacity onPress={() => handleGoToOrder('MyOrders')}>
|
|
149
153
|
<View style={styles.navigationButton}>
|
|
150
154
|
<OText size={11} color={theme.colors.primary}>{t('GO_TO_MY_ORDERS', 'Go to my orders')}</OText>
|
|
@@ -160,18 +164,22 @@ const OrderProgressUI = (props: any) => {
|
|
|
160
164
|
</OrderInfoWrapper>
|
|
161
165
|
<View style={{ flex: 1 }}>
|
|
162
166
|
<ProgressContentWrapper>
|
|
163
|
-
<ProgressBar style={{ width:
|
|
167
|
+
<ProgressBar style={{ width: progressBarObjt(lastOrder.status)?.percentage ? `${(progressBarObjt(lastOrder.status) as any).percentage * 100}%` : '0%' }} />
|
|
164
168
|
</ProgressContentWrapper>
|
|
165
169
|
<ProgressTextWrapper>
|
|
166
|
-
<OText size={12} style={{ width: '50%' }}>{
|
|
170
|
+
<OText size={12} style={{ width: '50%' }}>{progressBarObjt(lastOrder.status)?.value}</OText>
|
|
167
171
|
<TimeWrapper>
|
|
168
|
-
<OText size={11}>{t('ESTIMATED_DELIVERY', 'Estimated delivery')}</OText>
|
|
172
|
+
<OText size={11}>{lastOrder?.delivery_type === 1 ? t('ESTIMATED_DELIVERY', 'Estimated delivery') : t('ESTIMATED_TIME', 'Estimated time')}</OText>
|
|
169
173
|
<OText size={11}>
|
|
170
174
|
{lastOrder?.delivery_datetime_utc
|
|
171
|
-
? parseTime(lastOrder?.delivery_datetime_utc, { outputFormat: '
|
|
175
|
+
? parseTime(lastOrder?.delivery_datetime_utc, { outputFormat: configs?.general_hour_format?.value || 'HH:mm' })
|
|
172
176
|
: parseTime(lastOrder?.delivery_datetime, { utc: false })}
|
|
173
177
|
-
|
|
174
|
-
{
|
|
178
|
+
{statusToShow.includes(lastOrder?.status) ? (
|
|
179
|
+
<OrderEta order={lastOrder} outputFormat={configs?.general_hour_format?.value || 'HH:mm'} />
|
|
180
|
+
) : (
|
|
181
|
+
parseDate(lastOrder?.reporting_data?.at[`status:${lastOrder.status}`], { outputFormat: configs?.general_hour_format?.value })
|
|
182
|
+
)}
|
|
175
183
|
</OText>
|
|
176
184
|
</TimeWrapper>
|
|
177
185
|
</ProgressTextWrapper>
|
|
@@ -198,9 +206,10 @@ export const OrderProgress = (props: any) => {
|
|
|
198
206
|
useDefualtSessionManager: true,
|
|
199
207
|
paginationSettings: {
|
|
200
208
|
initialPage: 1,
|
|
201
|
-
pageSize:
|
|
209
|
+
pageSize: 10,
|
|
202
210
|
controlType: 'infinity'
|
|
203
|
-
}
|
|
211
|
+
},
|
|
212
|
+
noGiftCardOrders: true
|
|
204
213
|
}
|
|
205
214
|
|
|
206
215
|
return <OrderList {...orderProgressProps} />
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
1
|
+
import React, { useState, useRef } from 'react';
|
|
2
2
|
import { ActivityIndicator, View } from 'react-native'
|
|
3
3
|
import {
|
|
4
4
|
Cart,
|
|
@@ -20,12 +20,11 @@ import {
|
|
|
20
20
|
|
|
21
21
|
import { ProductItemAccordion } from '../ProductItemAccordion';
|
|
22
22
|
import { CouponControl } from '../CouponControl';
|
|
23
|
-
import { OInput, OModal, OText } from '../shared';
|
|
23
|
+
import { OInput, OModal, OText, OAlert } from '../shared';
|
|
24
24
|
import { verifyDecimals } from '../../utils';
|
|
25
25
|
import AntIcon from 'react-native-vector-icons/AntDesign'
|
|
26
26
|
import { TaxInformation } from '../TaxInformation';
|
|
27
27
|
import { TouchableOpacity } from 'react-native';
|
|
28
|
-
import { OAlert } from '../../../../../src/components/shared'
|
|
29
28
|
import { MomentOption } from '../MomentOption';
|
|
30
29
|
|
|
31
30
|
const OrderSummaryUI = (props: any) => {
|
|
@@ -46,6 +45,8 @@ const OrderSummaryUI = (props: any) => {
|
|
|
46
45
|
preorderMaximumDays,
|
|
47
46
|
preorderMinimumDays,
|
|
48
47
|
cateringTypes,
|
|
48
|
+
hideDeliveryFee,
|
|
49
|
+
loyaltyRewardRate,
|
|
49
50
|
maxDate
|
|
50
51
|
} = props;
|
|
51
52
|
|
|
@@ -55,9 +56,34 @@ const OrderSummaryUI = (props: any) => {
|
|
|
55
56
|
const [orderState] = useOrder();
|
|
56
57
|
const [{ parsePrice, parseNumber }] = useUtils();
|
|
57
58
|
const [validationFields] = useValidationFields();
|
|
59
|
+
const commentRef = useRef()
|
|
58
60
|
const [openTaxModal, setOpenTaxModal] = useState<any>({ open: false, data: null, type: '' })
|
|
59
|
-
const [confirm, setConfirm] = useState<any>({ open: false, content: null, handleOnAccept: null, id: null, title: null })
|
|
60
61
|
const isCouponEnabled = validationFields?.fields?.checkout?.coupon?.enabled;
|
|
62
|
+
const hideCartComments = !validationFields?.fields?.checkout?.comments?.enabled
|
|
63
|
+
|
|
64
|
+
const cart = orderState?.carts?.[`businessId:${props.cart.business_id}`]
|
|
65
|
+
|
|
66
|
+
const walletName: any = {
|
|
67
|
+
cash: {
|
|
68
|
+
name: t('PAY_WITH_CASH_WALLET', 'Pay with Cash Wallet'),
|
|
69
|
+
},
|
|
70
|
+
credit_point: {
|
|
71
|
+
name: t('PAY_WITH_CREDITS_POINTS_WALLET', 'Pay with Credit Points Wallet'),
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const getIncludedTaxes = () => {
|
|
76
|
+
if (cart?.taxes === null || !cart?.taxes) {
|
|
77
|
+
return cart?.business?.tax_type === 1 ? cart?.tax : 0
|
|
78
|
+
} else {
|
|
79
|
+
return cart?.taxes.reduce((taxIncluded: number, tax: any) => {
|
|
80
|
+
return taxIncluded + (tax.type === 1 ? tax.summary?.tax : 0)
|
|
81
|
+
}, 0)
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const clearAmount = (value: any) => parseFloat((Math.trunc(value * 100) / 100).toFixed(configs.format_number_decimal_length?.value ?? 2))
|
|
86
|
+
const loyaltyRewardValue = clearAmount((cart?.subtotal + getIncludedTaxes()) * loyaltyRewardRate)
|
|
61
87
|
|
|
62
88
|
const handleDeleteClick = (product: any) => {
|
|
63
89
|
removeProduct(product, cart)
|
|
@@ -75,41 +101,20 @@ const OrderSummaryUI = (props: any) => {
|
|
|
75
101
|
})
|
|
76
102
|
}
|
|
77
103
|
|
|
78
|
-
const getIncludedTaxes = () => {
|
|
79
|
-
if (cart?.taxes === null || !cart?.taxes) {
|
|
80
|
-
return cart.business.tax_type === 1 ? cart?.tax : 0
|
|
81
|
-
} else {
|
|
82
|
-
return cart?.taxes.reduce((taxIncluded: number, tax: any) => {
|
|
83
|
-
return taxIncluded + (tax.type === 1 ? tax.summary?.tax : 0)
|
|
84
|
-
}, 0)
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
104
|
const getIncludedTaxesDiscounts = () => {
|
|
89
105
|
return cart?.taxes?.filter((tax: any) => tax?.type === 1)?.reduce((carry: number, tax: any) => carry + (tax?.summary?.tax_after_discount ?? tax?.summary?.tax), 0)
|
|
90
106
|
}
|
|
91
107
|
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
const cart = orderState?.carts?.[`businessId:${props.cart.business_id}`]
|
|
105
|
-
|
|
106
|
-
const walletName: any = {
|
|
107
|
-
cash: {
|
|
108
|
-
name: t('PAY_WITH_CASH_WALLET', 'Pay with Cash Wallet'),
|
|
109
|
-
},
|
|
110
|
-
credit_point: {
|
|
111
|
-
name: t('PAY_WITH_CREDITS_POINTS_WALLET', 'Pay with Credit Points Wallet'),
|
|
112
|
-
}
|
|
108
|
+
const OfferAlert = ({ offerId }: any) => {
|
|
109
|
+
return (
|
|
110
|
+
<OAlert
|
|
111
|
+
title={t('OFFER', 'Offer')}
|
|
112
|
+
message={t('QUESTION_DELETE_OFFER', 'Are you sure that you want to delete the offer?')}
|
|
113
|
+
onAccept={() => handleRemoveOfferClick(offerId)}
|
|
114
|
+
>
|
|
115
|
+
<AntIcon style={{ marginLeft: 3 }} name='closecircle' size={16} color={theme.colors.primary} />
|
|
116
|
+
</OAlert>
|
|
117
|
+
)
|
|
113
118
|
}
|
|
114
119
|
|
|
115
120
|
return (
|
|
@@ -165,9 +170,9 @@ const OrderSummaryUI = (props: any) => {
|
|
|
165
170
|
<TouchableOpacity style={{ marginLeft: 3 }} onPress={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_1' })}>
|
|
166
171
|
<AntIcon name='infocirlceo' size={16} color={theme.colors.primary} />
|
|
167
172
|
</TouchableOpacity>
|
|
168
|
-
|
|
169
|
-
<
|
|
170
|
-
|
|
173
|
+
{!!offer?.id && (
|
|
174
|
+
<OfferAlert offerId={offer?.id} />
|
|
175
|
+
)}
|
|
171
176
|
</OSRow>
|
|
172
177
|
<OText size={12}>
|
|
173
178
|
- {parsePrice(offer?.summary?.discount)}
|
|
@@ -205,8 +210,8 @@ const OrderSummaryUI = (props: any) => {
|
|
|
205
210
|
))
|
|
206
211
|
}
|
|
207
212
|
{
|
|
208
|
-
cart?.fees?.length > 0 && cart?.fees?.filter((fee: any) => !(fee.fixed === 0 && fee.percentage === 0)).map((fee: any) => (
|
|
209
|
-
<OSTable key={fee?.id}>
|
|
213
|
+
cart?.fees?.length > 0 && cart?.fees?.filter((fee: any) => !(fee.fixed === 0 && fee.percentage === 0)).map((fee: any, i: number) => (
|
|
214
|
+
<OSTable key={fee?.id + i}>
|
|
210
215
|
<OSRow>
|
|
211
216
|
<OText size={12} numberOfLines={1}>
|
|
212
217
|
{fee.name || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}{' '}
|
|
@@ -231,9 +236,9 @@ const OrderSummaryUI = (props: any) => {
|
|
|
231
236
|
<TouchableOpacity style={{ marginLeft: 3 }} onPress={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_3' })}>
|
|
232
237
|
<AntIcon name='infocirlceo' size={16} color={theme.colors.primary} />
|
|
233
238
|
</TouchableOpacity>
|
|
234
|
-
|
|
235
|
-
<
|
|
236
|
-
|
|
239
|
+
{!!offer?.id && (
|
|
240
|
+
<OfferAlert offerId={offer?.id} />
|
|
241
|
+
)}
|
|
237
242
|
</OSRow>
|
|
238
243
|
<OText size={12}>
|
|
239
244
|
- {parsePrice(offer?.summary?.discount)}
|
|
@@ -241,10 +246,10 @@ const OrderSummaryUI = (props: any) => {
|
|
|
241
246
|
</OSTable>
|
|
242
247
|
))
|
|
243
248
|
}
|
|
244
|
-
{orderState?.options?.type === 1 &&
|
|
249
|
+
{orderState?.options?.type === 1 && !hideDeliveryFee && (
|
|
245
250
|
<OSTable>
|
|
246
251
|
<OText size={12}>{t('DELIVERY_FEE', 'Delivery Fee')}</OText>
|
|
247
|
-
<OText size={12}>{parsePrice(cart?.
|
|
252
|
+
<OText size={12}>{parsePrice(cart?.delivery_price_with_discount)}</OText>
|
|
248
253
|
</OSTable>
|
|
249
254
|
)}
|
|
250
255
|
{
|
|
@@ -258,9 +263,9 @@ const OrderSummaryUI = (props: any) => {
|
|
|
258
263
|
<TouchableOpacity style={{ marginLeft: 3 }} onPress={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_2' })}>
|
|
259
264
|
<AntIcon name='infocirlceo' size={16} color={theme.colors.primary} />
|
|
260
265
|
</TouchableOpacity>
|
|
261
|
-
|
|
262
|
-
<
|
|
263
|
-
|
|
266
|
+
{!!offer?.id && (
|
|
267
|
+
<OfferAlert offerId={offer?.id} />
|
|
268
|
+
)}
|
|
264
269
|
</OSRow>
|
|
265
270
|
<OText size={12}>
|
|
266
271
|
- {parsePrice(offer?.summary?.discount)}
|
|
@@ -310,9 +315,16 @@ const OrderSummaryUI = (props: any) => {
|
|
|
310
315
|
{parsePrice(cart?.balance >= 0 ? cart?.balance : 0)}
|
|
311
316
|
</OText>
|
|
312
317
|
</OSTable>
|
|
318
|
+
{!!loyaltyRewardValue && (
|
|
319
|
+
<OSTable style={{ justifyContent: 'flex-end' }}>
|
|
320
|
+
<OText size={12} color={theme.colors.textNormal}>
|
|
321
|
+
{t('REWARD_LOYALTY_POINT', 'Reward :amount: on loyalty points').replace(':amount:', loyaltyRewardValue)}
|
|
322
|
+
</OText>
|
|
323
|
+
</OSTable>
|
|
324
|
+
)}
|
|
313
325
|
</View>
|
|
314
326
|
)}
|
|
315
|
-
{cart?.business_id && cart?.status !== 2 && (
|
|
327
|
+
{cart?.business_id && cart?.status !== 2 && !hideCartComments && (
|
|
316
328
|
<OSTable>
|
|
317
329
|
<View style={{ width: '100%', marginTop: 20 }}>
|
|
318
330
|
<OText size={12}>{t('COMMENTS', 'Comments')}</OText>
|
|
@@ -330,6 +342,7 @@ const OrderSummaryUI = (props: any) => {
|
|
|
330
342
|
marginTop: 10,
|
|
331
343
|
borderRadius: 8
|
|
332
344
|
}}
|
|
345
|
+
forwardRef={commentRef}
|
|
333
346
|
multiline
|
|
334
347
|
/>
|
|
335
348
|
{commentState?.loading && (
|
|
@@ -375,14 +388,6 @@ const OrderSummaryUI = (props: any) => {
|
|
|
375
388
|
products={cart?.products}
|
|
376
389
|
/>
|
|
377
390
|
</OModal>
|
|
378
|
-
<OAlert
|
|
379
|
-
open={confirm.open}
|
|
380
|
-
title={confirm.title}
|
|
381
|
-
content={confirm.content}
|
|
382
|
-
onAccept={confirm.handleOnAccept}
|
|
383
|
-
onCancel={() => setConfirm({ ...confirm, open: false, title: null })}
|
|
384
|
-
onClose={() => setConfirm({ ...confirm, open: false, title: null })}
|
|
385
|
-
/>
|
|
386
391
|
</>
|
|
387
392
|
)}
|
|
388
393
|
</OSContainer>
|
|
@@ -31,14 +31,12 @@ const OrderTypeSelectorUI = (props: OrderTypeSelectParams) => {
|
|
|
31
31
|
const [orderState] = useOrder();
|
|
32
32
|
const [, t] = useLanguage();
|
|
33
33
|
const _orderTypes = orderTypes.filter((type: any) => configTypes?.includes(type.value));
|
|
34
|
-
|
|
35
|
-
const orderTypeDescription = (type : string) => theme?.header?.components?.order_types?.components?.[type]?.components?.description
|
|
36
|
-
const orderTypeCallAction = (type : string) => theme?.header?.components?.order_types?.components?.[type]?.components?.call_to_action
|
|
34
|
+
|
|
37
35
|
const items = _orderTypes.map((type) => {
|
|
38
36
|
return {
|
|
39
37
|
value: type.value,
|
|
40
|
-
label:
|
|
41
|
-
description:
|
|
38
|
+
label: t(type.content, type.content),
|
|
39
|
+
description: t(type.description, 'Lorem ipsum dolor sit amet, consectetur.')
|
|
42
40
|
}
|
|
43
41
|
})
|
|
44
42
|
|
|
@@ -102,6 +100,7 @@ const OrderTypeSelectorUI = (props: OrderTypeSelectParams) => {
|
|
|
102
100
|
style={{ paddingBottom: 0 }}
|
|
103
101
|
title={t('HOW_WILL_YOU_DELIVERY_TYPE', 'How will your order type?')}
|
|
104
102
|
titleAlign={'center'}
|
|
103
|
+
titleStyle={{ fontSize: 14 }}
|
|
105
104
|
noMargin
|
|
106
105
|
/>
|
|
107
106
|
{
|
|
@@ -115,7 +114,7 @@ const OrderTypeSelectorUI = (props: OrderTypeSelectParams) => {
|
|
|
115
114
|
<OText size={12} lineHeight={18} color={theme.colors.white} weight={Platform.OS === 'android' ? 'bold' : '600'}>{item?.label}</OText>
|
|
116
115
|
<OText size={10} lineHeight={15} color={theme.colors.white}>{item?.description}</OText>
|
|
117
116
|
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
118
|
-
<OText size={10} lineHeight={15} color={theme.colors.white}>{
|
|
117
|
+
<OText size={10} lineHeight={15} color={theme.colors.white}>{t('START_MY_ORDER', 'Start my order')}</OText>
|
|
119
118
|
<AntDesignIcon name='arrowleft' size={26} color={theme.colors.white} style={{ transform: [{ rotate: '180deg' }], marginStart: 4 }} />
|
|
120
119
|
</View>
|
|
121
120
|
</MaskCont>
|
|
@@ -2,5 +2,5 @@ import styled, { css } from 'styled-components/native'
|
|
|
2
2
|
|
|
3
3
|
export const ListWrapper = styled.View`
|
|
4
4
|
background-color: ${(props: any) => props.theme.colors.backgroundLight};
|
|
5
|
-
padding-horizontal: ${(props : any) => props.isBusinessesSearchList ? '0' : '
|
|
5
|
+
padding-horizontal: ${(props : any) => props.isBusinessesSearchList ? '0' : '20px'};
|
|
6
6
|
`;
|
|
@@ -23,21 +23,21 @@ export const PreviousProductsOrdered = (props: PreviousProductsOrderedParams) =>
|
|
|
23
23
|
},
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
-
const ProductList = (
|
|
26
|
+
const ProductList = () => {
|
|
27
27
|
return (
|
|
28
28
|
<>
|
|
29
29
|
{products?.filter((product : any) => product?.business?.available)?.map((product: any) => (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
<SingleProductCard
|
|
31
|
+
key={product?.id}
|
|
32
|
+
isProductId
|
|
33
|
+
isSoldOut={(product.inventoried && !product.quantity)}
|
|
34
|
+
product={product}
|
|
35
|
+
businessId={product?.business?.id}
|
|
36
|
+
onProductClick={onProductClick}
|
|
37
|
+
style={{ width: windowWidth - (products?.length > 1 ? 120 : 80), marginRight: 20 }}
|
|
38
|
+
productAddedToCartLength={0}
|
|
39
|
+
handleUpdateProducts={handleUpdateProducts}
|
|
40
|
+
/>
|
|
41
41
|
))}
|
|
42
42
|
</>
|
|
43
43
|
)
|
|
@@ -45,7 +45,7 @@ export const PreviousProductsOrdered = (props: PreviousProductsOrderedParams) =>
|
|
|
45
45
|
return (
|
|
46
46
|
<ScrollView horizontal={isBusinessesSearchList} style={styles.container} showsVerticalScrollIndicator={false}>
|
|
47
47
|
{isBusinessesSearchList ? (
|
|
48
|
-
<ProductList
|
|
48
|
+
<ProductList />
|
|
49
49
|
) : (
|
|
50
50
|
<ListWrapper isBusinessesSearchList={isBusinessesSearchList}>
|
|
51
51
|
<ProductList />
|
|
@@ -2,5 +2,5 @@ import styled from 'styled-components/native'
|
|
|
2
2
|
|
|
3
3
|
export const ListWrapper = styled.View`
|
|
4
4
|
background-color: ${(props: any) => props.theme.colors.backgroundLight};
|
|
5
|
-
padding-horizontal: ${(props : any) => props.isBusinessesSearchList ? '0' : '
|
|
5
|
+
padding-horizontal: ${(props : any) => props.isBusinessesSearchList ? '0' : '20px'};
|
|
6
6
|
`;
|