contentoh-components-library 21.4.63 → 21.4.65
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/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/BoxAttribute/index.js +3 -3
- package/dist/components/molecules/BoxAttribute/styles.js +1 -1
- package/dist/components/molecules/BoxButtons/index.js +0 -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 +36 -28
- package/dist/components/molecules/StripeCardSelector/CardSelector.stories.js +1 -2
- 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/DashboardMetric/index.js +12 -6
- package/dist/components/organisms/FullProductNameHeader/index.js +2 -2
- package/dist/components/organisms/InputGroup/index.js +1 -10
- package/dist/components/organisms/Modal/styles.js +1 -1
- package/dist/components/pages/Dashboard/Dashboard.stories.js +33 -36
- package/dist/components/pages/Dashboard/index.js +34 -8
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +3 -3
- package/dist/components/pages/ProviderProductEdition/index.js +120 -144
- 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 +279 -277
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/utils.js +61 -2
- package/dist/global-files/data.js +11 -3
- package/dist/global-files/variables.js +5 -1
- package/dist/index.js +201 -58
- package/package.json +2 -1
- package/src/components/atoms/Avatar/index.js +8 -2
- 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/TabSection/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/BoxAttribute/index.js +32 -25
- package/src/components/molecules/BoxAttribute/styles.js +1 -1
- package/src/components/molecules/BoxButtons/index.js +23 -22
- 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 +11 -11
- package/src/components/molecules/StripeCardSelector/CardSelector.stories.js +1 -2
- package/src/components/molecules/TagAndInput/index.js +6 -5
- 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/DashboardMetric/index.js +6 -3
- 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/InputGroup/index.js +131 -119
- package/src/components/organisms/Modal/styles.js +4 -1
- package/src/components/organisms/OrderDetail/utils/Table/utils.js +6 -16
- package/src/components/pages/Dashboard/Dashboard.stories.js +33 -38
- package/src/components/pages/Dashboard/index.js +31 -5
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +100 -83
- package/src/components/pages/ProviderProductEdition/index.js +100 -131
- 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 +114 -145
- package/src/components/pages/RetailerProductEdition/styles.js +4 -0
- package/src/components/pages/RetailerProductEdition/utils.js +37 -0
- package/src/global-files/data.js +7 -13
- package/src/global-files/variables.js +4 -0
- package/src/index.js +11 -0
|
@@ -93,6 +93,14 @@ 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
|
+
|
|
102
|
+
var _Box = require("../../organisms/Box");
|
|
103
|
+
|
|
96
104
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
97
105
|
|
|
98
106
|
var reducerImages = function reducerImages(state, action) {
|
|
@@ -206,7 +214,7 @@ var myBucket = new _awsSdk.default.S3({
|
|
|
206
214
|
});
|
|
207
215
|
|
|
208
216
|
var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
209
|
-
var _product$retailers, _product$retailersAva, _location$state4, _location$state5, _datasheets$, _datasheets$$data;
|
|
217
|
+
var _product$retailers, _product$retailersAva, _location$state4, _location$state5, _location$state6, _datasheets$, _datasheets$$data;
|
|
210
218
|
|
|
211
219
|
var tabsSections = _ref.tabsSections,
|
|
212
220
|
_ref$productSelected = _ref.productSelected,
|
|
@@ -451,21 +459,26 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
451
459
|
validatedAll = _useState62[0],
|
|
452
460
|
setValidatedAll = _useState62[1];
|
|
453
461
|
|
|
454
|
-
var _useState63 = (0, _react.useState)(
|
|
462
|
+
var _useState63 = (0, _react.useState)(false),
|
|
463
|
+
_useState64 = (0, _slicedToArray2.default)(_useState63, 2),
|
|
464
|
+
showRejectModal = _useState64[0],
|
|
465
|
+
setShowRejectModal = _useState64[1];
|
|
466
|
+
|
|
467
|
+
var _useState65 = (0, _react.useState)({
|
|
455
468
|
"Ficha técnica": null,
|
|
456
469
|
Descripción: null,
|
|
457
470
|
Imágenes: null
|
|
458
471
|
}),
|
|
459
|
-
_useState64 = (0, _slicedToArray2.default)(_useState63, 2),
|
|
460
|
-
origin = _useState64[0],
|
|
461
|
-
setOrigin = _useState64[1];
|
|
462
|
-
|
|
463
|
-
var _useState65 = (0, _react.useState)(false),
|
|
464
472
|
_useState66 = (0, _slicedToArray2.default)(_useState65, 2),
|
|
465
|
-
|
|
466
|
-
|
|
473
|
+
origin = _useState66[0],
|
|
474
|
+
setOrigin = _useState66[1];
|
|
467
475
|
|
|
468
|
-
var _useState67 = (0, _react.useState)(
|
|
476
|
+
var _useState67 = (0, _react.useState)(false),
|
|
477
|
+
_useState68 = (0, _slicedToArray2.default)(_useState67, 2),
|
|
478
|
+
inCart = _useState68[0],
|
|
479
|
+
setInCart = _useState68[1];
|
|
480
|
+
|
|
481
|
+
var _useState69 = (0, _react.useState)({
|
|
469
482
|
message: "¿Estás seguro de continuar?",
|
|
470
483
|
detail: " ".concat(user.is_retailer ? "Asegurate de haber revisado las tres secciones" : "Envíar el producto a la cadena"),
|
|
471
484
|
button1: {
|
|
@@ -480,34 +493,34 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
480
493
|
},
|
|
481
494
|
img: _defaultProfileImage.default
|
|
482
495
|
}),
|
|
483
|
-
_useState68 = (0, _slicedToArray2.default)(_useState67, 2),
|
|
484
|
-
dataGenericModal = _useState68[0],
|
|
485
|
-
setDataGenericModal = _useState68[1];
|
|
486
|
-
|
|
487
|
-
var _useState69 = (0, _react.useState)(null),
|
|
488
496
|
_useState70 = (0, _slicedToArray2.default)(_useState69, 2),
|
|
489
|
-
|
|
490
|
-
|
|
497
|
+
dataGenericModal = _useState70[0],
|
|
498
|
+
setDataGenericModal = _useState70[1];
|
|
491
499
|
|
|
492
|
-
var _useState71 = (0, _react.useState)(
|
|
500
|
+
var _useState71 = (0, _react.useState)(null),
|
|
493
501
|
_useState72 = (0, _slicedToArray2.default)(_useState71, 2),
|
|
494
|
-
|
|
495
|
-
|
|
502
|
+
socketType = _useState72[0],
|
|
503
|
+
setSocketType = _useState72[1];
|
|
496
504
|
|
|
497
|
-
var _useState73 = (0, _react.useState)(
|
|
505
|
+
var _useState73 = (0, _react.useState)(loading),
|
|
498
506
|
_useState74 = (0, _slicedToArray2.default)(_useState73, 2),
|
|
499
|
-
|
|
500
|
-
|
|
507
|
+
saving = _useState74[0],
|
|
508
|
+
setSaving = _useState74[1];
|
|
509
|
+
|
|
510
|
+
var _useState75 = (0, _react.useState)(product.statusByRetailer),
|
|
511
|
+
_useState76 = (0, _slicedToArray2.default)(_useState75, 2),
|
|
512
|
+
retailerStatus = _useState76[0],
|
|
513
|
+
setRetailerStatus = _useState76[1];
|
|
501
514
|
|
|
502
515
|
var _useCloseModal = (0, _customHooks.useCloseModal)("version-selector"),
|
|
503
516
|
_useCloseModal2 = (0, _slicedToArray2.default)(_useCloseModal, 2),
|
|
504
517
|
showVersionSelector = _useCloseModal2[0],
|
|
505
518
|
setShowVersionSelector = _useCloseModal2[1];
|
|
506
519
|
|
|
507
|
-
var
|
|
508
|
-
|
|
509
|
-
globalModal =
|
|
510
|
-
setGlobalModal =
|
|
520
|
+
var _useState77 = (0, _react.useState)(),
|
|
521
|
+
_useState78 = (0, _slicedToArray2.default)(_useState77, 2),
|
|
522
|
+
globalModal = _useState78[0],
|
|
523
|
+
setGlobalModal = _useState78[1];
|
|
511
524
|
|
|
512
525
|
var updateAuditStatus = /*#__PURE__*/function () {
|
|
513
526
|
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(status) {
|
|
@@ -679,30 +692,6 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
679
692
|
});
|
|
680
693
|
|
|
681
694
|
switch (type) {
|
|
682
|
-
case "error":
|
|
683
|
-
setGlobalModal({
|
|
684
|
-
message: "".concat(activeTab, " rechazada"),
|
|
685
|
-
detail: "Agrega tu comentarios para enviar el rechazo",
|
|
686
|
-
img: _errorModal.default,
|
|
687
|
-
textArea: true,
|
|
688
|
-
button1: {
|
|
689
|
-
name: "Enviar",
|
|
690
|
-
action: function action(e) {
|
|
691
|
-
var textArea = document.querySelector("#area");
|
|
692
|
-
|
|
693
|
-
if (textArea.value) {
|
|
694
|
-
textArea.style.border = "none";
|
|
695
|
-
createComment(e, textArea.value);
|
|
696
|
-
showGlobalModal("commentsSent");
|
|
697
|
-
validatedAll ? validateAll("R") : sendEvaluation("R");
|
|
698
|
-
} else {
|
|
699
|
-
textArea.style.border = "2px solid red";
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
});
|
|
704
|
-
break;
|
|
705
|
-
|
|
706
695
|
case "generic":
|
|
707
696
|
setGlobalModal(dataGenericModal);
|
|
708
697
|
break;
|
|
@@ -974,7 +963,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
974
963
|
setServicesData(parsedResponse);
|
|
975
964
|
|
|
976
965
|
case 12:
|
|
977
|
-
!activeRetailer.id && setActiveRetailer(active ? active : retailers[0]);
|
|
966
|
+
retailers && !activeRetailer.id && setActiveRetailer(active ? active : retailers[0]);
|
|
978
967
|
|
|
979
968
|
case 13:
|
|
980
969
|
case "end":
|
|
@@ -1092,7 +1081,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1092
1081
|
}
|
|
1093
1082
|
|
|
1094
1083
|
setProduct(productTemp);
|
|
1095
|
-
setActivePercentage((_retailers$ = retailers[0]) === null || _retailers$ === void 0 ? void 0 : _retailers$.percentage);
|
|
1084
|
+
retailers && setActivePercentage((_retailers$ = retailers[0]) === null || _retailers$ === void 0 ? void 0 : _retailers$.percentage);
|
|
1096
1085
|
}, [percentages]);
|
|
1097
1086
|
|
|
1098
1087
|
var loadInputs = function loadInputs() {
|
|
@@ -1495,45 +1484,33 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1495
1484
|
};
|
|
1496
1485
|
|
|
1497
1486
|
var createComment = /*#__PURE__*/function () {
|
|
1498
|
-
var _ref15 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15(
|
|
1499
|
-
var
|
|
1487
|
+
var _ref15 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
|
|
1488
|
+
var messages,
|
|
1489
|
+
retailerId,
|
|
1490
|
+
data,
|
|
1491
|
+
_args15 = arguments;
|
|
1500
1492
|
return _regenerator.default.wrap(function _callee15$(_context15) {
|
|
1501
1493
|
while (1) {
|
|
1502
1494
|
switch (_context15.prev = _context15.next) {
|
|
1503
1495
|
case 0:
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
_context15.next = _context15.t0 === "Ficha técnica" ? 4 : _context15.t0 === "Imágenes" ? 6 : 8;
|
|
1507
|
-
break;
|
|
1508
|
-
|
|
1509
|
-
case 4:
|
|
1510
|
-
concept = "datasheet";
|
|
1511
|
-
return _context15.abrupt("break", 10);
|
|
1512
|
-
|
|
1513
|
-
case 6:
|
|
1514
|
-
concept = "images";
|
|
1515
|
-
return _context15.abrupt("break", 10);
|
|
1516
|
-
|
|
1517
|
-
case 8:
|
|
1518
|
-
concept = "description";
|
|
1519
|
-
return _context15.abrupt("break", 10);
|
|
1520
|
-
|
|
1521
|
-
case 10:
|
|
1496
|
+
messages = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : [];
|
|
1497
|
+
retailerId = _args15.length > 1 ? _args15[1] : undefined;
|
|
1522
1498
|
data = {
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
headers: {
|
|
1499
|
+
paramsBody: {
|
|
1500
|
+
id: product.article.id_article || productEdit.ArticleId,
|
|
1501
|
+
version: version,
|
|
1502
|
+
items: messages,
|
|
1503
|
+
retailerId: retailerId,
|
|
1504
|
+
status: product.status || productEdit.product.status
|
|
1505
|
+
},
|
|
1506
|
+
paramsHeader: {
|
|
1532
1507
|
Authorization: token
|
|
1533
1508
|
}
|
|
1534
|
-
}
|
|
1509
|
+
};
|
|
1510
|
+
setMessage("");
|
|
1511
|
+
return _context15.abrupt("return", (0, _utils.sendMessage)(data));
|
|
1535
1512
|
|
|
1536
|
-
case
|
|
1513
|
+
case 5:
|
|
1537
1514
|
case "end":
|
|
1538
1515
|
return _context15.stop();
|
|
1539
1516
|
}
|
|
@@ -1541,7 +1518,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1541
1518
|
}, _callee15);
|
|
1542
1519
|
}));
|
|
1543
1520
|
|
|
1544
|
-
return function createComment(
|
|
1521
|
+
return function createComment() {
|
|
1545
1522
|
return _ref15.apply(this, arguments);
|
|
1546
1523
|
};
|
|
1547
1524
|
}();
|
|
@@ -1640,7 +1617,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1640
1617
|
}, _callee17);
|
|
1641
1618
|
}));
|
|
1642
1619
|
|
|
1643
|
-
return function setAssignation(
|
|
1620
|
+
return function setAssignation(_x4, _x5) {
|
|
1644
1621
|
return _ref17.apply(this, arguments);
|
|
1645
1622
|
};
|
|
1646
1623
|
}();
|
|
@@ -1829,7 +1806,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1829
1806
|
}, _callee18, null, [[9, 33]]);
|
|
1830
1807
|
}));
|
|
1831
1808
|
|
|
1832
|
-
return function sendEvaluation(
|
|
1809
|
+
return function sendEvaluation(_x6) {
|
|
1833
1810
|
return _ref18.apply(this, arguments);
|
|
1834
1811
|
};
|
|
1835
1812
|
}();
|
|
@@ -1920,7 +1897,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1920
1897
|
}, _callee19, null, [[0, 27]]);
|
|
1921
1898
|
}));
|
|
1922
1899
|
|
|
1923
|
-
return function validateAll(
|
|
1900
|
+
return function validateAll(_x7) {
|
|
1924
1901
|
return _ref19.apply(this, arguments);
|
|
1925
1902
|
};
|
|
1926
1903
|
}();
|
|
@@ -1967,7 +1944,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1967
1944
|
}, _callee20);
|
|
1968
1945
|
}));
|
|
1969
1946
|
|
|
1970
|
-
return function evaluationToRetailer(
|
|
1947
|
+
return function evaluationToRetailer(_x8) {
|
|
1971
1948
|
return _ref20.apply(this, arguments);
|
|
1972
1949
|
};
|
|
1973
1950
|
}();
|
|
@@ -1979,8 +1956,6 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1979
1956
|
|
|
1980
1957
|
var enableActions = function enableActions(versionStatus) {
|
|
1981
1958
|
try {
|
|
1982
|
-
if (user.is_retailer) return false;
|
|
1983
|
-
|
|
1984
1959
|
if (versionStatus) {
|
|
1985
1960
|
return ["AP", "ACA", "RCA", null].includes(versionStatus);
|
|
1986
1961
|
}
|
|
@@ -2055,8 +2030,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2055
2030
|
return;
|
|
2056
2031
|
} else if (user.is_retailer) {
|
|
2057
2032
|
if (product.id_order || product.orderId) {
|
|
2058
|
-
|
|
2059
|
-
showGlobalModal("error");
|
|
2033
|
+
sendEvaluation("R");
|
|
2060
2034
|
} else {
|
|
2061
2035
|
setDataGenericModal(function (prev) {
|
|
2062
2036
|
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, prev), {}, {
|
|
@@ -2071,8 +2045,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2071
2045
|
showGlobalModal("generic");
|
|
2072
2046
|
}
|
|
2073
2047
|
} else {
|
|
2074
|
-
|
|
2075
|
-
showGlobalModal("error");
|
|
2048
|
+
sendEvaluation("R");
|
|
2076
2049
|
}
|
|
2077
2050
|
}
|
|
2078
2051
|
};
|
|
@@ -2082,6 +2055,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2082
2055
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_HeaderTop.HeaderTop, {
|
|
2083
2056
|
setHeaderTop: setHeaderTop,
|
|
2084
2057
|
withChat: location === null || location === void 0 ? void 0 : (_location$state5 = location.state) === null || _location$state5 === void 0 ? void 0 : _location$state5.withChat,
|
|
2058
|
+
chatType: location === null || location === void 0 ? void 0 : (_location$state6 = location.state) === null || _location$state6 === void 0 ? void 0 : _location$state6.chatType,
|
|
2085
2059
|
productSelected: productSelected,
|
|
2086
2060
|
token: token,
|
|
2087
2061
|
activeRetailer: activeRetailer
|
|
@@ -2160,7 +2134,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2160
2134
|
} else if (user.is_retailer) {
|
|
2161
2135
|
if (product.id_order || product.orderId) {
|
|
2162
2136
|
setValidatedAll(true);
|
|
2163
|
-
|
|
2137
|
+
setShowRejectModal(true);
|
|
2164
2138
|
} else {
|
|
2165
2139
|
setDataGenericModal(function (prev) {
|
|
2166
2140
|
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, prev), {}, {
|
|
@@ -2175,15 +2149,15 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2175
2149
|
showGlobalModal("generic");
|
|
2176
2150
|
}
|
|
2177
2151
|
} else {
|
|
2152
|
+
setShowRejectModal(true);
|
|
2178
2153
|
setValidatedAll(true);
|
|
2179
|
-
showGlobalModal("error");
|
|
2180
2154
|
}
|
|
2181
2155
|
},
|
|
2182
2156
|
approve: function approve() {
|
|
2183
2157
|
return sendToEvaluation("A");
|
|
2184
2158
|
},
|
|
2185
2159
|
reject: function reject() {
|
|
2186
|
-
|
|
2160
|
+
setShowRejectModal(true);
|
|
2187
2161
|
}
|
|
2188
2162
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FullTabsMenu.FullTabsMenu, {
|
|
2189
2163
|
tabsSections: tabsSections,
|
|
@@ -2262,6 +2236,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2262
2236
|
setUpdatedDescriptions: setUpdatedDescriptions,
|
|
2263
2237
|
articleId: product === null || product === void 0 ? void 0 : product.id_article,
|
|
2264
2238
|
version: version,
|
|
2239
|
+
isShowbox: false,
|
|
2265
2240
|
dinamicHeight: true
|
|
2266
2241
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
2267
2242
|
text: "No cuentas con este servicio",
|
|
@@ -2280,52 +2255,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2280
2255
|
headerType: "input-name-header"
|
|
2281
2256
|
}))]
|
|
2282
2257
|
})
|
|
2283
|
-
}), isRevision() && getSectionStatus()
|
|
2284
|
-
className: "commentary-box",
|
|
2285
|
-
children: !comment ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2286
|
-
className: "commentary",
|
|
2287
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TagAndInput, {
|
|
2288
|
-
label: "Caja de Comentario",
|
|
2289
|
-
inputType: "textarea",
|
|
2290
|
-
inputCols: 80,
|
|
2291
|
-
inputRows: 4,
|
|
2292
|
-
inputId: "commentary-box",
|
|
2293
|
-
index: 0
|
|
2294
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
2295
|
-
className: "buttons-box",
|
|
2296
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
2297
|
-
buttonType: "general-transparent-button",
|
|
2298
|
-
label: "Enviar comentario",
|
|
2299
|
-
onClick: function onClick(e) {
|
|
2300
|
-
return createComment(e, document.querySelector("#description-commentary-box-0 .ql-container .ql-editor > p").innerHTML, activeTab);
|
|
2301
|
-
}
|
|
2302
|
-
})
|
|
2303
|
-
})]
|
|
2304
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2305
|
-
className: "feedback-box",
|
|
2306
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Commentary.Commentary, {
|
|
2307
|
-
comment: comment.message,
|
|
2308
|
-
reviewed: crossComment
|
|
2309
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
2310
|
-
buttonType: "circular-button accept-button",
|
|
2311
|
-
onClick: /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21() {
|
|
2312
|
-
return _regenerator.default.wrap(function _callee21$(_context21) {
|
|
2313
|
-
while (1) {
|
|
2314
|
-
switch (_context21.prev = _context21.next) {
|
|
2315
|
-
case 0:
|
|
2316
|
-
setCrossComment(true);
|
|
2317
|
-
commentRevised();
|
|
2318
|
-
|
|
2319
|
-
case 2:
|
|
2320
|
-
case "end":
|
|
2321
|
-
return _context21.stop();
|
|
2322
|
-
}
|
|
2323
|
-
}
|
|
2324
|
-
}, _callee21);
|
|
2325
|
-
}))
|
|
2326
|
-
})]
|
|
2327
|
-
})
|
|
2328
|
-
}) : !revision && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2258
|
+
}), !(isRevision() && getSectionStatus()) && !revision && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2329
2259
|
className: "required-inputs-message",
|
|
2330
2260
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
2331
2261
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
@@ -2385,6 +2315,52 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2385
2315
|
currentVersion: version,
|
|
2386
2316
|
setShowVersionSelector: setShowVersionSelector,
|
|
2387
2317
|
jwt: token
|
|
2318
|
+
}), showRejectModal && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.Modal, {
|
|
2319
|
+
title: "Agregar mensaje de rechazo",
|
|
2320
|
+
show: showRejectModal,
|
|
2321
|
+
customComponent: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TagAndInput, {
|
|
2322
|
+
inputType: "textarea",
|
|
2323
|
+
inputId: "modal-message-box",
|
|
2324
|
+
index: 0,
|
|
2325
|
+
color: "white"
|
|
2326
|
+
}),
|
|
2327
|
+
buttons: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
|
|
2328
|
+
type: "white",
|
|
2329
|
+
label: "Cancelar",
|
|
2330
|
+
size: 12,
|
|
2331
|
+
onClick: function onClick() {
|
|
2332
|
+
setShowRejectModal(false);
|
|
2333
|
+
}
|
|
2334
|
+
}, "btn-Cancelar"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
|
|
2335
|
+
type: "pink",
|
|
2336
|
+
label: "Aceptar",
|
|
2337
|
+
size: 12,
|
|
2338
|
+
onClick: /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21() {
|
|
2339
|
+
var body, messages;
|
|
2340
|
+
return _regenerator.default.wrap(function _callee21$(_context21) {
|
|
2341
|
+
while (1) {
|
|
2342
|
+
switch (_context21.prev = _context21.next) {
|
|
2343
|
+
case 0:
|
|
2344
|
+
body = document.querySelector("#modal-message-box .ql-container .ql-editor > p").innerHTML;
|
|
2345
|
+
messages = [{
|
|
2346
|
+
type: "message",
|
|
2347
|
+
value: body === null || body === void 0 ? void 0 : body.replace(/<.*?\/?>/gm, "")
|
|
2348
|
+
}];
|
|
2349
|
+
_context21.next = 4;
|
|
2350
|
+
return createComment(messages, activeRetailer.id);
|
|
2351
|
+
|
|
2352
|
+
case 4:
|
|
2353
|
+
validatedAll ? validateAll("R") : sendToEvaluation("R");
|
|
2354
|
+
setShowRejectModal(false);
|
|
2355
|
+
|
|
2356
|
+
case 6:
|
|
2357
|
+
case "end":
|
|
2358
|
+
return _context21.stop();
|
|
2359
|
+
}
|
|
2360
|
+
}
|
|
2361
|
+
}, _callee21);
|
|
2362
|
+
}))
|
|
2363
|
+
}, "btn-Aceptar")]
|
|
2388
2364
|
})]
|
|
2389
2365
|
});
|
|
2390
2366
|
};
|
|
@@ -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: {
|