contentoh-components-library 21.4.71 → 21.4.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/atoms/Avatar/index.js +2 -3
- package/dist/components/atoms/CheckBox/styles.js +1 -1
- package/dist/components/atoms/GeneralButton/styles.js +2 -6
- package/dist/components/atoms/InputFormatter/styles.js +3 -3
- package/dist/components/atoms/SliderToolTip/styles.js +1 -1
- package/dist/components/molecules/BoxAttribute/index.js +3 -3
- package/dist/components/molecules/BoxAttribute/styles.js +1 -1
- package/dist/components/molecules/BoxButtons/index.js +1 -0
- package/dist/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/dist/components/molecules/HeaderTop/index.js +11 -68
- package/dist/components/molecules/SignInLogin/index.js +28 -36
- package/dist/components/molecules/StripeCardSelector/CardSelector.stories.js +2 -1
- package/dist/components/organisms/Chat/Chat.stories.js +8 -27
- package/dist/components/organisms/Chat/ContainerItems/index.js +3 -19
- package/dist/components/organisms/Chat/ContainerItems/styles.js +1 -1
- package/dist/components/organisms/Chat/ContentChat/index.js +197 -350
- package/dist/components/organisms/Chat/Footer/index.js +39 -48
- package/dist/components/organisms/Chat/index.js +4 -49
- package/dist/components/organisms/Chat/styles.js +1 -1
- package/dist/components/organisms/DashboardMetric/index.js +6 -12
- package/dist/components/organisms/FullProductNameHeader/index.js +2 -2
- package/dist/components/organisms/InputGroup/index.js +10 -1
- package/dist/components/organisms/Modal/styles.js +1 -1
- package/dist/components/organisms/VersionSelector/index.js +4 -2
- package/dist/components/pages/Dashboard/Dashboard.stories.js +36 -33
- package/dist/components/pages/Dashboard/index.js +9 -37
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +38 -34
- package/dist/components/pages/ProviderProductEdition/index.js +195 -182
- package/dist/components/pages/ProviderProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +3 -7
- package/dist/components/pages/RetailerProductEdition/index.js +273 -278
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/utils.js +2 -61
- package/dist/global-files/data.js +3 -11
- package/dist/global-files/variables.js +1 -7
- package/dist/index.js +58 -201
- package/package.json +1 -2
- package/src/components/atoms/Avatar/index.js +2 -8
- package/src/components/atoms/CheckBox/styles.js +0 -2
- package/src/components/atoms/GeneralButton/styles.js +0 -46
- package/src/components/atoms/InputFormatter/styles.js +4 -9
- package/src/components/atoms/SliderToolTip/styles.js +1 -1
- package/src/components/atoms/TabSection/index.js +1 -1
- package/src/components/atoms/TabSection/styles.js +1 -1
- package/src/components/molecules/BoxAttribute/index.js +25 -32
- package/src/components/molecules/BoxAttribute/styles.js +1 -1
- package/src/components/molecules/BoxButtons/index.js +22 -23
- package/src/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/src/components/molecules/HeaderTop/index.js +6 -52
- package/src/components/molecules/SignInLogin/index.js +11 -11
- package/src/components/molecules/StripeCardSelector/CardSelector.stories.js +2 -1
- package/src/components/molecules/TagAndInput/index.js +5 -6
- package/src/components/organisms/Chat/Chat.stories.js +7 -27
- package/src/components/organisms/Chat/ContainerItems/index.js +2 -18
- package/src/components/organisms/Chat/ContainerItems/styles.js +2 -14
- package/src/components/organisms/Chat/ContentChat/index.js +12 -88
- package/src/components/organisms/Chat/Footer/index.js +0 -11
- package/src/components/organisms/Chat/index.js +4 -46
- package/src/components/organisms/Chat/styles.js +0 -4
- package/src/components/organisms/DashboardMetric/index.js +3 -6
- package/src/components/organisms/FullProductNameHeader/index.js +1 -1
- package/src/components/organisms/InputGroup/index.js +119 -131
- package/src/components/organisms/Modal/styles.js +1 -4
- package/src/components/organisms/OrderDetail/utils/Table/utils.js +16 -6
- package/src/components/organisms/VersionSelector/index.js +2 -1
- package/src/components/pages/Dashboard/Dashboard.stories.js +38 -33
- package/src/components/pages/Dashboard/index.js +7 -36
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +83 -110
- package/src/components/pages/ProviderProductEdition/index.js +152 -129
- package/src/components/pages/ProviderProductEdition/styles.js +1 -5
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +2 -6
- package/src/components/pages/RetailerProductEdition/index.js +136 -106
- package/src/components/pages/RetailerProductEdition/styles.js +0 -4
- package/src/components/pages/RetailerProductEdition/utils.js +0 -37
- package/src/global-files/data.js +16 -8
- package/src/global-files/variables.js +0 -6
- package/src/index.js +0 -11
- package/src/assets/images/Icons/infoNR.svg +0 -8
- package/src/assets/images/flagsv2/highPriority.svg +0 -3
- package/src/assets/images/flagsv2/lowPriority.svg +0 -3
- package/src/assets/images/flagsv2/mediumPriority.svg +0 -3
- package/src/assets/images/flagsv2/noPriority.svg +0 -3
- package/src/assets/images/generalButton/closeIconWhite.svg +0 -4
- package/src/assets/images/generalButton/closeIconv2.svg +0 -4
- package/src/components/atoms/CharsMissing/Wysiwyg.stories.js +0 -12
- package/src/components/atoms/CharsMissing/index.js +0 -60
- package/src/components/atoms/CharsMissing/styles.js +0 -44
- package/src/components/atoms/FeatureTagv2/FeatureTagv2.stories.js +0 -16
- package/src/components/atoms/FeatureTagv2/index.js +0 -10
- package/src/components/atoms/FeatureTagv2/styles.js +0 -56
- package/src/components/atoms/GeneralInputv2/GeneralInputv2.stories.js +0 -33
- package/src/components/atoms/GeneralInputv2/index.js +0 -155
- package/src/components/atoms/GeneralInputv2/styles.js +0 -67
- package/src/components/atoms/ImageCarousel/ImgeSlider.stories.js +0 -76
- package/src/components/atoms/ImageCarousel/index.js +0 -103
- package/src/components/atoms/ImageCarousel/styles.js +0 -79
- package/src/components/atoms/InputFormatterv2/Wysiwyg.stories.js +0 -12
- package/src/components/atoms/InputFormatterv2/index.js +0 -148
- package/src/components/atoms/InputFormatterv2/styles.js +0 -39
- package/src/components/atoms/InputImages/InputImages.stories.js +0 -19
- package/src/components/atoms/InputImages/index.js +0 -25
- package/src/components/atoms/InputImages/styles.js +0 -17
- package/src/components/atoms/NumberMandatory/NumberMandatory.stories.js +0 -19
- package/src/components/atoms/NumberMandatory/index.js +0 -16
- package/src/components/atoms/NumberMandatory/styles.js +0 -11
- package/src/components/atoms/PercentTag/PercentTag.stories.js +0 -7
- package/src/components/atoms/PercentTag/index.js +0 -9
- package/src/components/atoms/PercentTag/styles.js +0 -69
- package/src/components/atoms/PriorityFlagv2/PriorityFlagv2.stories.js +0 -20
- package/src/components/atoms/PriorityFlagv2/index.js +0 -20
- package/src/components/atoms/PriorityFlagv2/styles.js +0 -6
- package/src/components/atoms/ProductImagev2/ProductImagev2.stories.js +0 -28
- package/src/components/atoms/ProductImagev2/index.js +0 -16
- package/src/components/atoms/ProductImagev2/styles.js +0 -62
- package/src/components/atoms/Progress/Progress.stories.js +0 -25
- package/src/components/atoms/Progress/index.js +0 -74
- package/src/components/atoms/Progress/styles.js +0 -98
- package/src/components/atoms/RatingStars/RatingStars.stories.js +0 -10
- package/src/components/atoms/RatingStars/index.js +0 -31
- package/src/components/atoms/RatingStars/styles.js +0 -28
- package/src/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +0 -36
- package/src/components/atoms/RetailerCatalog/index.js +0 -49
- package/src/components/atoms/RetailerCatalog/styles.js +0 -30
- package/src/components/atoms/RetailerOption/RetailerOption.stories.js +0 -15
- package/src/components/atoms/RetailerOption/index.js +0 -53
- package/src/components/atoms/RetailerOption/styles.js +0 -41
- package/src/components/atoms/RetailersList/RetailersList.stories.js +0 -33
- package/src/components/atoms/RetailersList/index.js +0 -20
- package/src/components/atoms/RetailersList/styles.js +0 -19
- package/src/components/atoms/ScreenHeaderv2/ScreenHeaderv2.stories.js +0 -53
- package/src/components/atoms/ScreenHeaderv2/index.js +0 -134
- package/src/components/atoms/ScreenHeaderv2/styles.js +0 -103
- package/src/components/atoms/Selectv2/VersionSelect.js +0 -27
- package/src/components/atoms/Selectv2/index.js +0 -35
- package/src/components/atoms/Selectv2/style.js +0 -93
- package/src/components/atoms/TabSectionv2/TabSection.stories.js +0 -25
- package/src/components/atoms/TabSectionv2/index.js +0 -9
- package/src/components/atoms/TabSectionv2/styles.js +0 -20
- package/src/components/atoms/TooltipLight/Tooltip.stories.js +0 -20
- package/src/components/atoms/TooltipLight/index.js +0 -46
- package/src/components/atoms/TooltipLight/styles.js +0 -65
- package/src/components/atoms/UserCatalog/UserCatalog.stories.js +0 -67
- package/src/components/atoms/UserCatalog/index.js +0 -100
- package/src/components/atoms/UserCatalog/styles.js +0 -24
- package/src/components/atoms/UserOption/UserOption.stories.js +0 -25
- package/src/components/atoms/UserOption/index.js +0 -95
- package/src/components/atoms/UserOption/styles.js +0 -61
- package/src/components/atoms/UserSelector/UserSelector.stories.js +0 -25
- package/src/components/atoms/UserSelector/index.js +0 -86
- package/src/components/atoms/UserSelector/styles.js +0 -55
- package/src/components/atoms/WordsMissing/Wysiwyg.stories.js +0 -12
- package/src/components/atoms/WordsMissing/index.js +0 -60
- package/src/components/atoms/WordsMissing/styles.js +0 -10
- package/src/components/molecules/AsignationInfo/AsignationInfo.stories.js +0 -17
- package/src/components/molecules/AsignationInfo/index.js +0 -108
- package/src/components/molecules/AsignationInfo/styles.js +0 -86
- package/src/components/molecules/EditionActiveImagev2/EditionActiveImagev2.stories.js +0 -12
- package/src/components/molecules/EditionActiveImagev2/index.js +0 -15
- package/src/components/molecules/EditionActiveImagev2/styles.js +0 -7
- package/src/components/molecules/FeaturesBarv2/FeaturesBarv2.stories.js +0 -20
- package/src/components/molecules/FeaturesBarv2/index.js +0 -32
- package/src/components/molecules/FeaturesBarv2/styles.js +0 -17
- package/src/components/molecules/GalleryElementv2/GalleryElementv2.stories.js +0 -30
- package/src/components/molecules/GalleryElementv2/index.js +0 -142
- package/src/components/molecules/GalleryElementv2/styles.js +0 -119
- package/src/components/molecules/GalleryHeaderv2/GalleryHeaderv2.stories.js +0 -10
- package/src/components/molecules/GalleryHeaderv2/index.js +0 -25
- package/src/components/molecules/GalleryHeaderv2/styles.js +0 -47
- package/src/components/molecules/GridItem/GridItem.stories.js +0 -126
- package/src/components/molecules/GridItem/index.js +0 -105
- package/src/components/molecules/GridItem/styles.js +0 -104
- package/src/components/molecules/HeaderItem/ColumnItem.js +0 -9
- package/src/components/molecules/HeaderItem/HeaderItem.stories.js +0 -24
- package/src/components/molecules/HeaderItem/index.js +0 -26
- package/src/components/molecules/HeaderItem/styles.js +0 -27
- package/src/components/molecules/HeaderTopv2/HeaderTopv2.stories.js +0 -10
- package/src/components/molecules/HeaderTopv2/index.js +0 -100
- package/src/components/molecules/HeaderTopv2/styles.js +0 -33
- package/src/components/molecules/ImageSelectorv2/ImageSelectorv2.stories.js +0 -46
- package/src/components/molecules/ImageSelectorv2/index.js +0 -22
- package/src/components/molecules/ImageSelectorv2/styles.js +0 -15
- package/src/components/molecules/Phase/Phase.stories.js +0 -37
- package/src/components/molecules/Phase/index.js +0 -56
- package/src/components/molecules/Phase/styles.js +0 -82
- package/src/components/molecules/ProductNameHeaderv2/ProductNameHeaderv2.stories.js +0 -37
- package/src/components/molecules/ProductNameHeaderv2/index.js +0 -12
- package/src/components/molecules/ProductNameHeaderv2/styles.js +0 -10
- package/src/components/molecules/ProductSkuStatus/ProductSkuStatus.stories.js +0 -37
- package/src/components/molecules/ProductSkuStatus/index.js +0 -26
- package/src/components/molecules/ProductSkuStatus/styles.js +0 -7
- package/src/components/molecules/RetailerSelectorv2/RetailerSelectorv2.stories.js +0 -35
- package/src/components/molecules/RetailerSelectorv2/index.js +0 -80
- package/src/components/molecules/RetailerSelectorv2/styles.js +0 -21
- package/src/components/molecules/RowItem/ColumnItem.js +0 -9
- package/src/components/molecules/RowItem/RowItem.stories.js +0 -5660
- package/src/components/molecules/RowItem/index.js +0 -45
- package/src/components/molecules/RowItem/styles.js +0 -40
- package/src/components/molecules/ServiceDataValidator/ServiceDataValidator.stories.js +0 -90
- package/src/components/molecules/ServiceDataValidator/index.js +0 -49
- package/src/components/molecules/ServiceDataValidator/styles.js +0 -36
- package/src/components/molecules/StatusRetailer/StatusAsignationInfo.stories.js +0 -17
- package/src/components/molecules/StatusRetailer/index.js +0 -55
- package/src/components/molecules/StatusRetailer/styles.js +0 -85
- package/src/components/molecules/TabsMenuv2/TabsMenuv2.stories.js +0 -19
- package/src/components/molecules/TabsMenuv2/index.js +0 -112
- package/src/components/molecules/TabsMenuv2/styles.js +0 -19
- package/src/components/molecules/TagAndInputv2/TagAndInputv2.stories.js +0 -24
- package/src/components/molecules/TagAndInputv2/index.js +0 -86
- package/src/components/molecules/TagAndInputv2/styles.js +0 -35
- package/src/components/molecules/Validation/Validation.stories.js +0 -12
- package/src/components/molecules/Validation/index.js +0 -77
- package/src/components/molecules/Validation/styles.js +0 -19
- package/src/components/molecules/VersionItemv2/VersionItemv2.stories.js +0 -14
- package/src/components/molecules/VersionItemv2/index.js +0 -59
- package/src/components/molecules/VersionItemv2/styles.js +0 -47
- package/src/components/organisms/BarButtons/BarButtons.stories.js +0 -13
- package/src/components/organisms/BarButtons/index.js +0 -150
- package/src/components/organisms/BarButtons/styles.js +0 -54
- package/src/components/organisms/Chatv2/ChatLists/ChatLists.stories.js +0 -65
- package/src/components/organisms/Chatv2/ChatLists/Rotoplas.jpeg +0 -0
- package/src/components/organisms/Chatv2/ChatLists/THD.png +0 -0
- package/src/components/organisms/Chatv2/ChatLists/index.js +0 -141
- package/src/components/organisms/Chatv2/ChatLists/styles.js +0 -162
- package/src/components/organisms/Chatv2/Chatv2.stories.js +0 -184
- package/src/components/organisms/Chatv2/ContainerItems/ContainerItems.stories.js +0 -142
- package/src/components/organisms/Chatv2/ContainerItems/index.js +0 -538
- package/src/components/organisms/Chatv2/ContainerItems/styles.js +0 -360
- package/src/components/organisms/Chatv2/ContentChat/ContentChat.stories.js +0 -102
- package/src/components/organisms/Chatv2/ContentChat/Rotoplas.jpeg +0 -0
- package/src/components/organisms/Chatv2/ContentChat/THD.png +0 -0
- package/src/components/organisms/Chatv2/ContentChat/index.js +0 -1016
- package/src/components/organisms/Chatv2/ContentChat/styles.js +0 -44
- package/src/components/organisms/Chatv2/Footer/Footer.stories.js +0 -22
- package/src/components/organisms/Chatv2/Footer/index.js +0 -668
- package/src/components/organisms/Chatv2/Footer/styles.js +0 -290
- package/src/components/organisms/Chatv2/Header/Header.stories.js +0 -66
- package/src/components/organisms/Chatv2/Header/index.js +0 -93
- package/src/components/organisms/Chatv2/Header/styles.js +0 -49
- package/src/components/organisms/Chatv2/index.js +0 -281
- package/src/components/organisms/Chatv2/styles.js +0 -85
- package/src/components/organisms/CompleteServices/CompleteServices.stories.js +0 -91
- package/src/components/organisms/CompleteServices/index.js +0 -82
- package/src/components/organisms/CompleteServices/styles.js +0 -35
- package/src/components/organisms/DragAndDropPhases/DragAndDropPhases.stories.js +0 -12
- package/src/components/organisms/DragAndDropPhases/index.js +0 -67
- package/src/components/organisms/DragAndDropPhases/styles.js +0 -20
- package/src/components/organisms/DragPrueba/DragPrueba.stories.js +0 -12
- package/src/components/organisms/DragPrueba/index.js +0 -57
- package/src/components/organisms/DragPrueba/styles.js +0 -8
- package/src/components/organisms/FullProductNamev2/FullProductNamev2.stories.js +0 -28
- package/src/components/organisms/FullProductNamev2/index.js +0 -101
- package/src/components/organisms/FullProductNamev2/styles.js +0 -49
- package/src/components/organisms/FullTabsMenuv2/FullTabsMenuv2.stories.js +0 -22
- package/src/components/organisms/FullTabsMenuv2/index.js +0 -142
- package/src/components/organisms/FullTabsMenuv2/styles.js +0 -47
- package/src/components/organisms/GridProducts/GridProducts.stories.js +0 -5485
- package/src/components/organisms/GridProducts/index.js +0 -50
- package/src/components/organisms/GridProducts/styles.js +0 -14
- package/src/components/organisms/GridProducts/utils.js +0 -111
- package/src/components/organisms/ImageDataTablev2/ImageDataTablev2.stories.js +0 -24
- package/src/components/organisms/ImageDataTablev2/index.js +0 -124
- package/src/components/organisms/ImageDataTablev2/styles.js +0 -18
- package/src/components/organisms/ImagePreviewerv2/ImagePreviewerv2.stories.js +0 -38
- package/src/components/organisms/ImagePreviewerv2/index.js +0 -22
- package/src/components/organisms/ImagePreviewerv2/styles.js +0 -7
- package/src/components/organisms/InputGroupv2/InputGroupv2.stories.js +0 -31
- package/src/components/organisms/InputGroupv2/index.js +0 -296
- package/src/components/organisms/InputGroupv2/styles.js +0 -90
- package/src/components/organisms/MandatoryBar/MandatoryBar.stories.js +0 -18
- package/src/components/organisms/MandatoryBar/index.js +0 -31
- package/src/components/organisms/MandatoryBar/styles.js +0 -12
- package/src/components/organisms/ProductImageModalv2/ProductImageModalv2.stories.js +0 -90
- package/src/components/organisms/ProductImageModalv2/index.js +0 -105
- package/src/components/organisms/ProductImageModalv2/styles.js +0 -71
- package/src/components/organisms/RenameImagesBar/RenameImagesBar.stories.js +0 -18
- package/src/components/organisms/RenameImagesBar/index.js +0 -30
- package/src/components/organisms/RenameImagesBar/styles.js +0 -12
- package/src/components/organisms/VersionSelectorv2/VersionSelectorv2.stories.js +0 -15
- package/src/components/organisms/VersionSelectorv2/index.js +0 -105
- package/src/components/organisms/VersionSelectorv2/styles.js +0 -45
- package/src/components/pages/ProductEditionv2/ProductEditionv2.stories.js +0 -213
- package/src/components/pages/ProductEditionv2/index.js +0 -1758
- package/src/components/pages/ProductEditionv2/styles.js +0 -154
|
@@ -86,8 +86,7 @@ export const ContentChat = (props) => {
|
|
|
86
86
|
|
|
87
87
|
// al cargar el componente
|
|
88
88
|
useEffect(() => {
|
|
89
|
-
|
|
90
|
-
if (Object.keys(dataChat || {}).length) {
|
|
89
|
+
if (dataChat && showPopUpChat) {
|
|
91
90
|
stopUpdate();
|
|
92
91
|
if (dataChat.code) {
|
|
93
92
|
setErrorChat({
|
|
@@ -101,7 +100,6 @@ export const ContentChat = (props) => {
|
|
|
101
100
|
}
|
|
102
101
|
if (chatType === "merchant_product") getInitialMerchantProduct();
|
|
103
102
|
else if (chatType === "order_product") getInitialOrderProduct();
|
|
104
|
-
else if (chatType === "product_status") getInitialProductStatus();
|
|
105
103
|
else getInitialTicket();
|
|
106
104
|
}
|
|
107
105
|
if (!showPopUpChat) {
|
|
@@ -128,8 +126,6 @@ export const ContentChat = (props) => {
|
|
|
128
126
|
} else if (chatType === "order_product") {
|
|
129
127
|
if (companies) getUpdateLatestOrderProduct(true);
|
|
130
128
|
else getInitialOrderProduct();
|
|
131
|
-
} else if (chatType === "product_status") {
|
|
132
|
-
getInitialProductStatus();
|
|
133
129
|
} else {
|
|
134
130
|
if (singleChat.items) getUpdateLatestTicket(true);
|
|
135
131
|
else getInitialTicket();
|
|
@@ -139,47 +135,6 @@ export const ContentChat = (props) => {
|
|
|
139
135
|
/*=======================================================================
|
|
140
136
|
PETICION GET INICIAL SEGUN EL TIPO DE CHAT
|
|
141
137
|
======================================================================= */
|
|
142
|
-
const getInitialProductStatus = async () => {
|
|
143
|
-
const paramsQuery = {
|
|
144
|
-
articleData: JSON.stringify({
|
|
145
|
-
articleId: JSON.stringify(dataChat.id),
|
|
146
|
-
version: JSON.stringify(dataChat.version),
|
|
147
|
-
retailerId: JSON.stringify(dataChat.retailerId),
|
|
148
|
-
status: dataChat.status,
|
|
149
|
-
})
|
|
150
|
-
};
|
|
151
|
-
const paramsHeaders = { Authorization: dataChat.userToken };
|
|
152
|
-
const response = await fetchGET(
|
|
153
|
-
process.env.REACT_APP_READ_MESSAGES,
|
|
154
|
-
paramsQuery,
|
|
155
|
-
paramsHeaders
|
|
156
|
-
);
|
|
157
|
-
if (!response.body) {
|
|
158
|
-
setErrorChat({
|
|
159
|
-
existError: true,
|
|
160
|
-
code: 400,
|
|
161
|
-
message: response.message,
|
|
162
|
-
errorDetail: response.errorDetail,
|
|
163
|
-
});
|
|
164
|
-
setIsLoading(false);
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
167
|
-
// success
|
|
168
|
-
setStartUpdate((prev) => prev + 1);
|
|
169
|
-
setCurrentUser({
|
|
170
|
-
id: response.body.data.currentUserId,
|
|
171
|
-
companyId: response.body.data.currentCompanyId,
|
|
172
|
-
});
|
|
173
|
-
setLastUpdateDate(response.body.data.lastUpdateDate);
|
|
174
|
-
setAllUsers(response.body.users);
|
|
175
|
-
setSingleChat({
|
|
176
|
-
items: response.body.items,
|
|
177
|
-
enabledLoadMore: response.body.items.length === 50,
|
|
178
|
-
});
|
|
179
|
-
setErrorChat({ existError: false });
|
|
180
|
-
setIsLoading(false);
|
|
181
|
-
};
|
|
182
|
-
|
|
183
138
|
const getInitialMerchantProduct = async () => {
|
|
184
139
|
const paramsQuery = {
|
|
185
140
|
getType: "initial",
|
|
@@ -613,14 +568,14 @@ export const ContentChat = (props) => {
|
|
|
613
568
|
};
|
|
614
569
|
|
|
615
570
|
/*=======================================================================
|
|
616
|
-
FUNCION QUE EJECUTA EL MICROSERVICIO CREATE-ITEM
|
|
571
|
+
FUNCION QUE EJECUTA EL MICROSERVICIO CREATE-ITEM
|
|
617
572
|
Este metodo recibe los items que queremos agregar al chat.
|
|
618
573
|
requiere:
|
|
619
|
-
=> items: [ { type , value } , ... ]
|
|
574
|
+
=> items: [ { type , value } , ... ]
|
|
620
575
|
NOTA: si se quiere agregar un mensaje mandar un array con un object
|
|
621
|
-
example: [ {
|
|
622
|
-
type: "message" ,
|
|
623
|
-
value: "mi mensaje"
|
|
576
|
+
example: [ {
|
|
577
|
+
type: "message" ,
|
|
578
|
+
value: "mi mensaje"
|
|
624
579
|
} ]
|
|
625
580
|
======================================================================= */
|
|
626
581
|
const createItemsChat = async (items = []) => {
|
|
@@ -656,14 +611,12 @@ export const ContentChat = (props) => {
|
|
|
656
611
|
// enviar items a la BD
|
|
657
612
|
if (chatType === "merchant_product") {
|
|
658
613
|
errorCreate = await createItemsMerchantProduct(items);
|
|
659
|
-
} else if (chatType === "product_status") {
|
|
660
|
-
errorCreate = await createItemsProductStatus(items);
|
|
661
614
|
} else if (chatType === "order_product") {
|
|
662
615
|
errorCreate = await createItemsOrderProduct(items);
|
|
663
616
|
} else errorCreate = await createItemsTicket(items);
|
|
664
617
|
|
|
665
618
|
// actualizar chat para que aparezcan los items enviados
|
|
666
|
-
if (
|
|
619
|
+
if (chatType === "merchant_product") {
|
|
667
620
|
await getUpdateLatestMerchantProduct();
|
|
668
621
|
} else if (chatType === "order_product") {
|
|
669
622
|
await getUpdateLatestOrderProduct();
|
|
@@ -676,10 +629,9 @@ export const ContentChat = (props) => {
|
|
|
676
629
|
};
|
|
677
630
|
|
|
678
631
|
const createItemsMerchantProduct = async (items = []) => {
|
|
679
|
-
const { id, version
|
|
632
|
+
const { id, version } = dataChat;
|
|
680
633
|
const { id: retailerId } = activeRetailer;
|
|
681
634
|
const paramsBody = { id, version, items, retailerId };
|
|
682
|
-
if (chatType === "product_status") paramsBody["orderId"] = orderId;
|
|
683
635
|
const paramsHeaders = { Authorization: dataChat.userToken };
|
|
684
636
|
const response = await fetchPOST(
|
|
685
637
|
process.env.REACT_APP_PRODUCTS_CHAT_ENDPOINT,
|
|
@@ -693,23 +645,6 @@ export const ContentChat = (props) => {
|
|
|
693
645
|
};
|
|
694
646
|
}
|
|
695
647
|
};
|
|
696
|
-
const createItemsProductStatus = async (items = []) => {
|
|
697
|
-
const { id, version, orderId, status } = dataChat;
|
|
698
|
-
const { id: retailerId } = activeRetailer;
|
|
699
|
-
const paramsBody = { id, version, items, retailerId, orderId, status };
|
|
700
|
-
const paramsHeaders = { Authorization: dataChat.userToken };
|
|
701
|
-
const response = await fetchPOST(
|
|
702
|
-
process.env.REACT_APP_CREATE_MESSAGES,
|
|
703
|
-
paramsBody,
|
|
704
|
-
paramsHeaders
|
|
705
|
-
);
|
|
706
|
-
if (!response.body) {
|
|
707
|
-
return {
|
|
708
|
-
message: response.message,
|
|
709
|
-
errorDetail: response.errorDetail,
|
|
710
|
-
};
|
|
711
|
-
}
|
|
712
|
-
};
|
|
713
648
|
|
|
714
649
|
const createItemsOrderProduct = async (items = []) => {
|
|
715
650
|
const paramsBody = {
|
|
@@ -757,11 +692,7 @@ export const ContentChat = (props) => {
|
|
|
757
692
|
SECCION DE FUNCIONES
|
|
758
693
|
======================================================================= */
|
|
759
694
|
const isSingleChat = () => {
|
|
760
|
-
if (
|
|
761
|
-
chatType === "merchant_product" ||
|
|
762
|
-
chatType === "ticket" ||
|
|
763
|
-
chatType === "product_status"
|
|
764
|
-
) {
|
|
695
|
+
if (chatType === "merchant_product" || chatType === "ticket") {
|
|
765
696
|
return true;
|
|
766
697
|
}
|
|
767
698
|
if (companies && Object.keys(companies).length < 2) return true;
|
|
@@ -876,7 +807,7 @@ export const ContentChat = (props) => {
|
|
|
876
807
|
// mostrar chat?
|
|
877
808
|
let items;
|
|
878
809
|
let enabledLoadMore;
|
|
879
|
-
if (["merchant_product", "ticket"
|
|
810
|
+
if (["merchant_product", "ticket"].includes(chatType)) {
|
|
880
811
|
items = singleChat.items;
|
|
881
812
|
enabledLoadMore = singleChat.enabledLoadMore;
|
|
882
813
|
}
|
|
@@ -918,9 +849,7 @@ export const ContentChat = (props) => {
|
|
|
918
849
|
activeCompanyId={activeCompanyId}
|
|
919
850
|
ticketCompany={ticketCompany}
|
|
920
851
|
currentUser={
|
|
921
|
-
["merchant_product", "order_product"
|
|
922
|
-
chatType
|
|
923
|
-
)
|
|
852
|
+
["merchant_product", "order_product"].includes(chatType)
|
|
924
853
|
? currentUser
|
|
925
854
|
: dataChat.currentUser
|
|
926
855
|
}
|
|
@@ -959,12 +888,6 @@ export const ContentChat = (props) => {
|
|
|
959
888
|
? { id: dataChat.id, version: currentArticle.version }
|
|
960
889
|
: chatType === "ticket"
|
|
961
890
|
? { id: dataChat.id }
|
|
962
|
-
: chatType === "product_status"
|
|
963
|
-
? {
|
|
964
|
-
id: dataChat.id,
|
|
965
|
-
version: dataChat.version,
|
|
966
|
-
retailerId: dataChat.retailerId,
|
|
967
|
-
}
|
|
968
891
|
: undefined
|
|
969
892
|
}
|
|
970
893
|
chatCompany={getChatCompany()}
|
|
@@ -1007,6 +930,7 @@ export const ContentChat = (props) => {
|
|
|
1007
930
|
}}
|
|
1008
931
|
/>
|
|
1009
932
|
)}
|
|
933
|
+
|
|
1010
934
|
{/* body */}
|
|
1011
935
|
{renderBodyChat()}
|
|
1012
936
|
</Container>
|
|
@@ -169,17 +169,6 @@ export const Footer = (props) => {
|
|
|
169
169
|
errorMessage = "El ID del ticket no es valido";
|
|
170
170
|
}
|
|
171
171
|
break;
|
|
172
|
-
case "product_status":
|
|
173
|
-
if (
|
|
174
|
-
isValidNaturalNumber(dataChat?.id) &&
|
|
175
|
-
isValidNaturalNumber(dataChat?.version) &&
|
|
176
|
-
isValidNaturalNumber(dataChat?.retailerId)
|
|
177
|
-
) {
|
|
178
|
-
fileKey += `productStatus/${dataChat.id}-${dataChat?.version}-${dataChat?.retailerId}/`;
|
|
179
|
-
} else {
|
|
180
|
-
errorMessage = "El ID del ticket no es valido";
|
|
181
|
-
}
|
|
182
|
-
break;
|
|
183
172
|
|
|
184
173
|
default:
|
|
185
174
|
errorMessage =
|
|
@@ -17,14 +17,14 @@ export const Chat = (props) => {
|
|
|
17
17
|
const {
|
|
18
18
|
chatType, // "merchant_product" | "order_product" | "ticket"
|
|
19
19
|
chatContainerType, // ("fixed") | ("popUp")
|
|
20
|
-
chatData
|
|
20
|
+
chatData, // {} => aqui poner los datos requeridos segun el tipo de chat
|
|
21
21
|
classNameContainerFixed, // clases CSS del envoltoria chat fixed
|
|
22
22
|
size = 14, // tamaño del icono
|
|
23
23
|
} = props;
|
|
24
24
|
const [showPopUpChat, setShowPopUpChat] = useState(false);
|
|
25
25
|
const [data, setData] = useState();
|
|
26
26
|
|
|
27
|
-
const { ticketCompany
|
|
27
|
+
const { ticketCompany } = chatData || {};
|
|
28
28
|
|
|
29
29
|
useEffect(() => {
|
|
30
30
|
switch (chatType) {
|
|
@@ -37,9 +37,6 @@ export const Chat = (props) => {
|
|
|
37
37
|
case "ticket":
|
|
38
38
|
validateChatTicket();
|
|
39
39
|
break;
|
|
40
|
-
case "product_status":
|
|
41
|
-
validateProductStatus();
|
|
42
|
-
break;
|
|
43
40
|
default:
|
|
44
41
|
setData({
|
|
45
42
|
code: 404,
|
|
@@ -49,45 +46,6 @@ export const Chat = (props) => {
|
|
|
49
46
|
}
|
|
50
47
|
}, [chatType]);
|
|
51
48
|
|
|
52
|
-
const validateProductStatus = () => {
|
|
53
|
-
const {
|
|
54
|
-
userToken, // string
|
|
55
|
-
id, // number
|
|
56
|
-
version,
|
|
57
|
-
retailerId, // number
|
|
58
|
-
status,
|
|
59
|
-
orderId,
|
|
60
|
-
} = chatData;
|
|
61
|
-
|
|
62
|
-
if (!isValidGeneral(userToken, id)) return;
|
|
63
|
-
|
|
64
|
-
// validar el ID de la cadena asociada al producto en la OT
|
|
65
|
-
if (!isValidNaturalNumber(retailerId)) {
|
|
66
|
-
setDataError("La cadena relacionada al producto no es válida");
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// validar el ID de la version asociada al producto en la OT
|
|
71
|
-
if (!isValidNaturalNumber(version)) {
|
|
72
|
-
setDataError("La versión del producto no es válida");
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
if (orderId && !isValidNaturalNumber(orderId)) {
|
|
77
|
-
setDataError("La orden del producto no es válida");
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
setData({
|
|
82
|
-
userToken,
|
|
83
|
-
id,
|
|
84
|
-
version,
|
|
85
|
-
retailerId,
|
|
86
|
-
orderId,
|
|
87
|
-
status,
|
|
88
|
-
});
|
|
89
|
-
};
|
|
90
|
-
|
|
91
49
|
const isValidGeneral = (userToken, id) => {
|
|
92
50
|
// validar token del user
|
|
93
51
|
if (isStringEmpty(userToken)) {
|
|
@@ -239,7 +197,7 @@ export const Chat = (props) => {
|
|
|
239
197
|
dataChat={data}
|
|
240
198
|
showBtnClose={false}
|
|
241
199
|
ticketCompany={ticketCompany}
|
|
242
|
-
activeRetailer={props.activeRetailer
|
|
200
|
+
activeRetailer={props.activeRetailer}
|
|
243
201
|
/>
|
|
244
202
|
</ContainerFixed>
|
|
245
203
|
);
|
|
@@ -272,7 +230,7 @@ export const Chat = (props) => {
|
|
|
272
230
|
onClickBtnClose={() => {
|
|
273
231
|
setShowPopUpChat(false);
|
|
274
232
|
}}
|
|
275
|
-
activeRetailer={props.activeRetailer
|
|
233
|
+
activeRetailer={props.activeRetailer}
|
|
276
234
|
/>
|
|
277
235
|
</ContainerPopUp>
|
|
278
236
|
</Slide>
|
|
@@ -22,9 +22,7 @@ export const DashboardMetric = ({
|
|
|
22
22
|
}) => {
|
|
23
23
|
const labels =
|
|
24
24
|
type === "doughnut"
|
|
25
|
-
? Object.
|
|
26
|
-
([key, value]) => key !== "NS" && `${getFullStatus(key)} (${value})`
|
|
27
|
-
)
|
|
25
|
+
? Object.keys(dataObject).map((key) => key !== "NS" && getFullStatus(key))
|
|
28
26
|
: Object.keys(dataObject);
|
|
29
27
|
const newObject =
|
|
30
28
|
type === "doughnut" ? removeOldStatus(dataObject) : dataObject;
|
|
@@ -65,11 +63,10 @@ export const DashboardMetric = ({
|
|
|
65
63
|
}, 0);
|
|
66
64
|
const { raw } = element.$context;
|
|
67
65
|
const operation = 100 * (raw / sum);
|
|
68
|
-
const percent =
|
|
66
|
+
const percent =
|
|
69
67
|
((operation + "").includes(".")
|
|
70
68
|
? (100 * (raw / sum)).toFixed(2)
|
|
71
|
-
: 100 * (raw / sum)) + "%"
|
|
72
|
-
} - ${raw}`;
|
|
69
|
+
: 100 * (raw / sum)) + "%";
|
|
73
70
|
return showPercent ? percent : raw;
|
|
74
71
|
},
|
|
75
72
|
},
|
|
@@ -23,7 +23,7 @@ export const FullProductNameHeader = ({
|
|
|
23
23
|
useEffect(() => {
|
|
24
24
|
const rtls = headerData?.retailers || headerData?.retailersAvailable;
|
|
25
25
|
servicesData &&
|
|
26
|
-
rtls
|
|
26
|
+
rtls.forEach((rt) => {
|
|
27
27
|
const element = [];
|
|
28
28
|
servicesData.forEach((sd) => {
|
|
29
29
|
if (sd.id_retailer === rt.id) {
|
|
@@ -21,7 +21,7 @@ export const InputGroup = ({
|
|
|
21
21
|
compare,
|
|
22
22
|
groupData = [],
|
|
23
23
|
setUpdatedBoxData,
|
|
24
|
-
activeRetailer
|
|
24
|
+
activeRetailer
|
|
25
25
|
}) => {
|
|
26
26
|
const inputTypeValue = (type) => {
|
|
27
27
|
switch (type) {
|
|
@@ -41,11 +41,7 @@ export const InputGroup = ({
|
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
useEffect(() => {
|
|
44
|
-
if (
|
|
45
|
-
inputGroup.groupId === "16" &&
|
|
46
|
-
activeRetailer &&
|
|
47
|
-
activeRetailer?.retailer?.id
|
|
48
|
-
) {
|
|
44
|
+
if (inputGroup.groupId === "16" && activeRetailer && activeRetailer?.retailer?.id) {
|
|
49
45
|
if (activeRetailer?.retailer?.id === 68) {
|
|
50
46
|
setShowBox(true);
|
|
51
47
|
} else {
|
|
@@ -54,127 +50,127 @@ export const InputGroup = ({
|
|
|
54
50
|
}
|
|
55
51
|
}, [activeRetailer, inputGroup.groupId]);
|
|
56
52
|
|
|
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
|
+
|
|
57
63
|
return (
|
|
58
64
|
<>
|
|
59
65
|
{inputGroup.groupId === "16" && activeRetailer?.retailer?.id === 68 && (
|
|
60
66
|
<Container
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
/>
|
|
72
|
-
</Container>
|
|
73
|
-
)}
|
|
74
|
-
{inputGroup.groupId !== "16" && (
|
|
75
|
-
<Container
|
|
76
|
-
className={
|
|
77
|
-
activeSection === "Ficha técnica"
|
|
78
|
-
? "datasheets-layout"
|
|
79
|
-
: "descriptions-layout"
|
|
80
|
-
}
|
|
81
|
-
>
|
|
82
|
-
{inputGroup?.dataGroup && (
|
|
83
|
-
<ScreenHeader
|
|
84
|
-
headerType={"retailer-name-header"}
|
|
85
|
-
text={`${inputGroup?.dataGroup}`}
|
|
67
|
+
className={
|
|
68
|
+
activeSection === "Ficha técnica"
|
|
69
|
+
? "datasheets-layout"
|
|
70
|
+
: "descriptions-layout"
|
|
71
|
+
}
|
|
72
|
+
>
|
|
73
|
+
<Box
|
|
74
|
+
inputGroup={inputGroup}
|
|
75
|
+
dataInputs={dataInputs}
|
|
76
|
+
onChange={setUpdatedBoxData}
|
|
86
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}`}
|
|
92
|
+
/>
|
|
93
|
+
)}
|
|
94
|
+
<div className="inputs-container">
|
|
95
|
+
{inputGroup?.inputs?.map((input, index) =>
|
|
96
|
+
activeSection === "Ficha técnica" ? (
|
|
97
|
+
<>
|
|
98
|
+
<TagAndInput
|
|
99
|
+
key={
|
|
100
|
+
index +
|
|
101
|
+
"-" +
|
|
102
|
+
dataInputs[input]?.value +
|
|
103
|
+
"-" +
|
|
104
|
+
dataInputs[input]?.id +
|
|
105
|
+
"-" +
|
|
106
|
+
compare
|
|
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
|
+
)
|
|
87
169
|
)}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
activeSection === "Ficha técnica" ? (
|
|
91
|
-
<>
|
|
92
|
-
<TagAndInput
|
|
93
|
-
key={
|
|
94
|
-
index +
|
|
95
|
-
"-" +
|
|
96
|
-
dataInputs[input]?.value +
|
|
97
|
-
"-" +
|
|
98
|
-
dataInputs[input]?.id +
|
|
99
|
-
"-" +
|
|
100
|
-
compare
|
|
101
|
-
}
|
|
102
|
-
//disabled={input === 40001}
|
|
103
|
-
disabled={false}
|
|
104
|
-
inputId={dataInputs[input]?.id}
|
|
105
|
-
version={version}
|
|
106
|
-
inputType={inputTypeValue(dataInputs[input]?.type)}
|
|
107
|
-
label={
|
|
108
|
-
dataInputs[input]?.name +
|
|
109
|
-
(dataInputs[input]?.required ? "*" : "")
|
|
110
|
-
}
|
|
111
|
-
value={
|
|
112
|
-
compare
|
|
113
|
-
? auditInputs[input]?.value
|
|
114
|
-
: dataInputs[input]?.value
|
|
115
|
-
}
|
|
116
|
-
inputPlaceHolder={input?.placeholder}
|
|
117
|
-
articleId={articleId}
|
|
118
|
-
isRequired={dataInputs[input]?.required}
|
|
119
|
-
updatedDatasheets={updatedDatasheets}
|
|
120
|
-
setUpdatedDatasheets={setUpdatedDatasheets}
|
|
121
|
-
maxChar={
|
|
122
|
-
dataInputs[input]?.max_chars
|
|
123
|
-
? dataInputs[input]?.max_chars
|
|
124
|
-
: 999
|
|
125
|
-
}
|
|
126
|
-
optionList={dataInputs[input]?.option_list}
|
|
127
|
-
description={dataInputs[input]?.description}
|
|
128
|
-
showTooltip={true}
|
|
129
|
-
auditClass={
|
|
130
|
-
compare &&
|
|
131
|
-
!isEquals(
|
|
132
|
-
dataInputs[input].value,
|
|
133
|
-
auditInputs[input].value
|
|
134
|
-
)
|
|
135
|
-
? "audit-class"
|
|
136
|
-
: ""
|
|
137
|
-
}
|
|
138
|
-
/>
|
|
139
|
-
</>
|
|
140
|
-
) : (
|
|
141
|
-
<TagAndInput
|
|
142
|
-
key={index + "-" + input?.value + "-" + compare}
|
|
143
|
-
inputId={input.id}
|
|
144
|
-
index={index}
|
|
145
|
-
inputType={"textarea"}
|
|
146
|
-
label={input?.name + (input.required ? "*" : "")}
|
|
147
|
-
value={
|
|
148
|
-
compare
|
|
149
|
-
? auditInputGroup?.inputs[index]?.value
|
|
150
|
-
: input?.value
|
|
151
|
-
}
|
|
152
|
-
isRequired={input.required}
|
|
153
|
-
maxChar={input.max_chars}
|
|
154
|
-
inputPlaceHolder={input?.placeholder}
|
|
155
|
-
updatedDescriptions={updatedDescriptions}
|
|
156
|
-
setUpdatedDescriptions={setUpdatedDescriptions}
|
|
157
|
-
articleId={articleId}
|
|
158
|
-
version={version}
|
|
159
|
-
dinamicHeight={dinamicHeight}
|
|
160
|
-
description={input?.description}
|
|
161
|
-
showTooltip={true}
|
|
162
|
-
auditClass={
|
|
163
|
-
compare &&
|
|
164
|
-
!isEquals(
|
|
165
|
-
input?.value,
|
|
166
|
-
auditInputGroup?.inputs[index]?.value
|
|
167
|
-
)
|
|
168
|
-
? "audit-class"
|
|
169
|
-
: ""
|
|
170
|
-
}
|
|
171
|
-
/>
|
|
172
|
-
)
|
|
173
|
-
)}
|
|
174
|
-
</div>
|
|
175
|
-
</Container>
|
|
170
|
+
</div>
|
|
171
|
+
</Container>
|
|
176
172
|
)}
|
|
177
|
-
|
|
173
|
+
{(inputGroup.groupId === "16" && activeRetailer?.retailer?.id === 74) && (
|
|
178
174
|
<Container
|
|
179
175
|
className={
|
|
180
176
|
activeSection === "Ficha técnica"
|
|
@@ -234,10 +230,7 @@ export const InputGroup = ({
|
|
|
234
230
|
onChange={setUpdatedBoxData}
|
|
235
231
|
auditClass={
|
|
236
232
|
compare &&
|
|
237
|
-
!isEquals(
|
|
238
|
-
dataInputs[input].value,
|
|
239
|
-
auditInputs[input].value
|
|
240
|
-
)
|
|
233
|
+
!isEquals(dataInputs[input].value, auditInputs[input].value)
|
|
241
234
|
? "audit-class"
|
|
242
235
|
: ""
|
|
243
236
|
}
|
|
@@ -251,9 +244,7 @@ export const InputGroup = ({
|
|
|
251
244
|
inputType={"textarea"}
|
|
252
245
|
label={input?.name + (input.required ? "*" : "")}
|
|
253
246
|
value={
|
|
254
|
-
compare
|
|
255
|
-
? auditInputGroup?.inputs[index]?.value
|
|
256
|
-
: input?.value
|
|
247
|
+
compare ? auditInputGroup?.inputs[index]?.value : input?.value
|
|
257
248
|
}
|
|
258
249
|
isRequired={input.required}
|
|
259
250
|
maxChar={input.max_chars}
|
|
@@ -267,10 +258,7 @@ export const InputGroup = ({
|
|
|
267
258
|
showTooltip={true}
|
|
268
259
|
auditClass={
|
|
269
260
|
compare &&
|
|
270
|
-
!isEquals(
|
|
271
|
-
input?.value,
|
|
272
|
-
auditInputGroup?.inputs[index]?.value
|
|
273
|
-
)
|
|
261
|
+
!isEquals(input?.value, auditInputGroup?.inputs[index]?.value)
|
|
274
262
|
? "audit-class"
|
|
275
263
|
: ""
|
|
276
264
|
}
|
|
@@ -31,6 +31,7 @@ export const ContainerModal = styled.div`
|
|
|
31
31
|
align-items: center;
|
|
32
32
|
justify-content: flex-start;
|
|
33
33
|
gap: 6px;
|
|
34
|
+
margin-bottom: 20px;
|
|
34
35
|
|
|
35
36
|
.label-title {
|
|
36
37
|
width: 100%;
|
|
@@ -41,10 +42,6 @@ export const ContainerModal = styled.div`
|
|
|
41
42
|
color: #262626;
|
|
42
43
|
white-space: pre-wrap;
|
|
43
44
|
}
|
|
44
|
-
|
|
45
|
-
& + * {
|
|
46
|
-
margin-top: 20px;
|
|
47
|
-
}
|
|
48
45
|
}
|
|
49
46
|
|
|
50
47
|
.iconModal {
|