contentoh-components-library 21.5.3 → 21.5.4
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/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 +148 -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
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
font-family: ${FontFamily.Raleway_500};
|
|
6
|
+
color: ${GlobalColors.s5};
|
|
7
|
+
font-size: 14px;
|
|
8
|
+
line-height: 21px;
|
|
9
|
+
border-bottom: 2px solid ${GlobalColors.s3};
|
|
10
|
+
width: 149px;
|
|
11
|
+
padding-bottom: 5px;
|
|
12
|
+
transition: 0.1s all;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
|
|
15
|
+
&.active {
|
|
16
|
+
font-size: 18px;
|
|
17
|
+
border-bottom: 2px solid ${GlobalColors.magenta_s2};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
`;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TooltipLight } from "./index";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/atoms/TooltipLight",
|
|
5
|
+
component: TooltipLight,
|
|
6
|
+
argTypes: {
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const Template = (args) => <TooltipLight {...args} />;
|
|
11
|
+
|
|
12
|
+
export const TooltipLightDefault = Template.bind({});
|
|
13
|
+
TooltipLightDefault.args = {
|
|
14
|
+
description:"Aquí va la descripción del campo",
|
|
15
|
+
required:true,
|
|
16
|
+
min_chars:"10",
|
|
17
|
+
max_chars:"100",
|
|
18
|
+
min_words:"5",
|
|
19
|
+
max_words:"25",
|
|
20
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Container, LightTooltip } from "./styles";
|
|
2
|
+
import IconInfo from "../../../assets/images/Icons/info.svg";
|
|
3
|
+
import IconInfoNR from "../../../assets/images/Icons/infoNR.svg";
|
|
4
|
+
import Tooltip, { tooltipClasses } from '@mui/material/Tooltip';
|
|
5
|
+
import { styled } from '@mui/material/styles';
|
|
6
|
+
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
7
|
+
import React from "react";
|
|
8
|
+
|
|
9
|
+
export const TooltipLight = ({description, description_small, required, min_chars, max_chars, min_words, max_words}) => {
|
|
10
|
+
const LightTooltip = styled(({ className, ...props }) => (
|
|
11
|
+
<Tooltip {...props} classes={{ popper: className }}/>
|
|
12
|
+
))(({ theme }) => ({
|
|
13
|
+
[`& .${tooltipClasses.tooltip}`]: {
|
|
14
|
+
className: "tooltip",
|
|
15
|
+
backgroundColor: GlobalColors.white,
|
|
16
|
+
color: "rgba(0, 0, 0, 0.87)",
|
|
17
|
+
boxShadow: theme.shadows[1],
|
|
18
|
+
fontSize: 12,
|
|
19
|
+
fontFamily: `${FontFamily.Roboto}, sans-serif`,
|
|
20
|
+
lineHeight:1.2,
|
|
21
|
+
},
|
|
22
|
+
}));
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<LightTooltip
|
|
26
|
+
title={
|
|
27
|
+
<div className="container-tooltip">
|
|
28
|
+
<p className="obligatorio"><b>{required ? "Obligatorio" : "Opcional"}</b></p>
|
|
29
|
+
<p className="container-tooltip">{description}</p>
|
|
30
|
+
{/* FIXME : cambiar la validacion para que solo sea un booleano si se ocupa min y max */}
|
|
31
|
+
{description_small && <p className="container-tooltip"><small>{description_small}</small></p>}
|
|
32
|
+
{max_chars && <br/>}
|
|
33
|
+
{max_chars && <p><small className="min-chars"> Mínimo de caracteres: {min_chars !== null ? min_chars : 0}</small></p>}
|
|
34
|
+
{max_chars && <p><small className="max-chars">Máximo de caracteres: {max_chars}</small></p>}
|
|
35
|
+
{max_words && <br/>}
|
|
36
|
+
{max_words && <p><small className="min-words">Mínimo de palabras: {min_words !== null ? min_words : 0}</small> </p>}
|
|
37
|
+
{max_words && <p><small className="max-words">Máximo de palabras: {max_words}</small></p>}
|
|
38
|
+
|
|
39
|
+
</div>
|
|
40
|
+
}>
|
|
41
|
+
<Container className="">
|
|
42
|
+
{required ? <img className="icon" src={IconInfo} alt="iconInfo" /> : <img className="icon" src={IconInfoNR} alt="iconInfo" /> }
|
|
43
|
+
</Container>
|
|
44
|
+
</LightTooltip>
|
|
45
|
+
);
|
|
46
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
gap:4px;
|
|
8
|
+
#atr-alto {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
}
|
|
13
|
+
.caja-borde {
|
|
14
|
+
font-family: ${FontFamily.RobotoRegular}, sans-serif;
|
|
15
|
+
font-size: 12px;
|
|
16
|
+
line-height: 1.2;
|
|
17
|
+
border-radius: ${({ borderType }) => {
|
|
18
|
+
return borderType?.toLowerCase() === "rectangle"
|
|
19
|
+
? "5px"
|
|
20
|
+
: borderType?.toLowerCase() === "circle"
|
|
21
|
+
? "50%"
|
|
22
|
+
: "none";
|
|
23
|
+
}};
|
|
24
|
+
}
|
|
25
|
+
span {
|
|
26
|
+
font-family: ${FontFamily.RobotoRegular}, sans-serif;
|
|
27
|
+
font-size: 12px;
|
|
28
|
+
line-height: 1.2;
|
|
29
|
+
font-weight: 600;
|
|
30
|
+
}
|
|
31
|
+
.icon {
|
|
32
|
+
width: 8px;
|
|
33
|
+
height: 8px;
|
|
34
|
+
}
|
|
35
|
+
.required-text {
|
|
36
|
+
color: red;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.obligatorio{
|
|
40
|
+
font-family: ${FontFamily.RobotoMedium}, sans-serif;
|
|
41
|
+
font-weight:700;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.min-chars{
|
|
45
|
+
font-family: ${FontFamily.RobotoRegular}, sans-serif;
|
|
46
|
+
font-size: 10px;
|
|
47
|
+
margin-top:10px;
|
|
48
|
+
}
|
|
49
|
+
.max-chars{
|
|
50
|
+
font-family: ${FontFamily.RobotoRegular}, sans-serif;
|
|
51
|
+
font-size: 10px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.min-words{
|
|
55
|
+
font-family: ${FontFamily.RobotoRegular}, sans-serif;
|
|
56
|
+
font-size: 10px;
|
|
57
|
+
margin-top:10px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.max-words{
|
|
61
|
+
font-family: ${FontFamily.RobotoRegular}, sans-serif;
|
|
62
|
+
font-size: 10px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
`;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { WordsMissing } from "./index";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/atoms/WordsMissing",
|
|
5
|
+
component: WordsMissing,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = (args) => <WordsMissing {...args} />;
|
|
9
|
+
|
|
10
|
+
export const DefaultWordsMissing = Template.bind({});
|
|
11
|
+
|
|
12
|
+
DefaultWordsMissing.args = { text: "hola mundo" };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import ReactQuill from "react-quill";
|
|
2
|
+
import "react-quill/dist/quill.snow.css";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { Container } from "./styles";
|
|
5
|
+
|
|
6
|
+
export const WordsMissing = ({
|
|
7
|
+
mainValue = "",
|
|
8
|
+
inputId,
|
|
9
|
+
articleId,
|
|
10
|
+
updatedDescriptions,
|
|
11
|
+
setUpdatedDescriptions,
|
|
12
|
+
isRequired,
|
|
13
|
+
maxWords,
|
|
14
|
+
}) => {
|
|
15
|
+
const [inputValue, setInputValue] = useState(mainValue);
|
|
16
|
+
const [selection, setSelection] = useState(false);
|
|
17
|
+
const [position, setPosition] = useState({ left: 0, top: 0 });
|
|
18
|
+
const [charsCounter, setCharsCounter] = useState(0);
|
|
19
|
+
const [quillState, setQuillState] = useState({});
|
|
20
|
+
const maxLength = maxWords;
|
|
21
|
+
|
|
22
|
+
const getValue = (value) => {
|
|
23
|
+
let temp = value
|
|
24
|
+
.replace(/\n/gm, "<br>")
|
|
25
|
+
.replace(/\ /gm, " ")
|
|
26
|
+
.replace(/\&/gm, "&");
|
|
27
|
+
return temp;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
//const quillRef = useRef();
|
|
31
|
+
const setQuill = (ref) => {
|
|
32
|
+
if (!ref || ref === null) return;
|
|
33
|
+
if (typeof ref.getEditor !== "function") return;
|
|
34
|
+
setQuillState(ref.getEditor());
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const valueFormater = (value) => {
|
|
38
|
+
return value
|
|
39
|
+
.replace(/<\/p><p>/gm, "\n")
|
|
40
|
+
.replace(/<\/?br>|<\/?p>/gm, "")
|
|
41
|
+
.replace(/\ /gm, " ")
|
|
42
|
+
.replace(/\&/gm, "&");
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<Container
|
|
48
|
+
isRequired={
|
|
49
|
+
isRequired &&
|
|
50
|
+
(inputValue.replace(/<.*?>/gm, "").length === 0 || !inputValue)
|
|
51
|
+
}
|
|
52
|
+
selection={selection}
|
|
53
|
+
position={position}
|
|
54
|
+
>
|
|
55
|
+
<p className="description-limit">
|
|
56
|
+
P. {charsCounter}/{maxLength}
|
|
57
|
+
</p>
|
|
58
|
+
</Container>
|
|
59
|
+
);
|
|
60
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { GlobalColors, FontFamily } from "../../../global-files/variables";
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
.description-limit {
|
|
6
|
+
font-size: 8px;
|
|
7
|
+
font-family: ${FontFamily.Roboto}, sans-serif;
|
|
8
|
+
color: ${GlobalColors.gray_medium};
|
|
9
|
+
}
|
|
10
|
+
`;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AddGroup } from "./index";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "Components/molecules/AddGroup",
|
|
6
|
+
component: AddGroup,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const Template = (args) => <AddGroup {...args}/>;
|
|
10
|
+
|
|
11
|
+
export const AddGroupDefault = Template.bind({});
|
|
12
|
+
|
|
13
|
+
AddGroupDefault.args = {
|
|
14
|
+
image: bags,
|
|
15
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
|
+
import { Container } from "./styles.js";
|
|
3
|
+
import searchIcon from "../../../assets/images/Icons/search.svg";
|
|
4
|
+
import add from "../../../assets/images/Icons/addv2.svg";
|
|
5
|
+
|
|
6
|
+
export const AddGroup = ({
|
|
7
|
+
id,
|
|
8
|
+
items = [],
|
|
9
|
+
value = [],
|
|
10
|
+
defaultSearch = "",
|
|
11
|
+
defaultOption = "",
|
|
12
|
+
onChange,
|
|
13
|
+
placeholder = "",
|
|
14
|
+
}) => {
|
|
15
|
+
const [itemsSelected, setItemsSelected] = useState(value);
|
|
16
|
+
const [search, setSearch] = useState(defaultSearch);
|
|
17
|
+
const [containerVisible, setContainerVisible] = useState(false);
|
|
18
|
+
const itemsFiltered = (() => {
|
|
19
|
+
if (!search) return items;
|
|
20
|
+
|
|
21
|
+
return items.filter((item) =>
|
|
22
|
+
item.label.toLowerCase().includes(search.toLowerCase())
|
|
23
|
+
);
|
|
24
|
+
})();
|
|
25
|
+
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
onChange && onChange(itemsSelected);
|
|
28
|
+
}, [itemsSelected]);
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<Container id={id}>
|
|
32
|
+
<button
|
|
33
|
+
className="custom-select"
|
|
34
|
+
onClick={() => setContainerVisible(!containerVisible)}
|
|
35
|
+
>
|
|
36
|
+
<img src={add} className="add-icon" alt="add icon" />
|
|
37
|
+
</button>
|
|
38
|
+
{containerVisible && (
|
|
39
|
+
<div className="container-def">
|
|
40
|
+
<div className="search-bar">
|
|
41
|
+
<img src={searchIcon} className="search-icon" alt="search icon" />
|
|
42
|
+
<input
|
|
43
|
+
type="text"
|
|
44
|
+
className="search"
|
|
45
|
+
onChange={(e) => {
|
|
46
|
+
setSearch(e.target.value);
|
|
47
|
+
}}
|
|
48
|
+
value={search}
|
|
49
|
+
placeholder={placeholder}
|
|
50
|
+
></input>
|
|
51
|
+
</div>
|
|
52
|
+
<p className="default-option">{defaultOption}</p>
|
|
53
|
+
{itemsFiltered.map((item, i) => {
|
|
54
|
+
return (
|
|
55
|
+
<div className="container-options">
|
|
56
|
+
<div key={i} className="options">
|
|
57
|
+
<input
|
|
58
|
+
id="custom-check"
|
|
59
|
+
className="custom-check"
|
|
60
|
+
type="checkbox"
|
|
61
|
+
checked={itemsSelected.includes(item.value)}
|
|
62
|
+
onChange={(e) => {
|
|
63
|
+
setItemsSelected((prev) => {
|
|
64
|
+
const existItem = prev.find((e) => e === item.value);
|
|
65
|
+
|
|
66
|
+
if (existItem) {
|
|
67
|
+
return [...prev].filter((e) => e !== item.value);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return [...prev, item.value];
|
|
71
|
+
});
|
|
72
|
+
}}
|
|
73
|
+
/>
|
|
74
|
+
<label htmlFor="" className="texto">
|
|
75
|
+
{item.label}
|
|
76
|
+
</label>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
);
|
|
80
|
+
})}
|
|
81
|
+
</div>)}
|
|
82
|
+
</Container>
|
|
83
|
+
);
|
|
84
|
+
};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import checked from "../../../assets/images/checkBox/checkverde.svg";
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
.container-def {
|
|
6
|
+
margin-top: 10px;
|
|
7
|
+
box-shadow: 0px 2px 4px #00000040;
|
|
8
|
+
border-radius: 5px;
|
|
9
|
+
background-color: #fff;
|
|
10
|
+
padding-bottom: 10px;
|
|
11
|
+
position: absolute;
|
|
12
|
+
z-index: 10;
|
|
13
|
+
max-height: 500px;
|
|
14
|
+
overflow: auto;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.custom-select {
|
|
18
|
+
ont-family: RobotoRegular,sans-serif;
|
|
19
|
+
font-size: 12px;
|
|
20
|
+
display: -webkit-box;
|
|
21
|
+
display: -webkit-flex;
|
|
22
|
+
display: -ms-flexbox;
|
|
23
|
+
display: flex;
|
|
24
|
+
width: 30px;
|
|
25
|
+
height: 30px;
|
|
26
|
+
padding: 7px 7px;
|
|
27
|
+
-webkit-box-pack: justify;
|
|
28
|
+
-webkit-justify-content: space-between;
|
|
29
|
+
-ms-flex-pack: justify;
|
|
30
|
+
justify-content: space-between;
|
|
31
|
+
border-radius: 50px;
|
|
32
|
+
background-color: #fff;
|
|
33
|
+
border: 1px solid #E33AA9;
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.search-bar{
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
padding: 0px 5px;
|
|
41
|
+
border-bottom: 1px solid #f0f0f0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.search {
|
|
45
|
+
border: none;
|
|
46
|
+
height: 34px;
|
|
47
|
+
padding: 5px 10px;
|
|
48
|
+
color: #707070;
|
|
49
|
+
}
|
|
50
|
+
.search::placeholder {
|
|
51
|
+
display: inline;
|
|
52
|
+
color: #707070;
|
|
53
|
+
font-family: Avenir Next;
|
|
54
|
+
font-weight: 500;
|
|
55
|
+
font-size: 13px;
|
|
56
|
+
line-height: 15px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.container-options {
|
|
60
|
+
padding: 5px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.default-option {
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
padding: 10px 10px 5px;
|
|
66
|
+
color: #817393;
|
|
67
|
+
font-family: Avenir Next;
|
|
68
|
+
font-weight: 500;
|
|
69
|
+
font-size: 13px;
|
|
70
|
+
line-height: 15px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.options {
|
|
74
|
+
height: 24px;
|
|
75
|
+
gap: 10px;
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.custom-check {
|
|
81
|
+
border: 3px solid red;
|
|
82
|
+
background-color: #D9D9D9;
|
|
83
|
+
background-size: 100% 100%;
|
|
84
|
+
background-position: center;
|
|
85
|
+
background-repeat: no-repeat;
|
|
86
|
+
width: 300px;
|
|
87
|
+
height: 300px;
|
|
88
|
+
appearance: none;
|
|
89
|
+
display: inline-block;
|
|
90
|
+
vertical-align: middle;
|
|
91
|
+
background-origin: border-box;
|
|
92
|
+
padding: 0;
|
|
93
|
+
user-select: none;
|
|
94
|
+
flex-shrink: 0;
|
|
95
|
+
border-radius: 3px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.custom-check {
|
|
99
|
+
cursor: pointer;
|
|
100
|
+
background-color: #D9D9D9;
|
|
101
|
+
width: 16px;
|
|
102
|
+
height: 16px;
|
|
103
|
+
appearance: none;
|
|
104
|
+
border: 1px solid #cbcbcb;
|
|
105
|
+
transition: background-color 0.3s ease-in-out;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.custom-check:checked {
|
|
109
|
+
background-color: #FFFFFF;
|
|
110
|
+
border: none;
|
|
111
|
+
background-image: url(${checked});
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.custom-check:focus {
|
|
115
|
+
border-color: rgb(198, 198, 198);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.custom-check:disabled {
|
|
119
|
+
background-color: rgb(198, 198, 198);
|
|
120
|
+
background-image: none;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.custom-check:disabled:checked {
|
|
124
|
+
background-color: rgb(198, 198, 198);
|
|
125
|
+
background-image: url(${checked});
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.texto {
|
|
129
|
+
display: inline;
|
|
130
|
+
color: #817393;
|
|
131
|
+
font-family: Avenir Next;
|
|
132
|
+
font-weight: 500;
|
|
133
|
+
font-size: 13px;
|
|
134
|
+
line-height: 15px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.add-icon{
|
|
138
|
+
width:13px;
|
|
139
|
+
height: 13px;
|
|
140
|
+
}
|
|
141
|
+
`;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AsignationInfo } from "./index";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/molecules/AsignationInfo",
|
|
5
|
+
component: AsignationInfo,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = (args) => <AsignationInfo {...args} />;
|
|
9
|
+
|
|
10
|
+
export const AsignationInfoDefault = Template.bind({});
|
|
11
|
+
AsignationInfoDefault.args = {
|
|
12
|
+
status: "AA",
|
|
13
|
+
image: {
|
|
14
|
+
src: "https://image.shutterstock.com/image-illustration/3d-render-generic-drug-pills-260nw-709112806.jpg",
|
|
15
|
+
},
|
|
16
|
+
imagesSection: true,
|
|
17
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Container } from "./styles";
|
|
2
|
+
import { ScreenHeader } from "../../atoms/ScreenHeader/index";
|
|
3
|
+
import { Avatar } from "../../atoms/Avatar";
|
|
4
|
+
import { Status as StatusTag } from "../../atoms/Status/index";
|
|
5
|
+
import { useEffect, useState } from "react";
|
|
6
|
+
import { AsignationOption } from "../../atoms/AsignationOption/index";
|
|
7
|
+
import { getProfilePicture } from "../../../global-files/data";
|
|
8
|
+
export const AsignationInfo = ({
|
|
9
|
+
status = "-",
|
|
10
|
+
percent = 0,
|
|
11
|
+
assignationsImages,
|
|
12
|
+
setAssignation,
|
|
13
|
+
isRetailer,
|
|
14
|
+
id = "default-id",
|
|
15
|
+
canAssign,
|
|
16
|
+
}) => {
|
|
17
|
+
const [showAsignationPanel, setShowAsignationPanel] = useState(false);
|
|
18
|
+
const [assignationType, setAssignationType] = useState("facilitator");
|
|
19
|
+
|
|
20
|
+
const closeAsignations = (e) => {
|
|
21
|
+
if (!e.target.closest("#default-id") && showAsignationPanel) {
|
|
22
|
+
document.removeEventListener("click", closeAsignations, false);
|
|
23
|
+
setShowAsignationPanel(false);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
if (showAsignationPanel) {
|
|
29
|
+
document.addEventListener("click", closeAsignations, false);
|
|
30
|
+
}
|
|
31
|
+
}, [showAsignationPanel]);
|
|
32
|
+
return (
|
|
33
|
+
<Container id={id}>
|
|
34
|
+
<div className="assignations-container">
|
|
35
|
+
{assignationsImages?.assignations?.map((assignation, index) => (
|
|
36
|
+
<Avatar
|
|
37
|
+
key={index + "-" + assignation.id}
|
|
38
|
+
imageType={"small-image"}
|
|
39
|
+
image={getProfilePicture(assignation.id, 20, 20)}
|
|
40
|
+
altText="user profile image"
|
|
41
|
+
onClick={(e) => {
|
|
42
|
+
e.preventDefault();
|
|
43
|
+
e.stopPropagation();
|
|
44
|
+
setShowAsignationPanel(true);
|
|
45
|
+
setAssignationType(assignation?.collaboratorType);
|
|
46
|
+
}}
|
|
47
|
+
/>
|
|
48
|
+
))}
|
|
49
|
+
</div>
|
|
50
|
+
<ScreenHeader
|
|
51
|
+
text={"Asig."}
|
|
52
|
+
color={"#969696"}
|
|
53
|
+
fontFamily={"Avenir Next"}
|
|
54
|
+
headerType={"input-name-header"}
|
|
55
|
+
/>
|
|
56
|
+
{showAsignationPanel && canAssign && (
|
|
57
|
+
<div className="asignation-panel">
|
|
58
|
+
<div className="asignation-header">
|
|
59
|
+
<div className="asignation-status">
|
|
60
|
+
<p>Estatus</p>
|
|
61
|
+
<StatusTag statusType={status} ovalForm={true} />
|
|
62
|
+
</div>
|
|
63
|
+
<div className="asignation-percent">
|
|
64
|
+
<p>Estatus</p>
|
|
65
|
+
<p className="percent">{percent}%</p>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
<div className="asignations-list">
|
|
69
|
+
{assignationsImages?.collaborators !== undefined ? (
|
|
70
|
+
assignationsImages?.collaborators[assignationType]?.map(
|
|
71
|
+
(asignation, index) => (
|
|
72
|
+
<AsignationOption
|
|
73
|
+
key={index + "-" + asignation.name}
|
|
74
|
+
profileImage={getProfilePicture(
|
|
75
|
+
asignation?.id_user,
|
|
76
|
+
40,
|
|
77
|
+
40
|
|
78
|
+
)}
|
|
79
|
+
onClick={() => {
|
|
80
|
+
setAssignation(assignationType, asignation?.id_user);
|
|
81
|
+
}}
|
|
82
|
+
name={asignation.name}
|
|
83
|
+
/>
|
|
84
|
+
)
|
|
85
|
+
)
|
|
86
|
+
) : (
|
|
87
|
+
<p className="no-asignations">Sin personas para asignar</p>
|
|
88
|
+
)}
|
|
89
|
+
</div>
|
|
90
|
+
{isRetailer === 1 && (
|
|
91
|
+
<div className="default-asignations-list">
|
|
92
|
+
<AsignationOption
|
|
93
|
+
asignationType={"provider"}
|
|
94
|
+
name={"Solicitar a"}
|
|
95
|
+
team={"Proveedor"}
|
|
96
|
+
/>
|
|
97
|
+
<AsignationOption
|
|
98
|
+
asignationType={"team"}
|
|
99
|
+
name={"Solicitar a"}
|
|
100
|
+
team={"Content-oh!"}
|
|
101
|
+
/>
|
|
102
|
+
</div>
|
|
103
|
+
)}
|
|
104
|
+
</div>
|
|
105
|
+
)}
|
|
106
|
+
</Container>
|
|
107
|
+
);
|
|
108
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
position: relative;
|
|
8
|
+
border-radius: 117px;
|
|
9
|
+
padding: 4px 5px;
|
|
10
|
+
display: flex;
|
|
11
|
+
border: 1px solid #F0F0F0;
|
|
12
|
+
|
|
13
|
+
> * + * {
|
|
14
|
+
margin-left: 8px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.images-buttons {
|
|
18
|
+
button + * {
|
|
19
|
+
margin-left: 8px;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.assignations-container {
|
|
24
|
+
display: flex;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.asignation-panel {
|
|
29
|
+
background: ${GlobalColors.s2};
|
|
30
|
+
border: 1px solid ${GlobalColors.s3};
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.25);
|
|
33
|
+
border-radius: 4px;
|
|
34
|
+
padding: 10px 8px;
|
|
35
|
+
position: absolute;
|
|
36
|
+
top: calc(100% + 10px);
|
|
37
|
+
right: 0;
|
|
38
|
+
z-index: 10;
|
|
39
|
+
|
|
40
|
+
.asignation-header {
|
|
41
|
+
display: flex;
|
|
42
|
+
justify-content: space-between;
|
|
43
|
+
|
|
44
|
+
.asignation-status,
|
|
45
|
+
.asignation-percent {
|
|
46
|
+
& > p {
|
|
47
|
+
font-family: ${FontFamily.AvenirNext};
|
|
48
|
+
font-weight: 500;
|
|
49
|
+
font-size: 14px;
|
|
50
|
+
line-height: 16px;
|
|
51
|
+
color: ${GlobalColors.s5};
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.asignation-percent {
|
|
56
|
+
text-align: right;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
& + * {
|
|
60
|
+
margin-top: 10px;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.asignations-list {
|
|
65
|
+
min-height: 40px;
|
|
66
|
+
|
|
67
|
+
.no-asignations {
|
|
68
|
+
padding: 5px;
|
|
69
|
+
font-family: ${FontFamily.AvenirNext};
|
|
70
|
+
font-weight: 500;
|
|
71
|
+
font-size: 14px;
|
|
72
|
+
line-height: 16px;
|
|
73
|
+
color: ${GlobalColors.s5};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
& + * {
|
|
77
|
+
margin-top: 10px;
|
|
78
|
+
border-top: 1px solid ${GlobalColors.s3};
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.default-asignations-list {
|
|
83
|
+
padding-top: 10px;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
`;
|