ordering-ui-react-native 0.17.69 → 0.17.71

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/src/components/AcceptOrRejectOrder/index.tsx +259 -238
  3. package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +6 -4
  4. package/themes/business/src/components/OrdersOption/index.tsx +4 -5
  5. package/themes/business/src/components/PreviousOrders/OrdersGroupedItem.tsx +1 -1
  6. package/themes/business/src/components/PreviousOrders/index.tsx +143 -143
  7. package/themes/business/src/types/index.tsx +6 -3
  8. package/themes/original/src/components/AddressList/index.tsx +7 -3
  9. package/themes/original/src/components/BusinessProductsListing/index.tsx +2 -3
  10. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +1 -1
  11. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +2 -2
  12. package/themes/original/src/components/Favorite/index.tsx +7 -4
  13. package/themes/original/src/components/Favorite/styles.tsx +1 -1
  14. package/themes/original/src/components/FloatingButton/index.tsx +1 -1
  15. package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
  16. package/themes/original/src/components/Help/index.tsx +7 -7
  17. package/themes/original/src/components/LottieAnimation/index.tsx +16 -7
  18. package/themes/original/src/components/MomentOption/index.tsx +6 -4
  19. package/themes/original/src/components/Notifications/index.tsx +8 -2
  20. package/themes/original/src/components/ProductForm/index.tsx +2 -2
  21. package/themes/original/src/components/ProductOptionSubOption/index.tsx +1 -1
  22. package/themes/original/src/components/Promotions/index.tsx +3 -2
  23. package/themes/original/src/components/UserProfileForm/index.tsx +14 -12
  24. package/themes/original/src/types/index.tsx +1 -0
@@ -15,7 +15,6 @@ import { GoogleMap } from '../GoogleMap';
15
15
  export const PreviousOrders = (props: any) => {
16
16
  const {
17
17
  orders,
18
- ordersGrouped,
19
18
  onNavigationRedirect,
20
19
  getOrderStatus,
21
20
  handleClickOrder,
@@ -186,153 +185,154 @@ export const PreviousOrders = (props: any) => {
186
185
 
187
186
  return (
188
187
  <>
189
- {ordersGrouped && Object.keys(ordersGrouped)?.length > 0 && (
190
- <View style={{ marginBottom: 10 }}>
191
- {Object.keys(ordersGrouped).map(k => (
192
- <OrdersGroupedItem
193
- key={k}
194
- groupId={k}
195
- orders={ordersGrouped[k]}
196
- >
197
- {ordersGrouped[k]?.length > 0 &&
198
- ordersGrouped[k]
199
- ?.filter((order: any) => hash[order?.id] ? false : (hash[order?.id] = true))
200
- ?.map((_order: any) => {
201
- const order = _order?.isLogistic && !_order?.order_group && isLogisticOrder ? _order?.order : _order
202
- return (
203
- <OrdersList key={order.id} order={order} _order={_order} hideBtns />
188
+ {orders && orders?.length > 0 && orders.map((_order: any) => {
189
+ const order = !Array.isArray(_order) && (_order?.isLogistic && !_order?.order_group && isLogisticOrder ? _order?.order : _order)
190
+ const _ordersGrouped = Array.isArray(_order) && Object.fromEntries(_order)
191
+ return (
192
+ _ordersGrouped ? (
193
+ <View key={_order[0]} style={{ marginBottom: 10 }}>
194
+ {Object.keys(_ordersGrouped).map((k, idx) => (
195
+ <OrdersGroupedItem
196
+ key={`${k}_${idx}`}
197
+ groupId={k}
198
+ orders={_ordersGrouped[k]}
199
+ >
200
+ {_ordersGrouped[k]?.length > 0 &&
201
+ _ordersGrouped[k]
202
+ ?.filter((order: any) => hash[order?.id] ? false : (hash[order?.id] = true))
203
+ ?.map((_order: any) => {
204
+ const order_ = _order?.isLogistic && !_order?.order_group && isLogisticOrder ? _order?.order : _order
205
+ return (
206
+ <OrdersList key={order_.id} order={order_} _order={_order} hideBtns />
207
+ )
208
+ }
204
209
  )
205
210
  }
206
- )
207
- }
208
- {ordersGrouped[k][0]?.status === 0 && (
209
- <AcceptOrRejectOrderStyle>
210
- <OButton
211
- text={t('REJECT_ALL', 'Reject all')}
212
- bgColor={theme.colors.danger100}
213
- borderColor={theme.colors.danger100}
214
- imgRightSrc={null}
215
- style={{ borderRadius: 7, height: 40 }}
216
- parentStyle={{ width: '45%' }}
217
- textStyle={{ color: theme.colors.danger500, fontSize: 12 }}
218
- onClick={() => ordersGroupAction('', '', {
219
- action: 'reject',
220
- order: ordersGrouped[k][0],
221
- ids: ordersGrouped[k].map((o: any) => o.id)
222
- })}
223
- />
224
- <OButton
225
- text={t('ACCEPT_ALL', 'Accept all')}
226
- bgColor={theme.colors.success100}
227
- borderColor={theme.colors.success100}
228
- imgRightSrc={null}
229
- style={{ borderRadius: 7, height: 40 }}
230
- parentStyle={{ width: '45%' }}
231
- textStyle={{ color: theme.colors.success500, fontSize: 12 }}
232
- onClick={() => ordersGroupAction('', '', {
233
- action: 'accept',
234
- order: ordersGrouped[k][0],
235
- ids: ordersGrouped[k].map((o: any) => o.id)
236
- })}
237
- />
238
- </AcceptOrRejectOrderStyle>
239
- )}
240
- <View>
241
- {ordersGrouped[k][0]?.status === 7 && (
242
- <OButton
243
- text={t('READY_FOR_PICKUP', 'Ready for pickup')}
244
- bgColor={theme.colors.primaryLight}
245
- borderColor={theme.colors.primaryLight}
246
- imgRightSrc={null}
247
- style={{ borderRadius: 7, height: 40 }}
248
- parentStyle={{ width: '100%' }}
249
- textStyle={{ color: theme.colors.primary, fontSize: 12 }}
250
- onClick={() => handleChangeOrderStatus(
251
- 4,
252
- ordersGrouped[k].map((o: any) => o.id),
211
+ {_ordersGrouped[k][0]?.status === 0 && (
212
+ <AcceptOrRejectOrderStyle>
213
+ <OButton
214
+ text={t('REJECT_ALL', 'Reject all')}
215
+ bgColor={theme.colors.danger100}
216
+ borderColor={theme.colors.danger100}
217
+ imgRightSrc={null}
218
+ style={{ borderRadius: 7, height: 40 }}
219
+ parentStyle={{ width: '45%' }}
220
+ textStyle={{ color: theme.colors.danger500, fontSize: 12 }}
221
+ onClick={() => onNavigationRedirect('AcceptOrRejectOrder', {
222
+ action: 'reject',
223
+ order: _ordersGrouped[k][0],
224
+ ids: _ordersGrouped[k].map((o: any) => o.id),
225
+ handleChangeOrderStatus
226
+ })}
227
+ />
228
+ <OButton
229
+ text={t('ACCEPT_ALL', 'Accept all')}
230
+ bgColor={theme.colors.success100}
231
+ borderColor={theme.colors.success100}
232
+ imgRightSrc={null}
233
+ style={{ borderRadius: 7, height: 40 }}
234
+ parentStyle={{ width: '45%' }}
235
+ textStyle={{ color: theme.colors.success500, fontSize: 12 }}
236
+ onClick={() => onNavigationRedirect('AcceptOrRejectOrder', {
237
+ action: 'accept',
238
+ order: _ordersGrouped[k][0],
239
+ ids: _ordersGrouped[k].map((o: any) => o.id),
240
+ handleChangeOrderStatus
241
+ })}
242
+ />
243
+ </AcceptOrRejectOrderStyle>
244
+ )}
245
+ <View>
246
+ {_ordersGrouped[k][0]?.status === 7 && (
247
+ <OButton
248
+ text={t('READY_FOR_PICKUP', 'Ready for pickup')}
249
+ bgColor={theme.colors.primaryLight}
250
+ borderColor={theme.colors.primaryLight}
251
+ imgRightSrc={null}
252
+ style={{ borderRadius: 7, height: 40 }}
253
+ parentStyle={{ width: '100%' }}
254
+ textStyle={{ color: theme.colors.primary, fontSize: 12 }}
255
+ onClick={() => handleChangeOrderStatus(
256
+ 4,
257
+ _ordersGrouped[k].map((o: any) => o.id),
258
+ )}
259
+ />
253
260
  )}
254
- />
255
- )}
256
- </View>
257
- <View>
258
- {viewMapStatus.includes(ordersGrouped[k][0]?.status) && (
259
- <OButton
260
- text={t('TRACK_REAL_TIME_POSITION', 'Track real time position')}
261
- bgColor={theme.colors.primaryLight}
262
- borderColor={theme.colors.primaryLight}
263
- imgRightSrc={null}
264
- style={{ borderRadius: 7, height: 40 }}
265
- parentStyle={{ width: '100%' }}
266
- textStyle={{ color: theme.colors.primary, fontSize: 12 }}
267
- onClick={() => handleOpenMapView({ orders: ordersGrouped[k] })}
268
- />
269
- )}
270
- </View>
271
- {ordersGrouped[k][0]?.status === 4 &&
272
- ![1].includes(ordersGrouped[k][0]?.delivery_type) &&
273
- (
274
- <AcceptOrRejectOrderStyle>
275
- <OButton
276
- text={t('ORDER_NOT_PICKEDUP_BY_CUSTOMER', 'Order not picked up by customer')}
277
- bgColor={theme.colors.danger100}
278
- borderColor={theme.colors.danger100}
279
- imgRightSrc={null}
280
- style={{ borderRadius: 7, height: 40, paddingLeft: 10, paddingRight: 10 }}
281
- parentStyle={{ width: '45%' }}
282
- textStyle={{ color: theme.colors.danger500, fontSize: 12, textAlign: 'center' }}
283
- onClick={() => handleChangeOrderStatus(
284
- 17,
285
- ordersGrouped[k].map((o: any) => o.id),
261
+ </View>
262
+ <View>
263
+ {viewMapStatus.includes(_ordersGrouped[k][0]?.status) && (
264
+ <OButton
265
+ text={t('TRACK_REAL_TIME_POSITION', 'Track real time position')}
266
+ bgColor={theme.colors.primaryLight}
267
+ borderColor={theme.colors.primaryLight}
268
+ imgRightSrc={null}
269
+ style={{ borderRadius: 7, height: 40 }}
270
+ parentStyle={{ width: '100%' }}
271
+ textStyle={{ color: theme.colors.primary, fontSize: 12 }}
272
+ onClick={() => handleOpenMapView({ orders: _ordersGrouped[k] })}
273
+ />
286
274
  )}
287
- />
288
- <OButton
289
- text={t('PICKUP_COMPLETED_BY_CUSTOMER', 'Pickup completed by customer')}
290
- bgColor={theme.colors.success100}
291
- borderColor={theme.colors.success100}
292
- imgRightSrc={null}
293
- style={{ borderRadius: 7, height: 40, paddingLeft: 10, paddingRight: 10 }}
294
- parentStyle={{ width: '45%' }}
295
- textStyle={{ color: theme.colors.success500, fontSize: 12, textAlign: 'center' }}
296
- onClick={() => handleChangeOrderStatus(
297
- 15,
298
- ordersGrouped[k].map((o: any) => o.id),
299
- )}
300
- />
301
- </AcceptOrRejectOrderStyle>
302
- )}
303
- {!ordersGrouped[k][0]?.user_review &&
304
- pastOrderStatuses.includes(ordersGrouped[k][0]?.status) &&
305
- (
306
- <OButton
307
- text={t('REVIEW_CUSTOMER', 'Review customer')}
308
- bgColor={theme.colors.primary}
309
- borderColor={theme.colors.primary}
310
- imgRightSrc={null}
311
- style={{ borderRadius: 8, height: 40 }}
312
- parentStyle={{ width: '100%' }}
313
- textStyle={{ color: theme.colors.white }}
314
- onClick={() => setOpenReviewModal({
315
- order: ordersGrouped[k][0],
316
- customerId: ordersGrouped[k][0]?.customer_id,
317
- ids: ordersGrouped[k].map((o: any) => o.id)
318
- })}
319
- />
320
- )}
321
- </OrdersGroupedItem>
322
- ))}
323
- </View>
324
- )}
325
- {orders?.length > 0 &&
326
- orders
327
- ?.filter((order: any) => hash[order?.id] ? false : (hash[order?.id] = true))
328
- ?.map((_order: any) => {
329
- const order = _order?.isLogistic && !_order?.order_group && isLogisticOrder ? _order?.order : _order
330
- return (
331
- <OrdersList key={order.id} order={order} _order={_order} />
332
- )
333
- }
275
+ </View>
276
+ {_ordersGrouped[k][0]?.status === 4 &&
277
+ ![1].includes(_ordersGrouped[k][0]?.delivery_type) &&
278
+ (
279
+ <AcceptOrRejectOrderStyle>
280
+ <OButton
281
+ text={t('ORDER_NOT_PICKEDUP_BY_CUSTOMER', 'Order not picked up by customer')}
282
+ bgColor={theme.colors.danger100}
283
+ borderColor={theme.colors.danger100}
284
+ imgRightSrc={null}
285
+ style={{ borderRadius: 7, height: 40, paddingLeft: 10, paddingRight: 10 }}
286
+ parentStyle={{ width: '45%' }}
287
+ textStyle={{ color: theme.colors.danger500, fontSize: 12, textAlign: 'center' }}
288
+ onClick={() => handleChangeOrderStatus(
289
+ 17,
290
+ _ordersGrouped[k].map((o: any) => o.id),
291
+ )}
292
+ />
293
+ <OButton
294
+ text={t('PICKUP_COMPLETED_BY_CUSTOMER', 'Pickup completed by customer')}
295
+ bgColor={theme.colors.success100}
296
+ borderColor={theme.colors.success100}
297
+ imgRightSrc={null}
298
+ style={{ borderRadius: 7, height: 40, paddingLeft: 10, paddingRight: 10 }}
299
+ parentStyle={{ width: '45%' }}
300
+ textStyle={{ color: theme.colors.success500, fontSize: 12, textAlign: 'center' }}
301
+ onClick={() => handleChangeOrderStatus(
302
+ 15,
303
+ _ordersGrouped[k].map((o: any) => o.id),
304
+ )}
305
+ />
306
+ </AcceptOrRejectOrderStyle>
307
+ )}
308
+ {!_ordersGrouped[k][0]?.user_review &&
309
+ pastOrderStatuses.includes(_ordersGrouped[k][0]?.status) &&
310
+ (
311
+ <OButton
312
+ text={t('REVIEW_CUSTOMER', 'Review customer')}
313
+ bgColor={theme.colors.primary}
314
+ borderColor={theme.colors.primary}
315
+ imgRightSrc={null}
316
+ style={{ borderRadius: 8, height: 40 }}
317
+ parentStyle={{ width: '100%' }}
318
+ textStyle={{ color: theme.colors.white }}
319
+ onClick={() => setOpenReviewModal({
320
+ order: _ordersGrouped[k][0],
321
+ customerId: _ordersGrouped[k][0]?.customer_id,
322
+ ids: _ordersGrouped[k].map((o: any) => o.id)
323
+ })}
324
+ />
325
+ )}
326
+ </OrdersGroupedItem>
327
+ ))}
328
+ </View>
329
+ ) : (
330
+ <View key={order.id}>
331
+ <OrdersList order={order} _order={_order} />
332
+ </View>
333
+ )
334
334
  )
335
- }
335
+ })}
336
336
 
337
337
  <OModal
338
338
  open={openModal}
@@ -311,7 +311,7 @@ export interface OrdersOptionParams {
311
311
  isLogisticActivated?: boolean;
312
312
  isAlsea?: boolean;
313
313
  checkNotification?: boolean;
314
- ordersGroupedFormatted?: any;
314
+ ordersFormatted?: any;
315
315
  handleChangeOrderStatus?: () => void;
316
316
  handleSendCustomerReview?: () => void;
317
317
  orderDetailsProps?: any;
@@ -573,14 +573,17 @@ export interface AcceptOrRejectOrderParams {
573
573
  loading?: boolean;
574
574
  action: string;
575
575
  orderId?: number;
576
- handleUpdateOrder?: () => void;
576
+ handleUpdateOrder?: (p1: any, p2: any) => {};
577
577
  notShowCustomerPhone?: boolean | undefined;
578
- actions?: actions;
578
+ actions?: any;
579
579
  titleAccept?: textTranslate;
580
580
  titleReject?: textTranslate;
581
581
  titleNotReady?: textTranslate;
582
582
  appTitle?: textTranslate;
583
583
  orderTitle?: any
584
+ isPage?: boolean
585
+ navigation?: any
586
+ route?: any
584
587
  }
585
588
 
586
589
  export interface MapViewParams {
@@ -138,7 +138,8 @@ const AddressListUI = (props: AddressListParams) => {
138
138
  }, [])
139
139
 
140
140
  return (
141
- <Container
141
+ <Container
142
+ pt={20}
142
143
  noPadding
143
144
  refreshControl={
144
145
  <RefreshControl
@@ -153,7 +154,10 @@ const AddressListUI = (props: AddressListParams) => {
153
154
  titleAlign={'center'}
154
155
  onActionLeft={goToBack}
155
156
  showCall={false}
156
- style={{ paddingHorizontal: 40, paddingVertical: Platform.OS === 'ios' ? 0 : 20, marginTop: Platform.OS === 'ios' ? 0 : 30 }}
157
+ style={{
158
+ paddingHorizontal: 40,
159
+ marginTop: Platform.OS === 'ios' ? 0 : 10
160
+ }}
157
161
  />
158
162
  )}
159
163
  {(!addressList.loading || (isFromProductsList || isFromBusinesses || isFromProfile || isProfile)) && (
@@ -174,7 +178,7 @@ const AddressListUI = (props: AddressListParams) => {
174
178
  showCall={false}
175
179
  btnStyle={{ paddingLeft: 0 }}
176
180
  paddingTop={0}
177
- style={{ marginTop: Platform.OS === 'ios' ? 0 : 40 }}
181
+ style={{ marginTop: 0 }}
178
182
  titleWrapStyle={{ paddingHorizontal: 0 }}
179
183
  titleStyle={{ marginLeft: 0, marginRight: 0 }}
180
184
  />
@@ -30,7 +30,6 @@ import {
30
30
  WrapSearchBar,
31
31
  WrapContent,
32
32
  FiltProductsContainer,
33
- ContainerSafeAreaView,
34
33
  BackgroundGray,
35
34
  ProfessionalFilterWrapper,
36
35
  NearBusiness,
@@ -353,7 +352,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
353
352
  <FiltProductsContainer
354
353
  style={{
355
354
  height: Dimensions.get('window').height - filtProductsHeight,
356
- top: Platform.OS === 'ios' ? searchBarHeight + insets.top : searchBarHeight
355
+ top: Platform.OS === 'ios' ? (searchBarHeight - 10) + insets.top : searchBarHeight
357
356
  }}
358
357
  contentContainerStyle={{ flexGrow: 1 }}
359
358
  >
@@ -515,7 +514,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
515
514
  )}
516
515
  </IOScrollView>
517
516
  {!loading && auth && currentCart?.products?.length > 0 && categoryState.products.length !== 0 && (
518
- <View style={{ marginBottom: Platform.OS === 'ios' ? 20 : 0 }}>
517
+ <View style={{ marginBottom: 0, zIndex: 20000 }}>
519
518
  <FloatingButton
520
519
  btnText={
521
520
  openUpselling
@@ -284,7 +284,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
284
284
  style={{ paddingTop: top + 20 }}>
285
285
  {!auth && (
286
286
  <TouchableOpacity onPress={() => navigation?.canGoBack() && navigation.goBack()} style={{ position: 'absolute', marginStart: 40, paddingVertical: 20 }}>
287
- <IconAntDesign name='arrowleft' size={26} />
287
+ <OIcon src={theme.images.general.arrow_left} color={theme.colors.textNormal} />
288
288
  </TouchableOpacity>
289
289
  )}
290
290
  <Search>
@@ -80,7 +80,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
80
80
  const isChewLayout = theme?.header?.components?.layout?.type === 'chew'
81
81
  const hideCities = theme?.business_listing_view?.components?.cities?.hidden ?? true
82
82
  const [refreshing] = useState(false);
83
- const bgHeader = orderingTheme?.theme?.business_listing_view?.components?.business_hero?.components?.image
83
+ const bgHeader = orderingTheme?.theme?.business_listing_view?.components?.business_hero?.components?.image
84
84
  const styles = StyleSheet.create({
85
85
  container: {
86
86
  marginBottom: 0,
@@ -474,7 +474,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
474
474
  {!auth && (
475
475
 
476
476
  <TouchableOpacity onPress={() => navigation?.canGoBack() && navigation.goBack()} style={{ position: 'absolute', marginStart: 40, paddingVertical: 20 }}>
477
- <IconAntDesign name='arrowleft' size={26} />
477
+ <OIcon src={theme.images.general.arrow_left} color={theme.colors.textNormal} />
478
478
  </TouchableOpacity>
479
479
  )}
480
480
  </HeaderWrapper>
@@ -1,6 +1,7 @@
1
1
  import React, { useState } from 'react'
2
2
  import { useLanguage, useOrder } from 'ordering-components/native'
3
3
  import { useTheme } from 'styled-components/native'
4
+ import { Platform } from 'react-native'
4
5
  import { FavoriteList } from '../FavoriteList'
5
6
  import NavBar from '../NavBar'
6
7
  import { OText } from '../shared'
@@ -34,7 +35,9 @@ export const Favorite = (props: any) => {
34
35
  }
35
36
 
36
37
  return (
37
- <Container>
38
+ <Container
39
+ pdng={Platform.OS === 'ios' ? '20px' : '30px'}
40
+ >
38
41
  <NavBar
39
42
  title={t('FAVORITE', 'Favorite')}
40
43
  titleAlign={'center'}
@@ -52,9 +55,9 @@ export const Favorite = (props: any) => {
52
55
  >
53
56
  <OText
54
57
  color={menu.key === tabSelected ? theme.colors.textNormal : theme.colors.disabled}
55
- size={14}
56
- weight={menu.key === tabSelected ? '500' : '400'}
57
- style={{ marginBottom: 12 }}
58
+ size={14}
59
+ weight={menu.key === tabSelected ? '500' : '400'}
60
+ style={{ marginBottom: 12 }}
58
61
  >
59
62
  {menu.name}
60
63
  </OText>
@@ -18,5 +18,5 @@ export const Tab = styled.TouchableOpacity`
18
18
  export const Container = styled.View`
19
19
  padding-horizontal: 40px;
20
20
  padding-bottom: 20px;
21
- padding-top: 30px;
21
+ padding-top: ${(props: any) => props.pdng};
22
22
  `
@@ -63,7 +63,7 @@ const FloatingButtonUI = (props: FloatingButtonParams) => {
63
63
  return (
64
64
  <Container
65
65
  style={{
66
- paddingBottom: Platform.OS === 'ios' ? iosBottom ?? 0 : bottom + 16
66
+ paddingBottom: Platform.OS === 'ios' ? 20 : bottom + 16
67
67
  }}>
68
68
 
69
69
  <View style={styles.infoCont}>
@@ -12,7 +12,7 @@ export const Container = styled.View`
12
12
  width: 100%;
13
13
  justify-content: space-between;
14
14
  background-color: #FFF;
15
- z-index: 9999;
15
+ z-index: 20001;
16
16
  justify-content: space-between;
17
17
  `
18
18
 
@@ -31,20 +31,20 @@ export const Help = (props: HelpParams) => {
31
31
 
32
32
  return (
33
33
  <Container
34
+ pt={10}
34
35
  noPadding
35
36
  refreshControl={
36
- <RefreshControl
37
- refreshing={refreshing}
38
- onRefresh={() => handleOnRefresh()}
39
- />
40
- }
37
+ <RefreshControl
38
+ refreshing={refreshing}
39
+ onRefresh={() => handleOnRefresh()}
40
+ />
41
+ }
41
42
  >
42
43
  <NavBar
43
44
  title={t('HELP', 'Help')}
44
45
  titleAlign={'center'}
45
46
  onActionLeft={goToBack}
46
47
  showCall={false}
47
- paddingTop={10}
48
48
  btnStyle={{ paddingLeft: 0 }}
49
49
  />
50
50
  <HelpSubItem
@@ -53,7 +53,7 @@ export const Help = (props: HelpParams) => {
53
53
  <OText size={14}>{t('HELP_WITH_ORDER', 'Help with an order')}</OText>
54
54
  </HelpSubItem>
55
55
  <HelpSubItem
56
- onPress={() => onRedirect('HelpAccountAndPayment')}
56
+ onPress={() => onRedirect('HelpAccountAndPayment')}
57
57
  >
58
58
  <OText size={14}>{t('ACCOUNT_PAYMENT_OPTIONS', 'Account and Payment Options')}</OText>
59
59
  </HelpSubItem>
@@ -1,4 +1,4 @@
1
- import React, { useRef } from 'react'
1
+ import React, { useRef, useState } from 'react'
2
2
  import Lottie from 'lottie-react-native';
3
3
  import { TouchableOpacity, Easing, ViewStyle, Animated } from 'react-native';
4
4
  import IconAntDesign from 'react-native-vector-icons/AntDesign'
@@ -13,9 +13,9 @@ interface Props {
13
13
  duration?: number,
14
14
  type: 'favorite', // animation types
15
15
  isActive: boolean,
16
- animationType?: ((value : number) => number);
16
+ animationType?: ((value: number) => number);
17
17
  useNativeDriver?: boolean,
18
- iconProps?: {color?: string, size?: number, style?: ViewStyle}
18
+ iconProps?: { color?: string, size?: number, style?: ViewStyle }
19
19
  }
20
20
 
21
21
  export const LottieAnimation = (props: Props) => {
@@ -34,30 +34,39 @@ export const LottieAnimation = (props: Props) => {
34
34
  } = props
35
35
  const theme = useTheme()
36
36
  const animationProgress = useRef(new Animated.Value(initialValue))
37
+ const [isHide, setIsHide] = useState(true)
37
38
  const favoriteArray = ['heart', 'hearto']
38
39
  const icon = type === 'favorite' ? favoriteArray : []
39
40
  const animationGif = type === 'favorite' ? theme.images?.general?.heart : ''
40
41
  const onPressLottie = () => {
41
42
  if (!disableAnimation) {
43
+ setIsHide(false)
42
44
  Animated.timing(animationProgress.current, {
43
45
  toValue,
44
46
  duration: duration || 5000,
45
47
  easing: animationType || Easing.linear,
46
48
  useNativeDriver: useNativeDriver ?? true
47
49
  }).start();
50
+ hideLottie()
48
51
  }
49
52
  onClick()
50
53
  }
51
54
 
55
+ const hideLottie = () => {
56
+ setTimeout(() => setIsHide(true), 4500)
57
+ }
58
+
52
59
  return (
53
60
  <TouchableOpacity
54
61
  onPress={onPressLottie}
55
62
  style={style}
56
63
  >
57
- <Lottie
58
- progress={animationProgress.current}
59
- source={animationGif}
60
- />
64
+ {!isHide &&
65
+ <Lottie
66
+ progress={animationProgress.current}
67
+ source={animationGif}
68
+ />
69
+ }
61
70
  <IconAntDesign
62
71
  name={isActive ? icon[0] : icon[1]}
63
72
  color={iconProps?.color || theme.colors.danger5}
@@ -253,19 +253,21 @@ const MomentOptionUI = (props: MomentOptionParams) => {
253
253
 
254
254
  return (
255
255
  <>
256
- <Container style={{ paddingLeft: 40, paddingRight: 40 }}>
257
- <View style={{ paddingBottom: 90 }}>
256
+ <Container
257
+ style={{
258
+ paddingLeft: 40,
259
+ paddingRight: 40
260
+ }}>
261
+ <View style={{ paddingBottom: 90, paddingRight: 20 }}>
258
262
  <NavBar
259
263
  onActionLeft={() => goToBack()}
260
264
  btnStyle={{ paddingLeft: 0 }}
261
- paddingTop={0}
262
265
  style={{ paddingBottom: 0 }}
263
266
  title={t('QUESTION_WHEN_ORDER', 'When do you want your order?')}
264
267
  titleAlign={'center'}
265
268
  titleStyle={{ fontSize: 20, marginRight: 0, marginLeft: 0 }}
266
269
  titleWrapStyle={{ paddingHorizontal: 0 }}
267
270
  />
268
-
269
271
  <WrapSelectOption
270
272
  onPress={() => _handleAsap()}
271
273
  disabled={orderState.loading} style={{ alignItems: 'flex-start' }}>
@@ -70,13 +70,19 @@ const NotificationsUI = (props: any) => {
70
70
  }, [notificationsList])
71
71
 
72
72
  return (
73
- <Container noPadding>
73
+ <Container
74
+ noPadding
75
+ pt={10}
76
+ >
74
77
  <NavBar
75
78
  title={t('NOTIFICATIONS', 'Notifications')}
76
79
  titleAlign={'center'}
77
80
  onActionLeft={goToBack}
78
81
  showCall={false}
79
- style={{ paddingHorizontal: 40, paddingVertical: Platform.OS === 'ios' ? 0 : 20, marginTop: Platform.OS === 'ios' ? 0 : 30 }}
82
+ style={{
83
+ paddingHorizontal: 40,
84
+ paddingVertical: 0,
85
+ }}
80
86
  />
81
87
  {showCustomerPromotions && showNotifications && (
82
88
  <>