ordering-ui-react-native 0.15.79 → 0.15.80-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 +7 -3
- package/src/DeliveryApp.tsx +43 -1
- package/src/components/ActiveOrders/index.tsx +61 -63
- package/src/components/ActiveOrders/styles.tsx +1 -1
- package/src/components/AddressForm/index.tsx +18 -2
- package/src/components/BusinessBasicInformation/index.tsx +11 -19
- package/src/components/BusinessController/index.tsx +16 -8
- package/src/components/BusinessInformation/index.tsx +14 -0
- package/src/components/BusinessTypeFilter/index.tsx +1 -2
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/Checkout/index.tsx +25 -3
- package/src/components/DriverTips/index.tsx +11 -6
- package/src/components/LanguageSelector/index.tsx +6 -2
- package/src/components/LoginForm/index.tsx +120 -30
- package/src/components/LoginForm/styles.tsx +6 -0
- package/src/components/NotificationSetting/index.tsx +85 -0
- package/src/components/OrderDetails/index.tsx +7 -21
- package/src/components/PaymentOptions/index.tsx +335 -365
- package/src/components/PaymentOptionsWebView/index.tsx +120 -121
- package/src/components/ReviewDriver/index.tsx +1 -1
- package/src/components/ReviewOrder/index.tsx +2 -1
- package/src/components/ReviewProducts/index.tsx +11 -0
- package/src/components/SignupForm/index.tsx +145 -61
- package/src/components/SingleProductCard/index.tsx +16 -4
- package/src/components/SingleProductReview/index.tsx +1 -1
- package/src/components/StripeElementsForm/index.tsx +25 -16
- package/src/components/StripeMethodForm/index.tsx +22 -24
- package/src/components/UpsellingProducts/index.tsx +1 -1
- package/src/components/UserProfileForm/index.tsx +63 -6
- package/src/components/UserProfileForm/styles.tsx +8 -0
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/components/shared/OBottomPopup.tsx +6 -2
- package/src/components/shared/OModal.tsx +1 -1
- package/src/hooks/useCountdownTimer.tsx +26 -0
- package/src/index.tsx +2 -0
- package/src/navigators/CheckoutNavigator.tsx +6 -0
- package/src/navigators/HomeNavigator.tsx +6 -0
- package/src/pages/BusinessesListing.tsx +7 -6
- package/src/pages/MultiCheckout.tsx +31 -0
- package/src/pages/MultiOrdersDetails.tsx +27 -0
- package/src/pages/OrderDetails.tsx +1 -1
- package/src/pages/ReviewDriver.tsx +2 -2
- package/src/pages/ReviewOrder.tsx +2 -2
- package/src/theme.json +0 -1
- package/src/types/index.tsx +18 -11
- package/src/utils/index.tsx +28 -29
- package/themes/business/index.tsx +4 -0
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +100 -60
- package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +1 -0
- package/themes/business/src/components/Chat/index.tsx +51 -91
- package/themes/business/src/components/DriverMap/index.tsx +6 -5
- package/themes/business/src/components/DriverSchedule/index.tsx +71 -0
- package/themes/business/src/components/DriverSchedule/styles.tsx +6 -0
- package/themes/business/src/components/LoginForm/index.tsx +89 -2
- package/themes/business/src/components/LoginForm/styles.tsx +6 -0
- package/themes/business/src/components/LogoutButton/index.tsx +1 -1
- package/themes/business/src/components/NewOrderNotification/index.tsx +26 -13
- package/themes/business/src/components/OrderDetails/Business.tsx +1 -1
- package/themes/business/src/components/OrderDetails/Delivery.tsx +28 -11
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +26 -18
- package/themes/business/src/components/OrdersListManager/index.tsx +11 -4
- package/themes/business/src/components/OrdersOption/index.tsx +16 -4
- package/themes/business/src/components/PreviousOrders/index.tsx +7 -7
- package/themes/business/src/components/ProductItemAccordion/index.tsx +5 -4
- package/themes/business/src/components/ScheduleBlocked/index.tsx +53 -0
- package/themes/business/src/components/UserFormDetails/index.tsx +5 -2
- package/themes/business/src/components/UserProfileForm/index.tsx +28 -4
- package/themes/business/src/components/shared/OModal.tsx +41 -38
- package/themes/business/src/types/index.tsx +15 -7
- 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/BusinessMenu/index.tsx +25 -26
- package/themes/kiosk/src/components/BusinessesListing/index.tsx +2 -3
- package/themes/kiosk/src/components/Cart/index.tsx +11 -12
- package/themes/kiosk/src/components/CartBottomSheet/index.tsx +9 -2
- package/themes/kiosk/src/components/CartContent/index.tsx +0 -11
- package/themes/kiosk/src/components/CartItem/index.tsx +4 -3
- package/themes/kiosk/src/components/CategoriesMenu/index.tsx +107 -62
- package/themes/kiosk/src/components/Checkout/index.tsx +40 -22
- package/themes/kiosk/src/components/CustomerName/index.tsx +0 -6
- package/themes/kiosk/src/components/DrawerView/index.tsx +1 -0
- package/themes/kiosk/src/components/DrawerView/styles.tsx +2 -2
- 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/OrderDetails/index.tsx +3 -3
- package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +9 -11
- package/themes/kiosk/src/components/PaymentOptions/index.tsx +55 -53
- package/themes/kiosk/src/components/ProductForm/index.tsx +6 -7
- package/themes/kiosk/src/components/ProductOptionSubOption/index.tsx +3 -1
- package/themes/kiosk/src/components/UpsellingProducts/index.tsx +16 -5
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/kiosk/src/types/index.d.ts +1 -0
- package/themes/original/index.tsx +24 -0
- package/themes/original/src/components/ActiveOrders/index.tsx +15 -132
- package/themes/original/src/components/ActiveOrders/styles.tsx +0 -54
- package/themes/original/src/components/AddressForm/index.tsx +7 -6
- package/themes/original/src/components/AddressList/index.tsx +2 -2
- package/themes/original/src/components/AppleLogin/index.tsx +6 -8
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +291 -150
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +6 -2
- package/themes/original/src/components/BusinessController/index.tsx +201 -96
- package/themes/original/src/components/BusinessController/styles.tsx +5 -0
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +8 -5
- package/themes/original/src/components/BusinessItemAccordion/styles.tsx +3 -1
- package/themes/original/src/components/BusinessListingSearch/index.tsx +234 -64
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +22 -2
- package/themes/original/src/components/BusinessPreorder/index.tsx +1 -1
- package/themes/original/src/components/BusinessProductsCategories/index.tsx +2 -2
- package/themes/original/src/components/BusinessProductsList/CategoryDescription/index.tsx +44 -0
- package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/index.tsx +87 -0
- package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/styles.tsx +12 -0
- package/themes/original/src/components/BusinessProductsList/index.tsx +65 -73
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +315 -176
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +11 -0
- package/themes/original/src/components/BusinessReviews/index.tsx +6 -1
- package/themes/original/src/components/BusinessTypeFilter/index.tsx +106 -38
- package/themes/original/src/components/BusinessTypeFilter/styles.tsx +2 -0
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +560 -0
- package/themes/original/src/components/BusinessesListing/{styles.tsx → Layout/Appointment/styles.tsx} +24 -2
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +661 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +137 -0
- package/themes/original/src/components/BusinessesListing/index.tsx +104 -462
- package/themes/original/src/components/Cart/index.tsx +84 -39
- package/themes/original/src/components/Cart/styles.tsx +4 -0
- package/themes/original/src/components/Checkout/index.tsx +117 -58
- package/themes/original/src/components/Checkout/styles.tsx +0 -1
- package/themes/original/src/components/DriverTips/index.tsx +17 -12
- package/themes/original/src/components/Favorite/index.tsx +92 -0
- package/themes/original/src/components/Favorite/styles.tsx +22 -0
- package/themes/original/src/components/FavoriteList/index.tsx +298 -0
- package/themes/original/src/components/FavoriteList/styles.tsx +5 -0
- package/themes/original/src/components/ForgotPasswordForm/index.tsx +84 -4
- package/themes/original/src/components/GPSButton/index.tsx +15 -8
- package/themes/original/src/components/GoogleMap/index.tsx +11 -11
- package/themes/original/src/components/Help/index.tsx +21 -4
- package/themes/original/src/components/HighestRatedBusinesses/index.tsx +18 -1
- package/themes/original/src/components/LastOrders/index.tsx +12 -1
- package/themes/original/src/components/LoginForm/Otp/index.tsx +91 -0
- package/themes/original/src/components/LoginForm/Otp/styles.tsx +7 -0
- package/themes/original/src/components/LoginForm/index.tsx +332 -164
- package/themes/original/src/components/LoginForm/styles.tsx +1 -3
- package/themes/original/src/components/Messages/index.tsx +1 -1
- package/themes/original/src/components/MomentSelector/index.tsx +197 -0
- package/themes/original/src/components/MomentSelector/styles.tsx +6 -0
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +243 -0
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/styles.tsx +46 -0
- package/themes/original/src/components/MultiCheckout/index.tsx +304 -0
- package/themes/original/src/components/MultiCheckout/styles.tsx +59 -0
- package/themes/original/src/components/MultiOrdersDetails/SingleOrderCard.tsx +372 -0
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +258 -0
- package/themes/original/src/components/MultiOrdersDetails/styles.tsx +50 -0
- package/themes/original/src/components/MyOrders/index.tsx +132 -27
- package/themes/original/src/components/MyOrders/styles.tsx +8 -1
- package/themes/original/src/components/NavBar/index.tsx +4 -4
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +167 -0
- package/themes/original/src/components/OrderDetails/index.tsx +164 -64
- package/themes/original/src/components/OrderDetails/styles.tsx +5 -2
- package/themes/original/src/components/OrderItAgain/index.tsx +72 -0
- package/themes/original/src/components/OrderItAgain/styles.tsx +10 -0
- package/themes/original/src/components/OrderSummary/index.tsx +2 -35
- package/themes/original/src/components/OrderTypeSelector/index.tsx +77 -35
- package/themes/original/src/components/OrderTypeSelector/styles.tsx +19 -1
- package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +153 -0
- package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/styles.tsx +6 -0
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +53 -0
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/styles.tsx +6 -0
- package/themes/original/src/components/OrdersOption/index.tsx +139 -46
- package/themes/original/src/components/OrdersOption/styles.tsx +4 -1
- package/themes/original/src/components/PaymentOptionCash/index.tsx +2 -2
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +15 -22
- package/themes/original/src/components/PaymentOptions/index.tsx +57 -37
- package/themes/original/src/components/PhoneInputNumber/index.tsx +5 -11
- package/themes/original/src/components/PlaceSpot/index.tsx +243 -47
- package/themes/original/src/components/PlaceSpot/styles.tsx +0 -2
- package/themes/original/src/components/PreviousOrders/index.tsx +18 -147
- package/themes/original/src/components/ProductForm/index.tsx +712 -673
- package/themes/original/src/components/ProductForm/styles.tsx +9 -7
- package/themes/original/src/components/ProductItemAccordion/index.tsx +2 -2
- package/themes/original/src/components/ProductOption/index.tsx +1 -1
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +13 -9
- package/themes/original/src/components/ProfessionalFilter/index.tsx +128 -0
- package/themes/original/src/components/ProfessionalFilter/styles.tsx +0 -0
- package/themes/original/src/components/ProfessionalProfile/index.tsx +298 -0
- package/themes/original/src/components/ProfessionalProfile/styles.tsx +46 -0
- package/themes/original/src/components/Promotions/index.tsx +145 -128
- package/themes/original/src/components/Promotions/styles.tsx +2 -0
- package/themes/original/src/components/ReviewDriver/index.tsx +6 -6
- package/themes/original/src/components/ReviewOrder/index.tsx +1 -1
- package/themes/original/src/components/ReviewTrigger/index.tsx +118 -0
- package/themes/original/src/components/ReviewTrigger/styles.tsx +34 -0
- package/themes/original/src/components/SearchBar/index.tsx +13 -5
- package/themes/original/src/components/ServiceForm/index.tsx +579 -0
- package/themes/original/src/components/ServiceForm/styles.tsx +50 -0
- package/themes/original/src/components/SignupForm/index.tsx +237 -126
- package/themes/original/src/components/SingleOrderCard/index.tsx +316 -0
- package/themes/original/src/components/SingleOrderCard/styles.tsx +54 -0
- package/themes/original/src/components/SingleProductCard/index.tsx +220 -94
- package/themes/original/src/components/SingleProductCard/styles.tsx +2 -2
- package/themes/original/src/components/StripeElementsForm/index.tsx +25 -9
- package/themes/original/src/components/StripeElementsForm/naked.tsx +2 -2
- package/themes/original/src/components/UpsellingProducts/index.tsx +2 -6
- package/themes/original/src/components/UserDetails/index.tsx +32 -18
- package/themes/original/src/components/UserFormDetails/index.tsx +108 -74
- package/themes/original/src/components/UserProfile/index.tsx +5 -1
- package/themes/original/src/components/UserProfileForm/index.tsx +14 -9
- package/themes/original/src/components/UserVerification/index.tsx +178 -192
- package/themes/original/src/components/Wallets/index.tsx +2 -2
- package/themes/original/src/components/shared/OBottomPopup.tsx +47 -14
- package/themes/original/src/components/shared/OButton.tsx +2 -0
- package/themes/original/src/components/shared/OInput.tsx +3 -2
- package/themes/original/src/components/shared/OModal.tsx +4 -2
- package/themes/original/src/layouts/FloatingBottomContainer.tsx +5 -1
- package/themes/original/src/types/index.tsx +208 -44
- package/themes/original/src/utils/index.tsx +94 -1
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
|
@@ -110,7 +110,6 @@ const CartUI = (props: any) => {
|
|
|
110
110
|
<NavBar
|
|
111
111
|
title={t('CONFIRM_YOUR_ORDER', 'Confirm your order')}
|
|
112
112
|
onActionLeft={goToBack}
|
|
113
|
-
style={{ height: orientationState?.dimensions?.height * 0.08 }}
|
|
114
113
|
btnStyle={{ paddingLeft: 0 }}
|
|
115
114
|
rightComponent={(
|
|
116
115
|
<OButton
|
|
@@ -238,8 +237,8 @@ const CartUI = (props: any) => {
|
|
|
238
237
|
</OSTable>
|
|
239
238
|
)}
|
|
240
239
|
{
|
|
241
|
-
cart?.offers?.length > 0 && cart?.offers?.filter((offer: any) => offer?.target === 1)?.map((offer: any) => (
|
|
242
|
-
<OSTable key={offer
|
|
240
|
+
cart?.offers?.length > 0 && cart?.offers?.filter((offer: any) => offer?.target === 1)?.map((offer: any, i: number) => (
|
|
241
|
+
<OSTable key={`${offer?.id}_${i}`}>
|
|
243
242
|
<OSRow>
|
|
244
243
|
<OText>{offer.name}</OText>
|
|
245
244
|
{offer.rate_type === 1 && (
|
|
@@ -263,8 +262,8 @@ const CartUI = (props: any) => {
|
|
|
263
262
|
</OSTable>
|
|
264
263
|
)}
|
|
265
264
|
{
|
|
266
|
-
cart.taxes?.length > 0 && cart.taxes.filter((tax: any) => tax.type === 2 && tax?.rate !== 0).map((tax: any) => (
|
|
267
|
-
<OSTable key={tax
|
|
265
|
+
cart.taxes?.length > 0 && cart.taxes.filter((tax: any) => tax.type === 2 && tax?.rate !== 0).map((tax: any, i: number) => (
|
|
266
|
+
<OSTable key={`${tax?.id}_${i}`}>
|
|
268
267
|
<OSRow>
|
|
269
268
|
<OText>
|
|
270
269
|
{tax.name || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}{' '}
|
|
@@ -276,12 +275,12 @@ const CartUI = (props: any) => {
|
|
|
276
275
|
))
|
|
277
276
|
}
|
|
278
277
|
{
|
|
279
|
-
cart?.fees?.length > 0 && cart?.fees?.filter((fee: any) => !(fee.fixed === 0 && fee.percentage === 0)).map((fee: any) => (
|
|
280
|
-
<OSTable key={fee?.id}>
|
|
278
|
+
cart?.fees?.length > 0 && cart?.fees?.filter((fee: any) => !(fee.fixed === 0 && fee.percentage === 0)).map((fee: any, i: number) => (
|
|
279
|
+
<OSTable key={`${fee?.id}_${i}`}>
|
|
281
280
|
<OSRow>
|
|
282
281
|
<OText>
|
|
283
282
|
{fee.name || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}{' '}
|
|
284
|
-
({fee?.fixed > 0 && `${parsePrice(fee?.fixed)} + `}{fee.percentage}
|
|
283
|
+
({fee?.fixed > 0 && `${parsePrice(fee?.fixed)}${fee.percentage > 0 ? ' + ' : ''}`}{fee.percentage > 0 && `${fee.percentage}%`}){' '}
|
|
285
284
|
</OText>
|
|
286
285
|
</OSRow>
|
|
287
286
|
<OText>{parsePrice(fee?.summary?.fixed + (fee?.summary?.percentage_after_discount ?? fee?.summary?.percentage) ?? 0)}</OText>
|
|
@@ -289,8 +288,8 @@ const CartUI = (props: any) => {
|
|
|
289
288
|
))
|
|
290
289
|
}
|
|
291
290
|
{
|
|
292
|
-
cart?.offers?.length > 0 && cart?.offers?.filter((offer: any) => offer?.target === 3)?.map((offer: any) => (
|
|
293
|
-
<OSTable key={offer
|
|
291
|
+
cart?.offers?.length > 0 && cart?.offers?.filter((offer: any) => offer?.target === 3)?.map((offer: any, i: number) => (
|
|
292
|
+
<OSTable key={`${offer?.id}_${i}`}>
|
|
294
293
|
<OSRow>
|
|
295
294
|
<OText>{offer.name}</OText>
|
|
296
295
|
{offer.rate_type === 1 && (
|
|
@@ -310,8 +309,8 @@ const CartUI = (props: any) => {
|
|
|
310
309
|
</OSTable>
|
|
311
310
|
)}
|
|
312
311
|
{
|
|
313
|
-
cart?.offers?.length > 0 && cart?.offers?.filter((offer: any) => offer?.target === 2)?.map((offer: any) => (
|
|
314
|
-
<OSTable key={offer
|
|
312
|
+
cart?.offers?.length > 0 && cart?.offers?.filter((offer: any) => offer?.target === 2)?.map((offer: any, i: number) => (
|
|
313
|
+
<OSTable key={`${offer?.id}_${i}`}>
|
|
315
314
|
<OSRow>
|
|
316
315
|
<OText>{offer.name}</OText>
|
|
317
316
|
{offer.rate_type === 1 && (
|
|
@@ -62,6 +62,10 @@ const CartBottomSheetUI = (props: CartBottomSheetUIProps): React.ReactElement |
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
const handleEditProduct = (product: any) => {
|
|
65
|
+
if (props.onEditProduct) {
|
|
66
|
+
props.onEditProduct(product)
|
|
67
|
+
return
|
|
68
|
+
}
|
|
65
69
|
setCurProduct(product)
|
|
66
70
|
setModalIsOpen(true)
|
|
67
71
|
}
|
|
@@ -148,7 +152,7 @@ const CartBottomSheetUI = (props: CartBottomSheetUIProps): React.ReactElement |
|
|
|
148
152
|
<StyledBottomContent
|
|
149
153
|
style={{bottom:10}}
|
|
150
154
|
minHeight={props.height * 0.01}
|
|
151
|
-
>
|
|
155
|
+
>
|
|
152
156
|
<OButton
|
|
153
157
|
text={(cart?.subtotal >= cart?.minimum || !cart?.minimum) && cart?.valid_address ? (
|
|
154
158
|
!openUpselling !== canOpenUpselling ? `${t('CHECKOUT', 'Checkout')} ${parsePrice(cart?.total)}`: t('LOADING', 'Loading')
|
|
@@ -198,6 +202,7 @@ const CartBottomSheetUI = (props: CartBottomSheetUIProps): React.ReactElement |
|
|
|
198
202
|
canOpenUpselling={canOpenUpselling}
|
|
199
203
|
setCanOpenUpselling={setCanOpenUpselling}
|
|
200
204
|
onClose={onCloseUpselling}
|
|
205
|
+
onAddProduct={props.onAddProduct}
|
|
201
206
|
resetInactivityTimeout={resetInactivityTimeout}
|
|
202
207
|
/>
|
|
203
208
|
)}
|
|
@@ -231,7 +236,7 @@ const TopBar = (props:any) => {
|
|
|
231
236
|
<OIconButton
|
|
232
237
|
bgColor="transparent"
|
|
233
238
|
borderColor="transparent"
|
|
234
|
-
RenderIcon={() =>
|
|
239
|
+
RenderIcon={() =>
|
|
235
240
|
<EvilIcons
|
|
236
241
|
name={'close'}
|
|
237
242
|
size={40}
|
|
@@ -260,6 +265,8 @@ interface CartBottomSheetUIProps {
|
|
|
260
265
|
onNavigationRedirect: any,
|
|
261
266
|
clearInactivityTimeout: any,
|
|
262
267
|
resetInactivityTimeout: any,
|
|
268
|
+
onEditProduct: any,
|
|
269
|
+
onAddProduct: any,
|
|
263
270
|
}
|
|
264
271
|
|
|
265
272
|
export const CartBottomSheet = (props: any) => {
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { useLanguage } from 'ordering-components/native';
|
|
3
2
|
import { useCartBottomSheet } from '../../providers/CartBottomSheetProvider';
|
|
4
|
-
import { CCNotCarts } from './styles';
|
|
5
3
|
|
|
6
4
|
import { Cart } from '../Cart';
|
|
7
|
-
import { OText } from '../shared';
|
|
8
5
|
import Spinner from 'react-native-loading-spinner-overlay';
|
|
9
6
|
import { Cart as TypeCart } from '../../types';
|
|
10
7
|
|
|
@@ -20,7 +17,6 @@ export const CartContent = (props: any) => {
|
|
|
20
17
|
resetInactivityTimeout,
|
|
21
18
|
}: Props = props
|
|
22
19
|
|
|
23
|
-
const [, t] = useLanguage()
|
|
24
20
|
const [isCartsLoading, setIsCartsLoading] = useState(false)
|
|
25
21
|
const [, { hideCartBottomSheet }] = useCartBottomSheet();
|
|
26
22
|
|
|
@@ -56,13 +52,6 @@ export const CartContent = (props: any) => {
|
|
|
56
52
|
}
|
|
57
53
|
</>
|
|
58
54
|
)}
|
|
59
|
-
{/* {(!cart && showNotFound) && (
|
|
60
|
-
<CCNotCarts>
|
|
61
|
-
<OText size={24} style={{ textAlign: 'center' }}>
|
|
62
|
-
{t('CARTS_NOT_FOUND', 'You don\'t have carts available')}
|
|
63
|
-
</OText>
|
|
64
|
-
</CCNotCarts>
|
|
65
|
-
)} */}
|
|
66
55
|
<Spinner visible={isCartsLoading} />
|
|
67
56
|
</>
|
|
68
57
|
)
|
|
@@ -56,9 +56,10 @@ const CartItem = (props: CartItemProps) => {
|
|
|
56
56
|
return product
|
|
57
57
|
}
|
|
58
58
|
const isProductIngredients = productInfo()?.ingredients.length > 0 || productInfo()?.options.length > 0 || product?.comment
|
|
59
|
-
const getFormattedSubOptionName = ({ quantity, name, position, price }: { quantity: number, name: string, position: string, price:
|
|
59
|
+
const getFormattedSubOptionName = ({ quantity, name, position, price }: { quantity: number, name: string, position: string, price: any }) => {
|
|
60
60
|
const pos = position ? `(${position})` : ''
|
|
61
|
-
|
|
61
|
+
const str = `${quantity} x ${name} ${pos}`
|
|
62
|
+
return price ? `${str} ${price}` : str
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
return (
|
|
@@ -184,7 +185,7 @@ const CartItem = (props: CartItemProps) => {
|
|
|
184
185
|
quantity: suboption.quantity,
|
|
185
186
|
name: suboption.name,
|
|
186
187
|
position: (suboption.position !== 'whole') ? t(suboption.position.toUpperCase(), suboption.position) : '',
|
|
187
|
-
price: parsePrice(suboption.price)
|
|
188
|
+
price: suboption.price > 0 && `+${parsePrice(suboption.price)}`
|
|
188
189
|
})}
|
|
189
190
|
</OText>
|
|
190
191
|
</ProductSubOption>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useCallback, useState } from 'react';
|
|
2
2
|
import { Dimensions, Platform, View } from 'react-native';
|
|
3
3
|
import { useLanguage, useOrder, useUtils } from 'ordering-components/native';
|
|
4
4
|
import MaterialIcon from 'react-native-vector-icons/MaterialCommunityIcons'
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
OText
|
|
13
13
|
} from '../../components/shared';
|
|
14
14
|
import { CartBottomSheet } from '../../components/CartBottomSheet';
|
|
15
|
+
import { NotFoundSource } from '../NotFoundSource';
|
|
15
16
|
import { Category } from '../../types';
|
|
16
17
|
import { CartContent } from '../../components/CartContent';
|
|
17
18
|
import { TouchableOpacity } from 'react-native-gesture-handler';
|
|
@@ -40,20 +41,22 @@ const CategoriesMenu = (props: any): React.ReactElement => {
|
|
|
40
41
|
|
|
41
42
|
const theme = useTheme()
|
|
42
43
|
const [, t] = useLanguage();
|
|
43
|
-
const [curIndexCateg, setIndexCateg] = useState(categories.indexOf(category));
|
|
44
44
|
const [{ parsePrice }] = useUtils();
|
|
45
45
|
const [orientationState] = useDeviceOrientation();
|
|
46
46
|
const [bottomSheetVisibility, { showCartBottomSheet, hideCartBottomSheet }] = useCartBottomSheet();
|
|
47
|
-
|
|
47
|
+
|
|
48
|
+
const [productState, setProductState] = useState<any>(null)
|
|
49
|
+
const [productSelected, setProductSelected] = useState<any>({})
|
|
50
|
+
const [curIndexCateg, setIndexCateg] = useState(categories.indexOf(category));
|
|
48
51
|
const [drawerState, setDrawerState] = useState({ isOpen: false, data: { order: null } });
|
|
49
52
|
|
|
50
53
|
const width_dimension = Dimensions.get('window').width;
|
|
51
54
|
const height_dimension = Dimensions.get('window').height;
|
|
52
|
-
|
|
55
|
+
|
|
53
56
|
const KeyboardView = styled.KeyboardAvoidingView`
|
|
54
57
|
flex: 1;
|
|
55
58
|
`;
|
|
56
|
-
|
|
59
|
+
|
|
57
60
|
const onChangeTabs = (idx: number) => {
|
|
58
61
|
resetInactivityTimeout();
|
|
59
62
|
setIndexCateg(idx);
|
|
@@ -75,6 +78,16 @@ const CategoriesMenu = (props: any): React.ReactElement => {
|
|
|
75
78
|
cart = cartsList?.find((item: any) => item.business_id == businessId);
|
|
76
79
|
}
|
|
77
80
|
|
|
81
|
+
const onEditProduct = (product: any) => {
|
|
82
|
+
setProductSelected({ ...product, _isEditProduct: true })
|
|
83
|
+
setDrawerValues({ isOpen: true, data: null })
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const onAddProduct = (product: any) => {
|
|
87
|
+
setProductSelected(product)
|
|
88
|
+
setDrawerValues({ isOpen: true, data: null })
|
|
89
|
+
}
|
|
90
|
+
|
|
78
91
|
const cartProps = {
|
|
79
92
|
...props,
|
|
80
93
|
cart,
|
|
@@ -87,16 +100,32 @@ const CategoriesMenu = (props: any): React.ReactElement => {
|
|
|
87
100
|
visible: bottomSheetVisibility,
|
|
88
101
|
clearInactivityTimeout,
|
|
89
102
|
resetInactivityTimeout,
|
|
103
|
+
onEditProduct,
|
|
104
|
+
onAddProduct
|
|
90
105
|
},
|
|
91
106
|
showNotFound: false,
|
|
92
107
|
showCartBottomSheet,
|
|
93
108
|
}
|
|
94
109
|
|
|
110
|
+
const onClickDrawer = () => {
|
|
111
|
+
setDrawerValues({ isOpen: !drawerState.isOpen, data: null })
|
|
112
|
+
setProductState(null)
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const onSaveProductForm = () => {
|
|
116
|
+
showCartBottomSheet()
|
|
117
|
+
onClickDrawer()
|
|
118
|
+
}
|
|
119
|
+
|
|
95
120
|
const onToggleCart = () => {
|
|
96
121
|
if (bottomSheetVisibility) hideCartBottomSheet();
|
|
97
122
|
else showCartBottomSheet();
|
|
98
123
|
}
|
|
99
124
|
|
|
125
|
+
const onProductStateChange = useCallback((val: any) => {
|
|
126
|
+
setProductState({ ...productState, ...val })
|
|
127
|
+
}, [setProductState])
|
|
128
|
+
|
|
100
129
|
return (
|
|
101
130
|
<>
|
|
102
131
|
<View style={{
|
|
@@ -112,44 +141,46 @@ const CategoriesMenu = (props: any): React.ReactElement => {
|
|
|
112
141
|
}}
|
|
113
142
|
>
|
|
114
143
|
<Container nopadding nestedScrollEnabled>
|
|
115
|
-
<View style={{ paddingTop: 20 }}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
144
|
+
{Platform.OS === 'android' && (<View style={{ paddingTop: 20 }} />)}
|
|
145
|
+
<NavBar
|
|
146
|
+
title={categories[curIndexCateg].name}
|
|
147
|
+
onActionLeft={goToBack}
|
|
148
|
+
rightComponent={cart && (
|
|
149
|
+
<TouchableOpacity
|
|
150
|
+
style={{ paddingHorizontal: 20, flexDirection: 'row', alignItems: 'center' }}
|
|
151
|
+
onPress={onToggleCart}
|
|
152
|
+
>
|
|
153
|
+
<OText
|
|
154
|
+
color={theme.colors.mediumGray}
|
|
123
155
|
>
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
<GridContainer
|
|
148
|
-
style={{
|
|
149
|
-
marginTop: 20,
|
|
156
|
+
{`${cart?.products?.length || 0} ${t('ITEMS', 'items')}`} {parsePrice(cart?.total || 0)} {' '}
|
|
157
|
+
</OText>
|
|
158
|
+
|
|
159
|
+
<MaterialIcon
|
|
160
|
+
name={bottomSheetVisibility ? "cart-off" : "cart-outline"}
|
|
161
|
+
color={theme.colors.primary}
|
|
162
|
+
size={30}
|
|
163
|
+
/>
|
|
164
|
+
</TouchableOpacity>
|
|
165
|
+
)}
|
|
166
|
+
/>
|
|
167
|
+
|
|
168
|
+
<OSegment
|
|
169
|
+
items={categories.map((category) => ({
|
|
170
|
+
text: category.name
|
|
171
|
+
}))}
|
|
172
|
+
selectedIdx={curIndexCateg}
|
|
173
|
+
onSelectItem={onChangeTabs}
|
|
174
|
+
/>
|
|
175
|
+
|
|
176
|
+
<GridContainer
|
|
177
|
+
style={{
|
|
178
|
+
marginTop: 20,
|
|
150
179
|
paddingLeft: orientationState?.orientation === LANDSCAPE
|
|
151
|
-
|
|
152
|
-
|
|
180
|
+
? bottomSheetVisibility
|
|
181
|
+
? orientationState?.dimensions?.width * 0.004
|
|
182
|
+
: orientationState?.dimensions?.width * 0.008
|
|
183
|
+
: 0
|
|
153
184
|
}}
|
|
154
185
|
>
|
|
155
186
|
{categories[curIndexCateg].products.map((product) => (
|
|
@@ -170,8 +201,7 @@ const CategoriesMenu = (props: any): React.ReactElement => {
|
|
|
170
201
|
onPress={() => {
|
|
171
202
|
resetInactivityTimeout()
|
|
172
203
|
if (isDrawer) {
|
|
173
|
-
|
|
174
|
-
setDrawerValues({ isOpen: true, data: null })
|
|
204
|
+
onAddProduct && onAddProduct(product)
|
|
175
205
|
} else {
|
|
176
206
|
navigation.navigate('ProductDetails', {
|
|
177
207
|
businessId,
|
|
@@ -182,26 +212,31 @@ const CategoriesMenu = (props: any): React.ReactElement => {
|
|
|
182
212
|
}}
|
|
183
213
|
/>
|
|
184
214
|
))}
|
|
215
|
+
|
|
216
|
+
{categories[curIndexCateg].products.length === 0 && (
|
|
217
|
+
<NotFoundSource
|
|
218
|
+
content={t('ERROR_NOT_FOUND_PRODUCTS_TIME', 'No products found at this time')}
|
|
219
|
+
/>
|
|
220
|
+
)}
|
|
185
221
|
</GridContainer>
|
|
186
222
|
</Container>
|
|
187
223
|
</View>
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
</View>
|
|
224
|
+
<View
|
|
225
|
+
style={{
|
|
226
|
+
flex: bottomSheetVisibility && orientationState?.orientation === PORTRAIT ? 0 : 0.8,
|
|
227
|
+
display: bottomSheetVisibility ? 'flex' : 'none'
|
|
228
|
+
}}
|
|
229
|
+
>
|
|
230
|
+
<CartContent
|
|
231
|
+
{...cartProps}
|
|
232
|
+
/>
|
|
233
|
+
</View>
|
|
199
234
|
</View>
|
|
200
235
|
<DrawerView
|
|
201
236
|
isOpen={drawerState.isOpen}
|
|
202
237
|
width={width_dimension - (width_dimension * 0.4)}
|
|
203
238
|
height={height_dimension}
|
|
204
|
-
onClickIcon={
|
|
239
|
+
onClickIcon={onClickDrawer}
|
|
205
240
|
>
|
|
206
241
|
<KeyboardView
|
|
207
242
|
enabled
|
|
@@ -209,14 +244,24 @@ const CategoriesMenu = (props: any): React.ReactElement => {
|
|
|
209
244
|
>
|
|
210
245
|
<ProductForm
|
|
211
246
|
isDrawer
|
|
212
|
-
product={productSelected}
|
|
213
|
-
businessId={parseInt(businessId, 10)}
|
|
214
|
-
businessSlug={businessSlug}
|
|
215
|
-
onSave={() => {
|
|
216
|
-
showCartBottomSheet()
|
|
217
|
-
setDrawerValues({ isOpen: !drawerState.isOpen, data: null })
|
|
218
|
-
}}
|
|
219
247
|
navigation={navigation}
|
|
248
|
+
{...(productSelected?._isEditProduct ? {
|
|
249
|
+
isEdit: true,
|
|
250
|
+
productCart: productState?.productCart ?? productSelected,
|
|
251
|
+
product: productState?.product,
|
|
252
|
+
businessSlug: cart?.business?.slug,
|
|
253
|
+
businessId: cart?.business_id,
|
|
254
|
+
categoryId: productSelected?.category_id,
|
|
255
|
+
productId: productSelected?.id,
|
|
256
|
+
} : {
|
|
257
|
+
product: productSelected,
|
|
258
|
+
businessSlug: businessSlug,
|
|
259
|
+
businessId: parseInt(businessId, 10),
|
|
260
|
+
productState: productState,
|
|
261
|
+
productCart: productState,
|
|
262
|
+
})}
|
|
263
|
+
onSave={onSaveProductForm}
|
|
264
|
+
onProductStateChange={onProductStateChange}
|
|
220
265
|
/>
|
|
221
266
|
</KeyboardView>
|
|
222
267
|
</DrawerView>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
|
-
|
|
2
|
+
import { _retrieveStoreData } from '../../../../../src/providers/StoreUtil';
|
|
3
3
|
import {
|
|
4
4
|
Checkout as CheckoutController,
|
|
5
5
|
useOrder,
|
|
@@ -35,28 +35,46 @@ const CheckoutUI = (props: any) => {
|
|
|
35
35
|
} = props
|
|
36
36
|
|
|
37
37
|
const [errorCash, setErrorCash] = useState(false);
|
|
38
|
+
const [customerName, setCustomerName] = useState(null);
|
|
39
|
+
|
|
40
|
+
const getCustomerName = async () => {
|
|
41
|
+
const data = await _retrieveStoreData('customer_name');
|
|
42
|
+
setCustomerName(data?.customerName)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
if (!cartState.loading && cart && !cart?.valid && cart?.status === 2) {
|
|
47
|
+
navigation?.canGoBack() && navigation.goBack()
|
|
48
|
+
} else {
|
|
49
|
+
getCustomerName()
|
|
50
|
+
}
|
|
51
|
+
}, [cart])
|
|
52
|
+
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
if (!cartState.loading && cart && !cart?.valid && cart?.status === 2) {
|
|
55
|
+
navigation?.canGoBack() && navigation.goBack()
|
|
56
|
+
}
|
|
57
|
+
}, [cart])
|
|
38
58
|
|
|
39
59
|
return (
|
|
40
60
|
<>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
/>
|
|
59
|
-
)}
|
|
61
|
+
<PaymentOptions
|
|
62
|
+
navigation={navigation}
|
|
63
|
+
cart={cart}
|
|
64
|
+
errors={errors}
|
|
65
|
+
customerName={customerName}
|
|
66
|
+
onPaymentChange={handlePaymethodChange}
|
|
67
|
+
onNavigationRedirect={onNavigationRedirect}
|
|
68
|
+
paySelected={paymethodSelected}
|
|
69
|
+
handlerClickPlaceOrder={handlerClickPlaceOrder}
|
|
70
|
+
placing={placing}
|
|
71
|
+
errorCash={errorCash}
|
|
72
|
+
isDisabled={cart?.status === 2}
|
|
73
|
+
businessId={businessDetails?.business?.id}
|
|
74
|
+
isLoading={cartState.loading || businessDetails.loading}
|
|
75
|
+
paymethods={businessDetails?.business?.paymethods}
|
|
76
|
+
setErrorCash={setErrorCash}
|
|
77
|
+
/>
|
|
60
78
|
</>
|
|
61
79
|
)
|
|
62
80
|
}
|
|
@@ -107,7 +125,7 @@ export const Checkout = (props: any) => {
|
|
|
107
125
|
loading: false,
|
|
108
126
|
cart: result
|
|
109
127
|
})
|
|
110
|
-
} catch (error) {
|
|
128
|
+
} catch (error: any) {
|
|
111
129
|
showToast(ToastType.Error, error?.toString() || error.message)
|
|
112
130
|
}
|
|
113
131
|
} else {
|
|
@@ -119,7 +137,7 @@ export const Checkout = (props: any) => {
|
|
|
119
137
|
error: cart ? null : result
|
|
120
138
|
})
|
|
121
139
|
}
|
|
122
|
-
} catch (e) {
|
|
140
|
+
} catch (e: any) {
|
|
123
141
|
setCartState({
|
|
124
142
|
...cartState,
|
|
125
143
|
loading: false,
|
|
@@ -113,12 +113,6 @@ const CustomerName = (props: Props): React.ReactElement => {
|
|
|
113
113
|
style={{ bottom: 20 }}
|
|
114
114
|
>
|
|
115
115
|
{t('WHATS_YOUR_NAME', "What's your name?")}
|
|
116
|
-
{/* <OText
|
|
117
|
-
size={orientationState?.dimensions?.width * 0.05}
|
|
118
|
-
weight={'700'}
|
|
119
|
-
>
|
|
120
|
-
{`${t('ORDER_BE_FOR', 'order be for?')}`}
|
|
121
|
-
</OText> */}
|
|
122
116
|
</OText>
|
|
123
117
|
<Controller
|
|
124
118
|
control={control}
|
|
@@ -19,12 +19,12 @@ export const WrapperFloatBtn = styled.View`
|
|
|
19
19
|
top: 10%;
|
|
20
20
|
right: ${(props: any) => props.outside ? 11 : 58}%;
|
|
21
21
|
z-index: 20002;
|
|
22
|
-
elevation:
|
|
22
|
+
elevation: 17;
|
|
23
23
|
`;
|
|
24
24
|
|
|
25
25
|
export const IconControl = styled.TouchableOpacity`
|
|
26
26
|
background-color: ${(props: any) => props.theme.colors.white};
|
|
27
27
|
padding: 10px;
|
|
28
28
|
border-radius: 8px;
|
|
29
|
-
elevation:
|
|
29
|
+
elevation: 17;
|
|
30
30
|
`;
|
|
@@ -4,6 +4,7 @@ import { OIcon, OButton, OText } from '../shared'
|
|
|
4
4
|
import { ImageStyle, TextStyle, View, Platform, TouchableOpacity } from 'react-native'
|
|
5
5
|
import { useConfig, useLanguage, useOrder } from 'ordering-components/native'
|
|
6
6
|
import { useTheme } from 'styled-components/native'
|
|
7
|
+
|
|
7
8
|
const Wrapper = styled.View`
|
|
8
9
|
background-color: ${(props: any) => props.theme.colors.white};
|
|
9
10
|
padding: 10px 0px 20px 0px;
|
|
@@ -65,28 +66,27 @@ const NavBar = (props: Props) => {
|
|
|
65
66
|
|
|
66
67
|
return (
|
|
67
68
|
<Wrapper style={{ paddingTop: props.paddingTop, ...props.style }}>
|
|
68
|
-
{(props?.onActionLeft) && (
|
|
69
|
+
{(props?.onActionLeft || props?.leftImg) && (
|
|
69
70
|
<OButton
|
|
70
|
-
imgLeftSrc={props.leftImg}
|
|
71
|
+
imgLeftSrc={props.leftImg || theme.images.general.arrow_left}
|
|
71
72
|
imgRightSrc={null}
|
|
72
73
|
style={{ ...btnBackArrow, ...props.btnStyle }}
|
|
73
74
|
onClick={props.onActionLeft}
|
|
74
|
-
imgLeftStyle={props.imgLeftStyle}
|
|
75
|
-
{...(!props.leftImg && { iconProps: { name: 'arrowleft', size: 28, color: props.btnStyle?.color } })}
|
|
75
|
+
imgLeftStyle= {props.imgLeftStyle}
|
|
76
76
|
/>)
|
|
77
77
|
}
|
|
78
78
|
<TitleTopWrapper>
|
|
79
79
|
{props.withIcon
|
|
80
80
|
? (
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
81
|
+
<OIcon
|
|
82
|
+
url={props.icon}
|
|
83
|
+
style={{
|
|
84
|
+
borderColor: theme.colors.lightGray,
|
|
85
|
+
borderRadius: 20,
|
|
86
|
+
}}
|
|
87
|
+
width={60}
|
|
88
|
+
height={60}
|
|
89
|
+
/>
|
|
90
90
|
)
|
|
91
91
|
: null
|
|
92
92
|
}
|
|
@@ -134,7 +134,7 @@ const NavBar = (props: Props) => {
|
|
|
134
134
|
</View>
|
|
135
135
|
)}
|
|
136
136
|
|
|
137
|
-
{props.rightComponent}
|
|
137
|
+
{ props.rightComponent }
|
|
138
138
|
</Wrapper>
|
|
139
139
|
)
|
|
140
140
|
}
|
|
@@ -395,7 +395,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
395
395
|
</View>
|
|
396
396
|
</OSTable>
|
|
397
397
|
|
|
398
|
-
{order?.products?.length && (
|
|
398
|
+
{order?.products?.length > 0 && (
|
|
399
399
|
<>
|
|
400
400
|
<View
|
|
401
401
|
style={{
|
|
@@ -525,7 +525,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
525
525
|
<OSRow>
|
|
526
526
|
<OText>
|
|
527
527
|
{fee.name || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}
|
|
528
|
-
({fee?.fixed > 0 && `${parsePrice(fee?.fixed)} + `}{fee.percentage}
|
|
528
|
+
({fee?.fixed > 0 && `${parsePrice(fee?.fixed)}${fee.percentage > 0 ? ' + ' : ''}`}{fee.percentage > 0 && `${fee.percentage}%`}){' '}
|
|
529
529
|
</OText>
|
|
530
530
|
</OSRow>
|
|
531
531
|
<OText>{parsePrice(fee?.summary?.fixed + (fee?.summary?.percentage_after_discount ?? fee?.summary?.percentage) ?? 0)}</OText>
|
|
@@ -598,7 +598,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
598
598
|
<>
|
|
599
599
|
<Spinner visible={!order || Object.keys(order).length === 0} />
|
|
600
600
|
|
|
601
|
-
{order && Object.keys(order).length > 0 && (
|
|
601
|
+
{!!order && Object.keys(order).length > 0 && (
|
|
602
602
|
<>
|
|
603
603
|
<Container>
|
|
604
604
|
<NavBar
|