contentoh-components-library 21.2.89 → 21.2.90

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 (175) hide show
  1. package/.env.development +1 -6
  2. package/dist/components/atoms/ChatPopUp/ChatPopUp.stories.js +28 -0
  3. package/dist/components/atoms/ChatPopUp/index.js +841 -0
  4. package/dist/components/atoms/ChatPopUp/styles.js +27 -0
  5. package/dist/components/atoms/ChatPopUp/utils/handlersChat.js +182 -0
  6. package/dist/components/atoms/ProgressBar/styles.js +1 -1
  7. package/dist/components/atoms/Tooltip/Tooltip.stories.js +5 -35
  8. package/dist/components/atoms/Tooltip/index.js +24 -41
  9. package/dist/components/atoms/Tooltip/styles.js +1 -3
  10. package/dist/components/molecules/CustomSelect/CustomSelect.stories.js +22 -21
  11. package/dist/components/molecules/CustomSelect/SelectItem.js +1 -10
  12. package/dist/components/molecules/HeaderTop/index.js +5 -10
  13. package/dist/components/molecules/HeaderTop/styles.js +1 -1
  14. package/dist/components/pages/Dashboard/Dashboard.stories.js +44 -16
  15. package/dist/components/pages/Dashboard/index.js +17 -10
  16. package/dist/components/pages/ProviderProductEdition/index.js +2 -3
  17. package/dist/components/pages/RetailerProductEdition/index.js +7 -4
  18. package/dist/global-files/fonts.css +0 -18
  19. package/dist/global-files/variables.js +1 -3
  20. package/dist/index.js +45 -227
  21. package/package.json +1 -13
  22. package/src/components/atoms/ProgressBar/styles.js +4 -3
  23. package/src/components/molecules/CustomSelect/CustomSelect.stories.js +12 -20
  24. package/src/components/molecules/CustomSelect/SelectItem.js +0 -7
  25. package/src/components/molecules/HeaderTop/index.js +6 -11
  26. package/src/components/molecules/HeaderTop/styles.js +0 -4
  27. package/src/components/pages/Dashboard/Dashboard.stories.js +47 -16
  28. package/src/components/pages/Dashboard/index.js +13 -4
  29. package/src/components/pages/ProviderProductEdition/index.js +7 -6
  30. package/src/components/pages/RetailerProductEdition/index.js +4 -5
  31. package/src/global-files/fonts.css +0 -18
  32. package/src/global-files/variables.js +0 -2
  33. package/src/index.js +0 -14
  34. package/dist/assets/fonts/Roboto/Roboto-Medium.ttf +0 -0
  35. package/dist/assets/fonts/Roboto/Roboto-Regular.ttf +0 -0
  36. package/dist/assets/images/defaultImages/Spinner.gif +0 -0
  37. package/dist/assets/images/defaultImages/notFound.svg +0 -124
  38. package/dist/components/atoms/ButtonFileChooser/ButtonFileChooser.stories.js +0 -72
  39. package/dist/components/atoms/ButtonFileChooser/index.js +0 -118
  40. package/dist/components/atoms/ButtonFileChooser/styles.js +0 -20
  41. package/dist/components/atoms/ButtonV2/ButtonV2.stories.js +0 -66
  42. package/dist/components/atoms/ButtonV2/index.js +0 -111
  43. package/dist/components/atoms/ButtonV2/styles.js +0 -53
  44. package/dist/components/atoms/CustomIcon/CustomIcon.stories.js +0 -50
  45. package/dist/components/atoms/CustomIcon/index.js +0 -40
  46. package/dist/components/atoms/CustomIcon/styles.js +0 -33
  47. package/dist/components/atoms/IconFile/IconFile.stories.js +0 -48
  48. package/dist/components/atoms/IconFile/index.js +0 -249
  49. package/dist/components/atoms/IconFile/styles.js +0 -23
  50. package/dist/components/atoms/Image/Image.stories.js +0 -63
  51. package/dist/components/atoms/Image/index.js +0 -74
  52. package/dist/components/atoms/Image/styles.js +0 -40
  53. package/dist/components/atoms/ImageLink/ImageLink.stories.js +0 -63
  54. package/dist/components/atoms/ImageLink/index.js +0 -77
  55. package/dist/components/atoms/ImageLink/styles.js +0 -40
  56. package/dist/components/atoms/ImagePreview/ImagePreview.stories.js +0 -70
  57. package/dist/components/atoms/ImagePreview/index.js +0 -222
  58. package/dist/components/atoms/ImagePreview/styles.js +0 -44
  59. package/dist/components/atoms/InputText/InputText.stories.js +0 -60
  60. package/dist/components/atoms/InputText/index.js +0 -66
  61. package/dist/components/atoms/InputText/styles.js +0 -32
  62. package/dist/components/atoms/NotFound/NotFound.stories.js +0 -36
  63. package/dist/components/atoms/NotFound/index.js +0 -75
  64. package/dist/components/atoms/NotFound/styles.js +0 -20
  65. package/dist/components/molecules/ButtonDownloadFile/DownloadFile.stories.js +0 -66
  66. package/dist/components/molecules/ButtonDownloadFile/index.js +0 -179
  67. package/dist/components/molecules/ButtonDownloadFile/styles.js +0 -23
  68. package/dist/components/molecules/ImageTooltip/ImageTooltip.stories.js +0 -72
  69. package/dist/components/molecules/ImageTooltip/index.js +0 -84
  70. package/dist/components/molecules/ImageTooltip/styles.js +0 -33
  71. package/dist/components/organisms/Chat/Chat.stories.js +0 -215
  72. package/dist/components/organisms/Chat/ChatLists/ChatLists.stories.js +0 -83
  73. package/dist/components/organisms/Chat/ChatLists/index.js +0 -160
  74. package/dist/components/organisms/Chat/ChatLists/styles.js +0 -29
  75. package/dist/components/organisms/Chat/ContainerItems/ContainerItems.stories.js +0 -176
  76. package/dist/components/organisms/Chat/ContainerItems/index.js +0 -572
  77. package/dist/components/organisms/Chat/ContainerItems/styles.js +0 -20
  78. package/dist/components/organisms/Chat/ContentChat/ContentChat.stories.js +0 -142
  79. package/dist/components/organisms/Chat/ContentChat/index.js +0 -1422
  80. package/dist/components/organisms/Chat/ContentChat/styles.js +0 -20
  81. package/dist/components/organisms/Chat/Footer/Footer.stories.js +0 -43
  82. package/dist/components/organisms/Chat/Footer/index.js +0 -984
  83. package/dist/components/organisms/Chat/Footer/styles.js +0 -32
  84. package/dist/components/organisms/Chat/Header/Header.stories.js +0 -96
  85. package/dist/components/organisms/Chat/Header/index.js +0 -84
  86. package/dist/components/organisms/Chat/Header/styles.js +0 -20
  87. package/dist/components/organisms/Chat/index.js +0 -327
  88. package/dist/components/organisms/Chat/styles.js +0 -29
  89. package/dist/components/organisms/Modal/Modal.stories.js +0 -66
  90. package/dist/components/organisms/Modal/index.js +0 -95
  91. package/dist/components/organisms/Modal/styles.js +0 -20
  92. package/dist/global-files/handle_http.js +0 -383
  93. package/dist/global-files/utils.js +0 -472
  94. package/src/assets/fonts/Roboto/Roboto-Medium.ttf +0 -0
  95. package/src/assets/fonts/Roboto/Roboto-Regular.ttf +0 -0
  96. package/src/assets/images/chatPopup/Spinner.gif +0 -0
  97. package/src/assets/images/chatPopup/close.svg +0 -3
  98. package/src/assets/images/chatPopup/defaultImage.png +0 -0
  99. package/src/assets/images/chatPopup/defaultProfile.png +0 -0
  100. package/src/assets/images/chatPopup/doc.svg +0 -1
  101. package/src/assets/images/chatPopup/document.svg +0 -1
  102. package/src/assets/images/chatPopup/iconChat.svg +0 -19
  103. package/src/assets/images/chatPopup/iconPlus.svg +0 -3
  104. package/src/assets/images/chatPopup/pdf.svg +0 -75
  105. package/src/assets/images/chatPopup/remove.svg +0 -4
  106. package/src/assets/images/chatPopup/send.svg +0 -3
  107. package/src/assets/images/chatPopup/svgIcon.svg +0 -109
  108. package/src/assets/images/chatPopup/upload_file.svg +0 -3
  109. package/src/assets/images/chatPopup/xls.svg +0 -53
  110. package/src/assets/images/customSelect/starIcon.svg +0 -14
  111. package/src/assets/images/defaultImages/Spinner.gif +0 -0
  112. package/src/assets/images/defaultImages/notFound.svg +0 -124
  113. package/src/components/atoms/ButtonFileChooser/ButtonFileChooser.stories.js +0 -47
  114. package/src/components/atoms/ButtonFileChooser/index.js +0 -69
  115. package/src/components/atoms/ButtonFileChooser/styles.js +0 -4
  116. package/src/components/atoms/ButtonV2/ButtonV2.stories.js +0 -50
  117. package/src/components/atoms/ButtonV2/index.js +0 -74
  118. package/src/components/atoms/ButtonV2/styles.js +0 -187
  119. package/src/components/atoms/CustomIcon/CustomIcon.stories.js +0 -36
  120. package/src/components/atoms/CustomIcon/index.js +0 -41
  121. package/src/components/atoms/CustomIcon/styles.js +0 -85
  122. package/src/components/atoms/IconFile/IconFile.stories.js +0 -35
  123. package/src/components/atoms/IconFile/index.js +0 -119
  124. package/src/components/atoms/IconFile/styles.js +0 -67
  125. package/src/components/atoms/Image/Image.stories.js +0 -43
  126. package/src/components/atoms/Image/index.js +0 -54
  127. package/src/components/atoms/Image/styles.js +0 -25
  128. package/src/components/atoms/ImageLink/ImageLink.stories.js +0 -43
  129. package/src/components/atoms/ImageLink/index.js +0 -57
  130. package/src/components/atoms/ImageLink/styles.js +0 -30
  131. package/src/components/atoms/ImagePreview/ImagePreview.stories.js +0 -52
  132. package/src/components/atoms/ImagePreview/index.js +0 -191
  133. package/src/components/atoms/ImagePreview/styles.js +0 -77
  134. package/src/components/atoms/InputText/InputText.stories.js +0 -39
  135. package/src/components/atoms/InputText/index.js +0 -61
  136. package/src/components/atoms/InputText/styles.js +0 -89
  137. package/src/components/atoms/NotFound/NotFound.stories.js +0 -19
  138. package/src/components/atoms/NotFound/index.js +0 -52
  139. package/src/components/atoms/NotFound/styles.js +0 -55
  140. package/src/components/atoms/Tooltip/Tooltip.stories.js +0 -51
  141. package/src/components/atoms/Tooltip/index.js +0 -59
  142. package/src/components/atoms/Tooltip/styles.js +0 -42
  143. package/src/components/molecules/ButtonDownloadFile/DownloadFile.stories.js +0 -54
  144. package/src/components/molecules/ButtonDownloadFile/index.js +0 -111
  145. package/src/components/molecules/ButtonDownloadFile/styles.js +0 -66
  146. package/src/components/molecules/ImageTooltip/ImageTooltip.stories.js +0 -46
  147. package/src/components/molecules/ImageTooltip/index.js +0 -62
  148. package/src/components/molecules/ImageTooltip/styles.js +0 -18
  149. package/src/components/organisms/Chat/Chat.stories.js +0 -199
  150. package/src/components/organisms/Chat/ChatLists/ChatLists.stories.js +0 -65
  151. package/src/components/organisms/Chat/ChatLists/Rotoplas.jpeg +0 -0
  152. package/src/components/organisms/Chat/ChatLists/THD.png +0 -0
  153. package/src/components/organisms/Chat/ChatLists/index.js +0 -141
  154. package/src/components/organisms/Chat/ChatLists/styles.js +0 -162
  155. package/src/components/organisms/Chat/ContainerItems/ContainerItems.stories.js +0 -142
  156. package/src/components/organisms/Chat/ContainerItems/index.js +0 -551
  157. package/src/components/organisms/Chat/ContainerItems/styles.js +0 -336
  158. package/src/components/organisms/Chat/ContentChat/ContentChat.stories.js +0 -102
  159. package/src/components/organisms/Chat/ContentChat/Rotoplas.jpeg +0 -0
  160. package/src/components/organisms/Chat/ContentChat/THD.png +0 -0
  161. package/src/components/organisms/Chat/ContentChat/index.js +0 -900
  162. package/src/components/organisms/Chat/ContentChat/styles.js +0 -41
  163. package/src/components/organisms/Chat/Footer/Footer.stories.js +0 -22
  164. package/src/components/organisms/Chat/Footer/index.js +0 -669
  165. package/src/components/organisms/Chat/Footer/styles.js +0 -286
  166. package/src/components/organisms/Chat/Header/Header.stories.js +0 -66
  167. package/src/components/organisms/Chat/Header/index.js +0 -94
  168. package/src/components/organisms/Chat/Header/styles.js +0 -49
  169. package/src/components/organisms/Chat/index.js +0 -294
  170. package/src/components/organisms/Chat/styles.js +0 -42
  171. package/src/components/organisms/Modal/Modal.stories.js +0 -55
  172. package/src/components/organisms/Modal/index.js +0 -97
  173. package/src/components/organisms/Modal/styles.js +0 -103
  174. package/src/global-files/handle_http.js +0 -231
  175. package/src/global-files/utils.js +0 -300
package/package.json CHANGED
@@ -1,19 +1,11 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.2.89",
3
+ "version": "21.2.90",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
7
7
  "@aws-amplify/ui-react": "^2.17.0",
8
8
  "@babel/runtime": "^7.17.2",
9
- "@emotion/react": "^11.10.4",
10
- "@emotion/styled": "^11.10.4",
11
- "@fortawesome/fontawesome-svg-core": "^6.2.0",
12
- "@fortawesome/free-regular-svg-icons": "^6.2.0",
13
- "@fortawesome/free-solid-svg-icons": "^6.2.0",
14
- "@fortawesome/react-fontawesome": "^0.2.0",
15
- "@mui/material": "^5.10.8",
16
- "@mui/styled-engine-sc": "^5.10.6",
17
9
  "@storybook/addon-postcss": "^2.0.0",
18
10
  "@testing-library/jest-dom": "^5.11.4",
19
11
  "@testing-library/react": "^11.1.0",
@@ -27,7 +19,6 @@
27
19
  "draft-js": "^0.11.7",
28
20
  "file-saver": "^2.0.5",
29
21
  "js-base64": "^3.7.2",
30
- "moment": "^2.29.4",
31
22
  "prop-types": "^15.7.2",
32
23
  "react": "^17.0.2",
33
24
  "react-chartjs-2": "^4.0.1",
@@ -38,10 +29,7 @@
38
29
  "react-image-fallback": "^8.0.0",
39
30
  "react-quill": "^1.3.5",
40
31
  "react-router-dom": "^5.3.3",
41
- "react-scroll": "^1.8.8",
42
- "react-transition-group": "^4.4.5",
43
32
  "styled-components": "^5.3.3",
44
- "swiper": "^8.4.4",
45
33
  "uuid": "^8.3.2",
46
34
  "web-vitals": "^1.0.1"
47
35
  },
@@ -16,12 +16,13 @@ export const Container = styled.div`
16
16
  ? GlobalColors.s4
17
17
  : GlobalColors.white};
18
18
 
19
- &.status-CA {
19
+ &.status-CA,
20
+ &.status-AS,
21
+ &.status-PA {
20
22
  background-color: ${GlobalColors.in_progress};
21
23
  }
22
24
 
23
- &.status-R,
24
- &.status-AS {
25
+ &.status-R {
25
26
  background-color: ${GlobalColors.reception};
26
27
  }
27
28
 
@@ -1,5 +1,4 @@
1
1
  import { CustomSelect } from "./index";
2
- import iconStar from "../../../assets/images/customSelect/starIcon.svg";
3
2
 
4
3
  export default {
5
4
  title: "Components/molecules/CustomSelect",
@@ -9,27 +8,20 @@ export default {
9
8
  const Template = (args) => <CustomSelect {...args} />;
10
9
  export const CustomSelectDefault = Template.bind({});
11
10
  CustomSelectDefault.args = {
12
- // selectLabel: "Todos los departamentos",
11
+ selectLabel: "Todos los departamentos",
13
12
  defaultOption: "Todos los departamentos",
14
13
  options: [
15
- {
16
- id: 47,
17
- name: "Enero 2023",
18
- isSelected: true,
19
- },
20
- {
21
- id: 49,
22
- name: "Mis Favoritos",
14
+ {
15
+ id: 1,
16
+ value: "Decoración",
17
+ subOptions: [
18
+ { id: 1, value: "Espejos" },
19
+ { id: 2, value: "Persianas" },
20
+ ],
23
21
  },
22
+ { id: 2, value: "Eléctrico" },
23
+ { id: 3, value: "Ferretería" },
24
+ { id: 4, value: "Herramientas" },
25
+ { id: 5, value: "Iluminación" },
24
26
  ],
25
- onClickItem: (v, id) => {
26
- if (v) {
27
- console.log("Agregar a la lista", id);
28
- } else {
29
- console.log("Eliminar a la lista", id);
30
- }
31
- },
32
- icon: iconStar,
33
- showSearchBar: true,
34
- customOptions: <p>Esto es un customOptions</p>
35
27
  };
@@ -7,7 +7,6 @@ export const SelecItem = ({
7
7
  setParameterArray,
8
8
  activeFilters,
9
9
  setActiveFilters,
10
- onClickItem,
11
10
  }) => {
12
11
  const [showSubOptions, setShowSubOptions] = useState(false);
13
12
  const [chkGlobal, setChkGlobal] = useState(false);
@@ -18,9 +17,6 @@ export const SelecItem = ({
18
17
  id={"main-item-" + option.id}
19
18
  label={option.name}
20
19
  onChange={(e) => {
21
- if (onClickItem) {
22
- onClickItem(e.target.checked, option.id)
23
- }
24
20
  const subOptions = option.subOptions;
25
21
  const filtersCopy = { ...activeFilters };
26
22
  if (subOptions) {
@@ -81,9 +77,6 @@ export const SelecItem = ({
81
77
  activeFilters[option.name][sub.name]
82
78
  }
83
79
  onChange={(e) => {
84
- if (onClickItem) {
85
- onClickItem(e.target.checked, sub.id)
86
- }
87
80
  if (e.target.checked) {
88
81
  setParameterArray((current) =>
89
82
  [...current, sub.id].sort((a, b) => a - b)
@@ -2,7 +2,6 @@ import { Container } from "./styles";
2
2
  import { ScreenHeader } from "../../atoms/ScreenHeader/index";
3
3
  import { Button } from "../../atoms/GeneralButton/index";
4
4
  import { useEffect, useRef } from "react";
5
- import { Chat } from "../../organisms/Chat";
6
5
 
7
6
  export const HeaderTop = ({ setHeaderTop }) => {
8
7
  const headerTop = useRef();
@@ -14,16 +13,12 @@ export const HeaderTop = ({ setHeaderTop }) => {
14
13
  return (
15
14
  <Container ref={headerTop}>
16
15
  <ScreenHeader text="Edición de producto" />
17
- <div className="buttons-top">
18
- {/* <Chat /> */}
19
-
20
- <Button
21
- buttonType="close-button"
22
- onClick={() => {
23
- window.location.href = `/products`;
24
- }}
25
- />
26
- </div>
16
+ <Button
17
+ buttonType="close-button"
18
+ onClick={() => {
19
+ window.location.href = `/products`;
20
+ }}
21
+ />
27
22
  </Container>
28
23
  );
29
24
  };
@@ -3,8 +3,4 @@ import styled from "styled-components";
3
3
  export const Container = styled.div`
4
4
  display: flex;
5
5
  justify-content: space-between;
6
- .buttons-top {
7
- display: flex;
8
- align-items: center;
9
- }
10
6
  `;
@@ -9,29 +9,30 @@ const Template = (args) => <Dashboard {...args} />;
9
9
  export const DashboardDeafult = Template.bind({});
10
10
  DashboardDeafult.args = {
11
11
  user: {
12
- id_user: 425,
13
- name: "Auditor QA",
14
- last_name: " ",
15
- email: "ladiboh785@mi166.com",
16
- position: "Tester",
17
- telephone: null,
18
- country: null,
19
- id_company: 254,
20
- id_cognito: "23a3f496-4e38-4e12-9bf5-7f90b77a2f35",
12
+ id_user: 1236,
13
+ name: "THD",
14
+ last_name: "Proveedor",
15
+ email: "thd@allfreemail.net",
16
+ position: "Prod test",
17
+ telephone: "+523111111111",
18
+ country: "México",
19
+ id_company: 816,
20
+ id_cognito: "d660ccca-f906-4970-892c-6d152e832e5d",
21
21
  birth_Date: null,
22
22
  about_me: null,
23
23
  zip_code: null,
24
24
  address: null,
25
25
  job: null,
26
26
  id_stripe: null,
27
- id_role: 6,
27
+ id_role: 0,
28
28
  active: 1,
29
29
  is_retailer: 0,
30
- email_notify: null,
30
+ email_notify: 1,
31
+ is_superadmin: 0,
31
32
  membership: {
32
- id: 750,
33
- start_date: "2022-01-07T21:32:54.000Z",
34
- end_date: "2023-01-07T21:32:54.000Z",
33
+ id: 797,
34
+ start_date: "2022-06-19T04:18:39.000Z",
35
+ end_date: "2023-06-19T04:18:39.000Z",
35
36
  planID: 6,
36
37
  plan: "prod_KvGd6YSTJyR3AP",
37
38
  name: "Plan Small",
@@ -39,7 +40,37 @@ DashboardDeafult.args = {
39
40
  products_limit: "1000",
40
41
  type: "Enterprise",
41
42
  },
42
- src: "https://content-management-profile-prod.s3.amazonaws.com/id-425/425.png?1666639556174",
43
+ src: "https://content-management-profile-prod.s3.amazonaws.com/id-1236/1236.png?1668676098688",
44
+ },
45
+ company: {
46
+ id_company: 816,
47
+ trade_name: "Prod Test",
48
+ company_name: "Prod Test",
49
+ rfc: "ASER12345",
50
+ adress: "Av. Insurgentes",
51
+ about_company: null,
52
+ telephone: null,
53
+ web_site: null,
54
+ zip_code: null,
55
+ email: null,
56
+ social_link: null,
57
+ is_retailer: 0,
58
+ financedRetailers: [
59
+ {
60
+ id: 58,
61
+ name: "The Home Depot Golden",
62
+ country: "México",
63
+ id_region: 1,
64
+ active: 1,
65
+ },
66
+ {
67
+ id: 59,
68
+ name: "The Home Depot Platinum",
69
+ country: "México",
70
+ id_region: 1,
71
+ active: 1,
72
+ },
73
+ ],
43
74
  },
44
- jwt: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI5YTIxMzEyOC02NDgyLTRjMTYtYTRiNi02ZTY0ZjIyNWIxYmQiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6IjlhMjEzMTI4LTY0ODItNGMxNi1hNGI2LTZlNjRmMjI1YjFiZCIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJkYWVmODU5ZC00ODQyLTRkNDQtYTNiNC02ODZlNmJhNTVkMjgiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY2NzA3MjM5MCwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY2NzA3NTk5MCwiaWF0IjoxNjY3MDcyMzkwLCJlbWFpbCI6ImlzbWFlbDk3bG9wZXpAZ21haWwuY29tIn0.FbGtX1sC3b2c76hGcxkx-GSurEMKZSwNVEnuUOlV9Dhhqrre1VmtfjvodH_3Leipr4g38Sukb6Pr9lVgEy6DJ57MShpS63niXE7Y43FUJ4gVe4F6k8sYbXUaZYS2vw2_PibnycNsFrpD76fZ_ulTqlSuHNrnzf2mjcDFJ5Qlj8hcLlRnpu_DFVpIiXVyK9kvLE5jImHvo4oQZUSrnuIs-oUE7j8mX8-GH2e95Up2wnBMak6S6meMibKoUEFo2qdtDSFbS1JCMBq4vWw2DxToX-7AGXGp_CLxf-sjJ_UpLmFa0KyyxjhAE2cR9BGo8DM8LEUIqMvcz2KH-7e9QTgisA",
75
+ jwt: "eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkNjYwY2NjYS1mOTA2LTQ5NzAtODkyYy02ZDE1MmU4MzJlNWQiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfbFN6UVo0WjdSIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6ImQ2NjBjY2NhLWY5MDYtNDk3MC04OTJjLTZkMTUyZTgzMmU1ZCIsImF1ZCI6IjUyZDlza2tkY2c4cWpwODhvb2sxdXNlNm1rIiwiZXZlbnRfaWQiOiI2NzYzN2VlZi1iMjE3LTRiYWEtODM4MC05NDMzODZjYTU5OTIiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY2ODY3NjA5OCwibmFtZSI6IlRIRCBQcm92ZWVkb3IiLCJwaG9uZV9udW1iZXIiOiIrNTIzMTExMTExMTExIiwiZXhwIjoxNjY4Njc5Njk3LCJpYXQiOjE2Njg2NzYwOTgsImVtYWlsIjoidGhkQGFsbGZyZWVtYWlsLm5ldCJ9.ghtkS2S6ipJgGDEkGVoEd2iaxD5iKkGL_HBQ6ay-Kp-nh0VWjYW9cUBQhv83Je6gBsYdywkRfAmW9bEeqW7IuOAV9-CcQtcg7NtARtPjm3XLwt-vZePHefNASS1GdkFjjb3wioSdHoxa5UR6Di-mCTvQPad7tUdDy5XZf--8HyuB2Ir-yGnBqQ5mcyUloIwKWA0U0kboKUb97j8wCxGGP4oArrNH9yuwlwCC5dW2eyF1MKBDb4zPAnKmKM3IR-iFuyl9kAuo88YAas8o8pJ3_oc49NJ6ti2yY2hUyDFiMYlhjo-nDGMK1hQqFqjTPvrCV71H7P2vVuFHkkln9G-MbQ",
45
76
  };
@@ -59,7 +59,7 @@ export const Dashboard = ({ jwt, user, company }) => {
59
59
  };
60
60
 
61
61
  const getRetailers = async () => {
62
- const isTHDUser = [657, 818, 819].includes(user.id_company);
62
+ const isTHDUser = user.is_retailer && company.retailers;
63
63
  const retailersResponse = await axios.get(
64
64
  `${process.env.REACT_APP_RETAILER_ENDPOINT}`,
65
65
  {
@@ -78,13 +78,21 @@ export const Dashboard = ({ jwt, user, company }) => {
78
78
  };
79
79
 
80
80
  const loadProductsByStatus = async (orderByStatus, filter) => {
81
+ const isTHDUser = user.is_retailer && company.retailers;
82
+ const isProvider = !user.is_retailer && user.id_role === 0;
83
+ const isCollaborator = user.id_role > 0;
81
84
  const { ordersBydate, ordersByStatus } =
82
85
  (await loadProductVersions(orderByStatus)) || {};
83
86
 
84
- const { total = 0, R = 0, PA = 0, Ex = 0 } = ordersByStatus;
87
+ const { total = 0, R = 0, PA = 0, Ex = 0, ACA = 0 } = ordersByStatus;
88
+ let productsFinished = 0;
89
+ if (isTHDUser) productsFinished = Ex;
90
+ if (isProvider) productsFinished = ACA;
91
+ if (isCollaborator) productsFinished = Ex + ACA;
92
+
85
93
  const inProcess = Object.keys(ordersByStatus).reduce(
86
94
  (prev, curr) =>
87
- !["total", "PA", "R", "Ex"].includes(curr)
95
+ !["total", "PA", "R", "Ex", "ACA"].includes(curr)
88
96
  ? prev + ordersByStatus[curr]
89
97
  : prev,
90
98
  0
@@ -94,11 +102,12 @@ export const Dashboard = ({ jwt, user, company }) => {
94
102
  ? metricsData[0]
95
103
  : { label: "Productos totales", value: total },
96
104
  ];
105
+
97
106
  metricsArray.push(
98
107
  { label: "Productos filtrados", value: total },
99
108
  { label: "Productos sin asignar", value: PA + R },
100
109
  { label: "Productos en proceso", value: inProcess },
101
- { label: "Productos terminados", value: Ex }
110
+ { label: "Productos terminados", value: productsFinished }
102
111
  );
103
112
  setMetricsData(metricsArray);
104
113
  setTotalCount(total);
@@ -45,7 +45,7 @@ import { useCloseModal } from "../../../global-files/customHooks";
45
45
  import { CreateVersion } from "../../organisms/CreateVersion";
46
46
 
47
47
  const reducerImages = (state, action) => {
48
- let { values = [], attrForImgs, inputsByRetailer } = state;
48
+ let { values, attrForImgs, inputsByRetailer } = state;
49
49
  switch (action.action) {
50
50
  case "init":
51
51
  const newInputsByRetailer = {};
@@ -100,7 +100,7 @@ const reducerImages = (state, action) => {
100
100
  imageIdArray.includes(input.id)
101
101
  );
102
102
 
103
- if (orderedImages.length > 0) values = orderedImages;
103
+ values = orderedImages.length > 0 ? orderedImages : [];
104
104
  } catch (error) {
105
105
  console.log(error);
106
106
  }
@@ -877,10 +877,11 @@ export const ProviderProductEdition = ({
877
877
  const newProductEdit = productEdit;
878
878
  newProductEdit.product[sectionStatusKey] = serviceStatus;
879
879
  setProductEdit(newProductEdit);
880
- const showSurveyByProvider = !user.is_retailer && orderStatus[orderId] === "AP";
881
- const showSurveyByRetailer = user.is_retailer && orderStatus[orderId] === "ACA";
882
- showSurvey &&
883
- showSurvey(showSurveyByProvider || showSurveyByRetailer);
880
+ const showSurveyByProvider =
881
+ !user.is_retailer && orderStatus[orderId] === "AP";
882
+ const showSurveyByRetailer =
883
+ user.is_retailer && orderStatus[orderId] === "ACA";
884
+ showSurvey && showSurvey(showSurveyByProvider || showSurveyByRetailer);
884
885
  } else {
885
886
  res = await axios.put(`${process.env.REACT_APP_SEND_EVAL}`, data, {
886
887
  headers: {
@@ -35,7 +35,7 @@ import { useCloseModal } from "../../../global-files/customHooks";
35
35
  import { CreateVersion } from "../../organisms/CreateVersion";
36
36
 
37
37
  const reducerImages = (state, action) => {
38
- let { values = [], attrForImgs, inputsByRetailer } = state;
38
+ let { values, attrForImgs, inputsByRetailer } = state;
39
39
  switch (action.action) {
40
40
  case "init":
41
41
  const newInputsByRetailer = {};
@@ -80,8 +80,9 @@ const reducerImages = (state, action) => {
80
80
  try {
81
81
  const orderedImages = [];
82
82
  const imageIdArray = [];
83
- if (action?.retailerId && !inputsByRetailer[action.retailerId])
83
+ if (action?.retailerId && !inputsByRetailer[action.retailerId]) {
84
84
  inputsByRetailer[action.retailerId] = [];
85
+ }
85
86
  action.retailerId &&
86
87
  inputsByRetailer[action.retailerId]?.filter((input) => {
87
88
  imageIdArray.push(input.id_image);
@@ -89,12 +90,10 @@ const reducerImages = (state, action) => {
89
90
  if (value.image_id === input.id_image) orderedImages.push(value);
90
91
  });
91
92
  });
92
-
93
93
  inputs = inputsInitial?.filter((input) =>
94
94
  imageIdArray.includes(input.id)
95
95
  );
96
-
97
- if (orderedImages.length > 0) values = orderedImages;
96
+ values = orderedImages.length > 0 ? orderedImages : [];
98
97
  } catch (error) {
99
98
  console.log(error);
100
99
  }
@@ -43,21 +43,3 @@
43
43
  src: url("../assets/fonts/raleway/Raleway-Black.ttf");
44
44
  font-weight: 900;
45
45
  }
46
-
47
- @font-face {
48
- font-family: "RobotoMedium";
49
- src: url("../assets/fonts/Roboto/Roboto-Medium.ttf");
50
- font-weight: 500;
51
- }
52
-
53
- @font-face {
54
- font-family: "RobotoRegular";
55
- src: url("../assets/fonts/Roboto/Roboto-Regular.ttf");
56
- font-weight: 400;
57
- }
58
-
59
- .prueba {
60
- color: #9e3e26;
61
- color: #b42983;
62
- color: #e7e7e7;
63
- }
@@ -26,8 +26,6 @@ export const FontFamily = {
26
26
  Raleway_700: "Raleway-700",
27
27
  Raleway_800: "Raleway-800",
28
28
  Raleway_900: "Raleway-900",
29
- RobotoMedium: "RobotoMedium",
30
- RobotoRegular: "RobotoRegular",
31
29
  };
32
30
 
33
31
  export const GlobalStatus = [
package/src/index.js CHANGED
@@ -23,16 +23,6 @@ export * from "./components/atoms/Status/index";
23
23
  export * from "./components/atoms/TabSection/index";
24
24
  export * from "./components/atoms/ValidationPanel/index";
25
25
  export * from "./components/atoms/VerticalSideMenuMainPage/index";
26
- export * from "./components/atoms/ButtonFileChooser/index";
27
- export * from "./components/atoms/ButtonV2/index";
28
- export * from "./components/atoms/CustomIcon/index";
29
- export * from "./components/atoms/IconFile/index";
30
- export * from "./components/atoms/Image/index";
31
- export * from "./components/atoms/ImageLink/index";
32
- export * from "./components/atoms/ImagePreview/index";
33
- export * from "./components/atoms/InputText/index";
34
- export * from "./components/atoms/NotFound/index";
35
- export * from "./components/atoms/Tooltip/index";
36
26
 
37
27
  //molecules
38
28
  export * from "./components/molecules/AvatarAndValidation/index";
@@ -59,8 +49,6 @@ export * from "./components/molecules/TagAndInput/index";
59
49
  export * from "./components/molecules/VerificationCodeResetPasswordLogin/index";
60
50
  export * from "./components/molecules/RetailerSelector/index";
61
51
  export * from "./components/molecules/CustomSelect/index";
62
- export * from "./components/molecules/ButtonDownloadFile/index";
63
- export * from "./components/molecules/ImageTooltip/index";
64
52
 
65
53
  //organisms
66
54
  export * from "./components/organisms/ChangePassword/index";
@@ -72,8 +60,6 @@ export * from "./components/organisms/ImagePreviewer/index";
72
60
  export * from "./components/organisms/ImagesGroup/index";
73
61
  export * from "./components/organisms/InputGroup/index";
74
62
  export * from "./components/organisms/ProductImageModal/index";
75
- export * from "./components/organisms/Chat/index";
76
- export * from "./components/organisms/Modal/index";
77
63
 
78
64
  //pages
79
65
  export * from "./components/pages/ChangePasswordLogin";