ordering-ui-admin-external 1.3.2 → 1.3.3

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 (67) hide show
  1. package/_bundles/{ordering-ui-admin.6adfe91f3f26eaebf7f8.js → ordering-ui-admin.7b1ded1d480e937548f3.js} +2 -2
  2. package/_bundles/{ordering-ui-admin.6adfe91f3f26eaebf7f8.js.LICENSE.txt → ordering-ui-admin.7b1ded1d480e937548f3.js.LICENSE.txt} +0 -0
  3. package/_modules/components/BusinessIntelligence/Reports/index.js +3 -27
  4. package/_modules/components/BusinessIntelligence/Reports/styles.js +2 -9
  5. package/_modules/components/Loyalty/RewardsPrograms/index.js +12 -38
  6. package/_modules/components/Loyalty/RewardsPrograms/styles.js +6 -13
  7. package/_modules/components/Marketing/CampaignHeader/index.js +2 -5
  8. package/_modules/components/Marketing/CampaignHeader/styles.js +4 -7
  9. package/_modules/components/Marketing/CampaignList/index.js +4 -8
  10. package/_modules/components/Marketing/CampaignList/styles.js +22 -30
  11. package/_modules/components/Marketing/CampaignListing/index.js +3 -29
  12. package/_modules/components/OrderingProducts/OrderingProductDetails/index.js +4 -2
  13. package/_modules/components/Settings/PluginList/index.js +31 -1
  14. package/_modules/components/Settings/SettingsDetail/index.js +3 -40
  15. package/_modules/components/Settings/SettingsDetail/styles.js +13 -26
  16. package/_modules/components/Settings/SettingsList/index.js +6 -43
  17. package/_modules/components/SidebarMenu/index.js +17 -20
  18. package/_modules/components/Stores/BusinessMenu/index.js +5 -36
  19. package/_modules/components/Stores/BusinessMenu/styles.js +19 -27
  20. package/_modules/components/Stores/BusinessPaymentMethods/index.js +16 -53
  21. package/_modules/components/Stores/BusinessProductAddForm/index.js +4 -2
  22. package/_modules/components/Stores/BusinessesListingHeader/index.js +7 -1
  23. package/_modules/components/Stores/ImportersList/index.js +2 -5
  24. package/_modules/components/Stores/ImportersList/styles.js +15 -18
  25. package/_modules/components/Stores/ImportersListing/index.js +4 -31
  26. package/_modules/components/Stores/PaymentOption/index.js +7 -12
  27. package/_modules/components/Stores/PaymentOptionMethods/index.js +4 -9
  28. package/_modules/components/Stores/PaymentOptionPaypal/index.js +4 -9
  29. package/_modules/components/Stores/PaymentOptionSquare/index.js +4 -9
  30. package/_modules/components/Stores/PaymentOptionStripeDirect/index.js +5 -10
  31. package/_modules/components/Stores/PaymentOptionStripeDirect/styles.js +5 -10
  32. package/_modules/components/Stores/PaymethodOptionPaypalExpress/index.js +4 -9
  33. package/_modules/components/Stores/PaymethodOptionStripeConnect/index.js +4 -9
  34. package/_modules/components/Stores/PaymethodOptionStripeRedirect/index.js +4 -9
  35. package/package.json +1 -1
  36. package/src/components/BusinessIntelligence/Reports/index.js +4 -18
  37. package/src/components/BusinessIntelligence/Reports/styles.js +0 -11
  38. package/src/components/Loyalty/RewardsPrograms/index.js +5 -18
  39. package/src/components/Loyalty/RewardsPrograms/styles.js +0 -10
  40. package/src/components/Marketing/CampaignHeader/index.js +2 -3
  41. package/src/components/Marketing/CampaignHeader/styles.js +0 -8
  42. package/src/components/Marketing/CampaignList/index.js +3 -5
  43. package/src/components/Marketing/CampaignList/styles.js +0 -16
  44. package/src/components/Marketing/CampaignListing/index.js +2 -18
  45. package/src/components/OrderingProducts/OrderingProductDetails/index.js +1 -1
  46. package/src/components/Settings/PluginList/index.js +2 -2
  47. package/src/components/Settings/SettingsDetail/index.js +2 -23
  48. package/src/components/Settings/SettingsDetail/styles.js +13 -8
  49. package/src/components/Settings/SettingsList/index.js +1 -24
  50. package/src/components/SidebarMenu/index.js +17 -17
  51. package/src/components/Stores/BusinessMenu/index.js +3 -21
  52. package/src/components/Stores/BusinessMenu/styles.js +0 -15
  53. package/src/components/Stores/BusinessPaymentMethods/index.js +32 -62
  54. package/src/components/Stores/BusinessProductAddForm/index.js +1 -1
  55. package/src/components/Stores/BusinessesListingHeader/index.js +2 -2
  56. package/src/components/Stores/ImportersList/index.js +2 -3
  57. package/src/components/Stores/ImportersList/styles.js +1 -9
  58. package/src/components/Stores/ImportersListing/index.js +0 -19
  59. package/src/components/Stores/PaymentOption/index.js +4 -9
  60. package/src/components/Stores/PaymentOptionMethods/index.js +3 -8
  61. package/src/components/Stores/PaymentOptionPaypal/index.js +3 -8
  62. package/src/components/Stores/PaymentOptionSquare/index.js +3 -8
  63. package/src/components/Stores/PaymentOptionStripeDirect/index.js +3 -8
  64. package/src/components/Stores/PaymentOptionStripeDirect/styles.js +0 -8
  65. package/src/components/Stores/PaymethodOptionPaypalExpress/index.js +3 -8
  66. package/src/components/Stores/PaymethodOptionStripeConnect/index.js +3 -8
  67. package/src/components/Stores/PaymethodOptionStripeRedirect/index.js +3 -8
@@ -27,8 +27,6 @@ var _reactBootstrap = require("react-bootstrap");
27
27
 
28
28
  var _Shared = require("../../Shared");
29
29
 
30
- var _DisabledFeatureAlert = require("../../DisabledFeatureAlert");
31
-
32
30
  var _styles2 = require("./styles");
33
31
 
34
32
  var _styles3 = require("../BusinessMenu/styles");
@@ -80,8 +78,7 @@ var PaymentOptionStripeDirect = function PaymentOptionStripeDirect(props) {
80
78
  handleChangeInput = props.handleChangeInput,
81
79
  handleSaveClick = props.handleSaveClick,
82
80
  businessPaymethod = props.businessPaymethod,
83
- handleDeletePaymethod = props.handleDeletePaymethod,
84
- isDisabledFeature = props.isDisabledFeature;
81
+ handleDeletePaymethod = props.handleDeletePaymethod;
85
82
  var theme = (0, _styledComponents.useTheme)();
86
83
 
87
84
  var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
@@ -246,12 +243,11 @@ var PaymentOptionStripeDirect = function PaymentOptionStripeDirect(props) {
246
243
  return /*#__PURE__*/_react.default.createElement(_styles2.TabOption, {
247
244
  key: site.id,
248
245
  onClick: function onClick() {
249
- return !isDisabledFeature && setPaymethodInfo({
246
+ return setPaymethodInfo({
250
247
  key: 'sites',
251
248
  value: site.id
252
249
  });
253
- },
254
- isDisabledFeature: isDisabledFeature
250
+ }
255
251
  }, (_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) {
256
252
  return s.id;
257
253
  })) !== null && _ref2 !== void 0 && _ref2.includes(site.id) ? /*#__PURE__*/_react.default.createElement(_RiCheckboxFill.default, {
@@ -262,9 +258,8 @@ var PaymentOptionStripeDirect = function PaymentOptionStripeDirect(props) {
262
258
 
263
259
  return /*#__PURE__*/_react.default.createElement(_styles2.TabOption, {
264
260
  key: type.value,
265
- isDisabledFeature: isDisabledFeature,
266
261
  onClick: function onClick() {
267
- return !isDisabledFeature && setPaymethodInfo({
262
+ return setPaymethodInfo({
268
263
  key: 'allowed_order_types',
269
264
  value: type.value
270
265
  });
@@ -279,7 +274,7 @@ var PaymentOptionStripeDirect = function PaymentOptionStripeDirect(props) {
279
274
  onClick: function onClick() {
280
275
  return handleSaveClick(businessPaymethod.id);
281
276
  }
282
- }, actionState.loading ? t('LOADING', 'Loading') : t('SAVE', 'Save'))), isDisabledFeature && (paymentTabs === 1 || paymentTabs === 2) && /*#__PURE__*/_react.default.createElement(_DisabledFeatureAlert.DisabledFeatureAlert, null), /*#__PURE__*/_react.default.createElement(_Shared.Confirm, {
277
+ }, actionState.loading ? t('LOADING', 'Loading') : t('SAVE', 'Save'))), /*#__PURE__*/_react.default.createElement(_Shared.Confirm, {
283
278
  width: "700px",
284
279
  title: t('WEB_APPNAME', 'Ordering'),
285
280
  content: confirm.content,
@@ -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;
14
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
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
 
@@ -57,30 +57,25 @@ var CloseButton = _styledComponents.default.div(_templateObject9 || (_templateOb
57
57
 
58
58
  exports.CloseButton = CloseButton;
59
59
 
60
- var TabOption = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n padding: 12px 0;\n cursor: pointer;\n color: ", ";\n \n > svg {\n font-size: 20px;\n &.fill {\n color: ", ";\n }\n }\n\n ", "\n"])), function (props) {
60
+ var TabOption = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n padding: 12px 0;\n cursor: pointer;\n color: ", ";\n \n > svg {\n font-size: 20px;\n &.fill {\n color: ", ";\n }\n }\n"])), function (props) {
61
61
  return props.theme.colors.headingColor;
62
62
  }, function (props) {
63
63
  return props.theme.colors.primary;
64
- }, function (_ref) {
65
- var isDisabledFeature = _ref.isDisabledFeature;
66
- return isDisabledFeature && (0, _styledComponents.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n cursor: not-allowed;\n opacity: 0.4;\n &:hover {\n background-color: ", ";\n }\n "])), function (props) {
67
- return props.theme.colors.white;
68
- });
69
64
  });
70
65
 
71
66
  exports.TabOption = TabOption;
72
67
 
73
- var TabOptionName = _styledComponents.default.span(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n color: ", ";\n ", "\n"])), function (props) {
68
+ var TabOptionName = _styledComponents.default.span(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n color: ", ";\n ", "\n"])), function (props) {
74
69
  return props.theme.colors.headingColor;
75
70
  }, function (props) {
76
71
  var _props$theme3;
77
72
 
78
- return (_props$theme3 = props.theme) !== null && _props$theme3 !== void 0 && _props$theme3.rtl ? (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n margin-right: 10px;\n "]))) : (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n margin-left: 10px;\n "])));
73
+ return (_props$theme3 = props.theme) !== null && _props$theme3 !== void 0 && _props$theme3.rtl ? (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n margin-right: 10px;\n "]))) : (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n margin-left: 10px;\n "])));
79
74
  });
80
75
 
81
76
  exports.TabOptionName = TabOptionName;
82
77
 
83
- var ActionSelectorWrapper = _styledComponents.default.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n margin: 0 10px;\n button {\n background: transparent !important;\n border: none;\n padding: 0px 5px;\n &:active,\n &:focus {\n border-color: unset !important;\n box-shadow: none !important;\n }\n svg {\n color: ", ";\n font-size: 20px;\n }\n\n &:after {\n display: none;\n }\n\n &:hover {\n background: ", " !important;\n }\n &:active {\n background: ", " !important;\n }\n }\n\n .show {\n button {\n background: ", " !important;\n }\n >div {\n border: 1px solid ", ";\n box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.12);\n }\n }\n\n > div {\n > div {\n border-radius: 8px;\n .dropdown-item {\n font-size: 12px;\n color: ", ";\n &:active {\n background: ", " !important;\n }\n }\n .dropdown-item:last-child {\n color: #E63757;\n }\n }\n }\n"])), function (props) {
78
+ var ActionSelectorWrapper = _styledComponents.default.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n margin: 0 10px;\n button {\n background: transparent !important;\n border: none;\n padding: 0px 5px;\n &:active,\n &:focus {\n border-color: unset !important;\n box-shadow: none !important;\n }\n svg {\n color: ", ";\n font-size: 20px;\n }\n\n &:after {\n display: none;\n }\n\n &:hover {\n background: ", " !important;\n }\n &:active {\n background: ", " !important;\n }\n }\n\n .show {\n button {\n background: ", " !important;\n }\n >div {\n border: 1px solid ", ";\n box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.12);\n }\n }\n\n > div {\n > div {\n border-radius: 8px;\n .dropdown-item {\n font-size: 12px;\n color: ", ";\n &:active {\n background: ", " !important;\n }\n }\n .dropdown-item:last-child {\n color: #E63757;\n }\n }\n }\n"])), function (props) {
84
79
  return props.theme.colors.headingColor;
85
80
  }, function (props) {
86
81
  return (0, _polished.darken)(0.04, props.theme.colors.secundary);
@@ -27,8 +27,6 @@ var _reactBootstrap = require("react-bootstrap");
27
27
 
28
28
  var _Shared = require("../../Shared");
29
29
 
30
- var _DisabledFeatureAlert = require("../../DisabledFeatureAlert");
31
-
32
30
  var _styles2 = require("./styles");
33
31
 
34
32
  var _styles3 = require("../BusinessMenu/styles");
@@ -82,8 +80,7 @@ var PaymethodOptionPaypalExpress = function PaymethodOptionPaypalExpress(props)
82
80
  businessPaymethod = props.businessPaymethod,
83
81
  orderTypes = props.orderTypes,
84
82
  handleChangeBusinessPaymentState = props.handleChangeBusinessPaymentState,
85
- handleDeletePaymethod = props.handleDeletePaymethod,
86
- isDisabledFeature = props.isDisabledFeature;
83
+ handleDeletePaymethod = props.handleDeletePaymethod;
87
84
  var theme = (0, _styledComponents.useTheme)();
88
85
 
89
86
  var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
@@ -234,9 +231,8 @@ var PaymethodOptionPaypalExpress = function PaymethodOptionPaypalExpress(props)
234
231
 
235
232
  return /*#__PURE__*/_react.default.createElement(_styles4.TabOption, {
236
233
  key: site.id,
237
- isDisabledFeature: isDisabledFeature,
238
234
  onClick: function onClick() {
239
- return !isDisabledFeature && setPaymethodInfo({
235
+ return setPaymethodInfo({
240
236
  key: 'sites',
241
237
  value: site.id
242
238
  });
@@ -251,9 +247,8 @@ var PaymethodOptionPaypalExpress = function PaymethodOptionPaypalExpress(props)
251
247
 
252
248
  return /*#__PURE__*/_react.default.createElement(_styles4.TabOption, {
253
249
  key: type.value,
254
- isDisabledFeature: isDisabledFeature,
255
250
  onClick: function onClick() {
256
- return !isDisabledFeature && setPaymethodInfo({
251
+ return setPaymethodInfo({
257
252
  key: 'allowed_order_types',
258
253
  value: type.value
259
254
  });
@@ -268,7 +263,7 @@ var PaymethodOptionPaypalExpress = function PaymethodOptionPaypalExpress(props)
268
263
  onClick: function onClick() {
269
264
  return handleSaveClick(businessPaymethod.id);
270
265
  }
271
- }, actionState.loading ? t('LOADING', 'Loading') : t('SAVE', 'Save'))), isDisabledFeature && (paymentTabs === 1 || paymentTabs === 2) && /*#__PURE__*/_react.default.createElement(_DisabledFeatureAlert.DisabledFeatureAlert, null), /*#__PURE__*/_react.default.createElement(_Shared.Confirm, {
266
+ }, actionState.loading ? t('LOADING', 'Loading') : t('SAVE', 'Save'))), /*#__PURE__*/_react.default.createElement(_Shared.Confirm, {
272
267
  width: "700px",
273
268
  title: t('WEB_APPNAME', 'Ordering'),
274
269
  content: confirm.content,
@@ -29,8 +29,6 @@ var _reactBootstrap = require("react-bootstrap");
29
29
 
30
30
  var _Shared = require("../../Shared");
31
31
 
32
- var _DisabledFeatureAlert = require("../../DisabledFeatureAlert");
33
-
34
32
  var _styles2 = require("./styles");
35
33
 
36
34
  var _styles3 = require("../BusinessMenu/styles");
@@ -84,8 +82,7 @@ var PaymethodOptionStripeConnect = function PaymethodOptionStripeConnect(props)
84
82
  businessPaymethod = props.businessPaymethod,
85
83
  orderTypes = props.orderTypes,
86
84
  handleChangeBusinessPaymentState = props.handleChangeBusinessPaymentState,
87
- handleDeletePaymethod = props.handleDeletePaymethod,
88
- isDisabledFeature = props.isDisabledFeature;
85
+ handleDeletePaymethod = props.handleDeletePaymethod;
89
86
  var theme = (0, _styledComponents.useTheme)();
90
87
 
91
88
  var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
@@ -244,9 +241,8 @@ var PaymethodOptionStripeConnect = function PaymethodOptionStripeConnect(props)
244
241
 
245
242
  return /*#__PURE__*/_react.default.createElement(_styles4.TabOption, {
246
243
  key: site.id,
247
- isDisabledFeature: isDisabledFeature,
248
244
  onClick: function onClick() {
249
- return !isDisabledFeature && setPaymethodInfo({
245
+ return setPaymethodInfo({
250
246
  key: 'sites',
251
247
  value: site.id
252
248
  });
@@ -261,9 +257,8 @@ var PaymethodOptionStripeConnect = function PaymethodOptionStripeConnect(props)
261
257
 
262
258
  return /*#__PURE__*/_react.default.createElement(_styles4.TabOption, {
263
259
  key: type.value,
264
- isDisabledFeature: isDisabledFeature,
265
260
  onClick: function onClick() {
266
- return !isDisabledFeature && setPaymethodInfo({
261
+ return setPaymethodInfo({
267
262
  key: 'allowed_order_types',
268
263
  value: type.value
269
264
  });
@@ -278,7 +273,7 @@ var PaymethodOptionStripeConnect = function PaymethodOptionStripeConnect(props)
278
273
  onClick: function onClick() {
279
274
  return handleStripeSave(businessPaymethod.id);
280
275
  }
281
- }, actionState.loading ? t('LOADING', 'Loading') : t('SAVE', 'Save'))), isDisabledFeature && (paymentTabs === 1 || paymentTabs === 2) && /*#__PURE__*/_react.default.createElement(_DisabledFeatureAlert.DisabledFeatureAlert, null), /*#__PURE__*/_react.default.createElement(_Shared.Confirm, {
276
+ }, actionState.loading ? t('LOADING', 'Loading') : t('SAVE', 'Save'))), /*#__PURE__*/_react.default.createElement(_Shared.Confirm, {
282
277
  width: "700px",
283
278
  title: t('WEB_APPNAME', 'Ordering'),
284
279
  content: confirm.content,
@@ -27,8 +27,6 @@ var _reactBootstrap = require("react-bootstrap");
27
27
 
28
28
  var _Shared = require("../../Shared");
29
29
 
30
- var _DisabledFeatureAlert = require("../../DisabledFeatureAlert");
31
-
32
30
  var _styles2 = require("./styles");
33
31
 
34
32
  var _styles3 = require("../BusinessMenu/styles");
@@ -82,8 +80,7 @@ var PaymethodOptionStripeRedirect = function PaymethodOptionStripeRedirect(props
82
80
  businessPaymethod = props.businessPaymethod,
83
81
  orderTypes = props.orderTypes,
84
82
  handleChangeBusinessPaymentState = props.handleChangeBusinessPaymentState,
85
- handleDeletePaymethod = props.handleDeletePaymethod,
86
- isDisabledFeature = props.isDisabledFeature;
83
+ handleDeletePaymethod = props.handleDeletePaymethod;
87
84
  var theme = (0, _styledComponents.useTheme)();
88
85
 
89
86
  var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
@@ -247,9 +244,8 @@ var PaymethodOptionStripeRedirect = function PaymethodOptionStripeRedirect(props
247
244
 
248
245
  return /*#__PURE__*/_react.default.createElement(_styles4.TabOption, {
249
246
  key: site.id,
250
- isDisabledFeature: isDisabledFeature,
251
247
  onClick: function onClick() {
252
- return !isDisabledFeature && setPaymethodInfo({
248
+ return setPaymethodInfo({
253
249
  key: 'sites',
254
250
  value: site.id
255
251
  });
@@ -264,9 +260,8 @@ var PaymethodOptionStripeRedirect = function PaymethodOptionStripeRedirect(props
264
260
 
265
261
  return /*#__PURE__*/_react.default.createElement(_styles4.TabOption, {
266
262
  key: type.value,
267
- isDisabledFeature: isDisabledFeature,
268
263
  onClick: function onClick() {
269
- return !isDisabledFeature && setPaymethodInfo({
264
+ return setPaymethodInfo({
270
265
  key: 'allowed_order_types',
271
266
  value: type.value
272
267
  });
@@ -281,7 +276,7 @@ var PaymethodOptionStripeRedirect = function PaymethodOptionStripeRedirect(props
281
276
  onClick: function onClick() {
282
277
  return handleSaveClick(businessPaymethod.id);
283
278
  }
284
- }, actionState.loading ? t('LOADING', 'Loading') : t('SAVE', 'Save'))), isDisabledFeature && (paymentTabs === 1 || paymentTabs === 2) && /*#__PURE__*/_react.default.createElement(_DisabledFeatureAlert.DisabledFeatureAlert, null), /*#__PURE__*/_react.default.createElement(_Shared.Confirm, {
279
+ }, actionState.loading ? t('LOADING', 'Loading') : t('SAVE', 'Save'))), /*#__PURE__*/_react.default.createElement(_Shared.Confirm, {
285
280
  width: "700px",
286
281
  title: t('WEB_APPNAME', 'Ordering'),
287
282
  content: confirm.content,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-admin-external",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "Ordering UI Admin Components",
5
5
  "main": "./_modules/index.js",
6
6
  "exports": {
@@ -1,4 +1,4 @@
1
- import React, { useState, useEffect } from 'react'
1
+ import React, { useState } from 'react'
2
2
  import { useInfoShare } from '../../../contexts/InfoShareContext'
3
3
  import { IconButton } from '../../../styles'
4
4
  import { useWindowSize } from '../../../hooks/useWindowSize'
@@ -25,7 +25,7 @@ import {
25
25
  Bag,
26
26
  Tag
27
27
  } from 'react-bootstrap-icons'
28
- import { useLanguage, useConfig, useSession } from 'ordering-components-admin-external'
28
+ import { useLanguage } from 'ordering-components-admin-external'
29
29
  import { SideBar } from '../../Shared'
30
30
  import { SettingItemUI } from '../SettingItemUI'
31
31
  import { ReportsBusinessDistance } from '../ReportsBusinessDistance'
@@ -48,7 +48,6 @@ import { ReportsPaymethodSales } from '../ReportsPaymethodSales'
48
48
  import { ReportsSaleAndCategory } from '../ReportsSaleAndCategory'
49
49
  import { ReportsAverageSales } from '../ReportsAverageSales'
50
50
  import { ReportsGeneralSales } from '../ReportsGeneralSales'
51
- import { DisabledFeatureAlert } from '../../DisabledFeatureAlert'
52
51
 
53
52
  import {
54
53
  ReportsContainer,
@@ -58,14 +57,10 @@ import {
58
57
 
59
58
  export const Reports = (props) => {
60
59
  const [, t] = useLanguage()
61
- const [{ configs }] = useConfig()
62
- const [{ user }] = useSession()
63
60
  const [{ isCollapse }, { handleMenuCollapse }] = useInfoShare()
64
61
  const [isOpen, setIsOpen] = useState(false)
65
62
  const [selectedReport, setSelectedReport] = useState(0)
66
- const [isDisabledFeature, setIsDisabledFeature] = useState(false)
67
63
  const { width } = useWindowSize()
68
- const featureName = 'advanced_reports'
69
64
  const sidebarWidth = 240
70
65
 
71
66
  const advancedReportsList = [
@@ -101,14 +96,6 @@ export const Reports = (props) => {
101
96
  setIsOpen(true)
102
97
  }
103
98
 
104
- useEffect(() => {
105
- if (configs && Object.keys(configs).length > 0 && user) {
106
- if (!Object.keys(configs).includes(featureName) && user?.level === 0) {
107
- setIsDisabledFeature(true)
108
- }
109
- }
110
- }, [configs])
111
-
112
99
  return (
113
100
  <ReportsContainer>
114
101
  <HeaderTitleContainer>
@@ -122,12 +109,12 @@ export const Reports = (props) => {
122
109
  )}
123
110
  <h1>{t('ADVANCED_REPORTS', 'Advanced Reports')}</h1>
124
111
  </HeaderTitleContainer>
125
- <ReportsList className='row' isDisabledFeature={isDisabledFeature}>
112
+ <ReportsList className='row'>
126
113
  {advancedReportsList && advancedReportsList.map((report, i) => (
127
114
  <div
128
115
  key={i}
129
116
  className='col-md-6 col-lg-4'
130
- onClick={() => !isDisabledFeature && handleOpenSlider(report.id)}
117
+ onClick={() => handleOpenSlider(report.id)}
131
118
  >
132
119
  <SettingItemUI
133
120
  title={report.name}
@@ -139,7 +126,6 @@ export const Reports = (props) => {
139
126
  </div>
140
127
  ))}
141
128
  </ReportsList>
142
- {isDisabledFeature && (<DisabledFeatureAlert />)}
143
129
  {isOpen && (
144
130
  <SideBar
145
131
  sidebarId='brand-details'
@@ -40,15 +40,4 @@ export const HeaderTitleContainer = styled.div`
40
40
 
41
41
  export const ReportsList = styled.div`
42
42
  margin-top: 10px;
43
- ${({ isDisabledFeature }) => isDisabledFeature && css`
44
- > div {
45
- > div {
46
- cursor: not-allowed;
47
- background-color: ${props => props.theme.colors.disabled};
48
- &:hover {
49
- background-color: ${props => props.theme.colors.disabled};
50
- }
51
- }
52
- }
53
- `}
54
43
  `
@@ -1,6 +1,6 @@
1
- import React, { useState, useEffect } from 'react'
1
+ import React, { useState } from 'react'
2
2
  import { List as MenuIcon, Wallet, BarChartSteps } from 'react-bootstrap-icons'
3
- import { useLanguage, useConfig, useSession, RewardsPrograms as RewardsProgramsController } from 'ordering-components-admin-external'
3
+ import { useLanguage, RewardsPrograms as RewardsProgramsController } from 'ordering-components-admin-external'
4
4
  import { useInfoShare } from '../../../contexts/InfoShareContext'
5
5
  import { IconButton } from '../../../styles'
6
6
  import { SideBar } from '../../Shared'
@@ -15,15 +15,10 @@ import {
15
15
  } from './styles'
16
16
  import { PointsWallet } from '../PointsWallet'
17
17
  import { PointsWalletLevels } from '../PointsWalletLevels'
18
- import { DisabledFeatureAlert } from '../../DisabledFeatureAlert'
19
18
 
20
19
  const RewardsProgramsUI = (props) => {
21
20
  const [, t] = useLanguage()
22
- const [{ configs }] = useConfig()
23
- const [{ user }] = useSession()
24
21
  const [{ isCollapse }, { handleMenuCollapse }] = useInfoShare()
25
- const [isDisabledFeature, setIsDisabledFeature] = useState(false)
26
- const featureName = 'loyalty_levels_points'
27
22
 
28
23
  const [showOption, setShowOption] = useState(null)
29
24
  const [moveDistance, setMoveDistance] = useState(0)
@@ -39,13 +34,6 @@ const RewardsProgramsUI = (props) => {
39
34
  setShowOption(null)
40
35
  }
41
36
 
42
- useEffect(() => {
43
- if (configs && Object.keys(configs).length > 0 && user) {
44
- if (!Object.keys(configs).includes(featureName) && user?.level === 0) {
45
- setIsDisabledFeature(true)
46
- }
47
- }
48
- }, [configs])
49
37
  return (
50
38
  <>
51
39
  <Container>
@@ -61,8 +49,8 @@ const RewardsProgramsUI = (props) => {
61
49
  <h1>{t('LOYALTY', 'Loyalty')}</h1>
62
50
  </HeaderTitleContainer>
63
51
 
64
- <LoyaltyListContainer isDisabledFeature={isDisabledFeature}>
65
- <LoyaltyItemWrapper onClick={() => !isDisabledFeature && setShowOption('points_wallet')}>
52
+ <LoyaltyListContainer>
53
+ <LoyaltyItemWrapper onClick={() => setShowOption('points_wallet')}>
66
54
  <IconWrapper>
67
55
  <Wallet />
68
56
  </IconWrapper>
@@ -71,7 +59,7 @@ const RewardsProgramsUI = (props) => {
71
59
  <p>{t('POINTS_WALLET_DESCRIPTION', 'Points wallet general and per business setup.')}</p>
72
60
  </LoyaltyItemContent>
73
61
  </LoyaltyItemWrapper>
74
- <LoyaltyItemWrapper onClick={() => !isDisabledFeature && setShowOption('levels')}>
62
+ <LoyaltyItemWrapper onClick={() => setShowOption('levels')}>
75
63
  <IconWrapper>
76
64
  <BarChartSteps />
77
65
  </IconWrapper>
@@ -82,7 +70,6 @@ const RewardsProgramsUI = (props) => {
82
70
  </LoyaltyItemWrapper>
83
71
  </LoyaltyListContainer>
84
72
  </Container>
85
- {isDisabledFeature && (<DisabledFeatureAlert />)}
86
73
  {showOption === 'points_wallet' && (
87
74
  <SideBar
88
75
  sidebarId='loyaltyWallet'
@@ -41,16 +41,6 @@ export const HeaderTitleContainer = styled.div`
41
41
  export const LoyaltyListContainer = styled.div`
42
42
  display: flex;
43
43
  flex-wrap: wrap;
44
-
45
- > div {
46
- ${({ isDisabledFeature }) => isDisabledFeature && css`
47
- cursor: not-allowed;
48
- background-color: ${props => props.theme.colors.disabled};
49
- &:hover {
50
- background-color: ${props => props.theme.colors.disabled};
51
- }
52
- `}
53
- }
54
44
  `
55
45
 
56
46
  export const LoyaltyItemWrapper = styled.div`
@@ -17,8 +17,7 @@ export const CampaignHeader = (props) => {
17
17
  const {
18
18
  searchValue,
19
19
  handleChangeSearch,
20
- handleOpenDetail,
21
- isDisabledFeature
20
+ handleOpenDetail
22
21
  } = props
23
22
 
24
23
  const [, t] = useLanguage()
@@ -37,7 +36,7 @@ export const CampaignHeader = (props) => {
37
36
  )}
38
37
  <HeaderTitle>{t('CAMPAIGN', 'Campaign')}</HeaderTitle>
39
38
  </HeaderSection>
40
- <TopRightSection isDisabledFeature={isDisabledFeature}>
39
+ <TopRightSection>
41
40
  <WrapperSearch>
42
41
  <Button
43
42
  borderRadius='8px'
@@ -44,14 +44,6 @@ export const TopRightSection = styled.div`
44
44
  flex-direction: row;
45
45
  align-items: center;
46
46
  }
47
-
48
- ${({ isDisabledFeature }) => isDisabledFeature && css`
49
- cursor: not-allowed;
50
- > div {
51
- pointer-events: none;
52
- opacity: 0.5;
53
- }
54
- `}
55
47
  `
56
48
 
57
49
  export const WrapperSearch = styled.div`
@@ -23,8 +23,7 @@ export const CampaignList = (props) => {
23
23
  setPaginationProps,
24
24
  handleOpenDetail,
25
25
  selectedCampaign,
26
- handleUpdateCampaign,
27
- isDisabledFeature
26
+ handleUpdateCampaign
28
27
  } = props
29
28
 
30
29
  const [, t] = useLanguage()
@@ -108,7 +107,7 @@ export const CampaignList = (props) => {
108
107
 
109
108
  return (
110
109
  <>
111
- <Container isDisabledFeature={isDisabledFeature}>
110
+ <Container>
112
111
  <Table isRelative={campaignList?.campaigns?.length > 5}>
113
112
  <thead>
114
113
  <tr>
@@ -246,8 +245,7 @@ export const CampaignList = (props) => {
246
245
  {!campaignList.loading && (
247
246
  <PagesBottomContainer>
248
247
  <AddNewPageButton
249
- onClick={() => !isDisabledFeature && handleOpenDetail({})}
250
- isDisabledFeature={isDisabledFeature}
248
+ onClick={() => handleOpenDetail({})}
251
249
  >
252
250
  {t('ADD_NEW_CAMPAIGN', 'Add new campaign')}
253
251
  </AddNewPageButton>
@@ -25,14 +25,6 @@ export const Container = styled.div`
25
25
  max-height: calc(100vh - 345px);
26
26
  `}
27
27
  }
28
-
29
- ${({ isDisabledFeature }) => isDisabledFeature && css`
30
- opacity: 0.5;
31
- cursor: not-allowed;
32
- > table {
33
- pointer-events: none;
34
- }
35
- `}
36
28
  `
37
29
 
38
30
  export const Table = styled.table`
@@ -208,12 +200,4 @@ export const AddNewPageButton = styled.div`
208
200
  &:hover {
209
201
  color: ${props => props.theme.colors.primary};
210
202
  }
211
-
212
- ${({ isDisabledFeature }) => isDisabledFeature && css`
213
- opacity: 0.5;
214
- cursor: not-allowed;
215
- &:hover {
216
- color: ${props => props.theme.colors.lightGray};
217
- }
218
- `}
219
203
  `
@@ -1,10 +1,9 @@
1
- import React, { useState, useEffect } from 'react'
1
+ import React, { useState } from 'react'
2
2
  import { SideBar } from '../../Shared'
3
3
  import { CampaignDetail } from '../CampaignDetail'
4
4
  import { CampaignHeader } from '../CampaignHeader'
5
5
  import { CampaignList } from '../CampaignList'
6
- import { useConfig, useSession, CampaignListing as CampaignListingController } from 'ordering-components-admin-external'
7
- import { DisabledFeatureAlert } from '../../DisabledFeatureAlert'
6
+ import { CampaignListing as CampaignListingController } from 'ordering-components-admin-external'
8
7
  import {
9
8
  CampaignListingContainer
10
9
  } from './styles'
@@ -12,10 +11,6 @@ import {
12
11
  export const CampaignListingUI = (props) => {
13
12
  const [isOpenDetail, setIsOpenDetail] = useState(false)
14
13
  const [selectedCampaign, setSelectedCampaign] = useState(null)
15
- const [{ configs }] = useConfig()
16
- const [{ user }] = useSession()
17
- const featureName = 'Marketing_dashboard'
18
- const [isDisabledFeature, setIsDisabledFeature] = useState(false)
19
14
 
20
15
  const handleOpenDetail = (action) => {
21
16
  setSelectedCampaign(action)
@@ -27,30 +22,19 @@ export const CampaignListingUI = (props) => {
27
22
  setSelectedCampaign(null)
28
23
  }
29
24
 
30
- useEffect(() => {
31
- if (configs && Object.keys(configs).length > 0 && user) {
32
- if (!Object.keys(configs).includes(featureName) && user?.level === 0) {
33
- setIsDisabledFeature(false)
34
- }
35
- }
36
- }, [configs])
37
-
38
25
  return (
39
26
  <>
40
27
  <CampaignListingContainer>
41
28
  <CampaignHeader
42
29
  {...props}
43
30
  handleOpenDetail={handleOpenDetail}
44
- isDisabledFeature={isDisabledFeature}
45
31
  />
46
32
  <CampaignList
47
33
  {...props}
48
34
  handleOpenDetail={handleOpenDetail}
49
35
  selectedCampaign={selectedCampaign}
50
- isDisabledFeature={isDisabledFeature}
51
36
  />
52
37
  </CampaignListingContainer>
53
- {isDisabledFeature && (<DisabledFeatureAlert />)}
54
38
  {isOpenDetail && (
55
39
  <SideBar
56
40
  sidebarId='campaignDetail'
@@ -27,7 +27,7 @@ const OrderingProductDetailsUI = (props) => {
27
27
 
28
28
  const tabs = [
29
29
  { key: 'general', content: t('GENERAL', 'General') },
30
- // { key: 'theme', content: t('THEME', 'Theme') }
30
+ { key: 'theme', content: t('THEME', 'Theme') }
31
31
  ]
32
32
 
33
33
  const moreOptions = [
@@ -234,7 +234,7 @@ const PluginListUI = (props) => {
234
234
  )}
235
235
  </PLuginsSeparator>
236
236
 
237
- {/* {!pluginListState.loading && pluginListState.sysPlugins?.length > 0 && (
237
+ {!pluginListState.loading && pluginListState.sysPlugins?.length > 0 && (
238
238
  <PLuginsSeparator h='50%'>
239
239
  <Header mb={0}>
240
240
  <h1 style={{ marginTop: 20 }}>{t('SYSTEM_PLUGINS', 'System Plugins')}</h1>
@@ -282,7 +282,7 @@ const PluginListUI = (props) => {
282
282
  )}
283
283
  </PagesBottomContainer>
284
284
  </PLuginsSeparator>
285
- )} */}
285
+ )}
286
286
  </PluginListContainer>
287
287
  <Alert
288
288
  title={t('WEB_APPNAME', 'Ordering')}