contentoh-components-library 21.5.3 → 21.5.5
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/organisms/InputGroup/index.js +1 -1
- package/dist/components/organisms/Table/styles.js +1 -1
- package/dist/components/pages/MultipleEdition/saveData.js +9 -19
- package/dist/components/pages/MultipleEdition/styles.js +1 -1
- package/dist/components/pages/MultipleEdition/utils.js +86 -153
- package/dist/components/pages/ProviderProductEdition/index.js +3 -4
- package/package.json +4 -1
- package/src/assets/images/Icons/addv2.svg +8 -0
- package/src/assets/images/Icons/beenhere.svg +9 -0
- package/src/assets/images/Icons/checkv2.svg +8 -0
- package/src/assets/images/Icons/close-magenta.svg +9 -0
- package/src/assets/images/Icons/close.svg +8 -0
- package/src/assets/images/Icons/closeCircle.svg +8 -0
- package/src/assets/images/Icons/delete-forever-red.svg +9 -0
- package/src/assets/images/Icons/delete-forever-white.svg +10 -0
- package/src/assets/images/Icons/edit.svg +8 -0
- package/src/assets/images/Icons/fullscreen.svg +3 -0
- package/src/assets/images/Icons/infoNR.svg +8 -0
- package/src/assets/images/Icons/options.svg +3 -0
- package/src/assets/images/Icons/save-white-gray.svg +9 -0
- package/src/assets/images/Icons/save-white.svg +9 -0
- package/src/assets/images/Icons/save.svg +8 -0
- package/src/assets/images/Icons/search.svg +3 -0
- package/src/assets/images/Icons/settings.svg +8 -0
- package/src/assets/images/Icons/trash.svg +8 -0
- package/src/assets/images/Icons/undo.svg +8 -0
- package/src/assets/images/Icons/upload-file-white.svg +4 -0
- package/src/assets/images/Icons/upload-file.svg +10 -0
- package/src/assets/images/Icons/upload_file.svg +10 -0
- package/src/assets/images/Icons/warningv2.svg +3 -0
- package/src/assets/images/checkBox/checkrosa.svg +3 -0
- package/src/assets/images/checkBox/checkverde.svg +3 -0
- package/src/assets/images/flagsv2/highPriority.svg +3 -0
- package/src/assets/images/flagsv2/lowPriority.svg +3 -0
- package/src/assets/images/flagsv2/mediumPriority.svg +3 -0
- package/src/assets/images/flagsv2/noPriority.svg +3 -0
- package/src/assets/images/generalButton/closeIconWhite.svg +4 -0
- package/src/assets/images/generalButton/closeIconv2.svg +4 -0
- package/src/assets/images/generalButton/saveIconpink.svg +3 -0
- package/src/components/atoms/Avatar/index.js +8 -2
- package/src/components/atoms/ButtonV2/ButtonV2.stories.js +1 -0
- package/src/components/atoms/ButtonV2/index.js +1 -0
- package/src/components/atoms/ButtonV2/styles.js +16 -0
- package/src/components/atoms/CharsMissing/Wysiwyg.stories.js +12 -0
- package/src/components/atoms/CharsMissing/index.js +60 -0
- package/src/components/atoms/CharsMissing/styles.js +44 -0
- package/src/components/atoms/CheckBox/CheckBox.stories.js +5 -0
- package/src/components/atoms/CheckBox/index.js +5 -1
- package/src/components/atoms/CheckBox/styles.js +9 -3
- package/src/components/atoms/CustomChip/CustomChip.stories.js +16 -0
- package/src/components/atoms/CustomChip/index.js +34 -0
- package/src/components/atoms/CustomChip/styles.js +6 -0
- package/src/components/atoms/FeatureTagv2/FeatureTagv2.stories.js +16 -0
- package/src/components/atoms/FeatureTagv2/index.js +10 -0
- package/src/components/atoms/FeatureTagv2/styles.js +56 -0
- package/src/components/atoms/GeneralButton/styles.js +46 -0
- package/src/components/atoms/GeneralInput/index.js +3 -0
- package/src/components/atoms/GeneralInput/styles.js +19 -1
- package/src/components/atoms/GeneralInputv2/GeneralInputv2.stories.js +33 -0
- package/src/components/atoms/GeneralInputv2/index.js +155 -0
- package/src/components/atoms/GeneralInputv2/styles.js +67 -0
- package/src/components/atoms/InputFormatter/index.js +2 -1
- package/src/components/atoms/InputFormatter/styles.js +9 -4
- package/src/components/atoms/InputFormatterv2/Wysiwyg.stories.js +12 -0
- package/src/components/atoms/InputFormatterv2/index.js +148 -0
- package/src/components/atoms/InputFormatterv2/styles.js +39 -0
- package/src/components/atoms/InputImages/InputImages.stories.js +19 -0
- package/src/components/atoms/InputImages/index.js +25 -0
- package/src/components/atoms/InputImages/styles.js +17 -0
- package/src/components/atoms/Multiselect/Multiselect.stories.js +364 -0
- package/src/components/atoms/Multiselect/index.js +351 -0
- package/src/components/atoms/Multiselect/styles.js +33 -0
- package/src/components/atoms/NumberMandatory/NumberMandatory.stories.js +19 -0
- package/src/components/atoms/NumberMandatory/index.js +16 -0
- package/src/components/atoms/NumberMandatory/styles.js +11 -0
- package/src/components/atoms/ObservationFlag/ObservationFlag.stories.js +20 -0
- package/src/components/atoms/ObservationFlag/index.js +167 -0
- package/src/components/atoms/ObservationFlag/styles.js +104 -0
- package/src/components/atoms/PriorityFlagv2/PriorityFlagv2.stories.js +20 -0
- package/src/components/atoms/PriorityFlagv2/index.js +20 -0
- package/src/components/atoms/PriorityFlagv2/styles.js +6 -0
- package/src/components/atoms/ProductImage/index.js +24 -11
- package/src/components/atoms/ProductImage/styles.js +7 -0
- package/src/components/atoms/ProductImagev2/ProductImagev2.stories.js +28 -0
- package/src/components/atoms/ProductImagev2/index.js +16 -0
- package/src/components/atoms/ProductImagev2/styles.js +62 -0
- package/src/components/atoms/Progress/Progress.stories.js +25 -0
- package/src/components/atoms/Progress/index.js +74 -0
- package/src/components/atoms/Progress/styles.js +98 -0
- package/src/components/atoms/ScreenHeaderv2/ScreenHeaderv2.stories.js +53 -0
- package/src/components/atoms/ScreenHeaderv2/index.js +134 -0
- package/src/components/atoms/ScreenHeaderv2/styles.js +103 -0
- package/src/components/atoms/Selectv2/VersionSelect.js +27 -0
- package/src/components/atoms/Selectv2/index.js +35 -0
- package/src/components/atoms/Selectv2/style.js +93 -0
- 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 +0 -3
- package/src/components/atoms/TabSectionv2/TabSection.stories.js +25 -0
- package/src/components/atoms/TabSectionv2/index.js +9 -0
- package/src/components/atoms/TabSectionv2/styles.js +20 -0
- package/src/components/atoms/TooltipLight/Tooltip.stories.js +20 -0
- package/src/components/atoms/TooltipLight/index.js +46 -0
- package/src/components/atoms/TooltipLight/styles.js +65 -0
- package/src/components/atoms/WordsMissing/Wysiwyg.stories.js +12 -0
- package/src/components/atoms/WordsMissing/index.js +60 -0
- package/src/components/atoms/WordsMissing/styles.js +10 -0
- package/src/components/molecules/AddGroup/AddGroup.stories.js +15 -0
- package/src/components/molecules/AddGroup/index.js +84 -0
- package/src/components/molecules/AddGroup/styles.js +141 -0
- package/src/components/molecules/AsignationInfo/AsignationInfo.stories.js +17 -0
- package/src/components/molecules/AsignationInfo/index.js +108 -0
- package/src/components/molecules/AsignationInfo/styles.js +86 -0
- package/src/components/molecules/BoxAttribute/index.js +32 -25
- package/src/components/molecules/BoxAttribute/styles.js +1 -1
- package/src/components/molecules/BoxButtons/index.js +23 -22
- package/src/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/src/components/molecules/EditionActiveImagev2/EditionActiveImagev2.stories.js +12 -0
- package/src/components/molecules/EditionActiveImagev2/index.js +15 -0
- package/src/components/molecules/EditionActiveImagev2/styles.js +7 -0
- package/src/components/molecules/EditionTabs/EditionTabs.stories.js +12 -0
- package/src/components/molecules/EditionTabs/index.js +33 -0
- package/src/components/molecules/EditionTabs/styles.js +24 -0
- package/src/components/molecules/FeaturesBarv2/FeaturesBarv2.stories.js +20 -0
- package/src/components/molecules/FeaturesBarv2/index.js +32 -0
- package/src/components/molecules/FeaturesBarv2/styles.js +17 -0
- package/src/components/molecules/GalleryElement/index.js +76 -1
- package/src/components/molecules/GalleryElementv2/GalleryElementv2.stories.js +30 -0
- package/src/components/molecules/GalleryElementv2/index.js +142 -0
- package/src/components/molecules/GalleryElementv2/styles.js +119 -0
- package/src/components/molecules/GalleryHeader/index.js +1 -0
- package/src/components/molecules/GalleryHeaderv2/GalleryHeaderv2.stories.js +10 -0
- package/src/components/molecules/GalleryHeaderv2/index.js +25 -0
- package/src/components/molecules/GalleryHeaderv2/styles.js +47 -0
- package/src/components/molecules/GroupSelect/GroupSelect.stories.js +35 -0
- package/src/components/molecules/GroupSelect/SelectItem.js +105 -0
- package/src/components/molecules/GroupSelect/index.js +190 -0
- package/src/components/molecules/GroupSelect/styles.js +124 -0
- package/src/components/molecules/HeaderTop/index.js +52 -6
- package/src/components/molecules/HeaderTopv2/HeaderTopv2.stories.js +10 -0
- package/src/components/molecules/HeaderTopv2/index.js +100 -0
- package/src/components/molecules/HeaderTopv2/styles.js +33 -0
- package/src/components/molecules/ImageSelectorv2/ImageSelectorv2.stories.js +46 -0
- package/src/components/molecules/ImageSelectorv2/index.js +22 -0
- package/src/components/molecules/ImageSelectorv2/styles.js +15 -0
- package/src/components/molecules/Phase/Phase.stories.js +107 -0
- package/src/components/molecules/Phase/index.js +391 -0
- package/src/components/molecules/Phase/styles.js +97 -0
- package/src/components/molecules/ProductNameHeader/index.js +19 -1
- package/src/components/molecules/ProductNameHeaderv2/ProductNameHeaderv2.stories.js +37 -0
- package/src/components/molecules/ProductNameHeaderv2/index.js +12 -0
- package/src/components/molecules/ProductNameHeaderv2/styles.js +10 -0
- package/src/components/molecules/ProductSkuStatus/ProductSkuStatus.stories.js +37 -0
- package/src/components/molecules/ProductSkuStatus/index.js +26 -0
- package/src/components/molecules/ProductSkuStatus/styles.js +7 -0
- package/src/components/molecules/RetailerSelectorv2/RetailerSelectorv2.stories.js +35 -0
- package/src/components/molecules/RetailerSelectorv2/index.js +80 -0
- package/src/components/molecules/RetailerSelectorv2/styles.js +21 -0
- package/src/components/molecules/ServiceDataValidator/ServiceDataValidator.stories.js +90 -0
- package/src/components/molecules/ServiceDataValidator/index.js +49 -0
- package/src/components/molecules/ServiceDataValidator/styles.js +36 -0
- package/src/components/molecules/SignInLogin/index.js +11 -11
- package/src/components/molecules/StatusAsignationInfo/FinancedCompanies.js +501 -63
- package/src/components/molecules/StatusAsignationInfo/index.js +1 -1
- package/src/components/molecules/StatusRetailer/StatusAsignationInfo.stories.js +17 -0
- package/src/components/molecules/StatusRetailer/index.js +55 -0
- package/src/components/molecules/StatusRetailer/styles.js +85 -0
- package/src/components/molecules/StripeCardSelector/CardSelector.stories.js +1 -2
- package/src/components/molecules/TabsMenuv2/TabsMenuv2.stories.js +19 -0
- package/src/components/molecules/TabsMenuv2/index.js +112 -0
- package/src/components/molecules/TabsMenuv2/styles.js +19 -0
- package/src/components/molecules/TagAndInput/index.js +8 -6
- package/src/components/molecules/TagAndInputv2/TagAndInputv2.stories.js +24 -0
- package/src/components/molecules/TagAndInputv2/index.js +86 -0
- package/src/components/molecules/TagAndInputv2/styles.js +35 -0
- package/src/components/molecules/Validation/Validation.stories.js +12 -0
- package/src/components/molecules/Validation/index.js +77 -0
- package/src/components/molecules/Validation/styles.js +19 -0
- package/src/components/molecules/VersionItemv2/VersionItemv2.stories.js +14 -0
- package/src/components/molecules/VersionItemv2/index.js +59 -0
- package/src/components/molecules/VersionItemv2/styles.js +47 -0
- package/src/components/organisms/BarButtons/BarButtons.stories.js +13 -0
- package/src/components/organisms/BarButtons/index.js +150 -0
- package/src/components/organisms/BarButtons/styles.js +54 -0
- package/src/components/organisms/Chat/Chat.stories.js +27 -7
- package/src/components/organisms/Chat/ContainerItems/index.js +18 -2
- package/src/components/organisms/Chat/ContainerItems/styles.js +14 -2
- package/src/components/organisms/Chat/ContentChat/index.js +88 -12
- package/src/components/organisms/Chat/Footer/index.js +11 -0
- package/src/components/organisms/Chat/index.js +46 -4
- package/src/components/organisms/Chat/styles.js +4 -0
- package/src/components/organisms/Chatv2/ChatLists/ChatLists.stories.js +65 -0
- 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 +141 -0
- package/src/components/organisms/Chatv2/ChatLists/styles.js +162 -0
- package/src/components/organisms/Chatv2/Chatv2.stories.js +184 -0
- package/src/components/organisms/Chatv2/ContainerItems/ContainerItems.stories.js +142 -0
- package/src/components/organisms/Chatv2/ContainerItems/index.js +538 -0
- package/src/components/organisms/Chatv2/ContainerItems/styles.js +360 -0
- package/src/components/organisms/Chatv2/ContentChat/ContentChat.stories.js +102 -0
- 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 +1016 -0
- package/src/components/organisms/Chatv2/ContentChat/styles.js +44 -0
- package/src/components/organisms/Chatv2/Footer/Footer.stories.js +22 -0
- package/src/components/organisms/Chatv2/Footer/index.js +668 -0
- package/src/components/organisms/Chatv2/Footer/styles.js +290 -0
- package/src/components/organisms/Chatv2/Header/Header.stories.js +66 -0
- package/src/components/organisms/Chatv2/Header/index.js +93 -0
- package/src/components/organisms/Chatv2/Header/styles.js +49 -0
- package/src/components/organisms/Chatv2/index.js +281 -0
- package/src/components/organisms/Chatv2/styles.js +85 -0
- package/src/components/organisms/CompleteServices/CompleteServices.stories.js +91 -0
- package/src/components/organisms/CompleteServices/index.js +82 -0
- package/src/components/organisms/CompleteServices/styles.js +35 -0
- package/src/components/organisms/DashboardMetric/index.js +6 -3
- package/src/components/organisms/DragAndDropPhases/DragAndDropPhases.stories.js +13 -0
- package/src/components/organisms/DragAndDropPhases/index.js +336 -0
- package/src/components/organisms/DragAndDropPhases/styles.js +107 -0
- package/src/components/organisms/DragPrueba/DragPrueba.stories.js +12 -0
- package/src/components/organisms/DragPrueba/index.js +57 -0
- package/src/components/organisms/DragPrueba/styles.js +8 -0
- package/src/components/organisms/EditGroup/EditGroup.stories.js +20 -0
- package/src/components/organisms/EditGroup/index.js +321 -0
- package/src/components/organisms/EditGroup/styles.js +207 -0
- package/src/components/organisms/FullProductNameHeader/index.js +13 -1
- package/src/components/organisms/FullProductNamev2/FullProductNamev2.stories.js +28 -0
- package/src/components/organisms/FullProductNamev2/index.js +101 -0
- package/src/components/organisms/FullProductNamev2/styles.js +49 -0
- package/src/components/organisms/FullTabsMenuv2/FullTabsMenuv2.stories.js +22 -0
- package/src/components/organisms/FullTabsMenuv2/index.js +142 -0
- package/src/components/organisms/FullTabsMenuv2/styles.js +47 -0
- package/src/components/organisms/GridProducts/GridProducts.stories.js +682 -107
- package/src/components/organisms/ImageDataTablev2/ImageDataTablev2.stories.js +24 -0
- package/src/components/organisms/ImageDataTablev2/index.js +124 -0
- package/src/components/organisms/ImageDataTablev2/styles.js +18 -0
- package/src/components/organisms/ImagePreviewerv2/ImagePreviewerv2.stories.js +38 -0
- package/src/components/organisms/ImagePreviewerv2/index.js +22 -0
- package/src/components/organisms/ImagePreviewerv2/styles.js +7 -0
- package/src/components/organisms/ImageUploader/ImageUploader.stories.js +15 -0
- package/src/components/organisms/ImageUploader/index.js +62 -0
- package/src/components/organisms/ImageUploader/styles.js +29 -0
- package/src/components/organisms/ImageVisor/ImageVisor.stories.js +15 -0
- package/src/components/organisms/ImageVisor/index.js +143 -0
- package/src/components/organisms/ImageVisor/styles.js +106 -0
- package/src/components/organisms/InputGroup/index.js +292 -144
- package/src/components/organisms/InputGroup/styles.js +31 -0
- package/src/components/organisms/InputGroupv2/InputGroupv2.stories.js +31 -0
- package/src/components/organisms/InputGroupv2/index.js +296 -0
- package/src/components/organisms/InputGroupv2/styles.js +90 -0
- package/src/components/organisms/MandatoryBar/MandatoryBar.stories.js +18 -0
- package/src/components/organisms/MandatoryBar/index.js +31 -0
- package/src/components/organisms/MandatoryBar/styles.js +12 -0
- package/src/components/organisms/Modal/Modal.stories.js +2 -1
- package/src/components/organisms/Modal/index.js +9 -2
- package/src/components/organisms/Modal/styles.js +8 -1
- package/src/components/organisms/OrderDetail/utils/Table/utils.js +6 -16
- package/src/components/organisms/ProductImageModalv2/ProductImageModalv2.stories.js +90 -0
- package/src/components/organisms/ProductImageModalv2/index.js +105 -0
- package/src/components/organisms/ProductImageModalv2/styles.js +71 -0
- package/src/components/organisms/RenameImagesBar/RenameImagesBar.stories.js +18 -0
- package/src/components/organisms/RenameImagesBar/index.js +30 -0
- package/src/components/organisms/RenameImagesBar/styles.js +12 -0
- package/src/components/organisms/Table/Table.stories.js +609 -0
- package/src/components/organisms/Table/index.js +84 -0
- package/src/components/organisms/Table/styles.js +114 -0
- package/src/components/organisms/VersionSelectorv2/VersionSelectorv2.stories.js +15 -0
- package/src/components/organisms/VersionSelectorv2/index.js +105 -0
- package/src/components/organisms/VersionSelectorv2/styles.js +45 -0
- package/src/components/pages/Dashboard/Dashboard.stories.js +33 -38
- package/src/components/pages/Dashboard/index.js +36 -7
- package/src/components/pages/MultipleEdition/MultipleEdition.stories.js +17 -0
- package/src/components/pages/MultipleEdition/components/ImageUploader.js +62 -0
- package/src/components/pages/MultipleEdition/components/ImageUploaderStyles.js +29 -0
- package/src/components/pages/MultipleEdition/components/ImageVisor.js +143 -0
- package/src/components/pages/MultipleEdition/components/styles.js +106 -0
- package/src/components/pages/MultipleEdition/index.js +248 -0
- package/src/components/pages/MultipleEdition/saveData.js +92 -0
- package/src/components/pages/MultipleEdition/styles.js +201 -0
- package/src/components/pages/MultipleEdition/utils.js +1073 -0
- package/src/components/pages/ProductEditionv2/ProductEditionv2.stories.js +213 -0
- package/src/components/pages/ProductEditionv2/index.js +1758 -0
- package/src/components/pages/ProductEditionv2/styles.js +154 -0
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +56 -60
- package/src/components/pages/ProviderProductEdition/index.js +149 -133
- package/src/components/pages/ProviderProductEdition/styles.js +5 -1
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +4 -0
- package/src/components/pages/RetailerProductEdition/generateThumnail.js +21 -0
- package/src/components/pages/RetailerProductEdition/index.js +293 -300
- package/src/components/pages/RetailerProductEdition/styles.js +4 -0
- package/src/components/pages/RetailerProductEdition/utils.js +37 -0
- package/src/global-files/data.js +6 -10
- package/src/global-files/variables.js +6 -0
- package/src/index.js +12 -0
|
@@ -4,6 +4,10 @@ import { TagAndInput } from "../../molecules/TagAndInput";
|
|
|
4
4
|
import { BoxOnboarding } from "../BoxOnboarding";
|
|
5
5
|
import { Box } from "../Box";
|
|
6
6
|
import { useEffect, useState } from "react";
|
|
7
|
+
import acceptIcon from "../../../assets/images/generalButton/acceptIcon.svg";
|
|
8
|
+
import rejectIcon from "../../../assets/images/generalButton/rejectIcon.svg";
|
|
9
|
+
import { Tooltip } from "../../atoms/Tooltip";
|
|
10
|
+
import { height, width } from "@mui/system";
|
|
7
11
|
|
|
8
12
|
export const InputGroup = ({
|
|
9
13
|
inputGroup = {},
|
|
@@ -21,8 +25,73 @@ export const InputGroup = ({
|
|
|
21
25
|
compare,
|
|
22
26
|
groupData = [],
|
|
23
27
|
setUpdatedBoxData,
|
|
24
|
-
activeRetailer
|
|
28
|
+
activeRetailer,
|
|
29
|
+
updateApprovedInputs,
|
|
25
30
|
}) => {
|
|
31
|
+
const InputReviewSection = ({
|
|
32
|
+
inputId,
|
|
33
|
+
isApproved,
|
|
34
|
+
comment,
|
|
35
|
+
handleImgClick,
|
|
36
|
+
changeImageBtn,
|
|
37
|
+
showDivState,
|
|
38
|
+
imageStates,
|
|
39
|
+
}) => (
|
|
40
|
+
<div style={{ "margin-top": "10px" }}>
|
|
41
|
+
<Tooltip
|
|
42
|
+
componentTooltip={
|
|
43
|
+
<>
|
|
44
|
+
<p>
|
|
45
|
+
<b>Comentarios:</b>
|
|
46
|
+
</p>
|
|
47
|
+
<p>{comment}</p>
|
|
48
|
+
</>
|
|
49
|
+
}
|
|
50
|
+
children={
|
|
51
|
+
!isApproved && (
|
|
52
|
+
<img
|
|
53
|
+
src={imageStates[inputId] ? acceptIcon : rejectIcon}
|
|
54
|
+
alt={"botón rechazar"}
|
|
55
|
+
style={{ cursor: "pointer" }}
|
|
56
|
+
onClick={() => handleImgClick(inputId)}
|
|
57
|
+
/>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
classNameTooltip={"container-tooltip"}
|
|
61
|
+
/>
|
|
62
|
+
{showDivState[inputId] && (
|
|
63
|
+
<div className="btnReviewState">
|
|
64
|
+
<div>
|
|
65
|
+
<button
|
|
66
|
+
id="aceptbtn"
|
|
67
|
+
onClick={() => changeImageBtn(inputId, "validate")}
|
|
68
|
+
>
|
|
69
|
+
<img
|
|
70
|
+
src={acceptIcon}
|
|
71
|
+
alt="acept button"
|
|
72
|
+
style={{ cursor: "pointer" }}
|
|
73
|
+
/>
|
|
74
|
+
Validar
|
|
75
|
+
</button>
|
|
76
|
+
</div>
|
|
77
|
+
{/* <div>
|
|
78
|
+
<button
|
|
79
|
+
id="rejectbtn"
|
|
80
|
+
onClick={() => changeImageBtn(inputId, "reject")}
|
|
81
|
+
>
|
|
82
|
+
<img
|
|
83
|
+
src={rejectIcon}
|
|
84
|
+
alt="reject button"
|
|
85
|
+
style={{ cursor: "pointer" }}
|
|
86
|
+
/>
|
|
87
|
+
Rechazar
|
|
88
|
+
</button>
|
|
89
|
+
</div> */}
|
|
90
|
+
</div>
|
|
91
|
+
)}
|
|
92
|
+
</div>
|
|
93
|
+
);
|
|
94
|
+
|
|
26
95
|
const inputTypeValue = (type) => {
|
|
27
96
|
switch (type) {
|
|
28
97
|
case "Booleano":
|
|
@@ -34,6 +103,23 @@ export const InputGroup = ({
|
|
|
34
103
|
}
|
|
35
104
|
};
|
|
36
105
|
const [showBox, setShowBox] = useState(false);
|
|
106
|
+
const [showDivStates, setShowDivStates] = useState({});
|
|
107
|
+
const [imageStates, setImageStates] = useState({});
|
|
108
|
+
|
|
109
|
+
const handleImgClick = (inputId) => {
|
|
110
|
+
setShowDivStates((prevStates) => ({
|
|
111
|
+
...prevStates,
|
|
112
|
+
[inputId]: !prevStates[inputId],
|
|
113
|
+
}));
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
const changeImageBtn = (inputId, action) => {
|
|
117
|
+
setImageStates((prevStates) => ({
|
|
118
|
+
...prevStates,
|
|
119
|
+
[inputId]: action === "validate",
|
|
120
|
+
}));
|
|
121
|
+
updateApprovedInputs(inputId);
|
|
122
|
+
};
|
|
37
123
|
|
|
38
124
|
const isEquals = (dataInputsVal, auditInputsVal) => {
|
|
39
125
|
const result = dataInputsVal === auditInputsVal;
|
|
@@ -41,7 +127,11 @@ export const InputGroup = ({
|
|
|
41
127
|
};
|
|
42
128
|
|
|
43
129
|
useEffect(() => {
|
|
44
|
-
if (
|
|
130
|
+
if (
|
|
131
|
+
inputGroup.groupId === "16" &&
|
|
132
|
+
activeRetailer &&
|
|
133
|
+
activeRetailer?.retailer?.id
|
|
134
|
+
) {
|
|
45
135
|
if (activeRetailer?.retailer?.id === 68) {
|
|
46
136
|
setShowBox(true);
|
|
47
137
|
} else {
|
|
@@ -50,127 +140,152 @@ export const InputGroup = ({
|
|
|
50
140
|
}
|
|
51
141
|
}, [activeRetailer, inputGroup.groupId]);
|
|
52
142
|
|
|
53
|
-
// useEffect(() => {
|
|
54
|
-
// if (showBox) {
|
|
55
|
-
// // Realiza la acción que deseas cuando showBox es true
|
|
56
|
-
// console.log("showBox es true");
|
|
57
|
-
// } else {
|
|
58
|
-
// // Realiza la acción que deseas cuando showBox es false
|
|
59
|
-
// console.log("showBox es false");
|
|
60
|
-
// }
|
|
61
|
-
// }, [showBox]);
|
|
62
|
-
|
|
63
143
|
return (
|
|
64
144
|
<>
|
|
65
145
|
{inputGroup.groupId === "16" && activeRetailer?.retailer?.id === 68 && (
|
|
66
146
|
<Container
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
/>
|
|
78
|
-
</Container>
|
|
79
|
-
)}
|
|
80
|
-
{(inputGroup.groupId !== "16") && (
|
|
81
|
-
<Container
|
|
82
|
-
className={
|
|
83
|
-
activeSection === "Ficha técnica"
|
|
84
|
-
? "datasheets-layout"
|
|
85
|
-
: "descriptions-layout"
|
|
86
|
-
}
|
|
87
|
-
>
|
|
88
|
-
{inputGroup?.dataGroup && (
|
|
89
|
-
<ScreenHeader
|
|
90
|
-
headerType={"retailer-name-header"}
|
|
91
|
-
text={`${inputGroup?.dataGroup}`}
|
|
147
|
+
className={
|
|
148
|
+
activeSection === "Ficha técnica"
|
|
149
|
+
? "datasheets-layout"
|
|
150
|
+
: "descriptions-layout"
|
|
151
|
+
}
|
|
152
|
+
>
|
|
153
|
+
<Box
|
|
154
|
+
inputGroup={inputGroup}
|
|
155
|
+
dataInputs={dataInputs}
|
|
156
|
+
onChange={setUpdatedBoxData}
|
|
92
157
|
/>
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
//disabled={input === 40001}
|
|
109
|
-
disabled={false}
|
|
110
|
-
inputId={dataInputs[input]?.id}
|
|
111
|
-
version={version}
|
|
112
|
-
inputType={inputTypeValue(dataInputs[input]?.type)}
|
|
113
|
-
label={
|
|
114
|
-
dataInputs[input]?.name +
|
|
115
|
-
(dataInputs[input]?.required ? "*" : "")
|
|
116
|
-
}
|
|
117
|
-
value={
|
|
118
|
-
compare ? auditInputs[input]?.value : dataInputs[input]?.value
|
|
119
|
-
}
|
|
120
|
-
inputPlaceHolder={input?.placeholder}
|
|
121
|
-
articleId={articleId}
|
|
122
|
-
isRequired={dataInputs[input]?.required}
|
|
123
|
-
updatedDatasheets={updatedDatasheets}
|
|
124
|
-
setUpdatedDatasheets={setUpdatedDatasheets}
|
|
125
|
-
maxChar={
|
|
126
|
-
dataInputs[input]?.max_chars
|
|
127
|
-
? dataInputs[input]?.max_chars
|
|
128
|
-
: 999
|
|
129
|
-
}
|
|
130
|
-
optionList={dataInputs[input]?.option_list}
|
|
131
|
-
description={dataInputs[input]?.description}
|
|
132
|
-
showTooltip={true}
|
|
133
|
-
auditClass={
|
|
134
|
-
compare &&
|
|
135
|
-
!isEquals(dataInputs[input].value, auditInputs[input].value)
|
|
136
|
-
? "audit-class"
|
|
137
|
-
: ""
|
|
138
|
-
}
|
|
139
|
-
/>
|
|
140
|
-
</>
|
|
141
|
-
) : (
|
|
142
|
-
<TagAndInput
|
|
143
|
-
key={index + "-" + input?.value + "-" + compare}
|
|
144
|
-
inputId={input.id}
|
|
145
|
-
index={index}
|
|
146
|
-
inputType={"textarea"}
|
|
147
|
-
label={input?.name + (input.required ? "*" : "")}
|
|
148
|
-
value={
|
|
149
|
-
compare ? auditInputGroup?.inputs[index]?.value : input?.value
|
|
150
|
-
}
|
|
151
|
-
isRequired={input.required}
|
|
152
|
-
maxChar={input.max_chars}
|
|
153
|
-
inputPlaceHolder={input?.placeholder}
|
|
154
|
-
updatedDescriptions={updatedDescriptions}
|
|
155
|
-
setUpdatedDescriptions={setUpdatedDescriptions}
|
|
156
|
-
articleId={articleId}
|
|
157
|
-
version={version}
|
|
158
|
-
dinamicHeight={dinamicHeight}
|
|
159
|
-
description={input?.description}
|
|
160
|
-
showTooltip={true}
|
|
161
|
-
auditClass={
|
|
162
|
-
compare &&
|
|
163
|
-
!isEquals(input?.value, auditInputGroup?.inputs[index]?.value)
|
|
164
|
-
? "audit-class"
|
|
165
|
-
: ""
|
|
166
|
-
}
|
|
167
|
-
/>
|
|
168
|
-
)
|
|
158
|
+
</Container>
|
|
159
|
+
)}
|
|
160
|
+
{inputGroup.groupId !== "16" && (
|
|
161
|
+
<Container
|
|
162
|
+
className={
|
|
163
|
+
activeSection === "Ficha técnica"
|
|
164
|
+
? "datasheets-layout"
|
|
165
|
+
: "descriptions-layout"
|
|
166
|
+
}
|
|
167
|
+
>
|
|
168
|
+
{inputGroup?.dataGroup && (
|
|
169
|
+
<ScreenHeader
|
|
170
|
+
headerType={"retailer-name-header"}
|
|
171
|
+
text={`${inputGroup?.dataGroup}`}
|
|
172
|
+
/>
|
|
169
173
|
)}
|
|
170
|
-
|
|
171
|
-
|
|
174
|
+
<div className="inputs-container">
|
|
175
|
+
{inputGroup?.inputs?.map((input, index) =>
|
|
176
|
+
activeSection === "Ficha técnica" ? (
|
|
177
|
+
<>
|
|
178
|
+
<TagAndInput
|
|
179
|
+
key={
|
|
180
|
+
index +
|
|
181
|
+
"-" +
|
|
182
|
+
dataInputs[input]?.value +
|
|
183
|
+
"-" +
|
|
184
|
+
dataInputs[input]?.id +
|
|
185
|
+
"-" +
|
|
186
|
+
compare
|
|
187
|
+
}
|
|
188
|
+
//disabled={input === 40001}
|
|
189
|
+
disabled={dataInputs[input]?.isApproved}
|
|
190
|
+
inputId={dataInputs[input]?.id}
|
|
191
|
+
version={version}
|
|
192
|
+
inputType={inputTypeValue(dataInputs[input]?.type)}
|
|
193
|
+
label={
|
|
194
|
+
dataInputs[input]?.name +
|
|
195
|
+
(dataInputs[input]?.required ? "*" : "")
|
|
196
|
+
}
|
|
197
|
+
value={
|
|
198
|
+
compare
|
|
199
|
+
? auditInputs[input]?.value
|
|
200
|
+
: dataInputs[input]?.value
|
|
201
|
+
}
|
|
202
|
+
inputPlaceHolder={input?.placeholder}
|
|
203
|
+
articleId={articleId}
|
|
204
|
+
isRequired={dataInputs[input]?.required}
|
|
205
|
+
updatedDatasheets={updatedDatasheets}
|
|
206
|
+
setUpdatedDatasheets={setUpdatedDatasheets}
|
|
207
|
+
maxChar={
|
|
208
|
+
dataInputs[input]?.max_chars
|
|
209
|
+
? dataInputs[input]?.max_chars
|
|
210
|
+
: 999
|
|
211
|
+
}
|
|
212
|
+
optionList={dataInputs[input]?.option_list}
|
|
213
|
+
description={dataInputs[input]?.description}
|
|
214
|
+
showTooltip={true}
|
|
215
|
+
auditClass={
|
|
216
|
+
compare &&
|
|
217
|
+
!isEquals(
|
|
218
|
+
dataInputs[input].value,
|
|
219
|
+
auditInputs[input].value
|
|
220
|
+
)
|
|
221
|
+
? "audit-class"
|
|
222
|
+
: ""
|
|
223
|
+
}
|
|
224
|
+
/>
|
|
225
|
+
{dataInputs[input]?.isApproved === false && (
|
|
226
|
+
<InputReviewSection
|
|
227
|
+
inputId={dataInputs[input]?.id}
|
|
228
|
+
isApproved={dataInputs[input]?.isApproved}
|
|
229
|
+
comment={dataInputs[input]?.comment}
|
|
230
|
+
handleImgClick={handleImgClick}
|
|
231
|
+
changeImageBtn={changeImageBtn}
|
|
232
|
+
showDivState={showDivStates}
|
|
233
|
+
imageStates={imageStates}
|
|
234
|
+
/>
|
|
235
|
+
)}
|
|
236
|
+
</>
|
|
237
|
+
) : (
|
|
238
|
+
<>
|
|
239
|
+
{input?.isApproved === false && (
|
|
240
|
+
<InputReviewSection
|
|
241
|
+
inputId={input?.id}
|
|
242
|
+
isApproved={input?.isApproved}
|
|
243
|
+
comment={input?.comment}
|
|
244
|
+
handleImgClick={handleImgClick}
|
|
245
|
+
changeImageBtn={changeImageBtn}
|
|
246
|
+
showDivState={showDivStates}
|
|
247
|
+
imageStates={imageStates}
|
|
248
|
+
/>
|
|
249
|
+
)}
|
|
250
|
+
<TagAndInput
|
|
251
|
+
key={index + "-" + input?.value + "-" + compare}
|
|
252
|
+
inputId={input.id}
|
|
253
|
+
index={index}
|
|
254
|
+
inputType={"textarea"}
|
|
255
|
+
label={input?.name + (input.required ? "*" : "")}
|
|
256
|
+
value={
|
|
257
|
+
compare
|
|
258
|
+
? auditInputGroup?.inputs[index]?.value
|
|
259
|
+
: input?.value
|
|
260
|
+
}
|
|
261
|
+
isRequired={input.required}
|
|
262
|
+
disabled={input.id===44186||input.id===44187?false:input?.isApproved}
|
|
263
|
+
maxChar={input.max_chars}
|
|
264
|
+
inputPlaceHolder={input?.placeholder}
|
|
265
|
+
updatedDescriptions={updatedDescriptions}
|
|
266
|
+
setUpdatedDescriptions={setUpdatedDescriptions}
|
|
267
|
+
articleId={articleId}
|
|
268
|
+
version={version}
|
|
269
|
+
dinamicHeight={dinamicHeight}
|
|
270
|
+
description={input?.description}
|
|
271
|
+
showTooltip={true}
|
|
272
|
+
auditClass={
|
|
273
|
+
compare &&
|
|
274
|
+
!isEquals(
|
|
275
|
+
input?.value,
|
|
276
|
+
auditInputGroup?.inputs[index]?.value
|
|
277
|
+
)
|
|
278
|
+
? "audit-class"
|
|
279
|
+
: ""
|
|
280
|
+
}
|
|
281
|
+
/>
|
|
282
|
+
</>
|
|
283
|
+
)
|
|
284
|
+
)}
|
|
285
|
+
</div>
|
|
286
|
+
</Container>
|
|
172
287
|
)}
|
|
173
|
-
|
|
288
|
+
{inputGroup.groupId === "16" && activeRetailer?.retailer?.id === 74 && (
|
|
174
289
|
<Container
|
|
175
290
|
className={
|
|
176
291
|
activeSection === "Ficha técnica"
|
|
@@ -199,7 +314,7 @@ export const InputGroup = ({
|
|
|
199
314
|
compare
|
|
200
315
|
}
|
|
201
316
|
//disabled={input === 40001}
|
|
202
|
-
disabled={
|
|
317
|
+
disabled={dataInputs[input]?.isApproved}
|
|
203
318
|
inputId={dataInputs[input]?.id}
|
|
204
319
|
version={version}
|
|
205
320
|
inputType={inputTypeValue(dataInputs[input]?.type)}
|
|
@@ -230,39 +345,72 @@ export const InputGroup = ({
|
|
|
230
345
|
onChange={setUpdatedBoxData}
|
|
231
346
|
auditClass={
|
|
232
347
|
compare &&
|
|
233
|
-
!isEquals(
|
|
348
|
+
!isEquals(
|
|
349
|
+
dataInputs[input].value,
|
|
350
|
+
auditInputs[input].value
|
|
351
|
+
)
|
|
234
352
|
? "audit-class"
|
|
235
353
|
: ""
|
|
236
354
|
}
|
|
237
355
|
/>
|
|
356
|
+
{dataInputs[input]?.isApproved === false && (
|
|
357
|
+
<InputReviewSection
|
|
358
|
+
inputId={dataInputs[input]?.id}
|
|
359
|
+
isApproved={dataInputs[input]?.isApproved}
|
|
360
|
+
comment={dataInputs[input]?.comment}
|
|
361
|
+
handleImgClick={handleImgClick}
|
|
362
|
+
changeImageBtn={changeImageBtn}
|
|
363
|
+
showDivState={showDivStates}
|
|
364
|
+
imageStates={imageStates}
|
|
365
|
+
/>
|
|
366
|
+
)}
|
|
238
367
|
</>
|
|
239
368
|
) : (
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
369
|
+
<>
|
|
370
|
+
{input?.isApproved === false && (
|
|
371
|
+
<InputReviewSection
|
|
372
|
+
inputId={input?.id}
|
|
373
|
+
isApproved={input?.isApproved}
|
|
374
|
+
comment={input?.comment}
|
|
375
|
+
handleImgClick={handleImgClick}
|
|
376
|
+
changeImageBtn={changeImageBtn}
|
|
377
|
+
showDivState={showDivStates}
|
|
378
|
+
imageStates={imageStates}
|
|
379
|
+
/>
|
|
380
|
+
)}
|
|
381
|
+
<TagAndInput
|
|
382
|
+
key={index + "-" + input?.value + "-" + compare}
|
|
383
|
+
inputId={input.id}
|
|
384
|
+
index={index}
|
|
385
|
+
disabled={input?.isApproved}
|
|
386
|
+
inputType={"textarea"}
|
|
387
|
+
label={input?.name + (input.required ? "*" : "")}
|
|
388
|
+
value={
|
|
389
|
+
compare
|
|
390
|
+
? auditInputGroup?.inputs[index]?.value
|
|
391
|
+
: input?.value
|
|
392
|
+
}
|
|
393
|
+
isRequired={input.required}
|
|
394
|
+
maxChar={input.max_chars}
|
|
395
|
+
inputPlaceHolder={input?.placeholder}
|
|
396
|
+
updatedDescriptions={updatedDescriptions}
|
|
397
|
+
setUpdatedDescriptions={setUpdatedDescriptions}
|
|
398
|
+
articleId={articleId}
|
|
399
|
+
version={version}
|
|
400
|
+
dinamicHeight={dinamicHeight}
|
|
401
|
+
description={input?.description}
|
|
402
|
+
showTooltip={true}
|
|
403
|
+
auditClass={
|
|
404
|
+
compare &&
|
|
405
|
+
!isEquals(
|
|
406
|
+
input?.value,
|
|
407
|
+
auditInputGroup?.inputs[index]?.value
|
|
408
|
+
)
|
|
409
|
+
? "audit-class"
|
|
410
|
+
: ""
|
|
411
|
+
}
|
|
412
|
+
/>
|
|
413
|
+
</>
|
|
266
414
|
)
|
|
267
415
|
)}
|
|
268
416
|
</div>
|
|
@@ -33,4 +33,35 @@ export const Container = styled.div`
|
|
|
33
33
|
& + * {
|
|
34
34
|
margin-top: 15px;
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
.btnReviewState {
|
|
38
|
+
display: "flex";
|
|
39
|
+
flex-direction: "column";
|
|
40
|
+
border: 1px solid lightgray;
|
|
41
|
+
border-radius: 3px;
|
|
42
|
+
z-index: 1000;
|
|
43
|
+
/* position: absolute; */
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.btnReviewState button {
|
|
47
|
+
border: none;
|
|
48
|
+
background: white;
|
|
49
|
+
border-radius: 3px;
|
|
50
|
+
}
|
|
51
|
+
.btnReviewState button:hover {
|
|
52
|
+
background: lightgray;
|
|
53
|
+
}
|
|
54
|
+
/* #divBtnsReviewdown {
|
|
55
|
+
border-left: 1px solid black;
|
|
56
|
+
border-right: 1px solid black;
|
|
57
|
+
border-bottom: 1px solid black;
|
|
58
|
+
}
|
|
59
|
+
#aceptbtn {
|
|
60
|
+
background: white;
|
|
61
|
+
border: none;
|
|
62
|
+
}
|
|
63
|
+
#rejectbtn {
|
|
64
|
+
background: white;
|
|
65
|
+
border: none;
|
|
66
|
+
} */
|
|
36
67
|
`;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { InputGroupv2 } from "./index";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/organisms/InputGroupv2",
|
|
5
|
+
component: InputGroupv2,
|
|
6
|
+
argTypes: {
|
|
7
|
+
activeSection: {
|
|
8
|
+
options: [true, false],
|
|
9
|
+
control: { type: "boolean" },
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const Template = (args) => <InputGroupv2 {...args} />;
|
|
15
|
+
|
|
16
|
+
export const InputGroupDefault = Template.bind({});
|
|
17
|
+
InputGroupDefault.args = {
|
|
18
|
+
InputGroupv2: {
|
|
19
|
+
name: "Información básica del producto",
|
|
20
|
+
inputs: [
|
|
21
|
+
{ label: "Item", value: "1234567890", placeholder: "Ingresar valor" },
|
|
22
|
+
{ label: "Item", value: "1234567890", placeholder: "Ingresar valor" },
|
|
23
|
+
{ label: "Item", value: "1234567890", placeholder: "Ingresar valor" },
|
|
24
|
+
{ label: "Item", value: "1234567890", placeholder: "Ingresar valor" },
|
|
25
|
+
{ label: "Item", value: "1234567890", placeholder: "Ingresar valor" },
|
|
26
|
+
{ label: "Item", value: "1234567890", placeholder: "Ingresar valor" },
|
|
27
|
+
{ label: "Item", value: "1234567890", placeholder: "Ingresar valor" },
|
|
28
|
+
{ label: "Item", value: "1234567890", placeholder: "Ingresar valor" },
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
};
|