ordering-ui-react-native 0.18.55-test1 → 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 -5
- 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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useState, useCallback } from 'react'
|
|
2
2
|
|
|
3
3
|
import { Platform, StyleSheet, View, TouchableOpacity, ScrollView } from 'react-native';
|
|
4
|
+
import AntDesignIcon from 'react-native-vector-icons/AntDesign'
|
|
4
5
|
|
|
5
6
|
import { OButton, OText, OLink, OModal } from '../shared'
|
|
6
7
|
import {
|
|
@@ -53,9 +54,16 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
53
54
|
const WIDTH_SCREEN = orientationState?.dimensions?.width
|
|
54
55
|
|
|
55
56
|
const [openReviewModal, setOpenReviewModal] = useState(false)
|
|
57
|
+
const [showCustomFields, setShowCustomFields] = useState<boolean>(false);
|
|
56
58
|
|
|
57
|
-
const [isReadMore, setIsReadMore] = useState(
|
|
58
|
-
|
|
59
|
+
const [isReadMore, setIsReadMore] = useState({
|
|
60
|
+
customerAddress: false,
|
|
61
|
+
businessAddressNotes: false
|
|
62
|
+
})
|
|
63
|
+
const [lengthMore, setLengthMore] = useState({
|
|
64
|
+
customerAddress: false,
|
|
65
|
+
businessAddressNotes: false
|
|
66
|
+
})
|
|
59
67
|
|
|
60
68
|
const pastOrderStatuses = [1, 2, 5, 6, 10, 11, 12, 16, 17]
|
|
61
69
|
|
|
@@ -105,11 +113,19 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
105
113
|
}
|
|
106
114
|
|
|
107
115
|
const containsOnlyNumbers = (str: string) => {
|
|
116
|
+
str = str?.replace('+', '');
|
|
108
117
|
return /^\d+$/.test(str);
|
|
109
118
|
}
|
|
110
119
|
|
|
111
|
-
const onTextLayout = useCallback((e: any) => {
|
|
112
|
-
|
|
120
|
+
const onTextLayout = useCallback((e: any, item: string) => {
|
|
121
|
+
if (item === 'customerAddress') {
|
|
122
|
+
const customerAddressMore = (e.nativeEvent.lines.length == 2 && e.nativeEvent.lines[1].width > WIDTH_SCREEN * .76) || e.nativeEvent.lines.length > 2
|
|
123
|
+
setLengthMore(prev => ({ ...prev, customerAddress: customerAddressMore }))
|
|
124
|
+
}
|
|
125
|
+
if (item === 'businessAddressNotes') {
|
|
126
|
+
const businessAddressNotesMore = (e.nativeEvent.lines.length == 3 && e.nativeEvent.lines[2].width > WIDTH_SCREEN * .76) || e.nativeEvent.lines.length > 3
|
|
127
|
+
setLengthMore(prev => ({ ...prev, businessAddressNotes: businessAddressNotesMore }))
|
|
128
|
+
}
|
|
113
129
|
}, []);
|
|
114
130
|
|
|
115
131
|
return (
|
|
@@ -120,27 +136,36 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
120
136
|
|
|
121
137
|
{order?.metafields?.length > 0 && (
|
|
122
138
|
<OrderBusiness>
|
|
123
|
-
<
|
|
124
|
-
{
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
139
|
+
<TouchableOpacity onPress={() => setShowCustomFields((prev: boolean) => !prev)} style={{ flexDirection: 'row', width: '100%', justifyContent: 'space-between', alignItems: 'flex-start' }}>
|
|
140
|
+
<OText style={{ marginBottom: 5 }} size={16} weight="600">
|
|
141
|
+
{t('CUSTOM_FIELDS', 'Custom fields')}
|
|
142
|
+
</OText>
|
|
143
|
+
<AntDesignIcon
|
|
144
|
+
name={showCustomFields ? 'up' : 'down'}
|
|
145
|
+
size={14}
|
|
146
|
+
/>
|
|
147
|
+
</TouchableOpacity>
|
|
148
|
+
{showCustomFields && (
|
|
149
|
+
<>
|
|
150
|
+
{order.metafields.map((field: any) => (
|
|
151
|
+
<View
|
|
152
|
+
key={field.id}
|
|
153
|
+
style={{
|
|
154
|
+
width: '100%',
|
|
155
|
+
flexDirection: 'row',
|
|
156
|
+
marginBottom: 5
|
|
157
|
+
}}
|
|
158
|
+
>
|
|
159
|
+
<OText style={{ width: '50%' }}>
|
|
160
|
+
{field.key}
|
|
161
|
+
</OText>
|
|
162
|
+
<OText style={{ width: '45%', textAlign: 'right' }}>
|
|
163
|
+
{field.value}
|
|
164
|
+
</OText>
|
|
165
|
+
</View>
|
|
166
|
+
))}
|
|
167
|
+
</>
|
|
168
|
+
)}
|
|
144
169
|
</OrderBusiness>
|
|
145
170
|
)}
|
|
146
171
|
|
|
@@ -170,7 +195,7 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
170
195
|
<OLink
|
|
171
196
|
PressStyle={styles.linkWithIcons}
|
|
172
197
|
url={`tel:${containsOnlyNumbers(order?.business?.cellphone) ? order?.business?.cellphone : 'invalid'}`}
|
|
173
|
-
shorcut={`${order?.business?.cellphone}`}
|
|
198
|
+
shorcut={`${(!!order?.business?.country_phone_code && !order?.business?.cellphone?.includes('+')) ? '+' + order?.business?.country_phone_code : ''}${order?.business?.cellphone}`}
|
|
174
199
|
TextStyle={styles.textLink}
|
|
175
200
|
/>
|
|
176
201
|
</View>
|
|
@@ -180,8 +205,8 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
180
205
|
<View style={styles.linkWithIcons}>
|
|
181
206
|
<OLink
|
|
182
207
|
PressStyle={styles.linkWithIcons}
|
|
183
|
-
url={`tel:${containsOnlyNumbers(order?.business?.
|
|
184
|
-
shorcut={order?.business?.phone}
|
|
208
|
+
url={`tel:${containsOnlyNumbers(order?.business?.phone) ? order?.business?.phone : 'invalid'}`}
|
|
209
|
+
shorcut={`${(!!order?.business?.country_phone_code && !order?.business?.phone?.includes('+')) ? '+' + order?.business?.country_phone_code : ''}${order?.business?.phone}`}
|
|
185
210
|
TextStyle={styles.textLink}
|
|
186
211
|
/>
|
|
187
212
|
</View>
|
|
@@ -194,8 +219,8 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
194
219
|
<OLink
|
|
195
220
|
PressStyle={styles.linkWithIcons}
|
|
196
221
|
url={Platform.select({
|
|
197
|
-
ios: `maps:0,0?q=${order?.business?.address}`,
|
|
198
|
-
android: `geo:0,0?q=${order?.business?.address}`,
|
|
222
|
+
ios: `maps:0,0?q=${order?.business?.address}@${order?.business?.location?.lat},${order?.business?.location?.lng}`,
|
|
223
|
+
android: `geo:0,0?q=${order?.business?.address}@${order?.business?.location?.lat},${order?.business?.location?.lng}`,
|
|
199
224
|
})}
|
|
200
225
|
numberOfLines={2}
|
|
201
226
|
shorcut={order?.business?.address}
|
|
@@ -209,17 +234,28 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
209
234
|
</OText>
|
|
210
235
|
)}
|
|
211
236
|
{!!order?.business?.address_notes && (
|
|
212
|
-
|
|
213
|
-
<
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
237
|
+
<>
|
|
238
|
+
<View style={styles.linkWithIcons}>
|
|
239
|
+
<OLink
|
|
240
|
+
PressStyle={styles.linkWithIcons}
|
|
241
|
+
url={Platform.select({
|
|
242
|
+
ios: `maps:0,0?q=${order?.business?.address_notes}@${order?.business?.location?.lat},${order?.business?.location?.lng}`,
|
|
243
|
+
android: `geo:0,0?q=${order?.business?.address_notes}@${order?.business?.location?.lat},${order?.business?.location?.lng}`,
|
|
244
|
+
})}
|
|
245
|
+
shorcut={order?.business?.address_notes}
|
|
246
|
+
TextStyle={styles.textLink}
|
|
247
|
+
onTextLayout={e => onTextLayout(e, 'businessAddressNotes')}
|
|
248
|
+
numberOfLines={isReadMore.businessAddressNotes ? 20 : 3}
|
|
249
|
+
/>
|
|
250
|
+
</View>
|
|
251
|
+
{lengthMore.businessAddressNotes && (
|
|
252
|
+
<TouchableOpacity
|
|
253
|
+
onPress={() => setIsReadMore({ ...isReadMore, businessAddressNotes: !isReadMore.businessAddressNotes })}
|
|
254
|
+
>
|
|
255
|
+
<OText size={12} color={theme.colors.statusOrderBlue}>{isReadMore.businessAddressNotes ? t('SHOW_LESS', 'Show less') : t('READ_MORE', 'Read more')}</OText>
|
|
256
|
+
</TouchableOpacity>
|
|
257
|
+
)}
|
|
258
|
+
</>
|
|
223
259
|
)}
|
|
224
260
|
</OrderBusiness>
|
|
225
261
|
|
|
@@ -301,7 +337,7 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
301
337
|
<OLink
|
|
302
338
|
PressStyle={styles.linkWithIcons}
|
|
303
339
|
url={`tel:${!!order?.customer?.country_phone_code ? '+' + order?.customer?.country_phone_code : ''} ${containsOnlyNumbers(order?.customer?.cellphone) ? order?.customer?.cellphone : 'invalid'}`}
|
|
304
|
-
shorcut={`${!!order?.customer?.country_phone_code ? '+' + order?.customer?.country_phone_code : ''}
|
|
340
|
+
shorcut={`${!!order?.customer?.country_phone_code ? '+' + order?.customer?.country_phone_code : ''}${order?.customer?.cellphone}`}
|
|
305
341
|
TextStyle={styles.textLink}
|
|
306
342
|
/>
|
|
307
343
|
</View>
|
|
@@ -311,8 +347,8 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
311
347
|
<View style={styles.linkWithIcons}>
|
|
312
348
|
<OLink
|
|
313
349
|
PressStyle={styles.linkWithIcons}
|
|
314
|
-
url={`tel:${containsOnlyNumbers(order?.customer?.phone) ? order?.customer?.phone : 'invalid'}`}
|
|
315
|
-
shorcut={order?.customer?.phone}
|
|
350
|
+
url={`tel:${!!order?.customer?.country_phone_code ? '+' + order?.customer?.country_phone_code : ''} ${containsOnlyNumbers(order?.customer?.phone) ? order?.customer?.phone : 'invalid'}`}
|
|
351
|
+
shorcut={`${!!order?.customer?.country_phone_code ? '+' + order?.customer?.country_phone_code : ''}${order?.customer?.phone}`}
|
|
316
352
|
TextStyle={styles.textLink}
|
|
317
353
|
/>
|
|
318
354
|
</View>
|
|
@@ -324,18 +360,20 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
324
360
|
<OLink
|
|
325
361
|
PressStyle={{ ...styles.linkWithIcons, marginBottom: 0 }}
|
|
326
362
|
url={Platform.select({
|
|
327
|
-
ios: `maps:0,0?q=${order?.customer?.address}`,
|
|
328
|
-
android: `geo:0,0?q=${order?.customer?.address}`,
|
|
363
|
+
ios: `maps:0,0?q=${order?.customer?.address}@${order?.customer?.location?.lat},${order?.customer?.location?.lng}`,
|
|
364
|
+
android: `geo:0,0?q=${order?.customer?.address}@${order?.customer?.location?.lat},${order?.customer?.location?.lng}`,
|
|
329
365
|
})}
|
|
330
|
-
onTextLayout={onTextLayout}
|
|
331
|
-
numberOfLines={isReadMore ? 20 : 2}
|
|
366
|
+
onTextLayout={e => onTextLayout(e, 'customerAddress')}
|
|
367
|
+
numberOfLines={isReadMore.customerAddress ? 20 : 2}
|
|
332
368
|
shorcut={order?.customer?.address}
|
|
333
369
|
TextStyle={styles.textLink}
|
|
334
370
|
/>
|
|
335
371
|
</View>
|
|
336
|
-
{lengthMore && (
|
|
337
|
-
<TouchableOpacity
|
|
338
|
-
|
|
372
|
+
{lengthMore.customerAddress && (
|
|
373
|
+
<TouchableOpacity
|
|
374
|
+
onPress={() => setIsReadMore({ ...isReadMore, customerAddress: !isReadMore.customerAddress })}
|
|
375
|
+
>
|
|
376
|
+
<OText size={12} color={theme.colors.statusOrderBlue}>{isReadMore.customerAddress ? t('SHOW_LESS', 'Show less') : t('READ_MORE', 'Read more')}</OText>
|
|
339
377
|
</TouchableOpacity>
|
|
340
378
|
)}
|
|
341
379
|
</>
|
|
@@ -370,26 +408,16 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
370
408
|
{t('ON_BEHALF_OF', 'On behalf of')}{': '} {order?.on_behalf_of}
|
|
371
409
|
</OText>
|
|
372
410
|
)}
|
|
373
|
-
{(
|
|
411
|
+
{(order?.delivery_option !== undefined && order?.delivery_type === 1) && (
|
|
374
412
|
<View style={{ marginTop: 10 }}>
|
|
375
413
|
{order?.delivery_option !== undefined && order?.delivery_type === 1 && (
|
|
376
414
|
<OText>
|
|
377
415
|
{t(order?.delivery_option?.name?.toUpperCase()?.replace(/ /g, '_'), order?.delivery_option?.name)}
|
|
378
416
|
</OText>
|
|
379
417
|
)}
|
|
380
|
-
{!!order?.comment && (
|
|
381
|
-
<>
|
|
382
|
-
<OText weight='500' style={{ marginBottom: 5 }}>
|
|
383
|
-
{t('ORDER_COMMENT', 'Order Comment')}
|
|
384
|
-
</OText>
|
|
385
|
-
<OText style={{ fontStyle: 'italic', opacity: 0.6, marginBottom: 20 }}>
|
|
386
|
-
{order?.comment}
|
|
387
|
-
</OText>
|
|
388
|
-
</>
|
|
389
|
-
)}
|
|
390
418
|
</View>
|
|
391
419
|
)}
|
|
392
|
-
{!order?.user_review && pastOrderStatuses.includes(order?.status) && (
|
|
420
|
+
{!order?.user_review && pastOrderStatuses.includes(order?.status) && order?.customer_id && (
|
|
393
421
|
<OButton
|
|
394
422
|
style={styles.btnReview}
|
|
395
423
|
textStyle={{ color: theme.colors.white }}
|
|
@@ -401,10 +429,16 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
401
429
|
</OrderCustomer>
|
|
402
430
|
|
|
403
431
|
<OrderProducts>
|
|
404
|
-
<OText style={{ marginBottom:
|
|
432
|
+
<OText style={{ marginBottom: 10 }} size={16} weight="600">
|
|
405
433
|
{t('ORDER_DETAILS', 'Order Details')}
|
|
406
434
|
</OText>
|
|
407
435
|
|
|
436
|
+
{!!order?.comment && (
|
|
437
|
+
<OText>
|
|
438
|
+
{`${t('ORDER_COMMENT', 'Order Comment')}: ${order?.comment}`}
|
|
439
|
+
</OText>
|
|
440
|
+
)}
|
|
441
|
+
|
|
408
442
|
{order?.products?.length > 0 &&
|
|
409
443
|
order?.products.map((product: any, i: number) => (
|
|
410
444
|
<ProductItemAccordion
|
|
@@ -523,7 +557,7 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
523
557
|
))
|
|
524
558
|
}
|
|
525
559
|
{
|
|
526
|
-
order?.summary?.delivery_price
|
|
560
|
+
typeof order?.summary?.delivery_price === 'number' && order.delivery_type !== 2 && (
|
|
527
561
|
<Table>
|
|
528
562
|
<OText mBottom={4}>
|
|
529
563
|
{t('DELIVERY_FEE', 'Delivery Fee')}
|
|
@@ -550,15 +584,14 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
550
584
|
</Table>
|
|
551
585
|
))
|
|
552
586
|
}
|
|
553
|
-
{order?.summary?.driver_tip > 0 && (
|
|
587
|
+
{(order?.summary?.driver_tip > 0 || order?.driver_tip > 0) && order.delivery_type !== 2 && (
|
|
554
588
|
<Table>
|
|
555
589
|
<OText mBottom={4}>
|
|
556
590
|
{t('DRIVER_TIP', 'Driver tip')}
|
|
557
|
-
{order?.
|
|
558
|
-
parseInt(configs?.driver_tip_type?.value, 10) === 2 &&
|
|
591
|
+
{order?.driver_tip > 0 && parseInt(configs?.driver_tip_type?.value, 10) === 2 &&
|
|
559
592
|
!parseInt(configs?.driver_tip_use_custom?.value, 10) &&
|
|
560
593
|
(
|
|
561
|
-
`(${verifyDecimals(order?.
|
|
594
|
+
`(${verifyDecimals(order?.driver_tip, parseNumber)}%)`
|
|
562
595
|
)}
|
|
563
596
|
</OText>
|
|
564
597
|
<OText mBottom={4}>{parsePrice(order?.summary?.driver_tip ?? order?.totalDriverTip, { currency: order?.currency })}</OText>
|
|
@@ -609,13 +642,12 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
609
642
|
<OText>
|
|
610
643
|
{event?.wallet_event
|
|
611
644
|
? walletName[event?.wallet_event?.wallet?.type]?.name
|
|
612
|
-
:
|
|
645
|
+
: event?.paymethod?.gateway
|
|
646
|
+
? t(event?.paymethod?.gateway?.toUpperCase(), event?.paymethod?.name)
|
|
647
|
+
: order?.paymethod?.id === event?.paymethod_id
|
|
648
|
+
? t(order?.paymethod?.gateway?.toUpperCase(), order?.paymethod?.name)
|
|
649
|
+
: ''}
|
|
613
650
|
</OText>
|
|
614
|
-
{event?.data?.charge_id && (
|
|
615
|
-
<OText>
|
|
616
|
-
{`${t('CODE', 'Code')}: ${event?.data?.charge_id}`}
|
|
617
|
-
</OText>
|
|
618
|
-
)}
|
|
619
651
|
</View>
|
|
620
652
|
<OText>
|
|
621
653
|
{(event?.paymethod?.gateway === 'cash' && order?.cash)
|
|
@@ -22,6 +22,7 @@ import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityI
|
|
|
22
22
|
import {
|
|
23
23
|
useLanguage,
|
|
24
24
|
useUtils,
|
|
25
|
+
useConfig
|
|
25
26
|
} from 'ordering-components/native';
|
|
26
27
|
|
|
27
28
|
interface OrderHeader {
|
|
@@ -49,7 +50,10 @@ export const OrderHeaderComponent = (props: OrderHeader) => {
|
|
|
49
50
|
} = props
|
|
50
51
|
const theme = useTheme();
|
|
51
52
|
const [, t] = useLanguage();
|
|
52
|
-
const [
|
|
53
|
+
const [configState] = useConfig()
|
|
54
|
+
const [{ parseDate, parsePrice }] = useUtils();
|
|
55
|
+
const paymethodsLength = order?.payment_events?.filter((item: any) => item.event === 'payment')?.length
|
|
56
|
+
const showExternalId = configState?.configs?.change_order_id?.value === '1'
|
|
53
57
|
|
|
54
58
|
const styles = StyleSheet.create({
|
|
55
59
|
icons: {
|
|
@@ -120,6 +124,30 @@ export const OrderHeaderComponent = (props: OrderHeader) => {
|
|
|
120
124
|
? t('CURBSIDE', 'Curbside')
|
|
121
125
|
: t('DRIVER_THRU', 'Driver thru')
|
|
122
126
|
|
|
127
|
+
const handlePaymethodsListString = () => {
|
|
128
|
+
const paymethodsList = order?.payment_events?.filter((item: any) => item.event === 'payment').map((paymethod: any) => {
|
|
129
|
+
return paymethod?.wallet_event
|
|
130
|
+
? walletName[paymethod?.wallet_event?.wallet?.type]?.name
|
|
131
|
+
: paymethod?.paymethod?.gateway && paymethod?.paymethod?.gateway === 'cash' && order?.cash > 0
|
|
132
|
+
? `${t(paymethod?.paymethod?.gateway?.toUpperCase(), paymethod?.paymethod?.name)} (${t('CASH_CHANGE_OF', 'Change of :amount:').replace(':amount:', parsePrice(order?.cash))})`
|
|
133
|
+
: paymethod?.paymethod?.gateway
|
|
134
|
+
? t(paymethod?.paymethod?.gateway?.toUpperCase(), paymethod?.paymethod?.name)
|
|
135
|
+
: t(order?.paymethod?.gateway?.toUpperCase(), order?.paymethod?.name)
|
|
136
|
+
})
|
|
137
|
+
return paymethodsList.join(', ')
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const deliveryDate = () => {
|
|
141
|
+
const dateString = order?.delivery_datetime_utc ?? order?.delivery_datetime
|
|
142
|
+
const currentDate = new Date();
|
|
143
|
+
const receivedDate: any = new Date(order?.delivery_datetime);
|
|
144
|
+
|
|
145
|
+
const formattedDate = receivedDate <= currentDate
|
|
146
|
+
? `${t('ASAP_ABBREVIATION', 'ASAP')}(${parseDate(dateString, { utc: !!order?.delivery_datetime_utc })})`
|
|
147
|
+
: parseDate(dateString, { utc: !!order?.delivery_datetime_utc })
|
|
148
|
+
return formattedDate
|
|
149
|
+
}
|
|
150
|
+
|
|
123
151
|
return (
|
|
124
152
|
<>
|
|
125
153
|
{!props.isCustomView && (
|
|
@@ -140,14 +168,16 @@ export const OrderHeaderComponent = (props: OrderHeader) => {
|
|
|
140
168
|
style={styles.icons}
|
|
141
169
|
/>
|
|
142
170
|
</TouchableOpacity>
|
|
143
|
-
|
|
144
|
-
<
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
171
|
+
{!!handleViewSummaryOrder && (
|
|
172
|
+
<TouchableOpacity onPress={() => handleViewSummaryOrder?.()}>
|
|
173
|
+
<SimpleLineIcons
|
|
174
|
+
name='printer'
|
|
175
|
+
color={theme.colors.textGray}
|
|
176
|
+
size={20}
|
|
177
|
+
style={styles.icons}
|
|
178
|
+
/>
|
|
179
|
+
</TouchableOpacity>
|
|
180
|
+
)}
|
|
151
181
|
</>
|
|
152
182
|
)}
|
|
153
183
|
<OIconButton
|
|
@@ -180,16 +210,12 @@ export const OrderHeaderComponent = (props: OrderHeader) => {
|
|
|
180
210
|
<OrderHeader>
|
|
181
211
|
{!props.isCustomView ? (
|
|
182
212
|
<OText size={13} style={{ marginBottom: 5 }}>
|
|
183
|
-
{
|
|
184
|
-
? parseDate(order?.delivery_datetime_utc)
|
|
185
|
-
: parseDate(order?.delivery_datetime, { utc: false })}
|
|
213
|
+
{deliveryDate()}
|
|
186
214
|
</OText>
|
|
187
215
|
) : (
|
|
188
216
|
<Header style={{ alignItems: 'center' }}>
|
|
189
217
|
<OText size={13} style={{ marginBottom: 5 }}>
|
|
190
|
-
{
|
|
191
|
-
? parseDate(order?.delivery_datetime_utc)
|
|
192
|
-
: parseDate(order?.delivery_datetime, { utc: false })}
|
|
218
|
+
{deliveryDate()}
|
|
193
219
|
</OText>
|
|
194
220
|
|
|
195
221
|
{(!order?.isLogistic || (!logisticOrderStatus?.includes(order?.status) && !order?.order_group)) && (
|
|
@@ -205,14 +231,16 @@ export const OrderHeaderComponent = (props: OrderHeader) => {
|
|
|
205
231
|
style={styles.icons}
|
|
206
232
|
/>
|
|
207
233
|
</TouchableOpacity>
|
|
208
|
-
|
|
209
|
-
<
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
234
|
+
{!!handleViewSummaryOrder && (
|
|
235
|
+
<TouchableOpacity onPress={() => handleViewSummaryOrder?.()}>
|
|
236
|
+
<SimpleLineIcons
|
|
237
|
+
name='printer'
|
|
238
|
+
color={theme.colors.textGray}
|
|
239
|
+
size={20}
|
|
240
|
+
style={styles.icons}
|
|
241
|
+
/>
|
|
242
|
+
</TouchableOpacity>
|
|
243
|
+
)}
|
|
216
244
|
</>
|
|
217
245
|
)}
|
|
218
246
|
<OIconButton
|
|
@@ -245,7 +273,7 @@ export const OrderHeaderComponent = (props: OrderHeader) => {
|
|
|
245
273
|
|
|
246
274
|
<OText numberOfLines={2} size={20} weight="600">
|
|
247
275
|
<>
|
|
248
|
-
{`${t('INVOICE_ORDER_NO', 'Order No.')} ${order?.id} `}
|
|
276
|
+
{`${t('INVOICE_ORDER_NO', 'Order No.')} ${showExternalId ? order?.external_id || order?.id : order?.id} `}
|
|
249
277
|
{!order?.isLogistic && (!order?.order_group_id || !logisticOrderStatus?.includes(order?.status)) && (
|
|
250
278
|
<>
|
|
251
279
|
{t('IS', 'is')}{' '}
|
|
@@ -259,7 +287,13 @@ export const OrderHeaderComponent = (props: OrderHeader) => {
|
|
|
259
287
|
)}
|
|
260
288
|
</>
|
|
261
289
|
</OText>
|
|
262
|
-
{
|
|
290
|
+
{order?.external_id && !showExternalId && (
|
|
291
|
+
<OText size={13}>
|
|
292
|
+
<OText size={13} weight='bold'>{`${t('EXTERNAL_ID', 'External ID :')} `}</OText>
|
|
293
|
+
{order?.external_id}
|
|
294
|
+
</OText>
|
|
295
|
+
)}
|
|
296
|
+
{!order?.isLogistic && !!order?.delivery_type && (!order?.order_group_id || !logisticOrderStatus?.includes(order?.status)) && (
|
|
263
297
|
<>
|
|
264
298
|
<OText size={13}>
|
|
265
299
|
<OText size={13} weight='bold'>{`${t('ORDER_TYPE', 'Order Type')}: `}</OText>
|
|
@@ -271,23 +305,27 @@ export const OrderHeaderComponent = (props: OrderHeader) => {
|
|
|
271
305
|
{t(order?.delivery_option?.name?.toUpperCase()?.replace(/ /g, '_'), order?.delivery_option?.name)}
|
|
272
306
|
</OText>
|
|
273
307
|
)}
|
|
274
|
-
|
|
275
|
-
<
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
308
|
+
<OText>
|
|
309
|
+
<OText size={13} weight='bold'>
|
|
310
|
+
{`${t(paymethodsLength > 1 ? 'PAYMENT_METHODS' : 'PAYMENT_METHOD', paymethodsLength > 1 ? 'Payment methods' : 'Payment method')}: `}
|
|
311
|
+
</OText>
|
|
312
|
+
{order?.payment_events?.length > 0 ? (
|
|
313
|
+
<OText size={13}>{`${handlePaymethodsListString()}`}</OText>
|
|
314
|
+
) : (
|
|
315
|
+
<OText size={13}>{t(order?.paymethod?.gateway?.toUpperCase(), order?.paymethod?.name)}</OText>
|
|
316
|
+
)}
|
|
317
|
+
</OText>
|
|
318
|
+
{order?.spot_number && (
|
|
319
|
+
<OText size={13}>
|
|
320
|
+
<OText size={13} weight='bold'>
|
|
321
|
+
{`${order?.delivery_type === 3
|
|
322
|
+
? t('EATIN_SPOT_NUMBER', 'Table number')
|
|
323
|
+
: order?.delivery_type === 5
|
|
324
|
+
? t('DRIVE_THRU_SPOT_NUMBER', 'Drive thru lane')
|
|
325
|
+
: t('CURBSIDE_SPOT_NUMBER', 'Spot number')}: `}
|
|
289
326
|
</OText>
|
|
290
|
-
|
|
327
|
+
{order.spot_number}
|
|
328
|
+
</OText>
|
|
291
329
|
)}
|
|
292
330
|
</>
|
|
293
331
|
)}
|