contentoh-components-library 21.5.84 → 21.5.86

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.
@@ -89,6 +89,10 @@ var _Commentary = require("../../atoms/Commentary");
89
89
 
90
90
  var _AiProductEdition = require("../../../contexts/AiProductEdition");
91
91
 
92
+ var _ChangeStatusModal = _interopRequireDefault(require("../../organisms/ChangeStatusModal"));
93
+
94
+ var _material = require("@mui/material");
95
+
92
96
  var _jsxRuntime = require("react/jsx-runtime");
93
97
 
94
98
  var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
@@ -263,6 +267,11 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
263
267
  isDragActive = _useDropzone.isDragActive,
264
268
  open = _useDropzone.open;
265
269
 
270
+ var _useState31 = (0, _react.useState)(false),
271
+ _useState32 = (0, _slicedToArray2.default)(_useState31, 2),
272
+ openChangeStatusModal = _useState32[0],
273
+ setOpenChangeStatusModal = _useState32[1];
274
+
266
275
  var thumbs = function thumbs() {
267
276
  var _state$images_values, _state$images_values$, _state$images_values4, _state$images_values5, _state$images_values6, _state$images_values7, _state$images_values8, _state$images_values9;
268
277
 
@@ -319,99 +328,99 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
319
328
  }
320
329
  }, index);
321
330
  });
322
- }; // Setter del producto y carga inicial (optimizado para evitar cascada)
331
+ };
323
332
 
333
+ var initializeProduct = /*#__PURE__*/function () {
334
+ var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
335
+ var product, productNormalized, users, id_article, response, parseData;
336
+ return _regenerator.default.wrap(function _callee2$(_context2) {
337
+ while (1) {
338
+ switch (_context2.prev = _context2.next) {
339
+ case 0:
340
+ _context2.prev = 0;
341
+ product = JSON.parse(sessionStorage.getItem("productSelected")) ? JSON.parse(sessionStorage.getItem("productSelected")) : productSelected;
342
+ productNormalized = (0, _utils.normalizeProduct)(product);
343
+ dispatch({
344
+ type: "SET_PRODUCT",
345
+ payload: productNormalized
346
+ });
347
+ dispatch({
348
+ type: "SET_ACTIVE_RETAILER",
349
+ payload: productNormalized.categoryRetailerInOrder[0]
350
+ });
351
+ setShotThd([58, 59, 60, 61].includes(productNormalized.categoryRetailerInOrder[0].id_retailer)); // Configurar statusArray según el rol del usuario
324
352
 
325
- (0, _react.useEffect)(function () {
326
- var initializeProduct = /*#__PURE__*/function () {
327
- var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
328
- var product, productNormalized, users, id_article, response, parseData;
329
- return _regenerator.default.wrap(function _callee2$(_context2) {
330
- while (1) {
331
- switch (_context2.prev = _context2.next) {
332
- case 0:
333
- _context2.prev = 0;
334
- product = JSON.parse(sessionStorage.getItem("productSelected")) ? JSON.parse(sessionStorage.getItem("productSelected")) : productSelected;
335
- productNormalized = (0, _utils.normalizeProduct)(product);
336
- dispatch({
337
- type: "SET_PRODUCT",
338
- payload: productNormalized
339
- });
340
- dispatch({
341
- type: "SET_ACTIVE_RETAILER",
342
- payload: productNormalized.categoryRetailerInOrder[0]
343
- });
344
- setShotThd([58, 59, 60, 61].includes(productNormalized.categoryRetailerInOrder[0].id_retailer)); // Configurar statusArray según el rol del usuario
353
+ setStatusArray((0, _utils.getStatusArrayByRole)(user.id_role)); // Cargar usuarios y asignaciones
345
354
 
346
- setStatusArray((0, _utils.getStatusArrayByRole)(user.id_role)); // Cargar usuarios y asignaciones
355
+ _context2.next = 9;
356
+ return (0, _data.fetchUsers)(token);
347
357
 
348
- _context2.next = 9;
349
- return (0, _data.fetchUsers)(token);
358
+ case 9:
359
+ users = _context2.sent;
350
360
 
351
- case 9:
352
- users = _context2.sent;
361
+ if (users.length > 0) {
362
+ dispatch({
363
+ type: "SET_COLLABORATOR_ASSIGNATIONS",
364
+ payload: (0, _utils.buildCollaboratorAssignations)(productNormalized, users)
365
+ });
366
+ }
353
367
 
354
- if (users.length > 0) {
355
- dispatch({
356
- type: "SET_COLLABORATOR_ASSIGNATIONS",
357
- payload: (0, _utils.buildCollaboratorAssignations)(productNormalized, users)
358
- });
359
- }
368
+ id_article = productNormalized.id_article;
360
369
 
361
- id_article = productNormalized.id_article;
370
+ if (!id_article) {
371
+ _context2.next = 15;
372
+ break;
373
+ }
362
374
 
363
- if (!id_article) {
364
- _context2.next = 15;
365
- break;
366
- }
375
+ _context2.next = 15;
376
+ return (0, _utils.getAuditVersion)(id_article, setAuditableVersion, token);
367
377
 
368
- _context2.next = 15;
369
- return (0, _utils.getAuditVersion)(id_article, setAuditableVersion, token);
378
+ case 15:
379
+ if (!(id_article && productNormalized.id_order)) {
380
+ _context2.next = 21;
381
+ break;
382
+ }
370
383
 
371
- case 15:
372
- if (!(id_article && productNormalized.id_order)) {
373
- _context2.next = 21;
374
- break;
384
+ _context2.next = 18;
385
+ return _axios.default.get(process.env.REACT_APP_READ_OBSERVATION, {
386
+ params: {
387
+ articleId: id_article,
388
+ orderId: productNormalized.id_order
389
+ },
390
+ headers: {
391
+ Authorization: sessionStorage.getItem("jwt")
375
392
  }
393
+ });
376
394
 
377
- _context2.next = 18;
378
- return _axios.default.get(process.env.REACT_APP_READ_OBSERVATION, {
379
- params: {
380
- articleId: id_article,
381
- orderId: productNormalized.id_order
382
- },
383
- headers: {
384
- Authorization: sessionStorage.getItem("jwt")
385
- }
386
- });
387
-
388
- case 18:
389
- response = _context2.sent;
390
- parseData = JSON.parse(response.data.body).data[0];
391
- setObservation(parseData.observations);
395
+ case 18:
396
+ response = _context2.sent;
397
+ parseData = JSON.parse(response.data.body).data[0];
398
+ setObservation(parseData.observations);
392
399
 
393
- case 21:
394
- _context2.next = 26;
395
- break;
400
+ case 21:
401
+ _context2.next = 26;
402
+ break;
396
403
 
397
- case 23:
398
- _context2.prev = 23;
399
- _context2.t0 = _context2["catch"](0);
400
- console.log("Error setting product data: ", _context2.t0);
404
+ case 23:
405
+ _context2.prev = 23;
406
+ _context2.t0 = _context2["catch"](0);
407
+ console.log("Error setting product data: ", _context2.t0);
401
408
 
402
- case 26:
403
- case "end":
404
- return _context2.stop();
405
- }
409
+ case 26:
410
+ case "end":
411
+ return _context2.stop();
406
412
  }
407
- }, _callee2, null, [[0, 23]]);
408
- }));
413
+ }
414
+ }, _callee2, null, [[0, 23]]);
415
+ }));
416
+
417
+ return function initializeProduct() {
418
+ return _ref3.apply(this, arguments);
419
+ };
420
+ }(); // Setter del producto y carga inicial (optimizado para evitar cascada)
409
421
 
410
- return function initializeProduct() {
411
- return _ref3.apply(this, arguments);
412
- };
413
- }();
414
422
 
423
+ (0, _react.useEffect)(function () {
415
424
  initializeProduct();
416
425
  }, []);
417
426
 
@@ -457,6 +466,7 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
457
466
  var loadData = /*#__PURE__*/function () {
458
467
  var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
459
468
  var enableLoading,
469
+ versionSelected,
460
470
  _JSON$parse$0$relatio,
461
471
  _JSON$parse,
462
472
  _JSON$parse$,
@@ -492,7 +502,8 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
492
502
  switch (_context4.prev = _context4.next) {
493
503
  case 0:
494
504
  enableLoading = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : true;
495
- _context4.prev = 1;
505
+ versionSelected = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : null;
506
+ _context4.prev = 2;
496
507
  if (enableLoading) dispatch({
497
508
  type: "SET_LOADING",
498
509
  payload: true
@@ -502,7 +513,7 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
502
513
 
503
514
  data = [{
504
515
  id_article: id_article,
505
- version: version,
516
+ version: versionSelected ? versionSelected : version,
506
517
  relations: [{
507
518
  id_retailer: id_retailer,
508
519
  id_category: id_category
@@ -511,8 +522,8 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
511
522
  headers = {
512
523
  Authorization: token
513
524
  };
514
- _context4.next = 9;
515
- return Promise.all([(0, _data.getRetailerServices)(id_article, category, id_category, version, token, id_retailer), (0, _data.getPercentage)({
525
+ _context4.next = 10;
526
+ return Promise.all([(0, _data.getRetailerServices)(id_article, category, id_category, versionSelected !== null && versionSelected !== void 0 ? versionSelected : version, token, id_retailer), (0, _data.getPercentage)({
516
527
  data: data,
517
528
  headers: headers
518
529
  }), (0, _data.getServicesData)({
@@ -526,32 +537,43 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
526
537
  articleId: id_article,
527
538
  concept: "description",
528
539
  orderIdColab: id_order,
529
- version: version
540
+ version: versionSelected !== null && versionSelected !== void 0 ? versionSelected : version
530
541
  }
531
542
  }), _axios.default.get(process.env.REACT_APP_COMMENTS_ENDPOINT, {
532
543
  params: {
533
544
  articleId: id_article,
534
545
  concept: "datasheet",
535
546
  orderIdColab: id_order,
536
- version: version
547
+ version: versionSelected !== null && versionSelected !== void 0 ? versionSelected : version
537
548
  }
538
549
  }), _axios.default.get(process.env.REACT_APP_COMMENTS_ENDPOINT, {
539
550
  params: {
540
551
  articleId: id_article,
541
552
  concept: "images",
542
553
  orderIdColab: id_order,
543
- version: version
554
+ version: versionSelected !== null && versionSelected !== void 0 ? versionSelected : version
544
555
  }
545
556
  })])]);
546
557
 
547
- case 9:
558
+ case 10:
548
559
  _yield$Promise$all = _context4.sent;
549
560
  _yield$Promise$all2 = (0, _slicedToArray2.default)(_yield$Promise$all, 4);
550
561
  services = _yield$Promise$all2[0];
551
562
  percentagesRes = _yield$Promise$all2[1];
552
563
  servicesDataRes = _yield$Promise$all2[2];
553
564
  commentsResponse = _yield$Promise$all2[3];
554
- // Extraer relaciones del response
565
+ dispatch({
566
+ type: "SET_RETAILER_STATUS",
567
+ payload: servicesDataRes.map(function (service) {
568
+ return {
569
+ retailer_id: service === null || service === void 0 ? void 0 : service.id_retailer,
570
+ service: service === null || service === void 0 ? void 0 : service.service,
571
+ status: service === null || service === void 0 ? void 0 : service.status,
572
+ task_user_group_id: service === null || service === void 0 ? void 0 : service.task_user_group_id
573
+ };
574
+ })
575
+ }); // Extraer relaciones del response
576
+
555
577
  percentages = (_JSON$parse$0$relatio = (_JSON$parse = JSON.parse(percentagesRes === null || percentagesRes === void 0 ? void 0 : (_percentagesRes$ = percentagesRes[0]) === null || _percentagesRes$ === void 0 ? void 0 : _percentagesRes$.body)) === null || _JSON$parse === void 0 ? void 0 : (_JSON$parse$ = _JSON$parse[0]) === null || _JSON$parse$ === void 0 ? void 0 : _JSON$parse$.relations) !== null && _JSON$parse$0$relatio !== void 0 ? _JSON$parse$0$relatio : []; // Procesar comentarios
556
578
 
557
579
  commentsMap = {};
@@ -647,32 +669,32 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
647
669
  loadAuditableData();
648
670
  }
649
671
 
650
- _context4.next = 40;
672
+ _context4.next = 42;
651
673
  break;
652
674
 
653
- case 36:
654
- _context4.prev = 36;
655
- _context4.t0 = _context4["catch"](1);
675
+ case 38:
676
+ _context4.prev = 38;
677
+ _context4.t0 = _context4["catch"](2);
656
678
  console.log("Error loading data: ", _context4.t0);
657
679
  dispatch({
658
680
  type: "SET_ERRORS",
659
681
  payload: [_context4.t0.message]
660
682
  });
661
683
 
662
- case 40:
663
- _context4.prev = 40;
684
+ case 42:
685
+ _context4.prev = 42;
664
686
  dispatch({
665
687
  type: "SET_LOADING",
666
688
  payload: false
667
689
  });
668
- return _context4.finish(40);
690
+ return _context4.finish(42);
669
691
 
670
- case 43:
692
+ case 45:
671
693
  case "end":
672
694
  return _context4.stop();
673
695
  }
674
696
  }
675
- }, _callee4, null, [[1, 36, 40, 43]]);
697
+ }, _callee4, null, [[2, 38, 42, 45]]);
676
698
  }));
677
699
 
678
700
  return function loadData() {
@@ -1507,16 +1529,204 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
1507
1529
  type: "SET_PRODUCT_VERSION",
1508
1530
  payload: version
1509
1531
  });
1532
+ loadData(true, version);
1533
+ };
1534
+
1535
+ var ProductEditionSkeleton = function ProductEditionSkeleton() {
1536
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
1537
+ headerTop: 0,
1538
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
1539
+ px: 1.5,
1540
+ py: 1,
1541
+ pb: 0,
1542
+ display: "flex",
1543
+ alignItems: "center",
1544
+ justifyContent: "space-between",
1545
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Skeleton, {
1546
+ variant: "text",
1547
+ width: 300,
1548
+ height: 40
1549
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Stack, {
1550
+ direction: "row",
1551
+ spacing: 2,
1552
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Skeleton, {
1553
+ variant: "circular",
1554
+ width: 32,
1555
+ height: 32
1556
+ })
1557
+ })]
1558
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1559
+ className: "data-container",
1560
+ style: {
1561
+ display: "flex",
1562
+ gap: "8px",
1563
+ padding: "0 12px 12px"
1564
+ },
1565
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1566
+ className: "image-data-panel",
1567
+ style: {
1568
+ flex: "0 0 320px",
1569
+ display: "flex",
1570
+ flexDirection: "column",
1571
+ gap: "20px"
1572
+ },
1573
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Skeleton, {
1574
+ variant: "rounded",
1575
+ width: "100%",
1576
+ height: 400
1577
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Stack, {
1578
+ direction: "row",
1579
+ spacing: 2,
1580
+ justifyContent: "center",
1581
+ children: [1, 2, 3, 4].map(function (item) {
1582
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Skeleton, {
1583
+ variant: "rounded",
1584
+ width: 60,
1585
+ height: 80
1586
+ }, item);
1587
+ })
1588
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
1589
+ mt: 2,
1590
+ children: [1, 2, 3, 4].map(function (item) {
1591
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
1592
+ display: "flex",
1593
+ justifyContent: "space-between",
1594
+ py: 1,
1595
+ borderBottom: "1px solid #f0f0f0",
1596
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Skeleton, {
1597
+ variant: "text",
1598
+ width: "40%"
1599
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Skeleton, {
1600
+ variant: "text",
1601
+ width: "20%"
1602
+ })]
1603
+ }, item);
1604
+ })
1605
+ })]
1606
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1607
+ className: "product-information",
1608
+ style: {
1609
+ flex: 1,
1610
+ display: "flex",
1611
+ flexDirection: "column",
1612
+ gap: "14px"
1613
+ },
1614
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
1615
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Skeleton, {
1616
+ variant: "text",
1617
+ width: "80%",
1618
+ height: 50
1619
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Stack, {
1620
+ direction: "row",
1621
+ spacing: 2,
1622
+ alignItems: "center",
1623
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Skeleton, {
1624
+ variant: "rounded",
1625
+ width: 180,
1626
+ height: 24
1627
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Skeleton, {
1628
+ variant: "rounded",
1629
+ width: 300,
1630
+ height: 24
1631
+ })]
1632
+ })]
1633
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
1634
+ display: "flex",
1635
+ gap: 4,
1636
+ pb: 1,
1637
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Skeleton, {
1638
+ variant: "text",
1639
+ width: 140,
1640
+ height: 45
1641
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Skeleton, {
1642
+ variant: "text",
1643
+ width: 140,
1644
+ height: 45
1645
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Skeleton, {
1646
+ variant: "text",
1647
+ width: 140,
1648
+ height: 45
1649
+ })]
1650
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
1651
+ display: "flex",
1652
+ flexDirection: "column",
1653
+ gap: 4,
1654
+ children: [1, 2, 3].map(function (item) {
1655
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
1656
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
1657
+ display: "flex",
1658
+ justifyContent: "space-between",
1659
+ alignItems: "center",
1660
+ mb: 1,
1661
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Skeleton, {
1662
+ variant: "text",
1663
+ width: "30%",
1664
+ height: 24
1665
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Skeleton, {
1666
+ variant: "rounded",
1667
+ width: 175,
1668
+ height: 25,
1669
+ sx: {
1670
+ borderRadius: "7.5px"
1671
+ }
1672
+ })]
1673
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Skeleton, {
1674
+ variant: "rounded",
1675
+ width: "100%",
1676
+ height: 70
1677
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
1678
+ display: "flex",
1679
+ justifyContent: "flex-end",
1680
+ mt: 0.5,
1681
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Skeleton, {
1682
+ variant: "text",
1683
+ width: 60
1684
+ })
1685
+ })]
1686
+ }, item);
1687
+ })
1688
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
1689
+ mt: "auto",
1690
+ pt: 4,
1691
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Skeleton, {
1692
+ variant: "rounded",
1693
+ width: "100%",
1694
+ height: 120
1695
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
1696
+ display: "flex",
1697
+ justifyContent: "flex-end",
1698
+ gap: 2,
1699
+ mt: 2,
1700
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Skeleton, {
1701
+ variant: "rounded",
1702
+ width: 180,
1703
+ height: 45,
1704
+ sx: {
1705
+ borderRadius: "24px"
1706
+ }
1707
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Skeleton, {
1708
+ variant: "rounded",
1709
+ width: 180,
1710
+ height: 45,
1711
+ sx: {
1712
+ borderRadius: "24px"
1713
+ }
1714
+ })]
1715
+ })]
1716
+ })]
1717
+ })]
1718
+ })]
1719
+ });
1510
1720
  };
1511
1721
 
1512
1722
  if (state.loading || !state.services || !state.product) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
1513
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Loading.Loading, {})
1723
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ProductEditionSkeleton, {})
1514
1724
  });
1515
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_AiProductEdition.AiProductEditionProvider, {
1725
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_AiProductEdition.AiProductEditionProvider, {
1516
1726
  isCreatorsEdition: true,
1517
1727
  user: user,
1518
1728
  token: token,
1519
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
1729
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
1520
1730
  headerTop: headerTop,
1521
1731
  children: [showRejectModal && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.Modal, {
1522
1732
  title: rejectAll ? "Agregar mensaje para rechazar todo" : "Agregar mensaje de rechazo",
@@ -1882,15 +2092,33 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
1882
2092
  }, _callee13);
1883
2093
  }))
1884
2094
  })]
1885
- }), [7, 8].includes(user.id_role) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
1886
- buttonType: isEvaluationFinished(user.id_role, state.active_tab, statusArray) && state.missing_required_fields[state.active_tab] === 0 ? "general-green-button" : "general-button-disabled",
1887
- label: "Enviar evaluación",
1888
- onClick: handleOnSendEvaluationToFacilitator
2095
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2096
+ className: "action-buttons",
2097
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
2098
+ buttonType: "general-pink-button",
2099
+ label: "Cambio de Estatus",
2100
+ onClick: function onClick() {
2101
+ return setOpenChangeStatusModal(true);
2102
+ },
2103
+ id: "button-change-status"
2104
+ }), [7, 8].includes(user.id_role) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
2105
+ buttonType: isEvaluationFinished(user.id_role, state.active_tab, statusArray) && state.missing_required_fields[state.active_tab] === 0 ? "general-green-button" : "general-button-disabled",
2106
+ label: "Enviar evaluación",
2107
+ onClick: handleOnSendEvaluationToFacilitator
2108
+ })]
1889
2109
  })]
1890
2110
  })]
1891
2111
  })]
1892
2112
  })]
1893
- })
2113
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChangeStatusModal.default, {
2114
+ state: state,
2115
+ open: openChangeStatusModal,
2116
+ onClose: function onClose() {
2117
+ setOpenChangeStatusModal(false);
2118
+ },
2119
+ reloadData: loadData,
2120
+ token: token
2121
+ })]
1894
2122
  });
1895
2123
  };
1896
2124
 
@@ -15,7 +15,7 @@ var _variables = require("../../../global-files/variables");
15
15
 
16
16
  var _templateObject;
17
17
 
18
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n height: 100%;\n flex: 1;\n overflow: auto;\n\n .data-container {\n display: flex;\n flex: 0%;\n height: calc(100% - ", "px);\n .image-data-panel {\n width: 340px;\n\n & + * {\n margin-left: 10px;\n }\n }\n\n .product-information {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n\n .services-information-container {\n height: 100%;\n overflow: auto;\n }\n\n .image-services {\n aside {\n display: grid;\n grid-template-columns: repeat(auto-fill, 179px);\n column-gap: 15px;\n row-gap: 15px;\n padding: 20px;\n }\n }\n\n .commentary-box {\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n padding: 10px;\n padding-left: 0;\n\n .commentary {\n display: flex;\n align-items: flex-end;\n\n .input-container {\n width: 500px;\n\n .quill {\n height: 100px;\n }\n\n & + * {\n margin-left: 5px;\n }\n }\n\n .buttons-box {\n display: flex;\n width: 210px;\n flex-wrap: wrap;\n\n .general-transparent-button {\n & + * {\n margin-top: 5px;\n }\n }\n\n .general-transparent-button,\n .general-green-button,\n .general-button-disabled {\n width: fit-content;\n min-width: 201px;\n height: 40px;\n }\n }\n }\n }\n\n .feedback-box {\n display: flex;\n }\n\n .required-inputs-message {\n font-family: ", ";\n font-size: 13px;\n color: ", ";\n padding: 10px;\n display: flex;\n align-items: center;\n\n p + * {\n margin-top: 10px;\n }\n\n button {\n min-width: fit-content;\n }\n }\n }\n }\n #modal-message-box {\n width: 400px;\n height: 100px;\n }\n .container {\n width: 100%;\n height: 90%;\n .dropzone {\n height: 100%;\n width: 100%;\n position: relative;\n transition: all 0.5s ease;\n\n &.drag-active {\n background-color: rgba(", ", 0.05);\n border: 2px dashed ", ";\n border-radius: 8px;\n\n aside {\n opacity: 0.3;\n pointer-events: none;\n }\n }\n\n .drag-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: rgba(", ", 0.1);\n border-radius: 8px;\n pointer-events: none;\n z-index: 10;\n\n p {\n font-family: ", ";\n font-size: 24px;\n font-weight: 600;\n color: ", ";\n text-align: center;\n padding: 20px;\n background-color: ", ";\n border-radius: 8px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n }\n }\n }\n }\n"])), function (_ref) {
18
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n height: 100%;\n flex: 1;\n overflow: auto;\n\n .data-container {\n display: flex;\n flex: 0%;\n height: calc(100% - ", "px);\n .image-data-panel {\n width: 340px;\n\n & + * {\n margin-left: 10px;\n }\n }\n\n .product-information {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n\n .services-information-container {\n height: 100%;\n overflow: auto;\n }\n\n .image-services {\n aside {\n display: grid;\n grid-template-columns: repeat(auto-fill, 179px);\n column-gap: 15px;\n row-gap: 15px;\n padding: 20px;\n }\n }\n\n .commentary-box {\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n padding: 10px;\n padding-left: 0;\n\n .action-buttons{\n display: flex;\n flex-direction: column;\n gap: 1rem;\n }\n\n .commentary {\n display: flex;\n align-items: flex-end;\n\n .input-container {\n width: 500px;\n\n .quill {\n height: 100px;\n }\n\n & + * {\n margin-left: 5px;\n }\n }\n\n .buttons-box {\n display: flex;\n width: 210px;\n flex-wrap: wrap;\n\n .general-transparent-button {\n & + * {\n margin-top: 5px;\n }\n }\n\n .general-transparent-button,\n .general-green-button,\n .general-button-disabled {\n width: fit-content;\n min-width: 201px;\n height: 40px;\n }\n }\n }\n }\n\n .feedback-box {\n display: flex;\n }\n\n .required-inputs-message {\n font-family: ", ";\n font-size: 13px;\n color: ", ";\n padding: 10px;\n display: flex;\n align-items: center;\n\n p + * {\n margin-top: 10px;\n }\n\n button {\n min-width: fit-content;\n }\n }\n }\n }\n #modal-message-box {\n width: 400px;\n height: 100px;\n }\n .container {\n width: 100%;\n height: 90%;\n .dropzone {\n height: 100%;\n width: 100%;\n position: relative;\n transition: all 0.5s ease;\n\n &.drag-active {\n background-color: rgba(", ", 0.05);\n border: 2px dashed ", ";\n border-radius: 8px;\n\n aside {\n opacity: 0.3;\n pointer-events: none;\n }\n }\n\n .drag-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: rgba(", ", 0.1);\n border-radius: 8px;\n pointer-events: none;\n z-index: 10;\n\n p {\n font-family: ", ";\n font-size: 24px;\n font-weight: 600;\n color: ", ";\n text-align: center;\n padding: 20px;\n background-color: ", ";\n border-radius: 8px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n }\n }\n }\n }\n"])), function (_ref) {
19
19
  var headerTop = _ref.headerTop;
20
20
  return headerTop;
21
21
  }, _variables.FontFamily.AvenirNext, _variables.GlobalColors.color_gray, _variables.GlobalColors.rgb_color_pink, _variables.GlobalColors.color_pink, _variables.GlobalColors.rgb_color_pink, _variables.FontFamily.AvenirNext, _variables.GlobalColors.color_pink, _variables.GlobalColors.white);