ordering-ui-admin-external 1.14.3 → 1.15.1

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 (268) hide show
  1. package/_bundles/{ordering-ui-admin.e2a58dcc95d6a983dfc0.js → ordering-ui-admin.7c0f4e22698e5dbd9b25.js} +2 -2
  2. package/_modules/components/BusinessIntelligence/BusinessReviewDetails/index.js +5 -5
  3. package/_modules/components/BusinessIntelligence/BusinessReviewList/index.js +29 -4
  4. package/_modules/components/BusinessIntelligence/InvoiceBusinessManager/index.js +16 -1
  5. package/_modules/components/BusinessIntelligence/InvoiceDriverManager/index.js +16 -1
  6. package/_modules/components/BusinessIntelligence/InvoiceManager/index.js +14 -1
  7. package/_modules/components/BusinessIntelligence/InvoiceOrdertype/styles.js +1 -1
  8. package/_modules/components/BusinessIntelligence/ProductReviewDetails/index.js +4 -3
  9. package/_modules/components/BusinessIntelligence/Reports/index.js +14 -1
  10. package/_modules/components/BusinessIntelligence/ReviewProductsListing/index.js +52 -16
  11. package/_modules/components/BusinessIntelligence/ReviewsListing/index.js +32 -4
  12. package/_modules/components/BusinessIntelligence/UserReviewDetails/index.js +4 -3
  13. package/_modules/components/BusinessIntelligence/UsersReviewList/index.js +35 -10
  14. package/_modules/components/CartRecovery/RecoveryActionDetail/index.js +21 -2
  15. package/_modules/components/CartRecovery/RecoveryActionListing/index.js +22 -2
  16. package/_modules/components/Delivery/DeliveryUsersListing/index.js +2 -0
  17. package/_modules/components/Delivery/DriversCompaniesListing/index.js +36 -13
  18. package/_modules/components/Delivery/DriversCompanyDetailsForm/index.js +31 -6
  19. package/_modules/components/Delivery/DriversGroupDetails/index.js +29 -2
  20. package/_modules/components/Delivery/DriversGroupLogistics/index.js +16 -2
  21. package/_modules/components/Delivery/DriversGroupsListing/index.js +28 -11
  22. package/_modules/components/Delivery/UserDetails/index.js +24 -1
  23. package/_modules/components/Loyalty/GiftCardDetail/styles.js +68 -0
  24. package/_modules/components/Loyalty/GiftCards/index.js +23 -2
  25. package/_modules/components/Loyalty/PointsWalletBusinessList/index.js +26 -1
  26. package/_modules/components/Loyalty/PointsWalletLevels/index.js +22 -1
  27. package/_modules/components/Loyalty/RewardsPrograms/index.js +34 -4
  28. package/_modules/components/Loyalty/Wallet/index.js +20 -1
  29. package/_modules/components/Marketing/AdBannersListing/index.js +24 -5
  30. package/_modules/components/Marketing/BannerImageDetails/index.js +2 -1
  31. package/_modules/components/Marketing/CampaignDetail/index.js +19 -1
  32. package/_modules/components/Marketing/CampaignEmail/styles.js +5 -3
  33. package/_modules/components/Marketing/CampaignListing/index.js +19 -0
  34. package/_modules/components/Marketing/CampaignNotification/styles.js +5 -3
  35. package/_modules/components/Marketing/CampaignSMS/styles.js +5 -3
  36. package/_modules/components/Marketing/EnterprisePromotionGeneralDetails/index.js +2 -1
  37. package/_modules/components/Marketing/EnterprisePromotionListing/index.js +24 -4
  38. package/_modules/components/Marketing/PageBanner/index.js +27 -3
  39. package/_modules/components/Messages/MessagesListing/index.js +18 -1
  40. package/_modules/components/MyProducts/AdvancedSettings/FontStyleGroup.js +85 -0
  41. package/_modules/components/MyProducts/AdvancedSettings/OrderType.js +45 -0
  42. package/_modules/components/MyProducts/AdvancedSettings/SettingComponent.js +91 -0
  43. package/_modules/components/MyProducts/AdvancedSettings/index.js +626 -0
  44. package/_modules/components/MyProducts/AdvancedSettings/styles.js +146 -0
  45. package/_modules/components/MyProducts/AppLayout/index.js +9 -1
  46. package/_modules/components/MyProducts/AppLayout/styles.js +20 -3
  47. package/_modules/components/MyProducts/CallCenterApp/index.js +1 -1
  48. package/_modules/components/MyProducts/CustomerApp/index.js +2 -2
  49. package/_modules/components/MyProducts/DriverApp/index.js +2 -2
  50. package/_modules/components/MyProducts/KioskApp/index.js +1 -1
  51. package/_modules/components/MyProducts/OrderingWebsite/index.js +37 -6
  52. package/_modules/components/MyProducts/OrderingWebsite/styles.js +39 -5
  53. package/_modules/components/MyProducts/PosApp/index.js +1 -1
  54. package/_modules/components/MyProducts/StoreApp/index.js +2 -2
  55. package/_modules/components/OrderingProducts/OrderingProductDetails/index.js +21 -1
  56. package/_modules/components/OrderingProducts/OrderingProductsListing/index.js +18 -1
  57. package/_modules/components/Orders/DeliveriesManager/index.js +0 -1
  58. package/_modules/components/Orders/Messages/index.js +32 -29
  59. package/_modules/components/Orders/OrderDetails/index.js +38 -22
  60. package/_modules/components/Orders/OrderDetailsHeader/index.js +2 -3
  61. package/_modules/components/Orders/OrdersContentHeader/index.js +2 -2
  62. package/_modules/components/Orders/OrdersFilterGroup/index.js +112 -9
  63. package/_modules/components/Orders/OrdersFilterGroup/styles.js +11 -3
  64. package/_modules/components/Orders/OrdersManager/index.js +0 -1
  65. package/_modules/components/Settings/CountriesList/index.js +27 -4
  66. package/_modules/components/Settings/Deliverect/index.js +23 -2
  67. package/_modules/components/Settings/DoordashConnect/index.js +23 -2
  68. package/_modules/components/Settings/DropdownOptionList/index.js +27 -4
  69. package/_modules/components/Settings/IntegrationListing/index.js +3 -3
  70. package/_modules/components/Settings/ItsaCheckmate/index.js +23 -2
  71. package/_modules/components/Settings/LalamoveConnect/index.js +23 -2
  72. package/_modules/components/Settings/PickerExpress/index.js +23 -2
  73. package/_modules/components/Settings/PlaceListing/index.js +40 -4
  74. package/_modules/components/Settings/Settings/index.js +86 -45
  75. package/_modules/components/Settings/SettingsDetail/index.js +14 -1
  76. package/_modules/components/Settings/SitesAuthSettings/index.js +17 -1
  77. package/_modules/components/SidebarMenu/index.js +0 -1
  78. package/_modules/components/Stores/BusinessAdd/BusinessDetails/index.js +4 -9
  79. package/_modules/components/Stores/BusinessAdd/BusinessDetails/styles.js +3 -1
  80. package/_modules/components/Stores/BusinessAdd/DeliveryZone/index.js +13 -4
  81. package/_modules/components/Stores/BusinessAdd/DeliveryZone/styles.js +16 -10
  82. package/_modules/components/Stores/BusinessAdd/PaymentMethods/index.js +11 -3
  83. package/_modules/components/Stores/BusinessAdd/PaymentMethods/styles.js +3 -1
  84. package/_modules/components/Stores/BusinessAdd/ReceiveOrders/index.js +17 -6
  85. package/_modules/components/Stores/BusinessAdd/ReceiveOrders/styles.js +3 -1
  86. package/_modules/components/Stores/BusinessAdd/index.js +38 -8
  87. package/_modules/components/Stores/BusinessAdd/styles.js +8 -4
  88. package/_modules/components/Stores/BusinessAddStore/index.js +1 -1
  89. package/_modules/components/Stores/BusinessBrandListing/index.js +37 -4
  90. package/_modules/components/Stores/BusinessDeliveryPickupMore/index.js +20 -1
  91. package/_modules/components/Stores/BusinessDeliveryZoneDetails/index.js +22 -1
  92. package/_modules/components/Stores/BusinessDeliveryZoneList/index.js +32 -4
  93. package/_modules/components/Stores/BusinessDetail/index.js +18 -1
  94. package/_modules/components/Stores/BusinessDetails/index.js +17 -1
  95. package/_modules/components/Stores/BusinessFrontLayout/index.js +8 -1
  96. package/_modules/components/Stores/BusinessFrontLayout/styles.js +5 -3
  97. package/_modules/components/Stores/BusinessMenu/index.js +58 -7
  98. package/_modules/components/Stores/BusinessMenuOptions/index.js +24 -3
  99. package/_modules/components/Stores/BusinessOrderingChannels/index.js +18 -2
  100. package/_modules/components/Stores/BusinessPaymentMethods/index.js +26 -2
  101. package/_modules/components/Stores/BusinessPlaceGroupList/index.js +183 -0
  102. package/_modules/components/Stores/BusinessPlaceGroupList/styles.js +66 -0
  103. package/_modules/components/Stores/BusinessProductsCategoyDetails/index.js +21 -1
  104. package/_modules/components/Stores/BusinessProductsListing/index.js +74 -22
  105. package/_modules/components/Stores/BusinessPromotionGeneralForm/index.js +2 -2
  106. package/_modules/components/Stores/BusinessSharedMenuProducts/index.js +29 -2
  107. package/_modules/components/Stores/BusinessSync/index.js +16 -1
  108. package/_modules/components/Stores/BusinessTypes/index.js +27 -4
  109. package/_modules/components/Stores/BusinessWalletsList/index.js +24 -1
  110. package/_modules/components/Stores/BusinessesListing/index.js +9 -1
  111. package/_modules/components/Stores/ImportersButton/index.js +19 -6
  112. package/_modules/components/Stores/PaymentOption/index.js +29 -9
  113. package/_modules/components/Stores/PaymentOptionMethods/index.js +23 -3
  114. package/_modules/components/Stores/PaymentOptionPaypal/index.js +23 -3
  115. package/_modules/components/Stores/PaymentOptionSquare/index.js +23 -3
  116. package/_modules/components/Stores/PaymentOptionStripeDirect/index.js +23 -3
  117. package/_modules/components/Stores/PaymethodOptionPaypalExpress/index.js +23 -3
  118. package/_modules/components/Stores/PaymethodOptionStripeConnect/index.js +23 -3
  119. package/_modules/components/Stores/PaymethodOptionStripeRedirect/index.js +23 -3
  120. package/_modules/components/Stores/ProductDetails/index.js +18 -1
  121. package/_modules/components/Stores/ProductExtras/index.js +25 -2
  122. package/_modules/components/Stores/ProductIngredient/index.js +23 -1
  123. package/_modules/components/Stores/ProductMainDetails/index.js +18 -1
  124. package/_modules/components/Stores/ProductTagsList/index.js +28 -2
  125. package/_modules/components/Users/CustomerCashWallet/index.js +22 -2
  126. package/_modules/components/Users/CustomerDetails/index.js +19 -1
  127. package/_modules/components/Users/CustomerPointsWallet/index.js +22 -2
  128. package/_modules/components/Users/CustomersListing/index.js +8 -3
  129. package/_modules/components/Users/ProfessionalDetail/index.js +25 -1
  130. package/_modules/components/Users/ProfessionalListing/index.js +8 -3
  131. package/_modules/components/Users/UserActiveStateFilter/index.js +18 -4
  132. package/_modules/components/Users/UserDetails/index.js +27 -1
  133. package/_modules/components/Users/UsersListing/index.js +8 -3
  134. package/package.json +2 -2
  135. package/src/components/BusinessIntelligence/BusinessReviewDetails/index.js +4 -4
  136. package/src/components/BusinessIntelligence/BusinessReviewList/index.js +29 -6
  137. package/src/components/BusinessIntelligence/InvoiceBusinessManager/index.js +17 -1
  138. package/src/components/BusinessIntelligence/InvoiceDriverManager/index.js +17 -1
  139. package/src/components/BusinessIntelligence/InvoiceManager/index.js +16 -2
  140. package/src/components/BusinessIntelligence/InvoiceOrdertype/styles.js +1 -0
  141. package/src/components/BusinessIntelligence/ProductReviewDetails/index.js +4 -4
  142. package/src/components/BusinessIntelligence/Reports/index.js +16 -2
  143. package/src/components/BusinessIntelligence/ReviewProductsListing/index.js +34 -6
  144. package/src/components/BusinessIntelligence/ReviewsListing/index.js +31 -5
  145. package/src/components/BusinessIntelligence/UserReviewDetails/index.js +4 -4
  146. package/src/components/BusinessIntelligence/UsersReviewList/index.js +32 -11
  147. package/src/components/CartRecovery/RecoveryActionDetail/index.js +19 -1
  148. package/src/components/CartRecovery/RecoveryActionListing/index.js +21 -3
  149. package/src/components/Delivery/DeliveryUsersListing/index.js +3 -1
  150. package/src/components/Delivery/DriversCompaniesListing/index.js +27 -9
  151. package/src/components/Delivery/DriversCompanyDetailsForm/index.js +37 -8
  152. package/src/components/Delivery/DriversGroupDetails/index.js +36 -4
  153. package/src/components/Delivery/DriversGroupLogistics/index.js +18 -2
  154. package/src/components/Delivery/DriversGroupsListing/index.js +20 -6
  155. package/src/components/Delivery/UserDetails/index.js +26 -1
  156. package/src/components/Loyalty/GiftCardDetail/styles.js +192 -0
  157. package/src/components/Loyalty/GiftCards/index.js +22 -2
  158. package/src/components/Loyalty/PointsWalletBusinessList/index.js +24 -1
  159. package/src/components/Loyalty/PointsWalletLevels/index.js +21 -1
  160. package/src/components/Loyalty/RewardsPrograms/index.js +30 -3
  161. package/src/components/Loyalty/Wallet/index.js +22 -1
  162. package/src/components/Marketing/AdBannersListing/index.js +25 -8
  163. package/src/components/Marketing/BannerImageDetails/index.js +2 -1
  164. package/src/components/Marketing/CampaignDetail/index.js +22 -1
  165. package/src/components/Marketing/CampaignEmail/styles.js +3 -0
  166. package/src/components/Marketing/CampaignListing/index.js +18 -1
  167. package/src/components/Marketing/CampaignNotification/styles.js +3 -0
  168. package/src/components/Marketing/CampaignSMS/styles.js +3 -0
  169. package/src/components/Marketing/EnterprisePromotionGeneralDetails/index.js +2 -1
  170. package/src/components/Marketing/EnterprisePromotionListing/index.js +19 -1
  171. package/src/components/Marketing/PageBanner/index.js +26 -3
  172. package/src/components/Messages/MessagesListing/index.js +17 -0
  173. package/src/components/MyProducts/AdvancedSettings/FontStyleGroup.js +64 -0
  174. package/src/components/MyProducts/AdvancedSettings/OrderType.js +40 -0
  175. package/src/components/MyProducts/AdvancedSettings/SettingComponent.js +104 -0
  176. package/src/components/MyProducts/AdvancedSettings/index.js +541 -0
  177. package/src/components/MyProducts/AdvancedSettings/styles.js +388 -0
  178. package/src/components/MyProducts/AppLayout/index.js +19 -2
  179. package/src/components/MyProducts/AppLayout/styles.js +65 -0
  180. package/src/components/MyProducts/CallCenterApp/index.js +1 -1
  181. package/src/components/MyProducts/CustomerApp/index.js +2 -2
  182. package/src/components/MyProducts/DriverApp/index.js +2 -2
  183. package/src/components/MyProducts/KioskApp/index.js +1 -1
  184. package/src/components/MyProducts/OrderingWebsite/index.js +309 -255
  185. package/src/components/MyProducts/OrderingWebsite/styles.js +99 -2
  186. package/src/components/MyProducts/PosApp/index.js +1 -1
  187. package/src/components/MyProducts/StoreApp/index.js +2 -2
  188. package/src/components/OrderingProducts/OrderingProductDetails/index.js +24 -2
  189. package/src/components/OrderingProducts/OrderingProductsListing/index.js +17 -1
  190. package/src/components/Orders/DeliveriesManager/index.js +0 -1
  191. package/src/components/Orders/Messages/index.js +31 -11
  192. package/src/components/Orders/OrderDetails/index.js +34 -20
  193. package/src/components/Orders/OrderDetailsHeader/index.js +2 -3
  194. package/src/components/Orders/OrdersContentHeader/index.js +1 -1
  195. package/src/components/Orders/OrdersFilterGroup/index.js +111 -13
  196. package/src/components/Orders/OrdersFilterGroup/styles.js +26 -0
  197. package/src/components/Orders/OrdersManager/index.js +0 -1
  198. package/src/components/Settings/CountriesList/index.js +26 -6
  199. package/src/components/Settings/Deliverect/index.js +26 -2
  200. package/src/components/Settings/DoordashConnect/index.js +26 -2
  201. package/src/components/Settings/DropdownOptionList/index.js +27 -6
  202. package/src/components/Settings/IntegrationListing/index.js +3 -3
  203. package/src/components/Settings/ItsaCheckmate/index.js +26 -2
  204. package/src/components/Settings/LalamoveConnect/index.js +26 -2
  205. package/src/components/Settings/PickerExpress/index.js +26 -2
  206. package/src/components/Settings/PlaceListing/index.js +38 -6
  207. package/src/components/Settings/Settings/index.js +79 -37
  208. package/src/components/Settings/SettingsDetail/index.js +15 -1
  209. package/src/components/Settings/SitesAuthSettings/index.js +18 -1
  210. package/src/components/SidebarMenu/index.js +0 -2
  211. package/src/components/Stores/BusinessAdd/BusinessDetails/index.js +1 -10
  212. package/src/components/Stores/BusinessAdd/BusinessDetails/styles.js +4 -0
  213. package/src/components/Stores/BusinessAdd/DeliveryZone/index.js +120 -109
  214. package/src/components/Stores/BusinessAdd/DeliveryZone/styles.js +22 -1
  215. package/src/components/Stores/BusinessAdd/PaymentMethods/index.js +8 -2
  216. package/src/components/Stores/BusinessAdd/PaymentMethods/styles.js +4 -0
  217. package/src/components/Stores/BusinessAdd/ReceiveOrders/index.js +11 -6
  218. package/src/components/Stores/BusinessAdd/ReceiveOrders/styles.js +4 -0
  219. package/src/components/Stores/BusinessAdd/index.js +47 -16
  220. package/src/components/Stores/BusinessAdd/styles.js +27 -1
  221. package/src/components/Stores/BusinessAddStore/index.js +1 -1
  222. package/src/components/Stores/BusinessBrandListing/index.js +37 -4
  223. package/src/components/Stores/BusinessDeliveryPickupMore/index.js +22 -1
  224. package/src/components/Stores/BusinessDeliveryZoneDetails/index.js +25 -2
  225. package/src/components/Stores/BusinessDeliveryZoneList/index.js +30 -3
  226. package/src/components/Stores/BusinessDetail/index.js +20 -1
  227. package/src/components/Stores/BusinessDetails/index.js +18 -1
  228. package/src/components/Stores/BusinessFrontLayout/index.js +13 -1
  229. package/src/components/Stores/BusinessFrontLayout/styles.js +11 -0
  230. package/src/components/Stores/BusinessMenu/index.js +56 -11
  231. package/src/components/Stores/BusinessMenuOptions/index.js +28 -3
  232. package/src/components/Stores/BusinessOrderingChannels/index.js +19 -2
  233. package/src/components/Stores/BusinessPaymentMethods/index.js +24 -2
  234. package/src/components/Stores/BusinessPlaceGroupList/index.js +193 -0
  235. package/src/components/Stores/BusinessPlaceGroupList/styles.js +143 -0
  236. package/src/components/Stores/BusinessProductsCategoyDetails/index.js +21 -1
  237. package/src/components/Stores/BusinessProductsListing/index.js +49 -8
  238. package/src/components/Stores/BusinessPromotionGeneralForm/index.js +2 -2
  239. package/src/components/Stores/BusinessSharedMenuProducts/index.js +29 -3
  240. package/src/components/Stores/BusinessSync/index.js +18 -2
  241. package/src/components/Stores/BusinessTypes/index.js +26 -4
  242. package/src/components/Stores/BusinessWalletsList/index.js +23 -1
  243. package/src/components/Stores/BusinessesListing/index.js +11 -2
  244. package/src/components/Stores/ImportersButton/index.js +24 -3
  245. package/src/components/Stores/PaymentOption/index.js +29 -8
  246. package/src/components/Stores/PaymentOptionMethods/index.js +25 -3
  247. package/src/components/Stores/PaymentOptionPaypal/index.js +25 -3
  248. package/src/components/Stores/PaymentOptionSquare/index.js +25 -3
  249. package/src/components/Stores/PaymentOptionStripeDirect/index.js +25 -3
  250. package/src/components/Stores/PaymethodOptionPaypalExpress/index.js +25 -3
  251. package/src/components/Stores/PaymethodOptionStripeConnect/index.js +25 -3
  252. package/src/components/Stores/PaymethodOptionStripeRedirect/index.js +25 -3
  253. package/src/components/Stores/ProductDetails/index.js +19 -1
  254. package/src/components/Stores/ProductExtras/index.js +23 -2
  255. package/src/components/Stores/ProductIngredient/index.js +23 -2
  256. package/src/components/Stores/ProductMainDetails/index.js +20 -2
  257. package/src/components/Stores/ProductTagsList/index.js +28 -3
  258. package/src/components/Users/CustomerCashWallet/index.js +25 -3
  259. package/src/components/Users/CustomerDetails/index.js +20 -1
  260. package/src/components/Users/CustomerPointsWallet/index.js +25 -3
  261. package/src/components/Users/CustomersListing/index.js +9 -4
  262. package/src/components/Users/ProfessionalDetail/index.js +27 -1
  263. package/src/components/Users/ProfessionalListing/index.js +9 -4
  264. package/src/components/Users/UserActiveStateFilter/index.js +16 -3
  265. package/src/components/Users/UserDetails/index.js +27 -1
  266. package/src/components/Users/UsersListing/index.js +9 -4
  267. package/template/pages/BusinessProductsList/index.js +1 -1
  268. /package/_bundles/{ordering-ui-admin.e2a58dcc95d6a983dfc0.js.LICENSE.txt → ordering-ui-admin.7c0f4e22698e5dbd9b25.js.LICENSE.txt} +0 -0
@@ -1,4 +1,5 @@
1
1
  import React, { useState, useEffect } from 'react'
2
+ import { useHistory, useLocation } from 'react-router-dom'
2
3
  import { useLanguage, RecoveryActionDetail as RecoveryActionDetailController } from 'ordering-components-admin-external'
3
4
  import { Alert, Confirm } from '../../Shared'
4
5
  import { Dropdown, DropdownButton } from 'react-bootstrap'
@@ -30,6 +31,8 @@ const RecoveryActionDetailUI = (props) => {
30
31
  handleDeleteRecoveryAction
31
32
  } = props
32
33
 
34
+ const history = useHistory()
35
+ const query = new URLSearchParams(useLocation().search)
33
36
  const theme = useTheme()
34
37
  const [, t] = useLanguage()
35
38
  const { width } = useWindowSize()
@@ -44,7 +47,7 @@ const RecoveryActionDetailUI = (props) => {
44
47
  { key: 'notifications', name: t('NOTIFICATIONS', 'Notifications') }
45
48
  ]
46
49
 
47
- const handleSelectOption = (key) => {
50
+ const handleSelectOption = (key, isInitialRender) => {
48
51
  if (key === 'notifications' && isAddMode) {
49
52
  setAlertState({
50
53
  open: true,
@@ -53,6 +56,10 @@ const RecoveryActionDetailUI = (props) => {
53
56
  return
54
57
  }
55
58
  setSelectedOption(key)
59
+ if (!isInitialRender) {
60
+ const id = query.get('id')
61
+ history.replace(`${location.pathname}?id=${id}&tab=${key}`)
62
+ }
56
63
  }
57
64
 
58
65
  const closeAlert = () => {
@@ -88,6 +95,16 @@ const RecoveryActionDetailUI = (props) => {
88
95
  })
89
96
  }, [actionState])
90
97
 
98
+ useEffect(() => {
99
+ if (Object.keys(recoveryActionState.action).length === 0) return
100
+ const tab = query.get('tab')
101
+ if (tab) {
102
+ handleSelectOption(tab, true)
103
+ } else {
104
+ handleSelectOption(selectedOption)
105
+ }
106
+ }, [recoveryActionState.action])
107
+
91
108
  return (
92
109
  <>
93
110
  <RecoveryActionDetailContainer>
@@ -151,6 +168,7 @@ const RecoveryActionDetailUI = (props) => {
151
168
  {selectedOption === 'notifications' && (
152
169
  <RecoveryNotificationList
153
170
  {...props}
171
+ action={recoveryActionState.action}
154
172
  />
155
173
  )}
156
174
  </RecoveryActionDetailContainer>
@@ -1,4 +1,5 @@
1
- import React, { useState } from 'react'
1
+ import React, { useEffect, useState } from 'react'
2
+ import { useHistory, useLocation } from 'react-router-dom'
2
3
  import { RecoveryActionListing as RecoveryActionListingController } from 'ordering-components-admin-external'
3
4
  import { RecoveryActionHeader } from '../RecoveryActionHeader'
4
5
  import { RecoveryActionList } from '../RecoveryActionList'
@@ -10,19 +11,36 @@ import {
10
11
  } from './styles'
11
12
 
12
13
  const RecoveryActionListingUI = (props) => {
14
+ const history = useHistory()
15
+ const query = new URLSearchParams(useLocation().search)
13
16
  const [isOpenDetail, setIsOpenDetail] = useState(false)
14
17
  const [selectedAction, setSelectedAction] = useState(null)
18
+ const [selectedActionId, setSelectedActionId] = useState(null)
15
19
 
16
20
  const handleCloseDetail = () => {
17
21
  setIsOpenDetail(false)
18
22
  setSelectedAction(null)
23
+ history.replace(`${location.pathname}`)
19
24
  }
20
25
 
21
- const handleOpenDetail = (action) => {
26
+ const handleOpenDetail = (action, isInitialRender) => {
22
27
  setSelectedAction(action)
28
+ setSelectedActionId(action?.id)
23
29
  setIsOpenDetail(true)
30
+ if (action && !isInitialRender) {
31
+ history.replace(`${location.pathname}?id=${action.id}`)
32
+ }
24
33
  }
25
34
 
35
+ useEffect(() => {
36
+ const id = query.get('id')
37
+ if (id) {
38
+ setSelectedAction({})
39
+ setSelectedActionId(Number(id))
40
+ setIsOpenDetail(true)
41
+ }
42
+ }, [])
43
+
26
44
  return (
27
45
  <>
28
46
  <RecoveryActionsContainer>
@@ -38,7 +56,6 @@ const RecoveryActionListingUI = (props) => {
38
56
  </RecoveryActionsContainer>
39
57
  {isOpenDetail && (
40
58
  <SideBar
41
- sidebarId='loyaltyWallet'
42
59
  open={isOpenDetail}
43
60
  onClose={() => handleCloseDetail()}
44
61
  defaultSideBarWidth={550}
@@ -46,6 +63,7 @@ const RecoveryActionListingUI = (props) => {
46
63
  <RecoveryActionDetail
47
64
  {...props}
48
65
  action={selectedAction}
66
+ actionId={selectedActionId}
49
67
  onClose={() => handleCloseDetail()}
50
68
  />
51
69
  </SideBar>
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useEffect } from 'react'
2
- import { useLocation } from 'react-router-dom'
2
+ import { useHistory, useLocation } from 'react-router-dom'
3
3
  import { UsersList as UsersListController } from 'ordering-components-admin-external'
4
4
  import { getStorageItem, removeStorageItem, setStorageItem } from '../../../utils'
5
5
 
@@ -50,6 +50,7 @@ const DeliveryUsersListingUI = (props) => {
50
50
  handleSuccessDeleteUser
51
51
  } = props
52
52
 
53
+ const history = useHistory()
53
54
  const query = new URLSearchParams(useLocation().search)
54
55
  const [queryId, setQueryId] = useState(null)
55
56
  const [isOpenUserDetails, setIsOpenUserDetails] = useState(false)
@@ -71,6 +72,7 @@ const DeliveryUsersListingUI = (props) => {
71
72
  setOpenUser(user)
72
73
  setOpenUserAddForm(false)
73
74
  setIsOpenUserDetails(true)
75
+ history.replace(`${location.pathname}?id=${user.id}`)
74
76
  }
75
77
 
76
78
  const handleOpenUserAddForm = () => {
@@ -1,4 +1,5 @@
1
1
  import React, { useState, useEffect } from 'react'
2
+ import { useHistory, useLocation } from 'react-router-dom'
2
3
  import {
3
4
  useLanguage,
4
5
  DriversCompaniesList as DriversCompaniesListController
@@ -32,16 +33,23 @@ const DriversCompaniesListingUI = (props) => {
32
33
  handleDeleteSelectedCompanies
33
34
  } = props
34
35
 
36
+ const history = useHistory()
37
+ const query = new URLSearchParams(useLocation().search)
35
38
  const [, t] = useLanguage()
36
39
  const [{ isCollapse }, { handleMenuCollapse }] = useInfoShare()
37
40
  const [searchValue, setSearchValue] = useState(null)
38
41
  const [curDriversCompany, setCurDriversCompany] = useState(null)
42
+ const [curDriversCompanyId, setCurDriversCompanyId] = useState(null)
39
43
  const [alertState, setAlertState] = useState({ open: false, content: [] })
40
44
  const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
41
45
 
42
- const handleOpenDetails = (driverCompany) => {
46
+ const handleOpenDetails = (driverCompany, isInitialRender) => {
43
47
  setCurDriversCompany(driverCompany)
48
+ setCurDriversCompanyId(driverCompany?.id)
44
49
  setOpenDetails(true)
50
+ if (!isInitialRender) {
51
+ history.replace(`${location.pathname}?id=${driverCompany?.id}`)
52
+ }
45
53
  }
46
54
 
47
55
  useEffect(() => {
@@ -63,6 +71,21 @@ const DriversCompaniesListingUI = (props) => {
63
71
  })
64
72
  }
65
73
 
74
+ const handleCloseDetails = () => {
75
+ setCurDriversCompany(null)
76
+ setCurDriversCompanyId(null)
77
+ setOpenDetails(false)
78
+ history.replace(`${location.pathname}`)
79
+ }
80
+
81
+ useEffect(() => {
82
+ const id = query.get('id')
83
+ if (id) {
84
+ setCurDriversCompanyId(Number(id))
85
+ setOpenDetails(true)
86
+ }
87
+ }, [])
88
+
66
89
  return (
67
90
  <DriversCompaniesListContainer>
68
91
  <HeaderContainer>
@@ -117,19 +140,14 @@ const DriversCompaniesListingUI = (props) => {
117
140
  sidebarId='city-details'
118
141
  defaultSideBarWidth={550}
119
142
  open={openDetails}
120
- onClose={() => {
121
- setCurDriversCompany(null)
122
- setOpenDetails(false)
123
- }}
143
+ onClose={() => handleCloseDetails()}
124
144
  >
125
145
  <DriversCompanyDetailsForm
126
146
  driversCompaniesState={driversCompaniesState}
127
147
  setDriversCompaniesState={setDriversCompaniesState}
128
148
  driversCompany={curDriversCompany}
129
- onClose={() => {
130
- setCurDriversCompany(null)
131
- setOpenDetails(false)
132
- }}
149
+ driversCompanyId={curDriversCompanyId}
150
+ onClose={() => handleCloseDetails()}
133
151
  />
134
152
  </SideBar>
135
153
  )}
@@ -1,4 +1,5 @@
1
1
  import React, { useState, useEffect } from 'react'
2
+ import { useHistory, useLocation } from 'react-router-dom'
2
3
  import {
3
4
  useLanguage,
4
5
  DriversCompanyDetails as DriversCompanyDetailsController
@@ -25,13 +26,15 @@ import { useWindowSize } from '../../../hooks/useWindowSize'
25
26
 
26
27
  const DriversCompanyDetailsFormUI = (props) => {
27
28
  const {
28
- driversCompany,
29
+ companyState,
29
30
  changesState,
30
31
  actionState,
31
32
  cleanActionState,
32
33
  handleDeleteDriversCompany
33
34
  } = props
34
35
 
36
+ const history = useHistory()
37
+ const query = new URLSearchParams(useLocation().search)
35
38
  const [, t] = useLanguage()
36
39
  const theme = useTheme()
37
40
  const { width } = useWindowSize()
@@ -82,14 +85,31 @@ const DriversCompanyDetailsFormUI = (props) => {
82
85
  }
83
86
  }, [actionState])
84
87
 
88
+ const handleTabClick = (tab, isInitialRender) => {
89
+ setCurrentTabItem(tab)
90
+ if (!isInitialRender) {
91
+ const id = query.get('id')
92
+ history.replace(`${location.pathname}?id=${id}&tab=${tab}`)
93
+ }
94
+ }
95
+
96
+ useEffect(() => {
97
+ const tab = query.get('tab')
98
+ if (tab) {
99
+ handleTabClick(tab, true)
100
+ } else {
101
+ handleTabClick(currentTabItem)
102
+ }
103
+ }, [])
104
+
85
105
  return (
86
106
  <>
87
107
  <DetailsContainer>
88
108
  <Header>
89
109
  <h1>
90
110
  {
91
- driversCompany
92
- ? changesState?.name ?? driversCompany?.name ?? ''
111
+ companyState.company
112
+ ? changesState?.name ?? companyState.company?.name ?? ''
93
113
  : t('DRIVER_COMPANY_SETTINGS', 'Driver company settings')
94
114
  }
95
115
  </h1>
@@ -102,7 +122,7 @@ const DriversCompanyDetailsFormUI = (props) => {
102
122
  {isExpand ? <ArrowsAngleContract /> : <ArrowsAngleExpand />}
103
123
  </IconButton>
104
124
  )}
105
- {driversCompany && (
125
+ {companyState.company && (
106
126
  <ActionSelectorWrapper>
107
127
  <DropdownButton
108
128
  menuAlign={theme?.rtl ? 'left' : 'right'}
@@ -125,7 +145,7 @@ const DriversCompanyDetailsFormUI = (props) => {
125
145
  <Tab
126
146
  key={item.key}
127
147
  active={item.key === currentTabItem}
128
- onClick={() => setCurrentTabItem(item.key)}
148
+ onClick={() => handleTabClick(item.key)}
129
149
  >
130
150
  {item.content}
131
151
  </Tab>
@@ -134,13 +154,22 @@ const DriversCompanyDetailsFormUI = (props) => {
134
154
  </TabsContainer>
135
155
 
136
156
  {currentTabItem === 'general' && (
137
- <DriversCompanyGeneralDetails {...props} />
157
+ <DriversCompanyGeneralDetails
158
+ {...props}
159
+ driversCompany={companyState.company}
160
+ />
138
161
  )}
139
162
  {currentTabItem === 'schedule' && (
140
- <DriversCompanyScheduleDetails {...props} />
163
+ <DriversCompanyScheduleDetails
164
+ {...props}
165
+ driversCompany={companyState.company}
166
+ />
141
167
  )}
142
168
  {currentTabItem === 'webhooks' && (
143
- <DriversCompanyWebhooksDetails {...props} />
169
+ <DriversCompanyWebhooksDetails
170
+ {...props}
171
+ driversCompany={companyState.company}
172
+ />
144
173
  )}
145
174
 
146
175
  </DetailsContainer>
@@ -1,4 +1,5 @@
1
1
  import React, { useEffect, useState } from 'react'
2
+ import { useHistory, useLocation } from 'react-router-dom'
2
3
  import {
3
4
  useLanguage,
4
5
  useConfig,
@@ -37,6 +38,8 @@ const DriversGroupDetailsUI = (props) => {
37
38
  setIsExtendExtraOpen
38
39
  } = props
39
40
 
41
+ const history = useHistory()
42
+ const query = new URLSearchParams(useLocation().search)
40
43
  const theme = useTheme()
41
44
  const [, t] = useLanguage()
42
45
  const { width } = useWindowSize()
@@ -123,6 +126,24 @@ const DriversGroupDetailsUI = (props) => {
123
126
  })
124
127
  }, [actionState?.error])
125
128
 
129
+ const handleTabClick = (tab, isInitialRender) => {
130
+ setShowMenu(tab)
131
+ if (!isInitialRender) {
132
+ const id = query.get('id')
133
+ history.replace(`${location.pathname}?id=${id}&tab=${tab}`)
134
+ }
135
+ }
136
+
137
+ useEffect(() => {
138
+ if (driversGroupState.loading) return
139
+ const tab = query.get('tab')
140
+ if (tab) {
141
+ handleTabClick(tab, true)
142
+ } else {
143
+ handleTabClick(showMenu)
144
+ }
145
+ }, [driversGroupState.loading])
146
+
126
147
  return (
127
148
  <>
128
149
  <DetailsContainer>
@@ -182,7 +203,7 @@ const DriversGroupDetailsUI = (props) => {
182
203
  <Tab
183
204
  key={menu.key}
184
205
  active={menu.key === showMenu}
185
- onClick={() => setShowMenu(menu.key)}
206
+ onClick={() => handleTabClick(menu.key)}
186
207
  >
187
208
  {menu.value}
188
209
  </Tab>
@@ -192,19 +213,29 @@ const DriversGroupDetailsUI = (props) => {
192
213
  {(showMenu === 'general') && (
193
214
  <DriversGroupGeneralForm
194
215
  {...props}
216
+ curDriversGroup={driversGroupState.driversGroup}
195
217
  useAdvanced={useAdvanced}
196
218
  setUseAdvanced={setUseAdvanced}
197
219
  handleNextClick={handleNextClick}
198
220
  />
199
221
  )}
200
222
  {showMenu === 'businesses' && (
201
- <DriversGroupBusinesses {...props} />
223
+ <DriversGroupBusinesses
224
+ {...props}
225
+ curDriversGroup={driversGroupState.driversGroup}
226
+ />
202
227
  )}
203
228
  {showMenu === 'paymethods' && (
204
- <DriversGroupPaymethods {...props} />
229
+ <DriversGroupPaymethods
230
+ {...props}
231
+ curDriversGroup={driversGroupState.driversGroup}
232
+ />
205
233
  )}
206
234
  {showMenu === 'advanced_logistics' && (
207
- <DriversGroupLogistics {...props} />
235
+ <DriversGroupLogistics
236
+ {...props}
237
+ curDriversGroup={driversGroupState.driversGroup}
238
+ />
208
239
  )}
209
240
  {showMenu === 'logs' && (
210
241
  <DriversGroupLogs driversGroupId={driversGroupState.driversGroup?.id} />
@@ -212,6 +243,7 @@ const DriversGroupDetailsUI = (props) => {
212
243
  {showMenu === 'delivery_zones' && (
213
244
  <DriverGroupDeliveryDetails
214
245
  {...props}
246
+ curDriversGroup={driversGroupState.driversGroup}
215
247
  handleParentSidebarMove={handleParentSidebarMove}
216
248
  drivergroup={driversGroupState.driversGroup}
217
249
  setIsExtendExtraOpen={setIsExtendExtraOpen}
@@ -1,4 +1,5 @@
1
1
  import React, { useState, useEffect } from 'react'
2
+ import { useHistory, useLocation } from 'react-router-dom'
2
3
  import { useLanguage } from 'ordering-components-admin-external'
3
4
  import { Circle, RecordCircleFill, ChevronRight } from 'react-bootstrap-icons'
4
5
  import { useWindowSize } from '../../../hooks/useWindowSize'
@@ -25,18 +26,26 @@ export const DriversGroupLogistics = (props) => {
25
26
  handleUpdateDriversGroup
26
27
  } = props
27
28
 
29
+ const history = useHistory()
30
+ const query = new URLSearchParams(useLocation().search)
28
31
  const [, t] = useLanguage()
29
32
  const { width } = useWindowSize()
30
33
 
31
34
  const [showConfig, setShowConfig] = useState(null)
32
35
  const [openConfig, setOpenConfig] = useState(false)
33
36
 
34
- const handleOpenConfig = (option) => {
37
+ const handleOpenConfig = (option, isInitialRender) => {
35
38
  setShowConfig(option)
36
39
  setOpenConfig(true)
37
40
  if (width >= 1200) {
38
41
  handleParentSidebarMove(700)
39
42
  }
43
+
44
+ if (!isInitialRender) {
45
+ const id = query.get('id')
46
+ const tab = query.get('tab')
47
+ history.replace(`${location.pathname}?id=${id}&tab=${tab}&config=${option}`)
48
+ }
40
49
  }
41
50
 
42
51
  const handleCloseSidebar = () => {
@@ -57,6 +66,13 @@ export const DriversGroupLogistics = (props) => {
57
66
  setOpenConfig(false)
58
67
  }, [driversGroupState.driversGroup?.id])
59
68
 
69
+ useEffect(() => {
70
+ const config = query.get('config')
71
+ if (config) {
72
+ handleOpenConfig(config, true)
73
+ }
74
+ }, [])
75
+
60
76
  return (
61
77
  <LogisticsContainer>
62
78
  <OrderStatusWrapper
@@ -109,7 +125,7 @@ export const DriversGroupLogistics = (props) => {
109
125
  <LogisticsConfigItem
110
126
  active={showConfig === 'GROUP_ORDERS'}
111
127
  onClick={() => handleOpenConfig('GROUP_ORDERS')}
112
- >
128
+ >a
113
129
  <span>{t('GROUP_ORDERS', 'Group Orders')}</span>
114
130
  <ChevronRight />
115
131
  </LogisticsConfigItem>
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useEffect } from 'react'
2
- import { useHistory } from 'react-router-dom'
2
+ import { useHistory, useLocation } from 'react-router-dom'
3
3
  import { useLanguage, DriversGroupsList as DriversGroupsListController } from 'ordering-components-admin-external'
4
4
  import { List as MenuIcon, LifePreserver } from 'react-bootstrap-icons'
5
5
  import { OverlayTrigger, Tooltip } from 'react-bootstrap'
@@ -37,6 +37,7 @@ const DriversGroupsListingUI = (props) => {
37
37
  } = props
38
38
 
39
39
  const history = useHistory()
40
+ const query = new URLSearchParams(useLocation().search)
40
41
  const [, t] = useLanguage()
41
42
  const [{ isCollapse }, { handleMenuCollapse }] = useInfoShare()
42
43
  const [searchValue, setSearchValue] = useState(null)
@@ -45,6 +46,7 @@ const DriversGroupsListingUI = (props) => {
45
46
  const [moveDistance, setMoveDistance] = useState(0)
46
47
  const [openDetails, setOpenDetails] = useState(false)
47
48
  const [curDriversGroup, setCurDriversGroup] = useState(null)
49
+ const [curDriversGroupId, setCurDriversGroupId] = useState(null)
48
50
  const [isExtendExtraOpen, setIsExtendExtraOpen] = useState(false)
49
51
 
50
52
  const [isTourOpen, setIsTourOpen] = useState(false)
@@ -59,6 +61,8 @@ const DriversGroupsListingUI = (props) => {
59
61
  setTimeout(() => {
60
62
  setCurrentTourStep(5)
61
63
  }, 50)
64
+ } else {
65
+ history.replace(`${location.pathname}?id=${driverGroup.id}`)
62
66
  }
63
67
  }
64
68
 
@@ -112,8 +116,21 @@ const DriversGroupsListingUI = (props) => {
112
116
  handleOpenTour()
113
117
  }
114
118
  }
119
+
120
+ const handleCloseDetail = () => {
121
+ setCurDriversGroup(null)
122
+ setOpenDetails(false)
123
+ setIsTourOpen(false)
124
+ history.replace(`${location.pathname}`)
125
+ }
126
+
115
127
  useEffect(() => {
116
128
  getDataFromStorage()
129
+ const id = query.get('id')
130
+ if (id) {
131
+ setCurDriversGroupId(Number(id))
132
+ setOpenDetails(true)
133
+ }
117
134
  }, [])
118
135
 
119
136
  return (
@@ -191,16 +208,13 @@ const DriversGroupsListingUI = (props) => {
191
208
  open={openDetails}
192
209
  moveDistance={moveDistance}
193
210
  noAnimation={isTourOpen}
194
- onClose={() => {
195
- setCurDriversGroup(null)
196
- setOpenDetails(false)
197
- setIsTourOpen(false)
198
- }}
211
+ onClose={() => handleCloseDetail()}
199
212
  >
200
213
  <DriversGroupDetails
201
214
  driversGroupsState={driversGroupsState}
202
215
  setDriversGroupsState={setDriversGroupsState}
203
216
  curDriversGroup={curDriversGroup}
217
+ driversGroupId={curDriversGroupId}
204
218
  driversManagers={driversManagersList?.managers}
205
219
  businesses={businessesList?.businesses}
206
220
  paymethods={paymethodsList?.paymethods}
@@ -1,4 +1,5 @@
1
1
  import React, { useEffect, useState } from 'react'
2
+ import { useHistory, useLocation } from 'react-router-dom'
2
3
  import Skeleton from 'react-loading-skeleton'
3
4
  import { useTheme } from 'styled-components'
4
5
  import { Dropdown, DropdownButton } from 'react-bootstrap'
@@ -38,6 +39,8 @@ export const UserDetailsUI = (props) => {
38
39
  handleScheduleUpdateUser
39
40
  } = props
40
41
 
42
+ const history = useHistory()
43
+ const query = new URLSearchParams(useLocation().search)
41
44
  const theme = useTheme()
42
45
  const [, t] = useLanguage()
43
46
  const { width } = useWindowSize()
@@ -58,6 +61,28 @@ export const UserDetailsUI = (props) => {
58
61
  setExtraOpen(false)
59
62
  }, [currentMenuSelected])
60
63
 
64
+ const handleTabClick = (tab, isInitialRender) => {
65
+ setCurrentMenuSelected(tab)
66
+ if (!isInitialRender) {
67
+ const id = query.get('id')
68
+ const section = query.get('section')
69
+ if (section) {
70
+ history.replace(`${location.pathname}?id=${id}&section=${section}&tab=${tab}`)
71
+ } else {
72
+ history.replace(`${location.pathname}?id=${id}&tab=${tab}`)
73
+ }
74
+ }
75
+ }
76
+
77
+ useEffect(() => {
78
+ const tab = query.get('tab')
79
+ if (tab) {
80
+ handleTabClick(tab, true)
81
+ } else {
82
+ handleTabClick(currentMenuSelected)
83
+ }
84
+ }, [])
85
+
61
86
  return (
62
87
  <>
63
88
  <DetailsHeader>
@@ -114,7 +139,7 @@ export const UserDetailsUI = (props) => {
114
139
  <UserDetailsMenu
115
140
  isDriverMenu={isDriversPage}
116
141
  currentMenuSelected={currentMenuSelected}
117
- handleChangeMenu={setCurrentMenuSelected}
142
+ handleChangeMenu={handleTabClick}
118
143
  />
119
144
  {!userState?.loading && userState?.user && (
120
145
  <>