contentoh-components-library 21.4.28 → 21.4.30
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 +2 -3
- package/dist/components/atoms/Card/index.js +5 -46
- package/dist/components/atoms/Card/styles.js +1 -3
- package/dist/components/atoms/CheckBox/index.js +2 -7
- 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 +11 -68
- package/dist/components/molecules/TagAndInput/index.js +1 -1
- package/dist/components/organisms/Chat/Chat.stories.js +8 -27
- package/dist/components/organisms/Chat/ContainerItems/index.js +3 -19
- package/dist/components/organisms/Chat/ContainerItems/styles.js +1 -1
- package/dist/components/organisms/Chat/ContentChat/index.js +197 -350
- package/dist/components/organisms/Chat/Footer/index.js +39 -48
- package/dist/components/organisms/Chat/index.js +4 -49
- 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 +4 -6
- package/dist/components/pages/ProviderProductEdition/index.js +142 -117
- package/dist/components/pages/ProviderProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +3 -7
- package/dist/components/pages/RetailerProductEdition/index.js +274 -276
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/utils.js +2 -61
- package/dist/index.js +52 -247
- package/package.json +1 -4
- package/src/components/atoms/Avatar/index.js +2 -8
- package/src/components/atoms/Card/index.js +2 -35
- package/src/components/atoms/Card/styles.js +5 -41
- package/src/components/atoms/CheckBox/index.js +1 -4
- package/src/components/atoms/CheckBox/styles.js +0 -2
- package/src/components/atoms/InputFormatter/styles.js +1 -2
- package/src/components/atoms/SliderToolTip/styles.js +1 -1
- package/src/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/src/components/molecules/HeaderTop/index.js +6 -52
- package/src/components/molecules/TagAndInput/index.js +8 -10
- package/src/components/organisms/Chat/Chat.stories.js +7 -27
- package/src/components/organisms/Chat/ContainerItems/index.js +2 -18
- package/src/components/organisms/Chat/ContainerItems/styles.js +2 -14
- package/src/components/organisms/Chat/ContentChat/index.js +12 -88
- package/src/components/organisms/Chat/Footer/index.js +0 -11
- package/src/components/organisms/Chat/index.js +4 -46
- package/src/components/organisms/Chat/styles.js +0 -4
- package/src/components/organisms/FullProductNameHeader/index.js +1 -1
- package/src/components/organisms/Modal/styles.js +1 -4
- package/src/components/organisms/OrderDetail/utils/Table/utils.js +16 -6
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +4 -6
- package/src/components/pages/ProviderProductEdition/index.js +129 -97
- package/src/components/pages/ProviderProductEdition/styles.js +1 -5
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +2 -6
- package/src/components/pages/RetailerProductEdition/index.js +142 -111
- package/src/components/pages/RetailerProductEdition/styles.js +0 -4
- package/src/components/pages/RetailerProductEdition/utils.js +0 -37
- package/src/index.js +0 -15
- package/.env.development +0 -39
- package/.env.production +0 -36
- package/dist/assets/fonts/roboto/LICENSE.txt +0 -202
- package/dist/components/atoms/ImageCarousel/ImgeSlider.stories.js +0 -90
- package/dist/components/atoms/ImageCarousel/index.js +0 -120
- package/dist/components/atoms/ImageCarousel/styles.js +0 -18
- package/dist/components/atoms/PercentTag/PercentTag.stories.js +0 -31
- package/dist/components/atoms/PercentTag/index.js +0 -23
- package/dist/components/atoms/PercentTag/styles.js +0 -22
- package/dist/components/atoms/RatingStars/RatingStars.stories.js +0 -30
- package/dist/components/atoms/RatingStars/index.js +0 -53
- package/dist/components/atoms/RatingStars/styles.js +0 -18
- package/dist/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +0 -48
- package/dist/components/atoms/RetailerCatalog/index.js +0 -69
- package/dist/components/atoms/RetailerCatalog/styles.js +0 -20
- package/dist/components/atoms/RetailerOption/RetailerOption.stories.js +0 -33
- package/dist/components/atoms/RetailerOption/index.js +0 -62
- package/dist/components/atoms/RetailerOption/styles.js +0 -20
- package/dist/components/atoms/RetailersList/RetailersList.stories.js +0 -45
- package/dist/components/atoms/RetailersList/index.js +0 -46
- package/dist/components/atoms/RetailersList/styles.js +0 -18
- package/dist/components/atoms/UserCatalog/UserCatalog.stories.js +0 -73
- package/dist/components/atoms/UserCatalog/index.js +0 -101
- package/dist/components/atoms/UserCatalog/styles.js +0 -18
- package/dist/components/atoms/UserOption/UserOption.stories.js +0 -40
- package/dist/components/atoms/UserOption/index.js +0 -130
- package/dist/components/atoms/UserOption/styles.js +0 -20
- package/dist/components/atoms/UserSelector/UserSelector.stories.js +0 -40
- package/dist/components/atoms/UserSelector/index.js +0 -98
- package/dist/components/atoms/UserSelector/styles.js +0 -32
- package/dist/components/molecules/GridItem/GridItem.stories.js +0 -123
- package/dist/components/molecules/GridItem/index.js +0 -152
- package/dist/components/molecules/GridItem/styles.js +0 -20
- package/dist/components/molecules/HeaderItem/ColumnItem.js +0 -23
- package/dist/components/molecules/HeaderItem/HeaderItem.stories.js +0 -70
- package/dist/components/molecules/HeaderItem/index.js +0 -42
- package/dist/components/molecules/HeaderItem/styles.js +0 -30
- package/dist/components/molecules/RowItem/ColumnItem.js +0 -23
- package/dist/components/molecules/RowItem/RowItem.stories.js +0 -5242
- package/dist/components/molecules/RowItem/index.js +0 -58
- package/dist/components/molecules/RowItem/styles.js +0 -30
- package/dist/components/molecules/StripeCardForm/StripeCardForm.stories.js +0 -31
- package/dist/components/molecules/StripeCardForm/index.js +0 -94
- package/dist/components/molecules/StripeCardForm/paymentForm.js +0 -191
- package/dist/components/molecules/StripeCardForm/styles.js +0 -27
- package/dist/components/molecules/StripeCardSelector/CardSelector.stories.js +0 -30
- package/dist/components/molecules/StripeCardSelector/index.js +0 -120
- package/dist/components/molecules/StripeCardSelector/styles.js +0 -22
- package/dist/components/molecules/StripeCardSelector/utils.js +0 -56
- package/dist/components/organisms/GridProducts/GridProducts.stories.js +0 -5097
- package/dist/components/organisms/GridProducts/index.js +0 -63
- package/dist/components/organisms/GridProducts/styles.js +0 -18
- package/dist/components/organisms/GridProducts/utils.js +0 -149
- package/dist/components/organisms/PanelLayout/PanelLayout.stories.js +0 -87
- package/dist/components/organisms/PanelLayout/index.js +0 -29
- package/dist/components/organisms/PanelLayout/styles.js +0 -32
- package/dist/components/organisms/SideModal/SideModal.stories.js +0 -42
- package/dist/components/organisms/SideModal/index.js +0 -72
- package/dist/components/organisms/SideModal/styles.js +0 -18
- package/src/components/atoms/ImageCarousel/ImgeSlider.stories.js +0 -76
- package/src/components/atoms/ImageCarousel/index.js +0 -103
- package/src/components/atoms/ImageCarousel/styles.js +0 -79
- package/src/components/atoms/PercentTag/PercentTag.stories.js +0 -7
- package/src/components/atoms/PercentTag/index.js +0 -9
- package/src/components/atoms/PercentTag/styles.js +0 -69
- package/src/components/atoms/RatingStars/RatingStars.stories.js +0 -10
- package/src/components/atoms/RatingStars/index.js +0 -31
- package/src/components/atoms/RatingStars/styles.js +0 -28
- package/src/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +0 -36
- package/src/components/atoms/RetailerCatalog/index.js +0 -49
- package/src/components/atoms/RetailerCatalog/styles.js +0 -30
- package/src/components/atoms/RetailerOption/RetailerOption.stories.js +0 -15
- package/src/components/atoms/RetailerOption/index.js +0 -53
- package/src/components/atoms/RetailerOption/styles.js +0 -41
- package/src/components/atoms/RetailersList/RetailersList.stories.js +0 -33
- package/src/components/atoms/RetailersList/index.js +0 -20
- package/src/components/atoms/RetailersList/styles.js +0 -19
- package/src/components/atoms/UserCatalog/UserCatalog.stories.js +0 -67
- package/src/components/atoms/UserCatalog/index.js +0 -100
- package/src/components/atoms/UserCatalog/styles.js +0 -24
- package/src/components/atoms/UserOption/UserOption.stories.js +0 -25
- package/src/components/atoms/UserOption/index.js +0 -95
- package/src/components/atoms/UserOption/styles.js +0 -61
- package/src/components/atoms/UserSelector/UserSelector.stories.js +0 -25
- package/src/components/atoms/UserSelector/index.js +0 -86
- package/src/components/atoms/UserSelector/styles.js +0 -55
- package/src/components/molecules/GridItem/GridItem.stories.js +0 -126
- package/src/components/molecules/GridItem/index.js +0 -105
- package/src/components/molecules/GridItem/styles.js +0 -104
- package/src/components/molecules/HeaderItem/ColumnItem.js +0 -9
- package/src/components/molecules/HeaderItem/HeaderItem.stories.js +0 -24
- package/src/components/molecules/HeaderItem/index.js +0 -26
- package/src/components/molecules/HeaderItem/styles.js +0 -27
- package/src/components/molecules/RowItem/ColumnItem.js +0 -9
- package/src/components/molecules/RowItem/RowItem.stories.js +0 -5660
- package/src/components/molecules/RowItem/index.js +0 -45
- package/src/components/molecules/RowItem/styles.js +0 -40
- package/src/components/molecules/StripeCardForm/StripeCardForm.stories.js +0 -13
- package/src/components/molecules/StripeCardForm/index.js +0 -44
- package/src/components/molecules/StripeCardForm/paymentForm.js +0 -124
- package/src/components/molecules/StripeCardForm/styles.js +0 -75
- package/src/components/molecules/StripeCardSelector/CardSelector.stories.js +0 -12
- package/src/components/molecules/StripeCardSelector/index.js +0 -57
- package/src/components/molecules/StripeCardSelector/styles.js +0 -6
- package/src/components/molecules/StripeCardSelector/utils.js +0 -17
- package/src/components/organisms/GridProducts/GridProducts.stories.js +0 -5485
- package/src/components/organisms/GridProducts/index.js +0 -50
- package/src/components/organisms/GridProducts/styles.js +0 -14
- package/src/components/organisms/GridProducts/utils.js +0 -111
- package/src/components/organisms/PanelLayout/PanelLayout.stories.js +0 -63
- package/src/components/organisms/PanelLayout/index.js +0 -11
- package/src/components/organisms/PanelLayout/styles.js +0 -39
- package/src/components/organisms/SideModal/SideModal.stories.js +0 -23
- package/src/components/organisms/SideModal/index.js +0 -50
- package/src/components/organisms/SideModal/styles.js +0 -30
|
@@ -93,12 +93,6 @@ 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
96
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
103
97
|
|
|
104
98
|
var reducerImages = function reducerImages(state, action) {
|
|
@@ -212,7 +206,7 @@ var myBucket = new _awsSdk.default.S3({
|
|
|
212
206
|
});
|
|
213
207
|
|
|
214
208
|
var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
215
|
-
var _product$retailers, _product$retailersAva, _location$state4, _location$state5,
|
|
209
|
+
var _product$retailers, _product$retailersAva, _location$state4, _location$state5, _datasheets$, _datasheets$$data;
|
|
216
210
|
|
|
217
211
|
var tabsSections = _ref.tabsSections,
|
|
218
212
|
_ref$productSelected = _ref.productSelected,
|
|
@@ -452,26 +446,21 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
452
446
|
validatedAll = _useState60[0],
|
|
453
447
|
setValidatedAll = _useState60[1];
|
|
454
448
|
|
|
455
|
-
var _useState61 = (0, _react.useState)(
|
|
456
|
-
_useState62 = (0, _slicedToArray2.default)(_useState61, 2),
|
|
457
|
-
showRejectModal = _useState62[0],
|
|
458
|
-
setShowRejectModal = _useState62[1];
|
|
459
|
-
|
|
460
|
-
var _useState63 = (0, _react.useState)({
|
|
449
|
+
var _useState61 = (0, _react.useState)({
|
|
461
450
|
"Ficha técnica": null,
|
|
462
451
|
Descripción: null,
|
|
463
452
|
Imágenes: null
|
|
464
453
|
}),
|
|
465
|
-
|
|
466
|
-
origin =
|
|
467
|
-
setOrigin =
|
|
454
|
+
_useState62 = (0, _slicedToArray2.default)(_useState61, 2),
|
|
455
|
+
origin = _useState62[0],
|
|
456
|
+
setOrigin = _useState62[1];
|
|
468
457
|
|
|
469
|
-
var
|
|
470
|
-
|
|
471
|
-
inCart =
|
|
472
|
-
setInCart =
|
|
458
|
+
var _useState63 = (0, _react.useState)(false),
|
|
459
|
+
_useState64 = (0, _slicedToArray2.default)(_useState63, 2),
|
|
460
|
+
inCart = _useState64[0],
|
|
461
|
+
setInCart = _useState64[1];
|
|
473
462
|
|
|
474
|
-
var
|
|
463
|
+
var _useState65 = (0, _react.useState)({
|
|
475
464
|
message: "¿Estás seguro de continuar?",
|
|
476
465
|
detail: " ".concat(user.is_retailer ? "Asegurate de haber revisado las tres secciones" : "Envíar el producto a la cadena"),
|
|
477
466
|
button1: {
|
|
@@ -486,34 +475,34 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
486
475
|
},
|
|
487
476
|
img: _defaultProfileImage.default
|
|
488
477
|
}),
|
|
478
|
+
_useState66 = (0, _slicedToArray2.default)(_useState65, 2),
|
|
479
|
+
dataGenericModal = _useState66[0],
|
|
480
|
+
setDataGenericModal = _useState66[1];
|
|
481
|
+
|
|
482
|
+
var _useState67 = (0, _react.useState)(null),
|
|
489
483
|
_useState68 = (0, _slicedToArray2.default)(_useState67, 2),
|
|
490
|
-
|
|
491
|
-
|
|
484
|
+
socketType = _useState68[0],
|
|
485
|
+
setSocketType = _useState68[1];
|
|
492
486
|
|
|
493
|
-
var _useState69 = (0, _react.useState)(
|
|
487
|
+
var _useState69 = (0, _react.useState)(loading),
|
|
494
488
|
_useState70 = (0, _slicedToArray2.default)(_useState69, 2),
|
|
495
|
-
|
|
496
|
-
|
|
489
|
+
saving = _useState70[0],
|
|
490
|
+
setSaving = _useState70[1];
|
|
497
491
|
|
|
498
|
-
var _useState71 = (0, _react.useState)(
|
|
492
|
+
var _useState71 = (0, _react.useState)(product.statusByRetailer),
|
|
499
493
|
_useState72 = (0, _slicedToArray2.default)(_useState71, 2),
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
var _useState73 = (0, _react.useState)(product.statusByRetailer),
|
|
504
|
-
_useState74 = (0, _slicedToArray2.default)(_useState73, 2),
|
|
505
|
-
retailerStatus = _useState74[0],
|
|
506
|
-
setRetailerStatus = _useState74[1];
|
|
494
|
+
retailerStatus = _useState72[0],
|
|
495
|
+
setRetailerStatus = _useState72[1];
|
|
507
496
|
|
|
508
497
|
var _useCloseModal = (0, _customHooks.useCloseModal)("version-selector"),
|
|
509
498
|
_useCloseModal2 = (0, _slicedToArray2.default)(_useCloseModal, 2),
|
|
510
499
|
showVersionSelector = _useCloseModal2[0],
|
|
511
500
|
setShowVersionSelector = _useCloseModal2[1];
|
|
512
501
|
|
|
513
|
-
var
|
|
514
|
-
|
|
515
|
-
globalModal =
|
|
516
|
-
setGlobalModal =
|
|
502
|
+
var _useState73 = (0, _react.useState)(),
|
|
503
|
+
_useState74 = (0, _slicedToArray2.default)(_useState73, 2),
|
|
504
|
+
globalModal = _useState74[0],
|
|
505
|
+
setGlobalModal = _useState74[1];
|
|
517
506
|
|
|
518
507
|
var updateAuditStatus = /*#__PURE__*/function () {
|
|
519
508
|
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(status) {
|
|
@@ -685,6 +674,30 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
685
674
|
});
|
|
686
675
|
|
|
687
676
|
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
|
+
|
|
688
701
|
case "generic":
|
|
689
702
|
setGlobalModal(dataGenericModal);
|
|
690
703
|
break;
|
|
@@ -956,7 +969,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
956
969
|
setServicesData(parsedResponse);
|
|
957
970
|
|
|
958
971
|
case 12:
|
|
959
|
-
|
|
972
|
+
!activeRetailer.id && setActiveRetailer(active ? active : retailers[0]);
|
|
960
973
|
|
|
961
974
|
case 13:
|
|
962
975
|
case "end":
|
|
@@ -1074,7 +1087,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1074
1087
|
}
|
|
1075
1088
|
|
|
1076
1089
|
setProduct(productTemp);
|
|
1077
|
-
|
|
1090
|
+
setActivePercentage((_retailers$ = retailers[0]) === null || _retailers$ === void 0 ? void 0 : _retailers$.percentage);
|
|
1078
1091
|
}, [percentages]);
|
|
1079
1092
|
|
|
1080
1093
|
var loadInputs = function loadInputs() {
|
|
@@ -1456,33 +1469,45 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1456
1469
|
};
|
|
1457
1470
|
|
|
1458
1471
|
var createComment = /*#__PURE__*/function () {
|
|
1459
|
-
var _ref13 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
|
|
1460
|
-
var
|
|
1461
|
-
retailerId,
|
|
1462
|
-
data,
|
|
1463
|
-
_args15 = arguments;
|
|
1472
|
+
var _ref13 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15(e, body, tab) {
|
|
1473
|
+
var concept, data;
|
|
1464
1474
|
return _regenerator.default.wrap(function _callee15$(_context15) {
|
|
1465
1475
|
while (1) {
|
|
1466
1476
|
switch (_context15.prev = _context15.next) {
|
|
1467
1477
|
case 0:
|
|
1468
|
-
|
|
1469
|
-
|
|
1478
|
+
concept = "";
|
|
1479
|
+
_context15.t0 = activeTab;
|
|
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:
|
|
1470
1496
|
data = {
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1497
|
+
articleId: product === null || product === void 0 ? void 0 : product.id_article,
|
|
1498
|
+
orderId: product === null || product === void 0 ? void 0 : product.orderId,
|
|
1499
|
+
message: body,
|
|
1500
|
+
concept: concept,
|
|
1501
|
+
version: version
|
|
1502
|
+
};
|
|
1503
|
+
_context15.next = 13;
|
|
1504
|
+
return _axios.default.post("".concat(process.env.REACT_APP_COMMENTS_ENDPOINT), data, {
|
|
1505
|
+
headers: {
|
|
1479
1506
|
Authorization: token
|
|
1480
1507
|
}
|
|
1481
|
-
};
|
|
1482
|
-
setMessage("");
|
|
1483
|
-
return _context15.abrupt("return", (0, _utils.sendMessage)(data));
|
|
1508
|
+
});
|
|
1484
1509
|
|
|
1485
|
-
case
|
|
1510
|
+
case 13:
|
|
1486
1511
|
case "end":
|
|
1487
1512
|
return _context15.stop();
|
|
1488
1513
|
}
|
|
@@ -1490,7 +1515,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1490
1515
|
}, _callee15);
|
|
1491
1516
|
}));
|
|
1492
1517
|
|
|
1493
|
-
return function createComment() {
|
|
1518
|
+
return function createComment(_x4, _x5, _x6) {
|
|
1494
1519
|
return _ref13.apply(this, arguments);
|
|
1495
1520
|
};
|
|
1496
1521
|
}();
|
|
@@ -1589,7 +1614,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1589
1614
|
}, _callee17);
|
|
1590
1615
|
}));
|
|
1591
1616
|
|
|
1592
|
-
return function setAssignation(
|
|
1617
|
+
return function setAssignation(_x7, _x8) {
|
|
1593
1618
|
return _ref15.apply(this, arguments);
|
|
1594
1619
|
};
|
|
1595
1620
|
}();
|
|
@@ -1785,7 +1810,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1785
1810
|
}, _callee18, null, [[9, 35]]);
|
|
1786
1811
|
}));
|
|
1787
1812
|
|
|
1788
|
-
return function sendEvaluation(
|
|
1813
|
+
return function sendEvaluation(_x9) {
|
|
1789
1814
|
return _ref16.apply(this, arguments);
|
|
1790
1815
|
};
|
|
1791
1816
|
}();
|
|
@@ -1876,7 +1901,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1876
1901
|
}, _callee19, null, [[0, 30]]);
|
|
1877
1902
|
}));
|
|
1878
1903
|
|
|
1879
|
-
return function validateAll(
|
|
1904
|
+
return function validateAll(_x10) {
|
|
1880
1905
|
return _ref17.apply(this, arguments);
|
|
1881
1906
|
};
|
|
1882
1907
|
}();
|
|
@@ -1923,7 +1948,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1923
1948
|
}, _callee20);
|
|
1924
1949
|
}));
|
|
1925
1950
|
|
|
1926
|
-
return function evaluationToRetailer(
|
|
1951
|
+
return function evaluationToRetailer(_x11) {
|
|
1927
1952
|
return _ref18.apply(this, arguments);
|
|
1928
1953
|
};
|
|
1929
1954
|
}();
|
|
@@ -2011,7 +2036,8 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2011
2036
|
return;
|
|
2012
2037
|
} else if (user.is_retailer) {
|
|
2013
2038
|
if (product.id_order || product.orderId) {
|
|
2014
|
-
|
|
2039
|
+
setValidatedAll(true);
|
|
2040
|
+
showGlobalModal("error");
|
|
2015
2041
|
} else {
|
|
2016
2042
|
setDataGenericModal(function (prev) {
|
|
2017
2043
|
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, prev), {}, {
|
|
@@ -2026,7 +2052,8 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2026
2052
|
showGlobalModal("generic");
|
|
2027
2053
|
}
|
|
2028
2054
|
} else {
|
|
2029
|
-
|
|
2055
|
+
setValidatedAll(true);
|
|
2056
|
+
showGlobalModal("error");
|
|
2030
2057
|
}
|
|
2031
2058
|
}
|
|
2032
2059
|
};
|
|
@@ -2036,7 +2063,6 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2036
2063
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_HeaderTop.HeaderTop, {
|
|
2037
2064
|
setHeaderTop: setHeaderTop,
|
|
2038
2065
|
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,
|
|
2040
2066
|
productSelected: productSelected,
|
|
2041
2067
|
token: token,
|
|
2042
2068
|
activeRetailer: activeRetailer
|
|
@@ -2115,7 +2141,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2115
2141
|
} else if (user.is_retailer) {
|
|
2116
2142
|
if (product.id_order || product.orderId) {
|
|
2117
2143
|
setValidatedAll(true);
|
|
2118
|
-
|
|
2144
|
+
showGlobalModal("error");
|
|
2119
2145
|
} else {
|
|
2120
2146
|
setDataGenericModal(function (prev) {
|
|
2121
2147
|
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, prev), {}, {
|
|
@@ -2130,15 +2156,15 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2130
2156
|
showGlobalModal("generic");
|
|
2131
2157
|
}
|
|
2132
2158
|
} else {
|
|
2133
|
-
setShowRejectModal(true);
|
|
2134
2159
|
setValidatedAll(true);
|
|
2160
|
+
showGlobalModal("error");
|
|
2135
2161
|
}
|
|
2136
2162
|
},
|
|
2137
2163
|
approve: function approve() {
|
|
2138
2164
|
return sendToEvaluation("A");
|
|
2139
2165
|
},
|
|
2140
2166
|
reject: function reject() {
|
|
2141
|
-
|
|
2167
|
+
return sendToEvaluation("R");
|
|
2142
2168
|
}
|
|
2143
2169
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FullTabsMenu.FullTabsMenu, {
|
|
2144
2170
|
tabsSections: tabsSections,
|
|
@@ -2226,7 +2252,52 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2226
2252
|
headerType: "input-name-header"
|
|
2227
2253
|
}))]
|
|
2228
2254
|
})
|
|
2229
|
-
}),
|
|
2255
|
+
}), isRevision() && getSectionStatus() ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
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", {
|
|
2230
2301
|
className: "required-inputs-message",
|
|
2231
2302
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
2232
2303
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
@@ -2286,52 +2357,6 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2286
2357
|
currentVersion: version,
|
|
2287
2358
|
setShowVersionSelector: setShowVersionSelector,
|
|
2288
2359
|
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")]
|
|
2335
2360
|
})]
|
|
2336
2361
|
});
|
|
2337
2362
|
};
|
|
@@ -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
|
|
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) {
|
|
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.eyJzdWIiOiI5YTIxMzEyOC02NDgyLTRjMTYtYTRiNi02ZTY0ZjIyNWIxYmQiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6IjlhMjEzMTI4LTY0ODItNGMxNi1hNGI2LTZlNjRmMjI1YjFiZCIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiI0OTMyY2JhZC1lYzcyLTRjYWItODgyNS0wMzY2M2RkNmE2ODIiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY5Mjc1MDY0NywibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY5Mjc1NDI0NywiaWF0IjoxNjkyNzUwNjQ3LCJlbWFpbCI6ImlzbWFlbDk3bG9wZXpAZ21haWwuY29tIn0.eqOY-gcS-W99WcEC632Ewckcg3WJzKoV9fIGcn1AkEE44_odGTcEk8fhVs-6_evIJkfShQOP0RFX0d2Dn31F-xFh5Lez6LvbT9F41_rAmMb3ELyRvdcz42V4eMw2IBH-FGrpGhSsJOHKV2T3WuUyZxPJu-C04ZAadfFSoNBBWnxX6SFk_eefcp9KghNmnELSSnWDh6DD1XDrWqEaLOVlQ5H7q4ARJqBo07KcXHIQo056anVud-inUMiX9KDTaorXdBCD0doWgv8NkYWSEpUS_Ctj-NG6vAled9g-6oLnC6DLR_ay6PRnAKGVNCv8bRZJL0GqF8ZnWk02svDHfUPJ0Q",
|
|
35
35
|
productSelected: {
|
|
36
36
|
services: {
|
|
37
37
|
datasheets: 1,
|
|
@@ -87,12 +87,8 @@ RetailerProductEditionDefault.args = {
|
|
|
87
87
|
},
|
|
88
88
|
location: {
|
|
89
89
|
product: {
|
|
90
|
-
articleId:
|
|
91
|
-
versionId:
|
|
92
|
-
},
|
|
93
|
-
state: {
|
|
94
|
-
withChat: true,
|
|
95
|
-
chatType: "product_status"
|
|
90
|
+
articleId: 39290,
|
|
91
|
+
versionId: 7
|
|
96
92
|
}
|
|
97
93
|
},
|
|
98
94
|
user: {
|