contentoh-components-library 21.4.33 → 21.4.34

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.
Files changed (115) hide show
  1. package/dist/components/atoms/Avatar/index.js +2 -3
  2. package/dist/components/atoms/Card/index.js +5 -46
  3. package/dist/components/atoms/Card/styles.js +1 -3
  4. package/dist/components/atoms/CheckBox/index.js +2 -7
  5. package/dist/components/atoms/CheckBox/styles.js +1 -1
  6. package/dist/components/atoms/InputFormatter/styles.js +1 -1
  7. package/dist/components/atoms/SliderToolTip/styles.js +1 -1
  8. package/dist/components/molecules/CarouselImagesLogin/index.js +1 -1
  9. package/dist/components/molecules/HeaderTop/index.js +11 -68
  10. package/dist/components/molecules/SignInLogin/index.js +21 -13
  11. package/dist/components/molecules/TagAndInput/index.js +1 -1
  12. package/dist/components/organisms/Chat/Chat.stories.js +8 -27
  13. package/dist/components/organisms/Chat/ContainerItems/index.js +3 -19
  14. package/dist/components/organisms/Chat/ContainerItems/styles.js +1 -1
  15. package/dist/components/organisms/Chat/ContentChat/index.js +197 -350
  16. package/dist/components/organisms/Chat/Footer/index.js +39 -48
  17. package/dist/components/organisms/Chat/index.js +4 -49
  18. package/dist/components/organisms/Chat/styles.js +1 -1
  19. package/dist/components/organisms/FullProductNameHeader/index.js +2 -2
  20. package/dist/components/organisms/Modal/styles.js +1 -1
  21. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +4 -6
  22. package/dist/components/pages/ProviderProductEdition/index.js +142 -117
  23. package/dist/components/pages/ProviderProductEdition/styles.js +1 -1
  24. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +3 -7
  25. package/dist/components/pages/RetailerProductEdition/index.js +274 -276
  26. package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
  27. package/dist/components/pages/RetailerProductEdition/utils.js +2 -61
  28. package/dist/index.js +52 -247
  29. package/package.json +1 -4
  30. package/src/components/atoms/Avatar/index.js +2 -8
  31. package/src/components/atoms/Card/index.js +2 -35
  32. package/src/components/atoms/Card/styles.js +5 -41
  33. package/src/components/atoms/CheckBox/index.js +1 -4
  34. package/src/components/atoms/CheckBox/styles.js +0 -2
  35. package/src/components/atoms/InputFormatter/styles.js +1 -2
  36. package/src/components/atoms/SliderToolTip/styles.js +1 -1
  37. package/src/components/molecules/CarouselImagesLogin/index.js +1 -1
  38. package/src/components/molecules/HeaderTop/index.js +6 -52
  39. package/src/components/molecules/SignInLogin/index.js +4 -2
  40. package/src/components/molecules/TagAndInput/index.js +8 -10
  41. package/src/components/organisms/Chat/Chat.stories.js +7 -27
  42. package/src/components/organisms/Chat/ContainerItems/index.js +2 -18
  43. package/src/components/organisms/Chat/ContainerItems/styles.js +2 -14
  44. package/src/components/organisms/Chat/ContentChat/index.js +12 -88
  45. package/src/components/organisms/Chat/Footer/index.js +0 -11
  46. package/src/components/organisms/Chat/index.js +4 -46
  47. package/src/components/organisms/Chat/styles.js +0 -4
  48. package/src/components/organisms/FullProductNameHeader/index.js +1 -1
  49. package/src/components/organisms/Modal/styles.js +1 -4
  50. package/src/components/organisms/OrderDetail/utils/Table/utils.js +16 -6
  51. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +4 -6
  52. package/src/components/pages/ProviderProductEdition/index.js +129 -97
  53. package/src/components/pages/ProviderProductEdition/styles.js +1 -5
  54. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +2 -6
  55. package/src/components/pages/RetailerProductEdition/index.js +142 -111
  56. package/src/components/pages/RetailerProductEdition/styles.js +0 -4
  57. package/src/components/pages/RetailerProductEdition/utils.js +0 -37
  58. package/src/index.js +0 -15
  59. package/src/assets/images/defaultImages/check_circle.svg +0 -10
  60. package/src/components/atoms/ImageCarousel/ImgeSlider.stories.js +0 -76
  61. package/src/components/atoms/ImageCarousel/index.js +0 -103
  62. package/src/components/atoms/ImageCarousel/styles.js +0 -79
  63. package/src/components/atoms/PercentTag/PercentTag.stories.js +0 -7
  64. package/src/components/atoms/PercentTag/index.js +0 -9
  65. package/src/components/atoms/PercentTag/styles.js +0 -69
  66. package/src/components/atoms/RatingStars/RatingStars.stories.js +0 -10
  67. package/src/components/atoms/RatingStars/index.js +0 -31
  68. package/src/components/atoms/RatingStars/styles.js +0 -28
  69. package/src/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +0 -36
  70. package/src/components/atoms/RetailerCatalog/index.js +0 -49
  71. package/src/components/atoms/RetailerCatalog/styles.js +0 -30
  72. package/src/components/atoms/RetailerOption/RetailerOption.stories.js +0 -15
  73. package/src/components/atoms/RetailerOption/index.js +0 -53
  74. package/src/components/atoms/RetailerOption/styles.js +0 -41
  75. package/src/components/atoms/RetailersList/RetailersList.stories.js +0 -33
  76. package/src/components/atoms/RetailersList/index.js +0 -20
  77. package/src/components/atoms/RetailersList/styles.js +0 -19
  78. package/src/components/atoms/UserCatalog/UserCatalog.stories.js +0 -67
  79. package/src/components/atoms/UserCatalog/index.js +0 -100
  80. package/src/components/atoms/UserCatalog/styles.js +0 -24
  81. package/src/components/atoms/UserOption/UserOption.stories.js +0 -25
  82. package/src/components/atoms/UserOption/index.js +0 -95
  83. package/src/components/atoms/UserOption/styles.js +0 -61
  84. package/src/components/atoms/UserSelector/UserSelector.stories.js +0 -25
  85. package/src/components/atoms/UserSelector/index.js +0 -86
  86. package/src/components/atoms/UserSelector/styles.js +0 -55
  87. package/src/components/molecules/GridItem/GridItem.stories.js +0 -126
  88. package/src/components/molecules/GridItem/index.js +0 -105
  89. package/src/components/molecules/GridItem/styles.js +0 -104
  90. package/src/components/molecules/HeaderItem/ColumnItem.js +0 -9
  91. package/src/components/molecules/HeaderItem/HeaderItem.stories.js +0 -24
  92. package/src/components/molecules/HeaderItem/index.js +0 -26
  93. package/src/components/molecules/HeaderItem/styles.js +0 -27
  94. package/src/components/molecules/RowItem/ColumnItem.js +0 -9
  95. package/src/components/molecules/RowItem/RowItem.stories.js +0 -5660
  96. package/src/components/molecules/RowItem/index.js +0 -45
  97. package/src/components/molecules/RowItem/styles.js +0 -40
  98. package/src/components/molecules/StripeCardForm/StripeCardForm.stories.js +0 -14
  99. package/src/components/molecules/StripeCardForm/index.js +0 -45
  100. package/src/components/molecules/StripeCardForm/paymentForm.js +0 -126
  101. package/src/components/molecules/StripeCardForm/styles.js +0 -84
  102. package/src/components/molecules/StripeCardSelector/CardSelector.stories.js +0 -12
  103. package/src/components/molecules/StripeCardSelector/index.js +0 -59
  104. package/src/components/molecules/StripeCardSelector/styles.js +0 -15
  105. package/src/components/molecules/StripeCardSelector/utils.js +0 -17
  106. package/src/components/organisms/GridProducts/GridProducts.stories.js +0 -5485
  107. package/src/components/organisms/GridProducts/index.js +0 -50
  108. package/src/components/organisms/GridProducts/styles.js +0 -14
  109. package/src/components/organisms/GridProducts/utils.js +0 -111
  110. package/src/components/organisms/PanelLayout/PanelLayout.stories.js +0 -63
  111. package/src/components/organisms/PanelLayout/index.js +0 -11
  112. package/src/components/organisms/PanelLayout/styles.js +0 -39
  113. package/src/components/organisms/SideModal/SideModal.stories.js +0 -23
  114. package/src/components/organisms/SideModal/index.js +0 -50
  115. package/src/components/organisms/SideModal/styles.js +0 -30
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.4.33",
3
+ "version": "21.4.34",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -16,8 +16,6 @@
16
16
  "@mui/material": "^5.12.0",
17
17
  "@mui/styled-engine-sc": "^5.12.0",
18
18
  "@storybook/addon-postcss": "^2.0.0",
19
- "@stripe/react-stripe-js": "^2.2.0",
20
- "@stripe/stripe-js": "^2.1.4",
21
19
  "@testing-library/jest-dom": "^5.11.4",
22
20
  "@testing-library/react": "^11.1.0",
23
21
  "@testing-library/user-event": "^12.1.10",
@@ -30,7 +28,6 @@
30
28
  "contentoh-components-library": "^21.0.18",
31
29
  "draft-js": "^0.11.7",
32
30
  "file-saver": "^2.0.5",
33
- "infinite-react-carousel": "^1.2.11",
34
31
  "js-base64": "^3.7.2",
35
32
  "moment": "^2.29.4",
36
33
  "prop-types": "^15.7.2",
@@ -2,18 +2,12 @@ import { Container } from "./styles";
2
2
  import ReactImageFallback from "react-image-fallback";
3
3
  import defaultProfile from "../../../assets/images/defaultImages/defaultProfileImage.svg";
4
4
 
5
- export const Avatar = ({
6
- image,
7
- altText,
8
- imageType,
9
- onClick,
10
- fallbackImage,
11
- }) => {
5
+ export const Avatar = ({ image, altText, imageType, onClick }) => {
12
6
  return (
13
7
  <Container className={imageType}>
14
8
  <ReactImageFallback
15
9
  src={image}
16
- fallbackImage={fallbackImage || defaultProfile}
10
+ fallbackImage={defaultProfile}
17
11
  alt={altText}
18
12
  onClick={onClick}
19
13
  />
@@ -1,42 +1,9 @@
1
1
  import { Container } from "./styles";
2
- import { CheckBox } from "../CheckBox";
3
- import { useStripe } from "@stripe/react-stripe-js";
4
-
5
- export const Card = ({
6
- card = {},
7
- selectedCard,
8
- setSelectedCard,
9
- setCard,
10
- setStripe,
11
- }) => {
12
- const stripe = useStripe();
13
-
14
- const handleOnChange = (e, cardId) => {
15
- if (e.target.checked) {
16
- setCard && setCard({ ...card, isNew: 0 });
17
- setStripe && setStripe(stripe);
18
- setSelectedCard && setSelectedCard(cardId);
19
- } else {
20
- setSelectedCard && setSelectedCard("");
21
- setCard && setCard(null);
22
- }
23
- };
24
2
 
3
+ export const Card = ({ cardIcon, altText }) => {
25
4
  return (
26
5
  <Container>
27
- <div className="card-details">
28
- <CheckBox
29
- id={card.id}
30
- label={
31
- <>
32
- <span className="brand-card">{card.brand}</span>
33
- <span>{`**** **** **** ${card.last4}`}</span>
34
- </>
35
- }
36
- checked={selectedCard === card.id}
37
- onChange={(e) => handleOnChange(e, card.id)}
38
- />
39
- </div>
6
+ <img src={cardIcon} alt={altText} />
40
7
  </Container>
41
8
  );
42
9
  };
@@ -1,44 +1,8 @@
1
1
  import styled from "styled-components";
2
- import { FontFamily, GlobalColors } from "../../../global-files/variables";
3
2
 
4
3
  export const Container = styled.div`
5
- display: flex;
6
- cursor: pointer;
7
-
8
- .card-details {
9
- label {
10
- cursor: pointer;
11
- height: 25px;
12
- p {
13
- margin-left: 40px;
14
- span {
15
- & + * {
16
- margin-left: 20px;
17
- }
18
- }
19
- }
20
- }
21
- & + * {
22
- margin-left: 20px;
23
- }
24
- }
25
-
26
- .cvc-input {
27
- display: flex;
28
- align-items: center;
29
- color: ${GlobalColors.s4};
30
- font-family: ${FontFamily.AvenirNext};
31
- font-size: 13px;
32
-
33
- .card-input {
34
- border: 1px solid #f0f0f0 !important;
35
- border-radius: 5px;
36
- padding: 3px;
37
- width: 50px;
38
- }
39
- }
40
-
41
- & + * {
42
- margin-top: 15px;
43
- }
44
- `;
4
+ img {
5
+ width: 100%;
6
+ margin:auto;
7
+ }
8
+ `;
@@ -7,11 +7,9 @@ export const CheckBox = ({
7
7
  isFilter,
8
8
  defaultChecked,
9
9
  disabled = false,
10
- checked,
11
- className = "",
12
10
  }) => {
13
11
  return (
14
- <Container key={`check-${id}`} className={className}>
12
+ <Container key={`check-${id}`}>
15
13
  <input
16
14
  type="checkbox"
17
15
  name={id}
@@ -19,7 +17,6 @@ export const CheckBox = ({
19
17
  onChange={onChange}
20
18
  defaultChecked={defaultChecked}
21
19
  disabled={disabled}
22
- checked={checked}
23
20
  />
24
21
  <label htmlFor={id}>
25
22
  {label && <p className={isFilter && "filter-text"}>{label}</p>}
@@ -46,8 +46,6 @@ export const Container = styled.div`
46
46
  top: 50%;
47
47
  transform: translateY(-50%);
48
48
  background-image: url(${unchecked});
49
- z-index: 5;
50
- cursor: pointer;
51
49
  }
52
50
  }
53
51
  `;
@@ -37,6 +37,5 @@ export const Container = styled.div`
37
37
  font-family: ${FontFamily.AvenirNext};
38
38
  color: ${GlobalColors.deep_gray};
39
39
  text-align: right;
40
- margin-top: 5px;
41
40
  }
42
- `;
41
+ `;
@@ -46,7 +46,7 @@ export const Slider = styled.div`
46
46
  }
47
47
  &.bottom-slide {
48
48
  top: 100%;
49
- right: calc(100% + -100px);
49
+ right: calc(100% + -70px);
50
50
  }
51
51
  ul,
52
52
  li {
@@ -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?.classList.add("resaltado");
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
- const renderChat = (chatType) => {
46
- switch (chatType) {
47
- case "product_status":
48
- chatData &&
49
- setChat(
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"
@@ -12,6 +12,7 @@ import showPassword from "../../../assets/images/editField/showPassword.png";
12
12
  import axios from "axios";
13
13
 
14
14
  export const SignInLogin = (props) => {
15
+ if (props.showProps) console.log(props);
15
16
  const [emptyEmail, setEmptyEmail] = useState(false);
16
17
  const [invalidEmail, setInvalidEmail] = useState(false);
17
18
  const [emptyPassword, setEmptyPassword] = useState(false);
@@ -70,9 +71,10 @@ export const SignInLogin = (props) => {
70
71
  );
71
72
  const user = JSON.parse(response.data.body).data[0];
72
73
  const company = JSON.parse(response.data.body).data[1];
74
+ console.log({ caches, keys: caches.keys() });
73
75
  caches.keys().then((names) => {
74
76
  names.forEach((name) => {
75
- caches.delete(name);
77
+ caches?.delete(name);
76
78
  });
77
79
  });
78
80
  user.src = `https://${
@@ -89,7 +91,7 @@ export const SignInLogin = (props) => {
89
91
  }
90
92
  }
91
93
  } catch (error) {
92
- console.log(error.code);
94
+ console.log(error);
93
95
  setLoading(false);
94
96
  if (error.code === "NotAuthorizedException") {
95
97
  setSignInError("NotAuthorizedException");
@@ -36,16 +36,14 @@ export const TagAndInput = ({
36
36
  className={"input-container"}
37
37
  key={`generalTagInput-${inputType}`}
38
38
  >
39
- {label?.length && (
40
- <div className="title-container">
41
- <ScreenHeader
42
- text={label}
43
- headerType={"input-name-header"}
44
- color={color}
45
- />
46
- {showTooltip && <span className="tooltip">{label}</span>}
47
- </div>
48
- )}
39
+ <div className="title-container">
40
+ <ScreenHeader
41
+ text={label}
42
+ headerType={"input-name-header"}
43
+ color={color}
44
+ />
45
+ {showTooltip && <span className="tooltip">{label}</span>}
46
+ </div>
49
47
  <GeneralInput
50
48
  inputId={inputId}
51
49
  inputType={inputType}
@@ -148,37 +148,17 @@ chatTicket_userTECH.args = {
148
148
  chatType: "ticket",
149
149
  chatContainerType: "fixed",
150
150
  chatData: {
151
- id: 171,
152
- ticketOwnerUserId: 52,
153
- statusTicket: "IN_PROGRESS",
151
+ id: 130,
152
+ ticketOwnerUserId: 194,
153
+ ticketCompany: undefined,
154
+ statusTicket: "PENDING",
154
155
  currentUser: {
155
156
  token:
156
- "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI3M2NjOGQ0MC1jODQxLTQyMmEtYTJmMi1lNjlkN2ZlMjZlYmYiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6IjczY2M4ZDQwLWM4NDEtNDIyYS1hMmYyLWU2OWQ3ZmUyNmViZiIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiIwYWNiYTdlYy01OGJhLTQyNGYtOTM5OC02ZGMxOGI1YTRkODYiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY4ODk0MzcxNywibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY4ODk0NzMxNywiaWF0IjoxNjg4OTQzNzE3LCJlbWFpbCI6Im9hcmVuYXNAY29udGVudG9oLmNvbSJ9.SHeA5EMqLdqlTuDBTpJ3l_lAAqjMlOT2Dm9U9yf-Y3-4FR-3cwQ_16sdsmGCjJpwkhdYBEyuQbFkY1xnQHOBLMow0izWD4CDlhlNXkWBE_3DjgCspyPMlz31Lfik2ddnkHp3HQeLwucC4uyum3N-roQA7HkuWQHSBIplp6b-Xd44OmN9X-V_kseN3QOX6o7kxNFjwZL_DUzTJUdMDOtIXXIKYO2FLkR1eWJDNdvee5FEIWAxJXfaSZ__Awawfi5k93ILXrPX7QVt78lOH3THMyiPTtfiOOwMhoSQz_k5DIuofE8FM_1-nLNajM18pI49wPQ_-k3ltCjChjqy-OlERQ",
157
- id: 65,
158
- companyId: 2,
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.eyJzdWIiOiI5YTIxMzEyOC02NDgyLTRjMTYtYTRiNi02ZTY0ZjIyNWIxYmQiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6IjlhMjEzMTI4LTY0ODItNGMxNi1hNGI2LTZlNjRmMjI1YjFiZCIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJhOWFhMDQ4Zi05YzRjLTQxODMtYWUzMS03OWVjNjBhY2NjZGYiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY4MzU4ODM4OSwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY4MzU5MTk4OSwiaWF0IjoxNjgzNTg4Mzg5LCJlbWFpbCI6ImlzbWFlbDk3bG9wZXpAZ21haWwuY29tIn0.k9FQfRR02XC3WWfOzWhrbJGmp69AmCHJEIrgtXKhIwC69trdphSm1AKkZnDJMsEdkpUgjF_zAOsa_xYRxO6goXy7WXVc_p7N-yFHlkhZrRyn3LEFKaLzD8vVqlWx4kgfSERm7KhI1AxPmrA-lw8eF6Axvqn3PvuszAw89_WhPOcnOt8vU0MxAVhLgS8oM6vyHFmHEHWQ2FnSYYed9sEvAxGh_B44aIgWeDteQGeGdYhsm6rUcxgkrskywZJp9FW5VgYXuDcC5NpvomMMRy_v95UV897JzCHl__sK2Z9ahm0eczVN3tAc0GbKnlN96ZrGTQ_nmNHbuMDPQBPXH5HXZQ",
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 && item.type !== "status" ? "own-message " : "") +
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;