ordering-ui-admin-external 1.24.2 → 1.25.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 (228) hide show
  1. package/_bundles/main.css +12158 -12158
  2. package/_bundles/{ordering-ui-admin.0c354f3e7da49f56465b.js → ordering-ui-admin.f2522b983a000252b407.js} +2 -2
  3. package/_modules/components/CartRecovery/RecoveryActionAdd/index.js +16 -3
  4. package/_modules/components/CartRecovery/RecoveryActionAdd/styles.js +65 -0
  5. package/_modules/components/CartRecovery/RecoveryActionList/index.js +1 -1
  6. package/_modules/components/CartRecovery/RecoveryActionList/styles.js +3 -7
  7. package/_modules/components/CartRecovery/RecoveryActionListing/index.js +21 -2
  8. package/_modules/components/CartRecovery/RecoveryActionListing/styles.js +1 -1
  9. package/_modules/components/CartRecovery/RecoveryNotificationList/index.js +6 -2
  10. package/_modules/components/CartRecovery/RecoveryNotificationList/styles.js +3 -7
  11. package/_modules/components/CartRecovery/SingleRecoveryNotification/index.js +67 -21
  12. package/_modules/components/CartRecovery/SingleRecoveryNotification/styles.js +1 -1
  13. package/_modules/components/CartRecovery/index.js +8 -1
  14. package/_modules/components/Delivery/DriversCompaniesList/index.js +1 -1
  15. package/_modules/components/Delivery/DriversCompaniesList/styles.js +3 -7
  16. package/_modules/components/Delivery/DriversGroupsList/index.js +1 -1
  17. package/_modules/components/Delivery/DriversGroupsList/styles.js +3 -10
  18. package/_modules/components/Delivery/UsersList/index.js +1 -1
  19. package/_modules/components/Delivery/UsersList/styles.js +8 -15
  20. package/_modules/components/Marketing/CampaignList/index.js +1 -1
  21. package/_modules/components/Marketing/CampaignList/styles.js +3 -7
  22. package/_modules/components/Marketing/EnterprisePromotionDetails/index.js +1 -0
  23. package/_modules/components/Marketing/EnterprisePromotionList/index.js +1 -1
  24. package/_modules/components/Marketing/EnterprisePromotionList/styles.js +4 -8
  25. package/_modules/components/Marketing/EnterprisePromotionListing/index.js +9 -1
  26. package/_modules/components/Marketing/EnterprisePromotionRules/index.js +7 -2
  27. package/_modules/components/Messages/MessagesListing/index.js +8 -2
  28. package/_modules/components/MyProducts/ContentForm/index.js +0 -1
  29. package/_modules/components/OrderingProducts/OrderingProductsListing/index.js +1 -1
  30. package/_modules/components/OrderingProducts/OrderingProductsListing/styles.js +7 -11
  31. package/_modules/components/Orders/DeliveriesManager/index.js +1 -0
  32. package/_modules/components/Orders/DriversList/index.js +10 -9
  33. package/_modules/components/Orders/DriversList/styles.js +9 -16
  34. package/_modules/components/Orders/Logistics/index.js +15 -7
  35. package/_modules/components/Orders/Logistics/styles.js +1 -1
  36. package/_modules/components/Orders/OrderDetails/index.js +15 -13
  37. package/_modules/components/Orders/OrderDetailsHeader/index.js +7 -12
  38. package/_modules/components/Orders/OrderNotification/index.js +33 -1
  39. package/_modules/components/Orders/OrdersCards/index.js +11 -10
  40. package/_modules/components/Orders/OrdersCards/styles.js +1 -1
  41. package/_modules/components/Orders/OrdersTable/index.js +10 -9
  42. package/_modules/components/Settings/Cms/index.js +1 -1
  43. package/_modules/components/Settings/Cms/styles.js +3 -7
  44. package/_modules/components/Settings/CountriesList/index.js +1 -1
  45. package/_modules/components/Settings/CountriesList/styles.js +3 -7
  46. package/_modules/components/Settings/DropdownOptionList/index.js +1 -1
  47. package/_modules/components/Settings/DropdownOptionList/styles.js +3 -7
  48. package/_modules/components/Settings/LanguageTransTable/index.js +7 -6
  49. package/_modules/components/Settings/LanguageTransTable/styles.js +3 -7
  50. package/_modules/components/Settings/PlaceListing/index.js +1 -1
  51. package/_modules/components/Settings/PlaceListing/styles.js +3 -7
  52. package/_modules/components/Settings/SettingsList/index.js +1 -1
  53. package/_modules/components/Shared/HtmlEditor/InsertImage/index.js +202 -0
  54. package/_modules/components/Shared/HtmlEditor/InsertImage/styles.js +36 -0
  55. package/_modules/components/Shared/HtmlEditor/InsertLink/index.js +75 -0
  56. package/_modules/components/Shared/HtmlEditor/InsertLink/styles.js +16 -0
  57. package/_modules/components/Shared/HtmlEditor/InsertVideo/index.js +56 -0
  58. package/_modules/components/Shared/HtmlEditor/InsertVideo/styles.js +14 -0
  59. package/_modules/components/Shared/HtmlEditor/index.js +181 -0
  60. package/_modules/components/Shared/HtmlEditor/styles.js +18 -0
  61. package/_modules/components/Shared/index.js +7 -0
  62. package/_modules/components/Stores/BusinessBrandListing/index.js +1 -1
  63. package/_modules/components/Stores/BusinessBrandListing/styles.js +3 -6
  64. package/_modules/components/Stores/BusinessDeliveryPickupMore/styles.js +1 -1
  65. package/_modules/components/Stores/BusinessDeliveryZoneList/index.js +2 -2
  66. package/_modules/components/Stores/BusinessDeliveryZoneList/styles.js +4 -8
  67. package/_modules/components/Stores/BusinessDetail/styles.js +2 -2
  68. package/_modules/components/Stores/BusinessDetails/index.js +24 -25
  69. package/_modules/components/Stores/BusinessDeviceListing/index.js +1 -1
  70. package/_modules/components/Stores/BusinessDeviceListing/styles.js +1 -4
  71. package/_modules/components/Stores/BusinessMenu/index.js +2 -2
  72. package/_modules/components/Stores/BusinessMenu/styles.js +3 -5
  73. package/_modules/components/Stores/BusinessPlaceGroup/index.js +2 -2
  74. package/_modules/components/Stores/BusinessPlaceGroup/styles.js +3 -7
  75. package/_modules/components/Stores/BusinessPlaceGroupList/index.js +2 -2
  76. package/_modules/components/Stores/BusinessPlaceGroupList/styles.js +3 -7
  77. package/_modules/components/Stores/BusinessProductList/index.js +7 -6
  78. package/_modules/components/Stores/BusinessProductList/styles.js +3 -5
  79. package/_modules/components/Stores/BusinessProductsCategories/index.js +6 -5
  80. package/_modules/components/Stores/BusinessProductsCategories/styles.js +3 -6
  81. package/_modules/components/Stores/BusinessProductsListing/index.js +9 -6
  82. package/_modules/components/Stores/BusinessPromotionList/index.js +2 -2
  83. package/_modules/components/Stores/BusinessPromotionList/styles.js +3 -5
  84. package/_modules/components/Stores/BusinessSummary/index.js +7 -12
  85. package/_modules/components/Stores/BusinessesList/index.js +7 -4
  86. package/_modules/components/Stores/BusinessesList/styles.js +12 -16
  87. package/_modules/components/Stores/BusinessesListing/index.js +4 -2
  88. package/_modules/components/Stores/ImportersButton/index.js +2 -0
  89. package/_modules/components/Stores/ImportersList/index.js +1 -1
  90. package/_modules/components/Stores/ImportersList/styles.js +4 -9
  91. package/_modules/components/Stores/ProductDetails/index.js +19 -20
  92. package/_modules/components/Stores/ProductExtraOptionDetails/index.js +1 -1
  93. package/_modules/components/Stores/ProductExtraOptionDetails/styles.js +1 -5
  94. package/_modules/components/Stores/ProductExtras/index.js +2 -2
  95. package/_modules/components/Stores/ProductExtras/styles.js +3 -7
  96. package/_modules/components/Stores/ProductIngredient/index.js +2 -2
  97. package/_modules/components/Stores/ProductIngredient/styles.js +3 -7
  98. package/_modules/components/Stores/ProductStep/index.js +13 -7
  99. package/_modules/components/Stores/ProductSummary/index.js +2 -8
  100. package/_modules/components/Stores/ProductTagsList/index.js +2 -2
  101. package/_modules/components/Stores/ProductTagsList/styles.js +1 -5
  102. package/_modules/components/Stores/RestaurantSelectGuide/index.js +18 -9
  103. package/_modules/components/Stores/SeoOptions/index.js +25 -10
  104. package/_modules/components/Stores/SingleBusiness/index.js +18 -11
  105. package/_modules/components/Users/CustomerDetails/index.js +6 -7
  106. package/_modules/components/Users/CustomersListing/index.js +10 -4
  107. package/_modules/components/Users/ProfessionalList/index.js +1 -1
  108. package/_modules/components/Users/ProfessionalList/styles.js +8 -12
  109. package/_modules/components/Users/UsersList/index.js +1 -1
  110. package/_modules/components/Users/UsersList/styles.js +11 -15
  111. package/_modules/index.js +6 -0
  112. package/_modules/styles/Buttons/index.js +11 -4
  113. package/_modules/styles/index.js +6 -0
  114. package/index-template.js +1 -1
  115. package/package.json +2 -2
  116. package/src/components/CartRecovery/RecoveryActionAdd/index.js +13 -3
  117. package/src/components/CartRecovery/RecoveryActionAdd/styles.js +179 -0
  118. package/src/components/CartRecovery/RecoveryActionList/index.js +4 -5
  119. package/src/components/CartRecovery/RecoveryActionList/styles.js +0 -6
  120. package/src/components/CartRecovery/RecoveryActionListing/index.js +25 -6
  121. package/src/components/CartRecovery/RecoveryActionListing/styles.js +2 -1
  122. package/src/components/CartRecovery/RecoveryNotificationList/index.js +7 -3
  123. package/src/components/CartRecovery/RecoveryNotificationList/styles.js +5 -13
  124. package/src/components/CartRecovery/SingleRecoveryNotification/index.js +91 -42
  125. package/src/components/CartRecovery/SingleRecoveryNotification/styles.js +2 -2
  126. package/src/components/CartRecovery/index.js +3 -1
  127. package/src/components/Delivery/DriversCompaniesList/index.js +3 -4
  128. package/src/components/Delivery/DriversCompaniesList/styles.js +0 -6
  129. package/src/components/Delivery/DriversGroupsList/index.js +3 -4
  130. package/src/components/Delivery/DriversGroupsList/styles.js +0 -12
  131. package/src/components/Delivery/UsersList/index.js +3 -4
  132. package/src/components/Delivery/UsersList/styles.js +0 -12
  133. package/src/components/Marketing/CampaignList/index.js +3 -4
  134. package/src/components/Marketing/CampaignList/styles.js +0 -6
  135. package/src/components/Marketing/EnterprisePromotionDetails/index.js +1 -0
  136. package/src/components/Marketing/EnterprisePromotionList/index.js +3 -4
  137. package/src/components/Marketing/EnterprisePromotionList/styles.js +0 -7
  138. package/src/components/Marketing/EnterprisePromotionListing/index.js +6 -1
  139. package/src/components/Marketing/EnterprisePromotionRules/index.js +7 -2
  140. package/src/components/Messages/MessagesListing/index.js +3 -0
  141. package/src/components/MyProducts/ContentForm/index.js +0 -1
  142. package/src/components/OrderingProducts/OrderingProductsListing/index.js +3 -4
  143. package/src/components/OrderingProducts/OrderingProductsListing/styles.js +0 -7
  144. package/src/components/Orders/DeliveriesManager/index.js +1 -0
  145. package/src/components/Orders/DriversList/index.js +4 -4
  146. package/src/components/Orders/DriversList/styles.js +0 -10
  147. package/src/components/Orders/Logistics/index.js +10 -1
  148. package/src/components/Orders/Logistics/styles.js +6 -0
  149. package/src/components/Orders/OrderDetails/index.js +11 -13
  150. package/src/components/Orders/OrderDetailsHeader/index.js +40 -43
  151. package/src/components/Orders/OrderNotification/index.js +19 -1
  152. package/src/components/Orders/OrdersCards/index.js +7 -7
  153. package/src/components/Orders/OrdersCards/styles.js +3 -1
  154. package/src/components/Orders/OrdersTable/index.js +8 -8
  155. package/src/components/Settings/Cms/index.js +4 -5
  156. package/src/components/Settings/Cms/styles.js +0 -6
  157. package/src/components/Settings/CountriesList/index.js +4 -5
  158. package/src/components/Settings/CountriesList/styles.js +0 -6
  159. package/src/components/Settings/DropdownOptionList/index.js +4 -5
  160. package/src/components/Settings/DropdownOptionList/styles.js +0 -6
  161. package/src/components/Settings/LanguageTransTable/index.js +4 -4
  162. package/src/components/Settings/LanguageTransTable/styles.js +0 -6
  163. package/src/components/Settings/PlaceListing/index.js +4 -5
  164. package/src/components/Settings/PlaceListing/styles.js +0 -6
  165. package/src/components/Settings/SettingsList/index.js +88 -88
  166. package/src/components/Shared/HtmlEditor/InsertImage/index.js +172 -0
  167. package/src/components/Shared/HtmlEditor/InsertImage/styles.js +136 -0
  168. package/src/components/Shared/HtmlEditor/InsertLink/index.js +73 -0
  169. package/src/components/Shared/HtmlEditor/InsertLink/styles.js +34 -0
  170. package/src/components/Shared/HtmlEditor/InsertVideo/index.js +51 -0
  171. package/src/components/Shared/HtmlEditor/InsertVideo/styles.js +23 -0
  172. package/src/components/Shared/HtmlEditor/index.js +172 -0
  173. package/src/components/Shared/HtmlEditor/styles.js +30 -0
  174. package/src/components/Shared/index.js +3 -1
  175. package/src/components/Stores/BusinessBrandListing/index.js +2 -2
  176. package/src/components/Stores/BusinessBrandListing/styles.js +0 -7
  177. package/src/components/Stores/BusinessDeliveryPickupMore/styles.js +0 -4
  178. package/src/components/Stores/BusinessDeliveryZoneList/index.js +9 -7
  179. package/src/components/Stores/BusinessDeliveryZoneList/styles.js +1 -11
  180. package/src/components/Stores/BusinessDetail/styles.js +1 -4
  181. package/src/components/Stores/BusinessDetails/index.js +12 -17
  182. package/src/components/Stores/BusinessDeviceListing/index.js +2 -2
  183. package/src/components/Stores/BusinessDeviceListing/styles.js +0 -7
  184. package/src/components/Stores/BusinessMenu/index.js +9 -7
  185. package/src/components/Stores/BusinessMenu/styles.js +1 -6
  186. package/src/components/Stores/BusinessPlaceGroup/index.js +7 -3
  187. package/src/components/Stores/BusinessPlaceGroup/styles.js +1 -12
  188. package/src/components/Stores/BusinessPlaceGroupList/index.js +5 -3
  189. package/src/components/Stores/BusinessPlaceGroupList/styles.js +1 -12
  190. package/src/components/Stores/BusinessProductList/index.js +9 -6
  191. package/src/components/Stores/BusinessProductList/styles.js +1 -6
  192. package/src/components/Stores/BusinessProductsCategories/index.js +10 -7
  193. package/src/components/Stores/BusinessProductsCategories/styles.js +1 -6
  194. package/src/components/Stores/BusinessProductsListing/index.js +5 -2
  195. package/src/components/Stores/BusinessPromotionList/index.js +7 -5
  196. package/src/components/Stores/BusinessPromotionList/styles.js +1 -5
  197. package/src/components/Stores/BusinessSummary/index.js +4 -7
  198. package/src/components/Stores/BusinessesList/index.js +7 -5
  199. package/src/components/Stores/BusinessesList/styles.js +0 -8
  200. package/src/components/Stores/BusinessesListing/index.js +3 -1
  201. package/src/components/Stores/ImportersButton/index.js +2 -0
  202. package/src/components/Stores/ImportersList/index.js +3 -4
  203. package/src/components/Stores/ImportersList/styles.js +1 -13
  204. package/src/components/Stores/ProductDetails/index.js +12 -16
  205. package/src/components/Stores/ProductExtraOptionDetails/index.js +3 -3
  206. package/src/components/Stores/ProductExtraOptionDetails/styles.js +0 -9
  207. package/src/components/Stores/ProductExtras/index.js +9 -7
  208. package/src/components/Stores/ProductExtras/styles.js +1 -8
  209. package/src/components/Stores/ProductIngredient/index.js +9 -7
  210. package/src/components/Stores/ProductIngredient/styles.js +1 -8
  211. package/src/components/Stores/ProductStep/index.js +25 -4
  212. package/src/components/Stores/ProductSummary/index.js +3 -7
  213. package/src/components/Stores/ProductTagsList/index.js +7 -5
  214. package/src/components/Stores/ProductTagsList/styles.js +0 -7
  215. package/src/components/Stores/RestaurantSelectGuide/index.js +54 -24
  216. package/src/components/Stores/SeoOptions/index.js +15 -1
  217. package/src/components/Stores/SingleBusiness/index.js +9 -3
  218. package/src/components/Users/CustomerDetails/index.js +6 -8
  219. package/src/components/Users/CustomersListing/index.js +4 -1
  220. package/src/components/Users/ProfessionalList/index.js +3 -4
  221. package/src/components/Users/ProfessionalList/styles.js +0 -7
  222. package/src/components/Users/UsersList/index.js +3 -4
  223. package/src/components/Users/UsersList/styles.js +0 -7
  224. package/src/index.js +2 -1
  225. package/src/styles/Buttons/index.js +15 -1
  226. package/src/styles/index.js +2 -1
  227. package/template/pages/Login/index.js +2 -4
  228. /package/_bundles/{ordering-ui-admin.0c354f3e7da49f56465b.js.LICENSE.txt → ordering-ui-admin.f2522b983a000252b407.js.LICENSE.txt} +0 -0
@@ -6,7 +6,7 @@ import MdCheckBox from '@meronex/icons/md/MdCheckBox'
6
6
  import FaUserAlt from '@meronex/icons/fa/FaUserAlt'
7
7
  import { Envelope, Phone } from 'react-bootstrap-icons'
8
8
 
9
- import { Switch } from '../../../styles'
9
+ import { Switch, LinkButton } from '../../../styles'
10
10
  import { Pagination, ConfirmAdmin } from '../../Shared'
11
11
 
12
12
  import {
@@ -20,7 +20,6 @@ import {
20
20
  InfoBlock,
21
21
  UserEnableWrapper,
22
22
  WrapperPagination,
23
- AddNewUserButton,
24
23
  UsersBottomContainer,
25
24
  VerifiedItemsContainer,
26
25
  VerifiedItem,
@@ -271,7 +270,7 @@ export const UsersList = (props) => {
271
270
  </UsersTable>
272
271
  </UserTableWrapper>
273
272
  <UsersBottomContainer>
274
- <AddNewUserButton
273
+ <LinkButton
275
274
  onClick={() => handleOpenUserAddForm()}
276
275
  disabled={actionDisabled}
277
276
  >
@@ -282,7 +281,7 @@ export const UsersList = (props) => {
282
281
  ? t('ADD_NEW_DRIVER_MANAGER', 'Add new driver manager')
283
282
  : t('ADD_NEW_USER', 'Add new user')
284
283
  }
285
- </AddNewUserButton>
284
+ </LinkButton>
286
285
  {usersList?.users.length > 0 && (
287
286
  <WrapperPagination>
288
287
  <Pagination
@@ -197,18 +197,6 @@ export const WrapperPagination = styled.div`
197
197
  align-items: center;
198
198
  `
199
199
 
200
- export const AddNewUserButton = styled.div`
201
- cursor: pointer;
202
- color: ${props => props.theme.colors.primary};
203
- width: fit-content;
204
- font-size: 14px;
205
-
206
- ${({ disabled }) => disabled && css`
207
- opacity: 0.5;
208
- pointer-events: none;
209
- `}
210
- `
211
-
212
200
  export const UsersBottomContainer = styled.div`
213
201
  display: flex;
214
202
  flex-wrap: wrap;
@@ -1,7 +1,7 @@
1
1
  import React, { useState } from 'react'
2
2
  import Skeleton from 'react-loading-skeleton'
3
3
  import { useLanguage } from 'ordering-components-admin-external'
4
- import { Switch } from '../../../styles'
4
+ import { Switch, LinkButton } from '../../../styles'
5
5
  import { ColumnAllowSettingPopover, Pagination, Modal } from '../../Shared'
6
6
 
7
7
  import {
@@ -9,7 +9,6 @@ import {
9
9
  Table,
10
10
  Tbody,
11
11
  PagesBottomContainer,
12
- AddNewPageButton,
13
12
  SwitchWrapper,
14
13
  StatusWrapper,
15
14
  StatusPoint,
@@ -289,11 +288,11 @@ export const CampaignList = (props) => {
289
288
  </Container>
290
289
  {!campaignList.loading && (
291
290
  <PagesBottomContainer>
292
- <AddNewPageButton
291
+ <LinkButton
293
292
  onClick={() => handleOpenDetail({})}
294
293
  >
295
294
  {t('ADD_NEW_CAMPAIGN', 'Add new campaign')}
296
- </AddNewPageButton>
295
+ </LinkButton>
297
296
  {campaignList?.campaigns?.length > 0 && (
298
297
  <Pagination
299
298
  currentPage={paginationProps?.currentPage}
@@ -192,12 +192,6 @@ export const PagesBottomContainer = styled.div`
192
192
  margin: 15px 0;
193
193
  `
194
194
 
195
- export const AddNewPageButton = styled.div`
196
- cursor: pointer;
197
- font-size: 14px;
198
- color: ${props => props.theme.colors.primary};
199
- `
200
-
201
195
  export const LinkText = styled.span`
202
196
  color: ${props => props.theme.colors.primary};
203
197
  &:hover {
@@ -240,6 +240,7 @@ const EnterprisePromotionDetailsUI = (props) => {
240
240
  {selectedOption === 'rules' && (
241
241
  <EnterprisePromotionRules
242
242
  {...props}
243
+ isExpand={isExpand}
243
244
  handleUpdateClick={handleUpdateClick}
244
245
  handleAddPromotion={handleAddPromotion}
245
246
  />
@@ -4,7 +4,7 @@ import Skeleton from 'react-loading-skeleton'
4
4
  import { useTheme } from 'styled-components'
5
5
  import { Image as ImageIcon } from 'react-bootstrap-icons'
6
6
  import { ColumnAllowSettingPopover, Pagination } from '../../Shared'
7
- import { Switch } from '../../../styles'
7
+ import { Switch, LinkButton } from '../../../styles'
8
8
 
9
9
  import {
10
10
  PromotionListContainer,
@@ -19,7 +19,6 @@ import {
19
19
  PromotionTypeWrapper,
20
20
  PromotionHow,
21
21
  PromotionListBottom,
22
- AddNewButton,
23
22
  WrapperPagination,
24
23
  SinglePromotionTbody,
25
24
  DummyImageWrapper
@@ -272,11 +271,11 @@ export const EnterprisePromotionList = (props) => {
272
271
  </PromotionListTable>
273
272
  </PromotionListContainer>
274
273
  <PromotionListBottom eventDisabled={eventDisabled}>
275
- <AddNewButton
274
+ <LinkButton
276
275
  onClick={() => handleOpenDetails()}
277
276
  >
278
277
  {t('ADD_NEW_PROMOTION', 'Add new promotion')}
279
- </AddNewButton>
278
+ </LinkButton>
280
279
  {promotionListState?.promotions.length > 0 && (
281
280
  <WrapperPagination>
282
281
  <Pagination
@@ -212,13 +212,6 @@ export const PromotionListBottom = styled.div`
212
212
  pointer-events: none;
213
213
  `}
214
214
  `
215
- export const AddNewButton = styled.div`
216
- cursor: pointer;
217
- color: ${props => props.theme.colors.primary};
218
- width: fit-content;
219
- font-size: 13px;
220
- `
221
-
222
215
  export const WrapperPagination = styled.div`
223
216
  `
224
217
  export const DummyImageWrapper = styled.div`
@@ -44,8 +44,10 @@ const EnterprisePromotionListingUI = (props) => {
44
44
  const [selectedPromotion, setSelectedPromotion] = useState(null)
45
45
  const [curPromotionId, setCurPromotionId] = useState(null)
46
46
  const [moveDistance, setMoveDistance] = useState(0)
47
+ const [sideBarWidth, setSideBarWidth] = useState(600)
47
48
 
48
49
  const handleOpenDetails = (promotion) => {
50
+ setSideBarWidth(600)
49
51
  setMoveDistance(0)
50
52
  setSelectedPromotion(promotion)
51
53
  setCurPromotionId(promotion?.id)
@@ -56,6 +58,8 @@ const EnterprisePromotionListingUI = (props) => {
56
58
  }
57
59
 
58
60
  const handleCloseDetails = () => {
61
+ setMoveDistance(0)
62
+ setSideBarWidth(600)
59
63
  setOpenDetails(false)
60
64
  setSelectedPromotion(null)
61
65
  history.replace(`${location.pathname}`)
@@ -127,7 +131,7 @@ const EnterprisePromotionListingUI = (props) => {
127
131
  {isDisabledFeature && (<DisabledFeatureAlert />)}
128
132
  {openDetails && (
129
133
  <SideBar
130
- defaultSideBarWidth={600 + moveDistance}
134
+ defaultSideBarWidth={sideBarWidth}
131
135
  moveDistance={moveDistance}
132
136
  open={openDetails}
133
137
  onClose={() => handleCloseDetails()}
@@ -143,6 +147,7 @@ const EnterprisePromotionListingUI = (props) => {
143
147
  handleSuccessAddPromotion={handleSuccessAddPromotion}
144
148
  handleSuccessDeletePromotion={handleSuccessDeletePromotion}
145
149
  setMoveDistance={setMoveDistance}
150
+ setSideBarWidth={setSideBarWidth}
146
151
  onClose={() => handleCloseDetails()}
147
152
  />
148
153
  </SideBar>
@@ -36,7 +36,9 @@ export const EnterprisePromotionRules = (props) => {
36
36
  handleChangeItem,
37
37
  handleAddPromotion,
38
38
  handleUpdateClick,
39
- setMoveDistance
39
+ setMoveDistance,
40
+ setSideBarWidth,
41
+ isExpand
40
42
  } = props
41
43
 
42
44
  const [, t] = useLanguage()
@@ -68,7 +70,10 @@ export const EnterprisePromotionRules = (props) => {
68
70
  }
69
71
 
70
72
  const hanndleClickApply = () => {
71
- if (width > 1300) setMoveDistance(700)
73
+ if (width > 1300) {
74
+ setSideBarWidth(isExpand ? width : 1300)
75
+ setMoveDistance(700)
76
+ }
72
77
  setIsShowConditions(true)
73
78
  }
74
79
 
@@ -49,6 +49,7 @@ const MessagesListingUI = (props) => {
49
49
  const [selectedOrder, setSelectedOrder] = useState(null)
50
50
  const [orderIdForUnreadCountUpdate, setOrderIdForUnreadCountUpdate] = useState(null)
51
51
  const [filterModalOpen, setFilterModalOpen] = useState(false)
52
+ const [timeStatus, setTimeStatus] = useState(null)
52
53
 
53
54
  const handleOpenOrderDetail = (order) => {
54
55
  setDetailsOrder(order)
@@ -91,6 +92,7 @@ const MessagesListingUI = (props) => {
91
92
  handleChangeFilterValues={handleChangeFilterValues}
92
93
  filterModalOpen={filterModalOpen}
93
94
  setFilterModalOpen={setFilterModalOpen}
95
+ setTimeStatus={setTimeStatus}
94
96
  />
95
97
  <MessagesContent>
96
98
  <OrdersContainer>
@@ -173,6 +175,7 @@ const MessagesListingUI = (props) => {
173
175
  orderIdForUnreadCountUpdate={orderIdForUnreadCountUpdate}
174
176
  handleOpenOrderDetail={handleOpenOrderDetail}
175
177
  handleOrderCardClick={handleOrderCardClick}
178
+ timeStatus={timeStatus}
176
179
  />
177
180
  )}
178
181
  {selectedOption === 'contacts' && (
@@ -169,7 +169,6 @@ const ContentFormUI = (props) => {
169
169
  <Button
170
170
  borderRadius='8px'
171
171
  color='primary'
172
- disabled={Object.keys(formState.changes).length === 0}
173
172
  onClick={() => handleSubmit()}
174
173
  >
175
174
  {t('ACCEPT', 'Accept')}
@@ -7,7 +7,7 @@ import {
7
7
  import { useInfoShare } from '../../../contexts/InfoShareContext'
8
8
  import { Alert, Pagination, SearchBar, SideBar } from '../../Shared'
9
9
  import { List as MenuIcon, InfoCircle } from 'react-bootstrap-icons'
10
- import { Button, IconButton } from '../../../styles'
10
+ import { Button, IconButton, LinkButton } from '../../../styles'
11
11
  import Skeleton from 'react-loading-skeleton'
12
12
  import { OrderingProductDetails } from '../OrderingProductDetails'
13
13
 
@@ -19,7 +19,6 @@ import {
19
19
  ProductListTable,
20
20
  PageTbody,
21
21
  PagesBottomContainer,
22
- AddNewPageButton,
23
22
  ProductListTableWrapper,
24
23
  InfoWrapper,
25
24
  InfoContent
@@ -173,11 +172,11 @@ const OrderingProductsUI = (props) => {
173
172
 
174
173
  {!sitesListState.loading && (
175
174
  <PagesBottomContainer>
176
- <AddNewPageButton
175
+ <LinkButton
177
176
  onClick={() => onClickProduct(null)}
178
177
  >
179
178
  {t('ADD_PRODUCT', 'Add product')}
180
- </AddNewPageButton>
179
+ </LinkButton>
181
180
  {sitesListState?.sites?.length > 0 && (
182
181
  <Pagination
183
182
  currentPage={paginationProps?.currentPage}
@@ -157,13 +157,6 @@ export const PagesBottomContainer = styled.div`
157
157
  row-gap: 10px;
158
158
  margin: 15px 0;
159
159
  `
160
-
161
- export const AddNewPageButton = styled.div`
162
- cursor: pointer;
163
- font-size: 14px;
164
- color: ${props => props.theme.colors.primary};
165
- `
166
-
167
160
  export const InfoWrapper = styled.div`
168
161
  position: relative;
169
162
  ${props => props.theme?.rtl ? css`
@@ -129,6 +129,7 @@ const DeliveriesManagerUI = (props) => {
129
129
  export const DeliveriesManager = (props) => {
130
130
  const OrdersListControlProps = {
131
131
  ...props,
132
+ isOnlyDelivery: true,
132
133
  UIComponent: DeliveriesManagerUI,
133
134
  driversPropsToFetch: ['id', 'name', 'lastname', 'location', 'enabled', 'available', 'busy', 'driver_groups', 'assigned_orders_count', 'last_order_assigned_at', 'last_location_at', 'cellphone', 'photo', 'qualification']
134
135
  }
@@ -5,14 +5,14 @@ import BsDot from '@meronex/icons/bs/BsDot'
5
5
  import { useTheme } from 'styled-components'
6
6
  import { getStarWidth } from '../../../utils'
7
7
  import { useWindowSize } from '../../../hooks/useWindowSize'
8
+ import { LinkButton } from '../../../styles'
8
9
  import {
9
10
  DriversListContainer,
10
11
  DriverCard,
11
12
  WrapperImage,
12
13
  Image,
13
14
  DriverInfo,
14
- WrapperStar,
15
- AssignedOrdersCount
15
+ WrapperStar
16
16
  } from './styles'
17
17
 
18
18
  export const DriversList = (props) => {
@@ -81,13 +81,13 @@ export const DriversList = (props) => {
81
81
  <div>
82
82
  <p>{driver.name} {driver.lastname}</p>
83
83
  <BsDot />
84
- <AssignedOrdersCount
84
+ <LinkButton
85
85
  className='driver-orders'
86
86
  disabled={!driver?.assigned_orders_count || driver?.assigned_orders_count === 0}
87
87
  onClick={() => onOpenDriverOrdersDetail(driver)}
88
88
  >
89
89
  {driver?.assigned_orders_count} {t('ORDERS', 'Orders')}
90
- </AssignedOrdersCount>
90
+ </LinkButton>
91
91
  </div>
92
92
  {driver?.qualification && (
93
93
  <WrapperStar width={getStarWidth(driver?.qualification)} />
@@ -115,16 +115,6 @@ export const DriverInfo = styled.div`
115
115
  }
116
116
  `
117
117
 
118
- export const AssignedOrdersCount = styled.span`
119
- font-size: 14px;
120
- cursor: pointer;
121
- color: ${props => props.theme.colors.primary};
122
-
123
- ${({ disabled }) => disabled && css`
124
- pointer-events: none;
125
- opacity: 0.5;
126
- `}
127
- `
128
118
  export const Timestatus = styled.div`
129
119
  width: 4px;
130
120
  height: 42px;
@@ -2,6 +2,7 @@ import React from 'react'
2
2
  import { useLanguage, useUtils, Logistics as LogisticsController } from 'ordering-components-admin-external'
3
3
  import Skeleton from 'react-loading-skeleton'
4
4
  import { OverlayTrigger, Tooltip } from 'react-bootstrap'
5
+ import { Button } from '../../../styles'
5
6
 
6
7
  import {
7
8
  WraaperLogs,
@@ -14,7 +15,8 @@ import {
14
15
  const LogisticsUI = (props) => {
15
16
  const {
16
17
  logisticList,
17
- parseLog
18
+ parseLog,
19
+ getLogistics
18
20
  } = props
19
21
 
20
22
  const [, t] = useLanguage()
@@ -36,6 +38,13 @@ const LogisticsUI = (props) => {
36
38
  </>
37
39
  ) : (
38
40
  <WraaperLogs>
41
+ <Button
42
+ rectangle
43
+ color='primary'
44
+ onClick={() => getLogistics()}
45
+ >
46
+ {t('RELOAD', 'Reload')}
47
+ </Button>
39
48
  {logisticList.logs.map((log) => (
40
49
  <BubbleConsole key={log.id}>
41
50
  <div dangerouslySetInnerHTML={{
@@ -7,6 +7,12 @@ export const WraaperLogs = styled.div`
7
7
  justify-content: center;
8
8
  font-size: 0.8em;
9
9
  border-radius: 97px;
10
+
11
+ > button {
12
+ margin-bottom: 15px;
13
+ font-size: 14px;
14
+ padding: 0 25px;
15
+ }
10
16
  `
11
17
  export const BubbleConsole = styled.div`
12
18
  border-radius: 5px;
@@ -71,6 +71,7 @@ const OrderDetailsUI = (props) => {
71
71
  const [unreadAlert, setUnreadAlert] = useState({ business: false, driver: false, customer: false })
72
72
  const [isMenuOpen, setIsMenuOpen] = useState(false)
73
73
  const [extraOpen, setExtraOpen] = useState(false)
74
+ const [isExpand, setIsExpand] = useState(false)
74
75
  const placeSpotEnabled = [3, 4]
75
76
  const {
76
77
  order,
@@ -160,10 +161,14 @@ const OrderDetailsUI = (props) => {
160
161
  if (width <= 500) {
161
162
  document.getElementById('orderDetails').style.width = '100vw'
162
163
  } else {
163
- if (extraOpen && width >= 1000) {
164
- document.getElementById('orderDetails').style.width = '1000px'
164
+ if (isExpand) {
165
+ document.getElementById('orderDetails').style.width = '100vw'
165
166
  } else {
166
- document.getElementById('orderDetails').style.width = '500px'
167
+ if (extraOpen && width >= 1000) {
168
+ document.getElementById('orderDetails').style.width = '1000px'
169
+ } else {
170
+ document.getElementById('orderDetails').style.width = '500px'
171
+ }
167
172
  }
168
173
  }
169
174
  }
@@ -171,22 +176,13 @@ const OrderDetailsUI = (props) => {
171
176
 
172
177
  useEffect(() => {
173
178
  toggleMainContent()
174
- }, [width])
179
+ }, [extraOpen, isExpand, width])
175
180
 
176
181
  useEffect(() => {
177
182
  if (!open) return
178
183
  actionSidebar(true)
179
184
  }, [open])
180
185
 
181
- useEffect(() => {
182
- if (width < 1000) return
183
- if (extraOpen) {
184
- document.getElementById('orderDetails').style.width = '1000px'
185
- } else {
186
- toggleMainContent()
187
- }
188
- }, [extraOpen])
189
-
190
186
  const handleChangeTour = (evt) => {
191
187
  if (!isTourOpen) return
192
188
 
@@ -310,6 +306,8 @@ const OrderDetailsUI = (props) => {
310
306
  setIsTourOpen={setIsTourOpen}
311
307
  printRef={printRef}
312
308
  printTicketRef={printTicketRef}
309
+ isExpand={isExpand}
310
+ setIsExpand={setIsExpand}
313
311
  />
314
312
  <OrderStatus isDisabled={isTourOpen && currentTourStep === 1}>
315
313
  <div>
@@ -37,12 +37,13 @@ export const OrderDetailsHeader = (props) => {
37
37
  printRef,
38
38
  isServiceOrder,
39
39
  extraOpen,
40
- printTicketRef
40
+ printTicketRef,
41
+ isExpand,
42
+ setIsExpand
41
43
  } = props
42
44
 
43
45
  const [, t] = useLanguage()
44
46
  const [{ user }] = useSession()
45
- const [isExpand, setIsExpand] = useState(false)
46
47
  const { width } = useWindowSize()
47
48
  const [showPrinterOptions, setShowPrinterOptions] = useState(false)
48
49
  const dropdownReference = useRef()
@@ -81,10 +82,6 @@ export const OrderDetailsHeader = (props) => {
81
82
  }
82
83
  }
83
84
 
84
- useEffect(() => {
85
- if (extraOpen) setIsExpand(false)
86
- }, [extraOpen])
87
-
88
85
  useEffect(() => {
89
86
  if (!showPrinterOptions) {
90
87
  return
@@ -114,44 +111,44 @@ export const OrderDetailsHeader = (props) => {
114
111
  )}
115
112
  </ButtonLink>
116
113
  )}
117
- <PrinterSelectContainer>
118
- <ButtonLink
119
- color='black'
120
- isDisabled={isTourOpen && currentTourStep === 1}
121
- onClick={() => setShowPrinterOptions(!showPrinterOptions)}
122
- >
123
- <Printer />
124
- </ButtonLink>
125
- {showPrinterOptions && (
126
- <PrinterSelect ref={dropdownReference}>
127
- <ReactToPrint
128
- trigger={() => (
129
- <ButtonLink
130
- color='black'
131
- isDisabled={isTourOpen && currentTourStep === 1}
132
- onClick={() => setShowPrinterOptions(false)}
133
- >
134
- {t('NORMAL', 'Normal')}
135
- </ButtonLink>
136
- )}
137
- content={() => printRef.current}
138
- removeAfterPrint
139
- />
140
- <ReactToPrint
141
- trigger={() => (
142
- <ButtonLink
143
- color='black'
144
- isDisabled={isTourOpen && currentTourStep === 1}
145
- onClick={() => setShowPrinterOptions(false)}
146
- >
147
- {t('TICKET', 'Ticket')}
148
- </ButtonLink>
114
+ <PrinterSelectContainer>
115
+ <ButtonLink
116
+ color='black'
117
+ isDisabled={isTourOpen && currentTourStep === 1}
118
+ onClick={() => setShowPrinterOptions(!showPrinterOptions)}
119
+ >
120
+ <Printer />
121
+ </ButtonLink>
122
+ {showPrinterOptions && (
123
+ <PrinterSelect ref={dropdownReference}>
124
+ <ReactToPrint
125
+ trigger={() => (
126
+ <ButtonLink
127
+ color='black'
128
+ isDisabled={isTourOpen && currentTourStep === 1}
129
+ onClick={() => setShowPrinterOptions(false)}
130
+ >
131
+ {t('NORMAL', 'Normal')}
132
+ </ButtonLink>
133
+ )}
134
+ content={() => printRef.current}
135
+ removeAfterPrint
136
+ />
137
+ <ReactToPrint
138
+ trigger={() => (
139
+ <ButtonLink
140
+ color='black'
141
+ isDisabled={isTourOpen && currentTourStep === 1}
142
+ onClick={() => setShowPrinterOptions(false)}
143
+ >
144
+ {t('TICKET', 'Ticket')}
145
+ </ButtonLink>
146
+ )}
147
+ content={() => printTicketRef.current}
148
+ removeAfterPrint
149
+ />
150
+ </PrinterSelect>
149
151
  )}
150
- content={() => printTicketRef.current}
151
- removeAfterPrint
152
- />
153
- </PrinterSelect>
154
- )}
155
152
  </PrinterSelectContainer>
156
153
  <ButtonLink
157
154
  color='black'
@@ -5,7 +5,7 @@ import {
5
5
  useEvent,
6
6
  OrderNotification as OrderNotificationController
7
7
  } from 'ordering-components-admin-external'
8
- import { Modal } from '../../Shared'
8
+ import { Alert, Modal } from '../../Shared'
9
9
  import 'react-toastify/dist/ReactToastify.css'
10
10
  import { toast } from 'react-toastify'
11
11
  import { useTheme } from 'styled-components'
@@ -30,6 +30,7 @@ const OrderNotificationUI = (props) => {
30
30
 
31
31
  const [notificationModalOpen, setNotificationModalOpen] = useState(false)
32
32
  const [registerOrderIds, setRegisterOrderIds] = useState([])
33
+ const [alertState, setAlertState] = useState({ open: false, content: [] })
33
34
 
34
35
  const handleNotification = (order) => {
35
36
  if (customerId && order?.customer_id !== customerId) return
@@ -107,6 +108,13 @@ const OrderNotificationUI = (props) => {
107
108
  }
108
109
  }, [configState, registerOrderIds, customerId])
109
110
 
111
+ useEffect(() => {
112
+ setAlertState({
113
+ open: true,
114
+ content: t('SOUND_WILL_BE_PLAYED', 'The sound will be played on this page whenever a new order is received.')
115
+ })
116
+ }, [])
117
+
110
118
  return (
111
119
  <>
112
120
  <Modal
@@ -128,6 +136,16 @@ const OrderNotificationUI = (props) => {
128
136
  <source src={theme.sounds.notificationOgg} type='audio/ogg' />
129
137
  <source src={theme.sounds.notificationMp3} type='audio/mpeg' />
130
138
  </audio>
139
+ <Alert
140
+ width='700px'
141
+ title={t('WEB_APPNAME', 'Ordering')}
142
+ content={alertState.content}
143
+ acceptText={t('ACCEPT', 'Accept')}
144
+ open={alertState.open}
145
+ onClose={() => setAlertState({ open: false, content: [] })}
146
+ onAccept={() => setAlertState({ open: false, content: [] })}
147
+ closeOnBackdrop={false}
148
+ />
131
149
  </>
132
150
  )
133
151
  }
@@ -128,11 +128,11 @@ export const OrdersCards = (props) => {
128
128
  return finalTaget
129
129
  }
130
130
 
131
- const getStatusClassName = (minutes) => {
132
- if (isNaN(Number(minutes))) return 'in_time'
133
- const delayTime = configState?.configs?.order_deadlines_delayed_time?.value
134
- return minutes > 0 ? 'in_time' : Math.abs(minutes) <= delayTime ? 'at_risk' : 'delayed'
135
- }
131
+ // const getStatusClassName = (minutes) => {
132
+ // if (isNaN(Number(minutes))) return 'in_time'
133
+ // const delayTime = configState?.configs?.order_deadlines_delayed_time?.value
134
+ // return minutes > 0 ? 'in_time' : Math.abs(minutes) <= delayTime ? 'at_risk' : 'delayed'
135
+ // }
136
136
 
137
137
  useEffect(() => {
138
138
  const interval = setInterval(() => {
@@ -229,7 +229,7 @@ export const OrdersCards = (props) => {
229
229
  {allowColumns?.timer && (
230
230
  <Timer>
231
231
  <p className='bold'>Timer</p>
232
- <p className={getStatusClassName(getDelayMinutes(order))}>{displayDelayedTime(order)}</p>
232
+ <p className={order?.time_status}>{displayDelayedTime(order)}</p>
233
233
  </Timer>
234
234
  )}
235
235
  </CardHeading>
@@ -269,7 +269,7 @@ export const OrdersCards = (props) => {
269
269
  </InfoItemContainer>
270
270
  </CardContent>
271
271
  {allowColumns?.slaBar && (
272
- <Timestatus timeState={getStatusClassName(getDelayMinutes(order))} />
272
+ <Timestatus timeState={order?.time_status} />
273
273
  )}
274
274
  </OrderCard>
275
275
  ))}
@@ -100,8 +100,10 @@ export const ViewDetails = styled.a`
100
100
  cursor: pointer;
101
101
  color: ${props => props.theme.colors.primary};
102
102
  font-size: 12px;
103
- text-decoration: underline;
104
103
  margin: 0 10px;
104
+ &:hover {
105
+ text-decoration: underline;
106
+ }
105
107
  `
106
108
 
107
109
  export const InfoItemContainer = styled.div`