ordering-ui-admin-external 1.6.2 → 1.6.3

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 (175) hide show
  1. package/_bundles/main.css +134 -129
  2. package/_bundles/{ordering-ui-admin.488bdda58ba73188d3b5.js → ordering-ui-admin.3ebe4d4f772eaeb4f851.js} +2 -2
  3. package/_bundles/{ordering-ui-admin.488bdda58ba73188d3b5.js.LICENSE.txt → ordering-ui-admin.3ebe4d4f772eaeb4f851.js.LICENSE.txt} +4 -4
  4. package/_modules/components/BusinessIntelligence/Reports/index.js +1 -1
  5. package/_modules/components/CartRecovery/OpenCartsFilterGroup/index.js +1 -1
  6. package/_modules/components/CartRecovery/RecoveryActionHeader/index.js +1 -1
  7. package/_modules/components/Delivery/AddressForm/index.js +1 -1
  8. package/_modules/components/Delivery/DriversCompaniesListing/index.js +1 -1
  9. package/_modules/components/Delivery/DriversGroupLogs/index.js +2 -2
  10. package/_modules/components/Delivery/DriversGroupsListing/index.js +1 -1
  11. package/_modules/components/Home/HomePage/index.js +29 -6
  12. package/_modules/components/Home/HomePage/styles.js +27 -5
  13. package/_modules/components/LanguageSelector/index.js +1 -1
  14. package/_modules/components/Login/LoginForm/index.js +119 -20
  15. package/_modules/components/Login/LoginForm/styles.js +60 -30
  16. package/_modules/components/Loyalty/RewardsPrograms/index.js +1 -1
  17. package/_modules/components/Marketing/CampaignSignUpOption/index.js +1 -1
  18. package/_modules/components/Marketing/EnterprisePromotionListing/index.js +1 -1
  19. package/_modules/components/Messages/MessagesListing/styles.js +1 -1
  20. package/_modules/components/MyProducts/AppLayout/index.js +75 -0
  21. package/_modules/components/MyProducts/AppLayout/styles.js +41 -0
  22. package/_modules/components/MyProducts/CallCenterApp/index.js +42 -0
  23. package/_modules/components/MyProducts/ContentForm/index.js +236 -0
  24. package/_modules/components/MyProducts/ContentForm/styles.js +32 -0
  25. package/_modules/components/MyProducts/CustomerApp/index.js +18 -25
  26. package/_modules/components/MyProducts/DriverApp/index.js +18 -45
  27. package/_modules/components/MyProducts/KioskApp/index.js +42 -0
  28. package/_modules/components/MyProducts/OrderingWebsite/index.js +351 -3
  29. package/_modules/components/MyProducts/OrderingWebsite/styles.js +54 -3
  30. package/_modules/components/MyProducts/PosApp/index.js +42 -0
  31. package/_modules/components/MyProducts/StoreApp/index.js +18 -45
  32. package/_modules/components/MyProducts/index.js +22 -1
  33. package/_modules/components/OrderingProducts/OrderingProductDetails/index.js +6 -8
  34. package/_modules/components/OrderingProducts/SiteTheme/index.js +13 -4
  35. package/_modules/components/Orders/DeliveriesManager/index.js +6 -0
  36. package/_modules/components/Orders/DriversManager/index.js +7 -1
  37. package/_modules/components/Orders/GoogleMapsApiKeySettingButton/index.js +110 -0
  38. package/_modules/components/{MyProducts/CustomerApp/styles.js → Orders/GoogleMapsApiKeySettingButton/style.js} +9 -13
  39. package/_modules/components/Orders/Messages/styles.js +3 -3
  40. package/_modules/components/Orders/OrderContactInformation/index.js +7 -7
  41. package/_modules/components/Orders/OrdersContentHeader/index.js +4 -2
  42. package/_modules/components/Orders/OrdersManager/index.js +3 -2
  43. package/_modules/components/Profile/ProfilePage/index.js +2 -1
  44. package/_modules/components/Profile/ProfilePage/styles.js +2 -2
  45. package/_modules/components/Profile/Sessions/index.js +209 -0
  46. package/_modules/components/Profile/Sessions/styles.js +46 -0
  47. package/_modules/components/Profile/index.js +8 -1
  48. package/_modules/components/Settings/EmailSetting/index.js +2 -29
  49. package/_modules/components/Settings/PageForm/index.js +6 -1
  50. package/_modules/components/Settings/Settings/index.js +0 -62
  51. package/_modules/components/Shared/CitySelector/index.js +9 -1
  52. package/_modules/components/Shared/Modal/index.js +5 -3
  53. package/_modules/components/Shared/Modal/styles.js +25 -23
  54. package/_modules/components/SidebarMenu/index.js +132 -76
  55. package/_modules/components/SidebarMenu/styles.js +4 -2
  56. package/_modules/components/Stores/AddBusinessForm/index.js +22 -8
  57. package/_modules/components/Stores/BusinessBrandGENDetail/index.js +6 -1
  58. package/_modules/components/Stores/BusinessProductList/styles.js +1 -1
  59. package/_modules/components/Stores/BusinessProductsCategories/styles.js +1 -1
  60. package/_modules/components/Stores/BusinessProductsCategoyInfo/index.js +6 -1
  61. package/_modules/components/Stores/BusinessProductsListing/index.js +35 -8
  62. package/_modules/components/Stores/BusinessProductsListing/styles.js +6 -4
  63. package/_modules/components/Stores/BusinessSelectHeader/index.js +17 -9
  64. package/_modules/components/Stores/BusinessSelectHeader/styles.js +1 -1
  65. package/_modules/components/Stores/BusinessSummary/index.js +21 -8
  66. package/_modules/components/Stores/BusinessSummary/styles.js +5 -3
  67. package/_modules/components/Stores/BusinessSync/index.js +6 -2
  68. package/_modules/components/Stores/BusinessSyncItsaCheckmate/index.js +52 -0
  69. package/_modules/components/Stores/BusinessSyncItsaCheckmate/styles.js +31 -0
  70. package/_modules/components/Support/index.js +1 -1
  71. package/_modules/hooks/useCountdownTimer.js +40 -0
  72. package/_modules/index.js +18 -0
  73. package/_modules/utils/index.js +65 -4
  74. package/index-template.js +49 -8
  75. package/package.json +3 -2
  76. package/src/components/BusinessIntelligence/Reports/index.js +1 -1
  77. package/src/components/CartRecovery/OpenCartsFilterGroup/index.js +1 -1
  78. package/src/components/CartRecovery/RecoveryActionHeader/index.js +1 -1
  79. package/src/components/Delivery/AddressForm/index.js +1 -1
  80. package/src/components/Delivery/DriversCompaniesListing/index.js +1 -1
  81. package/src/components/Delivery/DriversGroupLogs/index.js +1 -1
  82. package/src/components/Delivery/DriversGroupsListing/index.js +1 -1
  83. package/src/components/Home/HomePage/index.js +62 -6
  84. package/src/components/Home/HomePage/styles.js +48 -1
  85. package/src/components/LanguageSelector/index.js +1 -1
  86. package/src/components/Login/LoginForm/index.js +211 -94
  87. package/src/components/Login/LoginForm/styles.js +74 -8
  88. package/src/components/Loyalty/RewardsPrograms/index.js +1 -1
  89. package/src/components/Marketing/CampaignSignUpOption/index.js +1 -1
  90. package/src/components/Marketing/EnterprisePromotionListing/index.js +1 -1
  91. package/src/components/Messages/MessagesListing/styles.js +3 -5
  92. package/src/components/MyProducts/AppLayout/index.js +97 -0
  93. package/src/components/MyProducts/AppLayout/styles.js +145 -0
  94. package/src/components/MyProducts/CallCenterApp/index.js +29 -0
  95. package/src/components/MyProducts/ContentForm/index.js +230 -0
  96. package/src/components/MyProducts/ContentForm/styles.js +67 -0
  97. package/src/components/MyProducts/CustomerApp/index.js +17 -41
  98. package/src/components/MyProducts/DriverApp/index.js +16 -70
  99. package/src/components/MyProducts/KioskApp/index.js +29 -0
  100. package/src/components/MyProducts/OrderingWebsite/index.js +452 -25
  101. package/src/components/MyProducts/OrderingWebsite/styles.js +244 -0
  102. package/src/components/MyProducts/PosApp/index.js +29 -0
  103. package/src/components/MyProducts/StoreApp/index.js +16 -70
  104. package/src/components/MyProducts/index.js +7 -1
  105. package/src/components/OrderingProducts/OrderingProductDetails/index.js +4 -4
  106. package/src/components/OrderingProducts/SiteTheme/index.js +8 -0
  107. package/src/components/Orders/DeliveriesManager/index.js +5 -1
  108. package/src/components/Orders/DriversManager/index.js +7 -1
  109. package/src/components/Orders/GoogleMapsApiKeySettingButton/index.js +94 -0
  110. package/src/components/Orders/GoogleMapsApiKeySettingButton/style.js +38 -0
  111. package/src/components/Orders/Messages/styles.js +6 -0
  112. package/src/components/Orders/OrderContactInformation/index.js +1 -1
  113. package/src/components/Orders/OrdersContentHeader/index.js +6 -1
  114. package/src/components/Orders/OrdersManager/index.js +2 -1
  115. package/src/components/Profile/ProfilePage/index.js +2 -0
  116. package/src/components/Profile/ProfilePage/styles.js +2 -1
  117. package/src/components/Profile/Sessions/index.js +209 -0
  118. package/src/components/Profile/Sessions/styles.js +132 -0
  119. package/src/components/Profile/index.js +3 -1
  120. package/src/components/Settings/EmailSetting/index.js +0 -32
  121. package/src/components/Settings/PageForm/index.js +3 -0
  122. package/src/components/Settings/Settings/index.js +0 -65
  123. package/src/components/Shared/CitySelector/index.js +8 -0
  124. package/src/components/Shared/Modal/index.js +32 -26
  125. package/src/components/Shared/Modal/styles.js +11 -3
  126. package/src/components/SidebarMenu/index.js +92 -70
  127. package/src/components/SidebarMenu/styles.js +8 -1
  128. package/src/components/Stores/AddBusinessForm/index.js +10 -8
  129. package/src/components/Stores/BusinessBrandGENDetail/index.js +3 -0
  130. package/src/components/Stores/BusinessProductList/styles.js +1 -1
  131. package/src/components/Stores/BusinessProductsCategories/styles.js +1 -1
  132. package/src/components/Stores/BusinessProductsCategoyInfo/index.js +3 -0
  133. package/src/components/Stores/BusinessProductsListing/index.js +35 -1
  134. package/src/components/Stores/BusinessProductsListing/styles.js +9 -1
  135. package/src/components/Stores/BusinessSelectHeader/index.js +14 -2
  136. package/src/components/Stores/BusinessSelectHeader/styles.js +5 -0
  137. package/src/components/Stores/BusinessSummary/index.js +27 -10
  138. package/src/components/Stores/BusinessSummary/styles.js +7 -0
  139. package/src/components/Stores/BusinessSync/index.js +7 -2
  140. package/src/components/Stores/BusinessSyncItsaCheckmate/index.js +63 -0
  141. package/src/components/Stores/BusinessSyncItsaCheckmate/styles.js +88 -0
  142. package/src/components/Support/index.js +1 -1
  143. package/src/hooks/useCountdownTimer.js +26 -0
  144. package/src/index.js +7 -1
  145. package/src/utils/index.js +61 -0
  146. package/template/app.js +14 -12
  147. package/template/assets/images/ItsaCheckmateLogo.png +0 -0
  148. package/template/assets/images/door-dash.png +0 -0
  149. package/template/assets/images/myProducts/driver-app-brand.png +0 -0
  150. package/template/assets/images/myProducts/driver-app-free.png +0 -0
  151. package/template/assets/images/myProducts/multi-store-customer-app.png +0 -0
  152. package/template/assets/images/myProducts/my-callcenter-app-brand.png +0 -0
  153. package/template/assets/images/myProducts/my-callcenter-app-live.png +0 -0
  154. package/template/assets/images/myProducts/my-kiosk-app-brand.png +0 -0
  155. package/template/assets/images/myProducts/my-kiosk-app-live.png +0 -0
  156. package/template/assets/images/myProducts/my-pos-app-brand.png +0 -0
  157. package/template/assets/images/myProducts/my-pos-app-live.png +0 -0
  158. package/template/assets/images/myProducts/single-store-customer-app.png +0 -0
  159. package/template/assets/images/myProducts/store-app-brand.png +0 -0
  160. package/template/assets/images/myProducts/store-app-free.png +0 -0
  161. package/template/assets/images/projectStatuses/project-active.png +0 -0
  162. package/template/assets/images/projectStatuses/project-past-due-payment.png +0 -0
  163. package/template/components/AutologinParams/index.js +79 -0
  164. package/template/components/ListenPageChanges/index.js +3 -2
  165. package/template/config.json +1 -0
  166. package/template/helmetdata.json +21 -0
  167. package/template/pages/CallCenterApp/index.js +12 -0
  168. package/template/pages/KioskApp/index.js +12 -0
  169. package/template/pages/PosApp/index.js +12 -0
  170. package/template/theme.json +3 -0
  171. package/_modules/components/MyProducts/DriverApp/styles.js +0 -29
  172. package/_modules/components/MyProducts/StoreApp/styles.js +0 -29
  173. package/src/components/MyProducts/CustomerApp/styles.js +0 -59
  174. package/src/components/MyProducts/DriverApp/styles.js +0 -104
  175. package/src/components/MyProducts/StoreApp/styles.js +0 -104
@@ -10,16 +10,14 @@ export const Container = styled.div`
10
10
 
11
11
  export const ModalDialog = styled.div`
12
12
  position: relative;
13
- background-color: ${({ isTransparent, theme }) => isTransparent ? 'transparent' : theme.colors.backgroundPage || '#FFF'};
14
- padding: ${({ padding }) => padding || '20px'};
15
13
  width: ${({ width }) => width || '50%'};
16
14
  height: ${({ height }) => height};
17
15
  border-radius: 10px;
18
16
  box-sizing: border-box;
19
17
  margin-top: auto;
20
18
  margin-bottom: auto;
19
+ overflow: hidden;
21
20
  max-height: calc(var(--vh, 1vh) * 90);
22
- overflow: ${({ overflow }) => overflow || 'auto'};
23
21
  @media (max-width: 860px) {
24
22
  width: 80%;
25
23
  }
@@ -30,6 +28,16 @@ export const ModalDialog = styled.div`
30
28
  border-radius: 0px;
31
29
  }
32
30
  `
31
+
32
+ export const ModalDialogInnerContainer = styled.div`
33
+ position: relative;
34
+ padding: ${({ padding }) => padding || '20px'};
35
+ overflow: ${({ overflow }) => overflow || 'auto'};
36
+ background-color: ${({ isTransparent, theme }) => isTransparent ? 'transparent' : theme.colors.backgroundPage || '#FFF'};
37
+ width: 100%;
38
+ height: 100%;
39
+ `
40
+
33
41
  export const ModalActions = styled.div`
34
42
  display: flex;
35
43
  justify-content: space-around;
@@ -18,15 +18,16 @@ import {
18
18
  BoxArrowUpRight,
19
19
  Cart3,
20
20
  Cash,
21
- CloudDownload,
22
- BagCheck
21
+ BagCheck,
22
+ CloudDownload
23
23
  } from 'react-bootstrap-icons'
24
24
  import { useTheme } from 'styled-components'
25
- import { useEvent, useLanguage, useSession, useConfig } from 'ordering-components-admin-external'
25
+ import { SidebarMenu as SidebarMenuController, useEvent, useLanguage, useSession, useConfig, useApi } from 'ordering-components-admin-external'
26
26
  import { useWindowSize } from '../../hooks/useWindowSize'
27
27
  import { Accordion, Image, Button, AccordionContext, useAccordionToggle } from 'react-bootstrap'
28
28
  import { LanguageSelector } from '../LanguageSelector'
29
29
  import { useInfoShare } from '../../contexts/InfoShareContext'
30
+ import { firstLetterCapital } from '../../utils'
30
31
  import {
31
32
  SidebarContainer,
32
33
  SidebarInnerContainer,
@@ -41,21 +42,25 @@ import {
41
42
  LanguageSelectorContainer
42
43
  } from './styles'
43
44
 
44
- export const SidebarMenu = (props) => {
45
+ const SidebarMenuUI = (props) => {
46
+ const { getBillingToken, billingUrl } = props
47
+
45
48
  const location = useLocation()
46
49
  const theme = useTheme()
47
50
  const [events] = useEvent()
48
51
  const [, t] = useLanguage()
49
52
  const [sessionState] = useSession()
50
53
  const [{ configs }] = useConfig()
54
+ const [ordering] = useApi()
51
55
  const [{ isCollapse }, { handleMenuCollapse }] = useInfoShare()
52
56
  const windowSize = useWindowSize()
53
57
 
54
58
  const ordersSubMenus = [
55
59
  {
56
60
  id: 1,
57
- title: t('ORDERS_MANAGER', 'Orders manager'),
58
- pageName: 'orders'
61
+ title: t('ORDERS_LIST', 'Orders list'),
62
+ pageName: 'orders',
63
+ url: '/orders'
59
64
  },
60
65
  {
61
66
  id: 2,
@@ -77,7 +82,7 @@ export const SidebarMenu = (props) => {
77
82
  const loyaltySubMenus = [
78
83
  {
79
84
  id: 1,
80
- title: t('REWARDS_PROGRAMS', 'Rewards programs'),
85
+ title: t('LOYALTY_AUTOMATION', 'Loyalty automation'),
81
86
  pageName: 'rewards_programs',
82
87
  url: '/loyalty/rewards-programs'
83
88
  }
@@ -104,7 +109,7 @@ export const SidebarMenu = (props) => {
104
109
  },
105
110
  {
106
111
  id: 2,
107
- title: t('RECOVERY_ACTIONS', 'Recovery actions'),
112
+ title: t('CART_RECOVERY_AUTOMATION', 'Cart recovery automation'),
108
113
  pageName: 'recovery_actions',
109
114
  url: '/cart-recovery/recovery-actions'
110
115
  }
@@ -134,6 +139,24 @@ export const SidebarMenu = (props) => {
134
139
  title: t('DRIVER_APP', 'Driver app'),
135
140
  pageName: 'driver_app',
136
141
  url: '/my-products/driver-app'
142
+ },
143
+ {
144
+ id: 5,
145
+ title: t('POS_APP', 'POS'),
146
+ pageName: 'pos_app',
147
+ url: '/my-products/pos-app'
148
+ },
149
+ {
150
+ id: 6,
151
+ title: t('CALL_CENTER_APP', 'Call center'),
152
+ pageName: 'call_center_app',
153
+ url: '/my-products/call-center-app'
154
+ },
155
+ {
156
+ id: 7,
157
+ title: t('KIOSK_APP', 'Kiosk'),
158
+ pageName: 'kiosk_app',
159
+ url: '/my-products/kiosk-app'
137
160
  }
138
161
  ]
139
162
 
@@ -251,7 +274,7 @@ export const SidebarMenu = (props) => {
251
274
  },
252
275
  {
253
276
  id: 5,
254
- title: t('ADVANCED_REPORTS', 'Advanced Reports'),
277
+ title: t('ENTERPRISE_REPORTS', 'Enterprise reports'),
255
278
  pageName: 'reports',
256
279
  url: '/intelligence/reports'
257
280
  }
@@ -276,14 +299,14 @@ export const SidebarMenu = (props) => {
276
299
  },
277
300
  {
278
301
  id: 3,
279
- title: t('DRIVERS_COMPANIES', 'Drivers companies'),
302
+ title: t('DELIVERY_COMPANIES', 'Delivery companies'),
280
303
  pageName: 'drivers_companies',
281
304
  url: '/delivery/drivers-companies',
282
305
  enabled: sessionState?.user?.level === 0
283
306
  },
284
307
  {
285
308
  id: 4,
286
- title: t('DRIVERS_GROUPS', 'Drivers groups'),
309
+ title: t('DELIVERY_AUTOMATION', 'Delivery automation'),
287
310
  pageName: 'drivers_groups',
288
311
  url: '/delivery/drivers-groups',
289
312
  enabled: sessionState?.user?.level === 5 || sessionState?.user?.level === 0
@@ -293,7 +316,7 @@ export const SidebarMenu = (props) => {
293
316
  const marketingSubmenus = [
294
317
  {
295
318
  id: 1,
296
- title: t('PROMOTIONS_ENTERPRISE', 'Promotions enterprise'),
319
+ title: t('PROMOTION_AUTOMATION', 'Promotions automation'),
297
320
  pageName: 'enterprise_promotions',
298
321
  url: '/marketing/promotions-enterprise'
299
322
  }
@@ -305,21 +328,6 @@ export const SidebarMenu = (props) => {
305
328
  // }
306
329
  ]
307
330
 
308
- const downloadsSubMenus = [
309
- {
310
- id: 1,
311
- title: t('FREE_PRODUCTS', 'Free products'),
312
- pageName: 'free_products',
313
- url: '/downloads/free-products'
314
- },
315
- {
316
- id: 2,
317
- title: t('PURCHASED_PRODUCTS', 'Purchased products'),
318
- pageName: 'purchased_products',
319
- url: '/downloads/purchased-products'
320
- }
321
- ]
322
-
323
331
  const handleGoToPage = (data) => {
324
332
  if (windowSize.width < 768) {
325
333
  handleMenuCollapse(true)
@@ -331,12 +339,23 @@ export const SidebarMenu = (props) => {
331
339
  window.open(link, '_blank')
332
340
  }
333
341
 
342
+ const handleOpenSite = () => {
343
+ handleGoToLink(`https://${ordering.project}.tryordering.com`)
344
+ }
345
+
334
346
  useEffect(() => {
335
347
  if (windowSize.width < 1024) {
336
348
  handleMenuCollapse(true)
337
349
  }
338
350
  }, [windowSize.width])
339
351
 
352
+ const handleClickBilling = async () => {
353
+ const billingState = await getBillingToken()
354
+ if (!billingState?.error && billingState?.result?.access_token) {
355
+ window.open(`${billingUrl}?token=${billingState?.result?.access_token}`, '_blank')
356
+ }
357
+ }
358
+
340
359
  return (
341
360
  <>
342
361
  <SidebarContainer
@@ -365,7 +384,28 @@ export const SidebarMenu = (props) => {
365
384
  <SidebarMainContent>
366
385
  <SidebarContent className='d-flex flex-column justify-content-between p-1 pt-0'>
367
386
  <div className='d-flex flex-column'>
387
+ {sessionState?.user?.level === 0 && (
388
+ <Button
389
+ className='d-flex align-items-center'
390
+ variant={false}
391
+ onClick={handleOpenSite}
392
+ >
393
+ <BoxArrowUpRight />
394
+ <span>{t('MY_WEBSITE', 'My Website')}</span>
395
+ </Button>
396
+ )}
368
397
  <Accordion>
398
+ {/* {sessionState?.user?.level === 0 && (
399
+ <Button
400
+ className='d-flex align-items-center'
401
+ variant={false}
402
+ onClick={() => handleGoToLink('https://apps.tryordering.com/store/marketplace')}
403
+ >
404
+ <BoxArrowUpRight />
405
+ <span>{t('MARKETPLACE', 'Marketplace')}</span>
406
+ </Button>
407
+ )} */}
408
+
369
409
  {sessionState?.user?.level !== 5 && sessionState?.user?.level !== 8 && (
370
410
  <MenuContainer>
371
411
  <ContextAwareToggle
@@ -407,7 +447,7 @@ export const SidebarMenu = (props) => {
407
447
  active={location.pathname.includes(item.url)}
408
448
  onClick={() => handleGoToPage({ page: item.pageName })}
409
449
  >
410
- {item.title}
450
+ {firstLetterCapital(item.title)}
411
451
  </SubMenu>
412
452
  )
413
453
  ))}
@@ -502,7 +542,7 @@ export const SidebarMenu = (props) => {
502
542
  }
503
543
  >
504
544
  <BarChartLineIcon />
505
- <span>{t('BUSINESS_INTELLIGENCE', 'Business Intelligence')}</span>
545
+ <span>{firstLetterCapital(t('BUSINESS_INTELLIGENCE', 'Business Intelligence'))}</span>
506
546
  </ContextAwareToggle>
507
547
  <Accordion.Collapse eventKey='5'>
508
548
  <MenuContent>
@@ -516,7 +556,7 @@ export const SidebarMenu = (props) => {
516
556
  active={location.pathname.includes(item.pageName) || location.pathname.includes(item?.url)}
517
557
  onClick={() => handleGoToPage({ page: item.pageName })}
518
558
  >
519
- {item.title}
559
+ {firstLetterCapital(item.title)}
520
560
  </SubMenu>
521
561
  ))
522
562
  }
@@ -548,7 +588,7 @@ export const SidebarMenu = (props) => {
548
588
  active={location.pathname.includes(item.pageName) || location.pathname.includes(item?.url)}
549
589
  onClick={() => handleGoToPage({ page: item.pageName })}
550
590
  >
551
- {item.title}
591
+ {firstLetterCapital(item.title)}
552
592
  </SubMenu>
553
593
  )
554
594
  ))}
@@ -577,7 +617,7 @@ export const SidebarMenu = (props) => {
577
617
  active={location.pathname.includes(item.pageName) || location.pathname.includes(item?.url)}
578
618
  onClick={() => handleGoToPage({ page: item.pageName })}
579
619
  >
580
- {item.title}
620
+ {firstLetterCapital(item.title)}
581
621
  </SubMenu>
582
622
  ))}
583
623
  </MenuContent>
@@ -606,7 +646,7 @@ export const SidebarMenu = (props) => {
606
646
  active={location.pathname.includes(item.url)}
607
647
  onClick={() => handleGoToPage({ page: item.pageName })}
608
648
  >
609
- {item.title}
649
+ {firstLetterCapital(item.title)}
610
650
  </SubMenu>
611
651
  ))}
612
652
  </MenuContent>
@@ -634,14 +674,14 @@ export const SidebarMenu = (props) => {
634
674
  active={location.pathname.includes(item.url)}
635
675
  onClick={() => handleGoToPage({ page: item.pageName })}
636
676
  >
637
- {item.title}
677
+ {firstLetterCapital(item.title)}
638
678
  </SubMenu>
639
679
  ))}
640
680
  </MenuContent>
641
681
  </Accordion.Collapse>
642
682
  </MenuContainer>
643
683
  )}
644
- {/* {sessionState?.user?.level === 0 && (
684
+ {sessionState?.user?.level === 0 && (
645
685
  <MenuContainer>
646
686
  <span>{t('SALES_CHANNELS_AND_PRODUCTS', 'Sales channels and products')}</span>
647
687
  <ContextAwareToggle
@@ -650,7 +690,10 @@ export const SidebarMenu = (props) => {
650
690
  location.pathname === '/my-products/ordering-website' ||
651
691
  location.pathname === '/my-products/customer-app' ||
652
692
  location.pathname === '/my-products/store-app' ||
653
- location.pathname === '/my-products/driver-app'
693
+ location.pathname === '/my-products/driver-app' ||
694
+ location.pathname === '/my-products/pos-app' ||
695
+ location.pathname === '/my-products/call-center-app' ||
696
+ location.pathname === '/my-products/kiosk-app'
654
697
  }
655
698
  >
656
699
  <BagCheck />
@@ -670,7 +713,7 @@ export const SidebarMenu = (props) => {
670
713
  </MenuContent>
671
714
  </Accordion.Collapse>
672
715
  </MenuContainer>
673
- )} */}
716
+ )}
674
717
  </Accordion>
675
718
  </div>
676
719
  <div className='d-flex flex-column mt-4'>
@@ -703,7 +746,7 @@ export const SidebarMenu = (props) => {
703
746
  active={location.pathname.includes(item.pageName) || location.pathname.includes(item?.url)}
704
747
  onClick={() => handleGoToPage({ page: item.pageName })}
705
748
  >
706
- {item.title}
749
+ {firstLetterCapital(item.title)}
707
750
  </SubMenu>
708
751
  ))}
709
752
  </MenuContent>
@@ -735,41 +778,12 @@ export const SidebarMenu = (props) => {
735
778
  <Button
736
779
  className='d-flex align-items-center'
737
780
  variant={false}
738
- onClick={() => handleGoToLink('https://apps.tryordering.com/store/marketplace')}
781
+ onClick={() => handleClickBilling()}
739
782
  >
740
- <BoxArrowUpRight />
741
- <span>{t('MARKETPLACE', 'Marketplace')}</span>
783
+ <Cash />
784
+ <span>{t('BILLING', 'Billing')}</span>
742
785
  </Button>
743
786
  )}
744
- {sessionState?.user?.level === 0 && (
745
- <Accordion>
746
- <MenuContainer>
747
- <ContextAwareToggle
748
- eventKey='11'
749
- active={
750
- location.pathname === '/downloads/free-products' ||
751
- location.pathname === '/downloads/purchased-products'
752
- }
753
- >
754
- <CloudDownload />
755
- <span>{t('DOWNLOADS', 'Downloads')}</span>
756
- </ContextAwareToggle>
757
- <Accordion.Collapse eventKey='11'>
758
- <MenuContent>
759
- {downloadsSubMenus.map(item => (
760
- <SubMenu
761
- key={item.id}
762
- active={location.pathname.includes(item.pageName) || location.pathname.includes(item?.url)}
763
- onClick={() => handleGoToPage({ page: item.pageName })}
764
- >
765
- {item.title}
766
- </SubMenu>
767
- ))}
768
- </MenuContent>
769
- </Accordion.Collapse>
770
- </MenuContainer>
771
- </Accordion>
772
- )}
773
787
  </div>
774
788
  </SidebarContent>
775
789
  <UserInfo
@@ -822,3 +836,11 @@ const ContextAwareToggle = ({ children, eventKey, callback, page, handleGoToPage
822
836
  </Button>
823
837
  )
824
838
  }
839
+
840
+ export const SidebarMenu = (props) => {
841
+ const sidebarMenu = {
842
+ ...props,
843
+ UIComponent: SidebarMenuUI
844
+ }
845
+ return <SidebarMenuController {...sidebarMenu} />
846
+ }
@@ -44,7 +44,6 @@ export const SidebarContainer = styled.div`
44
44
  }
45
45
 
46
46
  span {
47
- text-transform: capitalize;
48
47
  ${props => props.theme?.rtl ? css`
49
48
  margin-right: 15px;
50
49
  ` : css`
@@ -168,6 +167,14 @@ export const MenuContainer = styled.div`
168
167
  text-align: initial;
169
168
  }
170
169
 
170
+ > span {
171
+ font-weight: 500;
172
+ font-size: 10px;
173
+ line-height: 15px;
174
+ padding: 20px;
175
+ color: ${props => props.theme.colors.lightGray};
176
+ }
177
+
171
178
  ${({ disabledFeature }) => disabledFeature && css`
172
179
  background-color: ${props => props.theme.colors.disabled};
173
180
  cursor: not-allowed;
@@ -11,7 +11,7 @@ import {
11
11
  } from 'ordering-components-admin-external'
12
12
  import BiImage from '@meronex/icons/bi/BiImage'
13
13
  import Skeleton from 'react-loading-skeleton'
14
- import { bytesConverter } from '../../../utils'
14
+ import { bytesConverter, stringToSlug } from '../../../utils'
15
15
  import { Alert, CitySelector, ImageCrop, Modal } from '../../Shared'
16
16
  import { Button, Input, TextArea } from '../../../styles'
17
17
 
@@ -224,7 +224,9 @@ const AddBusinessFormUI = (props) => {
224
224
  ? formState?.result?.result?.name
225
225
  : formState?.changes?.name
226
226
  }
227
- onChange={handleChangeInput}
227
+ onChange={e => {
228
+ handleChangeInput([{ name: 'name', value: e.target.value }, { name: 'slug', value: stringToSlug(e.target.value) }], true)
229
+ }}
228
230
  ref={formMethods.register({
229
231
  required: t('BUSINESS_NAME_REQUIRED', 'Business name is required')
230
232
  })}
@@ -266,17 +268,16 @@ const AddBusinessFormUI = (props) => {
266
268
  <Input
267
269
  name='slug'
268
270
  placeholder={t('SLUG', 'slug')}
269
- defaultValue={
270
- formState?.result?.result
271
- ? formState?.result?.result?.slug
272
- : formState?.changes?.slug
273
- }
271
+ value={formState?.changes?.slug || ''}
274
272
  onChange={handleChangeInput}
275
273
  ref={formMethods.register({
276
274
  required: t('BUSINESS_SLUG_REQUIRED', 'Business slug is required')
277
275
  })}
278
276
  disabled={formState.loading}
279
277
  autoComplete='off'
278
+ onKeyPress={e => {
279
+ if (e.which === 32) { e.preventDefault() }
280
+ }}
280
281
  />
281
282
  </InputWrapper>
282
283
  <InputWrapper>
@@ -299,6 +300,7 @@ const AddBusinessFormUI = (props) => {
299
300
  <label>{t('CITY', 'City')}</label>
300
301
  <CitySelector
301
302
  isDefault
303
+ isAddMode
302
304
  defaultValue={
303
305
  formState?.result?.result
304
306
  ? formState?.result?.result?.city_id
@@ -325,7 +327,7 @@ const AddBusinessFormUI = (props) => {
325
327
  ? formState?.result?.result?.address
326
328
  : formState?.changes?.address ?? ''
327
329
  }
328
- autoComplete='new-field'
330
+ autoComplete='new-password'
329
331
  countryCode={configs?.country_autocomplete?.value || '*'}
330
332
  />
331
333
  </InputWrapper>
@@ -195,6 +195,9 @@ const BusinessBrandGENDetailUI = (props) => {
195
195
  onChange={handleChangeInput}
196
196
  disabled={brandFormState.loading}
197
197
  autoComplete='off'
198
+ onKeyPress={e => {
199
+ if (e.which === 32) { e.preventDefault() }
200
+ }}
198
201
  />
199
202
  </FormControl>
200
203
  <SwitchWrapper>
@@ -27,7 +27,7 @@ export const ProductListContainer = styled.div`
27
27
  }
28
28
 
29
29
  @media (min-width: 993px) {
30
- max-height: calc(100vh - 310px);
30
+ max-height: calc(100vh - 320px);
31
31
  }
32
32
  `
33
33
 
@@ -28,7 +28,7 @@ export const ListContent = styled.div`
28
28
  }
29
29
 
30
30
  @media (min-width: 768px) {
31
- max-height: calc(100vh - 230px);
31
+ max-height: calc(100vh - 240px);
32
32
  }
33
33
  `
34
34
 
@@ -315,6 +315,9 @@ export const BusinessProductsCategoyInfo = (props) => {
315
315
  value={formState?.changes?.description || ''}
316
316
  onChange={handleChangeInput}
317
317
  autoComplete='off'
318
+ onKeyPress={e => {
319
+ if (e.which === 32) { e.preventDefault() }
320
+ }}
318
321
  />
319
322
  </CategoryNameWrapper>
320
323
  {!isAddMode && (
@@ -5,6 +5,7 @@ import { useWindowSize } from '../../../hooks/useWindowSize'
5
5
  import RiImageAddFill from '@meronex/icons/ri/RiImageAddFill'
6
6
  import {
7
7
  useLanguage,
8
+ useApi,
8
9
  BusinessProductsListing as BusinessProductsListingController
9
10
  } from 'ordering-components-admin-external'
10
11
  import { BusinessProductsCategoyDetails } from '../BusinessProductsCategoyDetails'
@@ -23,6 +24,7 @@ import { BatchImageForm } from '../BatchImageForm'
23
24
  import { BusinessDetails } from '../BusinessDetails'
24
25
  import { OverlayTrigger, Tooltip } from 'react-bootstrap'
25
26
  import { ImportersButton } from '../ImportersButton'
27
+ import { AddBusinessForm } from '../AddBusinessForm'
26
28
 
27
29
  import {
28
30
  CategoryProductsContainer,
@@ -38,7 +40,8 @@ import {
38
40
  BusinessNameWrapper,
39
41
  BusinessSelector,
40
42
  Breadcrumb,
41
- ColumnsAllowWrapper
43
+ ColumnsAllowWrapper,
44
+ ButtonWrapper
42
45
  } from './styles'
43
46
 
44
47
  const BusinessProductsListingUI = (props) => {
@@ -71,6 +74,7 @@ const BusinessProductsListingUI = (props) => {
71
74
 
72
75
  const [, t] = useLanguage()
73
76
  const { width } = useWindowSize()
77
+ const [ordering] = useApi()
74
78
  const [{ isCollapse }, { handleMenuCollapse }] = useInfoShare()
75
79
  const [viewMethod, setViewMethod] = useState('list')
76
80
  const [currentCategory, setCurrentCategory] = useState(null)
@@ -190,6 +194,15 @@ const BusinessProductsListingUI = (props) => {
190
194
  setBatchImageFormOpen(true)
191
195
  }
192
196
 
197
+ const handleOpenSite = () => {
198
+ window.open(`https://${ordering.project}.tryordering.com/store/${businessState?.business?.slug}`, '_blank')
199
+ }
200
+
201
+ const handleOpenAddBusiness = () => {
202
+ setOpenSidebar('add_business')
203
+ handleClose()
204
+ }
205
+
193
206
  useEffect(() => {
194
207
  if (slug && !isInitialRender) {
195
208
  setOpenSidebar(null)
@@ -236,6 +249,7 @@ const BusinessProductsListingUI = (props) => {
236
249
  isOpen={showSelectHeader}
237
250
  changeBusinessState={changeBusinessState}
238
251
  noActiveStatusCondition
252
+ handleOpenAddBusiness={handleOpenAddBusiness}
239
253
  />
240
254
  )}
241
255
  </BusinessSelector>
@@ -293,6 +307,16 @@ const BusinessProductsListingUI = (props) => {
293
307
  </ActionsGroup>
294
308
  )}
295
309
  </HeaderContainer>
310
+ <ButtonWrapper>
311
+ <Button
312
+ color='primary'
313
+ outline
314
+ borderRadius='8px'
315
+ onClick={handleOpenSite}
316
+ >
317
+ {t('STORE_WEBSITE', 'Store website')}
318
+ </Button>
319
+ </ButtonWrapper>
296
320
  {slug && (
297
321
  <CategoryProductsContent>
298
322
  <CategoryListContainer ref={categoryListRef}>
@@ -431,6 +455,16 @@ const BusinessProductsListingUI = (props) => {
431
455
  onClose={() => setOpenSidebar(null)}
432
456
  />
433
457
  )}
458
+ {openSidebar === 'add_business' && (
459
+ <SideBar
460
+ open={openSidebar === 'add_business'}
461
+ onClose={() => setOpenSidebar(null)}
462
+ >
463
+ <AddBusinessForm
464
+ handleSucessAddBusiness={() => setOpenSidebar(false)}
465
+ />
466
+ </SideBar>
467
+ )}
434
468
  <Modal
435
469
  width={width > 1440 ? '40%' : '60%'}
436
470
  padding='20px'
@@ -104,7 +104,6 @@ export const ActionsGroup = styled.div`
104
104
  export const CategoryProductsContent = styled.div`
105
105
  display: flex;
106
106
  flex-direction: row;
107
- margin-top: 50px;
108
107
  min-height: calc(100% - 150px);
109
108
 
110
109
  @media (max-width: 768px) {
@@ -227,3 +226,12 @@ export const ColumnsAllowWrapper = styled.div`
227
226
  position: relative;
228
227
  margin: 0 5px;
229
228
  `
229
+
230
+ export const ButtonWrapper = styled.div`
231
+ display: flex;
232
+ justify-content: flex-end;
233
+ margin-top: 12px;
234
+ button {
235
+ height: 42px;
236
+ }
237
+ `
@@ -5,6 +5,7 @@ import {
5
5
  useUtils,
6
6
  DashboardBusinessList as BusinessListController
7
7
  } from 'ordering-components-admin-external'
8
+ import { Button } from '../../../styles'
8
9
  import {
9
10
  PopMenuContatiner,
10
11
  BusinessSearch,
@@ -24,7 +25,8 @@ const BusinessessListingUI = (props) => {
24
25
  getPageBusinesses,
25
26
  isOpen,
26
27
  close,
27
- changeBusinessState
28
+ changeBusinessState,
29
+ handleOpenAddBusiness
28
30
  } = props
29
31
  const [, t] = useLanguage()
30
32
  const [{ optimizeImage }] = useUtils()
@@ -91,7 +93,7 @@ const BusinessessListingUI = (props) => {
91
93
  </>
92
94
  )}
93
95
  </BusinessList>
94
- {pagination && (
96
+ {pagination && pagination?.total > 0 && (
95
97
  <WrapperPagination className='pagination-container'>
96
98
  {pagination?.total && (
97
99
  <Pagination
@@ -105,6 +107,16 @@ const BusinessessListingUI = (props) => {
105
107
  )}
106
108
  </WrapperPagination>
107
109
  )}
110
+
111
+ {!businessList.loading && pagination?.total === 0 && (
112
+ <Button
113
+ color='primary'
114
+ borderRadius='8px'
115
+ onClick={() => handleOpenAddBusiness()}
116
+ >
117
+ {t('ADD_NEW_STORE', 'Add new store')}
118
+ </Button>
119
+ )}
108
120
  </SelectHeaderContent>
109
121
  </PopMenuContatiner>
110
122
  )
@@ -16,6 +16,11 @@ export const SelectHeaderContent = styled.div`
16
16
  position: relative;
17
17
  width: 100%;
18
18
  height: 100%;
19
+
20
+ > button {
21
+ margin-top: 10px;
22
+ width: 100%;
23
+ }
19
24
  `
20
25
  export const BusinessSearch = styled.div`
21
26
  display: flex;