ordering-ui-external 1.9.6 → 2.0.1

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 (114) hide show
  1. package/_bundles/{0.ordering-ui.55652fab015bca672f9d.js → 0.ordering-ui.32113e17b220a7b5ae09.js} +1 -1
  2. package/_bundles/{1.ordering-ui.55652fab015bca672f9d.js → 1.ordering-ui.32113e17b220a7b5ae09.js} +1 -1
  3. package/_bundles/{2.ordering-ui.55652fab015bca672f9d.js → 2.ordering-ui.32113e17b220a7b5ae09.js} +1 -1
  4. package/_bundles/{4.ordering-ui.55652fab015bca672f9d.js → 4.ordering-ui.32113e17b220a7b5ae09.js} +1 -1
  5. package/_bundles/{5.ordering-ui.55652fab015bca672f9d.js → 5.ordering-ui.32113e17b220a7b5ae09.js} +1 -1
  6. package/_bundles/{6.ordering-ui.55652fab015bca672f9d.js → 6.ordering-ui.32113e17b220a7b5ae09.js} +1 -1
  7. package/_bundles/{7.ordering-ui.55652fab015bca672f9d.js → 7.ordering-ui.32113e17b220a7b5ae09.js} +2 -2
  8. package/_bundles/{7.ordering-ui.55652fab015bca672f9d.js.LICENSE.txt → 7.ordering-ui.32113e17b220a7b5ae09.js.LICENSE.txt} +0 -0
  9. package/_bundles/{8.ordering-ui.55652fab015bca672f9d.js → 8.ordering-ui.32113e17b220a7b5ae09.js} +1 -1
  10. package/_bundles/{9.ordering-ui.55652fab015bca672f9d.js → 9.ordering-ui.32113e17b220a7b5ae09.js} +1 -1
  11. package/_bundles/ordering-ui.32113e17b220a7b5ae09.js +2 -0
  12. package/_bundles/{ordering-ui.55652fab015bca672f9d.js.LICENSE.txt → ordering-ui.32113e17b220a7b5ae09.js.LICENSE.txt} +0 -0
  13. package/_modules/components/Confirm/index.js +4 -2
  14. package/_modules/components/Header/index.js +4 -2
  15. package/_modules/components/SmartAppBanner/index.js +4 -2
  16. package/_modules/themes/callcenterOriginal/src/components/Orders/OrdersTable/index.js +32 -11
  17. package/_modules/themes/callcenterOriginal/src/components/Orders/OrdersTable/styles.js +1 -1
  18. package/_modules/themes/five/src/components/BusinessProductsList/index.js +7 -6
  19. package/_modules/themes/five/src/components/BusinessProductsList/layouts/groceries/index.js +4 -4
  20. package/_modules/themes/five/src/components/Cart/index.js +6 -6
  21. package/_modules/themes/five/src/components/Checkout/index.js +4 -0
  22. package/_modules/themes/five/src/components/FavoriteList/index.js +2 -83
  23. package/_modules/themes/five/src/components/Footer/index.js +4 -2
  24. package/_modules/themes/five/src/components/Header/layouts/Kiosk/index.js +4 -2
  25. package/_modules/themes/five/src/components/MessagesListing/index.js +2 -82
  26. package/_modules/themes/five/src/components/Modal/index.js +4 -2
  27. package/_modules/themes/five/src/components/MultiCartsPaymethodsAndWallets/index.js +1 -1
  28. package/_modules/themes/five/src/components/MultiCheckout/index.js +14 -8
  29. package/_modules/themes/five/src/components/MultiOrdersDetails/SingleOrderCard.js +12 -135
  30. package/_modules/themes/five/src/components/MultiOrdersDetails/index.js +15 -3
  31. package/_modules/themes/five/src/components/MultiOrdersDetails/styles.js +5 -3
  32. package/_modules/themes/five/src/components/NavigationBar/index.js +4 -2
  33. package/_modules/themes/five/src/components/NotNetworkConnectivity/index.js +4 -2
  34. package/_modules/themes/five/src/components/OrderDetails/index.js +11 -140
  35. package/_modules/themes/five/src/components/OrderProgress/index.js +3 -131
  36. package/_modules/themes/five/src/components/ProductForm/index.js +27 -26
  37. package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +11 -14
  38. package/_modules/themes/five/src/components/ReviewDriver/index.js +4 -2
  39. package/_modules/themes/five/src/components/ReviewOrder/index.js +4 -2
  40. package/_modules/themes/five/src/components/ReviewProduct/index.js +4 -2
  41. package/_modules/themes/five/src/components/ReviewTrigger/index.js +4 -2
  42. package/_modules/themes/five/src/components/SignUpApproval/index.js +4 -2
  43. package/_modules/themes/five/src/components/SingleOrderCard/index.js +1 -2
  44. package/_modules/themes/five/src/styles/Buttons/index.js +5 -3
  45. package/_modules/themes/five/src/styles/Inputs/index.js +1 -1
  46. package/_modules/themes/seven/src/components/Header/index.js +4 -2
  47. package/_modules/themes/six/src/components/Header/index.js +4 -2
  48. package/package.json +2 -2
  49. package/src/components/CancellationComponent/index.js +31 -27
  50. package/src/components/Confirm/index.js +2 -0
  51. package/src/components/Header/index.js +2 -0
  52. package/src/components/SmartAppBanner/index.js +2 -0
  53. package/src/themes/callcenterOriginal/src/components/Orders/OrdersTable/index.js +43 -19
  54. package/src/themes/callcenterOriginal/src/components/Orders/OrdersTable/styles.js +1 -0
  55. package/src/themes/five/src/components/BusinessProductsList/index.js +7 -6
  56. package/src/themes/five/src/components/BusinessProductsList/layouts/groceries/index.js +4 -4
  57. package/src/themes/five/src/components/Cart/index.js +15 -4
  58. package/src/themes/five/src/components/Checkout/index.js +2 -0
  59. package/src/themes/five/src/components/FavoriteList/index.js +1 -35
  60. package/src/themes/five/src/components/Footer/index.js +2 -0
  61. package/src/themes/five/src/components/Header/layouts/Kiosk/index.js +2 -0
  62. package/src/themes/five/src/components/MessagesListing/index.js +1 -34
  63. package/src/themes/five/src/components/Modal/index.js +2 -0
  64. package/src/themes/five/src/components/MultiCartsPaymethodsAndWallets/index.js +1 -1
  65. package/src/themes/five/src/components/MultiCheckout/index.js +14 -5
  66. package/src/themes/five/src/components/MultiOrdersDetails/SingleOrderCard.js +24 -45
  67. package/src/themes/five/src/components/MultiOrdersDetails/index.js +16 -2
  68. package/src/themes/five/src/components/MultiOrdersDetails/styles.js +8 -0
  69. package/src/themes/five/src/components/NavigationBar/index.js +2 -0
  70. package/src/themes/five/src/components/NotNetworkConnectivity/index.js +2 -0
  71. package/src/themes/five/src/components/OrderDetails/index.js +1 -35
  72. package/src/themes/five/src/components/OrderProgress/index.js +1 -34
  73. package/src/themes/five/src/components/ProductForm/index.js +11 -11
  74. package/src/themes/five/src/components/RenderProductsLayout/styles.js +1 -1
  75. package/src/themes/five/src/components/ReviewDriver/index.js +2 -0
  76. package/src/themes/five/src/components/ReviewOrder/index.js +2 -0
  77. package/src/themes/five/src/components/ReviewProduct/index.js +2 -0
  78. package/src/themes/five/src/components/ReviewTrigger/index.js +2 -0
  79. package/src/themes/five/src/components/SignUpApproval/index.js +2 -0
  80. package/src/themes/five/src/components/SingleOrderCard/index.js +1 -2
  81. package/src/themes/five/src/styles/Buttons/index.js +3 -1
  82. package/src/themes/five/src/styles/Inputs/index.js +1 -1
  83. package/src/themes/seven/src/components/Header/index.js +2 -0
  84. package/src/themes/six/src/components/Header/index.js +2 -0
  85. package/template/components/HelmetTags/index.js +2 -0
  86. package/template/components/ListenPageChanges/index.js +2 -0
  87. package/template/components/ScrollToTop/index.js +2 -0
  88. package/template/components/SubdomainComponent/index.js +4 -39
  89. package/template/config.json +2 -1
  90. package/template/pages/AddressList/index.js +2 -0
  91. package/template/pages/BusinessListingSearch/index.js +2 -0
  92. package/template/pages/BusinessProductsList/index.js +2 -0
  93. package/template/pages/BusinessesList/index.js +2 -0
  94. package/template/pages/Checkout/index.js +2 -0
  95. package/template/pages/Cms/index.js +2 -0
  96. package/template/pages/Favorite/index.js +2 -0
  97. package/template/pages/Help/index.js +2 -0
  98. package/template/pages/Home/index.js +2 -0
  99. package/template/pages/MessagesList/index.js +2 -0
  100. package/template/pages/MultiCheckout/index.js +5 -0
  101. package/template/pages/MultiOrdersDetails/index.js +2 -0
  102. package/template/pages/MyOrders/index.js +2 -0
  103. package/template/pages/OrderDetails/index.js +2 -0
  104. package/template/pages/PageNotFound/index.js +2 -0
  105. package/template/pages/PagesList/index.js +2 -0
  106. package/template/pages/Profile/index.js +2 -0
  107. package/template/pages/Promotions/index.js +2 -0
  108. package/template/pages/ResetPassword/index.js +2 -0
  109. package/template/pages/SessionsList/index.js +2 -0
  110. package/template/pages/SignUpBusiness/index.js +2 -0
  111. package/template/pages/SignUpDriver/index.js +2 -0
  112. package/template/pages/UserVerification/index.js +2 -0
  113. package/template/pages/Wallets/index.js +2 -0
  114. package/_bundles/ordering-ui.55652fab015bca672f9d.js +0 -2
@@ -309,7 +309,18 @@ export const OrdersTable = (props) => {
309
309
  {!isSelectedOrders && (
310
310
  <thead>
311
311
  <tr>
312
- {allowColumns && Object.keys(allowColumns).filter(col => allowColumns[col]?.visable && allowColumns[col]?.order !== 0)
312
+ {allowColumns && (Object.keys(allowColumns).filter(col => allowColumns[col]?.visable && allowColumns[col]?.order !== 0)?.length === 0 ?
313
+ (
314
+ <th className='orderPrice' key={`noDragTh-${i}`}>
315
+ <ColumnAllowSettingPopover
316
+ allowColumns={allowColumns}
317
+ optionsDefault={optionsDefault}
318
+ handleChangeAllowColumns={handleChangeAllowColumns}
319
+ isOrder
320
+ />
321
+ </th>
322
+ ) : (
323
+ Object.keys(allowColumns).filter(col => allowColumns[col]?.visable && allowColumns[col]?.order !== 0)
313
324
  .sort((col1, col2) => allowColumns[col1]?.order - allowColumns[col2]?.order)
314
325
  .map((column, i, array) => {
315
326
  if (column === 'slaBar') {
@@ -317,24 +328,36 @@ export const OrdersTable = (props) => {
317
328
  }
318
329
  if (column === 'orderNumber') {
319
330
  return (
320
- <th
321
- className={!(allowColumns?.orderNumber?.visable || allowColumns?.dateTime?.visable) ? 'orderNo small' : 'orderNo'}
322
- key={`noDragTh-${i}`}
323
- colSpan={allowColumns?.slaBar?.visable ? 2 : 1}
324
- >
325
- <CheckBox
326
- isChecked={!orderList.loading && isAllChecked}
327
- onClick={() => handleSelecteAllOrder()}
328
- className='orderCheckBox'
331
+ <React.Fragment key={i}>
332
+ <th
333
+ className={!(allowColumns?.orderNumber?.visable || allowColumns?.dateTime?.visable) ? 'orderNo small' : 'orderNo'}
334
+ key={`noDragTh-${i}`}
335
+ colSpan={allowColumns?.slaBar?.visable ? 2 : 1}
329
336
  >
330
- {(!orderList.loading && isAllChecked) ? (
331
- <RiCheckboxFill />
332
- ) : (
333
- <RiCheckboxBlankLine />
334
- )}
335
- </CheckBox>
336
- {t('ORDER', 'Order')}
337
- </th>
337
+ <CheckBox
338
+ isChecked={!orderList.loading && isAllChecked}
339
+ onClick={() => handleSelecteAllOrder()}
340
+ className='orderCheckBox'
341
+ >
342
+ {(!orderList.loading && isAllChecked) ? (
343
+ <RiCheckboxFill />
344
+ ) : (
345
+ <RiCheckboxBlankLine />
346
+ )}
347
+ </CheckBox>
348
+ {t('ORDER', 'Order')}
349
+ </th>
350
+ {column === [...array].pop() && (
351
+ <th className='orderPrice' key={`noDragTh-${i}`}>
352
+ <ColumnAllowSettingPopover
353
+ allowColumns={allowColumns}
354
+ optionsDefault={optionsDefault}
355
+ handleChangeAllowColumns={handleChangeAllowColumns}
356
+ isOrder
357
+ />
358
+ </th>
359
+ )}
360
+ </React.Fragment>
338
361
  )
339
362
  }
340
363
  if (column === 'total' || (column !== 'total' && column === [...array].pop())) {
@@ -388,7 +411,8 @@ export const OrdersTable = (props) => {
388
411
  <span>{allowColumns[column]?.title}</span>
389
412
  </div>
390
413
  </DragTh>)
391
- })}
414
+ })
415
+ ))}
392
416
  </tr>
393
417
  </thead>
394
418
  )}
@@ -29,6 +29,7 @@ export const OrdersContainer = styled.div`
29
29
  export const Table = styled.table`
30
30
  width: calc(100% - 10px);
31
31
  min-width: 900px;
32
+ min-height: 35vh;
32
33
 
33
34
  th,
34
35
  td {
@@ -48,7 +48,8 @@ const BusinessProductsListUI = (props) => {
48
48
  subcategoriesSelected,
49
49
  onClickCategory,
50
50
  handleUpdateProducts,
51
- isSearchMode
51
+ isSearchMode,
52
+ business
52
53
  } = props
53
54
 
54
55
  const [, t] = useLanguage()
@@ -193,7 +194,7 @@ const BusinessProductsListUI = (props) => {
193
194
  productAddedToCartLength={currentCart?.products?.reduce((productsLength, Cproduct) => { return productsLength + (Cproduct?.id === product?.id ? Cproduct?.quantity : 0) }, 0)}
194
195
  />
195
196
  ))}
196
- {!categoryState?.loading && categoryState?.products?.length > 9 && (
197
+ {!business?.food && !categoryState?.loading && categoryState?.products?.length > 9 && (
197
198
  <SingleProductCard
198
199
  useCustomFunctionality
199
200
  onCustomClick={() => onClickCategory(category)}
@@ -266,7 +267,7 @@ const BusinessProductsListUI = (props) => {
266
267
  <ProductsListing isSubcategorySearch={isSubcategorySearch}>
267
268
  {isSearchMode && category?.subcategories?.length > 0 ? (
268
269
  <>
269
- {products?.filter((product, i) => i < 9 && product?.category_id === category?.id)?.map((product, i) => (
270
+ {products?.filter((product, i) => (i < 9 && product?.category_id === category?.id) || business?.food)?.map((product, i) => (
270
271
  <SingleProductCard
271
272
  key={i}
272
273
  isSoldOut={product.inventoried && !product.quantity}
@@ -279,7 +280,7 @@ const BusinessProductsListUI = (props) => {
279
280
  productAddedToCartLength={currentCart?.products?.reduce((productsLength, Cproduct) => { return productsLength + (Cproduct?.id === product?.id ? Cproduct?.quantity : 0) }, 0)}
280
281
  />
281
282
  ))}
282
- {!categoryState?.loading && products?.length > 9 && (
283
+ {!business?.food && !categoryState?.loading && products?.length > 9 && (
283
284
  <SingleProductCard
284
285
  useCustomFunctionality
285
286
  onCustomClick={() => onClickCategory(category)}
@@ -296,7 +297,7 @@ const BusinessProductsListUI = (props) => {
296
297
  ) : (
297
298
  <>
298
299
  {
299
- products.filter((_, i) => i < 9).map((product, i) => (
300
+ products.filter((_, i) => i < 9 || business?.food).map((product, i) => (
300
301
  <SingleProductCard
301
302
  key={i}
302
303
  isSoldOut={product.inventoried && !product.quantity}
@@ -310,7 +311,7 @@ const BusinessProductsListUI = (props) => {
310
311
  />
311
312
  ))
312
313
  }
313
- {!categoryState?.loading && products?.length > 9 && (
314
+ {!business?.food && !categoryState?.loading && products?.length > 9 && (
314
315
  <SingleProductCard
315
316
  useCustomFunctionality
316
317
  onCustomClick={() => onClickCategory(category)}
@@ -119,7 +119,7 @@ const BusinessProductsListUI = (props) => {
119
119
  )}
120
120
  </div>
121
121
  <ProductsListing>
122
- {featProducts?.filter((p, index) => index < 9)?.map((product, i) => product.featured && (
122
+ {featProducts?.filter((p, index) => business?.food || index < 9)?.map((product, i) => product.featured && (
123
123
  <SingleProductCard
124
124
  key={i}
125
125
  isSoldOut={(product?.inventoried && !product?.quantity)}
@@ -131,7 +131,7 @@ const BusinessProductsListUI = (props) => {
131
131
  productAddedToCartLength={currentCart?.products?.reduce((productsLength, Cproduct) => { return productsLength + (Cproduct?.id === product?.id ? Cproduct?.quantity : 0) }, 0)}
132
132
  />
133
133
  ))}
134
- {!categoryState?.loading && featProducts?.length > 9 && (
134
+ {!business?.food && !categoryState?.loading && featProducts?.length > 9 && (
135
135
  <SingleProductCard
136
136
  useCustomFunctionality
137
137
  onCustomClick={() => onClickCategory(category)}
@@ -206,7 +206,7 @@ const BusinessProductsListUI = (props) => {
206
206
  </div>
207
207
  <ProductsListing>
208
208
  {
209
- products.filter((p, index) => index < 9).map((product, i) => (
209
+ products.filter((p, index) => index < 9 || business?.food).map((product, i) => (
210
210
  <SingleProductCard
211
211
  key={i}
212
212
  isSoldOut={product?.inventoried && !product?.quantity}
@@ -219,7 +219,7 @@ const BusinessProductsListUI = (props) => {
219
219
  />
220
220
  ))
221
221
  }
222
- {!categoryState?.loading && products?.length > 9 && (
222
+ {!business?.food && !categoryState?.loading && products?.length > 9 && (
223
223
  <SingleProductCard
224
224
  useCustomFunctionality
225
225
  onCustomClick={() => onClickCategory(category)}
@@ -391,7 +391,9 @@ const CartUI = (props) => {
391
391
  )}
392
392
  <IconContainer>
393
393
  <BsInfoCircle size='20' color={theme.colors.primary} onClick={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_3' })} />
394
- <MdCloseCircle size='24' color={theme.colors.primary} onClick={() => onRemoveOffer(offer?.id)} />
394
+ {!offer?.type && (
395
+ <MdCloseCircle size='24' color={theme.colors.primary} onClick={() => onRemoveOffer(offer?.id)} />
396
+ )}
395
397
  </IconContainer>
396
398
  </td>
397
399
  <td>
@@ -403,7 +405,7 @@ const CartUI = (props) => {
403
405
  {orderState?.options?.type === 1 && cart?.delivery_price > 0 && !hideDeliveryFee && (
404
406
  <tr>
405
407
  <td>{t('DELIVERY_FEE', 'Delivery Fee')}</td>
406
- <td>{parsePrice(cart?.delivery_price_with_discount ?? cart?.delivery_price)}</td>
408
+ <td>{parsePrice(cart?.delivery_price)}</td>
407
409
  </tr>
408
410
  )}
409
411
  {
@@ -416,7 +418,9 @@ const CartUI = (props) => {
416
418
  )}
417
419
  <IconContainer>
418
420
  <BsInfoCircle size='20' color={theme.colors.primary} onClick={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_2' })} />
419
- <MdCloseCircle size='24' color={theme.colors.primary} onClick={() => onRemoveOffer(offer?.id)} />
421
+ {!offer?.type && (
422
+ <MdCloseCircle size='24' color={theme.colors.primary} onClick={() => onRemoveOffer(offer?.id)} />
423
+ )}
420
424
  </IconContainer>
421
425
  </td>
422
426
  <td>
@@ -425,6 +429,12 @@ const CartUI = (props) => {
425
429
  </tr>
426
430
  ))
427
431
  }
432
+ {orderState?.options?.type === 1 && cart?.delivery_price > 0 && cart?.delivery_price_with_discount >= 0 && !hideDeliveryFee && (
433
+ <tr>
434
+ <td>{t('DELIVERY_FEE_AFTER_DISCOUNT', 'Delivery Fee After Discount')}</td>
435
+ <td>{parsePrice(cart?.delivery_price_with_discount)}</td>
436
+ </tr>
437
+ )}
428
438
  {cart?.driver_tip > 0 && !hideDriverTip && (
429
439
  <tr>
430
440
  <td>
@@ -450,7 +460,8 @@ const CartUI = (props) => {
450
460
  </CouponContainer>
451
461
  )}
452
462
  {
453
- isMultiCheckout &&
463
+ !isStore &&
464
+ !isMultiCheckout &&
454
465
  cart &&
455
466
  cart?.business_id &&
456
467
  orderState?.options?.type === 1 &&
@@ -784,6 +784,8 @@ export const Checkout = (props) => {
784
784
  useEffect(() => {
785
785
  if (token && cartUuid) {
786
786
  getOrder(cartUuid)
787
+ } else {
788
+ setCartState({ ...cartState, loading: false })
787
789
  }
788
790
  }, [token, cartUuid])
789
791
 
@@ -10,7 +10,7 @@ import { AutoScroll } from '../AutoScroll'
10
10
  import { SingleProductCard } from '../SingleProductCard'
11
11
  import { useTheme } from 'styled-components'
12
12
  import { SingleOrderCard } from '../SingleOrderCard'
13
- import { checkSiteUrl } from '../../../../../utils'
13
+ import { checkSiteUrl, getOrderStatus } from '../../../../../utils'
14
14
  import { SingleProfessionalCard } from '../SingleProfessionalCard'
15
15
 
16
16
  import {
@@ -71,40 +71,6 @@ const FavoriteListUI = (props) => {
71
71
  setPreorderBusiness(null)
72
72
  }
73
73
 
74
- const getOrderStatus = (s) => {
75
- const status = parseInt(s)
76
- const orderStatus = [
77
- { key: 0, value: t('PENDING', theme?.defaultLanguages?.PENDING || 'Pending') },
78
- { key: 1, value: t('COMPLETED', theme?.defaultLanguages?.COMPLETED || 'Completed') },
79
- { key: 2, value: t('REJECTED', theme?.defaultLanguages?.REJECTED || 'Rejected') },
80
- { key: 3, value: t('DRIVER_IN_BUSINESS', theme?.defaultLanguages?.DRIVER_IN_BUSINESS || 'Driver in business') },
81
- { key: 4, value: t('PREPARATION_COMPLETED', theme?.defaultLanguages?.PREPARATION_COMPLETED || 'Preparation Completed') },
82
- { key: 5, value: t('REJECTED_BY_BUSINESS', theme?.defaultLanguages?.REJECTED_BY_BUSINESS || 'Rejected by business') },
83
- { key: 6, value: t('REJECTED_BY_DRIVER', theme?.defaultLanguages?.REJECTED_BY_DRIVER || 'Rejected by Driver') },
84
- { key: 7, value: t('ACCEPTED_BY_BUSINESS', theme?.defaultLanguages?.ACCEPTED_BY_BUSINESS || 'Accepted by business') },
85
- { key: 8, value: t('ACCEPTED_BY_DRIVER', theme?.defaultLanguages?.ACCEPTED_BY_DRIVER || 'Accepted by driver') },
86
- { key: 9, value: t('PICK_UP_COMPLETED_BY_DRIVER', theme?.defaultLanguages?.PICK_UP_COMPLETED_BY_DRIVER || 'Pick up completed by driver') },
87
- { key: 10, value: t('PICK_UP_FAILED_BY_DRIVER', theme?.defaultLanguages?.PICK_UP_FAILED_BY_DRIVER || 'Pick up Failed by driver') },
88
- { key: 11, value: t('DELIVERY_COMPLETED_BY_DRIVER', theme?.defaultLanguages?.DELIVERY_COMPLETED_BY_DRIVER || 'Delivery completed by driver') },
89
- { key: 12, value: t('DELIVERY_FAILED_BY_DRIVER', theme?.defaultLanguages?.DELIVERY_FAILED_BY_DRIVER || 'Delivery Failed by driver') },
90
- { key: 13, value: t('PREORDER', theme?.defaultLanguages?.PREORDER || 'PreOrder') },
91
- { key: 14, value: t('ORDER_NOT_READY', theme?.defaultLanguages?.ORDER_NOT_READY || 'Order not ready') },
92
- { key: 15, value: t('ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER', theme?.defaultLanguages?.ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER || 'Order picked up completed by customer') },
93
- { key: 16, value: t('ORDER_STATUS_CANCELLED_BY_CUSTOMER', theme?.defaultLanguages?.ORDER_STATUS_CANCELLED_BY_CUSTOMER || 'Order cancelled by customer') },
94
- { key: 17, value: t('ORDER_NOT_PICKEDUP_BY_CUSTOMER', theme?.defaultLanguages?.ORDER_NOT_PICKEDUP_BY_CUSTOMER || 'Order not picked up by customer') },
95
- { key: 18, value: t('ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS', theme?.defaultLanguages?.ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS || 'Driver almost arrived to business') },
96
- { key: 19, value: t('ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER', theme?.defaultLanguages?.ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER || 'Driver almost arrived to customer') },
97
- { key: 20, value: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', theme?.defaultLanguages?.ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS || 'Customer almost arrived to business') },
98
- { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', theme?.defaultLanguages?.ORDER_CUSTOMER_ARRIVED_BUSINESS || 'Customer arrived to business') },
99
- { key: 22, value: t('ORDER_LOOKING_FOR_DRIVER', theme?.defaultLanguages?.ORDER_LOOKING_FOR_DRIVER || 'Looking for driver') },
100
- { key: 23, value: t('ORDER_DRIVER_ON_WAY', theme?.defaultLanguages?.ORDER_DRIVER_ON_WAY || 'Driver on way') }
101
- ]
102
-
103
- const objectStatus = orderStatus.find((o) => o.key === status)
104
-
105
- return objectStatus && objectStatus
106
- }
107
-
108
74
  const onRedirectPage = (data) => {
109
75
  events.emit('go_to_page', data)
110
76
  }
@@ -63,3 +63,5 @@ export const Footer = ({ isFooterPage }) => {
63
63
  </Container>
64
64
  )
65
65
  }
66
+
67
+ export default Footer
@@ -178,3 +178,5 @@ export const Header = (props) => {
178
178
  </HeaderContainer>
179
179
  )
180
180
  }
181
+
182
+ export default Header
@@ -5,6 +5,7 @@ import { useTheme } from 'styled-components'
5
5
  import Skeleton from 'react-loading-skeleton'
6
6
  import FaUserAlt from '@meronex/icons/fa/FaUserAlt'
7
7
  import { NotFoundSource } from '../../../../../components/NotFoundSource'
8
+ import { getOrderStatus } from '../../../../../utils'
8
9
 
9
10
  import {
10
11
  MessagesListingContainer,
@@ -51,40 +52,6 @@ const OrdersListingUI = (props) => {
51
52
  const [events] = useEvent()
52
53
  const [{ parseDate, optimizeImage }] = useUtils()
53
54
 
54
- const getOrderStatus = (s) => {
55
- const status = parseInt(s)
56
- const orderStatus = [
57
- { key: 0, value: t('PENDING', theme?.defaultLanguages?.PENDING || 'Pending') },
58
- { key: 1, value: t('COMPLETED', theme?.defaultLanguages?.COMPLETED || 'Completed') },
59
- { key: 2, value: t('REJECTED', theme?.defaultLanguages?.REJECTED || 'Rejected') },
60
- { key: 3, value: t('DRIVER_IN_BUSINESS', theme?.defaultLanguages?.DRIVER_IN_BUSINESS || 'Driver in business') },
61
- { key: 4, value: t('PREPARATION_COMPLETED', theme?.defaultLanguages?.PREPARATION_COMPLETED || 'Preparation Completed') },
62
- { key: 5, value: t('REJECTED_BY_BUSINESS', theme?.defaultLanguages?.REJECTED_BY_BUSINESS || 'Rejected by business') },
63
- { key: 6, value: t('REJECTED_BY_DRIVER', theme?.defaultLanguages?.REJECTED_BY_DRIVER || 'Rejected by Driver') },
64
- { key: 7, value: t('ACCEPTED_BY_BUSINESS', theme?.defaultLanguages?.ACCEPTED_BY_BUSINESS || 'Accepted by business') },
65
- { key: 8, value: t('ACCEPTED_BY_DRIVER', theme?.defaultLanguages?.ACCEPTED_BY_DRIVER || 'Accepted by driver') },
66
- { key: 9, value: t('PICK_UP_COMPLETED_BY_DRIVER', theme?.defaultLanguages?.PICK_UP_COMPLETED_BY_DRIVER || 'Pick up completed by driver') },
67
- { key: 10, value: t('PICK_UP_FAILED_BY_DRIVER', theme?.defaultLanguages?.PICK_UP_FAILED_BY_DRIVER || 'Pick up Failed by driver') },
68
- { key: 11, value: t('DELIVERY_COMPLETED_BY_DRIVER', theme?.defaultLanguages?.DELIVERY_COMPLETED_BY_DRIVER || 'Delivery completed by driver') },
69
- { key: 12, value: t('DELIVERY_FAILED_BY_DRIVER', theme?.defaultLanguages?.DELIVERY_FAILED_BY_DRIVER || 'Delivery Failed by driver') },
70
- { key: 13, value: t('PREORDER', theme?.defaultLanguages?.PREORDER || 'PreOrder') },
71
- { key: 14, value: t('ORDER_NOT_READY', theme?.defaultLanguages?.ORDER_NOT_READY || 'Order not ready') },
72
- { key: 15, value: t('ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER', theme?.defaultLanguages?.ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER || 'Order picked up completed by customer') },
73
- { key: 16, value: t('ORDER_STATUS_CANCELLED_BY_CUSTOMER', theme?.defaultLanguages?.ORDER_STATUS_CANCELLED_BY_CUSTOMER || 'Order cancelled by customer') },
74
- { key: 17, value: t('ORDER_NOT_PICKEDUP_BY_CUSTOMER', theme?.defaultLanguages?.ORDER_NOT_PICKEDUP_BY_CUSTOMER || 'Order not picked up by customer') },
75
- { key: 18, value: t('ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS', theme?.defaultLanguages?.ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS || 'Driver almost arrived to business') },
76
- { key: 19, value: t('ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER', theme?.defaultLanguages?.ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER || 'Driver almost arrived to customer') },
77
- { key: 20, value: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', theme?.defaultLanguages?.ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS || 'Customer almost arrived to business') },
78
- { key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', theme?.defaultLanguages?.ORDER_CUSTOMER_ARRIVED_BUSINESS || 'Customer arrived to business') },
79
- { key: 22, value: t('ORDER_LOOKING_FOR_DRIVER', theme?.defaultLanguages?.ORDER_LOOKING_FOR_DRIVER || 'Looking for driver') },
80
- { key: 23, value: t('ORDER_DRIVER_ON_WAY', theme?.defaultLanguages?.ORDER_DRIVER_ON_WAY || 'Driver on way') }
81
- ]
82
-
83
- const objectStatus = orderStatus.find((o) => o.key === status)
84
-
85
- return objectStatus && objectStatus
86
- }
87
-
88
55
  const handleOrderClick = (e, order) => {
89
56
  const isInvalid = e.target.closest('.view-details') || e.target.closest('.driver-selector')
90
57
  if (isInvalid) return
@@ -104,3 +104,5 @@ export const Modal = (props) => {
104
104
  <Popup {...ModalProps} />
105
105
  )
106
106
  }
107
+
108
+ export default Modal
@@ -34,7 +34,7 @@ const getPayIcon = (method) => {
34
34
  case 1:
35
35
  return <Cash />
36
36
  case 22:
37
- return <BilStripe />
37
+ return <CreditCard />
38
38
  case 28:
39
39
  return <FaCcStripe />
40
40
  case 31:
@@ -1,5 +1,6 @@
1
1
  import React, { useState, useEffect } from 'react'
2
2
  import { useHistory } from 'react-router-dom'
3
+ import { useTheme } from 'styled-components'
3
4
  import {
4
5
  useLanguage,
5
6
  useUtils,
@@ -62,9 +63,11 @@ const MultiCheckoutUI = (props) => {
62
63
  onRedirectPage,
63
64
  cartGroup,
64
65
  cartUuid,
65
- totalCartsFee
66
+ totalCartsFee,
67
+ handleSearchRedirect
66
68
  } = props
67
69
 
70
+ const theme = useTheme()
68
71
  const [, t] = useLanguage()
69
72
  const [{ configs }] = useConfig()
70
73
  const [{ parsePrice }] = useUtils()
@@ -80,8 +83,11 @@ const MultiCheckoutUI = (props) => {
80
83
  const [alertState, setAlertState] = useState({ open: false, content: [] })
81
84
  const isDisablePlaceOrderButton = !(paymethodSelected?.paymethod_id || paymethodSelected?.wallet_id) || (paymethodSelected?.paymethod?.gateway === 'stripe' && !paymethodSelected?.paymethod_data)
82
85
  const walletCarts = (Object.values(orderState?.carts)?.filter(cart => cart?.products && cart?.products?.length && cart?.status !== 2 && cart?.valid_schedule && cart?.valid_products && cart?.valid_address && cart?.valid_maximum && cart?.valid_minimum && cart?.wallets) || null) || []
83
- const isMultiDriverTips = orderingTheme?.theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
86
+ const isMultiDriverTips = orderingTheme?.theme?.header?.components?.layout?.type?.toLowerCase() === 'chew' ||
87
+ theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
84
88
  const driverTipsOptions = typeof configs?.driver_tip_options?.value === 'string'
89
+ ? JSON.parse(configs?.driver_tip_options?.value) || []
90
+ : configs?.driver_tip_options?.value || []
85
91
  const totalFeeEnabled = configs?.multi_business_checkout_show_combined_delivery_fee?.value === '1'
86
92
  ? JSON.parse(configs?.driver_tip_options?.value) || []
87
93
  : configs?.driver_tip_options?.value || []
@@ -159,9 +165,11 @@ const MultiCheckoutUI = (props) => {
159
165
 
160
166
  return (
161
167
  <>
162
- {!cartGroup?.loading && openCarts.length === 0 ? (
168
+ {((!cartGroup?.loading && openCarts.length === 0) || !cartUuid) ? (
163
169
  <NotFoundSource
164
- content={t('CARTS_NOT_FOUND', 'You dont have carts available')}
170
+ content={t('NOT_FOUND_CARTS', 'Sorry, You don\'t seem to have any carts.')}
171
+ btnTitle={t('SEARCH_REDIRECT', 'Go to Businesses')}
172
+ onClickButton={handleSearchRedirect}
165
173
  />
166
174
  ) : (
167
175
  <Container>
@@ -196,6 +204,7 @@ const MultiCheckoutUI = (props) => {
196
204
  <PaymentMethodContainer>
197
205
  <h1>{t('PAYMENT_METHODS', 'Payment Methods')}</h1>
198
206
  <MultiCartsPaymethodsAndWallets
207
+ userId={props.userId}
199
208
  openCarts={openCarts}
200
209
  paymethodSelected={paymethodSelected}
201
210
  handleSelectPaymethod={handleSelectPaymethod}
@@ -257,7 +266,7 @@ const MultiCheckoutUI = (props) => {
257
266
  )}
258
267
  {openCarts.length > 0 && (
259
268
  <MultiCartPriceContainer totalFeeEnabled={totalFeeEnabled}>
260
- {totalCartsFee &&
269
+ {!!totalCartsFee &&
261
270
  configs?.multi_business_checkout_show_combined_delivery_fee?.value === '1' &&
262
271
  (
263
272
  <span>
@@ -3,7 +3,8 @@ import {
3
3
  useLanguage,
4
4
  useEvent,
5
5
  useUtils,
6
- OrderDetails as OrderDetailsController
6
+ OrderDetails as OrderDetailsController,
7
+ useConfig
7
8
  } from 'ordering-components-external'
8
9
  import { useTheme } from 'styled-components'
9
10
  import { Messages } from '../../../../../components/Messages'
@@ -30,7 +31,9 @@ const SingleOrderCardUI = (props) => {
30
31
  orderTypes,
31
32
  readMessages,
32
33
  messages,
33
- setMessages
34
+ setMessages,
35
+ showProgressBar,
36
+ getOrderStatus
34
37
  } = props
35
38
 
36
39
  const { order } = props.order
@@ -39,43 +42,13 @@ const SingleOrderCardUI = (props) => {
39
42
  const [, t] = useLanguage()
40
43
  const [events] = useEvent()
41
44
  const [{ parsePrice, parseDate }] = useUtils()
45
+ const [{ configs }] = useConfig()
42
46
  const [openMessages, setOpenMessages] = useState({ business: false, driver: false })
43
47
  const [unreadAlert, setUnreadAlert] = useState({ business: false, driver: false })
44
-
45
- const getOrderStatus = (s) => {
46
- const status = parseInt(s)
47
- const orderStatus = [
48
- { key: 0, value: t('PENDING', theme?.defaultLanguages?.PENDING || 'Pending'), slug: 'PENDING', percentage: 25 },
49
- { key: 1, value: t('COMPLETED', theme?.defaultLanguages?.COMPLETED || 'Completed'), slug: 'COMPLETED', percentage: 100 },
50
- { key: 2, value: t('REJECTED', theme?.defaultLanguages?.REJECTED || 'Rejected'), slug: 'REJECTED', percentage: 0 },
51
- { key: 3, value: t('DRIVER_IN_BUSINESS', theme?.defaultLanguages?.DRIVER_IN_BUSINESS || 'Driver in business'), slug: 'DRIVER_IN_BUSINESS', percentage: 60 },
52
- { key: 4, value: t('PREPARATION_COMPLETED', theme?.defaultLanguages?.PREPARATION_COMPLETED || 'Preparation Completed'), slug: 'PREPARATION_COMPLETED', percentage: 70 },
53
- { key: 5, value: t('REJECTED_BY_BUSINESS', theme?.defaultLanguages?.REJECTED_BY_BUSINESS || 'Rejected by business'), slug: 'REJECTED_BY_BUSINESS', percentage: 0 },
54
- { key: 6, value: t('REJECTED_BY_DRIVER', theme?.defaultLanguages?.REJECTED_BY_DRIVER || 'Rejected by Driver'), slug: 'REJECTED_BY_DRIVER', percentage: 0 },
55
- { key: 7, value: t('ACCEPTED_BY_BUSINESS', theme?.defaultLanguages?.ACCEPTED_BY_BUSINESS || 'Accepted by business'), slug: 'ACCEPTED_BY_BUSINESS', percentage: 35 },
56
- { key: 8, value: t('ACCEPTED_BY_DRIVER', theme?.defaultLanguages?.ACCEPTED_BY_DRIVER || 'Accepted by driver'), slug: 'ACCEPTED_BY_DRIVER', percentage: 45 },
57
- { key: 9, value: t('PICK_UP_COMPLETED_BY_DRIVER', theme?.defaultLanguages?.PICK_UP_COMPLETED_BY_DRIVER || 'Pick up completed by driver'), slug: 'PICK_UP_COMPLETED_BY_DRIVER', percentage: 80 },
58
- { key: 10, value: t('PICK_UP_FAILED_BY_DRIVER', theme?.defaultLanguages?.PICK_UP_FAILED_BY_DRIVER || 'Pick up Failed by driver'), slug: 'PICK_UP_FAILED_BY_DRIVER', percentage: 0 },
59
- { key: 11, value: t('DELIVERY_COMPLETED_BY_DRIVER', theme?.defaultLanguages?.DELIVERY_COMPLETED_BY_DRIVER || 'Delivery completed by driver'), slug: 'DELIVERY_COMPLETED_BY_DRIVER', percentage: 100 },
60
- { key: 12, value: t('DELIVERY_FAILED_BY_DRIVER', theme?.defaultLanguages?.DELIVERY_FAILED_BY_DRIVER || 'Delivery Failed by driver'), slug: 'DELIVERY_FAILED_BY_DRIVER', percentage: 0 },
61
- { key: 13, value: t('PREORDER', theme?.defaultLanguages?.PREORDER || 'PreOrder'), slug: 'PREORDER', percentage: 0 },
62
- { key: 14, value: t('ORDER_NOT_READY', theme?.defaultLanguages?.ORDER_NOT_READY || 'Order not ready'), slug: 'ORDER_NOT_READY', percentage: 65 },
63
- { key: 15, value: t('ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER', theme?.defaultLanguages?.ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER || 'Order picked up completed by customer'), slug: 'ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER', percentage: 100 },
64
- { key: 16, value: t('ORDER_STATUS_CANCELLED_BY_CUSTOMER', theme?.defaultLanguages?.ORDER_STATUS_CANCELLED_BY_CUSTOMER || 'Order cancelled by customer'), slug: 'ORDER_STATUS_CANCELLED_BY_CUSTOMER', percentage: 0 },
65
- { key: 17, value: t('ORDER_NOT_PICKEDUP_BY_CUSTOMER', theme?.defaultLanguages?.ORDER_NOT_PICKEDUP_BY_CUSTOMER || 'Order not picked up by customer'), slug: 'ORDER_NOT_PICKEDUP_BY_CUSTOMER', percentage: 0 },
66
- { 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 },
67
- { 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 },
68
- { 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 },
69
- { 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 },
70
- { key: 22, value: t('ORDER_LOOKING_FOR_DRIVER', theme?.defaultLanguages?.ORDER_LOOKING_FOR_DRIVER || 'Looking for driver'), slug: 'ORDER_LOOKING_FOR_DRIVER', percentage: 35 },
71
- { key: 23, value: t('ORDER_DRIVER_ON_WAY', theme?.defaultLanguages?.ORDER_DRIVER_ON_WAY || 'Driver on way'), slug: 'ORDER_DRIVER_ON_WAY', percentage: 45 }
72
- ]
73
- const objectStatus = orderStatus.find((o) => o.key === status)
74
- return objectStatus && objectStatus
75
- }
48
+ const hideIndividualButton = configs.multi_business_checkout_remove_individual_buttons?.value === '1'
76
49
 
77
50
  const handleGoToOrderDetails = (uuid) => {
78
- events.emit('go_to_page', { page: 'order_detail', params: { orderId: uuid }, replace: true })
51
+ events.emit('go_to_page', { page: 'order_detail', params: { orderId: uuid }, replace: !props.isMultiOrders })
79
52
  }
80
53
 
81
54
  const handleOpenMessages = (data) => {
@@ -119,13 +92,15 @@ const SingleOrderCardUI = (props) => {
119
92
  </p>
120
93
  </div>
121
94
  </div>
122
- <Button
123
- outline
124
- color='primary'
125
- onClick={() => handleGoToOrderDetails(order?.uuid)}
126
- >
127
- {t('ORDER_DETAILS', 'Order Details')}
128
- </Button>
95
+ {!hideIndividualButton && (
96
+ <Button
97
+ outline
98
+ color='primary'
99
+ onClick={() => handleGoToOrderDetails(order?.uuid)}
100
+ >
101
+ {t('ORDER_DETAILS', 'Order Details')}
102
+ </Button>
103
+ )}
129
104
  </SingleOrderHeader>
130
105
  <OrderBusinessDetails>
131
106
  <OrderBusinessWrapper>
@@ -155,8 +130,12 @@ const SingleOrderCardUI = (props) => {
155
130
  </MessagesIcon>
156
131
  </ActionsBlock>
157
132
  </OrderBusinessDetails>
158
- <StatusBar percentage={getOrderStatus(order?.status)?.percentage} />
159
- <p className='order-status'>{getOrderStatus(order?.status)?.value}</p>
133
+ {showProgressBar && (
134
+ <>
135
+ <StatusBar percentage={getOrderStatus(order?.status)?.percentage} />
136
+ <p className='order-status'>{getOrderStatus(order?.status)?.value}</p>
137
+ </>
138
+ )}
160
139
  <p className='order-total'>{t('EXPORT_ORDER_TOTAL', 'Order total')}: {parsePrice(order?.summary?.total ?? order?.total)}</p>
161
140
 
162
141
  {openMessages.business && (
@@ -164,7 +143,7 @@ const SingleOrderCardUI = (props) => {
164
143
  open={openMessages.business}
165
144
  onClose={() => setOpenMessages({ driver: false, business: false })}
166
145
  width='70%'
167
- // padding='0'
146
+ // padding='0'
168
147
  >
169
148
  <Messages
170
149
  orderId={order?.id}
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useState } from 'react'
2
- import { useLanguage, useUtils, MultiOrdersDetails as MultiOrdersDetailsController } from 'ordering-components-external'
2
+ import { useLanguage, useUtils, MultiOrdersDetails as MultiOrdersDetailsController, useConfig } from 'ordering-components-external'
3
3
  import { Image } from '../../../../../components/Image'
4
4
  import Skeleton from 'react-loading-skeleton'
5
5
  import FaUserAlt from '@meronex/icons/fa/FaUserAlt'
@@ -15,7 +15,9 @@ import {
15
15
  PhotoWrapper,
16
16
  OrderSummary,
17
17
  SingleOrderContainer,
18
- Divider
18
+ Divider,
19
+ StatusBar,
20
+ StatusBarContainer
19
21
  } from './styles'
20
22
  import { NotFoundSource } from '../NotFoundSource'
21
23
  import { useTheme } from 'styled-components'
@@ -33,7 +35,11 @@ const MultiOrdersDetailsUI = (props) => {
33
35
  const theme = useTheme()
34
36
  const [, t] = useLanguage()
35
37
  const [{ parsePrice }] = useUtils()
38
+ const [{ configs }] = useConfig()
36
39
  const [alertState, setAlertState] = useState({ open: false, content: [] })
40
+ const progressBarStyle = configs.multi_business_checkout_progress_bar_style?.value
41
+ const showBarInOrder = ['group', 'both']
42
+ const showBarInIndividual = ['individual', 'both']
37
43
 
38
44
  const isTaxIncludedOnPrice = orders.every(_order => _order.taxes?.length ? _order.taxes?.every(_tax => _tax.type === 1) : true)
39
45
 
@@ -116,6 +122,12 @@ const MultiOrdersDetailsUI = (props) => {
116
122
  ) : (
117
123
  <OrderSummary>
118
124
  <h3>{t('ORDER_SUMMARY', 'Order summary')}</h3>
125
+ {(showBarInOrder.includes(progressBarStyle)) && (
126
+ <StatusBarContainer>
127
+ <StatusBar percentage={getOrderStatus(orders[0]?.status)?.percentage} />
128
+ <p className='order-status'>{getOrderStatus(orders[0]?.status)?.value}</p>
129
+ </StatusBarContainer>
130
+ )}
119
131
  <table>
120
132
  <tbody>
121
133
  {orders.map(order => (
@@ -168,8 +180,10 @@ const MultiOrdersDetailsUI = (props) => {
168
180
  {orders.map(order => (
169
181
  <SingleOrderCard
170
182
  key={order.id}
183
+ isMultiOrders
171
184
  getOrderStatus={getOrderStatus}
172
185
  order={order}
186
+ showProgressBar={showBarInIndividual.includes(progressBarStyle)}
173
187
  />
174
188
  ))}
175
189
  </>
@@ -262,3 +262,11 @@ export const ExclamationWrapper = styled.div`
262
262
  color: ${props => props.theme?.colors?.primary}
263
263
  }
264
264
  `
265
+
266
+ export const StatusBarContainer = styled.div`
267
+ margin-top: 10px;
268
+ p {
269
+ font-weight: 500;
270
+ margin-top: 0;
271
+ }
272
+ `
@@ -216,3 +216,5 @@ export const NavigationBar = () => {
216
216
  </>
217
217
  )
218
218
  }
219
+
220
+ export default NavigationBar
@@ -61,3 +61,5 @@ export const NotNetworkConnectivity = (props) => {
61
61
  </>
62
62
  )
63
63
  }
64
+
65
+ export default NotNetworkConnectivity