ordering-ui-react-native 0.12.42 → 0.12.43

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.12.42",
3
+ "version": "0.12.43",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -214,15 +214,15 @@ const CartUI = (props: any) => {
214
214
  {cart?.valid_products && (
215
215
  <CheckoutAction>
216
216
  <OButton
217
- text={(cart?.subtotal_to_calculate >= cart?.minimum || !cart?.minimum) && cart?.valid_address ? (
218
- !openUpselling !== canOpenUpselling ? t('CHECKOUT', 'Checkout') : t('LOADING', 'Loading')
219
- ) : !cart?.valid_address ? (
220
- `${t('OUT_OF_COVERAGE', 'Out of Coverage')}`
221
- ) : (
217
+ text={!cart?.valid_address ? (
218
+ t('OUT_OF_COVERAGE', 'Out of Coverage')
219
+ ) : !cart?.valid_maximum ? (
220
+ `${t('MAXIMUM_SUBTOTAL_ORDER', 'Maximum subtotal order')}: ${parsePrice(cart?.maximum)}`
221
+ ) : (!cart?.valid_minimum && !(cart?.discount_type === 1 && cart?.discount_rate === 100)) ? (
222
222
  `${t('MINIMUN_SUBTOTAL_ORDER', 'Minimum subtotal order:')} ${parsePrice(cart?.minimum)}`
223
- )}
224
- bgColor={(cart?.subtotal_to_calculate < cart?.minimum || !cart?.valid_address) ? theme.colors.secundary : theme.colors.primary}
225
- isDisabled={(openUpselling && !canOpenUpselling) || cart?.subtotal_to_calculate < cart?.minimum || !cart?.valid_address}
223
+ ) : !openUpselling !== canOpenUpselling ? t('CHECKOUT', 'Checkout') : t('LOADING', 'Loading')}
224
+ bgColor={(!cart?.valid_maximum || (!cart?.valid_minimum && !(cart?.discount_type === 1 && cart?.discount_rate === 100)) || !cart?.valid_address) ? theme.colors.secundary : theme.colors.primary}
225
+ isDisabled={(openUpselling && !canOpenUpselling) || !cart?.valid_maximum || (!cart?.valid_minimum && !(cart?.discount_type === 1 && cart?.discount_rate === 100)) || !cart?.valid_address}
226
226
  borderColor={theme.colors.primary}
227
227
  imgRightSrc={null}
228
228
  textStyle={{ color: 'white', textAlign: 'center', flex: 1 }}