ordering-ui-admin-external 1.12.5 → 1.13.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/{ordering-ui-admin.d53a7ee886aee7937e13.js → ordering-ui-admin.6980225e31cb682b0268.js} +2 -2
- package/_bundles/{ordering-ui-admin.d53a7ee886aee7937e13.js.LICENSE.txt → ordering-ui-admin.6980225e31cb682b0268.js.LICENSE.txt} +0 -0
- package/_modules/components/BusinessIntelligence/BusinessReviewDetails/index.js +2 -12
- package/_modules/components/BusinessIntelligence/BusinessReviewList/index.js +5 -3
- package/_modules/components/BusinessIntelligence/BusinessReviewList/styles.js +1 -1
- package/_modules/components/BusinessIntelligence/ReviewProductsListing/index.js +31 -49
- package/_modules/components/BusinessIntelligence/ReviewProductsListing/styles.js +20 -33
- package/_modules/components/BusinessIntelligence/ReviewsListing/index.js +54 -7
- package/_modules/components/BusinessIntelligence/ReviewsListing/styles.js +7 -3
- package/_modules/components/Delivery/DriversGroupGeneralForm/index.js +14 -14
- package/_modules/components/Loyalty/GiftCards/index.js +168 -0
- package/_modules/components/Loyalty/GiftCards/styles.js +80 -0
- package/_modules/components/Loyalty/PointsWalletLevels/index.js +5 -2
- package/_modules/components/Marketing/BannerDetails/BannerImages.js +6 -4
- package/_modules/components/Marketing/BannerDetails/index.js +2 -1
- package/_modules/components/Marketing/BannerImageDetails/index.js +1 -1
- package/_modules/components/Marketing/PageBanner/index.js +3 -1
- package/_modules/components/Marketing/PageBanner/styles.js +1 -1
- package/_modules/components/MyProducts/CustomProject/index.js +49 -0
- package/_modules/components/MyProducts/CustomProject/styles.js +27 -0
- package/_modules/components/MyProducts/index.js +8 -1
- package/_modules/components/Orders/OrderDetailsHeader/index.js +4 -4
- package/_modules/components/Settings/ApiKeysList/index.js +3 -1
- package/_modules/components/Settings/ApiKeysList/styles.js +4 -10
- package/_modules/components/Settings/Deliverect/index.js +4 -1
- package/_modules/components/Settings/Deliverect/styles.js +33 -31
- package/_modules/components/Settings/DoordashConnect/index.js +4 -1
- package/_modules/components/Settings/DoordashConnect/styles.js +31 -29
- package/_modules/components/Settings/ItsaCheckmate/index.js +4 -1
- package/_modules/components/Settings/ItsaCheckmate/styles.js +33 -39
- package/_modules/components/Settings/LalamoveConnect/index.js +4 -1
- package/_modules/components/Settings/LalamoveConnect/styles.js +32 -30
- package/_modules/components/Settings/LanguageTransTable/index.js +9 -2
- package/_modules/components/Settings/PickerExpress/index.js +4 -1
- package/_modules/components/Settings/PickerExpress/styles.js +32 -30
- package/_modules/components/Settings/PluginList/index.js +3 -1
- package/_modules/components/Settings/PluginList/styles.js +4 -8
- package/_modules/components/Settings/SettingsDetail/index.js +4 -1
- package/_modules/components/Settings/SettingsDetail/styles.js +15 -21
- package/_modules/components/Settings/SettingsList/index.js +16 -0
- package/_modules/components/Settings/SettingsList/styles.js +4 -1
- package/_modules/components/Settings/WebhookList/index.js +4 -2
- package/_modules/components/Settings/WebhookList/styles.js +4 -8
- package/_modules/components/Shared/ImageCrop/index.js +4 -2
- package/_modules/components/SidebarMenu/index.js +13 -10
- package/_modules/components/Stores/BusinessCateringDelivery/index.js +215 -0
- package/_modules/components/Stores/BusinessCateringDelivery/styles.js +20 -0
- package/_modules/components/Stores/BusinessDetails/index.js +5 -2
- package/_modules/components/Stores/BusinessPreorderDetails/index.js +18 -4
- package/_modules/components/Stores/BusinessPreorderDetails/styles.js +7 -5
- package/_modules/components/Stores/BusinessSummary/index.js +1 -1
- package/_modules/components/Stores/BusinessesListing/index.js +14 -14
- package/_modules/components/Stores/BusinessesListing/styles.js +1 -3
- package/_modules/components/Stores/ProductTagDetails/styles.js +1 -1
- package/_modules/components/Stores/SeoOptions/styles.js +1 -1
- package/_modules/index.js +6 -0
- package/index-template.js +3 -1
- package/package.json +2 -2
- package/src/components/BusinessIntelligence/BusinessReviewDetails/index.js +3 -7
- package/src/components/BusinessIntelligence/BusinessReviewList/index.js +13 -9
- package/src/components/BusinessIntelligence/BusinessReviewList/styles.js +2 -1
- package/src/components/BusinessIntelligence/ReviewProductsListing/index.js +33 -55
- package/src/components/BusinessIntelligence/ReviewProductsListing/styles.js +3 -53
- package/src/components/BusinessIntelligence/ReviewsListing/index.js +59 -8
- package/src/components/BusinessIntelligence/ReviewsListing/styles.js +19 -0
- package/src/components/Delivery/DriversGroupGeneralForm/index.js +14 -14
- package/src/components/Loyalty/GiftCards/index.js +200 -0
- package/src/components/Loyalty/GiftCards/styles.js +147 -0
- package/src/components/Loyalty/PointsWalletLevels/index.js +9 -12
- package/src/components/Marketing/BannerDetails/BannerImages.js +5 -3
- package/src/components/Marketing/BannerDetails/index.js +1 -0
- package/src/components/Marketing/BannerImageDetails/index.js +1 -1
- package/src/components/Marketing/PageBanner/index.js +4 -3
- package/src/components/Marketing/PageBanner/styles.js +5 -0
- package/src/components/MyProducts/CustomProject/index.js +56 -0
- package/src/components/MyProducts/CustomProject/styles.js +108 -0
- package/src/components/MyProducts/index.js +3 -1
- package/src/components/Orders/OrderDetailsHeader/index.js +2 -2
- package/src/components/Settings/ApiKeysList/index.js +5 -4
- package/src/components/Settings/ApiKeysList/styles.js +5 -11
- package/src/components/Settings/Deliverect/index.js +2 -3
- package/src/components/Settings/Deliverect/styles.js +23 -0
- package/src/components/Settings/DoordashConnect/index.js +2 -3
- package/src/components/Settings/DoordashConnect/styles.js +23 -0
- package/src/components/Settings/ItsaCheckmate/index.js +2 -3
- package/src/components/Settings/ItsaCheckmate/styles.js +23 -26
- package/src/components/Settings/LalamoveConnect/index.js +2 -3
- package/src/components/Settings/LalamoveConnect/styles.js +23 -0
- package/src/components/Settings/LanguageTransTable/index.js +12 -2
- package/src/components/Settings/PickerExpress/index.js +2 -3
- package/src/components/Settings/PickerExpress/styles.js +23 -0
- package/src/components/Settings/PluginList/index.js +4 -3
- package/src/components/Settings/PluginList/styles.js +3 -6
- package/src/components/Settings/SettingsDetail/index.js +3 -4
- package/src/components/Settings/SettingsDetail/styles.js +24 -27
- package/src/components/Settings/SettingsList/index.js +43 -0
- package/src/components/Settings/SettingsList/styles.js +1 -1
- package/src/components/Settings/WebhookList/index.js +5 -4
- package/src/components/Settings/WebhookList/styles.js +3 -5
- package/src/components/Shared/ImageCrop/index.js +4 -2
- package/src/components/SidebarMenu/index.js +14 -7
- package/src/components/Stores/BusinessCateringDelivery/index.js +174 -0
- package/src/components/Stores/BusinessCateringDelivery/styles.js +53 -0
- package/src/components/Stores/BusinessDetails/index.js +5 -2
- package/src/components/Stores/BusinessPreorderDetails/index.js +38 -11
- package/src/components/Stores/BusinessPreorderDetails/styles.js +9 -1
- package/src/components/Stores/BusinessSummary/index.js +1 -1
- package/src/components/Stores/BusinessesListing/index.js +57 -56
- package/src/components/Stores/BusinessesListing/styles.js +3 -11
- package/src/components/Stores/ProductTagDetails/styles.js +1 -0
- package/src/components/Stores/SeoOptions/styles.js +1 -0
- package/src/index.js +3 -1
- package/template/app.js +4 -4
- package/template/assets/images/myProducts/custom-project.png +0 -0
- package/template/components/ListenPageChanges/index.js +1 -1
- package/template/helmetdata.json +7 -7
- package/template/pages/CustomProject/index.js +12 -0
- package/template/pages/ReviewProducts/index.js +0 -22
|
@@ -4,9 +4,9 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.WebhookListTable = exports.WebhookListContainer = exports.SelectorWrapper = exports.PagesBottomContainer = exports.Header = exports.DropdownButtonWrapper =
|
|
7
|
+
exports.WebhookListTable = exports.WebhookListContainer = exports.SelectorWrapper = exports.PagesBottomContainer = exports.Header = exports.DropdownButtonWrapper = void 0;
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
|
|
10
10
|
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); }
|
|
11
11
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
12
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
@@ -47,9 +47,5 @@ var DropdownButtonWrapper = _styledComponents.default.div(_templateObject10 || (
|
|
|
47
47
|
exports.DropdownButtonWrapper = DropdownButtonWrapper;
|
|
48
48
|
var SelectorWrapper = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n width: 100%;\n\n .select {\n border: none;\n }\n"])));
|
|
49
49
|
exports.SelectorWrapper = SelectorWrapper;
|
|
50
|
-
var PagesBottomContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n row-gap: 10px;\n margin: 15px 0;\n"])));
|
|
51
|
-
exports.PagesBottomContainer = PagesBottomContainer;
|
|
52
|
-
var AddNewPageButton = _styledComponents.default.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n cursor: pointer;\n font-size: 12px;\n color: ", ";\n"])), function (props) {
|
|
53
|
-
return props.theme.colors.lightGray;
|
|
54
|
-
});
|
|
55
|
-
exports.AddNewPageButton = AddNewPageButton;
|
|
50
|
+
var PagesBottomContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n row-gap: 10px;\n margin: 15px 0;\n\n > button {\n height: 44px;\n }\n"])));
|
|
51
|
+
exports.PagesBottomContainer = PagesBottomContainer;
|
|
@@ -65,13 +65,15 @@ var ImageCrop = function ImageCrop(props) {
|
|
|
65
65
|
aspectRatio: aspectRatio,
|
|
66
66
|
dragMode: 'move',
|
|
67
67
|
zoomable: false,
|
|
68
|
-
toggleDragModeOnDblclick: false
|
|
68
|
+
toggleDragModeOnDblclick: false,
|
|
69
|
+
autoCropArea: 1
|
|
69
70
|
});
|
|
70
71
|
} else {
|
|
71
72
|
_cropper = new _cropperjs.default(cropperRef.current, {
|
|
72
73
|
dragMode: 'move',
|
|
73
74
|
zoomable: false,
|
|
74
|
-
toggleDragModeOnDblclick: false
|
|
75
|
+
toggleDragModeOnDblclick: false,
|
|
76
|
+
autoCropArea: 1
|
|
75
77
|
});
|
|
76
78
|
}
|
|
77
79
|
setCropper(_cropper);
|
|
@@ -160,6 +160,11 @@ var SidebarMenuUI = function SidebarMenuUI(props) {
|
|
|
160
160
|
title: t('KIOSK_APP', 'Kiosk'),
|
|
161
161
|
pageName: 'kiosk_app',
|
|
162
162
|
url: '/my-products/kiosk-app'
|
|
163
|
+
}, {
|
|
164
|
+
id: 8,
|
|
165
|
+
title: t('CUSTOM_PROJECT', 'Custom Project'),
|
|
166
|
+
pageName: 'custom_project',
|
|
167
|
+
url: '/my-products/custom-project'
|
|
163
168
|
}];
|
|
164
169
|
var storesSubMenus = [{
|
|
165
170
|
id: 1,
|
|
@@ -287,21 +292,19 @@ var SidebarMenuUI = function SidebarMenuUI(props) {
|
|
|
287
292
|
title: t('PROMOTION_AUTOMATION', 'Promotions automation'),
|
|
288
293
|
pageName: 'enterprise_promotions',
|
|
289
294
|
url: '/marketing/promotions-enterprise'
|
|
290
|
-
}
|
|
295
|
+
},
|
|
291
296
|
// {
|
|
292
297
|
// id: 2,
|
|
293
298
|
// title: t('CAMPAIGN', 'Campaign'),
|
|
294
299
|
// pageName: 'campaign',
|
|
295
300
|
// url: '/marketing/campaign'
|
|
296
301
|
// },
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
];
|
|
304
|
-
|
|
302
|
+
{
|
|
303
|
+
id: 3,
|
|
304
|
+
title: t('AD_BANNERS', 'Ad banners'),
|
|
305
|
+
pageName: 'ad_banners',
|
|
306
|
+
url: '/marketing/ad-banners'
|
|
307
|
+
}];
|
|
305
308
|
var handleGoToPage = function handleGoToPage(data) {
|
|
306
309
|
if (windowSize.width < 768) {
|
|
307
310
|
handleMenuCollapse(true);
|
|
@@ -540,7 +543,7 @@ var SidebarMenuUI = function SidebarMenuUI(props) {
|
|
|
540
543
|
}, (0, _utils.firstLetterCapital)(item.title));
|
|
541
544
|
})))), (sessionState === null || sessionState === void 0 ? void 0 : (_sessionState$user31 = sessionState.user) === null || _sessionState$user31 === void 0 ? void 0 : _sessionState$user31.level) === 0 && /*#__PURE__*/_react.default.createElement(_styles.MenuContainer, null, /*#__PURE__*/_react.default.createElement("span", null, t('SALES_CHANNELS_AND_PRODUCTS', 'Sales channels and products')), /*#__PURE__*/_react.default.createElement(ContextAwareToggle, {
|
|
542
545
|
eventKey: "12",
|
|
543
|
-
active: location.pathname === '/my-products/ordering-website' || location.pathname === '/my-products/customer-app' || location.pathname === '/my-products/store-app' || location.pathname === '/my-products/driver-app' || location.pathname === '/my-products/pos-app' || location.pathname === '/my-products/call-center-app' || location.pathname === '/my-products/kiosk-app'
|
|
546
|
+
active: location.pathname === '/my-products/ordering-website' || location.pathname === '/my-products/customer-app' || location.pathname === '/my-products/store-app' || location.pathname === '/my-products/driver-app' || location.pathname === '/my-products/pos-app' || location.pathname === '/my-products/call-center-app' || location.pathname === '/my-products/kiosk-app' || location.pathname === '/my-products/custom-project'
|
|
544
547
|
}, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.BagCheck, null), /*#__PURE__*/_react.default.createElement("span", null, t('MY_PRODUCTS', 'My products'))), /*#__PURE__*/_react.default.createElement(_reactBootstrap.Accordion.Collapse, {
|
|
545
548
|
eventKey: "12"
|
|
546
549
|
}, /*#__PURE__*/_react.default.createElement(_styles.MenuContent, null, myProductMenus.map(function (item) {
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.BusinessCateringDelivery = void 0;
|
|
8
|
+
var _orderingComponentsAdminExternal = require("ordering-components-admin-external");
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _styles = require("../../../styles");
|
|
11
|
+
var _styles2 = require("./styles");
|
|
12
|
+
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); }
|
|
13
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
15
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
17
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
18
|
+
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; } }
|
|
19
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
|
+
var BusinessCateringDelivery = function BusinessCateringDelivery(props) {
|
|
21
|
+
var _business$configs, _cateringValues$find, _cateringValues$find4, _cateringValues$find7, _cateringValues$find10, _cateringValues$find13;
|
|
22
|
+
var business = props.business,
|
|
23
|
+
type = props.type,
|
|
24
|
+
changePreorderConfigs = props.changePreorderConfigs;
|
|
25
|
+
var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
|
|
26
|
+
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
27
|
+
t = _useLanguage2[1];
|
|
28
|
+
var cateringValues = business === null || business === void 0 ? void 0 : (_business$configs = business.configs) === null || _business$configs === void 0 ? void 0 : _business$configs.filter(function (config) {
|
|
29
|
+
return config.key.includes('preorder');
|
|
30
|
+
}).map(function (config) {
|
|
31
|
+
return {
|
|
32
|
+
name: config.key,
|
|
33
|
+
value: config.value.split('|').find(function (val) {
|
|
34
|
+
return val.includes(type);
|
|
35
|
+
}).split(',')[1],
|
|
36
|
+
id: config.id
|
|
37
|
+
};
|
|
38
|
+
});
|
|
39
|
+
var ref_preorder_lead_time = (0, _react.useRef)();
|
|
40
|
+
var ref_preorder_slot_interval = (0, _react.useRef)();
|
|
41
|
+
var ref_preorder_time_range = (0, _react.useRef)();
|
|
42
|
+
var ref_preorder_minimum_days = (0, _react.useRef)();
|
|
43
|
+
var ref_preorder_maximum_days = (0, _react.useRef)();
|
|
44
|
+
var timeout = null;
|
|
45
|
+
var previousSearch;
|
|
46
|
+
var handleClickDefaultButton = function handleClickDefaultButton(catering, ref) {
|
|
47
|
+
if (ref.current.value === catering.value.toString()) return;
|
|
48
|
+
ref.current.value = catering.value;
|
|
49
|
+
changePreorderConfigs({
|
|
50
|
+
value: catering.value,
|
|
51
|
+
type: type,
|
|
52
|
+
id: catering.id
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
var _onChange = function onChange(catering) {
|
|
56
|
+
if (previousSearch !== catering.value) {
|
|
57
|
+
clearTimeout(timeout);
|
|
58
|
+
timeout = setTimeout(function () {
|
|
59
|
+
changePreorderConfigs({
|
|
60
|
+
value: catering.value,
|
|
61
|
+
type: type,
|
|
62
|
+
id: catering.id
|
|
63
|
+
});
|
|
64
|
+
}, 750);
|
|
65
|
+
}
|
|
66
|
+
previousSearch = catering.value;
|
|
67
|
+
};
|
|
68
|
+
return /*#__PURE__*/_react.default.createElement(_styles2.CateringContainer, null, /*#__PURE__*/_react.default.createElement("h1", null, t(type.toUpperCase(), type.includes('delivery') ? 'Catering delivery' : 'Catering pickup')), /*#__PURE__*/_react.default.createElement(_styles2.Section, null, /*#__PURE__*/_react.default.createElement(_styles2.SwitchContainer, null, /*#__PURE__*/_react.default.createElement("p", null, t('LEAD_TIMES_PER_ORDER_TYPE', 'Lead times per order type')), /*#__PURE__*/_react.default.createElement("p", null, t('DEFAULT', 'Default'), " = 0 (", t('ALLOWS_ASAP_ORDERS', 'allows asap orders'), ").")), /*#__PURE__*/_react.default.createElement(_styles2.InputContainer, null, /*#__PURE__*/_react.default.createElement(_styles.Input, {
|
|
69
|
+
ref: ref_preorder_lead_time,
|
|
70
|
+
placeholder: "MM",
|
|
71
|
+
defaultValue: (_cateringValues$find = cateringValues.find(function (val) {
|
|
72
|
+
return val.name === 'preorder_lead_time';
|
|
73
|
+
})) === null || _cateringValues$find === void 0 ? void 0 : _cateringValues$find.value,
|
|
74
|
+
onChange: function onChange(evt) {
|
|
75
|
+
var _cateringValues$find2;
|
|
76
|
+
return _onChange({
|
|
77
|
+
value: evt.target.value,
|
|
78
|
+
type: type,
|
|
79
|
+
id: (_cateringValues$find2 = cateringValues.find(function (val) {
|
|
80
|
+
return val.name === 'preorder_lead_time';
|
|
81
|
+
})) === null || _cateringValues$find2 === void 0 ? void 0 : _cateringValues$find2.id
|
|
82
|
+
});
|
|
83
|
+
},
|
|
84
|
+
onFocus: function onFocus() {
|
|
85
|
+
previousSearch = null;
|
|
86
|
+
}
|
|
87
|
+
}), /*#__PURE__*/_react.default.createElement("p", null, "(", t('MINUTES', 'Minutes'), ")"), /*#__PURE__*/_react.default.createElement(_styles.Button, {
|
|
88
|
+
onClick: function onClick() {
|
|
89
|
+
var _cateringValues$find3;
|
|
90
|
+
return handleClickDefaultButton({
|
|
91
|
+
value: 0,
|
|
92
|
+
id: (_cateringValues$find3 = cateringValues.find(function (val) {
|
|
93
|
+
return val.name === 'preorder_lead_time';
|
|
94
|
+
})) === null || _cateringValues$find3 === void 0 ? void 0 : _cateringValues$find3.id
|
|
95
|
+
}, ref_preorder_lead_time);
|
|
96
|
+
}
|
|
97
|
+
}, t('USE_DEFAULT_VALUE', 'Use default value')))), /*#__PURE__*/_react.default.createElement(_styles2.Section, null, /*#__PURE__*/_react.default.createElement(_styles2.SwitchContainer, null, /*#__PURE__*/_react.default.createElement("p", null, t('SLOT_TIMES', 'Slot times')), /*#__PURE__*/_react.default.createElement("p", null, t('DEFAULT', 'Default'), " = 30 ", t('MINUTES', 'minutes'), ".")), /*#__PURE__*/_react.default.createElement(_styles2.InputContainer, null, /*#__PURE__*/_react.default.createElement(_styles.Input, {
|
|
98
|
+
ref: ref_preorder_slot_interval,
|
|
99
|
+
placeholder: "30",
|
|
100
|
+
defaultValue: (_cateringValues$find4 = cateringValues.find(function (val) {
|
|
101
|
+
return val.name === 'preorder_slot_interval';
|
|
102
|
+
})) === null || _cateringValues$find4 === void 0 ? void 0 : _cateringValues$find4.value,
|
|
103
|
+
onChange: function onChange(evt) {
|
|
104
|
+
var _cateringValues$find5;
|
|
105
|
+
return _onChange({
|
|
106
|
+
value: evt.target.value,
|
|
107
|
+
type: type,
|
|
108
|
+
id: (_cateringValues$find5 = cateringValues.find(function (val) {
|
|
109
|
+
return val.name === 'preorder_slot_interval';
|
|
110
|
+
})) === null || _cateringValues$find5 === void 0 ? void 0 : _cateringValues$find5.id
|
|
111
|
+
});
|
|
112
|
+
},
|
|
113
|
+
onFocus: function onFocus() {
|
|
114
|
+
previousSearch = null;
|
|
115
|
+
}
|
|
116
|
+
}), /*#__PURE__*/_react.default.createElement("p", null, "(", t('MINUTES', 'Minutes'), ")"), /*#__PURE__*/_react.default.createElement(_styles.Button, {
|
|
117
|
+
onClick: function onClick() {
|
|
118
|
+
var _cateringValues$find6;
|
|
119
|
+
return handleClickDefaultButton({
|
|
120
|
+
value: 30,
|
|
121
|
+
id: (_cateringValues$find6 = cateringValues.find(function (val) {
|
|
122
|
+
return val.name === 'preorder_slot_interval';
|
|
123
|
+
})) === null || _cateringValues$find6 === void 0 ? void 0 : _cateringValues$find6.id
|
|
124
|
+
}, ref_preorder_slot_interval);
|
|
125
|
+
}
|
|
126
|
+
}, t('USE_DEFAULT_VALUE', 'Use default value')))), /*#__PURE__*/_react.default.createElement(_styles2.Section, null, /*#__PURE__*/_react.default.createElement(_styles2.SwitchContainer, null, /*#__PURE__*/_react.default.createElement("p", null, t('TIME_RANGE', 'Time range')), /*#__PURE__*/_react.default.createElement("p", null, t('DEFAULT', 'Default'), " = 30 ", t('MINUTES', 'minutes'), ".")), /*#__PURE__*/_react.default.createElement(_styles2.InputContainer, null, /*#__PURE__*/_react.default.createElement(_styles.Input, {
|
|
127
|
+
placeholder: "30",
|
|
128
|
+
defaultValue: (_cateringValues$find7 = cateringValues.find(function (val) {
|
|
129
|
+
return val.name === 'preorder_time_range';
|
|
130
|
+
})) === null || _cateringValues$find7 === void 0 ? void 0 : _cateringValues$find7.value,
|
|
131
|
+
onChange: function onChange(evt) {
|
|
132
|
+
var _cateringValues$find8;
|
|
133
|
+
return _onChange({
|
|
134
|
+
value: evt.target.value,
|
|
135
|
+
id: (_cateringValues$find8 = cateringValues.find(function (val) {
|
|
136
|
+
return val.name === 'preorder_time_range';
|
|
137
|
+
})) === null || _cateringValues$find8 === void 0 ? void 0 : _cateringValues$find8.id,
|
|
138
|
+
type: type
|
|
139
|
+
});
|
|
140
|
+
},
|
|
141
|
+
ref: ref_preorder_time_range,
|
|
142
|
+
onFocus: function onFocus() {
|
|
143
|
+
previousSearch = null;
|
|
144
|
+
}
|
|
145
|
+
}), /*#__PURE__*/_react.default.createElement("p", null, "(", t('MINUTES', 'Minutes'), ")"), /*#__PURE__*/_react.default.createElement(_styles.Button, {
|
|
146
|
+
onClick: function onClick() {
|
|
147
|
+
var _cateringValues$find9;
|
|
148
|
+
return handleClickDefaultButton({
|
|
149
|
+
value: 30,
|
|
150
|
+
id: (_cateringValues$find9 = cateringValues.find(function (val) {
|
|
151
|
+
return val.name === 'preorder_time_range';
|
|
152
|
+
})) === null || _cateringValues$find9 === void 0 ? void 0 : _cateringValues$find9.id
|
|
153
|
+
}, ref_preorder_time_range);
|
|
154
|
+
}
|
|
155
|
+
}, t('USE_DEFAULT_VALUE', 'Use default value')))), /*#__PURE__*/_react.default.createElement(_styles2.Section, null, /*#__PURE__*/_react.default.createElement(_styles2.SwitchContainer, null, /*#__PURE__*/_react.default.createElement("p", null, t('MINIMUM_DAYS_PREORDER_ORDER_TYPE', 'Minimum days to preorder per order type')), /*#__PURE__*/_react.default.createElement("p", null, t('DEFAULT', 'Default'), " = 0 (", t('ALLOWS_ASAP_ORDERS', 'allows asap orders'), ").")), /*#__PURE__*/_react.default.createElement(_styles2.InputContainer, null, /*#__PURE__*/_react.default.createElement(_styles.Input, {
|
|
156
|
+
ref: ref_preorder_minimum_days,
|
|
157
|
+
placeholder: "0",
|
|
158
|
+
defaultValue: (_cateringValues$find10 = cateringValues.find(function (val) {
|
|
159
|
+
return val.name === 'preorder_minimum_days';
|
|
160
|
+
})) === null || _cateringValues$find10 === void 0 ? void 0 : _cateringValues$find10.value,
|
|
161
|
+
onChange: function onChange(evt) {
|
|
162
|
+
var _cateringValues$find11;
|
|
163
|
+
return _onChange({
|
|
164
|
+
value: evt.target.value,
|
|
165
|
+
id: (_cateringValues$find11 = cateringValues.find(function (val) {
|
|
166
|
+
return val.name === 'preorder_minimum_days';
|
|
167
|
+
})) === null || _cateringValues$find11 === void 0 ? void 0 : _cateringValues$find11.id,
|
|
168
|
+
type: type
|
|
169
|
+
});
|
|
170
|
+
},
|
|
171
|
+
onFocus: function onFocus() {
|
|
172
|
+
previousSearch = null;
|
|
173
|
+
}
|
|
174
|
+
}), /*#__PURE__*/_react.default.createElement("p", null, "(", t('DAYS', 'Days'), ")"), /*#__PURE__*/_react.default.createElement(_styles.Button, {
|
|
175
|
+
onClick: function onClick() {
|
|
176
|
+
var _cateringValues$find12;
|
|
177
|
+
return handleClickDefaultButton({
|
|
178
|
+
value: 0,
|
|
179
|
+
id: (_cateringValues$find12 = cateringValues.find(function (val) {
|
|
180
|
+
return val.name === 'preorder_minimum_days';
|
|
181
|
+
})) === null || _cateringValues$find12 === void 0 ? void 0 : _cateringValues$find12.id
|
|
182
|
+
}, ref_preorder_minimum_days);
|
|
183
|
+
}
|
|
184
|
+
}, t('USE_DEFAULT_VALUE', 'Use default value')))), /*#__PURE__*/_react.default.createElement(_styles2.Section, null, /*#__PURE__*/_react.default.createElement(_styles2.SwitchContainer, null, /*#__PURE__*/_react.default.createElement("p", null, t('MAXIMUM_DAYS', 'Maximum days')), /*#__PURE__*/_react.default.createElement("p", null, t('DEFAULT', 'Default'), " = 15 ", t('DAYS', 'Days'))), /*#__PURE__*/_react.default.createElement(_styles2.InputContainer, null, /*#__PURE__*/_react.default.createElement(_styles.Input, {
|
|
185
|
+
ref: ref_preorder_maximum_days,
|
|
186
|
+
placeholder: "15",
|
|
187
|
+
defaultValue: (_cateringValues$find13 = cateringValues.find(function (val) {
|
|
188
|
+
return val.name === 'preorder_maximum_days';
|
|
189
|
+
})) === null || _cateringValues$find13 === void 0 ? void 0 : _cateringValues$find13.value,
|
|
190
|
+
onChange: function onChange(evt) {
|
|
191
|
+
var _cateringValues$find14;
|
|
192
|
+
return _onChange({
|
|
193
|
+
value: evt.target.value,
|
|
194
|
+
id: (_cateringValues$find14 = cateringValues.find(function (val) {
|
|
195
|
+
return val.name === 'preorder_maximum_days';
|
|
196
|
+
})) === null || _cateringValues$find14 === void 0 ? void 0 : _cateringValues$find14.id,
|
|
197
|
+
type: type
|
|
198
|
+
});
|
|
199
|
+
},
|
|
200
|
+
onFocus: function onFocus() {
|
|
201
|
+
previousSearch = null;
|
|
202
|
+
}
|
|
203
|
+
}), /*#__PURE__*/_react.default.createElement("p", null, "(", t('DAYS', 'Days'), ")"), /*#__PURE__*/_react.default.createElement(_styles.Button, {
|
|
204
|
+
onClick: function onClick() {
|
|
205
|
+
var _cateringValues$find15;
|
|
206
|
+
return handleClickDefaultButton({
|
|
207
|
+
value: 15,
|
|
208
|
+
id: (_cateringValues$find15 = cateringValues.find(function (val) {
|
|
209
|
+
return val.name === 'preorder_maximum_days';
|
|
210
|
+
})) === null || _cateringValues$find15 === void 0 ? void 0 : _cateringValues$find15.id
|
|
211
|
+
}, ref_preorder_maximum_days);
|
|
212
|
+
}
|
|
213
|
+
}, t('USE_DEFAULT_VALUE', 'Use default value')))));
|
|
214
|
+
};
|
|
215
|
+
exports.BusinessCateringDelivery = BusinessCateringDelivery;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SwitchContainer = exports.Section = exports.InputContainer = exports.CheckboxContainer = exports.CateringContainer = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
|
+
var CateringContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n h1{\n margin: 10px 0px;\n font-size: 16px;\n }\n p {\n margin-bottom: 0;\n font-size: 14px;\n }\n"])));
|
|
12
|
+
exports.CateringContainer = CateringContainer;
|
|
13
|
+
var SwitchContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n margin-bottom: 20px;\n p {\n margin-right: 20px;\n }\n label {\n margin-top: 3px;\n }\n"])));
|
|
14
|
+
exports.SwitchContainer = SwitchContainer;
|
|
15
|
+
var Section = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-bottom: 40px;\n margin-top: 20px;\n"])));
|
|
16
|
+
exports.Section = Section;
|
|
17
|
+
var InputContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-bottom: 20px;\n input {\n text-align: center;\n width: 80px;\n margin-right: 10px;\n }\n\n p {\n margin-right: 20px;\n }\n"])));
|
|
18
|
+
exports.InputContainer = InputContainer;
|
|
19
|
+
var CheckboxContainer = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-bottom: 10px;\n p{\n margin-left: 20px;\n }\n"])));
|
|
20
|
+
exports.CheckboxContainer = CheckboxContainer;
|
|
@@ -57,7 +57,8 @@ var BusinessDetailsUI = function BusinessDetailsUI(props) {
|
|
|
57
57
|
handleUpdateBusinessState = props.handleUpdateBusinessState,
|
|
58
58
|
handleDuplicateBusiness = props.handleDuplicateBusiness,
|
|
59
59
|
handleDeleteBusiness = props.handleDeleteBusiness,
|
|
60
|
-
actionStatus = props.actionStatus
|
|
60
|
+
actionStatus = props.actionStatus,
|
|
61
|
+
handleUpdatePreorderConfigs = props.handleUpdatePreorderConfigs;
|
|
61
62
|
var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
|
|
62
63
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
63
64
|
t = _useLanguage2[1];
|
|
@@ -228,7 +229,9 @@ var BusinessDetailsUI = function BusinessDetailsUI(props) {
|
|
|
228
229
|
formState: formState,
|
|
229
230
|
setFormState: setFormState,
|
|
230
231
|
business: businessState === null || businessState === void 0 ? void 0 : businessState.business,
|
|
231
|
-
|
|
232
|
+
actionStatus: actionStatus,
|
|
233
|
+
handleUpdateBusinessClick: handleUpdateBusinessClick,
|
|
234
|
+
handleUpdatePreorderConfigs: handleUpdatePreorderConfigs
|
|
232
235
|
}), selectedItem === 'custom_fields' && /*#__PURE__*/_react.default.createElement(_BusinessCustomFields.BusinessCustomFields, {
|
|
233
236
|
businessId: businessState === null || businessState === void 0 ? void 0 : businessState.business.id,
|
|
234
237
|
metafields: businessState === null || businessState === void 0 ? void 0 : (_businessState$busine4 = businessState.business) === null || _businessState$busine4 === void 0 ? void 0 : _businessState$busine4.metafields,
|
|
@@ -9,6 +9,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _orderingComponentsAdminExternal = require("ordering-components-admin-external");
|
|
10
10
|
var _styles = require("../../../styles");
|
|
11
11
|
var _styles2 = require("./styles");
|
|
12
|
+
var _styles3 = require("../ProductDesktopPreview/styles");
|
|
13
|
+
var _BusinessCateringDelivery = require("../BusinessCateringDelivery");
|
|
12
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); }
|
|
13
15
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
16
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -26,7 +28,9 @@ var BusinessPreorderDetails = function BusinessPreorderDetails(props) {
|
|
|
26
28
|
var business = props.business,
|
|
27
29
|
formState = props.formState,
|
|
28
30
|
setFormState = props.setFormState,
|
|
29
|
-
handleUpdateBusinessClick = props.handleUpdateBusinessClick
|
|
31
|
+
handleUpdateBusinessClick = props.handleUpdateBusinessClick,
|
|
32
|
+
handleUpdatePreorderConfigs = props.handleUpdatePreorderConfigs,
|
|
33
|
+
actionStatus = props.actionStatus;
|
|
30
34
|
var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
|
|
31
35
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
32
36
|
t = _useLanguage2[1];
|
|
@@ -74,6 +78,16 @@ var BusinessPreorderDetails = function BusinessPreorderDetails(props) {
|
|
|
74
78
|
}
|
|
75
79
|
}));
|
|
76
80
|
};
|
|
81
|
+
var changePreorderConfigs = function changePreorderConfigs(params) {
|
|
82
|
+
var _business$configs, _business$configs$fin;
|
|
83
|
+
var cateringString = business === null || business === void 0 ? void 0 : (_business$configs = business.configs) === null || _business$configs === void 0 ? void 0 : (_business$configs$fin = _business$configs.find(function (config) {
|
|
84
|
+
return (config === null || config === void 0 ? void 0 : config.id) === (params === null || params === void 0 ? void 0 : params.id);
|
|
85
|
+
})) === null || _business$configs$fin === void 0 ? void 0 : _business$configs$fin.value;
|
|
86
|
+
var stringParam = cateringString.split('|').map(function (string) {
|
|
87
|
+
return string.includes(params.type) ? "".concat(params.type, ",").concat(params.value) : string;
|
|
88
|
+
}).join('|');
|
|
89
|
+
handleUpdatePreorderConfigs(stringParam, params.id);
|
|
90
|
+
};
|
|
77
91
|
(0, _react.useEffect)(function () {
|
|
78
92
|
setFormState(_objectSpread(_objectSpread({}, formState), {}, {
|
|
79
93
|
changes: {}
|
|
@@ -84,7 +98,7 @@ var BusinessPreorderDetails = function BusinessPreorderDetails(props) {
|
|
|
84
98
|
minute: business !== null && business !== void 0 && business.preorder_time ? (business === null || business === void 0 ? void 0 : business.preorder_time) % 60 : '0'
|
|
85
99
|
});
|
|
86
100
|
}, []);
|
|
87
|
-
return /*#__PURE__*/_react.default.createElement(_styles2.BusinessPreorderContainer, null, /*#__PURE__*/_react.default.createElement("h1", null, t('
|
|
101
|
+
return /*#__PURE__*/_react.default.createElement(_styles2.BusinessPreorderContainer, null, /*#__PURE__*/_react.default.createElement("h1", null, t('PREORDERS_SETTING', 'Preorders and lead times')), /*#__PURE__*/_react.default.createElement(_styles2.PreorderTimeWrapper, null, /*#__PURE__*/_react.default.createElement("p", {
|
|
88
102
|
className: "name"
|
|
89
103
|
}, t('PREORDER_TIME', 'Pre order time')), /*#__PURE__*/_react.default.createElement("p", {
|
|
90
104
|
className: "description"
|
|
@@ -106,11 +120,11 @@ var BusinessPreorderDetails = function BusinessPreorderDetails(props) {
|
|
|
106
120
|
value: minute.minute,
|
|
107
121
|
key: i
|
|
108
122
|
}, minute.text);
|
|
109
|
-
})))
|
|
123
|
+
}))), /*#__PURE__*/_react.default.createElement(_styles.Button, {
|
|
110
124
|
borderRadius: "8px",
|
|
111
125
|
color: "primary",
|
|
112
126
|
disabled: formState.loading || Object.keys(formState.changes).length === 0,
|
|
113
127
|
onClick: handleUpdateBusinessClick
|
|
114
|
-
}, t('SAVE', 'Save')));
|
|
128
|
+
}, t('SAVE', 'Save'))));
|
|
115
129
|
};
|
|
116
130
|
exports.BusinessPreorderDetails = BusinessPreorderDetails;
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.TimeBlock = exports.PreorderTimeWrapper = exports.BusinessPreorderContainer = void 0;
|
|
6
|
+
exports.TimeBlock = exports.PreorderTimeWrapper = exports.Margin = exports.BusinessPreorderContainer = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
-
var _templateObject, _templateObject2, _templateObject3;
|
|
8
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
10
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
|
-
var BusinessPreorderContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 20px;\n height: 100%;\n
|
|
11
|
+
var BusinessPreorderContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 20px;\n height: 100%;\n margin-bottom: 20px;\n h1 {\n font-size: 20px;\n font-weight: 700;\n margin-top: 5px;\n margin-bottom: 48px;\n }\n\n > button {\n height: 44px;\n position: sticky;\n top: 100%;\n margin: 20px 0;\n }\n"])));
|
|
12
12
|
exports.BusinessPreorderContainer = BusinessPreorderContainer;
|
|
13
|
-
var PreorderTimeWrapper = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 5px 0;\n\n p {\n font-size: 14px;\n &.name {\n margin: 0;\n }\n &.description {\n color: ", ";\n margin: 5px 0 18px;\n }\n }\n"])), function (props) {
|
|
13
|
+
var PreorderTimeWrapper = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 5px 0;\n\n p {\n font-size: 14px;\n &.name {\n margin: 0;\n }\n &.description {\n color: ", ";\n margin: 5px 0 18px;\n }\n }\n button {\n margin-top: 20px;\n margin-bottom: 10px;\n }\n"])), function (props) {
|
|
14
14
|
return props.theme.colors.lightGray;
|
|
15
15
|
});
|
|
16
16
|
exports.PreorderTimeWrapper = PreorderTimeWrapper;
|
|
@@ -22,4 +22,6 @@ var TimeBlock = _styledComponents.default.div(_templateObject3 || (_templateObje
|
|
|
22
22
|
var _props$theme;
|
|
23
23
|
return (_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.colors.headingColor;
|
|
24
24
|
});
|
|
25
|
-
exports.TimeBlock = TimeBlock;
|
|
25
|
+
exports.TimeBlock = TimeBlock;
|
|
26
|
+
var Margin = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n height: 20px;\n"])));
|
|
27
|
+
exports.Margin = Margin;
|
|
@@ -109,7 +109,7 @@ var BusinessSummary = function BusinessSummary(props) {
|
|
|
109
109
|
value: t('PROMOTIONS', 'Promotions')
|
|
110
110
|
}, {
|
|
111
111
|
key: 'preorder',
|
|
112
|
-
value: t('
|
|
112
|
+
value: t('PREORDERS_SETTING', 'Preorders and lead times')
|
|
113
113
|
}, {
|
|
114
114
|
key: 'custom_fields',
|
|
115
115
|
value: t('CUSTOM_FIELDS', 'Custom fields')
|
|
@@ -230,19 +230,10 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
230
230
|
loading: businessList.loading,
|
|
231
231
|
noBusinesses: noBusinesses,
|
|
232
232
|
openAddBusiness: openAddBusiness
|
|
233
|
-
}),
|
|
234
|
-
src: theme.images.dummies.noBusinesses,
|
|
235
|
-
alt: ""
|
|
236
|
-
}), /*#__PURE__*/_react.default.createElement("h2", null, t('NO_BUSINESSES_DESCRIPTION', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse cursus adipiscing risus odio. Turpis nibh phasellus interdum vulputate urna, cursus pellentesque. Nec quis donec lobortis enim magna non turpis faucibus. ')), /*#__PURE__*/_react.default.createElement(_styles2.Button, {
|
|
237
|
-
color: "primary",
|
|
238
|
-
borderRadius: "7.6px",
|
|
239
|
-
onClick: function onClick() {
|
|
240
|
-
return handleGotToAdd();
|
|
241
|
-
}
|
|
242
|
-
}, t('ADD_NEW_STORE', 'Add new store'))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.ViewContainer, null, /*#__PURE__*/_react.default.createElement(_BusinessActiveStateFilter.BusinessActiveStateFilter, {
|
|
233
|
+
}), /*#__PURE__*/_react.default.createElement(_styles.ViewContainer, null, /*#__PURE__*/_react.default.createElement(_BusinessActiveStateFilter.BusinessActiveStateFilter, {
|
|
243
234
|
selectedBusinessActiveState: selectedBusinessActiveState,
|
|
244
235
|
handleChangeBusinessActiveState: handleChangeBusinessActiveState
|
|
245
|
-
}), /*#__PURE__*/_react.default.createElement(_styles.WrapperView, null, /*#__PURE__*/_react.default.createElement(_styles.ViewMethodButton, {
|
|
236
|
+
}), !noBusinesses && /*#__PURE__*/_react.default.createElement(_styles.WrapperView, null, /*#__PURE__*/_react.default.createElement(_styles.ViewMethodButton, {
|
|
246
237
|
active: viewMethod === 'card',
|
|
247
238
|
onClick: function onClick() {
|
|
248
239
|
return handleViewMethod('card');
|
|
@@ -252,7 +243,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
252
243
|
onClick: function onClick() {
|
|
253
244
|
return handleViewMethod('list');
|
|
254
245
|
}
|
|
255
|
-
}, /*#__PURE__*/_react.default.createElement(_BsViewList.default, null)))), /*#__PURE__*/_react.default.createElement(_styles.ButtonGroup, {
|
|
246
|
+
}, /*#__PURE__*/_react.default.createElement(_BsViewList.default, null)))), !noBusinesses && /*#__PURE__*/_react.default.createElement(_styles.ButtonGroup, {
|
|
256
247
|
isSelect: (businessIds === null || businessIds === void 0 ? void 0 : businessIds.length) > 0
|
|
257
248
|
}, /*#__PURE__*/_react.default.createElement(_BusinessTypeFilter.BusinessTypeFilter, {
|
|
258
249
|
businessTypes: props.businessTypes,
|
|
@@ -261,7 +252,16 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
261
252
|
setBusinessTypes: setBusinessTypes
|
|
262
253
|
}), (businessIds === null || businessIds === void 0 ? void 0 : businessIds.length) > 0 && /*#__PURE__*/_react.default.createElement(_BusinessDelete.BusinessDelete, {
|
|
263
254
|
handleDeleteMultiBusinesses: handleDeleteMultiBusinesses
|
|
264
|
-
})), /*#__PURE__*/_react.default.createElement(
|
|
255
|
+
})), noBusinesses ? /*#__PURE__*/_react.default.createElement(_styles.EmptyBusinessWrapper, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
256
|
+
src: theme.images.dummies.noBusinesses,
|
|
257
|
+
alt: ""
|
|
258
|
+
}), /*#__PURE__*/_react.default.createElement(_styles2.Button, {
|
|
259
|
+
color: "primary",
|
|
260
|
+
borderRadius: "7.6px",
|
|
261
|
+
onClick: function onClick() {
|
|
262
|
+
return handleGotToAdd();
|
|
263
|
+
}
|
|
264
|
+
}, t('ADD_NEW_STORE', 'Add new store'))) : /*#__PURE__*/_react.default.createElement(_BusinessesList.BusinessesList, {
|
|
265
265
|
viewMethod: viewMethod,
|
|
266
266
|
businessList: businessList,
|
|
267
267
|
pagination: pagination,
|
|
@@ -280,7 +280,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
280
280
|
handleEnableAllBusiness: handleEnableAllBusiness,
|
|
281
281
|
selectedBusinessActiveState: selectedBusinessActiveState,
|
|
282
282
|
handleGotToAdd: handleGotToAdd
|
|
283
|
-
}))
|
|
283
|
+
})), openBusinessDetails && /*#__PURE__*/_react.default.createElement(_BusinessDetails.BusinessDetails, {
|
|
284
284
|
open: openBusinessDetails
|
|
285
285
|
// business={detailsBusiness}
|
|
286
286
|
,
|
|
@@ -40,7 +40,5 @@ var ButtonGroup = _styledComponents.default.div(_templateObject9 || (_templateOb
|
|
|
40
40
|
return props.theme.rtl && (0, _styledComponents.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-left: 0px;\n margin-right: 5px;\n "])));
|
|
41
41
|
});
|
|
42
42
|
exports.ButtonGroup = ButtonGroup;
|
|
43
|
-
var EmptyBusinessWrapper = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n min-height: calc(100vh -
|
|
44
|
-
return props.theme.colors.lightGray;
|
|
45
|
-
});
|
|
43
|
+
var EmptyBusinessWrapper = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n min-height: calc(100vh - 140px);\n\n > img {\n width: 90%;\n max-width: 500px;\n }\n\n button {\n height: 44px;\n margin-top: 30px;\n }\n @media (min-width: 576px) {\n > img {\n width: 60%;\n }\n }\n"])));
|
|
46
44
|
exports.EmptyBusinessWrapper = EmptyBusinessWrapper;
|
|
@@ -17,7 +17,7 @@ var Header = _styledComponents.default.div(_templateObject2 || (_templateObject2
|
|
|
17
17
|
exports.Header = Header;
|
|
18
18
|
var FormInput = _styledComponents.default.form(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n min-height: calc(100% - 100px);\n > button {\n position: sticky;\n top: 100%;\n height: 44px;\n }\n"])));
|
|
19
19
|
exports.FormInput = FormInput;
|
|
20
|
-
var ProductTagImage = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 200px;\n height: 200px;\n border-radius: 8px;\n overflow: hidden;\n cursor: -webkit-grab;\n cursor: grab;\n filter: drop-shadow(0px 1px 4px rgba(0, 0, 0, 0.1));\n\n img,\n div {\n width: 100%;\n border-radius: 8px;\n height: 100%;\n overflow: hidden;\n };\n\n img{\n object-fit: cover;\n }\n"])));
|
|
20
|
+
var ProductTagImage = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 200px;\n height: 200px;\n position: relative;\n border-radius: 8px;\n overflow: hidden;\n cursor: -webkit-grab;\n cursor: grab;\n filter: drop-shadow(0px 1px 4px rgba(0, 0, 0, 0.1));\n\n img,\n div {\n width: 100%;\n border-radius: 8px;\n height: 100%;\n overflow: hidden;\n };\n\n img{\n object-fit: cover;\n }\n"])));
|
|
21
21
|
exports.ProductTagImage = ProductTagImage;
|
|
22
22
|
var UploadImageIconContainer = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0px;\n background: rgba(0,0,0,0.2);\n ", "\n"])), function (_ref) {
|
|
23
23
|
var small = _ref.small;
|
|
@@ -22,7 +22,7 @@ var WrapperDescription = (0, _styledComponents.default)(WrapperShortDescription)
|
|
|
22
22
|
exports.WrapperDescription = WrapperDescription;
|
|
23
23
|
var WrapperImage = (0, _styledComponents.default)(WrapperShortDescription)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-top: 35px;\n padding-bottom: 52px;\n"])));
|
|
24
24
|
exports.WrapperImage = WrapperImage;
|
|
25
|
-
var SEOImage = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: 200px;\n height: 200px;\n border-radius: 8px;\n overflow: hidden;\n cursor: -webkit-grab;\n cursor: grab;\n filter: drop-shadow(0px 1px 4px rgba(0, 0, 0, 0.1));\n\n ", "\n\n img,\n div {\n width: 100%;\n border-radius: 8px;\n height: 100%;\n overflow: hidden;\n };\n\n img{\n object-fit: cover;\n }\n"])), function (_ref) {
|
|
25
|
+
var SEOImage = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: 200px;\n height: 200px;\n position: relative;\n border-radius: 8px;\n overflow: hidden;\n cursor: -webkit-grab;\n cursor: grab;\n filter: drop-shadow(0px 1px 4px rgba(0, 0, 0, 0.1));\n\n ", "\n\n img,\n div {\n width: 100%;\n border-radius: 8px;\n height: 100%;\n overflow: hidden;\n };\n\n img{\n object-fit: cover;\n }\n"])), function (_ref) {
|
|
26
26
|
var isEdit = _ref.isEdit;
|
|
27
27
|
return !isEdit && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n pointer-event: none;\n "])));
|
|
28
28
|
});
|
package/_modules/index.js
CHANGED
|
@@ -729,6 +729,12 @@ Object.defineProperty(exports, "CountrySelector", {
|
|
|
729
729
|
return _Settings.CountrySelector;
|
|
730
730
|
}
|
|
731
731
|
});
|
|
732
|
+
Object.defineProperty(exports, "CustomProject", {
|
|
733
|
+
enumerable: true,
|
|
734
|
+
get: function get() {
|
|
735
|
+
return _MyProducts.CustomProject;
|
|
736
|
+
}
|
|
737
|
+
});
|
|
732
738
|
Object.defineProperty(exports, "CustomerApp", {
|
|
733
739
|
enumerable: true,
|
|
734
740
|
get: function get() {
|
package/index-template.js
CHANGED
|
@@ -175,6 +175,7 @@ import multiStoreCustomerApp from './template/assets/images/myProducts/multi-sto
|
|
|
175
175
|
import singleStoreCustomerApp from './template/assets/images/myProducts/single-store-customer-app.png'
|
|
176
176
|
import appStoreSmall from './template/assets/images/myProducts/app-store.png'
|
|
177
177
|
import playStoreSmall from './template/assets/images/myProducts/play-store.png'
|
|
178
|
+
import customProject from './template/assets/images/myProducts/custom-project.png'
|
|
178
179
|
|
|
179
180
|
/**
|
|
180
181
|
* pos
|
|
@@ -418,7 +419,8 @@ theme.images = {
|
|
|
418
419
|
multiStoreCustomerApp,
|
|
419
420
|
singleStoreCustomerApp,
|
|
420
421
|
appStoreSmall,
|
|
421
|
-
playStoreSmall
|
|
422
|
+
playStoreSmall,
|
|
423
|
+
customProject
|
|
422
424
|
},
|
|
423
425
|
pos: {
|
|
424
426
|
square,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-admin-external",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.1",
|
|
4
4
|
"description": "Ordering UI Admin Components",
|
|
5
5
|
"main": "./_modules/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"lodash": "^4.17.20",
|
|
84
84
|
"moment": "^2.29.1",
|
|
85
85
|
"moment-range": "^4.0.2",
|
|
86
|
-
"ordering-components-admin-external": "1.
|
|
86
|
+
"ordering-components-admin-external": "1.13.2",
|
|
87
87
|
"polished": "^3.6.7",
|
|
88
88
|
"prop-types": "^15.7.2",
|
|
89
89
|
"react-big-calendar": "^1.4.2",
|