contentoh-components-library 21.6.11 → 21.6.13
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/dist/components/atoms/InputFormatter/index.js +4 -4
- package/dist/components/organisms/FullProductNameHeader/index.js +10 -9
- package/dist/components/pages/ProviderProductEdition/index.js +57 -39
- package/dist/components/pages/ProviderProductEdition/utils.js +3 -3
- package/dist/global-files/data.js +5 -4
- package/package.json +1 -1
- package/src/components/atoms/InputFormatter/index.js +4 -3
- package/src/components/organisms/FullProductNameHeader/index.js +20 -13
- package/src/components/pages/ProviderProductEdition/index.js +93 -66
- package/src/components/pages/ProviderProductEdition/utils.js +8 -4
- package/src/global-files/data.js +2 -1
|
@@ -126,7 +126,7 @@ var InputFormatter = function InputFormatter(_ref) {
|
|
|
126
126
|
return value.replace(/<\/p><p>/gm, "\n").replace(/<\/?br>|<\/?p>/gm, "").replace(/\ /gm, " ").replace(/\&/gm, "&");
|
|
127
127
|
};
|
|
128
128
|
|
|
129
|
-
var _onChange = function onChange(valueInput, h) {
|
|
129
|
+
var _onChange = function onChange(valueInput, h, source) {
|
|
130
130
|
var value = "";
|
|
131
131
|
|
|
132
132
|
try {
|
|
@@ -147,7 +147,7 @@ var InputFormatter = function InputFormatter(_ref) {
|
|
|
147
147
|
|
|
148
148
|
setCharsCounter(h.getLength() - 1);
|
|
149
149
|
value = valueFormater(value);
|
|
150
|
-
updateParentDescriptions(value, aiSuggestionAccepted);
|
|
150
|
+
if (source === "user") updateParentDescriptions(value, aiSuggestionAccepted);
|
|
151
151
|
};
|
|
152
152
|
|
|
153
153
|
var updateParentDescriptions = function updateParentDescriptions(finalValue, isAiAccepted) {
|
|
@@ -261,8 +261,8 @@ var InputFormatter = function InputFormatter(_ref) {
|
|
|
261
261
|
e.preventDefault();
|
|
262
262
|
}
|
|
263
263
|
},
|
|
264
|
-
onChange: function onChange(valueInput,
|
|
265
|
-
return _onChange(valueInput, h);
|
|
264
|
+
onChange: function onChange(valueInput, delta, source, h) {
|
|
265
|
+
return _onChange(valueInput, h, source);
|
|
266
266
|
},
|
|
267
267
|
onChangeSelection: getSelection,
|
|
268
268
|
className: "quill ".concat(hasAiGeneration && "has-ai", " ").concat(isAiActive && "ai-generation")
|
|
@@ -22,7 +22,7 @@ var _react = require("react");
|
|
|
22
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
23
|
|
|
24
24
|
var FullProductNameHeader = function FullProductNameHeader(_ref) {
|
|
25
|
-
var _headerData$article2, _headerData$article3, _headerData$article4, _headerData$article5, _headerData$article6, _headerData$article6$, _headerData$article6$2, _headerData$categoryR2, _headerData$categoryR3, _headerData$article7;
|
|
25
|
+
var _headerData$article2, _headerData$article3, _headerData$article4, _headerData$article5, _headerData$article6, _headerData$article6$, _headerData$article6$2, _headerData$categoryR, _headerData$categoryR2, _headerData$categoryR3, _headerData$categoryR4, _headerData$article7;
|
|
26
26
|
|
|
27
27
|
var headerData = _ref.headerData,
|
|
28
28
|
percent = _ref.percent,
|
|
@@ -38,7 +38,9 @@ var FullProductNameHeader = function FullProductNameHeader(_ref) {
|
|
|
38
38
|
productObservation = _ref.productObservation,
|
|
39
39
|
isObservationVisible = _ref.isObservationVisible,
|
|
40
40
|
toggleObservation = _ref.toggleObservation,
|
|
41
|
-
hideObservation = _ref.hideObservation
|
|
41
|
+
hideObservation = _ref.hideObservation,
|
|
42
|
+
_ref$showStatus = _ref.showStatus,
|
|
43
|
+
showStatus = _ref$showStatus === void 0 ? true : _ref$showStatus;
|
|
42
44
|
|
|
43
45
|
var _useState = (0, _react.useState)([]),
|
|
44
46
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -70,19 +72,18 @@ var FullProductNameHeader = function FullProductNameHeader(_ref) {
|
|
|
70
72
|
};
|
|
71
73
|
|
|
72
74
|
(0, _react.useEffect)(function () {
|
|
73
|
-
var _headerData$article
|
|
75
|
+
var _headerData$article, _source$findIndex;
|
|
74
76
|
|
|
75
|
-
var
|
|
77
|
+
var source = (headerData === null || headerData === void 0 ? void 0 : (_headerData$article = headerData.article) === null || _headerData$article === void 0 ? void 0 : _headerData$article.categoryRetailer) || (headerData === null || headerData === void 0 ? void 0 : headerData.categoryRetailerInOrder) || (headerData === null || headerData === void 0 ? void 0 : headerData.categoryRetailer);
|
|
78
|
+
var index = (_source$findIndex = source === null || source === void 0 ? void 0 : source.findIndex(function (retailer) {
|
|
76
79
|
return (retailer === null || retailer === void 0 ? void 0 : retailer.id_retailer) === (activeRetailer === null || activeRetailer === void 0 ? void 0 : activeRetailer.id);
|
|
77
|
-
})) !== null &&
|
|
78
|
-
return (retailer === null || retailer === void 0 ? void 0 : retailer.retailer_id) === (activeRetailer === null || activeRetailer === void 0 ? void 0 : activeRetailer.id);
|
|
79
|
-
});
|
|
80
|
+
})) !== null && _source$findIndex !== void 0 ? _source$findIndex : -1;
|
|
80
81
|
setRetailerIndex(index);
|
|
81
82
|
}, [activeRetailer]);
|
|
82
83
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
83
84
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ProductNameHeader.ProductNameHeader, {
|
|
84
85
|
productName: (headerData === null || headerData === void 0 ? void 0 : (_headerData$article2 = headerData.article) === null || _headerData$article2 === void 0 ? void 0 : _headerData$article2.name) || (headerData === null || headerData === void 0 ? void 0 : headerData.name),
|
|
85
|
-
statusType: (headerData === null || headerData === void 0 ? void 0 : headerData.version_status) || (headerData === null || headerData === void 0 ? void 0 : headerData.status) || (headerData === null || headerData === void 0 ? void 0 : headerData.article_status),
|
|
86
|
+
statusType: showStatus ? (headerData === null || headerData === void 0 ? void 0 : headerData.version_status) || (headerData === null || headerData === void 0 ? void 0 : headerData.status) || (headerData === null || headerData === void 0 ? void 0 : headerData.article_status) : null,
|
|
86
87
|
percentRequired: percent,
|
|
87
88
|
percent: percent === null || percent === void 0 ? void 0 : percent.toFixed(0),
|
|
88
89
|
priority: headerData === null || headerData === void 0 ? void 0 : headerData.prio,
|
|
@@ -104,7 +105,7 @@ var FullProductNameHeader = function FullProductNameHeader(_ref) {
|
|
|
104
105
|
value: (headerData === null || headerData === void 0 ? void 0 : (_headerData$article5 = headerData.article) === null || _headerData$article5 === void 0 ? void 0 : _headerData$article5.sku) || (headerData === null || headerData === void 0 ? void 0 : headerData.sku)
|
|
105
106
|
}, {
|
|
106
107
|
feature: "Categoría",
|
|
107
|
-
value: (headerData === null || headerData === void 0 ? void 0 : (_headerData$article6 = headerData.article) === null || _headerData$article6 === void 0 ? void 0 : (_headerData$article6$ = _headerData$article6.categoryRetailer) === null || _headerData$article6$ === void 0 ? void 0 : (_headerData$article6$2 = _headerData$article6$[retailerIndex]) === null || _headerData$article6$2 === void 0 ? void 0 : _headerData$article6$2.category_name) || (headerData === null || headerData === void 0 ? void 0 : (_headerData$
|
|
108
|
+
value: ((headerData === null || headerData === void 0 ? void 0 : (_headerData$article6 = headerData.article) === null || _headerData$article6 === void 0 ? void 0 : (_headerData$article6$ = _headerData$article6.categoryRetailer) === null || _headerData$article6$ === void 0 ? void 0 : (_headerData$article6$2 = _headerData$article6$[retailerIndex]) === null || _headerData$article6$2 === void 0 ? void 0 : _headerData$article6$2.category_name) || (headerData === null || headerData === void 0 ? void 0 : (_headerData$categoryR = headerData.categoryRetailerInOrder) === null || _headerData$categoryR === void 0 ? void 0 : (_headerData$categoryR2 = _headerData$categoryR[retailerIndex]) === null || _headerData$categoryR2 === void 0 ? void 0 : _headerData$categoryR2.category) || (headerData === null || headerData === void 0 ? void 0 : (_headerData$categoryR3 = headerData.categoryRetailer) === null || _headerData$categoryR3 === void 0 ? void 0 : (_headerData$categoryR4 = _headerData$categoryR3[retailerIndex]) === null || _headerData$categoryR4 === void 0 ? void 0 : _headerData$categoryR4.category) || headerData.categoryName || "").replace(/\|/g, " | ")
|
|
108
109
|
}, {
|
|
109
110
|
feature: "Prov",
|
|
110
111
|
value: headerData === null || headerData === void 0 ? void 0 : (_headerData$article7 = headerData.article) === null || _headerData$article7 === void 0 ? void 0 : _headerData$article7.company_name
|
|
@@ -84,7 +84,7 @@ var _AiProductEdition = require("../../../contexts/AiProductEdition");
|
|
|
84
84
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
85
85
|
|
|
86
86
|
var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
87
|
-
var _location$state4, _state$product2, _state$product3, _state$product4, _state$product5, _state$product6, _state$product7, _location$state5, _location$state6, _state$active_retaile3, _state$active_retaile4, _state$images_values$2, _state$images_values10, _state$images_values11, _state$active_retaile5, _state$product11, _state$active_retaile6, _state$active_retaile7, _state$active_retaile8, _state$product12, _state$product13, _state$product14, _state$datasheets_inp, _state$datasheets_inp2, _state$product15, _state$images_values12;
|
|
87
|
+
var _location$state4, _state$product2, _state$product3, _state$product4, _state$product5, _state$product6, _state$product7, _location$state5, _location$state6, _state$active_retaile3, _state$active_retaile4, _state$images_values$2, _state$images_values10, _state$images_values11, _state$active_retaile5, _state$product11, _state$active_percent, _state$active_percent2, _state$active_retaile6, _state$active_retaile7, _state$active_retaile8, _state$product12, _state$descriptions_i, _state$product13, _state$product14, _state$datasheets_inp, _state$datasheets_inp2, _state$datasheets_inp3, _state$product15, _state$images_values12;
|
|
88
88
|
|
|
89
89
|
var tabsSections = _ref.tabsSections,
|
|
90
90
|
_ref$productSelected = _ref.productSelected,
|
|
@@ -290,7 +290,7 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
290
290
|
|
|
291
291
|
var fetchData = /*#__PURE__*/function () {
|
|
292
292
|
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
293
|
-
var
|
|
293
|
+
var _ref4, _percentageRaw$, _JSON$parse, _JSON$parse$, _percentageRaw$body, _services$2$inputsByR, _services$2$values, _state$product$percen, data, headers, _yield$Promise$all, _yield$Promise$all2, services, percentageRes, servicesDataRes, percentageRaw, percentages, orderMap, orderedValues, updatedStatusByRetailer, getServiceMinorStatus, imagesMinorStatus, descriptionMinorStatus, datasheetMinorStatus, activePercentage;
|
|
294
294
|
|
|
295
295
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
296
296
|
while (1) {
|
|
@@ -329,7 +329,8 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
329
329
|
services = _yield$Promise$all2[0];
|
|
330
330
|
percentageRes = _yield$Promise$all2[1];
|
|
331
331
|
servicesDataRes = _yield$Promise$all2[2];
|
|
332
|
-
|
|
332
|
+
percentageRaw = percentageRes === null || percentageRes === void 0 ? void 0 : percentageRes[0];
|
|
333
|
+
percentages = (_ref4 = Array.isArray(percentageRaw) ? (_percentageRaw$ = percentageRaw[0]) === null || _percentageRaw$ === void 0 ? void 0 : _percentageRaw$.relations : (_JSON$parse = JSON.parse((_percentageRaw$body = percentageRaw === null || percentageRaw === void 0 ? void 0 : percentageRaw.body) !== null && _percentageRaw$body !== void 0 ? _percentageRaw$body : "null")) === null || _JSON$parse === void 0 ? void 0 : (_JSON$parse$ = _JSON$parse[0]) === null || _JSON$parse$ === void 0 ? void 0 : _JSON$parse$.relations) !== null && _ref4 !== void 0 ? _ref4 : [];
|
|
333
334
|
orderMap = (_services$2$inputsByR = services[2].inputsByRetailer) !== null && _services$2$inputsByR !== void 0 ? _services$2$inputsByR : [].flat().reduce(function (acc, item) {
|
|
334
335
|
acc[item.id_image] = item.order;
|
|
335
336
|
return acc;
|
|
@@ -394,18 +395,22 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
394
395
|
type: "SET_PERCENTAGES",
|
|
395
396
|
payload: percentages
|
|
396
397
|
});
|
|
398
|
+
activePercentage = percentages.find(function (_ref5) {
|
|
399
|
+
var rId = _ref5.id_retailer;
|
|
400
|
+
return rId === id_retailer;
|
|
401
|
+
}) || ((_state$product$percen = state.product.percentages) === null || _state$product$percen === void 0 ? void 0 : _state$product$percen.find(function (_ref6) {
|
|
402
|
+
var rId = _ref6.id_retailer;
|
|
403
|
+
return rId === id_retailer;
|
|
404
|
+
}));
|
|
397
405
|
dispatch({
|
|
398
406
|
type: "SET_ACTIVE_PERCENTAGES",
|
|
399
|
-
payload:
|
|
400
|
-
var rId = _ref4.id_retailer;
|
|
401
|
-
return rId === id_retailer;
|
|
402
|
-
})
|
|
407
|
+
payload: activePercentage
|
|
403
408
|
});
|
|
404
|
-
_context2.next =
|
|
409
|
+
_context2.next = 32;
|
|
405
410
|
break;
|
|
406
411
|
|
|
407
|
-
case
|
|
408
|
-
_context2.prev =
|
|
412
|
+
case 28:
|
|
413
|
+
_context2.prev = 28;
|
|
409
414
|
_context2.t0 = _context2["catch"](1);
|
|
410
415
|
console.error("Error fetching data:", _context2.t0);
|
|
411
416
|
dispatch({
|
|
@@ -413,20 +418,20 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
413
418
|
payload: _context2.t0
|
|
414
419
|
});
|
|
415
420
|
|
|
416
|
-
case
|
|
417
|
-
_context2.prev =
|
|
421
|
+
case 32:
|
|
422
|
+
_context2.prev = 32;
|
|
418
423
|
dispatch({
|
|
419
424
|
type: "SET_LOADING",
|
|
420
425
|
payload: false
|
|
421
426
|
});
|
|
422
|
-
return _context2.finish(
|
|
427
|
+
return _context2.finish(32);
|
|
423
428
|
|
|
424
|
-
case
|
|
429
|
+
case 35:
|
|
425
430
|
case "end":
|
|
426
431
|
return _context2.stop();
|
|
427
432
|
}
|
|
428
433
|
}
|
|
429
|
-
}, _callee2, null, [[1,
|
|
434
|
+
}, _callee2, null, [[1, 28, 32, 35]]);
|
|
430
435
|
}));
|
|
431
436
|
|
|
432
437
|
return function fetchData() {
|
|
@@ -446,13 +451,21 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
446
451
|
|
|
447
452
|
if (state.services.datasheets) {
|
|
448
453
|
var retailerDatasheets = state.services.datasheets[state.active_retailer.id_retailer];
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
454
|
+
|
|
455
|
+
if (retailerDatasheets) {
|
|
456
|
+
var datasheetsActiveRetailer = (0, _objectSpread4.default)((0, _objectSpread4.default)({}, retailerDatasheets), {}, {
|
|
457
|
+
data: Object.values(retailerDatasheets.data)
|
|
458
|
+
});
|
|
459
|
+
dispatch({
|
|
460
|
+
type: "SET_DATASHEETS_INPUTS",
|
|
461
|
+
payload: [datasheetsActiveRetailer, state.services.datasheets.inputs]
|
|
462
|
+
});
|
|
463
|
+
} else {
|
|
464
|
+
dispatch({
|
|
465
|
+
type: "SET_DATASHEETS_INPUTS",
|
|
466
|
+
payload: []
|
|
467
|
+
});
|
|
468
|
+
}
|
|
456
469
|
}
|
|
457
470
|
|
|
458
471
|
if (state.services.descriptions) {
|
|
@@ -831,7 +844,7 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
831
844
|
};
|
|
832
845
|
|
|
833
846
|
var sendEvaluation = /*#__PURE__*/function () {
|
|
834
|
-
var
|
|
847
|
+
var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(result) {
|
|
835
848
|
var _state$product$id_ord, _state$active_retaile2, _state$product$status, _state$product$status2, _state$product10;
|
|
836
849
|
|
|
837
850
|
var concept, articleId, orderId, retailerId, evalStatus, data, _newStatuses$newStatu, _state$services_data, res, newStatuses, serviceStatus, updatedStatusByRetailer, updatedProduct, updatedServicesData;
|
|
@@ -943,12 +956,12 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
943
956
|
}));
|
|
944
957
|
|
|
945
958
|
return function sendEvaluation(_x2) {
|
|
946
|
-
return
|
|
959
|
+
return _ref7.apply(this, arguments);
|
|
947
960
|
};
|
|
948
961
|
}();
|
|
949
962
|
|
|
950
963
|
var evaluationToRetailer = /*#__PURE__*/function () {
|
|
951
|
-
var
|
|
964
|
+
var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(result) {
|
|
952
965
|
var data, statusComplete, updatedProduct;
|
|
953
966
|
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
954
967
|
while (1) {
|
|
@@ -1029,7 +1042,7 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
1029
1042
|
}));
|
|
1030
1043
|
|
|
1031
1044
|
return function evaluationToRetailer(_x3) {
|
|
1032
|
-
return
|
|
1045
|
+
return _ref8.apply(this, arguments);
|
|
1033
1046
|
};
|
|
1034
1047
|
}();
|
|
1035
1048
|
|
|
@@ -1160,7 +1173,7 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
1160
1173
|
};
|
|
1161
1174
|
|
|
1162
1175
|
var handleOnEvaluateAll = /*#__PURE__*/function () {
|
|
1163
|
-
var
|
|
1176
|
+
var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(result) {
|
|
1164
1177
|
var _state$product$id_ord2, _state$services_data2, evaluationArray, conceptArray, dataGeneral, isProvider, userType, status, updatedStatusByRetailer, updatedProduct;
|
|
1165
1178
|
|
|
1166
1179
|
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
@@ -1282,7 +1295,7 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
1282
1295
|
}));
|
|
1283
1296
|
|
|
1284
1297
|
return function handleOnEvaluateAll(_x4) {
|
|
1285
|
-
return
|
|
1298
|
+
return _ref9.apply(this, arguments);
|
|
1286
1299
|
};
|
|
1287
1300
|
}();
|
|
1288
1301
|
|
|
@@ -1488,7 +1501,7 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
1488
1501
|
className: "product-information",
|
|
1489
1502
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_FullProductNameHeader.FullProductNameHeader, {
|
|
1490
1503
|
headerData: state.product,
|
|
1491
|
-
percent: state.active_percentage.percentagesGeneral.required,
|
|
1504
|
+
percent: (_state$active_percent = state.active_percentage) === null || _state$active_percent === void 0 ? void 0 : (_state$active_percent2 = _state$active_percent.percentagesGeneral) === null || _state$active_percent2 === void 0 ? void 0 : _state$active_percent2.required,
|
|
1492
1505
|
activeRetailer: {
|
|
1493
1506
|
id: (_state$active_retaile6 = state.active_retailer) === null || _state$active_retaile6 === void 0 ? void 0 : _state$active_retaile6.id_retailer,
|
|
1494
1507
|
name: (_state$active_retaile7 = state.active_retailer) === null || _state$active_retaile7 === void 0 ? void 0 : _state$active_retaile7.retailer,
|
|
@@ -1503,7 +1516,8 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
1503
1516
|
return handleOnSendEvaluation("A");
|
|
1504
1517
|
},
|
|
1505
1518
|
reject: handleOnReject,
|
|
1506
|
-
setActiveRetailer: handleOnChangeActiveRetailer
|
|
1519
|
+
setActiveRetailer: handleOnChangeActiveRetailer,
|
|
1520
|
+
showStatus: false
|
|
1507
1521
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FullTabsMenu.FullTabsMenu, {
|
|
1508
1522
|
tabsSections: tabsSections,
|
|
1509
1523
|
status: getStatusByCurrentServiceAndRetailer(),
|
|
@@ -1535,7 +1549,7 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
1535
1549
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1536
1550
|
className: "services-information-container " + (imageLayout && state.active_tab === "Imágenes" ? "image-services" : ""),
|
|
1537
1551
|
children: state.saving ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Loading.Loading, {}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
1538
|
-
children: [state.active_tab === "Descripción" && (((_state$product12 = state.product) === null || _state$product12 === void 0 ? void 0 : _state$product12.description_status) !== "NS" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputGroup.InputGroup, {
|
|
1552
|
+
children: [state.active_tab === "Descripción" && (((_state$product12 = state.product) === null || _state$product12 === void 0 ? void 0 : _state$product12.description_status) !== "NS" ? (_state$descriptions_i = state.descriptions_inputs) !== null && _state$descriptions_i !== void 0 && _state$descriptions_i[0] ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputGroup.InputGroup, {
|
|
1539
1553
|
activeSection: state.active_tab,
|
|
1540
1554
|
inputGroup: state.descriptions_inputs[0],
|
|
1541
1555
|
updatedDescriptions: state.updated_descriptions_inputs,
|
|
@@ -1544,14 +1558,16 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
1544
1558
|
isShowbox: false,
|
|
1545
1559
|
dinamicHeight: true,
|
|
1546
1560
|
setUpdatedDescriptions: handleOnSetUpdatedDescriptions,
|
|
1547
|
-
updateApprovedInputs: handleOnUpdateApprovedInputs
|
|
1548
|
-
|
|
1561
|
+
updateApprovedInputs: handleOnUpdateApprovedInputs
|
|
1562
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
1563
|
+
text: "No hay descripción para esta cadena",
|
|
1564
|
+
headerType: "input-name-header"
|
|
1549
1565
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
1550
1566
|
text: "No cuentas con este servicio",
|
|
1551
1567
|
headerType: "input-name-header"
|
|
1552
1568
|
})), state.active_tab === "Ficha técnica" && (((_state$product14 = state.product) === null || _state$product14 === void 0 ? void 0 : _state$product14.datasheet_status) !== "NS" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
1553
|
-
children: (_state$datasheets_inp = state.datasheets_inputs
|
|
1554
|
-
var _state$
|
|
1569
|
+
children: ((_state$datasheets_inp = state.datasheets_inputs) === null || _state$datasheets_inp === void 0 ? void 0 : (_state$datasheets_inp2 = _state$datasheets_inp[0]) === null || _state$datasheets_inp2 === void 0 ? void 0 : (_state$datasheets_inp3 = _state$datasheets_inp2.data) === null || _state$datasheets_inp3 === void 0 ? void 0 : _state$datasheets_inp3.length) > 0 ? state.datasheets_inputs[0].data.map(function (dataGroup, index) {
|
|
1570
|
+
var _state$datasheets_inp4, _state$services$datas;
|
|
1555
1571
|
|
|
1556
1572
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputGroup.InputGroup, {
|
|
1557
1573
|
index: index,
|
|
@@ -1559,18 +1575,20 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
1559
1575
|
version: state.version,
|
|
1560
1576
|
activeSection: state.active_tab,
|
|
1561
1577
|
inputGroup: dataGroup,
|
|
1562
|
-
dataInputs: (_state$
|
|
1578
|
+
dataInputs: (_state$datasheets_inp4 = state.datasheets_inputs[1]) !== null && _state$datasheets_inp4 !== void 0 ? _state$datasheets_inp4 : [],
|
|
1563
1579
|
activeRetailer: state.services.datasheets[state.active_retailer.id_retailer],
|
|
1564
|
-
groupData: state.services.datasheets[state.active_retailer.id_retailer].data,
|
|
1580
|
+
groupData: (_state$services$datas = state.services.datasheets[state.active_retailer.id_retailer]) === null || _state$services$datas === void 0 ? void 0 : _state$services$datas.data,
|
|
1565
1581
|
updatedDatasheets: state.updated_datasheets_inputs,
|
|
1566
1582
|
setUpdatedDatasheets: handleOnSetUpdatedDatasheets,
|
|
1567
1583
|
isShowbox: true,
|
|
1568
1584
|
setUpdatedBoxData: function setUpdatedBoxData(e) {
|
|
1569
1585
|
setBoxData(e);
|
|
1570
1586
|
},
|
|
1571
|
-
updateApprovedInputs: handleOnUpdateApprovedInputs
|
|
1572
|
-
|
|
1587
|
+
updateApprovedInputs: handleOnUpdateApprovedInputs
|
|
1573
1588
|
}, index + "-" + state.active_retailer.retailer);
|
|
1589
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
1590
|
+
text: "No hay ficha técnica para esta cadena",
|
|
1591
|
+
headerType: "input-name-header"
|
|
1574
1592
|
})
|
|
1575
1593
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
1576
1594
|
text: "No cuentas con este servicio",
|
|
@@ -25,9 +25,9 @@ var normalizeProduct = function normalizeProduct(product) {
|
|
|
25
25
|
var retailersIdsFromStatusByRetailer = Object.keys(productData.statusByRetailer || {}).map(function (id) {
|
|
26
26
|
return parseInt(id, 10);
|
|
27
27
|
});
|
|
28
|
-
var categoryRetailerInOrder = categoryRetailerNormalized.filter(function (rel) {
|
|
28
|
+
var categoryRetailerInOrder = categoryRetailerNormalized ? retailersIdsFromStatusByRetailer.length > 0 ? categoryRetailerNormalized.filter(function (rel) {
|
|
29
29
|
return retailersIdsFromStatusByRetailer.includes(rel.id_retailer);
|
|
30
|
-
});
|
|
30
|
+
}) : categoryRetailerNormalized : [];
|
|
31
31
|
return {
|
|
32
32
|
// from products
|
|
33
33
|
id_article: productData.id_article || article.id_article || 0,
|
|
@@ -44,7 +44,7 @@ var normalizeProduct = function normalizeProduct(product) {
|
|
|
44
44
|
summary: productData.summary || null,
|
|
45
45
|
version: productData.version || 0,
|
|
46
46
|
// from tasks
|
|
47
|
-
id_order: productData.orderId ||
|
|
47
|
+
id_order: productData.orderId || null,
|
|
48
48
|
status: productData.statusByRetailer ? (0, _statusDictionary.getMinorStatusFromRetailerMap)(productData.statusByRetailer) : productData.status || null,
|
|
49
49
|
datasheet_status: productData.datasheet_status || null,
|
|
50
50
|
description_status: productData.description_status || null,
|
|
@@ -297,9 +297,9 @@ exports.getNewStatus = getNewStatus;
|
|
|
297
297
|
|
|
298
298
|
var getServicesData = /*#__PURE__*/function () {
|
|
299
299
|
var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(_ref5) {
|
|
300
|
-
var _servicesResponse$dat;
|
|
300
|
+
var _servicesResponse$dat, _JSON$parse$data;
|
|
301
301
|
|
|
302
|
-
var articleId, orderId, end, token, servicesResponse;
|
|
302
|
+
var articleId, orderId, end, token, servicesResponse, body;
|
|
303
303
|
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
304
304
|
while (1) {
|
|
305
305
|
switch (_context5.prev = _context5.next) {
|
|
@@ -319,9 +319,10 @@ var getServicesData = /*#__PURE__*/function () {
|
|
|
319
319
|
|
|
320
320
|
case 3:
|
|
321
321
|
servicesResponse = _context5.sent;
|
|
322
|
-
|
|
322
|
+
body = servicesResponse === null || servicesResponse === void 0 ? void 0 : (_servicesResponse$dat = servicesResponse.data) === null || _servicesResponse$dat === void 0 ? void 0 : _servicesResponse$dat.body;
|
|
323
|
+
return _context5.abrupt("return", body ? (_JSON$parse$data = JSON.parse(body).data) !== null && _JSON$parse$data !== void 0 ? _JSON$parse$data : [] : []);
|
|
323
324
|
|
|
324
|
-
case
|
|
325
|
+
case 6:
|
|
325
326
|
case "end":
|
|
326
327
|
return _context5.stop();
|
|
327
328
|
}
|
package/package.json
CHANGED
|
@@ -75,7 +75,7 @@ export const InputFormatter = ({
|
|
|
75
75
|
.replace(/\&/gm, "&");
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
-
const onChange = (valueInput, h) => {
|
|
78
|
+
const onChange = (valueInput, h, source) => {
|
|
79
79
|
let value = "";
|
|
80
80
|
try {
|
|
81
81
|
if (h.getLength() - 1 <= maxLength) {
|
|
@@ -99,7 +99,7 @@ export const InputFormatter = ({
|
|
|
99
99
|
setCharsCounter(h.getLength() - 1);
|
|
100
100
|
value = valueFormater(value);
|
|
101
101
|
|
|
102
|
-
updateParentDescriptions(value, aiSuggestionAccepted);
|
|
102
|
+
if (source === "user") updateParentDescriptions(value, aiSuggestionAccepted);
|
|
103
103
|
};
|
|
104
104
|
|
|
105
105
|
const updateParentDescriptions = (finalValue, isAiAccepted) => {
|
|
@@ -231,9 +231,10 @@ export const InputFormatter = ({
|
|
|
231
231
|
e.preventDefault();
|
|
232
232
|
}
|
|
233
233
|
}}
|
|
234
|
-
onChange={(valueInput,
|
|
234
|
+
onChange={(valueInput, delta, source, h) => onChange(valueInput, h, source)}
|
|
235
235
|
onChangeSelection={getSelection}
|
|
236
236
|
className={`quill ${hasAiGeneration && "has-ai"} ${isAiActive && "ai-generation"}`}
|
|
237
|
+
|
|
237
238
|
/>
|
|
238
239
|
}
|
|
239
240
|
{
|
|
@@ -22,6 +22,7 @@ export const FullProductNameHeader = ({
|
|
|
22
22
|
toggleObservation,
|
|
23
23
|
// handleClickOutside,
|
|
24
24
|
hideObservation,
|
|
25
|
+
showStatus = true,
|
|
25
26
|
}) => {
|
|
26
27
|
const [retailers, setRetailers] = useState([]);
|
|
27
28
|
const [retailerIndex, setRetailerIndex] = useState(null);
|
|
@@ -45,13 +46,14 @@ export const FullProductNameHeader = ({
|
|
|
45
46
|
};
|
|
46
47
|
|
|
47
48
|
useEffect(() => {
|
|
48
|
-
const
|
|
49
|
-
headerData?.article?.categoryRetailer
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
)
|
|
49
|
+
const source =
|
|
50
|
+
headerData?.article?.categoryRetailer ||
|
|
51
|
+
headerData?.categoryRetailerInOrder ||
|
|
52
|
+
headerData?.categoryRetailer;
|
|
53
|
+
|
|
54
|
+
const index = source?.findIndex(
|
|
55
|
+
(retailer) => retailer?.id_retailer === activeRetailer?.id
|
|
56
|
+
) ?? -1;
|
|
55
57
|
|
|
56
58
|
setRetailerIndex(index);
|
|
57
59
|
}, [activeRetailer]);
|
|
@@ -61,9 +63,11 @@ export const FullProductNameHeader = ({
|
|
|
61
63
|
<ProductNameHeader
|
|
62
64
|
productName={headerData?.article?.name || headerData?.name}
|
|
63
65
|
statusType={
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
showStatus
|
|
67
|
+
? headerData?.version_status ||
|
|
68
|
+
headerData?.status ||
|
|
69
|
+
headerData?.article_status
|
|
70
|
+
: null
|
|
67
71
|
}
|
|
68
72
|
percentRequired={percent}
|
|
69
73
|
percent={percent?.toFixed(0)}
|
|
@@ -89,11 +93,14 @@ export const FullProductNameHeader = ({
|
|
|
89
93
|
},
|
|
90
94
|
{
|
|
91
95
|
feature: "Categoría",
|
|
92
|
-
value:
|
|
96
|
+
value: (
|
|
93
97
|
headerData?.article?.categoryRetailer?.[retailerIndex]
|
|
94
98
|
?.category_name ||
|
|
95
|
-
headerData?.
|
|
96
|
-
headerData
|
|
99
|
+
headerData?.categoryRetailerInOrder?.[retailerIndex]?.category ||
|
|
100
|
+
headerData?.categoryRetailer?.[retailerIndex]?.category ||
|
|
101
|
+
headerData.categoryName ||
|
|
102
|
+
""
|
|
103
|
+
).replace(/\|/g, " | "),
|
|
97
104
|
},
|
|
98
105
|
{
|
|
99
106
|
feature: "Prov",
|
|
@@ -238,8 +238,12 @@ const ProviderProductEditionView = ({
|
|
|
238
238
|
}),
|
|
239
239
|
]);
|
|
240
240
|
|
|
241
|
-
const
|
|
242
|
-
|
|
241
|
+
const percentageRaw = percentageRes?.[0];
|
|
242
|
+
const percentages = (
|
|
243
|
+
Array.isArray(percentageRaw)
|
|
244
|
+
? percentageRaw[0]?.relations
|
|
245
|
+
: JSON.parse(percentageRaw?.body ?? "null")?.[0]?.relations
|
|
246
|
+
) ?? [];
|
|
243
247
|
|
|
244
248
|
const orderMap =
|
|
245
249
|
services[2].inputsByRetailer ??
|
|
@@ -307,11 +311,15 @@ const ProviderProductEditionView = ({
|
|
|
307
311
|
|
|
308
312
|
dispatch({ type: "SET_PERCENTAGES", payload: percentages });
|
|
309
313
|
|
|
314
|
+
const activePercentage =
|
|
315
|
+
percentages.find(({ id_retailer: rId }) => rId === id_retailer) ||
|
|
316
|
+
state.product.percentages?.find(
|
|
317
|
+
({ id_retailer: rId }) => rId === id_retailer,
|
|
318
|
+
);
|
|
319
|
+
|
|
310
320
|
dispatch({
|
|
311
321
|
type: "SET_ACTIVE_PERCENTAGES",
|
|
312
|
-
payload:
|
|
313
|
-
({ id_retailer: rId }) => rId === id_retailer,
|
|
314
|
-
),
|
|
322
|
+
payload: activePercentage,
|
|
315
323
|
});
|
|
316
324
|
} catch (error) {
|
|
317
325
|
console.error("Error fetching data:", error);
|
|
@@ -343,14 +351,18 @@ const ProviderProductEditionView = ({
|
|
|
343
351
|
if (state.services.datasheets) {
|
|
344
352
|
const retailerDatasheets =
|
|
345
353
|
state.services.datasheets[state.active_retailer.id_retailer];
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
+
if (retailerDatasheets) {
|
|
355
|
+
const datasheetsActiveRetailer = {
|
|
356
|
+
...retailerDatasheets,
|
|
357
|
+
data: Object.values(retailerDatasheets.data),
|
|
358
|
+
};
|
|
359
|
+
dispatch({
|
|
360
|
+
type: "SET_DATASHEETS_INPUTS",
|
|
361
|
+
payload: [datasheetsActiveRetailer, state.services.datasheets.inputs],
|
|
362
|
+
});
|
|
363
|
+
} else {
|
|
364
|
+
dispatch({ type: "SET_DATASHEETS_INPUTS", payload: [] });
|
|
365
|
+
}
|
|
354
366
|
}
|
|
355
367
|
|
|
356
368
|
if (state.services.descriptions) {
|
|
@@ -1319,7 +1331,7 @@ const ProviderProductEditionView = ({
|
|
|
1319
1331
|
<div className="product-information">
|
|
1320
1332
|
<FullProductNameHeader
|
|
1321
1333
|
headerData={state.product}
|
|
1322
|
-
percent={state.active_percentage
|
|
1334
|
+
percent={state.active_percentage?.percentagesGeneral?.required}
|
|
1323
1335
|
activeRetailer={{
|
|
1324
1336
|
id: state.active_retailer?.id_retailer,
|
|
1325
1337
|
name: state.active_retailer?.retailer,
|
|
@@ -1333,6 +1345,7 @@ const ProviderProductEditionView = ({
|
|
|
1333
1345
|
approve={() => handleOnSendEvaluation("A")}
|
|
1334
1346
|
reject={handleOnReject}
|
|
1335
1347
|
setActiveRetailer={handleOnChangeActiveRetailer}
|
|
1348
|
+
showStatus={false}
|
|
1336
1349
|
/>
|
|
1337
1350
|
<FullTabsMenu
|
|
1338
1351
|
tabsSections={tabsSections}
|
|
@@ -1375,21 +1388,28 @@ const ProviderProductEditionView = ({
|
|
|
1375
1388
|
<>
|
|
1376
1389
|
{state.active_tab === "Descripción" &&
|
|
1377
1390
|
(state.product?.description_status !== "NS" ? (
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1391
|
+
state.descriptions_inputs?.[0] ? (
|
|
1392
|
+
<InputGroup
|
|
1393
|
+
activeSection={state.active_tab}
|
|
1394
|
+
inputGroup={state.descriptions_inputs[0]}
|
|
1395
|
+
updatedDescriptions={
|
|
1396
|
+
state.updated_descriptions_inputs
|
|
1397
|
+
}
|
|
1398
|
+
articleId={state.product?.id_article}
|
|
1399
|
+
version={state.product.version}
|
|
1400
|
+
isShowbox={false}
|
|
1401
|
+
dinamicHeight={true}
|
|
1402
|
+
setUpdatedDescriptions={
|
|
1403
|
+
handleOnSetUpdatedDescriptions
|
|
1404
|
+
}
|
|
1405
|
+
updateApprovedInputs={handleOnUpdateApprovedInputs}
|
|
1406
|
+
/>
|
|
1407
|
+
) : (
|
|
1408
|
+
<ScreenHeader
|
|
1409
|
+
text={"No hay descripción para esta cadena"}
|
|
1410
|
+
headerType={"input-name-header"}
|
|
1411
|
+
/>
|
|
1412
|
+
)
|
|
1393
1413
|
) : (
|
|
1394
1414
|
<ScreenHeader
|
|
1395
1415
|
text={"No cuentas con este servicio"}
|
|
@@ -1400,43 +1420,50 @@ const ProviderProductEditionView = ({
|
|
|
1400
1420
|
{state.active_tab === "Ficha técnica" &&
|
|
1401
1421
|
(state.product?.datasheet_status !== "NS" ? (
|
|
1402
1422
|
<>
|
|
1403
|
-
{state.datasheets_inputs[0]?.data?.
|
|
1404
|
-
(
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
state.
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
state.
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1423
|
+
{state.datasheets_inputs?.[0]?.data?.length > 0 ? (
|
|
1424
|
+
state.datasheets_inputs[0].data.map(
|
|
1425
|
+
(dataGroup, index) => (
|
|
1426
|
+
<InputGroup
|
|
1427
|
+
index={index}
|
|
1428
|
+
key={
|
|
1429
|
+
index + "-" + state.active_retailer.retailer
|
|
1430
|
+
}
|
|
1431
|
+
articleId={state.product.id_article}
|
|
1432
|
+
version={state.version}
|
|
1433
|
+
activeSection={state.active_tab}
|
|
1434
|
+
inputGroup={dataGroup}
|
|
1435
|
+
dataInputs={state.datasheets_inputs[1] ?? []}
|
|
1436
|
+
activeRetailer={
|
|
1437
|
+
state.services.datasheets[
|
|
1438
|
+
state.active_retailer.id_retailer
|
|
1439
|
+
]
|
|
1440
|
+
}
|
|
1441
|
+
groupData={
|
|
1442
|
+
state.services.datasheets[
|
|
1443
|
+
state.active_retailer.id_retailer
|
|
1444
|
+
]?.data
|
|
1445
|
+
}
|
|
1446
|
+
updatedDatasheets={
|
|
1447
|
+
state.updated_datasheets_inputs
|
|
1448
|
+
}
|
|
1449
|
+
setUpdatedDatasheets={
|
|
1450
|
+
handleOnSetUpdatedDatasheets
|
|
1451
|
+
}
|
|
1452
|
+
isShowbox={true}
|
|
1453
|
+
setUpdatedBoxData={(e) => {
|
|
1454
|
+
setBoxData(e);
|
|
1455
|
+
}}
|
|
1456
|
+
updateApprovedInputs={
|
|
1457
|
+
handleOnUpdateApprovedInputs
|
|
1458
|
+
}
|
|
1459
|
+
/>
|
|
1460
|
+
),
|
|
1461
|
+
)
|
|
1462
|
+
) : (
|
|
1463
|
+
<ScreenHeader
|
|
1464
|
+
text={"No hay ficha técnica para esta cadena"}
|
|
1465
|
+
headerType={"input-name-header"}
|
|
1466
|
+
/>
|
|
1440
1467
|
)}
|
|
1441
1468
|
</>
|
|
1442
1469
|
) : (
|
|
@@ -24,9 +24,13 @@ export const normalizeProduct = (product) => {
|
|
|
24
24
|
productData.statusByRetailer || {}
|
|
25
25
|
).map((id) => parseInt(id, 10));
|
|
26
26
|
|
|
27
|
-
const categoryRetailerInOrder = categoryRetailerNormalized
|
|
28
|
-
retailersIdsFromStatusByRetailer.
|
|
29
|
-
|
|
27
|
+
const categoryRetailerInOrder = categoryRetailerNormalized
|
|
28
|
+
? retailersIdsFromStatusByRetailer.length > 0
|
|
29
|
+
? categoryRetailerNormalized.filter((rel) =>
|
|
30
|
+
retailersIdsFromStatusByRetailer.includes(rel.id_retailer)
|
|
31
|
+
)
|
|
32
|
+
: categoryRetailerNormalized
|
|
33
|
+
: [];
|
|
30
34
|
|
|
31
35
|
return {
|
|
32
36
|
// from products
|
|
@@ -45,7 +49,7 @@ export const normalizeProduct = (product) => {
|
|
|
45
49
|
version: productData.version || 0,
|
|
46
50
|
|
|
47
51
|
// from tasks
|
|
48
|
-
id_order: productData.orderId ||
|
|
52
|
+
id_order: productData.orderId || null,
|
|
49
53
|
status: productData.statusByRetailer
|
|
50
54
|
? getMinorStatusFromRetailerMap(productData.statusByRetailer)
|
|
51
55
|
: productData.status || null,
|
package/src/global-files/data.js
CHANGED
|
@@ -201,5 +201,6 @@ export const getServicesData = async ({ articleId, orderId, end, token }) => {
|
|
|
201
201
|
}
|
|
202
202
|
);
|
|
203
203
|
|
|
204
|
-
|
|
204
|
+
const body = servicesResponse?.data?.body;
|
|
205
|
+
return body ? JSON.parse(body).data ?? [] : [];
|
|
205
206
|
};
|