contentoh-components-library 21.4.72 → 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 +196 -190
- package/dist/components/pages/ProviderProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +53 -52
- package/dist/components/pages/RetailerProductEdition/index.js +300 -318
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/utils.js +2 -61
- package/dist/global-files/data.js +29 -22
- 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 -134
- package/src/components/pages/ProviderProductEdition/styles.js +1 -5
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +52 -52
- package/src/components/pages/RetailerProductEdition/index.js +137 -120
- package/src/components/pages/RetailerProductEdition/styles.js +0 -4
- package/src/components/pages/RetailerProductEdition/utils.js +0 -37
- package/src/global-files/data.js +46 -14
- 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
|
-
|
|
318
|
-
|
|
319
|
-
var _useState23 = (0, _react.useState)(),
|
|
320
|
-
_useState24 = (0, _slicedToArray2.default)(_useState23, 2),
|
|
321
|
-
dataImages = _useState24[0],
|
|
322
|
-
setDataImages = _useState24[1];
|
|
316
|
+
dataImages = _useState22[0],
|
|
317
|
+
setDataImages = _useState22[1];
|
|
323
318
|
|
|
324
|
-
var
|
|
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: {} }]);
|
|
330
325
|
|
|
331
326
|
|
|
332
|
-
var
|
|
327
|
+
var _useState25 = (0, _react.useState)(0),
|
|
328
|
+
_useState26 = (0, _slicedToArray2.default)(_useState25, 2),
|
|
329
|
+
activePercentage = _useState26[0],
|
|
330
|
+
setActivePercentage = _useState26[1];
|
|
331
|
+
|
|
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;
|
|
@@ -573,7 +548,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
573
548
|
|
|
574
549
|
var loadData = /*#__PURE__*/function () {
|
|
575
550
|
var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
576
|
-
var _product$article4, _product$article5, _product$article6, _services$, _services$$values,
|
|
551
|
+
var _product$article4, _product$article5, _product$article6, _services$, _services$$values, _services;
|
|
577
552
|
|
|
578
553
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
579
554
|
while (1) {
|
|
@@ -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,39 +573,26 @@ 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
|
-
|
|
602
|
-
|
|
603
|
-
id_category: product.article.id_category,
|
|
604
|
-
version: product.version,
|
|
605
|
-
id_retailer_array: ((_product$retailersAva = product.retailersAvailable) !== null && _product$retailersAva !== void 0 ? _product$retailersAva : product.retailers).map(function (_ref6) {
|
|
606
|
-
var id = _ref6.id;
|
|
607
|
-
return id;
|
|
608
|
-
})
|
|
609
|
-
}];
|
|
610
|
-
headers = {
|
|
611
|
-
Authorization: token
|
|
612
|
-
};
|
|
613
|
-
(0, _data2.getPercentage)({
|
|
614
|
-
data: data,
|
|
615
|
-
headers: headers
|
|
576
|
+
(0, _data.getPercentage)({
|
|
577
|
+
data: [product]
|
|
616
578
|
}).then(function (res) {
|
|
617
|
-
setPercentages(res[0]);
|
|
579
|
+
return setPercentages(res[0]);
|
|
618
580
|
});
|
|
619
581
|
setLoading(false);
|
|
620
|
-
_context3.next =
|
|
582
|
+
_context3.next = 16;
|
|
621
583
|
break;
|
|
622
584
|
|
|
623
|
-
case
|
|
624
|
-
_context3.prev =
|
|
585
|
+
case 13:
|
|
586
|
+
_context3.prev = 13;
|
|
625
587
|
_context3.t0 = _context3["catch"](0);
|
|
626
588
|
console.log(_context3.t0);
|
|
627
589
|
|
|
628
|
-
case
|
|
590
|
+
case 16:
|
|
629
591
|
case "end":
|
|
630
592
|
return _context3.stop();
|
|
631
593
|
}
|
|
632
594
|
}
|
|
633
|
-
}, _callee3, null, [[0,
|
|
595
|
+
}, _callee3, null, [[0, 13]]);
|
|
634
596
|
}));
|
|
635
597
|
|
|
636
598
|
return function loadData() {
|
|
@@ -639,7 +601,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
639
601
|
}();
|
|
640
602
|
|
|
641
603
|
var getServices = /*#__PURE__*/function () {
|
|
642
|
-
var
|
|
604
|
+
var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
|
643
605
|
var _product$article7, _product$article8, _servicesResponse$dat;
|
|
644
606
|
|
|
645
607
|
var servicesResponse, parsedResponse, retailers, retailerResponse, active;
|
|
@@ -672,7 +634,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
672
634
|
}));
|
|
673
635
|
|
|
674
636
|
return function getServices() {
|
|
675
|
-
return
|
|
637
|
+
return _ref6.apply(this, arguments);
|
|
676
638
|
};
|
|
677
639
|
}();
|
|
678
640
|
|
|
@@ -686,7 +648,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
686
648
|
};
|
|
687
649
|
|
|
688
650
|
var getComments = /*#__PURE__*/function () {
|
|
689
|
-
var
|
|
651
|
+
var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
690
652
|
var _product$article9, _product$article10, _product$article11;
|
|
691
653
|
|
|
692
654
|
var tab,
|
|
@@ -721,7 +683,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
721
683
|
}));
|
|
722
684
|
|
|
723
685
|
return function getComments() {
|
|
724
|
-
return
|
|
686
|
+
return _ref7.apply(this, arguments);
|
|
725
687
|
};
|
|
726
688
|
}();
|
|
727
689
|
|
|
@@ -736,7 +698,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
736
698
|
getComments();
|
|
737
699
|
_context6.t0 = setUserGroups;
|
|
738
700
|
_context6.next = 6;
|
|
739
|
-
return (0,
|
|
701
|
+
return (0, _data.fetchUsers)(token);
|
|
740
702
|
|
|
741
703
|
case 6:
|
|
742
704
|
_context6.t1 = _context6.sent;
|
|
@@ -892,7 +854,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
892
854
|
};
|
|
893
855
|
|
|
894
856
|
var saveDescriptions = /*#__PURE__*/function () {
|
|
895
|
-
var
|
|
857
|
+
var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
|
896
858
|
var dataClean, _product$article12, productTemp, articleId, dataObject, res, _JSON$parse2, newStatus, newArticleStatus;
|
|
897
859
|
|
|
898
860
|
return _regenerator.default.wrap(function _callee7$(_context7) {
|
|
@@ -960,12 +922,12 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
960
922
|
}));
|
|
961
923
|
|
|
962
924
|
return function saveDescriptions() {
|
|
963
|
-
return
|
|
925
|
+
return _ref9.apply(this, arguments);
|
|
964
926
|
};
|
|
965
927
|
}();
|
|
966
928
|
|
|
967
929
|
var saveDatasheets = /*#__PURE__*/function () {
|
|
968
|
-
var
|
|
930
|
+
var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
|
|
969
931
|
var dataClean, _product$article13, productTemp, articleId, dataObject, res, _JSON$parse3, newStatus, newArticleStatus;
|
|
970
932
|
|
|
971
933
|
return _regenerator.default.wrap(function _callee8$(_context8) {
|
|
@@ -1033,7 +995,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1033
995
|
}));
|
|
1034
996
|
|
|
1035
997
|
return function saveDatasheets() {
|
|
1036
|
-
return
|
|
998
|
+
return _ref10.apply(this, arguments);
|
|
1037
999
|
};
|
|
1038
1000
|
}();
|
|
1039
1001
|
|
|
@@ -1053,7 +1015,6 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1053
1015
|
};
|
|
1054
1016
|
});
|
|
1055
1017
|
setSocketType(imageInputs);
|
|
1056
|
-
console.log(images);
|
|
1057
1018
|
}, [images]);
|
|
1058
1019
|
var updateImages = (0, _react.useCallback)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
|
|
1059
1020
|
var _images$values3, _images$attrForImgs, _product$article14, _data$articleData, _data$articleData2, _data$updateImages;
|
|
@@ -1321,8 +1282,8 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1321
1282
|
break;
|
|
1322
1283
|
}
|
|
1323
1284
|
|
|
1324
|
-
var services = servicesData.filter(function (
|
|
1325
|
-
var service =
|
|
1285
|
+
var services = servicesData.filter(function (_ref13) {
|
|
1286
|
+
var service = _ref13.service;
|
|
1326
1287
|
return concepts.includes(service);
|
|
1327
1288
|
});
|
|
1328
1289
|
var adminFacilitatorCanEvaluate = services.every(function (srv) {
|
|
@@ -1432,8 +1393,8 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1432
1393
|
|
|
1433
1394
|
|
|
1434
1395
|
var sendToFacilitator = /*#__PURE__*/function () {
|
|
1435
|
-
var
|
|
1436
|
-
var concept, productTemp, evalStatus, articleId, orderId, data, res, _message, specialistDone, _JSON$parse5, newStatus, newOrderStatus, newArticleStatus
|
|
1396
|
+
var _ref14 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(result) {
|
|
1397
|
+
var concept, productTemp, evalStatus, articleId, orderId, data, res, _message, specialistDone, _JSON$parse5, newStatus, newOrderStatus, newArticleStatus;
|
|
1437
1398
|
|
|
1438
1399
|
return _regenerator.default.wrap(function _callee11$(_context11) {
|
|
1439
1400
|
while (1) {
|
|
@@ -1496,63 +1457,43 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1496
1457
|
|
|
1497
1458
|
case 21:
|
|
1498
1459
|
if (!(res.data.statusCode === 200)) {
|
|
1499
|
-
_context11.next =
|
|
1460
|
+
_context11.next = 30;
|
|
1500
1461
|
break;
|
|
1501
1462
|
}
|
|
1502
1463
|
|
|
1503
1464
|
_JSON$parse5 = JSON.parse(res.data.body), newStatus = _JSON$parse5.newStatus, newOrderStatus = _JSON$parse5.newOrderStatus, newArticleStatus = _JSON$parse5.newArticleStatus;
|
|
1504
|
-
messageToChat = (0, _utils.createMessage)(product.retailers, activeRetailer.id, evalStatus, newStatus, activeTab);
|
|
1505
|
-
_data = {
|
|
1506
|
-
paramsBody: {
|
|
1507
|
-
id: product.article.id_article,
|
|
1508
|
-
version: version,
|
|
1509
|
-
items: [{
|
|
1510
|
-
type: "status",
|
|
1511
|
-
value: messageToChat
|
|
1512
|
-
}],
|
|
1513
|
-
retailerId: activeRetailer.id,
|
|
1514
|
-
status: product.status
|
|
1515
|
-
},
|
|
1516
|
-
paramsHeader: {
|
|
1517
|
-
Authorization: token
|
|
1518
|
-
}
|
|
1519
|
-
};
|
|
1520
|
-
_context11.next = 27;
|
|
1521
|
-
return (0, _utils.sendMessage)(_data);
|
|
1522
|
-
|
|
1523
|
-
case 27:
|
|
1524
1465
|
if (newOrderStatus) productTemp.status = newArticleStatus[articleId];
|
|
1525
1466
|
productTemp["".concat(concept, "_status")] = newStatus;
|
|
1526
|
-
_context11.next =
|
|
1467
|
+
_context11.next = 27;
|
|
1527
1468
|
return loadData();
|
|
1528
1469
|
|
|
1529
|
-
case
|
|
1470
|
+
case 27:
|
|
1530
1471
|
if (_message) setMessage(_message);
|
|
1531
1472
|
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
1532
1473
|
setProduct(productTemp);
|
|
1533
1474
|
|
|
1534
|
-
case
|
|
1535
|
-
_context11.next =
|
|
1475
|
+
case 30:
|
|
1476
|
+
_context11.next = 35;
|
|
1536
1477
|
break;
|
|
1537
1478
|
|
|
1538
|
-
case
|
|
1539
|
-
_context11.prev =
|
|
1479
|
+
case 32:
|
|
1480
|
+
_context11.prev = 32;
|
|
1540
1481
|
_context11.t0 = _context11["catch"](1);
|
|
1541
1482
|
console.log(_context11.t0);
|
|
1542
1483
|
|
|
1543
|
-
case
|
|
1484
|
+
case 35:
|
|
1544
1485
|
setLoading(false);
|
|
1545
1486
|
|
|
1546
|
-
case
|
|
1487
|
+
case 36:
|
|
1547
1488
|
case "end":
|
|
1548
1489
|
return _context11.stop();
|
|
1549
1490
|
}
|
|
1550
1491
|
}
|
|
1551
|
-
}, _callee11, null, [[1,
|
|
1492
|
+
}, _callee11, null, [[1, 32]]);
|
|
1552
1493
|
}));
|
|
1553
1494
|
|
|
1554
1495
|
return function sendToFacilitator(_x) {
|
|
1555
|
-
return
|
|
1496
|
+
return _ref14.apply(this, arguments);
|
|
1556
1497
|
};
|
|
1557
1498
|
}();
|
|
1558
1499
|
|
|
@@ -1583,33 +1524,55 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1583
1524
|
};
|
|
1584
1525
|
|
|
1585
1526
|
var createComment = /*#__PURE__*/function () {
|
|
1586
|
-
var
|
|
1587
|
-
var
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
_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;
|
|
1591
1531
|
return _regenerator.default.wrap(function _callee12$(_context12) {
|
|
1592
1532
|
while (1) {
|
|
1593
1533
|
switch (_context12.prev = _context12.next) {
|
|
1594
1534
|
case 0:
|
|
1595
|
-
|
|
1596
|
-
|
|
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:
|
|
1597
1553
|
data = {
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
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: {
|
|
1606
1563
|
Authorization: token
|
|
1607
1564
|
}
|
|
1608
|
-
};
|
|
1565
|
+
});
|
|
1566
|
+
|
|
1567
|
+
case 13:
|
|
1568
|
+
_context12.next = 15;
|
|
1569
|
+
return getComments(tab);
|
|
1570
|
+
|
|
1571
|
+
case 15:
|
|
1609
1572
|
setMessage("");
|
|
1610
|
-
|
|
1573
|
+
setComponentsArray([]);
|
|
1611
1574
|
|
|
1612
|
-
case
|
|
1575
|
+
case 17:
|
|
1613
1576
|
case "end":
|
|
1614
1577
|
return _context12.stop();
|
|
1615
1578
|
}
|
|
@@ -1617,8 +1580,8 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1617
1580
|
}, _callee12);
|
|
1618
1581
|
}));
|
|
1619
1582
|
|
|
1620
|
-
return function createComment() {
|
|
1621
|
-
return
|
|
1583
|
+
return function createComment(_x2, _x3, _x4) {
|
|
1584
|
+
return _ref15.apply(this, arguments);
|
|
1622
1585
|
};
|
|
1623
1586
|
}();
|
|
1624
1587
|
|
|
@@ -1696,7 +1659,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1696
1659
|
}, [activeTab]);
|
|
1697
1660
|
|
|
1698
1661
|
var commentRevised = /*#__PURE__*/function () {
|
|
1699
|
-
var
|
|
1662
|
+
var _ref16 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
|
|
1700
1663
|
var data;
|
|
1701
1664
|
return _regenerator.default.wrap(function _callee13$(_context13) {
|
|
1702
1665
|
while (1) {
|
|
@@ -1726,13 +1689,13 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1726
1689
|
}));
|
|
1727
1690
|
|
|
1728
1691
|
return function commentRevised() {
|
|
1729
|
-
return
|
|
1692
|
+
return _ref16.apply(this, arguments);
|
|
1730
1693
|
};
|
|
1731
1694
|
}();
|
|
1732
1695
|
|
|
1733
1696
|
var setAssignation = /*#__PURE__*/function () {
|
|
1734
|
-
var
|
|
1735
|
-
var _product$
|
|
1697
|
+
var _ref17 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(assignationType, assignationId) {
|
|
1698
|
+
var _product$article17;
|
|
1736
1699
|
|
|
1737
1700
|
var concept, productTemp, data;
|
|
1738
1701
|
return _regenerator.default.wrap(function _callee14$(_context14) {
|
|
@@ -1762,7 +1725,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1762
1725
|
data = {
|
|
1763
1726
|
articleList: [{
|
|
1764
1727
|
orderId: product.orderId,
|
|
1765
|
-
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
|
|
1766
1729
|
}],
|
|
1767
1730
|
concept: concept,
|
|
1768
1731
|
userId: assignationId
|
|
@@ -1789,8 +1752,8 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1789
1752
|
}, _callee14);
|
|
1790
1753
|
}));
|
|
1791
1754
|
|
|
1792
|
-
return function setAssignation(
|
|
1793
|
-
return
|
|
1755
|
+
return function setAssignation(_x5, _x6) {
|
|
1756
|
+
return _ref17.apply(this, arguments);
|
|
1794
1757
|
};
|
|
1795
1758
|
}();
|
|
1796
1759
|
|
|
@@ -1891,7 +1854,6 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1891
1854
|
};
|
|
1892
1855
|
|
|
1893
1856
|
(0, _react.useEffect)(function () {
|
|
1894
|
-
console.log(servicesData, "servicesData");
|
|
1895
1857
|
var status = getRetailerStatus(servicesData, activeTab);
|
|
1896
1858
|
setRetailerStatus(status);
|
|
1897
1859
|
}, [activeTab, servicesData, activeRetailer]);
|
|
@@ -1960,8 +1922,8 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1960
1922
|
// };
|
|
1961
1923
|
|
|
1962
1924
|
var validateAll = /*#__PURE__*/function () {
|
|
1963
|
-
var
|
|
1964
|
-
var evaluationArray, conceptArray,
|
|
1925
|
+
var _ref18 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15(result) {
|
|
1926
|
+
var evaluationArray, conceptArray, productTemp;
|
|
1965
1927
|
return _regenerator.default.wrap(function _callee15$(_context15) {
|
|
1966
1928
|
while (1) {
|
|
1967
1929
|
switch (_context15.prev = _context15.next) {
|
|
@@ -1987,7 +1949,6 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1987
1949
|
return _context15.abrupt("break", 13);
|
|
1988
1950
|
|
|
1989
1951
|
case 13:
|
|
1990
|
-
messages = [];
|
|
1991
1952
|
servicesData === null || servicesData === void 0 ? void 0 : servicesData.forEach(function (ret) {
|
|
1992
1953
|
if (conceptArray.includes(ret.service)) {
|
|
1993
1954
|
var _product$id_order;
|
|
@@ -2007,44 +1968,39 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
2007
1968
|
}));
|
|
2008
1969
|
}
|
|
2009
1970
|
});
|
|
2010
|
-
_context15.next =
|
|
1971
|
+
_context15.next = 16;
|
|
2011
1972
|
return Promise.all(evaluationArray);
|
|
2012
1973
|
|
|
2013
|
-
case
|
|
1974
|
+
case 16:
|
|
2014
1975
|
productTemp = product;
|
|
2015
1976
|
productTemp.status = "".concat(result, "A");
|
|
2016
|
-
productTemp.datasheet_status = productTemp.datasheet_status === "
|
|
2017
|
-
productTemp.description_status = productTemp.description_status === "
|
|
2018
|
-
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");
|
|
2019
1980
|
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
2020
1981
|
setProduct(productTemp);
|
|
2021
|
-
_context15.next =
|
|
2022
|
-
return Promise.all(messages);
|
|
2023
|
-
|
|
2024
|
-
case 26:
|
|
2025
|
-
messagesResponse = _context15.sent;
|
|
2026
|
-
_context15.next = 29;
|
|
1982
|
+
_context15.next = 25;
|
|
2027
1983
|
return loadData();
|
|
2028
1984
|
|
|
2029
|
-
case
|
|
2030
|
-
_context15.next =
|
|
1985
|
+
case 25:
|
|
1986
|
+
_context15.next = 30;
|
|
2031
1987
|
break;
|
|
2032
1988
|
|
|
2033
|
-
case
|
|
2034
|
-
_context15.prev =
|
|
1989
|
+
case 27:
|
|
1990
|
+
_context15.prev = 27;
|
|
2035
1991
|
_context15.t1 = _context15["catch"](0);
|
|
2036
1992
|
console.log(_context15.t1);
|
|
2037
1993
|
|
|
2038
|
-
case
|
|
1994
|
+
case 30:
|
|
2039
1995
|
case "end":
|
|
2040
1996
|
return _context15.stop();
|
|
2041
1997
|
}
|
|
2042
1998
|
}
|
|
2043
|
-
}, _callee15, null, [[0,
|
|
1999
|
+
}, _callee15, null, [[0, 27]]);
|
|
2044
2000
|
}));
|
|
2045
2001
|
|
|
2046
|
-
return function validateAll(
|
|
2047
|
-
return
|
|
2002
|
+
return function validateAll(_x7) {
|
|
2003
|
+
return _ref18.apply(this, arguments);
|
|
2048
2004
|
};
|
|
2049
2005
|
}();
|
|
2050
2006
|
|
|
@@ -2056,10 +2012,8 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
2056
2012
|
setCompare: setCompare,
|
|
2057
2013
|
isAuditor: [1, 6].includes(user.id_role),
|
|
2058
2014
|
withChat: location === null || location === void 0 ? void 0 : (_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.withChat,
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
token: token,
|
|
2062
|
-
activeRetailer: activeRetailer
|
|
2015
|
+
productSelected: productSelected,
|
|
2016
|
+
token: token
|
|
2063
2017
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2064
2018
|
className: "data-container",
|
|
2065
2019
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
@@ -2101,7 +2055,27 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
2101
2055
|
sendToFacilitator("A");
|
|
2102
2056
|
},
|
|
2103
2057
|
reject: function reject() {
|
|
2104
|
-
|
|
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
|
+
})]);
|
|
2105
2079
|
},
|
|
2106
2080
|
showApproveRejectAll: approveRejectAllButtons() && (auditorAssigned() || userAssigned()),
|
|
2107
2081
|
showValidationButtons: approveRejectButtons() && (auditorAssigned() || userAssigned()),
|
|
@@ -2109,8 +2083,27 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
2109
2083
|
return validateAll("A");
|
|
2110
2084
|
},
|
|
2111
2085
|
rejectAll: function rejectAll() {
|
|
2112
|
-
|
|
2113
|
-
|
|
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
|
+
})]);
|
|
2114
2107
|
}
|
|
2115
2108
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FullTabsMenu.FullTabsMenu, {
|
|
2116
2109
|
tabsSections: tabsSections,
|
|
@@ -2125,12 +2118,6 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
2125
2118
|
isRetailer: isRetailer,
|
|
2126
2119
|
showSaveButton: auditorAssigned() || userAssigned(),
|
|
2127
2120
|
version: version,
|
|
2128
|
-
desc: desc,
|
|
2129
|
-
setDesc: setDesc,
|
|
2130
|
-
fich: fich,
|
|
2131
|
-
setFich: setFich,
|
|
2132
|
-
imag: imag,
|
|
2133
|
-
setImag: setImag,
|
|
2134
2121
|
updatedDescriptions: updatedDescriptions,
|
|
2135
2122
|
setUpdatedDescriptions: setUpdatedDescriptions,
|
|
2136
2123
|
updatedDatasheets: updatedDatasheets,
|
|
@@ -2188,7 +2175,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
2188
2175
|
auditInputGroup: auditDescriptions[0],
|
|
2189
2176
|
updatedDescriptions: updatedDescriptions,
|
|
2190
2177
|
setUpdatedDescriptions: setUpdatedDescriptions,
|
|
2191
|
-
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,
|
|
2192
2179
|
version: version,
|
|
2193
2180
|
dinamicHeight: true,
|
|
2194
2181
|
compare: compare
|
|
@@ -2209,15 +2196,57 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
2209
2196
|
headerType: "input-name-header"
|
|
2210
2197
|
}))]
|
|
2211
2198
|
})
|
|
2212
|
-
}), (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", {
|
|
2213
2200
|
className: "commentary-box",
|
|
2214
|
-
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, {
|
|
2215
2244
|
buttonType: evaluationFinished(user.id_role, activeTab, statusArray) && requiredNull[activeTab] === 0 ? "general-green-button" : "general-button-disabled",
|
|
2216
2245
|
label: "Enviar evaluación",
|
|
2217
2246
|
onClick: function onClick() {
|
|
2218
2247
|
return sendToFacilitator();
|
|
2219
2248
|
}
|
|
2220
|
-
})
|
|
2249
|
+
})]
|
|
2221
2250
|
})]
|
|
2222
2251
|
})]
|
|
2223
2252
|
}), showModal && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProductImageModal.ProductImageModal, {
|
|
@@ -2246,53 +2275,6 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
2246
2275
|
currentVersion: version,
|
|
2247
2276
|
setShowVersionSelector: setShowVersionSelector,
|
|
2248
2277
|
jwt: token
|
|
2249
|
-
}), showRejectModal && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.Modal, {
|
|
2250
|
-
title: "Agregar mensaje de rechazo para ".concat(activeTab === null || activeTab === void 0 ? void 0 : activeTab.toLowerCase()),
|
|
2251
|
-
show: showRejectModal,
|
|
2252
|
-
customComponent: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TagAndInput, {
|
|
2253
|
-
inputType: "textarea",
|
|
2254
|
-
inputId: "modal-message-box",
|
|
2255
|
-
index: 0,
|
|
2256
|
-
color: "white"
|
|
2257
|
-
}),
|
|
2258
|
-
buttons: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
|
|
2259
|
-
type: "white",
|
|
2260
|
-
label: "Cancelar",
|
|
2261
|
-
size: 12,
|
|
2262
|
-
onClick: function onClick() {
|
|
2263
|
-
setShowRejectModal(false);
|
|
2264
|
-
}
|
|
2265
|
-
}, "btn-Cancelar"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
|
|
2266
|
-
type: "pink",
|
|
2267
|
-
label: "Aceptar",
|
|
2268
|
-
size: 12,
|
|
2269
|
-
onClick: /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
|
|
2270
|
-
var body, messages;
|
|
2271
|
-
return _regenerator.default.wrap(function _callee16$(_context16) {
|
|
2272
|
-
while (1) {
|
|
2273
|
-
switch (_context16.prev = _context16.next) {
|
|
2274
|
-
case 0:
|
|
2275
|
-
body = document.querySelector("#modal-message-box .ql-container .ql-editor > p").innerHTML;
|
|
2276
|
-
messages = [{
|
|
2277
|
-
type: "message",
|
|
2278
|
-
value: body === null || body === void 0 ? void 0 : body.replace(/<.*?\/?>/gm, "")
|
|
2279
|
-
}];
|
|
2280
|
-
_context16.next = 4;
|
|
2281
|
-
return createComment(messages, activeRetailer.id);
|
|
2282
|
-
|
|
2283
|
-
case 4:
|
|
2284
|
-
valRejAll ? validateAll("R") : sendToFacilitator("R");
|
|
2285
|
-
setMessage("Rechazado");
|
|
2286
|
-
setShowRejectModal(false);
|
|
2287
|
-
|
|
2288
|
-
case 7:
|
|
2289
|
-
case "end":
|
|
2290
|
-
return _context16.stop();
|
|
2291
|
-
}
|
|
2292
|
-
}
|
|
2293
|
-
}, _callee16);
|
|
2294
|
-
}))
|
|
2295
|
-
}, "btn-Aceptar")]
|
|
2296
2278
|
})]
|
|
2297
2279
|
});
|
|
2298
2280
|
};
|