contentoh-components-library 21.1.6 → 21.1.9
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 +1 -1
- package/dist/components/pages/ProviderProductEdition/index.js +18 -17
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +40 -34
- package/dist/components/pages/RetailerProductEdition/index.js +75 -55
- package/package.json +1 -1
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +1 -1
- package/src/components/pages/ProviderProductEdition/index.js +11 -6
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +41 -34
- package/src/components/pages/RetailerProductEdition/index.js +46 -38
|
@@ -31,7 +31,7 @@ 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,
|
|
@@ -621,6 +621,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
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
|
setActiveRetailer(product.retailers ? product.retailers[0] : product.retailersAvailable[0]); // getPercentage({ data: [product] }).then((res) =>
|
|
626
627
|
// setPercentages(res)
|
|
@@ -628,37 +629,37 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
628
629
|
|
|
629
630
|
getCart();
|
|
630
631
|
_context5.t0 = setUserGroups;
|
|
631
|
-
_context5.next =
|
|
632
|
+
_context5.next = 7;
|
|
632
633
|
return (0, _data2.fetchUsers)(token);
|
|
633
634
|
|
|
634
|
-
case
|
|
635
|
+
case 7:
|
|
635
636
|
_context5.t1 = _context5.sent;
|
|
636
637
|
(0, _context5.t0)(_context5.t1);
|
|
637
638
|
arr = [];
|
|
638
639
|
_context5.t2 = user.id_role;
|
|
639
|
-
_context5.next = _context5.t2 === 7 ?
|
|
640
|
+
_context5.next = _context5.t2 === 7 ? 13 : _context5.t2 === 8 ? 13 : _context5.t2 === 4 ? 15 : _context5.t2 === 5 ? 15 : _context5.t2 === 6 ? 17 : 19;
|
|
640
641
|
break;
|
|
641
642
|
|
|
642
|
-
case
|
|
643
|
+
case 13:
|
|
643
644
|
arr = ["IN_PROGRESS", "RF", "RA"];
|
|
644
|
-
return _context5.abrupt("break",
|
|
645
|
+
return _context5.abrupt("break", 21);
|
|
645
646
|
|
|
646
|
-
case
|
|
647
|
+
case 15:
|
|
647
648
|
arr = ["RF", "AF", "AA", "AP", "AC"];
|
|
648
|
-
return _context5.abrupt("break",
|
|
649
|
+
return _context5.abrupt("break", 21);
|
|
649
650
|
|
|
650
|
-
case
|
|
651
|
+
case 17:
|
|
651
652
|
arr = ["RP", "RC", "AF"];
|
|
652
|
-
return _context5.abrupt("break",
|
|
653
|
+
return _context5.abrupt("break", 21);
|
|
653
654
|
|
|
654
|
-
case
|
|
655
|
+
case 19:
|
|
655
656
|
arr = [];
|
|
656
|
-
return _context5.abrupt("break",
|
|
657
|
+
return _context5.abrupt("break", 21);
|
|
657
658
|
|
|
658
|
-
case
|
|
659
|
+
case 21:
|
|
659
660
|
setStatusArray(arr);
|
|
660
661
|
|
|
661
|
-
case
|
|
662
|
+
case 22:
|
|
662
663
|
case "end":
|
|
663
664
|
return _context5.stop();
|
|
664
665
|
}
|
|
@@ -1447,12 +1448,12 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1447
1448
|
|
|
1448
1449
|
if (["RequestWithContentoh", "RequestWithoutContentoh"].includes(origin[tab])) {
|
|
1449
1450
|
serv = serv.filter(function (f) {
|
|
1450
|
-
return f.id_retailer ===
|
|
1451
|
+
return f.id_retailer === activeRetailer.id;
|
|
1451
1452
|
});
|
|
1452
1453
|
}
|
|
1453
1454
|
|
|
1454
|
-
var statusArray = user.is_retailer ? ["AC", "RC"] : ["AP", "RP", "AC"];
|
|
1455
|
-
return serv.every(function (item) {
|
|
1455
|
+
var statusArray = user.is_retailer === 1 ? ["AC", "RC"] : ["AP", "RP", "AC"];
|
|
1456
|
+
return serv.length > 0 && serv.every(function (item) {
|
|
1456
1457
|
return statusArray.includes(item.status);
|
|
1457
1458
|
});
|
|
1458
1459
|
};
|
|
@@ -1572,7 +1573,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1572
1573
|
var datasheet_status = product.datasheet_status,
|
|
1573
1574
|
description_status = product.description_status,
|
|
1574
1575
|
images_status = product.images_status;
|
|
1575
|
-
var completionStates = user.is_retailer ? ["AC", "Evaluated", "NS"] : ["AP", "Evaluated", "NS"];
|
|
1576
|
+
var completionStates = user.is_retailer === 1 ? ["AC", "Evaluated", "NS"] : ["AP", "Evaluated", "NS"];
|
|
1576
1577
|
var dsEvaluated = completionStates.includes(datasheet_status);
|
|
1577
1578
|
var descsEvaluated = completionStates.includes(description_status);
|
|
1578
1579
|
var imgsEvaluated = completionStates.includes(images_status);
|
|
@@ -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,27 +1639,35 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1627
1639
|
sendToFacilitator("A");
|
|
1628
1640
|
},
|
|
1629
1641
|
reject: function reject() {
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1642
|
+
sendToFacilitator("R"); // setMessage("Rechazado");
|
|
1643
|
+
// setComponentsArray([
|
|
1644
|
+
// <img src={errorModal} />,
|
|
1645
|
+
// <ScreenHeader
|
|
1646
|
+
// text={"Agrega tu comentarios para enviar el rechazo"}
|
|
1647
|
+
// headerType={"input-name-header"}
|
|
1648
|
+
// color={"white"}
|
|
1649
|
+
// />,
|
|
1650
|
+
// <TagAndInput
|
|
1651
|
+
// label={"Caja de Comentario"}
|
|
1652
|
+
// inputType={"textarea"}
|
|
1653
|
+
// inputId={"modal-commentary-box"}
|
|
1654
|
+
// index={0}
|
|
1655
|
+
// color={"white"}
|
|
1656
|
+
// />,
|
|
1657
|
+
// <Button
|
|
1658
|
+
// buttonType={"general-default-button"}
|
|
1659
|
+
// label={"Enviar comentario"}
|
|
1660
|
+
// onClick={(e) =>
|
|
1661
|
+
// createComment(
|
|
1662
|
+
// e,
|
|
1663
|
+
// document.querySelector(
|
|
1664
|
+
// "#modal-commentary-box .ql-container .ql-editor > p"
|
|
1665
|
+
// ).innerHTML,
|
|
1666
|
+
// activeTab
|
|
1667
|
+
// )
|
|
1668
|
+
// }
|
|
1669
|
+
// />,
|
|
1670
|
+
// ]);
|
|
1651
1671
|
},
|
|
1652
1672
|
showValidationButtons: approveRejectButtons() && (auditorAssigned() || userAssigned())
|
|
1653
1673
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FullTabsMenu.FullTabsMenu, {
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@ 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,
|
|
@@ -297,6 +297,7 @@ export const ProviderProductEdition = ({
|
|
|
297
297
|
};
|
|
298
298
|
|
|
299
299
|
useEffect(async () => {
|
|
300
|
+
sessionStorage.setItem("user", JSON.stringify(user));
|
|
300
301
|
loadData();
|
|
301
302
|
setActiveRetailer(
|
|
302
303
|
product.retailers ? product.retailers[0] : product.retailersAvailable[0]
|
|
@@ -948,10 +949,13 @@ export const ProviderProductEdition = ({
|
|
|
948
949
|
if (
|
|
949
950
|
["RequestWithContentoh", "RequestWithoutContentoh"].includes(origin[tab])
|
|
950
951
|
) {
|
|
951
|
-
serv = serv.filter((f) => f.id_retailer ===
|
|
952
|
+
serv = serv.filter((f) => f.id_retailer === activeRetailer.id);
|
|
952
953
|
}
|
|
953
|
-
const statusArray =
|
|
954
|
-
|
|
954
|
+
const statusArray =
|
|
955
|
+
user.is_retailer === 1 ? ["AC", "RC"] : ["AP", "RP", "AC"];
|
|
956
|
+
return (
|
|
957
|
+
serv.length > 0 && serv.every((item) => statusArray.includes(item.status))
|
|
958
|
+
);
|
|
955
959
|
};
|
|
956
960
|
|
|
957
961
|
const downloadImages = () => {
|
|
@@ -1081,9 +1085,10 @@ export const ProviderProductEdition = ({
|
|
|
1081
1085
|
// }, [services, servicesData, activeTab]);
|
|
1082
1086
|
const confirmStatusComplete = () => {
|
|
1083
1087
|
const { datasheet_status, description_status, images_status } = product;
|
|
1084
|
-
const completionStates =
|
|
1085
|
-
|
|
1086
|
-
|
|
1088
|
+
const completionStates =
|
|
1089
|
+
user.is_retailer === 1
|
|
1090
|
+
? ["AC", "Evaluated", "NS"]
|
|
1091
|
+
: ["AP", "Evaluated", "NS"];
|
|
1087
1092
|
const dsEvaluated = completionStates.includes(datasheet_status);
|
|
1088
1093
|
const descsEvaluated = completionStates.includes(description_status);
|
|
1089
1094
|
const imgsEvaluated = completionStates.includes(images_status);
|
|
@@ -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,36 +1186,36 @@ export const RetailerProductEdition = ({
|
|
|
1178
1186
|
sendToFacilitator("A");
|
|
1179
1187
|
}}
|
|
1180
1188
|
reject={() => {
|
|
1181
|
-
|
|
1182
|
-
setMessage("Rechazado");
|
|
1183
|
-
setComponentsArray([
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
]);
|
|
1189
|
+
sendToFacilitator("R");
|
|
1190
|
+
// setMessage("Rechazado");
|
|
1191
|
+
// setComponentsArray([
|
|
1192
|
+
// <img src={errorModal} />,
|
|
1193
|
+
// <ScreenHeader
|
|
1194
|
+
// text={"Agrega tu comentarios para enviar el rechazo"}
|
|
1195
|
+
// headerType={"input-name-header"}
|
|
1196
|
+
// color={"white"}
|
|
1197
|
+
// />,
|
|
1198
|
+
// <TagAndInput
|
|
1199
|
+
// label={"Caja de Comentario"}
|
|
1200
|
+
// inputType={"textarea"}
|
|
1201
|
+
// inputId={"modal-commentary-box"}
|
|
1202
|
+
// index={0}
|
|
1203
|
+
// color={"white"}
|
|
1204
|
+
// />,
|
|
1205
|
+
// <Button
|
|
1206
|
+
// buttonType={"general-default-button"}
|
|
1207
|
+
// label={"Enviar comentario"}
|
|
1208
|
+
// onClick={(e) =>
|
|
1209
|
+
// createComment(
|
|
1210
|
+
// e,
|
|
1211
|
+
// document.querySelector(
|
|
1212
|
+
// "#modal-commentary-box .ql-container .ql-editor > p"
|
|
1213
|
+
// ).innerHTML,
|
|
1214
|
+
// activeTab
|
|
1215
|
+
// )
|
|
1216
|
+
// }
|
|
1217
|
+
// />,
|
|
1218
|
+
// ]);
|
|
1211
1219
|
}}
|
|
1212
1220
|
showValidationButtons={
|
|
1213
1221
|
approveRejectButtons() && (auditorAssigned() || userAssigned())
|