ordering-ui-admin-external 1.8.5 → 1.10.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 (158) hide show
  1. package/_bundles/{ordering-ui-admin.66a745752c35fb204c80.js → ordering-ui-admin.e741ec718656ba6908ef.js} +2 -2
  2. package/_bundles/{ordering-ui-admin.66a745752c35fb204c80.js.LICENSE.txt → ordering-ui-admin.e741ec718656ba6908ef.js.LICENSE.txt} +0 -0
  3. package/_modules/components/BusinessIntelligence/BusinessReviewList/index.js +2 -1
  4. package/_modules/components/BusinessIntelligence/UsersReviewList/index.js +2 -1
  5. package/_modules/components/Delivery/DriversGroupDeliveryZoneInformation/index.js +23 -5
  6. package/_modules/components/Delivery/DriversGroupDetails/index.js +6 -9
  7. package/_modules/components/Delivery/UsersList/index.js +2 -1
  8. package/_modules/components/MyProducts/OrderingWebsite/index.js +50 -8
  9. package/_modules/components/OrderingProducts/OrderingProductsListing/index.js +2 -1
  10. package/_modules/components/Orders/OrderBill/index.js +17 -17
  11. package/_modules/components/Profile/ProfilePage/index.js +3 -1
  12. package/_modules/components/Profile/ProfilePage/styles.js +23 -6
  13. package/_modules/components/Settings/Deliverect/index.js +103 -0
  14. package/_modules/components/Settings/Deliverect/styles.js +115 -0
  15. package/_modules/components/Settings/DoordashConnect/index.js +1 -1
  16. package/_modules/components/Settings/IntegrationListing/index.js +41 -2
  17. package/_modules/components/Settings/IntegrationListing/styles.js +7 -4
  18. package/_modules/components/Settings/ItsaCheckmate/index.js +112 -0
  19. package/_modules/components/Settings/ItsaCheckmate/styles.js +118 -0
  20. package/_modules/components/Settings/PickerExpress/index.js +178 -0
  21. package/_modules/components/Settings/PickerExpress/styles.js +111 -0
  22. package/_modules/components/Settings/index.js +8 -1
  23. package/_modules/components/Shared/Modal/styles.js +1 -1
  24. package/_modules/components/SidebarMenu/index.js +14 -1
  25. package/_modules/components/SidebarMenu/styles.js +9 -3
  26. package/_modules/components/Stores/BusinessAdd/BusinessDetails/index.js +95 -0
  27. package/_modules/components/Stores/BusinessAdd/BusinessDetails/styles.js +43 -0
  28. package/_modules/components/Stores/BusinessAdd/DeliveryZone/index.js +233 -0
  29. package/_modules/components/Stores/BusinessAdd/DeliveryZone/styles.js +40 -0
  30. package/_modules/components/Stores/BusinessAdd/Images/index.js +181 -0
  31. package/_modules/components/Stores/BusinessAdd/Images/styles.js +42 -0
  32. package/_modules/components/Stores/BusinessAdd/OrderTypePriceLevel/index.js +53 -0
  33. package/_modules/components/Stores/BusinessAdd/OrderTypePriceLevel/styles.js +31 -0
  34. package/_modules/components/Stores/BusinessAdd/OtherDetails/index.js +43 -0
  35. package/_modules/components/Stores/BusinessAdd/OtherDetails/styles.js +25 -0
  36. package/_modules/components/Stores/BusinessAdd/PaymentMethods/index.js +48 -0
  37. package/_modules/components/Stores/BusinessAdd/PaymentMethods/styles.js +31 -0
  38. package/_modules/components/Stores/BusinessAdd/Photos/index.js +174 -0
  39. package/_modules/components/Stores/BusinessAdd/Photos/styles.js +46 -0
  40. package/_modules/components/Stores/BusinessAdd/ReceiveOrders/index.js +48 -0
  41. package/_modules/components/Stores/BusinessAdd/ReceiveOrders/styles.js +24 -0
  42. package/_modules/components/Stores/BusinessAdd/Schedule/index.js +31 -0
  43. package/_modules/components/Stores/BusinessAdd/Schedule/styles.js +14 -0
  44. package/_modules/components/Stores/BusinessAdd/index.js +170 -0
  45. package/_modules/components/Stores/BusinessAdd/styles.js +29 -0
  46. package/_modules/components/Stores/BusinessDeliveryDetails/styles.js +1 -1
  47. package/_modules/components/Stores/BusinessDeliveryPickupMore/index.js +4 -0
  48. package/_modules/components/Stores/BusinessDeliveryZoneInformation/index.js +1 -1
  49. package/_modules/components/Stores/BusinessPickupDetails/styles.js +1 -1
  50. package/_modules/components/Stores/BusinessProductAddForm/index.js +5 -5
  51. package/_modules/components/Stores/BusinessProductsCategoyInfo/index.js +1 -6
  52. package/_modules/components/Stores/BusinessProductsListing/index.js +38 -14
  53. package/_modules/components/Stores/BusinessesList/index.js +5 -3
  54. package/_modules/components/Stores/BusinessesListing/index.js +51 -26
  55. package/_modules/components/Stores/BusinessesListing/styles.js +22 -15
  56. package/_modules/components/Stores/BusinessesListingHeader/index.js +6 -5
  57. package/_modules/components/Stores/ProductStartGuide/index.js +69 -0
  58. package/_modules/components/Stores/ProductStartGuide/styles.js +28 -0
  59. package/_modules/components/Stores/ProductStep/index.js +92 -0
  60. package/_modules/components/Stores/ProductStep/styles.js +18 -0
  61. package/_modules/components/Stores/RestaurantSelectGuide/index.js +104 -0
  62. package/_modules/components/Stores/RestaurantSelectGuide/styles.js +44 -0
  63. package/_modules/components/Stores/index.js +36 -1
  64. package/_modules/components/Users/ProfessionalAddForm/index.js +16 -3
  65. package/_modules/components/Users/ProfessionalList/index.js +2 -1
  66. package/_modules/components/Users/ProfessionalListing/index.js +2 -0
  67. package/_modules/components/Users/ProfessionalSchedule/Schedule/index.js +36 -0
  68. package/_modules/components/Users/ProfessionalSchedule/index.js +10 -120
  69. package/_modules/components/Users/ProfessionalSchedule/styles.js +4 -16
  70. package/_modules/components/Users/UserFormDetails/index.js +1 -1
  71. package/_modules/components/Users/UsersList/index.js +5 -4
  72. package/_modules/components/Users/UsersListingHeader/index.js +5 -2
  73. package/_modules/components/Users/UsersListingHeader/styles.js +18 -3
  74. package/_modules/index.js +36 -0
  75. package/index-template.js +64 -2
  76. package/package.json +2 -2
  77. package/src/components/BusinessIntelligence/BusinessReviewList/index.js +1 -0
  78. package/src/components/BusinessIntelligence/UsersReviewList/index.js +1 -0
  79. package/src/components/Delivery/DriversGroupDeliveryZoneInformation/index.js +20 -0
  80. package/src/components/Delivery/DriversGroupDetails/index.js +7 -7
  81. package/src/components/Delivery/DriversGroupsDeliveryZoneDetails/index.js +1 -1
  82. package/src/components/Delivery/UsersList/index.js +1 -0
  83. package/src/components/MyProducts/OrderingWebsite/index.js +45 -3
  84. package/src/components/OrderingProducts/OrderingProductsListing/index.js +1 -0
  85. package/src/components/Orders/OrderBill/index.js +20 -22
  86. package/src/components/Profile/ProfilePage/index.js +16 -2
  87. package/src/components/Profile/ProfilePage/styles.js +67 -1
  88. package/src/components/Settings/Deliverect/index.js +149 -0
  89. package/src/components/Settings/Deliverect/styles.js +344 -0
  90. package/src/components/Settings/DoordashConnect/index.js +1 -1
  91. package/src/components/Settings/IntegrationListing/index.js +47 -13
  92. package/src/components/Settings/IntegrationListing/styles.js +7 -1
  93. package/src/components/Settings/ItsaCheckmate/index.js +170 -0
  94. package/src/components/Settings/ItsaCheckmate/styles.js +366 -0
  95. package/src/components/Settings/PickerExpress/index.js +222 -0
  96. package/src/components/Settings/PickerExpress/styles.js +330 -0
  97. package/src/components/Settings/index.js +3 -1
  98. package/src/components/Shared/Modal/styles.js +1 -1
  99. package/src/components/SidebarMenu/index.js +21 -3
  100. package/src/components/SidebarMenu/styles.js +26 -0
  101. package/src/components/Stores/BusinessAdd/BusinessDetails/index.js +106 -0
  102. package/src/components/Stores/BusinessAdd/BusinessDetails/styles.js +107 -0
  103. package/src/components/Stores/BusinessAdd/DeliveryZone/index.js +250 -0
  104. package/src/components/Stores/BusinessAdd/DeliveryZone/styles.js +101 -0
  105. package/src/components/Stores/BusinessAdd/Images/index.js +168 -0
  106. package/src/components/Stores/BusinessAdd/Images/styles.js +94 -0
  107. package/src/components/Stores/BusinessAdd/OrderTypePriceLevel/index.js +43 -0
  108. package/src/components/Stores/BusinessAdd/OrderTypePriceLevel/styles.js +70 -0
  109. package/src/components/Stores/BusinessAdd/OtherDetails/index.js +51 -0
  110. package/src/components/Stores/BusinessAdd/OtherDetails/styles.js +49 -0
  111. package/src/components/Stores/BusinessAdd/PaymentMethods/index.js +39 -0
  112. package/src/components/Stores/BusinessAdd/PaymentMethods/styles.js +46 -0
  113. package/src/components/Stores/BusinessAdd/Photos/index.js +156 -0
  114. package/src/components/Stores/BusinessAdd/Photos/styles.js +108 -0
  115. package/src/components/Stores/BusinessAdd/ReceiveOrders/index.js +46 -0
  116. package/src/components/Stores/BusinessAdd/ReceiveOrders/styles.js +69 -0
  117. package/src/components/Stores/BusinessAdd/Schedule/index.js +23 -0
  118. package/src/components/Stores/BusinessAdd/Schedule/styles.js +14 -0
  119. package/src/components/Stores/BusinessAdd/index.js +184 -0
  120. package/src/components/Stores/BusinessAdd/styles.js +85 -0
  121. package/src/components/Stores/BusinessDeliveryDetails/styles.js +1 -0
  122. package/src/components/Stores/BusinessDeliveryPickupMore/index.js +9 -1
  123. package/src/components/Stores/BusinessDeliveryZoneInformation/index.js +8 -10
  124. package/src/components/Stores/BusinessPickupDetails/styles.js +1 -0
  125. package/src/components/Stores/BusinessProductAddForm/index.js +13 -11
  126. package/src/components/Stores/BusinessProductsCategoyInfo/index.js +4 -7
  127. package/src/components/Stores/BusinessProductsListing/index.js +20 -0
  128. package/src/components/Stores/BusinessesList/index.js +4 -2
  129. package/src/components/Stores/BusinessesListing/index.js +101 -67
  130. package/src/components/Stores/BusinessesListing/styles.js +36 -0
  131. package/src/components/Stores/BusinessesListingHeader/index.js +58 -51
  132. package/src/components/Stores/ProductStartGuide/index.js +60 -0
  133. package/src/components/Stores/ProductStartGuide/styles.js +62 -0
  134. package/src/components/Stores/ProductStep/index.js +84 -0
  135. package/src/components/Stores/ProductStep/styles.js +29 -0
  136. package/src/components/Stores/RestaurantSelectGuide/index.js +119 -0
  137. package/src/components/Stores/RestaurantSelectGuide/styles.js +150 -0
  138. package/src/components/Stores/index.js +11 -1
  139. package/src/components/Users/ProfessionalAddForm/index.js +11 -1
  140. package/src/components/Users/ProfessionalList/index.js +1 -0
  141. package/src/components/Users/ProfessionalListing/index.js +2 -0
  142. package/src/components/Users/ProfessionalSchedule/Schedule/index.js +32 -0
  143. package/src/components/Users/ProfessionalSchedule/index.js +9 -49
  144. package/src/components/Users/ProfessionalSchedule/styles.js +0 -49
  145. package/src/components/Users/UserFormDetails/index.js +1 -1
  146. package/src/components/Users/UsersList/index.js +4 -2
  147. package/src/components/Users/UsersListingHeader/index.js +17 -2
  148. package/src/components/Users/UsersListingHeader/styles.js +59 -0
  149. package/src/index.js +14 -2
  150. package/template/app.js +4 -0
  151. package/template/assets/images/dummies/no-businesses.png +0 -0
  152. package/template/assets/images/import-menu.png +0 -0
  153. package/template/assets/images/imported-menu.png +0 -0
  154. package/template/assets/images/picker-express.png +0 -0
  155. package/template/components/ListenPageChanges/index.js +1 -0
  156. package/template/config.json +1 -1
  157. package/template/helmetdata.json +7 -0
  158. package/template/pages/BusinessAdd/index.js +11 -0
@@ -0,0 +1,366 @@
1
+ import styled, { css } from 'styled-components'
2
+
3
+ export const ItsaCheckmateContainer = styled.div`
4
+ padding: 26px 20px;
5
+ box-sizing: border-box;
6
+ width: 100%;
7
+ overflow-x: hidden;
8
+ position: relative;
9
+
10
+ @media (min-width: 768px) {
11
+ padding: 26px 40px;
12
+ }
13
+ `
14
+
15
+ export const Header = styled.div`
16
+ display: flex;
17
+ align-items: center;
18
+ margin-bottom: 30px;
19
+
20
+ ${props => props.theme?.rtl ? css`
21
+ margin-left: 35px;
22
+ ` : css`
23
+ margin-right: 35px;
24
+ `}
25
+
26
+ h1 {
27
+ font-size: 20px;
28
+ font-weight: 700;
29
+ margin: 0px;
30
+ text-transform: capitalize;
31
+ }
32
+
33
+ button {
34
+ line-height: 12px;
35
+ height: 16px;
36
+ font-size: 10px;
37
+ margin-left: 15px;
38
+ padding: 2px 8px;
39
+ border-radius: 50px;
40
+ ${props => props.theme.rtl && css`
41
+ margin-right: 15px;
42
+ margin-left: 0px;
43
+ `}
44
+ }
45
+ `
46
+
47
+ export const ApiKeysListTable = styled.table`
48
+ width: 100%;
49
+ margin-top: 25px;
50
+
51
+ thead {
52
+ border-bottom: 1px solid ${props => props.theme.colors.secundaryLight};
53
+ th {
54
+ padding: 10px 0;
55
+ &:last-child {
56
+ padding-left: 20px;
57
+ padding-right: 20px;
58
+ }
59
+ }
60
+ }
61
+ tr {
62
+ width: 100%;
63
+ th,
64
+ td {
65
+ font-size: 12px;
66
+ word-break: break-all;
67
+
68
+ &:last-child {
69
+ width: 100px;
70
+ > div {
71
+ padding-left: 20px;
72
+ padding-right: 20px;
73
+ }
74
+ }
75
+ }
76
+ }
77
+
78
+ tbody {
79
+ border-bottom: 1px solid ${props => props.theme.colors.borderColor};
80
+ td {
81
+ padding-top: 9px;
82
+ padding-bottom: 9px;
83
+
84
+ &:last-child {
85
+ > div {
86
+ display: flex;
87
+ justify-content: flex-end;
88
+ }
89
+ }
90
+ }
91
+ }
92
+ `
93
+
94
+ export const DropdownButtonWrapper = styled.div`
95
+ ${props => props?.theme?.rtl ? css`
96
+ border-right: 1px solid ${props => props.theme.colors.borderColor};
97
+ ` : css`
98
+ border-left: 1px solid ${props => props.theme.colors.borderColor};
99
+ `}
100
+ padding: 5px 20px;
101
+ button {
102
+ background: transparent !important;
103
+ border: none;
104
+ padding: 0px;
105
+ &:active,
106
+ &:focus {
107
+ border-color: unset !important;
108
+ box-shadow: none !important;
109
+ }
110
+ svg {
111
+ color: ${props => props.theme.colors.headingColor};
112
+ }
113
+
114
+ &:after {
115
+ display: none;
116
+ }
117
+ }
118
+
119
+ .show {
120
+ button {
121
+ background: ${props => props.theme.colors.secundary} !important;
122
+ border-color: unset !important;
123
+ box-shadow: none !important;
124
+ }
125
+ >div {
126
+ border: 1px solid ${props => props.theme.colors.borderColor};
127
+ box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.12);
128
+ }
129
+ }
130
+
131
+ > div {
132
+ > div {
133
+ border-radius: 8px;
134
+ .dropdown-item {
135
+ font-size: 12px;
136
+ color: ${props => props.theme.colors.headingColor};
137
+ }
138
+ .dropdown-item:last-child {
139
+ color: #E63757;
140
+ }
141
+ }
142
+ }
143
+ `
144
+ export const AddNewButton = styled.div`
145
+ cursor: pointer;
146
+ font-size: 12px;
147
+ color: ${props => props.theme.colors.lightGray};
148
+ margin: 20px 0;
149
+ width: fit-content;
150
+
151
+ &:hover {
152
+ color: ${props => props.theme.colors.primary};
153
+ }
154
+ `
155
+
156
+ export const AllSetting = styled.div`
157
+ user-select: none;
158
+ cursor: pointer;
159
+ margin-top: 36px;
160
+ cursor: pointer;
161
+ span {
162
+ font-weight: 600;
163
+ font-size: 14px;
164
+ color: ${props => props.theme.colors.primary};
165
+ }
166
+ svg {
167
+ color: ${props => props.theme.colors.primary};
168
+ margin-left: 5px;
169
+ transition: 0.2s linear;
170
+ ${props => props.theme.rtl && css`
171
+ margin-right: 5px;
172
+ margin-left: 0px;
173
+ `}
174
+ }
175
+ &:hover {
176
+ svg {
177
+ transform: translateX(3px);
178
+ }
179
+ }
180
+ `
181
+
182
+ export const Description = styled.p`
183
+ margin-top: 40px;
184
+ font-size: 14px;
185
+ margin-bottom: 0px;
186
+ text-align: justify;
187
+
188
+ div.sub-header {
189
+ font-size: 14px;
190
+ margin-bottom: 10px;
191
+ }
192
+ div.menu-item {
193
+ display: flex;
194
+ align-items: center;
195
+ svg {
196
+ ${props => props.theme?.rtl ? css`
197
+ margin-left: 8px;
198
+ ` : css`
199
+ margin-right: 8px;
200
+ `}
201
+ }
202
+ > p {
203
+ font-weight: 400;
204
+ font-size: 14px;
205
+ line-height: 24px;
206
+ margin: 0px;
207
+ }
208
+ }
209
+
210
+ @media (min-width: 768px) {
211
+ text-align: initial;
212
+ }
213
+ `
214
+
215
+ export const CategoryExtraContent = styled.div`
216
+ position: relative;
217
+ padding: 26px 26px 60px 26px;
218
+ box-sizing: border-box;
219
+ width: 100%;
220
+ overflow: auto;
221
+
222
+ ${props => props.theme?.rtl ? css`
223
+ border-right: 1px solid #E9ECEF;
224
+ ` : css`
225
+ border-left: 1px solid #E9ECEF;
226
+ `}
227
+
228
+ > button {
229
+ z-index: 100;
230
+ position: absolute;
231
+ top: 25px;
232
+ ${props => props.theme?.rtl ? css`
233
+ left: 20px;
234
+ ` : css`
235
+ right: 20px;
236
+ `}
237
+ }
238
+ `
239
+
240
+ export const Container = styled.div`
241
+ display: flex;
242
+ width: 0;
243
+ position: fixed;
244
+ box-shadow: -4px 0px 7px #ccc;
245
+
246
+ ${({ isDriverOrders }) => isDriverOrders && css`
247
+ position: absolute;
248
+ box-shadow: none;
249
+
250
+ ${props => props.theme?.rtl ? css`
251
+ border-right: 1px solid #CCC;
252
+ ` : css`
253
+ border-left: 1px solid #CCC;
254
+ `}
255
+ `}
256
+ background: ${props => props.theme.colors?.backgroundPage || '#FFF'};
257
+ height: calc(var(--vh, 1vh) * 100);
258
+ top: 0px;
259
+ z-index: 1001;
260
+ overflow-x: hidden;
261
+ transition: 0.3s;
262
+
263
+ ${props => props.theme?.rtl ? css`
264
+ left: 0px;
265
+ ` : css`
266
+ right: 0px;
267
+ `}
268
+ @media print {
269
+ box-shadow: none;
270
+ }
271
+ `
272
+
273
+ export const DescriptionHeader = styled.div`
274
+ display: flex;
275
+ justify-content: flex-end;
276
+ align-items: center;
277
+ `
278
+
279
+ export const HeaderIcons = styled.div`
280
+ display: flex;
281
+ position: absolute;
282
+ top: 25px;
283
+ right: 20px;
284
+
285
+ > button:first-child {
286
+ ${props => props.theme?.rtl ? css`
287
+ margin-left: 8px;
288
+ ` : css`
289
+ margin-right: 8px;
290
+ `}
291
+ }
292
+ `
293
+
294
+ export const SettingListConatiner = styled.div`
295
+ width: 100%;
296
+ margin: 20px 0;
297
+ border-bottom: 1px solid #E9ECEF;
298
+ `
299
+
300
+ export const Tab = styled.div`
301
+ user-select: none;
302
+ padding: 10px 0px;
303
+ cursor: pointer;
304
+ color: ${props => props.theme.colors?.headingColor};
305
+ font-size: 14px;
306
+ white-space: nowrap;
307
+ ${props => props.theme?.rtl ? css`
308
+ margin-left: 30px;
309
+ ` : css`
310
+ margin-right: 30px;
311
+ `}
312
+
313
+ ${({ active }) => active && css`
314
+ border-bottom: 2px solid;
315
+ font-weight: 500;
316
+ `}
317
+
318
+ ${({ active }) => !active && css`
319
+ color: #909BA9;
320
+ `}
321
+ `
322
+
323
+ export const GetStarted = styled.div`
324
+ h2 {
325
+ font-weight: 500;
326
+ font-size: 14px;
327
+ line-height: 24px;
328
+ margin-top: 0px;
329
+ margin-bottom: 10px;
330
+ }
331
+ p {
332
+ font-weight: 400;
333
+ font-size: 14px;
334
+ line-height: 24px;
335
+ margin-top: 0px;
336
+ margin-bottom: 8px;
337
+ color: ${props => props.theme.colors.lightGray};
338
+ }
339
+ button {
340
+ border-radius: 8px;
341
+ height: 44px;
342
+ }
343
+ `
344
+
345
+ export const YoutubeVideoWrapper = styled.div`
346
+ margin-top: 50px;
347
+ padding-bottom: 30px;
348
+ `
349
+
350
+ export const YoutubeVideoInner = styled.div`
351
+ position: relative;
352
+ width: 100%;
353
+ padding-bottom: 56.25%;
354
+ box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1);
355
+ border-radius: 7.6px;
356
+ background-color: ${props => props.theme.colors.secundaryDarkContrast};
357
+
358
+ iframe {
359
+ position: absolute;
360
+ top: 0;
361
+ left: 0;
362
+ width: 100%;
363
+ height: 100%;
364
+ border: 0;
365
+ }
366
+ `
@@ -0,0 +1,222 @@
1
+ import React, { useState, useEffect } from 'react'
2
+ import { useLanguage, ApiKeysList as ApiKeysListController } from 'ordering-components-admin-external'
3
+ import { Button, IconButton } from '../../../styles'
4
+ import { Alert, Confirm, DragScroll, Modal } from '../../Shared'
5
+ import BsArrowRight from '@meronex/icons/bs/BsArrowRight'
6
+ import { XLg } from 'react-bootstrap-icons'
7
+ import { useWindowSize } from '../../../hooks/useWindowSize'
8
+
9
+ import {
10
+ Header,
11
+ AllSetting,
12
+ Description,
13
+ CategoryExtraContent,
14
+ Container,
15
+ DescriptionHeader,
16
+ HeaderIcons,
17
+ PickerExpressContainer,
18
+ SettingListConatiner,
19
+ Tab,
20
+ Paragraph,
21
+ PurchaseWrapper
22
+ } from './styles'
23
+
24
+ const PickerExpressUI = (props) => {
25
+ const {
26
+ actionState,
27
+ onClose
28
+ } = props
29
+
30
+ const [, t] = useLanguage()
31
+ const { width } = useWindowSize()
32
+
33
+ const [alertState, setAlertState] = useState({ open: false, content: [] })
34
+ const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
35
+ const [settingsOpen, setSettingsOpen] = useState(false)
36
+
37
+ const toggleMainContent = () => {
38
+ if (width <= 500) {
39
+ document.getElementById('catDescription').style.width = '100vw'
40
+ } else {
41
+ if ((settingsOpen) && width >= 1000) {
42
+ document.getElementById('catDescription').style.width = '1000px'
43
+ } else {
44
+ document.getElementById('catDescription').style.width = '500px'
45
+ }
46
+ }
47
+ }
48
+
49
+ const handleGoToLink = (link) => {
50
+ window.open(link, '_blank')
51
+ }
52
+
53
+ useEffect(() => {
54
+ if (!actionState?.error) return
55
+ setAlertState({
56
+ open: true,
57
+ content: actionState?.error
58
+ })
59
+ }, [actionState?.error])
60
+
61
+ useEffect(() => {
62
+ if (width < 1000) return
63
+ if (settingsOpen) {
64
+ document.getElementById('catDescription').style.width = '1000px'
65
+ } else {
66
+ toggleMainContent()
67
+ }
68
+ }, [settingsOpen])
69
+
70
+ useEffect(() => {
71
+ toggleMainContent()
72
+ }, [width])
73
+
74
+ const LalaMoveConnectDescription = () => {
75
+ return (
76
+ <CategoryExtraContent>
77
+ <IconButton
78
+ color='black'
79
+ onClick={() => setSettingsOpen(false)}
80
+ >
81
+ <XLg />
82
+ </IconButton>
83
+ <div>
84
+ <Header>
85
+ <h1>{t('MORE_INFO', 'More Info')}</h1>
86
+ </Header>
87
+ <SettingListConatiner>
88
+ <DragScroll>
89
+ <Tab
90
+ active
91
+ >
92
+ {t('GENERAL', 'General')}
93
+ </Tab>
94
+ </DragScroll>
95
+ </SettingListConatiner>
96
+ <Paragraph>
97
+ <h2>{t('REQUIREMENTS', 'Requirements')}</h2>
98
+ <p>
99
+ {t('PICKER_EXPRESS_CONNECT_REQUIREMENTS',
100
+ 'For this integration to work you need: \n' +
101
+ '1.- Picker Express account. \n' +
102
+ '2.- The advanced logistics module must be active. \n' +
103
+ '3.- Package of Ordering.'
104
+ )}
105
+ </p>
106
+ </Paragraph>
107
+ <Paragraph>
108
+ <h2>{t('ARTICLE', 'Article')}</h2>
109
+ <p>
110
+ {t('PICKER_EXPRESS_CONNECT_ARTICLE', 'To connect with Picker Express, you’ll have to use plugins, put in your Picker Express credentials, connect your Picker Express account, and create a driver company inside this dashboard; follow the next article step by step and get this connected in less than 5 minutes.')}
111
+ </p>
112
+ <a onClick={() => handleGoToLink(t('PICKER_EXPRESS_CONNECT_ARTICLE_LINK', 'https://support.ordering.co/hc/en-us/articles/10673894748941'))}>
113
+ {t('VIEW_ARTICLE', 'View Article')}
114
+ </a>
115
+ </Paragraph>
116
+ <Paragraph>
117
+ <h2>{t('SUPPORT', 'Support')}</h2>
118
+ <p>
119
+ {t('PICKER_EXPRESS_CONNECT_SUPPORT', 'Are you having trouble connecting this?')}
120
+ </p>
121
+ <p>
122
+ <a onClick={() => handleGoToLink(t('PICKER_EXPRESS_CONNECT_SUPPORT_LINK', 'https://www.ordering.co/contact-ordering'))}>{t('CONTACT_US', 'Contact us')}</a>; <span>{t('WE_ARE_HAPPY_TO_HELP', 'we are happy to help.')}</span>
123
+ </p>
124
+ </Paragraph>
125
+ <Paragraph>
126
+ <h2>{t('PRICE_INSTALATION', 'Price and installation time.')}</h2>
127
+ <p>
128
+ <span className='bold'>{t('PICKER_EXPRESS_CONNECT_PRICE', '$99 monthly')}</span> | {t('PICKER_EXPRESS_CONNECT_INSTALLATION', 'less than 24 hrs to get it installed in your project.')}
129
+ </p>
130
+ </Paragraph>
131
+ <PurchaseWrapper>
132
+ <Button
133
+ outline
134
+ color='primary'
135
+ onClick={() => handleGoToLink(t('PURCHASE_INTEGRATION_LINK', 'https://www.ordering.co/ordering-sales'))}
136
+ >
137
+ {t('PURCHASE_INTEGRATION', 'Purchase Integration')}
138
+ </Button>
139
+ </PurchaseWrapper>
140
+ </div>
141
+ </CategoryExtraContent>
142
+ )
143
+ }
144
+
145
+ return (
146
+ <Container
147
+ id='catDescription'
148
+ >
149
+ <PickerExpressContainer>
150
+ <DescriptionHeader>
151
+ <HeaderIcons>
152
+ <IconButton
153
+ color='black'
154
+ onClick={onClose}
155
+ >
156
+ <XLg />
157
+ </IconButton>
158
+ </HeaderIcons>
159
+ </DescriptionHeader>
160
+ <Header>
161
+ <h1>{t('CONNECT_WITH_PICKER_EXPRESS', 'Connect with Picker Express')}</h1>
162
+ <Button color='lightPrimary'>{t('NEW', 'New')}</Button>
163
+ </Header>
164
+ <Description>
165
+ {t('CONNECT_WITH_PICKER_EXPRESS_DESCRIPTION', 'If you have already worked with Pickerexpress or are running your business with Pickerexpress and Ordering simultaneously, this integration will help you connect both platforms and assign orders through them, making your job easy and automated.')}
166
+ </Description>
167
+ <AllSetting onClick={() => setSettingsOpen(true)}>
168
+ <span>{t('SETTINGS', 'All settings')}</span>
169
+ <BsArrowRight />
170
+ </AllSetting>
171
+ </PickerExpressContainer>
172
+ {settingsOpen && (
173
+ <>
174
+ {width >= 1000 ? (
175
+ <LalaMoveConnectDescription />
176
+ ) : (
177
+ <>
178
+ <Modal
179
+ width='70%'
180
+ height='90vh'
181
+ open
182
+ padding='0px'
183
+ onClose={() => setSettingsOpen(false)}
184
+ hideCloseDefault
185
+ >
186
+ <LalaMoveConnectDescription />
187
+ </Modal>
188
+ </>
189
+ )}
190
+ </>
191
+ )}
192
+ <Alert
193
+ title={t('WEB_APPNAME', 'Ordering')}
194
+ content={alertState.content}
195
+ acceptText={t('ACCEPT', 'Accept')}
196
+ open={alertState.open}
197
+ onClose={() => setAlertState({ open: false, content: [] })}
198
+ onAccept={() => setAlertState({ open: false, content: [] })}
199
+ closeOnBackdrop={false}
200
+ />
201
+ <Confirm
202
+ title={t('WEB_APPNAME', 'Ordering')}
203
+ content={confirm.content}
204
+ acceptText={t('ACCEPT', 'Accept')}
205
+ open={confirm.open}
206
+ onClose={() => setConfirm({ ...confirm, open: false })}
207
+ onCancel={() => setConfirm({ ...confirm, open: false })}
208
+ onAccept={confirm.handleOnAccept}
209
+ closeOnBackdrop={false}
210
+ />
211
+ </Container>
212
+ )
213
+ }
214
+
215
+ export const PickerExpress = (props) => {
216
+ const apiKeysProps = {
217
+ ...props,
218
+ UIComponent: PickerExpressUI
219
+ }
220
+
221
+ return <ApiKeysListController {...apiKeysProps} />
222
+ }