ordering-ui-react-native 0.16.17 → 0.16.18

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.16.17",
3
+ "version": "0.16.18",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -45,7 +45,7 @@ export const BusinessItemAccordion = (props: any) => {
45
45
  }, [orderState?.carts])
46
46
 
47
47
  return (
48
- <BIContainer isClosed={isClosed} checkoutVisible={!isActive && !isClosed && !!isProducts && !checkoutButtonDisabled}>
48
+ <BIContainer isClosed={isClosed} isMultiCheckout={isMultiCheckout} checkoutVisible={!isActive && !isClosed && !!isProducts && !checkoutButtonDisabled}>
49
49
  <BIHeader
50
50
  isClosed={isClosed}
51
51
  onPress={() => !isClosed ? setActiveState(!isActive) : isClosed}
@@ -7,8 +7,12 @@ export const BIContainer = styled.View`
7
7
  opacity: 1;
8
8
  border-radius: 7.6px;
9
9
  overflow: hidden;
10
+ ${(props: any) => !props.isMultiCheckout && css`
11
+ min-height: 120px;
12
+ `}
10
13
  ${(props: any) => props.isClosed && css`
11
14
  opacity: 0.5;
15
+ min-height: 60px;
12
16
  `}
13
17
  `
14
18
 
@@ -77,7 +77,8 @@ const MultiCheckoutUI = (props: any) => {
77
77
 
78
78
  const configTypes = configs?.order_types_allowed?.value.split('|').map((value: any) => Number(value)) || []
79
79
  const isPreOrder = configs?.preorder_status_enabled?.value === '1'
80
- const isDisablePlaceOrderButton = !(paymethodSelected?.paymethod_id || paymethodSelected?.wallet_id) || placing
80
+ const maximumCarts = 5
81
+ const isDisablePlaceOrderButton = !(paymethodSelected?.paymethod_id || paymethodSelected?.wallet_id) || openCarts.length > maximumCarts
81
82
 
82
83
  const [isUserDetailsEdit, setIsUserDetailsEdit] = useState(false);
83
84
  const [phoneUpdate, setPhoneUpdate] = useState(false);
@@ -265,6 +266,11 @@ const MultiCheckoutUI = (props: any) => {
265
266
  </OText>
266
267
  </ChCartsTotal>
267
268
  )}
269
+ {openCarts.length > maximumCarts && (
270
+ <OText size={14} color={theme.colors.danger5} style={{ marginVertical: 20 }}>
271
+ {t('WARNING_MAXIMUM_CARTS', 'You can only pay for a maximum of 5 carts, please discard one or more to continue.')}
272
+ </OText>
273
+ )}
268
274
  </ChCarts>
269
275
  </ChSection>
270
276
  </ChContainer>
@@ -58,7 +58,7 @@ export const MultiOrdersDetailsUI = (props: any) => {
58
58
  navigation?.canGoBack() && navigation.goBack();
59
59
  return;
60
60
  }
61
- navigation.navigate('BottomTab');
61
+ navigation.navigate('BusinessList');
62
62
  return true
63
63
  }
64
64