contentoh-components-library 21.4.67 → 21.4.68
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/InputFormatter/styles.js +1 -1
- 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/pages/Dashboard/Dashboard.stories.js +36 -33
- package/dist/components/pages/Dashboard/index.js +18 -67
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +3 -3
- package/dist/components/pages/ProviderProductEdition/index.js +144 -120
- 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 +433 -312
- 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 -5
- 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/InputFormatter/styles.js +1 -2
- package/src/components/atoms/SliderToolTip/styles.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/pages/Dashboard/Dashboard.stories.js +38 -33
- package/src/components/pages/Dashboard/index.js +39 -80
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +83 -100
- package/src/components/pages/ProviderProductEdition/index.js +131 -100
- 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 +309 -147
- package/src/components/pages/RetailerProductEdition/styles.js +0 -4
- package/src/components/pages/RetailerProductEdition/utils.js +0 -37
- package/src/global-files/data.js +13 -7
- package/src/global-files/variables.js +0 -4
- package/src/index.js +0 -11
- package/dist/assets/fonts/roboto/LICENSE.txt +0 -202
- package/dist/components/atoms/ImageCarousel/ImgeSlider.stories.js +0 -90
- package/dist/components/atoms/ImageCarousel/index.js +0 -120
- package/dist/components/atoms/ImageCarousel/styles.js +0 -18
- package/dist/components/atoms/PercentTag/PercentTag.stories.js +0 -31
- package/dist/components/atoms/PercentTag/index.js +0 -23
- package/dist/components/atoms/PercentTag/styles.js +0 -22
- package/dist/components/atoms/RatingStars/RatingStars.stories.js +0 -30
- package/dist/components/atoms/RatingStars/index.js +0 -53
- package/dist/components/atoms/RatingStars/styles.js +0 -18
- package/dist/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +0 -48
- package/dist/components/atoms/RetailerCatalog/index.js +0 -69
- package/dist/components/atoms/RetailerCatalog/styles.js +0 -20
- package/dist/components/atoms/RetailerOption/RetailerOption.stories.js +0 -33
- package/dist/components/atoms/RetailerOption/index.js +0 -62
- package/dist/components/atoms/RetailerOption/styles.js +0 -20
- package/dist/components/atoms/RetailersList/RetailersList.stories.js +0 -45
- package/dist/components/atoms/RetailersList/index.js +0 -46
- package/dist/components/atoms/RetailersList/styles.js +0 -18
- package/dist/components/atoms/UserCatalog/UserCatalog.stories.js +0 -73
- package/dist/components/atoms/UserCatalog/index.js +0 -101
- package/dist/components/atoms/UserCatalog/styles.js +0 -18
- package/dist/components/atoms/UserOption/UserOption.stories.js +0 -40
- package/dist/components/atoms/UserOption/index.js +0 -130
- package/dist/components/atoms/UserOption/styles.js +0 -20
- package/dist/components/atoms/UserSelector/UserSelector.stories.js +0 -40
- package/dist/components/atoms/UserSelector/index.js +0 -98
- package/dist/components/atoms/UserSelector/styles.js +0 -32
- package/dist/components/molecules/GridItem/GridItem.stories.js +0 -123
- package/dist/components/molecules/GridItem/index.js +0 -152
- package/dist/components/molecules/GridItem/styles.js +0 -20
- package/dist/components/molecules/HeaderItem/ColumnItem.js +0 -23
- package/dist/components/molecules/HeaderItem/HeaderItem.stories.js +0 -70
- package/dist/components/molecules/HeaderItem/index.js +0 -42
- package/dist/components/molecules/HeaderItem/styles.js +0 -30
- package/dist/components/molecules/RowItem/ColumnItem.js +0 -23
- package/dist/components/molecules/RowItem/RowItem.stories.js +0 -5242
- package/dist/components/molecules/RowItem/index.js +0 -58
- package/dist/components/molecules/RowItem/styles.js +0 -30
- package/dist/components/organisms/GridProducts/GridProducts.stories.js +0 -5097
- package/dist/components/organisms/GridProducts/index.js +0 -63
- package/dist/components/organisms/GridProducts/styles.js +0 -18
- package/dist/components/organisms/GridProducts/utils.js +0 -149
- 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/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/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/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/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/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/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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Container } from "./styles";
|
|
2
2
|
import IconInfo from "../../../assets/images/Icons/info.svg";
|
|
3
3
|
import TextField from "@mui/material/TextField";
|
|
4
|
-
import Tooltip, { tooltipClasses } from
|
|
5
|
-
import { styled } from
|
|
4
|
+
import Tooltip, { tooltipClasses } from '@mui/material/Tooltip';
|
|
5
|
+
import { styled } from '@mui/material/styles';
|
|
6
6
|
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
7
7
|
|
|
8
8
|
export const BoxAttribute = (props) => {
|
|
@@ -29,7 +29,7 @@ export const BoxAttribute = (props) => {
|
|
|
29
29
|
))(({ theme }) => ({
|
|
30
30
|
[`& .${tooltipClasses.tooltip}`]: {
|
|
31
31
|
backgroundColor: GlobalColors.white,
|
|
32
|
-
color:
|
|
32
|
+
color: 'rgba(0, 0, 0, 0.87)',
|
|
33
33
|
boxShadow: theme.shadows[1],
|
|
34
34
|
fontSize: 11,
|
|
35
35
|
fontFamily: `${FontFamily.Roboto}, sans-serif`,
|
|
@@ -37,41 +37,34 @@ export const BoxAttribute = (props) => {
|
|
|
37
37
|
}));
|
|
38
38
|
return (
|
|
39
39
|
<>
|
|
40
|
-
|
|
40
|
+
<Container
|
|
41
41
|
id={id}
|
|
42
42
|
key={key}
|
|
43
43
|
className={className}
|
|
44
44
|
borderType={borderType}
|
|
45
45
|
>
|
|
46
|
-
<LightTooltip
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
<img className="icon" src={IconInfo} alt="iconInfo" />
|
|
55
|
-
</Container>
|
|
46
|
+
<LightTooltip title={
|
|
47
|
+
<div className="container-tooltip">
|
|
48
|
+
<p className="container-tooltip">{description}</p>
|
|
49
|
+
</div>
|
|
50
|
+
}>
|
|
51
|
+
<Container className="">
|
|
52
|
+
<img className="icon" src={IconInfo} alt="iconInfo" />
|
|
53
|
+
</Container>
|
|
56
54
|
</LightTooltip>
|
|
57
|
-
<span>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
{
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
variant="outlined"
|
|
71
|
-
size="small"
|
|
72
|
-
type="number"
|
|
73
|
-
required={required}
|
|
74
|
-
/>
|
|
55
|
+
<span>{text}<span className={required ? 'required-text' : ''}>{required ? '*' : ''}</span></span>
|
|
56
|
+
<TextField
|
|
57
|
+
hiddenLabel
|
|
58
|
+
key={props.id}
|
|
59
|
+
name={props.id}
|
|
60
|
+
value={atributos[props.id]}
|
|
61
|
+
onChange={handleInputChange}
|
|
62
|
+
className="caja-borde"
|
|
63
|
+
variant="outlined"
|
|
64
|
+
size="small"
|
|
65
|
+
type="number"
|
|
66
|
+
required={required}
|
|
67
|
+
/>
|
|
75
68
|
</Container>
|
|
76
69
|
</>
|
|
77
70
|
);
|
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
import { Container, ContainerIcon } from "./styles";
|
|
2
2
|
import { Button } from "@mui/material";
|
|
3
3
|
|
|
4
|
-
export const BoxButtons = ({
|
|
5
|
-
|
|
6
|
-
onAdd,
|
|
7
|
-
onDelete,
|
|
8
|
-
isTheFirstBox,
|
|
9
|
-
index,
|
|
10
|
-
}) => {
|
|
4
|
+
export const BoxButtons = ({ showAdd, onAdd, onDelete, isTheFirstBox, index }) => {
|
|
5
|
+
console.log("index",index)
|
|
11
6
|
return (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
7
|
+
<Container index={index}>
|
|
8
|
+
{!isTheFirstBox && (
|
|
9
|
+
<Button
|
|
10
|
+
variant="outlined"
|
|
11
|
+
className="button-circle"
|
|
12
|
+
onClick={onDelete}
|
|
13
|
+
>
|
|
14
|
+
<ContainerIcon>
|
|
15
|
+
<span className="iconos-out">delete_forever</span>
|
|
16
|
+
</ContainerIcon>
|
|
17
|
+
</Button>
|
|
18
|
+
)}
|
|
19
|
+
{showAdd && (
|
|
20
|
+
<Button onClick={onAdd} variant="outlined" className="button-circle">
|
|
21
|
+
<ContainerIcon>
|
|
22
|
+
<span className="iconos-out iconos-grises">add</span>
|
|
23
|
+
</ContainerIcon>
|
|
24
|
+
</Button>
|
|
25
|
+
)}
|
|
26
|
+
</Container>
|
|
28
27
|
);
|
|
29
28
|
};
|
|
@@ -27,7 +27,7 @@ export const CarouselImagesLogin = ({
|
|
|
27
27
|
img2.src = images[i];
|
|
28
28
|
const circulo_actual = Array.from(circulos).find((el) => el.id === i);
|
|
29
29
|
Array.from(circulos).forEach((cir) => cir.classList.remove("resaltado"));
|
|
30
|
-
circulo_actual
|
|
30
|
+
circulo_actual.classList.add("resaltado");
|
|
31
31
|
img1.classList.add("right");
|
|
32
32
|
img2.classList.add("active");
|
|
33
33
|
i++;
|
|
@@ -4,13 +4,10 @@ import { Button } from "../../atoms/GeneralButton/index";
|
|
|
4
4
|
import { useEffect, useRef } from "react";
|
|
5
5
|
import { Chat } from "../../organisms/Chat";
|
|
6
6
|
import auditIcon from "../../../../src/assets/images/generalButton/Icono AB.svg";
|
|
7
|
-
import { useState } from "react";
|
|
8
|
-
import { render } from "@testing-library/react";
|
|
9
7
|
|
|
10
8
|
export const HeaderTop = ({
|
|
11
9
|
setHeaderTop,
|
|
12
10
|
withChat,
|
|
13
|
-
chatType,
|
|
14
11
|
productSelected,
|
|
15
12
|
token,
|
|
16
13
|
auditableVersion,
|
|
@@ -19,51 +16,16 @@ export const HeaderTop = ({
|
|
|
19
16
|
activeRetailer,
|
|
20
17
|
}) => {
|
|
21
18
|
const headerTop = useRef();
|
|
22
|
-
const [chat, setChat] = useState(null);
|
|
23
|
-
const [chatData, setChatData] = useState(null);
|
|
24
|
-
|
|
25
|
-
useEffect(() => {
|
|
26
|
-
if (activeRetailer.id && productSelected && token.length) {
|
|
27
|
-
setChatData({
|
|
28
|
-
id: productSelected?.article?.id_article || productSelected?.id_article,
|
|
29
|
-
version: productSelected?.version,
|
|
30
|
-
retailerId: activeRetailer?.id,
|
|
31
|
-
status: productSelected?.status,
|
|
32
|
-
userToken: token,
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
}, [activeRetailer, productSelected, token]);
|
|
36
|
-
|
|
37
|
-
useEffect(() => {
|
|
38
|
-
if (chatType) renderChat(chatType);
|
|
39
|
-
}, [chatData, chatType]);
|
|
40
19
|
|
|
41
20
|
useEffect(() => {
|
|
42
21
|
setHeaderTop && setHeaderTop(headerTop.current.clientHeight);
|
|
43
22
|
}, []);
|
|
44
23
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
<Chat
|
|
51
|
-
chatType="product_status"
|
|
52
|
-
chatContainerType="popUp"
|
|
53
|
-
chatData={{
|
|
54
|
-
id: chatData?.id,
|
|
55
|
-
version: chatData?.version,
|
|
56
|
-
retailerId: chatData?.retailerId,
|
|
57
|
-
status: chatData?.status,
|
|
58
|
-
userToken: chatData?.userToken,
|
|
59
|
-
}}
|
|
60
|
-
size={18}
|
|
61
|
-
activeRetailer={activeRetailer}
|
|
62
|
-
/>
|
|
63
|
-
);
|
|
64
|
-
break;
|
|
65
|
-
default:
|
|
66
|
-
setChat(
|
|
24
|
+
return (
|
|
25
|
+
<Container ref={headerTop}>
|
|
26
|
+
<ScreenHeader text="Edición de producto" />
|
|
27
|
+
<div className="buttons-container">
|
|
28
|
+
{withChat && (
|
|
67
29
|
<Chat
|
|
68
30
|
chatType="merchant_product"
|
|
69
31
|
chatContainerType="popUp"
|
|
@@ -75,16 +37,8 @@ export const HeaderTop = ({
|
|
|
75
37
|
size={18}
|
|
76
38
|
activeRetailer={activeRetailer}
|
|
77
39
|
/>
|
|
78
|
-
)
|
|
79
|
-
break;
|
|
80
|
-
}
|
|
81
|
-
};
|
|
40
|
+
)}
|
|
82
41
|
|
|
83
|
-
return (
|
|
84
|
-
<Container ref={headerTop}>
|
|
85
|
-
<ScreenHeader text="Edición de producto" />
|
|
86
|
-
<div className="buttons-container">
|
|
87
|
-
{withChat && chat}
|
|
88
42
|
{isAuditor && auditableVersion && (
|
|
89
43
|
<Button
|
|
90
44
|
buttonType="general-white-button circular-button"
|
|
@@ -54,25 +54,25 @@ export const SignInLogin = (props) => {
|
|
|
54
54
|
} else {
|
|
55
55
|
const userGroup =
|
|
56
56
|
session.signInUserSession.accessToken.payload["cognito:groups"];
|
|
57
|
-
|
|
57
|
+
const response = await axios.get(
|
|
58
|
+
process.env.REACT_APP_USER_ENDPOINT,
|
|
59
|
+
{
|
|
60
|
+
headers: {
|
|
61
|
+
Authorization: session.signInUserSession.idToken.jwtToken,
|
|
62
|
+
},
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
if (userGroup[0] === props.users) {
|
|
58
66
|
sessionStorage.setItem("auth", true);
|
|
59
67
|
sessionStorage.setItem(
|
|
60
68
|
"jwt",
|
|
61
69
|
session.signInUserSession.idToken.jwtToken
|
|
62
70
|
);
|
|
63
|
-
const response = await axios.get(
|
|
64
|
-
process.env.REACT_APP_USER_ENDPOINT,
|
|
65
|
-
{
|
|
66
|
-
headers: {
|
|
67
|
-
Authorization: session.signInUserSession.idToken.jwtToken,
|
|
68
|
-
},
|
|
69
|
-
}
|
|
70
|
-
);
|
|
71
71
|
const user = JSON.parse(response.data.body).data[0];
|
|
72
72
|
const company = JSON.parse(response.data.body).data[1];
|
|
73
73
|
caches.keys().then((names) => {
|
|
74
74
|
names.forEach((name) => {
|
|
75
|
-
caches
|
|
75
|
+
caches.delete(name);
|
|
76
76
|
});
|
|
77
77
|
});
|
|
78
78
|
user.src = `https://${
|
|
@@ -89,7 +89,7 @@ export const SignInLogin = (props) => {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
} catch (error) {
|
|
92
|
-
console.log(error);
|
|
92
|
+
console.log(error.code);
|
|
93
93
|
setLoading(false);
|
|
94
94
|
if (error.code === "NotAuthorizedException") {
|
|
95
95
|
setSignInError("NotAuthorizedException");
|
|
@@ -8,5 +8,6 @@ export default {
|
|
|
8
8
|
const Template = (args) => <CardSelector {...args} />;
|
|
9
9
|
export const CardSelectorDefault = Template.bind({});
|
|
10
10
|
CardSelectorDefault.args = {
|
|
11
|
-
jwt: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
11
|
+
jwt: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M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Wmt5HlgAvsnkzqAimC9E6NH-IDLMAXq8T2f9INPzcdMR403Ybpy3Zrqphw5ITHK1tkUUZxcVsaAnRM7g1-q0OA5S0vRFbcw2lRgaZ_DVJbk0Lzba5NK4nDZ4U97Nw_zXqLA",
|
|
12
|
+
isSelected: true,
|
|
12
13
|
};
|
|
@@ -30,14 +30,12 @@ export const TagAndInput = ({
|
|
|
30
30
|
onKeyDown,
|
|
31
31
|
showTooltip,
|
|
32
32
|
auditClass,
|
|
33
|
-
onChange,
|
|
33
|
+
onChange,
|
|
34
34
|
dataInputs,
|
|
35
35
|
inputGroup,
|
|
36
36
|
boxOnboardingData,
|
|
37
37
|
}) => {
|
|
38
|
-
const [boxOnboardingList, setBoxOnboardingList] = useState(
|
|
39
|
-
boxOnboardingData || []
|
|
40
|
-
);
|
|
38
|
+
const [boxOnboardingList, setBoxOnboardingList] = useState(boxOnboardingData || []);
|
|
41
39
|
|
|
42
40
|
useEffect(() => {
|
|
43
41
|
const temp = {};
|
|
@@ -54,11 +52,12 @@ export const TagAndInput = ({
|
|
|
54
52
|
if (tempList.length > 0) {
|
|
55
53
|
setBoxOnboardingList(
|
|
56
54
|
tempList.map((value, index) =>
|
|
57
|
-
index === tempList.length - 1 ? {
|
|
55
|
+
index === tempList.length - 1 ? {value } : { value }
|
|
58
56
|
)
|
|
59
57
|
);
|
|
60
58
|
}
|
|
61
59
|
}, []);
|
|
60
|
+
|
|
62
61
|
useEffect(() => {
|
|
63
62
|
onChange && onChange(boxOnboardingList);
|
|
64
63
|
}, [boxOnboardingList]);
|
|
@@ -69,7 +68,7 @@ export const TagAndInput = ({
|
|
|
69
68
|
className={"input-container"}
|
|
70
69
|
key={`generalTagInput-${inputType}`}
|
|
71
70
|
>
|
|
72
|
-
|
|
71
|
+
{label?.length && (
|
|
73
72
|
<div className="title-container">
|
|
74
73
|
<ScreenHeader
|
|
75
74
|
text={label}
|
|
@@ -148,37 +148,17 @@ chatTicket_userTECH.args = {
|
|
|
148
148
|
chatType: "ticket",
|
|
149
149
|
chatContainerType: "fixed",
|
|
150
150
|
chatData: {
|
|
151
|
-
id:
|
|
152
|
-
ticketOwnerUserId:
|
|
153
|
-
|
|
151
|
+
id: 130,
|
|
152
|
+
ticketOwnerUserId: 194,
|
|
153
|
+
ticketCompany: undefined,
|
|
154
|
+
statusTicket: "PENDING",
|
|
154
155
|
currentUser: {
|
|
155
156
|
token:
|
|
156
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
157
|
-
id:
|
|
158
|
-
companyId:
|
|
157
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJmNTkyN2Y4ZS1jYmY3LTQ5MjItOWUwOS1lNjllYzBiMjczMWEiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6ImY1OTI3ZjhlLWNiZjctNDkyMi05ZTA5LWU2OWVjMGIyNzMxYSIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJlYTRlZmQ1Zi1mYTg4LTRjNDEtYTM3Ny02MWVkNmY0YTMyOTciLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY4MDA1Njg2NSwibmFtZSI6IklzbWFlbCBMb3BleiIsInBob25lX251bWJlciI6Iis1MjMxMTEzNjYzMzYiLCJleHAiOjE2ODAwNjA0NjUsImlhdCI6MTY4MDA1Njg2NSwiZW1haWwiOiJpbG9wZXpAY29udGVudG9oLmNvbSJ9.oRuv3LkdvctEMUjmeGw0-XefzV_Aoh1O2hFMik4RxpkkCUeP1O7AjA7lJI6sgoqa9Nwa2fCPRXk6ufi84UbgxGEgkupQmAvXTHQCw_uwCUVAZitlNGXSBl-VSisMuXSnckxdZQ1MvLV5BgLmiw4mu6HxKDN-Uw0xc7yL_yDtGu3NWxoO0Cm2zbej8jYLE9DV9wG297bjfzVQ7hzpEfEcB52I5Tg6nF2VDTx-8_m4mVVrpisbV5uBoYokbFyyOFVLZzUU7Je5uHukscHS5dje9IMTY8DE5S8xUWJubHjf_ktcy7Y2-F2cG5dI5oSdrBNU-wNNW5-OtRLgclSJLmbPCw",
|
|
158
|
+
id: 28,
|
|
159
|
+
companyId: 1,
|
|
159
160
|
isUserTech: true,
|
|
160
161
|
},
|
|
161
162
|
},
|
|
162
163
|
classNameContainerFixed: "chatTicket",
|
|
163
164
|
};
|
|
164
|
-
|
|
165
|
-
// ejemplo del chat para los cambios de status del producto.
|
|
166
|
-
export const chatProduct_status = Template.bind({});
|
|
167
|
-
chatProduct_status.args = {
|
|
168
|
-
chatType: "product_status",
|
|
169
|
-
chatContainerType: "popUp",
|
|
170
|
-
chatData: {
|
|
171
|
-
id: 37414,
|
|
172
|
-
version: 7,
|
|
173
|
-
retailerId: 70,
|
|
174
|
-
status: "AA",
|
|
175
|
-
orderId: 15189,
|
|
176
|
-
userToken:
|
|
177
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI5YTIxMzEyOC02NDgyLT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DPQBPXH5HXZQ",
|
|
178
|
-
currentUser: {
|
|
179
|
-
id: 37,
|
|
180
|
-
companyId: 2,
|
|
181
|
-
isUserTech: false,
|
|
182
|
-
},
|
|
183
|
-
},
|
|
184
|
-
};
|
|
@@ -22,7 +22,6 @@ import { Tooltip } from "../../../atoms/Tooltip";
|
|
|
22
22
|
import { Slide, Zoom } from "@mui/material";
|
|
23
23
|
import { useRef } from "react";
|
|
24
24
|
import { ImagePreview } from "../../../atoms/ImagePreview";
|
|
25
|
-
import { Status } from "../../../atoms/Status";
|
|
26
25
|
import { isUserTech } from "../../../../global-files/handle_userTech";
|
|
27
26
|
import { container } from "aws-amplify";
|
|
28
27
|
|
|
@@ -56,10 +55,7 @@ export const ContainerItems = (props) => {
|
|
|
56
55
|
|
|
57
56
|
useEffect(() => {
|
|
58
57
|
if (!items) return;
|
|
59
|
-
if (
|
|
60
|
-
["merchant_product", "order_product", "product_status"].includes(chatType)
|
|
61
|
-
)
|
|
62
|
-
renderItems();
|
|
58
|
+
if (["merchant_product", "order_product"].includes(chatType)) renderItems();
|
|
63
59
|
else if (chatType === "ticket") renderItemsTicket();
|
|
64
60
|
else setCustomItems([]);
|
|
65
61
|
}, [items]);
|
|
@@ -134,16 +130,6 @@ export const ContainerItems = (props) => {
|
|
|
134
130
|
return <label className="item-statusTicket">{item.value}</label>;
|
|
135
131
|
};
|
|
136
132
|
|
|
137
|
-
const renderStatusItem = (item) => {
|
|
138
|
-
const splitText = item.value.split("|");
|
|
139
|
-
let message = [];
|
|
140
|
-
splitText.forEach((text, i) => {
|
|
141
|
-
if (i === 1 || i === 3) message.push(<Status statusType={text} />);
|
|
142
|
-
else message.push(text);
|
|
143
|
-
});
|
|
144
|
-
return <label className="item-statusItem">{message}</label>;
|
|
145
|
-
};
|
|
146
|
-
|
|
147
133
|
const renderStatusTicketNeutral = (item) => {
|
|
148
134
|
return (
|
|
149
135
|
<Tooltip
|
|
@@ -318,7 +304,7 @@ export const ContainerItems = (props) => {
|
|
|
318
304
|
>
|
|
319
305
|
<li
|
|
320
306
|
className={
|
|
321
|
-
(ownMessage
|
|
307
|
+
(ownMessage ? "own-message " : "") +
|
|
322
308
|
(lastUserId === item.userId ? "sameUser" : "")
|
|
323
309
|
}
|
|
324
310
|
>
|
|
@@ -353,8 +339,6 @@ export const ContainerItems = (props) => {
|
|
|
353
339
|
? renderComment(item)
|
|
354
340
|
: item.type === "img"
|
|
355
341
|
? renderImg(item)
|
|
356
|
-
: item.type === "status"
|
|
357
|
-
? renderStatusItem(item)
|
|
358
342
|
: item.type === "file"
|
|
359
343
|
? renderFile(item, ownMessage)
|
|
360
344
|
: item.type === "statusTicket" &&
|
|
@@ -36,10 +36,6 @@ export const Container = styled.div`
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
@media (max-width: 768px) {
|
|
40
|
-
width: 90%;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
39
|
// lista de items
|
|
44
40
|
> ul {
|
|
45
41
|
--marginUserValue: 10px;
|
|
@@ -162,8 +158,7 @@ export const Container = styled.div`
|
|
|
162
158
|
.item-message,
|
|
163
159
|
.item-comment,
|
|
164
160
|
.item-file,
|
|
165
|
-
.item-statusTicket
|
|
166
|
-
.item-statusItem {
|
|
161
|
+
.item-statusTicket {
|
|
167
162
|
border-radius: 10px;
|
|
168
163
|
padding: 10px;
|
|
169
164
|
font-family: ${FontFamily.RobotoRegular}, sans-serif;
|
|
@@ -178,17 +173,10 @@ export const Container = styled.div`
|
|
|
178
173
|
.item-file {
|
|
179
174
|
background-color: #8386ee;
|
|
180
175
|
}
|
|
181
|
-
.item-statusTicket
|
|
182
|
-
.item-statusItem {
|
|
176
|
+
.item-statusTicket {
|
|
183
177
|
background-color: #85bc5b;
|
|
184
178
|
}
|
|
185
179
|
|
|
186
|
-
.item-statusItem {
|
|
187
|
-
display: flex;
|
|
188
|
-
gap: 3px;
|
|
189
|
-
align-items: center;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
180
|
.item-message {
|
|
193
181
|
&.different-company {
|
|
194
182
|
border: 1px solid #e33aa9;
|