contentoh-components-library 21.2.67 → 21.2.68
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.
|
@@ -219,7 +219,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
219
219
|
|
|
220
220
|
var loadProductsByStatus = /*#__PURE__*/function () {
|
|
221
221
|
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(orderByStatus, filter) {
|
|
222
|
-
var _ref5, ordersBydate, ordersByStatus, _ordersByStatus$total, total, _ordersByStatus$R, R, _ordersByStatus$
|
|
222
|
+
var _ref5, ordersBydate, ordersByStatus, _ordersByStatus$total, total, _ordersByStatus$R, R, _ordersByStatus$PA, PA, _ordersByStatus$Ex, Ex, inProcess, metricsArray;
|
|
223
223
|
|
|
224
224
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
225
225
|
while (1) {
|
|
@@ -242,9 +242,9 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
242
242
|
_ref5 = _context3.t0;
|
|
243
243
|
ordersBydate = _ref5.ordersBydate;
|
|
244
244
|
ordersByStatus = _ref5.ordersByStatus;
|
|
245
|
-
_ordersByStatus$total = ordersByStatus.total, total = _ordersByStatus$total === void 0 ? 0 : _ordersByStatus$total, _ordersByStatus$R = ordersByStatus.R, R = _ordersByStatus$R === void 0 ? 0 : _ordersByStatus$R, _ordersByStatus$
|
|
245
|
+
_ordersByStatus$total = ordersByStatus.total, total = _ordersByStatus$total === void 0 ? 0 : _ordersByStatus$total, _ordersByStatus$R = ordersByStatus.R, R = _ordersByStatus$R === void 0 ? 0 : _ordersByStatus$R, _ordersByStatus$PA = ordersByStatus.PA, PA = _ordersByStatus$PA === void 0 ? 0 : _ordersByStatus$PA, _ordersByStatus$Ex = ordersByStatus.Ex, Ex = _ordersByStatus$Ex === void 0 ? 0 : _ordersByStatus$Ex;
|
|
246
246
|
inProcess = Object.keys(ordersByStatus).reduce(function (prev, curr) {
|
|
247
|
-
return !["total", "
|
|
247
|
+
return !["total", "PA", "R", "Ex"].includes(curr) ? prev + ordersByStatus[curr] : prev;
|
|
248
248
|
}, 0);
|
|
249
249
|
metricsArray = [metricsData[0] ? metricsData[0] : {
|
|
250
250
|
label: "Productos totales",
|
|
@@ -261,7 +261,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
261
261
|
value: inProcess
|
|
262
262
|
}, {
|
|
263
263
|
label: "Productos terminados",
|
|
264
|
-
value:
|
|
264
|
+
value: Ex
|
|
265
265
|
});
|
|
266
266
|
setMetricsData(metricsArray);
|
|
267
267
|
setTotalCount(total);
|
package/package.json
CHANGED
|
@@ -81,10 +81,10 @@ export const Dashboard = ({ jwt, user, company }) => {
|
|
|
81
81
|
const { ordersBydate, ordersByStatus } =
|
|
82
82
|
(await loadProductVersions(orderByStatus)) || {};
|
|
83
83
|
|
|
84
|
-
const { total = 0, R = 0,
|
|
84
|
+
const { total = 0, R = 0, PA = 0, Ex = 0 } = ordersByStatus;
|
|
85
85
|
const inProcess = Object.keys(ordersByStatus).reduce(
|
|
86
86
|
(prev, curr) =>
|
|
87
|
-
!["total", "
|
|
87
|
+
!["total", "PA", "R", "Ex"].includes(curr)
|
|
88
88
|
? prev + ordersByStatus[curr]
|
|
89
89
|
: prev,
|
|
90
90
|
0
|
|
@@ -98,7 +98,7 @@ export const Dashboard = ({ jwt, user, company }) => {
|
|
|
98
98
|
{ label: "Productos filtrados", value: total },
|
|
99
99
|
{ label: "Productos sin asignar", value: PA + R },
|
|
100
100
|
{ label: "Productos en proceso", value: inProcess },
|
|
101
|
-
{ label: "Productos terminados", value:
|
|
101
|
+
{ label: "Productos terminados", value: Ex }
|
|
102
102
|
);
|
|
103
103
|
setMetricsData(metricsArray);
|
|
104
104
|
setTotalCount(total);
|