contentoh-components-library 21.4.71 → 21.4.73
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/CheckBox/styles.js +1 -1
- package/dist/components/atoms/GeneralButton/styles.js +2 -6
- package/dist/components/atoms/InputFormatter/styles.js +3 -3
- 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 +1 -0
- package/dist/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/dist/components/molecules/HeaderTop/index.js +11 -68
- package/dist/components/molecules/SignInLogin/index.js +28 -36
- package/dist/components/molecules/StripeCardSelector/CardSelector.stories.js +2 -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/DashboardMetric/index.js +6 -12
- package/dist/components/organisms/FullProductNameHeader/index.js +2 -2
- package/dist/components/organisms/InputGroup/index.js +10 -1
- package/dist/components/organisms/Modal/styles.js +1 -1
- package/dist/components/organisms/VersionSelector/index.js +4 -2
- package/dist/components/pages/Dashboard/Dashboard.stories.js +36 -33
- package/dist/components/pages/Dashboard/index.js +9 -37
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +38 -34
- package/dist/components/pages/ProviderProductEdition/index.js +195 -182
- 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 +273 -278
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/utils.js +2 -61
- package/dist/global-files/data.js +3 -11
- package/dist/global-files/variables.js +1 -7
- package/dist/index.js +58 -201
- package/package.json +1 -2
- package/src/components/atoms/Avatar/index.js +2 -8
- package/src/components/atoms/CheckBox/styles.js +0 -2
- package/src/components/atoms/GeneralButton/styles.js +0 -46
- package/src/components/atoms/InputFormatter/styles.js +4 -9
- package/src/components/atoms/SliderToolTip/styles.js +1 -1
- package/src/components/atoms/TabSection/index.js +1 -1
- package/src/components/atoms/TabSection/styles.js +1 -1
- package/src/components/molecules/BoxAttribute/index.js +25 -32
- package/src/components/molecules/BoxAttribute/styles.js +1 -1
- package/src/components/molecules/BoxButtons/index.js +22 -23
- package/src/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/src/components/molecules/HeaderTop/index.js +6 -52
- package/src/components/molecules/SignInLogin/index.js +11 -11
- package/src/components/molecules/StripeCardSelector/CardSelector.stories.js +2 -1
- package/src/components/molecules/TagAndInput/index.js +5 -6
- 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/DashboardMetric/index.js +3 -6
- package/src/components/organisms/FullProductNameHeader/index.js +1 -1
- package/src/components/organisms/InputGroup/index.js +119 -131
- package/src/components/organisms/Modal/styles.js +1 -4
- package/src/components/organisms/OrderDetail/utils/Table/utils.js +16 -6
- package/src/components/organisms/VersionSelector/index.js +2 -1
- package/src/components/pages/Dashboard/Dashboard.stories.js +38 -33
- package/src/components/pages/Dashboard/index.js +7 -36
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +83 -110
- package/src/components/pages/ProviderProductEdition/index.js +152 -129
- 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 +136 -106
- package/src/components/pages/RetailerProductEdition/styles.js +0 -4
- package/src/components/pages/RetailerProductEdition/utils.js +0 -37
- package/src/global-files/data.js +16 -8
- package/src/global-files/variables.js +0 -6
- package/src/index.js +0 -11
- package/src/assets/images/Icons/infoNR.svg +0 -8
- package/src/assets/images/flagsv2/highPriority.svg +0 -3
- package/src/assets/images/flagsv2/lowPriority.svg +0 -3
- package/src/assets/images/flagsv2/mediumPriority.svg +0 -3
- package/src/assets/images/flagsv2/noPriority.svg +0 -3
- package/src/assets/images/generalButton/closeIconWhite.svg +0 -4
- package/src/assets/images/generalButton/closeIconv2.svg +0 -4
- package/src/components/atoms/CharsMissing/Wysiwyg.stories.js +0 -12
- package/src/components/atoms/CharsMissing/index.js +0 -60
- package/src/components/atoms/CharsMissing/styles.js +0 -44
- package/src/components/atoms/FeatureTagv2/FeatureTagv2.stories.js +0 -16
- package/src/components/atoms/FeatureTagv2/index.js +0 -10
- package/src/components/atoms/FeatureTagv2/styles.js +0 -56
- package/src/components/atoms/GeneralInputv2/GeneralInputv2.stories.js +0 -33
- package/src/components/atoms/GeneralInputv2/index.js +0 -155
- package/src/components/atoms/GeneralInputv2/styles.js +0 -67
- 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/InputFormatterv2/Wysiwyg.stories.js +0 -12
- package/src/components/atoms/InputFormatterv2/index.js +0 -148
- package/src/components/atoms/InputFormatterv2/styles.js +0 -39
- package/src/components/atoms/InputImages/InputImages.stories.js +0 -19
- package/src/components/atoms/InputImages/index.js +0 -25
- package/src/components/atoms/InputImages/styles.js +0 -17
- package/src/components/atoms/NumberMandatory/NumberMandatory.stories.js +0 -19
- package/src/components/atoms/NumberMandatory/index.js +0 -16
- package/src/components/atoms/NumberMandatory/styles.js +0 -11
- 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/PriorityFlagv2/PriorityFlagv2.stories.js +0 -20
- package/src/components/atoms/PriorityFlagv2/index.js +0 -20
- package/src/components/atoms/PriorityFlagv2/styles.js +0 -6
- package/src/components/atoms/ProductImagev2/ProductImagev2.stories.js +0 -28
- package/src/components/atoms/ProductImagev2/index.js +0 -16
- package/src/components/atoms/ProductImagev2/styles.js +0 -62
- package/src/components/atoms/Progress/Progress.stories.js +0 -25
- package/src/components/atoms/Progress/index.js +0 -74
- package/src/components/atoms/Progress/styles.js +0 -98
- 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/ScreenHeaderv2/ScreenHeaderv2.stories.js +0 -53
- package/src/components/atoms/ScreenHeaderv2/index.js +0 -134
- package/src/components/atoms/ScreenHeaderv2/styles.js +0 -103
- package/src/components/atoms/Selectv2/VersionSelect.js +0 -27
- package/src/components/atoms/Selectv2/index.js +0 -35
- package/src/components/atoms/Selectv2/style.js +0 -93
- package/src/components/atoms/TabSectionv2/TabSection.stories.js +0 -25
- package/src/components/atoms/TabSectionv2/index.js +0 -9
- package/src/components/atoms/TabSectionv2/styles.js +0 -20
- package/src/components/atoms/TooltipLight/Tooltip.stories.js +0 -20
- package/src/components/atoms/TooltipLight/index.js +0 -46
- package/src/components/atoms/TooltipLight/styles.js +0 -65
- 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/atoms/WordsMissing/Wysiwyg.stories.js +0 -12
- package/src/components/atoms/WordsMissing/index.js +0 -60
- package/src/components/atoms/WordsMissing/styles.js +0 -10
- package/src/components/molecules/AsignationInfo/AsignationInfo.stories.js +0 -17
- package/src/components/molecules/AsignationInfo/index.js +0 -108
- package/src/components/molecules/AsignationInfo/styles.js +0 -86
- package/src/components/molecules/EditionActiveImagev2/EditionActiveImagev2.stories.js +0 -12
- package/src/components/molecules/EditionActiveImagev2/index.js +0 -15
- package/src/components/molecules/EditionActiveImagev2/styles.js +0 -7
- package/src/components/molecules/FeaturesBarv2/FeaturesBarv2.stories.js +0 -20
- package/src/components/molecules/FeaturesBarv2/index.js +0 -32
- package/src/components/molecules/FeaturesBarv2/styles.js +0 -17
- package/src/components/molecules/GalleryElementv2/GalleryElementv2.stories.js +0 -30
- package/src/components/molecules/GalleryElementv2/index.js +0 -142
- package/src/components/molecules/GalleryElementv2/styles.js +0 -119
- package/src/components/molecules/GalleryHeaderv2/GalleryHeaderv2.stories.js +0 -10
- package/src/components/molecules/GalleryHeaderv2/index.js +0 -25
- package/src/components/molecules/GalleryHeaderv2/styles.js +0 -47
- 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/HeaderTopv2/HeaderTopv2.stories.js +0 -10
- package/src/components/molecules/HeaderTopv2/index.js +0 -100
- package/src/components/molecules/HeaderTopv2/styles.js +0 -33
- package/src/components/molecules/ImageSelectorv2/ImageSelectorv2.stories.js +0 -46
- package/src/components/molecules/ImageSelectorv2/index.js +0 -22
- package/src/components/molecules/ImageSelectorv2/styles.js +0 -15
- package/src/components/molecules/Phase/Phase.stories.js +0 -37
- package/src/components/molecules/Phase/index.js +0 -56
- package/src/components/molecules/Phase/styles.js +0 -82
- package/src/components/molecules/ProductNameHeaderv2/ProductNameHeaderv2.stories.js +0 -37
- package/src/components/molecules/ProductNameHeaderv2/index.js +0 -12
- package/src/components/molecules/ProductNameHeaderv2/styles.js +0 -10
- package/src/components/molecules/ProductSkuStatus/ProductSkuStatus.stories.js +0 -37
- package/src/components/molecules/ProductSkuStatus/index.js +0 -26
- package/src/components/molecules/ProductSkuStatus/styles.js +0 -7
- package/src/components/molecules/RetailerSelectorv2/RetailerSelectorv2.stories.js +0 -35
- package/src/components/molecules/RetailerSelectorv2/index.js +0 -80
- package/src/components/molecules/RetailerSelectorv2/styles.js +0 -21
- 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/ServiceDataValidator/ServiceDataValidator.stories.js +0 -90
- package/src/components/molecules/ServiceDataValidator/index.js +0 -49
- package/src/components/molecules/ServiceDataValidator/styles.js +0 -36
- package/src/components/molecules/StatusRetailer/StatusAsignationInfo.stories.js +0 -17
- package/src/components/molecules/StatusRetailer/index.js +0 -55
- package/src/components/molecules/StatusRetailer/styles.js +0 -85
- package/src/components/molecules/TabsMenuv2/TabsMenuv2.stories.js +0 -19
- package/src/components/molecules/TabsMenuv2/index.js +0 -112
- package/src/components/molecules/TabsMenuv2/styles.js +0 -19
- package/src/components/molecules/TagAndInputv2/TagAndInputv2.stories.js +0 -24
- package/src/components/molecules/TagAndInputv2/index.js +0 -86
- package/src/components/molecules/TagAndInputv2/styles.js +0 -35
- package/src/components/molecules/Validation/Validation.stories.js +0 -12
- package/src/components/molecules/Validation/index.js +0 -77
- package/src/components/molecules/Validation/styles.js +0 -19
- package/src/components/molecules/VersionItemv2/VersionItemv2.stories.js +0 -14
- package/src/components/molecules/VersionItemv2/index.js +0 -59
- package/src/components/molecules/VersionItemv2/styles.js +0 -47
- package/src/components/organisms/BarButtons/BarButtons.stories.js +0 -13
- package/src/components/organisms/BarButtons/index.js +0 -150
- package/src/components/organisms/BarButtons/styles.js +0 -54
- package/src/components/organisms/Chatv2/ChatLists/ChatLists.stories.js +0 -65
- package/src/components/organisms/Chatv2/ChatLists/Rotoplas.jpeg +0 -0
- package/src/components/organisms/Chatv2/ChatLists/THD.png +0 -0
- package/src/components/organisms/Chatv2/ChatLists/index.js +0 -141
- package/src/components/organisms/Chatv2/ChatLists/styles.js +0 -162
- package/src/components/organisms/Chatv2/Chatv2.stories.js +0 -184
- package/src/components/organisms/Chatv2/ContainerItems/ContainerItems.stories.js +0 -142
- package/src/components/organisms/Chatv2/ContainerItems/index.js +0 -538
- package/src/components/organisms/Chatv2/ContainerItems/styles.js +0 -360
- package/src/components/organisms/Chatv2/ContentChat/ContentChat.stories.js +0 -102
- package/src/components/organisms/Chatv2/ContentChat/Rotoplas.jpeg +0 -0
- package/src/components/organisms/Chatv2/ContentChat/THD.png +0 -0
- package/src/components/organisms/Chatv2/ContentChat/index.js +0 -1016
- package/src/components/organisms/Chatv2/ContentChat/styles.js +0 -44
- package/src/components/organisms/Chatv2/Footer/Footer.stories.js +0 -22
- package/src/components/organisms/Chatv2/Footer/index.js +0 -668
- package/src/components/organisms/Chatv2/Footer/styles.js +0 -290
- package/src/components/organisms/Chatv2/Header/Header.stories.js +0 -66
- package/src/components/organisms/Chatv2/Header/index.js +0 -93
- package/src/components/organisms/Chatv2/Header/styles.js +0 -49
- package/src/components/organisms/Chatv2/index.js +0 -281
- package/src/components/organisms/Chatv2/styles.js +0 -85
- package/src/components/organisms/CompleteServices/CompleteServices.stories.js +0 -91
- package/src/components/organisms/CompleteServices/index.js +0 -82
- package/src/components/organisms/CompleteServices/styles.js +0 -35
- package/src/components/organisms/DragAndDropPhases/DragAndDropPhases.stories.js +0 -12
- package/src/components/organisms/DragAndDropPhases/index.js +0 -67
- package/src/components/organisms/DragAndDropPhases/styles.js +0 -20
- package/src/components/organisms/DragPrueba/DragPrueba.stories.js +0 -12
- package/src/components/organisms/DragPrueba/index.js +0 -57
- package/src/components/organisms/DragPrueba/styles.js +0 -8
- package/src/components/organisms/FullProductNamev2/FullProductNamev2.stories.js +0 -28
- package/src/components/organisms/FullProductNamev2/index.js +0 -101
- package/src/components/organisms/FullProductNamev2/styles.js +0 -49
- package/src/components/organisms/FullTabsMenuv2/FullTabsMenuv2.stories.js +0 -22
- package/src/components/organisms/FullTabsMenuv2/index.js +0 -142
- package/src/components/organisms/FullTabsMenuv2/styles.js +0 -47
- 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/ImageDataTablev2/ImageDataTablev2.stories.js +0 -24
- package/src/components/organisms/ImageDataTablev2/index.js +0 -124
- package/src/components/organisms/ImageDataTablev2/styles.js +0 -18
- package/src/components/organisms/ImagePreviewerv2/ImagePreviewerv2.stories.js +0 -38
- package/src/components/organisms/ImagePreviewerv2/index.js +0 -22
- package/src/components/organisms/ImagePreviewerv2/styles.js +0 -7
- package/src/components/organisms/InputGroupv2/InputGroupv2.stories.js +0 -31
- package/src/components/organisms/InputGroupv2/index.js +0 -296
- package/src/components/organisms/InputGroupv2/styles.js +0 -90
- package/src/components/organisms/MandatoryBar/MandatoryBar.stories.js +0 -18
- package/src/components/organisms/MandatoryBar/index.js +0 -31
- package/src/components/organisms/MandatoryBar/styles.js +0 -12
- package/src/components/organisms/ProductImageModalv2/ProductImageModalv2.stories.js +0 -90
- package/src/components/organisms/ProductImageModalv2/index.js +0 -105
- package/src/components/organisms/ProductImageModalv2/styles.js +0 -71
- package/src/components/organisms/RenameImagesBar/RenameImagesBar.stories.js +0 -18
- package/src/components/organisms/RenameImagesBar/index.js +0 -30
- package/src/components/organisms/RenameImagesBar/styles.js +0 -12
- package/src/components/organisms/VersionSelectorv2/VersionSelectorv2.stories.js +0 -15
- package/src/components/organisms/VersionSelectorv2/index.js +0 -105
- package/src/components/organisms/VersionSelectorv2/styles.js +0 -45
- package/src/components/pages/ProductEditionv2/ProductEditionv2.stories.js +0 -213
- package/src/components/pages/ProductEditionv2/index.js +0 -1758
- package/src/components/pages/ProductEditionv2/styles.js +0 -154
|
@@ -37,7 +37,7 @@ var _GalleryElement = require("../../molecules/GalleryElement");
|
|
|
37
37
|
|
|
38
38
|
var _fileSaver = require("file-saver");
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var _data = require("../../../global-files/data");
|
|
41
41
|
|
|
42
42
|
var _GalleryHeader = require("../../molecules/GalleryHeader");
|
|
43
43
|
|
|
@@ -61,6 +61,8 @@ var _index = require("../../molecules/TagAndInput/index");
|
|
|
61
61
|
|
|
62
62
|
var _GeneralButton = require("../../atoms/GeneralButton");
|
|
63
63
|
|
|
64
|
+
var _Commentary = require("../../atoms/Commentary");
|
|
65
|
+
|
|
64
66
|
var _GenericModal = require("../../atoms/GenericModal");
|
|
65
67
|
|
|
66
68
|
var _ScreenHeader = require("../../atoms/ScreenHeader");
|
|
@@ -69,16 +71,14 @@ var _Loading = require("../../atoms/Loading");
|
|
|
69
71
|
|
|
70
72
|
var _genericModalCheck = _interopRequireDefault(require("../../../assets/images/genericModal/genericModalCheck.svg"));
|
|
71
73
|
|
|
74
|
+
var _errorModal = _interopRequireDefault(require("../../../assets/images/genericModal/errorModal.svg"));
|
|
75
|
+
|
|
72
76
|
var _VersionSelector = require("../../organisms/VersionSelector");
|
|
73
77
|
|
|
74
78
|
var _customHooks = require("../../../global-files/customHooks");
|
|
75
79
|
|
|
76
80
|
var _utils = require("./utils");
|
|
77
81
|
|
|
78
|
-
var _Modal = require("../../organisms/Modal");
|
|
79
|
-
|
|
80
|
-
var _ButtonV = require("../../atoms/ButtonV2");
|
|
81
|
-
|
|
82
82
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
83
83
|
|
|
84
84
|
var reducerImages = function reducerImages(state, action) {
|
|
@@ -202,7 +202,7 @@ var myBucket = new _awsSdk.default.S3({
|
|
|
202
202
|
});
|
|
203
203
|
|
|
204
204
|
var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
205
|
-
var _product$retailers, _location$state,
|
|
205
|
+
var _product$retailers, _location$state, _product$services2, _datasheets$, _datasheets$$data, _product$article18, _comment$message;
|
|
206
206
|
|
|
207
207
|
var tabsSections = _ref.tabsSections,
|
|
208
208
|
_ref$productSelected = _ref.productSelected,
|
|
@@ -252,11 +252,6 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
252
252
|
showModal = _useState14[0],
|
|
253
253
|
setShowModal = _useState14[1];
|
|
254
254
|
|
|
255
|
-
var _useState15 = (0, _react.useState)(false),
|
|
256
|
-
_useState16 = (0, _slicedToArray2.default)(_useState15, 2),
|
|
257
|
-
showRejectModal = _useState16[0],
|
|
258
|
-
setShowRejectModal = _useState16[1];
|
|
259
|
-
|
|
260
255
|
var _useDropzone = (0, _reactDropzone.useDropzone)({
|
|
261
256
|
accept: "image/*",
|
|
262
257
|
noKeyboard: true,
|
|
@@ -301,149 +296,149 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
301
296
|
getRootProps = _useDropzone.getRootProps,
|
|
302
297
|
getInputProps = _useDropzone.getInputProps;
|
|
303
298
|
|
|
299
|
+
var _useState15 = (0, _react.useState)([]),
|
|
300
|
+
_useState16 = (0, _slicedToArray2.default)(_useState15, 2),
|
|
301
|
+
updatedDatasheets = _useState16[0],
|
|
302
|
+
setUpdatedDatasheets = _useState16[1];
|
|
303
|
+
|
|
304
304
|
var _useState17 = (0, _react.useState)([]),
|
|
305
305
|
_useState18 = (0, _slicedToArray2.default)(_useState17, 2),
|
|
306
|
-
|
|
307
|
-
|
|
306
|
+
updatedDescriptions = _useState18[0],
|
|
307
|
+
setUpdatedDescriptions = _useState18[1];
|
|
308
308
|
|
|
309
|
-
var _useState19 = (0, _react.useState)(
|
|
309
|
+
var _useState19 = (0, _react.useState)(false),
|
|
310
310
|
_useState20 = (0, _slicedToArray2.default)(_useState19, 2),
|
|
311
|
-
|
|
312
|
-
|
|
311
|
+
imagesUploaded = _useState20[0],
|
|
312
|
+
setImagesUploaded = _useState20[1];
|
|
313
313
|
|
|
314
|
-
var _useState21 = (0, _react.useState)(
|
|
314
|
+
var _useState21 = (0, _react.useState)(),
|
|
315
315
|
_useState22 = (0, _slicedToArray2.default)(_useState21, 2),
|
|
316
|
-
|
|
317
|
-
|
|
316
|
+
dataImages = _useState22[0],
|
|
317
|
+
setDataImages = _useState22[1];
|
|
318
318
|
|
|
319
|
-
var _useState23 = (0, _react.useState)()
|
|
320
|
-
_useState24 = (0, _slicedToArray2.default)(_useState23, 2),
|
|
321
|
-
dataImages = _useState24[0],
|
|
322
|
-
setDataImages = _useState24[1];
|
|
323
|
-
|
|
324
|
-
var _useState25 = (0, _react.useState)(new Array(product === null || product === void 0 ? void 0 : (_product$retailers = product.retailers) === null || _product$retailers === void 0 ? void 0 : _product$retailers.length).fill({
|
|
319
|
+
var _useState23 = (0, _react.useState)(new Array(product === null || product === void 0 ? void 0 : (_product$retailers = product.retailers) === null || _product$retailers === void 0 ? void 0 : _product$retailers.length).fill({
|
|
325
320
|
percentage: 0
|
|
326
321
|
})),
|
|
327
|
-
|
|
328
|
-
percentages =
|
|
329
|
-
setPercentages =
|
|
322
|
+
_useState24 = (0, _slicedToArray2.default)(_useState23, 2),
|
|
323
|
+
percentages = _useState24[0],
|
|
324
|
+
setPercentages = _useState24[1]; // const [percentages, setPercentages] = useState([{ retailers: {} }]);
|
|
325
|
+
|
|
330
326
|
|
|
327
|
+
var _useState25 = (0, _react.useState)(0),
|
|
328
|
+
_useState26 = (0, _slicedToArray2.default)(_useState25, 2),
|
|
329
|
+
activePercentage = _useState26[0],
|
|
330
|
+
setActivePercentage = _useState26[1];
|
|
331
331
|
|
|
332
|
-
var _useState27 = (0, _react.useState)(
|
|
332
|
+
var _useState27 = (0, _react.useState)({}),
|
|
333
333
|
_useState28 = (0, _slicedToArray2.default)(_useState27, 2),
|
|
334
|
-
|
|
335
|
-
|
|
334
|
+
activeRetailer = _useState28[0],
|
|
335
|
+
setActiveRetailer = _useState28[1];
|
|
336
336
|
|
|
337
|
-
var _useState29 = (0, _react.useState)(
|
|
337
|
+
var _useState29 = (0, _react.useState)([]),
|
|
338
338
|
_useState30 = (0, _slicedToArray2.default)(_useState29, 2),
|
|
339
|
-
|
|
340
|
-
|
|
339
|
+
services = _useState30[0],
|
|
340
|
+
setServices = _useState30[1];
|
|
341
341
|
|
|
342
342
|
var _useState31 = (0, _react.useState)([]),
|
|
343
343
|
_useState32 = (0, _slicedToArray2.default)(_useState31, 2),
|
|
344
|
-
|
|
345
|
-
|
|
344
|
+
servicesData = _useState32[0],
|
|
345
|
+
setServicesData = _useState32[1];
|
|
346
346
|
|
|
347
|
-
var _useState33 = (0, _react.useState)(
|
|
347
|
+
var _useState33 = (0, _react.useState)(""),
|
|
348
348
|
_useState34 = (0, _slicedToArray2.default)(_useState33, 2),
|
|
349
|
-
|
|
350
|
-
|
|
349
|
+
message = _useState34[0],
|
|
350
|
+
setMessage = _useState34[1];
|
|
351
351
|
|
|
352
|
-
var _useState35 = (0, _react.useState)(""),
|
|
352
|
+
var _useState35 = (0, _react.useState)(JSON.parse(sessionStorage.getItem("productSelected")) ? JSON.parse(sessionStorage.getItem("productSelected")) : productSelected),
|
|
353
353
|
_useState36 = (0, _slicedToArray2.default)(_useState35, 2),
|
|
354
|
-
|
|
355
|
-
|
|
354
|
+
product = _useState36[0],
|
|
355
|
+
setProduct = _useState36[1];
|
|
356
356
|
|
|
357
|
-
var _useState37 = (0, _react.useState)(
|
|
357
|
+
var _useState37 = (0, _react.useState)(null),
|
|
358
358
|
_useState38 = (0, _slicedToArray2.default)(_useState37, 2),
|
|
359
|
-
|
|
360
|
-
|
|
359
|
+
icon = _useState38[0],
|
|
360
|
+
setIcon = _useState38[1];
|
|
361
361
|
|
|
362
|
-
var _useState39 = (0, _react.useState)(null),
|
|
362
|
+
var _useState39 = (0, _react.useState)(product === null || product === void 0 ? void 0 : product.version),
|
|
363
363
|
_useState40 = (0, _slicedToArray2.default)(_useState39, 2),
|
|
364
|
-
|
|
365
|
-
|
|
364
|
+
version = _useState40[0],
|
|
365
|
+
setVersion = _useState40[1];
|
|
366
366
|
|
|
367
|
-
var _useState41 = (0, _react.useState)(
|
|
367
|
+
var _useState41 = (0, _react.useState)({}),
|
|
368
368
|
_useState42 = (0, _slicedToArray2.default)(_useState41, 2),
|
|
369
|
-
|
|
370
|
-
|
|
369
|
+
comments = _useState42[0],
|
|
370
|
+
setComments = _useState42[1];
|
|
371
371
|
|
|
372
|
-
var _useState43 = (0, _react.useState)(
|
|
372
|
+
var _useState43 = (0, _react.useState)(""),
|
|
373
373
|
_useState44 = (0, _slicedToArray2.default)(_useState43, 2),
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
var _useState45 = (0, _react.useState)(""),
|
|
378
|
-
_useState46 = (0, _slicedToArray2.default)(_useState45, 2),
|
|
379
|
-
comment = _useState46[0],
|
|
380
|
-
setComment = _useState46[1];
|
|
374
|
+
comment = _useState44[0],
|
|
375
|
+
setComment = _useState44[1];
|
|
381
376
|
|
|
382
|
-
var
|
|
377
|
+
var _useState45 = (0, _react.useState)({
|
|
383
378
|
"Ficha técnica": 0,
|
|
384
379
|
Descripción: 0,
|
|
385
380
|
Imágenes: 0
|
|
386
381
|
}),
|
|
382
|
+
_useState46 = (0, _slicedToArray2.default)(_useState45, 2),
|
|
383
|
+
requiredNull = _useState46[0],
|
|
384
|
+
setRequiredNull = _useState46[1];
|
|
385
|
+
|
|
386
|
+
var _useState47 = (0, _react.useState)(false),
|
|
387
387
|
_useState48 = (0, _slicedToArray2.default)(_useState47, 2),
|
|
388
|
-
|
|
389
|
-
|
|
388
|
+
crossComment = _useState48[0],
|
|
389
|
+
setCrossComment = _useState48[1];
|
|
390
390
|
|
|
391
|
-
var _useState49 = (0, _react.useState)(
|
|
391
|
+
var _useState49 = (0, _react.useState)([]),
|
|
392
392
|
_useState50 = (0, _slicedToArray2.default)(_useState49, 2),
|
|
393
|
-
|
|
394
|
-
|
|
393
|
+
userGroups = _useState50[0],
|
|
394
|
+
setUserGroups = _useState50[1];
|
|
395
395
|
|
|
396
|
-
var _useState51 = (0, _react.useState)(
|
|
396
|
+
var _useState51 = (0, _react.useState)({}),
|
|
397
397
|
_useState52 = (0, _slicedToArray2.default)(_useState51, 2),
|
|
398
|
-
|
|
399
|
-
|
|
398
|
+
assig = _useState52[0],
|
|
399
|
+
setAssig = _useState52[1];
|
|
400
400
|
|
|
401
|
-
var _useState53 = (0, _react.useState)(
|
|
401
|
+
var _useState53 = (0, _react.useState)([]),
|
|
402
402
|
_useState54 = (0, _slicedToArray2.default)(_useState53, 2),
|
|
403
|
-
|
|
404
|
-
|
|
403
|
+
selectedImages = _useState54[0],
|
|
404
|
+
setSelectedImages = _useState54[1];
|
|
405
405
|
|
|
406
406
|
var _useState55 = (0, _react.useState)([]),
|
|
407
407
|
_useState56 = (0, _slicedToArray2.default)(_useState55, 2),
|
|
408
|
-
|
|
409
|
-
|
|
408
|
+
componentsArray = _useState56[0],
|
|
409
|
+
setComponentsArray = _useState56[1];
|
|
410
410
|
|
|
411
|
-
var _useState57 = (0, _react.useState)(
|
|
411
|
+
var _useState57 = (0, _react.useState)(false),
|
|
412
412
|
_useState58 = (0, _slicedToArray2.default)(_useState57, 2),
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
var _useState59 = (0, _react.useState)(false),
|
|
417
|
-
_useState60 = (0, _slicedToArray2.default)(_useState59, 2),
|
|
418
|
-
checkAll = _useState60[0],
|
|
419
|
-
setCheckAll = _useState60[1];
|
|
413
|
+
checkAll = _useState58[0],
|
|
414
|
+
setCheckAll = _useState58[1];
|
|
420
415
|
|
|
421
416
|
var isRetailer = user === null || user === void 0 ? void 0 : user.is_retailer;
|
|
422
417
|
|
|
423
|
-
var
|
|
418
|
+
var _useState59 = (0, _react.useState)(true),
|
|
419
|
+
_useState60 = (0, _slicedToArray2.default)(_useState59, 2),
|
|
420
|
+
loading = _useState60[0],
|
|
421
|
+
setLoading = _useState60[1];
|
|
422
|
+
|
|
423
|
+
var _useState61 = (0, _react.useState)("-"),
|
|
424
424
|
_useState62 = (0, _slicedToArray2.default)(_useState61, 2),
|
|
425
|
-
|
|
426
|
-
|
|
425
|
+
retailerStatus = _useState62[0],
|
|
426
|
+
setRetailerStatus = _useState62[1];
|
|
427
427
|
|
|
428
|
-
var _useState63 = (0, _react.useState)(
|
|
428
|
+
var _useState63 = (0, _react.useState)([]),
|
|
429
429
|
_useState64 = (0, _slicedToArray2.default)(_useState63, 2),
|
|
430
|
-
|
|
431
|
-
|
|
430
|
+
statusArray = _useState64[0],
|
|
431
|
+
setStatusArray = _useState64[1];
|
|
432
432
|
|
|
433
|
-
var _useState65 = (0, _react.useState)(
|
|
433
|
+
var _useState65 = (0, _react.useState)(null),
|
|
434
434
|
_useState66 = (0, _slicedToArray2.default)(_useState65, 2),
|
|
435
|
-
|
|
436
|
-
|
|
435
|
+
socketType = _useState66[0],
|
|
436
|
+
setSocketType = _useState66[1];
|
|
437
437
|
|
|
438
|
-
var _useState67 = (0, _react.useState)(
|
|
438
|
+
var _useState67 = (0, _react.useState)(loading),
|
|
439
439
|
_useState68 = (0, _slicedToArray2.default)(_useState67, 2),
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
var _useState69 = (0, _react.useState)(loading),
|
|
444
|
-
_useState70 = (0, _slicedToArray2.default)(_useState69, 2),
|
|
445
|
-
saving = _useState70[0],
|
|
446
|
-
setSaving = _useState70[1];
|
|
440
|
+
saving = _useState68[0],
|
|
441
|
+
setSaving = _useState68[1];
|
|
447
442
|
|
|
448
443
|
var _useCloseModal = (0, _customHooks.useCloseModal)("version-selector"),
|
|
449
444
|
_useCloseModal2 = (0, _slicedToArray2.default)(_useCloseModal, 2),
|
|
@@ -452,55 +447,35 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
452
447
|
|
|
453
448
|
var shotThd = [58, 59, 60, 61].includes(activeRetailer.id);
|
|
454
449
|
|
|
455
|
-
var
|
|
450
|
+
var _useState69 = (0, _react.useState)(null),
|
|
451
|
+
_useState70 = (0, _slicedToArray2.default)(_useState69, 2),
|
|
452
|
+
auditableVersion = _useState70[0],
|
|
453
|
+
setAuditableVersion = _useState70[1];
|
|
454
|
+
|
|
455
|
+
var _useState71 = (0, _react.useState)([]),
|
|
456
456
|
_useState72 = (0, _slicedToArray2.default)(_useState71, 2),
|
|
457
|
-
|
|
458
|
-
|
|
457
|
+
auditServices = _useState72[0],
|
|
458
|
+
setAuditServices = _useState72[1];
|
|
459
459
|
|
|
460
460
|
var _useState73 = (0, _react.useState)([]),
|
|
461
461
|
_useState74 = (0, _slicedToArray2.default)(_useState73, 2),
|
|
462
|
-
|
|
463
|
-
|
|
462
|
+
auditDatasheets = _useState74[0],
|
|
463
|
+
setAuditDatasheets = _useState74[1];
|
|
464
464
|
|
|
465
465
|
var _useState75 = (0, _react.useState)([]),
|
|
466
466
|
_useState76 = (0, _slicedToArray2.default)(_useState75, 2),
|
|
467
|
-
|
|
468
|
-
|
|
467
|
+
auditDescriptions = _useState76[0],
|
|
468
|
+
setAuditDescriptions = _useState76[1];
|
|
469
469
|
|
|
470
470
|
var _useState77 = (0, _react.useState)([]),
|
|
471
471
|
_useState78 = (0, _slicedToArray2.default)(_useState77, 2),
|
|
472
|
-
|
|
473
|
-
|
|
472
|
+
auditImages = _useState78[0],
|
|
473
|
+
setAuditImages = _useState78[1];
|
|
474
474
|
|
|
475
|
-
var _useState79 = (0, _react.useState)(
|
|
475
|
+
var _useState79 = (0, _react.useState)(false),
|
|
476
476
|
_useState80 = (0, _slicedToArray2.default)(_useState79, 2),
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
var _useState81 = (0, _react.useState)(false),
|
|
481
|
-
_useState82 = (0, _slicedToArray2.default)(_useState81, 2),
|
|
482
|
-
compare = _useState82[0],
|
|
483
|
-
setCompare = _useState82[1];
|
|
484
|
-
|
|
485
|
-
var _useState83 = (0, _react.useState)(false),
|
|
486
|
-
_useState84 = (0, _slicedToArray2.default)(_useState83, 2),
|
|
487
|
-
valRejAll = _useState84[0],
|
|
488
|
-
setValRejAll = _useState84[1];
|
|
489
|
-
|
|
490
|
-
var _useState85 = (0, _react.useState)([]),
|
|
491
|
-
_useState86 = (0, _slicedToArray2.default)(_useState85, 2),
|
|
492
|
-
desc = _useState86[0],
|
|
493
|
-
setDesc = _useState86[1];
|
|
494
|
-
|
|
495
|
-
var _useState87 = (0, _react.useState)([]),
|
|
496
|
-
_useState88 = (0, _slicedToArray2.default)(_useState87, 2),
|
|
497
|
-
fich = _useState88[0],
|
|
498
|
-
setFich = _useState88[1];
|
|
499
|
-
|
|
500
|
-
var _useState89 = (0, _react.useState)([]),
|
|
501
|
-
_useState90 = (0, _slicedToArray2.default)(_useState89, 2),
|
|
502
|
-
imag = _useState90[0],
|
|
503
|
-
setImag = _useState90[1];
|
|
477
|
+
compare = _useState80[0],
|
|
478
|
+
setCompare = _useState80[1];
|
|
504
479
|
|
|
505
480
|
(0, _react.useEffect)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
506
481
|
var _ref3, id_article;
|
|
@@ -541,7 +516,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
541
516
|
}
|
|
542
517
|
|
|
543
518
|
_context2.next = 3;
|
|
544
|
-
return (0,
|
|
519
|
+
return (0, _data.getRetailerServices)(product === null || product === void 0 ? void 0 : (_product$article = product.article) === null || _product$article === void 0 ? void 0 : _product$article.id_article, product === null || product === void 0 ? void 0 : (_product$article2 = product.article) === null || _product$article2 === void 0 ? void 0 : _product$article2.category, parseInt(product === null || product === void 0 ? void 0 : (_product$article3 = product.article) === null || _product$article3 === void 0 ? void 0 : _product$article3.id_category), auditableVersion.version, token);
|
|
545
520
|
|
|
546
521
|
case 3:
|
|
547
522
|
_auditServices = _context2.sent;
|
|
@@ -581,7 +556,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
581
556
|
case 0:
|
|
582
557
|
_context3.prev = 0;
|
|
583
558
|
_context3.next = 3;
|
|
584
|
-
return (0,
|
|
559
|
+
return (0, _data.getRetailerServices)(product === null || product === void 0 ? void 0 : (_product$article4 = product.article) === null || _product$article4 === void 0 ? void 0 : _product$article4.id_article, product === null || product === void 0 ? void 0 : (_product$article5 = product.article) === null || _product$article5 === void 0 ? void 0 : _product$article5.category, parseInt(product === null || product === void 0 ? void 0 : (_product$article6 = product.article) === null || _product$article6 === void 0 ? void 0 : _product$article6.id_category), version, token);
|
|
585
560
|
|
|
586
561
|
case 3:
|
|
587
562
|
_services = _context3.sent;
|
|
@@ -598,7 +573,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
598
573
|
init: _services[2]
|
|
599
574
|
});
|
|
600
575
|
if (((_services$ = _services[2]) === null || _services$ === void 0 ? void 0 : (_services$$values = _services$.values) === null || _services$$values === void 0 ? void 0 : _services$$values.length) > 0) setActiveImage(0);
|
|
601
|
-
(0,
|
|
576
|
+
(0, _data.getPercentage)({
|
|
602
577
|
data: [product]
|
|
603
578
|
}).then(function (res) {
|
|
604
579
|
return setPercentages(res[0]);
|
|
@@ -723,7 +698,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
723
698
|
getComments();
|
|
724
699
|
_context6.t0 = setUserGroups;
|
|
725
700
|
_context6.next = 6;
|
|
726
|
-
return (0,
|
|
701
|
+
return (0, _data.fetchUsers)(token);
|
|
727
702
|
|
|
728
703
|
case 6:
|
|
729
704
|
_context6.t1 = _context6.sent;
|
|
@@ -1040,7 +1015,6 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1040
1015
|
};
|
|
1041
1016
|
});
|
|
1042
1017
|
setSocketType(imageInputs);
|
|
1043
|
-
console.log(images);
|
|
1044
1018
|
}, [images]);
|
|
1045
1019
|
var updateImages = (0, _react.useCallback)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
|
|
1046
1020
|
var _images$values3, _images$attrForImgs, _product$article14, _data$articleData, _data$articleData2, _data$updateImages;
|
|
@@ -1420,7 +1394,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1420
1394
|
|
|
1421
1395
|
var sendToFacilitator = /*#__PURE__*/function () {
|
|
1422
1396
|
var _ref14 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(result) {
|
|
1423
|
-
var concept, productTemp, evalStatus, articleId, orderId, data, res, _message, specialistDone, _JSON$parse5, newStatus, newOrderStatus, newArticleStatus
|
|
1397
|
+
var concept, productTemp, evalStatus, articleId, orderId, data, res, _message, specialistDone, _JSON$parse5, newStatus, newOrderStatus, newArticleStatus;
|
|
1424
1398
|
|
|
1425
1399
|
return _regenerator.default.wrap(function _callee11$(_context11) {
|
|
1426
1400
|
while (1) {
|
|
@@ -1483,59 +1457,39 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1483
1457
|
|
|
1484
1458
|
case 21:
|
|
1485
1459
|
if (!(res.data.statusCode === 200)) {
|
|
1486
|
-
_context11.next =
|
|
1460
|
+
_context11.next = 30;
|
|
1487
1461
|
break;
|
|
1488
1462
|
}
|
|
1489
1463
|
|
|
1490
1464
|
_JSON$parse5 = JSON.parse(res.data.body), newStatus = _JSON$parse5.newStatus, newOrderStatus = _JSON$parse5.newOrderStatus, newArticleStatus = _JSON$parse5.newArticleStatus;
|
|
1491
|
-
messageToChat = (0, _utils.createMessage)(product.retailers, activeRetailer.id, evalStatus, newStatus, activeTab);
|
|
1492
|
-
_data = {
|
|
1493
|
-
paramsBody: {
|
|
1494
|
-
id: product.article.id_article,
|
|
1495
|
-
version: version,
|
|
1496
|
-
items: [{
|
|
1497
|
-
type: "status",
|
|
1498
|
-
value: messageToChat
|
|
1499
|
-
}],
|
|
1500
|
-
retailerId: activeRetailer.id,
|
|
1501
|
-
status: product.status
|
|
1502
|
-
},
|
|
1503
|
-
paramsHeader: {
|
|
1504
|
-
Authorization: token
|
|
1505
|
-
}
|
|
1506
|
-
};
|
|
1507
|
-
_context11.next = 27;
|
|
1508
|
-
return (0, _utils.sendMessage)(_data);
|
|
1509
|
-
|
|
1510
|
-
case 27:
|
|
1511
1465
|
if (newOrderStatus) productTemp.status = newArticleStatus[articleId];
|
|
1512
1466
|
productTemp["".concat(concept, "_status")] = newStatus;
|
|
1513
|
-
_context11.next =
|
|
1467
|
+
_context11.next = 27;
|
|
1514
1468
|
return loadData();
|
|
1515
1469
|
|
|
1516
|
-
case
|
|
1470
|
+
case 27:
|
|
1517
1471
|
if (_message) setMessage(_message);
|
|
1518
1472
|
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
1519
1473
|
setProduct(productTemp);
|
|
1520
1474
|
|
|
1521
|
-
case
|
|
1522
|
-
_context11.next =
|
|
1475
|
+
case 30:
|
|
1476
|
+
_context11.next = 35;
|
|
1523
1477
|
break;
|
|
1524
1478
|
|
|
1525
|
-
case
|
|
1526
|
-
_context11.prev =
|
|
1479
|
+
case 32:
|
|
1480
|
+
_context11.prev = 32;
|
|
1527
1481
|
_context11.t0 = _context11["catch"](1);
|
|
1528
1482
|
console.log(_context11.t0);
|
|
1529
1483
|
|
|
1530
|
-
case
|
|
1484
|
+
case 35:
|
|
1531
1485
|
setLoading(false);
|
|
1532
1486
|
|
|
1533
|
-
case
|
|
1487
|
+
case 36:
|
|
1534
1488
|
case "end":
|
|
1535
1489
|
return _context11.stop();
|
|
1536
1490
|
}
|
|
1537
1491
|
}
|
|
1538
|
-
}, _callee11, null, [[1,
|
|
1492
|
+
}, _callee11, null, [[1, 32]]);
|
|
1539
1493
|
}));
|
|
1540
1494
|
|
|
1541
1495
|
return function sendToFacilitator(_x) {
|
|
@@ -1570,33 +1524,55 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1570
1524
|
};
|
|
1571
1525
|
|
|
1572
1526
|
var createComment = /*#__PURE__*/function () {
|
|
1573
|
-
var _ref15 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
|
|
1574
|
-
var
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
_args12 = arguments;
|
|
1527
|
+
var _ref15 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12(e, body, tab) {
|
|
1528
|
+
var _product$article16;
|
|
1529
|
+
|
|
1530
|
+
var concept, data;
|
|
1578
1531
|
return _regenerator.default.wrap(function _callee12$(_context12) {
|
|
1579
1532
|
while (1) {
|
|
1580
1533
|
switch (_context12.prev = _context12.next) {
|
|
1581
1534
|
case 0:
|
|
1582
|
-
|
|
1583
|
-
|
|
1535
|
+
concept = "";
|
|
1536
|
+
_context12.t0 = activeTab;
|
|
1537
|
+
_context12.next = _context12.t0 === "Ficha técnica" ? 4 : _context12.t0 === "Imágenes" ? 6 : 8;
|
|
1538
|
+
break;
|
|
1539
|
+
|
|
1540
|
+
case 4:
|
|
1541
|
+
concept = "datasheet";
|
|
1542
|
+
return _context12.abrupt("break", 10);
|
|
1543
|
+
|
|
1544
|
+
case 6:
|
|
1545
|
+
concept = "images";
|
|
1546
|
+
return _context12.abrupt("break", 10);
|
|
1547
|
+
|
|
1548
|
+
case 8:
|
|
1549
|
+
concept = "description";
|
|
1550
|
+
return _context12.abrupt("break", 10);
|
|
1551
|
+
|
|
1552
|
+
case 10:
|
|
1584
1553
|
data = {
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1554
|
+
articleId: product === null || product === void 0 ? void 0 : (_product$article16 = product.article) === null || _product$article16 === void 0 ? void 0 : _product$article16.id_article,
|
|
1555
|
+
orderId: product === null || product === void 0 ? void 0 : product.orderId,
|
|
1556
|
+
message: body === null || body === void 0 ? void 0 : body.replace(/<.*?\/?>/gm, ""),
|
|
1557
|
+
concept: concept,
|
|
1558
|
+
version: version
|
|
1559
|
+
};
|
|
1560
|
+
_context12.next = 13;
|
|
1561
|
+
return _axios.default.post("".concat(process.env.REACT_APP_COMMENTS_ENDPOINT), data, {
|
|
1562
|
+
headers: {
|
|
1593
1563
|
Authorization: token
|
|
1594
1564
|
}
|
|
1595
|
-
};
|
|
1565
|
+
});
|
|
1566
|
+
|
|
1567
|
+
case 13:
|
|
1568
|
+
_context12.next = 15;
|
|
1569
|
+
return getComments(tab);
|
|
1570
|
+
|
|
1571
|
+
case 15:
|
|
1596
1572
|
setMessage("");
|
|
1597
|
-
|
|
1573
|
+
setComponentsArray([]);
|
|
1598
1574
|
|
|
1599
|
-
case
|
|
1575
|
+
case 17:
|
|
1600
1576
|
case "end":
|
|
1601
1577
|
return _context12.stop();
|
|
1602
1578
|
}
|
|
@@ -1604,7 +1580,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1604
1580
|
}, _callee12);
|
|
1605
1581
|
}));
|
|
1606
1582
|
|
|
1607
|
-
return function createComment() {
|
|
1583
|
+
return function createComment(_x2, _x3, _x4) {
|
|
1608
1584
|
return _ref15.apply(this, arguments);
|
|
1609
1585
|
};
|
|
1610
1586
|
}();
|
|
@@ -1719,7 +1695,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1719
1695
|
|
|
1720
1696
|
var setAssignation = /*#__PURE__*/function () {
|
|
1721
1697
|
var _ref17 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(assignationType, assignationId) {
|
|
1722
|
-
var _product$
|
|
1698
|
+
var _product$article17;
|
|
1723
1699
|
|
|
1724
1700
|
var concept, productTemp, data;
|
|
1725
1701
|
return _regenerator.default.wrap(function _callee14$(_context14) {
|
|
@@ -1749,7 +1725,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1749
1725
|
data = {
|
|
1750
1726
|
articleList: [{
|
|
1751
1727
|
orderId: product.orderId,
|
|
1752
|
-
articleId: product === null || product === void 0 ? void 0 : (_product$
|
|
1728
|
+
articleId: product === null || product === void 0 ? void 0 : (_product$article17 = product.article) === null || _product$article17 === void 0 ? void 0 : _product$article17.id_article
|
|
1753
1729
|
}],
|
|
1754
1730
|
concept: concept,
|
|
1755
1731
|
userId: assignationId
|
|
@@ -1776,7 +1752,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1776
1752
|
}, _callee14);
|
|
1777
1753
|
}));
|
|
1778
1754
|
|
|
1779
|
-
return function setAssignation(
|
|
1755
|
+
return function setAssignation(_x5, _x6) {
|
|
1780
1756
|
return _ref17.apply(this, arguments);
|
|
1781
1757
|
};
|
|
1782
1758
|
}();
|
|
@@ -1878,7 +1854,6 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1878
1854
|
};
|
|
1879
1855
|
|
|
1880
1856
|
(0, _react.useEffect)(function () {
|
|
1881
|
-
console.log(servicesData, "servicesData");
|
|
1882
1857
|
var status = getRetailerStatus(servicesData, activeTab);
|
|
1883
1858
|
setRetailerStatus(status);
|
|
1884
1859
|
}, [activeTab, servicesData, activeRetailer]);
|
|
@@ -1948,7 +1923,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1948
1923
|
|
|
1949
1924
|
var validateAll = /*#__PURE__*/function () {
|
|
1950
1925
|
var _ref18 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15(result) {
|
|
1951
|
-
var evaluationArray, conceptArray,
|
|
1926
|
+
var evaluationArray, conceptArray, productTemp;
|
|
1952
1927
|
return _regenerator.default.wrap(function _callee15$(_context15) {
|
|
1953
1928
|
while (1) {
|
|
1954
1929
|
switch (_context15.prev = _context15.next) {
|
|
@@ -1974,7 +1949,6 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1974
1949
|
return _context15.abrupt("break", 13);
|
|
1975
1950
|
|
|
1976
1951
|
case 13:
|
|
1977
|
-
messages = [];
|
|
1978
1952
|
servicesData === null || servicesData === void 0 ? void 0 : servicesData.forEach(function (ret) {
|
|
1979
1953
|
if (conceptArray.includes(ret.service)) {
|
|
1980
1954
|
var _product$id_order;
|
|
@@ -1994,43 +1968,38 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1994
1968
|
}));
|
|
1995
1969
|
}
|
|
1996
1970
|
});
|
|
1997
|
-
_context15.next =
|
|
1971
|
+
_context15.next = 16;
|
|
1998
1972
|
return Promise.all(evaluationArray);
|
|
1999
1973
|
|
|
2000
|
-
case
|
|
1974
|
+
case 16:
|
|
2001
1975
|
productTemp = product;
|
|
2002
1976
|
productTemp.status = "".concat(result, "A");
|
|
2003
|
-
productTemp.datasheet_status = productTemp.datasheet_status === "
|
|
2004
|
-
productTemp.description_status = productTemp.description_status === "
|
|
2005
|
-
productTemp.images_status = productTemp.images_status === "
|
|
1977
|
+
productTemp.datasheet_status = productTemp.datasheet_status === "NA" ? "NA" : "".concat(result, "A");
|
|
1978
|
+
productTemp.description_status = productTemp.description_status === "NA" ? "NA" : "".concat(result, "A");
|
|
1979
|
+
productTemp.images_status = productTemp.images_status === "NA" ? "NA" : "".concat(result, "A");
|
|
2006
1980
|
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
2007
1981
|
setProduct(productTemp);
|
|
2008
|
-
_context15.next =
|
|
2009
|
-
return Promise.all(messages);
|
|
2010
|
-
|
|
2011
|
-
case 26:
|
|
2012
|
-
messagesResponse = _context15.sent;
|
|
2013
|
-
_context15.next = 29;
|
|
1982
|
+
_context15.next = 25;
|
|
2014
1983
|
return loadData();
|
|
2015
1984
|
|
|
2016
|
-
case
|
|
2017
|
-
_context15.next =
|
|
1985
|
+
case 25:
|
|
1986
|
+
_context15.next = 30;
|
|
2018
1987
|
break;
|
|
2019
1988
|
|
|
2020
|
-
case
|
|
2021
|
-
_context15.prev =
|
|
1989
|
+
case 27:
|
|
1990
|
+
_context15.prev = 27;
|
|
2022
1991
|
_context15.t1 = _context15["catch"](0);
|
|
2023
1992
|
console.log(_context15.t1);
|
|
2024
1993
|
|
|
2025
|
-
case
|
|
1994
|
+
case 30:
|
|
2026
1995
|
case "end":
|
|
2027
1996
|
return _context15.stop();
|
|
2028
1997
|
}
|
|
2029
1998
|
}
|
|
2030
|
-
}, _callee15, null, [[0,
|
|
1999
|
+
}, _callee15, null, [[0, 27]]);
|
|
2031
2000
|
}));
|
|
2032
2001
|
|
|
2033
|
-
return function validateAll(
|
|
2002
|
+
return function validateAll(_x7) {
|
|
2034
2003
|
return _ref18.apply(this, arguments);
|
|
2035
2004
|
};
|
|
2036
2005
|
}();
|
|
@@ -2043,10 +2012,8 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
2043
2012
|
setCompare: setCompare,
|
|
2044
2013
|
isAuditor: [1, 6].includes(user.id_role),
|
|
2045
2014
|
withChat: location === null || location === void 0 ? void 0 : (_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.withChat,
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
token: token,
|
|
2049
|
-
activeRetailer: activeRetailer
|
|
2015
|
+
productSelected: productSelected,
|
|
2016
|
+
token: token
|
|
2050
2017
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2051
2018
|
className: "data-container",
|
|
2052
2019
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
@@ -2088,7 +2055,27 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
2088
2055
|
sendToFacilitator("A");
|
|
2089
2056
|
},
|
|
2090
2057
|
reject: function reject() {
|
|
2091
|
-
|
|
2058
|
+
sendToFacilitator("R");
|
|
2059
|
+
setMessage("Rechazado");
|
|
2060
|
+
setComponentsArray([/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
2061
|
+
src: _errorModal.default
|
|
2062
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
2063
|
+
text: "Agrega tu comentarios para enviar el rechazo",
|
|
2064
|
+
headerType: "input-name-header",
|
|
2065
|
+
color: "white"
|
|
2066
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TagAndInput, {
|
|
2067
|
+
label: "Caja de Comentario",
|
|
2068
|
+
inputType: "textarea",
|
|
2069
|
+
inputId: "modal-commentary-box",
|
|
2070
|
+
index: 0,
|
|
2071
|
+
color: "white"
|
|
2072
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
2073
|
+
buttonType: "general-default-button",
|
|
2074
|
+
label: "Enviar comentario",
|
|
2075
|
+
onClick: function onClick(e) {
|
|
2076
|
+
return createComment(e, document.querySelector("#modal-commentary-box .ql-container .ql-editor > p").innerHTML, activeTab);
|
|
2077
|
+
}
|
|
2078
|
+
})]);
|
|
2092
2079
|
},
|
|
2093
2080
|
showApproveRejectAll: approveRejectAllButtons() && (auditorAssigned() || userAssigned()),
|
|
2094
2081
|
showValidationButtons: approveRejectButtons() && (auditorAssigned() || userAssigned()),
|
|
@@ -2096,8 +2083,27 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
2096
2083
|
return validateAll("A");
|
|
2097
2084
|
},
|
|
2098
2085
|
rejectAll: function rejectAll() {
|
|
2099
|
-
|
|
2100
|
-
|
|
2086
|
+
validateAll("R");
|
|
2087
|
+
setMessage("Rechazado");
|
|
2088
|
+
setComponentsArray([/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
2089
|
+
src: _errorModal.default
|
|
2090
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
2091
|
+
text: "Agrega tu comentarios para enviar el rechazo",
|
|
2092
|
+
headerType: "input-name-header",
|
|
2093
|
+
color: "white"
|
|
2094
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TagAndInput, {
|
|
2095
|
+
label: "Caja de Comentario",
|
|
2096
|
+
inputType: "textarea",
|
|
2097
|
+
inputId: "modal-commentary-box",
|
|
2098
|
+
index: 0,
|
|
2099
|
+
color: "white"
|
|
2100
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
2101
|
+
buttonType: "general-default-button",
|
|
2102
|
+
label: "Enviar comentario",
|
|
2103
|
+
onClick: function onClick(e) {
|
|
2104
|
+
return createComment(e, document.querySelector("#modal-commentary-box .ql-container .ql-editor > p").innerHTML, activeTab);
|
|
2105
|
+
}
|
|
2106
|
+
})]);
|
|
2101
2107
|
}
|
|
2102
2108
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FullTabsMenu.FullTabsMenu, {
|
|
2103
2109
|
tabsSections: tabsSections,
|
|
@@ -2112,12 +2118,6 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
2112
2118
|
isRetailer: isRetailer,
|
|
2113
2119
|
showSaveButton: auditorAssigned() || userAssigned(),
|
|
2114
2120
|
version: version,
|
|
2115
|
-
desc: desc,
|
|
2116
|
-
setDesc: setDesc,
|
|
2117
|
-
fich: fich,
|
|
2118
|
-
setFich: setFich,
|
|
2119
|
-
imag: imag,
|
|
2120
|
-
setImag: setImag,
|
|
2121
2121
|
updatedDescriptions: updatedDescriptions,
|
|
2122
2122
|
setUpdatedDescriptions: setUpdatedDescriptions,
|
|
2123
2123
|
updatedDatasheets: updatedDatasheets,
|
|
@@ -2175,7 +2175,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
2175
2175
|
auditInputGroup: auditDescriptions[0],
|
|
2176
2176
|
updatedDescriptions: updatedDescriptions,
|
|
2177
2177
|
setUpdatedDescriptions: setUpdatedDescriptions,
|
|
2178
|
-
articleId: product === null || product === void 0 ? void 0 : (_product$
|
|
2178
|
+
articleId: product === null || product === void 0 ? void 0 : (_product$article18 = product.article) === null || _product$article18 === void 0 ? void 0 : _product$article18.id_article,
|
|
2179
2179
|
version: version,
|
|
2180
2180
|
dinamicHeight: true,
|
|
2181
2181
|
compare: compare
|
|
@@ -2196,15 +2196,57 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
2196
2196
|
headerType: "input-name-header"
|
|
2197
2197
|
}))]
|
|
2198
2198
|
})
|
|
2199
|
-
}), (userAssigned(activeTab) || auditorAssigned()) && product["".concat(getConcept(activeTab), "_status")] !== "NS" && /*#__PURE__*/(0, _jsxRuntime.
|
|
2199
|
+
}), (userAssigned(activeTab) || auditorAssigned()) && product["".concat(getConcept(activeTab), "_status")] !== "NS" && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2200
2200
|
className: "commentary-box",
|
|
2201
|
-
children: [
|
|
2201
|
+
children: [!comment ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2202
|
+
className: "commentary",
|
|
2203
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TagAndInput, {
|
|
2204
|
+
label: "Caja de Comentario",
|
|
2205
|
+
inputType: "textarea",
|
|
2206
|
+
inputCols: 80,
|
|
2207
|
+
inputRows: 4,
|
|
2208
|
+
inputId: "commentary-box",
|
|
2209
|
+
index: 0
|
|
2210
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
2211
|
+
className: "buttons-box",
|
|
2212
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
2213
|
+
buttonType: "general-transparent-button",
|
|
2214
|
+
label: "Enviar comentario",
|
|
2215
|
+
onClick: function onClick(e) {
|
|
2216
|
+
return createComment(e, document.querySelector("#commentary-box .ql-container .ql-editor > p").innerHTML, activeTab);
|
|
2217
|
+
}
|
|
2218
|
+
})
|
|
2219
|
+
})]
|
|
2220
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2221
|
+
className: "feedback-box",
|
|
2222
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Commentary.Commentary, {
|
|
2223
|
+
comment: comment === null || comment === void 0 ? void 0 : (_comment$message = comment.message) === null || _comment$message === void 0 ? void 0 : _comment$message.replace(/<.*?\/?>/gm, ""),
|
|
2224
|
+
reviewed: crossComment
|
|
2225
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
2226
|
+
buttonType: "circular-button accept-button",
|
|
2227
|
+
onClick: /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
|
|
2228
|
+
return _regenerator.default.wrap(function _callee16$(_context16) {
|
|
2229
|
+
while (1) {
|
|
2230
|
+
switch (_context16.prev = _context16.next) {
|
|
2231
|
+
case 0:
|
|
2232
|
+
setCrossComment(true);
|
|
2233
|
+
commentRevised();
|
|
2234
|
+
|
|
2235
|
+
case 2:
|
|
2236
|
+
case "end":
|
|
2237
|
+
return _context16.stop();
|
|
2238
|
+
}
|
|
2239
|
+
}
|
|
2240
|
+
}, _callee16);
|
|
2241
|
+
}))
|
|
2242
|
+
})]
|
|
2243
|
+
}), [7, 8].includes(user.id_role) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
2202
2244
|
buttonType: evaluationFinished(user.id_role, activeTab, statusArray) && requiredNull[activeTab] === 0 ? "general-green-button" : "general-button-disabled",
|
|
2203
2245
|
label: "Enviar evaluación",
|
|
2204
2246
|
onClick: function onClick() {
|
|
2205
2247
|
return sendToFacilitator();
|
|
2206
2248
|
}
|
|
2207
|
-
})
|
|
2249
|
+
})]
|
|
2208
2250
|
})]
|
|
2209
2251
|
})]
|
|
2210
2252
|
}), showModal && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProductImageModal.ProductImageModal, {
|
|
@@ -2233,53 +2275,6 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
2233
2275
|
currentVersion: version,
|
|
2234
2276
|
setShowVersionSelector: setShowVersionSelector,
|
|
2235
2277
|
jwt: token
|
|
2236
|
-
}), showRejectModal && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.Modal, {
|
|
2237
|
-
title: "Agregar mensaje de rechazo para ".concat(activeTab === null || activeTab === void 0 ? void 0 : activeTab.toLowerCase()),
|
|
2238
|
-
show: showRejectModal,
|
|
2239
|
-
customComponent: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TagAndInput, {
|
|
2240
|
-
inputType: "textarea",
|
|
2241
|
-
inputId: "modal-message-box",
|
|
2242
|
-
index: 0,
|
|
2243
|
-
color: "white"
|
|
2244
|
-
}),
|
|
2245
|
-
buttons: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
|
|
2246
|
-
type: "white",
|
|
2247
|
-
label: "Cancelar",
|
|
2248
|
-
size: 12,
|
|
2249
|
-
onClick: function onClick() {
|
|
2250
|
-
setShowRejectModal(false);
|
|
2251
|
-
}
|
|
2252
|
-
}, "btn-Cancelar"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
|
|
2253
|
-
type: "pink",
|
|
2254
|
-
label: "Aceptar",
|
|
2255
|
-
size: 12,
|
|
2256
|
-
onClick: /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
|
|
2257
|
-
var body, messages;
|
|
2258
|
-
return _regenerator.default.wrap(function _callee16$(_context16) {
|
|
2259
|
-
while (1) {
|
|
2260
|
-
switch (_context16.prev = _context16.next) {
|
|
2261
|
-
case 0:
|
|
2262
|
-
body = document.querySelector("#modal-message-box .ql-container .ql-editor > p").innerHTML;
|
|
2263
|
-
messages = [{
|
|
2264
|
-
type: "message",
|
|
2265
|
-
value: body === null || body === void 0 ? void 0 : body.replace(/<.*?\/?>/gm, "")
|
|
2266
|
-
}];
|
|
2267
|
-
_context16.next = 4;
|
|
2268
|
-
return createComment(messages, activeRetailer.id);
|
|
2269
|
-
|
|
2270
|
-
case 4:
|
|
2271
|
-
valRejAll ? validateAll("R") : sendToFacilitator("R");
|
|
2272
|
-
setMessage("Rechazado");
|
|
2273
|
-
setShowRejectModal(false);
|
|
2274
|
-
|
|
2275
|
-
case 7:
|
|
2276
|
-
case "end":
|
|
2277
|
-
return _context16.stop();
|
|
2278
|
-
}
|
|
2279
|
-
}
|
|
2280
|
-
}, _callee16);
|
|
2281
|
-
}))
|
|
2282
|
-
}, "btn-Aceptar")]
|
|
2283
2278
|
})]
|
|
2284
2279
|
});
|
|
2285
2280
|
};
|