ordering-ui-admin-external 1.42.1 → 1.42.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -41,7 +41,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
41
41
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
42
42
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
43
43
  var UserDetailsUI = exports.UserDetailsUI = function UserDetailsUI(props) {
44
- var _configs$allow_driver, _userState$user, _userState$user2, _userState$user3, _userState$user5, _userState$user7, _userState$user8, _userState$user9, _userState$user10, _userState$user11, _scheduleState$change, _userState$user12, _userState$user13, _userState$user14, _userState$user15, _userState$user16;
44
+ var _configs$allow_driver, _configs$white_label_, _userState$user, _userState$user2, _userState$user3, _userState$user5, _userState$user7, _userState$user8, _userState$user9, _userState$user10, _userState$user11, _scheduleState$change, _userState$user12, _userState$user13, _userState$user14, _userState$user15, _userState$user16;
45
45
  var isDriversPage = props.isDriversPage,
46
46
  isDriversManagersPage = props.isDriversManagersPage,
47
47
  userState = props.userState,
@@ -83,6 +83,7 @@ var UserDetailsUI = exports.UserDetailsUI = function UserDetailsUI(props) {
83
83
  _useConfig2 = _slicedToArray(_useConfig, 1),
84
84
  configs = _useConfig2[0].configs;
85
85
  var disableSchedule = (configs === null || configs === void 0 || (_configs$allow_driver = configs.allow_driver_manager_update_driver_schedule) === null || _configs$allow_driver === void 0 ? void 0 : _configs$allow_driver.value) === '0' && (user === null || user === void 0 ? void 0 : user.level) === 5;
86
+ var isWhiteLabel = configs === null || configs === void 0 || (_configs$white_label_ = configs.white_label_module) === null || _configs$white_label_ === void 0 ? void 0 : _configs$white_label_.value;
86
87
  var expandSidebar = function expandSidebar() {
87
88
  var element = document.getElementById('user_lateral_bar');
88
89
  if (!element) return;
@@ -139,7 +140,7 @@ var UserDetailsUI = exports.UserDetailsUI = function UserDetailsUI(props) {
139
140
  return setIsCustomField(true);
140
141
  },
141
142
  disabled: actionDisabled
142
- }, t('CUSTOM_FIELDS', 'Custom fields')), /*#__PURE__*/_react.default.createElement(_reactBootstrap.Dropdown.Item, {
143
+ }, t('CUSTOM_FIELDS', 'Custom fields')), !isWhiteLabel && /*#__PURE__*/_react.default.createElement(_reactBootstrap.Dropdown.Item, {
143
144
  onClick: function onClick() {
144
145
  return setIsPersonalization(true);
145
146
  },
@@ -171,6 +171,14 @@ var AdvancedSettings = exports.AdvancedSettings = function AdvancedSettings(prop
171
171
  name: t('BUSINESS_HEADER', 'Business header'),
172
172
  type: 'hidden',
173
173
  path: 'business_view.components.header.hidden'
174
+ }, {
175
+ name: t('BUSINESS_HEADER_REVIEWS', 'Business header reviews'),
176
+ type: 'hidden',
177
+ path: 'business_view.components.header.components.business.components.reviews.hidden'
178
+ }, {
179
+ name: t('BUSINESS_POPUP_REVIEWS', 'Business popup reviews'),
180
+ type: 'hidden',
181
+ path: 'business_view.components.header.components.reviews.hidden'
174
182
  }];
175
183
  var businessInfoList = [{
176
184
  name: t('DESCRIPTION', 'Description'),
@@ -30,7 +30,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
30
30
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
31
31
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
32
32
  var BusinessFrontLayout = exports.BusinessFrontLayout = function BusinessFrontLayout(props) {
33
- var _configState$configs;
33
+ var _configState$configs, _configState$configs2;
34
34
  var formState = props.formState,
35
35
  handleUpdateBusinessClick = props.handleUpdateBusinessClick,
36
36
  business = props.business,
@@ -41,7 +41,8 @@ var BusinessFrontLayout = exports.BusinessFrontLayout = function BusinessFrontLa
41
41
  var _useConfig = (0, _orderingComponentsAdminExternal.useConfig)(),
42
42
  _useConfig2 = _slicedToArray(_useConfig, 1),
43
43
  configState = _useConfig2[0];
44
- var useParentCategory = configState === null || configState === void 0 || (_configState$configs = configState.configs) === null || _configState$configs === void 0 || (_configState$configs = _configState$configs.use_parent_category) === null || _configState$configs === void 0 ? void 0 : _configState$configs.value;
44
+ var isWhiteLabel = configState === null || configState === void 0 || (_configState$configs = configState.configs) === null || _configState$configs === void 0 || (_configState$configs = _configState$configs.white_label_module) === null || _configState$configs === void 0 ? void 0 : _configState$configs.value;
45
+ var useParentCategory = configState === null || configState === void 0 || (_configState$configs2 = configState.configs) === null || _configState$configs2 === void 0 || (_configState$configs2 = _configState$configs2.use_parent_category) === null || _configState$configs2 === void 0 ? void 0 : _configState$configs2.value;
45
46
  var _useState = (0, _react.useState)(''),
46
47
  _useState2 = _slicedToArray(_useState, 2),
47
48
  selectedOption = _useState2[0],
@@ -94,7 +95,7 @@ var BusinessFrontLayout = exports.BusinessFrontLayout = function BusinessFrontLa
94
95
  key: i
95
96
  });
96
97
  })));
97
- })))), /*#__PURE__*/_react.default.createElement(_styles2.LayoutBoxFooter, null)), /*#__PURE__*/_react.default.createElement(_styles2.LayoutTitle, null, t('GROCERIES', 'Groceries')))), /*#__PURE__*/_react.default.createElement(_styles2.SendCustomLayoutWrapper, null, /*#__PURE__*/_react.default.createElement("p", null, t('SEND_CUSTOM_LAYOUT_IDEA_DESCRIPTION', 'Would you like another kind of layout for your business menu? Send us your idea! We will take at it and help you make your idea a reality.')), /*#__PURE__*/_react.default.createElement(_styles.Button, {
98
+ })))), /*#__PURE__*/_react.default.createElement(_styles2.LayoutBoxFooter, null)), /*#__PURE__*/_react.default.createElement(_styles2.LayoutTitle, null, t('GROCERIES', 'Groceries')))), !isWhiteLabel && /*#__PURE__*/_react.default.createElement(_styles2.SendCustomLayoutWrapper, null, /*#__PURE__*/_react.default.createElement("p", null, t('SEND_CUSTOM_LAYOUT_IDEA_DESCRIPTION', 'Would you like another kind of layout for your business menu? Send us your idea! We will take at it and help you make your idea a reality.')), /*#__PURE__*/_react.default.createElement(_styles.Button, {
98
99
  outline: true,
99
100
  borderRadius: "8px",
100
101
  color: "primary",
@@ -28,7 +28,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
28
28
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
29
29
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
30
30
  var BusinessPreview = exports.BusinessPreview = function BusinessPreview(props) {
31
- var _theme$images, _sessionState$user, _sessionState$user2, _orderState$options, _business$reviews, _business$reviews2, _theme$images2, _theme$images3, _orderState$options2, _business$reviews3, _business$reviews4, _business$categories, _selectedCategory$pro, _business$categories2;
31
+ var _configs$white_label_, _theme$images, _sessionState$user, _sessionState$user2, _orderState$options, _business$reviews, _business$reviews2, _theme$images2, _theme$images3, _orderState$options2, _business$reviews3, _business$reviews4, _business$categories, _selectedCategory$pro, _business$categories2;
32
32
  var business = props.business,
33
33
  isMobileView = props.isMobileView;
34
34
  var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
@@ -41,6 +41,9 @@ var BusinessPreview = exports.BusinessPreview = function BusinessPreview(props)
41
41
  var _useOrder = (0, _orderingComponentsAdminExternal.useOrder)(),
42
42
  _useOrder2 = _slicedToArray(_useOrder, 1),
43
43
  orderState = _useOrder2[0];
44
+ var _useConfig = (0, _orderingComponentsAdminExternal.useConfig)(),
45
+ _useConfig2 = _slicedToArray(_useConfig, 1),
46
+ configs = _useConfig2[0].configs;
44
47
  var _useWindowSize = (0, _useWindowSize2.useWindowSize)(),
45
48
  width = _useWindowSize.width;
46
49
  var _useUtils = (0, _orderingComponentsAdminExternal.useUtils)(),
@@ -59,6 +62,7 @@ var BusinessPreview = exports.BusinessPreview = function BusinessPreview(props)
59
62
  _useState4 = _slicedToArray(_useState3, 2),
60
63
  selectedCategory = _useState4[0],
61
64
  setSelectedCateogry = _useState4[1];
65
+ var isWhiteLabel = configs === null || configs === void 0 || (_configs$white_label_ = configs.white_label_module) === null || _configs$white_label_ === void 0 ? void 0 : _configs$white_label_.value;
62
66
  var pos = {
63
67
  top: 0,
64
68
  left: 0,
@@ -125,7 +129,7 @@ var BusinessPreview = exports.BusinessPreview = function BusinessPreview(props)
125
129
  src: theme.images.general.mobileMask,
126
130
  id: "product_mobile_view",
127
131
  onMouseDown: mouseDownHandler
128
- }, !isMobileView && width > 650 && /*#__PURE__*/_react.default.createElement(_styles2.Contentheader, null, /*#__PURE__*/_react.default.createElement(_styles2.HeaderLogo, null, /*#__PURE__*/_react.default.createElement("img", {
132
+ }, !isMobileView && width > 650 && /*#__PURE__*/_react.default.createElement(_styles2.Contentheader, null, !isWhiteLabel && /*#__PURE__*/_react.default.createElement(_styles2.HeaderLogo, null, /*#__PURE__*/_react.default.createElement("img", {
129
133
  alt: "Logotype",
130
134
  width: "100px",
131
135
  height: "30px",
@@ -257,9 +261,9 @@ var SingleProductCard = function SingleProductCard(props) {
257
261
  var _useLanguage5 = (0, _orderingComponentsAdminExternal.useLanguage)(),
258
262
  _useLanguage6 = _slicedToArray(_useLanguage5, 2),
259
263
  t = _useLanguage6[1];
260
- var _useConfig = (0, _orderingComponentsAdminExternal.useConfig)(),
261
- _useConfig2 = _slicedToArray(_useConfig, 1),
262
- stateConfig = _useConfig2[0];
264
+ var _useConfig3 = (0, _orderingComponentsAdminExternal.useConfig)(),
265
+ _useConfig4 = _slicedToArray(_useConfig3, 1),
266
+ stateConfig = _useConfig4[0];
263
267
  var _useOrder3 = (0, _orderingComponentsAdminExternal.useOrder)(),
264
268
  _useOrder4 = _slicedToArray(_useOrder3, 1),
265
269
  orderState = _useOrder4[0];
@@ -251,7 +251,7 @@ var BusinessSummary = exports.BusinessSummary = function BusinessSummary(props)
251
251
  }) : businessConfigs.filter(function (c) {
252
252
  return !itemsExcluded.includes(c.key);
253
253
  })).filter(function (item) {
254
- return isEnabledWhiteLabelModule ? item.key !== 'personalization' : true;
254
+ return isEnabledWhiteLabelModule ? !['personalization', 'sales_channels'].includes(item.key) : true;
255
255
  }).map(function (config) {
256
256
  return /*#__PURE__*/_react.default.createElement(_styles2.BusinessConfigItem, {
257
257
  key: config.key,
@@ -32,7 +32,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
32
32
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
33
33
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
34
34
  var ProductSummary = exports.ProductSummary = function ProductSummary(props) {
35
- var _productState$product5, _productState$product6, _productState$product7, _productState$product8, _productState$product9, _productState$product10, _productState$product11, _productState$product12, _productState$product13, _productState$product14, _productState$product15, _productState$product16, _productState$product17, _productState$product18, _productState$product19, _productState$product20, _productState$product21, _productState$product22, _productState$product23, _productState$product24, _productState$product25;
35
+ var _configs$white_label_, _productState$product5, _productState$product6, _productState$product7, _productState$product8, _productState$product9, _productState$product10, _productState$product11, _productState$product12, _productState$product13, _productState$product14, _productState$product15, _productState$product16, _productState$product17, _productState$product18, _productState$product19, _productState$product20, _productState$product21, _productState$product22, _productState$product23, _productState$product24, _productState$product25;
36
36
  var actionSidebar = props.actionSidebar,
37
37
  showOption = props.showOption,
38
38
  handleShowOption = props.handleShowOption,
@@ -53,6 +53,9 @@ var ProductSummary = exports.ProductSummary = function ProductSummary(props) {
53
53
  _useUtils2$ = _useUtils2[0],
54
54
  optimizeImage = _useUtils2$.optimizeImage,
55
55
  parsePrice = _useUtils2$.parsePrice;
56
+ var _useConfig = (0, _orderingComponentsAdminExternal.useConfig)(),
57
+ _useConfig2 = _slicedToArray(_useConfig, 1),
58
+ configs = _useConfig2[0].configs;
56
59
  var _useState = (0, _react.useState)(false),
57
60
  _useState2 = _slicedToArray(_useState, 2),
58
61
  isEditMode = _useState2[0],
@@ -73,6 +76,7 @@ var ProductSummary = exports.ProductSummary = function ProductSummary(props) {
73
76
  _useState8 = _slicedToArray(_useState7, 2),
74
77
  selectedView = _useState8[0],
75
78
  setSelectedView = _useState8[1];
79
+ var isWhiteLabel = configs === null || configs === void 0 || (_configs$white_label_ = configs.white_label_module) === null || _configs$white_label_ === void 0 ? void 0 : _configs$white_label_.value;
76
80
  var productConfigOptions = [{
77
81
  key: 'product_details',
78
82
  value: t('PRODUCT_DETAILS', 'Product details')
@@ -170,7 +174,7 @@ var ProductSummary = exports.ProductSummary = function ProductSummary(props) {
170
174
  onClick: function onClick() {
171
175
  return handleShowOption('custom_fields');
172
176
  }
173
- }, t('CUSTOM_FIELDS', 'Custom fields')), /*#__PURE__*/_react.default.createElement(_reactBootstrap.Dropdown.Item, {
177
+ }, t('CUSTOM_FIELDS', 'Custom fields')), !isWhiteLabel && /*#__PURE__*/_react.default.createElement(_reactBootstrap.Dropdown.Item, {
174
178
  onClick: function onClick() {
175
179
  return handleShowOption('personalization');
176
180
  }
@@ -37,7 +37,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
37
37
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
38
38
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
39
39
  var ProfessionalDetailUI = exports.ProfessionalDetailUI = function ProfessionalDetailUI(props) {
40
- var _userState$user, _userState$user2, _userState$user3, _adminUserState$user, _userState$user4, _adminUserState$user2, _userState$user5;
40
+ var _configs$white_label_, _userState$user, _userState$user2, _userState$user3, _adminUserState$user, _userState$user4, _adminUserState$user2, _userState$user5;
41
41
  var userState = props.userState,
42
42
  occupations = props.occupations,
43
43
  setExtraOpen = props.setExtraOpen,
@@ -54,6 +54,9 @@ var ProfessionalDetailUI = exports.ProfessionalDetailUI = function ProfessionalD
54
54
  var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
55
55
  _useLanguage2 = _slicedToArray(_useLanguage, 2),
56
56
  t = _useLanguage2[1];
57
+ var _useConfig = (0, _orderingComponentsAdminExternal.useConfig)(),
58
+ _useConfig2 = _slicedToArray(_useConfig, 1),
59
+ configs = _useConfig2[0].configs;
57
60
  var _useWindowSize = (0, _useWindowSize2.useWindowSize)(),
58
61
  width = _useWindowSize.width;
59
62
  var _useState = (0, _react.useState)('profile'),
@@ -83,6 +86,7 @@ var ProfessionalDetailUI = exports.ProfessionalDetailUI = function ProfessionalD
83
86
  _useState10 = _slicedToArray(_useState9, 2),
84
87
  isExpand = _useState10[0],
85
88
  setIsExpand = _useState10[1];
89
+ var isWhiteLabel = configs === null || configs === void 0 || (_configs$white_label_ = configs.white_label_module) === null || _configs$white_label_ === void 0 ? void 0 : _configs$white_label_.value;
86
90
  var onDeleteCustomer = function onDeleteCustomer() {
87
91
  setConfirm({
88
92
  open: true,
@@ -170,7 +174,7 @@ var ProfessionalDetailUI = exports.ProfessionalDetailUI = function ProfessionalD
170
174
  onClick: function onClick() {
171
175
  return handleOpenExtra('custom_fields');
172
176
  }
173
- }, t('CUSTOM_FIELDS', 'Custom fields')), /*#__PURE__*/_react.default.createElement(_reactBootstrap.Dropdown.Item, {
177
+ }, t('CUSTOM_FIELDS', 'Custom fields')), !isWhiteLabel && /*#__PURE__*/_react.default.createElement(_reactBootstrap.Dropdown.Item, {
174
178
  onClick: function onClick() {
175
179
  return handleOpenExtra('personalization');
176
180
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-admin-external",
3
- "version": "1.42.1",
3
+ "version": "1.42.3",
4
4
  "description": "Ordering UI Admin Components",
5
5
  "main": "./_modules/index.js",
6
6
  "exports": {
@@ -55,7 +55,7 @@ export const UserDetailsUI = (props) => {
55
55
  const [isExpand, setIsExpand] = useState(false)
56
56
  const [{ configs }] = useConfig()
57
57
  const disableSchedule = configs?.allow_driver_manager_update_driver_schedule?.value === '0' && user?.level === 5
58
-
58
+ const isWhiteLabel = configs?.white_label_module?.value
59
59
  const expandSidebar = () => {
60
60
  const element = document.getElementById('user_lateral_bar')
61
61
  if (!element) return
@@ -126,9 +126,11 @@ export const UserDetailsUI = (props) => {
126
126
  <Dropdown.Item onClick={() => setIsCustomField(true)} disabled={actionDisabled}>
127
127
  {t('CUSTOM_FIELDS', 'Custom fields')}
128
128
  </Dropdown.Item>
129
- <Dropdown.Item onClick={() => setIsPersonalization(true)} disabled={actionDisabled}>
130
- {t('PERSONALIZATION', 'Personalization')}
131
- </Dropdown.Item>
129
+ {!isWhiteLabel && (
130
+ <Dropdown.Item onClick={() => setIsPersonalization(true)} disabled={actionDisabled}>
131
+ {t('PERSONALIZATION', 'Personalization')}
132
+ </Dropdown.Item>
133
+ )}
132
134
  <Dropdown.Item onClick={() => handleDeleteUser(userState.user?.id)} disabled={actionDisabled}>
133
135
  {t('DELETE', 'Delete')}
134
136
  </Dropdown.Item>
@@ -72,7 +72,10 @@ export const AdvancedSettings = (props) => {
72
72
  { name: t('SEARCH', 'Search'), type: 'hidden', path: 'business_view.components.reviews.components.search.hidden' },
73
73
  { name: t('BUSINESS_LOGO', 'Business logo'), type: 'hidden', path: 'business_view.components.header.components.logo.hidden' },
74
74
  { name: t('BUSINESS_INFO_ICON', 'Business info icon'), type: 'hidden', path: 'business_view.components.header.components.business_info.hidden' },
75
- { name: t('BUSINESS_HEADER', 'Business header'), type: 'hidden', path: 'business_view.components.header.hidden' }
75
+ { name: t('BUSINESS_HEADER', 'Business header'), type: 'hidden', path: 'business_view.components.header.hidden' },
76
+ { name: t('BUSINESS_HEADER_REVIEWS', 'Business header reviews'), type: 'hidden', path: 'business_view.components.header.components.business.components.reviews.hidden' },
77
+ { name: t('BUSINESS_POPUP_REVIEWS', 'Business popup reviews'), type: 'hidden', path: 'business_view.components.header.components.reviews.hidden' }
78
+
76
79
  ]
77
80
 
78
81
  const businessInfoList = [
@@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react'
2
2
  import { useLanguage, useConfig } from 'ordering-components-admin-external'
3
3
  import AiOutlineShoppingCart from '@meronex/icons/ai/AiOutlineShoppingCart'
4
4
  import BsCardImage from '@meronex/icons/bs/BsCardImage'
5
+
5
6
  import { Button } from '../../../styles'
6
7
  import {
7
8
  BusinessFrontLayoutContainer,
@@ -50,6 +51,7 @@ export const BusinessFrontLayout = (props) => {
50
51
 
51
52
  const [, t] = useLanguage()
52
53
  const [configState] = useConfig()
54
+ const isWhiteLabel = configState?.configs?.white_label_module?.value
53
55
 
54
56
  const useParentCategory = configState?.configs?.use_parent_category?.value
55
57
  const [selectedOption, setSelectedOption] = useState('')
@@ -200,17 +202,19 @@ export const BusinessFrontLayout = (props) => {
200
202
  </LayoutBoxWrapper>
201
203
  )}
202
204
  </LayoutContentWrappper>
203
- <SendCustomLayoutWrapper>
204
- <p>{t('SEND_CUSTOM_LAYOUT_IDEA_DESCRIPTION', 'Would you like another kind of layout for your business menu? Send us your idea! We will take at it and help you make your idea a reality.')}</p>
205
- <Button
206
- outline
207
- borderRadius='8px'
208
- color='primary'
209
- onClick={() => window.open('https://www.ordering.co/quote-project-request', '_blank')}
210
- >
211
- {t('SEND_CUSTOM_LAYOUT_IDEA', 'Send custom layout idea')}
212
- </Button>
213
- </SendCustomLayoutWrapper>
205
+ {!isWhiteLabel && (
206
+ <SendCustomLayoutWrapper>
207
+ <p>{t('SEND_CUSTOM_LAYOUT_IDEA_DESCRIPTION', 'Would you like another kind of layout for your business menu? Send us your idea! We will take at it and help you make your idea a reality.')}</p>
208
+ <Button
209
+ outline
210
+ borderRadius='8px'
211
+ color='primary'
212
+ onClick={() => window.open('https://www.ordering.co/quote-project-request', '_blank')}
213
+ >
214
+ {t('SEND_CUSTOM_LAYOUT_IDEA', 'Send custom layout idea')}
215
+ </Button>
216
+ </SendCustomLayoutWrapper>
217
+ )}
214
218
  </BusinessFrontLayoutContainer>
215
219
  <ActionButtonWrapper>
216
220
  <Button color='primary' onClick={handleSaveLayout}>{t('SAVE', 'Save')}</Button>
@@ -64,10 +64,12 @@ export const BusinessPreview = (props) => {
64
64
  const theme = useTheme()
65
65
  const [sessionState] = useSession()
66
66
  const [orderState] = useOrder()
67
+ const [{ configs }] = useConfig()
67
68
  const { width } = useWindowSize()
68
69
  const [{ parsePrice, parseDistance, optimizeImage }] = useUtils()
69
70
  const [searchValue, setSearchValue] = useState('')
70
71
  const [selectedCategory, setSelectedCateogry] = useState({ id: 'all' })
72
+ const isWhiteLabel = configs?.white_label_module?.value
71
73
 
72
74
  let pos = { top: 0, left: 0, x: 0, y: 0 }
73
75
  const ele = document.getElementById('product_mobile_view')
@@ -146,9 +148,11 @@ export const BusinessPreview = (props) => {
146
148
  {
147
149
  (!isMobileView && width > 650) && (
148
150
  <Contentheader>
149
- <HeaderLogo>
150
- <img alt='Logotype' width='100px' height='30px' src={theme?.images?.logos?.logotype} loading='lazy' />
151
- </HeaderLogo>
151
+ {!isWhiteLabel && (
152
+ <HeaderLogo>
153
+ <img alt='Logotype' width='100px' height='30px' src={theme?.images?.logos?.logotype} loading='lazy' />
154
+ </HeaderLogo>
155
+ )}
152
156
  <HeaderInfo>
153
157
  <AddressWrapper>
154
158
  <GeoAlt />
@@ -299,7 +299,7 @@ export const BusinessSummary = (props) => {
299
299
  ? businessConfigs
300
300
  : businessConfigs.filter(configs => configs.key !== 'spoonity_key')
301
301
  : businessConfigs.filter(c => !itemsExcluded.includes(c.key))
302
- ).filter(item => isEnabledWhiteLabelModule ? item.key !== 'personalization' : true).map(config => (
302
+ ).filter(item => isEnabledWhiteLabelModule ? !['personalization', 'sales_channels'].includes(item.key) : true).map(config => (
303
303
  <BusinessConfigItem
304
304
  key={config.key}
305
305
  active={selectedItem === config.key}
@@ -356,4 +356,4 @@ export const BusinessSummary = (props) => {
356
356
  </Modal>
357
357
  </>
358
358
  )
359
- }
359
+ }
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from 'react'
2
- import { useLanguage, useUtils } from 'ordering-components-admin-external'
2
+ import { useConfig, useLanguage, useUtils } from 'ordering-components-admin-external'
3
3
  import BsChevronRight from '@meronex/icons/bs/BsChevronRight'
4
4
  import BiImage from '@meronex/icons/bi/BiImage'
5
5
  import { XLg, ThreeDots, Laptop, Phone, ArrowsAngleContract, ArrowsAngleExpand } from 'react-bootstrap-icons'
@@ -51,11 +51,13 @@ export const ProductSummary = (props) => {
51
51
  const [, t] = useLanguage()
52
52
  const theme = useTheme()
53
53
  const [{ optimizeImage, parsePrice }] = useUtils()
54
+ const [{ configs }] = useConfig()
54
55
 
55
56
  const [isEditMode, setIsEditMode] = useState(false)
56
57
  const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
57
58
  const [isProductPreview, setIsProductPreview] = useState(false)
58
59
  const [selectedView, setSelectedView] = useState('desktop')
60
+ const isWhiteLabel = configs?.white_label_module?.value
59
61
 
60
62
  const productConfigOptions = [
61
63
  {
@@ -181,11 +183,13 @@ export const ProductSummary = (props) => {
181
183
  >
182
184
  {t('CUSTOM_FIELDS', 'Custom fields')}
183
185
  </Dropdown.Item>
184
- <Dropdown.Item
185
- onClick={() => handleShowOption('personalization')}
186
- >
187
- {t('PERSONALIZATION', 'Personalization')}
188
- </Dropdown.Item>
186
+ {!isWhiteLabel && (
187
+ <Dropdown.Item
188
+ onClick={() => handleShowOption('personalization')}
189
+ >
190
+ {t('PERSONALIZATION', 'Personalization')}
191
+ </Dropdown.Item>
192
+ )}
189
193
  <Dropdown.Item
190
194
  onClick={() => handleDeleteClick()}
191
195
  >
@@ -4,7 +4,7 @@ import Skeleton from 'react-loading-skeleton'
4
4
  import { ThreeDots, Calendar4Event, ArrowsAngleContract, ArrowsAngleExpand } from 'react-bootstrap-icons'
5
5
  import { Dropdown, DropdownButton } from 'react-bootstrap'
6
6
  import { useTheme } from 'styled-components'
7
- import { useLanguage, useSession, UserDetails as UserDetailsController } from 'ordering-components-admin-external'
7
+ import { useLanguage, useSession, UserDetails as UserDetailsController, useConfig } from 'ordering-components-admin-external'
8
8
  import { Confirm, Personalization, SideBar, Alert } from '../../Shared'
9
9
  import { UserDetailsMenu } from '../UserDetailsMenu'
10
10
  import { UserProfileForm } from '../UserProfileForm'
@@ -40,12 +40,14 @@ export const ProfessionalDetailUI = (props) => {
40
40
  const theme = useTheme()
41
41
  const [adminUserState] = useSession()
42
42
  const [, t] = useLanguage()
43
+ const [{ configs }] = useConfig()
43
44
  const { width } = useWindowSize()
44
45
  const [currentMenuSelected, setCurrentMenuSelected] = useState('profile')
45
46
  const [extraSelected, setExtraSelected] = useState(null)
46
47
  const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
47
48
  const [alertState, setAlertState] = useState({ open: false, content: [] })
48
49
  const [isExpand, setIsExpand] = useState(false)
50
+ const isWhiteLabel = configs?.white_label_module?.value
49
51
 
50
52
  const onDeleteCustomer = () => {
51
53
  setConfirm({
@@ -157,9 +159,11 @@ export const ProfessionalDetailUI = (props) => {
157
159
  <Dropdown.Item onClick={() => handleOpenExtra('custom_fields')}>
158
160
  {t('CUSTOM_FIELDS', 'Custom fields')}
159
161
  </Dropdown.Item>
160
- <Dropdown.Item onClick={() => handleOpenExtra('personalization')}>
161
- {t('PERSONALIZATION', 'Personalization')}
162
- </Dropdown.Item>
162
+ {!isWhiteLabel && (
163
+ <Dropdown.Item onClick={() => handleOpenExtra('personalization')}>
164
+ {t('PERSONALIZATION', 'Personalization')}
165
+ </Dropdown.Item>
166
+ )}
163
167
  {adminUserState?.user?.level === 0 && (
164
168
  <Dropdown.Item onClick={() => onDeleteCustomer()}>
165
169
  {t('DELETE', 'Delete')}