ordering-ui-admin-external 1.2.0 → 1.3.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.
- package/_bundles/main.css +2 -2
- package/_bundles/{ordering-ui-admin.509785f9d6ed069b4b5d.js → ordering-ui-admin.0bfe9a0aef33a990bc0a.js} +2 -2
- package/_bundles/{ordering-ui-admin.509785f9d6ed069b4b5d.js.LICENSE.txt → ordering-ui-admin.0bfe9a0aef33a990bc0a.js.LICENSE.txt} +10 -4
- package/_modules/components/BusinessIntelligence/Reports/index.js +27 -3
- package/_modules/components/BusinessIntelligence/Reports/styles.js +9 -2
- package/_modules/components/BusinessIntelligence/ReviewsListing/index.js +9 -1
- package/_modules/components/DisabledFeatureAlert/index.js +63 -0
- package/_modules/components/DisabledFeatureAlert/styles.js +42 -0
- package/_modules/components/Loyalty/RewardsPrograms/index.js +38 -12
- package/_modules/components/Loyalty/RewardsPrograms/styles.js +13 -6
- package/_modules/components/Marketing/CampaignHeader/index.js +5 -2
- package/_modules/components/Marketing/CampaignHeader/styles.js +7 -4
- package/_modules/components/Marketing/CampaignList/index.js +8 -4
- package/_modules/components/Marketing/CampaignList/styles.js +30 -22
- package/_modules/components/Marketing/CampaignListing/index.js +29 -3
- package/_modules/components/Marketing/EnterprisePromotionListing/index.js +46 -22
- package/_modules/components/Marketing/EnterprisePromotionListing/styles.js +1 -1
- package/_modules/components/OrderingProducts/OrderingProductDetails/index.js +24 -428
- package/_modules/components/OrderingProducts/OrderingProductDetails/styles.js +35 -114
- package/_modules/components/OrderingProducts/OrderingProductGeneralDetails/index.js +480 -0
- package/_modules/components/OrderingProducts/OrderingProductGeneralDetails/styles.js +127 -0
- package/_modules/components/OrderingProducts/OrderingProductsListing/index.js +3 -1
- package/_modules/components/OrderingProducts/OrderingProductsListing/styles.js +23 -3
- package/_modules/components/OrderingProducts/SiteTheme/ThemeComponent.js +119 -0
- package/_modules/components/OrderingProducts/SiteTheme/ThemeImage.js +267 -0
- package/_modules/components/OrderingProducts/SiteTheme/ThemeOption.js +135 -0
- package/_modules/components/OrderingProducts/SiteTheme/index.js +266 -0
- package/_modules/components/OrderingProducts/SiteTheme/styles.js +114 -0
- package/_modules/components/Orders/CountryFilter/index.js +114 -0
- package/_modules/components/Orders/CountryFilter/styles.js +34 -0
- package/_modules/components/Orders/CurrencyFilter/index.js +114 -0
- package/_modules/components/Orders/CurrencyFilter/styles.js +34 -0
- package/_modules/components/Orders/DeliveriesLocation/index.js +22 -12
- package/_modules/components/Orders/DriversLocation/index.js +13 -7
- package/_modules/components/Orders/OrdersFilterGroup/index.js +13 -1
- package/_modules/components/Orders/OrdersListing/index.js +8 -2
- package/_modules/components/Orders/OrdersTable/index.js +296 -174
- package/_modules/components/Orders/OrdersTable/styles.js +30 -4
- package/_modules/components/Orders/index.js +9 -1
- package/_modules/components/Settings/SettingItemUI/index.js +3 -1
- package/_modules/components/Settings/SettingItemUI/styles.js +18 -11
- package/_modules/components/Settings/Settings/index.js +1 -11
- package/_modules/components/Settings/SettingsDetail/index.js +40 -3
- package/_modules/components/Settings/SettingsDetail/styles.js +27 -8
- package/_modules/components/Settings/SettingsList/index.js +43 -6
- package/_modules/components/Shared/ColorPicker/styles.js +3 -1
- package/_modules/components/Shared/ColumnAllowSettingPopover/index.js +4 -2
- package/_modules/components/Shared/SearchBar/index.js +4 -2
- package/_modules/components/SidebarMenu/index.js +25 -14
- package/_modules/components/SidebarMenu/styles.js +19 -9
- package/_modules/components/Stores/BusinessMenu/index.js +36 -5
- package/_modules/components/Stores/BusinessMenu/styles.js +27 -16
- package/_modules/components/Stores/BusinessMenuOptions/styles.js +9 -4
- package/_modules/components/Stores/BusinessPaymentMethods/index.js +53 -16
- package/_modules/components/Stores/BusinessProductList/index.js +7 -10
- package/_modules/components/Stores/BusinessProductsCategories/index.js +2 -2
- package/_modules/components/Stores/BusinessProductsListing/index.js +44 -21
- package/_modules/components/Stores/BusinessProductsListing/styles.js +20 -16
- package/_modules/components/Stores/BusinessesListing/index.js +4 -1
- package/_modules/components/Stores/BusinessesListingHeader/index.js +20 -3
- package/_modules/components/Stores/BusinessesListingHeader/styles.js +6 -2
- package/_modules/components/Stores/ImportersList/index.js +5 -2
- package/_modules/components/Stores/ImportersList/styles.js +18 -15
- package/_modules/components/Stores/ImportersListing/index.js +31 -4
- package/_modules/components/Stores/PaymentOption/index.js +12 -7
- package/_modules/components/Stores/PaymentOption/styles.js +9 -4
- package/_modules/components/Stores/PaymentOptionMethods/index.js +9 -4
- package/_modules/components/Stores/PaymentOptionMethods/styles.js +10 -5
- package/_modules/components/Stores/PaymentOptionPaypal/index.js +9 -4
- package/_modules/components/Stores/PaymentOptionSquare/index.js +10 -5
- package/_modules/components/Stores/PaymentOptionStripeDirect/index.js +10 -5
- package/_modules/components/Stores/PaymentOptionStripeDirect/styles.js +10 -5
- package/_modules/components/Stores/PaymethodOptionPaypalExpress/index.js +9 -4
- package/_modules/components/Stores/PaymethodOptionStripeConnect/index.js +9 -4
- package/_modules/components/Stores/PaymethodOptionStripeRedirect/index.js +9 -4
- package/_modules/components/Users/UsersList/index.js +8 -2
- package/_modules/components/Users/UsersList/styles.js +15 -12
- package/package.json +2 -2
- package/src/components/BusinessIntelligence/Reports/index.js +18 -4
- package/src/components/BusinessIntelligence/Reports/styles.js +11 -0
- package/src/components/BusinessIntelligence/ReviewsListing/index.js +12 -0
- package/src/components/DisabledFeatureAlert/index.js +37 -0
- package/src/components/DisabledFeatureAlert/styles.js +32 -0
- package/src/components/Loyalty/RewardsPrograms/index.js +18 -5
- package/src/components/Loyalty/RewardsPrograms/styles.js +10 -0
- package/src/components/Marketing/CampaignHeader/index.js +3 -2
- package/src/components/Marketing/CampaignHeader/styles.js +8 -0
- package/src/components/Marketing/CampaignList/index.js +5 -3
- package/src/components/Marketing/CampaignList/styles.js +16 -0
- package/src/components/Marketing/CampaignListing/index.js +18 -2
- package/src/components/Marketing/EnterprisePromotionListing/index.js +17 -4
- package/src/components/Marketing/EnterprisePromotionListing/styles.js +5 -1
- package/src/components/OrderingProducts/OrderingProductDetails/index.js +34 -497
- package/src/components/OrderingProducts/OrderingProductDetails/styles.js +38 -288
- package/src/components/OrderingProducts/OrderingProductGeneralDetails/index.js +514 -0
- package/src/components/OrderingProducts/OrderingProductGeneralDetails/styles.js +279 -0
- package/src/components/OrderingProducts/OrderingProductsListing/index.js +14 -2
- package/src/components/OrderingProducts/OrderingProductsListing/styles.js +62 -0
- package/src/components/OrderingProducts/SiteTheme/ThemeComponent.js +104 -0
- package/src/components/OrderingProducts/SiteTheme/ThemeImage.js +151 -0
- package/src/components/OrderingProducts/SiteTheme/ThemeOption.js +118 -0
- package/src/components/OrderingProducts/SiteTheme/index.js +221 -0
- package/src/components/OrderingProducts/SiteTheme/styles.js +160 -0
- package/src/components/Orders/CountryFilter/index.js +68 -0
- package/src/components/Orders/CountryFilter/styles.js +29 -0
- package/src/components/Orders/CurrencyFilter/index.js +68 -0
- package/src/components/Orders/CurrencyFilter/styles.js +29 -0
- package/src/components/Orders/DeliveriesLocation/index.js +60 -8
- package/src/components/Orders/DriversLocation/index.js +32 -4
- package/src/components/Orders/OrdersFilterGroup/index.js +15 -1
- package/src/components/Orders/OrdersListing/index.js +8 -1
- package/src/components/Orders/OrdersTable/index.js +297 -252
- package/src/components/Orders/OrdersTable/styles.js +33 -0
- package/src/components/Orders/index.js +3 -1
- package/src/components/Settings/SettingItemUI/index.js +2 -1
- package/src/components/Settings/SettingItemUI/styles.js +5 -0
- package/src/components/Settings/Settings/index.js +0 -11
- package/src/components/Settings/SettingsDetail/index.js +23 -4
- package/src/components/Settings/SettingsDetail/styles.js +9 -2
- package/src/components/Settings/SettingsList/index.js +30 -3
- package/src/components/Shared/ColorPicker/styles.js +1 -0
- package/src/components/Shared/ColumnAllowSettingPopover/index.js +2 -2
- package/src/components/Shared/SearchBar/index.js +3 -2
- package/src/components/SidebarMenu/index.js +22 -7
- package/src/components/SidebarMenu/styles.js +13 -0
- package/src/components/Stores/BusinessMenu/index.js +21 -3
- package/src/components/Stores/BusinessMenu/styles.js +19 -0
- package/src/components/Stores/BusinessMenuOptions/styles.js +6 -0
- package/src/components/Stores/BusinessPaymentMethods/index.js +62 -32
- package/src/components/Stores/BusinessProductList/index.js +2 -1
- package/src/components/Stores/BusinessProductsCategories/index.js +2 -2
- package/src/components/Stores/BusinessProductsListing/index.js +18 -4
- package/src/components/Stores/BusinessProductsListing/styles.js +40 -10
- package/src/components/Stores/BusinessesListing/index.js +3 -0
- package/src/components/Stores/BusinessesListingHeader/index.js +15 -3
- package/src/components/Stores/BusinessesListingHeader/styles.js +38 -0
- package/src/components/Stores/ImportersList/index.js +3 -2
- package/src/components/Stores/ImportersList/styles.js +8 -1
- package/src/components/Stores/ImportersListing/index.js +25 -1
- package/src/components/Stores/PaymentOption/index.js +9 -5
- package/src/components/Stores/PaymentOption/styles.js +8 -0
- package/src/components/Stores/PaymentOptionMethods/index.js +8 -3
- package/src/components/Stores/PaymentOptionMethods/styles.js +8 -0
- package/src/components/Stores/PaymentOptionPaypal/index.js +8 -3
- package/src/components/Stores/PaymentOptionSquare/index.js +183 -176
- package/src/components/Stores/PaymentOptionStripeDirect/index.js +8 -3
- package/src/components/Stores/PaymentOptionStripeDirect/styles.js +8 -0
- package/src/components/Stores/PaymethodOptionPaypalExpress/index.js +8 -3
- package/src/components/Stores/PaymethodOptionStripeConnect/index.js +8 -3
- package/src/components/Stores/PaymethodOptionStripeRedirect/index.js +8 -3
- package/src/components/Users/UsersList/index.js +10 -1
- package/src/components/Users/UsersList/styles.js +9 -0
- package/template/app.js +8 -8
|
@@ -104,7 +104,8 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
104
104
|
taxes = props.taxes,
|
|
105
105
|
setTaxes = props.setTaxes,
|
|
106
106
|
fees = props.fees,
|
|
107
|
-
setFees = props.setFees
|
|
107
|
+
setFees = props.setFees,
|
|
108
|
+
getBusiness = props.getBusiness;
|
|
108
109
|
|
|
109
110
|
var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
|
|
110
111
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
@@ -143,19 +144,24 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
143
144
|
selectedBusiness = _useState10[0],
|
|
144
145
|
setSelectedBusiness = _useState10[1];
|
|
145
146
|
|
|
146
|
-
var
|
|
147
|
-
|
|
148
|
-
var _useState11 = (0, _react.useState)(false),
|
|
147
|
+
var _useState11 = (0, _react.useState)(10),
|
|
149
148
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
productsPerPage = _useState12[0],
|
|
150
|
+
setProductsPerPage = _useState12[1];
|
|
151
|
+
|
|
152
|
+
var categoryListRef = (0, _react.useRef)();
|
|
152
153
|
|
|
153
|
-
var _useState13 = (0, _react.useState)(
|
|
154
|
+
var _useState13 = (0, _react.useState)(false),
|
|
154
155
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
155
|
-
|
|
156
|
-
|
|
156
|
+
batchImageFormOpen = _useState14[0],
|
|
157
|
+
setBatchImageFormOpen = _useState14[1];
|
|
157
158
|
|
|
158
|
-
var _useState15 = (0, _react.useState)(
|
|
159
|
+
var _useState15 = (0, _react.useState)(null),
|
|
160
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
161
|
+
openSidebar = _useState16[0],
|
|
162
|
+
setOpenSidebar = _useState16[1];
|
|
163
|
+
|
|
164
|
+
var _useState17 = (0, _react.useState)({
|
|
159
165
|
id: true,
|
|
160
166
|
name: true,
|
|
161
167
|
description: true,
|
|
@@ -164,9 +170,9 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
164
170
|
inventoried: true,
|
|
165
171
|
quantity: true
|
|
166
172
|
}),
|
|
167
|
-
|
|
168
|
-
allowSpreadColumns =
|
|
169
|
-
setAllowSpreadColumns =
|
|
173
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
174
|
+
allowSpreadColumns = _useState18[0],
|
|
175
|
+
setAllowSpreadColumns = _useState18[1];
|
|
170
176
|
|
|
171
177
|
var spreadColumnOptions = [{
|
|
172
178
|
value: 'cost_price',
|
|
@@ -288,7 +294,7 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
288
294
|
onClick: function onClick() {
|
|
289
295
|
return handleMenuCollapse(false);
|
|
290
296
|
}
|
|
291
|
-
}, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.List, null)), /*#__PURE__*/_react.default.createElement("div", null, !selectedBusiness && businessState.
|
|
297
|
+
}, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.List, null)), /*#__PURE__*/_react.default.createElement("div", null, !selectedBusiness && !businessState.business ? /*#__PURE__*/_react.default.createElement("h1", null, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
292
298
|
width: 200,
|
|
293
299
|
height: 30
|
|
294
300
|
})) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles2.BusinessSelector, null, /*#__PURE__*/_react.default.createElement(_styles2.BusinessNameWrapper, {
|
|
@@ -306,7 +312,21 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
306
312
|
onClick: function onClick() {
|
|
307
313
|
return setOpenSidebar('business_details');
|
|
308
314
|
}
|
|
309
|
-
}, (selectedBusiness === null || selectedBusiness === void 0 ? void 0 : selectedBusiness.name) || (businessState === null || businessState === void 0 ? void 0 : (_businessState$busine7 = businessState.business) === null || _businessState$busine7 === void 0 ? void 0 : _businessState$busine7.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(
|
|
315
|
+
}, (selectedBusiness === null || selectedBusiness === void 0 ? void 0 : selectedBusiness.name) || (businessState === null || businessState === void 0 ? void 0 : (_businessState$busine7 = businessState.business) === null || _businessState$busine7 === void 0 ? void 0 : _businessState$busine7.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, {
|
|
316
|
+
color: "lightPrimary",
|
|
317
|
+
borderRadius: "8px",
|
|
318
|
+
onClick: function onClick() {
|
|
319
|
+
return getBusiness();
|
|
320
|
+
},
|
|
321
|
+
className: businessState.loading ? 'loading' : ''
|
|
322
|
+
}, t('REFRESH', 'Refresh'), /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.ArrowRepeat, {
|
|
323
|
+
size: 16,
|
|
324
|
+
style: {
|
|
325
|
+
marginLeft: 5
|
|
326
|
+
}
|
|
327
|
+
})), /*#__PURE__*/_react.default.createElement(_ImportersButton.ImportersButton, {
|
|
328
|
+
customClass: "importerGroup"
|
|
329
|
+
}), /*#__PURE__*/_react.default.createElement(_styles.Button, {
|
|
310
330
|
borderRadius: "8px",
|
|
311
331
|
color: "lightPrimary",
|
|
312
332
|
onClick: function onClick() {
|
|
@@ -324,7 +344,8 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
324
344
|
lazyLoad: true,
|
|
325
345
|
search: searchValue,
|
|
326
346
|
onSearch: handleChangeSearch,
|
|
327
|
-
placeholder: t('SEARCH', 'Search')
|
|
347
|
+
placeholder: t('SEARCH', 'Search'),
|
|
348
|
+
customClass: "searchBar"
|
|
328
349
|
}))), slug && /*#__PURE__*/_react.default.createElement(_styles2.CategoryProductsContent, null, /*#__PURE__*/_react.default.createElement(_styles2.CategoryListContainer, {
|
|
329
350
|
ref: categoryListRef
|
|
330
351
|
}, /*#__PURE__*/_react.default.createElement(_BusinessProductsCategories.BusinessProductsCategories, _extends({}, props, {
|
|
@@ -382,7 +403,9 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
382
403
|
handleOpenProductDetails: handleOpenProductDetails,
|
|
383
404
|
handleParentProductAdd: handleProductAdd,
|
|
384
405
|
isParentProductAdd: openSidebar === 'add_product',
|
|
385
|
-
allowSpreadColumns: allowSpreadColumns
|
|
406
|
+
allowSpreadColumns: allowSpreadColumns,
|
|
407
|
+
productsPerPage: productsPerPage,
|
|
408
|
+
setProductsPerPage: setProductsPerPage
|
|
386
409
|
}))))), openSidebar === 'category_details' && /*#__PURE__*/_react.default.createElement(_Shared.SideBar, {
|
|
387
410
|
open: openSidebar === 'category_details',
|
|
388
411
|
onClose: handleCloseEdit
|
|
@@ -430,10 +453,10 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
430
453
|
};
|
|
431
454
|
|
|
432
455
|
var BusinessProductsListing = function BusinessProductsListing(props) {
|
|
433
|
-
var
|
|
434
|
-
|
|
435
|
-
isInitialRender =
|
|
436
|
-
setIsInitialRender =
|
|
456
|
+
var _useState19 = (0, _react.useState)(false),
|
|
457
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
458
|
+
isInitialRender = _useState20[0],
|
|
459
|
+
setIsInitialRender = _useState20[1];
|
|
437
460
|
|
|
438
461
|
var businessProductslistingProps = _objectSpread(_objectSpread({}, props), {}, {
|
|
439
462
|
UIComponent: BusinessProductsListingUI,
|
|
@@ -11,7 +11,7 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
|
11
11
|
|
|
12
12
|
var _polished = require("polished");
|
|
13
13
|
|
|
14
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19;
|
|
14
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21;
|
|
15
15
|
|
|
16
16
|
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); }
|
|
17
17
|
|
|
@@ -19,7 +19,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
19
19
|
|
|
20
20
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
21
21
|
|
|
22
|
-
var CategoryProductsContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex: 1;\n padding: 20px;\n box-sizing: border-box;\n transition: all 0.5s;\n\n @media print {\n display: none;\n }\n\n @media (min-width: 768px) {\n overflow: hidden;\n }\n"])));
|
|
22
|
+
var CategoryProductsContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex: 1;\n padding: 20px;\n box-sizing: border-box;\n transition: all 0.5s;\n width: calc(100% - 40px);\n\n @media print {\n display: none;\n }\n\n @media (min-width: 768px) {\n overflow: hidden;\n }\n"])));
|
|
23
23
|
|
|
24
24
|
exports.CategoryProductsContainer = CategoryProductsContainer;
|
|
25
25
|
|
|
@@ -33,37 +33,41 @@ var HeaderTitleContainer = _styledComponents.default.div(_templateObject3 || (_t
|
|
|
33
33
|
|
|
34
34
|
exports.HeaderTitleContainer = HeaderTitleContainer;
|
|
35
35
|
|
|
36
|
-
var ActionsGroup = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-top: 15px;\n flex-wrap: wrap;\n\n > button {\n height: 41px;\n ", "\n }\n\n input {\n background: ", ";\n }\n\n >
|
|
36
|
+
var ActionsGroup = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-top: 15px;\n flex-wrap: wrap;\n\n > button {\n height: 41px;\n width: 90px;\n white-space: nowrap;\n margin-top: 5px;\n ", "\n @media (min-width: 768px) {\n width: unset;\n }\n }\n\n input {\n background: ", ";\n }\n\n > .searchBar {\n min-width: 100px;\n margin-top: 5px;\n }\n > .importerGroup {\n margin-top: 5px;\n ", "\n\n > button {\n width: 90px;\n > svg {\n display: none;\n @media (min-width: 768px) {\n display: inline;\n }\n }\n @media (min-width: 768px) {\n width: unset;\n }\n }\n }\n\n @keyframes spinner-content {\n 0% { transform: rotate(0) }\n 100% { transform: rotate(360deg) }\n }\n\n > .loading {\n > svg {\n animation: spinner-content 1.85s linear infinite;\n }\n }\n"])), function (props) {
|
|
37
37
|
var _props$theme;
|
|
38
38
|
|
|
39
39
|
return (_props$theme = props.theme) !== null && _props$theme !== void 0 && _props$theme.rtl ? (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-left: 15px;\n "]))) : (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-right: 15px;\n "])));
|
|
40
40
|
}, function (props) {
|
|
41
41
|
return props.theme.colors.secundary;
|
|
42
|
+
}, function (props) {
|
|
43
|
+
var _props$theme2;
|
|
44
|
+
|
|
45
|
+
return (_props$theme2 = props.theme) !== null && _props$theme2 !== void 0 && _props$theme2.rtl ? (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-left: 15px;\n "]))) : (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin-right: 15px;\n "])));
|
|
42
46
|
});
|
|
43
47
|
|
|
44
48
|
exports.ActionsGroup = ActionsGroup;
|
|
45
49
|
|
|
46
|
-
var CategoryProductsContent = _styledComponents.default.div(
|
|
50
|
+
var CategoryProductsContent = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n margin-top: 50px;\n min-height: calc(100% - 150px);\n\n @media (max-width: 768px) {\n flex-direction: column;\n }\n"])));
|
|
47
51
|
|
|
48
52
|
exports.CategoryProductsContent = CategoryProductsContent;
|
|
49
53
|
|
|
50
|
-
var CategoryListContainer = _styledComponents.default.div(
|
|
54
|
+
var CategoryListContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n min-width: 260px;\n\n @media (max-width: 576px) {\n width:100%;\n }\n"])));
|
|
51
55
|
|
|
52
56
|
exports.CategoryListContainer = CategoryListContainer;
|
|
53
57
|
|
|
54
|
-
var ProductListContainer = _styledComponents.default.div(
|
|
58
|
+
var ProductListContainer = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n flex-grow: 1;\n width: 100%;\n\n @media (min-width: 769px) {\n width: calc(100% - 260px);\n }\n"])));
|
|
55
59
|
|
|
56
60
|
exports.ProductListContainer = ProductListContainer;
|
|
57
61
|
|
|
58
|
-
var ProductHeader = _styledComponents.default.div(
|
|
59
|
-
var _props$
|
|
62
|
+
var ProductHeader = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n h1 {\n font-weight: 600;\n font-size: 14px;\n margin: 0;\n }\n\n @media (min-width: 768px) {\n padding: 0 10px;\n\n ", "\n }\n"])), function (props) {
|
|
63
|
+
var _props$theme3;
|
|
60
64
|
|
|
61
|
-
return (_props$
|
|
65
|
+
return (_props$theme3 = props.theme) !== null && _props$theme3 !== void 0 && _props$theme3.rtl ? (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n margin-right: 20px;\n "]))) : (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n margin-left: 20px;\n "])));
|
|
62
66
|
});
|
|
63
67
|
|
|
64
68
|
exports.ProductHeader = ProductHeader;
|
|
65
69
|
|
|
66
|
-
var ActionIconList = _styledComponents.default.div(
|
|
70
|
+
var ActionIconList = _styledComponents.default.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n button.batch-image-upload {\n border: 1px solid ", ";\n background-color: transparent;\n color: ", ";\n padding: 4px 15px;\n &:hover {\n background: ", ";\n color: ", ";\n }\n }\n"])), function (props) {
|
|
67
71
|
return props.theme.colors.primary;
|
|
68
72
|
}, function (props) {
|
|
69
73
|
return (0, _polished.darken)(0.07, props.theme.colors.primary);
|
|
@@ -75,26 +79,26 @@ var ActionIconList = _styledComponents.default.div(_templateObject13 || (_templa
|
|
|
75
79
|
|
|
76
80
|
exports.ActionIconList = ActionIconList;
|
|
77
81
|
|
|
78
|
-
var ViewMethodButton = _styledComponents.default.span(
|
|
82
|
+
var ViewMethodButton = _styledComponents.default.span(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n margin-left: 12px;\n cursor: pointer;\n color: ", ";\n\n svg {\n font-size: 16px;\n }\n\n &.batch {\n svg {\n font-size: 18px;\n }\n }\n\n ", "\n"])), function (props) {
|
|
79
83
|
return props.theme.colors.headingColor;
|
|
80
84
|
}, function (_ref) {
|
|
81
85
|
var active = _ref.active;
|
|
82
|
-
return active && (0, _styledComponents.css)(
|
|
86
|
+
return active && (0, _styledComponents.css)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n color: ", ";\n "])), function (props) {
|
|
83
87
|
return props.theme.colors.primary;
|
|
84
88
|
});
|
|
85
89
|
});
|
|
86
90
|
|
|
87
91
|
exports.ViewMethodButton = ViewMethodButton;
|
|
88
92
|
|
|
89
|
-
var BusinessSelector = _styledComponents.default.div(
|
|
93
|
+
var BusinessSelector = _styledComponents.default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n position: relative;\n width: fit-content;\n"])));
|
|
90
94
|
|
|
91
95
|
exports.BusinessSelector = BusinessSelector;
|
|
92
96
|
|
|
93
|
-
var BusinessNameWrapper = _styledComponents.default.div(
|
|
97
|
+
var BusinessNameWrapper = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n h1 {\n font-size: 20px;\n font-weight: 700;\n }\n cursor: pointer;\n h1 {\n svg {\n font-size: 0.7em;\n transition: 0.2s ease-in-out;\n }\n svg.rotate-arrow {\n transform: rotate(180deg);\n }\n }\n"])));
|
|
94
98
|
|
|
95
99
|
exports.BusinessNameWrapper = BusinessNameWrapper;
|
|
96
100
|
|
|
97
|
-
var Breadcrumb = _styledComponents.default.div(
|
|
101
|
+
var Breadcrumb = _styledComponents.default.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n font-size: 12px;\n color: ", ";\n\n span {\n &.business {\n color: ", ";\n cursor: pointer;\n }\n }\n\n svg {\n margin: 0 9px;\n }\n"])), function (props) {
|
|
98
102
|
return props.theme.colors.lightGray;
|
|
99
103
|
}, function (props) {
|
|
100
104
|
return props.theme.colors.primary;
|
|
@@ -102,6 +106,6 @@ var Breadcrumb = _styledComponents.default.div(_templateObject18 || (_templateOb
|
|
|
102
106
|
|
|
103
107
|
exports.Breadcrumb = Breadcrumb;
|
|
104
108
|
|
|
105
|
-
var ColumnsAllowWrapper = _styledComponents.default.div(
|
|
109
|
+
var ColumnsAllowWrapper = _styledComponents.default.div(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n position: relative;\n margin: 0 5px;\n"])));
|
|
106
110
|
|
|
107
111
|
exports.ColumnsAllowWrapper = ColumnsAllowWrapper;
|
|
@@ -80,6 +80,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
80
80
|
handleSucessRemoveBusiness = props.handleSucessRemoveBusiness,
|
|
81
81
|
handleSucessAddBusiness = props.handleSucessAddBusiness,
|
|
82
82
|
handleSucessUpdateBusiness = props.handleSucessUpdateBusiness,
|
|
83
|
+
loadBusinesses = props.loadBusinesses,
|
|
83
84
|
onSearch = props.onSearch,
|
|
84
85
|
onBusinessRedirect = props.onBusinessRedirect,
|
|
85
86
|
getPageBusinesses = props.getPageBusinesses;
|
|
@@ -255,7 +256,9 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
255
256
|
onSearch: onSearch,
|
|
256
257
|
handleOpenAddBusiness: handleOpenAddBusiness,
|
|
257
258
|
handleStartTutorial: handleStartTutorial,
|
|
258
|
-
handleOpenSync: handleOpenSync
|
|
259
|
+
handleOpenSync: handleOpenSync,
|
|
260
|
+
handleRefreshBusinesses: loadBusinesses,
|
|
261
|
+
loading: businessList.loading
|
|
259
262
|
}), /*#__PURE__*/_react.default.createElement(_styles.ViewContainer, null, /*#__PURE__*/_react.default.createElement(_BusinessActiveStateFilter.BusinessActiveStateFilter, {
|
|
260
263
|
selectedBusinessActiveState: selectedBusinessActiveState,
|
|
261
264
|
handleChangeBusinessActiveState: handleChangeBusinessActiveState
|
|
@@ -42,7 +42,9 @@ var BusinessesListingHeader = function BusinessesListingHeader(props) {
|
|
|
42
42
|
onSearch = props.onSearch,
|
|
43
43
|
handleOpenAddBusiness = props.handleOpenAddBusiness,
|
|
44
44
|
handleStartTutorial = props.handleStartTutorial,
|
|
45
|
-
handleOpenSync = props.handleOpenSync
|
|
45
|
+
handleOpenSync = props.handleOpenSync,
|
|
46
|
+
handleRefreshBusinesses = props.handleRefreshBusinesses,
|
|
47
|
+
loading = props.loading;
|
|
46
48
|
|
|
47
49
|
var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
|
|
48
50
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
@@ -67,7 +69,21 @@ var BusinessesListingHeader = function BusinessesListingHeader(props) {
|
|
|
67
69
|
onClick: function onClick() {
|
|
68
70
|
return handleStartTutorial();
|
|
69
71
|
}
|
|
70
|
-
}, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.LifePreserver, null)))), /*#__PURE__*/_react.default.createElement(_styles2.ActionsWrapper, null, /*#__PURE__*/_react.default.createElement(
|
|
72
|
+
}, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.LifePreserver, null)))), /*#__PURE__*/_react.default.createElement(_styles2.ActionsWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.Button, {
|
|
73
|
+
color: "lightPrimary",
|
|
74
|
+
borderRadius: "8px",
|
|
75
|
+
onClick: function onClick() {
|
|
76
|
+
return handleRefreshBusinesses();
|
|
77
|
+
},
|
|
78
|
+
className: loading ? 'loading' : ''
|
|
79
|
+
}, t('REFRESH', 'Refresh'), /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.ArrowRepeat, {
|
|
80
|
+
size: 16,
|
|
81
|
+
style: {
|
|
82
|
+
marginLeft: 5
|
|
83
|
+
}
|
|
84
|
+
})), /*#__PURE__*/_react.default.createElement(_ImportersButton.ImportersButton, {
|
|
85
|
+
customClass: "importerGroup"
|
|
86
|
+
}), /*#__PURE__*/_react.default.createElement(_styles.Button, {
|
|
71
87
|
color: "lightPrimary",
|
|
72
88
|
borderRadius: "8px",
|
|
73
89
|
onClick: function onClick() {
|
|
@@ -78,7 +94,8 @@ var BusinessesListingHeader = function BusinessesListingHeader(props) {
|
|
|
78
94
|
lazyLoad: true,
|
|
79
95
|
onSearch: onSearch,
|
|
80
96
|
search: searchValue,
|
|
81
|
-
placeholder: t('SEARCH', 'Search')
|
|
97
|
+
placeholder: t('SEARCH', 'Search'),
|
|
98
|
+
customClass: "searchBar"
|
|
82
99
|
})));
|
|
83
100
|
};
|
|
84
101
|
|
|
@@ -9,7 +9,7 @@ exports.HeaderTitleContainer = exports.HeaderContainer = exports.ActionsWrapper
|
|
|
9
9
|
|
|
10
10
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
11
11
|
|
|
12
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
12
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
|
|
13
13
|
|
|
14
14
|
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); }
|
|
15
15
|
|
|
@@ -37,10 +37,14 @@ var HeaderTitleContainer = _styledComponents.default.div(_templateObject2 || (_t
|
|
|
37
37
|
|
|
38
38
|
exports.HeaderTitleContainer = HeaderTitleContainer;
|
|
39
39
|
|
|
40
|
-
var ActionsWrapper = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n > button {\n height: 41px;\n width: 90px;\n white-space: nowrap;\n ", "\n @media (min-width: 768px) {\n width: unset;\n }\n }\n"])), function (props) {
|
|
40
|
+
var ActionsWrapper = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n > button {\n height: 41px;\n width: 90px;\n white-space: nowrap;\n margin-top: 5px;\n ", "\n @media (min-width: 768px) {\n width: unset;\n }\n }\n > .searchBar {\n min-width: 100px;\n margin-top: 5px;\n }\n > .importerGroup {\n margin-top: 5px;\n ", "\n\n > button {\n width: 90px;\n > svg {\n display: none;\n @media (min-width: 768px) {\n display: inline;\n }\n }\n @media (min-width: 768px) {\n width: unset;\n }\n }\n }\n\n @keyframes spinner-content {\n 0% { transform: rotate(0) }\n 100% { transform: rotate(360deg) }\n }\n\n > .loading {\n > svg {\n animation: spinner-content 1.85s linear infinite;\n }\n }\n"])), function (props) {
|
|
41
41
|
var _props$theme3;
|
|
42
42
|
|
|
43
43
|
return (_props$theme3 = props.theme) !== null && _props$theme3 !== void 0 && _props$theme3.rtl ? (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin-left: 15px;\n "]))) : (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n margin-right: 15px;\n "])));
|
|
44
|
+
}, function (props) {
|
|
45
|
+
var _props$theme4;
|
|
46
|
+
|
|
47
|
+
return (_props$theme4 = props.theme) !== null && _props$theme4 !== void 0 && _props$theme4.rtl ? (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n margin-left: 15px;\n "]))) : (0, _styledComponents.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-right: 15px;\n "])));
|
|
44
48
|
});
|
|
45
49
|
|
|
46
50
|
exports.ActionsWrapper = ActionsWrapper;
|
|
@@ -52,7 +52,8 @@ var ImportersList = function ImportersList(props) {
|
|
|
52
52
|
handleDeleteImporter = props.handleDeleteImporter,
|
|
53
53
|
selectedImporter = props.selectedImporter,
|
|
54
54
|
setSelectedImporter = props.setSelectedImporter,
|
|
55
|
-
handleEditImporter = props.handleEditImporter
|
|
55
|
+
handleEditImporter = props.handleEditImporter,
|
|
56
|
+
isDisabledFeature = props.isDisabledFeature;
|
|
56
57
|
|
|
57
58
|
var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
|
|
58
59
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
@@ -68,7 +69,9 @@ var ImportersList = function ImportersList(props) {
|
|
|
68
69
|
createImporterJob(importer);
|
|
69
70
|
};
|
|
70
71
|
|
|
71
|
-
return /*#__PURE__*/_react.default.createElement(_styles2.ImportListContainer,
|
|
72
|
+
return /*#__PURE__*/_react.default.createElement(_styles2.ImportListContainer, {
|
|
73
|
+
isDisabledFeature: isDisabledFeature
|
|
74
|
+
}, /*#__PURE__*/_react.default.createElement(_styles2.ImportersTableWrapper, null, /*#__PURE__*/_react.default.createElement(_styles2.ImpotersTable, null, /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", null, t('NAME', 'Name')), /*#__PURE__*/_react.default.createElement("th", {
|
|
72
75
|
colSpan: "2"
|
|
73
76
|
}, t('ACTION', 'Action')))), importerList.loading ? _toConsumableArray(Array(10).keys()).map(function (i) {
|
|
74
77
|
return /*#__PURE__*/_react.default.createElement(_styles2.ImoportTbody, {
|
|
@@ -11,7 +11,7 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
|
11
11
|
|
|
12
12
|
var _polished = require("polished");
|
|
13
13
|
|
|
14
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
|
|
14
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15;
|
|
15
15
|
|
|
16
16
|
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); }
|
|
17
17
|
|
|
@@ -19,15 +19,18 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
19
19
|
|
|
20
20
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
21
21
|
|
|
22
|
-
var ImportListContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral([" \n"])))
|
|
22
|
+
var ImportListContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n"])), function (_ref) {
|
|
23
|
+
var isDisabledFeature = _ref.isDisabledFeature;
|
|
24
|
+
return isDisabledFeature && (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n cursor: not-allowed;\n opacity: 0.5;\n > div {\n pointer-events: none;\n }\n "])));
|
|
25
|
+
});
|
|
23
26
|
|
|
24
27
|
exports.ImportListContainer = ImportListContainer;
|
|
25
28
|
|
|
26
|
-
var ImportersTableWrapper = _styledComponents.default.div(
|
|
29
|
+
var ImportersTableWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n"])));
|
|
27
30
|
|
|
28
31
|
exports.ImportersTableWrapper = ImportersTableWrapper;
|
|
29
32
|
|
|
30
|
-
var ImpotersTable = _styledComponents.default.table(
|
|
33
|
+
var ImpotersTable = _styledComponents.default.table(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n color: ", ";\n\n td, th {\n padding: 10px 0;\n font-size: 14px;\n &:first-child {\n width: 50%;\n }\n }\n\n thead {\n border-bottom: solid 1px ", ";\n }\n"])), function (props) {
|
|
31
34
|
var _props$theme$colors;
|
|
32
35
|
|
|
33
36
|
return (_props$theme$colors = props.theme.colors) === null || _props$theme$colors === void 0 ? void 0 : _props$theme$colors.headingColor;
|
|
@@ -37,15 +40,15 @@ var ImpotersTable = _styledComponents.default.table(_templateObject3 || (_templa
|
|
|
37
40
|
|
|
38
41
|
exports.ImpotersTable = ImpotersTable;
|
|
39
42
|
|
|
40
|
-
var ImoportTbody = _styledComponents.default.tbody(
|
|
43
|
+
var ImoportTbody = _styledComponents.default.tbody(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n tr {\n td {\n padding-right: 10px;\n .importer-name {\n display: flex;\n width: 100%;\n border-right: 1px solid ", ";\n }\n }\n }\n cursor: pointer;\n border-bottom: 1px solid ", ";\n &:hover {\n background-color: ", ";\n }\n ", "\n"])), function (props) {
|
|
41
44
|
return props.theme.colors.borderColor;
|
|
42
45
|
}, function (props) {
|
|
43
46
|
return props.theme.colors.borderColor;
|
|
44
47
|
}, function (props) {
|
|
45
48
|
return props.theme.colors.lightPrimary;
|
|
46
|
-
}, function (
|
|
47
|
-
var active =
|
|
48
|
-
return active && (0, _styledComponents.css)(
|
|
49
|
+
}, function (_ref2) {
|
|
50
|
+
var active = _ref2.active;
|
|
51
|
+
return active && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n background-color: ", ";\n td {\n border-top: 1px solid ", ";\n border-bottom: 1px solid ", ";\n }\n "])), function (props) {
|
|
49
52
|
return props.theme.colors.lightPrimary;
|
|
50
53
|
}, function (props) {
|
|
51
54
|
return props.theme.colors.primary;
|
|
@@ -56,34 +59,34 @@ var ImoportTbody = _styledComponents.default.tbody(_templateObject4 || (_templat
|
|
|
56
59
|
|
|
57
60
|
exports.ImoportTbody = ImoportTbody;
|
|
58
61
|
|
|
59
|
-
var UserEnableWrapper = _styledComponents.default.div(
|
|
62
|
+
var UserEnableWrapper = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n width: fit-content;\n\n span {\n font-size: 14px;\n\n ", "\n }\n"])), function (props) {
|
|
60
63
|
var _props$theme;
|
|
61
64
|
|
|
62
|
-
return (_props$theme = props.theme) !== null && _props$theme !== void 0 && _props$theme.rtl ? (0, _styledComponents.css)(
|
|
65
|
+
return (_props$theme = props.theme) !== null && _props$theme !== void 0 && _props$theme.rtl ? (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n padding-left: 10px;\n "]))) : (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n padding-right: 10px;\n "])));
|
|
63
66
|
});
|
|
64
67
|
|
|
65
68
|
exports.UserEnableWrapper = UserEnableWrapper;
|
|
66
69
|
|
|
67
|
-
var WrapperUserActionSelector = _styledComponents.default.div(
|
|
70
|
+
var WrapperUserActionSelector = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-end;\n button {\n background: transparent !important;\n border: none;\n padding: 0px;\n &:active,\n &:focus {\n border-color: unset !important;\n box-shadow: none !important;\n }\n svg {\n color: ", ";\n }\n &:after {\n display: none;\n }\n }\n .show {\n button {\n background: #F8F9FA !important;\n border-color: unset !important;\n box-shadow: none !important;\n }\n >div {\n border: 1px solid #E9ECEF;\n box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.12);\n }\n }\n > div {\n border-radius: 8px;\n ", "\n > div {\n a:last-child {\n color: #E63757;\n }\n }\n .dropdown-item {\n font-size: 14px;\n }\n }\n"])), function (props) {
|
|
68
71
|
return props.theme.colors.headingColor;
|
|
69
72
|
}, function (props) {
|
|
70
73
|
var _props$theme2;
|
|
71
74
|
|
|
72
|
-
return (_props$theme2 = props.theme) !== null && _props$theme2 !== void 0 && _props$theme2.rtl ? (0, _styledComponents.css)(
|
|
75
|
+
return (_props$theme2 = props.theme) !== null && _props$theme2 !== void 0 && _props$theme2.rtl ? (0, _styledComponents.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-left: 5px;\n "]))) : (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n margin-right: 5px;\n "])));
|
|
73
76
|
});
|
|
74
77
|
|
|
75
78
|
exports.WrapperUserActionSelector = WrapperUserActionSelector;
|
|
76
79
|
|
|
77
|
-
var ImportersBottomContainer = _styledComponents.default.div(
|
|
80
|
+
var ImportersBottomContainer = _styledComponents.default.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n\n"])));
|
|
78
81
|
|
|
79
82
|
exports.ImportersBottomContainer = ImportersBottomContainer;
|
|
80
83
|
|
|
81
|
-
var AddNewImporterButton = _styledComponents.default.div(
|
|
84
|
+
var AddNewImporterButton = _styledComponents.default.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n display: inline-flex;\n width: fit-content;\n cursor: pointer;\n color: rgb(144, 155, 169);\n font-size: 14px;\n margin-top: 20px;\n &:hover {\n color: ", ";\n }\n"])), function (props) {
|
|
82
85
|
return (0, _polished.darken)(0.05, props.theme.colors.primary);
|
|
83
86
|
});
|
|
84
87
|
|
|
85
88
|
exports.AddNewImporterButton = AddNewImporterButton;
|
|
86
89
|
|
|
87
|
-
var NotFoundWrapper = _styledComponents.default.div(
|
|
90
|
+
var NotFoundWrapper = _styledComponents.default.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n position: relative;\n #not-found-source {\n height: auto;\n h1 {\n font-size: 18px;\n margin-top: 25px;\n }\n }\n"])));
|
|
88
91
|
|
|
89
92
|
exports.NotFoundWrapper = NotFoundWrapper;
|
|
@@ -25,6 +25,8 @@ var _ImporterHelpContent = require("../ImporterHelpContent");
|
|
|
25
25
|
|
|
26
26
|
var _Shared = require("../../Shared");
|
|
27
27
|
|
|
28
|
+
var _DisabledFeatureAlert = require("../../DisabledFeatureAlert");
|
|
29
|
+
|
|
28
30
|
var _styles2 = require("./styles");
|
|
29
31
|
|
|
30
32
|
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); }
|
|
@@ -61,6 +63,16 @@ var ImportersListingUI = function ImportersListingUI(props) {
|
|
|
61
63
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
62
64
|
t = _useLanguage2[1];
|
|
63
65
|
|
|
66
|
+
var _useConfig = (0, _orderingComponentsAdminExternal.useConfig)(),
|
|
67
|
+
_useConfig2 = _slicedToArray(_useConfig, 1),
|
|
68
|
+
configs = _useConfig2[0].configs;
|
|
69
|
+
|
|
70
|
+
var _useSession = (0, _orderingComponentsAdminExternal.useSession)(),
|
|
71
|
+
_useSession2 = _slicedToArray(_useSession, 1),
|
|
72
|
+
user = _useSession2[0].user;
|
|
73
|
+
|
|
74
|
+
var featureName = 'massive_importer';
|
|
75
|
+
|
|
64
76
|
var _useState = (0, _react.useState)(false),
|
|
65
77
|
_useState2 = _slicedToArray(_useState, 2),
|
|
66
78
|
openNewImporter = _useState2[0],
|
|
@@ -96,6 +108,11 @@ var ImportersListingUI = function ImportersListingUI(props) {
|
|
|
96
108
|
openMappingDetails = _useState14[0],
|
|
97
109
|
setOpenMappingDetails = _useState14[1];
|
|
98
110
|
|
|
111
|
+
var _useState15 = (0, _react.useState)(false),
|
|
112
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
113
|
+
isDisabledFeature = _useState16[0],
|
|
114
|
+
setIsDisabledFeature = _useState16[1];
|
|
115
|
+
|
|
99
116
|
var addNewImporter = function addNewImporter() {
|
|
100
117
|
setSelectedImporter({});
|
|
101
118
|
setOpenImportCsv(false);
|
|
@@ -120,17 +137,26 @@ var ImportersListingUI = function ImportersListingUI(props) {
|
|
|
120
137
|
(0, _react.useEffect)(function () {
|
|
121
138
|
setExtraOpen && setExtraOpen(openNewImporter);
|
|
122
139
|
}, [openNewImporter]);
|
|
140
|
+
(0, _react.useEffect)(function () {
|
|
141
|
+
if (configs && Object.keys(configs).length > 0 && user) {
|
|
142
|
+
if (!Object.keys(configs).includes(featureName) && (user === null || user === void 0 ? void 0 : user.level) === 0) {
|
|
143
|
+
setIsDisabledFeature(true);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}, [configs]);
|
|
123
147
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles2.ImportersListingContainer, null, /*#__PURE__*/_react.default.createElement(_styles2.Header, null, /*#__PURE__*/_react.default.createElement(_styles2.Title, null, /*#__PURE__*/_react.default.createElement(_styles2.TitleContent, null, t('IMPORTERS', 'Importers')), /*#__PURE__*/_react.default.createElement(_styles.IconButton, {
|
|
124
148
|
color: "primary",
|
|
125
149
|
onClick: function onClick() {
|
|
126
150
|
return setOpenImporterHelp(true);
|
|
127
|
-
}
|
|
151
|
+
},
|
|
152
|
+
disabled: isDisabledFeature
|
|
128
153
|
}, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.InfoCircle, null))), /*#__PURE__*/_react.default.createElement(_styles2.ActionButtons, null, /*#__PURE__*/_react.default.createElement(_styles.Button, {
|
|
129
154
|
color: "lightPrimary",
|
|
130
155
|
borderRadius: "5px",
|
|
131
156
|
onClick: function onClick() {
|
|
132
157
|
return addNewImporter();
|
|
133
|
-
}
|
|
158
|
+
},
|
|
159
|
+
disabled: isDisabledFeature
|
|
134
160
|
}, t('ADD_IMPORTER', 'Add importer')))), /*#__PURE__*/_react.default.createElement(_ImportersList.ImportersList, {
|
|
135
161
|
importerList: importerList,
|
|
136
162
|
paginationDetail: paginationDetail,
|
|
@@ -139,8 +165,9 @@ var ImportersListingUI = function ImportersListingUI(props) {
|
|
|
139
165
|
handleDeleteImporter: handleDeleteImporter,
|
|
140
166
|
selectedImporter: selectedImporter,
|
|
141
167
|
setSelectedImporter: setSelectedImporter,
|
|
142
|
-
handleEditImporter: handleEditImporter
|
|
143
|
-
|
|
168
|
+
handleEditImporter: handleEditImporter,
|
|
169
|
+
isDisabledFeature: isDisabledFeature
|
|
170
|
+
}), isDisabledFeature && /*#__PURE__*/_react.default.createElement(_DisabledFeatureAlert.DisabledFeatureAlert, null), openNewImporter && /*#__PURE__*/_react.default.createElement(_Shared.SideBar, {
|
|
144
171
|
isBorderShow: !openMappingDetails,
|
|
145
172
|
open: openNewImporter,
|
|
146
173
|
defaultSideBarWidth: openMappingDetails ? 1000 : 500,
|
|
@@ -29,6 +29,8 @@ var _reactBootstrap = require("react-bootstrap");
|
|
|
29
29
|
|
|
30
30
|
var _Shared = require("../../Shared");
|
|
31
31
|
|
|
32
|
+
var _DisabledFeatureAlert = require("../../DisabledFeatureAlert");
|
|
33
|
+
|
|
32
34
|
var _styles3 = require("./styles");
|
|
33
35
|
|
|
34
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -76,7 +78,8 @@ var PaymentOption = function PaymentOption(props) {
|
|
|
76
78
|
actionState = props.actionState,
|
|
77
79
|
handleSaveClick = props.handleSaveClick,
|
|
78
80
|
businessPaymethod = props.businessPaymethod,
|
|
79
|
-
handleDeletePaymethod = props.handleDeletePaymethod
|
|
81
|
+
handleDeletePaymethod = props.handleDeletePaymethod,
|
|
82
|
+
isDisabledFeature = props.isDisabledFeature;
|
|
80
83
|
var theme = (0, _styledComponents.useTheme)();
|
|
81
84
|
|
|
82
85
|
var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
|
|
@@ -197,11 +200,12 @@ var PaymentOption = function PaymentOption(props) {
|
|
|
197
200
|
return /*#__PURE__*/_react.default.createElement(_styles3.TabOption, {
|
|
198
201
|
key: site.id,
|
|
199
202
|
onClick: function onClick() {
|
|
200
|
-
return setPaymethodInfo({
|
|
203
|
+
return !isDisabledFeature && setPaymethodInfo({
|
|
201
204
|
key: 'sites',
|
|
202
205
|
value: site.id
|
|
203
206
|
});
|
|
204
|
-
}
|
|
207
|
+
},
|
|
208
|
+
isDisabledFeature: isDisabledFeature
|
|
205
209
|
}, (_ref2 = (_changesState$sites = changesState === null || changesState === void 0 ? void 0 : changesState.sites) !== null && _changesState$sites !== void 0 ? _changesState$sites : businessPaymethod === null || businessPaymethod === void 0 ? void 0 : (_businessPaymethod$si = businessPaymethod.sites) === null || _businessPaymethod$si === void 0 ? void 0 : _businessPaymethod$si.map(function (s) {
|
|
206
210
|
return s.id;
|
|
207
211
|
})) !== null && _ref2 !== void 0 && _ref2.includes(site.id) ? /*#__PURE__*/_react.default.createElement(_RiCheckboxFill.default, {
|
|
@@ -213,22 +217,23 @@ var PaymentOption = function PaymentOption(props) {
|
|
|
213
217
|
return /*#__PURE__*/_react.default.createElement(_styles3.TabOption, {
|
|
214
218
|
key: type.value,
|
|
215
219
|
onClick: function onClick() {
|
|
216
|
-
return setPaymethodInfo({
|
|
220
|
+
return !isDisabledFeature && setPaymethodInfo({
|
|
217
221
|
key: 'allowed_order_types',
|
|
218
222
|
value: type.value
|
|
219
223
|
});
|
|
220
|
-
}
|
|
224
|
+
},
|
|
225
|
+
isDisabledFeature: isDisabledFeature
|
|
221
226
|
}, (_ref3 = (_changesState$allowed = changesState === null || changesState === void 0 ? void 0 : changesState.allowed_order_types) !== null && _changesState$allowed !== void 0 ? _changesState$allowed : businessPaymethod === null || businessPaymethod === void 0 ? void 0 : businessPaymethod.allowed_order_types) !== null && _ref3 !== void 0 && _ref3.includes(type.value) ? /*#__PURE__*/_react.default.createElement(_RiCheckboxFill.default, {
|
|
222
227
|
className: "fill"
|
|
223
228
|
}) : /*#__PURE__*/_react.default.createElement(_RiCheckboxBlankLine.default, null), /*#__PURE__*/_react.default.createElement(_styles3.TabOptionName, null, type.text));
|
|
224
229
|
}), /*#__PURE__*/_react.default.createElement(_styles.Button, {
|
|
225
230
|
borderRadius: "5px",
|
|
226
231
|
color: "primary",
|
|
227
|
-
disabled: actionState.loading || Object.keys(changesState).length === 0,
|
|
232
|
+
disabled: isDisabledFeature || actionState.loading || Object.keys(changesState).length === 0,
|
|
228
233
|
onClick: function onClick() {
|
|
229
234
|
return handleSaveClick(businessPaymethod.id);
|
|
230
235
|
}
|
|
231
|
-
}, actionState.loading ? t('LOADING', 'Loading') : t('SAVE', 'Save'))), /*#__PURE__*/_react.default.createElement(_Shared.Confirm, {
|
|
236
|
+
}, actionState.loading ? t('LOADING', 'Loading') : t('SAVE', 'Save'))), isDisabledFeature && /*#__PURE__*/_react.default.createElement(_DisabledFeatureAlert.DisabledFeatureAlert, null), /*#__PURE__*/_react.default.createElement(_Shared.Confirm, {
|
|
232
237
|
width: "700px",
|
|
233
238
|
title: t('WEB_APPNAME', 'Ordering'),
|
|
234
239
|
content: confirm.content,
|