ordering-ui-react-native 0.14.82 → 0.14.85

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 (27) hide show
  1. package/package.json +1 -1
  2. package/src/components/BusinessesListing/index.tsx +1 -1
  3. package/src/components/Checkout/index.tsx +1 -1
  4. package/src/components/OrderDetails/index.tsx +3 -1
  5. package/src/components/OrdersOption/index.tsx +4 -2
  6. package/themes/business/src/components/OrdersOption/index.tsx +9 -1
  7. package/themes/business/src/components/PreviousMessages/index.tsx +12 -0
  8. package/themes/business/src/utils/index.tsx +12 -0
  9. package/themes/doordash/src/components/OrderDetails/index.tsx +3 -1
  10. package/themes/doordash/src/components/OrdersOption/index.tsx +4 -2
  11. package/themes/instacart/src/components/OrderDetails/index.tsx +3 -1
  12. package/themes/instacart/src/components/OrdersOption/index.tsx +4 -2
  13. package/themes/original/src/components/BusinessesListing/index.tsx +21 -17
  14. package/themes/original/src/components/Checkout/index.tsx +1 -3
  15. package/themes/original/src/components/LastOrder/index.tsx +3 -1
  16. package/themes/original/src/components/MessageListing/index.tsx +4 -2
  17. package/themes/original/src/components/OrderDetails/index.tsx +14 -0
  18. package/themes/original/src/components/OrderProgress/index.tsx +4 -2
  19. package/themes/original/src/components/OrdersOption/index.tsx +4 -2
  20. package/themes/original/src/components/WalletTransactionItem/index.tsx +3 -2
  21. package/themes/original/src/components/Wallets/index.tsx +16 -8
  22. package/themes/single-business/src/components/LastOrder/index.tsx +3 -1
  23. package/themes/single-business/src/components/OrderDetails/index.tsx +15 -0
  24. package/themes/single-business/src/components/OrdersOption/index.tsx +4 -2
  25. package/themes/single-business/src/utils/index.tsx +7 -1
  26. package/themes/uber-eats/src/components/OrderDetails/index.tsx +3 -1
  27. package/themes/uber-eats/src/components/OrdersOption/index.tsx +4 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.14.82",
3
+ "version": "0.14.85",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -167,7 +167,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
167
167
  >
168
168
  <OText size={14} numberOfLines={1} ellipsizeMode='tail'>
169
169
  {orderState.options?.moment
170
- ? parseDate(orderState.options?.moment, { outputFormat: configs?.format_time?.value === '12' ? 'MM/DD hh:mma' : 'MM/DD HH:mm' })
170
+ ? parseDate(orderState?.options?.moment, { outputFormat: configs?.dates_moment_format?.value })
171
171
  : t('ASAP_ABBREVIATION', 'ASAP')}
172
172
  </OText>
173
173
  </WrapMomentOption>
@@ -326,7 +326,7 @@ const CheckoutUI = (props: any) => {
326
326
  <OText size={18} numberOfLines={1} ellipsizeMode='tail'>
327
327
  {options?.moment
328
328
  ? parseDate(options?.moment, {
329
- outputFormat: configs?.format_time?.value === '12' ? 'MM/DD hh:mma' : 'MM/DD HH:mm'
329
+ outputFormat: configs?.dates_moment_format?.value
330
330
  })
331
331
  : t('ASAP_ABBREVIATION', 'ASAP')}
332
332
  </OText>
@@ -134,7 +134,9 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
134
134
  { key: 18, value: t('DRIVER_ALMOST_ARRIVED_TO_BUSINESS', 'Driver almost arrived to business'), slug: 'DRIVER_ALMOST_ARRIVED_TO_BUSINESS', percentage: 0.15, image: theme.images.order.status18 },
135
135
  { key: 19, value: t('DRIVER_ALMOST_ARRIVED_TO_CUSTOMER', 'Driver almost arrived to customer'), slug: 'DRIVER_ALMOST_ARRIVED_TO_CUSTOMER', percentage: 0.90, image: theme.images.order.status19 },
136
136
  { key: 20, value: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', 'Customer almost arrived to business'), slug: 'ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', percentage: 90, image: theme.images.order.status20 },
137
- { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business'), slug: 'ORDER_CUSTOMER_ARRIVED_BUSINESS', percentage: 95, image: theme.images.order.status21 }
137
+ { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business'), slug: 'ORDER_CUSTOMER_ARRIVED_BUSINESS', percentage: 95, image: theme.images.order.status21 },
138
+ { key: 22, value: t('ORDER_LOOKING_FOR_DRIVER', 'Looking for driver'), slug: 'ORDER_LOOKING_FOR_DRIVER', percentage: 35, image: theme.images.order.status22 },
139
+ { key: 23, value: t('ORDER_DRIVER_ON_WAY', 'Driver on way'), slug: 'ORDER_DRIVER_ON_WAY', percentage: 45, image: theme.images.order.status23 }
138
140
  ]
139
141
 
140
142
 
@@ -91,7 +91,9 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
91
91
  { key: 18, value: t('DRIVER_ALMOST_ARRIVED_TO_BUSINESS', 'Driver almost arrived to business') },
92
92
  { key: 19, value: t('DRIVER_ALMOST_ARRIVED_TO_CUSTOMER', 'Driver almost arrived to customer') },
93
93
  { key: 20, value: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', 'Customer almost arrived to business') },
94
- { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business') }
94
+ { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business') },
95
+ { key: 22, value: t('ORDER_LOOKING_FOR_DRIVER', 'Looking for driver') },
96
+ { key: 23, value: t('ORDER_DRIVER_ON_WAY', 'Driver on way') }
95
97
  ]
96
98
 
97
99
  const objectStatus = orderStatus.find((o) => o.key === status)
@@ -213,7 +215,7 @@ export const OrdersOption = (props: OrdersOptionParams) => {
213
215
  ...props,
214
216
  UIComponent: OrdersOptionUI,
215
217
  orderStatus: props.activeOrders
216
- ? [0, 3, 4, 7, 8, 9, 13, 14, 15, 18, 19, 20, 21]
218
+ ? [0, 3, 4, 7, 8, 9, 13, 14, 15, 18, 19, 20, 21, 22, 23]
217
219
  : [1, 2, 5, 6, 10, 11, 12, 16, 17],
218
220
  useDefualtSessionManager: true,
219
221
  paginationSettings: {
@@ -712,6 +712,14 @@ export const OrdersOption = (props: OrdersOptionParams) => {
712
712
  'Customer arrived to business',
713
713
  ),
714
714
  },
715
+ {
716
+ key: 22,
717
+ text: t('ORDER_LOOKING_FOR_DRIVER', 'Looking for driver')
718
+ },
719
+ {
720
+ key: 23,
721
+ text: t('ORDER_DRIVER_ON_WAY', 'Driver on way')
722
+ }
715
723
  ],
716
724
  tabs: [
717
725
  {
@@ -723,7 +731,7 @@ export const OrdersOption = (props: OrdersOptionParams) => {
723
731
  {
724
732
  key: 1,
725
733
  text: t('IN_PROGRESS', 'In Progress'),
726
- tags: props?.orderGroupStatusCustom?.inProgress ?? [3, 4, 7, 8, 9, 14, 18, 19, 20, 21],
734
+ tags: props?.orderGroupStatusCustom?.inProgress ?? [3, 4, 7, 8, 9, 14, 18, 19, 20, 21, 22, 23],
727
735
  title: 'inProgress',
728
736
  },
729
737
  {
@@ -176,6 +176,18 @@ export const PreviousMessages = (props: PreviousMessagesParams) => {
176
176
  slug: 'ORDER_CUSTOMER_ARRIVED_BUSINESS',
177
177
  percentage: 95,
178
178
  },
179
+ {
180
+ key: 22,
181
+ value: t('ORDER_LOOKING_FOR_DRIVER', 'Looking for driver'),
182
+ slug: 'ORDER_LOOKING_FOR_DRIVER',
183
+ percentage: 35
184
+ },
185
+ {
186
+ key: 23,
187
+ value: t('ORDER_DRIVER_ON_WAY', 'Driver on way'),
188
+ slug: 'ORDER_DRIVER_ON_WAY',
189
+ percentage: 45
190
+ }
179
191
  ];
180
192
 
181
193
  const objectStatus = orderStatus.find(o => o.key === status);
@@ -325,6 +325,18 @@ export const getOrderStatus = (s: string, t: any) => {
325
325
  slug: 'ORDER_CUSTOMER_ARRIVED_BUSINESS',
326
326
  percentage: 95,
327
327
  },
328
+ {
329
+ key: 22,
330
+ value: t('ORDER_LOOKING_FOR_DRIVER', 'Looking for driver'),
331
+ slug: 'ORDER_LOOKING_FOR_DRIVER',
332
+ percentage: 35
333
+ },
334
+ {
335
+ key: 23,
336
+ value: t('ORDER_DRIVER_ON_WAY', 'Driver on way'),
337
+ slug: 'ORDER_DRIVER_ON_WAY',
338
+ percentage: 45
339
+ }
328
340
  ];
329
341
 
330
342
  const objectStatus = orderStatus.find(o => o.key === status);
@@ -126,7 +126,9 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
126
126
  { key: 18, value: t('DRIVER_ALMOST_ARRIVED_TO_BUSINESS', 'Driver almost arrived to business'), slug: 'DRIVER_ALMOST_ARRIVED_TO_BUSINESS', percentage: 0.15, image: theme.images.order.status18 },
127
127
  { key: 19, value: t('DRIVER_ALMOST_ARRIVED_TO_CUSTOMER', 'Driver almost arrived to customer'), slug: 'DRIVER_ALMOST_ARRIVED_TO_CUSTOMER', percentage: 0.90, image: theme.images.order.status19 },
128
128
  { key: 20, value: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', 'Customer almost arrived to business'), slug: 'ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', percentage: 90, image: theme.images.order.status20 },
129
- { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business'), slug: 'ORDER_CUSTOMER_ARRIVED_BUSINESS', percentage: 95, image: theme.images.order.status21 }
129
+ { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business'), slug: 'ORDER_CUSTOMER_ARRIVED_BUSINESS', percentage: 95, image: theme.images.order.status21 },
130
+ { key: 22, value: t('ORDER_LOOKING_FOR_DRIVER', 'Looking for driver'), slug: 'ORDER_LOOKING_FOR_DRIVER', percentage: 35, image: theme.images.order.status22 },
131
+ { key: 23, value: t('ORDER_DRIVER_ON_WAY', 'Driver on way'), slug: 'ORDER_DRIVER_ON_WAY', percentage: 45, image: theme.images.order.status23 }
130
132
  ]
131
133
 
132
134
 
@@ -91,7 +91,9 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
91
91
  { key: 18, value: t('DRIVER_ALMOST_ARRIVED_TO_BUSINESS', 'Driver almost arrived to business') },
92
92
  { key: 19, value: t('DRIVER_ALMOST_ARRIVED_TO_CUSTOMER', 'Driver almost arrived to customer') },
93
93
  { key: 20, value: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', 'Customer almost arrived to business') },
94
- { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business') }
94
+ { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business') },
95
+ { key: 22, value: t('ORDER_LOOKING_FOR_DRIVER', 'Looking for driver') },
96
+ { key: 23, value: t('ORDER_DRIVER_ON_WAY', 'Driver on way') }
95
97
  ]
96
98
 
97
99
  const objectStatus = orderStatus.find((o) => o.key === status)
@@ -208,7 +210,7 @@ export const OrdersOption = (props: OrdersOptionParams) => {
208
210
  ...props,
209
211
  UIComponent: OrdersOptionUI,
210
212
  orderStatus: props.activeOrders
211
- ? [0, 3, 4, 7, 8, 9, 13, 14, 15, 18, 19, 20, 21]
213
+ ? [0, 3, 4, 7, 8, 9, 13, 14, 15, 18, 19, 20, 21, 22, 23]
212
214
  : [1, 2, 5, 6, 10, 11, 12, 16, 17],
213
215
  useDefualtSessionManager: true,
214
216
  paginationSettings: {
@@ -133,7 +133,9 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
133
133
  { key: 18, value: t('DRIVER_ALMOST_ARRIVED_TO_BUSINESS', 'Driver almost arrived to business'), slug: 'DRIVER_ALMOST_ARRIVED_TO_BUSINESS', percentage: 0.15, image: theme.images.order.status18 },
134
134
  { key: 19, value: t('DRIVER_ALMOST_ARRIVED_TO_CUSTOMER', 'Driver almost arrived to customer'), slug: 'DRIVER_ALMOST_ARRIVED_TO_CUSTOMER', percentage: 0.90, image: theme.images.order.status19 },
135
135
  { key: 20, value: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', 'Customer almost arrived to business'), slug: 'ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', percentage: 90, image: theme.images.order.status20 },
136
- { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business'), slug: 'ORDER_CUSTOMER_ARRIVED_BUSINESS', percentage: 95, image: theme.images.order.status21 }
136
+ { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business'), slug: 'ORDER_CUSTOMER_ARRIVED_BUSINESS', percentage: 95, image: theme.images.order.status21 },
137
+ { key: 22, value: t('ORDER_LOOKING_FOR_DRIVER', 'Looking for driver'), slug: 'ORDER_LOOKING_FOR_DRIVER', percentage: 35, image: theme.images.order.status22 },
138
+ { key: 23, value: t('ORDER_DRIVER_ON_WAY', 'Driver on way'), slug: 'ORDER_DRIVER_ON_WAY', percentage: 45, image: theme.images.order.status23 }
137
139
  ]
138
140
 
139
141
 
@@ -89,7 +89,9 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
89
89
  { key: 18, value: t('DRIVER_ALMOST_ARRIVED_TO_BUSINESS', 'Driver almost arrived to business') },
90
90
  { key: 19, value: t('DRIVER_ALMOST_ARRIVED_TO_CUSTOMER', 'Driver almost arrived to customer') },
91
91
  { key: 20, value: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', 'Customer almost arrived to business') },
92
- { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business') }
92
+ { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business') },
93
+ { key: 22, value: t('ORDER_LOOKING_FOR_DRIVER', 'Looking for driver') },
94
+ { key: 23, value: t('ORDER_DRIVER_ON_WAY', 'Driver on way') }
93
95
  ]
94
96
 
95
97
  const objectStatus = orderStatus.find((o) => o.key === status)
@@ -205,7 +207,7 @@ export const OrdersOption = (props: OrdersOptionParams) => {
205
207
  ...props,
206
208
  UIComponent: OrdersOptionUI,
207
209
  orderStatus: props.activeOrders
208
- ? [0, 3, 4, 7, 8, 9, 13, 14, 15, 18, 19, 20, 21]
210
+ ? [0, 3, 4, 7, 8, 9, 13, 14, 15, 18, 19, 20, 21, 22, 23]
209
211
  : [1, 2, 5, 6, 10, 11, 12, 16, 17],
210
212
  useDefualtSessionManager: true,
211
213
  paginationSettings: {
@@ -117,6 +117,9 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
117
117
  const [featuredBusiness, setFeaturedBusinesses] = useState(Array);
118
118
  const [isFarAway, setIsFarAway] = useState(false)
119
119
 
120
+ const isPreorderEnabled = (configs?.preorder_status_enabled?.value === '1' || configs?.preorder_status_enabled?.value === 'true') &&
121
+ Number(configs?.max_days_preorder?.value) > 0
122
+
120
123
  const timerId = useRef<any>(false)
121
124
  // const panResponder = useRef(
122
125
  // PanResponder.create({
@@ -128,6 +131,12 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
128
131
  // })
129
132
  // ).current
130
133
 
134
+ const handleMomentClick = () => {
135
+ if (isPreorderEnabled) {
136
+ navigation.navigate('MomentOption')
137
+ }
138
+ }
139
+
131
140
  const configTypes =
132
141
  configs?.order_types_allowed?.value
133
142
  .split('|')
@@ -198,14 +207,12 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
198
207
  }, [orderState?.options?.address?.location])
199
208
 
200
209
  useEffect(() => {
201
- const onFocusApp = (nextAppState : any) => {
210
+ const onFocusApp = (nextAppState: any) => {
202
211
  if (
203
212
  appState.current.match(/inactive|background/) &&
204
213
  nextAppState === "active"
205
214
  ) {
206
- if (!businessesList.loading) {
207
- getBusinesses(true);
208
- }
215
+ getBusinesses(true);
209
216
  }
210
217
  appState.current = nextAppState;
211
218
  setAppStateVisible(appState.current);
@@ -281,26 +288,23 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
281
288
  />
282
289
  </WrapMomentOption>
283
290
  <WrapMomentOption
284
- onPress={() => navigation.navigate('MomentOption')}>
291
+ onPress={() => handleMomentClick()}>
285
292
  <OText
286
293
  size={12}
287
294
  numberOfLines={1}
288
295
  ellipsizeMode="tail"
289
296
  color={theme.colors.textSecondary}>
290
- {orderState.options?.moment
291
- ? parseDate(orderState.options?.moment, {
292
- outputFormat:
293
- configs?.format_time?.value === '12'
294
- ? 'MM/DD hh:mma'
295
- : 'MM/DD HH:mm',
296
- })
297
+ {orderState.options?.momentß
298
+ ? parseDate(orderState.options?.moment, { outputFormat: configs?.dates_moment_format?.value })
297
299
  : t('ASAP_ABBREVIATION', 'ASAP')}
298
300
  </OText>
299
- <OIcon
300
- src={theme.images.general.arrow_down}
301
- width={10}
302
- style={{ marginStart: 8 }}
303
- />
301
+ {isPreorderEnabled && (
302
+ <OIcon
303
+ src={theme.images.general.arrow_down}
304
+ width={10}
305
+ style={{ marginStart: 8 }}
306
+ />
307
+ )}
304
308
  </WrapMomentOption>
305
309
 
306
310
  {!businessId && (
@@ -265,9 +265,7 @@ const CheckoutUI = (props: any) => {
265
265
  >
266
266
  <OText size={12} numberOfLines={1} ellipsizeMode='tail' color={theme.colors.textSecondary}>
267
267
  {options?.moment
268
- ? parseDate(options?.moment, {
269
- outputFormat: configs?.format_time?.value === '12' ? 'MM/DD hh:mma' : 'MM/DD HH:mm'
270
- })
268
+ ? parseDate(options?.moment, { outputFormat: configs?.dates_moment_format?.value })
271
269
  : t('ASAP_ABBREVIATION', 'ASAP')}
272
270
  </OText>
273
271
  <OIcon
@@ -91,7 +91,9 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
91
91
  { key: 18, value: t('DRIVER_ALMOST_ARRIVED_TO_BUSINESS', 'Driver almost arrived to business') },
92
92
  { key: 19, value: t('DRIVER_ALMOST_ARRIVED_TO_CUSTOMER', 'Driver almost arrived to customer') },
93
93
  { key: 20, value: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', 'Customer almost arrived to business') },
94
- { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business') }
94
+ { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business') },
95
+ { key: 22, value: t('ORDER_LOOKING_FOR_DRIVER', 'Looking for driver') },
96
+ { key: 23, value: t('ORDER_DRIVER_ON_WAY', 'Driver on way') }
95
97
  ]
96
98
 
97
99
  const objectStatus = orderStatus.find((o) => o.key === status)
@@ -73,7 +73,9 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
73
73
  { key: 18, value: t('DRIVER_ALMOST_ARRIVED_TO_BUSINESS', 'Driver almost arrived to business') },
74
74
  { key: 19, value: t('DRIVER_ALMOST_ARRIVED_TO_CUSTOMER', 'Driver almost arrived to customer') },
75
75
  { key: 20, value: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', 'Customer almost arrived to business') },
76
- { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business') }
76
+ { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business') },
77
+ { key: 22, value: t('ORDER_LOOKING_FOR_DRIVER', 'Looking for driver') },
78
+ { key: 23, value: t('ORDER_DRIVER_ON_WAY', 'Driver on way') }
77
79
  ]
78
80
 
79
81
  const objectStatus = orderStatus.find((o) => o.key === status)
@@ -218,7 +220,7 @@ export const OrderListing = (props: OrdersOptionParams) => {
218
220
  const OrderListingProps = {
219
221
  ...props,
220
222
  UIComponent: OrdersOptionUI,
221
- orderStatus: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21],
223
+ orderStatus: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23],
222
224
  useDefualtSessionManager: true,
223
225
  paginationSettings: {
224
226
  initialPage: 1,
@@ -293,6 +293,20 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
293
293
  percentage: 95,
294
294
  image: theme.images.order.status7,
295
295
  },
296
+ {
297
+ key: 22,
298
+ value: t('ORDER_LOOKING_FOR_DRIVER', 'Looking for driver'),
299
+ slug: 'ORDER_LOOKING_FOR_DRIVER',
300
+ percentage: 35,
301
+ image: theme.images.order.status8
302
+ },
303
+ {
304
+ key: 23,
305
+ value: t('ORDER_DRIVER_ON_WAY', 'Driver on way'),
306
+ slug: 'ORDER_DRIVER_ON_WAY',
307
+ percentage: 45,
308
+ image: theme.images.order.status8
309
+ }
296
310
  ];
297
311
 
298
312
  const objectStatus = orderStatus.find((o) => o.key === status);
@@ -97,7 +97,9 @@ const OrderProgressUI = (props: any) => {
97
97
  { key: 18, value: t('ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS', theme?.defaultLanguages?.ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS || 'Driver almost arrived to business'), slug: 'ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS', percentage: 55 },
98
98
  { key: 19, value: t('ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER', theme?.defaultLanguages?.ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER || 'Driver almost arrived to customer'), slug: 'ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER', percentage: 90 },
99
99
  { key: 20, value: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', theme?.defaultLanguages?.ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS || 'Customer almost arrived to business'), slug: 'ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', percentage: 90 },
100
- { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', theme?.defaultLanguages?.ORDER_CUSTOMER_ARRIVED_BUSINESS || 'Customer arrived to business'), slug: 'ORDER_CUSTOMER_ARRIVED_BUSINESS', percentage: 95 }
100
+ { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', theme?.defaultLanguages?.ORDER_CUSTOMER_ARRIVED_BUSINESS || 'Customer arrived to business'), slug: 'ORDER_CUSTOMER_ARRIVED_BUSINESS', percentage: 95 },
101
+ { key: 22, value: t('ORDER_LOOKING_FOR_DRIVER', theme?.defaultLanguages?.ORDER_LOOKING_FOR_DRIVER || 'Looking for driver'), slug: 'ORDER_LOOKING_FOR_DRIVER', percentage: 35 },
102
+ { key: 23, value: t('ORDER_DRIVER_ON_WAY', theme?.defaultLanguages?.ORDER_DRIVER_ON_WAY || 'Driver on way'), slug: 'ORDER_DRIVER_ON_WAY', percentage: 45 }
101
103
  ]
102
104
 
103
105
  const objectStatus = orderStatus.find((o) => o.key === status)
@@ -217,7 +219,7 @@ export const OrderProgress = (props: any) => {
217
219
  const orderProgressProps = {
218
220
  ...props,
219
221
  UIComponent: OrderProgressUI,
220
- orderStatus: [0, 3, 4, 7, 8, 9, 13, 14, 15, 18, 19, 20, 21],
222
+ orderStatus: [0, 3, 4, 7, 8, 9, 13, 14, 15, 18, 19, 20, 21, 22, 23],
221
223
  useDefualtSessionManager: true,
222
224
  paginationSettings: {
223
225
  initialPage: 1,
@@ -93,7 +93,9 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
93
93
  { key: 18, value: t('DRIVER_ALMOST_ARRIVED_TO_BUSINESS', 'Driver almost arrived to business') },
94
94
  { key: 19, value: t('DRIVER_ALMOST_ARRIVED_TO_CUSTOMER', 'Driver almost arrived to customer') },
95
95
  { key: 20, value: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', 'Customer almost arrived to business') },
96
- { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business') }
96
+ { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business') },
97
+ { key: 22, value: t('ORDER_LOOKING_FOR_DRIVER', 'Looking for driver') },
98
+ { key: 23, value: t('ORDER_DRIVER_ON_WAY', 'Driver on way') }
97
99
  ]
98
100
 
99
101
  const objectStatus = orderStatus.find((o) => o.key === status)
@@ -230,7 +232,7 @@ export const OrdersOption = (props: OrdersOptionParams) => {
230
232
  ...props,
231
233
  UIComponent: OrdersOptionUI,
232
234
  orderStatus: props.preOrders ? [13] : props.activeOrders
233
- ? [0, 3, 4, 7, 8, 9, 14, 15, 18, 19, 20, 21]
235
+ ? [0, 3, 4, 7, 8, 9, 14, 15, 18, 19, 20, 21, 22, 23]
234
236
  : [1, 2, 5, 6, 10, 11, 12, 16, 17],
235
237
  useDefualtSessionManager: true,
236
238
  }
@@ -15,7 +15,8 @@ export const WalletTransactionItem = (props: any) => {
15
15
  const {
16
16
  item,
17
17
  idx,
18
- type
18
+ type,
19
+ withFormatPrice
19
20
  } = props
20
21
 
21
22
  const theme = useTheme()
@@ -38,7 +39,7 @@ export const WalletTransactionItem = (props: any) => {
38
39
  fontWeight: 'bold'
39
40
  }}
40
41
  >
41
- {item?.amount > 0 && '+ '}{parsePrice(item?.amount)}
42
+ {item?.amount > 0 && '+ '}{withFormatPrice ? parsePrice(item?.amount) : item?.amount}
42
43
  </OText>
43
44
  </DateBlock>
44
45
  <MessageBlock>
@@ -19,7 +19,7 @@ import {
19
19
  } from './styles'
20
20
 
21
21
  import NavBar from '../NavBar'
22
- import { OIcon, OText } from '../shared';
22
+ import { OText } from '../shared';
23
23
  import { NotFoundSource } from '../NotFoundSource';
24
24
  import { WalletTransactionItem } from '../WalletTransactionItem'
25
25
 
@@ -28,15 +28,15 @@ const WalletsUI = (props: any) => {
28
28
  navigation,
29
29
  walletList,
30
30
  transactionsList,
31
- setWalletSelected
31
+ setWalletSelected,
32
+ isWalletCashEnabled,
33
+ isWalletPointsEnabled
32
34
  } = props
33
35
 
34
36
  const [, t] = useLanguage()
35
37
  const theme = useTheme()
36
- const [{ parsePrice, parseDate }] = useUtils()
38
+ const [{ parsePrice }] = useUtils()
37
39
  const [{ configs }] = useConfig()
38
- const isWalletCashEnabled = configs?.wallet_cash_enabled?.value === '1'
39
- const isWalletPointsEnabled = configs?.wallet_credit_point_enabled?.value === '1'
40
40
 
41
41
  const [tabSelected, setTabSelected] = useState(isWalletCashEnabled ? 'cash' : 'credit_point')
42
42
 
@@ -119,7 +119,6 @@ const WalletsUI = (props: any) => {
119
119
  : t('POINTS', 'Points')}
120
120
  </OText>
121
121
  </BalanceElement>
122
- {console.log(transactionsList)}
123
122
 
124
123
  <View style={{ marginTop: 20, width: '100%', paddingHorizontal: 1, paddingBottom: 40 }}>
125
124
  {!transactionsList?.loading &&
@@ -137,6 +136,7 @@ const WalletsUI = (props: any) => {
137
136
  type={currentWalletSelected?.type}
138
137
  key={transaction.id}
139
138
  item={transaction}
139
+ withFormatPrice={currentWalletSelected?.type === 'cash'}
140
140
  />
141
141
  ))}
142
142
  </TransactionsWrapper>
@@ -155,7 +155,8 @@ const WalletsUI = (props: any) => {
155
155
  </View>
156
156
  )}
157
157
 
158
- {!(transactionsList?.loading && transactionsList.list?.[`wallet:${currentWalletSelected?.id}`]) &&
158
+ {!transactionsList?.loading &&
159
+ !(transactionsList?.loading && transactionsList.list?.[`wallet:${currentWalletSelected?.id}`]) &&
159
160
  (transactionsList?.error ||
160
161
  !transactionsList.list?.[`wallet:${currentWalletSelected?.id}`]?.length) &&
161
162
  (
@@ -208,9 +209,16 @@ const WalletsUI = (props: any) => {
208
209
  }
209
210
 
210
211
  export const Wallets = (props: any) => {
212
+ const [{ configs }] = useConfig()
213
+
214
+ const isWalletCashEnabled = configs?.wallet_cash_enabled?.value === '1'
215
+ const isWalletPointsEnabled = configs?.wallet_credit_point_enabled?.value === '1'
216
+
211
217
  const walletsProps = {
212
218
  ...props,
213
- UIComponent: WalletsUI
219
+ UIComponent: WalletsUI,
220
+ isWalletCashEnabled,
221
+ isWalletPointsEnabled
214
222
  }
215
223
  return (
216
224
  <WalletList {...walletsProps} />
@@ -91,7 +91,9 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
91
91
  { key: 18, value: t('DRIVER_ALMOST_ARRIVED_TO_BUSINESS', 'Driver almost arrived to business') },
92
92
  { key: 19, value: t('DRIVER_ALMOST_ARRIVED_TO_CUSTOMER', 'Driver almost arrived to customer') },
93
93
  { key: 20, value: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', 'Customer almost arrived to business') },
94
- { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business') }
94
+ { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business') },
95
+ { key: 22, value: t('ORDER_LOOKING_FOR_DRIVER', 'Looking for driver') },
96
+ { key: 23, value: t('ORDER_DRIVER_ON_WAY', 'Driver on way') }
95
97
  ]
96
98
 
97
99
  const objectStatus = orderStatus.find((o) => o.key === status)
@@ -284,6 +284,21 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
284
284
  percentage: 95,
285
285
  image: theme.images.order.status7,
286
286
  },
287
+ {
288
+ key: 22,
289
+ value: t('ORDER_LOOKING_FOR_DRIVER', 'Looking for driver'),
290
+ slug: 'ORDER_LOOKING_FOR_DRIVER',
291
+ percentage: 35,
292
+ image: theme.images.order.status8,
293
+
294
+ },
295
+ {
296
+ key: 23,
297
+ value: t('ORDER_DRIVER_ON_WAY', 'Driver on way'),
298
+ slug: 'ORDER_DRIVER_ON_WAY',
299
+ percentage: 45,
300
+ image: theme.images.order.status8,
301
+ }
287
302
  ];
288
303
 
289
304
  const objectStatus = orderStatus.find((o) => o.key === status);
@@ -91,7 +91,9 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
91
91
  { key: 18, value: t('DRIVER_ALMOST_ARRIVED_TO_BUSINESS', 'Driver almost arrived to business') },
92
92
  { key: 19, value: t('DRIVER_ALMOST_ARRIVED_TO_CUSTOMER', 'Driver almost arrived to customer') },
93
93
  { key: 20, value: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', 'Customer almost arrived to business') },
94
- { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business') }
94
+ { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business') },
95
+ { key: 22, value: t('ORDER_LOOKING_FOR_DRIVER', 'Looking for driver') },
96
+ { key: 23, value: t('ORDER_DRIVER_ON_WAY', 'Driver on way') }
95
97
  ]
96
98
 
97
99
  const objectStatus = orderStatus.find((o) => o.key === status)
@@ -228,7 +230,7 @@ export const OrdersOption = (props: OrdersOptionParams) => {
228
230
  ...props,
229
231
  UIComponent: OrdersOptionUI,
230
232
  orderStatus: props.preOrders ? [13] : props.activeOrders
231
- ? [0, 3, 4, 7, 8, 9, 14, 15, 18, 19, 20, 21]
233
+ ? [0, 3, 4, 7, 8, 9, 14, 15, 18, 19, 20, 21, 22, 23]
232
234
  : [1, 2, 5, 6, 10, 11, 12, 16, 17],
233
235
  useDefualtSessionManager: true,
234
236
  paginationSettings: {
@@ -216,6 +216,10 @@ export const getOrderStatus = (status: number) => {
216
216
  return 'ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS'
217
217
  case 21:
218
218
  return 'ORDER_CUSTOMER_ARRIVED_BUSINESS'
219
+ case 22:
220
+ return 'ORDER_LOOKING_FOR_DRIVER'
221
+ case 23:
222
+ return 'ORDER_DRIVER_ON_WAY'
219
223
  default:
220
224
  return status
221
225
  }
@@ -245,7 +249,9 @@ export const getTextOrderStatus = (s: string, t: any) => {
245
249
  { key: 18, value: t('DRIVER_ALMOST_ARRIVED_TO_BUSINESS', 'Driver almost arrived to business') },
246
250
  { key: 19, value: t('DRIVER_ALMOST_ARRIVED_TO_CUSTOMER', 'Driver almost arrived to customer') },
247
251
  { key: 20, value: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', 'Customer almost arrived to business') },
248
- { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business') }
252
+ { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business') },
253
+ { key: 22, value: t('ORDER_LOOKING_FOR_DRIVER', 'Looking for driver') },
254
+ { key: 23, value: t('ORDER_DRIVER_ON_WAY', 'Driver on way') }
249
255
  ]
250
256
 
251
257
  const objectStatus = orderStatus.find((o) => o.key === status)
@@ -119,7 +119,9 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
119
119
  { key: 18, value: t('DRIVER_ALMOST_ARRIVED_TO_BUSINESS', 'Driver almost arrived to business'), slug: 'DRIVER_ALMOST_ARRIVED_TO_BUSINESS', progress: 2 },
120
120
  { key: 19, value: t('DRIVER_ALMOST_ARRIVED_TO_CUSTOMER', 'Driver almost arrived to customer'), slug: 'DRIVER_ALMOST_ARRIVED_TO_CUSTOMER', progress: 2 },
121
121
  { key: 20, value: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', 'Customer almost arrived to business'), slug: 'ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', progress: 2 },
122
- { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business'), slug: 'ORDER_CUSTOMER_ARRIVED_BUSINESS', progress: 2 }
122
+ { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business'), slug: 'ORDER_CUSTOMER_ARRIVED_BUSINESS', progress: 2 },
123
+ { key: 22, value: t('ORDER_LOOKING_FOR_DRIVER', 'Looking for driver'), slug: 'ORDER_LOOKING_FOR_DRIVER', progress: 2 },
124
+ { key: 23, value: t('ORDER_DRIVER_ON_WAY', 'Driver on way'), slug: 'ORDER_DRIVER_ON_WAY', progress: 2 }
123
125
  ]
124
126
 
125
127
  const objectStatus = orderStatus.find((o) => o.key === status)
@@ -89,7 +89,9 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
89
89
  { key: 18, value: t('DRIVER_ALMOST_ARRIVED_TO_BUSINESS', 'Driver almost arrived to business') },
90
90
  { key: 19, value: t('DRIVER_ALMOST_ARRIVED_TO_CUSTOMER', 'Driver almost arrived to customer') },
91
91
  { key: 20, value: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', 'Customer almost arrived to business') },
92
- { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business') }
92
+ { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business') },
93
+ { key: 22, value: t('ORDER_LOOKING_FOR_DRIVER', 'Looking for driver') },
94
+ { key: 23, value: t('ORDER_DRIVER_ON_WAY', 'Driver on way') }
93
95
  ]
94
96
 
95
97
  const objectStatus = orderStatus.find((o) => o.key === status)
@@ -208,7 +210,7 @@ export const OrdersOption = (props: OrdersOptionParams) => {
208
210
  ...props,
209
211
  UIComponent: OrdersOptionUI,
210
212
  orderStatus: props.activeOrders
211
- ? [0, 3, 4, 7, 8, 9, 13, 14, 15, 18, 19, 20, 21]
213
+ ? [0, 3, 4, 7, 8, 9, 13, 14, 15, 18, 19, 20, 21, 22, 23]
212
214
  : [1, 2, 5, 6, 10, 11, 12, 16, 17],
213
215
  useDefualtSessionManager: true,
214
216
  paginationSettings: {