ordering-ui-react-native 0.17.5 → 0.17.6

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.17.5",
3
+ "version": "0.17.6",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -14,6 +14,7 @@ import { Container, WrappButton } from './styles'
14
14
  import { OButton } from '../shared';
15
15
  import { BusinessController } from '../BusinessController';
16
16
  import { SingleProductCard } from '../SingleProductCard';
17
+ import { NotFoundSource } from '../NotFoundSource';
17
18
  import moment from 'moment';
18
19
 
19
20
 
@@ -224,6 +225,12 @@ const FavoriteListUI = (props: FavoriteParams) => {
224
225
  <BusinessSkeleton key={i} />
225
226
  ))
226
227
  )}
228
+ {!favoriteList?.loading && !favoriteList?.favorites?.length && (
229
+ <NotFoundSource
230
+ content={t('NOT_FOUND_FAVORITES_LIST', 'No favorites to show at this time.')
231
+ }
232
+ />
233
+ )}
227
234
  </>
228
235
  )}
229
236
 
@@ -250,6 +257,12 @@ const FavoriteListUI = (props: FavoriteParams) => {
250
257
  <OrderSkeleton key={i} />
251
258
  ))
252
259
  )}
260
+ {!favoriteList?.loading && !favoriteList?.favorites?.length && (
261
+ <NotFoundSource
262
+ content={t('NOT_FOUND_FAVORITES_LIST', 'No favorites to show at this time.')
263
+ }
264
+ />
265
+ )}
253
266
  </>
254
267
  )}
255
268
 
@@ -271,6 +284,12 @@ const FavoriteListUI = (props: FavoriteParams) => {
271
284
  <ProductSkeleton key={i} />
272
285
  ))
273
286
  )}
287
+ {!favoriteList?.loading && !favoriteList?.favorites?.length && (
288
+ <NotFoundSource
289
+ content={t('NOT_FOUND_FAVORITES_LIST', 'No favorites to show at this time.')
290
+ }
291
+ />
292
+ )}
274
293
  </>
275
294
  )}
276
295
 
@@ -11,6 +11,7 @@ export const PreviousProductsOrdered = (props: PreviousProductsOrderedParams) =>
11
11
  const {
12
12
  products,
13
13
  onProductClick,
14
+ handleUpdateProducts,
14
15
  isBusinessesSearchList
15
16
  } = props
16
17
 
@@ -28,12 +29,14 @@ export const PreviousProductsOrdered = (props: PreviousProductsOrderedParams) =>
28
29
  {products?.map((product: any) => (
29
30
  <SingleProductCard
30
31
  key={product?.id}
32
+ isProductId
31
33
  isSoldOut={(product.inventoried && !product.quantity)}
32
34
  product={product}
33
35
  businessId={product?.business?.id}
34
36
  onProductClick={onProductClick}
35
37
  style={style}
36
38
  productAddedToCartLength={0}
39
+ handleUpdateProducts={handleUpdateProducts}
37
40
  />
38
41
  ))}
39
42
  </>
@@ -48,7 +48,8 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
48
48
  hideOrders,
49
49
  BusinessControllerSkeletons,
50
50
  businesses,
51
- businessPaginationProps
51
+ businessPaginationProps,
52
+ handleUpdateProducts
52
53
  } = props
53
54
 
54
55
  const theme = useTheme();
@@ -234,6 +235,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
234
235
  <PreviousProductsOrdered
235
236
  products={products}
236
237
  onProductClick={onProductClick}
238
+ handleUpdateProducts={handleUpdateProducts}
237
239
  isBusinessesSearchList={!!businessesSearchList}
238
240
  />
239
241
  )}
@@ -306,6 +306,7 @@ export interface SingleProductCardParams {
306
306
  enableIntersection?: boolean;
307
307
  navigation?: any;
308
308
  isPreviously?: any;
309
+ isProductId?: any;
309
310
  }
310
311
  export interface BusinessInformationParams {
311
312
  navigation?: any,
@@ -360,6 +361,7 @@ export interface OrdersOptionParams {
360
361
  refreshOrders?: boolean,
361
362
  setRefreshOrders?: (value: boolean) => void,
362
363
  handleUpdateOrderList?: (orderId: number, changes: any) => {},
364
+ handleUpdateProducts?: (productId: number, changes: any) => {},
363
365
  isBusiness?: boolean,
364
366
  isProducts?: boolean,
365
367
  businessOrderIds?: any,
@@ -764,6 +766,8 @@ export interface OrderItAgainParams {
764
766
 
765
767
  export interface PreviousProductsOrderedParams {
766
768
  products?: any,
769
+ isProductId?: boolean
767
770
  onProductClick?: any,
768
771
  isBusinessesSearchList?: boolean
772
+ handleUpdateProducts?: any
769
773
  }