contentoh-components-library 21.4.35 → 21.4.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/atoms/Avatar/index.js +3 -2
- package/dist/components/atoms/Card/index.js +46 -5
- package/dist/components/atoms/Card/styles.js +3 -1
- package/dist/components/atoms/CheckBox/index.js +7 -2
- package/dist/components/atoms/CheckBox/styles.js +1 -1
- package/dist/components/atoms/InputFormatter/styles.js +1 -1
- package/dist/components/atoms/SliderToolTip/styles.js +1 -1
- package/dist/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/dist/components/molecules/HeaderTop/index.js +68 -11
- package/dist/components/molecules/SignInLogin/index.js +16 -21
- package/dist/components/molecules/TagAndInput/index.js +1 -1
- package/dist/components/organisms/Chat/Chat.stories.js +27 -8
- package/dist/components/organisms/Chat/ContainerItems/index.js +19 -3
- package/dist/components/organisms/Chat/ContainerItems/styles.js +1 -1
- package/dist/components/organisms/Chat/ContentChat/index.js +350 -197
- package/dist/components/organisms/Chat/Footer/index.js +48 -39
- package/dist/components/organisms/Chat/index.js +49 -4
- package/dist/components/organisms/Chat/styles.js +1 -1
- package/dist/components/organisms/FullProductNameHeader/index.js +2 -2
- package/dist/components/organisms/Modal/styles.js +1 -1
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +6 -4
- package/dist/components/pages/ProviderProductEdition/index.js +117 -142
- package/dist/components/pages/ProviderProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +7 -3
- package/dist/components/pages/RetailerProductEdition/index.js +276 -274
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/utils.js +61 -2
- package/dist/index.js +247 -52
- package/package.json +4 -1
- package/src/assets/images/defaultImages/check_circle.svg +10 -0
- package/src/components/atoms/Avatar/index.js +8 -2
- package/src/components/atoms/Card/index.js +35 -2
- package/src/components/atoms/Card/styles.js +41 -5
- package/src/components/atoms/CheckBox/index.js +4 -1
- package/src/components/atoms/CheckBox/styles.js +2 -0
- package/src/components/atoms/ImageCarousel/ImgeSlider.stories.js +76 -0
- package/src/components/atoms/ImageCarousel/index.js +103 -0
- package/src/components/atoms/ImageCarousel/styles.js +79 -0
- package/src/components/atoms/InputFormatter/styles.js +2 -1
- package/src/components/atoms/PercentTag/PercentTag.stories.js +7 -0
- package/src/components/atoms/PercentTag/index.js +9 -0
- package/src/components/atoms/PercentTag/styles.js +69 -0
- package/src/components/atoms/RatingStars/RatingStars.stories.js +10 -0
- package/src/components/atoms/RatingStars/index.js +31 -0
- package/src/components/atoms/RatingStars/styles.js +28 -0
- package/src/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +36 -0
- package/src/components/atoms/RetailerCatalog/index.js +49 -0
- package/src/components/atoms/RetailerCatalog/styles.js +30 -0
- package/src/components/atoms/RetailerOption/RetailerOption.stories.js +15 -0
- package/src/components/atoms/RetailerOption/index.js +53 -0
- package/src/components/atoms/RetailerOption/styles.js +41 -0
- package/src/components/atoms/RetailersList/RetailersList.stories.js +33 -0
- package/src/components/atoms/RetailersList/index.js +20 -0
- package/src/components/atoms/RetailersList/styles.js +19 -0
- package/src/components/atoms/SliderToolTip/styles.js +1 -1
- package/src/components/atoms/UserCatalog/UserCatalog.stories.js +67 -0
- package/src/components/atoms/UserCatalog/index.js +100 -0
- package/src/components/atoms/UserCatalog/styles.js +24 -0
- package/src/components/atoms/UserOption/UserOption.stories.js +25 -0
- package/src/components/atoms/UserOption/index.js +95 -0
- package/src/components/atoms/UserOption/styles.js +61 -0
- package/src/components/atoms/UserSelector/UserSelector.stories.js +25 -0
- package/src/components/atoms/UserSelector/index.js +86 -0
- package/src/components/atoms/UserSelector/styles.js +55 -0
- package/src/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/src/components/molecules/GridItem/GridItem.stories.js +126 -0
- package/src/components/molecules/GridItem/index.js +105 -0
- package/src/components/molecules/GridItem/styles.js +104 -0
- package/src/components/molecules/HeaderItem/ColumnItem.js +9 -0
- package/src/components/molecules/HeaderItem/HeaderItem.stories.js +24 -0
- package/src/components/molecules/HeaderItem/index.js +26 -0
- package/src/components/molecules/HeaderItem/styles.js +27 -0
- package/src/components/molecules/HeaderTop/index.js +52 -6
- package/src/components/molecules/RowItem/ColumnItem.js +9 -0
- package/src/components/molecules/RowItem/RowItem.stories.js +5660 -0
- package/src/components/molecules/RowItem/index.js +45 -0
- package/src/components/molecules/RowItem/styles.js +40 -0
- package/src/components/molecules/SignInLogin/index.js +1 -3
- package/src/components/molecules/StripeCardForm/StripeCardForm.stories.js +14 -0
- package/src/components/molecules/StripeCardForm/index.js +45 -0
- package/src/components/molecules/StripeCardForm/paymentForm.js +126 -0
- package/src/components/molecules/StripeCardForm/styles.js +84 -0
- package/src/components/molecules/StripeCardSelector/CardSelector.stories.js +12 -0
- package/src/components/molecules/StripeCardSelector/index.js +59 -0
- package/src/components/molecules/StripeCardSelector/styles.js +15 -0
- package/src/components/molecules/StripeCardSelector/utils.js +17 -0
- package/src/components/molecules/TagAndInput/index.js +10 -8
- package/src/components/organisms/Chat/Chat.stories.js +27 -7
- package/src/components/organisms/Chat/ContainerItems/index.js +18 -2
- package/src/components/organisms/Chat/ContainerItems/styles.js +14 -2
- package/src/components/organisms/Chat/ContentChat/index.js +88 -12
- package/src/components/organisms/Chat/Footer/index.js +11 -0
- package/src/components/organisms/Chat/index.js +46 -4
- package/src/components/organisms/Chat/styles.js +4 -0
- package/src/components/organisms/FullProductNameHeader/index.js +1 -1
- package/src/components/organisms/GridProducts/GridProducts.stories.js +5485 -0
- package/src/components/organisms/GridProducts/index.js +50 -0
- package/src/components/organisms/GridProducts/styles.js +14 -0
- package/src/components/organisms/GridProducts/utils.js +111 -0
- package/src/components/organisms/Modal/styles.js +4 -1
- package/src/components/organisms/OrderDetail/utils/Table/utils.js +6 -16
- package/src/components/organisms/PanelLayout/PanelLayout.stories.js +63 -0
- package/src/components/organisms/PanelLayout/index.js +11 -0
- package/src/components/organisms/PanelLayout/styles.js +39 -0
- package/src/components/organisms/SideModal/SideModal.stories.js +23 -0
- package/src/components/organisms/SideModal/index.js +50 -0
- package/src/components/organisms/SideModal/styles.js +30 -0
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +6 -4
- package/src/components/pages/ProviderProductEdition/index.js +97 -129
- package/src/components/pages/ProviderProductEdition/styles.js +5 -1
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +6 -2
- package/src/components/pages/RetailerProductEdition/index.js +111 -142
- package/src/components/pages/RetailerProductEdition/styles.js +4 -0
- package/src/components/pages/RetailerProductEdition/utils.js +37 -0
- package/src/index.js +15 -0
|
@@ -93,6 +93,12 @@ var _VersionSelector = require("../../organisms/VersionSelector");
|
|
|
93
93
|
|
|
94
94
|
var _customHooks = require("../../../global-files/customHooks");
|
|
95
95
|
|
|
96
|
+
var _utils = require("../RetailerProductEdition/utils");
|
|
97
|
+
|
|
98
|
+
var _Modal = require("../../organisms/Modal");
|
|
99
|
+
|
|
100
|
+
var _ButtonV = require("../../atoms/ButtonV2");
|
|
101
|
+
|
|
96
102
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
97
103
|
|
|
98
104
|
var reducerImages = function reducerImages(state, action) {
|
|
@@ -206,7 +212,7 @@ var myBucket = new _awsSdk.default.S3({
|
|
|
206
212
|
});
|
|
207
213
|
|
|
208
214
|
var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
209
|
-
var _product$retailers, _product$retailersAva, _location$state4, _location$state5, _datasheets$, _datasheets$$data;
|
|
215
|
+
var _product$retailers, _product$retailersAva, _location$state4, _location$state5, _location$state6, _datasheets$, _datasheets$$data;
|
|
210
216
|
|
|
211
217
|
var tabsSections = _ref.tabsSections,
|
|
212
218
|
_ref$productSelected = _ref.productSelected,
|
|
@@ -446,21 +452,26 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
446
452
|
validatedAll = _useState60[0],
|
|
447
453
|
setValidatedAll = _useState60[1];
|
|
448
454
|
|
|
449
|
-
var _useState61 = (0, _react.useState)(
|
|
455
|
+
var _useState61 = (0, _react.useState)(false),
|
|
456
|
+
_useState62 = (0, _slicedToArray2.default)(_useState61, 2),
|
|
457
|
+
showRejectModal = _useState62[0],
|
|
458
|
+
setShowRejectModal = _useState62[1];
|
|
459
|
+
|
|
460
|
+
var _useState63 = (0, _react.useState)({
|
|
450
461
|
"Ficha técnica": null,
|
|
451
462
|
Descripción: null,
|
|
452
463
|
Imágenes: null
|
|
453
464
|
}),
|
|
454
|
-
_useState62 = (0, _slicedToArray2.default)(_useState61, 2),
|
|
455
|
-
origin = _useState62[0],
|
|
456
|
-
setOrigin = _useState62[1];
|
|
457
|
-
|
|
458
|
-
var _useState63 = (0, _react.useState)(false),
|
|
459
465
|
_useState64 = (0, _slicedToArray2.default)(_useState63, 2),
|
|
460
|
-
|
|
461
|
-
|
|
466
|
+
origin = _useState64[0],
|
|
467
|
+
setOrigin = _useState64[1];
|
|
468
|
+
|
|
469
|
+
var _useState65 = (0, _react.useState)(false),
|
|
470
|
+
_useState66 = (0, _slicedToArray2.default)(_useState65, 2),
|
|
471
|
+
inCart = _useState66[0],
|
|
472
|
+
setInCart = _useState66[1];
|
|
462
473
|
|
|
463
|
-
var
|
|
474
|
+
var _useState67 = (0, _react.useState)({
|
|
464
475
|
message: "¿Estás seguro de continuar?",
|
|
465
476
|
detail: " ".concat(user.is_retailer ? "Asegurate de haber revisado las tres secciones" : "Envíar el producto a la cadena"),
|
|
466
477
|
button1: {
|
|
@@ -475,34 +486,34 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
475
486
|
},
|
|
476
487
|
img: _defaultProfileImage.default
|
|
477
488
|
}),
|
|
478
|
-
_useState66 = (0, _slicedToArray2.default)(_useState65, 2),
|
|
479
|
-
dataGenericModal = _useState66[0],
|
|
480
|
-
setDataGenericModal = _useState66[1];
|
|
481
|
-
|
|
482
|
-
var _useState67 = (0, _react.useState)(null),
|
|
483
489
|
_useState68 = (0, _slicedToArray2.default)(_useState67, 2),
|
|
484
|
-
|
|
485
|
-
|
|
490
|
+
dataGenericModal = _useState68[0],
|
|
491
|
+
setDataGenericModal = _useState68[1];
|
|
486
492
|
|
|
487
|
-
var _useState69 = (0, _react.useState)(
|
|
493
|
+
var _useState69 = (0, _react.useState)(null),
|
|
488
494
|
_useState70 = (0, _slicedToArray2.default)(_useState69, 2),
|
|
489
|
-
|
|
490
|
-
|
|
495
|
+
socketType = _useState70[0],
|
|
496
|
+
setSocketType = _useState70[1];
|
|
491
497
|
|
|
492
|
-
var _useState71 = (0, _react.useState)(
|
|
498
|
+
var _useState71 = (0, _react.useState)(loading),
|
|
493
499
|
_useState72 = (0, _slicedToArray2.default)(_useState71, 2),
|
|
494
|
-
|
|
495
|
-
|
|
500
|
+
saving = _useState72[0],
|
|
501
|
+
setSaving = _useState72[1];
|
|
502
|
+
|
|
503
|
+
var _useState73 = (0, _react.useState)(product.statusByRetailer),
|
|
504
|
+
_useState74 = (0, _slicedToArray2.default)(_useState73, 2),
|
|
505
|
+
retailerStatus = _useState74[0],
|
|
506
|
+
setRetailerStatus = _useState74[1];
|
|
496
507
|
|
|
497
508
|
var _useCloseModal = (0, _customHooks.useCloseModal)("version-selector"),
|
|
498
509
|
_useCloseModal2 = (0, _slicedToArray2.default)(_useCloseModal, 2),
|
|
499
510
|
showVersionSelector = _useCloseModal2[0],
|
|
500
511
|
setShowVersionSelector = _useCloseModal2[1];
|
|
501
512
|
|
|
502
|
-
var
|
|
503
|
-
|
|
504
|
-
globalModal =
|
|
505
|
-
setGlobalModal =
|
|
513
|
+
var _useState75 = (0, _react.useState)(),
|
|
514
|
+
_useState76 = (0, _slicedToArray2.default)(_useState75, 2),
|
|
515
|
+
globalModal = _useState76[0],
|
|
516
|
+
setGlobalModal = _useState76[1];
|
|
506
517
|
|
|
507
518
|
var updateAuditStatus = /*#__PURE__*/function () {
|
|
508
519
|
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(status) {
|
|
@@ -674,30 +685,6 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
674
685
|
});
|
|
675
686
|
|
|
676
687
|
switch (type) {
|
|
677
|
-
case "error":
|
|
678
|
-
setGlobalModal({
|
|
679
|
-
message: "".concat(activeTab, " rechazada"),
|
|
680
|
-
detail: "Agrega tu comentarios para enviar el rechazo",
|
|
681
|
-
img: _errorModal.default,
|
|
682
|
-
textArea: true,
|
|
683
|
-
button1: {
|
|
684
|
-
name: "Enviar",
|
|
685
|
-
action: function action(e) {
|
|
686
|
-
var textArea = document.querySelector("#area");
|
|
687
|
-
|
|
688
|
-
if (textArea.value) {
|
|
689
|
-
textArea.style.border = "none";
|
|
690
|
-
createComment(e, textArea.value);
|
|
691
|
-
showGlobalModal("commentsSent");
|
|
692
|
-
validatedAll ? validateAll("R") : sendEvaluation("R");
|
|
693
|
-
} else {
|
|
694
|
-
textArea.style.border = "2px solid red";
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
});
|
|
699
|
-
break;
|
|
700
|
-
|
|
701
688
|
case "generic":
|
|
702
689
|
setGlobalModal(dataGenericModal);
|
|
703
690
|
break;
|
|
@@ -969,7 +956,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
969
956
|
setServicesData(parsedResponse);
|
|
970
957
|
|
|
971
958
|
case 12:
|
|
972
|
-
!activeRetailer.id && setActiveRetailer(active ? active : retailers[0]);
|
|
959
|
+
retailers && !activeRetailer.id && setActiveRetailer(active ? active : retailers[0]);
|
|
973
960
|
|
|
974
961
|
case 13:
|
|
975
962
|
case "end":
|
|
@@ -1087,7 +1074,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1087
1074
|
}
|
|
1088
1075
|
|
|
1089
1076
|
setProduct(productTemp);
|
|
1090
|
-
setActivePercentage((_retailers$ = retailers[0]) === null || _retailers$ === void 0 ? void 0 : _retailers$.percentage);
|
|
1077
|
+
retailers && setActivePercentage((_retailers$ = retailers[0]) === null || _retailers$ === void 0 ? void 0 : _retailers$.percentage);
|
|
1091
1078
|
}, [percentages]);
|
|
1092
1079
|
|
|
1093
1080
|
var loadInputs = function loadInputs() {
|
|
@@ -1469,45 +1456,33 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1469
1456
|
};
|
|
1470
1457
|
|
|
1471
1458
|
var createComment = /*#__PURE__*/function () {
|
|
1472
|
-
var _ref13 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15(
|
|
1473
|
-
var
|
|
1459
|
+
var _ref13 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
|
|
1460
|
+
var messages,
|
|
1461
|
+
retailerId,
|
|
1462
|
+
data,
|
|
1463
|
+
_args15 = arguments;
|
|
1474
1464
|
return _regenerator.default.wrap(function _callee15$(_context15) {
|
|
1475
1465
|
while (1) {
|
|
1476
1466
|
switch (_context15.prev = _context15.next) {
|
|
1477
1467
|
case 0:
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
_context15.next = _context15.t0 === "Ficha técnica" ? 4 : _context15.t0 === "Imágenes" ? 6 : 8;
|
|
1481
|
-
break;
|
|
1482
|
-
|
|
1483
|
-
case 4:
|
|
1484
|
-
concept = "datasheet";
|
|
1485
|
-
return _context15.abrupt("break", 10);
|
|
1486
|
-
|
|
1487
|
-
case 6:
|
|
1488
|
-
concept = "images";
|
|
1489
|
-
return _context15.abrupt("break", 10);
|
|
1490
|
-
|
|
1491
|
-
case 8:
|
|
1492
|
-
concept = "description";
|
|
1493
|
-
return _context15.abrupt("break", 10);
|
|
1494
|
-
|
|
1495
|
-
case 10:
|
|
1468
|
+
messages = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : [];
|
|
1469
|
+
retailerId = _args15.length > 1 ? _args15[1] : undefined;
|
|
1496
1470
|
data = {
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
headers: {
|
|
1471
|
+
paramsBody: {
|
|
1472
|
+
id: product.article.id_article || productEdit.ArticleId,
|
|
1473
|
+
version: version,
|
|
1474
|
+
items: messages,
|
|
1475
|
+
retailerId: retailerId,
|
|
1476
|
+
status: product.status || productEdit.product.status
|
|
1477
|
+
},
|
|
1478
|
+
paramsHeader: {
|
|
1506
1479
|
Authorization: token
|
|
1507
1480
|
}
|
|
1508
|
-
}
|
|
1481
|
+
};
|
|
1482
|
+
setMessage("");
|
|
1483
|
+
return _context15.abrupt("return", (0, _utils.sendMessage)(data));
|
|
1509
1484
|
|
|
1510
|
-
case
|
|
1485
|
+
case 5:
|
|
1511
1486
|
case "end":
|
|
1512
1487
|
return _context15.stop();
|
|
1513
1488
|
}
|
|
@@ -1515,7 +1490,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1515
1490
|
}, _callee15);
|
|
1516
1491
|
}));
|
|
1517
1492
|
|
|
1518
|
-
return function createComment(
|
|
1493
|
+
return function createComment() {
|
|
1519
1494
|
return _ref13.apply(this, arguments);
|
|
1520
1495
|
};
|
|
1521
1496
|
}();
|
|
@@ -1614,7 +1589,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1614
1589
|
}, _callee17);
|
|
1615
1590
|
}));
|
|
1616
1591
|
|
|
1617
|
-
return function setAssignation(
|
|
1592
|
+
return function setAssignation(_x4, _x5) {
|
|
1618
1593
|
return _ref15.apply(this, arguments);
|
|
1619
1594
|
};
|
|
1620
1595
|
}();
|
|
@@ -1810,7 +1785,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1810
1785
|
}, _callee18, null, [[9, 35]]);
|
|
1811
1786
|
}));
|
|
1812
1787
|
|
|
1813
|
-
return function sendEvaluation(
|
|
1788
|
+
return function sendEvaluation(_x6) {
|
|
1814
1789
|
return _ref16.apply(this, arguments);
|
|
1815
1790
|
};
|
|
1816
1791
|
}();
|
|
@@ -1901,7 +1876,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1901
1876
|
}, _callee19, null, [[0, 30]]);
|
|
1902
1877
|
}));
|
|
1903
1878
|
|
|
1904
|
-
return function validateAll(
|
|
1879
|
+
return function validateAll(_x7) {
|
|
1905
1880
|
return _ref17.apply(this, arguments);
|
|
1906
1881
|
};
|
|
1907
1882
|
}();
|
|
@@ -1948,7 +1923,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1948
1923
|
}, _callee20);
|
|
1949
1924
|
}));
|
|
1950
1925
|
|
|
1951
|
-
return function evaluationToRetailer(
|
|
1926
|
+
return function evaluationToRetailer(_x8) {
|
|
1952
1927
|
return _ref18.apply(this, arguments);
|
|
1953
1928
|
};
|
|
1954
1929
|
}();
|
|
@@ -2036,8 +2011,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2036
2011
|
return;
|
|
2037
2012
|
} else if (user.is_retailer) {
|
|
2038
2013
|
if (product.id_order || product.orderId) {
|
|
2039
|
-
|
|
2040
|
-
showGlobalModal("error");
|
|
2014
|
+
sendEvaluation("R");
|
|
2041
2015
|
} else {
|
|
2042
2016
|
setDataGenericModal(function (prev) {
|
|
2043
2017
|
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, prev), {}, {
|
|
@@ -2052,8 +2026,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2052
2026
|
showGlobalModal("generic");
|
|
2053
2027
|
}
|
|
2054
2028
|
} else {
|
|
2055
|
-
|
|
2056
|
-
showGlobalModal("error");
|
|
2029
|
+
sendEvaluation("R");
|
|
2057
2030
|
}
|
|
2058
2031
|
}
|
|
2059
2032
|
};
|
|
@@ -2063,6 +2036,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2063
2036
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_HeaderTop.HeaderTop, {
|
|
2064
2037
|
setHeaderTop: setHeaderTop,
|
|
2065
2038
|
withChat: location === null || location === void 0 ? void 0 : (_location$state5 = location.state) === null || _location$state5 === void 0 ? void 0 : _location$state5.withChat,
|
|
2039
|
+
chatType: location === null || location === void 0 ? void 0 : (_location$state6 = location.state) === null || _location$state6 === void 0 ? void 0 : _location$state6.chatType,
|
|
2066
2040
|
productSelected: productSelected,
|
|
2067
2041
|
token: token,
|
|
2068
2042
|
activeRetailer: activeRetailer
|
|
@@ -2141,7 +2115,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2141
2115
|
} else if (user.is_retailer) {
|
|
2142
2116
|
if (product.id_order || product.orderId) {
|
|
2143
2117
|
setValidatedAll(true);
|
|
2144
|
-
|
|
2118
|
+
setShowRejectModal(true);
|
|
2145
2119
|
} else {
|
|
2146
2120
|
setDataGenericModal(function (prev) {
|
|
2147
2121
|
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, prev), {}, {
|
|
@@ -2156,15 +2130,15 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2156
2130
|
showGlobalModal("generic");
|
|
2157
2131
|
}
|
|
2158
2132
|
} else {
|
|
2133
|
+
setShowRejectModal(true);
|
|
2159
2134
|
setValidatedAll(true);
|
|
2160
|
-
showGlobalModal("error");
|
|
2161
2135
|
}
|
|
2162
2136
|
},
|
|
2163
2137
|
approve: function approve() {
|
|
2164
2138
|
return sendToEvaluation("A");
|
|
2165
2139
|
},
|
|
2166
2140
|
reject: function reject() {
|
|
2167
|
-
|
|
2141
|
+
setShowRejectModal(true);
|
|
2168
2142
|
}
|
|
2169
2143
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FullTabsMenu.FullTabsMenu, {
|
|
2170
2144
|
tabsSections: tabsSections,
|
|
@@ -2252,52 +2226,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2252
2226
|
headerType: "input-name-header"
|
|
2253
2227
|
}))]
|
|
2254
2228
|
})
|
|
2255
|
-
}), isRevision() && getSectionStatus()
|
|
2256
|
-
className: "commentary-box",
|
|
2257
|
-
children: !comment ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2258
|
-
className: "commentary",
|
|
2259
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TagAndInput, {
|
|
2260
|
-
label: "Caja de Comentario",
|
|
2261
|
-
inputType: "textarea",
|
|
2262
|
-
inputCols: 80,
|
|
2263
|
-
inputRows: 4,
|
|
2264
|
-
inputId: "commentary-box",
|
|
2265
|
-
index: 0
|
|
2266
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
2267
|
-
className: "buttons-box",
|
|
2268
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
2269
|
-
buttonType: "general-transparent-button",
|
|
2270
|
-
label: "Enviar comentario",
|
|
2271
|
-
onClick: function onClick(e) {
|
|
2272
|
-
return createComment(e, document.querySelector("#description-commentary-box-0 .ql-container .ql-editor > p").innerHTML, activeTab);
|
|
2273
|
-
}
|
|
2274
|
-
})
|
|
2275
|
-
})]
|
|
2276
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2277
|
-
className: "feedback-box",
|
|
2278
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Commentary.Commentary, {
|
|
2279
|
-
comment: comment.message,
|
|
2280
|
-
reviewed: crossComment
|
|
2281
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
2282
|
-
buttonType: "circular-button accept-button",
|
|
2283
|
-
onClick: /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21() {
|
|
2284
|
-
return _regenerator.default.wrap(function _callee21$(_context21) {
|
|
2285
|
-
while (1) {
|
|
2286
|
-
switch (_context21.prev = _context21.next) {
|
|
2287
|
-
case 0:
|
|
2288
|
-
setCrossComment(true);
|
|
2289
|
-
commentRevised();
|
|
2290
|
-
|
|
2291
|
-
case 2:
|
|
2292
|
-
case "end":
|
|
2293
|
-
return _context21.stop();
|
|
2294
|
-
}
|
|
2295
|
-
}
|
|
2296
|
-
}, _callee21);
|
|
2297
|
-
}))
|
|
2298
|
-
})]
|
|
2299
|
-
})
|
|
2300
|
-
}) : !revision && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2229
|
+
}), !(isRevision() && getSectionStatus()) && !revision && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2301
2230
|
className: "required-inputs-message",
|
|
2302
2231
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
2303
2232
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
@@ -2357,6 +2286,52 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2357
2286
|
currentVersion: version,
|
|
2358
2287
|
setShowVersionSelector: setShowVersionSelector,
|
|
2359
2288
|
jwt: token
|
|
2289
|
+
}), showRejectModal && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.Modal, {
|
|
2290
|
+
title: "Agregar mensaje de rechazo",
|
|
2291
|
+
show: showRejectModal,
|
|
2292
|
+
customComponent: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TagAndInput, {
|
|
2293
|
+
inputType: "textarea",
|
|
2294
|
+
inputId: "modal-message-box",
|
|
2295
|
+
index: 0,
|
|
2296
|
+
color: "white"
|
|
2297
|
+
}),
|
|
2298
|
+
buttons: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
|
|
2299
|
+
type: "white",
|
|
2300
|
+
label: "Cancelar",
|
|
2301
|
+
size: 12,
|
|
2302
|
+
onClick: function onClick() {
|
|
2303
|
+
setShowRejectModal(false);
|
|
2304
|
+
}
|
|
2305
|
+
}, "btn-Cancelar"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
|
|
2306
|
+
type: "pink",
|
|
2307
|
+
label: "Aceptar",
|
|
2308
|
+
size: 12,
|
|
2309
|
+
onClick: /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21() {
|
|
2310
|
+
var body, messages;
|
|
2311
|
+
return _regenerator.default.wrap(function _callee21$(_context21) {
|
|
2312
|
+
while (1) {
|
|
2313
|
+
switch (_context21.prev = _context21.next) {
|
|
2314
|
+
case 0:
|
|
2315
|
+
body = document.querySelector("#modal-message-box .ql-container .ql-editor > p").innerHTML;
|
|
2316
|
+
messages = [{
|
|
2317
|
+
type: "message",
|
|
2318
|
+
value: body === null || body === void 0 ? void 0 : body.replace(/<.*?\/?>/gm, "")
|
|
2319
|
+
}];
|
|
2320
|
+
_context21.next = 4;
|
|
2321
|
+
return createComment(messages, activeRetailer.id);
|
|
2322
|
+
|
|
2323
|
+
case 4:
|
|
2324
|
+
validatedAll ? validateAll("R") : sendToEvaluation("R");
|
|
2325
|
+
setShowRejectModal(false);
|
|
2326
|
+
|
|
2327
|
+
case 6:
|
|
2328
|
+
case "end":
|
|
2329
|
+
return _context21.stop();
|
|
2330
|
+
}
|
|
2331
|
+
}
|
|
2332
|
+
}, _callee21);
|
|
2333
|
+
}))
|
|
2334
|
+
}, "btn-Aceptar")]
|
|
2360
2335
|
})]
|
|
2361
2336
|
});
|
|
2362
2337
|
};
|
|
@@ -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 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 .container {\n width: 100%;\n height: 100%;\n .dropzone {\n height: 100%;\n width: 100%;\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 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: 100%;\n .dropzone {\n height: 100%;\n width: 100%;\n }\n }\n"])), function (_ref) {
|
|
19
19
|
var headerTop = _ref.headerTop;
|
|
20
20
|
return headerTop;
|
|
21
21
|
}, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s4);
|
|
@@ -31,7 +31,7 @@ RetailerProductEditionDefault.args = {
|
|
|
31
31
|
"Ficha técnica": false,
|
|
32
32
|
Imágenes: false
|
|
33
33
|
},
|
|
34
|
-
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
34
|
+
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI5YTIxMzEyOC02NDgyLTRjMTYtYTRiNi02ZTY0ZjIyNWIxYmQiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6IjlhMjEzMTI4LTY0ODItNGMxNi1hNGI2LTZlNjRmMjI1YjFiZCIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiI5OGE0NzYxMy04ZGIyLTRlZjUtYjA0Mi01ZDU3MWRkZjIwMWIiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY4Mzg3NTIyNiwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY4Mzg3ODgyNiwiaWF0IjoxNjgzODc1MjI2LCJlbWFpbCI6ImlzbWFlbDk3bG9wZXpAZ21haWwuY29tIn0.EtgmT_THMx-Zy_zB5yZK4gz6TXNTVVJEKFt5X0JK2UkGVrp_q_92YCEuejS4n976fyTez0jkwOee6IkVHLV71uZWRBDFt-3Yw4ZxfsZYPNJWhoHXGNxhMU8MCkSntfu597esBTk-VsUpstT5R7L-WJfN8viE7R-qVo-42RlPTG0TFrWA9q0oTcqjv8vbxLpOBUjiEpjmqRhg4blJZwgkGNta6MOlw1vfmisOVbo9wMvqwnCZ9xx9KMKoH9U4uNObK_JomjbvPmTmkcUXsE-wGSD7XcoSwtuhBngLC7-jiu1u8MvL_ff5Z0Qp70sSpLdUglcSS8d1Xf7j_fcZuJ5jKA",
|
|
35
35
|
productSelected: {
|
|
36
36
|
services: {
|
|
37
37
|
datasheets: 1,
|
|
@@ -87,8 +87,12 @@ RetailerProductEditionDefault.args = {
|
|
|
87
87
|
},
|
|
88
88
|
location: {
|
|
89
89
|
product: {
|
|
90
|
-
articleId:
|
|
91
|
-
versionId:
|
|
90
|
+
articleId: 354,
|
|
91
|
+
versionId: 3
|
|
92
|
+
},
|
|
93
|
+
state: {
|
|
94
|
+
withChat: true,
|
|
95
|
+
chatType: "product_status"
|
|
92
96
|
}
|
|
93
97
|
},
|
|
94
98
|
user: {
|