ordering-ui-admin-external 1.38.0 → 1.38.2

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.
@@ -209,17 +209,7 @@ var DeliveriesLocation = function DeliveriesLocation(props) {
209
209
  return handleMapChange(data);
210
210
  },
211
211
  yesIWantToUseGoogleMapApiInternals: true
212
- }, interActionMapOrder === null && driversList.drivers.length !== 0 && driversList.drivers.filter(function (driver) {
213
- return driver === null || driver === void 0 ? void 0 : driver.enabled;
214
- }).map(function (driver) {
215
- var _driver$location5, _driver$location6, _driver$location7, _driver$location8;
216
- return /*#__PURE__*/_react.default.createElement(_DriverMapMarkerAndInfo.DriverMapMarkerAndInfo, {
217
- key: driver.id,
218
- driver: driver,
219
- lat: driver.location !== null && _typeof(driver.location) === 'object' && (_driver$location5 = driver.location) !== null && _driver$location5 !== void 0 && _driver$location5.lat ? driver.location.lat : typeof driver.location === 'string' ? parseFloat(driver === null || driver === void 0 || (_driver$location6 = driver.location) === null || _driver$location6 === void 0 ? void 0 : _driver$location6.split(',')[0].replace(/[^-.0-9]/g, '')) : defaultCenter.lat,
220
- lng: driver.location !== null && _typeof(driver.location) === 'object' && (_driver$location7 = driver.location) !== null && _driver$location7 !== void 0 && _driver$location7.lng ? driver.location.lng : typeof driver.location === 'string' ? parseFloat(driver === null || driver === void 0 || (_driver$location8 = driver.location) === null || _driver$location8 === void 0 ? void 0 : _driver$location8.split(',')[1].replace(/[^-.0-9]/g, '')) : defaultCenter.lng
221
- });
222
- }), interActionMapOrder !== null && /*#__PURE__*/_react.default.createElement(_InterActOrderMarker.InterActOrderMarker, {
212
+ }, interActionMapOrder !== null && /*#__PURE__*/_react.default.createElement(_InterActOrderMarker.InterActOrderMarker, {
223
213
  business: interActionMapOrder === null || interActionMapOrder === void 0 ? void 0 : interActionMapOrder.business,
224
214
  lat: interActionMapOrder === null || interActionMapOrder === void 0 || (_interActionMapOrder$6 = interActionMapOrder.business) === null || _interActionMapOrder$6 === void 0 || (_interActionMapOrder$6 = _interActionMapOrder$6.location) === null || _interActionMapOrder$6 === void 0 ? void 0 : _interActionMapOrder$6.lat,
225
215
  lng: interActionMapOrder === null || interActionMapOrder === void 0 || (_interActionMapOrder$7 = interActionMapOrder.business) === null || _interActionMapOrder$7 === void 0 || (_interActionMapOrder$7 = _interActionMapOrder$7.location) === null || _interActionMapOrder$7 === void 0 ? void 0 : _interActionMapOrder$7.lng,
@@ -235,12 +225,12 @@ var DeliveriesLocation = function DeliveriesLocation(props) {
235
225
  lng: interActionOrderDriverLocation !== null && _typeof(interActionOrderDriverLocation) === 'object' && interActionOrderDriverLocation !== null && interActionOrderDriverLocation !== void 0 && interActionOrderDriverLocation.lng ? interActionOrderDriverLocation.lng : typeof interActionOrderDriverLocation === 'string' ? parseFloat(interActionOrderDriverLocation === null || interActionOrderDriverLocation === void 0 ? void 0 : interActionOrderDriverLocation.split(',')[1].replace(/[^-.0-9]/g, '')) : defaultCenter.lng,
236
226
  image: interActionMapOrder === null || interActionMapOrder === void 0 || (_interActionMapOrder$14 = interActionMapOrder.driver) === null || _interActionMapOrder$14 === void 0 ? void 0 : _interActionMapOrder$14.photo
237
227
  }), interActionMapOrder !== null && (interActionMapOrder === null || interActionMapOrder === void 0 ? void 0 : interActionMapOrder.driver) === null && activeDrivers.length > 0 && activeDrivers.map(function (driver) {
238
- var _driver$location9, _driver$location10, _driver$location11, _driver$location12;
228
+ var _driver$location5, _driver$location6, _driver$location7, _driver$location8;
239
229
  return /*#__PURE__*/_react.default.createElement(_InterActOrderMarker.InterActOrderMarker, {
240
230
  key: driver.id,
241
231
  driver: driver,
242
- lat: driver.location !== null && _typeof(driver.location) === 'object' && (_driver$location9 = driver.location) !== null && _driver$location9 !== void 0 && _driver$location9.lat ? driver.location.lat : typeof driver.location === 'string' ? parseFloat(driver === null || driver === void 0 || (_driver$location10 = driver.location) === null || _driver$location10 === void 0 ? void 0 : _driver$location10.split(',')[0].replace(/[^-.0-9]/g, '')) : defaultCenter.lat,
243
- lng: driver.location !== null && _typeof(driver.location) === 'object' && (_driver$location11 = driver.location) !== null && _driver$location11 !== void 0 && _driver$location11.lng ? driver.location.lng : typeof driver.location === 'string' ? parseFloat(driver === null || driver === void 0 || (_driver$location12 = driver.location) === null || _driver$location12 === void 0 ? void 0 : _driver$location12.split(',')[1].replace(/[^-.0-9]/g, '')) : defaultCenter.lng,
232
+ lat: driver.location !== null && _typeof(driver.location) === 'object' && (_driver$location5 = driver.location) !== null && _driver$location5 !== void 0 && _driver$location5.lat ? driver.location.lat : typeof driver.location === 'string' ? parseFloat(driver === null || driver === void 0 || (_driver$location6 = driver.location) === null || _driver$location6 === void 0 ? void 0 : _driver$location6.split(',')[0].replace(/[^-.0-9]/g, '')) : defaultCenter.lat,
233
+ lng: driver.location !== null && _typeof(driver.location) === 'object' && (_driver$location7 = driver.location) !== null && _driver$location7 !== void 0 && _driver$location7.lng ? driver.location.lng : typeof driver.location === 'string' ? parseFloat(driver === null || driver === void 0 || (_driver$location8 = driver.location) === null || _driver$location8 === void 0 ? void 0 : _driver$location8.split(',')[1].replace(/[^-.0-9]/g, '')) : defaultCenter.lng,
244
234
  image: driver === null || driver === void 0 ? void 0 : driver.photo
245
235
  });
246
236
  })), interActionMapOrder !== null && (interActionMapOrder === null || interActionMapOrder === void 0 ? void 0 : interActionMapOrder.driver) === null && activeDrivers.length > 0 && /*#__PURE__*/_react.default.createElement(_styles.WrapperOnlineDrivers, null, /*#__PURE__*/_react.default.createElement("p", null, t('ACTIVE_DRIVERS', 'Drivers online')), /*#__PURE__*/_react.default.createElement(_styles.OnlineDrivers, null, /*#__PURE__*/_react.default.createElement(_Shared.AutoScroll, {
@@ -25,6 +25,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
25
25
  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; } }
26
26
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
27
27
  var DriverSelectorUI = function DriverSelectorUI(props) {
28
+ var _configs$manual_drive;
28
29
  var driverActionStatus = props.driverActionStatus,
29
30
  companyActionStatus = props.companyActionStatus,
30
31
  isFirstSelect = props.isFirstSelect,
@@ -55,12 +56,16 @@ var DriverSelectorUI = function DriverSelectorUI(props) {
55
56
  _useState6 = _slicedToArray(_useState5, 2),
56
57
  searchValue = _useState6[0],
57
58
  setSearchValue = _useState6[1];
59
+ var _useConfig = (0, _orderingComponentsAdminExternal.useConfig)(),
60
+ _useConfig2 = _slicedToArray(_useConfig, 1),
61
+ configs = _useConfig2[0].configs;
58
62
  var driversLoading = [{
59
63
  value: 'default',
60
64
  content: /*#__PURE__*/_react.default.createElement(_styles.Option, {
61
65
  small: small
62
66
  }, /*#__PURE__*/_react.default.createElement("span", null, t('LOADING', 'loading'), "..."))
63
67
  }];
68
+ var showDriverAssignmentComment = (configs === null || configs === void 0 || (_configs$manual_drive = configs.manual_driver_assignment_comment_enabled) === null || _configs$manual_drive === void 0 ? void 0 : _configs$manual_drive.value) === '1';
64
69
  var getOption = function getOption(driver) {
65
70
  var _theme$images$icons;
66
71
  return {
@@ -165,7 +170,7 @@ var DriverSelectorUI = function DriverSelectorUI(props) {
165
170
  if (driverId === 'remove') {
166
171
  driverId = null;
167
172
  }
168
- if (driverId && setCommentInfostate) {
173
+ if (driverId && setCommentInfostate && showDriverAssignmentComment) {
169
174
  setCommentInfostate({
170
175
  open: true,
171
176
  driverId: driverId
@@ -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 OrderContactInformation = function OrderContactInformation(props) {
33
- var _configs$google_maps_, _ref, _order$business, _order$business2, _order$business3, _order$business4, _order$business5, _order$business6, _order$business7, _order$business8, _order$business9, _order$business10, _order$business11, _order$business12, _order$business13, _order$business14, _order$business15, _order$customer, _order$customer2, _order$customer3, _order$customer4, _order$customer5, _order$customer6, _order$customer7, _order$customer8, _order$customer9, _order$customer10, _order$customer11, _order$customer12, _order$customer13, _ref2, _customerInfoState$cu, _customerInfoState$cu2, _order$customer17, _ref3, _customerInfoState$cu3, _customerInfoState$cu4, _order$customer18, _order$customer$addre, _order$customer19, _configs$country_auto, _ref4, _customerInfoState$cu5, _customerInfoState$cu6, _order$customer20, _order$customer21, _order$customer22, _order$customer23, _order$customer24, _order$customer25, _order$customer26, _order$customer27, _order$customer28, _order$customer29, _order$customer30, _order$customer31, _order$customer32, _order$customer33, _order$customer34, _order$customer35, _order$customer36, _order$customer37, _order$customer38, _order$customer39, _order$customer40, _order$customer41, _order$customer42, _order$customer43, _order$customer44, _order$driver_company, _ref5, _commentInfoState$dri, _order$driver, _order$external_drive, _order$driver2, _order$external_drive2, _order$driver3, _order$driver4, _order$driver5, _order$driver6, _order$driver7, _order$external_drive3, _order$external_drive4;
33
+ var _configs$google_maps_, _configs$disable_comp, _ref, _order$business, _order$business2, _order$business3, _order$business4, _order$business5, _order$business6, _order$business7, _order$business8, _order$business9, _order$business10, _order$business11, _order$business12, _order$business13, _order$business14, _order$business15, _order$customer, _order$customer2, _order$customer3, _order$customer4, _order$customer5, _order$customer6, _order$customer7, _order$customer8, _order$customer9, _order$customer10, _order$customer11, _order$customer12, _order$customer13, _ref2, _customerInfoState$cu, _customerInfoState$cu2, _order$customer17, _ref3, _customerInfoState$cu3, _customerInfoState$cu4, _order$customer18, _order$customer$addre, _order$customer19, _configs$country_auto, _ref4, _customerInfoState$cu5, _customerInfoState$cu6, _order$customer20, _order$customer21, _order$customer22, _order$customer23, _order$customer24, _order$customer25, _order$customer26, _order$customer27, _order$customer28, _order$customer29, _order$customer30, _order$customer31, _order$customer32, _order$customer33, _order$customer34, _order$customer35, _order$customer36, _order$customer37, _order$customer38, _order$customer39, _order$customer40, _order$customer41, _order$customer42, _order$customer43, _order$customer44, _order$driver_company, _ref5, _commentInfoState$dri, _order$driver, _order$external_drive, _order$driver2, _order$external_drive2, _order$driver3, _order$driver4, _order$driver5, _order$driver6, _order$driver7, _order$external_drive3, _order$external_drive4;
34
34
  var order = props.order,
35
35
  customerInfoState = props.customerInfoState,
36
36
  handleChangeCustomerInfoState = props.handleChangeCustomerInfoState,
@@ -55,6 +55,7 @@ var OrderContactInformation = function OrderContactInformation(props) {
55
55
  _useConfig2 = _slicedToArray(_useConfig, 1),
56
56
  configs = _useConfig2[0].configs;
57
57
  var googleMapsApiKey = configs === null || configs === void 0 || (_configs$google_maps_ = configs.google_maps_api_key) === null || _configs$google_maps_ === void 0 ? void 0 : _configs$google_maps_.value;
58
+ var isDisableDriverCompanies = (configs === null || configs === void 0 || (_configs$disable_comp = configs.disable_companies_order_details) === null || _configs$disable_comp === void 0 ? void 0 : _configs$disable_comp.value) === '1';
58
59
  var _useState = (0, _react.useState)(false),
59
60
  _useState2 = _slicedToArray(_useState, 2),
60
61
  isModalOpen = _useState2[0],
@@ -208,7 +209,7 @@ var OrderContactInformation = function OrderContactInformation(props) {
208
209
  href: "http://maps.google.com/?q=".concat(order === null || order === void 0 || (_order$customer35 = order.customer) === null || _order$customer35 === void 0 || (_order$customer35 = _order$customer35.location) === null || _order$customer35 === void 0 ? void 0 : _order$customer35.lat, ",").concat(order === null || order === void 0 || (_order$customer36 = order.customer) === null || _order$customer36 === void 0 || (_order$customer36 = _order$customer36.location) === null || _order$customer36 === void 0 ? void 0 : _order$customer36.lng),
209
210
  rel: "noopener noreferrer",
210
211
  target: "_blank"
211
- }, order === null || order === void 0 || (_order$customer37 = order.customer) === null || _order$customer37 === void 0 || (_order$customer37 = _order$customer37.location) === null || _order$customer37 === void 0 ? void 0 : _order$customer37.lat, ", ", order === null || order === void 0 || (_order$customer38 = order.customer) === null || _order$customer38 === void 0 || (_order$customer38 = _order$customer38.location) === null || _order$customer38 === void 0 ? void 0 : _order$customer38.lng))), !!(order !== null && order !== void 0 && (_order$customer39 = order.customer) !== null && _order$customer39 !== void 0 && _order$customer39.internal_number) && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('INTERNAL_NUMBER', 'Internal number')), /*#__PURE__*/_react.default.createElement("td", null, order === null || order === void 0 || (_order$customer40 = order.customer) === null || _order$customer40 === void 0 ? void 0 : _order$customer40.internal_number)), !!(order !== null && order !== void 0 && (_order$customer41 = order.customer) !== null && _order$customer41 !== void 0 && _order$customer41.address_notes) && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('NOTES', 'Notes')), /*#__PURE__*/_react.default.createElement("td", null, order === null || order === void 0 || (_order$customer42 = order.customer) === null || _order$customer42 === void 0 ? void 0 : _order$customer42.address_notes)), !!(order !== null && order !== void 0 && (_order$customer43 = order.customer) !== null && _order$customer43 !== void 0 && _order$customer43.zipcode) && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('ZIPCODE', 'Zipcode')), /*#__PURE__*/_react.default.createElement("td", null, order === null || order === void 0 || (_order$customer44 = order.customer) === null || _order$customer44 === void 0 ? void 0 : _order$customer44.zipcode)), !!(order !== null && order !== void 0 && order.on_behalf_of) && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('ON_BEHALF_OF', 'On behalf of')), /*#__PURE__*/_react.default.createElement("td", null, order === null || order === void 0 ? void 0 : order.on_behalf_of))))))), deliveryTypes.includes(order === null || order === void 0 ? void 0 : order.delivery_type) && !isServiceOrder && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !(order !== null && order !== void 0 && order.driver_id) && /*#__PURE__*/_react.default.createElement(_styles2.CompanySelectorContainer, null, /*#__PURE__*/_react.default.createElement("p", null, t('DRIVER_COMPANY', 'Driver company')), /*#__PURE__*/_react.default.createElement(_CompanySelector.CompanySelector, {
212
+ }, order === null || order === void 0 || (_order$customer37 = order.customer) === null || _order$customer37 === void 0 || (_order$customer37 = _order$customer37.location) === null || _order$customer37 === void 0 ? void 0 : _order$customer37.lat, ", ", order === null || order === void 0 || (_order$customer38 = order.customer) === null || _order$customer38 === void 0 || (_order$customer38 = _order$customer38.location) === null || _order$customer38 === void 0 ? void 0 : _order$customer38.lng))), !!(order !== null && order !== void 0 && (_order$customer39 = order.customer) !== null && _order$customer39 !== void 0 && _order$customer39.internal_number) && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('INTERNAL_NUMBER', 'Internal number')), /*#__PURE__*/_react.default.createElement("td", null, order === null || order === void 0 || (_order$customer40 = order.customer) === null || _order$customer40 === void 0 ? void 0 : _order$customer40.internal_number)), !!(order !== null && order !== void 0 && (_order$customer41 = order.customer) !== null && _order$customer41 !== void 0 && _order$customer41.address_notes) && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('NOTES', 'Notes')), /*#__PURE__*/_react.default.createElement("td", null, order === null || order === void 0 || (_order$customer42 = order.customer) === null || _order$customer42 === void 0 ? void 0 : _order$customer42.address_notes)), !!(order !== null && order !== void 0 && (_order$customer43 = order.customer) !== null && _order$customer43 !== void 0 && _order$customer43.zipcode) && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('ZIPCODE', 'Zipcode')), /*#__PURE__*/_react.default.createElement("td", null, order === null || order === void 0 || (_order$customer44 = order.customer) === null || _order$customer44 === void 0 ? void 0 : _order$customer44.zipcode)), !!(order !== null && order !== void 0 && order.on_behalf_of) && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('ON_BEHALF_OF', 'On behalf of')), /*#__PURE__*/_react.default.createElement("td", null, order === null || order === void 0 ? void 0 : order.on_behalf_of))))))), deliveryTypes.includes(order === null || order === void 0 ? void 0 : order.delivery_type) && !isServiceOrder && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !(order !== null && order !== void 0 && order.driver_id) && !isDisableDriverCompanies && /*#__PURE__*/_react.default.createElement(_styles2.CompanySelectorContainer, null, /*#__PURE__*/_react.default.createElement("p", null, t('DRIVER_COMPANY', 'Driver company')), /*#__PURE__*/_react.default.createElement(_CompanySelector.CompanySelector, {
212
213
  small: true,
213
214
  isPhoneView: true,
214
215
  defaultValue: (_order$driver_company = order === null || order === void 0 ? void 0 : order.driver_company_id) !== null && _order$driver_company !== void 0 ? _order$driver_company : 'default',
@@ -83,12 +83,14 @@ var SidebarMenuUI = function SidebarMenuUI(props) {
83
83
  title: t('DRIVERS_DASHBOARD', 'Drivers Dashboard'),
84
84
  pageName: 'drivers',
85
85
  url: '/drivers'
86
- }, {
87
- id: 4,
88
- title: t('ALL_IN_ONE', 'All in one'),
89
- pageName: 'all_in_one',
90
- url: '/all-in-one'
91
- }, {
86
+ },
87
+ // {
88
+ // id: 4,
89
+ // title: t('ALL_IN_ONE', 'All in one'),
90
+ // pageName: 'all_in_one',
91
+ // url: '/all-in-one'
92
+ // },
93
+ {
92
94
  id: 5,
93
95
  title: t('APPOINTMENTS', 'Appointments'),
94
96
  pageName: 'appointments',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-admin-external",
3
- "version": "1.38.0",
3
+ "version": "1.38.2",
4
4
  "description": "Ordering UI Admin Components",
5
5
  "main": "./_modules/index.js",
6
6
  "exports": {
@@ -83,7 +83,7 @@
83
83
  "lodash": "^4.17.20",
84
84
  "moment": "^2.29.1",
85
85
  "moment-range": "^4.0.2",
86
- "ordering-components-admin-external": "1.38.0",
86
+ "ordering-components-admin-external": "1.38.1",
87
87
  "polished": "^3.6.7",
88
88
  "prop-types": "^15.7.2",
89
89
  "react-big-calendar": "^1.4.2",
@@ -167,29 +167,6 @@ export const DeliveriesLocation = (props) => {
167
167
  onChange={(data) => handleMapChange(data)}
168
168
  yesIWantToUseGoogleMapApiInternals
169
169
  >
170
-
171
- {interActionMapOrder === null && driversList.drivers.length !== 0 &&
172
- driversList.drivers.filter(driver => driver?.enabled).map((driver) => (
173
- <DriverMapMarkerAndInfo
174
- key={driver.id}
175
- driver={driver}
176
- lat={
177
- (driver.location !== null && typeof driver.location === 'object' && driver.location?.lat)
178
- ? driver.location.lat
179
- : typeof driver.location === 'string'
180
- ? parseFloat(driver?.location?.split(',')[0].replace(/[^-.0-9]/g, ''))
181
- : defaultCenter.lat
182
- }
183
- lng={
184
- (driver.location !== null && typeof driver.location === 'object' && driver.location?.lng)
185
- ? driver.location.lng
186
- : typeof driver.location === 'string'
187
- ? parseFloat(driver?.location?.split(',')[1].replace(/[^-.0-9]/g, ''))
188
- : defaultCenter.lng
189
- }
190
- />
191
- ))}
192
-
193
170
  {interActionMapOrder !== null && (
194
171
  <InterActOrderMarker
195
172
  business={interActionMapOrder?.business}
@@ -198,6 +175,7 @@ export const DeliveriesLocation = (props) => {
198
175
  image={interActionMapOrder?.business?.logo}
199
176
  />
200
177
  )}
178
+
201
179
  {interActionMapOrder !== null && (
202
180
  <InterActOrderMarker
203
181
  customer={interActionMapOrder?.customer}
@@ -227,6 +205,7 @@ export const DeliveriesLocation = (props) => {
227
205
  image={interActionMapOrder?.driver?.photo}
228
206
  />
229
207
  )}
208
+
230
209
  {interActionMapOrder !== null && interActionMapOrder?.driver === null && activeDrivers.length > 0 && (
231
210
  activeDrivers.map((driver) => (
232
211
  <InterActOrderMarker
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useState } from 'react'
2
- import { useLanguage, DriversList as DriversController } from 'ordering-components-admin-external'
2
+ import { useLanguage, useConfig, DriversList as DriversController } from 'ordering-components-admin-external'
3
3
  import { useTheme } from 'styled-components'
4
4
  import { Select } from '../../../styles/Select'
5
5
  import { Select as FirstSelect } from '../../../styles/Select/FirstSelect'
@@ -38,7 +38,10 @@ const DriverSelectorUI = (props) => {
38
38
  const [defaultOption, setDefaultOption] = useState(null)
39
39
  const [driversOptionList, setDriversOptionList] = useState([])
40
40
  const [searchValue, setSearchValue] = useState(null)
41
+ const [{ configs }] = useConfig()
42
+
41
43
  const driversLoading = [{ value: 'default', content: <Option small={small}><span>{t('LOADING', 'loading')}...</span></Option> }]
44
+ const showDriverAssignmentComment = configs?.manual_driver_assignment_comment_enabled?.value === '1'
42
45
 
43
46
  const getOption = (driver) => {
44
47
  return {
@@ -138,7 +141,7 @@ const DriverSelectorUI = (props) => {
138
141
  if (driverId === 'remove') {
139
142
  driverId = null
140
143
  }
141
- if (driverId && setCommentInfostate) {
144
+ if (driverId && setCommentInfostate && showDriverAssignmentComment) {
142
145
  setCommentInfostate({ open: true, driverId: driverId })
143
146
  } else {
144
147
  setCommentInfostate && setCommentInfostate({ open: false, driverId: null })
@@ -50,6 +50,7 @@ export const OrderContactInformation = (props) => {
50
50
  const [{ configs }] = useConfig()
51
51
 
52
52
  const googleMapsApiKey = configs?.google_maps_api_key?.value
53
+ const isDisableDriverCompanies = configs?.disable_companies_order_details?.value === '1'
53
54
 
54
55
  const [isModalOpen, setIsModalOpen] = useState(false)
55
56
  const [currentCustomer, setCurrentCustomer] = useState(null)
@@ -315,7 +316,7 @@ export const OrderContactInformation = (props) => {
315
316
  </Accordion>
316
317
  {deliveryTypes.includes(order?.delivery_type) && !isServiceOrder && (
317
318
  <>
318
- {!order?.driver_id && (
319
+ {!order?.driver_id && !isDisableDriverCompanies && (
319
320
  <CompanySelectorContainer>
320
321
  <p>{t('DRIVER_COMPANY', 'Driver company')}</p>
321
322
  <CompanySelector
@@ -82,12 +82,12 @@ const SidebarMenuUI = (props) => {
82
82
  pageName: 'drivers',
83
83
  url: '/drivers'
84
84
  },
85
- {
86
- id: 4,
87
- title: t('ALL_IN_ONE', 'All in one'),
88
- pageName: 'all_in_one',
89
- url: '/all-in-one'
90
- },
85
+ // {
86
+ // id: 4,
87
+ // title: t('ALL_IN_ONE', 'All in one'),
88
+ // pageName: 'all_in_one',
89
+ // url: '/all-in-one'
90
+ // },
91
91
  {
92
92
  id: 5,
93
93
  title: t('APPOINTMENTS', 'Appointments'),