ordering-ui-admin-external 1.5.1 → 1.6.0

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 (161) hide show
  1. package/_bundles/{ordering-ui-admin.743f7975ef6f607887b2.js → ordering-ui-admin.0fd83f227d29409cb170.js} +2 -2
  2. package/_bundles/{ordering-ui-admin.743f7975ef6f607887b2.js.LICENSE.txt → ordering-ui-admin.0fd83f227d29409cb170.js.LICENSE.txt} +1 -1
  3. package/_modules/components/Delivery/UserFormDetails/index.js +10 -3
  4. package/_modules/components/Login/LoginForm/index.js +4 -3
  5. package/_modules/components/Login/ResetPassword/index.js +251 -0
  6. package/_modules/components/Login/ResetPassword/styles.js +64 -0
  7. package/_modules/components/Login/index.js +8 -1
  8. package/_modules/components/Marketing/CampaignDetailContent/index.js +41 -5
  9. package/_modules/components/Marketing/CampaignDetailGeneral/index.js +2 -2
  10. package/_modules/components/Marketing/CampaignEmail/index.js +155 -12
  11. package/_modules/components/Marketing/CampaignEmail/styles.js +18 -4
  12. package/_modules/components/Marketing/CampaignHeader/index.js +11 -1
  13. package/_modules/components/Marketing/CampaignHeader/styles.js +25 -6
  14. package/_modules/components/Marketing/CampaignList/index.js +41 -25
  15. package/_modules/components/Marketing/CampaignNotification/index.js +14 -1
  16. package/_modules/components/Marketing/CampaignNotification/styles.js +7 -3
  17. package/_modules/components/Marketing/CampaignSMS/index.js +14 -1
  18. package/_modules/components/Marketing/CampaignSMS/styles.js +7 -3
  19. package/_modules/components/Marketing/CampaignWebHook/index.js +13 -1
  20. package/_modules/components/Marketing/CampaignWebHook/styles.js +7 -3
  21. package/_modules/components/MyProducts/BoxLayout/index.js +20 -0
  22. package/_modules/components/MyProducts/BoxLayout/styles.js +22 -0
  23. package/_modules/components/MyProducts/CustomerApp/index.js +48 -0
  24. package/_modules/components/MyProducts/CustomerApp/styles.js +25 -0
  25. package/_modules/components/MyProducts/DriverApp/index.js +69 -0
  26. package/_modules/components/MyProducts/DriverApp/styles.js +29 -0
  27. package/_modules/components/MyProducts/OrderingWebsite/index.js +40 -0
  28. package/_modules/components/MyProducts/OrderingWebsite/styles.js +29 -0
  29. package/_modules/components/MyProducts/StoreApp/index.js +69 -0
  30. package/_modules/components/MyProducts/StoreApp/styles.js +29 -0
  31. package/_modules/components/MyProducts/index.js +33 -0
  32. package/_modules/components/OrderingProducts/OrderingProductDetails/index.js +4 -4
  33. package/_modules/components/Orders/OrdersTable/index.js +8 -9
  34. package/_modules/components/Profile/ProfilePage/index.js +70 -0
  35. package/_modules/components/Profile/ProfilePage/styles.js +22 -0
  36. package/_modules/components/Profile/index.js +12 -0
  37. package/_modules/components/Settings/InsertLink/index.js +3 -2
  38. package/_modules/components/Settings/PluginList/index.js +31 -1
  39. package/_modules/components/Shared/ColumnAllowSettingPopover/index.js +4 -3
  40. package/_modules/components/SidebarMenu/index.js +82 -55
  41. package/_modules/components/SidebarMenu/styles.js +3 -1
  42. package/_modules/components/Stores/BusinessLocation/index.js +1 -1
  43. package/_modules/components/Stores/BusinessProductAddForm/index.js +4 -4
  44. package/_modules/components/Stores/BusinessProductsListing/index.js +7 -0
  45. package/_modules/components/Stores/BusinessWebhooks/index.js +2 -2
  46. package/_modules/components/Stores/PaymentOption/index.js +23 -4
  47. package/_modules/components/Stores/PaymentOptionMethods/index.js +23 -4
  48. package/_modules/components/Stores/PaymentOptionPaypal/index.js +23 -4
  49. package/_modules/components/Stores/PaymentOptionStripeDirect/index.js +23 -4
  50. package/_modules/components/Stores/PaymethodOptionPaypalExpress/index.js +23 -4
  51. package/_modules/components/Stores/PaymethodOptionStripeConnect/index.js +23 -4
  52. package/_modules/components/Stores/PaymethodOptionStripeRedirect/index.js +23 -4
  53. package/_modules/components/Users/CustomerDetails/index.js +8 -10
  54. package/_modules/components/Users/CustomersListing/index.js +4 -2
  55. package/_modules/components/Users/OccupationSelector/index.js +48 -0
  56. package/_modules/components/Users/OccupationSelector/styles.js +16 -0
  57. package/_modules/components/Users/OccupationsFilter/index.js +49 -0
  58. package/_modules/components/Users/OccupationsFilter/styles.js +22 -0
  59. package/_modules/components/Users/ProfessionalDetail/index.js +47 -8
  60. package/_modules/components/Users/ProfessionalDetail/styles.js +10 -5
  61. package/_modules/components/Users/ProfessionalList/index.js +43 -6
  62. package/_modules/components/Users/ProfessionalList/styles.js +5 -3
  63. package/_modules/components/Users/ProfessionalListing/index.js +14 -3
  64. package/_modules/components/Users/ProfessionalSchedule/styles.js +1 -1
  65. package/_modules/components/Users/UserDetails/index.js +11 -13
  66. package/_modules/components/Users/UserFormDetails/index.js +8 -1
  67. package/_modules/components/Users/UserTypeSelector/index.js +7 -0
  68. package/_modules/components/Users/UsersList/index.js +40 -5
  69. package/_modules/components/Users/UsersList/styles.js +7 -5
  70. package/_modules/components/Users/UsersListing/index.js +4 -2
  71. package/_modules/contexts/ThemeContext/index.js +1 -1
  72. package/_modules/index.js +38 -0
  73. package/index-template.js +22 -4
  74. package/package.json +2 -2
  75. package/src/components/Delivery/UserFormDetails/index.js +8 -10
  76. package/src/components/Login/LoginForm/index.js +23 -20
  77. package/src/components/Login/ResetPassword/index.js +283 -0
  78. package/src/components/Login/ResetPassword/styles.js +215 -0
  79. package/src/components/Login/index.js +3 -1
  80. package/src/components/Marketing/CampaignDetail/index.js +0 -1
  81. package/src/components/Marketing/CampaignDetailContent/index.js +54 -24
  82. package/src/components/Marketing/CampaignDetailGeneral/index.js +1 -1
  83. package/src/components/Marketing/CampaignEmail/index.js +152 -15
  84. package/src/components/Marketing/CampaignEmail/styles.js +64 -3
  85. package/src/components/Marketing/CampaignHeader/index.js +19 -3
  86. package/src/components/Marketing/CampaignHeader/styles.js +77 -0
  87. package/src/components/Marketing/CampaignList/index.js +75 -65
  88. package/src/components/Marketing/CampaignNotification/index.js +11 -3
  89. package/src/components/Marketing/CampaignNotification/styles.js +13 -0
  90. package/src/components/Marketing/CampaignSMS/index.js +11 -2
  91. package/src/components/Marketing/CampaignSMS/styles.js +13 -0
  92. package/src/components/Marketing/CampaignWebHook/index.js +11 -2
  93. package/src/components/Marketing/CampaignWebHook/styles.js +13 -0
  94. package/src/components/MyProducts/BoxLayout/index.js +25 -0
  95. package/src/components/MyProducts/BoxLayout/styles.js +78 -0
  96. package/src/components/MyProducts/CustomerApp/index.js +52 -0
  97. package/src/components/MyProducts/CustomerApp/styles.js +59 -0
  98. package/src/components/MyProducts/DriverApp/index.js +83 -0
  99. package/src/components/MyProducts/DriverApp/styles.js +104 -0
  100. package/src/components/MyProducts/OrderingWebsite/index.js +41 -0
  101. package/src/components/MyProducts/OrderingWebsite/styles.js +104 -0
  102. package/src/components/MyProducts/StoreApp/index.js +83 -0
  103. package/src/components/MyProducts/StoreApp/styles.js +104 -0
  104. package/src/components/MyProducts/index.js +11 -0
  105. package/src/components/OrderingProducts/OrderingProductDetails/index.js +1 -1
  106. package/src/components/Orders/OrdersTable/index.js +3 -6
  107. package/src/components/Profile/ProfilePage/index.js +81 -0
  108. package/src/components/Profile/ProfilePage/styles.js +64 -0
  109. package/src/components/Profile/index.js +5 -0
  110. package/src/components/Settings/InsertLink/index.js +6 -2
  111. package/src/components/Settings/PluginList/index.js +2 -2
  112. package/src/components/Shared/ColumnAllowSettingPopover/index.js +11 -7
  113. package/src/components/SidebarMenu/index.js +120 -58
  114. package/src/components/SidebarMenu/styles.js +7 -0
  115. package/src/components/Stores/BusinessLocation/index.js +1 -1
  116. package/src/components/Stores/BusinessProductAddForm/index.js +2 -2
  117. package/src/components/Stores/BusinessProductsListing/index.js +8 -0
  118. package/src/components/Stores/BusinessWebhooks/index.js +2 -2
  119. package/src/components/Stores/PaymentOption/index.js +12 -2
  120. package/src/components/Stores/PaymentOptionMethods/index.js +12 -2
  121. package/src/components/Stores/PaymentOptionPaypal/index.js +12 -2
  122. package/src/components/Stores/PaymentOptionStripeDirect/index.js +12 -2
  123. package/src/components/Stores/PaymethodOptionPaypalExpress/index.js +12 -2
  124. package/src/components/Stores/PaymethodOptionStripeConnect/index.js +12 -2
  125. package/src/components/Stores/PaymethodOptionStripeRedirect/index.js +12 -2
  126. package/src/components/Users/CustomerDetails/index.js +1 -1
  127. package/src/components/Users/CustomersListing/index.js +3 -1
  128. package/src/components/Users/OccupationSelector/index.js +37 -0
  129. package/src/components/Users/OccupationSelector/styles.js +18 -0
  130. package/src/components/Users/OccupationsFilter/index.js +50 -0
  131. package/src/components/Users/OccupationsFilter/styles.js +32 -0
  132. package/src/components/Users/ProfessionalDetail/index.js +42 -7
  133. package/src/components/Users/ProfessionalDetail/styles.js +16 -2
  134. package/src/components/Users/ProfessionalList/index.js +41 -3
  135. package/src/components/Users/ProfessionalList/styles.js +5 -0
  136. package/src/components/Users/ProfessionalListing/index.js +14 -1
  137. package/src/components/Users/ProfessionalSchedule/styles.js +1 -0
  138. package/src/components/Users/UserDetails/index.js +1 -1
  139. package/src/components/Users/UserFormDetails/index.js +11 -2
  140. package/src/components/Users/UserTypeSelector/index.js +6 -0
  141. package/src/components/Users/UsersList/index.js +44 -8
  142. package/src/components/Users/UsersList/styles.js +7 -2
  143. package/src/components/Users/UsersListing/index.js +4 -2
  144. package/src/contexts/ThemeContext/index.js +4 -0
  145. package/src/index.js +17 -1
  146. package/template/app.js +55 -3
  147. package/template/assets/images/myProducts/customer-app.png +0 -0
  148. package/template/assets/images/myProducts/driver-app.png +0 -0
  149. package/template/assets/images/myProducts/ordering-website.png +0 -0
  150. package/template/assets/images/myProducts/store-app.png +0 -0
  151. package/template/components/ListenPageChanges/index.js +7 -1
  152. package/template/config.json +2 -1
  153. package/template/helmetdata.json +49 -0
  154. package/template/pages/CustomerApp/index.js +12 -0
  155. package/template/pages/DriverApp/index.js +12 -0
  156. package/template/pages/Login/index.js +7 -1
  157. package/template/pages/OrderingWebsite/index.js +12 -0
  158. package/template/pages/Professionals/index.js +2 -1
  159. package/template/pages/Profile/index.js +12 -0
  160. package/template/pages/ResetPassword/index.js +42 -0
  161. package/template/pages/StoreApp/index.js +12 -0
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from 'react'
2
- import { useLanguage } from 'ordering-components-admin-external'
2
+ import { useLanguage, useEvent } from 'ordering-components-admin-external'
3
3
  import { Input, TextArea, Button } from '../../../styles'
4
4
  import { useTheme } from 'styled-components'
5
5
  import { Alert } from '../../Shared'
@@ -11,7 +11,8 @@ import {
11
11
  SmsPreviewWrapper,
12
12
  SmsContentLayout,
13
13
  SmsPreviewContentWrapper,
14
- SmsPreviewContent
14
+ SmsPreviewContent,
15
+ Description
15
16
  } from './styles'
16
17
 
17
18
  export const CampaignSMS = (props) => {
@@ -26,6 +27,7 @@ export const CampaignSMS = (props) => {
26
27
 
27
28
  const [, t] = useLanguage()
28
29
  const theme = useTheme()
30
+ const [events] = useEvent()
29
31
  const [alertState, setAlertState] = useState({ open: false, content: [] })
30
32
 
31
33
  const closeAlert = () => {
@@ -76,9 +78,16 @@ export const CampaignSMS = (props) => {
76
78
  }
77
79
  }
78
80
 
81
+ const handleGoToPage = () => {
82
+ events.emit('go_to_page', { page: 'operation_settings', search: '?category=26' })
83
+ }
84
+
79
85
  return (
80
86
  <>
81
87
  <Container>
88
+ <Description>
89
+ {t('TWILIO_SETTINGS_LINK_DESC', 'You need to complete Twilio configuration first, you can do it here:')} <span onClick={() => handleGoToPage()}>{t('TWILIO_SETTINGS', 'Twilio settings')}</span>
90
+ </Description>
82
91
  <InputWrapper>
83
92
  <label>{t('TITLE', 'Title')}</label>
84
93
  <Input
@@ -93,3 +93,16 @@ export const SmsPreviewContent = styled.div`
93
93
  color: ${props => props.theme.colors.lightGray};
94
94
  }
95
95
  `
96
+
97
+ export const Description = styled.div`
98
+ font-size: 14px;
99
+ margin: 10px 0px;
100
+ span {
101
+ color: ${props => props.theme.colors.primary};
102
+ cursor: pointer;
103
+ transition: all 0.3s linear;
104
+ &:hover {
105
+ text-decoration: underline;
106
+ }
107
+ }
108
+ `
@@ -1,12 +1,13 @@
1
1
  import React, { useState } from 'react'
2
- import { useLanguage } from 'ordering-components-admin-external'
2
+ import { useLanguage, useEvent } from 'ordering-components-admin-external'
3
3
  import { Input, TextArea, Button } from '../../../styles'
4
4
  import { Alert } from '../../Shared'
5
5
 
6
6
  import {
7
7
  Container,
8
8
  InputWrapper,
9
- ButtonWrapper
9
+ ButtonWrapper,
10
+ Description
10
11
  } from './styles'
11
12
 
12
13
  export const CampaignWebHook = (props) => {
@@ -20,6 +21,7 @@ export const CampaignWebHook = (props) => {
20
21
  } = props
21
22
 
22
23
  const [, t] = useLanguage()
24
+ const [events] = useEvent()
23
25
 
24
26
  const [alertState, setAlertState] = useState({ open: false, content: [] })
25
27
 
@@ -78,9 +80,16 @@ export const CampaignWebHook = (props) => {
78
80
  }
79
81
  }
80
82
 
83
+ const handleGoToPage = () => {
84
+ events.emit('go_to_page', { page: 'integrations' })
85
+ }
86
+
81
87
  return (
82
88
  <>
83
89
  <Container>
90
+ <Description>
91
+ {t('INTEGRATION_SETTINGS_LINK_DESC', 'You need to have an Integration first, you can do it here:')} <span onClick={() => handleGoToPage()}>{t('INTEGRATIONS', 'Integrations')}</span>
92
+ </Description>
84
93
  <InputWrapper>
85
94
  <label>{t('TITLE', 'Title')}</label>
86
95
  <Input
@@ -32,3 +32,16 @@ export const ButtonWrapper = styled.div`
32
32
  border-radius: 8px;
33
33
  }
34
34
  `
35
+
36
+ export const Description = styled.div`
37
+ font-size: 14px;
38
+ margin: 10px 0px;
39
+ span {
40
+ color: ${props => props.theme.colors.primary};
41
+ cursor: pointer;
42
+ transition: all 0.3s linear;
43
+ &:hover {
44
+ text-decoration: underline;
45
+ }
46
+ }
47
+ `
@@ -0,0 +1,25 @@
1
+ import React from 'react'
2
+ import {
3
+ Container,
4
+ InfoWrapper
5
+ } from './styles'
6
+
7
+ export const BoxLayout = (props) => {
8
+ const {
9
+ photo,
10
+ title,
11
+ description,
12
+ children
13
+ } = props
14
+
15
+ return (
16
+ <Container>
17
+ <img src={photo} alt='' />
18
+ <InfoWrapper>
19
+ <h2>{title}</h2>
20
+ <p>{description}</p>
21
+ {children}
22
+ </InfoWrapper>
23
+ </Container>
24
+ )
25
+ }
@@ -0,0 +1,78 @@
1
+ import styled, { css } from 'styled-components'
2
+
3
+ export const Container = styled.div`
4
+ display: flex;
5
+ flex-direction: column;
6
+ box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1);
7
+ border-radius: 7.6px;
8
+ padding: 0px 20px;
9
+ margin-top: 25px;
10
+ > img {
11
+ width: 100%;
12
+ max-height: 650px;
13
+ object-fit: cover;
14
+ }
15
+
16
+ @media (min-width: 576px) {
17
+ flex-direction: row;
18
+ padding: 0px 40px;
19
+ img {
20
+ width: 40%;
21
+ }
22
+ }
23
+
24
+ @media (min-width: 1200px) {
25
+ margin-right: 50px;
26
+ ${props => props.theme.rtl && css`
27
+ margin-left: 50px;
28
+ margin-right: 0px;
29
+ `}
30
+ }
31
+ `
32
+
33
+ export const InfoWrapper = styled.div`
34
+ flex: 1;
35
+ display: flex;
36
+ flex-direction: column;
37
+ justify-content: center;
38
+ padding: 20px 0px;
39
+ margin-left: 20px;
40
+ ${props => props.theme.rtl && css`
41
+ margin-right: 20px;
42
+ margin-left: 0px;
43
+ `}
44
+
45
+ > h2 {
46
+ font-weight: 700;
47
+ font-size: 32px;
48
+ line-height: 48px;
49
+ margin-top: 0px;
50
+ margin-bottom: 7px;
51
+ text-transform: capitalize;
52
+ }
53
+
54
+ > p {
55
+ font-weight: 400;
56
+ font-size: 16px;
57
+ line-height: 24px;
58
+ margin-top: 0px;
59
+ margin-bottom: 30px;
60
+ }
61
+
62
+ @media (min-width: 576px) {
63
+ margin-left: 45px;
64
+ ${props => props.theme.rtl && css`
65
+ margin-right: 45px;
66
+ margin-left: 0px;
67
+ `}
68
+ }
69
+
70
+ @media (min-width: 1440px) {
71
+ > h2 {
72
+ font-size: 36px;
73
+ }
74
+ > p {
75
+ font-size: 18px;
76
+ }
77
+ }
78
+ `
@@ -0,0 +1,52 @@
1
+ import React from 'react'
2
+ import { useLanguage } from 'ordering-components-admin-external'
3
+ import { useInfoShare } from '../../../contexts/InfoShareContext'
4
+ import { IconButton, Button } from '../../../styles'
5
+ import { List as MenuIcon } from 'react-bootstrap-icons'
6
+ import { useTheme } from 'styled-components'
7
+ import {
8
+ Container,
9
+ HeaderTitleContainer,
10
+ ContentWrapper,
11
+ ButtonWrapper
12
+ } from './styles'
13
+ import { BoxLayout } from '../BoxLayout'
14
+
15
+ export const CustomerApp = () => {
16
+ const [, t] = useLanguage()
17
+ const theme = useTheme()
18
+ const [{ isCollapse }, { handleMenuCollapse }] = useInfoShare()
19
+
20
+ return (
21
+ <Container>
22
+ <HeaderTitleContainer>
23
+ {isCollapse && (
24
+ <IconButton
25
+ color='black'
26
+ onClick={() => handleMenuCollapse(false)}
27
+ >
28
+ <MenuIcon />
29
+ </IconButton>
30
+ )}
31
+ <h1>{t('MY_PRODUCTS', 'My products')}</h1>
32
+ </HeaderTitleContainer>
33
+ <ContentWrapper>
34
+ <BoxLayout
35
+ title={t('CUSTOMER_APP', 'Customer app')}
36
+ photo={theme.images.myProducts.customerApp}
37
+ description={t('CUSTOMER_APP_DESC', 'Give your customers the chance to order from their mobile devices wherever they are, receive push notifications, offers, and much more.')}
38
+ >
39
+ <ButtonWrapper>
40
+ <Button
41
+ color='primary'
42
+ borderRadius='8px'
43
+ onClick={() => window.open('https://www.ordering.co/ordering-sales', '_blank')}
44
+ >
45
+ {t('REQUEST_APP_NOW', 'Request app now')}
46
+ </Button>
47
+ </ButtonWrapper>
48
+ </BoxLayout>
49
+ </ContentWrapper>
50
+ </Container>
51
+ )
52
+ }
@@ -0,0 +1,59 @@
1
+ import styled, { css } from 'styled-components'
2
+
3
+ export const Container = styled.div`
4
+ flex: 1;
5
+ padding: 25px 20px;
6
+ box-sizing: border-box;
7
+ transition: all 0.5s;
8
+ max-height: 100vh;
9
+ overflow: auto;
10
+ min-height: 100vh;
11
+ `
12
+
13
+ export const HeaderTitleContainer = styled.div`
14
+ display: flex;
15
+ align-items: center;
16
+
17
+ > h1 {
18
+ font-weight: 700;
19
+ font-size: 20px;
20
+ color: ${props => props.theme.colors.headingColor};
21
+ margin: 0px;
22
+ line-height: 32px;
23
+ }
24
+
25
+ > button {
26
+ ${props => props.theme?.rtl ? css`
27
+ margin-left: 8px;
28
+ margin-right: -8px;
29
+ ` : css`
30
+ margin-right: 8px;
31
+ margin-left: -8px;
32
+ `}
33
+
34
+ svg {
35
+ width: 25px;
36
+ height: 25px;
37
+ }
38
+ }
39
+ `
40
+
41
+ export const ContentWrapper = styled.div`
42
+ height: calc(100% - 32px);
43
+ display: flex;
44
+ align-items: center;
45
+ `
46
+
47
+ export const ButtonWrapper = styled.div`
48
+ button {
49
+ width: 100%;
50
+ height: 44px;
51
+ text-transform: capitalize;
52
+ }
53
+
54
+ @media(min-width: 576px) {
55
+ button {
56
+ width: 260px;
57
+ }
58
+ }
59
+ `
@@ -0,0 +1,83 @@
1
+ import React from 'react'
2
+ import { useLanguage } from 'ordering-components-admin-external'
3
+ import { useInfoShare } from '../../../contexts/InfoShareContext'
4
+ import { Button, IconButton } from '../../../styles'
5
+ import { List as MenuIcon } from 'react-bootstrap-icons'
6
+ import { useTheme } from 'styled-components'
7
+ import { BoxLayout } from '../BoxLayout'
8
+ import {
9
+ Container,
10
+ HeaderTitleContainer,
11
+ ContentWrapper,
12
+ FreeBtnWrapper,
13
+ BrandedBtnWrapper
14
+ } from './styles'
15
+
16
+ export const DriverApp = () => {
17
+ const [, t] = useLanguage()
18
+ const theme = useTheme()
19
+ const [{ isCollapse }, { handleMenuCollapse }] = useInfoShare()
20
+
21
+ const handleOpenURL = (url) => {
22
+ window.open(url, '_blank')
23
+ }
24
+
25
+ return (
26
+ <Container>
27
+ <HeaderTitleContainer>
28
+ {isCollapse && (
29
+ <IconButton
30
+ color='black'
31
+ onClick={() => handleMenuCollapse(false)}
32
+ >
33
+ <MenuIcon />
34
+ </IconButton>
35
+ )}
36
+ <h1>{t('MY_PRODUCTS', 'My products')}</h1>
37
+ </HeaderTitleContainer>
38
+ <ContentWrapper>
39
+ <h1>{t('DRIVER_APP', 'Driver app')}</h1>
40
+ <p>{t('DRIVER_APP_DESC', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.')}</p>
41
+ <BoxLayout
42
+ title={t('FREE_TO_USE', 'Free to use')}
43
+ description={t('FREE_TO_USE_DESC', 'This app can be used by your fleet with the ordering.co logo.')}
44
+ photo={theme.images.myProducts.driverApp}
45
+ >
46
+ <FreeBtnWrapper>
47
+ <Button
48
+ color='primary'
49
+ borderRadius='8px'
50
+ outline
51
+ onClick={() => handleOpenURL('https://apps.apple.com/us/app/driver-app-2-0/id1606257815')}
52
+ >
53
+ {t('DOWNLOAD_APPLE', 'Download apple')}
54
+ </Button>
55
+ <Button
56
+ color='primary'
57
+ borderRadius='8px'
58
+ outline
59
+ onClick={() => handleOpenURL('https://play.google.com/store/apps/details?id=com.ordering.deliveryv5')}
60
+ >
61
+ {t('DOWNLOAD_GOOGLE', 'Download google')}
62
+ </Button>
63
+ </FreeBtnWrapper>
64
+ </BoxLayout>
65
+ <BoxLayout
66
+ title={t('BRANDED_BY_YOU', 'Branded by you')}
67
+ description={t('BRANDED_BY_YOU_DESC', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Id mi quam aenean in faucibus ac integer libero. Eu egestas sit imperdiet at sit adipiscing ullamcorper sed sit.')}
68
+ photo={theme.images.myProducts.driverApp}
69
+ >
70
+ <BrandedBtnWrapper>
71
+ <Button
72
+ color='primary'
73
+ borderRadius='8px'
74
+ onClick={() => handleOpenURL('https://www.ordering.co/ordering-sales')}
75
+ >
76
+ {t('REQUEST_APP_NOW', 'Request app now')}
77
+ </Button>
78
+ </BrandedBtnWrapper>
79
+ </BoxLayout>
80
+ </ContentWrapper>
81
+ </Container>
82
+ )
83
+ }
@@ -0,0 +1,104 @@
1
+ import styled, { css } from 'styled-components'
2
+
3
+ export const Container = styled.div`
4
+ flex: 1;
5
+ padding: 25px 20px;
6
+ box-sizing: border-box;
7
+ transition: all 0.5s;
8
+ max-height: 100vh;
9
+ overflow: auto;
10
+ min-height: 100vh;
11
+ `
12
+
13
+ export const HeaderTitleContainer = styled.div`
14
+ display: flex;
15
+ align-items: center;
16
+
17
+ > h1 {
18
+ font-weight: 700;
19
+ font-size: 20px;
20
+ color: ${props => props.theme.colors.headingColor};
21
+ margin: 0px;
22
+ line-height: 32px;
23
+ }
24
+
25
+ > button {
26
+ ${props => props.theme?.rtl ? css`
27
+ margin-left: 8px;
28
+ margin-right: -8px;
29
+ ` : css`
30
+ margin-right: 8px;
31
+ margin-left: -8px;
32
+ `}
33
+
34
+ svg {
35
+ width: 25px;
36
+ height: 25px;
37
+ }
38
+ }
39
+ `
40
+
41
+ export const ContentWrapper = styled.div`
42
+ margin-top: 27px;
43
+
44
+ > h1 {
45
+ font-weight: 700;
46
+ font-size: 32px;
47
+ line-height: 48px;
48
+ margin-top: 0px;
49
+ margin-bottom: 7px;
50
+ }
51
+
52
+ > p {
53
+ margin: 0px;
54
+ font-weight: 400;
55
+ font-size: 16px;
56
+ line-height: 24px;
57
+ }
58
+ `
59
+
60
+ export const FreeBtnWrapper = styled.div`
61
+ display: flex;
62
+ flex-direction: column;
63
+ button {
64
+ width: 100%;
65
+ height: 44px;
66
+ text-transform: capitalize;
67
+ &:first-child {
68
+ margin-bottom: 15px;
69
+ }
70
+ }
71
+
72
+ @media (min-width: 769px) {
73
+ flex-direction: row;
74
+ button {
75
+ width: 180px;
76
+ &:first-child {
77
+ margin-right: 15px;
78
+ margin-bottom: 0px;
79
+ ${props => props.theme.rtl && css`
80
+ margin-right: 0px;
81
+ margin-left: 15px;
82
+ `}
83
+ }
84
+ }
85
+ }
86
+
87
+ @media (min-width: 1320px) {
88
+ button {
89
+ width: 260px;
90
+ }
91
+ }
92
+ `
93
+
94
+ export const BrandedBtnWrapper = styled.div`
95
+ button {
96
+ width: 100%;
97
+ height: 44px;
98
+ text-transform: capitalize;
99
+ }
100
+
101
+ @media (min-width: 576px) {
102
+ width: 260px;
103
+ }
104
+ `
@@ -0,0 +1,41 @@
1
+ import React from 'react'
2
+ import { useLanguage } from 'ordering-components-admin-external'
3
+ import { useInfoShare } from '../../../contexts/InfoShareContext'
4
+ import { IconButton } from '../../../styles'
5
+ import { List as MenuIcon } from 'react-bootstrap-icons'
6
+ import { useTheme } from 'styled-components'
7
+ import {
8
+ Container,
9
+ HeaderTitleContainer,
10
+ WebsiteWrapper,
11
+ InfoWrapper
12
+ } from './styles'
13
+
14
+ export const OrderingWebsite = () => {
15
+ const [, t] = useLanguage()
16
+ const [{ isCollapse }, { handleMenuCollapse }] = useInfoShare()
17
+ const theme = useTheme()
18
+
19
+ return (
20
+ <Container>
21
+ <HeaderTitleContainer>
22
+ {isCollapse && (
23
+ <IconButton
24
+ color='black'
25
+ onClick={() => handleMenuCollapse(false)}
26
+ >
27
+ <MenuIcon />
28
+ </IconButton>
29
+ )}
30
+ <h1>{t('MY_PRODUCTS', 'My products')}</h1>
31
+ </HeaderTitleContainer>
32
+ <WebsiteWrapper>
33
+ <InfoWrapper>
34
+ <h1>{t('ORDERING_WEBSITE', 'Ordering website')}</h1>
35
+ <p>{t('ORDERING_WEBSITE_DESC', 'This product is included in your project by default.')}</p>
36
+ </InfoWrapper>
37
+ <img src={theme.images.myProducts.orderingWebsite} alt='ordering-website' />
38
+ </WebsiteWrapper>
39
+ </Container>
40
+ )
41
+ }
@@ -0,0 +1,104 @@
1
+ import styled, { css } from 'styled-components'
2
+
3
+ export const Container = styled.div`
4
+ flex: 1;
5
+ padding: 25px 20px;
6
+ box-sizing: border-box;
7
+ transition: all 0.5s;
8
+ max-height: 100vh;
9
+ overflow: auto;
10
+ `
11
+
12
+ export const HeaderTitleContainer = styled.div`
13
+ display: flex;
14
+ align-items: center;
15
+
16
+ > h1 {
17
+ font-weight: 700;
18
+ font-size: 20px;
19
+ color: ${props => props.theme.colors.headingColor};
20
+ margin: 0px;
21
+ line-height: 32px;
22
+ }
23
+
24
+ > button {
25
+ ${props => props.theme?.rtl ? css`
26
+ margin-left: 8px;
27
+ margin-right: -8px;
28
+ ` : css`
29
+ margin-right: 8px;
30
+ margin-left: -8px;
31
+ `}
32
+
33
+ svg {
34
+ width: 25px;
35
+ height: 25px;
36
+ }
37
+ }
38
+ `
39
+
40
+ export const WebsiteWrapper = styled.div`
41
+ margin-top: 30px;
42
+ box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1);
43
+ border-radius: 7.6px;
44
+ padding: 20px;
45
+ display: flex;
46
+ flex-direction: column;
47
+
48
+ > img {
49
+ width: 100%;
50
+ margin-top: 20px;
51
+ max-height: 600px;
52
+ object-fit: cover;
53
+ }
54
+
55
+ @media (min-width: 769px) {
56
+ flex-direction: row;
57
+ padding: 40px;
58
+
59
+ img {
60
+ margin-top: 0px;
61
+ width: 42%;
62
+ }
63
+ }
64
+
65
+ @media (min-width: 1200px) {
66
+ img {
67
+ width: 35%;
68
+ }
69
+ margin-right: 50px;
70
+ ${props => props.theme.rtl && css`
71
+ margin-left: 50px;
72
+ margin-right: 0px;
73
+ `}
74
+ }
75
+ `
76
+
77
+ export const InfoWrapper = styled.div`
78
+ flex: 1;
79
+ display: flex;
80
+ flex-direction: column;
81
+ justify-content: center;
82
+ h1 {
83
+ font-weight: 700;
84
+ font-size: 32px;
85
+ line-height: 48px;
86
+ margin-top: 0px;
87
+ margin-bottom: 7px;
88
+ text-transform: capitalize;
89
+ }
90
+ p {
91
+ font-weight: 400;
92
+ font-size: 16px;
93
+ line-height: 24px;
94
+ margin: 0px;
95
+ }
96
+
97
+ @media (min-width: 769px) {
98
+ margin-right: 40px;
99
+ ${props => props.theme.rtl && css`
100
+ margin-left: 40px;
101
+ margin-right: 0px;
102
+ `}
103
+ }
104
+ `