ordering-ui-react-native 0.15.86 → 0.15.87
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
|
@@ -137,7 +137,12 @@ const CheckoutUI = (props: any) => {
|
|
|
137
137
|
const placeSpotTypes = [3, 4]
|
|
138
138
|
const isWalletEnabled = configs?.wallet_enabled?.value === '1' && (configs?.wallet_cash_enabled?.value === '1' || configs?.wallet_credit_point_enabled?.value === '1')
|
|
139
139
|
const isPreOrder = configs?.preorder_status_enabled?.value === '1'
|
|
140
|
-
const isDisabledButtonPlace = loading || !cart?.valid || (!paymethodSelected && cart?.balance > 0) || placing || errorCash ||
|
|
140
|
+
const isDisabledButtonPlace = loading || !cart?.valid || (!paymethodSelected && cart?.balance > 0) || placing || errorCash ||
|
|
141
|
+
cart?.subtotal < cart?.minimum || (placeSpotTypes.includes(options?.type) && !cart?.place) ||
|
|
142
|
+
(options.type === 1 &&
|
|
143
|
+
validationFields?.fields?.checkout?.driver_tip?.enabled &&
|
|
144
|
+
validationFields?.fields?.checkout?.driver_tip?.required &&
|
|
145
|
+
(Number(cart?.driver_tip) <= 0))
|
|
141
146
|
|
|
142
147
|
const driverTipsOptions = typeof configs?.driver_tip_options?.value === 'string'
|
|
143
148
|
? JSON.parse(configs?.driver_tip_options?.value) || []
|
|
@@ -623,7 +628,7 @@ const CheckoutUI = (props: any) => {
|
|
|
623
628
|
|
|
624
629
|
{!cartState.loading && cart && (
|
|
625
630
|
<View>
|
|
626
|
-
<ChErrors style={{ marginBottom:
|
|
631
|
+
<ChErrors style={{ marginBottom: 10 }}>
|
|
627
632
|
{!cart?.valid_address && cart?.status !== 2 && (
|
|
628
633
|
<OText
|
|
629
634
|
color={theme.colors.error}
|
|
@@ -658,6 +663,17 @@ const CheckoutUI = (props: any) => {
|
|
|
658
663
|
{t('WARNING_PLACE_SPOT', 'Please, select your spot to place order.')}
|
|
659
664
|
</OText>
|
|
660
665
|
)}
|
|
666
|
+
{options.type === 1 &&
|
|
667
|
+
validationFields?.fields?.checkout?.driver_tip?.enabled &&
|
|
668
|
+
validationFields?.fields?.checkout?.driver_tip?.required &&
|
|
669
|
+
(Number(cart?.driver_tip) <= 0) && (
|
|
670
|
+
<OText
|
|
671
|
+
color={theme.colors.error}
|
|
672
|
+
size={12}
|
|
673
|
+
>
|
|
674
|
+
{t('WARNING_INVALID_DRIVER_TIP', 'Driver Tip is required.')}
|
|
675
|
+
</OText>
|
|
676
|
+
)}
|
|
661
677
|
</ChErrors>
|
|
662
678
|
</View>
|
|
663
679
|
)}
|