contentoh-components-library 21.4.74 → 21.4.75
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/addv2.svg +8 -0
- package/dist/assets/images/Icons/checkv2.svg +8 -0
- package/dist/assets/images/Icons/options.svg +3 -0
- package/dist/assets/images/Icons/trash.svg +8 -0
- package/dist/assets/images/Icons/undo.svg +8 -0
- package/dist/assets/images/Icons/warningv2.svg +3 -0
- package/dist/assets/images/checkBox/checkrosa.svg +3 -0
- package/dist/assets/images/checkBox/checkverde.svg +3 -0
- package/dist/components/atoms/Avatar/index.js +3 -2
- 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 +8 -1
- package/dist/components/atoms/CheckBox/index.js +8 -0
- package/dist/components/atoms/CheckBox/styles.js +8 -1
- package/dist/components/atoms/GeneralButton/styles.js +6 -2
- package/dist/components/atoms/InputFormatter/styles.js +3 -3
- package/dist/components/atoms/SliderToolTip/styles.js +1 -1
- package/dist/components/molecules/BoxAttribute/index.js +3 -3
- package/dist/components/molecules/BoxAttribute/styles.js +1 -1
- package/dist/components/molecules/BoxButtons/index.js +0 -1
- package/dist/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/dist/components/molecules/GroupSelect/GroupSelect.stories.js +53 -0
- package/dist/components/molecules/GroupSelect/SelectItem.js +142 -0
- package/dist/components/molecules/GroupSelect/index.js +254 -0
- package/dist/components/molecules/GroupSelect/styles.js +25 -0
- package/dist/components/molecules/HeaderTop/index.js +68 -11
- package/dist/components/molecules/Phase/index.js +205 -43
- package/dist/components/molecules/Phase/styles.js +1 -1
- package/dist/components/molecules/SignInLogin/index.js +36 -28
- package/dist/components/molecules/StripeCardSelector/CardSelector.stories.js +1 -2
- package/dist/components/organisms/Chat/Chat.stories.js +27 -8
- package/dist/components/organisms/Chat/ContainerItems/index.js +19 -3
- package/dist/components/organisms/Chat/ContainerItems/styles.js +1 -1
- package/dist/components/organisms/Chat/ContentChat/index.js +350 -197
- package/dist/components/organisms/Chat/Footer/index.js +48 -39
- package/dist/components/organisms/Chat/index.js +49 -4
- package/dist/components/organisms/Chat/styles.js +1 -1
- package/dist/components/organisms/DashboardMetric/index.js +12 -6
- package/dist/components/organisms/DragAndDropPhases/DragAndDropPhases.stories.js +26 -1
- package/dist/components/organisms/DragAndDropPhases/index.js +262 -32
- package/dist/components/organisms/DragAndDropPhases/styles.js +8 -4
- package/dist/components/organisms/EditGroup/EditGroup.stories.js +39 -0
- package/dist/components/organisms/EditGroup/index.js +242 -0
- package/dist/components/organisms/EditGroup/styles.js +36 -0
- package/dist/components/organisms/FullProductNameHeader/index.js +2 -2
- package/dist/components/organisms/InputGroup/index.js +1 -10
- package/dist/components/organisms/Modal/Modal.stories.js +2 -1
- package/dist/components/organisms/Modal/index.js +6 -1
- package/dist/components/organisms/Modal/styles.js +1 -1
- package/dist/components/organisms/VersionSelector/index.js +2 -4
- package/dist/components/pages/Dashboard/Dashboard.stories.js +33 -36
- package/dist/components/pages/Dashboard/index.js +37 -9
- package/dist/components/pages/ProviderProductEdition/index.js +120 -144
- package/dist/components/pages/ProviderProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +4 -0
- package/dist/components/pages/RetailerProductEdition/index.js +278 -273
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/utils.js +61 -2
- package/dist/global-files/data.js +11 -3
- package/dist/global-files/variables.js +7 -1
- package/dist/index.js +201 -58
- package/package.json +2 -1
- package/src/assets/images/Icons/addv2.svg +8 -0
- package/src/assets/images/Icons/checkv2.svg +8 -0
- package/src/assets/images/Icons/infoNR.svg +8 -0
- package/src/assets/images/Icons/options.svg +3 -0
- package/src/assets/images/Icons/trash.svg +8 -0
- package/src/assets/images/Icons/undo.svg +8 -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/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/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/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/ImageCarousel/ImgeSlider.stories.js +76 -0
- package/src/components/atoms/ImageCarousel/index.js +103 -0
- package/src/components/atoms/ImageCarousel/styles.js +79 -0
- 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/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/PercentTag/PercentTag.stories.js +7 -0
- package/src/components/atoms/PercentTag/index.js +9 -0
- package/src/components/atoms/PercentTag/styles.js +69 -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/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/RatingStars/RatingStars.stories.js +10 -0
- package/src/components/atoms/RatingStars/index.js +31 -0
- package/src/components/atoms/RatingStars/styles.js +28 -0
- package/src/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +36 -0
- package/src/components/atoms/RetailerCatalog/index.js +49 -0
- package/src/components/atoms/RetailerCatalog/styles.js +30 -0
- package/src/components/atoms/RetailerOption/RetailerOption.stories.js +15 -0
- package/src/components/atoms/RetailerOption/index.js +53 -0
- package/src/components/atoms/RetailerOption/styles.js +41 -0
- package/src/components/atoms/RetailersList/RetailersList.stories.js +33 -0
- package/src/components/atoms/RetailersList/index.js +20 -0
- package/src/components/atoms/RetailersList/styles.js +19 -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 +1 -1
- 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/UserCatalog/UserCatalog.stories.js +67 -0
- package/src/components/atoms/UserCatalog/index.js +100 -0
- package/src/components/atoms/UserCatalog/styles.js +24 -0
- package/src/components/atoms/UserOption/UserOption.stories.js +25 -0
- package/src/components/atoms/UserOption/index.js +95 -0
- package/src/components/atoms/UserOption/styles.js +61 -0
- package/src/components/atoms/UserSelector/UserSelector.stories.js +25 -0
- package/src/components/atoms/UserSelector/index.js +86 -0
- package/src/components/atoms/UserSelector/styles.js +55 -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/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/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/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/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/GridItem/GridItem.stories.js +126 -0
- package/src/components/molecules/GridItem/index.js +105 -0
- package/src/components/molecules/GridItem/styles.js +104 -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/HeaderItem/ColumnItem.js +9 -0
- package/src/components/molecules/HeaderItem/HeaderItem.stories.js +24 -0
- package/src/components/molecules/HeaderItem/index.js +26 -0
- package/src/components/molecules/HeaderItem/styles.js +27 -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 +37 -0
- package/src/components/molecules/Phase/index.js +185 -0
- package/src/components/molecules/Phase/styles.js +91 -0
- 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/RowItem/ColumnItem.js +9 -0
- package/src/components/molecules/RowItem/RowItem.stories.js +5660 -0
- package/src/components/molecules/RowItem/index.js +45 -0
- package/src/components/molecules/RowItem/styles.js +40 -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/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 +6 -5
- 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 +40 -0
- package/src/components/organisms/DragAndDropPhases/index.js +236 -0
- package/src/components/organisms/DragAndDropPhases/styles.js +69 -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 +18 -0
- package/src/components/organisms/EditGroup/index.js +168 -0
- package/src/components/organisms/EditGroup/styles.js +115 -0
- package/src/components/organisms/FullProductNameHeader/index.js +1 -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 +5485 -0
- package/src/components/organisms/GridProducts/index.js +50 -0
- package/src/components/organisms/GridProducts/styles.js +14 -0
- package/src/components/organisms/GridProducts/utils.js +111 -0
- 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/InputGroup/index.js +131 -119
- 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 +8 -1
- 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/VersionSelector/index.js +1 -2
- 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/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/index.js +100 -131
- package/src/components/pages/ProviderProductEdition/styles.js +5 -1
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +4 -0
- package/src/components/pages/RetailerProductEdition/index.js +106 -135
- 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 +11 -0
- package/dist/assets/fonts/roboto/LICENSE.txt +0 -202
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Container,
|
|
3
|
+
ContainerBtnPopUpChat,
|
|
4
|
+
ContainerFixed,
|
|
5
|
+
ContainerPopUp,
|
|
6
|
+
ContainerIcon
|
|
7
|
+
} from "./styles";
|
|
8
|
+
import { useEffect, useState } from "react";
|
|
9
|
+
import { ButtonV2 } from "../../atoms/ButtonV2";
|
|
10
|
+
import { ContentChat } from "./ContentChat";
|
|
11
|
+
import { faComments as IconChat } from "@fortawesome/free-solid-svg-icons";
|
|
12
|
+
import { Slide } from "@mui/material";
|
|
13
|
+
import {
|
|
14
|
+
isStringEmpty,
|
|
15
|
+
isValidNaturalNumber,
|
|
16
|
+
} from "../../../global-files/utils";
|
|
17
|
+
import {Button} from "@mui/material";
|
|
18
|
+
|
|
19
|
+
export const Chatv2 = (props) => {
|
|
20
|
+
const {
|
|
21
|
+
chatType, // "merchant_product" | "order_product" | "ticket"
|
|
22
|
+
chatContainerType, // ("fixed") | ("popUp")
|
|
23
|
+
chatData = {}, // {} => aqui poner los datos requeridos segun el tipo de Chatv2
|
|
24
|
+
classNameContainerFixed, // clases CSS del envoltoria Chatv2 fixed
|
|
25
|
+
size = 14, // tamaño del icono
|
|
26
|
+
} = props;
|
|
27
|
+
const [showPopUpChat, setShowPopUpChat] = useState(false);
|
|
28
|
+
const [data, setData] = useState();
|
|
29
|
+
|
|
30
|
+
const { ticketCompany, retailerId } = chatData || {};
|
|
31
|
+
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
switch (chatType) {
|
|
34
|
+
case "merchant_product":
|
|
35
|
+
validateChatMerchantProduct();
|
|
36
|
+
break;
|
|
37
|
+
case "order_product":
|
|
38
|
+
validateChatOrderProduct();
|
|
39
|
+
break;
|
|
40
|
+
case "ticket":
|
|
41
|
+
validateChatTicket();
|
|
42
|
+
break;
|
|
43
|
+
case "product_status":
|
|
44
|
+
validateProductStatus();
|
|
45
|
+
break;
|
|
46
|
+
default:
|
|
47
|
+
setData({
|
|
48
|
+
code: 404,
|
|
49
|
+
message: `El tipo de Chatv2 especificado "${chatType}" no es valido`,
|
|
50
|
+
errorDetail: "",
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}, [chatType]);
|
|
54
|
+
|
|
55
|
+
const validateProductStatus = () => {
|
|
56
|
+
const {
|
|
57
|
+
userToken, // string
|
|
58
|
+
id, // number
|
|
59
|
+
version,
|
|
60
|
+
retailerId, // number
|
|
61
|
+
status,
|
|
62
|
+
orderId,
|
|
63
|
+
} = chatData;
|
|
64
|
+
|
|
65
|
+
if (!isValidGeneral(userToken, id)) return;
|
|
66
|
+
|
|
67
|
+
// validar el ID de la cadena asociada al producto en la OT
|
|
68
|
+
if (!isValidNaturalNumber(retailerId)) {
|
|
69
|
+
setDataError("La cadena relacionada al producto no es válida");
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// validar el ID de la version asociada al producto en la OT
|
|
74
|
+
if (!isValidNaturalNumber(version)) {
|
|
75
|
+
setDataError("La versión del producto no es válida");
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (orderId && !isValidNaturalNumber(orderId)) {
|
|
80
|
+
setDataError("La orden del producto no es válida");
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
setData({
|
|
85
|
+
userToken,
|
|
86
|
+
id,
|
|
87
|
+
version,
|
|
88
|
+
retailerId,
|
|
89
|
+
orderId,
|
|
90
|
+
status,
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const isValidGeneral = (userToken, id) => {
|
|
95
|
+
// validar token del user
|
|
96
|
+
if (isStringEmpty(userToken)) {
|
|
97
|
+
setDataError("El token del usuario no es valido");
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
// validar ID del producto
|
|
101
|
+
if (!isValidNaturalNumber(id)) {
|
|
102
|
+
setDataError("El ID del producto no es valido");
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
return true;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
// validar props que se requieren para el tipo de Chatv2 "order_product"
|
|
109
|
+
const validateChatOrderProduct = () => {
|
|
110
|
+
const {
|
|
111
|
+
userToken, // string
|
|
112
|
+
id, // number
|
|
113
|
+
orderId, // number
|
|
114
|
+
retailerId, // number
|
|
115
|
+
} = chatData;
|
|
116
|
+
|
|
117
|
+
if (!isValidGeneral(userToken, id)) return;
|
|
118
|
+
|
|
119
|
+
// validar el ID de la OT en donde se encuentra el producto
|
|
120
|
+
if (!isValidNaturalNumber(orderId)) {
|
|
121
|
+
setDataError("El ID de la orden del producto no es valido");
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
// validar el ID de la cadena asociada al producto en la OT
|
|
125
|
+
if (!isValidNaturalNumber(retailerId)) {
|
|
126
|
+
setDataError("La cadena relacionada al producto no es valida");
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
setData({
|
|
130
|
+
userToken,
|
|
131
|
+
id,
|
|
132
|
+
orderId,
|
|
133
|
+
retailerId,
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
// validar props que se requieren para el tipo de Chatv2 "merchants_product"
|
|
138
|
+
const validateChatMerchantProduct = () => {
|
|
139
|
+
const {
|
|
140
|
+
userToken, // string
|
|
141
|
+
id, // number
|
|
142
|
+
version, // number
|
|
143
|
+
} = chatData;
|
|
144
|
+
|
|
145
|
+
if (!isValidGeneral(userToken, id)) return;
|
|
146
|
+
|
|
147
|
+
// validar la version del producto
|
|
148
|
+
if (!isValidNaturalNumber(version)) {
|
|
149
|
+
setDataError("La version del producto no es valida");
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
setData({
|
|
153
|
+
userToken,
|
|
154
|
+
id,
|
|
155
|
+
version,
|
|
156
|
+
});
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
// validar props que se requieren para el tipo de Chatv2 "ticket"
|
|
160
|
+
const validateChatTicket = () => {
|
|
161
|
+
const {
|
|
162
|
+
currentUser /* {
|
|
163
|
+
token, // string
|
|
164
|
+
id: number ,
|
|
165
|
+
companyId: number ,
|
|
166
|
+
isUserTech: boolean ,
|
|
167
|
+
} */,
|
|
168
|
+
id, // number
|
|
169
|
+
statusTicket, // (string) "IN_PROGRESS" | "PENDING" | "COMPLETED"
|
|
170
|
+
ticketOwnerUserId, // number
|
|
171
|
+
} = chatData;
|
|
172
|
+
// validar el token del usuario conectado
|
|
173
|
+
if (isStringEmpty(currentUser?.token)) {
|
|
174
|
+
setDataError("Tu identificación de usuario no fue especificado");
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
// validar si ID del usuario conectado
|
|
178
|
+
if (!isValidNaturalNumber(currentUser?.id)) {
|
|
179
|
+
setDataError("Tu ID de usuario no fue especificado");
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
// validar si ID de la compañia del usuario conectado
|
|
183
|
+
if (!isValidNaturalNumber(currentUser?.companyId)) {
|
|
184
|
+
setDataError("El ID de tu compañia no fue especificado");
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
// validar si el usuario conectado es de tecnologia o no
|
|
188
|
+
if (![false, true].includes(currentUser?.isUserTech)) {
|
|
189
|
+
setDataError("Tu tipo de usuario no fue especificado");
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
// validar ID del ticket
|
|
193
|
+
if (!isValidNaturalNumber(id)) {
|
|
194
|
+
setDataError("El ID del ticket no es valido");
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
// validar ID del usuario que creó el ticket
|
|
198
|
+
if (!isValidNaturalNumber(ticketOwnerUserId)) {
|
|
199
|
+
setDataError(
|
|
200
|
+
"El ID del usuario al que le pertenece el ticket no es valido"
|
|
201
|
+
);
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
// validar el status del Chatv2
|
|
205
|
+
if (!["IN_PROGRESS", "PENDING", "COMPLETED"].includes(statusTicket)) {
|
|
206
|
+
setDataError("El estatus del ticket no es valido");
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
let statusChat = "open";
|
|
210
|
+
if (statusTicket === "COMPLETED") statusChat = "closed";
|
|
211
|
+
|
|
212
|
+
// convertir user TECH a NORMAL si es el propietario del ticket
|
|
213
|
+
let isUserTech = currentUser.isUserTech;
|
|
214
|
+
if (isUserTech && currentUser.id === ticketOwnerUserId) {
|
|
215
|
+
isUserTech = false;
|
|
216
|
+
}
|
|
217
|
+
setData({
|
|
218
|
+
currentUser: {
|
|
219
|
+
...currentUser,
|
|
220
|
+
isUserTech,
|
|
221
|
+
},
|
|
222
|
+
id,
|
|
223
|
+
statusChat,
|
|
224
|
+
});
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
const setDataError = (errorDetail) => {
|
|
228
|
+
setData({
|
|
229
|
+
code: 404,
|
|
230
|
+
message: `No se especificaron algunos datos requeridos para el tipo de Chatv2 "${chatType}"`,
|
|
231
|
+
errorDetail,
|
|
232
|
+
});
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
if (chatContainerType?.toLowerCase() === "fixed") {
|
|
236
|
+
/* Chatv2 tipo fixed */
|
|
237
|
+
return (
|
|
238
|
+
<ContainerFixed className={classNameContainerFixed}>
|
|
239
|
+
<ContentChat
|
|
240
|
+
chatType={chatType?.toLowerCase()}
|
|
241
|
+
chatContainerType="fixed"
|
|
242
|
+
dataChat={data}
|
|
243
|
+
showBtnClose={false}
|
|
244
|
+
ticketCompany={ticketCompany}
|
|
245
|
+
activeRetailer={props.activeRetailer || { id: retailerId }}
|
|
246
|
+
/>
|
|
247
|
+
</ContainerFixed>
|
|
248
|
+
);
|
|
249
|
+
} else {
|
|
250
|
+
/* Chatv2 tipo popUp */
|
|
251
|
+
return (
|
|
252
|
+
<Container>
|
|
253
|
+
<Button
|
|
254
|
+
borderType="circle" className="container-btn-popUpChat boton-ch" onClick={() => {
|
|
255
|
+
setShowPopUpChat(!showPopUpChat);
|
|
256
|
+
}}>
|
|
257
|
+
<ContainerBtnPopUpChat>
|
|
258
|
+
<span class="iconos-out iconos-grises">forum</span>
|
|
259
|
+
</ContainerBtnPopUpChat>
|
|
260
|
+
</Button>
|
|
261
|
+
|
|
262
|
+
<Slide direction="left" in={showPopUpChat} timeout={400}>
|
|
263
|
+
<ContainerPopUp>
|
|
264
|
+
<ContentChat
|
|
265
|
+
chatType={chatType?.toLowerCase()}
|
|
266
|
+
chatContainerType="popUp"
|
|
267
|
+
dataChat={data}
|
|
268
|
+
showPopUpChat={showPopUpChat}
|
|
269
|
+
showBtnClose={true}
|
|
270
|
+
ticketCompany={ticketCompany}
|
|
271
|
+
onClickBtnClose={() => {
|
|
272
|
+
setShowPopUpChat(false);
|
|
273
|
+
}}
|
|
274
|
+
activeRetailer={props.activeRetailer || { id: retailerId }}
|
|
275
|
+
/>
|
|
276
|
+
</ContainerPopUp>
|
|
277
|
+
</Slide>
|
|
278
|
+
</Container>
|
|
279
|
+
);
|
|
280
|
+
}
|
|
281
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { GlobalColors, FontFamily } from "../../../global-files/variables";
|
|
3
|
+
|
|
4
|
+
// Container para chat fixed
|
|
5
|
+
export const Container = styled.div`
|
|
6
|
+
.boton-ch{
|
|
7
|
+
min-width: 34px;
|
|
8
|
+
min-height: 34px;
|
|
9
|
+
padding:0;
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
// Container para chat fixed
|
|
14
|
+
export const ContainerFixed = styled.div`
|
|
15
|
+
width: auto;
|
|
16
|
+
max-width: 550px;
|
|
17
|
+
min-width: 325px;
|
|
18
|
+
height: 100%;
|
|
19
|
+
flex-grow: 2;
|
|
20
|
+
background-color: white;
|
|
21
|
+
border: 1px solid #f0f0f0;
|
|
22
|
+
z-index: 1000;
|
|
23
|
+
padding: 0px;
|
|
24
|
+
@media (max-width: 1024px) {
|
|
25
|
+
width: auto;
|
|
26
|
+
max-width: 100%;
|
|
27
|
+
}
|
|
28
|
+
@media (max-width: 600px) {
|
|
29
|
+
width: 90%;
|
|
30
|
+
min-width: 300px;
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
|
|
34
|
+
export const ContainerBtnPopUpChat = styled.div`
|
|
35
|
+
border-radius: 50%;
|
|
36
|
+
height: 34px;
|
|
37
|
+
width: 34px;
|
|
38
|
+
border:1px solid ${GlobalColors.gray_light};
|
|
39
|
+
|
|
40
|
+
.container-btn-popUpChat {
|
|
41
|
+
height: inherit;
|
|
42
|
+
width: inherit;
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
min-width: 34px;
|
|
45
|
+
min-height:34px;
|
|
46
|
+
}
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
@font-face {
|
|
49
|
+
font-family: "Material Symbols Outlined";
|
|
50
|
+
font-style: normal;
|
|
51
|
+
font-weight: 100 700;
|
|
52
|
+
src: url(https://fonts.gstatic.com/s/materialsymbolsoutlined/v68/kJEhBvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oFsLjBuVY.woff2)
|
|
53
|
+
format("woff2");
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.iconos-out {
|
|
57
|
+
font-family: "Material Symbols Outlined";
|
|
58
|
+
font-size: 18px;
|
|
59
|
+
//line-height: 1;
|
|
60
|
+
margin-top: 10px;
|
|
61
|
+
}
|
|
62
|
+
.iconos-out {
|
|
63
|
+
font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48;
|
|
64
|
+
color: #B64545;
|
|
65
|
+
}
|
|
66
|
+
.iconos-grises {
|
|
67
|
+
font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48;
|
|
68
|
+
color: ${GlobalColors.gray};
|
|
69
|
+
}
|
|
70
|
+
`;
|
|
71
|
+
|
|
72
|
+
export const ContainerPopUp = styled.div`
|
|
73
|
+
position: fixed;
|
|
74
|
+
top: 20px;
|
|
75
|
+
right: 23px;
|
|
76
|
+
bottom: 20px;
|
|
77
|
+
box-shadow: 0px 2px 10px 0px #00000073;
|
|
78
|
+
z-index: 1000;
|
|
79
|
+
width: calc(100% - 50px);
|
|
80
|
+
max-width: 550px;
|
|
81
|
+
min-width: 325px;
|
|
82
|
+
border-radius: 10px;
|
|
83
|
+
background: white;
|
|
84
|
+
padding: 0px;
|
|
85
|
+
`;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { CompleteServices } from "./index";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/organisms/CompleteServices",
|
|
5
|
+
component: CompleteServices,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = (args) => <CompleteServices {...args} />;
|
|
9
|
+
|
|
10
|
+
export const CompleteServicesDefault = Template.bind({});
|
|
11
|
+
CompleteServicesDefault.args = {
|
|
12
|
+
activeRetailer:{
|
|
13
|
+
id:34,
|
|
14
|
+
image:"https://content-management-images.s3.amazonaws.com/retailers/34.png",
|
|
15
|
+
name:"San Pablo",
|
|
16
|
+
services:["AA", "AP", "AA"]
|
|
17
|
+
},
|
|
18
|
+
headerData:{
|
|
19
|
+
"orderId": 15275,
|
|
20
|
+
"status": "AA",
|
|
21
|
+
"datasheet_status": "AA",
|
|
22
|
+
"prio": "none",
|
|
23
|
+
"version": 3,
|
|
24
|
+
"description_status": "AA",
|
|
25
|
+
"images_status": "AA",
|
|
26
|
+
"brand": null,
|
|
27
|
+
"retailerOrder": 0,
|
|
28
|
+
"missing": {
|
|
29
|
+
"datasheet": null,
|
|
30
|
+
"descriptions": null,
|
|
31
|
+
"images": null
|
|
32
|
+
},
|
|
33
|
+
"services": {
|
|
34
|
+
"datasheets": 1,
|
|
35
|
+
"descriptions": 1,
|
|
36
|
+
"images": 1
|
|
37
|
+
},
|
|
38
|
+
"article": {
|
|
39
|
+
"category": "Abarrotes|Abarrotes Secos|Frutos Secos",
|
|
40
|
+
"company_name": "GRUPO BRAHMA",
|
|
41
|
+
"country": "México",
|
|
42
|
+
"id_category": "11",
|
|
43
|
+
"id_datasheet_especialist": 54,
|
|
44
|
+
"id_datasheet_facilitator": 52,
|
|
45
|
+
"id_description_especialist": 54,
|
|
46
|
+
"id_description_facilitator": 52,
|
|
47
|
+
"id_images_especialist": 55,
|
|
48
|
+
"id_images_facilitator": 53,
|
|
49
|
+
"id_order": 15275,
|
|
50
|
+
"id_article": 39485,
|
|
51
|
+
"id_auditor": 37,
|
|
52
|
+
"name": "Mix de nueces",
|
|
53
|
+
"timestamp": "2023-07-14T21:03:19.000Z",
|
|
54
|
+
"upc": "7543453453"
|
|
55
|
+
},
|
|
56
|
+
"retailers": [
|
|
57
|
+
{
|
|
58
|
+
"id": 34,
|
|
59
|
+
"name": "San Pablo",
|
|
60
|
+
"services": [
|
|
61
|
+
"AA",
|
|
62
|
+
"AP",
|
|
63
|
+
"AA"
|
|
64
|
+
],
|
|
65
|
+
"image": "https://content-management-images.s3.amazonaws.com/retailers/34.png"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"statusByRetailer": {
|
|
69
|
+
"34": {
|
|
70
|
+
"datasheet": "AA",
|
|
71
|
+
"description": "AA",
|
|
72
|
+
"images": "AA"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"retailersAvailable": [
|
|
76
|
+
{
|
|
77
|
+
"id": 34,
|
|
78
|
+
"name": "San Pablo"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"categoryName": "Abarrotes|Abarrotes Secos|Frutos Secos",
|
|
82
|
+
"upc": "7543453453",
|
|
83
|
+
"id_article": 39485,
|
|
84
|
+
"id_order": 15275
|
|
85
|
+
},
|
|
86
|
+
showApproveRejectAll:true,
|
|
87
|
+
showValidationButtons:true,
|
|
88
|
+
text:"Descripción",
|
|
89
|
+
showValidation:true,
|
|
90
|
+
missingData:1,
|
|
91
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { Container } from "./styles";
|
|
2
|
+
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
3
|
+
import { useEffect, useRef } from "react";
|
|
4
|
+
import { ServiceDataValidator } from "../../molecules/ServiceDataValidator";
|
|
5
|
+
import { Button } from "../../atoms/GeneralButton";
|
|
6
|
+
|
|
7
|
+
export const CompleteServices = ({
|
|
8
|
+
headerData,
|
|
9
|
+
activeRetailer,
|
|
10
|
+
setActiveRetailer,
|
|
11
|
+
showValidationButtons,
|
|
12
|
+
showApproveRejectAll,
|
|
13
|
+
approveAll,
|
|
14
|
+
rejectAll,
|
|
15
|
+
approve,
|
|
16
|
+
reject,
|
|
17
|
+
complete = false,
|
|
18
|
+
missingData = 1,
|
|
19
|
+
onClick
|
|
20
|
+
}) => {
|
|
21
|
+
const headerTop = useRef();
|
|
22
|
+
return (
|
|
23
|
+
<Container
|
|
24
|
+
fontFamily={FontFamily.Raleway}
|
|
25
|
+
color={GlobalColors.original_magenta}
|
|
26
|
+
ref={headerTop}
|
|
27
|
+
>
|
|
28
|
+
<div className="service-cont">
|
|
29
|
+
<ServiceDataValidator
|
|
30
|
+
headerData={headerData}
|
|
31
|
+
activeRetailer={activeRetailer}
|
|
32
|
+
setActiveRetailer={setActiveRetailer}
|
|
33
|
+
showValidationButtons={showValidationButtons}
|
|
34
|
+
showApproveRejectAll={showApproveRejectAll}
|
|
35
|
+
approveAll={approveAll}
|
|
36
|
+
rejectAll={rejectAll}
|
|
37
|
+
approve={approve}
|
|
38
|
+
reject={reject}
|
|
39
|
+
text={"Descripción"}
|
|
40
|
+
showValidation={true}
|
|
41
|
+
complete={complete}
|
|
42
|
+
missingData={missingData}
|
|
43
|
+
></ServiceDataValidator>
|
|
44
|
+
<ServiceDataValidator
|
|
45
|
+
headerData={headerData}
|
|
46
|
+
activeRetailer={activeRetailer}
|
|
47
|
+
setActiveRetailer={setActiveRetailer}
|
|
48
|
+
showValidationButtons={showValidationButtons}
|
|
49
|
+
showApproveRejectAll={showApproveRejectAll}
|
|
50
|
+
approveAll={approveAll}
|
|
51
|
+
rejectAll={rejectAll}
|
|
52
|
+
approve={approve}
|
|
53
|
+
reject={reject}
|
|
54
|
+
text={"Ficha Técnica"}
|
|
55
|
+
showValidation={false}
|
|
56
|
+
complete={complete}
|
|
57
|
+
missingData={missingData}
|
|
58
|
+
></ServiceDataValidator>
|
|
59
|
+
<ServiceDataValidator
|
|
60
|
+
headerData={headerData}
|
|
61
|
+
activeRetailer={activeRetailer}
|
|
62
|
+
setActiveRetailer={setActiveRetailer}
|
|
63
|
+
showValidationButtons={showValidationButtons}
|
|
64
|
+
showApproveRejectAll={showApproveRejectAll}
|
|
65
|
+
approveAll={approveAll}
|
|
66
|
+
rejectAll={rejectAll}
|
|
67
|
+
approve={approve}
|
|
68
|
+
reject={reject}
|
|
69
|
+
text={"Imágenes"}
|
|
70
|
+
showValidation={false}
|
|
71
|
+
complete={complete}
|
|
72
|
+
missingData={missingData}
|
|
73
|
+
></ServiceDataValidator>
|
|
74
|
+
</div>
|
|
75
|
+
<Button
|
|
76
|
+
onClick={onClick}
|
|
77
|
+
buttonType="general-button-sol"
|
|
78
|
+
label="Solicitar a Content-oh!"
|
|
79
|
+
/>
|
|
80
|
+
</Container>
|
|
81
|
+
);
|
|
82
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { GlobalColors, FontFamily } from "../../../global-files/variables";
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
display:flex;
|
|
6
|
+
padding: 15px 15px;
|
|
7
|
+
border:0.6px solid ${GlobalColors.gray_light};
|
|
8
|
+
width: 100%;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
|
|
12
|
+
* + * {
|
|
13
|
+
margin-left: 10px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.btn-gral{
|
|
17
|
+
min-width: 34px;
|
|
18
|
+
min-height:34px;
|
|
19
|
+
}
|
|
20
|
+
.images-buttons{
|
|
21
|
+
display:flex;
|
|
22
|
+
}
|
|
23
|
+
.service-cont{
|
|
24
|
+
display:flex;
|
|
25
|
+
}
|
|
26
|
+
.service-text{
|
|
27
|
+
font-family:${FontFamily.RobotoMedium}, sans-serif;
|
|
28
|
+
font-size:12px;
|
|
29
|
+
font-weight: 500;
|
|
30
|
+
color:${GlobalColors.gray};
|
|
31
|
+
}
|
|
32
|
+
.service-complete {
|
|
33
|
+
color:${GlobalColors.black}!important;
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
@@ -22,7 +22,9 @@ export const DashboardMetric = ({
|
|
|
22
22
|
}) => {
|
|
23
23
|
const labels =
|
|
24
24
|
type === "doughnut"
|
|
25
|
-
? Object.
|
|
25
|
+
? Object.entries(dataObject).map(
|
|
26
|
+
([key, value]) => key !== "NS" && `${getFullStatus(key)} (${value})`
|
|
27
|
+
)
|
|
26
28
|
: Object.keys(dataObject);
|
|
27
29
|
const newObject =
|
|
28
30
|
type === "doughnut" ? removeOldStatus(dataObject) : dataObject;
|
|
@@ -63,10 +65,11 @@ export const DashboardMetric = ({
|
|
|
63
65
|
}, 0);
|
|
64
66
|
const { raw } = element.$context;
|
|
65
67
|
const operation = 100 * (raw / sum);
|
|
66
|
-
const percent =
|
|
68
|
+
const percent = `${
|
|
67
69
|
((operation + "").includes(".")
|
|
68
70
|
? (100 * (raw / sum)).toFixed(2)
|
|
69
|
-
: 100 * (raw / sum)) + "%"
|
|
71
|
+
: 100 * (raw / sum)) + "%"
|
|
72
|
+
} - ${raw}`;
|
|
70
73
|
return showPercent ? percent : raw;
|
|
71
74
|
},
|
|
72
75
|
},
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { DragAndDropPhases } from "./index";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/organisms/DragAndDropPhases",
|
|
5
|
+
component: DragAndDropPhases,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = (args) => <DragAndDropPhases {...args} />;
|
|
9
|
+
|
|
10
|
+
export const DragAndDropPhasesDefault = Template.bind({});
|
|
11
|
+
DragAndDropPhasesDefault.args = {
|
|
12
|
+
items :[
|
|
13
|
+
{ grupos: ["Impuestos", "Legal"] },
|
|
14
|
+
{ grupos: ["Legal", "Jefe comercial"] },
|
|
15
|
+
{ grupos: ["Finanzas", "Datos maestros"] },
|
|
16
|
+
],
|
|
17
|
+
grupos: [
|
|
18
|
+
{
|
|
19
|
+
id:1,
|
|
20
|
+
name:"Impuestos",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id:2,
|
|
24
|
+
name:"Legal",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id:3,
|
|
28
|
+
name:"Jefe comercial"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id:4,
|
|
32
|
+
name:"Finanzas"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id:5,
|
|
36
|
+
name:"Datos maestros"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
token:"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIwZjQyNDdkZi1mMDJmLTRjYjgtOTA5YS1lNjI2NDlkMzQ3ODIiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6IjBmNDI0N2RmLWYwMmYtNGNiOC05MDlhLWU2MjY0OWQzNDc4MiIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiIzMTJjMzkzOC0yODFlLTRjZTMtOGQwMC1lNDJmMDJhMjliNDkiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTcwMTgwNDA2MywibmFtZSI6IlByb3ZlZWRvciBVbm8gUmFkaW9zaGFjayIsInBob25lX251bWJlciI6Iis1MjEyMzQ1Njc4OTgiLCJleHAiOjE3MDE4MDc2NjIsImlhdCI6MTcwMTgwNDA2MywiZW1haWwiOiJwcm92ZWVkb3JyYWRpb3NoYWNrdW5vQGFsbGZyZWVtYWlsLm5ldCJ9.TlytxDFcBq6dMXaDGqIQ2Dr3P81JQgIJ2k8DgfVKvHmmJAyfj5hZcdaWPBCW_qXT_93HtXje2fmQuyTJeN4pL_AXkEEQJsi6Ye-8ipteb616OFLLm8AkMV7NmxyYn59yfY9bPoWmanTjicONFNtL_SOACebXUI4c1uZtFmMWMvAR29l_89uj3e5J-ZrS1PQn36Eid66LYtV7lBsKAn3JJeftDiXx750AHERXjoXdzHwjJttm4jmMZ4LJPk8efuvZWdPhcgXJ-4CuvWNbjxCmFiDkxSjFK_qLix73HtoCLWee-FJElqxW2ZjTflOiRZknmt2M-7kQj4FzhgEK3n6jyg"
|
|
40
|
+
}
|