contentoh-components-library 21.1.7 → 21.1.10
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/pages/ProviderProductEdition/ProviderProductEdition.stories.js +25 -25
- package/dist/components/pages/ProviderProductEdition/index.js +26 -18
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +40 -34
- package/dist/components/pages/RetailerProductEdition/index.js +47 -35
- package/package.json +1 -1
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +27 -25
- package/src/components/pages/ProviderProductEdition/index.js +14 -6
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +41 -34
- package/src/components/pages/RetailerProductEdition/index.js +17 -9
|
@@ -31,27 +31,27 @@ ProviderProductEditionDefault.args = {
|
|
|
31
31
|
"Ficha técnica": false,
|
|
32
32
|
Imágenes: false
|
|
33
33
|
},
|
|
34
|
-
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
34
|
+
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI1ODg0YWUzNC01OWQ2LTQ0NTQtYjk4ZS04MjE1MThiY2MzYTciLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6IjU4ODRhZTM0LTU5ZDYtNDQ1NC1iOThlLTgyMTUxOGJjYzNhNyIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJlNWNjOGY4OC1hYzBiLTQ5ZmItOGI1Yi0wNzg4YjJmMjFjMzAiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY1NTY3OTEwMSwibmFtZSI6IkNhZGVuYSBJc21hZWwiLCJwaG9uZV9udW1iZXIiOiIrNTIzMTExMzY2MzM2IiwiZXhwIjoxNjU1NjgyNzAxLCJpYXQiOjE2NTU2NzkxMDEsImVtYWlsIjoiY2FkZW5hLmlzbWFlbEBhbGxmcmVlbWFpbC5uZXQifQ.ClYmqRpXDdrP1ooOpmBalaD5GJ50Pi2xHz1hxEHYIEdVcQo1OC10DRQmwiENx9D3HO1tS_hxuGY5tbaKhceiF_ECQHqAhSkFM1JHL17bh_DLiroPGAQ0N5A9oxyBztV_pDyIzr4_qyzNBmor0mbO-7UpJnP4Zij4aSLhxDeXB0m-LkPH_CMVGGPDKHk9nZdWyiDCDJgOZqAd0iEzYEP8gjFxWC3n-Wpbi-p84oImUpCByU2eaDzasbtZ4e6NTOWPgxfG6-SKDUof0A3rbz6gYn8390NC0I88g-J6_o0jJu7rBk9OTvTOpQ8PMC48t1hVIIn5pysxNZpR54Hwr7abXw",
|
|
35
35
|
articleId: 238,
|
|
36
36
|
category: 846,
|
|
37
37
|
version: 2,
|
|
38
38
|
productSelected: {
|
|
39
|
-
orderId:
|
|
39
|
+
orderId: 60,
|
|
40
40
|
article_status: "AP",
|
|
41
|
-
datasheet_status: "
|
|
42
|
-
description_status: "
|
|
43
|
-
images_status: "
|
|
41
|
+
datasheet_status: "AA",
|
|
42
|
+
description_status: "AA",
|
|
43
|
+
images_status: "NS",
|
|
44
44
|
prio: "none",
|
|
45
45
|
version: 2,
|
|
46
46
|
brand: null,
|
|
47
47
|
article: {
|
|
48
|
-
category: "
|
|
48
|
+
category: "ORGANIZADORES Y CLOSETS|MUEBLES DE ORGANIZACIÓN|CARRITOS Y CAJONES",
|
|
49
49
|
company_name: "THD Proveedor",
|
|
50
50
|
country: "México",
|
|
51
|
-
id_category: "
|
|
52
|
-
id_article:
|
|
53
|
-
name: "
|
|
54
|
-
upc: "
|
|
51
|
+
id_category: "2275",
|
|
52
|
+
id_article: 55126,
|
|
53
|
+
name: "ESCRITORIO PLEGABLE CAFÉ",
|
|
54
|
+
upc: "159786"
|
|
55
55
|
},
|
|
56
56
|
retailers: [{
|
|
57
57
|
id: 58,
|
|
@@ -69,9 +69,9 @@ ProviderProductEditionDefault.args = {
|
|
|
69
69
|
services: {
|
|
70
70
|
datasheets: 1,
|
|
71
71
|
descriptions: 1,
|
|
72
|
-
images:
|
|
72
|
+
images: 0
|
|
73
73
|
},
|
|
74
|
-
id_article:
|
|
74
|
+
id_article: 55126,
|
|
75
75
|
retailersAvailable: [{
|
|
76
76
|
id: 58,
|
|
77
77
|
name: "The Home Depot Golden"
|
|
@@ -87,25 +87,25 @@ ProviderProductEditionDefault.args = {
|
|
|
87
87
|
}]
|
|
88
88
|
},
|
|
89
89
|
productToEdit: {
|
|
90
|
-
ArticleId:
|
|
91
|
-
idCategory: "
|
|
90
|
+
ArticleId: 55126,
|
|
91
|
+
idCategory: "2275",
|
|
92
92
|
product: {
|
|
93
|
-
orderId:
|
|
93
|
+
orderId: 60,
|
|
94
94
|
article_status: "AP",
|
|
95
|
-
datasheet_status: "
|
|
96
|
-
description_status: "
|
|
97
|
-
images_status: "
|
|
95
|
+
datasheet_status: "AA",
|
|
96
|
+
description_status: "AA",
|
|
97
|
+
images_status: "NS",
|
|
98
98
|
prio: "none",
|
|
99
99
|
version: 2,
|
|
100
100
|
brand: null,
|
|
101
101
|
article: {
|
|
102
|
-
category: "
|
|
102
|
+
category: "ORGANIZADORES Y CLOSETS|MUEBLES DE ORGANIZACIÓN|CARRITOS Y CAJONES",
|
|
103
103
|
company_name: "THD Proveedor",
|
|
104
104
|
country: "México",
|
|
105
|
-
id_category: "
|
|
106
|
-
id_article:
|
|
107
|
-
name: "
|
|
108
|
-
upc: "
|
|
105
|
+
id_category: "2275",
|
|
106
|
+
id_article: 55126,
|
|
107
|
+
name: "ESCRITORIO PLEGABLE CAFÉ",
|
|
108
|
+
upc: "159786"
|
|
109
109
|
},
|
|
110
110
|
retailers: [{
|
|
111
111
|
id: 58,
|
|
@@ -123,9 +123,9 @@ ProviderProductEditionDefault.args = {
|
|
|
123
123
|
services: {
|
|
124
124
|
datasheets: 1,
|
|
125
125
|
descriptions: 1,
|
|
126
|
-
images:
|
|
126
|
+
images: 0
|
|
127
127
|
},
|
|
128
|
-
id_article:
|
|
128
|
+
id_article: 55126,
|
|
129
129
|
retailersAvailable: [{
|
|
130
130
|
id: 58,
|
|
131
131
|
name: "The Home Depot Golden"
|
|
@@ -616,49 +616,56 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
616
616
|
}();
|
|
617
617
|
|
|
618
618
|
(0, _react.useEffect)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
619
|
-
var arr;
|
|
619
|
+
var retailers, active, arr;
|
|
620
620
|
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
621
621
|
while (1) {
|
|
622
622
|
switch (_context5.prev = _context5.next) {
|
|
623
623
|
case 0:
|
|
624
|
+
sessionStorage.setItem("user", JSON.stringify(user));
|
|
624
625
|
loadData();
|
|
625
|
-
|
|
626
|
+
retailers = product.retailers || product.retailersAvailable;
|
|
627
|
+
active = retailers === null || retailers === void 0 ? void 0 : retailers.filter(function (retailer) {
|
|
628
|
+
return servicesData === null || servicesData === void 0 ? void 0 : servicesData.map(function (srv) {
|
|
629
|
+
return srv.id_retailer;
|
|
630
|
+
}).includes(retailer.id);
|
|
631
|
+
})[0];
|
|
632
|
+
setActiveRetailer(active ? active : retailers[0]); // getPercentage({ data: [product] }).then((res) =>
|
|
626
633
|
// setPercentages(res)
|
|
627
634
|
// );
|
|
628
635
|
|
|
629
636
|
getCart();
|
|
630
637
|
_context5.t0 = setUserGroups;
|
|
631
|
-
_context5.next =
|
|
638
|
+
_context5.next = 9;
|
|
632
639
|
return (0, _data2.fetchUsers)(token);
|
|
633
640
|
|
|
634
|
-
case
|
|
641
|
+
case 9:
|
|
635
642
|
_context5.t1 = _context5.sent;
|
|
636
643
|
(0, _context5.t0)(_context5.t1);
|
|
637
644
|
arr = [];
|
|
638
645
|
_context5.t2 = user.id_role;
|
|
639
|
-
_context5.next = _context5.t2 === 7 ?
|
|
646
|
+
_context5.next = _context5.t2 === 7 ? 15 : _context5.t2 === 8 ? 15 : _context5.t2 === 4 ? 17 : _context5.t2 === 5 ? 17 : _context5.t2 === 6 ? 19 : 21;
|
|
640
647
|
break;
|
|
641
648
|
|
|
642
|
-
case
|
|
649
|
+
case 15:
|
|
643
650
|
arr = ["IN_PROGRESS", "RF", "RA"];
|
|
644
|
-
return _context5.abrupt("break",
|
|
651
|
+
return _context5.abrupt("break", 23);
|
|
645
652
|
|
|
646
|
-
case
|
|
653
|
+
case 17:
|
|
647
654
|
arr = ["RF", "AF", "AA", "AP", "AC"];
|
|
648
|
-
return _context5.abrupt("break",
|
|
655
|
+
return _context5.abrupt("break", 23);
|
|
649
656
|
|
|
650
|
-
case
|
|
657
|
+
case 19:
|
|
651
658
|
arr = ["RP", "RC", "AF"];
|
|
652
|
-
return _context5.abrupt("break",
|
|
659
|
+
return _context5.abrupt("break", 23);
|
|
653
660
|
|
|
654
|
-
case
|
|
661
|
+
case 21:
|
|
655
662
|
arr = [];
|
|
656
|
-
return _context5.abrupt("break",
|
|
663
|
+
return _context5.abrupt("break", 23);
|
|
657
664
|
|
|
658
|
-
case
|
|
665
|
+
case 23:
|
|
659
666
|
setStatusArray(arr);
|
|
660
667
|
|
|
661
|
-
case
|
|
668
|
+
case 24:
|
|
662
669
|
case "end":
|
|
663
670
|
return _context5.stop();
|
|
664
671
|
}
|
|
@@ -1447,12 +1454,12 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1447
1454
|
|
|
1448
1455
|
if (["RequestWithContentoh", "RequestWithoutContentoh"].includes(origin[tab])) {
|
|
1449
1456
|
serv = serv.filter(function (f) {
|
|
1450
|
-
return f.id_retailer ===
|
|
1457
|
+
return f.id_retailer === activeRetailer.id;
|
|
1451
1458
|
});
|
|
1452
1459
|
}
|
|
1453
1460
|
|
|
1454
|
-
var statusArray = user.is_retailer ? ["AC", "RC"] : ["AP", "RP", "AC"];
|
|
1455
|
-
return serv.every(function (item) {
|
|
1461
|
+
var statusArray = user.is_retailer === 1 ? ["AC", "RC"] : ["AP", "RP", "AC"];
|
|
1462
|
+
return serv.length > 0 && serv.every(function (item) {
|
|
1456
1463
|
return statusArray.includes(item.status);
|
|
1457
1464
|
});
|
|
1458
1465
|
};
|
|
@@ -1762,6 +1769,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1762
1769
|
activeRetailer: activeRetailer,
|
|
1763
1770
|
setActiveRetailer: setActiveRetailer,
|
|
1764
1771
|
showValidationButtons: isRevision() && getSectionStatus(),
|
|
1772
|
+
servicesData: servicesData ? servicesData : null,
|
|
1765
1773
|
approve: function approve() {
|
|
1766
1774
|
if (origin[activeTab] === "RequestWithoutContentoh" && !user.is_retailer && (!product.id_order || !product.orderId)) {
|
|
1767
1775
|
setDataGenericModal(function (prev) {
|
|
@@ -31,45 +31,45 @@ RetailerProductEditionDefault.args = {
|
|
|
31
31
|
"Ficha técnica": false,
|
|
32
32
|
Imágenes: false
|
|
33
33
|
},
|
|
34
|
-
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
34
|
+
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI3MTNhNzQ1Ny1mOTQzLTRiYzktOGViMC04NmI0MWY1YmQ0ZjgiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6IjcxM2E3NDU3LWY5NDMtNGJjOS04ZWIwLTg2YjQxZjViZDRmOCIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiI4NjQwM2FlZC03Y2I3LTQ4MjgtYmNhOS05NGY1OWRkYjFhMTAiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY1NTY4MDY2MiwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY1NTY4NDI2MiwiaWF0IjoxNjU1NjgwNjYyLCJlbWFpbCI6ImhjYXJyaWxsb0Bjb250ZW50b2guY29tIn0.WL09DLe9etfQEhxSL7D1fdgjF_tO3PxyUraxU3cZ9QHS0lYxiG_0tKReYAwNOHZWag-5IAu2WNPZEtbc4FK_nHyrz3qof4LTTHeRii2WybzUYtRCVZmAZ7omjM2vB-kr_V9Hk8wGK0ylm8eQuwvtpGFnIjmpCpdRbUjwFRJefEon1TGW1QshpzsovcI5Tvr1AASno6wuZTwTnX68OTPIJ947wj0u_Hicx9YwjQAqAwOyadiSQ-J3dkHPaDFGU41c4BT2ggSG5HOjmopX5jBxaVBLQsC0yM-0w1rqG9R93s1SmeanluvQH0NXVbofqnixjnt8r-dd9or_y4gy8hpZsg",
|
|
35
35
|
articleId: 238,
|
|
36
36
|
category: 846,
|
|
37
37
|
version: 2,
|
|
38
38
|
productSelected: {
|
|
39
39
|
services: {
|
|
40
|
-
datasheets:
|
|
41
|
-
descriptions:
|
|
40
|
+
datasheets: 0,
|
|
41
|
+
descriptions: 0,
|
|
42
42
|
images: 1
|
|
43
43
|
},
|
|
44
|
-
orderId:
|
|
45
|
-
status: "
|
|
46
|
-
datasheet_status: "
|
|
44
|
+
orderId: 72,
|
|
45
|
+
status: "ASSIGNED",
|
|
46
|
+
datasheet_status: "NS",
|
|
47
47
|
prio: "none",
|
|
48
|
-
version:
|
|
49
|
-
description_status: "
|
|
50
|
-
images_status: "
|
|
48
|
+
version: 14,
|
|
49
|
+
description_status: "NS",
|
|
50
|
+
images_status: "IN_PROGRESS",
|
|
51
51
|
article: {
|
|
52
|
-
id_article:
|
|
53
|
-
id_category: "
|
|
54
|
-
name: "
|
|
55
|
-
upc: "
|
|
56
|
-
timestamp: "2022-06-
|
|
57
|
-
id_user:
|
|
52
|
+
id_article: 55109,
|
|
53
|
+
id_category: "2999",
|
|
54
|
+
name: "Resize Ismael",
|
|
55
|
+
upc: "ResizeIsmael",
|
|
56
|
+
timestamp: "2022-06-18T03:32:56.000Z",
|
|
57
|
+
id_user: 110,
|
|
58
58
|
status: "NULL",
|
|
59
59
|
active: 1,
|
|
60
|
-
company_id:
|
|
61
|
-
company_name: "THD Proveedor",
|
|
62
|
-
country:
|
|
63
|
-
id_order:
|
|
64
|
-
id_datasheet_especialist:
|
|
60
|
+
company_id: 834,
|
|
61
|
+
company_name: "THD Resize Proveedor",
|
|
62
|
+
country: null,
|
|
63
|
+
id_order: 72,
|
|
64
|
+
id_datasheet_especialist: 54,
|
|
65
65
|
id_datasheet_facilitator: 52,
|
|
66
|
-
id_description_especialist:
|
|
66
|
+
id_description_especialist: 54,
|
|
67
67
|
id_description_facilitator: 52,
|
|
68
68
|
id_images_especialist: 55,
|
|
69
69
|
id_images_facilitator: 53,
|
|
70
|
-
id_auditor:
|
|
70
|
+
id_auditor: null,
|
|
71
71
|
id_recepcionist: null,
|
|
72
|
-
category: "
|
|
72
|
+
category: "RESIZING|RESIZING|RESIZING",
|
|
73
73
|
missingAttributes: null,
|
|
74
74
|
missingDescriptions: null,
|
|
75
75
|
missingImages: null
|
|
@@ -86,9 +86,15 @@ RetailerProductEditionDefault.args = {
|
|
|
86
86
|
country: "México",
|
|
87
87
|
id_region: 1,
|
|
88
88
|
active: 1
|
|
89
|
+
}, {
|
|
90
|
+
id: 60,
|
|
91
|
+
name: "The Home Depot Resizing",
|
|
92
|
+
country: "México",
|
|
93
|
+
id_region: 1,
|
|
94
|
+
active: 1
|
|
89
95
|
}],
|
|
90
|
-
country:
|
|
91
|
-
upc: "
|
|
96
|
+
country: null,
|
|
97
|
+
upc: "ResizeIsmael"
|
|
92
98
|
},
|
|
93
99
|
location: {
|
|
94
100
|
product: {
|
|
@@ -97,22 +103,22 @@ RetailerProductEditionDefault.args = {
|
|
|
97
103
|
}
|
|
98
104
|
},
|
|
99
105
|
user: {
|
|
100
|
-
id_user:
|
|
101
|
-
name: "
|
|
102
|
-
last_name: "
|
|
103
|
-
email: "
|
|
104
|
-
position:
|
|
106
|
+
id_user: 55,
|
|
107
|
+
name: "ESPECIALISTA ED PRUEBA",
|
|
108
|
+
last_name: "",
|
|
109
|
+
email: "hcarrillo@contentoh.com",
|
|
110
|
+
position: null,
|
|
105
111
|
telephone: null,
|
|
106
|
-
country:
|
|
112
|
+
country: null,
|
|
107
113
|
id_company: 2,
|
|
108
|
-
id_cognito: "
|
|
114
|
+
id_cognito: "713a7457-f943-4bc9-8eb0-86b41f5bd4f8",
|
|
109
115
|
birth_Date: null,
|
|
110
116
|
about_me: null,
|
|
111
117
|
zip_code: null,
|
|
112
118
|
address: null,
|
|
113
119
|
job: null,
|
|
114
120
|
id_stripe: null,
|
|
115
|
-
id_role:
|
|
121
|
+
id_role: 8,
|
|
116
122
|
active: 1,
|
|
117
123
|
is_retailer: 0,
|
|
118
124
|
membership: {
|
|
@@ -126,6 +132,6 @@ RetailerProductEditionDefault.args = {
|
|
|
126
132
|
products_limit: "3",
|
|
127
133
|
type: "PyMES"
|
|
128
134
|
},
|
|
129
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
135
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-55/55.png?1655680663244"
|
|
130
136
|
}
|
|
131
137
|
};
|
|
@@ -542,7 +542,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
542
542
|
return _context4.abrupt("break", 20);
|
|
543
543
|
|
|
544
544
|
case 16:
|
|
545
|
-
arr = ["RP", "RC", "AF"];
|
|
545
|
+
arr = ["RP", "RC", "AF", "RA"];
|
|
546
546
|
return _context4.abrupt("break", 20);
|
|
547
547
|
|
|
548
548
|
case 18:
|
|
@@ -801,7 +801,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
801
801
|
var updateImages = (0, _react.useCallback)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
|
802
802
|
var _images$values2, _product$article10, _data$articleData, _data$articleData2, _data$updateImages;
|
|
803
803
|
|
|
804
|
-
var imagesList, imagesListTemp, duplicated, attrForImgs, data, valid, _data$updateImages2, _data$articleData3, _data$articleData4, _data$articleData5, promiseArray;
|
|
804
|
+
var imagesList, imagesListTemp, duplicated, attrForImgs, data, valid, _data$updateImages2, _data$articleData3, _data$articleData4, _data$articleData5, promiseArray, productTemp;
|
|
805
805
|
|
|
806
806
|
return _regenerator.default.wrap(function _callee7$(_context7) {
|
|
807
807
|
while (1) {
|
|
@@ -854,7 +854,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
854
854
|
}
|
|
855
855
|
|
|
856
856
|
if (!(valid && (duplicated === null || duplicated === void 0 ? void 0 : duplicated.length) === 0)) {
|
|
857
|
-
_context7.next =
|
|
857
|
+
_context7.next = 33;
|
|
858
858
|
break;
|
|
859
859
|
}
|
|
860
860
|
|
|
@@ -894,28 +894,36 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
894
894
|
setImagesUploaded(true);
|
|
895
895
|
|
|
896
896
|
case 24:
|
|
897
|
-
|
|
897
|
+
productTemp = product;
|
|
898
|
+
|
|
899
|
+
if (productTemp.status === "ASSIGNED") {
|
|
900
|
+
productTemp.status = "IN_PROGRESS";
|
|
901
|
+
setProduct(productTemp);
|
|
902
|
+
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
_context7.next = 31;
|
|
898
906
|
break;
|
|
899
907
|
|
|
900
|
-
case
|
|
901
|
-
_context7.prev =
|
|
908
|
+
case 28:
|
|
909
|
+
_context7.prev = 28;
|
|
902
910
|
_context7.t0 = _context7["catch"](11);
|
|
903
911
|
console.log(_context7.t0); // setMainLoading(false);
|
|
904
912
|
|
|
905
|
-
case
|
|
906
|
-
_context7.next =
|
|
913
|
+
case 31:
|
|
914
|
+
_context7.next = 34;
|
|
907
915
|
break;
|
|
908
916
|
|
|
909
|
-
case
|
|
917
|
+
case 33:
|
|
910
918
|
// setMainLoading(false);
|
|
911
919
|
setMessage("Completa los campos que solicita cada una de la imágenes o hay imágenes con el mismo tipo de toma.\nRecuerda hay campos obligatorios y no podras avanzar si no estan completos.");
|
|
912
920
|
|
|
913
|
-
case
|
|
921
|
+
case 34:
|
|
914
922
|
case "end":
|
|
915
923
|
return _context7.stop();
|
|
916
924
|
}
|
|
917
925
|
}
|
|
918
|
-
}, _callee7, null, [[11,
|
|
926
|
+
}, _callee7, null, [[11, 28]]);
|
|
919
927
|
})), [images, imagesUploaded]);
|
|
920
928
|
(0, _react.useEffect)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
|
|
921
929
|
return _regenerator.default.wrap(function _callee8$(_context8) {
|
|
@@ -975,7 +983,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
975
983
|
srvActive = _srv$filter2[0];
|
|
976
984
|
|
|
977
985
|
var unvalidated = product["".concat(getConcept(tab), "_status")] === "QF" || product["".concat(getConcept(tab), "_status")] === "IN_PROGRESS";
|
|
978
|
-
var auditorUnvalidated = !["RA", "AA"].includes(product["".concat(getConcept(tab), "_status")]);
|
|
986
|
+
var auditorUnvalidated = !["RA", "AA", "AC", "AP"].includes(product["".concat(getConcept(tab), "_status")]);
|
|
979
987
|
|
|
980
988
|
switch (userId) {
|
|
981
989
|
case 7:
|
|
@@ -993,8 +1001,8 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
993
1001
|
}).length === srv.length;
|
|
994
1002
|
|
|
995
1003
|
case 6:
|
|
996
|
-
return statusArray.includes(product.status) && //RP, RC, AF
|
|
997
|
-
|
|
1004
|
+
return statusArray.includes(product.status) && //RP, RC, AF, RA true
|
|
1005
|
+
srv.every(function (serv) {
|
|
998
1006
|
return ["RA", "AA", "AP", "AC"].includes(serv.status);
|
|
999
1007
|
}) && auditorUnvalidated;
|
|
1000
1008
|
|
|
@@ -1063,11 +1071,10 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1063
1071
|
data = {};
|
|
1064
1072
|
|
|
1065
1073
|
if (!result) {
|
|
1066
|
-
_context9.next =
|
|
1074
|
+
_context9.next = 13;
|
|
1067
1075
|
break;
|
|
1068
1076
|
}
|
|
1069
1077
|
|
|
1070
|
-
//updateCompaniesList(evalStatus, result, activeRetailer.id, concept);
|
|
1071
1078
|
data = {
|
|
1072
1079
|
articleId: product.article.id_article,
|
|
1073
1080
|
orderId: product.orderId,
|
|
@@ -1084,10 +1091,11 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1084
1091
|
});
|
|
1085
1092
|
|
|
1086
1093
|
case 10:
|
|
1087
|
-
|
|
1094
|
+
getServices();
|
|
1095
|
+
_context9.next = 31;
|
|
1088
1096
|
break;
|
|
1089
1097
|
|
|
1090
|
-
case
|
|
1098
|
+
case 13:
|
|
1091
1099
|
specialistDone = evalStatus === "RF" || evalStatus === "RA" || evalStatus === "IN_PROGRESS";
|
|
1092
1100
|
|
|
1093
1101
|
if (specialistDone) {
|
|
@@ -1122,49 +1130,49 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1122
1130
|
retailerId: activeRetailer.id
|
|
1123
1131
|
};
|
|
1124
1132
|
_context9.t0 = user.id_role;
|
|
1125
|
-
_context9.next = _context9.t0 === 7 ?
|
|
1133
|
+
_context9.next = _context9.t0 === 7 ? 24 : _context9.t0 === 8 ? 24 : _context9.t0 === 4 ? 26 : _context9.t0 === 5 ? 26 : 28;
|
|
1126
1134
|
break;
|
|
1127
1135
|
|
|
1128
|
-
case
|
|
1136
|
+
case 24:
|
|
1129
1137
|
data.especialist = true;
|
|
1130
|
-
return _context9.abrupt("break",
|
|
1138
|
+
return _context9.abrupt("break", 29);
|
|
1131
1139
|
|
|
1132
|
-
case
|
|
1140
|
+
case 26:
|
|
1133
1141
|
data.facilitator = true;
|
|
1134
|
-
return _context9.abrupt("break",
|
|
1135
|
-
|
|
1136
|
-
case 27:
|
|
1137
|
-
return _context9.abrupt("break", 28);
|
|
1142
|
+
return _context9.abrupt("break", 29);
|
|
1138
1143
|
|
|
1139
1144
|
case 28:
|
|
1140
|
-
_context9.
|
|
1145
|
+
return _context9.abrupt("break", 29);
|
|
1146
|
+
|
|
1147
|
+
case 29:
|
|
1148
|
+
_context9.next = 31;
|
|
1141
1149
|
return _axios.default.put("".concat(process.env.REACT_APP_SEND_EVAL), data, {
|
|
1142
1150
|
headers: {
|
|
1143
1151
|
Authorization: token
|
|
1144
1152
|
}
|
|
1145
1153
|
});
|
|
1146
1154
|
|
|
1147
|
-
case
|
|
1155
|
+
case 31:
|
|
1148
1156
|
loadData();
|
|
1149
1157
|
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
1150
1158
|
setProduct(productTemp);
|
|
1151
|
-
_context9.next =
|
|
1159
|
+
_context9.next = 39;
|
|
1152
1160
|
break;
|
|
1153
1161
|
|
|
1154
|
-
case
|
|
1155
|
-
_context9.prev =
|
|
1162
|
+
case 36:
|
|
1163
|
+
_context9.prev = 36;
|
|
1156
1164
|
_context9.t1 = _context9["catch"](1);
|
|
1157
1165
|
console.log(_context9.t1);
|
|
1158
1166
|
|
|
1159
|
-
case
|
|
1167
|
+
case 39:
|
|
1160
1168
|
setLoading(false);
|
|
1161
1169
|
|
|
1162
|
-
case
|
|
1170
|
+
case 40:
|
|
1163
1171
|
case "end":
|
|
1164
1172
|
return _context9.stop();
|
|
1165
1173
|
}
|
|
1166
1174
|
}
|
|
1167
|
-
}, _callee9, null, [[1,
|
|
1175
|
+
}, _callee9, null, [[1, 36]]);
|
|
1168
1176
|
}));
|
|
1169
1177
|
|
|
1170
1178
|
return function sendToFacilitator(_x) {
|
|
@@ -1244,6 +1252,10 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1244
1252
|
return getComments(tab);
|
|
1245
1253
|
|
|
1246
1254
|
case 15:
|
|
1255
|
+
setMessage("");
|
|
1256
|
+
setComponentsArray([]);
|
|
1257
|
+
|
|
1258
|
+
case 17:
|
|
1247
1259
|
case "end":
|
|
1248
1260
|
return _context10.stop();
|
|
1249
1261
|
}
|
|
@@ -1627,7 +1639,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1627
1639
|
sendToFacilitator("A");
|
|
1628
1640
|
},
|
|
1629
1641
|
reject: function reject() {
|
|
1630
|
-
|
|
1642
|
+
sendToFacilitator("R");
|
|
1631
1643
|
setMessage("Rechazado");
|
|
1632
1644
|
setComponentsArray([/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
1633
1645
|
src: _errorModal.default
|
package/package.json
CHANGED
|
@@ -16,27 +16,28 @@ ProviderProductEditionDefault.args = {
|
|
|
16
16
|
Imágenes: false,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
19
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI1ODg0YWUzNC01OWQ2LTQ0NTQtYjk4ZS04MjE1MThiY2MzYTciLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6IjU4ODRhZTM0LTU5ZDYtNDQ1NC1iOThlLTgyMTUxOGJjYzNhNyIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJlNWNjOGY4OC1hYzBiLTQ5ZmItOGI1Yi0wNzg4YjJmMjFjMzAiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY1NTY3OTEwMSwibmFtZSI6IkNhZGVuYSBJc21hZWwiLCJwaG9uZV9udW1iZXIiOiIrNTIzMTExMzY2MzM2IiwiZXhwIjoxNjU1NjgyNzAxLCJpYXQiOjE2NTU2NzkxMDEsImVtYWlsIjoiY2FkZW5hLmlzbWFlbEBhbGxmcmVlbWFpbC5uZXQifQ.ClYmqRpXDdrP1ooOpmBalaD5GJ50Pi2xHz1hxEHYIEdVcQo1OC10DRQmwiENx9D3HO1tS_hxuGY5tbaKhceiF_ECQHqAhSkFM1JHL17bh_DLiroPGAQ0N5A9oxyBztV_pDyIzr4_qyzNBmor0mbO-7UpJnP4Zij4aSLhxDeXB0m-LkPH_CMVGGPDKHk9nZdWyiDCDJgOZqAd0iEzYEP8gjFxWC3n-Wpbi-p84oImUpCByU2eaDzasbtZ4e6NTOWPgxfG6-SKDUof0A3rbz6gYn8390NC0I88g-J6_o0jJu7rBk9OTvTOpQ8PMC48t1hVIIn5pysxNZpR54Hwr7abXw",
|
|
20
20
|
articleId: 238,
|
|
21
21
|
category: 846,
|
|
22
22
|
version: 2,
|
|
23
23
|
productSelected: {
|
|
24
|
-
orderId:
|
|
24
|
+
orderId: 60,
|
|
25
25
|
article_status: "AP",
|
|
26
|
-
datasheet_status: "
|
|
27
|
-
description_status: "
|
|
28
|
-
images_status: "
|
|
26
|
+
datasheet_status: "AA",
|
|
27
|
+
description_status: "AA",
|
|
28
|
+
images_status: "NS",
|
|
29
29
|
prio: "none",
|
|
30
30
|
version: 2,
|
|
31
31
|
brand: null,
|
|
32
32
|
article: {
|
|
33
|
-
category:
|
|
33
|
+
category:
|
|
34
|
+
"ORGANIZADORES Y CLOSETS|MUEBLES DE ORGANIZACIÓN|CARRITOS Y CAJONES",
|
|
34
35
|
company_name: "THD Proveedor",
|
|
35
36
|
country: "México",
|
|
36
|
-
id_category: "
|
|
37
|
-
id_article:
|
|
38
|
-
name: "
|
|
39
|
-
upc: "
|
|
37
|
+
id_category: "2275",
|
|
38
|
+
id_article: 55126,
|
|
39
|
+
name: "ESCRITORIO PLEGABLE CAFÉ",
|
|
40
|
+
upc: "159786",
|
|
40
41
|
},
|
|
41
42
|
retailers: [
|
|
42
43
|
{
|
|
@@ -59,9 +60,9 @@ ProviderProductEditionDefault.args = {
|
|
|
59
60
|
services: {
|
|
60
61
|
datasheets: 1,
|
|
61
62
|
descriptions: 1,
|
|
62
|
-
images:
|
|
63
|
+
images: 0,
|
|
63
64
|
},
|
|
64
|
-
id_article:
|
|
65
|
+
id_article: 55126,
|
|
65
66
|
retailersAvailable: [
|
|
66
67
|
{
|
|
67
68
|
id: 58,
|
|
@@ -82,25 +83,26 @@ ProviderProductEditionDefault.args = {
|
|
|
82
83
|
],
|
|
83
84
|
},
|
|
84
85
|
productToEdit: {
|
|
85
|
-
ArticleId:
|
|
86
|
-
idCategory: "
|
|
86
|
+
ArticleId: 55126,
|
|
87
|
+
idCategory: "2275",
|
|
87
88
|
product: {
|
|
88
|
-
orderId:
|
|
89
|
+
orderId: 60,
|
|
89
90
|
article_status: "AP",
|
|
90
|
-
datasheet_status: "
|
|
91
|
-
description_status: "
|
|
92
|
-
images_status: "
|
|
91
|
+
datasheet_status: "AA",
|
|
92
|
+
description_status: "AA",
|
|
93
|
+
images_status: "NS",
|
|
93
94
|
prio: "none",
|
|
94
95
|
version: 2,
|
|
95
96
|
brand: null,
|
|
96
97
|
article: {
|
|
97
|
-
category:
|
|
98
|
+
category:
|
|
99
|
+
"ORGANIZADORES Y CLOSETS|MUEBLES DE ORGANIZACIÓN|CARRITOS Y CAJONES",
|
|
98
100
|
company_name: "THD Proveedor",
|
|
99
101
|
country: "México",
|
|
100
|
-
id_category: "
|
|
101
|
-
id_article:
|
|
102
|
-
name: "
|
|
103
|
-
upc: "
|
|
102
|
+
id_category: "2275",
|
|
103
|
+
id_article: 55126,
|
|
104
|
+
name: "ESCRITORIO PLEGABLE CAFÉ",
|
|
105
|
+
upc: "159786",
|
|
104
106
|
},
|
|
105
107
|
retailers: [
|
|
106
108
|
{
|
|
@@ -123,9 +125,9 @@ ProviderProductEditionDefault.args = {
|
|
|
123
125
|
services: {
|
|
124
126
|
datasheets: 1,
|
|
125
127
|
descriptions: 1,
|
|
126
|
-
images:
|
|
128
|
+
images: 0,
|
|
127
129
|
},
|
|
128
|
-
id_article:
|
|
130
|
+
id_article: 55126,
|
|
129
131
|
retailersAvailable: [
|
|
130
132
|
{
|
|
131
133
|
id: 58,
|
|
@@ -297,10 +297,14 @@ export const ProviderProductEdition = ({
|
|
|
297
297
|
};
|
|
298
298
|
|
|
299
299
|
useEffect(async () => {
|
|
300
|
+
sessionStorage.setItem("user", JSON.stringify(user));
|
|
300
301
|
loadData();
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
)
|
|
302
|
+
|
|
303
|
+
let retailers = product.retailers || product.retailersAvailable;
|
|
304
|
+
let active = retailers?.filter((retailer) =>
|
|
305
|
+
servicesData?.map((srv) => srv.id_retailer).includes(retailer.id)
|
|
306
|
+
)[0];
|
|
307
|
+
setActiveRetailer(active ? active : retailers[0]);
|
|
304
308
|
// getPercentage({ data: [product] }).then((res) =>
|
|
305
309
|
// setPercentages(res)
|
|
306
310
|
// );
|
|
@@ -948,10 +952,13 @@ export const ProviderProductEdition = ({
|
|
|
948
952
|
if (
|
|
949
953
|
["RequestWithContentoh", "RequestWithoutContentoh"].includes(origin[tab])
|
|
950
954
|
) {
|
|
951
|
-
serv = serv.filter((f) => f.id_retailer ===
|
|
955
|
+
serv = serv.filter((f) => f.id_retailer === activeRetailer.id);
|
|
952
956
|
}
|
|
953
|
-
const statusArray =
|
|
954
|
-
|
|
957
|
+
const statusArray =
|
|
958
|
+
user.is_retailer === 1 ? ["AC", "RC"] : ["AP", "RP", "AC"];
|
|
959
|
+
return (
|
|
960
|
+
serv.length > 0 && serv.every((item) => statusArray.includes(item.status))
|
|
961
|
+
);
|
|
955
962
|
};
|
|
956
963
|
|
|
957
964
|
const downloadImages = () => {
|
|
@@ -1223,6 +1230,7 @@ export const ProviderProductEdition = ({
|
|
|
1223
1230
|
activeRetailer={activeRetailer}
|
|
1224
1231
|
setActiveRetailer={setActiveRetailer}
|
|
1225
1232
|
showValidationButtons={isRevision() && getSectionStatus()}
|
|
1233
|
+
servicesData={servicesData ? servicesData : null}
|
|
1226
1234
|
approve={() => {
|
|
1227
1235
|
if (
|
|
1228
1236
|
origin[activeTab] === "RequestWithoutContentoh" &&
|
|
@@ -16,45 +16,45 @@ RetailerProductEditionDefault.args = {
|
|
|
16
16
|
Imágenes: false,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
19
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI3MTNhNzQ1Ny1mOTQzLTRiYzktOGViMC04NmI0MWY1YmQ0ZjgiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6IjcxM2E3NDU3LWY5NDMtNGJjOS04ZWIwLTg2YjQxZjViZDRmOCIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiI4NjQwM2FlZC03Y2I3LTQ4MjgtYmNhOS05NGY1OWRkYjFhMTAiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY1NTY4MDY2MiwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY1NTY4NDI2MiwiaWF0IjoxNjU1NjgwNjYyLCJlbWFpbCI6ImhjYXJyaWxsb0Bjb250ZW50b2guY29tIn0.WL09DLe9etfQEhxSL7D1fdgjF_tO3PxyUraxU3cZ9QHS0lYxiG_0tKReYAwNOHZWag-5IAu2WNPZEtbc4FK_nHyrz3qof4LTTHeRii2WybzUYtRCVZmAZ7omjM2vB-kr_V9Hk8wGK0ylm8eQuwvtpGFnIjmpCpdRbUjwFRJefEon1TGW1QshpzsovcI5Tvr1AASno6wuZTwTnX68OTPIJ947wj0u_Hicx9YwjQAqAwOyadiSQ-J3dkHPaDFGU41c4BT2ggSG5HOjmopX5jBxaVBLQsC0yM-0w1rqG9R93s1SmeanluvQH0NXVbofqnixjnt8r-dd9or_y4gy8hpZsg",
|
|
20
20
|
articleId: 238,
|
|
21
21
|
category: 846,
|
|
22
22
|
version: 2,
|
|
23
23
|
productSelected: {
|
|
24
24
|
services: {
|
|
25
|
-
datasheets:
|
|
26
|
-
descriptions:
|
|
25
|
+
datasheets: 0,
|
|
26
|
+
descriptions: 0,
|
|
27
27
|
images: 1,
|
|
28
28
|
},
|
|
29
|
-
orderId:
|
|
30
|
-
status: "
|
|
31
|
-
datasheet_status: "
|
|
29
|
+
orderId: 72,
|
|
30
|
+
status: "ASSIGNED",
|
|
31
|
+
datasheet_status: "NS",
|
|
32
32
|
prio: "none",
|
|
33
|
-
version:
|
|
34
|
-
description_status: "
|
|
35
|
-
images_status: "
|
|
33
|
+
version: 14,
|
|
34
|
+
description_status: "NS",
|
|
35
|
+
images_status: "IN_PROGRESS",
|
|
36
36
|
article: {
|
|
37
|
-
id_article:
|
|
38
|
-
id_category: "
|
|
39
|
-
name: "
|
|
40
|
-
upc: "
|
|
41
|
-
timestamp: "2022-06-
|
|
42
|
-
id_user:
|
|
37
|
+
id_article: 55109,
|
|
38
|
+
id_category: "2999",
|
|
39
|
+
name: "Resize Ismael",
|
|
40
|
+
upc: "ResizeIsmael",
|
|
41
|
+
timestamp: "2022-06-18T03:32:56.000Z",
|
|
42
|
+
id_user: 110,
|
|
43
43
|
status: "NULL",
|
|
44
44
|
active: 1,
|
|
45
|
-
company_id:
|
|
46
|
-
company_name: "THD Proveedor",
|
|
47
|
-
country:
|
|
48
|
-
id_order:
|
|
49
|
-
id_datasheet_especialist:
|
|
45
|
+
company_id: 834,
|
|
46
|
+
company_name: "THD Resize Proveedor",
|
|
47
|
+
country: null,
|
|
48
|
+
id_order: 72,
|
|
49
|
+
id_datasheet_especialist: 54,
|
|
50
50
|
id_datasheet_facilitator: 52,
|
|
51
|
-
id_description_especialist:
|
|
51
|
+
id_description_especialist: 54,
|
|
52
52
|
id_description_facilitator: 52,
|
|
53
53
|
id_images_especialist: 55,
|
|
54
54
|
id_images_facilitator: 53,
|
|
55
|
-
id_auditor:
|
|
55
|
+
id_auditor: null,
|
|
56
56
|
id_recepcionist: null,
|
|
57
|
-
category: "
|
|
57
|
+
category: "RESIZING|RESIZING|RESIZING",
|
|
58
58
|
missingAttributes: null,
|
|
59
59
|
missingDescriptions: null,
|
|
60
60
|
missingImages: null,
|
|
@@ -74,30 +74,37 @@ RetailerProductEditionDefault.args = {
|
|
|
74
74
|
id_region: 1,
|
|
75
75
|
active: 1,
|
|
76
76
|
},
|
|
77
|
+
{
|
|
78
|
+
id: 60,
|
|
79
|
+
name: "The Home Depot Resizing",
|
|
80
|
+
country: "México",
|
|
81
|
+
id_region: 1,
|
|
82
|
+
active: 1,
|
|
83
|
+
},
|
|
77
84
|
],
|
|
78
|
-
country:
|
|
79
|
-
upc: "
|
|
85
|
+
country: null,
|
|
86
|
+
upc: "ResizeIsmael",
|
|
80
87
|
},
|
|
81
88
|
location: {
|
|
82
89
|
product: { articleId: 109485, versionId: 3 },
|
|
83
90
|
},
|
|
84
91
|
user: {
|
|
85
|
-
id_user:
|
|
86
|
-
name: "
|
|
87
|
-
last_name: "
|
|
88
|
-
email: "
|
|
89
|
-
position:
|
|
92
|
+
id_user: 55,
|
|
93
|
+
name: "ESPECIALISTA ED PRUEBA",
|
|
94
|
+
last_name: "",
|
|
95
|
+
email: "hcarrillo@contentoh.com",
|
|
96
|
+
position: null,
|
|
90
97
|
telephone: null,
|
|
91
|
-
country:
|
|
98
|
+
country: null,
|
|
92
99
|
id_company: 2,
|
|
93
|
-
id_cognito: "
|
|
100
|
+
id_cognito: "713a7457-f943-4bc9-8eb0-86b41f5bd4f8",
|
|
94
101
|
birth_Date: null,
|
|
95
102
|
about_me: null,
|
|
96
103
|
zip_code: null,
|
|
97
104
|
address: null,
|
|
98
105
|
job: null,
|
|
99
106
|
id_stripe: null,
|
|
100
|
-
id_role:
|
|
107
|
+
id_role: 8,
|
|
101
108
|
active: 1,
|
|
102
109
|
is_retailer: 0,
|
|
103
110
|
membership: {
|
|
@@ -111,6 +118,6 @@ RetailerProductEditionDefault.args = {
|
|
|
111
118
|
products_limit: "3",
|
|
112
119
|
type: "PyMES",
|
|
113
120
|
},
|
|
114
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
121
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-55/55.png?1655680663244",
|
|
115
122
|
},
|
|
116
123
|
};
|
|
@@ -259,7 +259,7 @@ export const RetailerProductEdition = ({
|
|
|
259
259
|
arr = ["RF", "AF", "AA", "AP", "AC"];
|
|
260
260
|
break;
|
|
261
261
|
case 6:
|
|
262
|
-
arr = ["RP", "RC", "AF"];
|
|
262
|
+
arr = ["RP", "RC", "AF", "RA"];
|
|
263
263
|
break;
|
|
264
264
|
default:
|
|
265
265
|
arr = [];
|
|
@@ -521,6 +521,15 @@ export const RetailerProductEdition = ({
|
|
|
521
521
|
} else {
|
|
522
522
|
setImagesUploaded(true);
|
|
523
523
|
}
|
|
524
|
+
let productTemp = product;
|
|
525
|
+
if (productTemp.status === "ASSIGNED") {
|
|
526
|
+
productTemp.status = "IN_PROGRESS";
|
|
527
|
+
setProduct(productTemp);
|
|
528
|
+
sessionStorage.setItem(
|
|
529
|
+
"productSelected",
|
|
530
|
+
JSON.stringify(productTemp)
|
|
531
|
+
);
|
|
532
|
+
}
|
|
524
533
|
} catch (err) {
|
|
525
534
|
console.log(err);
|
|
526
535
|
// setMainLoading(false);
|
|
@@ -572,7 +581,7 @@ export const RetailerProductEdition = ({
|
|
|
572
581
|
product[`${getConcept(tab)}_status`] === "QF" ||
|
|
573
582
|
product[`${getConcept(tab)}_status`] === "IN_PROGRESS";
|
|
574
583
|
|
|
575
|
-
const auditorUnvalidated = !["RA", "AA"].includes(
|
|
584
|
+
const auditorUnvalidated = !["RA", "AA", "AC", "AP"].includes(
|
|
576
585
|
product[`${getConcept(tab)}_status`]
|
|
577
586
|
);
|
|
578
587
|
|
|
@@ -596,10 +605,8 @@ export const RetailerProductEdition = ({
|
|
|
596
605
|
);
|
|
597
606
|
case 6:
|
|
598
607
|
return (
|
|
599
|
-
statusArray.includes(product.status) && //RP, RC, AF
|
|
600
|
-
|
|
601
|
-
["RA", "AA", "AP", "AC"].includes(serv.status)
|
|
602
|
-
) &&
|
|
608
|
+
statusArray.includes(product.status) && //RP, RC, AF, RA true
|
|
609
|
+
srv.every((serv) => ["RA", "AA", "AP", "AC"].includes(serv.status)) &&
|
|
603
610
|
auditorUnvalidated
|
|
604
611
|
);
|
|
605
612
|
default:
|
|
@@ -663,7 +670,6 @@ export const RetailerProductEdition = ({
|
|
|
663
670
|
|
|
664
671
|
let data = {};
|
|
665
672
|
if (result) {
|
|
666
|
-
//updateCompaniesList(evalStatus, result, activeRetailer.id, concept);
|
|
667
673
|
data = {
|
|
668
674
|
articleId: product.article.id_article,
|
|
669
675
|
orderId: product.orderId,
|
|
@@ -678,7 +684,7 @@ export const RetailerProductEdition = ({
|
|
|
678
684
|
Authorization: token,
|
|
679
685
|
},
|
|
680
686
|
});
|
|
681
|
-
|
|
687
|
+
getServices();
|
|
682
688
|
} else {
|
|
683
689
|
const specialistDone =
|
|
684
690
|
evalStatus === "RF" ||
|
|
@@ -806,6 +812,8 @@ export const RetailerProductEdition = ({
|
|
|
806
812
|
},
|
|
807
813
|
});
|
|
808
814
|
await getComments(tab);
|
|
815
|
+
setMessage("");
|
|
816
|
+
setComponentsArray([]);
|
|
809
817
|
};
|
|
810
818
|
|
|
811
819
|
const getRequired = (services) => {
|
|
@@ -1178,7 +1186,7 @@ export const RetailerProductEdition = ({
|
|
|
1178
1186
|
sendToFacilitator("A");
|
|
1179
1187
|
}}
|
|
1180
1188
|
reject={() => {
|
|
1181
|
-
|
|
1189
|
+
sendToFacilitator("R");
|
|
1182
1190
|
setMessage("Rechazado");
|
|
1183
1191
|
setComponentsArray([
|
|
1184
1192
|
<img src={errorModal} />,
|