ordering-ui-react-native 0.17.76 → 0.17.77-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 +8 -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 +1 -21
- 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 +5 -0
- package/themes/business/index.tsx +2 -0
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +28 -25
- package/themes/business/src/components/BusinessController/index.tsx +0 -1
- package/themes/business/src/components/Chat/index.tsx +149 -118
- 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/GoogleMap/index.tsx +58 -57
- package/themes/business/src/components/LoginForm/Otp/index.tsx +31 -3
- package/themes/business/src/components/LoginForm/index.tsx +15 -22
- package/themes/business/src/components/MapView/index.tsx +10 -10
- package/themes/business/src/components/MessagesOption/index.tsx +20 -93
- package/themes/business/src/components/NewOrderNotification/index.tsx +128 -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 +191 -6
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +102 -40
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +70 -67
- package/themes/business/src/components/OrderDetailsLogistic/index.tsx +195 -0
- package/themes/business/src/components/OrderDetailsLogistic/styles.tsx +5 -0
- package/themes/business/src/components/OrderMessage/index.tsx +19 -18
- package/themes/business/src/components/OrderSummary/index.tsx +114 -123
- package/themes/business/src/components/OrdersOption/index.tsx +20 -22
- 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 +17 -12
- package/themes/business/src/components/PreviousOrders/OrderList.tsx +88 -0
- package/themes/business/src/components/PreviousOrders/OrdersGroupedItem.tsx +1 -1
- package/themes/business/src/components/PreviousOrders/index.tsx +139 -174
- package/themes/business/src/components/ProductItemAccordion/index.tsx +27 -3
- package/themes/business/src/components/ReviewCustomer/index.tsx +18 -13
- package/themes/business/src/components/StoresList/index.tsx +3 -4
- package/themes/business/src/components/UserProfileForm/index.tsx +14 -15
- package/themes/business/src/components/shared/OLink.tsx +9 -2
- package/themes/business/src/components/shared/OModal.tsx +16 -9
- package/themes/business/src/components/shared/OText.tsx +6 -1
- package/themes/business/src/types/index.tsx +25 -10
- package/themes/business/src/utils/index.tsx +29 -2
- 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 -9
- 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 +1 -1
- package/themes/original/src/components/AddressDetails/index.tsx +19 -3
- package/themes/original/src/components/AddressForm/index.tsx +61 -39
- package/themes/original/src/components/AddressList/index.tsx +11 -6
- 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 +153 -96
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +10 -12
- package/themes/original/src/components/BusinessController/index.tsx +81 -68
- 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/BusinessItemAccordion/index.tsx +15 -20
- package/themes/original/src/components/BusinessListingSearch/index.tsx +348 -340
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +0 -18
- package/themes/original/src/components/BusinessPreorder/index.tsx +103 -19
- package/themes/original/src/components/BusinessProductsCategories/index.tsx +1 -2
- 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 +684 -559
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +1 -1
- package/themes/original/src/components/BusinessReviews/index.tsx +3 -1
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +70 -39
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +0 -1
- package/themes/original/src/components/BusinessesListing/index.tsx +0 -1
- package/themes/original/src/components/Cart/index.tsx +76 -79
- package/themes/original/src/components/CartContent/index.tsx +112 -19
- package/themes/original/src/components/CartContent/styles.tsx +16 -6
- package/themes/original/src/components/Checkout/index.tsx +294 -56
- package/themes/original/src/components/CitiesControl/index.tsx +1 -1
- package/themes/original/src/components/CouponControl/index.tsx +10 -3
- package/themes/original/src/components/DriverTips/index.tsx +52 -34
- package/themes/original/src/components/FacebookLogin/styles.tsx +3 -1
- package/themes/original/src/components/Favorite/index.tsx +2 -6
- package/themes/original/src/components/FavoriteList/index.tsx +1 -35
- package/themes/original/src/components/FloatingButton/index.tsx +10 -13
- package/themes/original/src/components/GPSButton/index.tsx +6 -4
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/index.tsx +7 -3
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/styles.tsx +2 -0
- package/themes/original/src/components/GiftCard/RedeemGiftCard/index.tsx +19 -6
- package/themes/original/src/components/GoogleLogin/styles.tsx +1 -1
- package/themes/original/src/components/GoogleMap/index.tsx +60 -5
- package/themes/original/src/components/Help/index.tsx +2 -2
- package/themes/original/src/components/HelpGuide/index.tsx +2 -2
- package/themes/original/src/components/HelpGuide/styles.tsx +1 -0
- package/themes/original/src/components/Home/index.tsx +13 -4
- package/themes/original/src/components/LastOrder/index.tsx +1 -34
- 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 +16 -42
- package/themes/original/src/components/Messages/index.tsx +14 -7
- package/themes/original/src/components/MomentOption/index.tsx +193 -90
- package/themes/original/src/components/MomentSelector/index.tsx +1 -1
- package/themes/original/src/components/MultiCart/index.tsx +41 -54
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +162 -50
- package/themes/original/src/components/MultiCheckout/index.tsx +329 -100
- package/themes/original/src/components/MultiCheckout/styles.tsx +3 -1
- package/themes/original/src/components/MultiOrdersDetails/SingleOrderCard.tsx +37 -224
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +54 -21
- package/themes/original/src/components/MultiOrdersDetails/styles.tsx +1 -1
- package/themes/original/src/components/MyOrders/index.tsx +37 -24
- package/themes/original/src/components/NavBar/index.tsx +20 -12
- package/themes/original/src/components/NotFoundSource/index.tsx +14 -10
- package/themes/original/src/components/Notifications/styles.tsx +1 -5
- package/themes/original/src/components/OrderDetails/OrderEta.tsx +76 -0
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +21 -5
- package/themes/original/src/components/OrderDetails/index.tsx +139 -306
- package/themes/original/src/components/OrderDetails/styles.tsx +0 -1
- package/themes/original/src/components/OrderItAgain/index.tsx +3 -1
- package/themes/original/src/components/OrderProgress/index.tsx +33 -57
- package/themes/original/src/components/OrderSummary/index.tsx +83 -57
- package/themes/original/src/components/OrderTypeSelector/index.tsx +2 -1
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +14 -14
- package/themes/original/src/components/OrdersOption/index.tsx +61 -81
- package/themes/original/src/components/OrdersOption/styles.tsx +1 -1
- package/themes/original/src/components/PageBanner/index.tsx +98 -38
- package/themes/original/src/components/PageBanner/styles.tsx +0 -10
- package/themes/original/src/components/PaymentOptionCard/index.tsx +180 -0
- package/themes/original/src/components/PaymentOptionStripe/styles.tsx +1 -1
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
- package/themes/original/src/components/PaymentOptions/index.tsx +95 -33
- package/themes/original/src/components/PhoneInputNumber/index.tsx +18 -4
- package/themes/original/src/components/ProductForm/index.tsx +103 -40
- package/themes/original/src/components/ProductForm/styles.tsx +3 -3
- package/themes/original/src/components/ProductItemAccordion/index.tsx +8 -6
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +50 -21
- package/themes/original/src/components/ProductOptionSubOption/styles.tsx +10 -9
- package/themes/original/src/components/ProfessionalFilter/SingleProfessionalCard/index.tsx +108 -0
- package/themes/original/src/components/ProfessionalFilter/index.tsx +20 -50
- package/themes/original/src/components/ProfessionalProfile/index.tsx +36 -7
- package/themes/original/src/components/Promotions/index.tsx +2 -2
- package/themes/original/src/components/Promotions/styles.tsx +3 -1
- package/themes/original/src/components/ReviewProducts/index.tsx +16 -7
- package/themes/original/src/components/ScheduleAccordion/index.tsx +3 -3
- package/themes/original/src/components/ServiceForm/index.tsx +63 -20
- package/themes/original/src/components/Sessions/index.tsx +11 -8
- package/themes/original/src/components/Sessions/styles.tsx +5 -0
- package/themes/original/src/components/SignupForm/index.tsx +43 -27
- package/themes/original/src/components/SingleOrderCard/index.tsx +102 -63
- package/themes/original/src/components/SingleOrderCard/styles.tsx +1 -1
- package/themes/original/src/components/SingleProductCard/index.tsx +72 -31
- package/themes/original/src/components/SingleProductCard/styles.tsx +20 -4
- package/themes/original/src/components/SingleProductReview/styles.tsx +1 -1
- package/themes/original/src/components/StripeCardsList/index.tsx +49 -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/index.tsx +238 -224
- package/themes/original/src/components/UpsellingProducts/styles.tsx +12 -1
- package/themes/original/src/components/UserDetails/index.tsx +3 -1
- package/themes/original/src/components/UserFormDetails/index.tsx +78 -9
- package/themes/original/src/components/UserFormDetails/styles.tsx +1 -1
- package/themes/original/src/components/UserProfile/index.tsx +87 -76
- package/themes/original/src/components/UserProfileForm/index.tsx +10 -3
- package/themes/original/src/components/UserProfileForm/styles.tsx +1 -1
- 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/Wallets/index.tsx +56 -33
- package/themes/original/src/components/Wallets/styles.tsx +3 -4
- package/themes/original/src/components/shared/OButton.tsx +6 -2
- package/themes/original/src/components/shared/OInput.tsx +6 -1
- package/themes/original/src/components/shared/OModal.tsx +3 -3
- package/themes/original/src/types/index.tsx +39 -10
- package/themes/original/src/utils/index.tsx +386 -1
- 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
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
useLanguage,
|
|
4
4
|
useEvent,
|
|
5
5
|
useUtils,
|
|
6
|
+
useConfig,
|
|
6
7
|
OrderDetails as OrderDetailsController
|
|
7
8
|
} from 'ordering-components/native'
|
|
8
9
|
import { View, StyleSheet, TouchableOpacity, Linking } from 'react-native'
|
|
@@ -15,6 +16,7 @@ import {
|
|
|
15
16
|
StaturBar,
|
|
16
17
|
Icons
|
|
17
18
|
} from './styles'
|
|
19
|
+
import { getOrderStatus } from '../../utils'
|
|
18
20
|
|
|
19
21
|
const SingleOrderCardUI = (props: any) => {
|
|
20
22
|
const {
|
|
@@ -23,13 +25,17 @@ const SingleOrderCardUI = (props: any) => {
|
|
|
23
25
|
readMessages,
|
|
24
26
|
messages,
|
|
25
27
|
setMessages,
|
|
26
|
-
handleGoToOrderDetails
|
|
28
|
+
handleGoToOrderDetails,
|
|
29
|
+
showProgressBar
|
|
27
30
|
} = props
|
|
28
31
|
|
|
29
32
|
const { order } = props.order
|
|
30
33
|
const theme = useTheme()
|
|
31
34
|
const [, t] = useLanguage()
|
|
32
35
|
const [{ parseDate, parsePrice }] = useUtils()
|
|
36
|
+
const [{ configs }] = useConfig()
|
|
37
|
+
|
|
38
|
+
const hideIndividualButton = configs.multi_business_checkout_remove_individual_buttons?.value === '1'
|
|
33
39
|
|
|
34
40
|
const styles = StyleSheet.create({
|
|
35
41
|
statusBar: {
|
|
@@ -37,205 +43,6 @@ const SingleOrderCardUI = (props: any) => {
|
|
|
37
43
|
}
|
|
38
44
|
})
|
|
39
45
|
|
|
40
|
-
const getOrderStatus = (s: string) => {
|
|
41
|
-
const status = parseInt(s);
|
|
42
|
-
const orderStatus = [
|
|
43
|
-
{
|
|
44
|
-
key: 0,
|
|
45
|
-
value: t('PENDING', 'Pending'),
|
|
46
|
-
slug: 'PENDING',
|
|
47
|
-
percentage: 0.25,
|
|
48
|
-
image: theme.images.order.status0,
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
key: 1,
|
|
52
|
-
value: t('COMPLETED', 'Completed'),
|
|
53
|
-
slug: 'COMPLETED',
|
|
54
|
-
percentage: 1,
|
|
55
|
-
image: theme.images.order.status1,
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
key: 2,
|
|
59
|
-
value: t('REJECTED', 'Rejected'),
|
|
60
|
-
slug: 'REJECTED',
|
|
61
|
-
percentage: 0,
|
|
62
|
-
image: theme.images.order.status2,
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
key: 3,
|
|
66
|
-
value: t('DRIVER_IN_BUSINESS', 'Driver in business'),
|
|
67
|
-
slug: 'DRIVER_IN_BUSINESS',
|
|
68
|
-
percentage: 0.6,
|
|
69
|
-
image: theme.images.order.status3,
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
key: 4,
|
|
73
|
-
value: t('PREPARATION_COMPLETED', 'Preparation Completed'),
|
|
74
|
-
slug: 'PREPARATION_COMPLETED',
|
|
75
|
-
percentage: 0.7,
|
|
76
|
-
image: theme.images.order.status4,
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
key: 5,
|
|
80
|
-
value: t('REJECTED_BY_BUSINESS', 'Rejected by business'),
|
|
81
|
-
slug: 'REJECTED_BY_BUSINESS',
|
|
82
|
-
percentage: 0,
|
|
83
|
-
image: theme.images.order.status5,
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
key: 6,
|
|
87
|
-
value: t('REJECTED_BY_DRIVER', 'Rejected by Driver'),
|
|
88
|
-
slug: 'REJECTED_BY_DRIVER',
|
|
89
|
-
percentage: 0,
|
|
90
|
-
image: theme.images.order.status6,
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
key: 7,
|
|
94
|
-
value: t('ACCEPTED_BY_BUSINESS', 'Accepted by business'),
|
|
95
|
-
slug: 'ACCEPTED_BY_BUSINESS',
|
|
96
|
-
percentage: 0.35,
|
|
97
|
-
image: theme.images.order.status7,
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
key: 8,
|
|
101
|
-
value: t('ACCEPTED_BY_DRIVER', 'Accepted by driver'),
|
|
102
|
-
slug: 'ACCEPTED_BY_DRIVER',
|
|
103
|
-
percentage: 0.45,
|
|
104
|
-
image: theme.images.order.status8,
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
key: 9,
|
|
108
|
-
value: t('PICK_UP_COMPLETED_BY_DRIVER', 'Pick up completed by driver'),
|
|
109
|
-
slug: 'PICK_UP_COMPLETED_BY_DRIVER',
|
|
110
|
-
percentage: 0.8,
|
|
111
|
-
image: theme.images.order.status9,
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
key: 10,
|
|
115
|
-
value: t('PICK_UP_FAILED_BY_DRIVER', 'Pick up Failed by driver'),
|
|
116
|
-
slug: 'PICK_UP_FAILED_BY_DRIVER',
|
|
117
|
-
percentage: 0,
|
|
118
|
-
image: theme.images.order.status10,
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
key: 11,
|
|
122
|
-
value: t(
|
|
123
|
-
'DELIVERY_COMPLETED_BY_DRIVER',
|
|
124
|
-
'Delivery completed by driver',
|
|
125
|
-
),
|
|
126
|
-
slug: 'DELIVERY_COMPLETED_BY_DRIVER',
|
|
127
|
-
percentage: 1,
|
|
128
|
-
image: theme.images.order.status11,
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
key: 12,
|
|
132
|
-
value: t('DELIVERY_FAILED_BY_DRIVER', 'Delivery Failed by driver'),
|
|
133
|
-
slug: 'DELIVERY_FAILED_BY_DRIVER',
|
|
134
|
-
percentage: 0,
|
|
135
|
-
image: theme.images.order.status12,
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
key: 13,
|
|
139
|
-
value: t('PREORDER', 'PreOrder'),
|
|
140
|
-
slug: 'PREORDER',
|
|
141
|
-
percentage: 0,
|
|
142
|
-
image: theme.images.order.status13,
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
key: 14,
|
|
146
|
-
value: t('ORDER_NOT_READY', 'Order not ready'),
|
|
147
|
-
slug: 'ORDER_NOT_READY',
|
|
148
|
-
percentage: 0,
|
|
149
|
-
image: theme.images.order.status13,
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
key: 15,
|
|
153
|
-
value: t(
|
|
154
|
-
'ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER',
|
|
155
|
-
'Order picked up completed by customer',
|
|
156
|
-
),
|
|
157
|
-
slug: 'ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER',
|
|
158
|
-
percentage: 100,
|
|
159
|
-
image: theme.images.order.status1,
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
key: 16,
|
|
163
|
-
value: t('CANCELLED_BY_CUSTOMER', 'Cancelled by customer'),
|
|
164
|
-
slug: 'CANCELLED_BY_CUSTOMER',
|
|
165
|
-
percentage: 0,
|
|
166
|
-
image: theme.images.order.status2,
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
key: 17,
|
|
170
|
-
value: t(
|
|
171
|
-
'ORDER_NOT_PICKEDUP_BY_CUSTOMER',
|
|
172
|
-
'Order not picked up by customer',
|
|
173
|
-
),
|
|
174
|
-
slug: 'ORDER_NOT_PICKEDUP_BY_CUSTOMER',
|
|
175
|
-
percentage: 0,
|
|
176
|
-
image: theme.images.order.status2,
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
key: 18,
|
|
180
|
-
value: t(
|
|
181
|
-
'DRIVER_ALMOST_ARRIVED_TO_BUSINESS',
|
|
182
|
-
'Driver almost arrived to business',
|
|
183
|
-
),
|
|
184
|
-
slug: 'DRIVER_ALMOST_ARRIVED_TO_BUSINESS',
|
|
185
|
-
percentage: 0.15,
|
|
186
|
-
image: theme.images.order.status3,
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
key: 19,
|
|
190
|
-
value: t(
|
|
191
|
-
'DRIVER_ALMOST_ARRIVED_TO_CUSTOMER',
|
|
192
|
-
'Driver almost arrived to customer',
|
|
193
|
-
),
|
|
194
|
-
slug: 'DRIVER_ALMOST_ARRIVED_TO_CUSTOMER',
|
|
195
|
-
percentage: 0.9,
|
|
196
|
-
image: theme.images.order.status11,
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
key: 20,
|
|
200
|
-
value: t(
|
|
201
|
-
'ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS',
|
|
202
|
-
'Customer almost arrived to business',
|
|
203
|
-
),
|
|
204
|
-
slug: 'ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS',
|
|
205
|
-
percentage: 90,
|
|
206
|
-
image: theme.images.order.status7,
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
key: 21,
|
|
210
|
-
value: t(
|
|
211
|
-
'ORDER_CUSTOMER_ARRIVED_BUSINESS',
|
|
212
|
-
'Customer arrived to business',
|
|
213
|
-
),
|
|
214
|
-
slug: 'ORDER_CUSTOMER_ARRIVED_BUSINESS',
|
|
215
|
-
percentage: 95,
|
|
216
|
-
image: theme.images.order.status7,
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
key: 22,
|
|
220
|
-
value: t('ORDER_LOOKING_FOR_DRIVER', 'Looking for driver'),
|
|
221
|
-
slug: 'ORDER_LOOKING_FOR_DRIVER',
|
|
222
|
-
percentage: 35,
|
|
223
|
-
image: theme.images.order.status8
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
key: 23,
|
|
227
|
-
value: t('ORDER_DRIVER_ON_WAY', 'Driver on way'),
|
|
228
|
-
slug: 'ORDER_DRIVER_ON_WAY',
|
|
229
|
-
percentage: 45,
|
|
230
|
-
image: theme.images.order.status8
|
|
231
|
-
}
|
|
232
|
-
];
|
|
233
|
-
|
|
234
|
-
const objectStatus = orderStatus.find((o) => o.key === status);
|
|
235
|
-
|
|
236
|
-
return objectStatus && objectStatus;
|
|
237
|
-
};
|
|
238
|
-
|
|
239
46
|
const handleGoToMessages = (type: string) => {
|
|
240
47
|
readMessages && readMessages();
|
|
241
48
|
navigation.navigate(
|
|
@@ -275,14 +82,16 @@ const SingleOrderCardUI = (props: any) => {
|
|
|
275
82
|
</View>
|
|
276
83
|
</View>
|
|
277
84
|
</View>
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
85
|
+
{!hideIndividualButton && (
|
|
86
|
+
<OButton
|
|
87
|
+
onClick={() => handleGoToOrderDetails(order?.uuid)}
|
|
88
|
+
textStyle={{ color: theme.colors.primary, textAlign: 'center', fontSize: 14 }}
|
|
89
|
+
style={{ flexDirection: 'row', justifyContent: 'center', borderRadius: 7.6, shadowOpacity: 0, paddingLeft: 5, paddingRight: 5, height: 44 }}
|
|
90
|
+
text={t('ORDER_DETAILS', 'Order Details')}
|
|
91
|
+
bgColor={theme.colors.white}
|
|
92
|
+
borderColor={theme.colors.primary}
|
|
93
|
+
/>
|
|
94
|
+
)}
|
|
286
95
|
</View>
|
|
287
96
|
<OText size={16} lineHeight={24} mBottom={17} weight={'500'} color={theme.colors.textNormal}>
|
|
288
97
|
{t('FROM', 'From')}
|
|
@@ -324,25 +133,29 @@ const SingleOrderCardUI = (props: any) => {
|
|
|
324
133
|
<OText size={12} lineHeight={18} color={theme.colors.textNormal}>
|
|
325
134
|
{order?.business?.cellphone}
|
|
326
135
|
</OText>
|
|
327
|
-
)}
|
|
136
|
+
)}
|
|
328
137
|
<OText size={12} lineHeight={18} color={theme.colors.textNormal}>
|
|
329
138
|
{order?.business?.address}
|
|
330
139
|
</OText>
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
140
|
+
{showProgressBar && (
|
|
141
|
+
<>
|
|
142
|
+
<StaturBar>
|
|
143
|
+
<LinearGradient
|
|
144
|
+
start={{ x: 0.0, y: 0.0 }}
|
|
145
|
+
end={{
|
|
146
|
+
x: getOrderStatus(order?.status)?.percentage || 0,
|
|
147
|
+
y: 0,
|
|
148
|
+
}}
|
|
149
|
+
locations={[0.9999, 0.9999]}
|
|
150
|
+
colors={[theme.colors.primary, theme.colors.backgroundGray100]}
|
|
151
|
+
style={styles.statusBar}
|
|
152
|
+
/>
|
|
153
|
+
</StaturBar>
|
|
154
|
+
<OText size={12} lineHeight={18} weight={'400'} color={theme.colors.textNormal}>
|
|
155
|
+
{getOrderStatus(order?.status)?.value}
|
|
156
|
+
</OText>
|
|
157
|
+
</>
|
|
158
|
+
)}
|
|
346
159
|
<View style={{ flexDirection: 'row', justifyContent: 'flex-end', marginTop: 20 }}>
|
|
347
160
|
<OText size={16} lineHeight={24} weight={'600'} color={theme.colors.textNormal}>
|
|
348
161
|
{t('EXPORT_ORDER_TOTAL', 'Order total')}: {parsePrice(order?.summary?.total ?? order?.total)}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, { useEffect } from 'react'
|
|
2
|
-
import { useLanguage, useUtils, useToast, ToastType, MultiOrdersDetails as MultiOrdersDetailsController } from 'ordering-components/native'
|
|
2
|
+
import { useLanguage, useUtils, useToast, ToastType, useConfig, MultiOrdersDetails as MultiOrdersDetailsController } from 'ordering-components/native'
|
|
3
3
|
import { View, StyleSheet, BackHandler, TouchableOpacity } from 'react-native'
|
|
4
4
|
import { useTheme } from 'styled-components/native'
|
|
5
5
|
import { OText, OButton } from '../shared'
|
|
6
|
-
import { Container } from '../../layouts/Container'
|
|
7
6
|
import { Placeholder, PlaceholderLine, Fade } from 'rn-placeholder'
|
|
8
7
|
import { SingleOrderCard } from './SingleOrderCard'
|
|
9
8
|
import AntDesignIcon from 'react-native-vector-icons/AntDesign'
|
|
9
|
+
import { getOrderStatus } from '../../utils'
|
|
10
10
|
|
|
11
11
|
import {
|
|
12
12
|
OrdersDetailsContainer,
|
|
@@ -17,9 +17,11 @@ import {
|
|
|
17
17
|
InfoBlock,
|
|
18
18
|
Row,
|
|
19
19
|
OrdersSummary,
|
|
20
|
-
BorderLine
|
|
20
|
+
BorderLine,
|
|
21
|
+
StaturBar
|
|
21
22
|
} from './styles'
|
|
22
23
|
import { NotFoundSource } from '../NotFoundSource'
|
|
24
|
+
import LinearGradient from 'react-native-linear-gradient'
|
|
23
25
|
|
|
24
26
|
export const MultiOrdersDetailsUI = (props: any) => {
|
|
25
27
|
const {
|
|
@@ -39,12 +41,21 @@ export const MultiOrdersDetailsUI = (props: any) => {
|
|
|
39
41
|
padding: 0,
|
|
40
42
|
marginLeft: -20
|
|
41
43
|
},
|
|
44
|
+
statusBar: {
|
|
45
|
+
height: 12,
|
|
46
|
+
}
|
|
42
47
|
})
|
|
43
48
|
|
|
44
49
|
const { loading, orders, error } = props.ordersList
|
|
45
50
|
const [, t] = useLanguage()
|
|
46
51
|
const [{ parsePrice, parseNumber, parseDate }] = useUtils();
|
|
47
52
|
const [, { showToast }] = useToast();
|
|
53
|
+
const [{ configs }] = useConfig()
|
|
54
|
+
|
|
55
|
+
const isTaxIncludedOnPrice = orders.every((_order: any) => _order.taxes?.length ? _order.taxes?.every((_tax: any) => _tax.type === 1) : true)
|
|
56
|
+
const progressBarStyle = configs.multi_business_checkout_progress_bar_style?.value
|
|
57
|
+
const showBarInOrder = ['group', 'both']
|
|
58
|
+
const showBarInIndividual = ['individual', 'both']
|
|
48
59
|
|
|
49
60
|
const walletName: any = {
|
|
50
61
|
cash: {
|
|
@@ -155,7 +166,7 @@ export const MultiOrdersDetailsUI = (props: any) => {
|
|
|
155
166
|
<OText key={event.id} size={12} lineHeight={18} color={theme.colors.textNormal}>
|
|
156
167
|
{event?.wallet_event
|
|
157
168
|
? walletName[event?.wallet_event?.wallet?.type]?.name
|
|
158
|
-
: event?.paymethod?.name}
|
|
169
|
+
: t(event?.paymethod?.name.toUpperCase()?.replace(/ /g, '_'), event?.paymethod?.name)}
|
|
159
170
|
</OText>
|
|
160
171
|
))}
|
|
161
172
|
</Section>
|
|
@@ -186,6 +197,23 @@ export const MultiOrdersDetailsUI = (props: any) => {
|
|
|
186
197
|
<OText size={16} lineHeight={24} weight={'500'} color={theme.colors.textNormal} mBottom={20}>
|
|
187
198
|
{t('ORDER_SUMMARY', 'Order summary')}
|
|
188
199
|
</OText>
|
|
200
|
+
{(showBarInOrder.includes(progressBarStyle)) && (
|
|
201
|
+
<StaturBar isOrderDetails>
|
|
202
|
+
<LinearGradient
|
|
203
|
+
start={{ x: 0.0, y: 0.0 }}
|
|
204
|
+
end={{
|
|
205
|
+
x: getOrderStatus(orders[0]?.status)?.percentage || 0,
|
|
206
|
+
y: 0,
|
|
207
|
+
}}
|
|
208
|
+
locations={[0.9999, 0.9999]}
|
|
209
|
+
colors={[theme.colors.primary, theme.colors.backgroundGray100]}
|
|
210
|
+
style={styles.statusBar}
|
|
211
|
+
/>
|
|
212
|
+
</StaturBar>
|
|
213
|
+
)}
|
|
214
|
+
<OText size={14} lineHeight={18} weight={'400'} color={theme.colors.textNormal} mBottom={10}>
|
|
215
|
+
{getOrderStatus(orders[0]?.status)?.value}
|
|
216
|
+
</OText>
|
|
189
217
|
{orders.map((order: any) => (
|
|
190
218
|
<Row key={order.id}>
|
|
191
219
|
<OText size={12} lineHeight={18} weight={'400'} color={theme.colors.textNormal}>
|
|
@@ -197,23 +225,27 @@ export const MultiOrdersDetailsUI = (props: any) => {
|
|
|
197
225
|
</Row>
|
|
198
226
|
))}
|
|
199
227
|
<BorderLine />
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
228
|
+
{!isTaxIncludedOnPrice && (
|
|
229
|
+
<>
|
|
230
|
+
<Row>
|
|
231
|
+
<OText size={12} lineHeight={18} weight={'400'} color={theme.colors.textNormal}>
|
|
232
|
+
{t('TOTAL_BEFORE_TAX', 'Total before tax')}:
|
|
233
|
+
</OText>
|
|
234
|
+
<OText size={12} lineHeight={18} weight={'400'} color={theme.colors.textNormal}>
|
|
235
|
+
{parsePrice(ordersSummary?.subtotal)}
|
|
236
|
+
</OText>
|
|
237
|
+
</Row>
|
|
238
|
+
<Row>
|
|
239
|
+
<OText size={12} lineHeight={18} weight={'400'} color={theme.colors.textNormal}>
|
|
240
|
+
{t('ESTIMATED_TAX_TO_BE_COLLECTED', 'Estimated tax to be collected')}:
|
|
241
|
+
</OText>
|
|
242
|
+
<OText size={12} lineHeight={18} weight={'400'} color={theme.colors.textNormal}>
|
|
243
|
+
{parsePrice(ordersSummary?.tax)}
|
|
244
|
+
</OText>
|
|
245
|
+
</Row>
|
|
246
|
+
<BorderLine />
|
|
247
|
+
</>
|
|
248
|
+
)}
|
|
217
249
|
<Row style={{ marginTop: 10 }}>
|
|
218
250
|
<OText size={14} lineHeight={18} weight={'500'} color={theme.colors.textNormal}>
|
|
219
251
|
{t('PAYMENT_TOTAL', 'Payment total')}:
|
|
@@ -243,6 +275,7 @@ export const MultiOrdersDetailsUI = (props: any) => {
|
|
|
243
275
|
navigation={navigation}
|
|
244
276
|
order={order}
|
|
245
277
|
handleGoToOrderDetails={handleGoToOrderDetails}
|
|
278
|
+
showProgressBar={showBarInIndividual.includes(progressBarStyle)}
|
|
246
279
|
/>
|
|
247
280
|
<Divider />
|
|
248
281
|
</React.Fragment>
|
|
@@ -41,7 +41,7 @@ export const SingleOrderContainer = styled.View`
|
|
|
41
41
|
padding: 40px 0;
|
|
42
42
|
`
|
|
43
43
|
export const StaturBar = styled.View`
|
|
44
|
-
margin-top: 30px;
|
|
44
|
+
margin-top: ${(props: any) => props.isOrderDetails ? '10px' : '30px'};
|
|
45
45
|
margin-bottom: 10px;
|
|
46
46
|
`
|
|
47
47
|
export const Icons = styled.View`
|
|
@@ -23,21 +23,25 @@ export const MyOrders = (props: any) => {
|
|
|
23
23
|
const [isEmptyBusinesses, setIsEmptyBusinesses] = useState(false)
|
|
24
24
|
const [businessOrderIds, setBusinessOrderIds] = useState([])
|
|
25
25
|
const [ordersLength, setOrdersLength] = useState({
|
|
26
|
-
activeOrdersLength:
|
|
26
|
+
activeOrdersLength: null,
|
|
27
27
|
previousOrdersLength: 0,
|
|
28
|
+
preordersLength: 0
|
|
28
29
|
});
|
|
29
30
|
const [selectedOption, setSelectedOption] = useState(!hideOrders ? 'orders' : 'business')
|
|
30
31
|
|
|
31
32
|
const notOrderOptions = ['business', 'products']
|
|
32
|
-
const allEmpty = (ordersLength?.activeOrdersLength === 0 && ordersLength?.previousOrdersLength === 0) || ((isEmptyBusinesses || businessOrderIds?.length === 0) && hideOrders)
|
|
33
|
+
const allEmpty = (ordersLength?.activeOrdersLength === 0 && ordersLength?.previousOrdersLength === 0 && ordersLength?.preordersLength === 0) || ((isEmptyBusinesses || businessOrderIds?.length === 0) && hideOrders)
|
|
34
|
+
|
|
35
|
+
const isChewLayout = theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
|
|
36
|
+
const showNavbar = theme?.bar_menu?.components?.orders?.hidden
|
|
37
|
+
const hideOrdersTheme = theme?.bar_menu?.components?.orders?.hidden
|
|
38
|
+
const hideProductsTab = theme?.orders?.components?.products_tab?.hidden
|
|
39
|
+
const hideBusinessTab = theme?.orders?.components?.business_tab?.hidden
|
|
33
40
|
const MyOrdersMenu = [
|
|
34
|
-
{ key: 'orders', value: t('ORDERS', 'Orders') },
|
|
35
|
-
{ key: 'business', value: t('BUSINESS', 'Business') },
|
|
36
|
-
{ key: 'products', value: t('PRODUCTS', 'Products') }
|
|
41
|
+
{ key: 'orders', value: t('ORDERS', 'Orders'), disabled: false },
|
|
42
|
+
{ key: 'business', value: t('BUSINESS', 'Business'), disabled: hideBusinessTab },
|
|
43
|
+
{ key: 'products', value: t('PRODUCTS', 'Products'), disabled: hideProductsTab }
|
|
37
44
|
]
|
|
38
|
-
const isChewLayout = theme?.header?.components?.layout?.type === 'chew'
|
|
39
|
-
const showNavbar = theme?.bar_menu?.components?.orders?.hidden
|
|
40
|
-
|
|
41
45
|
const goToBack = () => navigation?.canGoBack() && navigation.goBack()
|
|
42
46
|
|
|
43
47
|
const handleOnRefresh = () => {
|
|
@@ -87,7 +91,7 @@ export const MyOrders = (props: any) => {
|
|
|
87
91
|
},
|
|
88
92
|
...props.titleStyle
|
|
89
93
|
}}>
|
|
90
|
-
{!props.hideBackBtn && !isChewLayout && (
|
|
94
|
+
{!props.hideBackBtn && (!isChewLayout || (isChewLayout && hideOrdersTheme)) && (
|
|
91
95
|
<OButton
|
|
92
96
|
imgLeftStyle={{ width: 18 }}
|
|
93
97
|
imgRightSrc={null}
|
|
@@ -99,7 +103,8 @@ export const MyOrders = (props: any) => {
|
|
|
99
103
|
borderColor: '#FFF',
|
|
100
104
|
shadowColor: '#FFF',
|
|
101
105
|
paddingLeft: 0,
|
|
102
|
-
paddingRight: 0
|
|
106
|
+
paddingRight: 0,
|
|
107
|
+
marginTop: 30,
|
|
103
108
|
}}
|
|
104
109
|
onClick={goToBack}
|
|
105
110
|
icon={AntDesignIcon}
|
|
@@ -109,7 +114,7 @@ export const MyOrders = (props: any) => {
|
|
|
109
114
|
}}
|
|
110
115
|
/>
|
|
111
116
|
)}
|
|
112
|
-
<HeaderTitle ph={
|
|
117
|
+
<HeaderTitle ph={10} text={t('MY_ORDERS', 'My Orders')} />
|
|
113
118
|
</View>
|
|
114
119
|
)}
|
|
115
120
|
{!hideOrders && !isChewLayout && !showNavbar && (
|
|
@@ -123,7 +128,7 @@ export const MyOrders = (props: any) => {
|
|
|
123
128
|
showsHorizontalScrollIndicator={false}
|
|
124
129
|
scrollEventThrottle={16}
|
|
125
130
|
>
|
|
126
|
-
{MyOrdersMenu.filter(option => !hideOrders || option.key !== 'orders').map(option => (
|
|
131
|
+
{MyOrdersMenu.filter(option => (!hideOrders || option.key !== 'orders') && !option.disabled).map(option => (
|
|
127
132
|
<Tab
|
|
128
133
|
key={option.key}
|
|
129
134
|
onPress={() => setSelectedOption(option.key)}
|
|
@@ -143,18 +148,26 @@ export const MyOrders = (props: any) => {
|
|
|
143
148
|
)}
|
|
144
149
|
{selectedOption === 'orders' && (
|
|
145
150
|
<>
|
|
146
|
-
{
|
|
147
|
-
<
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
151
|
+
<View style={{ paddingHorizontal: isChewLayout ? 20 : 40 }}>
|
|
152
|
+
<OrdersOption
|
|
153
|
+
{...props}
|
|
154
|
+
preOrders
|
|
155
|
+
ordersLength={ordersLength}
|
|
156
|
+
setOrdersLength={setOrdersLength}
|
|
157
|
+
setRefreshOrders={setRefreshOrders}
|
|
158
|
+
refreshOrders={refreshOrders}
|
|
159
|
+
/>
|
|
160
|
+
</View>
|
|
161
|
+
<View style={{ paddingHorizontal: isChewLayout ? 20 : 40 }}>
|
|
162
|
+
<OrdersOption
|
|
163
|
+
{...props}
|
|
164
|
+
activeOrders
|
|
165
|
+
ordersLength={ordersLength}
|
|
166
|
+
setOrdersLength={setOrdersLength}
|
|
167
|
+
setRefreshOrders={setRefreshOrders}
|
|
168
|
+
refreshOrders={refreshOrders}
|
|
169
|
+
/>
|
|
170
|
+
</View>
|
|
158
171
|
<View style={{ paddingHorizontal: isChewLayout ? 20 : 40 }}>
|
|
159
172
|
<OrdersOption
|
|
160
173
|
{...props}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
1
4
|
import * as React from 'react'
|
|
2
5
|
import styled, { useTheme } from 'styled-components/native'
|
|
3
6
|
import { OButton, OIcon, OText } from '../shared'
|
|
@@ -9,7 +12,6 @@ const TitleWrapper = styled.View`
|
|
|
9
12
|
padding-horizontal: 10px;
|
|
10
13
|
`
|
|
11
14
|
const TitleTopWrapper = styled.View`
|
|
12
|
-
flex: 1;
|
|
13
15
|
flex-direction: row;
|
|
14
16
|
align-items: center;
|
|
15
17
|
`
|
|
@@ -17,8 +19,10 @@ const TitleTopWrapper = styled.View`
|
|
|
17
19
|
const btnBackArrow = {
|
|
18
20
|
borderWidth: 0,
|
|
19
21
|
backgroundColor: '#FFF',
|
|
20
|
-
borderColor: '#
|
|
21
|
-
shadowColor: '#FFF'
|
|
22
|
+
borderColor: '#fff',
|
|
23
|
+
shadowColor: '#FFF',
|
|
24
|
+
paddingLeft: 30,
|
|
25
|
+
paddingRight: 30
|
|
22
26
|
}
|
|
23
27
|
|
|
24
28
|
interface Props {
|
|
@@ -42,6 +46,7 @@ interface Props {
|
|
|
42
46
|
paddingTop?: number,
|
|
43
47
|
isVertical?: boolean,
|
|
44
48
|
noMargin?: any
|
|
49
|
+
hideArrowLeft?: boolean
|
|
45
50
|
}
|
|
46
51
|
|
|
47
52
|
const NavBar = (props: Props) => {
|
|
@@ -52,8 +57,6 @@ const NavBar = (props: Props) => {
|
|
|
52
57
|
background-color: ${theme.colors.white};
|
|
53
58
|
padding: 10px 20px 20px 0px;
|
|
54
59
|
flex-direction: row;
|
|
55
|
-
justify-content: center;
|
|
56
|
-
align-items: center;
|
|
57
60
|
position: relative;
|
|
58
61
|
`
|
|
59
62
|
|
|
@@ -62,13 +65,18 @@ const NavBar = (props: Props) => {
|
|
|
62
65
|
}
|
|
63
66
|
return (
|
|
64
67
|
<Wrapper style={{ paddingTop: props.paddingTop, ...{ flexDirection: props.isVertical ? 'column' : 'row', alignItems: props.isVertical ? 'flex-start' : 'center' }, ...props.style }}>
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
{!props.hideArrowLeft && (
|
|
69
|
+
<OButton
|
|
70
|
+
iconProps={{
|
|
71
|
+
name: 'arrowleft',
|
|
72
|
+
size: 26
|
|
73
|
+
}}
|
|
74
|
+
icon={AntDesignIcon}
|
|
75
|
+
imgRightSrc={null}
|
|
76
|
+
style={{ ...btnBackArrow, ...props.btnStyle, ...props.isVertical ? (I18nManager.isRTL ? { paddingRight: 0 } : { paddingLeft: 0 }) : {} }}
|
|
77
|
+
onClick={props?.onActionLeft}
|
|
78
|
+
/>
|
|
79
|
+
)}
|
|
72
80
|
<TitleTopWrapper>
|
|
73
81
|
{props.withIcon
|
|
74
82
|
? (
|