ordering-ui-react-native 0.15.29 → 0.15.32

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.
Files changed (24) hide show
  1. package/package.json +1 -1
  2. package/themes/business/index.tsx +2 -0
  3. package/themes/business/src/components/OrderDetails/Business.tsx +1 -0
  4. package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +85 -17
  5. package/themes/business/src/components/OrdersListManager/index.tsx +871 -0
  6. package/themes/business/src/components/OrdersListManager/styles.tsx +123 -0
  7. package/themes/business/src/components/OrdersListManager/utils.tsx +216 -0
  8. package/themes/business/src/components/OrdersOption/index.tsx +1 -1
  9. package/themes/business/src/components/PreviousOrders/index.tsx +25 -8
  10. package/themes/original/src/components/BusinessController/index.tsx +25 -17
  11. package/themes/original/src/components/BusinessProductsList/index.tsx +1 -1
  12. package/themes/original/src/components/BusinessProductsListing/index.tsx +11 -23
  13. package/themes/original/src/components/BusinessesListing/index.tsx +16 -30
  14. package/themes/original/src/components/Checkout/index.tsx +2 -2
  15. package/themes/original/src/components/HighestRatedBusinesses/index.tsx +97 -89
  16. package/themes/original/src/components/Messages/index.tsx +28 -24
  17. package/themes/original/src/components/OrderProgress/index.tsx +1 -1
  18. package/themes/original/src/components/OrdersOption/index.tsx +2 -2
  19. package/themes/original/src/components/PreviousOrders/index.tsx +1 -1
  20. package/themes/original/src/components/ProductForm/styles.tsx +2 -1
  21. package/themes/original/src/components/ReviewOrder/index.tsx +10 -9
  22. package/themes/original/src/components/ReviewProducts/index.tsx +1 -1
  23. package/themes/original/src/components/UserProfile/index.tsx +4 -6
  24. package/themes/original/src/types/index.tsx +9 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.15.29",
3
+ "version": "0.15.32",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -16,6 +16,7 @@ import { OrderMessage } from './src/components/OrderMessage';
16
16
  import { OrderDetailsBusiness } from './src/components/OrderDetails/Business';
17
17
  import { OrderDetailsDelivery } from './src/components/OrderDetails/Delivery';
18
18
  import { OrdersOption } from './src/components/OrdersOption';
19
+ import { OrdersListManager } from './src/components/OrdersListManager';
19
20
  import { OrdersOptionStatus } from './src/components/OrdersOptionStatus';
20
21
  import { OrdersOptionBusiness } from './src/components/OrdersOptionBusiness';
21
22
  import { OrdersOptionCity } from './src/components/OrdersOptionCity';
@@ -84,6 +85,7 @@ export {
84
85
  OrderDetailsDelivery,
85
86
  OrderMessage,
86
87
  OrdersOption,
88
+ OrdersListManager,
87
89
  OrdersOptionStatus,
88
90
  OrdersOptionBusiness,
89
91
  OrdersOptionCity,
@@ -431,6 +431,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
431
431
  handleViewSummaryOrder={handleViewSummaryOrder}
432
432
  handleCopyClipboard={handleCopyClipboard}
433
433
  handleArrowBack={handleArrowBack}
434
+ isCustomView={props.isCustomView}
434
435
  />
435
436
  <OrderDetailsContainer
436
437
  keyboardShouldPersistTaps="handled"
@@ -30,6 +30,7 @@ interface OrderHeader {
30
30
  logisticOrderStatus?: Array<number>,
31
31
  handleViewSummaryOrder?: any;
32
32
  handleCopyClipboard?: any
33
+ isCustomView?: any
33
34
  }
34
35
 
35
36
  export const OrderHeaderComponent = (props: OrderHeader) => {
@@ -105,17 +106,17 @@ export const OrderHeaderComponent = (props: OrderHeader) => {
105
106
 
106
107
  return (
107
108
  <>
108
- <Header>
109
- <OIconButton
110
- icon={theme.images.general.arrow_left}
111
- iconStyle={{ width: 20, height: 20 }}
112
- borderColor={theme.colors.clear}
113
- style={{ ...styles.icons, justifyContent: 'flex-end' }}
114
- onClick={() => handleArrowBack()}
115
- />
116
-
117
- {
118
- (!order?.isLogistic || (!logisticOrderStatus?.includes(order?.status) && !order?.order_group)) && (
109
+ {!props.isCustomView && (
110
+ <Header>
111
+ <OIconButton
112
+ icon={theme.images.general.arrow_left}
113
+ iconStyle={{ width: 20, height: 20 }}
114
+ borderColor={theme.colors.clear}
115
+ style={{ ...styles.icons, justifyContent: 'flex-end' }}
116
+ onClick={() => handleArrowBack()}
117
+ />
118
+
119
+ {(!order?.isLogistic || (!logisticOrderStatus?.includes(order?.status) && !order?.order_group)) && (
119
120
  <Actions>
120
121
  {getOrderStatus(order?.status, t)?.value !==
121
122
  t('PENDING', 'Pending') && (
@@ -170,13 +171,80 @@ export const OrderHeaderComponent = (props: OrderHeader) => {
170
171
  />
171
172
  </Actions>
172
173
  )}
173
- </Header>
174
+ </Header>
175
+ )}
174
176
  <OrderHeader>
175
- <OText size={13} style={{ marginBottom: 5 }}>
176
- {order?.delivery_datetime_utc
177
- ? parseDate(order?.delivery_datetime_utc)
178
- : parseDate(order?.delivery_datetime, { utc: false })}
179
- </OText>
177
+ {!props.isCustomView ? (
178
+ <OText size={13} style={{ marginBottom: 5 }}>
179
+ {order?.delivery_datetime_utc
180
+ ? parseDate(order?.delivery_datetime_utc)
181
+ : parseDate(order?.delivery_datetime, { utc: false })}
182
+ </OText>
183
+ ) : (
184
+ <Header style={{ alignItems: 'center' }}>
185
+ <OText size={13} style={{ marginBottom: 5 }}>
186
+ {order?.delivery_datetime_utc
187
+ ? parseDate(order?.delivery_datetime_utc)
188
+ : parseDate(order?.delivery_datetime, { utc: false })}
189
+ </OText>
190
+
191
+ {(!order?.isLogistic || (!logisticOrderStatus?.includes(order?.status) && !order?.order_group)) && (
192
+ <Actions>
193
+ {getOrderStatus(order?.status, t)?.value !==
194
+ t('PENDING', 'Pending') && (
195
+ <>
196
+ <OIconButton
197
+ icon={theme.images.general.copy}
198
+ iconStyle={{
199
+ width: 20,
200
+ height: 25,
201
+ top: 2,
202
+ tintColor: theme.colors.backArrow,
203
+ }}
204
+ borderColor={theme.colors.clear}
205
+ style={styles.icons}
206
+ onClick={() => handleCopyClipboard?.()}
207
+ />
208
+ <OIconButton
209
+ icon={theme.images.general.print}
210
+ iconStyle={{
211
+ width: 25,
212
+ height: 22,
213
+ tintColor: theme.colors.backArrow,
214
+ }}
215
+ borderColor={theme.colors.clear}
216
+ style={styles.icons}
217
+ onClick={() => handleViewSummaryOrder?.()}
218
+ />
219
+ </>
220
+ )}
221
+ <OIconButton
222
+ icon={theme.images.general.map}
223
+ iconStyle={{
224
+ width: 20,
225
+ height: 20,
226
+ tintColor: theme.colors.backArrow,
227
+ }}
228
+ borderColor={theme.colors.clear}
229
+ style={styles.icons}
230
+ onClick={() => handleOpenMapView()}
231
+ />
232
+
233
+ <OIconButton
234
+ icon={theme.images.general.messages}
235
+ iconStyle={{
236
+ width: 20,
237
+ height: 20,
238
+ tintColor: theme.colors.backArrow,
239
+ }}
240
+ borderColor={theme.colors.clear}
241
+ style={styles.icons}
242
+ onClick={() => handleOpenMessagesForBusiness()}
243
+ />
244
+ </Actions>
245
+ )}
246
+ </Header>
247
+ )}
180
248
 
181
249
  <OText numberOfLines={2} size={20} weight="600">
182
250
  <>