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
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.BusinessProductsListing = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
+ var _reactRouterDom = require("react-router-dom");
9
10
  var _reactLoadingSkeleton = _interopRequireDefault(require("react-loading-skeleton"));
10
11
  var _BisDownArrow = _interopRequireDefault(require("@meronex/icons/bi/BisDownArrow"));
11
12
  var _useWindowSize2 = require("../../../hooks/useWindowSize");
@@ -29,6 +30,7 @@ var _reactBootstrap = require("react-bootstrap");
29
30
  var _ImportersButton = require("../ImportersButton");
30
31
  var _AddBusinessForm = require("../AddBusinessForm");
31
32
  var _ProductStep = require("../ProductStep");
33
+ var _BusinessAddStore = require("../BusinessAddStore");
32
34
  var _styles2 = require("./styles");
33
35
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
34
36
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -46,7 +48,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
46
48
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
47
49
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
48
50
  var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
49
- var _businessState$busine5, _businessState$busine9, _businessState$busine10, _businessState$busine11, _businessState$busine12, _businessState$busine13;
51
+ var _businessState$busine5, _businessState$busine15, _businessState$busine16, _businessState$busine17, _businessState$busine18, _businessState$busine19;
50
52
  var categorySelected = props.categorySelected,
51
53
  searchValue = props.searchValue,
52
54
  handleChangeCategory = props.handleChangeCategory,
@@ -73,6 +75,8 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
73
75
  getBusiness = props.getBusiness,
74
76
  businessTypes = props.businessTypes,
75
77
  setBusinessTypes = props.setBusinessTypes;
78
+ var history = (0, _reactRouterDom.useHistory)();
79
+ var query = new URLSearchParams((0, _reactRouterDom.useLocation)().search);
76
80
  var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
77
81
  _useLanguage2 = _slicedToArray(_useLanguage, 2),
78
82
  t = _useLanguage2[1];
@@ -122,7 +126,11 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
122
126
  _useState18 = _slicedToArray(_useState17, 2),
123
127
  showPopup = _useState18[0],
124
128
  setShowPopup = _useState18[1];
125
- var _useState19 = (0, _react.useState)({
129
+ var _useState19 = (0, _react.useState)(false),
130
+ _useState20 = _slicedToArray(_useState19, 2),
131
+ isAdd = _useState20[0],
132
+ setIsAdd = _useState20[1];
133
+ var _useState21 = (0, _react.useState)({
126
134
  id: true,
127
135
  name: true,
128
136
  description: true,
@@ -131,9 +139,9 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
131
139
  inventoried: true,
132
140
  quantity: true
133
141
  }),
134
- _useState20 = _slicedToArray(_useState19, 2),
135
- allowSpreadColumns = _useState20[0],
136
- setAllowSpreadColumns = _useState20[1];
142
+ _useState22 = _slicedToArray(_useState21, 2),
143
+ allowSpreadColumns = _useState22[0],
144
+ setAllowSpreadColumns = _useState22[1];
137
145
  var spreadColumnOptions = [{
138
146
  value: 'cost_price',
139
147
  content: t('PRODUCT_COST', 'Product cost')
@@ -143,12 +151,16 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
143
151
  };
144
152
  var handleOpenCategoryDetails = function handleOpenCategoryDetails() {
145
153
  var category = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
154
+ var isInitialRender = arguments.length > 1 ? arguments[1] : undefined;
146
155
  setOpenSidebar(null);
147
156
  setSelectedProduct(null);
148
157
  setCurrentCategory(category);
149
158
  if (category && (category === null || category === void 0 ? void 0 : category.id) !== null) {
150
159
  setCategorySelected(category);
151
160
  setOpenSidebar('category_details');
161
+ if (!isInitialRender) {
162
+ history.replace("".concat(location.pathname, "?category=").concat(category.id));
163
+ }
152
164
  } else {
153
165
  setCurrentCategory(null);
154
166
  setOpenSidebar('category_details');
@@ -162,16 +174,19 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
162
174
  });
163
175
  setCurrentCategory(null);
164
176
  setOpenSidebar(null);
177
+ history.replace("".concat(location.pathname));
165
178
  };
166
- var handleOpenProductDetails = function handleOpenProductDetails(product) {
167
- var _businessState$busine;
179
+ var handleOpenProductDetails = function handleOpenProductDetails(product, isInitialRender) {
168
180
  setSelectedProduct(product);
169
181
  setOpenSidebar('product_details');
170
- onProductRedirect({
171
- slug: businessState === null || businessState === void 0 ? void 0 : (_businessState$busine = businessState.business) === null || _businessState$busine === void 0 ? void 0 : _businessState$busine.slug,
172
- product: product.id,
173
- category: product.category_id
174
- });
182
+ if (!isInitialRender) {
183
+ var _businessState$busine;
184
+ onProductRedirect({
185
+ slug: businessState === null || businessState === void 0 ? void 0 : (_businessState$busine = businessState.business) === null || _businessState$busine === void 0 ? void 0 : _businessState$busine.slug,
186
+ product: product.id,
187
+ category: product.category_id
188
+ });
189
+ }
175
190
  };
176
191
  var handleCloseProductDetails = function handleCloseProductDetails() {
177
192
  var _businessState$busine2;
@@ -228,7 +243,7 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
228
243
  window.open("https://".concat(ordering.project, ".tryordering.com/store/").concat(businessState === null || businessState === void 0 ? void 0 : (_businessState$busine6 = businessState.business) === null || _businessState$busine6 === void 0 ? void 0 : _businessState$busine6.slug), '_blank');
229
244
  };
230
245
  var handleOpenAddBusiness = function handleOpenAddBusiness() {
231
- setOpenSidebar('add_business');
246
+ setIsAdd(true);
232
247
  handleClose();
233
248
  };
234
249
  (0, _react.useEffect)(function () {
@@ -253,6 +268,36 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
253
268
  setShowPopup(true);
254
269
  }
255
270
  }, [businessState === null || businessState === void 0 ? void 0 : businessState.business]);
271
+ (0, _react.useEffect)(function () {
272
+ if (businessState.loading) return;
273
+ var categoryId = query.get('category');
274
+ var productId = query.get('product');
275
+ if (categoryId && productId) {
276
+ var _businessState$busine9, _businessState$busine10, _initCategory$product;
277
+ var initCategory = (_businessState$busine9 = businessState.business) === null || _businessState$busine9 === void 0 ? void 0 : (_businessState$busine10 = _businessState$busine9.categories) === null || _businessState$busine10 === void 0 ? void 0 : _businessState$busine10.find(function (category) {
278
+ return category.id === Number(categoryId);
279
+ });
280
+ var initProduct = initCategory === null || initCategory === void 0 ? void 0 : (_initCategory$product = initCategory.products) === null || _initCategory$product === void 0 ? void 0 : _initCategory$product.find(function (product) {
281
+ return product.id === Number(productId);
282
+ });
283
+ if (initCategory) handleChangeCategory(null, initCategory);
284
+ if (initProduct) {
285
+ handleOpenProductDetails(initProduct, true);
286
+ }
287
+ } else if (categoryId && !productId) {
288
+ var _businessState$busine11, _businessState$busine12;
289
+ var _initCategory = (_businessState$busine11 = businessState.business) === null || _businessState$busine11 === void 0 ? void 0 : (_businessState$busine12 = _businessState$busine11.categories) === null || _businessState$busine12 === void 0 ? void 0 : _businessState$busine12.find(function (category) {
290
+ return category.id === Number(categoryId);
291
+ });
292
+ if (_initCategory) {
293
+ handleChangeCategory(null, _initCategory);
294
+ handleOpenCategoryDetails(_initCategory, true);
295
+ }
296
+ } else {
297
+ var _businessState$busine13, _businessState$busine14;
298
+ (businessState === null || businessState === void 0 ? void 0 : (_businessState$busine13 = businessState.business) === null || _businessState$busine13 === void 0 ? void 0 : _businessState$busine13.categories) && setCategorySelected(businessState === null || businessState === void 0 ? void 0 : (_businessState$busine14 = businessState.business) === null || _businessState$busine14 === void 0 ? void 0 : _businessState$busine14.categories[0]);
299
+ }
300
+ }, [businessState.loading]);
256
301
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles2.CategoryProductsContainer, null, /*#__PURE__*/_react.default.createElement(_styles2.HeaderContainer, null, /*#__PURE__*/_react.default.createElement(_styles2.HeaderTitleContainer, null, isCollapse && /*#__PURE__*/_react.default.createElement(_styles.IconButton, {
257
302
  color: "black",
258
303
  onClick: function onClick() {
@@ -265,7 +310,7 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
265
310
  onClick: function onClick() {
266
311
  return handleSelectHeader();
267
312
  }
268
- }, /*#__PURE__*/_react.default.createElement("h1", null, (selectedBusiness === null || selectedBusiness === void 0 ? void 0 : selectedBusiness.name) || (businessState === null || businessState === void 0 ? void 0 : (_businessState$busine9 = businessState.business) === null || _businessState$busine9 === void 0 ? void 0 : _businessState$busine9.name) || t('SELECT_BUSINESS', 'Select a business'), " \xA0 ", /*#__PURE__*/_react.default.createElement(_BisDownArrow.default, {
313
+ }, /*#__PURE__*/_react.default.createElement("h1", null, (selectedBusiness === null || selectedBusiness === void 0 ? void 0 : selectedBusiness.name) || (businessState === null || businessState === void 0 ? void 0 : (_businessState$busine15 = businessState.business) === null || _businessState$busine15 === void 0 ? void 0 : _businessState$busine15.name) || t('SELECT_BUSINESS', 'Select a business'), " \xA0 ", /*#__PURE__*/_react.default.createElement(_BisDownArrow.default, {
269
314
  className: showSelectHeader ? 'rotate-arrow' : ''
270
315
  }))), showSelectHeader && /*#__PURE__*/_react.default.createElement(_BusinessSelectHeader.BusinessSelectHeader, {
271
316
  close: handleClose,
@@ -278,7 +323,7 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
278
323
  onClick: function onClick() {
279
324
  return setOpenSidebar('business_details');
280
325
  }
281
- }, (selectedBusiness === null || selectedBusiness === void 0 ? void 0 : selectedBusiness.name) || (businessState === null || businessState === void 0 ? void 0 : (_businessState$busine10 = businessState.business) === null || _businessState$busine10 === void 0 ? void 0 : _businessState$busine10.name)), /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.ChevronRight, null), /*#__PURE__*/_react.default.createElement("span", null, categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.name))))), slug && /*#__PURE__*/_react.default.createElement(_styles2.ActionsGroup, null, /*#__PURE__*/_react.default.createElement(_styles.Button, {
326
+ }, (selectedBusiness === null || selectedBusiness === void 0 ? void 0 : selectedBusiness.name) || (businessState === null || businessState === void 0 ? void 0 : (_businessState$busine16 = businessState.business) === null || _businessState$busine16 === void 0 ? void 0 : _businessState$busine16.name)), /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.ChevronRight, null), /*#__PURE__*/_react.default.createElement("span", null, categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.name))))), slug && /*#__PURE__*/_react.default.createElement(_styles2.ActionsGroup, null, /*#__PURE__*/_react.default.createElement(_styles.Button, {
282
327
  color: "lightPrimary",
283
328
  borderRadius: "8px",
284
329
  onClick: function onClick() {
@@ -304,7 +349,7 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
304
349
  onClick: function onClick() {
305
350
  return handleProductAdd(true);
306
351
  },
307
- disabled: (businessState === null || businessState === void 0 ? void 0 : (_businessState$busine11 = businessState.business) === null || _businessState$busine11 === void 0 ? void 0 : (_businessState$busine12 = _businessState$busine11.categories) === null || _businessState$busine12 === void 0 ? void 0 : _businessState$busine12.length) === 0
352
+ disabled: (businessState === null || businessState === void 0 ? void 0 : (_businessState$busine17 = businessState.business) === null || _businessState$busine17 === void 0 ? void 0 : (_businessState$busine18 = _businessState$busine17.categories) === null || _businessState$busine18 === void 0 ? void 0 : _businessState$busine18.length) === 0
308
353
  }, t('ADD_PRODUCT', 'Add product')), /*#__PURE__*/_react.default.createElement(_Shared.SearchBar, {
309
354
  isCustomLayout: true,
310
355
  lazyLoad: true,
@@ -402,7 +447,7 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
402
447
  setFees: setFees
403
448
  }), openSidebar === 'business_details' && /*#__PURE__*/_react.default.createElement(_BusinessDetails.BusinessDetails, {
404
449
  open: openSidebar === 'business_details',
405
- businessId: (selectedBusiness === null || selectedBusiness === void 0 ? void 0 : selectedBusiness.id) || (businessState === null || businessState === void 0 ? void 0 : (_businessState$busine13 = businessState.business) === null || _businessState$busine13 === void 0 ? void 0 : _businessState$busine13.id),
450
+ businessId: (selectedBusiness === null || selectedBusiness === void 0 ? void 0 : selectedBusiness.id) || (businessState === null || businessState === void 0 ? void 0 : (_businessState$busine19 = businessState.business) === null || _businessState$busine19 === void 0 ? void 0 : _businessState$busine19.id),
406
451
  handleSucessRemoveBusiness: function handleSucessRemoveBusiness() {
407
452
  return handleStoresRedirect();
408
453
  }
@@ -446,13 +491,20 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
446
491
  },
447
492
  orderingBusiness: businessState === null || businessState === void 0 ? void 0 : businessState.business,
448
493
  getBusiness: getBusiness
449
- })));
494
+ })), /*#__PURE__*/_react.default.createElement(_Shared.Modal, {
495
+ width: "769px",
496
+ padding: "30px",
497
+ open: isAdd,
498
+ onClose: function onClose() {
499
+ return setIsAdd(false);
500
+ }
501
+ }, /*#__PURE__*/_react.default.createElement(_BusinessAddStore.BusinessAddStore, null)));
450
502
  };
451
503
  var BusinessProductsListing = function BusinessProductsListing(props) {
452
- var _useState21 = (0, _react.useState)(false),
453
- _useState22 = _slicedToArray(_useState21, 2),
454
- isInitialRender = _useState22[0],
455
- setIsInitialRender = _useState22[1];
504
+ var _useState23 = (0, _react.useState)(false),
505
+ _useState24 = _slicedToArray(_useState23, 2),
506
+ isInitialRender = _useState24[0],
507
+ setIsInitialRender = _useState24[1];
456
508
  var businessProductslistingProps = _objectSpread(_objectSpread({}, props), {}, {
457
509
  UIComponent: BusinessProductsListingUI,
458
510
  isInitialRender: isInitialRender,
@@ -120,8 +120,8 @@ var BusinessPromotionGeneralFormUI = function BusinessPromotionGeneralFormUI(pro
120
120
  };
121
121
  var handleChangeDates = function handleChangeDates(item) {
122
122
  handleChangeItem({
123
- start: (0, _moment.default)(item.selection.startDate).format('YYYY-MM-DD'),
124
- end: item.selection.endDate ? (0, _moment.default)(item.selection.endDate).format('YYYY-MM-DD') : null
123
+ start: (0, _moment.default)(item.selection.startDate).format('YYYY-MM-DD 00:00:00'),
124
+ end: item.selection.endDate ? (0, _moment.default)(item.selection.endDate).format('YYYY-MM-DD 23:59:59') : null
125
125
  });
126
126
  setDateRange([item.selection]);
127
127
  };
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.BusinessSharedMenuProducts = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
+ var _reactRouterDom = require("react-router-dom");
9
10
  var _orderingComponentsAdminExternal = require("ordering-components-admin-external");
10
11
  var _styles = require("../../../styles");
11
12
  var _Shared = require("../../Shared");
@@ -32,6 +33,8 @@ var BusinessSharedMenuProductsUI = function BusinessSharedMenuProductsUI(props)
32
33
  handleUpdateBusinessSharedMenuProduct = props.handleUpdateBusinessSharedMenuProduct,
33
34
  setIsOpenSharedProduct = props.setIsOpenSharedProduct,
34
35
  handleChangeInput = props.handleChangeInput;
36
+ var history = (0, _reactRouterDom.useHistory)();
37
+ var query = new URLSearchParams((0, _reactRouterDom.useLocation)().search);
35
38
  var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
36
39
  _useLanguage2 = _slicedToArray(_useLanguage, 2),
37
40
  t = _useLanguage2[1];
@@ -49,18 +52,42 @@ var BusinessSharedMenuProductsUI = function BusinessSharedMenuProductsUI(props)
49
52
  _useState6 = _slicedToArray(_useState5, 2),
50
53
  isOpenDetails = _useState6[0],
51
54
  setIsOpenDetails = _useState6[1];
52
- var handleOpenProduct = function handleOpenProduct(e, product) {
53
- var isInvalid = e.target.closest('.product_checkbox');
55
+ var handleOpenProduct = function handleOpenProduct(e, product, isInitialRender) {
56
+ var _e$target;
57
+ var isInvalid = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.closest('.product_checkbox');
54
58
  if (isInvalid) return;
55
59
  setIsOpenSharedProduct(true);
56
60
  setCurrentProduct(product);
57
61
  setIsOpenDetails(true);
62
+ if (!isInitialRender) {
63
+ var businessId = query.get('id');
64
+ var section = query.get('section');
65
+ var tab = query.get('tab');
66
+ var menu = query.get('menu');
67
+ history.replace("".concat(location.pathname, "?id=").concat(businessId, "&section=").concat(section, "&tab=").concat(tab, "&menu=").concat(menu, "&product=").concat(product.id));
68
+ }
58
69
  };
59
70
  var handleCloseSidebar = function handleCloseSidebar() {
60
71
  setIsOpenDetails(false);
61
72
  setCurrentProduct(null);
62
73
  setIsOpenSharedProduct(false);
74
+ var businessId = query.get('id');
75
+ var section = query.get('section');
76
+ var tab = query.get('tab');
77
+ var menu = query.get('menu');
78
+ history.replace("".concat(location.pathname, "?id=").concat(businessId, "&section=").concat(section, "&tab=").concat(tab, "&menu=").concat(menu));
63
79
  };
80
+ (0, _react.useEffect)(function () {
81
+ var productId = query.get('product');
82
+ if (productId) {
83
+ var initProduct = menuState.menu.products.find(function (product) {
84
+ return product.id === Number(productId);
85
+ });
86
+ if (initProduct) {
87
+ handleOpenProduct(null, initProduct, true);
88
+ }
89
+ }
90
+ }, []);
64
91
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles2.MenuProductsContainer, null, /*#__PURE__*/_react.default.createElement(_styles2.SearchBarWrapper, null, /*#__PURE__*/_react.default.createElement(_Shared.SearchBar, {
65
92
  placeholder: t('SEARCH', 'Search'),
66
93
  isCustomLayout: true,
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.BusinessSync = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
+ var _reactRouterDom = require("react-router-dom");
9
10
  var _orderingComponentsAdminExternal = require("ordering-components-admin-external");
10
11
  var _BusinessSyncBasic = require("../BusinessSyncBasic");
11
12
  var _BusinessSyncItsaCheckmate = require("../BusinessSyncItsaCheckmate");
@@ -21,6 +22,8 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
21
22
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
22
23
  var BusinessSync = function BusinessSync(props) {
23
24
  var handleParentSidebarMove = props.handleParentSidebarMove;
25
+ var history = (0, _reactRouterDom.useHistory)();
26
+ var query = new URLSearchParams((0, _reactRouterDom.useLocation)().search);
24
27
  var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
25
28
  _useLanguage2 = _slicedToArray(_useLanguage, 2),
26
29
  t = _useLanguage2[1];
@@ -35,10 +38,22 @@ var BusinessSync = function BusinessSync(props) {
35
38
  key: 'itsacheckmate',
36
39
  name: t('ITSACHECKMATE', 'ItsaCheckmate')
37
40
  }];
38
- var handleChangeOption = function handleChangeOption(key) {
41
+ var handleChangeOption = function handleChangeOption(key, isInitialRender) {
39
42
  handleParentSidebarMove(0);
40
43
  setSelectedOption(key);
44
+ if (!isInitialRender) {
45
+ var header = query.get('header');
46
+ history.replace("".concat(location.pathname, "?header=").concat(header, "&tab=").concat(key));
47
+ }
41
48
  };
49
+ (0, _react.useEffect)(function () {
50
+ var tab = query.get('tab');
51
+ if (tab) {
52
+ handleChangeOption(tab, true);
53
+ } else {
54
+ handleChangeOption(selectedOption);
55
+ }
56
+ }, []);
42
57
  return /*#__PURE__*/_react.default.createElement(_styles.Container, null, /*#__PURE__*/_react.default.createElement(_styles.Header, null, /*#__PURE__*/_react.default.createElement("h2", null, t('SYNC_WITH', 'Sync with'))), /*#__PURE__*/_react.default.createElement(_styles.Tabs, null, syncOptions.map(function (option) {
43
58
  return /*#__PURE__*/_react.default.createElement(_styles.Tab, {
44
59
  key: option.key,
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.BusinessTypes = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var _orderingComponentsAdminExternal = require("ordering-components-admin-external");
10
+ var _reactRouterDom = require("react-router-dom");
10
11
  var _Shared = require("../../Shared");
11
12
  var _reactBootstrapIcons = require("react-bootstrap-icons");
12
13
  var _useWindowSize2 = require("../../../hooks/useWindowSize");
@@ -40,6 +41,8 @@ var BusinessTypes = function BusinessTypes(props) {
40
41
  handleUpdateBusinessClick = props.handleUpdateBusinessClick,
41
42
  setBusinessTypes = props.setBusinessTypes,
42
43
  setIsExtendExtraOpen = props.setIsExtendExtraOpen;
44
+ var history = (0, _reactRouterDom.useHistory)();
45
+ var query = new URLSearchParams((0, _reactRouterDom.useLocation)().search);
43
46
  var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
44
47
  _useLanguage2 = _slicedToArray(_useLanguage, 2),
45
48
  t = _useLanguage2[1];
@@ -72,17 +75,26 @@ var BusinessTypes = function BusinessTypes(props) {
72
75
  _useState12 = _slicedToArray(_useState11, 2),
73
76
  isOpenTypeDetail = _useState12[0],
74
77
  setIsOpenTypeDetail = _useState12[1];
75
- var handleOpenBusinessTypeDetail = function handleOpenBusinessTypeDetail(e, category) {
76
- var isInvalid = e.target.closest('.business-type-checkbox');
78
+ var handleOpenBusinessTypeDetail = function handleOpenBusinessTypeDetail(category, e) {
79
+ var _e$target;
80
+ var isInvalid = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.closest('.business-type-checkbox');
77
81
  if (isInvalid) return;
78
82
  setSelectedBusinessType(category);
79
83
  setIsExtendExtraOpen(true);
80
84
  setIsOpenTypeDetail(true);
85
+ var businessId = query.get('id');
86
+ var section = query.get('section');
87
+ var tab = query.get('tab');
88
+ history.replace("".concat(location.pathname, "?id=").concat(businessId, "&section=").concat(section, "&tab=").concat(tab, "&business_type=").concat(category.id));
81
89
  };
82
90
  var handleCloseDetail = function handleCloseDetail() {
83
91
  setIsOpenTypeDetail(false);
84
92
  setIsExtendExtraOpen(false);
85
93
  setSelectedBusinessType(null);
94
+ var businessId = query.get('id');
95
+ var section = query.get('section');
96
+ var tab = query.get('tab');
97
+ history.replace("".concat(location.pathname, "?id=").concat(businessId, "&section=").concat(section, "&tab=").concat(tab));
86
98
  };
87
99
  var handleSelectBusinessTypes = function handleSelectBusinessTypes(typeId) {
88
100
  var _selectedBusinessTypes = _toConsumableArray(selectedBusinessTypes);
@@ -141,6 +153,17 @@ var BusinessTypes = function BusinessTypes(props) {
141
153
  });
142
154
  setFilteredBusinessTypes(_toConsumableArray(updatedBusinessTypes));
143
155
  }, [businessTypes, searchVal]);
156
+ (0, _react.useEffect)(function () {
157
+ var businessTypeId = query.get('business_type');
158
+ if (businessTypeId) {
159
+ var initBusinessType = businessTypes.find(function (type) {
160
+ return type.id === Number(businessTypeId);
161
+ });
162
+ setTimeout(function () {
163
+ handleOpenBusinessTypeDetail(initBusinessType);
164
+ }, 500);
165
+ }
166
+ }, []);
144
167
  return /*#__PURE__*/_react.default.createElement(_styles.Container, null, /*#__PURE__*/_react.default.createElement(_styles.SearchWrapper, null, /*#__PURE__*/_react.default.createElement(_Shared.SearchBar, {
145
168
  search: searchVal,
146
169
  isCustomLayout: true,
@@ -154,7 +177,7 @@ var BusinessTypes = function BusinessTypes(props) {
154
177
  key: category === null || category === void 0 ? void 0 : category.id,
155
178
  active: (selectedBusinessType === null || selectedBusinessType === void 0 ? void 0 : selectedBusinessType.id) === (category === null || category === void 0 ? void 0 : category.id),
156
179
  onClick: function onClick(evt) {
157
- return handleOpenBusinessTypeDetail(evt, category);
180
+ return handleOpenBusinessTypeDetail(category, evt);
158
181
  }
159
182
  }, /*#__PURE__*/_react.default.createElement(_styles.BusinessTypeInfoWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.CheckBoxWrapper, {
160
183
  onClick: function onClick() {
@@ -168,7 +191,7 @@ var BusinessTypes = function BusinessTypes(props) {
168
191
  }, !(category !== null && category !== void 0 && category.image) && /*#__PURE__*/_react.default.createElement(_BsCardImage.default, null))), /*#__PURE__*/_react.default.createElement("span", null, category === null || category === void 0 ? void 0 : category.name)), /*#__PURE__*/_react.default.createElement(_styles.ArrowWrapper, null, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.ChevronRight, null)));
169
192
  })), /*#__PURE__*/_react.default.createElement(_styles.AddNewBusinessTypeContainer, null, /*#__PURE__*/_react.default.createElement(_styles.AddNewBusinessTypeTitle, {
170
193
  onClick: function onClick(evt) {
171
- return handleOpenBusinessTypeDetail(evt, null);
194
+ return handleOpenBusinessTypeDetail(null, evt);
172
195
  }
173
196
  }, t('ADD_NEW_BUSINESS_CATEGORY', 'Add new business category'))), isOpenTypeDetail && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, width >= 1000 ? /*#__PURE__*/_react.default.createElement(_Shared.SideBar, {
174
197
  sidebarId: "busiiness-type",
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.BusinessWalletsList = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
+ var _reactRouterDom = require("react-router-dom");
9
10
  var _orderingComponentsAdminExternal = require("ordering-components-admin-external");
10
11
  var _reactLoadingSkeleton = _interopRequireDefault(require("react-loading-skeleton"));
11
12
  var _reactBootstrapIcons = require("react-bootstrap-icons");
@@ -35,6 +36,8 @@ var BusinessWalletsListUI = function BusinessWalletsListUI(props) {
35
36
  isClose = props.isClose,
36
37
  handleClosePaymethodDetails = props.handleClosePaymethodDetails,
37
38
  handleUpdateWallet = props.handleUpdateWallet;
39
+ var history = (0, _reactRouterDom.useHistory)();
40
+ var query = new URLSearchParams((0, _reactRouterDom.useLocation)().search);
38
41
  var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
39
42
  _useLanguage2 = _slicedToArray(_useLanguage, 2),
40
43
  t = _useLanguage2[1];
@@ -63,18 +66,26 @@ var BusinessWalletsListUI = function BusinessWalletsListUI(props) {
63
66
  wallet_cash_enabled: t('WALLET_CASH_ENABLED', 'Wallet cash enabled'),
64
67
  wallet_credit_point_enabled: t('WALLET_CREDIT_POINT_ENABLED', 'Wallet credit point enabled')
65
68
  };
66
- var handleOpenWallet = function handleOpenWallet(config) {
69
+ var handleOpenWallet = function handleOpenWallet(config, isInitialRender) {
67
70
  setIsOpenWalletDetails(true);
68
71
  handleClosePaymethodDetails();
69
72
  setCurrentConfig(config);
70
73
  setIsExtendExtraOpen(true);
71
74
  setIsOpenDetails(true);
75
+ if (!isInitialRender) {
76
+ var businessId = query.get('id');
77
+ var section = query.get('section');
78
+ history.replace("".concat(location.pathname, "?id=").concat(businessId, "&section=").concat(section, "&wallet=").concat(config.id));
79
+ }
72
80
  };
73
81
  var handleCloseWallet = function handleCloseWallet() {
74
82
  setIsOpenWalletDetails(false);
75
83
  setIsOpenDetails(false);
76
84
  setIsExtendExtraOpen(false);
77
85
  setCurrentConfig(null);
86
+ var businessId = query.get('id');
87
+ var section = query.get('section');
88
+ history.replace("".concat(location.pathname, "?id=").concat(businessId, "&section=").concat(section));
78
89
  };
79
90
  (0, _react.useEffect)(function () {
80
91
  var _currentConfig$option;
@@ -93,6 +104,18 @@ var BusinessWalletsListUI = function BusinessWalletsListUI(props) {
93
104
  setIsOpenDetails(false);
94
105
  setCurrentConfig(null);
95
106
  }, [isClose]);
107
+ (0, _react.useEffect)(function () {
108
+ if (loyaltyPlanState.loading || walletsListState.loading) return;
109
+ var walletId = query.get('wallet');
110
+ if (walletId) {
111
+ var initWallet = walletsListState.wallets.find(function (wallet) {
112
+ return wallet.id === Number(walletId);
113
+ });
114
+ if (initWallet) {
115
+ handleOpenWallet(initWallet, true);
116
+ }
117
+ }
118
+ }, [loyaltyPlanState.loading, walletsListState.loading]);
96
119
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, loyaltyPlanState.loading || walletsListState.loading ? /*#__PURE__*/_react.default.createElement(_styles.WalletsListContainer, null, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
97
120
  height: 30
98
121
  })) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, walletsListState.wallets.length > 0 && (walletsEnabled.wallet_cash_enabled || walletsEnabled.wallet_credit_point_enabled) && /*#__PURE__*/_react.default.createElement(_styles.WalletsListContainer, null, /*#__PURE__*/_react.default.createElement("h2", null, t('WALLETS', 'Wallets')), walletsListState.wallets.filter(function (config) {
@@ -66,6 +66,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
66
66
  filterValues = props.filterValues,
67
67
  businessTypeSelected = props.businessTypeSelected,
68
68
  inActiveBusinesses = props.inActiveBusinesses;
69
+ var history = (0, _reactRouterDom.useHistory)();
69
70
  var query = new URLSearchParams((0, _reactRouterDom.useLocation)().search);
70
71
  var theme = (0, _styledComponents.useTheme)();
71
72
  var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
@@ -163,7 +164,6 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
163
164
  var id = query.get('id');
164
165
  if (id === null) setOpenBusinessDetails(false);else {
165
166
  setDetailsBusinessId(id);
166
- onBusinessRedirect && onBusinessRedirect(id);
167
167
  setOpenBusinessDetails(true);
168
168
  }
169
169
  }, []);
@@ -213,14 +213,22 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
213
213
  };
214
214
  var handleOpenSync = function handleOpenSync() {
215
215
  setOpenSync(true);
216
+ history.replace("".concat(location.pathname, "?header=sync"));
216
217
  };
217
218
  var handleCloseSync = function handleCloseSync() {
218
219
  setMoveDistance(0);
219
220
  setOpenSync(false);
221
+ history.replace("".concat(location.pathname));
220
222
  };
221
223
  (0, _react.useEffect)(function () {
222
224
  handleSetStorage();
223
225
  }, []);
226
+ (0, _react.useEffect)(function () {
227
+ var header = query.get('header');
228
+ if (header === 'sync') {
229
+ setOpenSync(true);
230
+ }
231
+ }, []);
224
232
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.BusinessListingContainer, {
225
233
  isAdd: openAddBusiness
226
234
  }, /*#__PURE__*/_react.default.createElement(_BusinessesListingHeader.BusinessesListingHeader, {
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.ImportersButton = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
+ var _reactRouterDom = require("react-router-dom");
9
10
  var _orderingComponentsAdminExternal = require("ordering-components-admin-external");
10
11
  var _reactBootstrapIcons = require("react-bootstrap-icons");
11
12
  var _styles = require("../../../styles");
@@ -21,6 +22,8 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
21
22
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
22
23
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
23
24
  var ImportersButton = function ImportersButton(props) {
25
+ var history = (0, _reactRouterDom.useHistory)();
26
+ var query = new URLSearchParams((0, _reactRouterDom.useLocation)().search);
24
27
  var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
25
28
  _useLanguage2 = _slicedToArray(_useLanguage, 2),
26
29
  t = _useLanguage2[1];
@@ -32,19 +35,29 @@ var ImportersButton = function ImportersButton(props) {
32
35
  _useState4 = _slicedToArray(_useState3, 2),
33
36
  extraOpen = _useState4[0],
34
37
  setExtraOpen = _useState4[1];
38
+ var handleOpenImporters = function handleOpenImporters() {
39
+ setOpenImporters(true);
40
+ history.replace("".concat(location.pathname, "?header=importers"));
41
+ };
42
+ var handleCloseImporters = function handleCloseImporters() {
43
+ setOpenImporters(false);
44
+ history.replace("".concat(location.pathname));
45
+ };
46
+ (0, _react.useEffect)(function () {
47
+ var header = query.get('header');
48
+ if (header === 'importers') {
49
+ setOpenImporters(true);
50
+ }
51
+ }, []);
35
52
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles2.CsvImportButtonWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.Button, {
36
53
  borderRadius: "8px",
37
54
  color: "lightPrimary",
38
- onClick: function onClick() {
39
- return setOpenImporters(true);
40
- }
55
+ onClick: handleOpenImporters
41
56
  }, t('IMPORTERS', 'Importers'), /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Upload, null))), openImporters && /*#__PURE__*/_react.default.createElement(_Shared.SideBar, {
42
57
  defaultSideBarWidth: extraOpen ? 1000 : 500,
43
58
  moveDistance: extraOpen ? 500 : 0,
44
59
  open: openImporters,
45
- onClose: function onClose() {
46
- return setOpenImporters(false);
47
- },
60
+ onClose: handleCloseImporters,
48
61
  showExpandIcon: true
49
62
  }, /*#__PURE__*/_react.default.createElement(_ImportersListing.ImportersListing, {
50
63
  setExtraOpen: setExtraOpen