contentoh-components-library 21.2.61 → 21.2.63

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 (37) hide show
  1. package/.env.development +1 -4
  2. package/.env.production +1 -1
  3. package/dist/components/molecules/CustomSelect/CustomSelect.stories.js +22 -21
  4. package/dist/components/molecules/CustomSelect/SelectItem.js +1 -10
  5. package/dist/components/molecules/HeaderTop/index.js +5 -10
  6. package/dist/components/molecules/HeaderTop/styles.js +1 -1
  7. package/dist/components/organisms/DashboardMetric/index.js +4 -4
  8. package/dist/components/pages/Dashboard/index.js +12 -12
  9. package/package.json +1 -6
  10. package/src/components/molecules/CustomSelect/CustomSelect.stories.js +11 -19
  11. package/src/components/molecules/CustomSelect/SelectItem.js +0 -7
  12. package/src/components/molecules/HeaderTop/index.js +6 -10
  13. package/src/components/molecules/HeaderTop/styles.js +0 -4
  14. package/src/components/organisms/DashboardMetric/index.js +4 -2
  15. package/src/components/pages/Dashboard/index.js +18 -18
  16. package/src/assets/images/chatPopup/Spinner.gif +0 -0
  17. package/src/assets/images/chatPopup/close.svg +0 -3
  18. package/src/assets/images/chatPopup/defaultImage.png +0 -0
  19. package/src/assets/images/chatPopup/defaultProfile.png +0 -0
  20. package/src/assets/images/chatPopup/doc.svg +0 -1
  21. package/src/assets/images/chatPopup/document.svg +0 -1
  22. package/src/assets/images/chatPopup/iconChat.svg +0 -19
  23. package/src/assets/images/chatPopup/iconPlus.svg +0 -3
  24. package/src/assets/images/chatPopup/pdf.svg +0 -75
  25. package/src/assets/images/chatPopup/remove.svg +0 -4
  26. package/src/assets/images/chatPopup/send.svg +0 -3
  27. package/src/assets/images/chatPopup/svgIcon.svg +0 -109
  28. package/src/assets/images/chatPopup/upload_file.svg +0 -3
  29. package/src/assets/images/chatPopup/xls.svg +0 -53
  30. package/src/assets/images/customSelect/starIcon.svg +0 -14
  31. package/src/components/atoms/ChatPopUp/ChatPopUp.stories.js +0 -11
  32. package/src/components/atoms/ChatPopUp/index.js +0 -541
  33. package/src/components/atoms/ChatPopUp/styles.js +0 -278
  34. package/src/components/atoms/ChatPopUp/utils/handlersChat.js +0 -104
  35. package/src/components/atoms/Tooltip/Tooltip.stories.js +0 -15
  36. package/src/components/atoms/Tooltip/index.js +0 -35
  37. package/src/components/atoms/Tooltip/styles.js +0 -5
package/.env.development CHANGED
@@ -21,11 +21,8 @@ REACT_APP_READ_REQUIRED_ORDERS=https://fc069ovhuk.execute-api.us-east-1.amazonaw
21
21
  REACT_APP_CATEGORY_ENDPOINT=https://fc069ovhuk.execute-api.us-east-1.amazonaws.com/dev/categories
22
22
  REACT_APP_READ_PROVIDERS=https://fc069ovhuk.execute-api.us-east-1.amazonaws.com/dev/providers
23
23
  REACT_APP_PENDING_INVITATIONS=https://fc069ovhuk.execute-api.us-east-1.amazonaws.com/dev/pending-invitations
24
- REACT_APP_POST_MESSAGE=https://fc069ovhuk.execute-api.us-east-1.amazonaws.com/dev/products-chat
25
- REACT_APP_KEY_UPLOAD_TO_S3=AKIA5CPHLQTT46EQ5TIK
26
- REACT_APP_ACCESS_KEY_UPLOAD_TO_S3=tZDdrmvwxM1cScspfxFM3XpU4HSYrCNPazyHd0BL
27
- REACT_APP_IMAGES_BUCKET=content-management-images
28
24
 
25
+ REACT_APP_IMAGES_BUCKET=content-management-images
29
26
  REACT_APP_KEY_UPLOAD_TO_S3=AKIA5CPHLQTT46EQ5TIK
30
27
  REACT_APP_IMAGES_PROFILE_BUCKET=content-management-profile
31
28
  REACT_APP_ACCESS_KEY_UPLOAD_TO_S3=tZDdrmvwxM1cScspfxFM3XpU4HSYrCNPazyHd0BL
package/.env.production CHANGED
@@ -1,4 +1,4 @@
1
- ºREACT_APP_ARTICLE_DATA_ENDPOINT=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/articles-data
1
+ REACT_APP_ARTICLE_DATA_ENDPOINT=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/articles-data
2
2
  REACT_APP_ARTICLE_DATA_DATASHEET_ENDPOINT=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/articles-data/datasheets
3
3
  REACT_APP_ARTICLE_DATA_DESCRIPTION_ENDPOINT=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/articles-data/descriptions
4
4
  REACT_APP_ARTICLE_DATA_IMAGES_ENDPOINT=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/articles-data/images
@@ -11,8 +11,6 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/
11
11
 
12
12
  var _index = require("./index");
13
13
 
14
- var _starIcon = _interopRequireDefault(require("../../../assets/images/customSelect/starIcon.svg"));
15
-
16
14
  var _jsxRuntime = require("react/jsx-runtime");
17
15
 
18
16
  var _default = {
@@ -28,26 +26,29 @@ var Template = function Template(args) {
28
26
  var CustomSelectDefault = Template.bind({});
29
27
  exports.CustomSelectDefault = CustomSelectDefault;
30
28
  CustomSelectDefault.args = {
31
- // selectLabel: "Todos los departamentos",
29
+ selectLabel: "Todos los departamentos",
32
30
  defaultOption: "Todos los departamentos",
33
31
  options: [{
34
- id: 47,
35
- name: "Enero 2023",
36
- isSelected: true
32
+ id: 1,
33
+ value: "Decoración",
34
+ subOptions: [{
35
+ id: 1,
36
+ value: "Espejos"
37
+ }, {
38
+ id: 2,
39
+ value: "Persianas"
40
+ }]
41
+ }, {
42
+ id: 2,
43
+ value: "Eléctrico"
44
+ }, {
45
+ id: 3,
46
+ value: "Ferretería"
47
+ }, {
48
+ id: 4,
49
+ value: "Herramientas"
37
50
  }, {
38
- id: 49,
39
- name: "Mis Favoritos"
40
- }],
41
- onClickItem: function onClickItem(v, id) {
42
- if (v) {
43
- console.log("Agregar a la lista", id);
44
- } else {
45
- console.log("Eliminar a la lista", id);
46
- }
47
- },
48
- icon: _starIcon.default,
49
- showSearchBar: true,
50
- customOptions: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
51
- children: "Esto es un customOptions"
52
- })
51
+ id: 5,
52
+ value: "Iluminación"
53
+ }]
53
54
  };
@@ -26,8 +26,7 @@ var SelecItem = function SelecItem(_ref) {
26
26
  customSelectId = _ref.customSelectId,
27
27
  setParameterArray = _ref.setParameterArray,
28
28
  activeFilters = _ref.activeFilters,
29
- setActiveFilters = _ref.setActiveFilters,
30
- onClickItem = _ref.onClickItem;
29
+ setActiveFilters = _ref.setActiveFilters;
31
30
 
32
31
  var _useState = (0, _react.useState)(false),
33
32
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
@@ -47,10 +46,6 @@ var SelecItem = function SelecItem(_ref) {
47
46
  id: "main-item-" + option.id,
48
47
  label: option.name,
49
48
  onChange: function onChange(e) {
50
- if (onClickItem) {
51
- onClickItem(e.target.checked, option.id);
52
- }
53
-
54
49
  var subOptions = option.subOptions;
55
50
  var filtersCopy = (0, _objectSpread2.default)({}, activeFilters);
56
51
 
@@ -113,10 +108,6 @@ var SelecItem = function SelecItem(_ref) {
113
108
  label: sub.name,
114
109
  defaultChecked: activeFilters[option.name] && activeFilters[option.name][sub.name],
115
110
  onChange: function onChange(e) {
116
- if (onClickItem) {
117
- onClickItem(e.target.checked, sub.id);
118
- }
119
-
120
111
  if (e.target.checked) {
121
112
  setParameterArray(function (current) {
122
113
  return [].concat((0, _toConsumableArray2.default)(current), [sub.id]).sort(function (a, b) {
@@ -13,8 +13,6 @@ var _index2 = require("../../atoms/GeneralButton/index");
13
13
 
14
14
  var _react = require("react");
15
15
 
16
- var _index3 = require("../../atoms/ChatPopUp/index");
17
-
18
16
  var _jsxRuntime = require("react/jsx-runtime");
19
17
 
20
18
  var HeaderTop = function HeaderTop(_ref) {
@@ -27,14 +25,11 @@ var HeaderTop = function HeaderTop(_ref) {
27
25
  ref: headerTop,
28
26
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScreenHeader, {
29
27
  text: "Edici\xF3n de producto"
30
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
31
- className: "buttons-top",
32
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Button, {
33
- buttonType: "close-button",
34
- onClick: function onClick() {
35
- window.location.href = "/products";
36
- }
37
- })
28
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Button, {
29
+ buttonType: "close-button",
30
+ onClick: function onClick() {
31
+ window.location.href = "/products";
32
+ }
38
33
  })]
39
34
  });
40
35
  };
@@ -13,6 +13,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
13
13
 
14
14
  var _templateObject;
15
15
 
16
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n .buttons-top {\n display: flex;\n align-items: center;\n }\n"])));
16
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n"])));
17
17
 
18
18
  exports.Container = Container;
@@ -18,12 +18,12 @@ var _dashboardMetricUtils = require("./dashboardMetricUtils");
18
18
  var _jsxRuntime = require("react/jsx-runtime");
19
19
 
20
20
  var DashboardMetric = function DashboardMetric(_ref) {
21
+ var _Object$values;
22
+
21
23
  var label = _ref.label,
22
24
  description = _ref.description,
23
25
  _ref$dataObject = _ref.dataObject,
24
- dataObject = _ref$dataObject === void 0 ? {
25
- AA: 89
26
- } : _ref$dataObject,
26
+ dataObject = _ref$dataObject === void 0 ? {} : _ref$dataObject,
27
27
  _ref$indexAxis = _ref.indexAxis,
28
28
  indexAxis = _ref$indexAxis === void 0 ? "y" : _ref$indexAxis,
29
29
  _ref$type = _ref.type,
@@ -43,7 +43,7 @@ var DashboardMetric = function DashboardMetric(_ref) {
43
43
  return (0, _dashboardMetricUtils.getFullStatus)(key);
44
44
  }) : Object.keys(dataObject);
45
45
  var newObject = type === "doughnut" ? (0, _dashboardMetricUtils.removeOldStatus)(dataObject) : dataObject;
46
- var values = Object.values(newObject) || [0];
46
+ var values = (_Object$values = Object.values(newObject)) !== null && _Object$values !== void 0 && _Object$values.length ? Object.values(newObject) : [0];
47
47
  var colorsArray = Object.keys(newObject).map(function (key) {
48
48
  return (0, _dashboardMetricUtils.getStatusColor)(key);
49
49
  });
@@ -301,8 +301,8 @@ var Dashboard = function Dashboard(_ref) {
301
301
  name: "Hoy",
302
302
  function: function _function() {
303
303
  return setDatesRange({
304
- startDate: new Date(),
305
- endDate: new Date()
304
+ startDate: (0, _dashboardUtils.formatDate)(new Date()),
305
+ endDate: (0, _dashboardUtils.formatDate)(new Date())
306
306
  });
307
307
  }
308
308
  }, {
@@ -310,8 +310,8 @@ var Dashboard = function Dashboard(_ref) {
310
310
  name: "Ayer",
311
311
  function: function _function() {
312
312
  return setDatesRange({
313
- startDate: new Date(today.setDate(today.getDate() - 1)),
314
- endDate: new Date()
313
+ startDate: (0, _dashboardUtils.formatDate)(new Date(today.setDate(today.getDate() - 1))),
314
+ endDate: (0, _dashboardUtils.formatDate)(new Date())
315
315
  });
316
316
  }
317
317
  }, {
@@ -319,8 +319,8 @@ var Dashboard = function Dashboard(_ref) {
319
319
  name: "Esta semana",
320
320
  function: function _function() {
321
321
  return setDatesRange({
322
- startDate: new Date(today.setDate(today.getDate() - today.getDay())),
323
- endDate: new Date()
322
+ startDate: (0, _dashboardUtils.formatDate)(new Date(today.setDate(today.getDate() - today.getDay()))),
323
+ endDate: (0, _dashboardUtils.formatDate)(new Date())
324
324
  });
325
325
  }
326
326
  }, {
@@ -328,8 +328,8 @@ var Dashboard = function Dashboard(_ref) {
328
328
  name: "La semana pasada",
329
329
  function: function _function() {
330
330
  return setDatesRange({
331
- startDate: new Date(today.setDate(today.getDate() - today.getDay() - 7)),
332
- endDate: new Date(today.setDate(today.getDate() - today.getDay() + 7))
331
+ startDate: (0, _dashboardUtils.formatDate)(new Date(today.setDate(today.getDate() - today.getDay() - 7))),
332
+ endDate: (0, _dashboardUtils.formatDate)(new Date(today.setDate(today.getDate() - today.getDay() + 7)))
333
333
  });
334
334
  }
335
335
  }, {
@@ -337,8 +337,8 @@ var Dashboard = function Dashboard(_ref) {
337
337
  name: "Este mes",
338
338
  function: function _function() {
339
339
  return setDatesRange({
340
- startDate: new Date("".concat(today.getFullYear(), "-").concat(today.getMonth() + 1, "-01")),
341
- endDate: today
340
+ startDate: (0, _dashboardUtils.formatDate)(new Date("".concat(today.getFullYear(), "-").concat(today.getMonth() + 1, "-01"))),
341
+ endDate: (0, _dashboardUtils.formatDate)(today)
342
342
  });
343
343
  }
344
344
  }, {
@@ -346,8 +346,8 @@ var Dashboard = function Dashboard(_ref) {
346
346
  name: "El mes pasado",
347
347
  function: function _function() {
348
348
  return setDatesRange({
349
- startDate: new Date("".concat(today.getFullYear(), "-").concat(today.getMonth(), "-01")),
350
- endDate: new Date("".concat(today.getFullYear(), "-").concat(today.getMonth() + 1, "-01"))
349
+ startDate: (0, _dashboardUtils.formatDate)(new Date("".concat(today.getFullYear(), "-").concat(today.getMonth(), "-01"))),
350
+ endDate: (0, _dashboardUtils.formatDate)(new Date("".concat(today.getFullYear(), "-").concat(today.getMonth() + 1, "-01")))
351
351
  });
352
352
  }
353
353
  }]);
package/package.json CHANGED
@@ -1,15 +1,11 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.2.61",
3
+ "version": "21.2.63",
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
- "@mui/material": "^5.10.8",
12
- "@mui/styled-engine-sc": "^5.10.6",
13
9
  "@storybook/addon-postcss": "^2.0.0",
14
10
  "@testing-library/jest-dom": "^5.11.4",
15
11
  "@testing-library/react": "^11.1.0",
@@ -23,7 +19,6 @@
23
19
  "draft-js": "^0.11.7",
24
20
  "file-saver": "^2.0.5",
25
21
  "js-base64": "^3.7.2",
26
- "moment": "^2.29.4",
27
22
  "prop-types": "^15.7.2",
28
23
  "react": "^17.0.2",
29
24
  "react-chartjs-2": "^4.0.1",
@@ -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
14
  {
16
- id: 47,
17
- name: "Enero 2023",
18
- isSelected: true,
19
- },
20
- {
21
- id: 49,
22
- name: "Mis Favoritos",
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 { ChatPopUp } from "../../atoms/ChatPopUp/index";
6
5
 
7
6
  export const HeaderTop = ({ setHeaderTop }) => {
8
7
  const headerTop = useRef();
@@ -14,15 +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
- {/* <ChatPopUp /> */}
19
- <Button
20
- buttonType="close-button"
21
- onClick={() => {
22
- window.location.href = `/products`;
23
- }}
24
- />
25
- </div>
16
+ <Button
17
+ buttonType="close-button"
18
+ onClick={() => {
19
+ window.location.href = `/products`;
20
+ }}
21
+ />
26
22
  </Container>
27
23
  );
28
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,7 +9,7 @@ import {
9
9
  export const DashboardMetric = ({
10
10
  label,
11
11
  description,
12
- dataObject = { AA: 89 },
12
+ dataObject = {},
13
13
  indexAxis = "y",
14
14
  type = "bar",
15
15
  scale = "x",
@@ -26,7 +26,9 @@ export const DashboardMetric = ({
26
26
  : Object.keys(dataObject);
27
27
  const newObject =
28
28
  type === "doughnut" ? removeOldStatus(dataObject) : dataObject;
29
- const values = Object.values(newObject) || [0];
29
+ const values = Object.values(newObject)?.length
30
+ ? Object.values(newObject)
31
+ : [0];
30
32
  const colorsArray = Object.keys(newObject).map((key) => getStatusColor(key));
31
33
 
32
34
  const data = {
@@ -125,8 +125,8 @@ export const Dashboard = ({ jwt, user, company }) => {
125
125
  name: "Hoy",
126
126
  function: () =>
127
127
  setDatesRange({
128
- startDate: new Date(),
129
- endDate: new Date(),
128
+ startDate: formatDate(new Date()),
129
+ endDate: formatDate(new Date()),
130
130
  }),
131
131
  },
132
132
  {
@@ -134,8 +134,8 @@ export const Dashboard = ({ jwt, user, company }) => {
134
134
  name: "Ayer",
135
135
  function: () =>
136
136
  setDatesRange({
137
- startDate: new Date(today.setDate(today.getDate() - 1)),
138
- endDate: new Date(),
137
+ startDate: formatDate(new Date(today.setDate(today.getDate() - 1))),
138
+ endDate: formatDate(new Date()),
139
139
  }),
140
140
  },
141
141
  {
@@ -143,10 +143,10 @@ export const Dashboard = ({ jwt, user, company }) => {
143
143
  name: "Esta semana",
144
144
  function: () =>
145
145
  setDatesRange({
146
- startDate: new Date(
147
- today.setDate(today.getDate() - today.getDay())
146
+ startDate: formatDate(
147
+ new Date(today.setDate(today.getDate() - today.getDay()))
148
148
  ),
149
- endDate: new Date(),
149
+ endDate: formatDate(new Date()),
150
150
  }),
151
151
  },
152
152
  {
@@ -154,11 +154,11 @@ export const Dashboard = ({ jwt, user, company }) => {
154
154
  name: "La semana pasada",
155
155
  function: () =>
156
156
  setDatesRange({
157
- startDate: new Date(
158
- today.setDate(today.getDate() - today.getDay() - 7)
157
+ startDate: formatDate(
158
+ new Date(today.setDate(today.getDate() - today.getDay() - 7))
159
159
  ),
160
- endDate: new Date(
161
- today.setDate(today.getDate() - today.getDay() + 7)
160
+ endDate: formatDate(
161
+ new Date(today.setDate(today.getDate() - today.getDay() + 7))
162
162
  ),
163
163
  }),
164
164
  },
@@ -167,10 +167,10 @@ export const Dashboard = ({ jwt, user, company }) => {
167
167
  name: "Este mes",
168
168
  function: () =>
169
169
  setDatesRange({
170
- startDate: new Date(
171
- `${today.getFullYear()}-${today.getMonth() + 1}-01`
170
+ startDate: formatDate(
171
+ new Date(`${today.getFullYear()}-${today.getMonth() + 1}-01`)
172
172
  ),
173
- endDate: today,
173
+ endDate: formatDate(today),
174
174
  }),
175
175
  },
176
176
  {
@@ -178,11 +178,11 @@ export const Dashboard = ({ jwt, user, company }) => {
178
178
  name: "El mes pasado",
179
179
  function: () =>
180
180
  setDatesRange({
181
- startDate: new Date(
182
- `${today.getFullYear()}-${today.getMonth()}-01`
181
+ startDate: formatDate(
182
+ new Date(`${today.getFullYear()}-${today.getMonth()}-01`)
183
183
  ),
184
- endDate: new Date(
185
- `${today.getFullYear()}-${today.getMonth() + 1}-01`
184
+ endDate: formatDate(
185
+ new Date(`${today.getFullYear()}-${today.getMonth() + 1}-01`)
186
186
  ),
187
187
  }),
188
188
  },
@@ -1,3 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14">
2
- <path id="close_FILL0_wght400_GRAD0_opsz48" d="M6.385,19.308,5.308,18.231l5.923-5.923L5.308,6.385,6.385,5.308l5.923,5.923,5.923-5.923,1.077,1.077-5.923,5.923,5.923,5.923-1.077,1.077-5.923-5.923Z" transform="translate(-5.308 -5.308)" fill="#fff"/>
3
- </svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 51 65" fill="#fff" fill-rule="evenodd" stroke="#000" stroke-linecap="round" stroke-linejoin="round"><use xlink:href="#C" x=".5" y=".5"/><defs><filter id="A" x="-6%" y="-4.6875%" width="116%" height="112.5%"><feGaussianBlur in="SourceAlpha" stdDeviation="1"/><feOffset dx="2" dy="2" result="B"/><feFlood flood-color="#000" flood-opacity=".2"/><feComposite in2="B" operator="in" result="C"/><feMerge><feMergeNode in="C"/><feMergeNode in="SourceGraphic"/></feMerge></filter><filter id="B" x="-27.5%" y="-32.5%" width="160%" height="160%"><feGaussianBlur in="SourceAlpha" stdDeviation="2"/><feOffset dx="1" dy="-1" result="B"/><feFlood flood-color="#000" flood-opacity=".2"/><feComposite in2="B" operator="in" result="C"/><feMerge><feMergeNode in="C"/><feMergeNode in="SourceGraphic"/></feMerge></filter></defs><symbol id="C" overflow="visible"><path d="M50 20L30 0H5a4.99 4.99 0 0 0-5 5v54a4.99 4.99 0 0 0 5 5h40a4.99 4.99 0 0 0 5-5z" fill="#2196f3" stroke="none" filter="url(#A)"/><defs/><g transform="matrix(-1 0 0 -1 50 20)"><path d="M20 20L0 0h15a4.99 4.99 0 0 1 5 5z" fill="#90caf9" stroke="none" filter="url(#B)"/><defs/></g><path d="M10 17.5h17.5V20H10zm0 10h27.5V30H10zm0 10h27.5V40H10zm0 10h27.5V50H10z" stroke="none"/></symbol></svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 66 81" fill="#fff" fill-rule="evenodd" stroke="#000" stroke-linecap="round" stroke-linejoin="round"><use xlink:href="#A" x=".5" y=".5"/><symbol id="A" overflow="visible"><path d="M44.674 0H0v79.977h65V20.012L44.674 0zM60.93 75.993H4.07V4.007h38.593v18.008h18.291v53.978zm-10.151-40H14.221v-3.984h36.558zm0 9.995H14.221v-3.984h36.558zm0 10.017H14.221v-4.007h36.558zm0 9.994H14.221v-4.007h36.558z" fill="#2a3282" stroke="none"/></symbol></svg>
@@ -1,19 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14" viewBox="0 0 14 14">
2
- <defs>
3
- <style>
4
- .cls-1 {
5
- fill: #707070;
6
- }
7
-
8
- .cls-2 {
9
- clip-path: url(#clip-path);
10
- }
11
- </style>
12
- <clipPath id="clip-path">
13
- <rect id="Rectángulo_368" data-name="Rectángulo 368" class="cls-1" width="14" height="14" transform="translate(1737 869)"/>
14
- </clipPath>
15
- </defs>
16
- <g id="Enmascarar_grupo_83" data-name="Enmascarar grupo 83" class="cls-2" transform="translate(-1737 -869)">
17
- <path id="forum_FILL0_wght400_GRAD0_opsz48" class="cls-1" d="M1.4,11.9V2.135a.728.728,0,0,1,.228-.49A.651.651,0,0,1,2.1,1.4h9.082a.675.675,0,0,1,.49.236.714.714,0,0,1,.227.5v6.23a.728.728,0,0,1-.227.49.666.666,0,0,1-.49.245H4.2Zm3.518.7a.678.678,0,0,1-.481-.245.716.716,0,0,1-.236-.49V10.15h8.75V4.2H14.7a.651.651,0,0,1,.472.245.744.744,0,0,1,.227.508v10.43L12.617,12.6ZM10.85,2.45H2.45V9.363L3.763,8.05H10.85Zm-8.4,0v0Z" transform="translate(1735.6 867.609)"/>
18
- </g>
19
- </svg>
@@ -1,3 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
2
- <path id="Icono_cargar_más" data-name="Icono, cargar más" d="M18,28a9.64,9.64,0,0,1-7.078-2.922A9.64,9.64,0,0,1,8,18a9.64,9.64,0,0,1,2.922-7.078A9.64,9.64,0,0,1,18,8a9.665,9.665,0,0,1,4.656,1.078,11.027,11.027,0,0,1,3.469,2.953V8H28v7.938H20.063V14.063h5.25a9.572,9.572,0,0,0-3.031-3.031A7.888,7.888,0,0,0,18,9.875,8.056,8.056,0,0,0,9.875,18,8.056,8.056,0,0,0,18,26.125a8.2,8.2,0,0,0,4.75-1.484,7.72,7.72,0,0,0,3-3.922h1.937A9.576,9.576,0,0,1,24.094,26,9.947,9.947,0,0,1,18,28Z" transform="translate(-8 -8)" fill="#8a6caa"/>
3
- </svg>
@@ -1,75 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
- viewBox="0 0 303.188 303.188" style="enable-background:new 0 0 303.188 303.188;" xml:space="preserve">
5
- <g>
6
- <polygon style="fill:#E8E8E8;" points="219.821,0 32.842,0 32.842,303.188 270.346,303.188 270.346,50.525 "/>
7
- <path style="fill:#FB3449;" d="M230.013,149.935c-3.643-6.493-16.231-8.533-22.006-9.451c-4.552-0.724-9.199-0.94-13.803-0.936
8
- c-3.615-0.024-7.177,0.154-10.693,0.354c-1.296,0.087-2.579,0.199-3.861,0.31c-1.314-1.36-2.584-2.765-3.813-4.202
9
- c-7.82-9.257-14.134-19.755-19.279-30.664c1.366-5.271,2.459-10.772,3.119-16.485c1.205-10.427,1.619-22.31-2.288-32.251
10
- c-1.349-3.431-4.946-7.608-9.096-5.528c-4.771,2.392-6.113,9.169-6.502,13.973c-0.313,3.883-0.094,7.776,0.558,11.594
11
- c0.664,3.844,1.733,7.494,2.897,11.139c1.086,3.342,2.283,6.658,3.588,9.943c-0.828,2.586-1.707,5.127-2.63,7.603
12
- c-2.152,5.643-4.479,11.004-6.717,16.161c-1.18,2.557-2.335,5.06-3.465,7.507c-3.576,7.855-7.458,15.566-11.815,23.02
13
- c-10.163,3.585-19.283,7.741-26.857,12.625c-4.063,2.625-7.652,5.476-10.641,8.603c-2.822,2.952-5.69,6.783-5.941,11.024
14
- c-0.141,2.394,0.807,4.717,2.768,6.137c2.697,2.015,6.271,1.881,9.4,1.225c10.25-2.15,18.121-10.961,24.824-18.387
15
- c4.617-5.115,9.872-11.61,15.369-19.465c0.012-0.018,0.024-0.036,0.037-0.054c9.428-2.923,19.689-5.391,30.579-7.205
16
- c4.975-0.825,10.082-1.5,15.291-1.974c3.663,3.431,7.621,6.555,11.939,9.164c3.363,2.069,6.94,3.816,10.684,5.119
17
- c3.786,1.237,7.595,2.247,11.528,2.886c1.986,0.284,4.017,0.413,6.092,0.335c4.631-0.175,11.278-1.951,11.714-7.57
18
- C231.127,152.765,230.756,151.257,230.013,149.935z M119.144,160.245c-2.169,3.36-4.261,6.382-6.232,9.041
19
- c-4.827,6.568-10.34,14.369-18.322,17.286c-1.516,0.554-3.512,1.126-5.616,1.002c-1.874-0.11-3.722-0.937-3.637-3.065
20
- c0.042-1.114,0.587-2.535,1.423-3.931c0.915-1.531,2.048-2.935,3.275-4.226c2.629-2.762,5.953-5.439,9.777-7.918
21
- c5.865-3.805,12.867-7.23,20.672-10.286C120.035,158.858,119.587,159.564,119.144,160.245z M146.366,75.985
22
- c-0.602-3.514-0.693-7.077-0.323-10.503c0.184-1.713,0.533-3.385,1.038-4.952c0.428-1.33,1.352-4.576,2.826-4.993
23
- c2.43-0.688,3.177,4.529,3.452,6.005c1.566,8.396,0.186,17.733-1.693,25.969c-0.299,1.31-0.632,2.599-0.973,3.883
24
- c-0.582-1.601-1.137-3.207-1.648-4.821C147.945,83.048,146.939,79.482,146.366,75.985z M163.049,142.265
25
- c-9.13,1.48-17.815,3.419-25.979,5.708c0.983-0.275,5.475-8.788,6.477-10.555c4.721-8.315,8.583-17.042,11.358-26.197
26
- c4.9,9.691,10.847,18.962,18.153,27.214c0.673,0.749,1.357,1.489,2.053,2.22C171.017,141.096,166.988,141.633,163.049,142.265z
27
- M224.793,153.959c-0.334,1.805-4.189,2.837-5.988,3.121c-5.316,0.836-10.94,0.167-16.028-1.542
28
- c-3.491-1.172-6.858-2.768-10.057-4.688c-3.18-1.921-6.155-4.181-8.936-6.673c3.429-0.206,6.9-0.341,10.388-0.275
29
- c3.488,0.035,7.003,0.211,10.475,0.664c6.511,0.726,13.807,2.961,18.932,7.186C224.588,152.585,224.91,153.321,224.793,153.959z"/>
30
- <polygon style="fill:#FB3449;" points="227.64,25.263 32.842,25.263 32.842,0 219.821,0 "/>
31
- <g>
32
- <path style="fill:#A4A9AD;" d="M126.841,241.152c0,5.361-1.58,9.501-4.742,12.421c-3.162,2.921-7.652,4.381-13.472,4.381h-3.643
33
- v15.917H92.022v-47.979h16.606c6.06,0,10.611,1.324,13.652,3.971C125.321,232.51,126.841,236.273,126.841,241.152z
34
- M104.985,247.387h2.363c1.947,0,3.495-0.546,4.644-1.641c1.149-1.094,1.723-2.604,1.723-4.529c0-3.238-1.794-4.857-5.382-4.857
35
- h-3.348C104.985,236.36,104.985,247.387,104.985,247.387z"/>
36
- <path style="fill:#A4A9AD;" d="M175.215,248.864c0,8.007-2.205,14.177-6.613,18.509s-10.606,6.498-18.591,6.498h-15.523v-47.979
37
- h16.606c7.701,0,13.646,1.969,17.836,5.907C173.119,235.737,175.215,241.426,175.215,248.864z M161.76,249.324
38
- c0-4.398-0.87-7.657-2.609-9.78c-1.739-2.122-4.381-3.183-7.926-3.183h-3.773v26.877h2.888c3.939,0,6.826-1.143,8.664-3.43
39
- C160.841,257.523,161.76,254.028,161.76,249.324z"/>
40
- <path style="fill:#A4A9AD;" d="M196.579,273.871h-12.766v-47.979h28.355v10.403h-15.589v9.156h14.374v10.403h-14.374
41
- L196.579,273.871L196.579,273.871z"/>
42
- </g>
43
- <polygon style="fill:#D1D3D3;" points="219.821,50.525 270.346,50.525 219.821,0 "/>
44
- </g>
45
- <g>
46
- </g>
47
- <g>
48
- </g>
49
- <g>
50
- </g>
51
- <g>
52
- </g>
53
- <g>
54
- </g>
55
- <g>
56
- </g>
57
- <g>
58
- </g>
59
- <g>
60
- </g>
61
- <g>
62
- </g>
63
- <g>
64
- </g>
65
- <g>
66
- </g>
67
- <g>
68
- </g>
69
- <g>
70
- </g>
71
- <g>
72
- </g>
73
- <g>
74
- </g>
75
- </svg>
@@ -1,4 +0,0 @@
1
- <svg width="15" height="15" viewBox="0 0 30 31" fill="#FFFFFF" xmlns="http://www.w3.org/2000/svg">
2
- <line x1="7.70711" y1="7.5" x2="23" y2="22.7929" stroke="#FFFFFF" stroke-linecap="round" stroke-linejoin="round"/>
3
- <path d="M23 7.5L8 22.5" stroke="#FFFFFF" stroke-linecap="round" stroke-linejoin="round"/>
4
- </svg>
@@ -1,3 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="11.124" height="11.008" viewBox="0 0 11.124 11.008">
2
- <path id="arrow_upward_FILL1_wght400_GRAD0_opsz48" d="M9.18,14.829V6.34l-4,4L4.5,9.664,9.664,4.5l5.164,5.164-.678.678-4-4v8.489Z" transform="translate(-4.102 -4.102)" fill="#fff" stroke="#fff" stroke-width="0.563"/>
3
- </svg>