ordering-ui-admin-external 1.8.5 → 1.10.0
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.66a745752c35fb204c80.js → ordering-ui-admin.e741ec718656ba6908ef.js} +2 -2
- package/_bundles/{ordering-ui-admin.66a745752c35fb204c80.js.LICENSE.txt → ordering-ui-admin.e741ec718656ba6908ef.js.LICENSE.txt} +0 -0
- package/_modules/components/BusinessIntelligence/BusinessReviewList/index.js +2 -1
- package/_modules/components/BusinessIntelligence/UsersReviewList/index.js +2 -1
- package/_modules/components/Delivery/DriversGroupDeliveryZoneInformation/index.js +23 -5
- package/_modules/components/Delivery/DriversGroupDetails/index.js +6 -9
- package/_modules/components/Delivery/UsersList/index.js +2 -1
- package/_modules/components/MyProducts/OrderingWebsite/index.js +50 -8
- package/_modules/components/OrderingProducts/OrderingProductsListing/index.js +2 -1
- package/_modules/components/Orders/OrderBill/index.js +17 -17
- package/_modules/components/Profile/ProfilePage/index.js +3 -1
- package/_modules/components/Profile/ProfilePage/styles.js +23 -6
- package/_modules/components/Settings/Deliverect/index.js +103 -0
- package/_modules/components/Settings/Deliverect/styles.js +115 -0
- package/_modules/components/Settings/DoordashConnect/index.js +1 -1
- package/_modules/components/Settings/IntegrationListing/index.js +41 -2
- package/_modules/components/Settings/IntegrationListing/styles.js +7 -4
- package/_modules/components/Settings/ItsaCheckmate/index.js +112 -0
- package/_modules/components/Settings/ItsaCheckmate/styles.js +118 -0
- package/_modules/components/Settings/PickerExpress/index.js +178 -0
- package/_modules/components/Settings/PickerExpress/styles.js +111 -0
- package/_modules/components/Settings/index.js +8 -1
- package/_modules/components/Shared/Modal/styles.js +1 -1
- package/_modules/components/SidebarMenu/index.js +14 -1
- package/_modules/components/SidebarMenu/styles.js +9 -3
- package/_modules/components/Stores/BusinessAdd/BusinessDetails/index.js +95 -0
- package/_modules/components/Stores/BusinessAdd/BusinessDetails/styles.js +43 -0
- package/_modules/components/Stores/BusinessAdd/DeliveryZone/index.js +233 -0
- package/_modules/components/Stores/BusinessAdd/DeliveryZone/styles.js +40 -0
- package/_modules/components/Stores/BusinessAdd/Images/index.js +181 -0
- package/_modules/components/Stores/BusinessAdd/Images/styles.js +42 -0
- package/_modules/components/Stores/BusinessAdd/OrderTypePriceLevel/index.js +53 -0
- package/_modules/components/Stores/BusinessAdd/OrderTypePriceLevel/styles.js +31 -0
- package/_modules/components/Stores/BusinessAdd/OtherDetails/index.js +43 -0
- package/_modules/components/Stores/BusinessAdd/OtherDetails/styles.js +25 -0
- package/_modules/components/Stores/BusinessAdd/PaymentMethods/index.js +48 -0
- package/_modules/components/Stores/BusinessAdd/PaymentMethods/styles.js +31 -0
- package/_modules/components/Stores/BusinessAdd/Photos/index.js +174 -0
- package/_modules/components/Stores/BusinessAdd/Photos/styles.js +46 -0
- package/_modules/components/Stores/BusinessAdd/ReceiveOrders/index.js +48 -0
- package/_modules/components/Stores/BusinessAdd/ReceiveOrders/styles.js +24 -0
- package/_modules/components/Stores/BusinessAdd/Schedule/index.js +31 -0
- package/_modules/components/Stores/BusinessAdd/Schedule/styles.js +14 -0
- package/_modules/components/Stores/BusinessAdd/index.js +170 -0
- package/_modules/components/Stores/BusinessAdd/styles.js +29 -0
- package/_modules/components/Stores/BusinessDeliveryDetails/styles.js +1 -1
- package/_modules/components/Stores/BusinessDeliveryPickupMore/index.js +4 -0
- package/_modules/components/Stores/BusinessDeliveryZoneInformation/index.js +1 -1
- package/_modules/components/Stores/BusinessPickupDetails/styles.js +1 -1
- package/_modules/components/Stores/BusinessProductAddForm/index.js +5 -5
- package/_modules/components/Stores/BusinessProductsCategoyInfo/index.js +1 -6
- package/_modules/components/Stores/BusinessProductsListing/index.js +38 -14
- package/_modules/components/Stores/BusinessesList/index.js +5 -3
- package/_modules/components/Stores/BusinessesListing/index.js +51 -26
- package/_modules/components/Stores/BusinessesListing/styles.js +22 -15
- package/_modules/components/Stores/BusinessesListingHeader/index.js +6 -5
- package/_modules/components/Stores/ProductStartGuide/index.js +69 -0
- package/_modules/components/Stores/ProductStartGuide/styles.js +28 -0
- package/_modules/components/Stores/ProductStep/index.js +92 -0
- package/_modules/components/Stores/ProductStep/styles.js +18 -0
- package/_modules/components/Stores/RestaurantSelectGuide/index.js +104 -0
- package/_modules/components/Stores/RestaurantSelectGuide/styles.js +44 -0
- package/_modules/components/Stores/index.js +36 -1
- package/_modules/components/Users/ProfessionalAddForm/index.js +16 -3
- package/_modules/components/Users/ProfessionalList/index.js +2 -1
- package/_modules/components/Users/ProfessionalListing/index.js +2 -0
- package/_modules/components/Users/ProfessionalSchedule/Schedule/index.js +36 -0
- package/_modules/components/Users/ProfessionalSchedule/index.js +10 -120
- package/_modules/components/Users/ProfessionalSchedule/styles.js +4 -16
- package/_modules/components/Users/UserFormDetails/index.js +1 -1
- package/_modules/components/Users/UsersList/index.js +5 -4
- package/_modules/components/Users/UsersListingHeader/index.js +5 -2
- package/_modules/components/Users/UsersListingHeader/styles.js +18 -3
- package/_modules/index.js +36 -0
- package/index-template.js +64 -2
- package/package.json +2 -2
- package/src/components/BusinessIntelligence/BusinessReviewList/index.js +1 -0
- package/src/components/BusinessIntelligence/UsersReviewList/index.js +1 -0
- package/src/components/Delivery/DriversGroupDeliveryZoneInformation/index.js +20 -0
- package/src/components/Delivery/DriversGroupDetails/index.js +7 -7
- package/src/components/Delivery/DriversGroupsDeliveryZoneDetails/index.js +1 -1
- package/src/components/Delivery/UsersList/index.js +1 -0
- package/src/components/MyProducts/OrderingWebsite/index.js +45 -3
- package/src/components/OrderingProducts/OrderingProductsListing/index.js +1 -0
- package/src/components/Orders/OrderBill/index.js +20 -22
- package/src/components/Profile/ProfilePage/index.js +16 -2
- package/src/components/Profile/ProfilePage/styles.js +67 -1
- package/src/components/Settings/Deliverect/index.js +149 -0
- package/src/components/Settings/Deliverect/styles.js +344 -0
- package/src/components/Settings/DoordashConnect/index.js +1 -1
- package/src/components/Settings/IntegrationListing/index.js +47 -13
- package/src/components/Settings/IntegrationListing/styles.js +7 -1
- package/src/components/Settings/ItsaCheckmate/index.js +170 -0
- package/src/components/Settings/ItsaCheckmate/styles.js +366 -0
- package/src/components/Settings/PickerExpress/index.js +222 -0
- package/src/components/Settings/PickerExpress/styles.js +330 -0
- package/src/components/Settings/index.js +3 -1
- package/src/components/Shared/Modal/styles.js +1 -1
- package/src/components/SidebarMenu/index.js +21 -3
- package/src/components/SidebarMenu/styles.js +26 -0
- package/src/components/Stores/BusinessAdd/BusinessDetails/index.js +106 -0
- package/src/components/Stores/BusinessAdd/BusinessDetails/styles.js +107 -0
- package/src/components/Stores/BusinessAdd/DeliveryZone/index.js +250 -0
- package/src/components/Stores/BusinessAdd/DeliveryZone/styles.js +101 -0
- package/src/components/Stores/BusinessAdd/Images/index.js +168 -0
- package/src/components/Stores/BusinessAdd/Images/styles.js +94 -0
- package/src/components/Stores/BusinessAdd/OrderTypePriceLevel/index.js +43 -0
- package/src/components/Stores/BusinessAdd/OrderTypePriceLevel/styles.js +70 -0
- package/src/components/Stores/BusinessAdd/OtherDetails/index.js +51 -0
- package/src/components/Stores/BusinessAdd/OtherDetails/styles.js +49 -0
- package/src/components/Stores/BusinessAdd/PaymentMethods/index.js +39 -0
- package/src/components/Stores/BusinessAdd/PaymentMethods/styles.js +46 -0
- package/src/components/Stores/BusinessAdd/Photos/index.js +156 -0
- package/src/components/Stores/BusinessAdd/Photos/styles.js +108 -0
- package/src/components/Stores/BusinessAdd/ReceiveOrders/index.js +46 -0
- package/src/components/Stores/BusinessAdd/ReceiveOrders/styles.js +69 -0
- package/src/components/Stores/BusinessAdd/Schedule/index.js +23 -0
- package/src/components/Stores/BusinessAdd/Schedule/styles.js +14 -0
- package/src/components/Stores/BusinessAdd/index.js +184 -0
- package/src/components/Stores/BusinessAdd/styles.js +85 -0
- package/src/components/Stores/BusinessDeliveryDetails/styles.js +1 -0
- package/src/components/Stores/BusinessDeliveryPickupMore/index.js +9 -1
- package/src/components/Stores/BusinessDeliveryZoneInformation/index.js +8 -10
- package/src/components/Stores/BusinessPickupDetails/styles.js +1 -0
- package/src/components/Stores/BusinessProductAddForm/index.js +13 -11
- package/src/components/Stores/BusinessProductsCategoyInfo/index.js +4 -7
- package/src/components/Stores/BusinessProductsListing/index.js +20 -0
- package/src/components/Stores/BusinessesList/index.js +4 -2
- package/src/components/Stores/BusinessesListing/index.js +101 -67
- package/src/components/Stores/BusinessesListing/styles.js +36 -0
- package/src/components/Stores/BusinessesListingHeader/index.js +58 -51
- package/src/components/Stores/ProductStartGuide/index.js +60 -0
- package/src/components/Stores/ProductStartGuide/styles.js +62 -0
- package/src/components/Stores/ProductStep/index.js +84 -0
- package/src/components/Stores/ProductStep/styles.js +29 -0
- package/src/components/Stores/RestaurantSelectGuide/index.js +119 -0
- package/src/components/Stores/RestaurantSelectGuide/styles.js +150 -0
- package/src/components/Stores/index.js +11 -1
- package/src/components/Users/ProfessionalAddForm/index.js +11 -1
- package/src/components/Users/ProfessionalList/index.js +1 -0
- package/src/components/Users/ProfessionalListing/index.js +2 -0
- package/src/components/Users/ProfessionalSchedule/Schedule/index.js +32 -0
- package/src/components/Users/ProfessionalSchedule/index.js +9 -49
- package/src/components/Users/ProfessionalSchedule/styles.js +0 -49
- package/src/components/Users/UserFormDetails/index.js +1 -1
- package/src/components/Users/UsersList/index.js +4 -2
- package/src/components/Users/UsersListingHeader/index.js +17 -2
- package/src/components/Users/UsersListingHeader/styles.js +59 -0
- package/src/index.js +14 -2
- package/template/app.js +4 -0
- package/template/assets/images/dummies/no-businesses.png +0 -0
- package/template/assets/images/import-menu.png +0 -0
- package/template/assets/images/imported-menu.png +0 -0
- package/template/assets/images/picker-express.png +0 -0
- package/template/components/ListenPageChanges/index.js +1 -0
- package/template/config.json +1 -1
- package/template/helmetdata.json +7 -0
- package/template/pages/BusinessAdd/index.js +11 -0
|
@@ -4,36 +4,43 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.WrapperView = exports.ViewMethodButton = exports.ViewContainer = exports.ButtonGroup = exports.BusinessListingContainer = void 0;
|
|
7
|
+
exports.WrapperView = exports.ViewMethodButton = exports.ViewContainer = exports.EmptyBusinessWrapper = exports.ButtonGroup = exports.BusinessListingContainer = void 0;
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
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) } })); }
|
|
13
|
-
var BusinessListingContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex: 1;\n padding: 20px;\n box-sizing: border-box;\n transition: all 0.5s;\n overflow: hidden;\n\n @media print {\n display: none;\n }\n"])))
|
|
13
|
+
var BusinessListingContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex: 1;\n padding: 20px;\n box-sizing: border-box;\n transition: all 0.5s;\n overflow: hidden;\n\n ", "\n\n @media print {\n display: none;\n }\n"])), function (_ref) {
|
|
14
|
+
var isAdd = _ref.isAdd;
|
|
15
|
+
return isAdd && (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n max-height: 100vh;\n overflow: auto;\n "])));
|
|
16
|
+
});
|
|
14
17
|
exports.BusinessListingContainer = BusinessListingContainer;
|
|
15
|
-
var ViewContainer = _styledComponents.default.div(
|
|
18
|
+
var ViewContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid ", ";\n margin-top: 10px;\n"])), function (props) {
|
|
16
19
|
return props.theme.colors.borderColor;
|
|
17
20
|
});
|
|
18
21
|
exports.ViewContainer = ViewContainer;
|
|
19
|
-
var WrapperView = _styledComponents.default.div(
|
|
22
|
+
var WrapperView = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n > span:first-child {\n ", "\n }\n"])), function (props) {
|
|
20
23
|
var _props$theme;
|
|
21
|
-
return (_props$theme = props.theme) !== null && _props$theme !== void 0 && _props$theme.rtl ? (0, _styledComponents.css)(
|
|
24
|
+
return (_props$theme = props.theme) !== null && _props$theme !== void 0 && _props$theme.rtl ? (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-left: 10px;\n "]))) : (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-right: 10px;\n "])));
|
|
22
25
|
});
|
|
23
26
|
exports.WrapperView = WrapperView;
|
|
24
|
-
var ViewMethodButton = _styledComponents.default.span(
|
|
27
|
+
var ViewMethodButton = _styledComponents.default.span(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n cursor: pointer;\n color: ", ";\n\n svg {\n font-size: 20px;\n transition: all .2s ease-in;\n }\n\n ", "\n\n &:hover {\n svg {\n font-size: 24px;\n }\n }\n"])), function (props) {
|
|
25
28
|
return props.theme.colors.headingColor;
|
|
26
|
-
}, function (
|
|
27
|
-
var active =
|
|
28
|
-
return active && (0, _styledComponents.css)(
|
|
29
|
+
}, function (_ref2) {
|
|
30
|
+
var active = _ref2.active;
|
|
31
|
+
return active && (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n color: ", ";\n "])), function (props) {
|
|
29
32
|
return props.theme.colors.primary;
|
|
30
33
|
});
|
|
31
34
|
});
|
|
32
35
|
exports.ViewMethodButton = ViewMethodButton;
|
|
33
|
-
var ButtonGroup = _styledComponents.default.div(
|
|
34
|
-
var isSelect =
|
|
35
|
-
return isSelect && (0, _styledComponents.css)(
|
|
36
|
+
var ButtonGroup = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n flex-direction: column;\n > div {\n width: 100%;\n }\n\n @media (min-width: 769px) {\n flex-direction: row;\n align-items: center;\n ", "\n }\n\n > button {\n height: 42px;\n display: flex;\n align-items: center;\n svg {\n min-width: 14px;\n margin-left: 5px;\n ", "\n }\n }\n"])), function (_ref3) {
|
|
37
|
+
var isSelect = _ref3.isSelect;
|
|
38
|
+
return isSelect && (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n > div {\n width: calc(100% - 100px);\n }\n "])));
|
|
36
39
|
}, function (props) {
|
|
37
|
-
return props.theme.rtl && (0, _styledComponents.css)(
|
|
40
|
+
return props.theme.rtl && (0, _styledComponents.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-left: 0px;\n margin-right: 5px;\n "])));
|
|
41
|
+
});
|
|
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 - 70px);\n\n > img {\n width: 90%;\n max-width: 500px;\n }\n h2 {\n font-weight: 400;\n font-size: 14px;\n line-height: 24px;\n margin-bottom: 30px;\n margin-top: 0px;\n text-align: center;\n max-width: 600px;\n color: ", ";\n }\n button {\n height: 44px;\n }\n @media (min-width: 576px) {\n > img {\n width: 60%;\n }\n }\n"])), function (props) {
|
|
44
|
+
return props.theme.colors.lightGray;
|
|
38
45
|
});
|
|
39
|
-
exports.
|
|
46
|
+
exports.EmptyBusinessWrapper = EmptyBusinessWrapper;
|
|
@@ -23,11 +23,12 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
23
23
|
var BusinessesListingHeader = function BusinessesListingHeader(props) {
|
|
24
24
|
var searchValue = props.searchValue,
|
|
25
25
|
onSearch = props.onSearch,
|
|
26
|
-
handleOpenAddBusiness = props.handleOpenAddBusiness,
|
|
27
26
|
handleStartTutorial = props.handleStartTutorial,
|
|
28
27
|
handleOpenSync = props.handleOpenSync,
|
|
29
28
|
handleRefreshBusinesses = props.handleRefreshBusinesses,
|
|
30
|
-
loading = props.loading
|
|
29
|
+
loading = props.loading,
|
|
30
|
+
noBusinesses = props.noBusinesses,
|
|
31
|
+
handleGotToAdd = props.handleGotToAdd;
|
|
31
32
|
var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
|
|
32
33
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
33
34
|
t = _useLanguage2[1];
|
|
@@ -40,7 +41,7 @@ var BusinessesListingHeader = function BusinessesListingHeader(props) {
|
|
|
40
41
|
onClick: function onClick() {
|
|
41
42
|
return handleMenuCollapse(false);
|
|
42
43
|
}
|
|
43
|
-
}, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.List, null)), /*#__PURE__*/_react.default.createElement("h1", null, t('STORES_LIST', 'Stores list')), /*#__PURE__*/_react.default.createElement(_reactBootstrap.OverlayTrigger, {
|
|
44
|
+
}, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.List, null)), /*#__PURE__*/_react.default.createElement("h1", null, t('STORES_LIST', 'Stores list')), !noBusinesses && /*#__PURE__*/_react.default.createElement(_reactBootstrap.OverlayTrigger, {
|
|
44
45
|
placement: "bottom",
|
|
45
46
|
overlay: /*#__PURE__*/_react.default.createElement(_reactBootstrap.Tooltip, null, t('START_TUTORIAL', 'Start tutorial'))
|
|
46
47
|
}, /*#__PURE__*/_react.default.createElement(_styles.IconButton, {
|
|
@@ -49,7 +50,7 @@ var BusinessesListingHeader = function BusinessesListingHeader(props) {
|
|
|
49
50
|
onClick: function onClick() {
|
|
50
51
|
return handleStartTutorial();
|
|
51
52
|
}
|
|
52
|
-
}, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.LifePreserver, null)))), /*#__PURE__*/_react.default.createElement(_styles2.ActionsWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.Button, {
|
|
53
|
+
}, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.LifePreserver, null)))), !noBusinesses && /*#__PURE__*/_react.default.createElement(_styles2.ActionsWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.Button, {
|
|
53
54
|
color: "lightPrimary",
|
|
54
55
|
borderRadius: "8px",
|
|
55
56
|
onClick: function onClick() {
|
|
@@ -67,7 +68,7 @@ var BusinessesListingHeader = function BusinessesListingHeader(props) {
|
|
|
67
68
|
color: "lightPrimary",
|
|
68
69
|
borderRadius: "8px",
|
|
69
70
|
onClick: function onClick() {
|
|
70
|
-
return
|
|
71
|
+
return handleGotToAdd();
|
|
71
72
|
}
|
|
72
73
|
}, t('ADD_NEW_STORE', 'Add new store')), /*#__PURE__*/_react.default.createElement(_styles.Button, {
|
|
73
74
|
color: "lightPrimary",
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ProductStartGuide = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _orderingComponentsAdminExternal = require("ordering-components-admin-external");
|
|
9
|
+
var _reactBootstrapIcons = require("react-bootstrap-icons");
|
|
10
|
+
var _reactLoadingSkeleton = _interopRequireDefault(require("react-loading-skeleton"));
|
|
11
|
+
var _styles = require("./styles");
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
14
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
15
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
17
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
18
|
+
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."); }
|
|
19
|
+
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); }
|
|
20
|
+
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; }
|
|
21
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
22
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
|
+
var ProductStartGuide = function ProductStartGuide(props) {
|
|
24
|
+
var onClose = props.onClose,
|
|
25
|
+
setStep = props.setStep,
|
|
26
|
+
countriesState = props.countriesState;
|
|
27
|
+
var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
|
|
28
|
+
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
29
|
+
t = _useLanguage2[1];
|
|
30
|
+
var guideList = [{
|
|
31
|
+
id: 1,
|
|
32
|
+
title: t('START_WITH_AN_EMPTY_MENU', 'Start with an empty Menu'),
|
|
33
|
+
description: t('START_WITH_AN_EMPTY_MENU_DESC', 'Start with an empty Menu and enter your menu items'),
|
|
34
|
+
icon: /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.FileMedical, null),
|
|
35
|
+
enabled: true
|
|
36
|
+
}, {
|
|
37
|
+
id: 2,
|
|
38
|
+
title: t('IMPORT_MENU_ONLY_USA_CANADA', 'Import Menu (Only if USA and Canada)'),
|
|
39
|
+
description: t('IMPORT_MENU_ONLY_USA_CANADA_DESC', 'Import your menu from the Ordering Network that includes over 1M restaurants and stores from the US and Canada.'),
|
|
40
|
+
icon: /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.ColumnsGap, null),
|
|
41
|
+
enabled: countriesState === null || countriesState === void 0 ? void 0 : countriesState.enabled
|
|
42
|
+
}];
|
|
43
|
+
var handleChangeStep = function handleChangeStep(id) {
|
|
44
|
+
if (id === 1) onClose();else if (id === 2) setStep(2);
|
|
45
|
+
};
|
|
46
|
+
return /*#__PURE__*/_react.default.createElement(_styles.Container, null, /*#__PURE__*/_react.default.createElement("h2", null, t('HOW_DO_YOU_WANT_TO_START', 'How do you want to start?')), (countriesState === null || countriesState === void 0 ? void 0 : countriesState.loading) && _toConsumableArray(Array(4).keys()).map(function (idx) {
|
|
47
|
+
return /*#__PURE__*/_react.default.createElement(_styles.GuideItemContainer, {
|
|
48
|
+
key: idx
|
|
49
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.IconWrapper, null, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
50
|
+
width: 24,
|
|
51
|
+
height: 24
|
|
52
|
+
})), /*#__PURE__*/_react.default.createElement(_styles.InfoWrapper, null, /*#__PURE__*/_react.default.createElement("h3", null, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
53
|
+
height: 18,
|
|
54
|
+
width: 200
|
|
55
|
+
})), /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
56
|
+
height: 10
|
|
57
|
+
})), /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
58
|
+
height: 10
|
|
59
|
+
}))));
|
|
60
|
+
}), !(countriesState !== null && countriesState !== void 0 && countriesState.loading) && guideList.map(function (guide) {
|
|
61
|
+
return guide.enabled && /*#__PURE__*/_react.default.createElement(_styles.GuideItemContainer, {
|
|
62
|
+
key: guide.id,
|
|
63
|
+
onClick: function onClick() {
|
|
64
|
+
return handleChangeStep(guide.id);
|
|
65
|
+
}
|
|
66
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.IconWrapper, null, guide.icon), /*#__PURE__*/_react.default.createElement(_styles.InfoWrapper, null, /*#__PURE__*/_react.default.createElement("h3", null, guide.title), /*#__PURE__*/_react.default.createElement("p", null, guide.description)));
|
|
67
|
+
}));
|
|
68
|
+
};
|
|
69
|
+
exports.ProductStartGuide = ProductStartGuide;
|
|
@@ -0,0 +1,28 @@
|
|
|
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.InfoWrapper = exports.IconWrapper = exports.GuideItemContainer = exports.Container = void 0;
|
|
8
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
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
|
+
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
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
13
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n h2 {\n font-weight: 600;\n font-size: 24px;\n line-height: 36px;\n text-align: center;\n margin: 0;\n }\n"])));
|
|
14
|
+
exports.Container = Container;
|
|
15
|
+
var IconWrapper = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 20px;\n ", "\n svg {\n font-size: 24px;\n }\n"])), function (props) {
|
|
16
|
+
return props.theme.rtl && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-right: 0px;\n margin-left: 20px;\n "])));
|
|
17
|
+
});
|
|
18
|
+
exports.IconWrapper = IconWrapper;
|
|
19
|
+
var GuideItemContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n padding: 10px 20px;\n min-height: 78px;\n margin-top: 30px;\n border-radius: 7.6px;\n cursor: pointer;\n border: 1px solid ", ";\n transition: all 0.3s linear;\n\n &:hover {\n border: 1px solid ", ";\n background-color: ", ";\n }\n"])), function (props) {
|
|
20
|
+
return props.theme.colors.borderColor;
|
|
21
|
+
}, function (props) {
|
|
22
|
+
return props.theme.colors.primary;
|
|
23
|
+
}, function (props) {
|
|
24
|
+
return props.theme.colors.lightPrimary;
|
|
25
|
+
});
|
|
26
|
+
exports.GuideItemContainer = GuideItemContainer;
|
|
27
|
+
var InfoWrapper = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n flex: 1;\n h3 {\n font-weight: 600;\n font-size: 14px;\n line-height: 21px;\n margin: 0%;\n }\n p {\n margin: 0;\n font-weight: 400;\n font-size: 12px;\n line-height: 18px;\n > span {\n display: flex;\n margin-top: 5px;\n }\n }\n"])));
|
|
28
|
+
exports.InfoWrapper = InfoWrapper;
|
|
@@ -0,0 +1,92 @@
|
|
|
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.ProductStep = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _orderingComponentsAdminExternal = require("ordering-components-admin-external");
|
|
10
|
+
var _ProductStartGuide = require("../ProductStartGuide");
|
|
11
|
+
var _RestaurantSelectGuide = require("../RestaurantSelectGuide");
|
|
12
|
+
var _styledComponents = require("styled-components");
|
|
13
|
+
var _styles = require("../../../styles");
|
|
14
|
+
var _styles2 = require("./styles");
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
17
|
+
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; }
|
|
18
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
19
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
20
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
21
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
22
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
23
|
+
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."); }
|
|
24
|
+
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); }
|
|
25
|
+
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; }
|
|
26
|
+
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; } }
|
|
27
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
28
|
+
var ProductStepUI = function ProductStepUI(props) {
|
|
29
|
+
var onClose = props.onClose,
|
|
30
|
+
businessList = props.businessList,
|
|
31
|
+
setBusiness = props.setBusiness,
|
|
32
|
+
actionState = props.actionState,
|
|
33
|
+
handleImport = props.handleImport,
|
|
34
|
+
handleChangeAddress = props.handleChangeAddress,
|
|
35
|
+
business = props.business,
|
|
36
|
+
isLoading = props.isLoading,
|
|
37
|
+
orderingBusiness = props.orderingBusiness,
|
|
38
|
+
countriesState = props.countriesState;
|
|
39
|
+
var theme = (0, _styledComponents.useTheme)();
|
|
40
|
+
var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
|
|
41
|
+
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
42
|
+
t = _useLanguage2[1];
|
|
43
|
+
var _useEvent = (0, _orderingComponentsAdminExternal.useEvent)(),
|
|
44
|
+
_useEvent2 = _slicedToArray(_useEvent, 1),
|
|
45
|
+
events = _useEvent2[0];
|
|
46
|
+
var _useState = (0, _react.useState)(1),
|
|
47
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
48
|
+
step = _useState2[0],
|
|
49
|
+
setStep = _useState2[1];
|
|
50
|
+
var handleCheckMenu = function handleCheckMenu() {
|
|
51
|
+
events.emit('go_to_page', {
|
|
52
|
+
page: 'store',
|
|
53
|
+
params: {
|
|
54
|
+
store: business === null || business === void 0 ? void 0 : business._id
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
onClose();
|
|
58
|
+
};
|
|
59
|
+
return /*#__PURE__*/_react.default.createElement(_styles2.Container, null, step === 1 && /*#__PURE__*/_react.default.createElement(_ProductStartGuide.ProductStartGuide, {
|
|
60
|
+
onClose: onClose,
|
|
61
|
+
setStep: setStep,
|
|
62
|
+
countriesState: countriesState
|
|
63
|
+
}), step === 2 && /*#__PURE__*/_react.default.createElement(_RestaurantSelectGuide.RestaurantSelectGuide, {
|
|
64
|
+
setBusiness: setBusiness,
|
|
65
|
+
setStep: setStep,
|
|
66
|
+
onClose: onClose,
|
|
67
|
+
businessList: businessList,
|
|
68
|
+
handleImport: handleImport,
|
|
69
|
+
handleChangeAddress: handleChangeAddress,
|
|
70
|
+
orderingBusiness: orderingBusiness,
|
|
71
|
+
business: business,
|
|
72
|
+
isLoading: isLoading
|
|
73
|
+
}), step === 3 && (actionState === null || actionState === void 0 ? void 0 : actionState.loading) && /*#__PURE__*/_react.default.createElement(_styles2.ImportMenuContainer, null, /*#__PURE__*/_react.default.createElement("h2", null, t('WE_ARE_IMPORTING_YOUR_MENU', 'We are importing your menu.')), /*#__PURE__*/_react.default.createElement(_styles2.ImageContent, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
74
|
+
src: theme.images.general.importMenu,
|
|
75
|
+
alt: ""
|
|
76
|
+
}))), step === 3 && !(actionState !== null && actionState !== void 0 && actionState.loading) && /*#__PURE__*/_react.default.createElement(_styles2.ImportMenuContainer, null, /*#__PURE__*/_react.default.createElement("h2", null, t('YOUR_MENU_HAS_BEEN_IMPORTED', 'Your menu has been imported')), /*#__PURE__*/_react.default.createElement(_styles2.ImageContent, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
77
|
+
src: theme.images.general.importedMenu,
|
|
78
|
+
alt: ""
|
|
79
|
+
})), /*#__PURE__*/_react.default.createElement(_styles2.ButtonWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.Button, {
|
|
80
|
+
color: "primary",
|
|
81
|
+
onClick: function onClick() {
|
|
82
|
+
return handleCheckMenu();
|
|
83
|
+
}
|
|
84
|
+
}, t('CHECK_MENU', 'Check menu')))));
|
|
85
|
+
};
|
|
86
|
+
var ProductStep = function ProductStep(props) {
|
|
87
|
+
var productStepProps = _objectSpread(_objectSpread({}, props), {}, {
|
|
88
|
+
UIComponent: ProductStepUI
|
|
89
|
+
});
|
|
90
|
+
return /*#__PURE__*/_react.default.createElement(_orderingComponentsAdminExternal.ProductStep, productStepProps);
|
|
91
|
+
};
|
|
92
|
+
exports.ProductStep = ProductStep;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ImportMenuContainer = exports.ImageContent = exports.Container = exports.ButtonWrapper = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
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 Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral([""])));
|
|
12
|
+
exports.Container = Container;
|
|
13
|
+
var ImportMenuContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n h2 {\n font-weight: 600;\n font-size: 24px;\n line-height: 36px;\n text-align: center;\n margin: 0;\n }\n"])));
|
|
14
|
+
exports.ImportMenuContainer = ImportMenuContainer;
|
|
15
|
+
var ButtonWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n button {\n height: 44px;\n width: 300px;\n margin-top: 30px;\n border-radius: 8px;\n }\n"])));
|
|
16
|
+
exports.ButtonWrapper = ButtonWrapper;
|
|
17
|
+
var ImageContent = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n"])));
|
|
18
|
+
exports.ImageContent = ImageContent;
|
|
@@ -0,0 +1,104 @@
|
|
|
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.RestaurantSelectGuide = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _reactLoadingSkeleton = _interopRequireDefault(require("react-loading-skeleton"));
|
|
10
|
+
var _orderingComponentsAdminExternal = require("ordering-components-admin-external");
|
|
11
|
+
var _FirstSelect = require("../../../styles/Select/FirstSelect");
|
|
12
|
+
var _reactBootstrapIcons = require("react-bootstrap-icons");
|
|
13
|
+
var _styles = require("../../../styles");
|
|
14
|
+
var _styles2 = require("./styles");
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
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
|
+
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; }
|
|
18
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
19
|
+
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."); }
|
|
20
|
+
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); }
|
|
21
|
+
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; }
|
|
22
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
23
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
24
|
+
var RestaurantSelectGuide = function RestaurantSelectGuide(props) {
|
|
25
|
+
var _configs$google_maps_, _orderingBusiness$add, _configs$country_auto;
|
|
26
|
+
var setBusiness = props.setBusiness,
|
|
27
|
+
businessList = props.businessList,
|
|
28
|
+
setStep = props.setStep,
|
|
29
|
+
onClose = props.onClose,
|
|
30
|
+
handleImport = props.handleImport,
|
|
31
|
+
handleChangeAddress = props.handleChangeAddress,
|
|
32
|
+
orderingBusiness = props.orderingBusiness,
|
|
33
|
+
isLoading = props.isLoading,
|
|
34
|
+
business = props.business;
|
|
35
|
+
var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
|
|
36
|
+
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
37
|
+
t = _useLanguage2[1];
|
|
38
|
+
var _useState = (0, _react.useState)([]),
|
|
39
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
40
|
+
options = _useState2[0],
|
|
41
|
+
setOptions = _useState2[1];
|
|
42
|
+
var _useConfig = (0, _orderingComponentsAdminExternal.useConfig)(),
|
|
43
|
+
_useConfig2 = _slicedToArray(_useConfig, 1),
|
|
44
|
+
configs = _useConfig2[0].configs;
|
|
45
|
+
var googleMapsApiKey = configs === null || configs === void 0 ? void 0 : (_configs$google_maps_ = configs.google_maps_api_key) === null || _configs$google_maps_ === void 0 ? void 0 : _configs$google_maps_.value;
|
|
46
|
+
var handleSubmit = function handleSubmit() {
|
|
47
|
+
setStep(3);
|
|
48
|
+
handleImport();
|
|
49
|
+
};
|
|
50
|
+
var handleSelectBusiness = function handleSelectBusiness(id) {
|
|
51
|
+
var _business = businessList.find(function (item) {
|
|
52
|
+
return item._id === id;
|
|
53
|
+
});
|
|
54
|
+
setBusiness(_business);
|
|
55
|
+
};
|
|
56
|
+
(0, _react.useEffect)(function () {
|
|
57
|
+
var _options = businessList === null || businessList === void 0 ? void 0 : businessList.map(function (item) {
|
|
58
|
+
return {
|
|
59
|
+
value: item._id,
|
|
60
|
+
content: /*#__PURE__*/_react.default.createElement(_styles2.Option, null, item !== null && item !== void 0 && item.logo_photos[0] ? /*#__PURE__*/_react.default.createElement("img", {
|
|
61
|
+
src: item.logo_photos[0],
|
|
62
|
+
alt: ""
|
|
63
|
+
}) : /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Image, null), item.name)
|
|
64
|
+
};
|
|
65
|
+
});
|
|
66
|
+
setOptions(_options);
|
|
67
|
+
}, [businessList]);
|
|
68
|
+
return /*#__PURE__*/_react.default.createElement(_styles2.Container, null, /*#__PURE__*/_react.default.createElement("h2", null, t('SELECT_YOUR_RESTAURANT_FROM_THIS_LIST', 'Select your restaurant from this list.')), /*#__PURE__*/_react.default.createElement(_styles2.SearchWrapper, null, /*#__PURE__*/_react.default.createElement("label", null, t('ADDRESS', 'Address')), /*#__PURE__*/_react.default.createElement(_orderingComponentsAdminExternal.GoogleAutocompleteInput, {
|
|
69
|
+
name: "address",
|
|
70
|
+
className: "input-autocomplete",
|
|
71
|
+
apiKey: googleMapsApiKey,
|
|
72
|
+
placeholder: t('ADDRESS', 'Address'),
|
|
73
|
+
onChangeAddress: function onChangeAddress(e) {
|
|
74
|
+
handleChangeAddress(e);
|
|
75
|
+
},
|
|
76
|
+
defaultValue: (_orderingBusiness$add = orderingBusiness === null || orderingBusiness === void 0 ? void 0 : orderingBusiness.address) !== null && _orderingBusiness$add !== void 0 ? _orderingBusiness$add : '',
|
|
77
|
+
autoComplete: "new-password",
|
|
78
|
+
countryCode: (configs === null || configs === void 0 ? void 0 : (_configs$country_auto = configs.country_autocomplete) === null || _configs$country_auto === void 0 ? void 0 : _configs$country_auto.value) || '*'
|
|
79
|
+
})), isLoading && /*#__PURE__*/_react.default.createElement(_styles2.SelectWrapper, null, /*#__PURE__*/_react.default.createElement("label", null, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
80
|
+
height: 15,
|
|
81
|
+
width: 100
|
|
82
|
+
})), /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
83
|
+
height: 44
|
|
84
|
+
})), !isLoading && (options === null || options === void 0 ? void 0 : options.length) > 0 && /*#__PURE__*/_react.default.createElement(_styles2.SelectWrapper, null, /*#__PURE__*/_react.default.createElement("label", null, t('SELECT_YOUR_RESTAURANT', 'Select your restaurant')), /*#__PURE__*/_react.default.createElement(_FirstSelect.Select, {
|
|
85
|
+
options: options,
|
|
86
|
+
className: "select",
|
|
87
|
+
defaultValue: (business === null || business === void 0 ? void 0 : business._id) || '',
|
|
88
|
+
placeholder: t('SELECT_BUSINESS', 'Select a Business'),
|
|
89
|
+
onChange: function onChange(value) {
|
|
90
|
+
return handleSelectBusiness(value);
|
|
91
|
+
},
|
|
92
|
+
searchBarIsCustomLayout: true,
|
|
93
|
+
searchBarIsNotLazyLoad: true
|
|
94
|
+
})), !isLoading && options.length === 0 && /*#__PURE__*/_react.default.createElement(_styles2.EmptyData, null, t('NO_RESULT', 'There are no results')), /*#__PURE__*/_react.default.createElement(_styles2.ButtonWrapper, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
95
|
+
onClick: function onClick() {
|
|
96
|
+
return onClose();
|
|
97
|
+
}
|
|
98
|
+
}, t('SKIP', 'Skip')), /*#__PURE__*/_react.default.createElement(_styles.Button, {
|
|
99
|
+
color: "primary",
|
|
100
|
+
onClick: handleSubmit,
|
|
101
|
+
disabled: !(business !== null && business !== void 0 && business._id)
|
|
102
|
+
}, t('CONTINUE', 'Continue'), /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.ArrowRight, null))));
|
|
103
|
+
};
|
|
104
|
+
exports.RestaurantSelectGuide = RestaurantSelectGuide;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SelectWrapper = exports.SearchWrapper = exports.Option = exports.EmptyData = exports.Container = exports.ButtonWrapper = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _polished = require("polished");
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
12
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n h2 {\n font-weight: 600;\n font-size: 24px;\n line-height: 36px;\n text-align: center;\n margin: 0;\n }\n"])));
|
|
13
|
+
exports.Container = Container;
|
|
14
|
+
var SelectWrapper = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-top: 30px;\n\n label {\n font-weight: 400;\n font-size: 14px;\n line-height: 24px;\n margin-bottom: 10px;\n }\n\n > div {\n width: 100%;\n border: none;\n\n > div:first-child {\n background-color: ", ";\n height: 43px;\n border: none;\n border-radius: 7.6px;\n font-weight: 400;\n font-size: 14px;\n line-height: 24px;\n color: ", ";\n }\n .list {\n background-color: ", ";\n border: none;\n \n .search-bar-container {\n padding: 10px;\n input {\n background-color: transparent;\n height: 44px;\n }\n }\n\n .list-wrapper {\n max-height: 200px;\n > div {\n padding: 6px 10px;\n &:hover {\n background-color: #f2f5f7;\n }\n }\n }\n }\n }\n"])), function (props) {
|
|
15
|
+
return props.theme.colors.secundary;
|
|
16
|
+
}, function (props) {
|
|
17
|
+
return props.theme.colors.secundaryContrast;
|
|
18
|
+
}, function (props) {
|
|
19
|
+
return props.theme.colors.secundary;
|
|
20
|
+
});
|
|
21
|
+
exports.SelectWrapper = SelectWrapper;
|
|
22
|
+
var Option = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n font-weight: 400;\n font-size: 14px;\n line-height: 24px;\n color: ", ";\n img {\n width: 24px;\n height: 24px;\n border-radius: 7px;\n margin-right: 10px;\n }\n svg {\n font-size: 24px;\n border-radius: 7px;\n margin-right: 10px;\n }\n"])), function (props) {
|
|
23
|
+
return props.theme.colors.secundaryContrast;
|
|
24
|
+
});
|
|
25
|
+
exports.Option = Option;
|
|
26
|
+
var ButtonWrapper = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-top: 60px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n span {\n font-weight: 600;\n font-size: 16px;\n line-height: 24px;\n cursor: pointer;\n }\n button {\n min-width: 300px;\n border-radius: 8px;\n height: 44px;\n position: relative;\n svg {\n position: absolute;\n right: 15px;\n top: 10px;\n font-size: 21px;\n }\n }\n"])));
|
|
27
|
+
exports.ButtonWrapper = ButtonWrapper;
|
|
28
|
+
var SearchWrapper = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n label {\n font-weight: 400;\n font-size: 14px;\n line-height: 24px;\n margin-bottom: 12px;\n }\n input {\n width: 100%;\n height: 44px;\n }\n .input-autocomplete {\n width: 100%;\n background: ", ";\n border: 1px solid ", ";\n border-radius: 8px;\n font-size: 14px;\n padding: 10px 15px;\n outline: none;\n ::placeholder {\n color: ", ";\n }\n\n &:-ms-input-placeholder {\n color: ", ";\n }\n\n &::-ms-input-placeholder { /* Microsoft Edge */\n color: ", ";\n }\n &:focus {\n border-color: ", ";\n }\n }\n"])), function (props) {
|
|
29
|
+
var _props$theme$colors;
|
|
30
|
+
return ((_props$theme$colors = props.theme.colors) === null || _props$theme$colors === void 0 ? void 0 : _props$theme$colors.backgroundPage) || '#FFF';
|
|
31
|
+
}, function (props) {
|
|
32
|
+
return props.theme.colors.borderColor;
|
|
33
|
+
}, function (props) {
|
|
34
|
+
return props.theme.colors.secundaryLight;
|
|
35
|
+
}, function (props) {
|
|
36
|
+
return props.theme.colors.secundaryLight;
|
|
37
|
+
}, function (props) {
|
|
38
|
+
return props.theme.colors.secundaryLight;
|
|
39
|
+
}, function () {
|
|
40
|
+
return (0, _polished.darken)(0.07, '#CCC');
|
|
41
|
+
});
|
|
42
|
+
exports.SearchWrapper = SearchWrapper;
|
|
43
|
+
var EmptyData = _styledComponents.default.p(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n font-weight: 600;\n font-size: 16px;\n line-height: 24px;\n text-align: center;\n margin-top: 30px;\n"])));
|
|
44
|
+
exports.EmptyData = EmptyData;
|
|
@@ -21,6 +21,12 @@ Object.defineProperty(exports, "BusinessActiveStateFilter", {
|
|
|
21
21
|
return _BusinessActiveStateFilter.BusinessActiveStateFilter;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
+
Object.defineProperty(exports, "BusinessAdd", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _BusinessAdd.BusinessAdd;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
24
30
|
Object.defineProperty(exports, "BusinessBrandBUSIDetail", {
|
|
25
31
|
enumerable: true,
|
|
26
32
|
get: function get() {
|
|
@@ -393,6 +399,12 @@ Object.defineProperty(exports, "ImporterJobForm", {
|
|
|
393
399
|
return _ImporterJobForm.ImporterJobForm;
|
|
394
400
|
}
|
|
395
401
|
});
|
|
402
|
+
Object.defineProperty(exports, "ImportersButton", {
|
|
403
|
+
enumerable: true,
|
|
404
|
+
get: function get() {
|
|
405
|
+
return _ImportersButton.ImportersButton;
|
|
406
|
+
}
|
|
407
|
+
});
|
|
396
408
|
Object.defineProperty(exports, "ImportersList", {
|
|
397
409
|
enumerable: true,
|
|
398
410
|
get: function get() {
|
|
@@ -543,6 +555,18 @@ Object.defineProperty(exports, "ProductMetaFields", {
|
|
|
543
555
|
return _ProductMetaFields.ProductMetaFields;
|
|
544
556
|
}
|
|
545
557
|
});
|
|
558
|
+
Object.defineProperty(exports, "ProductStartGuide", {
|
|
559
|
+
enumerable: true,
|
|
560
|
+
get: function get() {
|
|
561
|
+
return _ProductStartGuide.ProductStartGuide;
|
|
562
|
+
}
|
|
563
|
+
});
|
|
564
|
+
Object.defineProperty(exports, "ProductStep", {
|
|
565
|
+
enumerable: true,
|
|
566
|
+
get: function get() {
|
|
567
|
+
return _ProductStep.ProductStep;
|
|
568
|
+
}
|
|
569
|
+
});
|
|
546
570
|
Object.defineProperty(exports, "ProductSummary", {
|
|
547
571
|
enumerable: true,
|
|
548
572
|
get: function get() {
|
|
@@ -567,6 +591,12 @@ Object.defineProperty(exports, "ProductVideos", {
|
|
|
567
591
|
return _ProductVideos.ProductVideos;
|
|
568
592
|
}
|
|
569
593
|
});
|
|
594
|
+
Object.defineProperty(exports, "RestaurantSelectGuide", {
|
|
595
|
+
enumerable: true,
|
|
596
|
+
get: function get() {
|
|
597
|
+
return _RestaurantSelectGuide.RestaurantSelectGuide;
|
|
598
|
+
}
|
|
599
|
+
});
|
|
570
600
|
Object.defineProperty(exports, "SeoOptions", {
|
|
571
601
|
enumerable: true,
|
|
572
602
|
get: function get() {
|
|
@@ -609,6 +639,7 @@ Object.defineProperty(exports, "WizardBusiness", {
|
|
|
609
639
|
return _WizardBusiness.WizardBusiness;
|
|
610
640
|
}
|
|
611
641
|
});
|
|
642
|
+
var _BusinessAdd = require("./BusinessAdd");
|
|
612
643
|
var _BusinessBrandListing = require("./BusinessBrandListing");
|
|
613
644
|
var _BusinessesListing = require("./BusinessesListing");
|
|
614
645
|
var _BusinessProductsListing = require("./BusinessProductsListing");
|
|
@@ -709,4 +740,8 @@ var _BusinessWalletsList = require("./BusinessWalletsList");
|
|
|
709
740
|
var _PaymentOptionMethods = require("./PaymentOptionMethods");
|
|
710
741
|
var _BusinessPublishing = require("./BusinessPublishing");
|
|
711
742
|
var _ServiceDetail = require("./ServiceDetail");
|
|
712
|
-
var _ProductVideos = require("./ProductVideos");
|
|
743
|
+
var _ProductVideos = require("./ProductVideos");
|
|
744
|
+
var _ProductStartGuide = require("./ProductStartGuide");
|
|
745
|
+
var _ImportersButton = require("./ImportersButton");
|
|
746
|
+
var _RestaurantSelectGuide = require("./RestaurantSelectGuide");
|
|
747
|
+
var _ProductStep = require("./ProductStep");
|
|
@@ -15,6 +15,7 @@ var _utils = require("../../../utils");
|
|
|
15
15
|
var _reactLoadingSkeleton = _interopRequireDefault(require("react-loading-skeleton"));
|
|
16
16
|
var _BiImage = _interopRequireDefault(require("@meronex/icons/bi/BiImage"));
|
|
17
17
|
var _reactBootstrapIcons = require("react-bootstrap-icons");
|
|
18
|
+
var _OccupationSelector = require("../OccupationSelector");
|
|
18
19
|
var _styles2 = require("./styles");
|
|
19
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
21
|
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); }
|
|
@@ -48,7 +49,8 @@ var ProfessionalAddFormUI = function ProfessionalAddFormUI(props) {
|
|
|
48
49
|
handlechangeImage = props.handlechangeImage,
|
|
49
50
|
handleChangeSwtich = props.handleChangeSwtich,
|
|
50
51
|
onClose = props.onClose,
|
|
51
|
-
isService = props.isService
|
|
52
|
+
isService = props.isService,
|
|
53
|
+
occupations = props.occupations;
|
|
52
54
|
var formMethods = (0, _reactHookForm.useForm)();
|
|
53
55
|
var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
|
|
54
56
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
@@ -232,7 +234,17 @@ var ProfessionalAddFormUI = function ProfessionalAddFormUI(props) {
|
|
|
232
234
|
src: formState === null || formState === void 0 ? void 0 : (_formState$changes4 = formState.changes) === null || _formState$changes4 === void 0 ? void 0 : _formState$changes4.photo,
|
|
233
235
|
alt: "user image",
|
|
234
236
|
loading: "lazy"
|
|
235
|
-
}), /*#__PURE__*/_react.default.createElement(_styles2.UploadImageIconContainer, null, /*#__PURE__*/_react.default.createElement(_styles2.UploadImageIcon, null, /*#__PURE__*/_react.default.createElement(_BiImage.default, null))))))),
|
|
237
|
+
}), /*#__PURE__*/_react.default.createElement(_styles2.UploadImageIconContainer, null, /*#__PURE__*/_react.default.createElement(_styles2.UploadImageIcon, null, /*#__PURE__*/_react.default.createElement(_BiImage.default, null))))))), /*#__PURE__*/_react.default.createElement(_styles2.InputWrapper, null, /*#__PURE__*/_react.default.createElement("label", null, t('SPECIALIST', 'Specialist')), /*#__PURE__*/_react.default.createElement(_OccupationSelector.OccupationSelector, {
|
|
238
|
+
occupations: occupations,
|
|
239
|
+
handleChangeOccupation: function handleChangeOccupation(id) {
|
|
240
|
+
return handleChangeInput({
|
|
241
|
+
target: {
|
|
242
|
+
name: 'occupation_id',
|
|
243
|
+
value: id
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
})), !(validationFields !== null && validationFields !== void 0 && validationFields.loading) ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (0, _utils.sortInputFields)({
|
|
236
248
|
values: validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie5 = validationFields.fields) === null || _validationFields$fie5 === void 0 ? void 0 : _validationFields$fie5.checkout
|
|
237
249
|
}).map(function (field) {
|
|
238
250
|
var _formState$result5, _formState$result6, _formState$changes$fi, _formState$result7, _formState$result8, _formState$changes$fi2;
|
|
@@ -277,7 +289,8 @@ var ProfessionalAddFormUI = function ProfessionalAddFormUI(props) {
|
|
|
277
289
|
value: 8,
|
|
278
290
|
message: t('VALIDATION_ERROR_PASSWORD_MIN_STRING', 'The Password must be at least 8 characters.').replace('_attribute_', t('PASSWORD', 'Password')).replace('_min_', 8)
|
|
279
291
|
}
|
|
280
|
-
})
|
|
292
|
+
}),
|
|
293
|
+
autoComplete: "new-password"
|
|
281
294
|
})), !!showInputPhoneNumber && /*#__PURE__*/_react.default.createElement(_styles2.InputWrapper, null, /*#__PURE__*/_react.default.createElement("label", null, t('PHONE', 'Phone')), /*#__PURE__*/_react.default.createElement(_Shared.InputPhoneNumber, {
|
|
282
295
|
value: userPhoneNumber,
|
|
283
296
|
setValue: handleChangePhoneNumber,
|
|
@@ -241,7 +241,8 @@ var ProfessionalList = function ProfessionalList(props) {
|
|
|
241
241
|
currentPage: paginationProps.currentPage,
|
|
242
242
|
totalPages: paginationProps.totalPages,
|
|
243
243
|
handleChangePage: handleChangePage,
|
|
244
|
-
handleChangePageSize: handleChangePageSize
|
|
244
|
+
handleChangePageSize: handleChangePageSize,
|
|
245
|
+
defaultPageSize: paginationProps === null || paginationProps === void 0 ? void 0 : paginationProps.pageSize
|
|
245
246
|
})))), /*#__PURE__*/_react.default.createElement(_Shared.ConfirmAdmin, {
|
|
246
247
|
open: confirmAdmin.open,
|
|
247
248
|
onClose: function onClose() {
|