ordering-ui-admin-external 1.42.13 → 1.42.15
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.0abab65203c29a9023ce.js → ordering-ui-admin.b3638e5a67b10e3bcb5d.js} +2 -2
- package/_modules/components/Orders/DeliveryDashboard/index.js +1 -1
- package/_modules/components/Orders/OrdersCards/index.js +5 -1
- package/_modules/components/Orders/OrdersDashboard/index.js +1 -1
- package/_modules/components/Orders/OrdersTable/Order.js +9 -1
- package/_modules/components/Orders/OrdersTable/index.js +21 -2
- package/_modules/components/Orders/OrdersTable/styles.js +35 -34
- package/package.json +2 -2
- package/src/components/Orders/DeliveryDashboard/index.js +1 -1
- package/src/components/Orders/OrdersCards/index.js +9 -0
- package/src/components/Orders/OrdersDashboard/index.js +1 -1
- package/src/components/Orders/OrdersTable/Order.js +11 -2
- package/src/components/Orders/OrdersTable/index.js +17 -4
- package/src/components/Orders/OrdersTable/styles.js +11 -0
- /package/_bundles/{ordering-ui-admin.0abab65203c29a9023ce.js.LICENSE.txt → ordering-ui-admin.b3638e5a67b10e3bcb5d.js.LICENSE.txt} +0 -0
|
@@ -41,7 +41,7 @@ var DeliveryDashboard = exports.DeliveryDashboard = function DeliveryDashboard(p
|
|
|
41
41
|
_useConfig2 = _slicedToArray(_useConfig, 1),
|
|
42
42
|
configs = _useConfig2[0].configs;
|
|
43
43
|
if (configs !== null && configs !== void 0 && configs.optimize_order_data && (configs === null || configs === void 0 || (_configs$optimize_ord = configs.optimize_order_data) === null || _configs$optimize_ord === void 0 ? void 0 : _configs$optimize_ord.value) === '1') {
|
|
44
|
-
ordersDashboardListProps.propsToFetch = ['app_id', 'business', 'business_id', 'created_at', 'customer', 'customer_id', 'delivery_type', 'driver_group_id', 'driver_id', 'driver', 'delivery_datetime', 'delivery_datetime_utc', 'external_id', 'eta_time', 'id', 'logistic_status', 'logistic_attemps', 'uuid', 'order_group', 'order_group_id', 'priority', 'summary', 'status', 'time_status', 'total'];
|
|
44
|
+
ordersDashboardListProps.propsToFetch = ['app_id', 'business', 'business_id', 'created_at', 'customer', 'customer_id', 'delivery_type', 'driver_group_id', 'driver_id', 'driver', 'delivery_datetime', 'delivery_datetime_utc', 'external_id', 'eta_time', 'id', 'logistic_status', 'logistic_attemps', 'uuid', 'order_group', 'order_group_id', 'priority', 'summary', 'status', 'time_status', 'total', 'metadata'];
|
|
45
45
|
}
|
|
46
46
|
var _useState = (0, _react.useState)(null),
|
|
47
47
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -248,7 +248,11 @@ var OrdersCards = exports.OrdersCards = function OrdersCards(props) {
|
|
|
248
248
|
className: "bold"
|
|
249
249
|
}, "Timer"), /*#__PURE__*/_react.default.createElement("p", {
|
|
250
250
|
className: order === null || order === void 0 ? void 0 : order.time_status
|
|
251
|
-
}, displayDelayedTime(order)))
|
|
251
|
+
}, displayDelayedTime(order))), (order === null || order === void 0 ? void 0 : order.codigoPod) && /*#__PURE__*/_react.default.createElement("div", {
|
|
252
|
+
style: {
|
|
253
|
+
paddingTop: 50
|
|
254
|
+
}
|
|
255
|
+
}, /*#__PURE__*/_react.default.createElement("p", null, "".concat(t('PODS', 'Pod'), ": ").concat(order === null || order === void 0 ? void 0 : order.codigoPod)))), isMessagesView && (order === null || order === void 0 ? void 0 : order.unread_count) > 0 && /*#__PURE__*/_react.default.createElement(_styles.UnreadMessageCounter, null, order === null || order === void 0 ? void 0 : order.unread_count), /*#__PURE__*/_react.default.createElement(_styles.CardContent, null, /*#__PURE__*/_react.default.createElement(_styles.InfoItemContainer, null, /*#__PURE__*/_react.default.createElement(_styles.WrapperImage, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
252
256
|
src: optimizeImage(franchiseImages[order === null || order === void 0 || (_order$business = order.business) === null || _order$business === void 0 ? void 0 : _order$business.franchise_id] || ((_order$business2 = order.business) === null || _order$business2 === void 0 ? void 0 : _order$business2.logo) || ((_theme$images = theme.images) === null || _theme$images === void 0 || (_theme$images = _theme$images.dummies) === null || _theme$images === void 0 ? void 0 : _theme$images.businessLogo), 'h_50,c_limit'),
|
|
253
257
|
loading: "lazy",
|
|
254
258
|
alt: ""
|
|
@@ -30,7 +30,7 @@ var OrdersDashboard = exports.OrdersDashboard = function OrdersDashboard(props)
|
|
|
30
30
|
configs = _useConfig2[0].configs;
|
|
31
31
|
var ordersDashboardListProps = _objectSpread({}, props);
|
|
32
32
|
if (configs !== null && configs !== void 0 && configs.optimize_order_data && (configs === null || configs === void 0 || (_configs$optimize_ord = configs.optimize_order_data) === null || _configs$optimize_ord === void 0 ? void 0 : _configs$optimize_ord.value) === '1') {
|
|
33
|
-
ordersDashboardListProps.propsToFetch = ['app_id', 'business', 'business_id', 'created_at', 'customer', 'customer_id', 'delivery_type', 'driver_group_id', 'driver_id', 'driver', 'delivery_datetime', 'delivery_datetime_utc', 'external_id', 'eta_time', 'id', 'logistic_status', 'logistic_attemps', 'uuid', 'order_group', 'order_group_id', 'priority', 'summary', 'status', 'time_status', 'total', 'driver_group_business'];
|
|
33
|
+
ordersDashboardListProps.propsToFetch = ['app_id', 'business', 'business_id', 'created_at', 'customer', 'customer_id', 'delivery_type', 'driver_group_id', 'driver_id', 'driver', 'delivery_datetime', 'delivery_datetime_utc', 'external_id', 'eta_time', 'id', 'logistic_status', 'logistic_attemps', 'uuid', 'order_group', 'order_group_id', 'priority', 'summary', 'status', 'time_status', 'total', 'driver_group_business', 'metadata'];
|
|
34
34
|
}
|
|
35
35
|
return /*#__PURE__*/_react.default.createElement(_styles.OrdersManageContainer, null, /*#__PURE__*/_react.default.createElement(_OrdersDashboardList.OrdersDashboardList, _extends({}, ordersDashboardListProps, {
|
|
36
36
|
orderListView: "table"
|
|
@@ -239,7 +239,15 @@ var Order = exports.Order = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
239
239
|
key: "channelInfo".concat(i, "-").concat(index)
|
|
240
240
|
}, /*#__PURE__*/_react.default.createElement(_styles.ChannelInfo, null, /*#__PURE__*/_react.default.createElement("p", {
|
|
241
241
|
className: "bold"
|
|
242
|
-
}, order.app_id)));
|
|
242
|
+
}, order === null || order === void 0 ? void 0 : order.app_id)));
|
|
243
|
+
}
|
|
244
|
+
if (column === 'pod') {
|
|
245
|
+
return /*#__PURE__*/_react.default.createElement("td", {
|
|
246
|
+
className: "podInfo",
|
|
247
|
+
key: "podInfo".concat(i, "-").concat(index)
|
|
248
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.PodInfo, null, /*#__PURE__*/_react.default.createElement("p", {
|
|
249
|
+
className: "bold"
|
|
250
|
+
}, order === null || order === void 0 ? void 0 : order.codigoPod)));
|
|
243
251
|
}
|
|
244
252
|
if (column === 'total') {
|
|
245
253
|
var _allowColumns$total, _order$summary;
|
|
@@ -137,6 +137,9 @@ var OrdersTable = exports.OrdersTable = /*#__PURE__*/(0, _react.memo)(function (
|
|
|
137
137
|
}, {
|
|
138
138
|
value: 'channel',
|
|
139
139
|
content: t('CHANNEL', 'Channel')
|
|
140
|
+
}, {
|
|
141
|
+
value: 'pod',
|
|
142
|
+
content: t('PODS', 'Pod')
|
|
140
143
|
}];
|
|
141
144
|
var getDelayMinutes = function getDelayMinutes(order) {
|
|
142
145
|
// targetMin = delivery_datetime + eta_time - now()
|
|
@@ -246,14 +249,25 @@ var OrdersTable = exports.OrdersTable = /*#__PURE__*/(0, _react.memo)(function (
|
|
|
246
249
|
var _column2;
|
|
247
250
|
var _column = {};
|
|
248
251
|
if (type === 'channel') {
|
|
252
|
+
var _allowColumns$type$vi, _allowColumns$type;
|
|
249
253
|
_column = {
|
|
250
|
-
visable: allowColumns[type].visable,
|
|
254
|
+
visable: (_allowColumns$type$vi = (_allowColumns$type = allowColumns[type]) === null || _allowColumns$type === void 0 ? void 0 : _allowColumns$type.visable) !== null && _allowColumns$type$vi !== void 0 ? _allowColumns$type$vi : false,
|
|
251
255
|
title: t('CHANNEL', 'Channel'),
|
|
252
256
|
className: 'channelInfo',
|
|
253
257
|
draggable: true,
|
|
254
258
|
colSpan: 1,
|
|
255
259
|
order: 12
|
|
256
260
|
};
|
|
261
|
+
} else if (type === 'pod') {
|
|
262
|
+
var _allowColumns$type$vi2, _allowColumns$type2;
|
|
263
|
+
_column = {
|
|
264
|
+
visable: (_allowColumns$type$vi2 = (_allowColumns$type2 = allowColumns[type]) === null || _allowColumns$type2 === void 0 ? void 0 : _allowColumns$type2.visable) !== null && _allowColumns$type$vi2 !== void 0 ? _allowColumns$type$vi2 : false,
|
|
265
|
+
title: t('PODS', 'Pod'),
|
|
266
|
+
className: 'podInfo',
|
|
267
|
+
draggable: true,
|
|
268
|
+
colSpan: 1,
|
|
269
|
+
order: 13
|
|
270
|
+
};
|
|
257
271
|
} else {
|
|
258
272
|
_column = allowColumns[type];
|
|
259
273
|
}
|
|
@@ -474,7 +488,7 @@ var OrdersTable = exports.OrdersTable = /*#__PURE__*/(0, _react.memo)(function (
|
|
|
474
488
|
alt: "six dots"
|
|
475
489
|
}), /*#__PURE__*/_react.default.createElement("span", null, (_allowColumns$column9 = allowColumns[column]) === null || _allowColumns$column9 === void 0 ? void 0 : _allowColumns$column9.title)));
|
|
476
490
|
})))), orderList.loading || !allowColumns ? _toConsumableArray(Array(10).keys()).map(function (i) {
|
|
477
|
-
var _allowColumns$slaBar2, _allowColumns$orderNu2, _allowColumns$dateTim2, _allowColumns$orderNu3, _allowColumns$dateTim3, _allowColumns$externa, _allowColumns$cartGro, _allowColumns$driverG, _allowColumns$status, _allowColumns$busines, _allowColumns$custome, _allowColumns$driver, _allowColumns$deliver, _allowColumns$status2, _allowColumns$advance, _allowColumns$advance2, _allowColumns$advance3, _allowColumns$channel, _allowColumns$total;
|
|
491
|
+
var _allowColumns$slaBar2, _allowColumns$orderNu2, _allowColumns$dateTim2, _allowColumns$orderNu3, _allowColumns$dateTim3, _allowColumns$externa, _allowColumns$cartGro, _allowColumns$driverG, _allowColumns$status, _allowColumns$busines, _allowColumns$custome, _allowColumns$driver, _allowColumns$deliver, _allowColumns$status2, _allowColumns$advance, _allowColumns$advance2, _allowColumns$advance3, _allowColumns$channel, _allowColumns$pod, _allowColumns$total;
|
|
478
492
|
return /*#__PURE__*/_react.default.createElement(_styles.OrderTbody, {
|
|
479
493
|
key: i
|
|
480
494
|
}, /*#__PURE__*/_react.default.createElement("tr", null, (allowColumns === null || allowColumns === void 0 || (_allowColumns$slaBar2 = allowColumns.slaBar) === null || _allowColumns$slaBar2 === void 0 ? void 0 : _allowColumns$slaBar2.visable) && /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement(_styles.Timestatus, null)), /*#__PURE__*/_react.default.createElement("td", {
|
|
@@ -606,6 +620,11 @@ var OrdersTable = exports.OrdersTable = /*#__PURE__*/(0, _react.memo)(function (
|
|
|
606
620
|
}, /*#__PURE__*/_react.default.createElement(_styles.WrapOrderStatusSelector, null, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
607
621
|
width: 100,
|
|
608
622
|
height: 30
|
|
623
|
+
}))), (allowColumns === null || allowColumns === void 0 || (_allowColumns$pod = allowColumns.pod) === null || _allowColumns$pod === void 0 ? void 0 : _allowColumns$pod.visable) && !isSelectedOrders && /*#__PURE__*/_react.default.createElement("td", {
|
|
624
|
+
className: "orderStatusTitle"
|
|
625
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.WrapOrderStatusSelector, null, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
626
|
+
width: 100,
|
|
627
|
+
height: 30
|
|
609
628
|
}))), !isSelectedOrders && /*#__PURE__*/_react.default.createElement("td", {
|
|
610
629
|
className: "orderPrice"
|
|
611
630
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -4,9 +4,9 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.WrapperPagination = exports.WrapperImage = exports.WrapOrderStatusSelector = exports.Timestatus = exports.Timer = exports.Table = exports.StatusInfo = exports.PriorityDot = exports.OrdersCountWrapper = exports.OrdersContainer = exports.OrderType = exports.OrderTbody = exports.OrderNumberContainer = exports.LogisticStatusDot = exports.InfoWrapper = exports.EtaInfo = exports.DriversInfo = exports.DragTh = exports.CustomerInfo = exports.CheckBox = exports.ChannelInfo = exports.BusinessInfo = void 0;
|
|
7
|
+
exports.WrapperPagination = exports.WrapperImage = exports.WrapOrderStatusSelector = exports.Timestatus = exports.Timer = exports.Table = exports.StatusInfo = exports.PriorityDot = exports.PodInfo = exports.OrdersCountWrapper = exports.OrdersContainer = exports.OrderType = exports.OrderTbody = exports.OrderNumberContainer = exports.LogisticStatusDot = exports.InfoWrapper = exports.EtaInfo = exports.DriversInfo = exports.DragTh = exports.CustomerInfo = exports.CheckBox = exports.ChannelInfo = exports.BusinessInfo = void 0;
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52, _templateObject53, _templateObject54, _templateObject55, _templateObject56, _templateObject57, _templateObject58, _templateObject59;
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52, _templateObject53, _templateObject54, _templateObject55, _templateObject56, _templateObject57, _templateObject58, _templateObject59, _templateObject60;
|
|
10
10
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
11
11
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
12
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
@@ -88,116 +88,117 @@ var CustomerInfo = exports.CustomerInfo = (0, _styledComponents.default)(Busines
|
|
|
88
88
|
var StatusInfo = exports.StatusInfo = _styledComponents.default.div(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n .bold {\n max-width: 150px;\n font-weight: 600;\n margin: 0;\n }\n"])));
|
|
89
89
|
var ChannelInfo = exports.ChannelInfo = _styledComponents.default.div(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n .bold {\n max-width: 150px;\n font-weight: 600;\n margin: 0;\n }\n"])));
|
|
90
90
|
var EtaInfo = exports.EtaInfo = _styledComponents.default.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n .bold {\n max-width: 150px;\n font-weight: 600;\n margin: 0;\n }\n"])));
|
|
91
|
-
var
|
|
91
|
+
var PodInfo = exports.PodInfo = _styledComponents.default.div(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n .bold {\n max-width: 150px;\n font-weight: 600;\n margin: 0;\n }\n"])));
|
|
92
|
+
var DriversInfo = exports.DriversInfo = _styledComponents.default.div(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n .select {\n > div:first-child {\n padding-left: 0;\n padding-right: 0;\n }\n }\n > div {\n > div {\n border: none;\n &:first-child {\n .driver-photo {\n width: 45px;\n height: 45px;\n }\n .driver-info {\n p {\n color: ", ";\n font-size: 14px;\n font-weight: 600;\n }\n span {\n display: initial;\n }\n }\n }\n }\n }\n ", "\n"])), function (props) {
|
|
92
93
|
var _props$theme$colors6;
|
|
93
94
|
return (_props$theme$colors6 = props.theme.colors) === null || _props$theme$colors6 === void 0 ? void 0 : _props$theme$colors6.headingColor;
|
|
94
95
|
}, function (_ref6) {
|
|
95
96
|
var noClick = _ref6.noClick;
|
|
96
|
-
return noClick && (0, _styledComponents.css)(
|
|
97
|
+
return noClick && (0, _styledComponents.css)(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n pointer-events: none;\n "])));
|
|
97
98
|
});
|
|
98
|
-
var WrapperImage = exports.WrapperImage = _styledComponents.default.div(
|
|
99
|
-
var OrderType = exports.OrderType = _styledComponents.default.div(
|
|
99
|
+
var WrapperImage = exports.WrapperImage = _styledComponents.default.div(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n max-width: 45px;\n max-height: 45px;\n height: 45px;\n width: 45px;\n box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1);\n border-radius: 7.6px;\n position: relative;\n\n img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 7.6px;\n }\n\n svg {\n width: 100%;\n height: 100%;\n padding: 7px;\n box-sizing: border-box;\n border-radius: 50%;\n }\n"])));
|
|
100
|
+
var OrderType = exports.OrderType = _styledComponents.default.div(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n\n img, svg {\n width: 25px;\n height: 30px;\n }\n\n img {\n border-radius: unset;\n border: none;\n }\n\n span {\n color: ", ";\n font-size: 14px;\n ", "\n }\n"])), function (props) {
|
|
100
101
|
return props.theme.colors.headingColor;
|
|
101
102
|
}, function (props) {
|
|
102
103
|
var _props$theme5;
|
|
103
|
-
return (_props$theme5 = props.theme) !== null && _props$theme5 !== void 0 && _props$theme5.rtl ? (0, _styledComponents.css)(
|
|
104
|
+
return (_props$theme5 = props.theme) !== null && _props$theme5 !== void 0 && _props$theme5.rtl ? (0, _styledComponents.css)(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n margin-right: 5px;\n "]))) : (0, _styledComponents.css)(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n margin-left: 5px;\n "])));
|
|
104
105
|
});
|
|
105
|
-
var WrapOrderStatusSelector = exports.WrapOrderStatusSelector = _styledComponents.default.div(
|
|
106
|
+
var WrapOrderStatusSelector = exports.WrapOrderStatusSelector = _styledComponents.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n > div {\n p {\n font-size: 14px;\n }\n > div:first-child {\n p {\n color: ", ";\n max-width: 140px;\n }\n }\n }\n"])), function (props) {
|
|
106
107
|
var _props$theme$colors7;
|
|
107
108
|
return (_props$theme$colors7 = props.theme.colors) === null || _props$theme$colors7 === void 0 ? void 0 : _props$theme$colors7.headingColor;
|
|
108
109
|
});
|
|
109
|
-
var WrapperPagination = exports.WrapperPagination = _styledComponents.default.div(
|
|
110
|
-
var LogisticStatusDot = exports.LogisticStatusDot = _styledComponents.default.span(
|
|
110
|
+
var WrapperPagination = exports.WrapperPagination = _styledComponents.default.div(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n padding-top: 5px;\n"])));
|
|
111
|
+
var LogisticStatusDot = exports.LogisticStatusDot = _styledComponents.default.span(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["\n width: 6px;\n height: 6px;\n border-radius: 50%;\n display: inline-block;\n\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n"])), function (props) {
|
|
111
112
|
var _props$theme6;
|
|
112
|
-
return (_props$theme6 = props.theme) !== null && _props$theme6 !== void 0 && _props$theme6.rtl ? (0, _styledComponents.css)(
|
|
113
|
+
return (_props$theme6 = props.theme) !== null && _props$theme6 !== void 0 && _props$theme6.rtl ? (0, _styledComponents.css)(_templateObject34 || (_templateObject34 = _taggedTemplateLiteral(["\n margin-right: 6px;\n "]))) : (0, _styledComponents.css)(_templateObject35 || (_templateObject35 = _taggedTemplateLiteral(["\n margin-left: 6px;\n "])));
|
|
113
114
|
}, function (_ref7) {
|
|
114
115
|
var status = _ref7.status;
|
|
115
|
-
return status === 0 && (0, _styledComponents.css)(
|
|
116
|
+
return status === 0 && (0, _styledComponents.css)(_templateObject36 || (_templateObject36 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), function (props) {
|
|
116
117
|
return props.theme.colors.orange;
|
|
117
118
|
});
|
|
118
119
|
}, function (_ref8) {
|
|
119
120
|
var status = _ref8.status;
|
|
120
|
-
return status === 1 && (0, _styledComponents.css)(
|
|
121
|
+
return status === 1 && (0, _styledComponents.css)(_templateObject37 || (_templateObject37 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), function (props) {
|
|
121
122
|
return props.theme.colors.warning;
|
|
122
123
|
});
|
|
123
124
|
}, function (_ref9) {
|
|
124
125
|
var status = _ref9.status;
|
|
125
|
-
return status === 2 && (0, _styledComponents.css)(
|
|
126
|
+
return status === 2 && (0, _styledComponents.css)(_templateObject38 || (_templateObject38 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), function (props) {
|
|
126
127
|
return props.theme.colors.info;
|
|
127
128
|
});
|
|
128
129
|
}, function (_ref10) {
|
|
129
130
|
var status = _ref10.status;
|
|
130
|
-
return status === 3 && (0, _styledComponents.css)(
|
|
131
|
+
return status === 3 && (0, _styledComponents.css)(_templateObject39 || (_templateObject39 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), function (props) {
|
|
131
132
|
return props.theme.colors.danger;
|
|
132
133
|
});
|
|
133
134
|
}, function (_ref11) {
|
|
134
135
|
var status = _ref11.status;
|
|
135
|
-
return status === 4 && (0, _styledComponents.css)(
|
|
136
|
+
return status === 4 && (0, _styledComponents.css)(_templateObject40 || (_templateObject40 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), function (props) {
|
|
136
137
|
return props.theme.colors.success;
|
|
137
138
|
});
|
|
138
139
|
});
|
|
139
|
-
var PriorityDot = exports.PriorityDot = _styledComponents.default.span(
|
|
140
|
+
var PriorityDot = exports.PriorityDot = _styledComponents.default.span(_templateObject41 || (_templateObject41 = _taggedTemplateLiteral(["\n width: 6px;\n height: 6px;\n border-radius: 50%;\n display: inline-block;\n\n ", "\n\n ", "\n ", "\n ", "\n ", "\n"])), function (props) {
|
|
140
141
|
var _props$theme7;
|
|
141
|
-
return (_props$theme7 = props.theme) !== null && _props$theme7 !== void 0 && _props$theme7.rtl ? (0, _styledComponents.css)(
|
|
142
|
+
return (_props$theme7 = props.theme) !== null && _props$theme7 !== void 0 && _props$theme7.rtl ? (0, _styledComponents.css)(_templateObject42 || (_templateObject42 = _taggedTemplateLiteral(["\n margin-right: 6px;\n "]))) : (0, _styledComponents.css)(_templateObject43 || (_templateObject43 = _taggedTemplateLiteral(["\n margin-left: 6px;\n "])));
|
|
142
143
|
}, function (_ref12) {
|
|
143
144
|
var priority = _ref12.priority;
|
|
144
|
-
return priority === -1 && (0, _styledComponents.css)(
|
|
145
|
+
return priority === -1 && (0, _styledComponents.css)(_templateObject44 || (_templateObject44 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), function (props) {
|
|
145
146
|
return props.theme.colors.secundaryLight;
|
|
146
147
|
});
|
|
147
148
|
}, function (_ref13) {
|
|
148
149
|
var priority = _ref13.priority;
|
|
149
|
-
return priority === 0 && (0, _styledComponents.css)(
|
|
150
|
+
return priority === 0 && (0, _styledComponents.css)(_templateObject45 || (_templateObject45 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), function (props) {
|
|
150
151
|
return props.theme.colors.primary;
|
|
151
152
|
});
|
|
152
153
|
}, function (_ref14) {
|
|
153
154
|
var priority = _ref14.priority;
|
|
154
|
-
return priority === 1 && (0, _styledComponents.css)(
|
|
155
|
+
return priority === 1 && (0, _styledComponents.css)(_templateObject46 || (_templateObject46 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), function (props) {
|
|
155
156
|
return props.theme.colors.warning;
|
|
156
157
|
});
|
|
157
158
|
}, function (_ref15) {
|
|
158
159
|
var priority = _ref15.priority;
|
|
159
|
-
return priority === 2 && (0, _styledComponents.css)(
|
|
160
|
+
return priority === 2 && (0, _styledComponents.css)(_templateObject47 || (_templateObject47 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), function (props) {
|
|
160
161
|
return props.theme.colors.danger;
|
|
161
162
|
});
|
|
162
163
|
});
|
|
163
|
-
var Timestatus = exports.Timestatus = _styledComponents.default.div(
|
|
164
|
+
var Timestatus = exports.Timestatus = _styledComponents.default.div(_templateObject48 || (_templateObject48 = _taggedTemplateLiteral(["\n width: 4px;\n height: 37px;\n border-radius: 20px 20px 20px 20px;\n ", "\n ", "\n ", "\n"])), function (_ref16) {
|
|
164
165
|
var timeState = _ref16.timeState;
|
|
165
|
-
return timeState === 'in_time' && (0, _styledComponents.css)(
|
|
166
|
+
return timeState === 'in_time' && (0, _styledComponents.css)(_templateObject49 || (_templateObject49 = _taggedTemplateLiteral(["\n background-color: #00D27A;\n "])));
|
|
166
167
|
}, function (_ref17) {
|
|
167
168
|
var timeState = _ref17.timeState;
|
|
168
|
-
return timeState === 'at_risk' && (0, _styledComponents.css)(
|
|
169
|
+
return timeState === 'at_risk' && (0, _styledComponents.css)(_templateObject50 || (_templateObject50 = _taggedTemplateLiteral(["\n background-color: #FFC700;\n "])));
|
|
169
170
|
}, function (_ref18) {
|
|
170
171
|
var timeState = _ref18.timeState;
|
|
171
|
-
return timeState === 'delayed' && (0, _styledComponents.css)(
|
|
172
|
+
return timeState === 'delayed' && (0, _styledComponents.css)(_templateObject51 || (_templateObject51 = _taggedTemplateLiteral(["\n background-color: #E63757;\n "])));
|
|
172
173
|
});
|
|
173
|
-
var Timer = exports.Timer = _styledComponents.default.div(
|
|
174
|
+
var Timer = exports.Timer = _styledComponents.default.div(_templateObject52 || (_templateObject52 = _taggedTemplateLiteral(["\n min-width: 65px;\n p {\n margin: 0px;\n color: ", ";\n font-size: 12px;\n }\n\n .bold {\n font-size: 14px;\n font-weight: 600;\n color: ", ";\n }\n\n .in_time{\n color: #00D27A;\n }\n\n .at_risk {\n color: #FFC700;\n }\n\n .delayed {\n color: #E63757;\n }\n"])), function (props) {
|
|
174
175
|
var _props$theme$colors8;
|
|
175
176
|
return (_props$theme$colors8 = props.theme.colors) === null || _props$theme$colors8 === void 0 ? void 0 : _props$theme$colors8.lightGray;
|
|
176
177
|
}, function (props) {
|
|
177
178
|
var _props$theme$colors9;
|
|
178
179
|
return (_props$theme$colors9 = props.theme.colors) === null || _props$theme$colors9 === void 0 ? void 0 : _props$theme$colors9.headingColor;
|
|
179
180
|
});
|
|
180
|
-
var OrdersCountWrapper = exports.OrdersCountWrapper = _styledComponents.default.div(
|
|
181
|
+
var OrdersCountWrapper = exports.OrdersCountWrapper = _styledComponents.default.div(_templateObject53 || (_templateObject53 = _taggedTemplateLiteral(["\n height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50px;\n background-color: ", ";\n color: ", ";\n font-weight: 400;\n font-size: 9px;\n line-height: 12px;\n padding: 2px 5px;\n position: absolute;\n top: -9px;\n right: -5px;\n ", "\n\n ", "\n"])), function (props) {
|
|
181
182
|
return props.theme.colors.backgroundInfo;
|
|
182
183
|
}, function (props) {
|
|
183
184
|
return props.theme.colors.primary;
|
|
184
185
|
}, function (props) {
|
|
185
|
-
return props.theme.rtl && (0, _styledComponents.css)(
|
|
186
|
+
return props.theme.rtl && (0, _styledComponents.css)(_templateObject54 || (_templateObject54 = _taggedTemplateLiteral(["\n left: -5px;\n right: initial;\n "])));
|
|
186
187
|
}, function (_ref19) {
|
|
187
188
|
var isNew = _ref19.isNew;
|
|
188
|
-
return isNew && (0, _styledComponents.css)(
|
|
189
|
+
return isNew && (0, _styledComponents.css)(_templateObject55 || (_templateObject55 = _taggedTemplateLiteral(["\n background-color: ", ";\n color: ", ";\n "])), function (props) {
|
|
189
190
|
return props.theme.colors.lightGreen;
|
|
190
191
|
}, function (props) {
|
|
191
192
|
return props.theme.colors.success;
|
|
192
193
|
});
|
|
193
194
|
});
|
|
194
|
-
var DragTh = exports.DragTh = _styledComponents.default.th(
|
|
195
|
+
var DragTh = exports.DragTh = _styledComponents.default.th(_templateObject56 || (_templateObject56 = _taggedTemplateLiteral(["\n cursor: pointer;\n ", "\n"])), function (_ref20) {
|
|
195
196
|
var selectedDragOver = _ref20.selectedDragOver;
|
|
196
|
-
return selectedDragOver && (0, _styledComponents.css)(
|
|
197
|
+
return selectedDragOver && (0, _styledComponents.css)(_templateObject57 || (_templateObject57 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n "])), function (props) {
|
|
197
198
|
return props.theme.colors.primary;
|
|
198
199
|
});
|
|
199
200
|
});
|
|
200
|
-
var InfoWrapper = exports.InfoWrapper = _styledComponents.default.div(
|
|
201
|
+
var InfoWrapper = exports.InfoWrapper = _styledComponents.default.div(_templateObject58 || (_templateObject58 = _taggedTemplateLiteral(["\n position: relative;\n ", "\n\n .bold {\n max-width: 150px;\n font-weight: 600;\n margin: 0;\n }\n\n &:hover > div {\n visibility: visible;\n opacity: 1;\n }\n"])), function (props) {
|
|
201
202
|
var _props$theme8;
|
|
202
|
-
return (_props$theme8 = props.theme) !== null && _props$theme8 !== void 0 && _props$theme8.rtl ? (0, _styledComponents.css)(
|
|
203
|
+
return (_props$theme8 = props.theme) !== null && _props$theme8 !== void 0 && _props$theme8.rtl ? (0, _styledComponents.css)(_templateObject59 || (_templateObject59 = _taggedTemplateLiteral(["\n margin-left: 4px;\n "]))) : (0, _styledComponents.css)(_templateObject60 || (_templateObject60 = _taggedTemplateLiteral(["\n margin-right: 4px;\n "])));
|
|
203
204
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-admin-external",
|
|
3
|
-
"version": "1.42.
|
|
3
|
+
"version": "1.42.15",
|
|
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.42.
|
|
86
|
+
"ordering-components-admin-external": "1.42.10",
|
|
87
87
|
"polished": "^3.6.7",
|
|
88
88
|
"prop-types": "^15.7.2",
|
|
89
89
|
"react-big-calendar": "^1.4.2",
|
|
@@ -32,7 +32,7 @@ export const DeliveryDashboard = (props) => {
|
|
|
32
32
|
const [{ configs }] = useConfig()
|
|
33
33
|
|
|
34
34
|
if ((configs?.optimize_order_data && (configs?.optimize_order_data?.value === '1'))) {
|
|
35
|
-
ordersDashboardListProps.propsToFetch = ['app_id', 'business', 'business_id', 'created_at', 'customer', 'customer_id', 'delivery_type', 'driver_group_id', 'driver_id', 'driver', 'delivery_datetime', 'delivery_datetime_utc', 'external_id', 'eta_time', 'id', 'logistic_status', 'logistic_attemps', 'uuid', 'order_group', 'order_group_id', 'priority', 'summary', 'status', 'time_status', 'total']
|
|
35
|
+
ordersDashboardListProps.propsToFetch = ['app_id', 'business', 'business_id', 'created_at', 'customer', 'customer_id', 'delivery_type', 'driver_group_id', 'driver_id', 'driver', 'delivery_datetime', 'delivery_datetime_utc', 'external_id', 'eta_time', 'id', 'logistic_status', 'logistic_attemps', 'uuid', 'order_group', 'order_group_id', 'priority', 'summary', 'status', 'time_status', 'total', 'metadata']
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
const [interActionMapOrder, setInterActionMapOrder] = useState(null)
|
|
@@ -256,6 +256,15 @@ export const OrdersCards = (props) => {
|
|
|
256
256
|
<p className={order?.time_status}>{displayDelayedTime(order)}</p>
|
|
257
257
|
</Timer>
|
|
258
258
|
)}
|
|
259
|
+
{ order?.codigoPod && (
|
|
260
|
+
<div style={{paddingTop: 50}}>
|
|
261
|
+
<p>
|
|
262
|
+
{
|
|
263
|
+
`${t('PODS', 'Pod')}: ${order?.codigoPod}`
|
|
264
|
+
}
|
|
265
|
+
</p>
|
|
266
|
+
</div>
|
|
267
|
+
)}
|
|
259
268
|
</CardHeading>
|
|
260
269
|
{isMessagesView && order?.unread_count > 0 && (
|
|
261
270
|
<UnreadMessageCounter>
|
|
@@ -11,7 +11,7 @@ export const OrdersDashboard = (props) => {
|
|
|
11
11
|
...props
|
|
12
12
|
}
|
|
13
13
|
if ((configs?.optimize_order_data && (configs?.optimize_order_data?.value === '1'))) {
|
|
14
|
-
ordersDashboardListProps.propsToFetch = ['app_id', 'business', 'business_id', 'created_at', 'customer', 'customer_id', 'delivery_type', 'driver_group_id', 'driver_id', 'driver', 'delivery_datetime', 'delivery_datetime_utc', 'external_id', 'eta_time', 'id', 'logistic_status', 'logistic_attemps', 'uuid', 'order_group', 'order_group_id', 'priority', 'summary', 'status', 'time_status', 'total', 'driver_group_business']
|
|
14
|
+
ordersDashboardListProps.propsToFetch = ['app_id', 'business', 'business_id', 'created_at', 'customer', 'customer_id', 'delivery_type', 'driver_group_id', 'driver_id', 'driver', 'delivery_datetime', 'delivery_datetime_utc', 'external_id', 'eta_time', 'id', 'logistic_status', 'logistic_attemps', 'uuid', 'order_group', 'order_group_id', 'priority', 'summary', 'status', 'time_status', 'total', 'driver_group_business', 'metadata']
|
|
15
15
|
}
|
|
16
16
|
return (
|
|
17
17
|
<OrdersManageContainer>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { BusinessInfo, CheckBox, CustomerInfo, LogisticStatusDot, OrderNumberContainer, OrdersCountWrapper, PriorityDot, StatusInfo, Timer, Timestatus, WrapperImage, InfoWrapper, ChannelInfo, EtaInfo } from './styles'
|
|
2
|
+
import { BusinessInfo, CheckBox, CustomerInfo, LogisticStatusDot, OrderNumberContainer, OrdersCountWrapper, PriorityDot, StatusInfo, Timer, Timestatus, WrapperImage, InfoWrapper, ChannelInfo, EtaInfo, PodInfo } from './styles'
|
|
3
3
|
import RiCheckboxFill from '@meronex/icons/ri/RiCheckboxFill'
|
|
4
4
|
import RiCheckboxBlankLine from '@meronex/icons/ri/RiCheckboxBlankLine'
|
|
5
5
|
import { useLanguage, useUtils } from 'ordering-components-admin-external'
|
|
@@ -287,11 +287,20 @@ export const Order = React.memo((props) => {
|
|
|
287
287
|
return (
|
|
288
288
|
<td className='channelInfo' key={`channelInfo${i}-${index}`}>
|
|
289
289
|
<ChannelInfo>
|
|
290
|
-
<p className='bold'>{order
|
|
290
|
+
<p className='bold'>{order?.app_id}</p>
|
|
291
291
|
</ChannelInfo>
|
|
292
292
|
</td>
|
|
293
293
|
)
|
|
294
294
|
}
|
|
295
|
+
if (column === 'pod') {
|
|
296
|
+
return (
|
|
297
|
+
<td className='podInfo' key={`podInfo${i}-${index}`}>
|
|
298
|
+
<PodInfo>
|
|
299
|
+
<p className='bold'>{order?.codigoPod}</p>
|
|
300
|
+
</PodInfo>
|
|
301
|
+
</td>
|
|
302
|
+
)
|
|
303
|
+
}
|
|
295
304
|
if (column === 'total') {
|
|
296
305
|
return (
|
|
297
306
|
<td className='orderPrice' key={`total${i}-${index}`}>
|
|
@@ -146,6 +146,10 @@ export const OrdersTable = memo((props) => {
|
|
|
146
146
|
{
|
|
147
147
|
value: 'channel',
|
|
148
148
|
content: t('CHANNEL', 'Channel')
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
value: 'pod',
|
|
152
|
+
content: t('PODS', 'Pod')
|
|
149
153
|
}
|
|
150
154
|
]
|
|
151
155
|
|
|
@@ -263,11 +267,13 @@ export const OrdersTable = memo((props) => {
|
|
|
263
267
|
|
|
264
268
|
const handleChangeAllowColumns = (type) => {
|
|
265
269
|
let _column = {}
|
|
266
|
-
if (type === 'channel'){
|
|
267
|
-
_column = { visable:allowColumns[type]
|
|
268
|
-
}else{
|
|
270
|
+
if (type === 'channel') {
|
|
271
|
+
_column = { visable: allowColumns[type]?.visable ?? false, title: t('CHANNEL', 'Channel'), className: 'channelInfo', draggable: true, colSpan: 1, order: 12 }
|
|
272
|
+
} else if (type === 'pod') {
|
|
273
|
+
_column = { visable: allowColumns[type]?.visable ?? false, title: t('PODS', 'Pod'), className: 'podInfo', draggable: true, colSpan: 1, order: 13 }
|
|
274
|
+
} else {
|
|
269
275
|
_column = allowColumns[type]
|
|
270
|
-
|
|
276
|
+
}
|
|
271
277
|
const updatedAllowColumns = {
|
|
272
278
|
...allowColumns,
|
|
273
279
|
[type]: { ..._column, visable: !_column?.visable }
|
|
@@ -629,6 +635,13 @@ export const OrdersTable = memo((props) => {
|
|
|
629
635
|
</WrapOrderStatusSelector>
|
|
630
636
|
</td>
|
|
631
637
|
)}
|
|
638
|
+
{allowColumns?.pod?.visable && !isSelectedOrders && (
|
|
639
|
+
<td className='orderStatusTitle'>
|
|
640
|
+
<WrapOrderStatusSelector>
|
|
641
|
+
<Skeleton width={100} height={30} />
|
|
642
|
+
</WrapOrderStatusSelector>
|
|
643
|
+
</td>
|
|
644
|
+
)}
|
|
632
645
|
{!isSelectedOrders && (
|
|
633
646
|
<td className='orderPrice'>
|
|
634
647
|
<div className='info'>
|
|
@@ -178,6 +178,7 @@ export const CustomerInfo = styled(BusinessInfo)`
|
|
|
178
178
|
max-width: 125px;
|
|
179
179
|
}
|
|
180
180
|
`
|
|
181
|
+
|
|
181
182
|
export const StatusInfo = styled.div`
|
|
182
183
|
.bold {
|
|
183
184
|
max-width: 150px;
|
|
@@ -185,6 +186,7 @@ export const StatusInfo = styled.div`
|
|
|
185
186
|
margin: 0;
|
|
186
187
|
}
|
|
187
188
|
`
|
|
189
|
+
|
|
188
190
|
export const ChannelInfo = styled.div`
|
|
189
191
|
.bold {
|
|
190
192
|
max-width: 150px;
|
|
@@ -192,6 +194,7 @@ export const ChannelInfo = styled.div`
|
|
|
192
194
|
margin: 0;
|
|
193
195
|
}
|
|
194
196
|
`
|
|
197
|
+
|
|
195
198
|
export const EtaInfo = styled.div`
|
|
196
199
|
.bold {
|
|
197
200
|
max-width: 150px;
|
|
@@ -200,6 +203,14 @@ export const EtaInfo = styled.div`
|
|
|
200
203
|
}
|
|
201
204
|
`
|
|
202
205
|
|
|
206
|
+
export const PodInfo = styled.div`
|
|
207
|
+
.bold {
|
|
208
|
+
max-width: 150px;
|
|
209
|
+
font-weight: 600;
|
|
210
|
+
margin: 0;
|
|
211
|
+
}
|
|
212
|
+
`
|
|
213
|
+
|
|
203
214
|
export const DriversInfo = styled.div`
|
|
204
215
|
.select {
|
|
205
216
|
> div:first-child {
|