contentoh-components-library 21.4.84 → 21.4.85

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.
@@ -15,6 +15,6 @@ var _variables = require("../../../global-files/variables");
15
15
 
16
16
  var _templateObject;
17
17
 
18
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-family: ", ";\n color: ", ";\n font-size: 14px;\n line-height: 21px;\n border-bottom: 2px solid ", ";\n width: 149px;\n padding-bottom: 5px;\n transition: 0.1s all;\n cursor: pointer;\n\n &.active {\n font-size: 18px;\n border-bottom: 2px solid ", ";\n }\n\n & + * {\n margin-left: 10px;\n }\n"])), _variables.FontFamily.Raleway_500, _variables.GlobalColors.s5, _variables.GlobalColors.s3, _variables.GlobalColors.magenta_s2);
18
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-family: ", ";\n color: ", ";\n font-size: 14px;\n line-height: 21px;\n border-bottom: 2px solid ", ";\n width: 149px;\n padding-bottom: 5px;\n transition: 0.1s all;\n cursor: pointer;\n &.active {\n font-size: 18px;\n border-bottom: 2px solid ", ";\n }\n & + * {\n margin-left: 10px;\n }\n"])), _variables.FontFamily.Raleway_500, _variables.GlobalColors.s5, _variables.GlobalColors.s3, _variables.GlobalColors.magenta_s2);
19
19
 
20
20
  exports.Container = Container;
@@ -27,8 +27,8 @@ var ProviderProductEditionDefault = Template.bind({});
27
27
  exports.ProviderProductEditionDefault = ProviderProductEditionDefault;
28
28
  ProviderProductEditionDefault.args = {
29
29
  tabsSections: {
30
- Descripción: true,
31
- "Ficha técnica": false,
30
+ Descripción: false,
31
+ "Ficha técnica": true,
32
32
  Imágenes: false
33
33
  },
34
34
  token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJmNTky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UjPsmrV5TBVzPEYwXO0KG8lYjL8id80D7tbGs28ZIK6B4rf3-eqI_ngmBB4CjQ",
@@ -36,45 +36,38 @@ ProviderProductEditionDefault.args = {
36
36
  category: 287,
37
37
  version: 1,
38
38
  productSelected: {
39
- category: "Accesorios Decorativos|Accesorios Decorativos",
40
- company_name: "Demo",
41
- company_id: 923,
42
- id_category: "2028",
43
- id_article: 118465,
44
- name: "VELA AROMA 18 OZ MAN/CAN",
45
- upc: "Modelo6",
46
- isVisible: 1,
47
- retailers: [{
48
- id: 68,
49
- name: "The Home Depot Onboarding"
50
- }],
39
+ id_article: 121067,
40
+ upc: "2342341",
41
+ name: "asd",
42
+ timestamp: "2024-01-03T19:42:59.000Z",
43
+ categoryName: "Abarrotes|Abarrotes Secos|Alimentos Deshidratados",
44
+ id_category: 4,
51
45
  version: 1,
46
+ value: null,
52
47
  retailersAvailable: [{
53
- id: 68,
54
- name: "The Home Depot Onboarding"
55
- }]
48
+ "name": "Walmart Marketplace",
49
+ "id": 75
50
+ }],
51
+ percentage: 1.33
56
52
  },
57
53
  productToEdit: {
58
- idCategory: "2028",
59
- ArticleId: 118465,
54
+ idCategory: 4,
55
+ ArticleId: 121067,
60
56
  product: [{
61
- category: "Accesorios Decorativos|Accesorios Decorativos",
62
- company_name: "Demo",
63
- company_id: 923,
64
- id_category: "2028",
65
- id_article: 118465,
66
- name: "VELA AROMA 18 OZ MAN/CAN",
67
- upc: "Modelo6",
68
- isVisible: 1,
69
- retailers: [{
70
- id: 68,
71
- name: "The Home Depot Onboarding"
72
- }],
57
+ id_article: 121067,
58
+ upc: "2342341",
59
+ name: "asd",
60
+ timestamp: "2024-01-03T19:42:59.000Z",
61
+ categoryName: "Abarrotes|Abarrotes Secos|Alimentos Deshidratados",
62
+ id_category: 4,
73
63
  version: 1,
64
+ value: null,
74
65
  retailersAvailable: [{
75
- id: 68,
76
- name: "The Home Depot Onboarding"
77
- }]
66
+ name: "Walmart Marketplace",
67
+ id: 75,
68
+ percentage: 1.33
69
+ }],
70
+ percentage: 1.33
78
71
  }]
79
72
  },
80
73
  location: {
@@ -89,30 +82,30 @@ ProviderProductEditionDefault.args = {
89
82
  key: "24vwut"
90
83
  },
91
84
  user: {
92
- id_user: 191,
93
- name: "Demo",
94
- last_name: "Demo",
95
- email: "merchants24feb@allfreemail.net",
96
- position: "Test",
97
- telephone: "+52123456789",
85
+ id_user: 28,
86
+ name: "Ismael",
87
+ last_name: "López",
88
+ email: "ilopez@contentoh.com",
89
+ position: "Test States",
90
+ telephone: "+523111366336",
98
91
  country: "México",
99
- id_company: 923,
100
- id_cognito: "c3cd160c-76c2-497c-9357-5ef949307e1e",
92
+ id_company: 1,
93
+ id_cognito: "f5927f8e-cbf7-4922-9e09-e69ec0b2731a",
101
94
  birth_Date: null,
102
- about_me: null,
103
- zip_code: null,
104
- address: null,
105
- job: null,
106
- id_stripe: null,
95
+ about_me: "",
96
+ zip_code: "",
97
+ address: "",
98
+ job: "",
99
+ id_stripe: "cus_KuEt6R6vwmN09f",
107
100
  id_role: 0,
108
101
  active: 1,
109
102
  is_retailer: 0,
110
103
  email_notify: 1,
111
- is_user_tech: null,
104
+ is_user_tech: "ADMIN-AS",
112
105
  membership: {
113
- id: 114,
114
- start_date: "2023-02-24T18:14:43.000Z",
115
- end_date: "2024-02-24T18:14:43.000Z",
106
+ id: 76,
107
+ start_date: "2022-01-18T17:25:35.000Z",
108
+ end_date: "2023-01-18T17:25:35.000Z",
116
109
  planID: 8,
117
110
  plan: "prod_KtlhECVSFG2iro",
118
111
  name: "Plan Pro",
@@ -120,31 +113,23 @@ ProviderProductEditionDefault.args = {
120
113
  products_limit: "5000",
121
114
  type: "Enterprise"
122
115
  },
123
- src: "https://content-management-profile.s3.amazonaws.com/id-191/191.png?1701729602068"
116
+ src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1704310718113"
124
117
  },
125
118
  company: {
126
- id_company: 923,
127
- trade_name: "Demo",
128
- company_name: "Demo",
129
- rfc: "Demo",
130
- adress: "Demo",
131
- about_company: null,
132
- telephone: null,
133
- web_site: null,
134
- zip_code: null,
119
+ id_company: 1,
120
+ trade_name: "GRUPO BRAHMA",
121
+ company_name: "GRUPO BRAHMA",
122
+ rfc: "XAXX010101000",
123
+ adress: "AA",
124
+ about_company: "",
125
+ telephone: "",
126
+ web_site: "",
127
+ zip_code: "",
135
128
  email: null,
136
- social_link: null,
129
+ social_link: "",
137
130
  is_retailer: 0,
138
- financedRetailers: [{
139
- id: 68,
140
- name: "The Home Depot Onboarding",
141
- country: "México"
142
- }],
143
- retailers: [{
144
- id: 68,
145
- name: "The Home Depot Onboarding",
146
- country: "México"
147
- }]
131
+ financedRetailers: [],
132
+ retailers: []
148
133
  },
149
134
  showSurvey: function showSurvey(v) {
150
135
  return v && alert("se muestra");
@@ -280,7 +280,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
280
280
  showModal = _useState14[0],
281
281
  setShowModal = _useState14[1];
282
282
 
283
- var _useState15 = (0, _react.useState)(),
283
+ var _useState15 = (0, _react.useState)({}),
284
284
  _useState16 = (0, _slicedToArray2.default)(_useState15, 2),
285
285
  boxData = _useState16[0],
286
286
  setBoxData = _useState16[1];
@@ -1271,43 +1271,47 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1271
1271
  }, parseBoxData.length > 0 && {
1272
1272
  boxData: parseBoxData
1273
1273
  });
1274
+ console.log({
1275
+ dataObject: dataObject
1276
+ });
1277
+ console.log(product === null || product === void 0 ? void 0 : product.orderId);
1274
1278
  if (product !== null && product !== void 0 && product.orderId) dataObject["orderId"] = product === null || product === void 0 ? void 0 : product.orderId;
1275
- _context12.prev = 4;
1276
- _context12.next = 7;
1279
+ _context12.prev = 6;
1280
+ _context12.next = 9;
1277
1281
  return _axios.default.put("".concat(process.env.REACT_APP_ARTICLE_DATA_ENDPOINT, "?datasheet=true&version=").concat(version), dataObject, {
1278
1282
  headers: {
1279
1283
  Authorization: token
1280
1284
  }
1281
1285
  });
1282
1286
 
1283
- case 7:
1287
+ case 9:
1284
1288
  res = _context12.sent;
1285
1289
 
1286
1290
  if (!(res.data.statusCode === 200)) {
1287
- _context12.next = 13;
1291
+ _context12.next = 15;
1288
1292
  break;
1289
1293
  }
1290
1294
 
1291
1295
  setUpdatedDatasheets([]);
1292
1296
  setMessage("Fichas técnicas guardadas");
1293
- _context12.next = 13;
1297
+ _context12.next = 15;
1294
1298
  return loadData();
1295
1299
 
1296
- case 13:
1297
- _context12.next = 18;
1300
+ case 15:
1301
+ _context12.next = 20;
1298
1302
  break;
1299
1303
 
1300
- case 15:
1301
- _context12.prev = 15;
1302
- _context12.t0 = _context12["catch"](4);
1304
+ case 17:
1305
+ _context12.prev = 17;
1306
+ _context12.t0 = _context12["catch"](6);
1303
1307
  console.log(_context12.t0);
1304
1308
 
1305
- case 18:
1309
+ case 20:
1306
1310
  case "end":
1307
1311
  return _context12.stop();
1308
1312
  }
1309
1313
  }
1310
- }, _callee12, null, [[4, 15]]);
1314
+ }, _callee12, null, [[6, 17]]);
1311
1315
  }));
1312
1316
 
1313
1317
  return function saveDatasheets() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.4.84",
3
+ "version": "21.4.85",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -1,6 +1,5 @@
1
1
  import styled from "styled-components";
2
2
  import { FontFamily, GlobalColors } from "../../../global-files/variables";
3
-
4
3
  export const Container = styled.div`
5
4
  font-family: ${FontFamily.Raleway_500};
6
5
  color: ${GlobalColors.s5};
@@ -11,13 +10,11 @@ export const Container = styled.div`
11
10
  padding-bottom: 5px;
12
11
  transition: 0.1s all;
13
12
  cursor: pointer;
14
-
15
13
  &.active {
16
14
  font-size: 18px;
17
15
  border-bottom: 2px solid ${GlobalColors.magenta_s2};
18
16
  }
19
-
20
17
  & + * {
21
18
  margin-left: 10px;
22
19
  }
23
- `;
20
+ `;
@@ -11,8 +11,8 @@ export const ProviderProductEditionDefault = Template.bind({});
11
11
 
12
12
  ProviderProductEditionDefault.args = {
13
13
  tabsSections: {
14
- Descripción: true,
15
- "Ficha técnica": false,
14
+ Descripción: false,
15
+ "Ficha técnica": true,
16
16
  Imágenes: false,
17
17
  },
18
18
  token:
@@ -21,57 +21,46 @@ ProviderProductEditionDefault.args = {
21
21
  category: 287,
22
22
  version: 1,
23
23
  productSelected: {
24
- category: "Accesorios Decorativos|Accesorios Decorativos",
25
- company_name: "Demo",
26
- company_id: 923,
27
- id_category: "2028",
28
- id_article: 118465,
29
- name: "VELA AROMA 18 OZ MAN/CAN",
30
- upc: "Modelo6",
31
- isVisible: 1,
32
- retailers: [
33
- {
34
- id: 68,
35
- name: "The Home Depot Onboarding",
36
- },
37
- ],
24
+ id_article: 121067,
25
+ upc: "2342341",
26
+ name: "asd",
27
+ timestamp: "2024-01-03T19:42:59.000Z",
28
+ categoryName: "Abarrotes|Abarrotes Secos|Alimentos Deshidratados",
29
+ id_category: 4,
38
30
  version: 1,
31
+ value: null,
39
32
  retailersAvailable: [
40
33
  {
41
- id: 68,
42
- name: "The Home Depot Onboarding",
43
- },
34
+ "name": "Walmart Marketplace",
35
+ "id": 75
36
+ }
44
37
  ],
38
+ percentage: 1.33
45
39
  },
46
40
  productToEdit: {
47
- idCategory: "2028",
48
- ArticleId: 118465,
41
+ idCategory: 4,
42
+ ArticleId: 121067,
49
43
  product: [
50
- {
51
- category: "Accesorios Decorativos|Accesorios Decorativos",
52
- company_name: "Demo",
53
- company_id: 923,
54
- id_category: "2028",
55
- id_article: 118465,
56
- name: "VELA AROMA 18 OZ MAN/CAN",
57
- upc: "Modelo6",
58
- isVisible: 1,
59
- retailers: [
60
- {
61
- id: 68,
62
- name: "The Home Depot Onboarding",
63
- },
64
- ],
65
- version: 1,
66
- retailersAvailable: [
67
- {
68
- id: 68,
69
- name: "The Home Depot Onboarding",
70
- },
71
- ],
72
- },
73
- ],
74
- },
44
+ {
45
+ id_article: 121067,
46
+ upc: "2342341",
47
+ name: "asd",
48
+ timestamp: "2024-01-03T19:42:59.000Z",
49
+ categoryName: "Abarrotes|Abarrotes Secos|Alimentos Deshidratados",
50
+ id_category: 4,
51
+ version: 1,
52
+ value: null,
53
+ retailersAvailable: [
54
+ {
55
+ name: "Walmart Marketplace",
56
+ id: 75,
57
+ percentage: 1.33
58
+ }
59
+ ],
60
+ percentage: 1.33
61
+ }
62
+ ]
63
+ },
75
64
  location: {
76
65
  pathname: "/EditProducts",
77
66
  search: "",
@@ -84,66 +73,54 @@ ProviderProductEditionDefault.args = {
84
73
  key: "24vwut",
85
74
  },
86
75
  user: {
87
- id_user: 191,
88
- name: "Demo",
89
- last_name: "Demo",
90
- email: "merchants24feb@allfreemail.net",
91
- position: "Test",
92
- telephone: "+52123456789",
76
+ id_user: 28,
77
+ name: "Ismael",
78
+ last_name: "López",
79
+ email: "ilopez@contentoh.com",
80
+ position: "Test States",
81
+ telephone: "+523111366336",
93
82
  country: "México",
94
- id_company: 923,
95
- id_cognito: "c3cd160c-76c2-497c-9357-5ef949307e1e",
83
+ id_company: 1,
84
+ id_cognito: "f5927f8e-cbf7-4922-9e09-e69ec0b2731a",
96
85
  birth_Date: null,
97
- about_me: null,
98
- zip_code: null,
99
- address: null,
100
- job: null,
101
- id_stripe: null,
86
+ about_me: "",
87
+ zip_code: "",
88
+ address: "",
89
+ job: "",
90
+ id_stripe: "cus_KuEt6R6vwmN09f",
102
91
  id_role: 0,
103
92
  active: 1,
104
93
  is_retailer: 0,
105
94
  email_notify: 1,
106
- is_user_tech: null,
95
+ is_user_tech: "ADMIN-AS",
107
96
  membership: {
108
- id: 114,
109
- start_date: "2023-02-24T18:14:43.000Z",
110
- end_date: "2024-02-24T18:14:43.000Z",
111
- planID: 8,
112
- plan: "prod_KtlhECVSFG2iro",
113
- name: "Plan Pro",
114
- user_limit: "50",
115
- products_limit: "5000",
116
- type: "Enterprise",
97
+ id: 76,
98
+ start_date: "2022-01-18T17:25:35.000Z",
99
+ end_date: "2023-01-18T17:25:35.000Z",
100
+ planID: 8,
101
+ plan: "prod_KtlhECVSFG2iro",
102
+ name: "Plan Pro",
103
+ user_limit: "50",
104
+ products_limit: "5000",
105
+ type: "Enterprise"
117
106
  },
118
- src: "https://content-management-profile.s3.amazonaws.com/id-191/191.png?1701729602068",
107
+ src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1704310718113"
119
108
  },
120
109
  company: {
121
- id_company: 923,
122
- trade_name: "Demo",
123
- company_name: "Demo",
124
- rfc: "Demo",
125
- adress: "Demo",
126
- about_company: null,
127
- telephone: null,
128
- web_site: null,
129
- zip_code: null,
110
+ id_company: 1,
111
+ trade_name: "GRUPO BRAHMA",
112
+ company_name: "GRUPO BRAHMA",
113
+ rfc: "XAXX010101000",
114
+ adress: "AA",
115
+ about_company: "",
116
+ telephone: "",
117
+ web_site: "",
118
+ zip_code: "",
130
119
  email: null,
131
- social_link: null,
120
+ social_link: "",
132
121
  is_retailer: 0,
133
- financedRetailers: [
134
- {
135
- id: 68,
136
- name: "The Home Depot Onboarding",
137
- country: "México",
138
- },
139
- ],
140
- retailers: [
141
- {
142
- id: 68,
143
- name: "The Home Depot Onboarding",
144
- country: "México",
145
- },
146
- ],
147
- },
122
+ financedRetailers: [],
123
+ retailers: []
124
+ },
148
125
  showSurvey: (v) => v && alert("se muestra"),
149
126
  };
@@ -151,7 +151,7 @@ export const ProviderProductEdition = ({
151
151
  const [datasheets, setDatasheets] = useState([]);
152
152
  const [images, setImages] = useReducer(reducerImages, {});
153
153
  const [showModal, setShowModal] = useState(false);
154
- const [boxData, setBoxData] = useState();
154
+ const [boxData, setBoxData] = useState({});
155
155
  const { getRootProps, getInputProps } = useDropzone({
156
156
  accept: "image/*",
157
157
  noKeyboard: true,
@@ -674,7 +674,7 @@ export const ProviderProductEdition = ({
674
674
  }));
675
675
  setSocketType(imageInputs);
676
676
  }, [images]);
677
-
677
+
678
678
  const saveDescriptions = async () => {
679
679
  setLoading(true);
680
680
  const dataObject = {
@@ -724,6 +724,8 @@ export const ProviderProductEdition = ({
724
724
  ...(parseBoxData.length > 0 && { boxData: parseBoxData }),
725
725
  };
726
726
 
727
+ console.log({dataObject});
728
+ console.log(product?.orderId);
727
729
  if (product?.orderId) dataObject["orderId"] = product?.orderId;
728
730
  try {
729
731
  const res = await axios.put(