contentoh-components-library 21.0.98 → 21.1.1
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/dist/components/atoms/GeneralInput/index.js +13 -7
- package/dist/components/atoms/GenericModal/styles.js +1 -1
- package/dist/components/atoms/InputFormatter/index.js +23 -20
- package/dist/components/atoms/InputFormatter/styles.js +1 -1
- package/dist/components/molecules/LoginPasswordStrength/index.js +8 -13
- package/dist/components/molecules/TagAndInput/index.js +7 -3
- package/dist/components/organisms/FullProductNameHeader/index.js +1 -1
- package/dist/components/pages/ChangePasswordLogin/index.js +12 -35
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +115 -61
- package/dist/components/pages/ProviderProductEdition/index.js +9 -16
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +41 -53
- package/dist/components/pages/RetailerProductEdition/index.js +56 -31
- package/package.json +1 -1
- package/src/components/atoms/GeneralInput/index.js +15 -6
- package/src/components/atoms/GenericModal/styles.js +1 -1
- package/src/components/atoms/InputFormatter/index.js +18 -16
- package/src/components/atoms/InputFormatter/styles.js +1 -0
- package/src/components/molecules/LoginPasswordStrength/index.js +6 -16
- package/src/components/molecules/TagAndInput/index.js +8 -1
- package/src/components/organisms/FullProductNameHeader/index.js +5 -1
- package/src/components/pages/ChangePasswordLogin/index.js +1 -2
- 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 +41 -55
- package/src/components/pages/RetailerProductEdition/index.js +51 -10
|
@@ -16,102 +16,170 @@ ProviderProductEditionDefault.args = {
|
|
|
16
16
|
Imágenes: false,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNT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_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.eyJzdWIiOiJjOTRhNzMwNS05MzY1LTQ2ZmYtYTQyMy00YjRiYzNiOGIxODAiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpb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22
|
version: 2,
|
|
@@ -26,92 +26,78 @@ RetailerProductEditionDefault.args = {
|
|
|
26
26
|
descriptions: 1,
|
|
27
27
|
images: 1,
|
|
28
28
|
},
|
|
29
|
-
orderId:
|
|
30
|
-
status: "
|
|
31
|
-
datasheet_status:
|
|
29
|
+
orderId: 27,
|
|
30
|
+
status: "RC",
|
|
31
|
+
datasheet_status: "AC",
|
|
32
32
|
prio: "none",
|
|
33
|
-
version:
|
|
34
|
-
description_status:
|
|
35
|
-
images_status:
|
|
33
|
+
version: 2,
|
|
34
|
+
description_status: "RC",
|
|
35
|
+
images_status: "AC",
|
|
36
36
|
article: {
|
|
37
|
-
id_article:
|
|
38
|
-
id_category: "
|
|
39
|
-
name: "
|
|
40
|
-
upc: "
|
|
41
|
-
timestamp: "2022-06-
|
|
42
|
-
id_user:
|
|
37
|
+
id_article: 55099,
|
|
38
|
+
id_category: "2004",
|
|
39
|
+
name: "Producto de prueba 1 THD",
|
|
40
|
+
upc: "SKU1235THD",
|
|
41
|
+
timestamp: "2022-06-17T23:41:20.000Z",
|
|
42
|
+
id_user: 102,
|
|
43
43
|
status: "NULL",
|
|
44
44
|
active: 1,
|
|
45
|
-
company_id:
|
|
46
|
-
company_name: "
|
|
45
|
+
company_id: 833,
|
|
46
|
+
company_name: "THD Proveedor",
|
|
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: 27,
|
|
49
|
+
id_datasheet_especialist: 36,
|
|
50
|
+
id_datasheet_facilitator: 52,
|
|
51
|
+
id_description_especialist: 36,
|
|
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: "
|
|
58
|
-
missingAttributes:
|
|
59
|
-
missingDescriptions:
|
|
60
|
-
missingImages:
|
|
57
|
+
category: "BAÑOS|ACCESORIOS PARA BAÑO|ACCESORIOS INDIVIDUALES",
|
|
58
|
+
missingAttributes: null,
|
|
59
|
+
missingDescriptions: null,
|
|
60
|
+
missingImages: null,
|
|
61
61
|
},
|
|
62
62
|
retailers: [
|
|
63
63
|
{
|
|
64
|
-
id:
|
|
65
|
-
name: "
|
|
64
|
+
id: 58,
|
|
65
|
+
name: "The Home Depot Golden",
|
|
66
66
|
country: "México",
|
|
67
67
|
id_region: 1,
|
|
68
68
|
active: 1,
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
|
-
id:
|
|
72
|
-
name: "
|
|
71
|
+
id: 59,
|
|
72
|
+
name: "The Home Depot Platinum",
|
|
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: "SKU1235THD",
|
|
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?1655598361036",
|
|
129
115
|
},
|
|
130
116
|
};
|
|
@@ -30,6 +30,7 @@ import { ScreenHeader } from "../../atoms/ScreenHeader";
|
|
|
30
30
|
import { Loading } from "../../atoms/Loading";
|
|
31
31
|
import succes from "../../../assets/images/genericModal/genericModalCheck.svg";
|
|
32
32
|
import { getNewStatus } from "../../../global-files/data";
|
|
33
|
+
import errorModal from "../../../assets/images/genericModal/errorModal.svg";
|
|
33
34
|
|
|
34
35
|
const reducerImages = (state, action) => {
|
|
35
36
|
let { values, attrForImgs } = state;
|
|
@@ -238,8 +239,12 @@ export const RetailerProductEdition = ({
|
|
|
238
239
|
// getPercentage({ data: [product] }).then((res) =>
|
|
239
240
|
// setPercentages(res)
|
|
240
241
|
// );
|
|
241
|
-
setActiveRetailer(
|
|
242
|
-
|
|
242
|
+
setActiveRetailer((current) =>
|
|
243
|
+
current.id
|
|
244
|
+
? current
|
|
245
|
+
: product.retailers
|
|
246
|
+
? product.retailers[0]
|
|
247
|
+
: product.retailersAvailable[0]
|
|
243
248
|
);
|
|
244
249
|
getComments();
|
|
245
250
|
setUserGroups(await fetchUsers(token));
|
|
@@ -567,11 +572,15 @@ export const RetailerProductEdition = ({
|
|
|
567
572
|
product[`${getConcept(tab)}_status`] === "QF" ||
|
|
568
573
|
product[`${getConcept(tab)}_status`] === "IN_PROGRESS";
|
|
569
574
|
|
|
575
|
+
const auditorUnvalidated = !["RA", "AA"].includes(
|
|
576
|
+
product[`${getConcept(tab)}_status`]
|
|
577
|
+
);
|
|
578
|
+
|
|
570
579
|
switch (userId) {
|
|
571
580
|
case 7:
|
|
572
581
|
case 8:
|
|
573
582
|
return (
|
|
574
|
-
(["RA", "RF"].includes(product?.status) &&
|
|
583
|
+
(["RA", "RF"].includes(product?.status) && //"IN_PROGRESS", "RF", "RA"
|
|
575
584
|
statusArray.includes(srvActive?.status)) ||
|
|
576
585
|
(statusArray.includes(product.status) &&
|
|
577
586
|
srv.filter((serv) => statusArray.includes(serv.status)).length ===
|
|
@@ -581,14 +590,17 @@ export const RetailerProductEdition = ({
|
|
|
581
590
|
case 5:
|
|
582
591
|
return (
|
|
583
592
|
unvalidated &&
|
|
584
|
-
["IN_PROGRESS", "QF"].includes(product.status) &&
|
|
593
|
+
["IN_PROGRESS", "QF"].includes(product.status) && //"RF", "AF", "AA", "AP", "AC
|
|
585
594
|
srv.filter((serv) => statusArray.includes(serv.status)).length ===
|
|
586
595
|
srv.length
|
|
587
596
|
);
|
|
588
597
|
case 6:
|
|
589
598
|
return (
|
|
590
|
-
statusArray.includes(product.status) &&
|
|
591
|
-
servicesData.every((serv) =>
|
|
599
|
+
statusArray.includes(product.status) && //RP, RC, AF
|
|
600
|
+
servicesData.every((serv) =>
|
|
601
|
+
["RA", "AA", "AP", "AC"].includes(serv.status)
|
|
602
|
+
) &&
|
|
603
|
+
auditorUnvalidated
|
|
592
604
|
);
|
|
593
605
|
default:
|
|
594
606
|
break;
|
|
@@ -666,7 +678,7 @@ export const RetailerProductEdition = ({
|
|
|
666
678
|
Authorization: token,
|
|
667
679
|
},
|
|
668
680
|
});
|
|
669
|
-
getServices();
|
|
681
|
+
//getServices();
|
|
670
682
|
} else {
|
|
671
683
|
const specialistDone =
|
|
672
684
|
evalStatus === "RF" ||
|
|
@@ -729,8 +741,8 @@ export const RetailerProductEdition = ({
|
|
|
729
741
|
Authorization: token,
|
|
730
742
|
},
|
|
731
743
|
});
|
|
732
|
-
getServices();
|
|
733
744
|
}
|
|
745
|
+
loadData();
|
|
734
746
|
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
735
747
|
setProduct(productTemp);
|
|
736
748
|
} catch (error) {
|
|
@@ -1166,7 +1178,36 @@ export const RetailerProductEdition = ({
|
|
|
1166
1178
|
sendToFacilitator("A");
|
|
1167
1179
|
}}
|
|
1168
1180
|
reject={() => {
|
|
1169
|
-
sendToFacilitator("R");
|
|
1181
|
+
//sendToFacilitator("R");
|
|
1182
|
+
setMessage("Rechazado");
|
|
1183
|
+
setComponentsArray([
|
|
1184
|
+
<img src={errorModal} />,
|
|
1185
|
+
<ScreenHeader
|
|
1186
|
+
text={"Agrega tu comentarios para enviar el rechazo"}
|
|
1187
|
+
headerType={"input-name-header"}
|
|
1188
|
+
color={"white"}
|
|
1189
|
+
/>,
|
|
1190
|
+
<TagAndInput
|
|
1191
|
+
label={"Caja de Comentario"}
|
|
1192
|
+
inputType={"textarea"}
|
|
1193
|
+
inputId={"modal-commentary-box"}
|
|
1194
|
+
index={0}
|
|
1195
|
+
color={"white"}
|
|
1196
|
+
/>,
|
|
1197
|
+
<Button
|
|
1198
|
+
buttonType={"general-default-button"}
|
|
1199
|
+
label={"Enviar comentario"}
|
|
1200
|
+
onClick={(e) =>
|
|
1201
|
+
createComment(
|
|
1202
|
+
e,
|
|
1203
|
+
document.querySelector(
|
|
1204
|
+
"#modal-commentary-box .ql-container .ql-editor > p"
|
|
1205
|
+
).innerHTML,
|
|
1206
|
+
activeTab
|
|
1207
|
+
)
|
|
1208
|
+
}
|
|
1209
|
+
/>,
|
|
1210
|
+
]);
|
|
1170
1211
|
}}
|
|
1171
1212
|
showValidationButtons={
|
|
1172
1213
|
approveRejectButtons() && (auditorAssigned() || userAssigned())
|
|
@@ -1300,7 +1341,7 @@ export const RetailerProductEdition = ({
|
|
|
1300
1341
|
createComment(
|
|
1301
1342
|
e,
|
|
1302
1343
|
document.querySelector(
|
|
1303
|
-
"#
|
|
1344
|
+
"#commentary-box .ql-container .ql-editor > p"
|
|
1304
1345
|
).innerHTML,
|
|
1305
1346
|
activeTab
|
|
1306
1347
|
)
|