ordering-ui-react-native 0.21.75-release → 0.21.76-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
CHANGED
|
@@ -225,8 +225,9 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
225
225
|
cartUuid: cart?.uuid,
|
|
226
226
|
businessLogo: cart?.business?.logo,
|
|
227
227
|
businessName: cart?.business?.name,
|
|
228
|
-
cartTotal: cart?.total
|
|
229
|
-
|
|
228
|
+
cartTotal: cart?.total,
|
|
229
|
+
fromProductsList: true
|
|
230
|
+
})
|
|
230
231
|
} else {
|
|
231
232
|
const groupKeys: any = {}
|
|
232
233
|
cartsAvailable.forEach((_cart: any) => {
|
|
@@ -242,12 +243,12 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
242
243
|
props.onNavigationRedirect('CheckoutNavigator', {
|
|
243
244
|
screen: 'MultiCheckout',
|
|
244
245
|
checkCarts: true
|
|
245
|
-
}
|
|
246
|
+
})
|
|
246
247
|
} else {
|
|
247
248
|
props.onNavigationRedirect('CheckoutNavigator', {
|
|
248
249
|
screen: 'MultiCheckout',
|
|
249
250
|
cartUuid: cartsAvailable[0]?.group?.uuid
|
|
250
|
-
}
|
|
251
|
+
})
|
|
251
252
|
}
|
|
252
253
|
}
|
|
253
254
|
}
|
|
@@ -346,6 +346,12 @@ const CheckoutUI = (props: any) => {
|
|
|
346
346
|
setShowTitle(contentOffset.y > 30)
|
|
347
347
|
}
|
|
348
348
|
|
|
349
|
+
const handleRedirect = () => {
|
|
350
|
+
props.fromProductsList
|
|
351
|
+
? navigation?.goBack()
|
|
352
|
+
: onNavigationRedirect('BottomTab', { screen: 'Cart' }, !props.fromMulti)
|
|
353
|
+
}
|
|
354
|
+
|
|
349
355
|
useEffect(() => {
|
|
350
356
|
if (validationFields && validationFields?.fields?.checkout) {
|
|
351
357
|
checkValidationFields()
|
|
@@ -456,7 +462,7 @@ const CheckoutUI = (props: any) => {
|
|
|
456
462
|
<SafeAreaView style={{ backgroundColor: theme.colors.backgroundPage }}>
|
|
457
463
|
<View style={styles.wrapperNavbar}>
|
|
458
464
|
<TopHeader>
|
|
459
|
-
<TopActions onPress={() =>
|
|
465
|
+
<TopActions onPress={() => handleRedirect()}>
|
|
460
466
|
<IconAntDesign
|
|
461
467
|
name='arrowleft'
|
|
462
468
|
size={26}
|
|
@@ -482,7 +488,7 @@ const CheckoutUI = (props: any) => {
|
|
|
482
488
|
hideArrowLeft
|
|
483
489
|
title={t('CHECKOUT', 'Checkout')}
|
|
484
490
|
titleAlign={'center'}
|
|
485
|
-
onActionLeft={() =>
|
|
491
|
+
onActionLeft={() => handleRedirect()}
|
|
486
492
|
showCall={false}
|
|
487
493
|
btnStyle={{ paddingLeft: 0, paddingTop: Platform.OS == 'ios' ? 0 : 2 }}
|
|
488
494
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|