contentoh-components-library 21.4.133 → 21.4.134
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/assets/images/Icons/save-white-gray.svg +1 -1
- package/dist/assets/images/Icons/save-white.svg +1 -1
- package/dist/components/atoms/Avatar/index.js +2 -3
- package/dist/components/atoms/ButtonV2/ButtonV2.stories.js +1 -1
- package/dist/components/atoms/ButtonV2/index.js +1 -1
- package/dist/components/atoms/ButtonV2/styles.js +1 -1
- package/dist/components/atoms/CheckBox/CheckBox.stories.js +1 -8
- package/dist/components/atoms/CheckBox/index.js +0 -8
- package/dist/components/atoms/CheckBox/styles.js +1 -8
- package/dist/components/atoms/GeneralButton/styles.js +2 -6
- package/dist/components/atoms/GeneralInput/index.js +2 -5
- package/dist/components/atoms/GeneralInput/style.js +29 -0
- package/dist/components/atoms/GeneralInput/styles.js +1 -1
- package/dist/components/atoms/InputFormatter/index.js +3 -4
- package/dist/components/atoms/InputFormatter/styles.js +3 -3
- package/dist/components/atoms/SliderToolTip/styles.js +1 -1
- package/dist/components/atoms/TabSection/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/GalleryElement/index.js +2 -82
- package/dist/components/molecules/GalleryHeader/index.js +0 -3
- package/dist/components/molecules/HeaderTop/index.js +11 -68
- package/dist/components/molecules/ProductNameHeader/index.js +3 -17
- package/dist/components/molecules/SignInLogin/index.js +28 -36
- package/dist/components/molecules/StatusAsignationInfo/FinancedCompanies.js +1 -1
- package/dist/components/molecules/StripeCardSelector/CardSelector.stories.js +2 -1
- package/dist/components/molecules/TagAndInput/index.js +0 -4
- 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 +4 -14
- package/dist/components/organisms/InputGroup/index.js +73 -192
- package/dist/components/organisms/InputGroup/styles.js +1 -1
- package/dist/components/organisms/Modal/Modal.stories.js +1 -2
- package/dist/components/organisms/Modal/index.js +2 -7
- package/dist/components/organisms/Modal/styles.js +1 -1
- package/dist/components/organisms/Table/index.js +2 -16
- package/dist/components/organisms/Table/styles.js +11 -17
- package/dist/components/pages/Dashboard/Dashboard.stories.js +36 -33
- package/dist/components/pages/Dashboard/index.js +9 -37
- package/dist/components/pages/MultipleEdition/MultipleEdition.stories.js +2 -2
- package/dist/components/pages/MultipleEdition/index.js +3 -5
- package/dist/components/pages/MultipleEdition/styles.js +2 -2
- package/dist/components/pages/MultipleEdition/utils.js +5 -44
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +60 -60
- package/dist/components/pages/ProviderProductEdition/index.js +217 -249
- package/dist/components/pages/ProviderProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +0 -4
- package/dist/components/pages/RetailerProductEdition/index.js +406 -354
- 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 -214
- package/package.json +1 -4
- package/src/components/atoms/Avatar/index.js +2 -8
- package/src/components/atoms/ButtonV2/ButtonV2.stories.js +0 -1
- package/src/components/atoms/ButtonV2/index.js +0 -1
- package/src/components/atoms/ButtonV2/styles.js +0 -16
- package/src/components/atoms/CheckBox/CheckBox.stories.js +0 -5
- package/src/components/atoms/CheckBox/index.js +1 -5
- package/src/components/atoms/CheckBox/styles.js +3 -9
- package/src/components/atoms/GeneralButton/styles.js +0 -46
- package/src/components/atoms/GeneralInput/index.js +0 -3
- package/src/components/atoms/GeneralInput/styles.js +1 -19
- package/src/components/atoms/InputFormatter/index.js +1 -2
- 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 +3 -0
- 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/GalleryElement/index.js +1 -76
- package/src/components/molecules/GalleryHeader/index.js +0 -1
- package/src/components/molecules/HeaderTop/index.js +6 -52
- package/src/components/molecules/ProductNameHeader/index.js +1 -19
- package/src/components/molecules/SignInLogin/index.js +11 -11
- package/src/components/molecules/StatusAsignationInfo/FinancedCompanies.js +63 -501
- package/src/components/molecules/StatusAsignationInfo/index.js +1 -1
- package/src/components/molecules/StripeCardSelector/CardSelector.stories.js +2 -1
- package/src/components/molecules/TagAndInput/index.js +6 -8
- 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 -13
- package/src/components/organisms/InputGroup/index.js +144 -292
- package/src/components/organisms/InputGroup/styles.js +0 -31
- package/src/components/organisms/Modal/Modal.stories.js +1 -2
- package/src/components/organisms/Modal/index.js +2 -9
- package/src/components/organisms/Modal/styles.js +1 -8
- package/src/components/organisms/OrderDetail/utils/Table/utils.js +16 -6
- 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 +60 -56
- package/src/components/pages/ProviderProductEdition/index.js +136 -148
- package/src/components/pages/ProviderProductEdition/styles.js +1 -5
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +0 -4
- package/src/components/pages/RetailerProductEdition/index.js +277 -153
- package/src/components/pages/RetailerProductEdition/styles.js +0 -4
- package/src/components/pages/RetailerProductEdition/utils.js +0 -37
- package/src/global-files/data.js +10 -6
- package/src/global-files/variables.js +0 -6
- package/src/index.js +0 -12
- package/src/assets/images/Icons/addv2.svg +0 -8
- package/src/assets/images/Icons/beenhere.svg +0 -9
- package/src/assets/images/Icons/checkv2.svg +0 -8
- package/src/assets/images/Icons/close-magenta.svg +0 -9
- package/src/assets/images/Icons/close.svg +0 -8
- package/src/assets/images/Icons/closeCircle.svg +0 -8
- package/src/assets/images/Icons/delete-forever-red.svg +0 -9
- package/src/assets/images/Icons/delete-forever-white.svg +0 -10
- package/src/assets/images/Icons/edit.svg +0 -8
- package/src/assets/images/Icons/fullscreen.svg +0 -3
- package/src/assets/images/Icons/infoNR.svg +0 -8
- package/src/assets/images/Icons/options.svg +0 -3
- package/src/assets/images/Icons/save-white-gray.svg +0 -9
- package/src/assets/images/Icons/save-white.svg +0 -9
- package/src/assets/images/Icons/save.svg +0 -8
- package/src/assets/images/Icons/search.svg +0 -3
- package/src/assets/images/Icons/settings.svg +0 -8
- package/src/assets/images/Icons/trash.svg +0 -8
- package/src/assets/images/Icons/undo.svg +0 -8
- package/src/assets/images/Icons/upload-file-white.svg +0 -4
- package/src/assets/images/Icons/upload-file.svg +0 -10
- package/src/assets/images/Icons/upload_file.svg +0 -10
- package/src/assets/images/Icons/warningv2.svg +0 -3
- package/src/assets/images/checkBox/checkrosa.svg +0 -3
- package/src/assets/images/checkBox/checkverde.svg +0 -3
- 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/assets/images/generalButton/saveIconpink.svg +0 -3
- 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/CustomChip/CustomChip.stories.js +0 -16
- package/src/components/atoms/CustomChip/index.js +0 -34
- package/src/components/atoms/CustomChip/styles.js +0 -6
- 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/Multiselect/Multiselect.stories.js +0 -364
- package/src/components/atoms/Multiselect/index.js +0 -351
- package/src/components/atoms/Multiselect/styles.js +0 -33
- 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/ObservationFlag/ObservationFlag.stories.js +0 -20
- package/src/components/atoms/ObservationFlag/index.js +0 -167
- package/src/components/atoms/ObservationFlag/styles.js +0 -104
- 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/AddGroup/AddGroup.stories.js +0 -15
- package/src/components/molecules/AddGroup/index.js +0 -84
- package/src/components/molecules/AddGroup/styles.js +0 -141
- 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/EditionTabs/EditionTabs.stories.js +0 -12
- package/src/components/molecules/EditionTabs/index.js +0 -33
- package/src/components/molecules/EditionTabs/styles.js +0 -24
- 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 -128
- package/src/components/molecules/GridItem/styles.js +0 -129
- package/src/components/molecules/GroupSelect/GroupSelect.stories.js +0 -35
- package/src/components/molecules/GroupSelect/SelectItem.js +0 -105
- package/src/components/molecules/GroupSelect/index.js +0 -190
- package/src/components/molecules/GroupSelect/styles.js +0 -124
- 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 -107
- package/src/components/molecules/Phase/index.js +0 -391
- package/src/components/molecules/Phase/styles.js +0 -97
- 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 -13
- package/src/components/organisms/DragAndDropPhases/index.js +0 -336
- package/src/components/organisms/DragAndDropPhases/styles.js +0 -107
- 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/EditGroup/EditGroup.stories.js +0 -20
- package/src/components/organisms/EditGroup/index.js +0 -321
- package/src/components/organisms/EditGroup/styles.js +0 -207
- 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 -6428
- 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/ImageUploader/ImageUploader.stories.js +0 -15
- package/src/components/organisms/ImageUploader/index.js +0 -62
- package/src/components/organisms/ImageUploader/styles.js +0 -29
- package/src/components/organisms/ImageVisor/ImageVisor.stories.js +0 -15
- package/src/components/organisms/ImageVisor/index.js +0 -143
- package/src/components/organisms/ImageVisor/styles.js +0 -106
- 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/Table/Table.stories.js +0 -609
- package/src/components/organisms/Table/index.js +0 -84
- package/src/components/organisms/Table/styles.js +0 -114
- 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/MultipleEdition/MultipleEdition.stories.js +0 -17
- package/src/components/pages/MultipleEdition/components/ImageUploader.js +0 -62
- package/src/components/pages/MultipleEdition/components/ImageUploaderStyles.js +0 -29
- package/src/components/pages/MultipleEdition/components/ImageVisor.js +0 -143
- package/src/components/pages/MultipleEdition/components/styles.js +0 -106
- package/src/components/pages/MultipleEdition/index.js +0 -248
- package/src/components/pages/MultipleEdition/saveData.js +0 -91
- package/src/components/pages/MultipleEdition/styles.js +0 -195
- package/src/components/pages/MultipleEdition/utils.js +0 -1035
- 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: {} }]);
|
|
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
|
-
|
|
374
|
+
comment = _useState44[0],
|
|
375
|
+
setComment = _useState44[1];
|
|
376
376
|
|
|
377
|
-
var _useState45 = (0, _react.useState)(
|
|
378
|
-
_useState46 = (0, _slicedToArray2.default)(_useState45, 2),
|
|
379
|
-
comment = _useState46[0],
|
|
380
|
-
setComment = _useState46[1];
|
|
381
|
-
|
|
382
|
-
var _useState47 = (0, _react.useState)({
|
|
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,88 +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)(),
|
|
486
|
-
_useState84 = (0, _slicedToArray2.default)(_useState83, 2),
|
|
487
|
-
observation = _useState84[0],
|
|
488
|
-
setObservation = _useState84[1];
|
|
489
|
-
|
|
490
|
-
var _useState85 = (0, _react.useState)(false),
|
|
491
|
-
_useState86 = (0, _slicedToArray2.default)(_useState85, 2),
|
|
492
|
-
valRejAll = _useState86[0],
|
|
493
|
-
setValRejAll = _useState86[1];
|
|
494
|
-
|
|
495
|
-
var _useState87 = (0, _react.useState)([]),
|
|
496
|
-
_useState88 = (0, _slicedToArray2.default)(_useState87, 2),
|
|
497
|
-
desc = _useState88[0],
|
|
498
|
-
setDesc = _useState88[1];
|
|
499
|
-
|
|
500
|
-
var _useState89 = (0, _react.useState)([]),
|
|
501
|
-
_useState90 = (0, _slicedToArray2.default)(_useState89, 2),
|
|
502
|
-
fich = _useState90[0],
|
|
503
|
-
setFich = _useState90[1];
|
|
504
|
-
|
|
505
|
-
var _useState91 = (0, _react.useState)([]),
|
|
506
|
-
_useState92 = (0, _slicedToArray2.default)(_useState91, 2),
|
|
507
|
-
imag = _useState92[0],
|
|
508
|
-
setImag = _useState92[1];
|
|
509
|
-
|
|
510
|
-
var _useState93 = (0, _react.useState)(false),
|
|
511
|
-
_useState94 = (0, _slicedToArray2.default)(_useState93, 2),
|
|
512
|
-
isObservationVisible = _useState94[0],
|
|
513
|
-
setObservationVisible = _useState94[1];
|
|
514
|
-
|
|
515
|
-
var toggleObservation = function toggleObservation() {
|
|
516
|
-
setObservationVisible(!isObservationVisible);
|
|
517
|
-
}; // const handleClickOutside = (event) => {
|
|
518
|
-
// if (
|
|
519
|
-
// isObservationVisible &&
|
|
520
|
-
// !event.target.closest(".Observation") &&
|
|
521
|
-
// !event.target.closest(".Container")
|
|
522
|
-
// ) {
|
|
523
|
-
// hideObservation();
|
|
524
|
-
// }
|
|
525
|
-
// };
|
|
526
|
-
// useEffect(() => {
|
|
527
|
-
// document.addEventListener("click", handleClickOutside);
|
|
528
|
-
// return () => {
|
|
529
|
-
// document.removeEventListener("click", handleClickOutside);
|
|
530
|
-
// };
|
|
531
|
-
// }, [isObservationVisible]);
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
var hideObservation = function hideObservation() {
|
|
535
|
-
setObservationVisible(false);
|
|
536
|
-
};
|
|
477
|
+
compare = _useState80[0],
|
|
478
|
+
setCompare = _useState80[1];
|
|
537
479
|
|
|
538
480
|
(0, _react.useEffect)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
539
481
|
var _ref3, id_article;
|
|
@@ -574,7 +516,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
574
516
|
}
|
|
575
517
|
|
|
576
518
|
_context2.next = 3;
|
|
577
|
-
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);
|
|
578
520
|
|
|
579
521
|
case 3:
|
|
580
522
|
_auditServices = _context2.sent;
|
|
@@ -614,7 +556,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
614
556
|
case 0:
|
|
615
557
|
_context3.prev = 0;
|
|
616
558
|
_context3.next = 3;
|
|
617
|
-
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);
|
|
618
560
|
|
|
619
561
|
case 3:
|
|
620
562
|
_services = _context3.sent;
|
|
@@ -643,7 +585,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
643
585
|
headers = {
|
|
644
586
|
Authorization: token
|
|
645
587
|
};
|
|
646
|
-
(0,
|
|
588
|
+
(0, _data.getPercentage)({
|
|
647
589
|
data: data,
|
|
648
590
|
headers: headers
|
|
649
591
|
}).then(function (res) {
|
|
@@ -769,7 +711,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
769
711
|
getComments();
|
|
770
712
|
_context6.t0 = setUserGroups;
|
|
771
713
|
_context6.next = 6;
|
|
772
|
-
return (0,
|
|
714
|
+
return (0, _data.fetchUsers)(token);
|
|
773
715
|
|
|
774
716
|
case 6:
|
|
775
717
|
_context6.t1 = _context6.sent;
|
|
@@ -1086,7 +1028,6 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1086
1028
|
};
|
|
1087
1029
|
});
|
|
1088
1030
|
setSocketType(imageInputs);
|
|
1089
|
-
console.log(images);
|
|
1090
1031
|
}, [images]);
|
|
1091
1032
|
var updateImages = (0, _react.useCallback)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
|
|
1092
1033
|
var _images$values3, _images$attrForImgs, _product$article14, _data$articleData, _data$articleData2, _data$updateImages;
|
|
@@ -1389,11 +1330,84 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1389
1330
|
default:
|
|
1390
1331
|
break;
|
|
1391
1332
|
}
|
|
1392
|
-
};
|
|
1333
|
+
}; // const sendToFacilitator = async (result) => {
|
|
1334
|
+
// setLoading(true);
|
|
1335
|
+
// try {
|
|
1336
|
+
// let concept = getConcept(activeTab);
|
|
1337
|
+
// const productTemp = { ...product };
|
|
1338
|
+
// const evalStatus = retailerStatus;
|
|
1339
|
+
// const articleId = product.article.id_article;
|
|
1340
|
+
// const orderId = product.orderId;
|
|
1341
|
+
// // const body = {
|
|
1342
|
+
// // orderArticleRetailers: [
|
|
1343
|
+
// // { orderId, articleId, retailersIds: [activeRetailer.id] },
|
|
1344
|
+
// // ],
|
|
1345
|
+
// // isAproved: false,
|
|
1346
|
+
// // service: concept,
|
|
1347
|
+
// // };
|
|
1348
|
+
// const body = {
|
|
1349
|
+
// articleId: product.article.id_article,
|
|
1350
|
+
// orderId: product.orderId,
|
|
1351
|
+
// concept: concept,
|
|
1352
|
+
// result: result,
|
|
1353
|
+
// evalStatus: evalStatus,
|
|
1354
|
+
// retailerId: activeRetailer.id,
|
|
1355
|
+
// };
|
|
1356
|
+
// let res;
|
|
1357
|
+
// let message;
|
|
1358
|
+
// if (result) {
|
|
1359
|
+
// body.isAproved = result === "A";
|
|
1360
|
+
// res = await axios.put(
|
|
1361
|
+
// `${process.env.REACT_APP_EVALUATION_ENDPOINT}`,
|
|
1362
|
+
// body,
|
|
1363
|
+
// {
|
|
1364
|
+
// headers: {
|
|
1365
|
+
// Authorization: token,
|
|
1366
|
+
// },
|
|
1367
|
+
// }
|
|
1368
|
+
// );
|
|
1369
|
+
// console.log(JSON.parse(res.data.body), "res");
|
|
1370
|
+
// getServices();
|
|
1371
|
+
// } else {
|
|
1372
|
+
// const specialistDone = ["RC", "RA", "CA"].includes(evalStatus);
|
|
1373
|
+
// if (specialistDone) {
|
|
1374
|
+
// message = `${activeTab} enviada a facilitador`;
|
|
1375
|
+
// getSectionIcon();
|
|
1376
|
+
// } else if (["IE", "AC", "RP", "RCA"].includes(evalStatus)) {
|
|
1377
|
+
// message = "Evaluación enviada";
|
|
1378
|
+
// getSectionIcon();
|
|
1379
|
+
// }
|
|
1380
|
+
// res = await axios.put(
|
|
1381
|
+
// `${process.env.REACT_APP_EVALUATION_ENDPOINT}`,
|
|
1382
|
+
// body,
|
|
1383
|
+
// {
|
|
1384
|
+
// headers: {
|
|
1385
|
+
// Authorization: token,
|
|
1386
|
+
// },
|
|
1387
|
+
// }
|
|
1388
|
+
// );
|
|
1389
|
+
// }
|
|
1390
|
+
// if (res.data.statusCode === 200) {
|
|
1391
|
+
// const response = JSON.parse(res.data.body)?.successfulData;
|
|
1392
|
+
// const statusObject =
|
|
1393
|
+
// response[`${orderId}-${articleId}-${activeRetailer.id}`];
|
|
1394
|
+
// productTemp.status = statusObject["generalStatus"];
|
|
1395
|
+
// productTemp[`${concept}_status`] = statusObject[`${concept}Status`];
|
|
1396
|
+
// await loadData();
|
|
1397
|
+
// if (message) setMessage(message);
|
|
1398
|
+
// sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
1399
|
+
// setProduct(productTemp);
|
|
1400
|
+
// }
|
|
1401
|
+
// } catch (error) {
|
|
1402
|
+
// console.log(error);
|
|
1403
|
+
// }
|
|
1404
|
+
// setLoading(false);
|
|
1405
|
+
// };
|
|
1406
|
+
|
|
1393
1407
|
|
|
1394
1408
|
var sendToFacilitator = /*#__PURE__*/function () {
|
|
1395
1409
|
var _ref15 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(result) {
|
|
1396
|
-
var concept, productTemp, evalStatus, articleId, orderId, data, res, _message, specialistDone, _JSON$parse5, newStatus, newOrderStatus, newArticleStatus
|
|
1410
|
+
var concept, productTemp, evalStatus, articleId, orderId, data, res, _message, specialistDone, _JSON$parse5, newStatus, newOrderStatus, newArticleStatus;
|
|
1397
1411
|
|
|
1398
1412
|
return _regenerator.default.wrap(function _callee11$(_context11) {
|
|
1399
1413
|
while (1) {
|
|
@@ -1456,59 +1470,39 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1456
1470
|
|
|
1457
1471
|
case 21:
|
|
1458
1472
|
if (!(res.data.statusCode === 200)) {
|
|
1459
|
-
_context11.next =
|
|
1473
|
+
_context11.next = 30;
|
|
1460
1474
|
break;
|
|
1461
1475
|
}
|
|
1462
1476
|
|
|
1463
1477
|
_JSON$parse5 = JSON.parse(res.data.body), newStatus = _JSON$parse5.newStatus, newOrderStatus = _JSON$parse5.newOrderStatus, newArticleStatus = _JSON$parse5.newArticleStatus;
|
|
1464
|
-
messageToChat = (0, _utils.createMessage)(product.retailers, activeRetailer.id, evalStatus, newStatus, activeTab);
|
|
1465
|
-
_data = {
|
|
1466
|
-
paramsBody: {
|
|
1467
|
-
id: product.article.id_article,
|
|
1468
|
-
version: version,
|
|
1469
|
-
items: [{
|
|
1470
|
-
type: "status",
|
|
1471
|
-
value: messageToChat
|
|
1472
|
-
}],
|
|
1473
|
-
retailerId: activeRetailer.id,
|
|
1474
|
-
status: product.status
|
|
1475
|
-
},
|
|
1476
|
-
paramsHeader: {
|
|
1477
|
-
Authorization: token
|
|
1478
|
-
}
|
|
1479
|
-
};
|
|
1480
|
-
_context11.next = 27;
|
|
1481
|
-
return (0, _utils.sendMessage)(_data);
|
|
1482
|
-
|
|
1483
|
-
case 27:
|
|
1484
1478
|
if (newOrderStatus) productTemp.status = newArticleStatus[articleId];
|
|
1485
1479
|
productTemp["".concat(concept, "_status")] = newStatus;
|
|
1486
|
-
_context11.next =
|
|
1480
|
+
_context11.next = 27;
|
|
1487
1481
|
return loadData();
|
|
1488
1482
|
|
|
1489
|
-
case
|
|
1483
|
+
case 27:
|
|
1490
1484
|
if (_message) setMessage(_message);
|
|
1491
1485
|
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
1492
1486
|
setProduct(productTemp);
|
|
1493
1487
|
|
|
1494
|
-
case
|
|
1495
|
-
_context11.next =
|
|
1488
|
+
case 30:
|
|
1489
|
+
_context11.next = 35;
|
|
1496
1490
|
break;
|
|
1497
1491
|
|
|
1498
|
-
case
|
|
1499
|
-
_context11.prev =
|
|
1492
|
+
case 32:
|
|
1493
|
+
_context11.prev = 32;
|
|
1500
1494
|
_context11.t0 = _context11["catch"](1);
|
|
1501
1495
|
console.log(_context11.t0);
|
|
1502
1496
|
|
|
1503
|
-
case
|
|
1497
|
+
case 35:
|
|
1504
1498
|
setLoading(false);
|
|
1505
1499
|
|
|
1506
|
-
case
|
|
1500
|
+
case 36:
|
|
1507
1501
|
case "end":
|
|
1508
1502
|
return _context11.stop();
|
|
1509
1503
|
}
|
|
1510
1504
|
}
|
|
1511
|
-
}, _callee11, null, [[1,
|
|
1505
|
+
}, _callee11, null, [[1, 32]]);
|
|
1512
1506
|
}));
|
|
1513
1507
|
|
|
1514
1508
|
return function sendToFacilitator(_x) {
|
|
@@ -1543,33 +1537,55 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1543
1537
|
};
|
|
1544
1538
|
|
|
1545
1539
|
var createComment = /*#__PURE__*/function () {
|
|
1546
|
-
var _ref16 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
|
|
1547
|
-
var
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
_args12 = arguments;
|
|
1540
|
+
var _ref16 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12(e, body, tab) {
|
|
1541
|
+
var _product$article16;
|
|
1542
|
+
|
|
1543
|
+
var concept, data;
|
|
1551
1544
|
return _regenerator.default.wrap(function _callee12$(_context12) {
|
|
1552
1545
|
while (1) {
|
|
1553
1546
|
switch (_context12.prev = _context12.next) {
|
|
1554
1547
|
case 0:
|
|
1555
|
-
|
|
1556
|
-
|
|
1548
|
+
concept = "";
|
|
1549
|
+
_context12.t0 = activeTab;
|
|
1550
|
+
_context12.next = _context12.t0 === "Ficha técnica" ? 4 : _context12.t0 === "Imágenes" ? 6 : 8;
|
|
1551
|
+
break;
|
|
1552
|
+
|
|
1553
|
+
case 4:
|
|
1554
|
+
concept = "datasheet";
|
|
1555
|
+
return _context12.abrupt("break", 10);
|
|
1556
|
+
|
|
1557
|
+
case 6:
|
|
1558
|
+
concept = "images";
|
|
1559
|
+
return _context12.abrupt("break", 10);
|
|
1560
|
+
|
|
1561
|
+
case 8:
|
|
1562
|
+
concept = "description";
|
|
1563
|
+
return _context12.abrupt("break", 10);
|
|
1564
|
+
|
|
1565
|
+
case 10:
|
|
1557
1566
|
data = {
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1567
|
+
articleId: product === null || product === void 0 ? void 0 : (_product$article16 = product.article) === null || _product$article16 === void 0 ? void 0 : _product$article16.id_article,
|
|
1568
|
+
orderId: product === null || product === void 0 ? void 0 : product.orderId,
|
|
1569
|
+
message: body === null || body === void 0 ? void 0 : body.replace(/<.*?\/?>/gm, ""),
|
|
1570
|
+
concept: concept,
|
|
1571
|
+
version: version
|
|
1572
|
+
};
|
|
1573
|
+
_context12.next = 13;
|
|
1574
|
+
return _axios.default.post("".concat(process.env.REACT_APP_COMMENTS_ENDPOINT), data, {
|
|
1575
|
+
headers: {
|
|
1566
1576
|
Authorization: token
|
|
1567
1577
|
}
|
|
1568
|
-
};
|
|
1578
|
+
});
|
|
1579
|
+
|
|
1580
|
+
case 13:
|
|
1581
|
+
_context12.next = 15;
|
|
1582
|
+
return getComments(tab);
|
|
1583
|
+
|
|
1584
|
+
case 15:
|
|
1569
1585
|
setMessage("");
|
|
1570
|
-
|
|
1586
|
+
setComponentsArray([]);
|
|
1571
1587
|
|
|
1572
|
-
case
|
|
1588
|
+
case 17:
|
|
1573
1589
|
case "end":
|
|
1574
1590
|
return _context12.stop();
|
|
1575
1591
|
}
|
|
@@ -1577,7 +1593,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1577
1593
|
}, _callee12);
|
|
1578
1594
|
}));
|
|
1579
1595
|
|
|
1580
|
-
return function createComment() {
|
|
1596
|
+
return function createComment(_x2, _x3, _x4) {
|
|
1581
1597
|
return _ref16.apply(this, arguments);
|
|
1582
1598
|
};
|
|
1583
1599
|
}();
|
|
@@ -1692,7 +1708,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1692
1708
|
|
|
1693
1709
|
var setAssignation = /*#__PURE__*/function () {
|
|
1694
1710
|
var _ref18 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(assignationType, assignationId) {
|
|
1695
|
-
var _product$
|
|
1711
|
+
var _product$article17;
|
|
1696
1712
|
|
|
1697
1713
|
var concept, productTemp, data;
|
|
1698
1714
|
return _regenerator.default.wrap(function _callee14$(_context14) {
|
|
@@ -1722,7 +1738,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1722
1738
|
data = {
|
|
1723
1739
|
articleList: [{
|
|
1724
1740
|
orderId: product.orderId,
|
|
1725
|
-
articleId: product === null || product === void 0 ? void 0 : (_product$
|
|
1741
|
+
articleId: product === null || product === void 0 ? void 0 : (_product$article17 = product.article) === null || _product$article17 === void 0 ? void 0 : _product$article17.id_article
|
|
1726
1742
|
}],
|
|
1727
1743
|
concept: concept,
|
|
1728
1744
|
userId: assignationId
|
|
@@ -1749,7 +1765,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1749
1765
|
}, _callee14);
|
|
1750
1766
|
}));
|
|
1751
1767
|
|
|
1752
|
-
return function setAssignation(
|
|
1768
|
+
return function setAssignation(_x5, _x6) {
|
|
1753
1769
|
return _ref18.apply(this, arguments);
|
|
1754
1770
|
};
|
|
1755
1771
|
}();
|
|
@@ -1851,7 +1867,6 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1851
1867
|
};
|
|
1852
1868
|
|
|
1853
1869
|
(0, _react.useEffect)(function () {
|
|
1854
|
-
console.log(servicesData, "servicesData");
|
|
1855
1870
|
var status = getRetailerStatus(servicesData, activeTab);
|
|
1856
1871
|
setRetailerStatus(status);
|
|
1857
1872
|
}, [activeTab, servicesData, activeRetailer]);
|
|
@@ -1860,11 +1875,68 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1860
1875
|
}, [services, servicesData, activeTab]);
|
|
1861
1876
|
(0, _react.useEffect)(function () {
|
|
1862
1877
|
setSaving(loading);
|
|
1863
|
-
}, [loading]);
|
|
1878
|
+
}, [loading]); // const validateAll = async (result) => {
|
|
1879
|
+
// try {
|
|
1880
|
+
// setLoading(true);
|
|
1881
|
+
// const evaluationArray = [];
|
|
1882
|
+
// let conceptArray = ["description", "datasheet", "images"];
|
|
1883
|
+
// switch (user.id_role) {
|
|
1884
|
+
// case 4:
|
|
1885
|
+
// conceptArray = ["description", "datasheet"];
|
|
1886
|
+
// break;
|
|
1887
|
+
// case 5:
|
|
1888
|
+
// conceptArray = ["images"];
|
|
1889
|
+
// break;
|
|
1890
|
+
// default:
|
|
1891
|
+
// conceptArray = ["description", "datasheet", "images"];
|
|
1892
|
+
// break;
|
|
1893
|
+
// }
|
|
1894
|
+
// const isAproved = result === "A";
|
|
1895
|
+
// const retailersIds = [];
|
|
1896
|
+
// servicesData?.forEach((ret) => {
|
|
1897
|
+
// if (!retailersIds.includes(ret.id_retailer))
|
|
1898
|
+
// retailersIds.push(ret.id_retailer);
|
|
1899
|
+
// });
|
|
1900
|
+
// const body = {
|
|
1901
|
+
// orderArticleRetailers: [
|
|
1902
|
+
// {
|
|
1903
|
+
// orderId: product.id_order ?? product.orderId,
|
|
1904
|
+
// articleId: product.article.id_article,
|
|
1905
|
+
// retailersIds,
|
|
1906
|
+
// },
|
|
1907
|
+
// ],
|
|
1908
|
+
// isAproved,
|
|
1909
|
+
// };
|
|
1910
|
+
// conceptArray.forEach((concept) => {
|
|
1911
|
+
// body.service = concept;
|
|
1912
|
+
// evaluationArray.push(
|
|
1913
|
+
// axios.put(`${process.env.REACT_APP_EVALUATION_ENDPOINT}`, body, {
|
|
1914
|
+
// headers: {
|
|
1915
|
+
// Authorization: token,
|
|
1916
|
+
// },
|
|
1917
|
+
// })
|
|
1918
|
+
// );
|
|
1919
|
+
// });
|
|
1920
|
+
// await Promise.all(evaluationArray);
|
|
1921
|
+
// const productTemp = product;
|
|
1922
|
+
// productTemp.status = `${result}A`;
|
|
1923
|
+
// productTemp.datasheet_status =
|
|
1924
|
+
// productTemp.datasheet_status === "NA" ? "NA" : `${result}A`;
|
|
1925
|
+
// productTemp.description_status =
|
|
1926
|
+
// productTemp.description_status === "NA" ? "NA" : `${result}A`;
|
|
1927
|
+
// productTemp.images_status =
|
|
1928
|
+
// productTemp.images_status === "NA" ? "NA" : `${result}A`;
|
|
1929
|
+
// sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
1930
|
+
// setProduct(productTemp);
|
|
1931
|
+
// await loadData();
|
|
1932
|
+
// } catch (error) {
|
|
1933
|
+
// console.log(error);
|
|
1934
|
+
// }
|
|
1935
|
+
// };
|
|
1864
1936
|
|
|
1865
1937
|
var validateAll = /*#__PURE__*/function () {
|
|
1866
1938
|
var _ref19 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15(result) {
|
|
1867
|
-
var evaluationArray, conceptArray,
|
|
1939
|
+
var evaluationArray, conceptArray, productTemp;
|
|
1868
1940
|
return _regenerator.default.wrap(function _callee15$(_context15) {
|
|
1869
1941
|
while (1) {
|
|
1870
1942
|
switch (_context15.prev = _context15.next) {
|
|
@@ -1890,7 +1962,6 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1890
1962
|
return _context15.abrupt("break", 13);
|
|
1891
1963
|
|
|
1892
1964
|
case 13:
|
|
1893
|
-
messages = [];
|
|
1894
1965
|
servicesData === null || servicesData === void 0 ? void 0 : servicesData.forEach(function (ret) {
|
|
1895
1966
|
if (conceptArray.includes(ret.service)) {
|
|
1896
1967
|
var _product$id_order;
|
|
@@ -1910,82 +1981,42 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1910
1981
|
}));
|
|
1911
1982
|
}
|
|
1912
1983
|
});
|
|
1913
|
-
_context15.next =
|
|
1984
|
+
_context15.next = 16;
|
|
1914
1985
|
return Promise.all(evaluationArray);
|
|
1915
1986
|
|
|
1916
|
-
case
|
|
1987
|
+
case 16:
|
|
1917
1988
|
productTemp = product;
|
|
1918
1989
|
productTemp.status = "".concat(result, "A");
|
|
1919
|
-
productTemp.datasheet_status = productTemp.datasheet_status === "
|
|
1920
|
-
productTemp.description_status = productTemp.description_status === "
|
|
1921
|
-
productTemp.images_status = productTemp.images_status === "
|
|
1990
|
+
productTemp.datasheet_status = productTemp.datasheet_status === "NA" ? "NA" : "".concat(result, "A");
|
|
1991
|
+
productTemp.description_status = productTemp.description_status === "NA" ? "NA" : "".concat(result, "A");
|
|
1992
|
+
productTemp.images_status = productTemp.images_status === "NA" ? "NA" : "".concat(result, "A");
|
|
1922
1993
|
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
1923
1994
|
setProduct(productTemp);
|
|
1924
|
-
_context15.next =
|
|
1925
|
-
return Promise.all(messages);
|
|
1926
|
-
|
|
1927
|
-
case 26:
|
|
1928
|
-
messagesResponse = _context15.sent;
|
|
1929
|
-
_context15.next = 29;
|
|
1995
|
+
_context15.next = 25;
|
|
1930
1996
|
return loadData();
|
|
1931
1997
|
|
|
1932
|
-
case
|
|
1933
|
-
_context15.next =
|
|
1998
|
+
case 25:
|
|
1999
|
+
_context15.next = 30;
|
|
1934
2000
|
break;
|
|
1935
2001
|
|
|
1936
|
-
case
|
|
1937
|
-
_context15.prev =
|
|
2002
|
+
case 27:
|
|
2003
|
+
_context15.prev = 27;
|
|
1938
2004
|
_context15.t1 = _context15["catch"](0);
|
|
1939
2005
|
console.log(_context15.t1);
|
|
1940
2006
|
|
|
1941
|
-
case
|
|
2007
|
+
case 30:
|
|
1942
2008
|
case "end":
|
|
1943
2009
|
return _context15.stop();
|
|
1944
2010
|
}
|
|
1945
2011
|
}
|
|
1946
|
-
}, _callee15, null, [[0,
|
|
2012
|
+
}, _callee15, null, [[0, 27]]);
|
|
1947
2013
|
}));
|
|
1948
2014
|
|
|
1949
|
-
return function validateAll(
|
|
2015
|
+
return function validateAll(_x7) {
|
|
1950
2016
|
return _ref19.apply(this, arguments);
|
|
1951
2017
|
};
|
|
1952
2018
|
}();
|
|
1953
2019
|
|
|
1954
|
-
var getObservation = /*#__PURE__*/function () {
|
|
1955
|
-
var _ref20 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
|
|
1956
|
-
var response, parseData;
|
|
1957
|
-
return _regenerator.default.wrap(function _callee16$(_context16) {
|
|
1958
|
-
while (1) {
|
|
1959
|
-
switch (_context16.prev = _context16.next) {
|
|
1960
|
-
case 0:
|
|
1961
|
-
_context16.next = 2;
|
|
1962
|
-
return _axios.default.get("".concat(process.env.REACT_APP_READ_OBSERVATION, "?articleId=").concat(product.article.id_article, "&orderId=").concat(product === null || product === void 0 ? void 0 : product.orderId), {
|
|
1963
|
-
headers: {
|
|
1964
|
-
Authorization: sessionStorage.getItem("jwt")
|
|
1965
|
-
}
|
|
1966
|
-
});
|
|
1967
|
-
|
|
1968
|
-
case 2:
|
|
1969
|
-
response = _context16.sent;
|
|
1970
|
-
parseData = JSON.parse(response.data.body).data[0];
|
|
1971
|
-
setObservation(parseData.observations);
|
|
1972
|
-
|
|
1973
|
-
case 5:
|
|
1974
|
-
case "end":
|
|
1975
|
-
return _context16.stop();
|
|
1976
|
-
}
|
|
1977
|
-
}
|
|
1978
|
-
}, _callee16);
|
|
1979
|
-
}));
|
|
1980
|
-
|
|
1981
|
-
return function getObservation() {
|
|
1982
|
-
return _ref20.apply(this, arguments);
|
|
1983
|
-
};
|
|
1984
|
-
}();
|
|
1985
|
-
|
|
1986
|
-
(0, _react.useEffect)(function () {
|
|
1987
|
-
getObservation();
|
|
1988
|
-
}, []);
|
|
1989
2020
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
1990
2021
|
headerTop: headerTop,
|
|
1991
2022
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_HeaderTop.HeaderTop, {
|
|
@@ -1994,10 +2025,8 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1994
2025
|
setCompare: setCompare,
|
|
1995
2026
|
isAuditor: [1, 6].includes(user.id_role),
|
|
1996
2027
|
withChat: location === null || location === void 0 ? void 0 : (_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.withChat,
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
token: token,
|
|
2000
|
-
activeRetailer: activeRetailer
|
|
2028
|
+
productSelected: productSelected,
|
|
2029
|
+
token: token
|
|
2001
2030
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2002
2031
|
className: "data-container",
|
|
2003
2032
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
@@ -2030,7 +2059,6 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
2030
2059
|
className: "product-information",
|
|
2031
2060
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_FullProductNameHeader.FullProductNameHeader, {
|
|
2032
2061
|
headerData: product,
|
|
2033
|
-
productObservation: observation,
|
|
2034
2062
|
percent: activePercentage,
|
|
2035
2063
|
activeRetailer: activeRetailer,
|
|
2036
2064
|
servicesData: servicesData,
|
|
@@ -2040,7 +2068,27 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
2040
2068
|
sendToFacilitator("A");
|
|
2041
2069
|
},
|
|
2042
2070
|
reject: function reject() {
|
|
2043
|
-
|
|
2071
|
+
sendToFacilitator("R");
|
|
2072
|
+
setMessage("Rechazado");
|
|
2073
|
+
setComponentsArray([/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
2074
|
+
src: _errorModal.default
|
|
2075
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
2076
|
+
text: "Agrega tu comentarios para enviar el rechazo",
|
|
2077
|
+
headerType: "input-name-header",
|
|
2078
|
+
color: "white"
|
|
2079
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TagAndInput, {
|
|
2080
|
+
label: "Caja de Comentario",
|
|
2081
|
+
inputType: "textarea",
|
|
2082
|
+
inputId: "modal-commentary-box",
|
|
2083
|
+
index: 0,
|
|
2084
|
+
color: "white"
|
|
2085
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
2086
|
+
buttonType: "general-default-button",
|
|
2087
|
+
label: "Enviar comentario",
|
|
2088
|
+
onClick: function onClick(e) {
|
|
2089
|
+
return createComment(e, document.querySelector("#modal-commentary-box .ql-container .ql-editor > p").innerHTML, activeTab);
|
|
2090
|
+
}
|
|
2091
|
+
})]);
|
|
2044
2092
|
},
|
|
2045
2093
|
showApproveRejectAll: approveRejectAllButtons() && (auditorAssigned() || userAssigned()),
|
|
2046
2094
|
showValidationButtons: approveRejectButtons() && (auditorAssigned() || userAssigned()),
|
|
@@ -2048,13 +2096,28 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
2048
2096
|
return validateAll("A");
|
|
2049
2097
|
},
|
|
2050
2098
|
rejectAll: function rejectAll() {
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2099
|
+
validateAll("R");
|
|
2100
|
+
setMessage("Rechazado");
|
|
2101
|
+
setComponentsArray([/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
2102
|
+
src: _errorModal.default
|
|
2103
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
2104
|
+
text: "Agrega tu comentarios para enviar el rechazo",
|
|
2105
|
+
headerType: "input-name-header",
|
|
2106
|
+
color: "white"
|
|
2107
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TagAndInput, {
|
|
2108
|
+
label: "Caja de Comentario",
|
|
2109
|
+
inputType: "textarea",
|
|
2110
|
+
inputId: "modal-commentary-box",
|
|
2111
|
+
index: 0,
|
|
2112
|
+
color: "white"
|
|
2113
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
2114
|
+
buttonType: "general-default-button",
|
|
2115
|
+
label: "Enviar comentario",
|
|
2116
|
+
onClick: function onClick(e) {
|
|
2117
|
+
return createComment(e, document.querySelector("#modal-commentary-box .ql-container .ql-editor > p").innerHTML, activeTab);
|
|
2118
|
+
}
|
|
2119
|
+
})]);
|
|
2120
|
+
}
|
|
2058
2121
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FullTabsMenu.FullTabsMenu, {
|
|
2059
2122
|
tabsSections: tabsSections,
|
|
2060
2123
|
status: retailerStatus,
|
|
@@ -2068,12 +2131,6 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
2068
2131
|
isRetailer: isRetailer,
|
|
2069
2132
|
showSaveButton: auditorAssigned() || userAssigned(),
|
|
2070
2133
|
version: version,
|
|
2071
|
-
desc: desc,
|
|
2072
|
-
setDesc: setDesc,
|
|
2073
|
-
fich: fich,
|
|
2074
|
-
setFich: setFich,
|
|
2075
|
-
imag: imag,
|
|
2076
|
-
setImag: setImag,
|
|
2077
2134
|
updatedDescriptions: updatedDescriptions,
|
|
2078
2135
|
setUpdatedDescriptions: setUpdatedDescriptions,
|
|
2079
2136
|
updatedDatasheets: updatedDatasheets,
|
|
@@ -2131,7 +2188,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
2131
2188
|
auditInputGroup: auditDescriptions[0],
|
|
2132
2189
|
updatedDescriptions: updatedDescriptions,
|
|
2133
2190
|
setUpdatedDescriptions: setUpdatedDescriptions,
|
|
2134
|
-
articleId: product === null || product === void 0 ? void 0 : (_product$
|
|
2191
|
+
articleId: product === null || product === void 0 ? void 0 : (_product$article18 = product.article) === null || _product$article18 === void 0 ? void 0 : _product$article18.id_article,
|
|
2135
2192
|
version: version,
|
|
2136
2193
|
dinamicHeight: true,
|
|
2137
2194
|
compare: compare
|
|
@@ -2152,15 +2209,57 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
2152
2209
|
headerType: "input-name-header"
|
|
2153
2210
|
}))]
|
|
2154
2211
|
})
|
|
2155
|
-
}), (userAssigned(activeTab) || auditorAssigned()) && product["".concat(getConcept(activeTab), "_status")] !== "NS" && /*#__PURE__*/(0, _jsxRuntime.
|
|
2212
|
+
}), (userAssigned(activeTab) || auditorAssigned()) && product["".concat(getConcept(activeTab), "_status")] !== "NS" && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2156
2213
|
className: "commentary-box",
|
|
2157
|
-
children: [
|
|
2214
|
+
children: [!comment ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2215
|
+
className: "commentary",
|
|
2216
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TagAndInput, {
|
|
2217
|
+
label: "Caja de Comentario",
|
|
2218
|
+
inputType: "textarea",
|
|
2219
|
+
inputCols: 80,
|
|
2220
|
+
inputRows: 4,
|
|
2221
|
+
inputId: "commentary-box",
|
|
2222
|
+
index: 0
|
|
2223
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
2224
|
+
className: "buttons-box",
|
|
2225
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
2226
|
+
buttonType: "general-transparent-button",
|
|
2227
|
+
label: "Enviar comentario",
|
|
2228
|
+
onClick: function onClick(e) {
|
|
2229
|
+
return createComment(e, document.querySelector("#commentary-box .ql-container .ql-editor > p").innerHTML, activeTab);
|
|
2230
|
+
}
|
|
2231
|
+
})
|
|
2232
|
+
})]
|
|
2233
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2234
|
+
className: "feedback-box",
|
|
2235
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Commentary.Commentary, {
|
|
2236
|
+
comment: comment === null || comment === void 0 ? void 0 : (_comment$message = comment.message) === null || _comment$message === void 0 ? void 0 : _comment$message.replace(/<.*?\/?>/gm, ""),
|
|
2237
|
+
reviewed: crossComment
|
|
2238
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
2239
|
+
buttonType: "circular-button accept-button",
|
|
2240
|
+
onClick: /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
|
|
2241
|
+
return _regenerator.default.wrap(function _callee16$(_context16) {
|
|
2242
|
+
while (1) {
|
|
2243
|
+
switch (_context16.prev = _context16.next) {
|
|
2244
|
+
case 0:
|
|
2245
|
+
setCrossComment(true);
|
|
2246
|
+
commentRevised();
|
|
2247
|
+
|
|
2248
|
+
case 2:
|
|
2249
|
+
case "end":
|
|
2250
|
+
return _context16.stop();
|
|
2251
|
+
}
|
|
2252
|
+
}
|
|
2253
|
+
}, _callee16);
|
|
2254
|
+
}))
|
|
2255
|
+
})]
|
|
2256
|
+
}), [7, 8].includes(user.id_role) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
2158
2257
|
buttonType: evaluationFinished(user.id_role, activeTab, statusArray) && requiredNull[activeTab] === 0 ? "general-green-button" : "general-button-disabled",
|
|
2159
2258
|
label: "Enviar evaluación",
|
|
2160
2259
|
onClick: function onClick() {
|
|
2161
2260
|
return sendToFacilitator();
|
|
2162
2261
|
}
|
|
2163
|
-
})
|
|
2262
|
+
})]
|
|
2164
2263
|
})]
|
|
2165
2264
|
})]
|
|
2166
2265
|
}), showModal && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProductImageModal.ProductImageModal, {
|
|
@@ -2189,53 +2288,6 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
2189
2288
|
currentVersion: version,
|
|
2190
2289
|
setShowVersionSelector: setShowVersionSelector,
|
|
2191
2290
|
jwt: token
|
|
2192
|
-
}), showRejectModal && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.Modal, {
|
|
2193
|
-
title: "Agregar mensaje de rechazo para ".concat(activeTab === null || activeTab === void 0 ? void 0 : activeTab.toLowerCase()),
|
|
2194
|
-
show: showRejectModal,
|
|
2195
|
-
customComponent: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TagAndInput, {
|
|
2196
|
-
inputType: "textarea",
|
|
2197
|
-
inputId: "modal-message-box",
|
|
2198
|
-
index: 0,
|
|
2199
|
-
color: "white"
|
|
2200
|
-
}),
|
|
2201
|
-
buttons: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
|
|
2202
|
-
type: "white",
|
|
2203
|
-
label: "Cancelar",
|
|
2204
|
-
size: 12,
|
|
2205
|
-
onClick: function onClick() {
|
|
2206
|
-
setShowRejectModal(false);
|
|
2207
|
-
}
|
|
2208
|
-
}, "btn-Cancelar"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
|
|
2209
|
-
type: "pink",
|
|
2210
|
-
label: "Aceptar",
|
|
2211
|
-
size: 12,
|
|
2212
|
-
onClick: /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17() {
|
|
2213
|
-
var body, messages;
|
|
2214
|
-
return _regenerator.default.wrap(function _callee17$(_context17) {
|
|
2215
|
-
while (1) {
|
|
2216
|
-
switch (_context17.prev = _context17.next) {
|
|
2217
|
-
case 0:
|
|
2218
|
-
body = document.querySelector("#modal-message-box .ql-container .ql-editor > p").innerHTML;
|
|
2219
|
-
messages = [{
|
|
2220
|
-
type: "message",
|
|
2221
|
-
value: body === null || body === void 0 ? void 0 : body.replace(/<.*?\/?>/gm, "")
|
|
2222
|
-
}];
|
|
2223
|
-
_context17.next = 4;
|
|
2224
|
-
return createComment(messages, activeRetailer.id);
|
|
2225
|
-
|
|
2226
|
-
case 4:
|
|
2227
|
-
valRejAll ? validateAll("R") : sendToFacilitator("R");
|
|
2228
|
-
setMessage("Rechazado");
|
|
2229
|
-
setShowRejectModal(false);
|
|
2230
|
-
|
|
2231
|
-
case 7:
|
|
2232
|
-
case "end":
|
|
2233
|
-
return _context17.stop();
|
|
2234
|
-
}
|
|
2235
|
-
}
|
|
2236
|
-
}, _callee17);
|
|
2237
|
-
}))
|
|
2238
|
-
}, "btn-Aceptar")]
|
|
2239
2291
|
})]
|
|
2240
2292
|
});
|
|
2241
2293
|
};
|