ordering-ui-react-native 0.14.71 → 0.14.72

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 (29) hide show
  1. package/package.json +1 -1
  2. package/themes/kiosk/src/components/BusinessController/index.tsx +67 -0
  3. package/themes/kiosk/src/components/BusinessController/styles.tsx +23 -0
  4. package/themes/kiosk/src/components/BusinessesListing/index.tsx +119 -0
  5. package/themes/kiosk/src/components/BusinessesListing/styles.tsx +24 -0
  6. package/themes/kiosk/src/components/LoginForm/index.tsx +62 -2
  7. package/themes/kiosk/src/components/LogoutButton/index.tsx +74 -0
  8. package/themes/kiosk/src/types/index.d.ts +1 -0
  9. package/themes/original/src/components/BusinessInformation/index.tsx +7 -2
  10. package/themes/original/src/components/BusinessesListing/index.tsx +8 -9
  11. package/themes/original/src/components/Cart/index.tsx +8 -8
  12. package/themes/original/src/components/Checkout/index.tsx +82 -70
  13. package/themes/original/src/components/LoginForm/index.tsx +6 -4
  14. package/themes/original/src/components/OrderDetails/index.tsx +58 -6
  15. package/themes/original/src/components/OrderProgress/index.tsx +39 -31
  16. package/themes/original/src/components/OrderSummary/index.tsx +8 -8
  17. package/themes/original/src/components/PhoneInputNumber/index.tsx +1 -1
  18. package/themes/original/src/components/PhoneInputNumber/styles.tsx +1 -1
  19. package/themes/original/src/components/ProductForm/index.tsx +2 -2
  20. package/themes/original/src/components/ProductForm/styles.tsx +1 -1
  21. package/themes/original/src/components/ProductOptionSubOption/index.tsx +1 -1
  22. package/themes/original/src/components/ProductOptionSubOption/styles.tsx +1 -1
  23. package/themes/original/src/components/SingleProductCard/index.tsx +15 -8
  24. package/themes/original/src/components/UpsellingProducts/index.tsx +1 -4
  25. package/themes/original/src/components/UserProfile/index.tsx +13 -11
  26. package/themes/original/src/components/WalletTransactionItem/index.tsx +5 -5
  27. package/themes/original/src/components/Wallets/styles.tsx +1 -1
  28. package/themes/original/src/components/shared/OInput.tsx +6 -2
  29. package/themes/original/src/utils/index.tsx +7 -0
@@ -39,7 +39,7 @@ import {
39
39
  ChCart,
40
40
  DeliveryOptionsContainer,
41
41
  DeliveryOptionItem,
42
- WalletPaymentOptionContainer
42
+ WalletPaymentOptionContainer
43
43
  } from './styles';
44
44
  import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
45
45
 
@@ -133,7 +133,7 @@ const CheckoutUI = (props: any) => {
133
133
  const [webviewPaymethod, setWebviewPaymethod] = useState<any>(null)
134
134
 
135
135
 
136
- const isWalletEnabled = configs?.wallet_enabled?.value === '1' && (configs?.wallet_cash_enabled?.value === '1' || configs?.wallet_credit_point_enabled?.value === '1')
136
+ const isWalletEnabled = configs?.wallet_enabled?.value === '1' && (configs?.wallet_cash_enabled?.value === '1' || configs?.wallet_credit_point_enabled?.value === '1')
137
137
 
138
138
  const driverTipsOptions = typeof configs?.driver_tip_options?.value === 'string'
139
139
  ? JSON.parse(configs?.driver_tip_options?.value) || []
@@ -145,7 +145,7 @@ const CheckoutUI = (props: any) => {
145
145
 
146
146
  const deliveryOptions = instructionsOptions?.result && instructionsOptions?.result?.filter((option: any) => option?.enabled)?.map((option: any) => {
147
147
  return {
148
- value: option?.id, key: option?.id, label: t(option?.name.toUpperCase().replace(/\s/g, '_'), option?.name)
148
+ value: option?.id, key: option?.id, label: t(option?.name.toUpperCase().replace(/\s/g, '_'), option?.name)
149
149
  }
150
150
  })
151
151
 
@@ -169,7 +169,7 @@ const CheckoutUI = (props: any) => {
169
169
 
170
170
  const onFailPaypal = async () => {
171
171
  if (showGateway.closedByUser === true) {
172
- await confirmCart(cart.uuid)
172
+ await confirmCart(cart.uuid)
173
173
  }
174
174
  }
175
175
  const changeDeliveryOption = (option: any) => {
@@ -283,14 +283,14 @@ const CheckoutUI = (props: any) => {
283
283
  <ChSection>
284
284
  <ChBusinessDetails>
285
285
  {
286
- (businessDetails?.loading || cartState.loading) &&
286
+ (businessDetails?.loading || cartState.loading || !businessDetails?.business || Object.values(businessDetails?.business).length === 0) &&
287
287
  !businessDetails?.error &&
288
288
  (
289
289
  <Placeholder Animation={Fade}>
290
290
  <PlaceholderLine height={20} width={70} />
291
- <PlaceholderLine height={15} width={60} />
292
- <PlaceholderLine height={15} width={60} />
293
- <PlaceholderLine height={15} width={80} style={{ marginBottom: 20 }} />
291
+ <PlaceholderLine height={10} width={60} />
292
+ <PlaceholderLine height={10} width={60} />
293
+ <PlaceholderLine height={10} width={80} style={{ marginBottom: 20 }} />
294
294
  </Placeholder>
295
295
  )}
296
296
  {
@@ -337,9 +337,9 @@ const CheckoutUI = (props: any) => {
337
337
  {cartState.loading ? (
338
338
  <Placeholder Animation={Fade}>
339
339
  <PlaceholderLine height={20} width={70} />
340
- <PlaceholderLine height={15} width={60} />
341
- <PlaceholderLine height={15} width={60} />
342
- <PlaceholderLine height={15} width={80} style={{ marginBottom: 20 }} />
340
+ <PlaceholderLine height={10} width={60} />
341
+ <PlaceholderLine height={10} width={60} />
342
+ <PlaceholderLine height={10} width={80} style={{ marginBottom: 20 }} />
343
343
  </Placeholder>
344
344
  ) : (
345
345
  <UserDetails
@@ -358,54 +358,66 @@ const CheckoutUI = (props: any) => {
358
358
  <View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100, marginHorizontal: -40 }} />
359
359
  </ChSection>
360
360
 
361
- {!cartState.loading && deliveryOptionSelected !== undefined && options?.type === 1 && (
361
+ {options?.type === 1 && (
362
362
  <DeliveryOptionsContainer>
363
- <OText size={16}>{t('DELIVERY_OPTIONS', 'Delivery options')}</OText>
364
- <View
365
- style={{
366
- backgroundColor: theme.colors.inputDisabled,
367
- borderRadius: 7.5,
368
- marginBottom: 20,
369
- flex: 1
370
- }}>
371
- <Picker
372
- countryCode={undefined}
373
- visible={isDeliveryOptionModalVisible}
374
- onClose={() => setIsDeliveryOptionModalVisible(false)}
375
- withCountryNameButton
376
- renderFlagButton={() => (
377
- <TouchableOpacity onPress={() => setIsDeliveryOptionModalVisible(true)}>
378
- <DeliveryOptionItem backgroundColor={theme?.colors?.inputDisabled}>
379
- <OText
380
- size={14}
381
- >
382
- {deliveryOptions.find((option: any) => option.value === deliveryOptionSelected).label}
383
- </OText>
384
- <MaterialIcons name='keyboard-arrow-down' style={styles.icon} />
385
- </DeliveryOptionItem>
386
- </TouchableOpacity>
387
- )}
388
- flatListProps={{
389
- keyExtractor: (item: any) => item.value,
390
- data: deliveryOptions || [],
391
- renderItem: ({ item }: any) => (
392
- <TouchableOpacity
393
- onPress={() => changeDeliveryOption(item.value)}
394
- disabled={
395
- deliveryOptionSelected === item.value
396
- }
397
- >
398
- <DeliveryOptionItem backgroundColor={deliveryOptionSelected === item.value ? theme.colors.inputDisabled : 'white'}>
399
- <OText>
400
- {item.label}
401
- </OText>
402
- </DeliveryOptionItem>
403
- </TouchableOpacity>
404
- )
405
- }}
406
- />
407
- </View>
408
- <View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100, marginHorizontal: -40 }} />
363
+ {cartState.loading || deliveryOptionSelected === undefined ? (
364
+ <View style={{ height: 110 }}>
365
+ <Placeholder Animation={Fade}>
366
+ <PlaceholderLine height={20} width={70} />
367
+ <PlaceholderLine height={40} width={100} />
368
+ </Placeholder>
369
+ </View>
370
+ ) : (
371
+ <>
372
+ <OText size={16}>{t('DELIVERY_OPTIONS', 'Delivery options')}</OText>
373
+ <View
374
+ style={{
375
+ backgroundColor: theme.colors.inputDisabled,
376
+ borderRadius: 7.5,
377
+ marginBottom: 20,
378
+ flex: 1
379
+ }}>
380
+ <Picker
381
+ countryCode={undefined}
382
+ visible={isDeliveryOptionModalVisible}
383
+ onClose={() => setIsDeliveryOptionModalVisible(false)}
384
+ withCountryNameButton
385
+ renderFlagButton={() => (
386
+ <TouchableOpacity onPress={() => setIsDeliveryOptionModalVisible(true)}>
387
+ <DeliveryOptionItem backgroundColor={theme?.colors?.inputDisabled}>
388
+ <OText
389
+ size={14}
390
+ >
391
+ {deliveryOptions.find((option: any) => option.value === deliveryOptionSelected).label}
392
+ </OText>
393
+ <MaterialIcons name='keyboard-arrow-down' style={styles.icon} />
394
+ </DeliveryOptionItem>
395
+ </TouchableOpacity>
396
+ )}
397
+ flatListProps={{
398
+ keyExtractor: (item: any) => item.value,
399
+ data: deliveryOptions || [],
400
+ renderItem: ({ item }: any) => (
401
+ <TouchableOpacity
402
+ onPress={() => changeDeliveryOption(item.value)}
403
+ disabled={
404
+ deliveryOptionSelected === item.value
405
+ }
406
+ >
407
+ <DeliveryOptionItem backgroundColor={deliveryOptionSelected === item.value ? theme.colors.inputDisabled : 'white'}>
408
+ <OText>
409
+ {item.label}
410
+ </OText>
411
+ </DeliveryOptionItem>
412
+ </TouchableOpacity>
413
+ )
414
+ }}
415
+ />
416
+ </View>
417
+ <View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100, marginHorizontal: -40 }} />
418
+ </>
419
+ )}
420
+
409
421
  </DeliveryOptionsContainer>
410
422
  )}
411
423
 
@@ -436,7 +448,7 @@ const CheckoutUI = (props: any) => {
436
448
  height={80}
437
449
  borderRadius={80}
438
450
  />
439
- <View style={{ marginLeft: 15, width: '85%' }}>
451
+ <View style={{ marginLeft: 10, width: '85%' }}>
440
452
  <OText size={22} numberOfLines={2} ellipsizeMode='tail' style={{ width: '85%' }}>
441
453
  {businessName || businessDetails?.business?.name}
442
454
  </OText>
@@ -530,14 +542,14 @@ const CheckoutUI = (props: any) => {
530
542
  </ChSection>
531
543
  )}
532
544
 
533
- {!cartState.loading && cart && isWalletEnabled && (
534
- <WalletPaymentOptionContainer>
535
- <PaymentOptionWallet
536
- cart={cart}
537
- businessId={cart?.business_id}
538
- />
539
- </WalletPaymentOptionContainer>
540
- )}
545
+ {!cartState.loading && cart && isWalletEnabled && (
546
+ <WalletPaymentOptionContainer>
547
+ <PaymentOptionWallet
548
+ cart={cart}
549
+ businessId={cart?.business_id}
550
+ />
551
+ </WalletPaymentOptionContainer>
552
+ )}
541
553
 
542
554
 
543
555
  {!cartState.loading && cart && (
@@ -571,7 +583,7 @@ const CheckoutUI = (props: any) => {
571
583
  <OrderSummary
572
584
  cart={cart}
573
585
  isCartPending={cart?.status === 2}
574
- onNavigationRedirect={onNavigationRedirect}
586
+ onNavigationRedirect={onNavigationRedirect}
575
587
  />
576
588
  </>
577
589
  )}
@@ -580,7 +592,7 @@ const CheckoutUI = (props: any) => {
580
592
  )}
581
593
 
582
594
  {!cartState.loading && cart && (
583
- <View>
595
+ <View>
584
596
  <ChErrors style={{ marginBottom: 0 }}>
585
597
  {!cart?.valid_address && cart?.status !== 2 && (
586
598
  <OText
@@ -641,7 +653,7 @@ const CheckoutUI = (props: any) => {
641
653
  }
642
654
  btnRightValueShow
643
655
  btnRightValue={parsePrice(cart?.total)}
644
- iosBottom={20}
656
+ iosBottom={30}
645
657
  />
646
658
  )}
647
659
  {webviewPaymethod?.gateway === 'paypal' && showGateway.open && (
@@ -102,7 +102,8 @@ const LoginFormUI = (props: LoginParams) => {
102
102
  },
103
103
  });
104
104
 
105
- const inputRef = useRef<any>({});
105
+ const emailRef = useRef<any>({});
106
+ const passwordRef = useRef<any>({});
106
107
 
107
108
  const handleChangeTab = (val: string) => {
108
109
  props.handleChangeTab(val);
@@ -299,8 +300,9 @@ const LoginFormUI = (props: LoginParams) => {
299
300
  type="email-address"
300
301
  autoCompleteType="email"
301
302
  returnKeyType="next"
302
- onSubmitEditing={() => inputRef.current?.focus()}
303
+ onSubmitEditing={() => passwordRef.current?.focus()}
303
304
  blurOnSubmit={false}
305
+ forwardRef={emailRef}
304
306
  />
305
307
  )}
306
308
  name="email"
@@ -327,7 +329,7 @@ const LoginFormUI = (props: LoginParams) => {
327
329
  handleData={(val: any) => setPhoneInputData(val)}
328
330
  textInputProps={{
329
331
  returnKeyType: 'next',
330
- onSubmitEditing: () => inputRef?.current?.focus?.(),
332
+ onSubmitEditing: () => passwordRef?.current?.focus?.(),
331
333
  }}
332
334
  />
333
335
  </View>
@@ -359,7 +361,7 @@ const LoginFormUI = (props: LoginParams) => {
359
361
  )
360
362
  }
361
363
  value={value}
362
- forwardRef={inputRef}
364
+ forwardRef={passwordRef}
363
365
  onChange={(val: any) => onChange(val)}
364
366
  returnKeyType="done"
365
367
  onSubmitEditing={handleSubmit(onSubmit)}
@@ -47,6 +47,7 @@ import { verifyDecimals } from '../../utils';
47
47
  import { OSRow } from '../OrderSummary/styles';
48
48
  import AntIcon from 'react-native-vector-icons/AntDesign'
49
49
  import { TaxInformation } from '../TaxInformation';
50
+ import { Placeholder, PlaceholderLine } from 'rn-placeholder';
50
51
 
51
52
  export const OrderDetailsUI = (props: OrderDetailsParams) => {
52
53
  const {
@@ -421,7 +422,58 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
421
422
 
422
423
  return (
423
424
  <OrderDetailsContainer keyboardShouldPersistTaps="handled">
424
- <Spinner visible={!order || Object.keys(order).length === 0} />
425
+ {(!order || Object.keys(order).length === 0) && (
426
+ <Placeholder style={{ marginTop: 30 }}>
427
+ <Header>
428
+ <OrderInfo>
429
+ <OrderData>
430
+ <PlaceholderLine width={60} height={15} />
431
+ <PlaceholderLine width={60} height={10} />
432
+ <StaturBar>
433
+ <PlaceholderLine height={15} />
434
+ <PlaceholderLine width={40} height={20} />
435
+ </StaturBar>
436
+ </OrderData>
437
+ <View
438
+ style={{
439
+ height: 8,
440
+ backgroundColor: theme.colors.backgroundGray100,
441
+ marginTop: 18,
442
+ marginHorizontal: -40,
443
+ }}
444
+ />
445
+ </OrderInfo>
446
+ </Header>
447
+ <OrderContent>
448
+ <OrderBusiness>
449
+ <PlaceholderLine width={30} height={20} />
450
+ <PlaceholderLine width={60} height={15} />
451
+ <PlaceholderLine width={75} height={10} />
452
+ <PlaceholderLine width={40} height={10} />
453
+ <PlaceholderLine width={95} height={10} />
454
+ </OrderBusiness>
455
+ </OrderContent>
456
+ <View
457
+ style={{
458
+ height: 8,
459
+ backgroundColor: theme.colors.backgroundGray100,
460
+ marginTop: 18,
461
+ marginHorizontal: -40,
462
+ }}
463
+ />
464
+ <OrderCustomer>
465
+ <PlaceholderLine width={20} height={20} />
466
+ <PlaceholderLine width={70} height={15} />
467
+ <PlaceholderLine width={65} height={10} />
468
+ <PlaceholderLine width={80} height={10} />
469
+ <PlaceholderLine width={70} height={10} />
470
+ <View style={{marginTop: 10}}>
471
+ <PlaceholderLine width={60} height={20} />
472
+ <PlaceholderLine width={40} height={10} />
473
+ </View>
474
+ </OrderCustomer>
475
+ </Placeholder>
476
+ )}
425
477
  {order && Object.keys(order).length > 0 && (
426
478
  <>
427
479
  <Header>
@@ -768,7 +820,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
768
820
  )}
769
821
  </OText>
770
822
  <TouchableOpacity style={{ marginLeft: 5 }} onPress={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_1' })}>
771
- <AntIcon name='exclamationcircleo' size={18} color={theme.colors.primary} />
823
+ <AntIcon name='infocirlceo' size={16} color={theme.colors.primary} />
772
824
  </TouchableOpacity>
773
825
  </OSRow>
774
826
  <OText size={12} lineHeight={18} weight={'400'} color={theme.colors.textNormal}>- {parsePrice(offer?.summary?.discount)}</OText>
@@ -816,7 +868,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
816
868
  {`(${verifyDecimals(tax?.rate, parseNumber)}%)`}{' '}
817
869
  </OText>
818
870
  <TouchableOpacity onPress={() => setOpenTaxModal({ open: true, data: tax, type: 'tax' })}>
819
- <AntIcon name='exclamationcircleo' size={18} color={theme.colors.primary} />
871
+ <AntIcon name='infocirlceo' size={16} color={theme.colors.primary} />
820
872
  </TouchableOpacity>
821
873
  </OSRow>
822
874
  <OText size={12} lineHeight={18} weight={'400'} color={theme.colors.textNormal}>{parsePrice(tax?.summary?.tax_after_discount ?? tax?.summary?.tax ?? 0)}</OText>
@@ -832,7 +884,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
832
884
  ({parsePrice(fee?.fixed)} + {fee.percentage}%){' '}
833
885
  </OText>
834
886
  <TouchableOpacity onPress={() => setOpenTaxModal({ open: true, data: fee, type: 'fee' })}>
835
- <AntIcon name='exclamationcircleo' size={18} color={theme.colors.primary} />
887
+ <AntIcon name='infocirlceo' size={16} color={theme.colors.primary} />
836
888
  </TouchableOpacity>
837
889
  </OSRow>
838
890
  <OText size={12} lineHeight={18} weight={'400'} color={theme.colors.textNormal}>{parsePrice(fee?.summary?.fixed + (fee?.summary?.percentage_after_discount ?? fee?.summary?.percentage) ?? 0)}</OText>
@@ -850,7 +902,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
850
902
  )}
851
903
  </OText>
852
904
  <TouchableOpacity style={{ marginLeft: 5 }} onPress={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_3' })}>
853
- <AntIcon name='exclamationcircleo' size={18} color={theme.colors.primary} />
905
+ <AntIcon name='infocirlceo' size={16} color={theme.colors.primary} />
854
906
  </TouchableOpacity>
855
907
  </OSRow>
856
908
  <OText size={12} lineHeight={18} weight={'400'} color={theme.colors.textNormal}>- {parsePrice(offer?.summary?.discount)}</OText>
@@ -874,7 +926,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
874
926
  )}
875
927
  </OText>
876
928
  <TouchableOpacity style={{ marginLeft: 5 }} onPress={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_2' })}>
877
- <AntIcon name='exclamationcircleo' size={18} color={theme.colors.primary} />
929
+ <AntIcon name='infocirlceo' size={16} color={theme.colors.primary} />
878
930
  </TouchableOpacity>
879
931
  </OSRow>
880
932
  <OText size={12} lineHeight={18} weight={'400'} color={theme.colors.textNormal}>- {parsePrice(offer?.summary?.discount)}</OText>
@@ -21,14 +21,16 @@ import {
21
21
  } from './styles'
22
22
 
23
23
  const OrderProgressUI = (props: any) => {
24
- const {
25
- orderList,
26
- navigation
27
- } = props
24
+ const {
25
+ orderList,
26
+ navigation,
27
+ loadOrders,
28
+ isFocused
29
+ } = props
28
30
 
29
- const theme = useTheme();
31
+ const theme = useTheme();
30
32
 
31
- const [, t] = useLanguage()
33
+ const [, t] = useLanguage()
32
34
  const [{ optimizeImage, parseDate, parseTime }] = useUtils()
33
35
  const [lastOrder, setLastOrder] = useState<any>(null)
34
36
  const imageFails = theme.images.general.emptyActiveOrders
@@ -53,11 +55,11 @@ const OrderProgressUI = (props: any) => {
53
55
  overflow: 'hidden',
54
56
  backgroundColor: 'white',
55
57
  borderRadius: 8,
56
- shadowColor: '#000000',
57
- shadowOffset: { width: 1, height: 1 },
58
- shadowOpacity: 0.1,
59
- shadowRadius: 1,
60
- elevation: 3
58
+ shadowColor: '#000000',
59
+ shadowOffset: { width: 1, height: 1 },
60
+ shadowOpacity: 0.1,
61
+ shadowRadius: 1,
62
+ elevation: 3
61
63
  },
62
64
  logo: {
63
65
  width: 50,
@@ -69,10 +71,10 @@ const OrderProgressUI = (props: any) => {
69
71
  flexDirection: 'row',
70
72
  alignItems: 'center'
71
73
  }
72
- });
74
+ });
73
75
 
74
- const getOrderStatus = (s: any) => {
75
- const status = parseInt(s)
76
+ const getOrderStatus = (s: any) => {
77
+ const status = parseInt(s)
76
78
  const orderStatus = [
77
79
  { key: 0, value: t('PENDING', theme?.defaultLanguages?.PENDING || 'Pending'), slug: 'PENDING', percentage: 25 },
78
80
  { key: 1, value: t('COMPLETED', theme?.defaultLanguages?.COMPLETED || 'Completed'), slug: 'COMPLETED', percentage: 100 },
@@ -98,10 +100,10 @@ const OrderProgressUI = (props: any) => {
98
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 }
99
101
  ]
100
102
 
101
- const objectStatus = orderStatus.find((o) => o.key === status)
103
+ const objectStatus = orderStatus.find((o) => o.key === status)
102
104
 
103
- return objectStatus && objectStatus
104
- }
105
+ return objectStatus && objectStatus
106
+ }
105
107
 
106
108
  const convertDiffToHours = (order: any) => {
107
109
  const time = order.delivery_type === 1 ? order?.business?.delivery_time : order?.business?.pickup_time
@@ -120,18 +122,24 @@ const OrderProgressUI = (props: any) => {
120
122
 
121
123
  useEffect(() => {
122
124
  if (orderList?.orders.length > 0) {
123
- const sortedOrders = orderList.orders.sort((a: any, b:any) => a.id > b.id ? -1 : 1)
125
+ const sortedOrders = orderList.orders.sort((a: any, b: any) => a.id > b.id ? -1 : 1)
124
126
  setLastOrder(sortedOrders[0])
125
127
  }
126
128
  }, [orderList?.orders])
127
129
 
128
- return (
129
- <>
130
+ useEffect(() => {
131
+ if (isFocused) {
132
+ loadOrders()
133
+ }
134
+ }, [isFocused])
135
+
136
+ return (
137
+ <>
130
138
  {orderList?.loading && (
131
- <Placeholder Animation={Fade} height={130}>
132
- <PlaceholderLine height={50} style={{ borderRadius: 8, marginBottom: 10 }} />
133
- <PlaceholderLine height={15} style={{ marginBottom: 10 }} />
134
- <PlaceholderLine height={30} style={{ borderRadius: 8, marginBottom: 10 }} />
139
+ <Placeholder Animation={Fade} height={160}>
140
+ <PlaceholderLine height={60} style={{ borderRadius: 8, marginBottom: 10 }} />
141
+ <PlaceholderLine height={20} style={{ marginBottom: 10 }} />
142
+ <PlaceholderLine height={40} style={{ borderRadius: 8, marginBottom: 10 }} />
135
143
  </Placeholder>
136
144
  )}
137
145
  {!orderList?.loading && orderList?.orders?.length > 0 && lastOrder && (
@@ -141,8 +149,8 @@ const OrderProgressUI = (props: any) => {
141
149
  <FastImage
142
150
  style={{ width: 50, height: 50 }}
143
151
  source={{
144
- uri: optimizeImage(lastOrder?.business?.logo, 'h_50,c_limit'),
145
- priority: FastImage.priority.normal,
152
+ uri: optimizeImage(lastOrder?.business?.logo, 'h_50,c_limit'),
153
+ priority: FastImage.priority.normal,
146
154
  }}
147
155
  resizeMode={FastImage.resizeMode.cover}
148
156
  />
@@ -150,7 +158,7 @@ const OrderProgressUI = (props: any) => {
150
158
  <View style={{
151
159
  paddingHorizontal: 10,
152
160
  flex: 1
153
- }}
161
+ }}
154
162
  >
155
163
  <OText
156
164
  size={13}
@@ -185,7 +193,7 @@ const OrderProgressUI = (props: any) => {
185
193
  {lastOrder?.delivery_datetime_utc
186
194
  ? parseTime(lastOrder?.delivery_datetime_utc, { outputFormat: 'hh:mm A' })
187
195
  : parseTime(lastOrder?.delivery_datetime, { utc: false })}
188
- &nbsp;-&nbsp;
196
+ &nbsp;-&nbsp;
189
197
  {convertDiffToHours(lastOrder)}
190
198
  </OText>
191
199
  </TimeWrapper>
@@ -200,8 +208,8 @@ const OrderProgressUI = (props: any) => {
200
208
  conditioned
201
209
  />
202
210
  )} */}
203
- </>
204
- )
211
+ </>
212
+ )
205
213
  }
206
214
 
207
215
  export const OrderProgress = (props: any) => {
@@ -217,6 +225,6 @@ export const OrderProgress = (props: any) => {
217
225
  }
218
226
  }
219
227
 
220
- return <OrderList {...orderProgressProps} />
228
+ return <OrderList {...orderProgressProps} />
221
229
 
222
230
  }
@@ -154,10 +154,10 @@ const OrderSummaryUI = (props: any) => {
154
154
  <OText size={12}>{`(${verifyDecimals(offer?.rate, parsePrice)}%)`}</OText>
155
155
  )}
156
156
  <TouchableOpacity style={{ marginLeft: 3 }} onPress={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_1' })}>
157
- <AntIcon name='exclamationcircleo' size={18} color={theme.colors.primary} />
157
+ <AntIcon name='infocirlceo' size={16} color={theme.colors.primary} />
158
158
  </TouchableOpacity>
159
159
  <TouchableOpacity style={{ marginLeft: 3 }} onPress={() => onRemoveOffer(offer?.id)}>
160
- <AntIcon name='closecircle' size={18} color={theme.colors.primary} />
160
+ <AntIcon name='closecircle' size={16} color={theme.colors.primary} />
161
161
  </TouchableOpacity>
162
162
  </OSRow>
163
163
  <OText size={12}>
@@ -186,7 +186,7 @@ const OrderSummaryUI = (props: any) => {
186
186
  {`(${verifyDecimals(tax?.rate, parseNumber)}%)`}{' '}
187
187
  </OText>
188
188
  <TouchableOpacity onPress={() => setOpenTaxModal({ open: true, data: tax, type: 'tax' })} >
189
- <AntIcon name='exclamationcircleo' size={18} color={theme.colors.primary} />
189
+ <AntIcon name='infocirlceo' size={16} color={theme.colors.primary} />
190
190
  </TouchableOpacity>
191
191
  </OSRow>
192
192
  <OText size={12}>{parsePrice(tax?.summary?.tax_after_discount ?? tax?.summary?.tax ?? 0)}</OText>
@@ -202,7 +202,7 @@ const OrderSummaryUI = (props: any) => {
202
202
  ({parsePrice(fee?.fixed)} + {fee?.percentage}%){' '}
203
203
  </OText>
204
204
  <TouchableOpacity onPress={() => setOpenTaxModal({ open: true, data: fee, type: 'fee' })} >
205
- <AntIcon name='exclamationcircleo' size={18} color={theme.colors.primary} />
205
+ <AntIcon name='infocirlceo' size={16} color={theme.colors.primary} />
206
206
  </TouchableOpacity>
207
207
  </OSRow>
208
208
  <OText size={12}>{parsePrice(fee?.summary?.fixed + (fee?.summary?.percentage_after_discount ?? fee?.summary?.percentage) ?? 0)}</OText>
@@ -218,10 +218,10 @@ const OrderSummaryUI = (props: any) => {
218
218
  <OText size={12}>{`(${verifyDecimals(offer?.rate, parsePrice)}%)`}</OText>
219
219
  )}
220
220
  <TouchableOpacity style={{ marginLeft: 3 }} onPress={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_3' })}>
221
- <AntIcon name='exclamationcircleo' size={18} color={theme.colors.primary} />
221
+ <AntIcon name='infocirlceo' size={16} color={theme.colors.primary} />
222
222
  </TouchableOpacity>
223
223
  <TouchableOpacity style={{ marginLeft: 3 }} onPress={() => onRemoveOffer(offer?.id)}>
224
- <AntIcon name='closecircle' size={18} color={theme.colors.primary} />
224
+ <AntIcon name='closecircle' size={16} color={theme.colors.primary} />
225
225
  </TouchableOpacity>
226
226
  </OSRow>
227
227
  <OText size={12}>
@@ -245,10 +245,10 @@ const OrderSummaryUI = (props: any) => {
245
245
  <OText size={12}>{`(${verifyDecimals(offer?.rate, parsePrice)}%)`}</OText>
246
246
  )}
247
247
  <TouchableOpacity style={{ marginLeft: 3 }} onPress={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_2' })}>
248
- <AntIcon name='exclamationcircleo' size={18} color={theme.colors.primary} />
248
+ <AntIcon name='infocirlceo' size={16} color={theme.colors.primary} />
249
249
  </TouchableOpacity>
250
250
  <TouchableOpacity style={{ marginLeft: 3 }} onPress={() => onRemoveOffer(offer?.id)}>
251
- <AntIcon name='closecircle' size={18} color={theme.colors.primary} />
251
+ <AntIcon name='closecircle' size={16} color={theme.colors.primary} />
252
252
  </TouchableOpacity>
253
253
  </OSRow>
254
254
  <OText size={12}>
@@ -96,7 +96,7 @@ export const PhoneInputNumber = (props: PhoneInputParams) => {
96
96
  }, [userphoneNumber])
97
97
 
98
98
  return (
99
- <Wrapper>
99
+ <Wrapper onPress={() => forwardRef?.current?.focus?.()}>
100
100
  <PhoneInput
101
101
  ref={phoneInput}
102
102
  disabled={isDisabled}
@@ -1,3 +1,3 @@
1
1
  import styled from 'styled-components/native';
2
2
 
3
- export const Wrapper = styled.View``
3
+ export const Wrapper = styled.Pressable``
@@ -20,7 +20,7 @@ import {
20
20
  Grayscale
21
21
  } from 'react-native-color-matrix-image-filters'
22
22
 
23
- import { View, TouchableOpacity, StyleSheet, Dimensions, I18nManager, SafeAreaView, Button, Alert } from 'react-native';
23
+ import { View, TouchableOpacity, StyleSheet, Dimensions, I18nManager, SafeAreaView, Platform, Button } from 'react-native';
24
24
 
25
25
  import {
26
26
  WrapHeader,
@@ -829,7 +829,7 @@ export const ProductOptionsUI = (props: any) => {
829
829
  )}
830
830
  </ScrollView>
831
831
  {!loading && !error && product && (
832
- <ProductActions>
832
+ <ProductActions ios={Platform?.OS === 'ios'}>
833
833
  <OText size={16} lineHeight={24} weight={'600'}>
834
834
  {productCart.total ? parsePrice(productCart?.total) : ''}
835
835
  </OText>
@@ -71,7 +71,7 @@ export const ProductActions = styled.View`
71
71
  position: absolute;
72
72
  bottom: 0px;
73
73
  min-height: 70px;
74
- padding-top: 12px;
74
+ padding-top: ${(props : any) => props.ios ? '20px' : '0'};
75
75
  padding-horizontal: 40px;
76
76
  width: 100%;
77
77
  flex-direction: row;
@@ -52,7 +52,7 @@ export const ProductOptionSubOptionUI = (props: any) => {
52
52
  const disableIncrement = option?.limit_suboptions_by_max ? balance === option?.max : state.quantity === suboption?.max || (!state.selected && balance === option?.max)
53
53
  const price = option?.with_half_option && suboption?.half_price && state.position !== 'whole' ? suboption?.half_price : suboption?.price
54
54
  return (
55
- <Container>
55
+ <Container onPress={() => handleSuboptionClick()}>
56
56
  <IconControl disabled={disabled} onPress={() => handleSuboptionClick()}>
57
57
  {((option?.min === 0 && option?.max === 1) || option?.max > 1) ? (
58
58
  state?.selected ? (
@@ -1,6 +1,6 @@
1
1
  import styled, { css } from 'styled-components/native'
2
2
 
3
- export const Container = styled.View`
3
+ export const Container = styled.TouchableOpacity`
4
4
  flex-direction: row;
5
5
  align-items: center;
6
6
  justify-content: space-between;