ordering-ui-react-native 0.15.24 → 0.15.26-release

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 (160) hide show
  1. package/package.json +5 -3
  2. package/src/DeliveryApp.tsx +43 -1
  3. package/src/components/BusinessController/index.tsx +8 -2
  4. package/src/components/BusinessTypeFilter/index.tsx +12 -2
  5. package/src/components/BusinessTypeFilter/styles.tsx +1 -1
  6. package/src/components/BusinessesListing/index.tsx +1 -1
  7. package/src/components/Checkout/index.tsx +0 -1
  8. package/src/components/LanguageSelector/index.tsx +7 -2
  9. package/src/components/OrderDetails/index.tsx +2 -2
  10. package/src/components/PaymentOptions/index.tsx +9 -16
  11. package/src/components/PaymentOptionsWebView/index.tsx +123 -124
  12. package/src/components/SingleProductCard/index.tsx +16 -4
  13. package/src/components/StripeElementsForm/index.tsx +27 -48
  14. package/src/components/UserProfileForm/index.tsx +63 -6
  15. package/src/components/UserProfileForm/styles.tsx +8 -0
  16. package/src/components/VerifyPhone/styles.tsx +1 -2
  17. package/src/components/shared/OModal.tsx +1 -1
  18. package/src/config.json +0 -2
  19. package/src/hooks/useCountdownTimer.tsx +26 -0
  20. package/src/navigators/HomeNavigator.tsx +6 -0
  21. package/src/pages/BusinessProductsList.tsx +1 -0
  22. package/src/pages/BusinessesListing.tsx +1 -1
  23. package/src/pages/Checkout.tsx +1 -1
  24. package/src/pages/Sessions.tsx +22 -0
  25. package/src/types/index.tsx +5 -11
  26. package/src/utils/index.tsx +68 -1
  27. package/themes/business/index.tsx +2 -0
  28. package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +103 -15
  29. package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +6 -0
  30. package/themes/business/src/components/Chat/index.tsx +38 -86
  31. package/themes/business/src/components/Home/index.tsx +128 -55
  32. package/themes/business/src/components/Home/styles.tsx +8 -1
  33. package/themes/business/src/components/LoginForm/index.tsx +89 -2
  34. package/themes/business/src/components/LoginForm/styles.tsx +6 -0
  35. package/themes/business/src/components/NewOrderNotification/index.tsx +61 -98
  36. package/themes/business/src/components/OrderDetails/Business.tsx +2 -1
  37. package/themes/business/src/components/OrderDetails/Delivery.tsx +32 -15
  38. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +151 -89
  39. package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +91 -17
  40. package/themes/business/src/components/OrderDetails/styles.tsx +7 -0
  41. package/themes/business/src/components/OrdersListManager/index.tsx +874 -0
  42. package/themes/business/src/components/OrdersListManager/styles.tsx +123 -0
  43. package/themes/business/src/components/OrdersListManager/utils.tsx +216 -0
  44. package/themes/business/src/components/OrdersOption/index.tsx +54 -50
  45. package/themes/business/src/components/PreviousOrders/index.tsx +75 -22
  46. package/themes/business/src/components/shared/OModal.tsx +1 -1
  47. package/themes/business/src/types/index.tsx +5 -1
  48. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  49. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  50. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  51. package/themes/kiosk/src/components/Cart/index.tsx +98 -24
  52. package/themes/kiosk/src/components/Cart/styles.tsx +6 -0
  53. package/themes/kiosk/src/components/CartBottomSheet/index.tsx +1 -1
  54. package/themes/kiosk/src/components/CartBottomSheet/styles.tsx +1 -1
  55. package/themes/kiosk/src/components/CartContent/index.tsx +13 -3
  56. package/themes/kiosk/src/components/CartItem/index.tsx +20 -8
  57. package/themes/kiosk/src/components/CustomerName/index.tsx +89 -88
  58. package/themes/kiosk/src/components/Intro/index.tsx +13 -13
  59. package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
  60. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  61. package/themes/kiosk/src/components/OrderDetails/index.tsx +136 -41
  62. package/themes/kiosk/src/components/OrderDetails/styles.tsx +5 -0
  63. package/themes/kiosk/src/components/OrderSummary/index.tsx +1 -1
  64. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +10 -12
  65. package/themes/kiosk/src/components/ProductForm/index.tsx +174 -125
  66. package/themes/kiosk/src/components/ProductForm/styles.tsx +1 -1
  67. package/themes/kiosk/src/components/ProductOption/index.tsx +1 -0
  68. package/themes/kiosk/src/components/ProductOption/styles.tsx +1 -0
  69. package/themes/kiosk/src/components/UpsellingProducts/index.tsx +48 -34
  70. package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
  71. package/themes/kiosk/src/types/index.d.ts +2 -0
  72. package/themes/original/index.tsx +178 -1
  73. package/themes/original/src/components/AddressForm/index.tsx +15 -10
  74. package/themes/original/src/components/AddressList/index.tsx +56 -18
  75. package/themes/original/src/components/AppleLogin/index.tsx +117 -78
  76. package/themes/original/src/components/BusinessBasicInformation/index.tsx +96 -45
  77. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +28 -1
  78. package/themes/original/src/components/BusinessController/index.tsx +52 -22
  79. package/themes/original/src/components/BusinessController/styles.tsx +22 -0
  80. package/themes/original/src/components/BusinessFeaturedController/index.tsx +20 -1
  81. package/themes/original/src/components/BusinessFeaturedController/styles.tsx +23 -0
  82. package/themes/original/src/components/BusinessListingSearch/index.tsx +121 -7
  83. package/themes/original/src/components/BusinessListingSearch/styles.tsx +14 -1
  84. package/themes/original/src/components/BusinessMenuList/index.tsx +11 -4
  85. package/themes/original/src/components/BusinessPreorder/index.tsx +142 -122
  86. package/themes/original/src/components/BusinessProductsCategories/index.tsx +9 -7
  87. package/themes/original/src/components/BusinessProductsList/index.tsx +127 -20
  88. package/themes/original/src/components/BusinessProductsList/styles.tsx +29 -2
  89. package/themes/original/src/components/BusinessProductsListing/index.tsx +92 -37
  90. package/themes/original/src/components/BusinessProductsListing/styles.tsx +22 -0
  91. package/themes/original/src/components/BusinessReviews/index.tsx +4 -25
  92. package/themes/original/src/components/BusinessTypeFilter/index.tsx +1 -2
  93. package/themes/original/src/components/BusinessesListing/index.tsx +51 -58
  94. package/themes/original/src/components/Cart/index.tsx +19 -15
  95. package/themes/original/src/components/CartContent/index.tsx +2 -2
  96. package/themes/original/src/components/Checkout/index.tsx +42 -27
  97. package/themes/original/src/components/ForgotPasswordForm/index.tsx +84 -4
  98. package/themes/original/src/components/GoogleMap/index.tsx +1 -0
  99. package/themes/original/src/components/Help/index.tsx +21 -4
  100. package/themes/original/src/components/HighestRatedBusinesses/index.tsx +97 -89
  101. package/themes/original/src/components/Home/index.tsx +1 -1
  102. package/themes/original/src/components/LastOrders/index.tsx +12 -1
  103. package/themes/original/src/components/LoginForm/Otp/index.tsx +90 -0
  104. package/themes/original/src/components/LoginForm/Otp/styles.tsx +7 -0
  105. package/themes/original/src/components/LoginForm/index.tsx +389 -156
  106. package/themes/original/src/components/LoginForm/styles.tsx +7 -4
  107. package/themes/original/src/components/LogoutButton/index.tsx +7 -1
  108. package/themes/original/src/components/MessageListing/index.tsx +10 -1
  109. package/themes/original/src/components/Messages/index.tsx +34 -25
  110. package/themes/original/src/components/Messages/styles.tsx +1 -3
  111. package/themes/original/src/components/MomentOption/index.tsx +10 -1
  112. package/themes/original/src/components/MomentOption/styles.tsx +1 -1
  113. package/themes/original/src/components/OrderDetails/index.tsx +35 -28
  114. package/themes/original/src/components/OrderDetails/styles.tsx +1 -2
  115. package/themes/original/src/components/OrderProgress/index.tsx +4 -4
  116. package/themes/original/src/components/OrderProgress/styles.tsx +1 -0
  117. package/themes/original/src/components/OrderSummary/index.tsx +3 -3
  118. package/themes/original/src/components/OrderTypeSelector/index.tsx +4 -2
  119. package/themes/original/src/components/OrdersOption/index.tsx +25 -33
  120. package/themes/original/src/components/OrdersOption/styles.tsx +0 -6
  121. package/themes/original/src/components/PaymentOptionCash/index.tsx +2 -2
  122. package/themes/original/src/components/PaymentOptionWallet/index.tsx +22 -24
  123. package/themes/original/src/components/PaymentOptionWallet/styles.tsx +1 -1
  124. package/themes/original/src/components/PaymentOptions/index.tsx +9 -19
  125. package/themes/original/src/components/PhoneInputNumber/index.tsx +1 -1
  126. package/themes/original/src/components/PreviousOrders/index.tsx +19 -13
  127. package/themes/original/src/components/ProductForm/index.tsx +76 -61
  128. package/themes/original/src/components/ProductForm/styles.tsx +2 -2
  129. package/themes/original/src/components/ProductItemAccordion/index.tsx +2 -2
  130. package/themes/original/src/components/ProductOptionSubOption/index.tsx +18 -12
  131. package/themes/original/src/components/Promotions/index.tsx +250 -0
  132. package/themes/original/src/components/Promotions/styles.tsx +60 -0
  133. package/themes/original/src/components/ReviewOrder/index.tsx +10 -9
  134. package/themes/original/src/components/ReviewProducts/index.tsx +1 -1
  135. package/themes/original/src/components/Sessions/index.tsx +160 -0
  136. package/themes/original/src/components/Sessions/styles.tsx +15 -0
  137. package/themes/original/src/components/SingleProductCard/index.tsx +47 -21
  138. package/themes/original/src/components/SingleProductCard/styles.tsx +28 -1
  139. package/themes/original/src/components/StripeElementsForm/index.tsx +55 -72
  140. package/themes/original/src/components/TaxInformation/index.tsx +10 -4
  141. package/themes/original/src/components/UpsellingProducts/index.tsx +87 -71
  142. package/themes/original/src/components/UserDetails/index.tsx +4 -95
  143. package/themes/original/src/components/UserFormDetails/index.tsx +32 -31
  144. package/themes/original/src/components/UserProfile/index.tsx +62 -14
  145. package/themes/original/src/components/UserProfileForm/index.tsx +20 -18
  146. package/themes/original/src/components/VerifyPhone/index.tsx +10 -7
  147. package/themes/original/src/components/VerifyPhone/styles.tsx +2 -1
  148. package/themes/original/src/components/Wallets/index.tsx +76 -9
  149. package/themes/original/src/components/Wallets/styles.tsx +21 -0
  150. package/themes/original/src/components/shared/HeaderTitle.tsx +21 -0
  151. package/themes/original/src/components/shared/OModal.tsx +1 -1
  152. package/themes/original/src/components/shared/index.tsx +2 -0
  153. package/themes/original/src/config/constants.tsx +6 -6
  154. package/themes/original/src/types/index.tsx +62 -5
  155. package/themes/original/src/utils/index.tsx +28 -2
  156. package/themes/single-business/src/components/AddressList/index.tsx +1 -1
  157. package/themes/single-business/src/components/OrderTypeSelector/index.tsx +6 -6
  158. package/themes/single-business/src/components/UserProfile/index.tsx +1 -1
  159. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
  160. package/src/components/StripeMethodForm/index.tsx +0 -168
@@ -95,7 +95,7 @@ interface Props {
95
95
  style?: ViewStyle;
96
96
  bgImage: ImageSourcePropType;
97
97
  innerStyle?: ViewStyle;
98
- icon?: ImageSourcePropType;
98
+ icon: ImageSourcePropType;
99
99
  iconStyle?: ImageStyle;
100
100
  callToActionText: string;
101
101
  callToActionTextStyle?: TextStyle;
@@ -23,6 +23,7 @@ import {
23
23
  Table,
24
24
  OrderBill,
25
25
  Total,
26
+ OSRow,
26
27
  } from './styles'
27
28
  import { OrderDetailsParams, Product } from '../../types'
28
29
  import { Container } from '../../layouts/Container';
@@ -178,6 +179,20 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
178
179
  setIsLoading(false)
179
180
  }
180
181
 
182
+ const getIncludedTaxes = () => {
183
+ if (order?.taxes?.length === 0) {
184
+ return order.tax_type === 1 ? order?.summary?.tax ?? 0 : 0
185
+ } else {
186
+ return order?.taxes.reduce((taxIncluded: number, tax: any) => {
187
+ return taxIncluded + (tax.type === 1 ? tax.summary?.tax : 0)
188
+ }, 0)
189
+ }
190
+ }
191
+
192
+ const getIncludedTaxesDiscounts = () => {
193
+ return order?.taxes?.filter((tax: any) => tax?.type === 1)?.reduce((carry: number, tax: any) => carry + (tax?.summary?.tax_after_discount ?? tax?.summary?.tax), 0)
194
+ }
195
+
181
196
  useEffect(() => {
182
197
  const backAction = () => {
183
198
  Alert.alert(`${t('HOLD_ON', 'Hold on')}!`, `${t('ARE_YOU_SURE_YOU_WANT_TO_GO_BACK', 'Are you sure you want to go back')}?`, [
@@ -209,16 +224,16 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
209
224
  const getCustomerName = async () => {
210
225
  try {
211
226
  const { customerName: name } = await _retrieveStoreData('customer_name')
212
- setCustomerName(name)
227
+ setCustomerName(name)
213
228
  } catch (e) {
214
229
  if (e) {
215
- setCustomerName('')
230
+ setCustomerName(null)
216
231
  }
217
232
  }
218
233
  }
219
234
  getCustomerName()
220
- const redirectHome = setTimeout(() =>{
221
- _setStoreData('customer_name', {customerName: ''});
235
+ const redirectHome = setTimeout(() => {
236
+ _setStoreData('customer_name', { customerName: '' });
222
237
  navigation.reset({
223
238
  routes: [{ name: 'Intro' }],
224
239
  });
@@ -345,7 +360,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
345
360
  <OButton
346
361
  text={`${t('YOU_ARE_DONE', 'You are done! Click to close')}!`}
347
362
  onClick={() => {
348
- _setStoreData('customer_name', {customerName: ''});
363
+ _setStoreData('customer_name', { customerName: '' });
349
364
  navigation.reset({
350
365
  routes: [{ name: 'Intro' }],
351
366
  });
@@ -419,46 +434,135 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
419
434
  <Table>
420
435
  <OText>{t('SUBTOTAL', 'Subtotal')}</OText>
421
436
  <OText>
422
- {parsePrice(isTaxIncluded
423
- ? (order?.summary?.subtotal + order?.summary?.tax) ?? 0
424
- : order?.summary?.subtotal ?? 0
425
- )}
437
+ {parsePrice(((order?.summary?.subtotal ?? order?.subtotal) + getIncludedTaxes()))}
426
438
  </OText>
427
439
  </Table>
428
- {order?.summary?.discount > 0 && (
440
+ {(order?.summary?.discount > 0 ?? order?.discount > 0) && order?.offers?.length === 0 && (
429
441
  <Table>
430
442
  {order?.offer_type === 1 ? (
431
443
  <OText>
432
444
  {t('DISCOUNT', 'Discount')}
433
- <OText>{`(${verifyDecimals(order?.offer_rate, parsePrice)}%)`}</OText>
445
+ <OText>{`(${verifyDecimals(
446
+ order?.offer_rate,
447
+ parsePrice,
448
+ )}%)`}</OText>
434
449
  </OText>
435
450
  ) : (
436
451
  <OText>{t('DISCOUNT', 'Discount')}</OText>
437
452
  )}
438
- <OText>- {parsePrice(order?.summary?.discount)}</OText>
453
+ <OText>
454
+ - {parsePrice(order?.summary?.discount || order?.discount)}
455
+ </OText>
439
456
  </Table>
440
457
  )}
458
+ {
459
+ order?.offers?.length > 0 && order?.offers?.filter((offer: any) => offer?.target === 1)?.map((offer: any) => (
460
+ <Table key={offer.id}>
461
+ <OSRow>
462
+ <OText>
463
+ {offer.name}
464
+ {offer.rate_type === 1 && (
465
+ <OText>{`(${verifyDecimals(offer?.rate, parsePrice)}%)`}</OText>
466
+ )}
467
+ </OText>
468
+ </OSRow>
469
+ <OText>- {parsePrice(offer?.summary?.discount)}</OText>
470
+ </Table>
471
+ ))
472
+ }
441
473
  {order?.summary?.subtotal_with_discount > 0 && order?.summary?.discount > 0 && order?.summary?.total >= 0 && (
442
474
  <Table>
443
475
  <OText>{t('SUBTOTAL_WITH_DISCOUNT', 'Subtotal with discount')}</OText>
444
- <OText>{parsePrice(order?.summary?.subtotal_with_discount ?? 0)}</OText>
445
- </Table>
446
- )}
447
- {order?.tax_type !== 1 && (
448
- <Table>
449
- <OText>
450
- {t('TAX', 'Tax')}
451
- {`(${verifyDecimals(order?.summary?.tax_rate, parseNumber)}%)`}
452
- </OText>
453
- <OText>{parsePrice(order?.summary?.tax)}</OText>
476
+ {order?.tax_type === 1 ? (
477
+ <OText>{parsePrice((order?.summary?.subtotal_with_discount + getIncludedTaxesDiscounts() ?? 0))}</OText>
478
+ ) : (
479
+ <OText>{parsePrice(order?.summary?.subtotal_with_discount ?? 0)}</OText>
480
+ )}
454
481
  </Table>
455
482
  )}
483
+ {
484
+ order?.taxes?.length === 0 && order?.tax_type === 2 && (
485
+ <Table>
486
+ <OText>
487
+ {t('TAX', 'Tax')} {`(${verifyDecimals(order?.tax, parseNumber)}%)`}
488
+ </OText>
489
+ <OText>{parsePrice(order?.summary?.tax || 0)}</OText>
490
+ </Table>
491
+ )
492
+ }
493
+ {
494
+ order?.fees?.length === 0 && (
495
+ <Table>
496
+ <OText>
497
+ {t('SERVICE_FEE', 'Service fee')}
498
+ {`(${verifyDecimals(order?.service_fee, parseNumber)}%)`}
499
+ </OText>
500
+ <OText>{parsePrice(order?.summary?.service_fee || 0)}</OText>
501
+ </Table>
502
+ )
503
+ }
504
+ {
505
+ order?.taxes?.length > 0 && order?.taxes?.filter((tax: any) => tax?.type === 2 && tax?.rate !== 0).map((tax: any) => (
506
+ <Table key={tax.id}>
507
+ <OSRow>
508
+ <OText>
509
+ {tax.name || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}
510
+ {`(${verifyDecimals(tax?.rate, parseNumber)}%)`}{' '}
511
+ </OText>
512
+ </OSRow>
513
+ <OText>{parsePrice(tax?.summary?.tax_after_discount ?? tax?.summary?.tax ?? 0)}</OText>
514
+ </Table>
515
+ ))
516
+ }
517
+ {
518
+ order?.fees?.length > 0 && order?.fees?.filter((fee: any) => !(fee.fixed === 0 && fee.percentage === 0))?.map((fee: any) => (
519
+ <Table key={fee.id}>
520
+ <OSRow>
521
+ <OText>
522
+ {fee.name || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}
523
+ ({fee?.fixed > 0 && `${parsePrice(fee?.fixed)}${fee.percentage > 0 ? ' + ' : ''}`}{fee.percentage > 0 && `${fee.percentage}%`}){' '}
524
+ </OText>
525
+ </OSRow>
526
+ <OText>{parsePrice(fee?.summary?.fixed + (fee?.summary?.percentage_after_discount ?? fee?.summary?.percentage) ?? 0)}</OText>
527
+ </Table>
528
+ ))
529
+ }
530
+ {
531
+ order?.offers?.length > 0 && order?.offers?.filter((offer: any) => offer?.target === 3)?.map((offer: any) => (
532
+ <Table key={offer.id}>
533
+ <OSRow>
534
+ <OText>
535
+ {offer.name}
536
+ {offer.rate_type === 1 && (
537
+ <OText>{`(${verifyDecimals(offer?.rate, parsePrice)}%)`}</OText>
538
+ )}
539
+ </OText>
540
+ </OSRow>
541
+ <OText>- {parsePrice(offer?.summary?.discount)}</OText>
542
+ </Table>
543
+ ))
544
+ }
456
545
  {order?.summary?.delivery_price > 0 && (
457
546
  <Table>
458
547
  <OText>{t('DELIVERY_FEE', 'Delivery Fee')}</OText>
459
548
  <OText>{parsePrice(order?.summary?.delivery_price)}</OText>
460
549
  </Table>
461
550
  )}
551
+ {
552
+ order?.offers?.length > 0 && order?.offers?.filter((offer: any) => offer?.target === 2)?.map((offer: any) => (
553
+ <Table key={offer.id}>
554
+ <OSRow>
555
+ <OText>
556
+ {offer.name}
557
+ {offer.rate_type === 1 && (
558
+ <OText>{`(${verifyDecimals(offer?.rate, parsePrice)}%)`}</OText>
559
+ )}
560
+ </OText>
561
+ </OSRow>
562
+ <OText>- {parsePrice(offer?.summary?.discount)}</OText>
563
+ </Table>
564
+ ))
565
+ }
462
566
  {order?.summary?.driver_tip > 0 && (
463
567
  <Table>
464
568
  <OText>
@@ -470,23 +574,14 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
470
574
  `(${verifyDecimals(order?.summary?.driver_tip, parseNumber)}%)`
471
575
  )}
472
576
  </OText>
473
- <OText>{parsePrice(order?.summary?.driver_tip ?? 0)}</OText>
474
- </Table>
475
- )}
476
- {order?.summary?.service_fee > 0 && (
477
- <Table>
478
- <OText>
479
- {t('SERVICE_FEE', 'Service Fee')}
480
- {`(${verifyDecimals(order?.summary?.service_fee, parseNumber)}%)`}
481
- </OText>
482
- <OText>{parsePrice(order?.summary?.service_fee)}</OText>
577
+ <OText>{parsePrice(order?.summary?.driver_tip ?? order?.totalDriverTip)}</OText>
483
578
  </Table>
484
579
  )}
485
580
  <Total>
486
581
  <Table>
487
582
  <OText style={styles.textBold}>{t('TOTAL', 'Total')}</OText>
488
583
  <OText style={styles.textBold} color={theme.colors.primary}>
489
- {parsePrice(order?.summary?.total ?? 0)}
584
+ {parsePrice(order?.summary?.total ?? order?.total)}
490
585
  </OText>
491
586
  </Table>
492
587
  </Total>
@@ -508,14 +603,14 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
508
603
  <OIconButton
509
604
  bgColor="transparent"
510
605
  borderColor="transparent"
511
- RenderIcon={() =>
512
- <EvilIcons
513
- name={'close'}
514
- size={40}
515
- color={theme.colors.primary}
516
- />
606
+ RenderIcon={() =>
607
+ <EvilIcons
608
+ name={'close'}
609
+ size={40}
610
+ color={theme.colors.primary}
611
+ />
517
612
  }
518
- style={{ flex:1, justifyContent: 'flex-end', left: 30 }}
613
+ style={{ flex: 1, justifyContent: 'flex-end', left: 30 }}
519
614
  onClick={() => {
520
615
  navigation.reset({
521
616
  routes: [{ name: 'Intro' }],
@@ -553,7 +648,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
553
648
  size={orientationState?.dimensions?.width * 0.048}
554
649
  weight="700"
555
650
  >
556
- {`${t('HUNGRY', 'hungry')}, ${customerName}`}
651
+ {t('HUNGRY', 'hungry')}{!!customerName && `, ${customerName}`}
557
652
  </OText>
558
653
  </OText>
559
654
 
@@ -51,3 +51,8 @@ export const Total = styled.View`
51
51
  padding-vertical: 10px;
52
52
  `
53
53
 
54
+ export const OSRow = styled.View`
55
+ flex-direction: row;
56
+ overflow: hidden;
57
+ width: 80%;
58
+ `
@@ -169,7 +169,7 @@ const OrderSummaryUI = (props: any) => {
169
169
  isCartProduct
170
170
  productCart={curProduct}
171
171
  businessSlug={cart?.business?.slug}
172
- businessId={curProduct?.business_id}
172
+ businessId={cart?.business_id}
173
173
  categoryId={curProduct?.category_id}
174
174
  productId={curProduct?.id}
175
175
  onSave={handlerProductAction}
@@ -15,8 +15,6 @@ import { Container } from '../../layouts/Container'
15
15
  import NavBar from '../NavBar'
16
16
  import { LANDSCAPE, PORTRAIT, useDeviceOrientation } from '../../../../../src/hooks/DeviceOrientation'
17
17
  import GridContainer from '../../layouts/GridContainer'
18
- import AntDesignIcon from 'react-native-vector-icons/AntDesign'
19
- import MaterialIcon from 'react-native-vector-icons/MaterialCommunityIcons'
20
18
 
21
19
  const OrderTypeSelectorCardUI = (props: OrderTypeSelectParams) => {
22
20
  const {
@@ -29,7 +27,7 @@ const OrderTypeSelectorCardUI = (props: OrderTypeSelectParams) => {
29
27
  callback
30
28
  } = props
31
29
 
32
- const theme = useTheme();
30
+ const theme = useTheme();
33
31
  const [, t] = useLanguage();
34
32
  const [orientationState] = useDeviceOrientation();
35
33
  const [orderState] = useOrder()
@@ -47,7 +45,7 @@ const OrderTypeSelectorCardUI = (props: OrderTypeSelectParams) => {
47
45
  }
48
46
 
49
47
  useEffect(() => {
50
- if (isCardCliked) {
48
+ if(isCardCliked){
51
49
  callback?.()
52
50
  setIsCardClicked(false)
53
51
  setIsLoadingCard(null)
@@ -59,8 +57,8 @@ const OrderTypeSelectorCardUI = (props: OrderTypeSelectParams) => {
59
57
  <Container>
60
58
  <NavBar
61
59
  title={t('ORDER_TYPE_X_ID', 'Order type')}
62
- {...(goBack && { onActionLeft: goBack })}
63
- btnStyle={{ paddingLeft: 0 }}
60
+ {...(goBack && { onActionLeft: goBack } )}
61
+ btnStyle={{paddingLeft: 0}}
64
62
  />
65
63
 
66
64
  <View style={{ marginVertical: orientationState?.dimensions?.height * 0.03 }}>
@@ -85,13 +83,13 @@ const OrderTypeSelectorCardUI = (props: OrderTypeSelectParams) => {
85
83
  style={cardStyle}
86
84
  isDisabled={isCardCliked}
87
85
  isLoading={isLoadingCard === 'Eat In'}
88
- title={t('EAT_IN', 'Eat In')}
86
+ title={t('EAT_IN','Eat In')}
89
87
  description={t('EAT_IN_DESCRIPTION', 'We are very glad to have you here. Bon appetit!')}
90
88
  bgImage={theme.images.general.eatIn}
91
- VectorIcon={() => <MaterialIcon name='pin-outline' size={28} color='white' style={{ marginBottom: 10 }} />}
89
+ icon={theme.images.general.pushPin}
92
90
  callToActionText={t('START_MY_ORDER', 'Start my order')}
93
91
  onClick={() => {
94
- if (_eatIn?.value !== orderState?.options?.type) {
92
+ if(_eatIn?.value !== orderState?.options?.type){
95
93
  handleChangeOrderType(_eatIn?.value);
96
94
  setIsCardClicked(true)
97
95
  setIsLoadingCard('Eat In')
@@ -108,15 +106,15 @@ const OrderTypeSelectorCardUI = (props: OrderTypeSelectParams) => {
108
106
 
109
107
  <OptionCard
110
108
  style={cardStyle}
111
- title={t('TAKE_OUT', 'Take out')}
109
+ title={t('TAKE_OUT','Take out')}
112
110
  isDisabled={isCardCliked}
113
111
  isLoading={isLoadingCard === 'Take out'}
114
112
  description={t('TAKE_OUT_DESCRIPTION', 'You are very welcome anytime you visit us!')}
115
113
  bgImage={theme.images.general.takeOut}
116
- VectorIcon={() => <AntDesignIcon name='shoppingcart' size={28} color='white' style={{ marginBottom: 10 }} />}
114
+ icon={theme.images.general.shoppingCart}
117
115
  callToActionText={t('START_MY_ORDER', 'Start my order')}
118
116
  onClick={() => {
119
- if (_takeOut?.value !== orderState?.options?.type) {
117
+ if(_takeOut?.value !== orderState?.options?.type){
120
118
  handleChangeOrderType(_takeOut?.value);
121
119
  setIsCardClicked(true)
122
120
  setIsLoadingCard('Take out')