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
@@ -63,6 +63,7 @@ export const BusinessDetailsUI = (props) => {
63
63
  const [isMenuOpen, setIsMenuOpen] = useState(false)
64
64
  const [extraOpen, setExtraOpen] = useState(false)
65
65
  const [isExtendExtraOpen, setIsExtendExtraOpen] = useState(false)
66
+ const [isExpand, setIsExpand] = useState(false)
66
67
  const [alertState, setAlertState] = useState({ open: false, content: [] })
67
68
  const spoonityConfig = businessState?.business?.configs?.find(config => config.key === 'spoonity_integration_api_key')
68
69
 
@@ -82,10 +83,14 @@ export const BusinessDetailsUI = (props) => {
82
83
  if (width <= 500) {
83
84
  document.getElementById('business_details_bar').style.width = '100vw'
84
85
  } else {
85
- if (extraOpen && width >= 1000) {
86
- document.getElementById('business_details_bar').style.width = '1000px'
86
+ if (isExpand) {
87
+ document.getElementById('business_details_bar').style.width = '100vw'
87
88
  } else {
88
- document.getElementById('business_details_bar').style.width = '500px'
89
+ if (extraOpen && width >= 1000) {
90
+ document.getElementById('business_details_bar').style.width = '1000px'
91
+ } else {
92
+ document.getElementById('business_details_bar').style.width = '500px'
93
+ }
89
94
  }
90
95
  }
91
96
  }
@@ -109,26 +114,14 @@ export const BusinessDetailsUI = (props) => {
109
114
  history.replace(`${location.pathname}?id=${businessId}`)
110
115
  }
111
116
 
112
- useEffect(() => {
113
- if (width > 1000) {
114
- setIsExtendExtraOpen(false)
115
- }
116
- toggleMainContent()
117
- }, [width])
118
-
119
117
  useEffect(() => {
120
118
  if (!open) return
121
119
  actionSidebar(true)
122
120
  }, [open])
123
121
 
124
122
  useEffect(() => {
125
- if (width < 1000) return
126
- if (extraOpen) {
127
- document.getElementById('business_details_bar').style.width = '1000px'
128
- } else {
129
- toggleMainContent()
130
- }
131
- }, [extraOpen])
123
+ toggleMainContent()
124
+ }, [extraOpen, isExpand, width])
132
125
 
133
126
  useEffect(() => {
134
127
  setExtraOpen(false)
@@ -187,6 +180,8 @@ export const BusinessDetailsUI = (props) => {
187
180
  extraOpen={extraOpen}
188
181
  spoonityConfig={spoonityConfig}
189
182
  siteState={siteState}
183
+ isExpand={isExpand}
184
+ setIsExpand={setIsExpand}
190
185
  />
191
186
  )}
192
187
  {extraOpen && (
@@ -8,7 +8,7 @@ import {
8
8
  import Skeleton from 'react-loading-skeleton'
9
9
  import { useInfoShare } from '../../../contexts/InfoShareContext'
10
10
  import { List as MenuIcon } from 'react-bootstrap-icons'
11
- import { Button, IconButton } from '../../../styles'
11
+ import { Button, IconButton, LinkButton } from '../../../styles'
12
12
  import { useTheme } from 'styled-components'
13
13
  import { Alert, SearchBar, SideBar, ColumnAllowSettingPopover } from '../../Shared'
14
14
  import {
@@ -232,7 +232,7 @@ const BusinessDeviceListingUI = (props) => {
232
232
  </BrandListTable>
233
233
  </BrandListTableWrapper>
234
234
  <BrandListBottomContainer>
235
- <span onClick={() => handleOpenSideBar()}>{t('ADD_NEW_DEVICE', 'Add new device')}</span>
235
+ <LinkButton onClick={() => handleOpenSideBar()}>{t('ADD_NEW_DEVICE', 'Add new device')}</LinkButton>
236
236
  </BrandListBottomContainer>
237
237
  {isOpen && (
238
238
  <SideBar
@@ -208,11 +208,4 @@ export const BrandListBottomContainer = styled.div`
208
208
  display: flex;
209
209
  align-items: center;
210
210
  margin-top: 16px;
211
-
212
- span {
213
- cursor: pointer;
214
- user-select: none;
215
- font-size: 14px;
216
- color: ${props => props.theme.colors?.primary};
217
- }
218
211
  `
@@ -4,7 +4,7 @@ import { useLanguage, BusinessMenu as BusinessMenuController } from 'ordering-co
4
4
  import { BusinessMenuOptions } from '../BusinessMenuOptions'
5
5
  import { Confirm, Modal, SearchBar } from '../../Shared'
6
6
  import { useWindowSize } from '../../../hooks/useWindowSize'
7
- import { Button, Checkbox } from '../../../styles'
7
+ import { Button, Checkbox, LinkButton } from '../../../styles'
8
8
  import { ChevronRight } from 'react-bootstrap-icons'
9
9
 
10
10
  import {
@@ -15,7 +15,7 @@ import {
15
15
  MeunItem,
16
16
  MenuName,
17
17
  CheckboxWrapper,
18
- AddMenuButton,
18
+ AddMenuButtonWrapper,
19
19
  TabsContainer,
20
20
  Tab,
21
21
  SearchBarWrapper
@@ -189,11 +189,13 @@ const BusinessMenuUI = (props) => {
189
189
  </MeunItem>
190
190
  ))}
191
191
  {!isSelectedSharedMenus && (
192
- <AddMenuButton
193
- onClick={() => handleOpenOptions('option', {})}
194
- >
195
- {t('ADD_MENU', 'Add menu')}
196
- </AddMenuButton>
192
+ <AddMenuButtonWrapper>
193
+ <LinkButton
194
+ onClick={() => handleOpenOptions('option', {})}
195
+ >
196
+ {t('ADD_MENU', 'Add menu')}
197
+ </LinkButton>
198
+ </AddMenuButtonWrapper>
197
199
  )}
198
200
  </MenuContainer>
199
201
  {width >= 1000 ? (
@@ -89,13 +89,8 @@ export const CheckboxWrapper = styled.div`
89
89
  margin-right: 20px;
90
90
  `}
91
91
  `
92
- export const AddMenuButton = styled.a`
93
- cursor: pointer;
94
- color: ${props => props.theme.colors.lightGray};
92
+ export const AddMenuButtonWrapper = styled.div`
95
93
  margin: 15px 0;
96
- display: inline-block;
97
- text-decoration: none;
98
- font-size: 14px;
99
94
  `
100
95
  export const TabsContainer = styled.div`
101
96
  width: 100%;
@@ -3,7 +3,7 @@ import { useLanguage, BusinessPlaceGroup as BusinessPlaceGroupController } from
3
3
  import { DropdownButton, Dropdown } from 'react-bootstrap'
4
4
  import { useTheme } from 'styled-components'
5
5
  import { useWindowSize } from '../../../hooks/useWindowSize'
6
- import { Button, IconButton, Input } from '../../../styles'
6
+ import { Button, IconButton, Input, LinkButton } from '../../../styles'
7
7
  import { useForm } from 'react-hook-form'
8
8
  import { Alert, Modal } from '../../Shared'
9
9
  import Skeleton from 'react-loading-skeleton'
@@ -19,7 +19,7 @@ import {
19
19
  ButtonWrapper,
20
20
  HideSubmitBtn,
21
21
  OptionList,
22
- AddBtn,
22
+ AddBtnWrapper,
23
23
  PlaceItemContainer,
24
24
  CheckWrapper,
25
25
  TableHead
@@ -219,7 +219,11 @@ export const BusinessPlaceGroupUI = (props) => {
219
219
  ))}
220
220
  </OptionList>
221
221
  )}
222
- {placeGroup && <AddBtn onClick={() => handleOpenModal(null)}>{t('ADD_OPTION', 'Add option')}</AddBtn>}
222
+ {placeGroup && (
223
+ <AddBtnWrapper>
224
+ <LinkButton onClick={() => handleOpenModal(null)}>{t('ADD_OPTION', 'Add option')}</LinkButton>
225
+ </AddBtnWrapper>
226
+ )}
223
227
  <ButtonWrapper>
224
228
  <Button
225
229
  color='primary'
@@ -155,19 +155,8 @@ export const OptionList = styled.div`
155
155
  margin-top: 35px;
156
156
  `
157
157
 
158
- export const AddBtn = styled.span`
159
- font-weight: 400;
160
- font-size: 14px;
161
- display: block;
158
+ export const AddBtnWrapper = styled.div`
162
159
  margin: 10px 0px;
163
- cursor: pointer;
164
- user-select: none;
165
- color: ${props => props.theme.colors.lightGray};
166
- transition: color 0.2s ease;
167
-
168
- &:hover {
169
- color: ${props => props.theme.colors.primary};
170
- }
171
160
  `
172
161
 
173
162
  export const CheckWrapper = styled.div`
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'
2
2
  import { useHistory, useLocation } from 'react-router-dom'
3
3
  import { useLanguage, BusinessPlaceGroupList as BusinessPlaceGroupListController } from 'ordering-components-admin-external'
4
4
  import Skeleton from 'react-loading-skeleton'
5
- import { Button } from '../../../styles'
5
+ import { Button, LinkButton } from '../../../styles'
6
6
  import { ChevronRight, CheckSquareFill, Square } from 'react-bootstrap-icons'
7
7
  import { useWindowSize } from '../../../hooks/useWindowSize'
8
8
  import { BusinessPlaceGroup } from '../BusinessPlaceGroup'
@@ -12,7 +12,7 @@ import {
12
12
  Container,
13
13
  Header,
14
14
  Content,
15
- AddBtn,
15
+ AddBtnWrapper,
16
16
  TableHead,
17
17
  CheckWrapper,
18
18
  PlaceItemContainer,
@@ -139,7 +139,9 @@ export const BusinessPlaceGroupListUI = (props) => {
139
139
  <ChevronRight />
140
140
  </PlaceItemContainer>
141
141
  ))}
142
- <AddBtn onClick={() => handleOpenDetail(null)}>{t('ADD_PLACES', 'Add places')}</AddBtn>
142
+ <AddBtnWrapper>
143
+ <LinkButton onClick={() => handleOpenDetail(null)}>{t('ADD_PLACES', 'Add places')}</LinkButton>
144
+ </AddBtnWrapper>
143
145
  </Content>
144
146
  )}
145
147
  </PlaceContainer>
@@ -50,19 +50,8 @@ export const Header = styled.div`
50
50
 
51
51
  export const Content = styled.div``
52
52
 
53
- export const AddBtn = styled.span`
54
- font-weight: 400;
55
- font-size: 14px;
56
- display: block;
53
+ export const AddBtnWrapper = styled.div`
57
54
  margin: 10px 0px;
58
- cursor: pointer;
59
- user-select: none;
60
- color: ${props => props.theme.colors.lightGray};
61
- transition: color 0.2s ease;
62
-
63
- &:hover {
64
- color: ${props => props.theme.colors.primary};
65
- }
66
55
  `
67
56
 
68
57
  export const TableHead = styled.div`
@@ -4,13 +4,14 @@ import { ColumnAllowSettingPopover, NotFoundSource, Pagination, SideBar } from '
4
4
  import { SingleBusinessProduct } from '../SingleBusinessProduct'
5
5
  import { BusinessSpreadSheet } from '../BusinessSpreadSheet'
6
6
  import { BusinessProductAddForm } from '../BusinessProductAddForm'
7
+ import { LinkButton } from '../../../styles'
7
8
 
8
9
  import {
9
10
  ListContent,
10
11
  ProductListContainer,
11
12
  BusinessProductListTable,
12
13
  WrapperNotFound,
13
- AddProductBtn,
14
+ AddProductBtnWrapper,
14
15
  ProductListSpreadContainer,
15
16
  ProductListBottom
16
17
  } from './styles'
@@ -196,11 +197,13 @@ export const BusinessProductList = (props) => {
196
197
  <ProductListBottom>
197
198
  {
198
199
  !businessState.loading && businessState?.business?.categories?.length > 0 && categorySelected && (
199
- <AddProductBtn
200
- onClick={() => handleParentProductAdd(true)}
201
- >
202
- {t('ADD_NEW_PRODUCT', 'Add new product')}
203
- </AddProductBtn>
200
+ <AddProductBtnWrapper>
201
+ <LinkButton
202
+ onClick={() => handleParentProductAdd(true)}
203
+ >
204
+ {t('ADD_NEW_PRODUCT', 'Add new product')}
205
+ </LinkButton>
206
+ </AddProductBtnWrapper>
204
207
  )
205
208
  }
206
209
 
@@ -110,14 +110,9 @@ export const WrapperNotFound = styled.div`
110
110
  margin: 20px;
111
111
  `
112
112
 
113
- export const AddProductBtn = styled.div`
114
- user-select: none;
115
- font-size: 14px;
116
- color: ${props => props.theme.colors.primary};
113
+ export const AddProductBtnWrapper = styled.div`
117
114
  margin-top: 12px;
118
- cursor: pointer;
119
115
  margin-bottom: 15px;
120
- display: inline-block;
121
116
  `
122
117
 
123
118
  export const ProductListBottom = styled.div`
@@ -1,12 +1,13 @@
1
1
  import React, { useRef, useState, useEffect } from 'react'
2
2
  import { useLanguage } from 'ordering-components-admin-external'
3
3
  import { SingleBusinessSubCateogries } from '../SingleBusinessSubCateogries'
4
+ import { LinkButton } from '../../../styles'
4
5
 
5
6
  import {
6
7
  CategoryListContainer,
7
8
  HeaderContainer,
8
9
  ListContent,
9
- AddCategory
10
+ AddCategoryWrapper
10
11
  } from './styles'
11
12
 
12
13
  export const BusinessProductsCategories = (props) => {
@@ -70,12 +71,14 @@ export const BusinessProductsCategories = (props) => {
70
71
  )}
71
72
  </ListContent>
72
73
  </CategoryListContainer>
73
- <AddCategory
74
- ref={addButtonRef}
75
- onClick={() => handleOpenCategoryDetails()}
76
- >
77
- {t('ADD_NEW_CATEGORY', 'Add new category')}
78
- </AddCategory>
74
+ <AddCategoryWrapper>
75
+ <LinkButton
76
+ ref={addButtonRef}
77
+ onClick={() => handleOpenCategoryDetails()}
78
+ >
79
+ {t('ADD_NEW_CATEGORY', 'Add new category')}
80
+ </LinkButton>
81
+ </AddCategoryWrapper>
79
82
  </>
80
83
  )
81
84
  }
@@ -32,12 +32,7 @@ export const ListContent = styled.div`
32
32
  }
33
33
  `
34
34
 
35
- export const AddCategory = styled.div`
36
- display: inline;
37
- user-select: none;
38
- font-size: 14px;
39
- color: ${props => props.theme.colors?.primary};
40
- cursor: pointer;
35
+ export const AddCategoryWrapper = styled.div`
41
36
  margin: 15px 10px;
42
37
  `
43
38
 
@@ -304,7 +304,10 @@ const BusinessProductsListingUI = (props) => {
304
304
  <Breadcrumb>
305
305
  <span
306
306
  className='business'
307
- onClick={() => setOpenSidebar('business_details')}
307
+ onClick={() => {
308
+ history.replace(`${location.pathname}?id=${businessState?.business?.id}`)
309
+ setOpenSidebar('business_details')
310
+ }}
308
311
  >
309
312
  {selectedBusiness?.name || businessState?.business?.name}
310
313
  </span>
@@ -327,7 +330,7 @@ const BusinessProductsListingUI = (props) => {
327
330
  {t('REFRESH', 'Refresh')}
328
331
  <ArrowRepeat size={16} style={{ marginLeft: 5 }} />
329
332
  </Button>
330
- <ImportersButton customClass='importerGroup' />
333
+ <ImportersButton customClass='importerGroup' setOpenSidebar={setOpenSidebar} />
331
334
  <Button
332
335
  borderRadius='8px'
333
336
  color='lightPrimary'
@@ -6,7 +6,7 @@ import {
6
6
  } from 'ordering-components-admin-external'
7
7
  import { DropdownButton, Dropdown } from 'react-bootstrap'
8
8
  import { useTheme } from 'styled-components'
9
- import { Button, Checkbox, IconButton } from '../../../styles'
9
+ import { Button, Checkbox, IconButton, LinkButton } from '../../../styles'
10
10
  import { useWindowSize } from '../../../hooks/useWindowSize'
11
11
  import { AutoScroll, Confirm, Modal } from '../../Shared'
12
12
  import { BusinessPromotionGeneralForm } from '../BusinessPromotionGeneralForm'
@@ -21,7 +21,7 @@ import {
21
21
  PromotionTbody,
22
22
  ActionSelectorWrapper,
23
23
  PromotionTypeItem,
24
- AddNewPromotionText,
24
+ AddNewPromotionButtonWrapper,
25
25
  PromotionEditFormContainer,
26
26
  EditHeader,
27
27
  CloseButtonWrapper,
@@ -132,9 +132,11 @@ const BusinessPromotionListUI = (props) => {
132
132
  </PromotionTbody>
133
133
  ))}
134
134
  </PromotionsTable>
135
- <AddNewPromotionText onClick={(e) => handleOpenForm(e, {})}>
136
- {t('ADD_NEW_PROMOTION', 'Add new promotion')}
137
- </AddNewPromotionText>
135
+ <AddNewPromotionButtonWrapper>
136
+ <LinkButton onClick={(e) => handleOpenForm(e, {})}>
137
+ {t('ADD_NEW_PROMOTION', 'Add new promotion')}
138
+ </LinkButton>
139
+ </AddNewPromotionButtonWrapper>
138
140
  </BusinessPromotionsContainer>
139
141
  {isShowForm && (
140
142
  <>
@@ -132,12 +132,8 @@ export const PromotionDateItem = styled.div`
132
132
  }
133
133
  `
134
134
 
135
- export const AddNewPromotionText = styled.div`
136
- cursor: pointer;
137
- width: fit-content;
135
+ export const AddNewPromotionButtonWrapper = styled.div`
138
136
  margin: 15px 0;
139
- color: ${props => props.theme.colors.primary};
140
- font-size: 12px;
141
137
  `
142
138
 
143
139
  export const PromotionEditFormContainer = styled.div`
@@ -1,4 +1,4 @@
1
- import React, { useState, useEffect } from 'react'
1
+ import React, { useState } from 'react'
2
2
  import Skeleton from 'react-loading-skeleton'
3
3
  import { useLanguage, useUtils, useEvent, useApi } from 'ordering-components-admin-external'
4
4
  import BsChevronRight from '@meronex/icons/bs/BsChevronRight'
@@ -39,7 +39,9 @@ export const BusinessSummary = (props) => {
39
39
  handleDeleteBusiness,
40
40
  extraOpen,
41
41
  spoonityConfig,
42
- siteState
42
+ siteState,
43
+ isExpand,
44
+ setIsExpand
43
45
  } = props
44
46
  const [, t] = useLanguage()
45
47
  const [{ optimizeImage }] = useUtils()
@@ -49,7 +51,6 @@ export const BusinessSummary = (props) => {
49
51
  const { width } = useWindowSize()
50
52
  const [isBusinessPreview, setIsBusinessPreview] = useState(false)
51
53
  const [selectedView, setSelectedView] = useState('desktop')
52
- const [isExpand, setIsExpand] = useState(false)
53
54
  const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
54
55
 
55
56
  const handleOpenCategory = () => {
@@ -160,10 +161,6 @@ export const BusinessSummary = (props) => {
160
161
  setIsExpand(prev => !prev)
161
162
  }
162
163
 
163
- useEffect(() => {
164
- if (extraOpen) setIsExpand(false)
165
- }, [extraOpen])
166
-
167
164
  return (
168
165
  <>
169
166
  <BusinessDetailsContainer>
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useEffect, useCallback } from 'react'
2
2
  import { useLanguage } from 'ordering-components-admin-external'
3
3
  import { ColumnAllowSettingPopover, Pagination } from '../../Shared'
4
- import { Button, Switch } from '../../../styles'
4
+ import { Button, Switch, LinkButton } from '../../../styles'
5
5
  import { useTheme } from 'styled-components'
6
6
  import { SingleBusiness } from '../SingleBusiness'
7
7
  import { CheckSquareFill, Square } from 'react-bootstrap-icons'
@@ -11,7 +11,6 @@ import {
11
11
  BusinessListTable,
12
12
  WrapperPagination,
13
13
  BusinessCardContainer,
14
- AddNewButtonLink,
15
14
  BusinessListBottomContainer,
16
15
  AddFirstStoreContainer,
17
16
  CheckBoxWrapper,
@@ -39,7 +38,8 @@ export const BusinessesList = (props) => {
39
38
  handleEnableAllBusiness,
40
39
  selectedBusinessActiveState,
41
40
  setBusinessIds,
42
- handleGotToAdd
41
+ handleGotToAdd,
42
+ citiesList
43
43
  } = props
44
44
 
45
45
  const theme = useTheme()
@@ -208,6 +208,7 @@ export const BusinessesList = (props) => {
208
208
  handleOpenBusinessDetails={handleOpenBusinessDetails}
209
209
  businessIds={businessIds}
210
210
  handleChangeBusinessIds={handleChangeBusinessIds}
211
+ citiesList={citiesList}
211
212
  />
212
213
  ))
213
214
  )}
@@ -215,11 +216,11 @@ export const BusinessesList = (props) => {
215
216
  </BusinessListContainer>
216
217
 
217
218
  <BusinessListBottomContainer>
218
- <AddNewButtonLink
219
+ <LinkButton
219
220
  onClick={() => handleGotToAdd()}
220
221
  >
221
222
  {t('ADD_NEW_STORE', 'Add new store')}
222
- </AddNewButtonLink>
223
+ </LinkButton>
223
224
  {pagination && (
224
225
  <WrapperPagination>
225
226
  {pagination?.total > 0 && (
@@ -260,6 +261,7 @@ export const BusinessesList = (props) => {
260
261
  handleSucessAddBusiness={handleSucessAddBusiness}
261
262
  handleSucessUpdateBusiness={handleSucessUpdateBusiness}
262
263
  handleOpenBusinessDetails={handleOpenBusinessDetails}
264
+ citiesList={citiesList}
263
265
  />
264
266
  ))
265
267
  )}
@@ -66,14 +66,6 @@ export const BusinessCardContainer = styled.div`
66
66
  max-height: calc(100vh - 210px);
67
67
  overflow: auto;
68
68
  `
69
-
70
- export const AddNewButtonLink = styled.div`
71
- width: fit-content;
72
- cursor: pointer;
73
- color: ${props => props.theme.colors.primary};
74
- font-size: 14px;
75
- `
76
-
77
69
  export const BusinessListBottomContainer = styled.div`
78
70
  display: flex;
79
71
  flex-wrap: wrap;
@@ -52,7 +52,8 @@ const BusinessesListingUI = (props) => {
52
52
  handleChangeFilterValues,
53
53
  filterValues,
54
54
  businessTypeSelected,
55
- inActiveBusinesses
55
+ inActiveBusinesses,
56
+ citiesList
56
57
  } = props
57
58
 
58
59
  const history = useHistory()
@@ -267,6 +268,7 @@ const BusinessesListingUI = (props) => {
267
268
  handleEnableAllBusiness={handleEnableAllBusiness}
268
269
  selectedBusinessActiveState={selectedBusinessActiveState}
269
270
  handleGotToAdd={handleGotToAdd}
271
+ citiesList={citiesList}
270
272
  />
271
273
  )}
272
274
  </BusinessListingContainer>
@@ -8,6 +8,7 @@ import { SideBar } from '../../Shared'
8
8
  import { CsvImportButtonWrapper } from './styles'
9
9
 
10
10
  export const ImportersButton = (props) => {
11
+ const { setOpenSidebar } = props
11
12
  const history = useHistory()
12
13
  const query = new URLSearchParams(useLocation().search)
13
14
  const [, t] = useLanguage()
@@ -15,6 +16,7 @@ export const ImportersButton = (props) => {
15
16
  const [extraOpen, setExtraOpen] = useState(false)
16
17
 
17
18
  const handleOpenImporters = () => {
19
+ setOpenSidebar('importer')
18
20
  setOpenImporters(true)
19
21
 
20
22
  history.replace(`${location.pathname}?header=importers`)
@@ -3,7 +3,7 @@ import Skeleton from 'react-loading-skeleton'
3
3
  import FiMoreVertical from '@meronex/icons/fi/FiMoreVertical'
4
4
  import { useLanguage } from 'ordering-components-admin-external'
5
5
  import { DropdownButton, Dropdown } from 'react-bootstrap'
6
- import { Switch } from '../../../styles'
6
+ import { Switch, LinkButton } from '../../../styles'
7
7
  import { useTheme } from 'styled-components'
8
8
  import { NotFoundSource } from '../../Shared'
9
9
 
@@ -11,7 +11,6 @@ import {
11
11
  ImportListContainer,
12
12
  ImportersTableWrapper,
13
13
  ImportersBottomContainer,
14
- AddNewImporterButton,
15
14
  ImpotersTable,
16
15
  UserEnableWrapper,
17
16
  WrapperUserActionSelector,
@@ -132,9 +131,9 @@ export const ImportersList = (props) => {
132
131
  </ImpotersTable>
133
132
  </ImportersTableWrapper>
134
133
  <ImportersBottomContainer>
135
- <AddNewImporterButton onClick={() => addNewImporter()}>
134
+ <LinkButton onClick={() => addNewImporter()}>
136
135
  {t('ADD_NEW_IMPORTER', 'Add new importer')}
137
- </AddNewImporterButton>
136
+ </LinkButton>
138
137
  </ImportersBottomContainer>
139
138
  </ImportListContainer>
140
139
  )
@@ -1,5 +1,4 @@
1
1
  import styled, { css } from 'styled-components'
2
- import { darken } from 'polished'
3
2
 
4
3
  export const ImportListContainer = styled.div``
5
4
  export const ImportersTableWrapper = styled.div`
@@ -111,18 +110,7 @@ export const WrapperUserActionSelector = styled.div`
111
110
  export const ImportersBottomContainer = styled.div`
112
111
  display: flex;
113
112
  justify-content: space-between;
114
-
115
- `
116
- export const AddNewImporterButton = styled.div`
117
- display: inline-flex;
118
- width: fit-content;
119
- cursor: pointer;
120
- color: rgb(144, 155, 169);
121
- font-size: 14px;
122
- margin-top: 20px;
123
- &:hover {
124
- color: ${props => darken(0.05, props.theme.colors.primary)};
125
- }
113
+ margin: 15px 0;
126
114
  `
127
115
  export const NotFoundWrapper = styled.div`
128
116
  display: flex;