ordering-ui-react-native 0.22.16 → 0.22.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
|
@@ -23,8 +23,7 @@ export const AnalyticsSegment = (props: any) => {
|
|
|
23
23
|
segmentClient.track('Product List Viewed', {
|
|
24
24
|
business_id: category?.business_id,
|
|
25
25
|
category_id: category?.id,
|
|
26
|
-
category: category?.name
|
|
27
|
-
products: category?.products
|
|
26
|
+
category: category?.name
|
|
28
27
|
})
|
|
29
28
|
}
|
|
30
29
|
|
|
@@ -62,11 +61,12 @@ export const AnalyticsSegment = (props: any) => {
|
|
|
62
61
|
})
|
|
63
62
|
}
|
|
64
63
|
|
|
65
|
-
const handleProductAdded = (product: any) => {
|
|
64
|
+
const handleProductAdded = (product: any, result: any) => {
|
|
66
65
|
segmentClient.track('Product Added', {
|
|
67
|
-
|
|
66
|
+
cart_id: result.uuid,
|
|
67
|
+
product_id: product.id,
|
|
68
68
|
name: product.name,
|
|
69
|
-
category: product.category_id,
|
|
69
|
+
category: product.category_id || product?.categoryId,
|
|
70
70
|
price: product.price,
|
|
71
71
|
quantity: product.quantity
|
|
72
72
|
})
|
|
@@ -101,7 +101,7 @@ export const AnalyticsSegment = (props: any) => {
|
|
|
101
101
|
|
|
102
102
|
const handleOrderPlaced = (order: any) => {
|
|
103
103
|
segmentClient.track('Order Placed', {
|
|
104
|
-
|
|
104
|
+
order_id: order.id,
|
|
105
105
|
affiliation: order.business?.name,
|
|
106
106
|
revenue: order.total,
|
|
107
107
|
tax: order.tax_total,
|
|
@@ -381,6 +381,14 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
381
381
|
setViewedCategory(_viewedCategory)
|
|
382
382
|
events.emit('product_list_viewed', _viewedCategory)
|
|
383
383
|
}
|
|
384
|
+
} else {
|
|
385
|
+
if (business.categories) {
|
|
386
|
+
const categoryAll: any = {}
|
|
387
|
+
categoryAll.business_id = business.id
|
|
388
|
+
categoryAll.id = null
|
|
389
|
+
categoryAll.name = 'All'
|
|
390
|
+
events.emit('product_list_viewed', categoryAll)
|
|
391
|
+
}
|
|
384
392
|
}
|
|
385
393
|
}, [business?.lazy_load_products_recommended, selectedCategoryId, categorySelected?.id, viewedCategory])
|
|
386
394
|
|
|
@@ -133,7 +133,7 @@ const OrderProgressUI = (props: any) => {
|
|
|
133
133
|
<View style={styles.logoWrapper}>
|
|
134
134
|
<FastImage
|
|
135
135
|
style={{ width: 50, height: 50 }}
|
|
136
|
-
source={orderList?.orders.length === 1 && lastOrder?.business?.logo
|
|
136
|
+
source={orderList?.orders.length === 1 && lastOrder?.business?.logo?.includes?.('http') ? {
|
|
137
137
|
uri: optimizeImage(lastOrder?.business?.logo, 'h_50,c_limit'),
|
|
138
138
|
priority: FastImage.priority.normal,
|
|
139
139
|
} : theme.images.logos.logotype}
|