ordering-ui-react-native 0.11.22 → 0.11.23

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.11.22",
3
+ "version": "0.11.23",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -47,6 +47,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
47
47
  loadOrders,
48
48
  loadMoreOrders,
49
49
  onNavigationRedirect,
50
+ handleClickOrder
50
51
  } = props;
51
52
 
52
53
  const theme = useTheme();
@@ -328,6 +329,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
328
329
  orders={currentOrdersGroup.orders}
329
330
  onNavigationRedirect={onNavigationRedirect}
330
331
  getOrderStatus={getOrderStatus}
332
+ handleClickOrder={handleClickOrder}
331
333
  />
332
334
  )}
333
335
 
@@ -3,15 +3,17 @@ import { StyleSheet, TouchableOpacity } from 'react-native';
3
3
  import { useTheme } from 'styled-components/native';
4
4
  import { useLanguage, useUtils } from 'ordering-components/native';
5
5
  import { OIcon, OText } from '../shared';
6
- import { Card, Logo, Information, MyOrderOptions } from './styles';
6
+ import { Card, Logo, Information, MyOrderOptions, NotificationIcon } from './styles';
7
+ import EntypoIcon from 'react-native-vector-icons/Entypo'
7
8
 
8
9
  export const PreviousOrders = (props: any) => {
9
- const { orders, onNavigationRedirect, getOrderStatus } = props;
10
+ const { orders, onNavigationRedirect, getOrderStatus, handleClickOrder } = props;
10
11
  const [, t] = useLanguage();
11
12
  const [{ parseDate, optimizeImage }] = useUtils();
12
13
  const theme = useTheme();
13
14
 
14
15
  const handlePressOrder = (order: any) => {
16
+ handleClickOrder && handleClickOrder(order)
15
17
  onNavigationRedirect &&
16
18
  onNavigationRedirect('OrderDetails', { order: order });
17
19
  };
@@ -96,12 +98,17 @@ export const PreviousOrders = (props: any) => {
96
98
  />
97
99
  </Logo>
98
100
  )}
99
-
100
101
  <Information>
101
102
  <OText numberOfLines={1} style={styles.title}>
102
103
  {order.business?.name}
103
104
  </OText>
104
-
105
+ <NotificationIcon>
106
+ <EntypoIcon
107
+ name="dot-single"
108
+ size={32}
109
+ color={theme.colors.primary}
110
+ />
111
+ </NotificationIcon>
105
112
  <OText
106
113
  style={styles.date}
107
114
  numberOfLines={1}
@@ -13,6 +13,7 @@ export const Logo = styled.View`
13
13
  `;
14
14
 
15
15
  export const Information = styled.View`
16
+ position: relative;
16
17
  justify-content: flex-start;
17
18
  margin-horizontal: 10px;
18
19
  flex: 1;
@@ -23,3 +24,8 @@ export const MyOrderOptions = styled.View`
23
24
  flex-direction: column;
24
25
  justify-content: space-between;
25
26
  `;
27
+
28
+ export const NotificationIcon = styled.View`
29
+ position: absolute;
30
+ left: 90%;
31
+ `
@@ -275,6 +275,7 @@ export interface OrdersOptionParams {
275
275
  ordersGroup?: any;
276
276
  setOrdersGroup?: any;
277
277
  setCurrentFilters?: any;
278
+ handleClickOrder?: any;
278
279
  }
279
280
  export interface ActiveOrdersParams {
280
281
  orders?: any;