contentoh-components-library 21.0.98 → 21.0.99
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.
- package/package.json +1 -1
- package/src/components/organisms/FullProductNameHeader/index.js +5 -1
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +130 -62
- package/src/components/pages/ProviderProductEdition/index.js +9 -11
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +35 -49
- package/src/components/pages/RetailerProductEdition/index.js +14 -5
package/package.json
CHANGED
|
@@ -34,7 +34,11 @@ export const FullProductNameHeader = ({
|
|
|
34
34
|
<Container>
|
|
35
35
|
<ProductNameHeader
|
|
36
36
|
productName={headerData?.article?.name || headerData?.name}
|
|
37
|
-
statusType={
|
|
37
|
+
statusType={
|
|
38
|
+
headerData?.version_status ||
|
|
39
|
+
headerData?.status ||
|
|
40
|
+
headerData?.article_status
|
|
41
|
+
}
|
|
38
42
|
percent={percent?.toFixed(0)}
|
|
39
43
|
priority={headerData?.prio}
|
|
40
44
|
date={new Date(
|
|
@@ -16,102 +16,170 @@ ProviderProductEditionDefault.args = {
|
|
|
16
16
|
Imágenes: false,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
19
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI1ODg0YWUzNC01OWQ2LTQ0NTQtYjk4ZS04MjE1MThiY2MzYTciLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6IjU4ODRhZTM0LTU5ZDYtNDQ1NC1iOThlLTgyMTUxOGJjYzNhNyIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJhOTZjN2YxMi0wYjI5LTRkMzctOWMxOS1mMDAzMWFiMGY2N2EiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY1NTQ5MjkzNiwibmFtZSI6IkNhZGVuYSBJc21hZWwiLCJwaG9uZV9udW1iZXIiOiIrNTIzMTExMzY2MzM2IiwiZXhwIjoxNjU1NDk2NTM2LCJpYXQiOjE2NTU0OTI5MzYsImVtYWlsIjoiY2FkZW5hLmlzbWFlbEBhbGxmcmVlbWFpbC5uZXQifQ.Rg3hxEzGy4pSDcG-q5lXRZWBoBiXQQKCdpRtAChvQuGM5GaQySgBW0YUEIXcLuwMbWSzj3RWJ4ZTY8NZvUhYIRbGqnIhB82FP41YCcYF7BYDilr4pZzeqEjx6U4_jR4HtbmkFfscyg0Q1VINNHTj1b0n1xLNMiE6rM7hY3eWFFhyvXn5OIH_5fZaHjYRe2uBDnF6Ogx1Za2z8DzyKkR2-QjVo4l-f64Egc5EfYWm6_3gZ1gkRGLxa7HfQXNUs0ds7Ifkx4QYHggUQdkrNdmGeYGxqZFYgG5a4LWZ-17E6x5yL87LhH-oErepE6xe6oyy-DnHaf7rWnRPqxSuilW5lQ",
|
|
20
20
|
articleId: 238,
|
|
21
21
|
category: 846,
|
|
22
22
|
version: 2,
|
|
23
23
|
productSelected: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
categoryName: "ILUMINACIÓN|FOCOS|LEDS",
|
|
31
|
-
asignations: [],
|
|
24
|
+
orderId: 14,
|
|
25
|
+
article_status: "AP",
|
|
26
|
+
datasheet_status: "AC",
|
|
27
|
+
description_status: "AC",
|
|
28
|
+
images_status: "AP",
|
|
29
|
+
prio: "none",
|
|
32
30
|
version: 2,
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
brand: null,
|
|
32
|
+
article: {
|
|
33
|
+
category: "ILUMINACIÓN|FOCOS|LEDS",
|
|
34
|
+
company_name: "COMPANY DEV",
|
|
35
|
+
country: "México",
|
|
36
|
+
id_category: "2146",
|
|
37
|
+
id_article: 35705,
|
|
38
|
+
name: "FOCO LED A19 (60W) LUZ AMARILLA",
|
|
39
|
+
upc: "12087311111",
|
|
40
|
+
},
|
|
41
|
+
retailers: [
|
|
35
42
|
{
|
|
36
43
|
id: 58,
|
|
37
44
|
name: "The Home Depot Golden",
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: 59,
|
|
48
|
+
name: "The Home Depot Platinum",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: 60,
|
|
52
|
+
name: "The Home Depot Resizing",
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: 61,
|
|
56
|
+
name: "Home Depot TAB",
|
|
41
57
|
},
|
|
42
58
|
],
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
59
|
+
services: {
|
|
60
|
+
datasheets: 1,
|
|
61
|
+
descriptions: 1,
|
|
62
|
+
images: 1,
|
|
47
63
|
},
|
|
64
|
+
id_article: 35705,
|
|
65
|
+
retailersAvailable: [
|
|
66
|
+
{
|
|
67
|
+
id: 58,
|
|
68
|
+
name: "The Home Depot Golden",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: 59,
|
|
72
|
+
name: "The Home Depot Platinum",
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: 60,
|
|
76
|
+
name: "The Home Depot Resizing",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: 61,
|
|
80
|
+
name: "Home Depot TAB",
|
|
81
|
+
},
|
|
82
|
+
],
|
|
48
83
|
},
|
|
49
84
|
productToEdit: {
|
|
85
|
+
ArticleId: 35705,
|
|
50
86
|
idCategory: "2146",
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
87
|
+
product: {
|
|
88
|
+
orderId: 14,
|
|
89
|
+
article_status: "AP",
|
|
90
|
+
datasheet_status: "AC",
|
|
91
|
+
description_status: "AC",
|
|
92
|
+
images_status: "AP",
|
|
93
|
+
prio: "none",
|
|
94
|
+
version: 2,
|
|
95
|
+
brand: null,
|
|
96
|
+
article: {
|
|
97
|
+
category: "ILUMINACIÓN|FOCOS|LEDS",
|
|
98
|
+
company_name: "COMPANY DEV",
|
|
99
|
+
country: "México",
|
|
55
100
|
id_category: "2146",
|
|
101
|
+
id_article: 35705,
|
|
56
102
|
name: "FOCO LED A19 (60W) LUZ AMARILLA",
|
|
57
|
-
upc: "
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
name: "The Home Depot Golden",
|
|
68
|
-
country: "México",
|
|
69
|
-
id_region: 1,
|
|
70
|
-
active: 1,
|
|
71
|
-
},
|
|
72
|
-
],
|
|
73
|
-
missing: {
|
|
74
|
-
datasheet: 33,
|
|
75
|
-
description: 0,
|
|
76
|
-
image: 23,
|
|
103
|
+
upc: "12087311111",
|
|
104
|
+
},
|
|
105
|
+
retailers: [
|
|
106
|
+
{
|
|
107
|
+
id: 58,
|
|
108
|
+
name: "The Home Depot Golden",
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: 59,
|
|
112
|
+
name: "The Home Depot Platinum",
|
|
77
113
|
},
|
|
114
|
+
{
|
|
115
|
+
id: 60,
|
|
116
|
+
name: "The Home Depot Resizing",
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
id: 61,
|
|
120
|
+
name: "Home Depot TAB",
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
services: {
|
|
124
|
+
datasheets: 1,
|
|
125
|
+
descriptions: 1,
|
|
126
|
+
images: 1,
|
|
78
127
|
},
|
|
79
|
-
|
|
128
|
+
id_article: 35705,
|
|
129
|
+
retailersAvailable: [
|
|
130
|
+
{
|
|
131
|
+
id: 58,
|
|
132
|
+
name: "The Home Depot Golden",
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: 59,
|
|
136
|
+
name: "The Home Depot Platinum",
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
id: 60,
|
|
140
|
+
name: "The Home Depot Resizing",
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
id: 61,
|
|
144
|
+
name: "Home Depot TAB",
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
},
|
|
80
148
|
},
|
|
81
149
|
location: {
|
|
82
150
|
product: { articleId: 109485, versionId: 3 },
|
|
83
|
-
state: { origin: "
|
|
151
|
+
state: { origin: "Contentoh" },
|
|
84
152
|
},
|
|
85
153
|
user: {
|
|
86
|
-
id_user:
|
|
87
|
-
name: "
|
|
88
|
-
last_name: "
|
|
89
|
-
email: "
|
|
90
|
-
position: "
|
|
154
|
+
id_user: 59,
|
|
155
|
+
name: "The Home",
|
|
156
|
+
last_name: "Depot",
|
|
157
|
+
email: "cadena.ismael@allfreemail.net",
|
|
158
|
+
position: "Admin",
|
|
91
159
|
telephone: "+523111366336",
|
|
92
160
|
country: "México",
|
|
93
|
-
id_company:
|
|
94
|
-
id_cognito: "
|
|
161
|
+
id_company: 7,
|
|
162
|
+
id_cognito: "5884ae34-59d6-4454-b98e-821518bcc3a7",
|
|
95
163
|
birth_Date: null,
|
|
96
164
|
about_me: null,
|
|
97
165
|
zip_code: null,
|
|
98
166
|
address: null,
|
|
99
167
|
job: null,
|
|
100
|
-
id_stripe: "
|
|
168
|
+
id_stripe: "",
|
|
101
169
|
id_role: 0,
|
|
102
170
|
active: 1,
|
|
103
|
-
is_retailer:
|
|
171
|
+
is_retailer: 1,
|
|
104
172
|
membership: {
|
|
105
|
-
id:
|
|
106
|
-
start_date: "
|
|
107
|
-
end_date: "
|
|
108
|
-
planID:
|
|
109
|
-
plan: "
|
|
110
|
-
name: "Plan
|
|
111
|
-
user_limit: "
|
|
112
|
-
products_limit: "
|
|
173
|
+
id: 24,
|
|
174
|
+
start_date: "2021-11-23T03:35:50.000Z",
|
|
175
|
+
end_date: "2022-11-23T03:35:50.000Z",
|
|
176
|
+
planID: 9,
|
|
177
|
+
plan: "prod_KtlkzZVGq6bRTO",
|
|
178
|
+
name: "Plan Enterprise Full",
|
|
179
|
+
user_limit: "30",
|
|
180
|
+
products_limit: "10000",
|
|
113
181
|
type: "Enterprise",
|
|
114
182
|
},
|
|
115
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
183
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-59/59.png?1655492937526",
|
|
116
184
|
},
|
|
117
185
|
};
|
|
@@ -215,6 +215,7 @@ export const ProviderProductEdition = ({
|
|
|
215
215
|
|
|
216
216
|
//Converts the data inside the datasheets object to array
|
|
217
217
|
setServices(services);
|
|
218
|
+
getServices();
|
|
218
219
|
|
|
219
220
|
//setActiveRetailer(product?.retailers[0]);
|
|
220
221
|
setImages({
|
|
@@ -223,10 +224,6 @@ export const ProviderProductEdition = ({
|
|
|
223
224
|
});
|
|
224
225
|
if (services[2]?.values?.length > 0) setActiveImage(0);
|
|
225
226
|
|
|
226
|
-
setActiveRetailer(
|
|
227
|
-
product.retailers ? product.retailers[0] : product.retailersAvailable[0]
|
|
228
|
-
);
|
|
229
|
-
|
|
230
227
|
getPercentage({ data: [product] }).then((res) => setPercentages(res));
|
|
231
228
|
setLoading(false);
|
|
232
229
|
};
|
|
@@ -301,11 +298,13 @@ export const ProviderProductEdition = ({
|
|
|
301
298
|
|
|
302
299
|
useEffect(async () => {
|
|
303
300
|
loadData();
|
|
301
|
+
setActiveRetailer(
|
|
302
|
+
product.retailers ? product.retailers[0] : product.retailersAvailable[0]
|
|
303
|
+
);
|
|
304
304
|
// getPercentage({ data: [product] }).then((res) =>
|
|
305
305
|
// setPercentages(res)
|
|
306
306
|
// );
|
|
307
307
|
getCart();
|
|
308
|
-
getServices();
|
|
309
308
|
setUserGroups(await fetchUsers(token));
|
|
310
309
|
let arr = [];
|
|
311
310
|
switch (user.id_role) {
|
|
@@ -1175,6 +1174,7 @@ export const ProviderProductEdition = ({
|
|
|
1175
1174
|
sessionStorage.setItem("productEdit", JSON.stringify(prod));
|
|
1176
1175
|
setProduct(prod);
|
|
1177
1176
|
setShowGenericModal && setShowGenericModal(false);
|
|
1177
|
+
loadData();
|
|
1178
1178
|
};
|
|
1179
1179
|
|
|
1180
1180
|
const getSectionStatus = () => {
|
|
@@ -1447,9 +1447,7 @@ export const ProviderProductEdition = ({
|
|
|
1447
1447
|
onClick={() => {
|
|
1448
1448
|
//setModalSent(true);
|
|
1449
1449
|
sendEvaluation();
|
|
1450
|
-
setMessage(
|
|
1451
|
-
`¡Evaluación de ${translateConcept()} completada!`
|
|
1452
|
-
);
|
|
1450
|
+
setMessage(`¡Evaluación de ${activeTab} completada!`);
|
|
1453
1451
|
}}
|
|
1454
1452
|
/>
|
|
1455
1453
|
</div>
|
|
@@ -1464,10 +1462,10 @@ export const ProviderProductEdition = ({
|
|
|
1464
1462
|
</div>
|
|
1465
1463
|
{inCart ? (
|
|
1466
1464
|
<button type="button">
|
|
1467
|
-
<Link to="/checkout">
|
|
1465
|
+
{/* <Link to="/checkout">
|
|
1468
1466
|
<p>Articulo en carrito</p>
|
|
1469
1467
|
<p>Ir a checkout</p>
|
|
1470
|
-
</Link>
|
|
1468
|
+
</Link> */}
|
|
1471
1469
|
</button>
|
|
1472
1470
|
) : (
|
|
1473
1471
|
<Button
|
|
@@ -1486,7 +1484,7 @@ export const ProviderProductEdition = ({
|
|
|
1486
1484
|
{showModal && (
|
|
1487
1485
|
<ProductImageModal images={images} setShowModal={setShowModal} />
|
|
1488
1486
|
)}
|
|
1489
|
-
{message.length > 0 && (
|
|
1487
|
+
{message.length > 0 && !showSurvey && (
|
|
1490
1488
|
<GenericModal
|
|
1491
1489
|
buttonType={componentsArray.length > 0 && "delete-product"}
|
|
1492
1490
|
componentsArray={
|
|
@@ -16,7 +16,7 @@ RetailerProductEditionDefault.args = {
|
|
|
16
16
|
Imágenes: false,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
19
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJjOTRhNzMwNS05MzY1LTQ2ZmYtYTQyMy00YjRiYzNiOGIxODAiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjp0cnVlLCJjb2duaXRvOnVzZXJuYW1lIjoiYzk0YTczMDUtOTM2NS00NmZmLWE0MjMtNGI0YmMzYjhiMTgwIiwiY29nbml0bzpyb2xlcyI6WyJhcm46YXdzOmlhbTo6ODk4NjcwMjMyODA3OnJvbGVcL2NvbnRlbnRvaC1kZXYtdXMtZWFzdC0xLWxhbWJkYVJvbGUiXSwiYXVkIjoiNWFjOHRwZ3M2Z2JzcTEzZnJ2cnBpZWVwNDAiLCJldmVudF9pZCI6IjZlYzkzZDk4LTU3Y2YtNDdhMS05MTBhLTk1ZWIxNjdhYjhjNyIsInRva2VuX3VzZSI6ImlkIiwiYXV0aF90aW1lIjoxNjU1NTAyMDg3LCJuYW1lIjoiQ29sYWJvcmFkb3IiLCJwaG9uZV9udW1iZXIiOiIrNTIxMTExIiwiZXhwIjoxNjU1NTA1Njg3LCJpYXQiOjE2NTU1MDIwODcsImVtYWlsIjoic2FsbWVyb24uNUBob3RtYWlsLmNvbSJ9.fxgw--POlE3fFg2QWJaSD6tWZB9je4bR-rX5MJGOSRH9dc2WvDROjS1x_bT41M-wx9q-_U2xcFTAIff76zd-PYFYuYD29pJzTNl3c8xpQYcg4LwCvsBueRN9-_qxDcGzdSwdzxVbbk8guGdu4FA9ll-nruVIJ5QWnt8yNkWKRfn_bDLWHuQ2fPHsvVScwdn4Q60wERB6GFy6xLuQtRD5zWOBMu-_gLIfvbTm-eEJu-pkB5WtBDQki-UY1yi3bIjk9mNVSM4cdEFA7_84zKWL1O2eUUCOVC7Cn2NXQ0OEgphYmSftTU7nVN_xvl8JSUXdqRpSpkCYka849zCL5OJV7Q",
|
|
20
20
|
articleId: 238,
|
|
21
21
|
category: 846,
|
|
22
22
|
version: 2,
|
|
@@ -26,18 +26,18 @@ RetailerProductEditionDefault.args = {
|
|
|
26
26
|
descriptions: 1,
|
|
27
27
|
images: 1,
|
|
28
28
|
},
|
|
29
|
-
orderId:
|
|
30
|
-
status: "
|
|
31
|
-
datasheet_status:
|
|
29
|
+
orderId: 1,
|
|
30
|
+
status: "AF",
|
|
31
|
+
datasheet_status: "AF",
|
|
32
32
|
prio: "none",
|
|
33
|
-
version:
|
|
34
|
-
description_status:
|
|
35
|
-
images_status:
|
|
33
|
+
version: 2,
|
|
34
|
+
description_status: "AF",
|
|
35
|
+
images_status: "AF",
|
|
36
36
|
article: {
|
|
37
|
-
id_article:
|
|
38
|
-
id_category: "
|
|
39
|
-
name: "
|
|
40
|
-
upc: "
|
|
37
|
+
id_article: 33250,
|
|
38
|
+
id_category: "689",
|
|
39
|
+
name: "crema antiarrugas",
|
|
40
|
+
upc: "2512651",
|
|
41
41
|
timestamp: "2022-06-14T14:52:51.000Z",
|
|
42
42
|
id_user: 28,
|
|
43
43
|
status: "NULL",
|
|
@@ -45,19 +45,19 @@ RetailerProductEditionDefault.args = {
|
|
|
45
45
|
company_id: 1,
|
|
46
46
|
company_name: "COMPANY DEV",
|
|
47
47
|
country: "México",
|
|
48
|
-
id_order:
|
|
49
|
-
id_datasheet_especialist:
|
|
50
|
-
id_datasheet_facilitator:
|
|
51
|
-
id_description_especialist:
|
|
52
|
-
id_description_facilitator:
|
|
53
|
-
id_images_especialist:
|
|
54
|
-
id_images_facilitator:
|
|
55
|
-
id_auditor:
|
|
48
|
+
id_order: 1,
|
|
49
|
+
id_datasheet_especialist: 54,
|
|
50
|
+
id_datasheet_facilitator: 52,
|
|
51
|
+
id_description_especialist: 54,
|
|
52
|
+
id_description_facilitator: 52,
|
|
53
|
+
id_images_especialist: 55,
|
|
54
|
+
id_images_facilitator: 53,
|
|
55
|
+
id_auditor: 30,
|
|
56
56
|
id_recepcionist: null,
|
|
57
|
-
category: "SALUD Y BELLEZA|CUIDADO
|
|
58
|
-
missingAttributes:
|
|
59
|
-
missingDescriptions:
|
|
60
|
-
missingImages:
|
|
57
|
+
category: "SALUD Y BELLEZA|CUIDADO CORPORAL|CREMAS FAMILIARES",
|
|
58
|
+
missingAttributes: null,
|
|
59
|
+
missingDescriptions: null,
|
|
60
|
+
missingImages: null,
|
|
61
61
|
},
|
|
62
62
|
retailers: [
|
|
63
63
|
{
|
|
@@ -68,50 +68,36 @@ RetailerProductEditionDefault.args = {
|
|
|
68
68
|
active: 1,
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
|
-
id:
|
|
72
|
-
name: "
|
|
71
|
+
id: 26,
|
|
72
|
+
name: "Mercado Libre",
|
|
73
73
|
country: "México",
|
|
74
74
|
id_region: 1,
|
|
75
75
|
active: 1,
|
|
76
76
|
},
|
|
77
|
-
{
|
|
78
|
-
id: 1013,
|
|
79
|
-
name: "Cencosud Colombia",
|
|
80
|
-
country: "Colombia",
|
|
81
|
-
id_region: 2,
|
|
82
|
-
active: 1,
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
id: 2005,
|
|
86
|
-
name: "ClubCo",
|
|
87
|
-
country: "Costa Rica",
|
|
88
|
-
id_region: 3,
|
|
89
|
-
active: 1,
|
|
90
|
-
},
|
|
91
77
|
],
|
|
92
78
|
country: "México",
|
|
93
|
-
upc: "
|
|
79
|
+
upc: "2512651",
|
|
94
80
|
},
|
|
95
81
|
location: {
|
|
96
82
|
product: { articleId: 109485, versionId: 3 },
|
|
97
83
|
},
|
|
98
84
|
user: {
|
|
99
|
-
id_user:
|
|
100
|
-
name: "
|
|
101
|
-
last_name: "",
|
|
102
|
-
email: "
|
|
103
|
-
position:
|
|
85
|
+
id_user: 30,
|
|
86
|
+
name: "Admin",
|
|
87
|
+
last_name: "Ulises",
|
|
88
|
+
email: "salmeron.5@hotmail.com",
|
|
89
|
+
position: "Admin",
|
|
104
90
|
telephone: null,
|
|
105
|
-
country:
|
|
91
|
+
country: "México",
|
|
106
92
|
id_company: 2,
|
|
107
|
-
id_cognito: "
|
|
93
|
+
id_cognito: "c94a7305-9365-46ff-a423-4b4bc3b8b180",
|
|
108
94
|
birth_Date: null,
|
|
109
95
|
about_me: null,
|
|
110
96
|
zip_code: null,
|
|
111
97
|
address: null,
|
|
112
98
|
job: null,
|
|
113
99
|
id_stripe: null,
|
|
114
|
-
id_role:
|
|
100
|
+
id_role: 6,
|
|
115
101
|
active: 1,
|
|
116
102
|
is_retailer: 0,
|
|
117
103
|
membership: {
|
|
@@ -125,6 +111,6 @@ RetailerProductEditionDefault.args = {
|
|
|
125
111
|
products_limit: "3",
|
|
126
112
|
type: "PyMES",
|
|
127
113
|
},
|
|
128
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
114
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-30/30.png?1655502088129",
|
|
129
115
|
},
|
|
130
116
|
};
|
|
@@ -238,8 +238,12 @@ export const RetailerProductEdition = ({
|
|
|
238
238
|
// getPercentage({ data: [product] }).then((res) =>
|
|
239
239
|
// setPercentages(res)
|
|
240
240
|
// );
|
|
241
|
-
setActiveRetailer(
|
|
242
|
-
|
|
241
|
+
setActiveRetailer((current) =>
|
|
242
|
+
current.id
|
|
243
|
+
? current
|
|
244
|
+
: product.retailers
|
|
245
|
+
? product.retailers[0]
|
|
246
|
+
: product.retailersAvailable[0]
|
|
243
247
|
);
|
|
244
248
|
getComments();
|
|
245
249
|
setUserGroups(await fetchUsers(token));
|
|
@@ -567,6 +571,10 @@ export const RetailerProductEdition = ({
|
|
|
567
571
|
product[`${getConcept(tab)}_status`] === "QF" ||
|
|
568
572
|
product[`${getConcept(tab)}_status`] === "IN_PROGRESS";
|
|
569
573
|
|
|
574
|
+
const auditorUnvalidated = !["RA", "AA"].includes(
|
|
575
|
+
product[`${getConcept(tab)}_status`]
|
|
576
|
+
);
|
|
577
|
+
|
|
570
578
|
switch (userId) {
|
|
571
579
|
case 7:
|
|
572
580
|
case 8:
|
|
@@ -588,7 +596,8 @@ export const RetailerProductEdition = ({
|
|
|
588
596
|
case 6:
|
|
589
597
|
return (
|
|
590
598
|
statusArray.includes(product.status) &&
|
|
591
|
-
servicesData.every((serv) => ["RA", "AA"].includes(serv.status))
|
|
599
|
+
servicesData.every((serv) => ["RA", "AA"].includes(serv.status)) &&
|
|
600
|
+
auditorUnvalidated
|
|
592
601
|
);
|
|
593
602
|
default:
|
|
594
603
|
break;
|
|
@@ -666,7 +675,7 @@ export const RetailerProductEdition = ({
|
|
|
666
675
|
Authorization: token,
|
|
667
676
|
},
|
|
668
677
|
});
|
|
669
|
-
getServices();
|
|
678
|
+
//getServices();
|
|
670
679
|
} else {
|
|
671
680
|
const specialistDone =
|
|
672
681
|
evalStatus === "RF" ||
|
|
@@ -729,8 +738,8 @@ export const RetailerProductEdition = ({
|
|
|
729
738
|
Authorization: token,
|
|
730
739
|
},
|
|
731
740
|
});
|
|
732
|
-
getServices();
|
|
733
741
|
}
|
|
742
|
+
loadData();
|
|
734
743
|
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
735
744
|
setProduct(productTemp);
|
|
736
745
|
} catch (error) {
|