ordering-ui-react-native 0.17.50 → 0.17.51
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
package/src/utils/index.tsx
CHANGED
|
@@ -34,7 +34,8 @@ export const getTraduction = (key: string, t: any) => {
|
|
|
34
34
|
ERROR_ADD_PRODUCT_VERY_FAR_FOR_DELIVERY: 'Error adding product, very far for delivery',
|
|
35
35
|
ERROR_PRODUCT_NOT_FOUND: 'Error with the product',
|
|
36
36
|
ERROR_ADD_BUSINESS_INVALID: 'An error occurred with the business',
|
|
37
|
-
ERROR_INVALID_OFFER: 'The offer doesn\'t exist'
|
|
37
|
+
ERROR_INVALID_OFFER: 'The offer doesn\'t exist',
|
|
38
|
+
ERROR_ADD_PRODUCT_BEFORE_ADDRESS: 'You must have an address'
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
return keyList[key] ? t(key, keyList[key]) : t(key)
|
|
@@ -20,6 +20,7 @@ const BusinessesListingUI = (props: any) => {
|
|
|
20
20
|
const {
|
|
21
21
|
navigation,
|
|
22
22
|
businessesList,
|
|
23
|
+
paginationProps,
|
|
23
24
|
handleBusinessClick,
|
|
24
25
|
} = props;
|
|
25
26
|
|
|
@@ -78,7 +79,7 @@ const BusinessesListingUI = (props: any) => {
|
|
|
78
79
|
</CardsContainer>
|
|
79
80
|
|
|
80
81
|
|
|
81
|
-
{!businessesList.loading && businessesList.businesses.length === 0 && (
|
|
82
|
+
{!businessesList.loading && businessesList.businesses.length === 0 && paginationProps.totalPages !== null && (
|
|
82
83
|
<NotFoundSource
|
|
83
84
|
content={t(
|
|
84
85
|
'NOT_FOUND_BUSINESSES',
|
|
@@ -550,7 +550,7 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
550
550
|
</View>
|
|
551
551
|
)}
|
|
552
552
|
<View style={{ width: isSoldOut || maxProductQuantity <= 0 ? '100%' : isDrawer ? '70%' : '80%' }}>
|
|
553
|
-
{productCart && !isSoldOut && maxProductQuantity > 0 && auth &&
|
|
553
|
+
{productCart && !isSoldOut && maxProductQuantity > 0 && auth && (
|
|
554
554
|
<OButton
|
|
555
555
|
onClick={() => handleSaveProduct()}
|
|
556
556
|
imgRightSrc=''
|
|
@@ -563,19 +563,6 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
563
563
|
}}
|
|
564
564
|
/>
|
|
565
565
|
)}
|
|
566
|
-
{auth && !orderState.options?.address_id && (
|
|
567
|
-
orderState.loading ? (
|
|
568
|
-
<OButton
|
|
569
|
-
isDisabled
|
|
570
|
-
text={t('LOADING', 'Loading')}
|
|
571
|
-
imgRightSrc=''
|
|
572
|
-
/>
|
|
573
|
-
) : (
|
|
574
|
-
<OButton
|
|
575
|
-
onClick={navigation?.navigate('AddressList')}
|
|
576
|
-
/>
|
|
577
|
-
)
|
|
578
|
-
)}
|
|
579
566
|
{(!auth || isSoldOut || maxProductQuantity <= 0) && (
|
|
580
567
|
<OButton
|
|
581
568
|
isDisabled={isSoldOut || maxProductQuantity <= 0}
|