contentoh-components-library 21.1.5 → 21.1.8
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 +0 -1
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +1 -1
- package/dist/components/pages/ProviderProductEdition/index.js +25 -25
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +46 -46
- package/dist/components/pages/RetailerProductEdition/index.js +80 -60
- package/package.json +1 -1
- package/src/components/atoms/GeneralInput/index.js +0 -1
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +1 -1
- package/src/components/pages/ProviderProductEdition/index.js +11 -5
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +46 -46
- package/src/components/pages/RetailerProductEdition/index.js +45 -37
|
@@ -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 = ["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);
|
|
@@ -1593,7 +1594,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1593
1594
|
retailerId = activeRetailer === null || activeRetailer === void 0 ? void 0 : activeRetailer.id;
|
|
1594
1595
|
|
|
1595
1596
|
if (!result) {
|
|
1596
|
-
_context13.next =
|
|
1597
|
+
_context13.next = 9;
|
|
1597
1598
|
break;
|
|
1598
1599
|
}
|
|
1599
1600
|
|
|
@@ -1604,19 +1605,18 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1604
1605
|
result: result,
|
|
1605
1606
|
retailerId: retailerId
|
|
1606
1607
|
};
|
|
1607
|
-
|
|
1608
|
-
_context13.next = 8;
|
|
1608
|
+
_context13.next = 7;
|
|
1609
1609
|
return _axios.default.put("".concat(process.env.REACT_APP_EVALUATION_ENDPOINT), data, {
|
|
1610
1610
|
headers: {
|
|
1611
1611
|
Authorization: token
|
|
1612
1612
|
}
|
|
1613
1613
|
});
|
|
1614
1614
|
|
|
1615
|
-
case
|
|
1616
|
-
_context13.next =
|
|
1615
|
+
case 7:
|
|
1616
|
+
_context13.next = 18;
|
|
1617
1617
|
break;
|
|
1618
1618
|
|
|
1619
|
-
case
|
|
1619
|
+
case 9:
|
|
1620
1620
|
_productTemp = product;
|
|
1621
1621
|
concept = getConcept(activeTab);
|
|
1622
1622
|
_productTemp["".concat(concept, "_status")] = "Evaluated";
|
|
@@ -1648,11 +1648,11 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1648
1648
|
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, prev), {}, (0, _defineProperty2.default)({}, concept, "Evaluated"));
|
|
1649
1649
|
});
|
|
1650
1650
|
|
|
1651
|
-
case
|
|
1651
|
+
case 18:
|
|
1652
1652
|
loadData();
|
|
1653
1653
|
showSurvey && showSurvey(confirmStatusComplete());
|
|
1654
1654
|
|
|
1655
|
-
case
|
|
1655
|
+
case 20:
|
|
1656
1656
|
case "end":
|
|
1657
1657
|
return _context13.stop();
|
|
1658
1658
|
}
|
|
@@ -31,7 +31,7 @@ RetailerProductEditionDefault.args = {
|
|
|
31
31
|
"Ficha técnica": false,
|
|
32
32
|
Imágenes: false
|
|
33
33
|
},
|
|
34
|
-
token: "
|
|
34
|
+
token: "eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIyM2EzZjQ5Ni00ZTM4LTRlMTItOWJmNS03ZjkwYjc3YTJmMzUiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfbFN6UVo0WjdSIiwiY29nbml0bzp1c2VybmFtZSI6IjIzYTNmNDk2LTRlMzgtNGUxMi05YmY1LTdmOTBiNzdhMmYzNSIsImF1ZCI6IjUyZDlza2tkY2c4cWpwODhvb2sxdXNlNm1rIiwiZXZlbnRfaWQiOiI1NDI2MzBjNS1jMTNjLTRiNjAtOGI2YS1iOTg5NzBjMjFhZDMiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY1NTY2NTUzMiwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY1NTY2OTEzMiwiaWF0IjoxNjU1NjY1NTMyLCJlbWFpbCI6ImxhZGlib2g3ODVAbWkxNjYuY29tIn0.F2aw2qPknI7hmjob2TFh-rNM9IB6VqCpEyBAAxSWGKwdD6dWAF-5aFLUDvv8I7sUa73pbi_OGqXRZAZfpuK3Pwm5T5FySEP9Bp-fO9GZ-mKfKR0o5LYbEuNSgkSUuHT18_zUCzu9WXGmvpwE5WnG1oVr4M505G5XbizA-j3yW-RUBKvemuw_8QlWaQ-SF_ILSu8kg6eEJtwclU7gTKgU-Am8sLGINAH9P5jnEvjC8z7V2SiOeUbB9-QUQQbVf9wNSerIiP_YhV3I-IWHkRBXFagbWweHQyiNn17I7ZXOZdX6OZ6gvbsat3Rmxyi3IZr6bAJxc-S6NiGOa1EEsLlptA",
|
|
35
35
|
articleId: 238,
|
|
36
36
|
category: 846,
|
|
37
37
|
version: 2,
|
|
@@ -41,54 +41,54 @@ RetailerProductEditionDefault.args = {
|
|
|
41
41
|
descriptions: 1,
|
|
42
42
|
images: 1
|
|
43
43
|
},
|
|
44
|
-
orderId:
|
|
45
|
-
status: "
|
|
46
|
-
datasheet_status: "
|
|
44
|
+
orderId: 1768,
|
|
45
|
+
status: "AF",
|
|
46
|
+
datasheet_status: "AF",
|
|
47
47
|
prio: "none",
|
|
48
48
|
version: 2,
|
|
49
|
-
description_status: "
|
|
50
|
-
images_status: "
|
|
49
|
+
description_status: "AF",
|
|
50
|
+
images_status: "AA",
|
|
51
51
|
article: {
|
|
52
|
-
id_article:
|
|
53
|
-
id_category: "
|
|
54
|
-
name: "
|
|
55
|
-
upc: "
|
|
56
|
-
timestamp: "2022-06-
|
|
57
|
-
id_user:
|
|
52
|
+
id_article: 68764,
|
|
53
|
+
id_category: "4",
|
|
54
|
+
name: "test1",
|
|
55
|
+
upc: "98979695",
|
|
56
|
+
timestamp: "2022-06-19T18:46:01.000Z",
|
|
57
|
+
id_user: 419,
|
|
58
58
|
status: "NULL",
|
|
59
59
|
active: 1,
|
|
60
|
-
company_id:
|
|
61
|
-
company_name: "
|
|
60
|
+
company_id: 253,
|
|
61
|
+
company_name: "Prueba Test S.A de C.V.",
|
|
62
62
|
country: "México",
|
|
63
|
-
id_order:
|
|
64
|
-
id_datasheet_especialist:
|
|
65
|
-
id_datasheet_facilitator:
|
|
66
|
-
id_description_especialist:
|
|
67
|
-
id_description_facilitator:
|
|
68
|
-
id_images_especialist:
|
|
69
|
-
id_images_facilitator:
|
|
70
|
-
id_auditor:
|
|
63
|
+
id_order: 1768,
|
|
64
|
+
id_datasheet_especialist: 426,
|
|
65
|
+
id_datasheet_facilitator: 423,
|
|
66
|
+
id_description_especialist: 426,
|
|
67
|
+
id_description_facilitator: 423,
|
|
68
|
+
id_images_especialist: 427,
|
|
69
|
+
id_images_facilitator: 424,
|
|
70
|
+
id_auditor: 425,
|
|
71
71
|
id_recepcionist: null,
|
|
72
|
-
category: "
|
|
72
|
+
category: "ABARROTES|ABARROTES SECOS|ALIMENTOS DESHIDRATADOS",
|
|
73
73
|
missingAttributes: null,
|
|
74
74
|
missingDescriptions: null,
|
|
75
75
|
missingImages: null
|
|
76
76
|
},
|
|
77
77
|
retailers: [{
|
|
78
|
-
id:
|
|
79
|
-
name: "
|
|
78
|
+
id: 3,
|
|
79
|
+
name: "Sam´s Club",
|
|
80
80
|
country: "México",
|
|
81
81
|
id_region: 1,
|
|
82
82
|
active: 1
|
|
83
83
|
}, {
|
|
84
|
-
id:
|
|
85
|
-
name: "
|
|
84
|
+
id: 4,
|
|
85
|
+
name: "Walmart Super y Superama",
|
|
86
86
|
country: "México",
|
|
87
87
|
id_region: 1,
|
|
88
88
|
active: 1
|
|
89
89
|
}],
|
|
90
90
|
country: "México",
|
|
91
|
-
upc: "
|
|
91
|
+
upc: "98979695"
|
|
92
92
|
},
|
|
93
93
|
location: {
|
|
94
94
|
product: {
|
|
@@ -97,15 +97,15 @@ RetailerProductEditionDefault.args = {
|
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
99
|
user: {
|
|
100
|
-
id_user:
|
|
101
|
-
name: "
|
|
102
|
-
last_name: "
|
|
103
|
-
email: "
|
|
104
|
-
position: "
|
|
100
|
+
id_user: 425,
|
|
101
|
+
name: "Auditor QA",
|
|
102
|
+
last_name: " ",
|
|
103
|
+
email: "ladiboh785@mi166.com",
|
|
104
|
+
position: "Tester",
|
|
105
105
|
telephone: null,
|
|
106
|
-
country:
|
|
107
|
-
id_company:
|
|
108
|
-
id_cognito: "
|
|
106
|
+
country: null,
|
|
107
|
+
id_company: 254,
|
|
108
|
+
id_cognito: "23a3f496-4e38-4e12-9bf5-7f90b77a2f35",
|
|
109
109
|
birth_Date: null,
|
|
110
110
|
about_me: null,
|
|
111
111
|
zip_code: null,
|
|
@@ -116,16 +116,16 @@ RetailerProductEditionDefault.args = {
|
|
|
116
116
|
active: 1,
|
|
117
117
|
is_retailer: 0,
|
|
118
118
|
membership: {
|
|
119
|
-
id:
|
|
120
|
-
start_date: "
|
|
121
|
-
end_date: "
|
|
122
|
-
planID:
|
|
123
|
-
plan: "
|
|
124
|
-
name: "Plan
|
|
125
|
-
user_limit: "
|
|
126
|
-
products_limit: "
|
|
127
|
-
type: "
|
|
119
|
+
id: 750,
|
|
120
|
+
start_date: "2022-01-07T21:32:54.000Z",
|
|
121
|
+
end_date: "2023-01-07T21:32:54.000Z",
|
|
122
|
+
planID: 6,
|
|
123
|
+
plan: "prod_KvGd6YSTJyR3AP",
|
|
124
|
+
name: "Plan Small",
|
|
125
|
+
user_limit: "10",
|
|
126
|
+
products_limit: "1000",
|
|
127
|
+
type: "Enterprise"
|
|
128
128
|
},
|
|
129
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
129
|
+
src: "https://content-management-profile-prod.s3.amazonaws.com/id-425/425.png?1655665533759"
|
|
130
130
|
}
|
|
131
131
|
};
|
|
@@ -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:
|
|
@@ -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 = 32;
|
|
858
858
|
break;
|
|
859
859
|
}
|
|
860
860
|
|
|
@@ -894,28 +894,34 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
894
894
|
setImagesUploaded(true);
|
|
895
895
|
|
|
896
896
|
case 24:
|
|
897
|
-
|
|
897
|
+
if (productTemp.status === "ASSIGNED") {
|
|
898
|
+
productTemp.status = "IN_PROGRESS";
|
|
899
|
+
setProduct(productTemp);
|
|
900
|
+
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
_context7.next = 30;
|
|
898
904
|
break;
|
|
899
905
|
|
|
900
|
-
case
|
|
901
|
-
_context7.prev =
|
|
906
|
+
case 27:
|
|
907
|
+
_context7.prev = 27;
|
|
902
908
|
_context7.t0 = _context7["catch"](11);
|
|
903
909
|
console.log(_context7.t0); // setMainLoading(false);
|
|
904
910
|
|
|
905
|
-
case
|
|
906
|
-
_context7.next =
|
|
911
|
+
case 30:
|
|
912
|
+
_context7.next = 33;
|
|
907
913
|
break;
|
|
908
914
|
|
|
909
|
-
case
|
|
915
|
+
case 32:
|
|
910
916
|
// setMainLoading(false);
|
|
911
917
|
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
918
|
|
|
913
|
-
case
|
|
919
|
+
case 33:
|
|
914
920
|
case "end":
|
|
915
921
|
return _context7.stop();
|
|
916
922
|
}
|
|
917
923
|
}
|
|
918
|
-
}, _callee7, null, [[11,
|
|
924
|
+
}, _callee7, null, [[11, 27]]);
|
|
919
925
|
})), [images, imagesUploaded]);
|
|
920
926
|
(0, _react.useEffect)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
|
|
921
927
|
return _regenerator.default.wrap(function _callee8$(_context8) {
|
|
@@ -975,7 +981,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
975
981
|
srvActive = _srv$filter2[0];
|
|
976
982
|
|
|
977
983
|
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")]);
|
|
984
|
+
var auditorUnvalidated = !["RA", "AA", "AC", "AP"].includes(product["".concat(getConcept(tab), "_status")]);
|
|
979
985
|
|
|
980
986
|
switch (userId) {
|
|
981
987
|
case 7:
|
|
@@ -993,8 +999,8 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
993
999
|
}).length === srv.length;
|
|
994
1000
|
|
|
995
1001
|
case 6:
|
|
996
|
-
return statusArray.includes(product.status) && //RP, RC, AF
|
|
997
|
-
|
|
1002
|
+
return statusArray.includes(product.status) && //RP, RC, AF, RA true
|
|
1003
|
+
srv.every(function (serv) {
|
|
998
1004
|
return ["RA", "AA", "AP", "AC"].includes(serv.status);
|
|
999
1005
|
}) && auditorUnvalidated;
|
|
1000
1006
|
|
|
@@ -1050,7 +1056,8 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1050
1056
|
|
|
1051
1057
|
var sendToFacilitator = /*#__PURE__*/function () {
|
|
1052
1058
|
var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(result) {
|
|
1053
|
-
var concept,
|
|
1059
|
+
var concept, _productTemp, evalStatus, data, specialistDone, statusArr, newStatus;
|
|
1060
|
+
|
|
1054
1061
|
return _regenerator.default.wrap(function _callee9$(_context9) {
|
|
1055
1062
|
while (1) {
|
|
1056
1063
|
switch (_context9.prev = _context9.next) {
|
|
@@ -1058,12 +1065,12 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1058
1065
|
setLoading(true);
|
|
1059
1066
|
_context9.prev = 1;
|
|
1060
1067
|
concept = getConcept(activeTab);
|
|
1061
|
-
|
|
1068
|
+
_productTemp = (0, _objectSpread2.default)({}, product);
|
|
1062
1069
|
evalStatus = product["".concat(concept, "_status")];
|
|
1063
1070
|
data = {};
|
|
1064
1071
|
|
|
1065
1072
|
if (!result) {
|
|
1066
|
-
_context9.next =
|
|
1073
|
+
_context9.next = 13;
|
|
1067
1074
|
break;
|
|
1068
1075
|
}
|
|
1069
1076
|
|
|
@@ -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) {
|
|
@@ -1111,9 +1119,9 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1111
1119
|
servicesData.forEach(function (srv) {
|
|
1112
1120
|
srv.service === concept && statusArr.push(srv.status);
|
|
1113
1121
|
});
|
|
1114
|
-
|
|
1115
|
-
newStatus = (0, _data2.getNewStatus)([
|
|
1116
|
-
|
|
1122
|
+
_productTemp["".concat(concept, "_status")] = (0, _data2.getNewStatus)(statusArr);
|
|
1123
|
+
newStatus = (0, _data2.getNewStatus)([_productTemp.datasheet_status, _productTemp.description_status, _productTemp.images_status]);
|
|
1124
|
+
_productTemp.status = newStatus;
|
|
1117
1125
|
data = {
|
|
1118
1126
|
articleId: product.article.id_article,
|
|
1119
1127
|
orderId: product.orderId,
|
|
@@ -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
|
-
sessionStorage.setItem("productSelected", JSON.stringify(
|
|
1150
|
-
setProduct(
|
|
1151
|
-
_context9.next =
|
|
1157
|
+
sessionStorage.setItem("productSelected", JSON.stringify(_productTemp));
|
|
1158
|
+
setProduct(_productTemp);
|
|
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,7 +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 =
|
|
1088
|
+
const completionStates =
|
|
1089
|
+
user.is_retailer === 1
|
|
1090
|
+
? ["AC", "Evaluated", "NS"]
|
|
1091
|
+
: ["AP", "Evaluated", "NS"];
|
|
1085
1092
|
const dsEvaluated = completionStates.includes(datasheet_status);
|
|
1086
1093
|
const descsEvaluated = completionStates.includes(description_status);
|
|
1087
1094
|
const imgsEvaluated = completionStates.includes(images_status);
|
|
@@ -1103,7 +1110,6 @@ export const ProviderProductEdition = ({
|
|
|
1103
1110
|
result: result,
|
|
1104
1111
|
retailerId,
|
|
1105
1112
|
};
|
|
1106
|
-
console.log(data, "data");
|
|
1107
1113
|
await axios.put(`${process.env.REACT_APP_EVALUATION_ENDPOINT}`, data, {
|
|
1108
1114
|
headers: {
|
|
1109
1115
|
Authorization: token,
|
|
@@ -16,7 +16,7 @@ RetailerProductEditionDefault.args = {
|
|
|
16
16
|
Imágenes: false,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"
|
|
19
|
+
"eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIyM2EzZjQ5Ni00ZTM4LTRlMTItOWJmNS03ZjkwYjc3YTJmMzUiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfbFN6UVo0WjdSIiwiY29nbml0bzp1c2VybmFtZSI6IjIzYTNmNDk2LTRlMzgtNGUxMi05YmY1LTdmOTBiNzdhMmYzNSIsImF1ZCI6IjUyZDlza2tkY2c4cWpwODhvb2sxdXNlNm1rIiwiZXZlbnRfaWQiOiI1NDI2MzBjNS1jMTNjLTRiNjAtOGI2YS1iOTg5NzBjMjFhZDMiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY1NTY2NTUzMiwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY1NTY2OTEzMiwiaWF0IjoxNjU1NjY1NTMyLCJlbWFpbCI6ImxhZGlib2g3ODVAbWkxNjYuY29tIn0.F2aw2qPknI7hmjob2TFh-rNM9IB6VqCpEyBAAxSWGKwdD6dWAF-5aFLUDvv8I7sUa73pbi_OGqXRZAZfpuK3Pwm5T5FySEP9Bp-fO9GZ-mKfKR0o5LYbEuNSgkSUuHT18_zUCzu9WXGmvpwE5WnG1oVr4M505G5XbizA-j3yW-RUBKvemuw_8QlWaQ-SF_ILSu8kg6eEJtwclU7gTKgU-Am8sLGINAH9P5jnEvjC8z7V2SiOeUbB9-QUQQbVf9wNSerIiP_YhV3I-IWHkRBXFagbWweHQyiNn17I7ZXOZdX6OZ6gvbsat3Rmxyi3IZr6bAJxc-S6NiGOa1EEsLlptA",
|
|
20
20
|
articleId: 238,
|
|
21
21
|
category: 846,
|
|
22
22
|
version: 2,
|
|
@@ -26,71 +26,71 @@ RetailerProductEditionDefault.args = {
|
|
|
26
26
|
descriptions: 1,
|
|
27
27
|
images: 1,
|
|
28
28
|
},
|
|
29
|
-
orderId:
|
|
30
|
-
status: "
|
|
31
|
-
datasheet_status: "
|
|
29
|
+
orderId: 1768,
|
|
30
|
+
status: "AF",
|
|
31
|
+
datasheet_status: "AF",
|
|
32
32
|
prio: "none",
|
|
33
33
|
version: 2,
|
|
34
|
-
description_status: "
|
|
35
|
-
images_status: "
|
|
34
|
+
description_status: "AF",
|
|
35
|
+
images_status: "AA",
|
|
36
36
|
article: {
|
|
37
|
-
id_article:
|
|
38
|
-
id_category: "
|
|
39
|
-
name: "
|
|
40
|
-
upc: "
|
|
41
|
-
timestamp: "2022-06-
|
|
42
|
-
id_user:
|
|
37
|
+
id_article: 68764,
|
|
38
|
+
id_category: "4",
|
|
39
|
+
name: "test1",
|
|
40
|
+
upc: "98979695",
|
|
41
|
+
timestamp: "2022-06-19T18:46:01.000Z",
|
|
42
|
+
id_user: 419,
|
|
43
43
|
status: "NULL",
|
|
44
44
|
active: 1,
|
|
45
|
-
company_id:
|
|
46
|
-
company_name: "
|
|
45
|
+
company_id: 253,
|
|
46
|
+
company_name: "Prueba Test S.A de C.V.",
|
|
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: 1768,
|
|
49
|
+
id_datasheet_especialist: 426,
|
|
50
|
+
id_datasheet_facilitator: 423,
|
|
51
|
+
id_description_especialist: 426,
|
|
52
|
+
id_description_facilitator: 423,
|
|
53
|
+
id_images_especialist: 427,
|
|
54
|
+
id_images_facilitator: 424,
|
|
55
|
+
id_auditor: 425,
|
|
56
56
|
id_recepcionist: null,
|
|
57
|
-
category: "
|
|
57
|
+
category: "ABARROTES|ABARROTES SECOS|ALIMENTOS DESHIDRATADOS",
|
|
58
58
|
missingAttributes: null,
|
|
59
59
|
missingDescriptions: null,
|
|
60
60
|
missingImages: null,
|
|
61
61
|
},
|
|
62
62
|
retailers: [
|
|
63
63
|
{
|
|
64
|
-
id:
|
|
65
|
-
name: "
|
|
64
|
+
id: 3,
|
|
65
|
+
name: "Sam´s Club",
|
|
66
66
|
country: "México",
|
|
67
67
|
id_region: 1,
|
|
68
68
|
active: 1,
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
|
-
id:
|
|
72
|
-
name: "
|
|
71
|
+
id: 4,
|
|
72
|
+
name: "Walmart Super y Superama",
|
|
73
73
|
country: "México",
|
|
74
74
|
id_region: 1,
|
|
75
75
|
active: 1,
|
|
76
76
|
},
|
|
77
77
|
],
|
|
78
78
|
country: "México",
|
|
79
|
-
upc: "
|
|
79
|
+
upc: "98979695",
|
|
80
80
|
},
|
|
81
81
|
location: {
|
|
82
82
|
product: { articleId: 109485, versionId: 3 },
|
|
83
83
|
},
|
|
84
84
|
user: {
|
|
85
|
-
id_user:
|
|
86
|
-
name: "
|
|
87
|
-
last_name: "
|
|
88
|
-
email: "
|
|
89
|
-
position: "
|
|
85
|
+
id_user: 425,
|
|
86
|
+
name: "Auditor QA",
|
|
87
|
+
last_name: " ",
|
|
88
|
+
email: "ladiboh785@mi166.com",
|
|
89
|
+
position: "Tester",
|
|
90
90
|
telephone: null,
|
|
91
|
-
country:
|
|
92
|
-
id_company:
|
|
93
|
-
id_cognito: "
|
|
91
|
+
country: null,
|
|
92
|
+
id_company: 254,
|
|
93
|
+
id_cognito: "23a3f496-4e38-4e12-9bf5-7f90b77a2f35",
|
|
94
94
|
birth_Date: null,
|
|
95
95
|
about_me: null,
|
|
96
96
|
zip_code: null,
|
|
@@ -101,16 +101,16 @@ RetailerProductEditionDefault.args = {
|
|
|
101
101
|
active: 1,
|
|
102
102
|
is_retailer: 0,
|
|
103
103
|
membership: {
|
|
104
|
-
id:
|
|
105
|
-
start_date: "
|
|
106
|
-
end_date: "
|
|
107
|
-
planID:
|
|
108
|
-
plan: "
|
|
109
|
-
name: "Plan
|
|
110
|
-
user_limit: "
|
|
111
|
-
products_limit: "
|
|
112
|
-
type: "
|
|
104
|
+
id: 750,
|
|
105
|
+
start_date: "2022-01-07T21:32:54.000Z",
|
|
106
|
+
end_date: "2023-01-07T21:32:54.000Z",
|
|
107
|
+
planID: 6,
|
|
108
|
+
plan: "prod_KvGd6YSTJyR3AP",
|
|
109
|
+
name: "Plan Small",
|
|
110
|
+
user_limit: "10",
|
|
111
|
+
products_limit: "1000",
|
|
112
|
+
type: "Enterprise",
|
|
113
113
|
},
|
|
114
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
114
|
+
src: "https://content-management-profile-prod.s3.amazonaws.com/id-425/425.png?1655665533759",
|
|
115
115
|
},
|
|
116
116
|
};
|
|
@@ -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,14 @@ export const RetailerProductEdition = ({
|
|
|
521
521
|
} else {
|
|
522
522
|
setImagesUploaded(true);
|
|
523
523
|
}
|
|
524
|
+
if (productTemp.status === "ASSIGNED") {
|
|
525
|
+
productTemp.status = "IN_PROGRESS";
|
|
526
|
+
setProduct(productTemp);
|
|
527
|
+
sessionStorage.setItem(
|
|
528
|
+
"productSelected",
|
|
529
|
+
JSON.stringify(productTemp)
|
|
530
|
+
);
|
|
531
|
+
}
|
|
524
532
|
} catch (err) {
|
|
525
533
|
console.log(err);
|
|
526
534
|
// setMainLoading(false);
|
|
@@ -572,7 +580,7 @@ export const RetailerProductEdition = ({
|
|
|
572
580
|
product[`${getConcept(tab)}_status`] === "QF" ||
|
|
573
581
|
product[`${getConcept(tab)}_status`] === "IN_PROGRESS";
|
|
574
582
|
|
|
575
|
-
const auditorUnvalidated = !["RA", "AA"].includes(
|
|
583
|
+
const auditorUnvalidated = !["RA", "AA", "AC", "AP"].includes(
|
|
576
584
|
product[`${getConcept(tab)}_status`]
|
|
577
585
|
);
|
|
578
586
|
|
|
@@ -596,10 +604,8 @@ export const RetailerProductEdition = ({
|
|
|
596
604
|
);
|
|
597
605
|
case 6:
|
|
598
606
|
return (
|
|
599
|
-
statusArray.includes(product.status) && //RP, RC, AF
|
|
600
|
-
|
|
601
|
-
["RA", "AA", "AP", "AC"].includes(serv.status)
|
|
602
|
-
) &&
|
|
607
|
+
statusArray.includes(product.status) && //RP, RC, AF, RA true
|
|
608
|
+
srv.every((serv) => ["RA", "AA", "AP", "AC"].includes(serv.status)) &&
|
|
603
609
|
auditorUnvalidated
|
|
604
610
|
);
|
|
605
611
|
default:
|
|
@@ -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())
|