ordering-ui-external 1.7.2 → 1.8.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 (171) hide show
  1. package/_bundles/{0.ordering-ui.f9c3deec77a8e21645ed.js → 0.ordering-ui.cf9ba81c5417ae8af84a.js} +1 -1
  2. package/_bundles/{1.ordering-ui.f9c3deec77a8e21645ed.js → 1.ordering-ui.cf9ba81c5417ae8af84a.js} +1 -1
  3. package/_bundles/2.ordering-ui.cf9ba81c5417ae8af84a.js +1 -0
  4. package/_bundles/{4.ordering-ui.f9c3deec77a8e21645ed.js → 4.ordering-ui.cf9ba81c5417ae8af84a.js} +1 -1
  5. package/_bundles/{5.ordering-ui.f9c3deec77a8e21645ed.js → 5.ordering-ui.cf9ba81c5417ae8af84a.js} +1 -1
  6. package/_bundles/{6.ordering-ui.f9c3deec77a8e21645ed.js → 6.ordering-ui.cf9ba81c5417ae8af84a.js} +1 -1
  7. package/_bundles/{7.ordering-ui.f9c3deec77a8e21645ed.js → 7.ordering-ui.cf9ba81c5417ae8af84a.js} +2 -2
  8. package/_bundles/{7.ordering-ui.f9c3deec77a8e21645ed.js.LICENSE.txt → 7.ordering-ui.cf9ba81c5417ae8af84a.js.LICENSE.txt} +0 -0
  9. package/_bundles/{8.ordering-ui.f9c3deec77a8e21645ed.js → 8.ordering-ui.cf9ba81c5417ae8af84a.js} +1 -1
  10. package/_bundles/{9.ordering-ui.f9c3deec77a8e21645ed.js → 9.ordering-ui.cf9ba81c5417ae8af84a.js} +1 -1
  11. package/_bundles/ordering-ui.cf9ba81c5417ae8af84a.js +2 -0
  12. package/_bundles/{ordering-ui.f9c3deec77a8e21645ed.js.LICENSE.txt → ordering-ui.cf9ba81c5417ae8af84a.js.LICENSE.txt} +0 -0
  13. package/_modules/components/BusinessInformation/index.js +4 -8
  14. package/_modules/components/OrdersOption/styles.js +4 -2
  15. package/_modules/components/Pagination/index.js +100 -0
  16. package/_modules/components/Pagination/styles.js +56 -0
  17. package/_modules/components/SmartAppBanner/index.js +2 -1
  18. package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +92 -0
  19. package/_modules/components/VerticalOrdersLayout/index.js +115 -41
  20. package/_modules/components/VerticalOrdersLayout/styles.js +25 -11
  21. package/_modules/index.js +7 -0
  22. package/_modules/themes/five/src/components/AccordionDropdown/index.js +15 -4
  23. package/_modules/themes/five/src/components/AccordionDropdown/styles.js +14 -4
  24. package/_modules/themes/five/src/components/AddressList/styles.js +2 -2
  25. package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +17 -10
  26. package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +48 -42
  27. package/_modules/themes/five/src/components/BusinessListingSearch/index.js +5 -1
  28. package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +0 -3
  29. package/_modules/themes/five/src/components/BusinessProductsCategories/layouts/groceries/index.js +22 -13
  30. package/_modules/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +15 -7
  31. package/_modules/themes/five/src/components/BusinessProductsListing/index.js +3 -0
  32. package/_modules/themes/five/src/components/BusinessTypeFilter/index.js +15 -5
  33. package/_modules/themes/five/src/components/BusinessesListing/index.js +6 -13
  34. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +66 -40
  35. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +13 -7
  36. package/_modules/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js +16 -7
  37. package/_modules/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/styles.js +21 -15
  38. package/_modules/themes/five/src/components/CardForm/index.js +17 -3
  39. package/_modules/themes/five/src/components/CardForm/styles.js +14 -6
  40. package/_modules/themes/five/src/components/CartPopover/index.js +6 -4
  41. package/_modules/themes/five/src/components/CartPopover/styles.js +4 -2
  42. package/_modules/themes/five/src/components/Footer/index.js +16 -6
  43. package/_modules/themes/five/src/components/Footer/styles.js +11 -9
  44. package/_modules/themes/five/src/components/Header/index.js +14 -9
  45. package/_modules/themes/five/src/components/Header/styles.js +64 -44
  46. package/_modules/themes/five/src/components/HeaderOption/index.js +9 -2
  47. package/_modules/themes/five/src/components/HeaderOption/styles.js +8 -2
  48. package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +9 -3
  49. package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +5 -3
  50. package/_modules/themes/five/src/components/HorizontalOrdersLayout/index.js +9 -19
  51. package/_modules/themes/five/src/components/HorizontalOrdersLayout/styles.js +23 -19
  52. package/_modules/themes/five/src/components/InputPhoneNumber/index.js +1 -0
  53. package/_modules/themes/five/src/components/LoginForm/index.js +3 -2
  54. package/_modules/themes/five/src/components/MyOrders/index.js +24 -56
  55. package/_modules/themes/five/src/components/MyOrders/styles.js +1 -1
  56. package/_modules/themes/five/src/components/OrderDetails/index.js +5 -2
  57. package/_modules/themes/five/src/components/OrderDetails/styles.js +24 -24
  58. package/_modules/themes/five/src/components/OrderItAgain/styles.js +6 -2
  59. package/_modules/themes/five/src/components/OrdersOption/index.js +18 -18
  60. package/_modules/themes/five/src/components/OrdersOption/styles.js +2 -2
  61. package/_modules/themes/five/src/components/PageBanner/index.js +50 -0
  62. package/_modules/themes/five/src/components/PageBanner/styles.js +18 -0
  63. package/_modules/themes/five/src/components/Pagination/index.js +99 -0
  64. package/_modules/themes/five/src/components/Pagination/styles.js +56 -0
  65. package/_modules/themes/five/src/components/ProductForm/index.js +39 -23
  66. package/_modules/themes/five/src/components/ProductForm/styles.js +74 -38
  67. package/_modules/themes/five/src/components/Promotions/index.js +7 -2
  68. package/_modules/themes/five/src/components/Promotions/styles.js +16 -14
  69. package/_modules/themes/five/src/components/RenderProductsLayout/index.js +31 -10
  70. package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +19 -11
  71. package/_modules/themes/five/src/components/SidebarMenu/styles.js +1 -1
  72. package/_modules/themes/five/src/components/SignUpForm/index.js +3 -2
  73. package/_modules/themes/five/src/components/SingleOrderCard/index.js +7 -17
  74. package/_modules/themes/five/src/components/SingleProductCard/index.js +7 -298
  75. package/_modules/themes/five/src/components/SingleProductCard/layouts/original/index.js +310 -0
  76. package/_modules/themes/five/src/components/SingleProductCard/{styles.js → layouts/original/styles.js} +37 -33
  77. package/_modules/themes/five/src/components/SingleProductCard/layouts/starbucks/index.js +305 -0
  78. package/_modules/themes/five/src/components/SingleProductCard/layouts/starbucks/styles.js +143 -0
  79. package/_modules/themes/five/src/components/StripeElementsForm/index.js +1 -0
  80. package/_modules/themes/five/src/components/UserPopover/index.js +3 -1
  81. package/_modules/themes/five/src/components/UserPopover/styles.js +4 -3
  82. package/_modules/themes/five/src/components/UserProfileForm/styles.js +5 -8
  83. package/_modules/themes/six/src/components/BusinessController/index.js +81 -15
  84. package/_modules/themes/six/src/components/BusinessController/styles.js +58 -30
  85. package/_modules/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +5 -3
  86. package/_modules/themes/six/src/components/BusinessesMap/styles.js +1 -1
  87. package/_modules/themes/six/src/components/SearchBar/index.js +19 -10
  88. package/_modules/themes/six/src/components/SearchBar/styles.js +44 -16
  89. package/index-template.js +3 -1
  90. package/package.json +2 -2
  91. package/src/components/BusinessInformation/index.js +3 -8
  92. package/src/components/OrdersOption/styles.js +5 -5
  93. package/src/components/Pagination/index.js +107 -0
  94. package/src/components/Pagination/styles.js +106 -0
  95. package/src/components/SmartAppBanner/index.js +1 -0
  96. package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +89 -0
  97. package/src/components/VerticalOrdersLayout/index.js +86 -48
  98. package/src/components/VerticalOrdersLayout/styles.js +66 -22
  99. package/src/index.js +2 -0
  100. package/src/themes/five/src/components/AccordionDropdown/index.js +19 -6
  101. package/src/themes/five/src/components/AccordionDropdown/styles.js +25 -1
  102. package/src/themes/five/src/components/AddressList/styles.js +2 -0
  103. package/src/themes/five/src/components/BusinessBasicInformation/index.js +21 -11
  104. package/src/themes/five/src/components/BusinessBasicInformation/styles.js +9 -3
  105. package/src/themes/five/src/components/BusinessListingSearch/index.js +1 -0
  106. package/src/themes/five/src/components/BusinessProductsCategories/index.js +0 -2
  107. package/src/themes/five/src/components/BusinessProductsCategories/layouts/groceries/index.js +23 -12
  108. package/src/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +12 -4
  109. package/src/themes/five/src/components/BusinessProductsListing/index.js +3 -0
  110. package/src/themes/five/src/components/BusinessTypeFilter/index.js +15 -5
  111. package/src/themes/five/src/components/BusinessesListing/index.js +5 -5
  112. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +54 -25
  113. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +40 -26
  114. package/src/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js +19 -6
  115. package/src/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/styles.js +38 -3
  116. package/src/themes/five/src/components/CardForm/index.js +49 -8
  117. package/src/themes/five/src/components/CardForm/styles.js +20 -2
  118. package/src/themes/five/src/components/CartPopover/index.js +2 -1
  119. package/src/themes/five/src/components/CartPopover/styles.js +3 -3
  120. package/src/themes/five/src/components/Footer/index.js +15 -6
  121. package/src/themes/five/src/components/Footer/styles.js +15 -14
  122. package/src/themes/five/src/components/Header/index.js +6 -4
  123. package/src/themes/five/src/components/Header/styles.js +14 -11
  124. package/src/themes/five/src/components/HeaderOption/index.js +13 -10
  125. package/src/themes/five/src/components/HeaderOption/styles.js +2 -2
  126. package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +22 -10
  127. package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +8 -0
  128. package/src/themes/five/src/components/HorizontalOrdersLayout/index.js +24 -36
  129. package/src/themes/five/src/components/HorizontalOrdersLayout/styles.js +12 -1
  130. package/src/themes/five/src/components/InputPhoneNumber/index.js +1 -0
  131. package/src/themes/five/src/components/LoginForm/index.js +2 -1
  132. package/src/themes/five/src/components/MyOrders/index.js +20 -62
  133. package/src/themes/five/src/components/MyOrders/styles.js +1 -2
  134. package/src/themes/five/src/components/OrderDetails/index.js +9 -0
  135. package/src/themes/five/src/components/OrderDetails/styles.js +0 -55
  136. package/src/themes/five/src/components/OrderItAgain/styles.js +18 -0
  137. package/src/themes/five/src/components/OrdersOption/index.js +10 -16
  138. package/src/themes/five/src/components/OrdersOption/styles.js +1 -3
  139. package/src/themes/five/src/components/PageBanner/index.js +58 -0
  140. package/src/themes/five/src/components/PageBanner/styles.js +58 -0
  141. package/src/themes/five/src/components/Pagination/index.js +106 -0
  142. package/src/themes/five/src/components/Pagination/styles.js +106 -0
  143. package/src/themes/five/src/components/ProductForm/index.js +108 -84
  144. package/src/themes/five/src/components/ProductForm/styles.js +94 -12
  145. package/src/themes/five/src/components/Promotions/index.js +22 -16
  146. package/src/themes/five/src/components/Promotions/styles.js +10 -4
  147. package/src/themes/five/src/components/RenderProductsLayout/index.js +94 -66
  148. package/src/themes/five/src/components/RenderProductsLayout/styles.js +23 -22
  149. package/src/themes/five/src/components/SidebarMenu/styles.js +1 -1
  150. package/src/themes/five/src/components/SignUpForm/index.js +2 -1
  151. package/src/themes/five/src/components/SingleOrderCard/index.js +0 -21
  152. package/src/themes/five/src/components/SingleProductCard/index.js +7 -300
  153. package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +312 -0
  154. package/src/themes/five/src/components/SingleProductCard/{styles.js → layouts/original/styles.js} +9 -6
  155. package/src/themes/five/src/components/SingleProductCard/layouts/starbucks/index.js +313 -0
  156. package/src/themes/five/src/components/SingleProductCard/layouts/starbucks/styles.js +353 -0
  157. package/src/themes/five/src/components/StripeElementsForm/index.js +1 -0
  158. package/src/themes/five/src/components/UserPopover/index.js +2 -0
  159. package/src/themes/five/src/components/UserPopover/styles.js +2 -2
  160. package/src/themes/five/src/components/UserProfileForm/styles.js +3 -11
  161. package/src/themes/six/src/components/BusinessController/index.js +163 -62
  162. package/src/themes/six/src/components/BusinessController/styles.js +53 -14
  163. package/src/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +3 -1
  164. package/src/themes/six/src/components/BusinessesMap/styles.js +1 -1
  165. package/src/themes/six/src/components/SearchBar/index.js +27 -8
  166. package/src/themes/six/src/components/SearchBar/styles.js +33 -2
  167. package/template/app.js +364 -364
  168. package/template/assets/images/chew_logo.png +0 -0
  169. package/template/components/HelmetTags/index.js +5 -4
  170. package/_bundles/2.ordering-ui.f9c3deec77a8e21645ed.js +0 -1
  171. package/_bundles/ordering-ui.f9c3deec77a8e21645ed.js +0 -2
package/template/app.js CHANGED
@@ -91,6 +91,7 @@ export const App = () => {
91
91
  const isShowReviewsPopupEnabled = configs?.show_reviews_popups_enabled?.value === '1'
92
92
  const hashKey = new URLSearchParams(useLocation()?.search)?.get('hash') || null
93
93
  const isKioskApp = settings?.use_kiosk
94
+ const enabledPoweredByOrdering = configs?.powered_by_ordering_module?.value
94
95
 
95
96
  const themeUpdated = {
96
97
  ...theme,
@@ -347,377 +348,376 @@ export const App = () => {
347
348
  ButtonComponent={Button}
348
349
  InputComponent={Input}
349
350
  />
350
- )
351
- : (
352
- <div style={{ marginBottom: windowSize.width < 576 && onlineStatus ? 80 : 0 }}>
353
- {!!configs?.track_id_google_analytics?.value && (
354
- <Analytics trackId={configs?.track_id_google_analytics?.value} />
355
- )}
356
- {!!configs?.segment_track_id?.value && (
357
- <AnalyticsSegment writeKey={configs?.segment_track_id?.value} />
358
- )}
359
- {!!configs?.facebook_id?.value && FacebookPixel && (
360
- <FacebookPixel trackId={configs?.facebook_id?.value} />
361
- )}
362
- {!loaded && <SpinnerLoader />}
363
- <SmartAppBanner
364
- storeAndroidId={settings?.store_android_id !== '0' ? settings?.store_android_id : false}
365
- storeAppleId={settings?.store_apple_id !== '0' ? settings?.store_apple_id : false}
366
- storeKindleId={settings?.store_kindle_id !== '0' ? settings?.store_kindle_id : false}
367
- />
368
- {
369
- loaded && (
370
- <ThemeProvider theme={themeUpdated}>
371
- <ListenPageChanges />
372
- {!(isKioskApp && isHome) && windowSize.width > 576 && (
373
- <HeaderComponent
374
- isHome={isHome}
375
- location={location}
376
- isCustomLayout={singleBusinessConfig.isActive}
377
- />
378
- )}
379
- <NotNetworkConnectivity />
380
- {onlineStatus && (
381
- <ScrollToTop>
382
- <HelmetTags />
383
- <Switch>
384
- <Route exact path='/home'>
385
- {isUserVerifyRequired ? (
386
- <Redirect to='/verify' />
387
- ) : (
388
- isKioskApp
389
- ? <HomePage />
390
- : orderStatus.options?.address?.location
391
- ? <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/search'} />
392
- : singleBusinessConfig.isActive
393
- ? <Redirect to={singleBusinessConfig.isActive ? '' : '/search'} />
394
- : <HomePage />
395
- )}
396
- </Route>
397
- <Route exact path='/'>
398
- {isUserVerifyRequired ? (
399
- <Redirect to='/verify' />
400
- ) : (
401
- isKioskApp
402
- ? <HomePage />
403
- : orderStatus.options?.address?.location
404
- ? <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/search'} />
351
+ ) : (
352
+ <div style={{ marginBottom: windowSize.width < 576 && onlineStatus ? 80 : 0 }}>
353
+ {!!configs?.track_id_google_analytics?.value && (
354
+ <Analytics trackId={configs?.track_id_google_analytics?.value} />
355
+ )}
356
+ {!!configs?.segment_track_id?.value && (
357
+ <AnalyticsSegment writeKey={configs?.segment_track_id?.value} />
358
+ )}
359
+ {!!configs?.facebook_id?.value && FacebookPixel && (
360
+ <FacebookPixel trackId={configs?.facebook_id?.value} />
361
+ )}
362
+ {!loaded && <SpinnerLoader />}
363
+ <SmartAppBanner
364
+ storeAndroidId={settings?.store_android_id !== '0' ? settings?.store_android_id : false}
365
+ storeAppleId={settings?.store_apple_id !== '0' ? settings?.store_apple_id : false}
366
+ storeKindleId={settings?.store_kindle_id !== '0' ? settings?.store_kindle_id : false}
367
+ />
368
+ {
369
+ loaded && (
370
+ <ThemeProvider theme={themeUpdated}>
371
+ <ListenPageChanges />
372
+ {!(isKioskApp && isHome) && windowSize.width > 576 && (
373
+ <HeaderComponent
374
+ isHome={isHome}
375
+ location={location}
376
+ isCustomLayout={singleBusinessConfig.isActive}
377
+ />
378
+ )}
379
+ <NotNetworkConnectivity />
380
+ {onlineStatus && (
381
+ <ScrollToTop>
382
+ <HelmetTags />
383
+ <Switch>
384
+ <Route exact path='/home'>
385
+ {isUserVerifyRequired ? (
386
+ <Redirect to='/verify' />
387
+ ) : (
388
+ isKioskApp
389
+ ? <HomePage />
390
+ : orderStatus.options?.address?.location
391
+ ? <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/search'} />
392
+ : singleBusinessConfig.isActive
393
+ ? <Redirect to={singleBusinessConfig.isActive ? '' : '/search'} />
405
394
  : <HomePage />
406
- )}
407
- </Route>
408
- <Route exact path='/wallets'>
409
- {auth
410
- ? isUserVerifyRequired
411
- ? <Redirect to='/verify' />
412
- : isWalletEnabled
413
- ? <Wallets />
414
- : <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />
415
- : <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />}
416
- </Route>
417
- <Route exact path='/signup_business'>
418
- {!auth && !isKioskApp ? (
419
- <SignUpBusiness
420
- elementLinkToLogin={<Link to='/'>{t('LOGIN', 'Login')}</Link>}
421
- useLoginByCellphone
422
- useChekoutFileds
423
- handleSuccessSignup={handleSuccessSignup}
424
- layout={signUpBusinesslayout}
425
- isRecaptchaEnable
426
- />
427
- ) : (
428
- <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />
429
- )}
430
- </Route>
431
- <Route exact path='/signup-driver'>
432
- {!auth && !isKioskApp ? (
433
- <SignUpDriver
434
- layout={signUpDriverlayout}
435
- elementLinkToLogin={<Link to='/'>{t('LOGIN', 'Login')}</Link>}
436
- useLoginByCellphone
437
- useChekoutFileds
438
- handleSuccessSignup={handleSuccessSignup}
439
- isRecaptchaEnable
440
- />
441
- ) : (
442
- <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />
443
- )}
444
- </Route>
445
- <Route exact path='/password/reset'>
446
- {auth ? (
447
- <Redirect to='/' />
448
- ) : (
395
+ )}
396
+ </Route>
397
+ <Route exact path='/'>
398
+ {isUserVerifyRequired ? (
399
+ <Redirect to='/verify' />
400
+ ) : (
401
+ isKioskApp
402
+ ? <HomePage />
403
+ : orderStatus.options?.address?.location
404
+ ? <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/search'} />
405
+ : <HomePage />
406
+ )}
407
+ </Route>
408
+ <Route exact path='/wallets'>
409
+ {auth
410
+ ? isUserVerifyRequired
411
+ ? <Redirect to='/verify' />
412
+ : isWalletEnabled
413
+ ? <Wallets />
414
+ : <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />
415
+ : <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />}
416
+ </Route>
417
+ <Route exact path='/signup_business'>
418
+ {!auth && !isKioskApp ? (
419
+ <SignUpBusiness
420
+ elementLinkToLogin={<Link to='/'>{t('LOGIN', 'Login')}</Link>}
421
+ useLoginByCellphone
422
+ useChekoutFileds
423
+ handleSuccessSignup={handleSuccessSignup}
424
+ layout={signUpBusinesslayout}
425
+ isRecaptchaEnable
426
+ />
427
+ ) : (
428
+ <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />
429
+ )}
430
+ </Route>
431
+ <Route exact path='/signup-driver'>
432
+ {!auth && !isKioskApp ? (
433
+ <SignUpDriver
434
+ layout={signUpDriverlayout}
435
+ elementLinkToLogin={<Link to='/'>{t('LOGIN', 'Login')}</Link>}
436
+ useLoginByCellphone
437
+ useChekoutFileds
438
+ handleSuccessSignup={handleSuccessSignup}
439
+ isRecaptchaEnable
440
+ />
441
+ ) : (
442
+ <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />
443
+ )}
444
+ </Route>
445
+ <Route exact path='/password/reset'>
446
+ {auth ? (
447
+ <Redirect to='/' />
448
+ ) : (
449
+ isKioskApp
450
+ ? <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />
451
+ : <ResetPassword />
452
+ )}
453
+ </Route>
454
+ <Route exact path='/profile'>
455
+ {auth
456
+ ? isUserVerifyRequired
457
+ ? <Redirect to='/verify' />
458
+ : (<Profile userId={user?.id} accessToken={user?.session?.access_token} useValidationFields />)
459
+ : <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />}
460
+ </Route>
461
+ <Route exact path='/verify'>
462
+ {isUserVerifyRequired
463
+ ? <UserVerification />
464
+ : <Redirect to={(auth || isKioskApp) ? singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/search' : '/'} />}
465
+ </Route>
466
+ <Route exact path='/profile/orders'>
467
+ {auth
468
+ ? isUserVerifyRequired
469
+ ? <Redirect to='/verify' />
470
+ : (<MyOrders />)
471
+ : <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />}
472
+ </Route>
473
+ <Route exact path='/profile/addresses'>
474
+ {auth
475
+ ? isUserVerifyRequired
476
+ ? <Redirect to='/verify' />
477
+ : (<AddressList />)
478
+ : <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />}
479
+ </Route>
480
+ <Route exact path='/messages'>
481
+ {auth
482
+ ? isUserVerifyRequired
483
+ ? <Redirect to='/verify' />
484
+ : <MessagesList />
485
+ : (
449
486
  isKioskApp
450
487
  ? <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />
451
- : <ResetPassword />
488
+ : <Redirect to={{ pathname: '/search' }} />
452
489
  )}
453
- </Route>
454
- <Route exact path='/profile'>
455
- {auth
456
- ? isUserVerifyRequired
457
- ? <Redirect to='/verify' />
458
- : (<Profile userId={user?.id} accessToken={user?.session?.access_token} useValidationFields />)
459
- : <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />}
460
- </Route>
461
- <Route exact path='/verify'>
462
- {isUserVerifyRequired
463
- ? <UserVerification />
464
- : <Redirect to={(auth || isKioskApp) ? singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/search' : '/'} />}
465
- </Route>
466
- <Route exact path='/profile/orders'>
467
- {auth
468
- ? isUserVerifyRequired
469
- ? <Redirect to='/verify' />
470
- : (<MyOrders />)
471
- : <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />}
472
- </Route>
473
- <Route exact path='/profile/addresses'>
474
- {auth
475
- ? isUserVerifyRequired
476
- ? <Redirect to='/verify' />
477
- : (<AddressList />)
478
- : <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />}
479
- </Route>
480
- <Route exact path='/messages'>
481
- {auth
482
- ? isUserVerifyRequired
483
- ? <Redirect to='/verify' />
484
- : <MessagesList />
490
+ </Route>
491
+ <Route exact path='/help'>
492
+ {auth
493
+ ? isUserVerifyRequired
494
+ ? <Redirect to='/verify' />
495
+ : (<Help />)
496
+ : <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />}
497
+ </Route>
498
+ <Route exact path='/search'>
499
+ {
500
+ isKioskApp
501
+ ? <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />
485
502
  : (
486
- isKioskApp
487
- ? <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />
488
- : <Redirect to={{ pathname: '/search' }} />
489
- )}
490
- </Route>
491
- <Route exact path='/help'>
492
- {auth
493
- ? isUserVerifyRequired
494
- ? <Redirect to='/verify' />
495
- : (<Help />)
496
- : <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />}
497
- </Route>
498
- <Route exact path='/search'>
499
- {
500
- isKioskApp
501
- ? <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />
502
- : (
503
- orderStatus.loading && !orderStatus.options?.address?.location ? (
504
- <SpinnerLoader />
503
+ orderStatus.loading && !orderStatus.options?.address?.location ? (
504
+ <SpinnerLoader />
505
+ ) : (
506
+ isUserVerifyRequired ? (
507
+ <Redirect to='/verify' />
505
508
  ) : (
506
- isUserVerifyRequired ? (
507
- <Redirect to='/verify' />
508
- ) : (
509
509
  orderStatus.options?.address?.location
510
510
  ? <BusinessesList />
511
511
  : <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />
512
- )
513
512
  )
514
513
  )
515
- }
516
- </Route>
517
- <Route exact path='/business_search'>
518
- {isUserVerifyRequired ? (
519
- <Redirect to='/verify' />
520
- ) : (
514
+ )
515
+ }
516
+ </Route>
517
+ <Route exact path='/business_search'>
518
+ {isUserVerifyRequired ? (
519
+ <Redirect to='/verify' />
520
+ ) : (
521
521
  orderStatus.options?.address?.location && !isKioskApp ? (
522
522
  <BusinessListingSearch />
523
523
  ) : (
524
524
  <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />
525
525
  )
526
- )}
527
- </Route>
528
- <Route exact path='/promotions'>
529
- {orderStatus.loading && !orderStatus.options?.address?.location ? (
530
- <SpinnerLoader />
526
+ )}
527
+ </Route>
528
+ <Route exact path='/promotions'>
529
+ {orderStatus.loading && !orderStatus.options?.address?.location ? (
530
+ <SpinnerLoader />
531
+ ) : (
532
+ isUserVerifyRequired ? (
533
+ <Redirect to='/verify' />
531
534
  ) : (
532
- isUserVerifyRequired ? (
533
- <Redirect to='/verify' />
534
- ) : (
535
535
  orderStatus.options?.address?.location && !isKioskApp
536
536
  ? <Promotions />
537
537
  : <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />
538
- )
539
- )}
540
- </Route>
541
- <Route path='/checkout/:cartUuid?'>
542
- {auth
543
- ? isUserVerifyRequired
544
- ? <Redirect to='/verify' />
545
- : <CheckoutPage />
546
- : (
547
- <Redirect to={{
548
- pathname: singleBusinessConfig.isActive
549
- ? `/${singleBusinessConfig.businessSlug}`
550
- : '/',
551
- state: { from: location.pathname || null }
552
- }}
553
- />
554
- )}
555
- </Route>
556
- <Route path='/multi-checkout'>
557
- {auth
558
- ? isUserVerifyRequired
559
- ? <Redirect to='/verify' />
560
- : <MultiCheckout />
561
- : (
562
- <Redirect to={{
563
- pathname: singleBusinessConfig.isActive
564
- ? `/${singleBusinessConfig.businessSlug}`
565
- : '/',
566
- state: { from: location.pathname || null }
567
- }}
568
- />
569
- )}
570
- </Route>
571
- <Route path='/multi-orders'>
572
- {auth
573
- ? isUserVerifyRequired
574
- ? <Redirect to='/verify' />
575
- : <MultiOrdersDetails />
576
- : (
577
- <Redirect to={{
578
- pathname: singleBusinessConfig.isActive
579
- ? `/${singleBusinessConfig.businessSlug}`
580
- : '/',
581
- state: { from: location.pathname || null }
582
- }}
583
- />
584
- )}
585
- </Route>
586
- <Route exact path='/orders/:orderId'>
587
- {(auth || hashKey)
588
- ? isUserVerifyRequired
589
- ? <Redirect to='/verify' />
590
- : <OrderDetailsPage />
591
- : (
592
- <Redirect to={{
593
- pathname: singleBusinessConfig.isActive
594
- ? `/${singleBusinessConfig.businessSlug}`
595
- : '/',
596
- state: { from: location.pathname || null }
597
- }}
598
- />
599
- )}
600
- </Route>
601
- <Route exact path='/promotions'>
602
- {(auth || hashKey)
603
- ? isUserVerifyRequired
604
- ? <Redirect to='/verify' />
605
- : <Promotions />
606
- : (
607
- <Redirect to={{
608
- pathname: singleBusinessConfig.isActive
609
- ? `/${singleBusinessConfig.businessSlug}`
610
- : '/',
611
- state: { from: location.pathname || null }
612
- }}
613
- />
614
- )}
615
- </Route>
616
- <Route exact path='/pages/:pageSlug'>
617
- {isUserVerifyRequired ? (
618
- <Redirect to='/verify' />
619
- ) : (
620
- <Cms />
621
- )}
622
- </Route>
623
- <Route exact path='/pages'>
624
- {isUserVerifyRequired ? (
625
- <Redirect to='/verify' />
626
- ) : (
627
- <PagesList />
538
+ )
539
+ )}
540
+ </Route>
541
+ <Route path='/checkout/:cartUuid?'>
542
+ {auth
543
+ ? isUserVerifyRequired
544
+ ? <Redirect to='/verify' />
545
+ : <CheckoutPage />
546
+ : (
547
+ <Redirect to={{
548
+ pathname: singleBusinessConfig.isActive
549
+ ? `/${singleBusinessConfig.businessSlug}`
550
+ : '/',
551
+ state: { from: location.pathname || null }
552
+ }}
553
+ />
628
554
  )}
629
- </Route>
630
- <Route exact path='/favorite'>
631
- {auth && !isKioskApp
632
- ? <Favorite />
633
- : (
634
- <Redirect to='/' />
635
- )}
636
- </Route>
637
- <Route exact path='/sessions'>
638
- {auth && !isKioskApp
639
- ? <SessionsList />
640
- : (
641
- <Redirect to='/' />
642
- )}
643
- </Route>
644
- <Route exact path='/store'>
645
- {isUserVerifyRequired ? (
646
- <Redirect to='/verify' />
647
- ) : (
648
- <BusinessProductsList />
555
+ </Route>
556
+ <Route path='/multi-checkout'>
557
+ {auth
558
+ ? isUserVerifyRequired
559
+ ? <Redirect to='/verify' />
560
+ : <MultiCheckout />
561
+ : (
562
+ <Redirect to={{
563
+ pathname: singleBusinessConfig.isActive
564
+ ? `/${singleBusinessConfig.businessSlug}`
565
+ : '/',
566
+ state: { from: location.pathname || null }
567
+ }}
568
+ />
649
569
  )}
650
- </Route>
651
- <Route exact path='/:business_slug'>
652
- {isUserVerifyRequired ? (
653
- <Redirect to='/verify' />
654
- ) : (
655
- <BusinessProductsList />
570
+ </Route>
571
+ <Route path='/multi-orders'>
572
+ {auth
573
+ ? isUserVerifyRequired
574
+ ? <Redirect to='/verify' />
575
+ : <MultiOrdersDetails />
576
+ : (
577
+ <Redirect to={{
578
+ pathname: singleBusinessConfig.isActive
579
+ ? `/${singleBusinessConfig.businessSlug}`
580
+ : '/',
581
+ state: { from: location.pathname || null }
582
+ }}
583
+ />
656
584
  )}
657
- </Route>
658
- <Route exact path='/:business_slug/:category_slug/:product_slug'>
659
- {isUserVerifyRequired ? (
660
- <Redirect to='/verify' />
661
- ) : (
662
- <BusinessProductsList />
585
+ </Route>
586
+ <Route exact path='/orders/:orderId'>
587
+ {(auth || hashKey)
588
+ ? isUserVerifyRequired
589
+ ? <Redirect to='/verify' />
590
+ : <OrderDetailsPage />
591
+ : (
592
+ <Redirect to={{
593
+ pathname: singleBusinessConfig.isActive
594
+ ? `/${singleBusinessConfig.businessSlug}`
595
+ : '/',
596
+ state: { from: location.pathname || null }
597
+ }}
598
+ />
663
599
  )}
664
- </Route>
665
- <Route exact path='/store/:business_slug'>
666
- {isUserVerifyRequired ? (
667
- <Redirect to='/verify' />
668
- ) : (
669
- <BusinessProductsList />
600
+ </Route>
601
+ <Route exact path='/promotions'>
602
+ {(auth || hashKey)
603
+ ? isUserVerifyRequired
604
+ ? <Redirect to='/verify' />
605
+ : <Promotions />
606
+ : (
607
+ <Redirect to={{
608
+ pathname: singleBusinessConfig.isActive
609
+ ? `/${singleBusinessConfig.businessSlug}`
610
+ : '/',
611
+ state: { from: location.pathname || null }
612
+ }}
613
+ />
670
614
  )}
671
- </Route>
672
- <Route exact path='/store/:business_slug/:category_slug/:product_slug'>
673
- {isUserVerifyRequired ? (
674
- <Redirect to='/verify' />
675
- ) : (
676
- <BusinessProductsList />
615
+ </Route>
616
+ <Route exact path='/pages/:pageSlug'>
617
+ {isUserVerifyRequired ? (
618
+ <Redirect to='/verify' />
619
+ ) : (
620
+ <Cms />
621
+ )}
622
+ </Route>
623
+ <Route exact path='/pages'>
624
+ {isUserVerifyRequired ? (
625
+ <Redirect to='/verify' />
626
+ ) : (
627
+ <PagesList />
628
+ )}
629
+ </Route>
630
+ <Route exact path='/favorite'>
631
+ {auth && !isKioskApp
632
+ ? <Favorite />
633
+ : (
634
+ <Redirect to='/' />
677
635
  )}
678
- </Route>
679
- <Route exact path='/store/:category_slug/:product_slug'>
680
- {isUserVerifyRequired ? (
681
- <Redirect to='/verify' />
682
- ) : (
683
- <BusinessProductsList />
636
+ </Route>
637
+ <Route exact path='/sessions'>
638
+ {auth && !isKioskApp
639
+ ? <SessionsList />
640
+ : (
641
+ <Redirect to='/' />
684
642
  )}
685
- </Route>
686
- <Route path='*'>
687
- <PageNotFound />
688
- </Route>
689
- </Switch>
690
- </ScrollToTop>
691
- )}
692
- {!navigator.userAgent.match('CriOS') && (
693
- <PWAPrompt promptOnVisit={1} timesToShow={100} copyClosePrompt='Close' permanentlyHideOnDismiss={false} />
694
- )}
695
- {!isFooterPage && (
696
- <Footer />
697
- )}
698
- {windowSize.width < 576 && onlineStatus && (
699
- <NavigationBar />
700
- )}
701
- <Alert
702
- title={t('INFORMATION', 'Information')}
703
- content={alertState.content}
704
- links={alertState.links}
705
- acceptText={t('ACCEPT', 'Accept')}
706
- open={alertState.open}
707
- onClose={() => closeAlert()}
708
- onCancel={() => closeAlert()}
709
- onAccept={() => alertState?.isOnlyAlert ? closeAlert() : acceptAlert()}
710
- closeOnBackdrop={false}
711
- />
712
- {lastOrderReview?.isReviewOpen && (
713
- <Modal
714
- open={lastOrderReview?.isReviewOpen}
715
- onClose={handleCloseReivew}
716
- title={lastOrderReview?.order && reviewModalTitle()}
717
- width={lastOrderReview?.reviewStatus?.trigger ? '680px' : null}
718
- >
719
- <div>
720
- {
643
+ </Route>
644
+ <Route exact path='/store'>
645
+ {isUserVerifyRequired ? (
646
+ <Redirect to='/verify' />
647
+ ) : (
648
+ <BusinessProductsList />
649
+ )}
650
+ </Route>
651
+ <Route exact path='/:business_slug'>
652
+ {isUserVerifyRequired ? (
653
+ <Redirect to='/verify' />
654
+ ) : (
655
+ <BusinessProductsList />
656
+ )}
657
+ </Route>
658
+ <Route exact path='/:business_slug/:category_slug/:product_slug'>
659
+ {isUserVerifyRequired ? (
660
+ <Redirect to='/verify' />
661
+ ) : (
662
+ <BusinessProductsList />
663
+ )}
664
+ </Route>
665
+ <Route exact path='/store/:business_slug'>
666
+ {isUserVerifyRequired ? (
667
+ <Redirect to='/verify' />
668
+ ) : (
669
+ <BusinessProductsList />
670
+ )}
671
+ </Route>
672
+ <Route exact path='/store/:business_slug/:category_slug/:product_slug'>
673
+ {isUserVerifyRequired ? (
674
+ <Redirect to='/verify' />
675
+ ) : (
676
+ <BusinessProductsList />
677
+ )}
678
+ </Route>
679
+ <Route exact path='/store/:category_slug/:product_slug'>
680
+ {isUserVerifyRequired ? (
681
+ <Redirect to='/verify' />
682
+ ) : (
683
+ <BusinessProductsList />
684
+ )}
685
+ </Route>
686
+ <Route path='*'>
687
+ <PageNotFound />
688
+ </Route>
689
+ </Switch>
690
+ </ScrollToTop>
691
+ )}
692
+ {!navigator.userAgent.match('CriOS') && (
693
+ <PWAPrompt promptOnVisit={1} timesToShow={100} copyClosePrompt='Close' permanentlyHideOnDismiss={false} />
694
+ )}
695
+ {(!isFooterPage || enabledPoweredByOrdering) && (
696
+ <Footer isFooterPage={isFooterPage} />
697
+ )}
698
+ {windowSize.width < 576 && onlineStatus && (
699
+ <NavigationBar />
700
+ )}
701
+ <Alert
702
+ title={t('INFORMATION', 'Information')}
703
+ content={alertState.content}
704
+ links={alertState.links}
705
+ acceptText={t('ACCEPT', 'Accept')}
706
+ open={alertState.open}
707
+ onClose={() => closeAlert()}
708
+ onCancel={() => closeAlert()}
709
+ onAccept={() => alertState?.isOnlyAlert ? closeAlert() : acceptAlert()}
710
+ closeOnBackdrop={false}
711
+ />
712
+ {lastOrderReview?.isReviewOpen && (
713
+ <Modal
714
+ open={lastOrderReview?.isReviewOpen}
715
+ onClose={handleCloseReivew}
716
+ title={lastOrderReview?.order && reviewModalTitle()}
717
+ width={lastOrderReview?.reviewStatus?.trigger ? '680px' : null}
718
+ >
719
+ <div>
720
+ {
721
721
  lastOrderReview?.reviewStatus?.trigger
722
722
  ? <ReviewTrigger order={lastOrderReview?.order} handleOpenOrderReview={handleOpenOrderReview} />
723
723
  : lastOrderReview?.reviewStatus?.order
@@ -725,25 +725,25 @@ export const App = () => {
725
725
  : (lastOrderReview?.reviewStatus?.product
726
726
  ? <ReviewProduct order={lastOrderReview?.order} closeReviewProduct={closeReviewProduct} setIsProductReviewed={() => setIsReviewed('isProductReviewed')} />
727
727
  : <ReviewDriver order={lastOrderReview?.order} closeReviewDriver={handleCloseReivew} setIsDriverReviewed={() => setIsReviewed('isDriverReviewed')} />)
728
- }
729
- </div>
730
- </Modal>
731
- )}
732
- <Modal
733
- open={businessSignUpSuccessed?.open}
734
- onClose={() => setBusinessSignUpSuccessed({ open: false, content: {} })}
735
- title={t('CONGRATULATIONS', 'Congratulations')}
736
- width='990px'
737
- >
738
- <SignUpApproval
739
- content={businessSignUpSuccessed?.content}
740
- onAccept={() => acceptAlert()}
741
- onCancel={() => setBusinessSignUpSuccessed({ open: false, content: {} })}
742
- />
728
+ }
729
+ </div>
743
730
  </Modal>
744
- </ThemeProvider>
745
- )
746
- }
747
- </div>
748
- )
731
+ )}
732
+ <Modal
733
+ open={businessSignUpSuccessed?.open}
734
+ onClose={() => setBusinessSignUpSuccessed({ open: false, content: {} })}
735
+ title={t('CONGRATULATIONS', 'Congratulations')}
736
+ width='990px'
737
+ >
738
+ <SignUpApproval
739
+ content={businessSignUpSuccessed?.content}
740
+ onAccept={() => acceptAlert()}
741
+ onCancel={() => setBusinessSignUpSuccessed({ open: false, content: {} })}
742
+ />
743
+ </Modal>
744
+ </ThemeProvider>
745
+ )
746
+ }
747
+ </div>
748
+ )
749
749
  }