contentoh-components-library 21.3.54 → 21.3.55

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 (60) hide show
  1. package/.env.development +0 -2
  2. package/dist/assets/fonts/roboto/LICENSE.txt +202 -0
  3. package/dist/components/atoms/ButtonV2/styles.js +1 -1
  4. package/dist/components/atoms/Status/styles.js +1 -1
  5. package/dist/components/atoms/VerticalSideMenuMainPage/index.js +23 -18
  6. package/dist/components/atoms/VerticalSideMenuMainPage/styles.js +4 -4
  7. package/dist/components/molecules/CarouselImagesLogin/index.js +1 -1
  8. package/dist/components/molecules/HeaderTop/index.js +11 -68
  9. package/dist/components/organisms/Chat/Chat.stories.js +1 -21
  10. package/dist/components/organisms/Chat/ContainerItems/index.js +3 -19
  11. package/dist/components/organisms/Chat/ContainerItems/styles.js +1 -1
  12. package/dist/components/organisms/Chat/ContentChat/index.js +191 -343
  13. package/dist/components/organisms/Chat/Footer/index.js +39 -48
  14. package/dist/components/organisms/Chat/index.js +3 -48
  15. package/dist/components/organisms/DashboardMetric/dashboardMetricUtils.js +0 -27
  16. package/dist/components/organisms/FullProductNameHeader/index.js +2 -2
  17. package/dist/components/organisms/GlobalModal/styles.js +1 -1
  18. package/dist/components/organisms/OrderDetail/styles.js +1 -1
  19. package/dist/components/organisms/OrderDetail/utils/Table/styles.js +1 -1
  20. package/dist/components/pages/Dashboard/Dashboard.stories.js +50 -31
  21. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +81 -198
  22. package/dist/components/pages/ProviderProductEdition/index.js +429 -725
  23. package/dist/components/pages/ProviderProductEdition/styles.js +1 -1
  24. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +139 -86
  25. package/dist/components/pages/RetailerProductEdition/index.js +279 -268
  26. package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
  27. package/dist/components/pages/RetailerProductEdition/utils.js +2 -61
  28. package/dist/index.js +0 -13
  29. package/package.json +6 -7
  30. package/src/components/atoms/ButtonV2/styles.js +1 -1
  31. package/src/components/atoms/Status/styles.js +0 -4
  32. package/src/components/atoms/VerticalSideMenuMainPage/index.js +22 -18
  33. package/src/components/atoms/VerticalSideMenuMainPage/styles.js +4 -3
  34. package/src/components/molecules/CarouselImagesLogin/index.js +1 -1
  35. package/src/components/molecules/HeaderTop/index.js +6 -52
  36. package/src/components/organisms/Chat/Chat.stories.js +0 -21
  37. package/src/components/organisms/Chat/ContainerItems/index.js +2 -18
  38. package/src/components/organisms/Chat/ContainerItems/styles.js +2 -10
  39. package/src/components/organisms/Chat/ContentChat/index.js +6 -81
  40. package/src/components/organisms/Chat/Footer/index.js +0 -11
  41. package/src/components/organisms/Chat/index.js +3 -47
  42. package/src/components/organisms/DashboardMetric/dashboardMetricUtils.js +1 -18
  43. package/src/components/organisms/FullProductNameHeader/index.js +1 -1
  44. package/src/components/organisms/GlobalModal/styles.js +0 -10
  45. package/src/components/organisms/OrderDetail/index.js +0 -1
  46. package/src/components/organisms/OrderDetail/styles.js +1 -1
  47. package/src/components/organisms/OrderDetail/utils/Table/styles.js +1 -0
  48. package/src/components/pages/Dashboard/Dashboard.stories.js +55 -31
  49. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +88 -214
  50. package/src/components/pages/ProviderProductEdition/index.js +160 -323
  51. package/src/components/pages/ProviderProductEdition/styles.js +1 -5
  52. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +146 -89
  53. package/src/components/pages/RetailerProductEdition/index.js +138 -112
  54. package/src/components/pages/RetailerProductEdition/styles.js +0 -4
  55. package/src/components/pages/RetailerProductEdition/utils.js +0 -37
  56. package/src/index.js +0 -1
  57. package/src/components/organisms/TableResizable/TableResizable.stories.js +0 -17
  58. package/src/components/organisms/TableResizable/index.js +0 -119
  59. package/src/components/organisms/TableResizable/styles.js +0 -133
  60. package/src/components/organisms/TableResizable/utils.js +0 -46
@@ -37,7 +37,7 @@ var _GalleryElement = require("../../molecules/GalleryElement");
37
37
 
38
38
  var _fileSaver = require("file-saver");
39
39
 
40
- var _data2 = require("../../../global-files/data");
40
+ var _data = require("../../../global-files/data");
41
41
 
42
42
  var _GalleryHeader = require("../../molecules/GalleryHeader");
43
43
 
@@ -61,6 +61,8 @@ var _index = require("../../molecules/TagAndInput/index");
61
61
 
62
62
  var _GeneralButton = require("../../atoms/GeneralButton");
63
63
 
64
+ var _Commentary = require("../../atoms/Commentary");
65
+
64
66
  var _GenericModal = require("../../atoms/GenericModal");
65
67
 
66
68
  var _ScreenHeader = require("../../atoms/ScreenHeader");
@@ -69,16 +71,14 @@ var _Loading = require("../../atoms/Loading");
69
71
 
70
72
  var _genericModalCheck = _interopRequireDefault(require("../../../assets/images/genericModal/genericModalCheck.svg"));
71
73
 
74
+ var _errorModal = _interopRequireDefault(require("../../../assets/images/genericModal/errorModal.svg"));
75
+
72
76
  var _VersionSelector = require("../../organisms/VersionSelector");
73
77
 
74
78
  var _customHooks = require("../../../global-files/customHooks");
75
79
 
76
80
  var _utils = require("./utils");
77
81
 
78
- var _Modal = require("../../organisms/Modal");
79
-
80
- var _ButtonV = require("../../atoms/ButtonV2");
81
-
82
82
  var _jsxRuntime = require("react/jsx-runtime");
83
83
 
84
84
  var reducerImages = function reducerImages(state, action) {
@@ -202,7 +202,7 @@ var myBucket = new _awsSdk.default.S3({
202
202
  });
203
203
 
204
204
  var RetailerProductEdition = function RetailerProductEdition(_ref) {
205
- var _product$retailers, _location$state, _location$state2, _product$services2, _datasheets$, _datasheets$$data, _product$article17;
205
+ var _product$retailers, _location$state, _product$services2, _datasheets$, _datasheets$$data, _product$article18, _comment$message;
206
206
 
207
207
  var tabsSections = _ref.tabsSections,
208
208
  _ref$productSelected = _ref.productSelected,
@@ -252,11 +252,6 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
252
252
  showModal = _useState14[0],
253
253
  setShowModal = _useState14[1];
254
254
 
255
- var _useState15 = (0, _react.useState)(false),
256
- _useState16 = (0, _slicedToArray2.default)(_useState15, 2),
257
- showRejectModal = _useState16[0],
258
- setShowRejectModal = _useState16[1];
259
-
260
255
  var _useDropzone = (0, _reactDropzone.useDropzone)({
261
256
  accept: "image/*",
262
257
  noKeyboard: true,
@@ -301,149 +296,149 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
301
296
  getRootProps = _useDropzone.getRootProps,
302
297
  getInputProps = _useDropzone.getInputProps;
303
298
 
299
+ var _useState15 = (0, _react.useState)([]),
300
+ _useState16 = (0, _slicedToArray2.default)(_useState15, 2),
301
+ updatedDatasheets = _useState16[0],
302
+ setUpdatedDatasheets = _useState16[1];
303
+
304
304
  var _useState17 = (0, _react.useState)([]),
305
305
  _useState18 = (0, _slicedToArray2.default)(_useState17, 2),
306
- updatedDatasheets = _useState18[0],
307
- setUpdatedDatasheets = _useState18[1];
306
+ updatedDescriptions = _useState18[0],
307
+ setUpdatedDescriptions = _useState18[1];
308
308
 
309
- var _useState19 = (0, _react.useState)([]),
309
+ var _useState19 = (0, _react.useState)(false),
310
310
  _useState20 = (0, _slicedToArray2.default)(_useState19, 2),
311
- updatedDescriptions = _useState20[0],
312
- setUpdatedDescriptions = _useState20[1];
311
+ imagesUploaded = _useState20[0],
312
+ setImagesUploaded = _useState20[1];
313
313
 
314
- var _useState21 = (0, _react.useState)(false),
314
+ var _useState21 = (0, _react.useState)(),
315
315
  _useState22 = (0, _slicedToArray2.default)(_useState21, 2),
316
- imagesUploaded = _useState22[0],
317
- setImagesUploaded = _useState22[1];
318
-
319
- var _useState23 = (0, _react.useState)(),
320
- _useState24 = (0, _slicedToArray2.default)(_useState23, 2),
321
- dataImages = _useState24[0],
322
- setDataImages = _useState24[1];
316
+ dataImages = _useState22[0],
317
+ setDataImages = _useState22[1];
323
318
 
324
- var _useState25 = (0, _react.useState)(new Array(product === null || product === void 0 ? void 0 : (_product$retailers = product.retailers) === null || _product$retailers === void 0 ? void 0 : _product$retailers.length).fill({
319
+ var _useState23 = (0, _react.useState)(new Array(product === null || product === void 0 ? void 0 : (_product$retailers = product.retailers) === null || _product$retailers === void 0 ? void 0 : _product$retailers.length).fill({
325
320
  percentage: 0
326
321
  })),
327
- _useState26 = (0, _slicedToArray2.default)(_useState25, 2),
328
- percentages = _useState26[0],
329
- setPercentages = _useState26[1]; // const [percentages, setPercentages] = useState([{ retailers: {} }]);
322
+ _useState24 = (0, _slicedToArray2.default)(_useState23, 2),
323
+ percentages = _useState24[0],
324
+ setPercentages = _useState24[1]; // const [percentages, setPercentages] = useState([{ retailers: {} }]);
330
325
 
331
326
 
332
- var _useState27 = (0, _react.useState)(0),
327
+ var _useState25 = (0, _react.useState)(0),
328
+ _useState26 = (0, _slicedToArray2.default)(_useState25, 2),
329
+ activePercentage = _useState26[0],
330
+ setActivePercentage = _useState26[1];
331
+
332
+ var _useState27 = (0, _react.useState)({}),
333
333
  _useState28 = (0, _slicedToArray2.default)(_useState27, 2),
334
- activePercentage = _useState28[0],
335
- setActivePercentage = _useState28[1];
334
+ activeRetailer = _useState28[0],
335
+ setActiveRetailer = _useState28[1];
336
336
 
337
- var _useState29 = (0, _react.useState)({}),
337
+ var _useState29 = (0, _react.useState)([]),
338
338
  _useState30 = (0, _slicedToArray2.default)(_useState29, 2),
339
- activeRetailer = _useState30[0],
340
- setActiveRetailer = _useState30[1];
339
+ services = _useState30[0],
340
+ setServices = _useState30[1];
341
341
 
342
342
  var _useState31 = (0, _react.useState)([]),
343
343
  _useState32 = (0, _slicedToArray2.default)(_useState31, 2),
344
- services = _useState32[0],
345
- setServices = _useState32[1];
344
+ servicesData = _useState32[0],
345
+ setServicesData = _useState32[1];
346
346
 
347
- var _useState33 = (0, _react.useState)([]),
347
+ var _useState33 = (0, _react.useState)(""),
348
348
  _useState34 = (0, _slicedToArray2.default)(_useState33, 2),
349
- servicesData = _useState34[0],
350
- setServicesData = _useState34[1];
349
+ message = _useState34[0],
350
+ setMessage = _useState34[1];
351
351
 
352
- var _useState35 = (0, _react.useState)(""),
352
+ var _useState35 = (0, _react.useState)(JSON.parse(sessionStorage.getItem("productSelected")) ? JSON.parse(sessionStorage.getItem("productSelected")) : productSelected),
353
353
  _useState36 = (0, _slicedToArray2.default)(_useState35, 2),
354
- message = _useState36[0],
355
- setMessage = _useState36[1];
354
+ product = _useState36[0],
355
+ setProduct = _useState36[1];
356
356
 
357
- var _useState37 = (0, _react.useState)(JSON.parse(sessionStorage.getItem("productSelected")) ? JSON.parse(sessionStorage.getItem("productSelected")) : productSelected),
357
+ var _useState37 = (0, _react.useState)(null),
358
358
  _useState38 = (0, _slicedToArray2.default)(_useState37, 2),
359
- product = _useState38[0],
360
- setProduct = _useState38[1];
359
+ icon = _useState38[0],
360
+ setIcon = _useState38[1];
361
361
 
362
- var _useState39 = (0, _react.useState)(null),
362
+ var _useState39 = (0, _react.useState)(product === null || product === void 0 ? void 0 : product.version),
363
363
  _useState40 = (0, _slicedToArray2.default)(_useState39, 2),
364
- icon = _useState40[0],
365
- setIcon = _useState40[1];
364
+ version = _useState40[0],
365
+ setVersion = _useState40[1];
366
366
 
367
- var _useState41 = (0, _react.useState)(product === null || product === void 0 ? void 0 : product.version),
367
+ var _useState41 = (0, _react.useState)({}),
368
368
  _useState42 = (0, _slicedToArray2.default)(_useState41, 2),
369
- version = _useState42[0],
370
- setVersion = _useState42[1];
369
+ comments = _useState42[0],
370
+ setComments = _useState42[1];
371
371
 
372
- var _useState43 = (0, _react.useState)({}),
372
+ var _useState43 = (0, _react.useState)(""),
373
373
  _useState44 = (0, _slicedToArray2.default)(_useState43, 2),
374
- comments = _useState44[0],
375
- setComments = _useState44[1];
376
-
377
- var _useState45 = (0, _react.useState)(""),
378
- _useState46 = (0, _slicedToArray2.default)(_useState45, 2),
379
- comment = _useState46[0],
380
- setComment = _useState46[1];
374
+ comment = _useState44[0],
375
+ setComment = _useState44[1];
381
376
 
382
- var _useState47 = (0, _react.useState)({
377
+ var _useState45 = (0, _react.useState)({
383
378
  "Ficha técnica": 0,
384
379
  Descripción: 0,
385
380
  Imágenes: 0
386
381
  }),
382
+ _useState46 = (0, _slicedToArray2.default)(_useState45, 2),
383
+ requiredNull = _useState46[0],
384
+ setRequiredNull = _useState46[1];
385
+
386
+ var _useState47 = (0, _react.useState)(false),
387
387
  _useState48 = (0, _slicedToArray2.default)(_useState47, 2),
388
- requiredNull = _useState48[0],
389
- setRequiredNull = _useState48[1];
388
+ crossComment = _useState48[0],
389
+ setCrossComment = _useState48[1];
390
390
 
391
- var _useState49 = (0, _react.useState)(false),
391
+ var _useState49 = (0, _react.useState)([]),
392
392
  _useState50 = (0, _slicedToArray2.default)(_useState49, 2),
393
- crossComment = _useState50[0],
394
- setCrossComment = _useState50[1];
393
+ userGroups = _useState50[0],
394
+ setUserGroups = _useState50[1];
395
395
 
396
- var _useState51 = (0, _react.useState)([]),
396
+ var _useState51 = (0, _react.useState)({}),
397
397
  _useState52 = (0, _slicedToArray2.default)(_useState51, 2),
398
- userGroups = _useState52[0],
399
- setUserGroups = _useState52[1];
398
+ assig = _useState52[0],
399
+ setAssig = _useState52[1];
400
400
 
401
- var _useState53 = (0, _react.useState)({}),
401
+ var _useState53 = (0, _react.useState)([]),
402
402
  _useState54 = (0, _slicedToArray2.default)(_useState53, 2),
403
- assig = _useState54[0],
404
- setAssig = _useState54[1];
403
+ selectedImages = _useState54[0],
404
+ setSelectedImages = _useState54[1];
405
405
 
406
406
  var _useState55 = (0, _react.useState)([]),
407
407
  _useState56 = (0, _slicedToArray2.default)(_useState55, 2),
408
- selectedImages = _useState56[0],
409
- setSelectedImages = _useState56[1];
408
+ componentsArray = _useState56[0],
409
+ setComponentsArray = _useState56[1];
410
410
 
411
- var _useState57 = (0, _react.useState)([]),
411
+ var _useState57 = (0, _react.useState)(false),
412
412
  _useState58 = (0, _slicedToArray2.default)(_useState57, 2),
413
- componentsArray = _useState58[0],
414
- setComponentsArray = _useState58[1];
415
-
416
- var _useState59 = (0, _react.useState)(false),
417
- _useState60 = (0, _slicedToArray2.default)(_useState59, 2),
418
- checkAll = _useState60[0],
419
- setCheckAll = _useState60[1];
413
+ checkAll = _useState58[0],
414
+ setCheckAll = _useState58[1];
420
415
 
421
416
  var isRetailer = user === null || user === void 0 ? void 0 : user.is_retailer;
422
417
 
423
- var _useState61 = (0, _react.useState)(true),
418
+ var _useState59 = (0, _react.useState)(true),
419
+ _useState60 = (0, _slicedToArray2.default)(_useState59, 2),
420
+ loading = _useState60[0],
421
+ setLoading = _useState60[1];
422
+
423
+ var _useState61 = (0, _react.useState)("-"),
424
424
  _useState62 = (0, _slicedToArray2.default)(_useState61, 2),
425
- loading = _useState62[0],
426
- setLoading = _useState62[1];
425
+ retailerStatus = _useState62[0],
426
+ setRetailerStatus = _useState62[1];
427
427
 
428
- var _useState63 = (0, _react.useState)("-"),
428
+ var _useState63 = (0, _react.useState)([]),
429
429
  _useState64 = (0, _slicedToArray2.default)(_useState63, 2),
430
- retailerStatus = _useState64[0],
431
- setRetailerStatus = _useState64[1];
430
+ statusArray = _useState64[0],
431
+ setStatusArray = _useState64[1];
432
432
 
433
- var _useState65 = (0, _react.useState)([]),
433
+ var _useState65 = (0, _react.useState)(null),
434
434
  _useState66 = (0, _slicedToArray2.default)(_useState65, 2),
435
- statusArray = _useState66[0],
436
- setStatusArray = _useState66[1];
435
+ socketType = _useState66[0],
436
+ setSocketType = _useState66[1];
437
437
 
438
- var _useState67 = (0, _react.useState)(null),
438
+ var _useState67 = (0, _react.useState)(loading),
439
439
  _useState68 = (0, _slicedToArray2.default)(_useState67, 2),
440
- socketType = _useState68[0],
441
- setSocketType = _useState68[1];
442
-
443
- var _useState69 = (0, _react.useState)(loading),
444
- _useState70 = (0, _slicedToArray2.default)(_useState69, 2),
445
- saving = _useState70[0],
446
- setSaving = _useState70[1];
440
+ saving = _useState68[0],
441
+ setSaving = _useState68[1];
447
442
 
448
443
  var _useCloseModal = (0, _customHooks.useCloseModal)("version-selector"),
449
444
  _useCloseModal2 = (0, _slicedToArray2.default)(_useCloseModal, 2),
@@ -452,40 +447,35 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
452
447
 
453
448
  var shotThd = [58, 59, 60, 61].includes(activeRetailer.id);
454
449
 
455
- var _useState71 = (0, _react.useState)(null),
450
+ var _useState69 = (0, _react.useState)(null),
451
+ _useState70 = (0, _slicedToArray2.default)(_useState69, 2),
452
+ auditableVersion = _useState70[0],
453
+ setAuditableVersion = _useState70[1];
454
+
455
+ var _useState71 = (0, _react.useState)([]),
456
456
  _useState72 = (0, _slicedToArray2.default)(_useState71, 2),
457
- auditableVersion = _useState72[0],
458
- setAuditableVersion = _useState72[1];
457
+ auditServices = _useState72[0],
458
+ setAuditServices = _useState72[1];
459
459
 
460
460
  var _useState73 = (0, _react.useState)([]),
461
461
  _useState74 = (0, _slicedToArray2.default)(_useState73, 2),
462
- auditServices = _useState74[0],
463
- setAuditServices = _useState74[1];
462
+ auditDatasheets = _useState74[0],
463
+ setAuditDatasheets = _useState74[1];
464
464
 
465
465
  var _useState75 = (0, _react.useState)([]),
466
466
  _useState76 = (0, _slicedToArray2.default)(_useState75, 2),
467
- auditDatasheets = _useState76[0],
468
- setAuditDatasheets = _useState76[1];
467
+ auditDescriptions = _useState76[0],
468
+ setAuditDescriptions = _useState76[1];
469
469
 
470
470
  var _useState77 = (0, _react.useState)([]),
471
471
  _useState78 = (0, _slicedToArray2.default)(_useState77, 2),
472
- auditDescriptions = _useState78[0],
473
- setAuditDescriptions = _useState78[1];
472
+ auditImages = _useState78[0],
473
+ setAuditImages = _useState78[1];
474
474
 
475
- var _useState79 = (0, _react.useState)([]),
475
+ var _useState79 = (0, _react.useState)(false),
476
476
  _useState80 = (0, _slicedToArray2.default)(_useState79, 2),
477
- auditImages = _useState80[0],
478
- setAuditImages = _useState80[1];
479
-
480
- var _useState81 = (0, _react.useState)(false),
481
- _useState82 = (0, _slicedToArray2.default)(_useState81, 2),
482
- compare = _useState82[0],
483
- setCompare = _useState82[1];
484
-
485
- var _useState83 = (0, _react.useState)(false),
486
- _useState84 = (0, _slicedToArray2.default)(_useState83, 2),
487
- valRejAll = _useState84[0],
488
- setValRejAll = _useState84[1];
477
+ compare = _useState80[0],
478
+ setCompare = _useState80[1];
489
479
 
490
480
  (0, _react.useEffect)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
491
481
  var _ref3, id_article;
@@ -526,7 +516,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
526
516
  }
527
517
 
528
518
  _context2.next = 3;
529
- return (0, _data2.getRetailerServices)(product === null || product === void 0 ? void 0 : (_product$article = product.article) === null || _product$article === void 0 ? void 0 : _product$article.id_article, product === null || product === void 0 ? void 0 : (_product$article2 = product.article) === null || _product$article2 === void 0 ? void 0 : _product$article2.category, parseInt(product === null || product === void 0 ? void 0 : (_product$article3 = product.article) === null || _product$article3 === void 0 ? void 0 : _product$article3.id_category), auditableVersion.version);
519
+ return (0, _data.getRetailerServices)(product === null || product === void 0 ? void 0 : (_product$article = product.article) === null || _product$article === void 0 ? void 0 : _product$article.id_article, product === null || product === void 0 ? void 0 : (_product$article2 = product.article) === null || _product$article2 === void 0 ? void 0 : _product$article2.category, parseInt(product === null || product === void 0 ? void 0 : (_product$article3 = product.article) === null || _product$article3 === void 0 ? void 0 : _product$article3.id_category), auditableVersion.version);
530
520
 
531
521
  case 3:
532
522
  _auditServices = _context2.sent;
@@ -566,7 +556,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
566
556
  case 0:
567
557
  _context3.prev = 0;
568
558
  _context3.next = 3;
569
- return (0, _data2.getRetailerServices)(product === null || product === void 0 ? void 0 : (_product$article4 = product.article) === null || _product$article4 === void 0 ? void 0 : _product$article4.id_article, product === null || product === void 0 ? void 0 : (_product$article5 = product.article) === null || _product$article5 === void 0 ? void 0 : _product$article5.category, parseInt(product === null || product === void 0 ? void 0 : (_product$article6 = product.article) === null || _product$article6 === void 0 ? void 0 : _product$article6.id_category), version);
559
+ return (0, _data.getRetailerServices)(product === null || product === void 0 ? void 0 : (_product$article4 = product.article) === null || _product$article4 === void 0 ? void 0 : _product$article4.id_article, product === null || product === void 0 ? void 0 : (_product$article5 = product.article) === null || _product$article5 === void 0 ? void 0 : _product$article5.category, parseInt(product === null || product === void 0 ? void 0 : (_product$article6 = product.article) === null || _product$article6 === void 0 ? void 0 : _product$article6.id_category), version);
570
560
 
571
561
  case 3:
572
562
  _services = _context3.sent;
@@ -583,7 +573,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
583
573
  init: _services[2]
584
574
  });
585
575
  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);
586
- (0, _data2.getPercentage)({
576
+ (0, _data.getPercentage)({
587
577
  data: [product]
588
578
  }).then(function (res) {
589
579
  return setPercentages(res[0]);
@@ -708,7 +698,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
708
698
  getComments();
709
699
  _context6.t0 = setUserGroups;
710
700
  _context6.next = 6;
711
- return (0, _data2.fetchUsers)(token);
701
+ return (0, _data.fetchUsers)(token);
712
702
 
713
703
  case 6:
714
704
  _context6.t1 = _context6.sent;
@@ -719,7 +709,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
719
709
  break;
720
710
 
721
711
  case 12:
722
- arr = ["AS", "CA", "RC", "RA", "RP", "RCA"];
712
+ arr = ["PA", "AS", "CA", "RC", "RA", "RP", "RCA"];
723
713
  return _context6.abrupt("break", 20);
724
714
 
725
715
  case 14:
@@ -1268,7 +1258,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
1268
1258
  })) === null || _servicesData$find === void 0 ? void 0 : (_servicesData$find$st = _servicesData$find.status) === null || _servicesData$find$st === void 0 ? void 0 : _servicesData$find$st.replace(/.*\//, ""); //sessionStorage product
1269
1259
 
1270
1260
  var adminFacilitatorCanEvaluate = retailerStatus === "IE" && [1, 4, 5].includes(user.id_role);
1271
- var adminAuditorCanEvaluate = ["AC", "RP", "RCA", "SAC"].includes(retailerStatus) && [1, 6].includes(user.id_role);
1261
+ var adminAuditorCanEvaluate = ["AC", "RP", "RCA"].includes(retailerStatus) && [1, 6].includes(user.id_role);
1272
1262
  return adminFacilitatorCanEvaluate || adminAuditorCanEvaluate;
1273
1263
  };
1274
1264
 
@@ -1328,7 +1318,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
1328
1318
 
1329
1319
  var sendToFacilitator = /*#__PURE__*/function () {
1330
1320
  var _ref14 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(result) {
1331
- var concept, productTemp, evalStatus, articleId, orderId, data, res, _message, specialistDone, _JSON$parse5, newStatus, newOrderStatus, newArticleStatus, messageToChat, _data;
1321
+ var concept, productTemp, evalStatus, articleId, orderId, data, res, _message, specialistDone, _JSON$parse5, newStatus, newOrderStatus, newArticleStatus;
1332
1322
 
1333
1323
  return _regenerator.default.wrap(function _callee11$(_context11) {
1334
1324
  while (1) {
@@ -1391,59 +1381,39 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
1391
1381
 
1392
1382
  case 21:
1393
1383
  if (!(res.data.statusCode === 200)) {
1394
- _context11.next = 34;
1384
+ _context11.next = 30;
1395
1385
  break;
1396
1386
  }
1397
1387
 
1398
1388
  _JSON$parse5 = JSON.parse(res.data.body), newStatus = _JSON$parse5.newStatus, newOrderStatus = _JSON$parse5.newOrderStatus, newArticleStatus = _JSON$parse5.newArticleStatus;
1399
- messageToChat = (0, _utils.createMessage)(product.retailers, activeRetailer.id, evalStatus, newStatus, activeTab);
1400
- _data = {
1401
- paramsBody: {
1402
- id: product.article.id_article,
1403
- version: version,
1404
- items: [{
1405
- type: "status",
1406
- value: messageToChat
1407
- }],
1408
- retailerId: activeRetailer.id,
1409
- status: product.status
1410
- },
1411
- paramsHeader: {
1412
- Authorization: token
1413
- }
1414
- };
1415
- _context11.next = 27;
1416
- return (0, _utils.sendMessage)(_data);
1417
-
1418
- case 27:
1419
1389
  if (newOrderStatus) productTemp.status = newArticleStatus[articleId];
1420
1390
  productTemp["".concat(concept, "_status")] = newStatus;
1421
- _context11.next = 31;
1391
+ _context11.next = 27;
1422
1392
  return loadData();
1423
1393
 
1424
- case 31:
1394
+ case 27:
1425
1395
  if (_message) setMessage(_message);
1426
1396
  sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
1427
1397
  setProduct(productTemp);
1428
1398
 
1429
- case 34:
1430
- _context11.next = 39;
1399
+ case 30:
1400
+ _context11.next = 35;
1431
1401
  break;
1432
1402
 
1433
- case 36:
1434
- _context11.prev = 36;
1403
+ case 32:
1404
+ _context11.prev = 32;
1435
1405
  _context11.t0 = _context11["catch"](1);
1436
1406
  console.log(_context11.t0);
1437
1407
 
1438
- case 39:
1408
+ case 35:
1439
1409
  setLoading(false);
1440
1410
 
1441
- case 40:
1411
+ case 36:
1442
1412
  case "end":
1443
1413
  return _context11.stop();
1444
1414
  }
1445
1415
  }
1446
- }, _callee11, null, [[1, 36]]);
1416
+ }, _callee11, null, [[1, 32]]);
1447
1417
  }));
1448
1418
 
1449
1419
  return function sendToFacilitator(_x) {
@@ -1478,33 +1448,55 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
1478
1448
  };
1479
1449
 
1480
1450
  var createComment = /*#__PURE__*/function () {
1481
- var _ref15 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
1482
- var messages,
1483
- retailerId,
1484
- data,
1485
- _args12 = arguments;
1451
+ var _ref15 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12(e, body, tab) {
1452
+ var _product$article16;
1453
+
1454
+ var concept, data;
1486
1455
  return _regenerator.default.wrap(function _callee12$(_context12) {
1487
1456
  while (1) {
1488
1457
  switch (_context12.prev = _context12.next) {
1489
1458
  case 0:
1490
- messages = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : [];
1491
- retailerId = _args12.length > 1 ? _args12[1] : undefined;
1459
+ concept = "";
1460
+ _context12.t0 = activeTab;
1461
+ _context12.next = _context12.t0 === "Ficha técnica" ? 4 : _context12.t0 === "Imágenes" ? 6 : 8;
1462
+ break;
1463
+
1464
+ case 4:
1465
+ concept = "datasheet";
1466
+ return _context12.abrupt("break", 10);
1467
+
1468
+ case 6:
1469
+ concept = "images";
1470
+ return _context12.abrupt("break", 10);
1471
+
1472
+ case 8:
1473
+ concept = "description";
1474
+ return _context12.abrupt("break", 10);
1475
+
1476
+ case 10:
1492
1477
  data = {
1493
- paramsBody: {
1494
- id: product.article.id_article,
1495
- version: version,
1496
- items: messages,
1497
- retailerId: retailerId,
1498
- status: product.status
1499
- },
1500
- paramsHeader: {
1478
+ articleId: product === null || product === void 0 ? void 0 : (_product$article16 = product.article) === null || _product$article16 === void 0 ? void 0 : _product$article16.id_article,
1479
+ orderId: product === null || product === void 0 ? void 0 : product.orderId,
1480
+ message: body === null || body === void 0 ? void 0 : body.replace(/<.*?\/?>/gm, ""),
1481
+ concept: concept,
1482
+ version: version
1483
+ };
1484
+ _context12.next = 13;
1485
+ return _axios.default.post("".concat(process.env.REACT_APP_COMMENTS_ENDPOINT), data, {
1486
+ headers: {
1501
1487
  Authorization: token
1502
1488
  }
1503
- };
1489
+ });
1490
+
1491
+ case 13:
1492
+ _context12.next = 15;
1493
+ return getComments(tab);
1494
+
1495
+ case 15:
1504
1496
  setMessage("");
1505
- return _context12.abrupt("return", (0, _utils.sendMessage)(data));
1497
+ setComponentsArray([]);
1506
1498
 
1507
- case 5:
1499
+ case 17:
1508
1500
  case "end":
1509
1501
  return _context12.stop();
1510
1502
  }
@@ -1512,7 +1504,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
1512
1504
  }, _callee12);
1513
1505
  }));
1514
1506
 
1515
- return function createComment() {
1507
+ return function createComment(_x2, _x3, _x4) {
1516
1508
  return _ref15.apply(this, arguments);
1517
1509
  };
1518
1510
  }();
@@ -1627,7 +1619,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
1627
1619
 
1628
1620
  var setAssignation = /*#__PURE__*/function () {
1629
1621
  var _ref17 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(assignationType, assignationId) {
1630
- var _product$article16;
1622
+ var _product$article17;
1631
1623
 
1632
1624
  var concept, productTemp, data;
1633
1625
  return _regenerator.default.wrap(function _callee14$(_context14) {
@@ -1657,7 +1649,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
1657
1649
  data = {
1658
1650
  articleList: [{
1659
1651
  orderId: product.orderId,
1660
- articleId: product === null || product === void 0 ? void 0 : (_product$article16 = product.article) === null || _product$article16 === void 0 ? void 0 : _product$article16.id_article
1652
+ articleId: product === null || product === void 0 ? void 0 : (_product$article17 = product.article) === null || _product$article17 === void 0 ? void 0 : _product$article17.id_article
1661
1653
  }],
1662
1654
  concept: concept,
1663
1655
  userId: assignationId
@@ -1684,7 +1676,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
1684
1676
  }, _callee14);
1685
1677
  }));
1686
1678
 
1687
- return function setAssignation(_x2, _x3) {
1679
+ return function setAssignation(_x5, _x6) {
1688
1680
  return _ref17.apply(this, arguments);
1689
1681
  };
1690
1682
  }();
@@ -1798,7 +1790,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
1798
1790
 
1799
1791
  var validateAll = /*#__PURE__*/function () {
1800
1792
  var _ref18 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15(result) {
1801
- var _conceptArray, evaluationArray, sendAll, conceptArray, messages, productTemp, messagesResponse;
1793
+ var _conceptArray, evaluationArray, sendAll, conceptArray, productTemp;
1802
1794
 
1803
1795
  return _regenerator.default.wrap(function _callee15$(_context15) {
1804
1796
  while (1) {
@@ -1826,7 +1818,6 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
1826
1818
  return _context15.abrupt("break", 14);
1827
1819
 
1828
1820
  case 14:
1829
- messages = [];
1830
1821
  servicesData === null || servicesData === void 0 ? void 0 : servicesData.forEach(function (ret) {
1831
1822
  if (conceptArray.includes(ret.service)) {
1832
1823
  var _product$id_order;
@@ -1839,16 +1830,6 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
1839
1830
  evalStatus: product["".concat(ret.service, "_status")],
1840
1831
  retailerId: ret.id_retailer
1841
1832
  };
1842
-
1843
- if (product["".concat(ret.service, "_status")] !== "NS") {
1844
- var _message2 = (0, _utils.createMessage)(product.retailers, ret.id_retailer, product["".concat(ret.service, "_status")], "".concat(result, "A"), ret.service);
1845
-
1846
- messages.push(createComment([{
1847
- type: "status",
1848
- value: _message2
1849
- }], ret.id_retailer));
1850
- }
1851
-
1852
1833
  evaluationArray.push(_axios.default.put("".concat(process.env.REACT_APP_EVALUATION_ENDPOINT), data, {
1853
1834
  headers: {
1854
1835
  Authorization: token
@@ -1856,6 +1837,10 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
1856
1837
  }));
1857
1838
  }
1858
1839
  });
1840
+ _context15.next = 17;
1841
+ return Promise.all(evaluationArray);
1842
+
1843
+ case 17:
1859
1844
  (_conceptArray = conceptArray) === null || _conceptArray === void 0 ? void 0 : _conceptArray.forEach(function (concept) {
1860
1845
  var _product$id_order2;
1861
1846
 
@@ -1871,43 +1856,38 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
1871
1856
  }
1872
1857
  }));
1873
1858
  });
1874
- _context15.next = 19;
1859
+ _context15.next = 20;
1875
1860
  return Promise.all(sendAll);
1876
1861
 
1877
- case 19:
1862
+ case 20:
1878
1863
  productTemp = product;
1879
1864
  productTemp.status = "".concat(result, "A");
1880
- productTemp.datasheet_status = productTemp.datasheet_status === "NS" ? "NS" : "".concat(result, "A");
1881
- productTemp.description_status = productTemp.description_status === "NS" ? "NS" : "".concat(result, "A");
1882
- productTemp.images_status = productTemp.images_status === "NS" ? "NS" : "".concat(result, "A");
1865
+ productTemp.datasheet_status = productTemp.datasheet_status === "NA" ? "NA" : "".concat(result, "A");
1866
+ productTemp.description_status = productTemp.description_status === "NA" ? "NA" : "".concat(result, "A");
1867
+ productTemp.images_status = productTemp.images_status === "NA" ? "NA" : "".concat(result, "A");
1883
1868
  sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
1884
1869
  setProduct(productTemp);
1885
- _context15.next = 28;
1886
- return Promise.all(messages);
1887
-
1888
- case 28:
1889
- messagesResponse = _context15.sent;
1890
- _context15.next = 31;
1870
+ _context15.next = 29;
1891
1871
  return loadData();
1892
1872
 
1893
- case 31:
1894
- _context15.next = 36;
1873
+ case 29:
1874
+ _context15.next = 34;
1895
1875
  break;
1896
1876
 
1897
- case 33:
1898
- _context15.prev = 33;
1877
+ case 31:
1878
+ _context15.prev = 31;
1899
1879
  _context15.t1 = _context15["catch"](0);
1900
1880
  console.log(_context15.t1);
1901
1881
 
1902
- case 36:
1882
+ case 34:
1903
1883
  case "end":
1904
1884
  return _context15.stop();
1905
1885
  }
1906
1886
  }
1907
- }, _callee15, null, [[0, 33]]);
1887
+ }, _callee15, null, [[0, 31]]);
1908
1888
  }));
1909
1889
 
1910
- return function validateAll(_x4) {
1890
+ return function validateAll(_x7) {
1911
1891
  return _ref18.apply(this, arguments);
1912
1892
  };
1913
1893
  }();
@@ -1920,10 +1900,8 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
1920
1900
  setCompare: setCompare,
1921
1901
  isAuditor: [1, 6].includes(user.id_role),
1922
1902
  withChat: location === null || location === void 0 ? void 0 : (_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.withChat,
1923
- chatType: location === null || location === void 0 ? void 0 : (_location$state2 = location.state) === null || _location$state2 === void 0 ? void 0 : _location$state2.chatType,
1924
- productSelected: product,
1925
- token: token,
1926
- activeRetailer: activeRetailer
1903
+ productSelected: productSelected,
1904
+ token: token
1927
1905
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1928
1906
  className: "data-container",
1929
1907
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
@@ -1965,7 +1943,27 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
1965
1943
  sendToFacilitator("A");
1966
1944
  },
1967
1945
  reject: function reject() {
1968
- setShowRejectModal(true);
1946
+ sendToFacilitator("R");
1947
+ setMessage("Rechazado");
1948
+ setComponentsArray([/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
1949
+ src: _errorModal.default
1950
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
1951
+ text: "Agrega tu comentarios para enviar el rechazo",
1952
+ headerType: "input-name-header",
1953
+ color: "white"
1954
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TagAndInput, {
1955
+ label: "Caja de Comentario",
1956
+ inputType: "textarea",
1957
+ inputId: "modal-commentary-box",
1958
+ index: 0,
1959
+ color: "white"
1960
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
1961
+ buttonType: "general-default-button",
1962
+ label: "Enviar comentario",
1963
+ onClick: function onClick(e) {
1964
+ return createComment(e, document.querySelector("#modal-commentary-box .ql-container .ql-editor > p").innerHTML, activeTab);
1965
+ }
1966
+ })]);
1969
1967
  },
1970
1968
  showApproveRejectAll: approveRejectAllButtons() && (auditorAssigned() || userAssigned()),
1971
1969
  showValidationButtons: approveRejectButtons() && (auditorAssigned() || userAssigned()),
@@ -1973,8 +1971,27 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
1973
1971
  return validateAll("A");
1974
1972
  },
1975
1973
  rejectAll: function rejectAll() {
1976
- setShowRejectModal(true);
1977
- setValRejAll(true);
1974
+ validateAll("R");
1975
+ setMessage("Rechazado");
1976
+ setComponentsArray([/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
1977
+ src: _errorModal.default
1978
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
1979
+ text: "Agrega tu comentarios para enviar el rechazo",
1980
+ headerType: "input-name-header",
1981
+ color: "white"
1982
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TagAndInput, {
1983
+ label: "Caja de Comentario",
1984
+ inputType: "textarea",
1985
+ inputId: "modal-commentary-box",
1986
+ index: 0,
1987
+ color: "white"
1988
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
1989
+ buttonType: "general-default-button",
1990
+ label: "Enviar comentario",
1991
+ onClick: function onClick(e) {
1992
+ return createComment(e, document.querySelector("#modal-commentary-box .ql-container .ql-editor > p").innerHTML, activeTab);
1993
+ }
1994
+ })]);
1978
1995
  }
1979
1996
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FullTabsMenu.FullTabsMenu, {
1980
1997
  tabsSections: tabsSections,
@@ -2038,7 +2055,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
2038
2055
  auditInputGroup: auditDescriptions[0],
2039
2056
  updatedDescriptions: updatedDescriptions,
2040
2057
  setUpdatedDescriptions: setUpdatedDescriptions,
2041
- articleId: product === null || product === void 0 ? void 0 : (_product$article17 = product.article) === null || _product$article17 === void 0 ? void 0 : _product$article17.id_article,
2058
+ articleId: product === null || product === void 0 ? void 0 : (_product$article18 = product.article) === null || _product$article18 === void 0 ? void 0 : _product$article18.id_article,
2042
2059
  version: version,
2043
2060
  dinamicHeight: true,
2044
2061
  compare: compare
@@ -2059,15 +2076,57 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
2059
2076
  headerType: "input-name-header"
2060
2077
  }))]
2061
2078
  })
2062
- }), (userAssigned(activeTab) || auditorAssigned()) && product["".concat(getConcept(activeTab), "_status")] !== "NS" && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
2079
+ }), (userAssigned(activeTab) || auditorAssigned()) && product["".concat(getConcept(activeTab), "_status")] !== "NS" && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2063
2080
  className: "commentary-box",
2064
- children: [7, 8].includes(user.id_role) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
2081
+ children: [!comment ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2082
+ className: "commentary",
2083
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TagAndInput, {
2084
+ label: "Caja de Comentario",
2085
+ inputType: "textarea",
2086
+ inputCols: 80,
2087
+ inputRows: 4,
2088
+ inputId: "commentary-box",
2089
+ index: 0
2090
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
2091
+ className: "buttons-box",
2092
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
2093
+ buttonType: "general-transparent-button",
2094
+ label: "Enviar comentario",
2095
+ onClick: function onClick(e) {
2096
+ return createComment(e, document.querySelector("#commentary-box .ql-container .ql-editor > p").innerHTML, activeTab);
2097
+ }
2098
+ })
2099
+ })]
2100
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2101
+ className: "feedback-box",
2102
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Commentary.Commentary, {
2103
+ comment: comment === null || comment === void 0 ? void 0 : (_comment$message = comment.message) === null || _comment$message === void 0 ? void 0 : _comment$message.replace(/<.*?\/?>/gm, ""),
2104
+ reviewed: crossComment
2105
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
2106
+ buttonType: "circular-button accept-button",
2107
+ onClick: /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
2108
+ return _regenerator.default.wrap(function _callee16$(_context16) {
2109
+ while (1) {
2110
+ switch (_context16.prev = _context16.next) {
2111
+ case 0:
2112
+ setCrossComment(true);
2113
+ commentRevised();
2114
+
2115
+ case 2:
2116
+ case "end":
2117
+ return _context16.stop();
2118
+ }
2119
+ }
2120
+ }, _callee16);
2121
+ }))
2122
+ })]
2123
+ }), [7, 8].includes(user.id_role) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
2065
2124
  buttonType: evaluationFinished(user.id_role, activeTab, statusArray) && requiredNull[activeTab] === 0 ? "general-green-button" : "general-button-disabled",
2066
2125
  label: "Enviar evaluación",
2067
2126
  onClick: function onClick() {
2068
2127
  return sendToFacilitator();
2069
2128
  }
2070
- })
2129
+ })]
2071
2130
  })]
2072
2131
  })]
2073
2132
  }), showModal && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProductImageModal.ProductImageModal, {
@@ -2096,54 +2155,6 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
2096
2155
  currentVersion: version,
2097
2156
  setShowVersionSelector: setShowVersionSelector,
2098
2157
  jwt: token
2099
- }), showRejectModal && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.Modal, {
2100
- title: "Agregar mensaje de rechazo",
2101
- show: showRejectModal,
2102
- customComponent: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TagAndInput, {
2103
- label: "Caja de Comentario",
2104
- inputType: "textarea",
2105
- inputId: "modal-message-box",
2106
- index: 0,
2107
- color: "white"
2108
- }),
2109
- buttons: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
2110
- type: "white",
2111
- label: "Cancelar",
2112
- size: 12,
2113
- onClick: function onClick() {
2114
- setShowRejectModal(false);
2115
- }
2116
- }, "btn-Cancelar"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
2117
- type: "pink",
2118
- label: "Aceptar",
2119
- size: 12,
2120
- onClick: /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
2121
- var body, messages;
2122
- return _regenerator.default.wrap(function _callee16$(_context16) {
2123
- while (1) {
2124
- switch (_context16.prev = _context16.next) {
2125
- case 0:
2126
- body = document.querySelector("#modal-message-box .ql-container .ql-editor > p").innerHTML;
2127
- messages = [{
2128
- type: "message",
2129
- value: body === null || body === void 0 ? void 0 : body.replace(/<.*?\/?>/gm, "")
2130
- }];
2131
- _context16.next = 4;
2132
- return createComment(messages, activeRetailer.id);
2133
-
2134
- case 4:
2135
- valRejAll ? validateAll("R") : sendToFacilitator("R");
2136
- setMessage("Rechazado");
2137
- setShowRejectModal(false);
2138
-
2139
- case 7:
2140
- case "end":
2141
- return _context16.stop();
2142
- }
2143
- }
2144
- }, _callee16);
2145
- }))
2146
- }, "btn-Aceptar")]
2147
2158
  })]
2148
2159
  });
2149
2160
  };