contentoh-components-library 21.5.22 → 21.5.23
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 +152 -61
- package/dist/components/pages/ProviderProductEdition/index.js +89 -31
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +20 -20
- package/dist/components/pages/RetailerProductEdition/index.js +54 -29
- package/package.json +1 -1
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +159 -64
- package/src/components/pages/ProviderProductEdition/index.js +100 -39
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +23 -23
- package/src/components/pages/RetailerProductEdition/index.js +36 -20
|
@@ -295,7 +295,7 @@ var myBucket = new _awsSdk.default.S3({
|
|
|
295
295
|
});
|
|
296
296
|
|
|
297
297
|
var RetailerProductEdition = function RetailerProductEdition(_ref3) {
|
|
298
|
-
var _product$retailers, _location$state, _location$state2, _product$services2, _datasheets$, _datasheets$$data, _product$
|
|
298
|
+
var _product$retailers, _location$state, _location$state2, _product$services2, _datasheets$, _datasheets$$data, _product$article18, _comment$message;
|
|
299
299
|
|
|
300
300
|
var tabsSections = _ref3.tabsSections,
|
|
301
301
|
_ref3$productSelected = _ref3.productSelected,
|
|
@@ -719,6 +719,12 @@ var RetailerProductEdition = function RetailerProductEdition(_ref3) {
|
|
|
719
719
|
setObservationVisible(false);
|
|
720
720
|
};
|
|
721
721
|
|
|
722
|
+
var handleCommentSubmit = function handleCommentSubmit(e) {
|
|
723
|
+
e.preventDefault();
|
|
724
|
+
var commentText = document.querySelector("#commentary-box .ql-container .ql-editor > p").innerHTML;
|
|
725
|
+
createComment(e, commentText, activeTab);
|
|
726
|
+
};
|
|
727
|
+
|
|
722
728
|
(0, _react.useEffect)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
723
729
|
var _ref7, id_article;
|
|
724
730
|
|
|
@@ -1734,33 +1740,55 @@ var RetailerProductEdition = function RetailerProductEdition(_ref3) {
|
|
|
1734
1740
|
};
|
|
1735
1741
|
|
|
1736
1742
|
var createComment = /*#__PURE__*/function () {
|
|
1737
|
-
var _ref20 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
|
|
1738
|
-
var
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
_args16 = arguments;
|
|
1743
|
+
var _ref20 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16(e, body, tab) {
|
|
1744
|
+
var _product$article16;
|
|
1745
|
+
|
|
1746
|
+
var concept, data;
|
|
1742
1747
|
return _regenerator.default.wrap(function _callee16$(_context16) {
|
|
1743
1748
|
while (1) {
|
|
1744
1749
|
switch (_context16.prev = _context16.next) {
|
|
1745
1750
|
case 0:
|
|
1746
|
-
|
|
1747
|
-
|
|
1751
|
+
concept = "";
|
|
1752
|
+
_context16.t0 = activeTab;
|
|
1753
|
+
_context16.next = _context16.t0 === "Ficha técnica" ? 4 : _context16.t0 === "Imágenes" ? 6 : 8;
|
|
1754
|
+
break;
|
|
1755
|
+
|
|
1756
|
+
case 4:
|
|
1757
|
+
concept = "datasheet";
|
|
1758
|
+
return _context16.abrupt("break", 10);
|
|
1759
|
+
|
|
1760
|
+
case 6:
|
|
1761
|
+
concept = "images";
|
|
1762
|
+
return _context16.abrupt("break", 10);
|
|
1763
|
+
|
|
1764
|
+
case 8:
|
|
1765
|
+
concept = "description";
|
|
1766
|
+
return _context16.abrupt("break", 10);
|
|
1767
|
+
|
|
1768
|
+
case 10:
|
|
1748
1769
|
data = {
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1770
|
+
articleId: product === null || product === void 0 ? void 0 : (_product$article16 = product.article) === null || _product$article16 === void 0 ? void 0 : _product$article16.id_article,
|
|
1771
|
+
orderId: product === null || product === void 0 ? void 0 : product.orderId,
|
|
1772
|
+
message: body === null || body === void 0 ? void 0 : body.replace(/<.*?\/?>/gm, ""),
|
|
1773
|
+
concept: concept,
|
|
1774
|
+
version: version
|
|
1775
|
+
};
|
|
1776
|
+
_context16.next = 13;
|
|
1777
|
+
return _axios.default.post("".concat(process.env.REACT_APP_COMMENTS_ENDPOINT), data, {
|
|
1778
|
+
headers: {
|
|
1757
1779
|
Authorization: token
|
|
1758
1780
|
}
|
|
1759
|
-
};
|
|
1781
|
+
});
|
|
1782
|
+
|
|
1783
|
+
case 13:
|
|
1784
|
+
_context16.next = 15;
|
|
1785
|
+
return getComments(tab);
|
|
1786
|
+
|
|
1787
|
+
case 15:
|
|
1760
1788
|
setMessage("");
|
|
1761
|
-
|
|
1789
|
+
setComponentsArray([]);
|
|
1762
1790
|
|
|
1763
|
-
case
|
|
1791
|
+
case 17:
|
|
1764
1792
|
case "end":
|
|
1765
1793
|
return _context16.stop();
|
|
1766
1794
|
}
|
|
@@ -1768,7 +1796,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref3) {
|
|
|
1768
1796
|
}, _callee16);
|
|
1769
1797
|
}));
|
|
1770
1798
|
|
|
1771
|
-
return function createComment() {
|
|
1799
|
+
return function createComment(_x6, _x7, _x8) {
|
|
1772
1800
|
return _ref20.apply(this, arguments);
|
|
1773
1801
|
};
|
|
1774
1802
|
}();
|
|
@@ -1883,7 +1911,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref3) {
|
|
|
1883
1911
|
|
|
1884
1912
|
var setAssignation = /*#__PURE__*/function () {
|
|
1885
1913
|
var _ref22 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(assignationType, assignationId) {
|
|
1886
|
-
var _product$
|
|
1914
|
+
var _product$article17;
|
|
1887
1915
|
|
|
1888
1916
|
var concept, productTemp, data;
|
|
1889
1917
|
return _regenerator.default.wrap(function _callee18$(_context18) {
|
|
@@ -1913,7 +1941,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref3) {
|
|
|
1913
1941
|
data = {
|
|
1914
1942
|
articleList: [{
|
|
1915
1943
|
orderId: product.orderId,
|
|
1916
|
-
articleId: product === null || product === void 0 ? void 0 : (_product$
|
|
1944
|
+
articleId: product === null || product === void 0 ? void 0 : (_product$article17 = product.article) === null || _product$article17 === void 0 ? void 0 : _product$article17.id_article
|
|
1917
1945
|
}],
|
|
1918
1946
|
concept: concept,
|
|
1919
1947
|
userId: assignationId
|
|
@@ -1940,7 +1968,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref3) {
|
|
|
1940
1968
|
}, _callee18);
|
|
1941
1969
|
}));
|
|
1942
1970
|
|
|
1943
|
-
return function setAssignation(
|
|
1971
|
+
return function setAssignation(_x9, _x10) {
|
|
1944
1972
|
return _ref22.apply(this, arguments);
|
|
1945
1973
|
};
|
|
1946
1974
|
}();
|
|
@@ -2042,7 +2070,6 @@ var RetailerProductEdition = function RetailerProductEdition(_ref3) {
|
|
|
2042
2070
|
};
|
|
2043
2071
|
|
|
2044
2072
|
(0, _react.useEffect)(function () {
|
|
2045
|
-
console.log(servicesData, "servicesData");
|
|
2046
2073
|
var status = getRetailerStatus(servicesData, activeTab);
|
|
2047
2074
|
setRetailerStatus(status);
|
|
2048
2075
|
}, [activeTab, servicesData, activeRetailer]);
|
|
@@ -2137,7 +2164,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref3) {
|
|
|
2137
2164
|
}, _callee19, null, [[0, 31]]);
|
|
2138
2165
|
}));
|
|
2139
2166
|
|
|
2140
|
-
return function validateAll(
|
|
2167
|
+
return function validateAll(_x11) {
|
|
2141
2168
|
return _ref23.apply(this, arguments);
|
|
2142
2169
|
};
|
|
2143
2170
|
}();
|
|
@@ -2322,7 +2349,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref3) {
|
|
|
2322
2349
|
auditInputGroup: auditDescriptions[0],
|
|
2323
2350
|
updatedDescriptions: updatedDescriptions,
|
|
2324
2351
|
setUpdatedDescriptions: setUpdatedDescriptions,
|
|
2325
|
-
articleId: product === null || product === void 0 ? void 0 : (_product$
|
|
2352
|
+
articleId: product === null || product === void 0 ? void 0 : (_product$article18 = product.article) === null || _product$article18 === void 0 ? void 0 : _product$article18.id_article,
|
|
2326
2353
|
version: version,
|
|
2327
2354
|
dinamicHeight: true,
|
|
2328
2355
|
compare: compare
|
|
@@ -2359,9 +2386,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref3) {
|
|
|
2359
2386
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
2360
2387
|
buttonType: "general-transparent-button",
|
|
2361
2388
|
label: "Enviar comentario",
|
|
2362
|
-
onClick:
|
|
2363
|
-
return createComment(e, document.querySelector("#commentary-box .ql-container .ql-editor > p").innerHTML, activeTab);
|
|
2364
|
-
}
|
|
2389
|
+
onClick: handleCommentSubmit
|
|
2365
2390
|
})
|
|
2366
2391
|
})]
|
|
2367
2392
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
package/package.json
CHANGED
|
@@ -16,50 +16,133 @@ ProviderProductEditionDefault.args = {
|
|
|
16
16
|
Imágenes: true,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"
|
|
20
|
-
articleId:
|
|
21
|
-
category:
|
|
22
|
-
version:
|
|
19
|
+
"eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI2MjM3OWU5OS01Mjk2LTRhZGQtODkyNy01YzU2ZmFjZDlkYmMiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfbFN6UVo0WjdSIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6IjYyMzc5ZTk5LTUyOTYtNGFkZC04OTI3LTVjNTZmYWNkOWRiYyIsImF1ZCI6IjUyZDlza2tkY2c4cWpwODhvb2sxdXNlNm1rIiwiZXZlbnRfaWQiOiI4ZmRkOWJlYS1jYTE0LTQ4MmQtYmUwNi1iMjA4YjdjMTM1MWYiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTcxODgyMDI2MCwibmFtZSI6IlByb3ZlZWRvciBQcnVlYmEiLCJwaG9uZV9udW1iZXIiOiIrNTI1NTM5MDA2NTcwIiwiZXhwIjoxNzE4ODIzODYwLCJpYXQiOjE3MTg4MjAyNjAsImVtYWlsIjoibGltYW43NDAyNkBtbnFsbS5jb20ifQ.j4PhSKzZ0yb_5QyXYh_vviA-zbMhJc_wE3yqFErlrPsCZsqY43hx-fvEwwOJnzqwNlPFms6kZbddaGPVu0jnGw8TmiaKtoDVOmui_db8DuWGDHLPQhPZNeoM_g5qKY8H7ZIClGSOohj_61XDrJBYQf9utcimiPGkCHET4_3mq1cSfKm9Sk_jd9q5_zblODT2gzC3SnLcD9JBxh1cj6sIL5oBCVxcwbgdAVM82xo2OL9qMCoUomRlvMTOQ7b3LjATS88ZAx4lrLuLHQjMEnYmRFYbsE4kii9JkvBYo9PE6U9F944C1W8toyELGvXjI4Lp5LjpQCr141Z-KohqXeoYww",
|
|
20
|
+
articleId: 127595,
|
|
21
|
+
category: "2902",
|
|
22
|
+
version: 3,
|
|
23
23
|
productSelected: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
orderId: 8086,
|
|
25
|
+
status: "AA",
|
|
26
|
+
datasheet_status: "AA",
|
|
27
|
+
prio: "none",
|
|
28
|
+
version: 3,
|
|
29
|
+
description_status: "AA",
|
|
30
|
+
images_status: "AA",
|
|
31
|
+
brand: null,
|
|
32
|
+
retailerOrder: 0,
|
|
33
|
+
missing: {
|
|
34
|
+
datasheet: null,
|
|
35
|
+
descriptions: null,
|
|
36
|
+
images: null,
|
|
37
|
+
},
|
|
38
|
+
services: {
|
|
39
|
+
datasheets: 1,
|
|
40
|
+
descriptions: 1,
|
|
41
|
+
images: 1,
|
|
42
|
+
},
|
|
43
|
+
article: {
|
|
44
|
+
category: "Navidad|Decoración Interior|Mallas y Listones",
|
|
45
|
+
company_name: "THD IMPORTACIONES",
|
|
46
|
+
country: null,
|
|
47
|
+
id_category: "2902",
|
|
48
|
+
id_datasheet_especialist: 2757,
|
|
49
|
+
id_datasheet_facilitator: null,
|
|
50
|
+
id_description_especialist: 2757,
|
|
51
|
+
id_description_facilitator: null,
|
|
52
|
+
id_images_especialist: 1259,
|
|
53
|
+
id_images_facilitator: null,
|
|
54
|
+
id_order: 8086,
|
|
55
|
+
id_article: 127595,
|
|
56
|
+
id_auditor: 514,
|
|
57
|
+
name: "LISTON DECORATIVO DISNEY 5M 2 ESTILOS",
|
|
58
|
+
timestamp: "2024-06-05T14:30:33.000Z",
|
|
59
|
+
upc: "214715",
|
|
60
|
+
},
|
|
61
|
+
retailers: [
|
|
62
|
+
{
|
|
63
|
+
id: 58,
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
statusByRetailer: {
|
|
67
|
+
"58": {
|
|
68
|
+
datasheet: "AA",
|
|
69
|
+
description: "AA",
|
|
70
|
+
images: "AA",
|
|
71
|
+
},
|
|
72
|
+
},
|
|
32
73
|
retailersAvailable: [
|
|
33
74
|
{
|
|
34
|
-
|
|
35
|
-
id: 74,
|
|
75
|
+
id: 58,
|
|
36
76
|
},
|
|
37
77
|
],
|
|
38
|
-
|
|
78
|
+
categoryName: "Navidad|Decoración Interior|Mallas y Listones",
|
|
79
|
+
upc: "214715",
|
|
80
|
+
id_article: 127595,
|
|
81
|
+
id_order: 8086,
|
|
39
82
|
},
|
|
40
83
|
productToEdit: {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
product:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
percentage: 100,
|
|
58
|
-
},
|
|
59
|
-
],
|
|
60
|
-
percentage: 100,
|
|
84
|
+
ArticleId: 127595,
|
|
85
|
+
idCategory: "2902",
|
|
86
|
+
product: {
|
|
87
|
+
orderId: 8086,
|
|
88
|
+
status: "AA",
|
|
89
|
+
datasheet_status: "AA",
|
|
90
|
+
prio: "none",
|
|
91
|
+
version: 3,
|
|
92
|
+
description_status: "AA",
|
|
93
|
+
images_status: "AA",
|
|
94
|
+
brand: null,
|
|
95
|
+
retailerOrder: 0,
|
|
96
|
+
missing: {
|
|
97
|
+
datasheet: null,
|
|
98
|
+
descriptions: null,
|
|
99
|
+
images: null,
|
|
61
100
|
},
|
|
62
|
-
|
|
101
|
+
services: {
|
|
102
|
+
datasheets: 1,
|
|
103
|
+
descriptions: 1,
|
|
104
|
+
images: 1,
|
|
105
|
+
},
|
|
106
|
+
article: {
|
|
107
|
+
category: "Navidad|Decoración Interior|Mallas y Listones",
|
|
108
|
+
company_name: "THD IMPORTACIONES",
|
|
109
|
+
country: null,
|
|
110
|
+
id_category: "2902",
|
|
111
|
+
id_datasheet_especialist: 2757,
|
|
112
|
+
id_datasheet_facilitator: null,
|
|
113
|
+
id_description_especialist: 2757,
|
|
114
|
+
id_description_facilitator: null,
|
|
115
|
+
id_images_especialist: 1259,
|
|
116
|
+
id_images_facilitator: null,
|
|
117
|
+
id_order: 8086,
|
|
118
|
+
id_article: 127595,
|
|
119
|
+
id_auditor: 514,
|
|
120
|
+
name: "LISTON DECORATIVO DISNEY 5M 2 ESTILOS",
|
|
121
|
+
timestamp: "2024-06-05T14:30:33.000Z",
|
|
122
|
+
upc: "214715",
|
|
123
|
+
},
|
|
124
|
+
retailers: [
|
|
125
|
+
{
|
|
126
|
+
id: 58,
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
statusByRetailer: {
|
|
130
|
+
"58": {
|
|
131
|
+
datasheet: "AA",
|
|
132
|
+
description: "AA",
|
|
133
|
+
images: "AA",
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
retailersAvailable: [
|
|
137
|
+
{
|
|
138
|
+
id: 58,
|
|
139
|
+
},
|
|
140
|
+
],
|
|
141
|
+
categoryName: "Navidad|Decoración Interior|Mallas y Listones",
|
|
142
|
+
upc: "214715",
|
|
143
|
+
id_article: 127595,
|
|
144
|
+
id_order: 8086,
|
|
145
|
+
},
|
|
63
146
|
},
|
|
64
147
|
location: {
|
|
65
148
|
pathname: "/EditProducts",
|
|
@@ -73,21 +156,21 @@ ProviderProductEditionDefault.args = {
|
|
|
73
156
|
key: "24vwut",
|
|
74
157
|
},
|
|
75
158
|
user: {
|
|
76
|
-
id_user:
|
|
77
|
-
name: "Proveedor
|
|
78
|
-
last_name: "
|
|
79
|
-
email: "
|
|
80
|
-
position: "
|
|
81
|
-
telephone: "
|
|
159
|
+
id_user: 419,
|
|
160
|
+
name: "Proveedor",
|
|
161
|
+
last_name: "Prueba",
|
|
162
|
+
email: "liman74026@mnqlm.com",
|
|
163
|
+
position: "Cliente",
|
|
164
|
+
telephone: "5539006570",
|
|
82
165
|
country: "México",
|
|
83
|
-
id_company:
|
|
84
|
-
id_cognito: "
|
|
85
|
-
birth_Date:
|
|
166
|
+
id_company: 535,
|
|
167
|
+
id_cognito: "62379e99-5296-4add-8927-5c56facd9dbc",
|
|
168
|
+
birth_Date: "2021-08-30T00:00:00.000Z",
|
|
86
169
|
about_me: null,
|
|
87
|
-
zip_code:
|
|
88
|
-
address:
|
|
170
|
+
zip_code: "53000",
|
|
171
|
+
address: "Av 16 de Septiembre #27",
|
|
89
172
|
job: null,
|
|
90
|
-
id_stripe:
|
|
173
|
+
id_stripe: "cus_KBCZoGEdXpxqVS",
|
|
91
174
|
id_role: 0,
|
|
92
175
|
active: 1,
|
|
93
176
|
is_retailer: 0,
|
|
@@ -95,24 +178,24 @@ ProviderProductEditionDefault.args = {
|
|
|
95
178
|
is_user_tech: null,
|
|
96
179
|
is_onboarding: 0,
|
|
97
180
|
membership: {
|
|
98
|
-
id:
|
|
99
|
-
start_date: "
|
|
100
|
-
end_date: "
|
|
181
|
+
id: 1119,
|
|
182
|
+
start_date: "2022-06-20T13:35:19.000Z",
|
|
183
|
+
end_date: "2022-06-20T08:35:10.000Z",
|
|
101
184
|
planID: 8,
|
|
102
|
-
plan: "
|
|
185
|
+
plan: "prod_KvGeJs0E9cSO4y",
|
|
103
186
|
name: "Plan Pro",
|
|
104
187
|
user_limit: "50",
|
|
105
188
|
products_limit: "5000",
|
|
106
189
|
type: "Enterprise",
|
|
107
190
|
},
|
|
108
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
191
|
+
src: "https://content-management-profile-prod.s3.amazonaws.com/id-419/419.png?1718820261153",
|
|
109
192
|
},
|
|
110
193
|
company: {
|
|
111
|
-
id_company:
|
|
112
|
-
trade_name: "
|
|
113
|
-
company_name: "
|
|
114
|
-
rfc:
|
|
115
|
-
adress:
|
|
194
|
+
id_company: 535,
|
|
195
|
+
trade_name: "THD IMPORTACIONES",
|
|
196
|
+
company_name: "THD IMPORTACIONES",
|
|
197
|
+
rfc: null,
|
|
198
|
+
adress: null,
|
|
116
199
|
about_company: null,
|
|
117
200
|
telephone: null,
|
|
118
201
|
web_site: null,
|
|
@@ -122,22 +205,34 @@ ProviderProductEditionDefault.args = {
|
|
|
122
205
|
is_retailer: 0,
|
|
123
206
|
financedRetailers: [
|
|
124
207
|
{
|
|
125
|
-
id:
|
|
126
|
-
name: "
|
|
208
|
+
id: 58,
|
|
209
|
+
name: "The Home Depot Golden",
|
|
210
|
+
country: "México",
|
|
211
|
+
id_region: 1,
|
|
212
|
+
active: 1,
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
id: 59,
|
|
216
|
+
name: "The Home Depot Platinum",
|
|
127
217
|
country: "México",
|
|
128
218
|
id_region: 1,
|
|
129
219
|
active: 1,
|
|
130
|
-
flow: 1,
|
|
131
220
|
},
|
|
132
221
|
],
|
|
133
222
|
retailers: [
|
|
134
223
|
{
|
|
135
|
-
id:
|
|
136
|
-
name: "
|
|
224
|
+
id: 58,
|
|
225
|
+
name: "The Home Depot Golden",
|
|
226
|
+
country: "México",
|
|
227
|
+
id_region: 1,
|
|
228
|
+
active: 1,
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
id: 59,
|
|
232
|
+
name: "The Home Depot Platinum",
|
|
137
233
|
country: "México",
|
|
138
234
|
id_region: 1,
|
|
139
235
|
active: 1,
|
|
140
|
-
flow: 1,
|
|
141
236
|
},
|
|
142
237
|
],
|
|
143
238
|
},
|
|
@@ -914,19 +914,33 @@ export const ProviderProductEdition = ({
|
|
|
914
914
|
}
|
|
915
915
|
};
|
|
916
916
|
|
|
917
|
-
const createComment = async (
|
|
917
|
+
const createComment = async (e, body, tab) => {
|
|
918
|
+
let concept = "";
|
|
919
|
+
switch (activeTab) {
|
|
920
|
+
case "Ficha técnica":
|
|
921
|
+
concept = "datasheet";
|
|
922
|
+
break;
|
|
923
|
+
case "Imágenes":
|
|
924
|
+
concept = "images";
|
|
925
|
+
break;
|
|
926
|
+
|
|
927
|
+
default:
|
|
928
|
+
concept = "description";
|
|
929
|
+
break;
|
|
930
|
+
}
|
|
918
931
|
const data = {
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
status: product.status || productEdit.product.status,
|
|
925
|
-
},
|
|
926
|
-
paramsHeader: { Authorization: token },
|
|
932
|
+
articleId: product?.id_article,
|
|
933
|
+
orderId: product?.orderId,
|
|
934
|
+
message: body,
|
|
935
|
+
concept: concept,
|
|
936
|
+
version: version,
|
|
927
937
|
};
|
|
928
|
-
|
|
929
|
-
|
|
938
|
+
console.log('comentario:', data.message);
|
|
939
|
+
await axios.post(`${process.env.REACT_APP_COMMENTS_ENDPOINT}`, data, {
|
|
940
|
+
headers: {
|
|
941
|
+
Authorization: token,
|
|
942
|
+
},
|
|
943
|
+
});
|
|
930
944
|
};
|
|
931
945
|
|
|
932
946
|
useEffect(() => {
|
|
@@ -1590,41 +1604,88 @@ export const ProviderProductEdition = ({
|
|
|
1590
1604
|
</>
|
|
1591
1605
|
)}
|
|
1592
1606
|
</div>
|
|
1593
|
-
{
|
|
1594
|
-
<div className="
|
|
1595
|
-
|
|
1596
|
-
<
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
<
|
|
1607
|
-
|
|
1608
|
-
|
|
1607
|
+
{isRevision() && getSectionStatus() ? (
|
|
1608
|
+
<div className="commentary-box">
|
|
1609
|
+
{!comment ? (
|
|
1610
|
+
<div className="commentary">
|
|
1611
|
+
<TagAndInput
|
|
1612
|
+
label={"Caja de Comentario"}
|
|
1613
|
+
inputType={"textarea"}
|
|
1614
|
+
inputCols={80}
|
|
1615
|
+
inputRows={4}
|
|
1616
|
+
inputId={"commentary-box"}
|
|
1617
|
+
index={0}
|
|
1618
|
+
/>
|
|
1619
|
+
<div className="buttons-box">
|
|
1620
|
+
<Button
|
|
1621
|
+
buttonType={"general-transparent-button"}
|
|
1622
|
+
label={"Enviar comentario"}
|
|
1623
|
+
onClick={(e) =>{
|
|
1624
|
+
createComment(
|
|
1625
|
+
e,
|
|
1626
|
+
document.querySelector(
|
|
1627
|
+
"#commentary-box .ql-container .ql-editor > p"
|
|
1628
|
+
).innerHTML,
|
|
1629
|
+
activeTab
|
|
1630
|
+
)
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
/>
|
|
1634
|
+
</div>
|
|
1635
|
+
</div>
|
|
1609
1636
|
) : (
|
|
1610
|
-
|
|
1611
|
-
<
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
iconSize={"big-image"}
|
|
1615
|
-
slidePosition={"top-slide"}
|
|
1637
|
+
<div className="feedback-box">
|
|
1638
|
+
<Commentary
|
|
1639
|
+
comment={comment.message}
|
|
1640
|
+
reviewed={crossComment}
|
|
1616
1641
|
/>
|
|
1617
1642
|
<Button
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1643
|
+
buttonType={"circular-button accept-button"}
|
|
1644
|
+
onClick={async () => {
|
|
1645
|
+
setCrossComment(true);
|
|
1646
|
+
commentRevised();
|
|
1621
1647
|
}}
|
|
1622
|
-
buttonType="general-default-button"
|
|
1623
|
-
label="Enviar a Content-oh!"
|
|
1624
1648
|
/>
|
|
1625
|
-
|
|
1649
|
+
</div>
|
|
1626
1650
|
)}
|
|
1627
1651
|
</div>
|
|
1652
|
+
) : (
|
|
1653
|
+
!revision && (
|
|
1654
|
+
<div className="required-inputs-message">
|
|
1655
|
+
<div>
|
|
1656
|
+
<p>
|
|
1657
|
+
Los atributos son requeridos por las plataformas de las
|
|
1658
|
+
cadenas, es muy importante completar los campos requeridos
|
|
1659
|
+
ya que pueden rechazar el producto por falta de información.
|
|
1660
|
+
</p>
|
|
1661
|
+
</div>
|
|
1662
|
+
{inCart ? (
|
|
1663
|
+
<button type="button">
|
|
1664
|
+
<Link to="/checkout">
|
|
1665
|
+
<p>Articulo en carrito</p>
|
|
1666
|
+
<p>Ir a checkout</p>
|
|
1667
|
+
</Link>
|
|
1668
|
+
</button>
|
|
1669
|
+
) : (
|
|
1670
|
+
<>
|
|
1671
|
+
<SliderToolTip
|
|
1672
|
+
infoIcon={InfoIcon}
|
|
1673
|
+
slidefront={slidefront}
|
|
1674
|
+
iconSize={"big-image"}
|
|
1675
|
+
slidePosition={"top-slide"}
|
|
1676
|
+
/>
|
|
1677
|
+
<Button
|
|
1678
|
+
onClick={() => {
|
|
1679
|
+
setShowContentohRequestModal &&
|
|
1680
|
+
setShowContentohRequestModal(true);
|
|
1681
|
+
}}
|
|
1682
|
+
buttonType="general-default-button"
|
|
1683
|
+
label="Enviar a Content-oh!"
|
|
1684
|
+
/>
|
|
1685
|
+
</>
|
|
1686
|
+
)}
|
|
1687
|
+
</div>
|
|
1688
|
+
)
|
|
1628
1689
|
)}
|
|
1629
1690
|
</div>
|
|
1630
1691
|
</div>
|