contentoh-components-library 21.3.4 → 21.3.6

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 (66) hide show
  1. package/.env.development +2 -2
  2. package/.env.production +25 -25
  3. package/dist/assets/fonts/{roboto → Roboto}/LICENSE.txt +0 -0
  4. package/dist/assets/fonts/{roboto → Roboto}/Roboto-Black.ttf +0 -0
  5. package/dist/assets/fonts/{roboto → Roboto}/Roboto-BlackItalic.ttf +0 -0
  6. package/dist/assets/fonts/{roboto → Roboto}/Roboto-Bold.ttf +0 -0
  7. package/dist/assets/fonts/{roboto → Roboto}/Roboto-BoldItalic.ttf +0 -0
  8. package/dist/assets/fonts/{roboto → Roboto}/Roboto-Italic.ttf +0 -0
  9. package/dist/assets/fonts/{roboto → Roboto}/Roboto-Light.ttf +0 -0
  10. package/dist/assets/fonts/{roboto → Roboto}/Roboto-LightItalic.ttf +0 -0
  11. package/dist/assets/fonts/{roboto → Roboto}/Roboto-Medium.ttf +0 -0
  12. package/dist/assets/fonts/{roboto → Roboto}/Roboto-MediumItalic.ttf +0 -0
  13. package/dist/assets/fonts/{roboto → Roboto}/Roboto-Regular.ttf +0 -0
  14. package/dist/assets/fonts/{roboto → Roboto}/Roboto-Thin.ttf +0 -0
  15. package/dist/assets/fonts/{roboto → Roboto}/Roboto-ThinItalic.ttf +0 -0
  16. package/dist/components/atoms/GeneralButton/index.js +6 -2
  17. package/dist/components/atoms/ProgressBar/index.js +36 -6
  18. package/dist/components/atoms/ProgressBar/styles.js +11 -3
  19. package/dist/components/atoms/Select/VersionSelect.js +2 -1
  20. package/dist/components/molecules/ProductNameHeader/index.js +5 -3
  21. package/dist/components/organisms/CreateVersion/RenderChilds.js +11 -11
  22. package/dist/components/organisms/CreateVersion/index.js +30 -89
  23. package/dist/components/organisms/FullProductNameHeader/index.js +1 -0
  24. package/dist/components/organisms/OrderDetail/OrderDetail.stories.js +1 -1
  25. package/dist/components/organisms/OrderDetail/index.js +20 -11
  26. package/dist/components/organisms/OrderDetail/styles.js +1 -1
  27. package/dist/components/organisms/OrderDetail/utils/Table/styles.js +1 -1
  28. package/dist/components/organisms/OrderDetail/utils/Table/utils.js +45 -15
  29. package/dist/components/organisms/VersionSelector/index.js +28 -2
  30. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +69 -147
  31. package/dist/components/pages/ProviderProductEdition/index.js +27 -47
  32. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +66 -82
  33. package/dist/components/pages/RetailerProductEdition/index.js +18 -36
  34. package/package.json +4 -4
  35. package/src/assets/fonts/{roboto → Roboto}/LICENSE.txt +0 -0
  36. package/src/assets/fonts/{roboto → Roboto}/Roboto-Black.ttf +0 -0
  37. package/src/assets/fonts/{roboto → Roboto}/Roboto-BlackItalic.ttf +0 -0
  38. package/src/assets/fonts/{roboto → Roboto}/Roboto-Bold.ttf +0 -0
  39. package/src/assets/fonts/{roboto → Roboto}/Roboto-BoldItalic.ttf +0 -0
  40. package/src/assets/fonts/{roboto → Roboto}/Roboto-Italic.ttf +0 -0
  41. package/src/assets/fonts/{roboto → Roboto}/Roboto-Light.ttf +0 -0
  42. package/src/assets/fonts/{roboto → Roboto}/Roboto-LightItalic.ttf +0 -0
  43. package/src/assets/fonts/{roboto → Roboto}/Roboto-Medium.ttf +0 -0
  44. package/src/assets/fonts/{roboto → Roboto}/Roboto-MediumItalic.ttf +0 -0
  45. package/src/assets/fonts/{roboto → Roboto}/Roboto-Regular.ttf +0 -0
  46. package/src/assets/fonts/{roboto → Roboto}/Roboto-Thin.ttf +0 -0
  47. package/src/assets/fonts/{roboto → Roboto}/Roboto-ThinItalic.ttf +0 -0
  48. package/src/components/atoms/GeneralButton/index.js +4 -1
  49. package/src/components/atoms/ProgressBar/index.js +38 -5
  50. package/src/components/atoms/ProgressBar/styles.js +23 -0
  51. package/src/components/atoms/Select/VersionSelect.js +4 -2
  52. package/src/components/molecules/ProductNameHeader/index.js +6 -1
  53. package/src/components/organisms/CreateVersion/RenderChilds.js +28 -34
  54. package/src/components/organisms/CreateVersion/index.js +16 -36
  55. package/src/components/organisms/FullProductNameHeader/index.js +1 -0
  56. package/src/components/organisms/OrderDetail/OrderDetail.stories.js +1 -1
  57. package/src/components/organisms/OrderDetail/index.js +19 -12
  58. package/src/components/organisms/OrderDetail/styles.js +1 -0
  59. package/src/components/organisms/OrderDetail/utils/Table/styles.js +26 -0
  60. package/src/components/organisms/OrderDetail/utils/Table/utils.js +30 -15
  61. package/src/components/organisms/VersionSelector/index.js +18 -3
  62. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +75 -166
  63. package/src/components/pages/ProviderProductEdition/index.js +12 -28
  64. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +71 -82
  65. package/src/components/pages/RetailerProductEdition/index.js +14 -24
  66. package/src/global-files/customHooks.js +2 -2
@@ -5,48 +5,32 @@ import { useEffect, useState } from "react";
5
5
  import { Children } from "./RenderChilds";
6
6
  import axios from "axios";
7
7
 
8
- export const CreateVersion = ({ idArticle, version, setShowCreateVersion }) => {
8
+ export const CreateVersion = ({
9
+ articleId,
10
+ version,
11
+ setShowCreateVersion,
12
+ versionsList,
13
+ realoadVersion,
14
+ jwt,
15
+ }) => {
9
16
  const [step, setStep] = useState("version-options");
10
- const [versions, setVersions] = useState([]);
11
17
  const [selectedVersions, setSelectedVersions] = useState({
12
18
  datasheet: version,
13
19
  description: version,
14
20
  image: version,
15
21
  });
16
22
 
17
- const getVersions = async () => {
18
- try {
19
- const response = await axios({
20
- method: "get",
21
- url: `${process.env.REACT_APP_VERSIONS_ENDPOINT}?articleId=${idArticle}&provider=true`,
22
- headers: {
23
- Authorization: sessionStorage.getItem("jwt"),
24
- },
25
- });
26
- setVersions(JSON.parse(response.data.body).data);
27
- } catch (error) {
28
- console.log(error);
29
- }
30
- };
31
-
32
23
  const createVersion = async (isEmpty) => {
33
24
  try {
34
- let data = {
35
- articleId: idArticle,
36
- isEmpty,
37
- };
25
+ let data = { articleId, isEmpty };
38
26
 
39
- isEmpty && (data["version"] = selectedVersions);
27
+ if (!isEmpty) data["version"] = selectedVersions;
40
28
 
41
- await axios({
42
- method: "post",
43
- url: process.env.REACT_APP_VERSIONS_ENDPOINT,
44
- data: data,
45
- headers: {
46
- Authorization: sessionStorage.getItem("jwt"),
47
- },
29
+ await axios.post(process.env.REACT_APP_VERSIONS_ENDPOINT, data, {
30
+ headers: { Authorization: jwt },
48
31
  });
49
32
  setShowCreateVersion(false);
33
+ realoadVersion && realoadVersion();
50
34
  } catch (error) {
51
35
  console.log(error);
52
36
  }
@@ -55,17 +39,13 @@ export const CreateVersion = ({ idArticle, version, setShowCreateVersion }) => {
55
39
  const onChange = (e) => {
56
40
  setSelectedVersions({
57
41
  ...selectedVersions,
58
- [e.target.name]: parseInt(e.target.value.slice(-1)),
42
+ [e.target.name]: parseInt(e.target.value),
59
43
  });
60
44
  };
61
45
 
62
- useEffect(async () => {
63
- await getVersions();
64
- }, []);
65
-
66
46
  return (
67
47
  <Container>
68
- <div className="modal-container">
48
+ <div id="create-version" className="modal-container">
69
49
  <div className="button-container">
70
50
  <Button
71
51
  image={closeIcon}
@@ -77,7 +57,7 @@ export const CreateVersion = ({ idArticle, version, setShowCreateVersion }) => {
77
57
  {Children(
78
58
  step,
79
59
  setStep,
80
- versions,
60
+ versionsList,
81
61
  selectedVersions,
82
62
  onChange,
83
63
  createVersion
@@ -42,6 +42,7 @@ export const FullProductNameHeader = ({
42
42
  headerData?.status ||
43
43
  headerData?.article_status
44
44
  }
45
+ percentRequired={percent}
45
46
  percent={percent?.toFixed(0)}
46
47
  priority={headerData?.prio}
47
48
  date={new Date(
@@ -58,7 +58,7 @@ OrderDetailDefault.args = {
58
58
  company_name: "GRUPO BRAHMA",
59
59
  date: "2022-11-12T00:00:00.000Z",
60
60
  type: "En oficina",
61
- id_order: 1,
61
+ id_order: 5,
62
62
  status: "PA",
63
63
  total: 731.2639770507812,
64
64
  timestamp: "2022-11-12T22:48:23.000Z",
@@ -1,6 +1,7 @@
1
1
  import React, { useState, useEffect } from "react";
2
2
  import { Status } from "../../atoms/Status/index";
3
3
  import { ProgressBar } from "../../atoms/ProgressBar/index";
4
+ import { Loading } from "../../atoms/Loading/index";
4
5
  import moment from "moment";
5
6
  import "moment/locale/es";
6
7
  import {
@@ -18,6 +19,7 @@ moment.locale("es");
18
19
 
19
20
  export const OrderDetail = (props) => {
20
21
  const { order } = props;
22
+ const [isLoading, setIsLoading] = useState(true);
21
23
  const [showPaymentButton, setShowPaymentButton] = useState(
22
24
  order.payment !== "pagado"
23
25
  );
@@ -51,6 +53,7 @@ export const OrderDetail = (props) => {
51
53
 
52
54
  useEffect(() => {
53
55
  const ac = new AbortController();
56
+ setIsLoading(true);
54
57
  props.getOrderDetail &&
55
58
  props
56
59
  .getOrderDetail({ query: { orderId: order.id_order } })
@@ -75,6 +78,7 @@ export const OrderDetail = (props) => {
75
78
  });
76
79
  setOrderData(obj);
77
80
  setDataGeneral({ ...countArticles, totalArticles });
81
+ setIsLoading(false);
78
82
  });
79
83
  return () => ac.abort(); // Abort both fetches on unmount
80
84
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -155,18 +159,21 @@ export const OrderDetail = (props) => {
155
159
  </div>
156
160
  </Details>
157
161
  <div className="body">
158
- <Table
159
- headers={[
160
- { width: 140, name: "UPC" },
161
- { width: 210, name: "Nombre" },
162
- { width: 100, name: "Cadena", type: "groupImages" },
163
- { width: 130, name: "Servicios", type: "services" },
164
- { width: 70, name: "Estatus", type: "status" },
165
- { width: 65, name: "Fact.", type: "checkout" },
166
- ]}
167
- data={orderData}
168
- isProvider={props.isProvider}
169
- />
162
+ {isLoading
163
+ ? <Loading />
164
+ : <Table
165
+ headers={[
166
+ { width: 140, name: "UPC" },
167
+ { width: 210, name: "Nombre" },
168
+ { width: 100, name: "Cadena", type: "groupImages" },
169
+ { width: 130, name: "Servicios", type: "services" },
170
+ { width: 70, name: "Estatus", type: "status" },
171
+ { width: 65, name: "Fact.", type: "checkout" },
172
+ ]}
173
+ data={orderData}
174
+ isProvider={props.isProvider}
175
+ />
176
+ }
170
177
  </div>
171
178
  <div className="footer">
172
179
  <h2 className="headerTitle">Totales</h2>
@@ -14,6 +14,7 @@ export const MainContainer = styled.div`
14
14
  & > * {
15
15
  padding: 0 30px;
16
16
  }
17
+ box-shadow: -4px 0px 8px 0px rgba(0,0,0,0.1);
17
18
  .headerTitle {
18
19
  font-weight: bold;
19
20
  font-size: 25px;
@@ -36,6 +36,32 @@ export const Column = styled.div`
36
36
  &:nth-child(2) {
37
37
  overflow: hidden;
38
38
  }
39
+
40
+ .tooltip {
41
+ position: relative;
42
+ display: inline-block;
43
+ }
44
+
45
+ .tooltip .tooltiptext {
46
+ visibility: hidden;
47
+ background-color: #fff;
48
+ color: black;
49
+ text-align: center;
50
+ padding: 5px 0;
51
+ border-radius: 3px;
52
+
53
+ position: absolute;
54
+ z-index: 1;
55
+ top: -8px;
56
+ left: 3px;
57
+ font-family: Roboto;
58
+ font-size: 10px;
59
+ padding: 2px 5px;
60
+ }
61
+
62
+ .tooltip:hover .tooltiptext {
63
+ visibility: visible;
64
+ }
39
65
  `;
40
66
 
41
67
  export const Rows = styled.div`
@@ -1,27 +1,42 @@
1
1
  export const servicesCodeIcon = {
2
2
  datasheet: (
3
- <span key="datasheet" className="material-icons small">
4
- &#xf8ee;
5
- </span>
3
+ <div key="datasheet" className="tooltip">
4
+ <span className="material-icons small">
5
+ &#xf8ee;
6
+ </span>
7
+ <span className="tooltiptext">Ficha Técnica</span>
8
+ </div>
6
9
  ),
7
10
  description: (
8
- <span key="description" className="material-icons small">
9
- &#xe873;
10
- </span>
11
+ <div key="description" className="tooltip">
12
+ <span className="material-icons small">
13
+ &#xe873;
14
+ </span>
15
+ <span className="tooltiptext">Descripción</span>
16
+ </div>
11
17
  ),
12
18
  image: (
13
- <span key="image" className="material-icons small">
14
- &#xe3f4;
15
- </span>
19
+ <div key="image" className="tooltip">
20
+ <span className="material-icons small">
21
+ &#xe3f4;
22
+ </span>
23
+ <span className="tooltiptext">Imagen</span>
24
+ </div>
16
25
  ),
17
26
  translate: (
18
- <span key="translate" className="material-icons small">
19
- &#xe8e2;
20
- </span>
27
+ <div key="translate" className="tooltip">
28
+ <span className="material-icons small">
29
+ &#xe8e2;
30
+ </span>
31
+ <span className="tooltiptext">Traducción</span>
32
+ </div>
21
33
  ),
22
34
  build: (
23
- <span key="build" className="material-icons small">
24
- &#xe1bd;
25
- </span>
35
+ <div key="build" className="tooltip">
36
+ <span className="material-icons small">
37
+ &#xe1bd;
38
+ </span>
39
+ <span className="tooltiptext">Construcción</span>
40
+ </div>
26
41
  ),
27
42
  };
@@ -8,7 +8,8 @@ import closeIcon from "../../../assets/images/versionSelector/closeVersionSelect
8
8
  import { GlobalColors } from "contentoh-components-library/dist/global-files/variables";
9
9
  import { FontFamily } from "../../../global-files/variables";
10
10
  import { VersionItem } from "../../molecules/VersionItem";
11
- import { version } from "react";
11
+ import { CreateVersion } from "../../organisms/CreateVersion";
12
+ import { useCloseModal } from "../../../global-files/customHooks";
12
13
 
13
14
  export const VersionSelector = ({
14
15
  modalId,
@@ -16,11 +17,13 @@ export const VersionSelector = ({
16
17
  setVersion,
17
18
  companyName,
18
19
  currentVersion,
19
- setShowCreateVersion,
20
20
  setShowVersionSelector,
21
21
  jwt,
22
22
  }) => {
23
23
  const [versions, setVersions] = useState([]);
24
+ const [showCreateVersion, setShowCreateVersion] =
25
+ useCloseModal("create-version");
26
+ const [reload, setReload] = useState(false);
24
27
 
25
28
  const loadProductVersions = async (articleId) => {
26
29
  try {
@@ -41,13 +44,15 @@ export const VersionSelector = ({
41
44
  };
42
45
 
43
46
  useEffect(() => {
47
+ const ac = new AbortController();
44
48
  loadProductVersions(articleId);
45
49
 
46
50
  return () => {
47
51
  setVersions([]);
48
52
  setShowCreateVersion(false);
53
+ return () => ac.abort(); // Abort both fetches on unmount
49
54
  };
50
- }, []);
55
+ }, [reload]);
51
56
 
52
57
  return (
53
58
  <Container id={modalId}>
@@ -86,6 +91,16 @@ export const VersionSelector = ({
86
91
  />
87
92
  ))}
88
93
  </div>
94
+ {showCreateVersion && (
95
+ <CreateVersion
96
+ articleId={articleId}
97
+ version={currentVersion}
98
+ versionsList={versions}
99
+ setShowCreateVersion={setShowCreateVersion}
100
+ realoadVersion={() => setReload(!reload)}
101
+ jwt={jwt}
102
+ />
103
+ )}
89
104
  </Container>
90
105
  );
91
106
  };
@@ -16,187 +16,96 @@ ProviderProductEditionDefault.args = {
16
16
  Imágenes: true,
17
17
  },
18
18
  token:
19
- "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI5MmFiMWFkNS0zOWM4LTRhMjAtODFlNC02N2VjMTRmMzhmNDMiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6IjkyYWIxYWQ1LTM5YzgtNGEyMC04MWU0LTY3ZWMxNGYzOGY0MyIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiI4Y2U5MjYyMi0xYjZlLTQ1MWEtODUyYy04MjMxYzcwOTk5YTciLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY2ODEwODQ1MiwibmFtZSI6IkVsaSBJbmRhIiwicGhvbmVfbnVtYmVyIjoiKzUyMzExMTkwODg2OCIsImV4cCI6MTY2ODExMjA1MiwiaWF0IjoxNjY4MTA4NDUyLCJlbWFpbCI6Im1hcnRoYTI1Lm1pb0BnbWFpbC5jb20ifQ.JbpinyPv_38xvwwT_td3M_vP3xEffZ6dI0Xl3B9EVjPF7uW4ctZ_B7nKydPyUcB6LTaYEzCI1RfAgZpUQUFbYTfFHJ3T9kgwa9b9mDeDx3kiy2GK3CdYIuWiii5ZivxVKK10gV871OvxDish4w-vEOsClXDncoTX2zAx3wDM4xO83UdI0ahECOTYszuGB3FRnkrHnWJO0b2dpsyhqAmhw0aEcw6gwbqP5l-spOjMM3lE-bGm89pK_9oLYcyRMr09vcGJartmk_ctUisCflrYudnwVgwTwCi1PRBkiaUoDywYeGr6HxRoU1zsiC3LwB-m9b2YnNhEZmPanLfPstKVbw",
19
+ "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJmNTkyN2Y4ZS1jYmY3LTQ5MjItOWUwOS1lNjllYzBiMjczMWEiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6ImY1OTI3ZjhlLWNiZjctNDkyMi05ZTA5LWU2OWVjMGIyNzMxYSIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiIyOWY3YWY3Zi0yNmQ0LTRiMWItODZmZS0zOWY2ZTUyMDFhNzAiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY2OTkyNzAyMSwibmFtZSI6IklzbWFlbCBMb3BleiIsInBob25lX251bWJlciI6Iis1MjMxMTEzNjYzMzYiLCJleHAiOjE2Njk5MzA2MjEsImlhdCI6MTY2OTkyNzAyMSwiZW1haWwiOiJpbG9wZXpAY29udGVudG9oLmNvbSJ9.NK6hVSiBksguboJ1m8yYqtDq19kzgE3GqYDEJHLUya_n_TsXriv6W1ypq7XiSo9zrqWcmHBpOoJQS7WbWzjGe__NlJEXjo8bykS8QBTTOiMrKxz1KzGRYJkwgG0axk-zVysUQH0_y-fbwgEgMPtd6qO46DB_KlFI_PEL1-uR5MJ9U0kNkS61gMbHwFQFs_DU-sS01NxjBsjUEp783rs1r-jm7TelZac1rGaFNUyi5vHdSozYzlnzfzGcuACZ0lHqvah2FHbDyurp-G_uhpUn5lNmcL4rVNh2lDd4TOnhJ3AtN1wGSmtErmhjmBHTvavh1ub9pklA1B9qjVuTRpYANw",
20
20
  articleId: 238,
21
21
  category: 846,
22
22
  version: 2,
23
23
  productSelected: {
24
- "orderId": 3366,
25
- "article_status": "AP",
26
- "datasheet_status": "NS",
27
- "description_status": "NS",
28
- "images_status": "AP",
29
- "prio": "none",
30
- "version": 3,
31
- "brand": null,
32
- "article": {
33
- "category": "Iluminación|Lámparas|Lámparas de Mesa",
34
- "company_name": "Norday",
35
- "id_company": 810,
36
- "country": "México",
37
- "id_category": "2454",
38
- "id_article": 84492,
39
- "name": "prueba dos",
40
- "upc": "8375"
41
- },
42
- "retailers": [
43
- {
44
- "id": 59,
45
- "name": "The Home Depot Platinum"
46
- }
47
- ],
48
- "services": {
49
- "datasheets": 0,
50
- "descriptions": 0,
51
- "images": 1
52
- },
53
- "statusByRetailer": {
54
- "59": {
55
- "images": "AP"
56
- }
57
- },
58
- "retailersWithService": [
59
- "59"
24
+ id_article: 3,
25
+ id_category: 2032,
26
+ name: "CORTINA BLACKOUT DE POLIÉSTER CAFÉ 2.13 X 1.06 M",
27
+ upc: "161157",
28
+ timestamp: "2022-11-14T16:02:47.000Z",
29
+ categoryName: "Decoración|Cortinas y Persianas|Cortinas",
30
+ version: 1,
31
+ retailersAvailable: [
32
+ {
33
+ name: "The Home Depot Golden",
34
+ id: 58,
35
+ },
60
36
  ],
61
- "id_article": 84492,
62
- "retailersAvailable": [
63
- {
64
- "id": 59,
65
- "name": "The Home Depot Platinum"
66
- }
67
- ]
68
37
  },
69
38
  productToEdit: {
70
- "ArticleId": 84492,
71
- "idCategory": "2454",
72
- "product": {
73
- "orderId": 3366,
74
- "article_status": "AP",
75
- "datasheet_status": "NS",
76
- "description_status": "NS",
77
- "images_status": "AP",
78
- "prio": "none",
79
- "version": 3,
80
- "brand": null,
81
- "article": {
82
- "category": "Iluminación|Lámparas|Lámparas de Mesa",
83
- "company_name": "Norday",
84
- "id_company": 810,
85
- "country": "México",
86
- "id_category": "2454",
87
- "id_article": 84492,
88
- "name": "prueba dos",
89
- "upc": "8375"
90
- },
91
- "retailers": [
92
- {
93
- "id": 59,
94
- "name": "The Home Depot Platinum"
95
- }
39
+ idCategory: 2032,
40
+ ArticleId: 3,
41
+ product: [
42
+ {
43
+ id_article: 3,
44
+ id_category: 2032,
45
+ name: "CORTINA BLACKOUT DE POLIÉSTER CAFÉ 2.13 X 1.06 M",
46
+ upc: "161157",
47
+ timestamp: "2022-11-14T16:02:47.000Z",
48
+ categoryName: "Decoración|Cortinas y Persianas|Cortinas",
49
+ version: 1,
50
+ retailersAvailable: [
51
+ {
52
+ name: "The Home Depot Golden",
53
+ id: 58,
54
+ },
96
55
  ],
97
- "services": {
98
- "datasheets": 0,
99
- "descriptions": 0,
100
- "images": 1
101
- },
102
- "statusByRetailer": {
103
- "59": {
104
- "images": "AP"
105
- }
106
- },
107
- "retailersWithService": [
108
- "59"
109
- ],
110
- "id_article": 84492,
111
- "retailersAvailable": [
112
- {
113
- "id": 59,
114
- "name": "The Home Depot Platinum"
115
- }
116
- ]
117
- }
56
+ },
57
+ ],
118
58
  },
119
59
  location: {
120
60
  state: { origin: "Contentoh" },
121
61
  },
122
62
  user: {
123
- "id_user": 59,
124
- "name": "The Home",
125
- "last_name": "Depot",
126
- "email": "cadena.ismael@allfreemail.net",
127
- "position": "Admin",
128
- "telephone": "+523111366336",
129
- "country": "México",
130
- "id_company": 817,
131
- "id_cognito": "5884ae34-59d6-4454-b98e-821518bcc3a7",
132
- "birth_Date": null,
133
- "about_me": "",
134
- "zip_code": "",
135
- "address": "",
136
- "job": "",
137
- "id_stripe": "",
138
- "id_role": 0,
139
- "active": 1,
140
- "is_retailer": 1,
141
- "email_notify": 0,
142
- "is_user_tech": null,
143
- "membership": {
144
- "id": 47,
145
- "start_date": "2022-05-25T14:31:12.000Z",
146
- "end_date": "2023-05-25T14:31:12.000Z",
147
- "planID": 5,
148
- "plan": "prod_Ktl6B5Ou2gqTB2",
149
- "name": "Plan Pro",
150
- "user_limit": "5",
151
- "products_limit": "500",
152
- "type": "PyMES"
63
+ id_user: 28,
64
+ name: "Ismael",
65
+ last_name: "López",
66
+ email: "ilopez@contentoh.com",
67
+ position: "Test States",
68
+ telephone: "+523111366336",
69
+ country: "México",
70
+ id_company: 1,
71
+ id_cognito: "f5927f8e-cbf7-4922-9e09-e69ec0b2731a",
72
+ birth_Date: null,
73
+ about_me: "",
74
+ zip_code: "",
75
+ address: "",
76
+ job: "",
77
+ id_stripe: "cus_KuEt6R6vwmN09f",
78
+ id_role: 0,
79
+ active: 1,
80
+ is_retailer: 0,
81
+ email_notify: 0,
82
+ is_user_tech: "AS",
83
+ membership: {
84
+ id: 76,
85
+ start_date: "2022-01-18T17:25:35.000Z",
86
+ end_date: "2023-01-18T17:25:35.000Z",
87
+ planID: 8,
88
+ plan: "prod_KtlhECVSFG2iro",
89
+ name: "Plan Pro",
90
+ user_limit: "20",
91
+ products_limit: "5000",
92
+ type: "Enterprise",
153
93
  },
154
- "src": "https://content-management-profile.s3.amazonaws.com/id-59/59.png?1668127460068"
94
+ src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1669927021851",
155
95
  },
156
96
  company: {
157
- "id_company": 817,
158
- "trade_name": "Retailer acc",
159
- "company_name": "Retailer acc",
160
- "rfc": "ASER12345",
161
- "adress": "Av. Insurgentes",
162
- "about_company": null,
163
- "telephone": null,
164
- "web_site": null,
165
- "zip_code": null,
166
- "email": null,
167
- "social_link": null,
168
- "is_retailer": 1,
169
- "financedRetailers": [
170
- {
171
- "id": 68,
172
- "name": "The Home Depot Merchants",
173
- "country": "México",
174
- "id_region": 1,
175
- "active": 1
176
- }
177
- ],
178
- "retailers": [
179
- {
180
- "id": 59,
181
- "name": "The Home Depot Platinum",
182
- "country": "México"
183
- },
184
- {
185
- "id": 60,
186
- "name": "The Home Depot Resizing",
187
- "country": "México"
188
- },
189
- {
190
- "id": 61,
191
- "name": "Home Depot TAB",
192
- "country": "México"
193
- },
194
- {
195
- "id": 68,
196
- "name": "The Home Depot Merchants",
197
- "country": "México"
198
- }
199
- ]
97
+ id_company: 1,
98
+ trade_name: "GRUPO BRAHMA",
99
+ company_name: "GRUPO BRAHMA",
100
+ rfc: "XAXX010101000",
101
+ adress: "AA",
102
+ about_company: "",
103
+ telephone: "",
104
+ web_site: "",
105
+ zip_code: "",
106
+ email: null,
107
+ social_link: "",
108
+ is_retailer: 0,
200
109
  },
201
- showSurvey: (v) => v && alert('se muestra'),
110
+ showSurvey: (v) => v && alert("se muestra"),
202
111
  };