contentoh-components-library 21.4.55 → 21.4.57

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.
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -31,41 +31,104 @@ ProviderProductEditionDefault.args = {
31
31
  "Ficha técnica": false,
32
32
  Imágenes: false
33
33
  },
34
- token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJmNTkyN2Y4ZS1jYmY3LTQ5MjItOWUwOS1lNjllYzBiMjczMWEiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6ImY1OTI3ZjhlLWNiZjctNDkyMi05ZTA5LWU2OWVjMGIyNzMxYSIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiIyM2Q1NTlmYi1jMzIwLTRhMjItYjJmNy1lOThhYTFhZGEyNmYiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY4MzkyNjgyMSwibmFtZSI6IklzbWFlbCBMb3BleiIsInBob25lX251bWJlciI6Iis1MjMxMTEzNjYzMzYiLCJleHAi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mdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiI2YzMxMWNhYS1kYTI4LTQ4ZjktOTc5NC1jNzIzM2MwNmI0ZjgiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY5ODQzNTc3MCwibmFtZSI6IlJhZGlvc2NoYWNrIE9uYm9hcmRpbmciLCJwaG9uZV9udW1iZXIiOiIrNTIxMjM0NTY3ODk4IiwiZXhwIjoxNjk4NDM5MzcwLCJpYXQiOjE2OTg0MzU3NzAsImVtYWlsIjoicmFkaW9zaGFja2Ryb3BzaGlwQGFsbGZyZWVtYWlsLm5ldCJ9.oeUam133Gj8QbKe6NpRmItI1NK8sRW0mtlyJCu16syBaZk7-6NqsNhqWnYx7CNLMrtdBbTXSH1mSkzVY_J-S1OmceHtJg2Uo0iXQboRaiFOjZIKCDeFXOIgKIAFN1p_YVAvYXsNdwYwFqa4Jl1AozW4Ae4VwOWBQqpwb6vxmS_nASJpd0ZnwhHbcGkdoTsYJPDCahmMchK9lUtMjKu7bAkdkrgf8F18M94VfcSAiBEFo8EebcyV0BRtrEeoP44N-tJfZ_F_MriO3mGWi_EFGbhThp6DpLe0qlzOpIzmYtWzTHn-CiFA0ijhLqEfNjFuv__VEq3kD6Ef_1XXlnLj5aQ",
35
+ articleId: 39485,
36
+ category: 11,
37
+ version: 3,
38
38
  productSelected: {
39
- id_article: 112668,
40
- upc: "137091",
41
- name: "Audifonos Bose",
42
- timestamp: "2023-10-14T01:12:45.000Z",
43
- categoryName: "Audio|Audífonos|In Ear",
44
- id_category: 905,
45
39
  version: 1,
40
+ missing: {},
41
+ article: {
42
+ category: "Tecnología|Accesorios Computadora|Mouse",
43
+ company_name: "Radioshack",
44
+ company_id: 950,
45
+ id_category: "904",
46
+ id_article: 118438,
47
+ name: "Mouse Gamer",
48
+ upc: "3434"
49
+ },
50
+ asignations: [],
51
+ retailers: [{
52
+ id: 74,
53
+ name: "Radioshack",
54
+ country: "México",
55
+ id_region: 1,
56
+ active: 1,
57
+ flow: 1
58
+ }],
59
+ percentage: "100",
46
60
  retailersAvailable: [{
61
+ id: 74,
47
62
  name: "Radioshack",
48
- id: 74
63
+ country: "México",
64
+ id_region: 1,
65
+ active: 1,
66
+ flow: 1
49
67
  }],
50
- percentage: "33"
68
+ upc: "3434",
69
+ name: "Mouse Gamer",
70
+ categoryName: "Tecnología|Accesorios Computadora|Mouse",
71
+ id_category: "904",
72
+ id_article: 118438,
73
+ services: [{
74
+ id_article: 118438,
75
+ service: "datasheet",
76
+ quantity: 1,
77
+ price: 0,
78
+ id_user: 349,
79
+ datasheet_common: null,
80
+ discount: null
81
+ }]
51
82
  },
52
83
  productToEdit: {
53
- idCategory: 905,
54
- ArticleId: 112668,
84
+ idCategory: "904",
85
+ ArticleId: 118438,
55
86
  product: [{
56
- id_article: 112668,
57
- upc: "137091",
58
- name: "Audifonos Bose",
59
- timestamp: "2023-10-14T01:12:45.000Z",
60
- categoryName: "Audio|Audífonos|In Ear",
61
- id_category: 905,
62
87
  version: 1,
63
- retailersAvailable: [{
88
+ missing: {},
89
+ article: {
90
+ category: "Tecnología|Accesorios Computadora|Mouse",
91
+ company_name: "Radioshack",
92
+ company_id: 950,
93
+ id_category: "904",
94
+ id_article: 118438,
95
+ name: "Mouse Gamer",
96
+ upc: "3434"
97
+ },
98
+ asignations: [],
99
+ retailers: [{
100
+ id: 74,
64
101
  name: "Radioshack",
102
+ country: "México",
103
+ id_region: 1,
104
+ active: 1,
105
+ flow: 1,
106
+ percentage: 100
107
+ }],
108
+ percentage: "100",
109
+ retailersAvailable: [{
65
110
  id: 74,
66
- percentage: 33
111
+ name: "Radioshack",
112
+ country: "México",
113
+ id_region: 1,
114
+ active: 1,
115
+ flow: 1,
116
+ percentage: 100
67
117
  }],
68
- percentage: "33"
118
+ upc: "3434",
119
+ name: "Mouse Gamer",
120
+ categoryName: "Tecnología|Accesorios Computadora|Mouse",
121
+ id_category: "904",
122
+ id_article: 118438,
123
+ services: [{
124
+ id_article: 118438,
125
+ service: "datasheet",
126
+ quantity: 1,
127
+ price: 0,
128
+ id_user: 349,
129
+ datasheet_common: null,
130
+ discount: null
131
+ }]
69
132
  }]
70
133
  },
71
134
  location: {
@@ -80,15 +143,15 @@ ProviderProductEditionDefault.args = {
80
143
  key: "24vwut"
81
144
  },
82
145
  user: {
83
- id_user: 350,
84
- name: "Proveedor Uno",
85
- last_name: "Radioshack",
86
- email: "proveedorradioshackuno@allfreemail.net",
87
- position: "proveedor",
146
+ id_user: 349,
147
+ name: "Radioschack",
148
+ last_name: "Onboarding",
149
+ email: "radioshackdropship@allfreemail.net",
150
+ position: "KAM",
88
151
  telephone: "+521234567898",
89
152
  country: "México",
90
- id_company: 950,
91
- id_cognito: "0f4247df-f02f-4cb8-909a-e62649d34782",
153
+ id_company: 949,
154
+ id_cognito: "1fac6667-a033-4560-9e9d-51400762b61f",
92
155
  birth_Date: null,
93
156
  about_me: null,
94
157
  zip_code: null,
@@ -97,13 +160,13 @@ ProviderProductEditionDefault.args = {
97
160
  id_stripe: null,
98
161
  id_role: 0,
99
162
  active: 1,
100
- is_retailer: 0,
163
+ is_retailer: 1,
101
164
  email_notify: 1,
102
165
  is_user_tech: null,
103
166
  membership: {
104
- id: 146,
105
- start_date: "2023-10-14T00:49:16.000Z",
106
- end_date: "2024-10-14T00:49:16.000Z",
167
+ id: 145,
168
+ start_date: "2023-10-14T00:06:44.000Z",
169
+ end_date: "2024-10-14T00:06:44.000Z",
107
170
  planID: 8,
108
171
  plan: "prod_KtlhECVSFG2iro",
109
172
  name: "Plan Pro",
@@ -111,13 +174,13 @@ ProviderProductEditionDefault.args = {
111
174
  products_limit: "5000",
112
175
  type: "Enterprise"
113
176
  },
114
- src: "https://content-management-profile.s3.amazonaws.com/id-350/350.png?1697569749878"
177
+ src: "https://content-management-profile.s3.amazonaws.com/id-349/349.png?1698435772702"
115
178
  },
116
179
  company: {
117
- id_company: 950,
180
+ id_company: 949,
118
181
  trade_name: "Radioshack",
119
182
  company_name: "Radioshack",
120
- rfc: "ASDASD",
183
+ rfc: "ASDAS",
121
184
  adress: "CDMX",
122
185
  about_company: null,
123
186
  telephone: null,
@@ -125,22 +188,16 @@ ProviderProductEditionDefault.args = {
125
188
  zip_code: null,
126
189
  email: null,
127
190
  social_link: null,
128
- is_retailer: 0,
191
+ is_retailer: 1,
129
192
  financedRetailers: [{
130
193
  id: 74,
131
194
  name: "Radioshack",
132
- country: "México",
133
- id_region: 1,
134
- active: 1,
135
- flow: 1
195
+ country: "México"
136
196
  }],
137
197
  retailers: [{
138
198
  id: 74,
139
199
  name: "Radioshack",
140
- country: "México",
141
- id_region: 1,
142
- active: 1,
143
- flow: 1
200
+ country: "México"
144
201
  }]
145
202
  },
146
203
  showSurvey: function showSurvey(v) {
@@ -1963,8 +1963,6 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1963
1963
 
1964
1964
  var enableActions = function enableActions(versionStatus) {
1965
1965
  try {
1966
- if (user.is_retailer) return false;
1967
-
1968
1966
  if (versionStatus) {
1969
1967
  return ["AP", "ACA", "RCA", null].includes(versionStatus);
1970
1968
  }
@@ -541,7 +541,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
541
541
  }
542
542
 
543
543
  _context2.next = 3;
544
- return (0, _data.getRetailerServices)(product === null || product === void 0 ? void 0 : (_product$article = product.article) === null || _product$article === void 0 ? void 0 : _product$article.id_article, product === null || product === void 0 ? void 0 : (_product$article2 = product.article) === null || _product$article2 === void 0 ? void 0 : _product$article2.category, parseInt(product === null || product === void 0 ? void 0 : (_product$article3 = product.article) === null || _product$article3 === void 0 ? void 0 : _product$article3.id_category), auditableVersion.version);
544
+ return (0, _data.getRetailerServices)(product === null || product === void 0 ? void 0 : (_product$article = product.article) === null || _product$article === void 0 ? void 0 : _product$article.id_article, product === null || product === void 0 ? void 0 : (_product$article2 = product.article) === null || _product$article2 === void 0 ? void 0 : _product$article2.category, parseInt(product === null || product === void 0 ? void 0 : (_product$article3 = product.article) === null || _product$article3 === void 0 ? void 0 : _product$article3.id_category), auditableVersion.version, token);
545
545
 
546
546
  case 3:
547
547
  _auditServices = _context2.sent;
@@ -581,7 +581,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
581
581
  case 0:
582
582
  _context3.prev = 0;
583
583
  _context3.next = 3;
584
- return (0, _data.getRetailerServices)(product === null || product === void 0 ? void 0 : (_product$article4 = product.article) === null || _product$article4 === void 0 ? void 0 : _product$article4.id_article, product === null || product === void 0 ? void 0 : (_product$article5 = product.article) === null || _product$article5 === void 0 ? void 0 : _product$article5.category, parseInt(product === null || product === void 0 ? void 0 : (_product$article6 = product.article) === null || _product$article6 === void 0 ? void 0 : _product$article6.id_category), version);
584
+ return (0, _data.getRetailerServices)(product === null || product === void 0 ? void 0 : (_product$article4 = product.article) === null || _product$article4 === void 0 ? void 0 : _product$article4.id_article, product === null || product === void 0 ? void 0 : (_product$article5 = product.article) === null || _product$article5 === void 0 ? void 0 : _product$article5.category, parseInt(product === null || product === void 0 ? void 0 : (_product$article6 = product.article) === null || _product$article6 === void 0 ? void 0 : _product$article6.id_category), version, token);
585
585
 
586
586
  case 3:
587
587
  _services = _context3.sent;
@@ -20,7 +20,7 @@ var _jsBase = require("js-base64");
20
20
  var _uuid = require("uuid");
21
21
 
22
22
  var getRetailerServices = /*#__PURE__*/function () {
23
- var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(articleId, category, categoryId, version, token) {
23
+ var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(articleId, category, categoryId, version, Authorization) {
24
24
  var _images$values, responseArray, datasheets, descriptions, images;
25
25
 
26
26
  return _regenerator.default.wrap(function _callee$(_context) {
@@ -31,14 +31,23 @@ var getRetailerServices = /*#__PURE__*/function () {
31
31
  _context.next = 3;
32
32
  return Promise.all([_axios.default.post("".concat(process.env.REACT_APP_ARTICLE_DATA_DATASHEET_ENDPOINT, "?idCategory=").concat(categoryId, "&articleId=").concat(articleId, "&version=").concat(version), {}, {
33
33
  headers: {
34
- Authorization: token
34
+ Authorization: Authorization
35
35
  }
36
- }), _axios.default.get("".concat(process.env.REACT_APP_ARTICLE_DATA_DESCRIPTION_ENDPOINT, "?idCategory=").concat(categoryId, "&articleId=").concat(articleId, "&version=").concat(version)), _axios.default.post("".concat(process.env.REACT_APP_ARTICLE_DATA_IMAGES_ENDPOINT, "?articleId=").concat(articleId, "&version=").concat(version), {
36
+ }), _axios.default.get("".concat(process.env.REACT_APP_ARTICLE_DATA_DESCRIPTION_ENDPOINT, "?idCategory=").concat(categoryId, "&articleId=").concat(articleId, "&version=").concat(version), {
37
+ headers: {
38
+ Authorization: Authorization
39
+ }
40
+ }), _axios.default.post("".concat(process.env.REACT_APP_ARTICLE_DATA_IMAGES_ENDPOINT, "?articleId=").concat(articleId, "&version=").concat(version), {
37
41
  category: category
42
+ }, {
43
+ headers: {
44
+ Authorization: Authorization
45
+ }
38
46
  })]);
39
47
 
40
48
  case 3:
41
49
  responseArray = _context.sent;
50
+ console.log(responseArray[0]);
42
51
  datasheets = JSON.parse(responseArray[0].data.body).data;
43
52
  descriptions = JSON.parse(responseArray[1].data.body).data;
44
53
  images = JSON.parse(responseArray[2].data.body).data;
@@ -52,17 +61,17 @@ var getRetailerServices = /*#__PURE__*/function () {
52
61
  });
53
62
  return _context.abrupt("return", [datasheets, descriptions, images]);
54
63
 
55
- case 11:
56
- _context.prev = 11;
64
+ case 12:
65
+ _context.prev = 12;
57
66
  _context.t0 = _context["catch"](0);
58
67
  console.log(_context.t0);
59
68
 
60
- case 14:
69
+ case 15:
61
70
  case "end":
62
71
  return _context.stop();
63
72
  }
64
73
  }
65
- }, _callee, null, [[0, 11]]);
74
+ }, _callee, null, [[0, 12]]);
66
75
  }));
67
76
 
68
77
  return function getRetailerServices(_x, _x2, _x3, _x4, _x5) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.4.55",
3
+ "version": "21.4.57",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -16,42 +16,120 @@ ProviderProductEditionDefault.args = {
16
16
  Imágenes: false,
17
17
  },
18
18
  token:
19
- "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJmNTkyN2Y4ZS1jYmY3LTQ5MjItOWUwOS1lNjllYzBiMjczMWEiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6ImY1OTI3ZjhlLWNiZjctNDkyMi05ZTA5LWU2OWVjMGIyNzMxYSIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiIyM2Q1NTlmYi1jMzIwLTRhMjItYjJmNy1lOThhYTFhZGEyNmYiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY4MzkyNjgyMSwibmFtZSI6IklzbWFlbCBMb3BleiIsInBob25lX251bWJlciI6Iis1MjMxMTEzNjYzMzYiLCJleHAiOjE2ODM5MzA0MjEsImlhdCI6MTY4MzkyNjgyMSwiZW1haWwiOiJpbG9wZXpAY29udGVudG9oLmNvbSJ9.TvCoaKoctj5mypXWMz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0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY5ODQzNTc3MCwibmFtZSI6IlJhZGlvc2NoYWNrIE9uYm9hcmRpbmciLCJwaG9uZV9udW1iZXIiOiIrNTIxMjM0NTY3ODk4IiwiZXhwIjoxNjk4NDM5MzcwLCJpYXQiOjE2OTg0MzU3NzAsImVtYWlsIjoicmFkaW9zaGFja2Ryb3BzaGlwQGFsbGZyZWVtYWlsLm5ldCJ9.oeUam133Gj8QbKe6NpRmItI1NK8sRW0mtlyJCu16syBaZk7-6NqsNhqWnYx7CNLMrtdBbTXSH1mSkzVY_J-S1OmceHtJg2Uo0iXQboRaiFOjZIKCDeFXOIgKIAFN1p_YVAvYXsNdwYwFqa4Jl1AozW4Ae4VwOWBQqpwb6vxmS_nASJpd0ZnwhHbcGkdoTsYJPDCahmMchK9lUtMjKu7bAkdkrgf8F18M94VfcSAiBEFo8EebcyV0BRtrEeoP44N-tJfZ_F_MriO3mGWi_EFGbhThp6DpLe0qlzOpIzmYtWzTHn-CiFA0ijhLqEfNjFuv__VEq3kD6Ef_1XXlnLj5aQ",
20
+ articleId: 39485,
21
+ category: 11,
22
+ version: 3,
23
23
  productSelected: {
24
- id_article:112668,
25
- upc:"137091",
26
- name:"Audifonos Bose",
27
- timestamp:"2023-10-14T01:12:45.000Z",
28
- categoryName:"Audio|Audífonos|In Ear",
29
- id_category:905,
30
- version:1,
31
- retailersAvailable:[
32
- {name:"Radioshack",
33
- id:74}
24
+ version: 1,
25
+ missing: {},
26
+ article: {
27
+ category: "Tecnología|Accesorios Computadora|Mouse",
28
+ company_name: "Radioshack",
29
+ company_id: 950,
30
+ id_category: "904",
31
+ id_article: 118438,
32
+ name: "Mouse Gamer",
33
+ upc: "3434",
34
+ },
35
+ asignations: [],
36
+ retailers: [
37
+ {
38
+ id: 74,
39
+ name: "Radioshack",
40
+ country: "México",
41
+ id_region: 1,
42
+ active: 1,
43
+ flow: 1,
44
+ },
45
+ ],
46
+ percentage: "100",
47
+ retailersAvailable: [
48
+ {
49
+ id: 74,
50
+ name: "Radioshack",
51
+ country: "México",
52
+ id_region: 1,
53
+ active: 1,
54
+ flow: 1,
55
+ },
56
+ ],
57
+ upc: "3434",
58
+ name: "Mouse Gamer",
59
+ categoryName: "Tecnología|Accesorios Computadora|Mouse",
60
+ id_category: "904",
61
+ id_article: 118438,
62
+ services: [
63
+ {
64
+ id_article: 118438,
65
+ service: "datasheet",
66
+ quantity: 1,
67
+ price: 0,
68
+ id_user: 349,
69
+ datasheet_common: null,
70
+ discount: null,
71
+ },
34
72
  ],
35
- percentage:"33"
36
73
  },
37
74
  productToEdit: {
38
- idCategory:905,
39
- ArticleId:112668,
40
- product:[{
41
- id_article:112668,
42
- upc:"137091",
43
- name:"Audifonos Bose",
44
- timestamp:"2023-10-14T01:12:45.000Z",
45
- categoryName:"Audio|Audífonos|In Ear",
46
- id_category:905,
47
- version:1,
48
- retailersAvailable:[
49
- {name:"Radioshack",
50
- id:74,
51
- percentage:33}
75
+ idCategory: "904",
76
+ ArticleId: 118438,
77
+ product: [
78
+ {
79
+ version: 1,
80
+ missing: {},
81
+ article: {
82
+ category: "Tecnología|Accesorios Computadora|Mouse",
83
+ company_name: "Radioshack",
84
+ company_id: 950,
85
+ id_category: "904",
86
+ id_article: 118438,
87
+ name: "Mouse Gamer",
88
+ upc: "3434",
89
+ },
90
+ asignations: [],
91
+ retailers: [
92
+ {
93
+ id: 74,
94
+ name: "Radioshack",
95
+ country: "México",
96
+ id_region: 1,
97
+ active: 1,
98
+ flow: 1,
99
+ percentage: 100,
100
+ },
52
101
  ],
53
- percentage:"33"}]
54
- },
102
+ percentage: "100",
103
+ retailersAvailable: [
104
+ {
105
+ id: 74,
106
+ name: "Radioshack",
107
+ country: "México",
108
+ id_region: 1,
109
+ active: 1,
110
+ flow: 1,
111
+ percentage: 100,
112
+ },
113
+ ],
114
+ upc: "3434",
115
+ name: "Mouse Gamer",
116
+ categoryName: "Tecnología|Accesorios Computadora|Mouse",
117
+ id_category: "904",
118
+ id_article: 118438,
119
+ services: [
120
+ {
121
+ id_article: 118438,
122
+ service: "datasheet",
123
+ quantity: 1,
124
+ price: 0,
125
+ id_user: 349,
126
+ datasheet_common: null,
127
+ discount: null,
128
+ },
129
+ ],
130
+ },
131
+ ],
132
+ },
55
133
  location: {
56
134
  pathname: "/EditProducts",
57
135
  search: "",
@@ -64,66 +142,66 @@ ProviderProductEditionDefault.args = {
64
142
  key: "24vwut",
65
143
  },
66
144
  user: {
67
- id_user:350,
68
- name:"Proveedor Uno",
69
- last_name:"Radioshack",
70
- email:"proveedorradioshackuno@allfreemail.net",
71
- position:"proveedor",
72
- telephone:"+521234567898",
73
- country:"México",
74
- id_company:950,
75
- id_cognito:"0f4247df-f02f-4cb8-909a-e62649d34782",
76
- birth_Date:null,
77
- about_me:null,
78
- zip_code:null,
79
- address:null,
80
- job:null,id_stripe:null,
81
- id_role:0,
82
- active:1,
83
- is_retailer:0,
84
- email_notify:1,
85
- is_user_tech:null,
86
- membership:{
87
- id:146,
88
- start_date:"2023-10-14T00:49:16.000Z",
89
- end_date:"2024-10-14T00:49:16.000Z",
90
- planID:8,
91
- plan:"prod_KtlhECVSFG2iro",
92
- name:"Plan Pro",
93
- user_limit:"50",
94
- products_limit:"5000",
95
- type:"Enterprise"},
96
- src:"https://content-management-profile.s3.amazonaws.com/id-350/350.png?1697569749878"
145
+ id_user: 349,
146
+ name: "Radioschack",
147
+ last_name: "Onboarding",
148
+ email: "radioshackdropship@allfreemail.net",
149
+ position: "KAM",
150
+ telephone: "+521234567898",
151
+ country: "México",
152
+ id_company: 949,
153
+ id_cognito: "1fac6667-a033-4560-9e9d-51400762b61f",
154
+ birth_Date: null,
155
+ about_me: null,
156
+ zip_code: null,
157
+ address: null,
158
+ job: null,
159
+ id_stripe: null,
160
+ id_role: 0,
161
+ active: 1,
162
+ is_retailer: 1,
163
+ email_notify: 1,
164
+ is_user_tech: null,
165
+ membership: {
166
+ id: 145,
167
+ start_date: "2023-10-14T00:06:44.000Z",
168
+ end_date: "2024-10-14T00:06:44.000Z",
169
+ planID: 8,
170
+ plan: "prod_KtlhECVSFG2iro",
171
+ name: "Plan Pro",
172
+ user_limit: "50",
173
+ products_limit: "5000",
174
+ type: "Enterprise",
97
175
  },
176
+ src: "https://content-management-profile.s3.amazonaws.com/id-349/349.png?1698435772702",
177
+ },
98
178
  company: {
99
- id_company:950,
100
- trade_name:"Radioshack",
101
- company_name:"Radioshack",
102
- rfc:"ASDASD",
103
- adress:"CDMX",
104
- about_company:null,
105
- telephone:null,
106
- web_site:null,
107
- zip_code:null,
108
- email:null,
109
- social_link:null,
110
- is_retailer:0,
111
- financedRetailers:[
112
- {id:74,
113
- name:"Radioshack",
114
- country:"México",
115
- id_region:1,
116
- active:1,
117
- flow:1}
179
+ id_company: 949,
180
+ trade_name: "Radioshack",
181
+ company_name: "Radioshack",
182
+ rfc: "ASDAS",
183
+ adress: "CDMX",
184
+ about_company: null,
185
+ telephone: null,
186
+ web_site: null,
187
+ zip_code: null,
188
+ email: null,
189
+ social_link: null,
190
+ is_retailer: 1,
191
+ financedRetailers: [
192
+ {
193
+ id: 74,
194
+ name: "Radioshack",
195
+ country: "México",
196
+ },
118
197
  ],
119
- retailers:[
120
- {id:74,
121
- name:"Radioshack",
122
- country:"México",
123
- id_region:1,
124
- active:1,
125
- flow:1}
126
- ]},
198
+ retailers: [
199
+ {
200
+ id: 74,
201
+ name: "Radioshack",
202
+ country: "México",
203
+ },
204
+ ],
205
+ },
127
206
  showSurvey: (v) => v && alert("se muestra"),
128
207
  };
129
-
@@ -1201,8 +1201,6 @@ export const ProviderProductEdition = ({
1201
1201
 
1202
1202
  const enableActions = (versionStatus) => {
1203
1203
  try {
1204
- if (user.is_retailer) return false;
1205
-
1206
1204
  if (versionStatus) {
1207
1205
  return ["AP", "ACA", "RCA", null].includes(versionStatus);
1208
1206
  }
@@ -242,7 +242,8 @@ export const RetailerProductEdition = ({
242
242
  product?.article?.id_article,
243
243
  product?.article?.category,
244
244
  parseInt(product?.article?.id_category),
245
- auditableVersion.version
245
+ auditableVersion.version,
246
+ token
246
247
  );
247
248
  getInputsData(
248
249
  auditServices,
@@ -271,7 +272,8 @@ export const RetailerProductEdition = ({
271
272
  product?.article?.id_article,
272
273
  product?.article?.category,
273
274
  parseInt(product?.article?.id_category),
274
- version
275
+ version,
276
+ token
275
277
  );
276
278
  if (auditableVersion) {
277
279
  loadAuditableData();
@@ -7,32 +7,27 @@ export const getRetailerServices = async (
7
7
  category,
8
8
  categoryId,
9
9
  version,
10
- token
10
+ Authorization
11
11
  ) => {
12
12
  try {
13
13
  const responseArray = await Promise.all([
14
14
  axios.post(
15
15
  `${process.env.REACT_APP_ARTICLE_DATA_DATASHEET_ENDPOINT}?idCategory=${categoryId}&articleId=${articleId}&version=${version}`,
16
- {
17
-
18
- },
19
- {
20
- headers: {
21
- Authorization: token,
22
- },
23
- }
16
+ {},
17
+ { headers: { Authorization } }
24
18
  ),
25
19
  axios.get(
26
- `${process.env.REACT_APP_ARTICLE_DATA_DESCRIPTION_ENDPOINT}?idCategory=${categoryId}&articleId=${articleId}&version=${version}`
20
+ `${process.env.REACT_APP_ARTICLE_DATA_DESCRIPTION_ENDPOINT}?idCategory=${categoryId}&articleId=${articleId}&version=${version}`,
21
+ { headers: { Authorization } }
27
22
  ),
28
23
  axios.post(
29
24
  `${process.env.REACT_APP_ARTICLE_DATA_IMAGES_ENDPOINT}?articleId=${articleId}&version=${version}`,
30
- {
31
- category,
32
- }
25
+ { category },
26
+ { headers: { Authorization } }
33
27
  ),
34
28
  ]);
35
29
 
30
+ console.log(responseArray[0]);
36
31
  const datasheets = JSON.parse(responseArray[0].data.body).data;
37
32
  const descriptions = JSON.parse(responseArray[1].data.body).data;
38
33
  const images = JSON.parse(responseArray[2].data.body).data;