contentoh-components-library 21.4.83 → 21.4.85

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.
Files changed (26) hide show
  1. package/dist/components/atoms/TabSection/styles.js +1 -1
  2. package/dist/components/molecules/ProductNameHeader/index.js +8 -3
  3. package/dist/components/organisms/EditGroup/index.js +0 -11
  4. package/dist/components/organisms/FullProductNameHeader/index.js +3 -1
  5. package/dist/components/organisms/VersionSelector/index.js +101 -169
  6. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +55 -74
  7. package/dist/components/pages/ProviderProductEdition/index.js +88 -66
  8. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +47 -52
  9. package/dist/components/pages/RetailerProductEdition/index.js +101 -177
  10. package/dist/global-files/data.js +11 -26
  11. package/package.json +2 -1
  12. package/src/components/atoms/GeneralButton/styles.js +1 -0
  13. package/src/components/atoms/ObservationFlag/ObservationFlag.stories.js +20 -0
  14. package/src/components/atoms/ObservationFlag/index.js +33 -0
  15. package/src/components/atoms/ObservationFlag/styles.js +3 -0
  16. package/src/components/atoms/TabSection/index.js +1 -1
  17. package/src/components/atoms/TabSection/styles.js +1 -4
  18. package/src/components/molecules/ProductNameHeader/index.js +5 -1
  19. package/src/components/organisms/EditGroup/index.js +0 -8
  20. package/src/components/organisms/FullProductNameHeader/index.js +2 -0
  21. package/src/components/organisms/VersionSelector/index.js +100 -100
  22. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +73 -86
  23. package/src/components/pages/ProviderProductEdition/index.js +38 -23
  24. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +48 -52
  25. package/src/components/pages/RetailerProductEdition/index.js +32 -144
  26. package/src/global-files/data.js +7 -33
@@ -162,29 +162,37 @@ var reducerImages = function reducerImages(state, action) {
162
162
 
163
163
  case "orderImages":
164
164
  {
165
- var _inputsByRetailer = state.inputsByRetailer,
165
+ var _state$inputsByRetail = state.inputsByRetailer,
166
+ _inputsByRetailer = _state$inputsByRetail === void 0 ? {} : _state$inputsByRetail,
166
167
  valuesInitial = state.valuesInitial,
167
168
  inputsInitial = state.inputsInitial,
168
169
  inputs = state.inputs;
169
170
 
170
171
  try {
171
- var _inputsByRetailer$act;
172
-
173
172
  var orderedImages = [];
174
173
  var imageIdArray = [];
175
- if (action !== null && action !== void 0 && action.retailerId && !_inputsByRetailer[action.retailerId]) _inputsByRetailer[action.retailerId] = [];
176
- action.retailerId && ((_inputsByRetailer$act = _inputsByRetailer[action.retailerId]) === null || _inputsByRetailer$act === void 0 ? void 0 : _inputsByRetailer$act.filter(function (input) {
177
- imageIdArray.push(input.id_image);
178
- valuesInitial.forEach(function (value) {
179
- if (value.image_id === input.id_image) orderedImages.push(value);
174
+
175
+ if (action !== null && action !== void 0 && action.retailerId && !_inputsByRetailer[action.retailerId]) {
176
+ _inputsByRetailer[action.retailerId] = [];
177
+ }
178
+
179
+ if (action.retailerId) {
180
+ var _inputsByRetailer$act;
181
+
182
+ (_inputsByRetailer$act = _inputsByRetailer[action.retailerId]) === null || _inputsByRetailer$act === void 0 ? void 0 : _inputsByRetailer$act.filter(function (input) {
183
+ imageIdArray.push(input.id_image);
184
+ valuesInitial.forEach(function (value) {
185
+ if (value.image_id === input.id_image) orderedImages.push(value);
186
+ });
180
187
  });
181
- }));
188
+ }
189
+
182
190
  inputs = inputsInitial === null || inputsInitial === void 0 ? void 0 : inputsInitial.filter(function (input) {
183
191
  return imageIdArray.includes(input.id);
184
192
  });
185
193
  values = orderedImages.length > 0 ? orderedImages : [];
186
194
  } catch (error) {
187
- console.log(error);
195
+ console.log(action.action, error);
188
196
  }
189
197
 
190
198
  return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, state), {}, {
@@ -272,7 +280,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
272
280
  showModal = _useState14[0],
273
281
  setShowModal = _useState14[1];
274
282
 
275
- var _useState15 = (0, _react.useState)(),
283
+ var _useState15 = (0, _react.useState)({}),
276
284
  _useState16 = (0, _slicedToArray2.default)(_useState15, 2),
277
285
  boxData = _useState16[0],
278
286
  setBoxData = _useState16[1];
@@ -885,9 +893,9 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
885
893
 
886
894
  var loadData = /*#__PURE__*/function () {
887
895
  var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
888
- var _product$article, _product$article2, _product$article3, _services$, _services$$values;
896
+ var _product$article, _product$article2, _product$article3, _services$, _services$$values, _product$retailersAva2;
889
897
 
890
- var services;
898
+ var services, data, headers;
891
899
  return _regenerator.default.wrap(function _callee8$(_context8) {
892
900
  while (1) {
893
901
  switch (_context8.prev = _context8.next) {
@@ -908,14 +916,27 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
908
916
  init: services[2]
909
917
  });
910
918
  if (((_services$ = services[2]) === null || _services$ === void 0 ? void 0 : (_services$$values = _services$.values) === null || _services$$values === void 0 ? void 0 : _services$$values.length) > 0) setActiveImage(0);
919
+ data = [{
920
+ id_article: product.id_article,
921
+ id_category: product.id_category,
922
+ version: product.version,
923
+ id_retailer_array: ((_product$retailersAva2 = product.retailersAvailable) !== null && _product$retailersAva2 !== void 0 ? _product$retailersAva2 : product.retailers).map(function (_ref7) {
924
+ var id = _ref7.id;
925
+ return id;
926
+ })
927
+ }];
928
+ headers = {
929
+ Authorization: token
930
+ };
911
931
  (0, _data.getPercentage)({
912
- data: [product]
932
+ data: data,
933
+ headers: headers
913
934
  }).then(function (res) {
914
- return setPercentages(res[0]);
935
+ setPercentages(res[0]);
915
936
  });
916
937
  setLoading(false);
917
938
 
918
- case 10:
939
+ case 12:
919
940
  case "end":
920
941
  return _context8.stop();
921
942
  }
@@ -929,7 +950,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
929
950
  }();
930
951
 
931
952
  var getServices = /*#__PURE__*/function () {
932
- var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
953
+ var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
933
954
  var _product$article4;
934
955
 
935
956
  var productInOrder, idArticle, retailers, active, _product$id_order, _servicesResponse$dat, servicesResponse, parsedResponse, retailerResponse;
@@ -974,7 +995,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
974
995
  }));
975
996
 
976
997
  return function getServices() {
977
- return _ref7.apply(this, arguments);
998
+ return _ref8.apply(this, arguments);
978
999
  };
979
1000
  }();
980
1001
 
@@ -1004,14 +1025,16 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1004
1025
  };
1005
1026
 
1006
1027
  var getCart = /*#__PURE__*/function () {
1007
- var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {
1028
+ var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {
1029
+ var _Object$values;
1030
+
1008
1031
  var res, arr;
1009
1032
  return _regenerator.default.wrap(function _callee10$(_context10) {
1010
1033
  while (1) {
1011
1034
  switch (_context10.prev = _context10.next) {
1012
1035
  case 0:
1013
1036
  _context10.next = 2;
1014
- return _axios.default.get(process.env.REACT_APP_CART, {
1037
+ return _axios.default.get("".concat(process.env.REACT_APP_CART, "/general/"), {
1015
1038
  headers: {
1016
1039
  Authorization: token
1017
1040
  }
@@ -1019,9 +1042,9 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1019
1042
 
1020
1043
  case 2:
1021
1044
  res = _context10.sent;
1022
- arr = JSON.parse(res.data.body).data.map(function (e) {
1045
+ arr = (_Object$values = Object.values(JSON.parse(res.data.body).data)) === null || _Object$values === void 0 ? void 0 : _Object$values.map(function (e) {
1023
1046
  return e.article_id;
1024
- });
1047
+ }).filter(Boolean);
1025
1048
  setInCart(arr.some(function (e) {
1026
1049
  return e.articleId === product.id_article;
1027
1050
  }));
@@ -1035,7 +1058,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1035
1058
  }));
1036
1059
 
1037
1060
  return function getCart() {
1038
- return _ref8.apply(this, arguments);
1061
+ return _ref9.apply(this, arguments);
1039
1062
  };
1040
1063
  }();
1041
1064
 
@@ -1148,11 +1171,13 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1148
1171
  var _images$inputs;
1149
1172
 
1150
1173
  var imageInputs = images === null || images === void 0 ? void 0 : (_images$inputs = images.inputs) === null || _images$inputs === void 0 ? void 0 : _images$inputs.map(function (e) {
1174
+ var _images$values2;
1175
+
1151
1176
  return {
1152
1177
  value: e === null || e === void 0 ? void 0 : e.id,
1153
1178
  name: e === null || e === void 0 ? void 0 : e.name,
1154
1179
  required: e === null || e === void 0 ? void 0 : e.required,
1155
- active: images === null || images === void 0 ? void 0 : images.values.some(function (value) {
1180
+ active: images === null || images === void 0 ? void 0 : (_images$values2 = images.values) === null || _images$values2 === void 0 ? void 0 : _images$values2.some(function (value) {
1156
1181
  return (value === null || value === void 0 ? void 0 : value.image_id) === (e === null || e === void 0 ? void 0 : e.id);
1157
1182
  })
1158
1183
  };
@@ -1161,7 +1186,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1161
1186
  }, [images]);
1162
1187
 
1163
1188
  var saveDescriptions = /*#__PURE__*/function () {
1164
- var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11() {
1189
+ var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11() {
1165
1190
  var dataObject, res;
1166
1191
  return _regenerator.default.wrap(function _callee11$(_context11) {
1167
1192
  while (1) {
@@ -1212,21 +1237,21 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1212
1237
  }));
1213
1238
 
1214
1239
  return function saveDescriptions() {
1215
- return _ref9.apply(this, arguments);
1240
+ return _ref10.apply(this, arguments);
1216
1241
  };
1217
1242
  }();
1218
1243
 
1219
1244
  var saveDatasheets = /*#__PURE__*/function () {
1220
- var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
1245
+ var _ref11 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
1221
1246
  var parseBoxData, dataObject, res;
1222
1247
  return _regenerator.default.wrap(function _callee12$(_context12) {
1223
1248
  while (1) {
1224
1249
  switch (_context12.prev = _context12.next) {
1225
1250
  case 0:
1226
1251
  parseBoxData = [];
1227
- Object.entries(boxData).forEach(function (_ref11, index) {
1228
- var _ref12 = (0, _slicedToArray2.default)(_ref11, 2),
1229
- box = _ref12[1];
1252
+ Object.entries(boxData).forEach(function (_ref12, index) {
1253
+ var _ref13 = (0, _slicedToArray2.default)(_ref12, 2),
1254
+ box = _ref13[1];
1230
1255
 
1231
1256
  var value = box.value;
1232
1257
  var attributesIds = Object.keys(value);
@@ -1246,55 +1271,56 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1246
1271
  }, parseBoxData.length > 0 && {
1247
1272
  boxData: parseBoxData
1248
1273
  });
1274
+ console.log({
1275
+ dataObject: dataObject
1276
+ });
1277
+ console.log(product === null || product === void 0 ? void 0 : product.orderId);
1249
1278
  if (product !== null && product !== void 0 && product.orderId) dataObject["orderId"] = product === null || product === void 0 ? void 0 : product.orderId;
1250
- _context12.prev = 4;
1251
- _context12.next = 7;
1279
+ _context12.prev = 6;
1280
+ _context12.next = 9;
1252
1281
  return _axios.default.put("".concat(process.env.REACT_APP_ARTICLE_DATA_ENDPOINT, "?datasheet=true&version=").concat(version), dataObject, {
1253
1282
  headers: {
1254
1283
  Authorization: token
1255
1284
  }
1256
1285
  });
1257
1286
 
1258
- case 7:
1287
+ case 9:
1259
1288
  res = _context12.sent;
1260
1289
 
1261
1290
  if (!(res.data.statusCode === 200)) {
1262
- _context12.next = 13;
1291
+ _context12.next = 15;
1263
1292
  break;
1264
1293
  }
1265
1294
 
1266
1295
  setUpdatedDatasheets([]);
1267
1296
  setMessage("Fichas técnicas guardadas");
1268
- _context12.next = 13;
1297
+ _context12.next = 15;
1269
1298
  return loadData();
1270
1299
 
1271
- case 13:
1272
- _context12.next = 18;
1300
+ case 15:
1301
+ _context12.next = 20;
1273
1302
  break;
1274
1303
 
1275
- case 15:
1276
- _context12.prev = 15;
1277
- _context12.t0 = _context12["catch"](4);
1304
+ case 17:
1305
+ _context12.prev = 17;
1306
+ _context12.t0 = _context12["catch"](6);
1278
1307
  console.log(_context12.t0);
1279
1308
 
1280
- case 18:
1281
- console.log(dataObject);
1282
-
1283
- case 19:
1309
+ case 20:
1284
1310
  case "end":
1285
1311
  return _context12.stop();
1286
1312
  }
1287
1313
  }
1288
- }, _callee12, null, [[4, 15]]);
1314
+ }, _callee12, null, [[6, 17]]);
1289
1315
  }));
1290
1316
 
1291
1317
  return function saveDatasheets() {
1292
- return _ref10.apply(this, arguments);
1318
+ return _ref11.apply(this, arguments);
1293
1319
  };
1294
1320
  }();
1295
1321
 
1296
1322
  var updateImages = (0, _react.useCallback)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
1297
- var _images$values2, _data$articleData, _data$articleData2, _data$updateImages;
1323
+ var _images$values3, _data$articleData, _data$articleData2, _data$updateImages;
1298
1324
 
1299
1325
  var imagesList, imagesListTemp, duplicated, attrForImgs, data, valid, _data$updateImages2, _data$articleData3, _data$articleData4, _data$articleData5, promiseArray;
1300
1326
 
@@ -1302,7 +1328,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1302
1328
  while (1) {
1303
1329
  switch (_context13.prev = _context13.next) {
1304
1330
  case 0:
1305
- imagesList = images === null || images === void 0 ? void 0 : (_images$values2 = images.values) === null || _images$values2 === void 0 ? void 0 : _images$values2.slice();
1331
+ imagesList = images === null || images === void 0 ? void 0 : (_images$values3 = images.values) === null || _images$values3 === void 0 ? void 0 : _images$values3.slice();
1306
1332
  imagesListTemp = imagesList === null || imagesList === void 0 ? void 0 : imagesList.reduce(function (acc, image) {
1307
1333
  acc[image === null || image === void 0 ? void 0 : image.image_id] = ++acc[image === null || image === void 0 ? void 0 : image.image_id] || 0;
1308
1334
  return acc;
@@ -1484,7 +1510,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1484
1510
  };
1485
1511
 
1486
1512
  var createComment = /*#__PURE__*/function () {
1487
- var _ref15 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
1513
+ var _ref16 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
1488
1514
  var messages,
1489
1515
  retailerId,
1490
1516
  data,
@@ -1519,7 +1545,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1519
1545
  }));
1520
1546
 
1521
1547
  return function createComment() {
1522
- return _ref15.apply(this, arguments);
1548
+ return _ref16.apply(this, arguments);
1523
1549
  };
1524
1550
  }();
1525
1551
 
@@ -1528,7 +1554,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1528
1554
  }, [activeTab]);
1529
1555
 
1530
1556
  var commentRevised = /*#__PURE__*/function () {
1531
- var _ref16 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
1557
+ var _ref17 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
1532
1558
  var data;
1533
1559
  return _regenerator.default.wrap(function _callee16$(_context16) {
1534
1560
  while (1) {
@@ -1556,12 +1582,12 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1556
1582
  }));
1557
1583
 
1558
1584
  return function commentRevised() {
1559
- return _ref16.apply(this, arguments);
1585
+ return _ref17.apply(this, arguments);
1560
1586
  };
1561
1587
  }();
1562
1588
 
1563
1589
  var setAssignation = /*#__PURE__*/function () {
1564
- var _ref17 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(assignationType, assignationId) {
1590
+ var _ref18 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(assignationType, assignationId) {
1565
1591
  var concept, productTemp, data;
1566
1592
  return _regenerator.default.wrap(function _callee17$(_context17) {
1567
1593
  while (1) {
@@ -1618,18 +1644,18 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1618
1644
  }));
1619
1645
 
1620
1646
  return function setAssignation(_x4, _x5) {
1621
- return _ref17.apply(this, arguments);
1647
+ return _ref18.apply(this, arguments);
1622
1648
  };
1623
1649
  }();
1624
1650
 
1625
1651
  var downloadImages = function downloadImages() {
1626
- var _images$values3;
1652
+ var _images$values4;
1627
1653
 
1628
1654
  selectedImages.length > 0 ? selectedImages.forEach(function (e) {
1629
1655
  if (e.id) {
1630
1656
  (0, _fileSaver.saveAs)("https://".concat(process.env.REACT_APP_IMAGES_BUCKET, ".s3.amazonaws.com/").concat(e.srcDB), "".concat(product.upc || product.article.upc, "_").concat(e.name, ".").concat(e.ext));
1631
1657
  }
1632
- }) : images === null || images === void 0 ? void 0 : (_images$values3 = images.values) === null || _images$values3 === void 0 ? void 0 : _images$values3.forEach(function (e) {
1658
+ }) : images === null || images === void 0 ? void 0 : (_images$values4 = images.values) === null || _images$values4 === void 0 ? void 0 : _images$values4.forEach(function (e) {
1633
1659
  if (e.id) {
1634
1660
  (0, _fileSaver.saveAs)("https://".concat(process.env.REACT_APP_IMAGES_BUCKET, ".s3.amazonaws.com/").concat(e.srcDB), "".concat(product.upc || product.article.upc, "_").concat(e.name, ".").concat(e.ext));
1635
1661
  }
@@ -1702,7 +1728,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1702
1728
  };
1703
1729
 
1704
1730
  var sendEvaluation = /*#__PURE__*/function () {
1705
- var _ref18 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(result) {
1731
+ var _ref19 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(result) {
1706
1732
  var _productTemp$id_order2;
1707
1733
 
1708
1734
  var concept, productTemp, articleId, orderId, sectionStatusKey, evalStatus, data, retailerId, res, newStatuses, orderStatus, serviceStatus, newProductEdit, showSurveyByProvider, showSurveyByRetailer, _JSON$parse, newArticleStatus, newServiceStatus, newStatus, retailerStatusCopy, status;
@@ -1807,12 +1833,12 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1807
1833
  }));
1808
1834
 
1809
1835
  return function sendEvaluation(_x6) {
1810
- return _ref18.apply(this, arguments);
1836
+ return _ref19.apply(this, arguments);
1811
1837
  };
1812
1838
  }();
1813
1839
 
1814
1840
  var validateAll = /*#__PURE__*/function () {
1815
- var _ref19 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(result) {
1841
+ var _ref20 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(result) {
1816
1842
  var _product$id_order2, evaluationArray, conceptArray, dataGeneral, userType, productTemp, status, retailerStatusCopy;
1817
1843
 
1818
1844
  return _regenerator.default.wrap(function _callee19$(_context19) {
@@ -1898,12 +1924,12 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1898
1924
  }));
1899
1925
 
1900
1926
  return function validateAll(_x7) {
1901
- return _ref19.apply(this, arguments);
1927
+ return _ref20.apply(this, arguments);
1902
1928
  };
1903
1929
  }();
1904
1930
 
1905
1931
  var evaluationToRetailer = /*#__PURE__*/function () {
1906
- var _ref20 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(result) {
1932
+ var _ref21 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(result) {
1907
1933
  var data, prod, statusComplete;
1908
1934
  return _regenerator.default.wrap(function _callee20$(_context20) {
1909
1935
  while (1) {
@@ -1945,7 +1971,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1945
1971
  }));
1946
1972
 
1947
1973
  return function evaluationToRetailer(_x8) {
1948
- return _ref20.apply(this, arguments);
1974
+ return _ref21.apply(this, arguments);
1949
1975
  };
1950
1976
  }();
1951
1977
 
@@ -1989,10 +2015,6 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1989
2015
  }];
1990
2016
 
1991
2017
  var sendToEvaluation = function sendToEvaluation(result) {
1992
- console.log({
1993
- result: result
1994
- });
1995
-
1996
2018
  if (result === "A") {
1997
2019
  if (origin[activeTab] === "RequestWithoutContentoh" && !user.is_retailer && (!product.id_order || !product.orderId)) {
1998
2020
  setDataGenericModal(function (prev) {
@@ -31,63 +31,58 @@ RetailerProductEditionDefault.args = {
31
31
  "Ficha técnica": false,
32
32
  Imágenes: false
33
33
  },
34
- token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI5YTIxMzEyOC02NDgyLTRjMTYtYTRiNi02ZTY0ZjIyNWIxYmQiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6IjlhMjEzMTI4LTY0ODItNGMxNi1hNGI2LTZlNjRmMjI1YjFiZCIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiI5OGE0NzYxMy04ZGIyLTRlZjUtYjA0Mi01ZDU3MWRkZjIwMWIiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY4Mzg3NTIyNiwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY4Mzg3ODgyNiwiaWF0IjoxNjgzODc1MjI2LCJlbWFpbCI6ImlzbWFlbDk3bG9wZXpAZ21haWwuY29tIn0.EtgmT_THMx-Zy_zB5yZK4gz6TXNTVVJEKFt5X0JK2UkGVrp_q_92YCEuejS4n976fyTez0jkwOee6IkVHLV71uZWRBDFt-3Yw4ZxfsZYPNJWhoHXGNxhMU8MCkSntfu597esBTk-VsUpstT5R7L-WJfN8viE7R-qVo-42RlPTG0TFrWA9q0oTcqjv8vbxLpOBUjiEpjmqRhg4blJZwgkGNta6MOlw1vfmisOVbo9wMvqwnCZ9xx9KMKoH9U4uNObK_JomjbvPmTmkcUXsE-wGSD7XcoSwtuhBngLC7-jiu1u8MvL_ff5Z0Qp70sSpLdUglcSS8d1Xf7j_fcZuJ5jKA",
34
+ token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI5YTIxMzEyOC02NDgyLTRjMTYtYTRiNi02ZTY0ZjIyNWIxYmQiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6IjlhMjEzMTI4LTY0ODItNGMxNi1hNGI2LTZlNjRmMjI1YjFiZCIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiIxMGZiNTE4Mi1jMGI5LTQyZGUtYTAyZC1lOTJlZWI2NWFlN2QiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTcwMTkwMjA4NywibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTcwMTkwNTY4NywiaWF0IjoxNzAxOTAyMDg3LCJlbWFpbCI6ImlzbWFlbDk3bG9wZXpAZ21haWwuY29tIn0.JpoKZHuzPZG2ttaT7Oz3CAPR7xZU19txSDyjGHIwya2zV9uOHxauS0-orNRry8lfpZHQt_ISF2W-XSARUvCG1SqTXi41-o53DsWfZhqe9dQk6DGDnvFzXFsaEbaxAPjTfYc491sHCpOjf4W98quBuzDZCRtdCsr9u3A0AnX8Lh1Jquvn83nrHN2ZeefpLyKc-xGGp50Oy6EnJgSK4PcAAV631nwYV9DfVaLb3SIWDrJIIuBjFjBBCXBcnGJBieErlnF-4gumHzsro_QqF-s7aq_3EJChAhfslFvczNSyDc-LXJVkpDuZW3TaYKlHwhoFxz1aMuYRFQ8xy5Pz8FDNKQ",
35
35
  productSelected: {
36
- services: {
37
- datasheets: 1,
38
- descriptions: 1,
39
- images: 1
40
- },
41
- orderId: 15275,
42
- status: "AC",
43
- datasheet_status: "AC",
36
+ orderId: 15190,
37
+ status: "RA",
38
+ datasheet_status: "NS",
44
39
  prio: "none",
45
40
  version: 3,
46
- description_status: "AC",
47
- images_status: "AC",
48
- statusByRetailer: {
49
- 34: {
50
- datasheet: "AC",
51
- description: "AC",
52
- images: "AC"
53
- }
41
+ description_status: "NS",
42
+ images_status: "RA",
43
+ brand: null,
44
+ retailerOrder: 0,
45
+ missing: {
46
+ datasheet: null,
47
+ descriptions: null,
48
+ images: null
49
+ },
50
+ services: {
51
+ datasheets: 0,
52
+ descriptions: 0,
53
+ images: 1
54
54
  },
55
55
  article: {
56
- id_article: 39485,
57
- id_category: "11",
58
- name: "Mix de nueces",
59
- upc: "7543453453",
60
- timestamp: "2023-07-14T21:02:54.000Z",
61
- id_user: 28,
62
- status: "NULL",
63
- active: 1,
64
- company_id: 1,
56
+ category: "Abarrotes Básicos|Abarrotes Básicos y Procesados|Abarrotes Básicos y Procesados",
65
57
  company_name: "GRUPO BRAHMA",
66
58
  country: "México",
67
- id_order: 15275,
68
- id_datasheet_especialist: 54,
69
- id_datasheet_facilitator: 52,
70
- id_description_especialist: 54,
71
- id_description_facilitator: 52,
59
+ id_category: "4004",
60
+ id_datasheet_especialist: null,
61
+ id_datasheet_facilitator: null,
62
+ id_description_especialist: null,
63
+ id_description_facilitator: null,
72
64
  id_images_especialist: 55,
73
65
  id_images_facilitator: 53,
66
+ id_order: 15190,
67
+ id_article: 39364,
74
68
  id_auditor: 37,
75
- id_recepcionist: null,
76
- category: "Abarrotes|Abarrotes Secos|Frutos Secos",
77
- missingAttributes: 0,
78
- missingDescriptions: 0,
79
- missingImages: 0
69
+ name: "test 2 img ba",
70
+ timestamp: "2023-05-05T02:56:16.000Z",
71
+ upc: "4353242"
80
72
  },
81
73
  retailers: [{
82
- id: 34,
83
- name: "San Pablo"
74
+ id: 70,
75
+ name: "Bodega Aurrera"
84
76
  }],
85
- country: "México",
86
- upc: "7543453453"
77
+ statusByRetailer: {
78
+ 70: {
79
+ images: "RA/AC"
80
+ }
81
+ }
87
82
  },
88
83
  location: {
89
84
  product: {
90
- articleId: 354,
85
+ articleId: 39364,
91
86
  versionId: 3
92
87
  },
93
88
  state: {
@@ -103,7 +98,7 @@ RetailerProductEditionDefault.args = {
103
98
  position: "Auditor",
104
99
  telephone: "",
105
100
  country: "México",
106
- id_company: 2,
101
+ id_company: 254,
107
102
  id_cognito: "9a213128-6482-4c16-a4b6-6e64f225b1bd",
108
103
  birth_Date: null,
109
104
  about_me: "",
@@ -117,16 +112,16 @@ RetailerProductEditionDefault.args = {
117
112
  email_notify: 1,
118
113
  is_user_tech: null,
119
114
  membership: {
120
- id: 2,
121
- start_date: "2021-11-05T02:35:12.000Z",
122
- end_date: "2022-11-05T02:34:49.000Z",
123
- planID: 1,
124
- plan: "prod_KtkvuFFLpOdP6e",
125
- name: "Plan Free",
126
- user_limit: "1",
127
- products_limit: "3",
128
- type: "PyMES"
115
+ id: 137,
116
+ start_date: "2023-10-04T15:46:14.000Z",
117
+ end_date: "2024-10-04T08:46:09.000Z",
118
+ planID: 8,
119
+ plan: "prod_KtlhECVSFG2iro",
120
+ name: "Plan Pro",
121
+ user_limit: "50",
122
+ products_limit: "5000",
123
+ type: "Enterprise"
129
124
  },
130
- src: "https://content-management-profile.s3.amazonaws.com/id-37/37.png?1692750648813"
125
+ src: "https://content-management-profile.s3.amazonaws.com/id-37/37.png?1701902088068"
131
126
  }
132
127
  };