contentoh-components-library 21.5.22 → 21.5.24
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 +40 -26
- 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 +102 -41
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +23 -23
- package/src/components/pages/RetailerProductEdition/index.js +36 -20
|
@@ -31,44 +31,125 @@ ProviderProductEditionDefault.args = {
|
|
|
31
31
|
"Ficha técnica": true,
|
|
32
32
|
Imágenes: true
|
|
33
33
|
},
|
|
34
|
-
token: "
|
|
35
|
-
articleId:
|
|
36
|
-
category:
|
|
37
|
-
version:
|
|
34
|
+
token: "eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI2MjM3OWU5OS01Mjk2LTRhZGQtODkyNy01YzU2ZmFjZDlkYmMiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfbFN6UVo0WjdSIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6IjYyMzc5ZTk5LTUyOTYtNGFkZC04OTI3LTVjNTZmYWNkOWRiYyIsImF1ZCI6IjUyZDlza2tkY2c4cWpwODhvb2sxdXNlNm1rIiwiZXZlbnRfaWQiOiJjN2U0YjlkNy0xMDE5LTQwYzgtYTRhNy00Y2E2NDNhYWI4NmMiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTcxODkxMjczOSwibmFtZSI6IlByb3ZlZWRvciBQcnVlYmEiLCJwaG9uZV9udW1iZXIiOiIrNTI1NTM5MDA2NTcwIiwiZXhwIjoxNzE4OTE2MzM5LCJpYXQiOjE3MTg5MTI3MzksImVtYWlsIjoibGltYW43NDAyNkBtbnFsbS5jb20ifQ.V31vBoxceYYzeTSG6AQaKlSHxsyvGqyjs2Rb4iX0bXc-CEVREWhrz4Nw2GfzY41dW8v5vMTEkaqGpY3uAN9aR4VTiZNSkKXX4NYnVO83q0VGZEOQmpHeHgBXM_fm7FSKBfGDuECskT30Mlb3YFbcUYbpd9SzLrRPDWRQjSzJJ8ol4mlpXBJv6qrdoMWWa2lM_A2Rw-7A9ILrygICUp5233TZkS7b7JhSWyOpqhJZCrwWxjgvTn8mdiByPB8qQv-R0haPUsEAddnoRrjfSqnMxuyfFYuoPUcokjrz-NUO7JihidkA9fxZG4yHsxhyQbwhgaEeOxm0X-BB_pOmJ8X5wg",
|
|
35
|
+
articleId: 127595,
|
|
36
|
+
category: "2902",
|
|
37
|
+
version: 3,
|
|
38
38
|
productSelected: {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
orderId: 8086,
|
|
40
|
+
status: "AA",
|
|
41
|
+
datasheet_status: "AA",
|
|
42
|
+
prio: "none",
|
|
43
|
+
version: 3,
|
|
44
|
+
description_status: "AA",
|
|
45
|
+
images_status: "AA",
|
|
46
|
+
brand: null,
|
|
47
|
+
retailerOrder: 0,
|
|
48
|
+
missing: {
|
|
49
|
+
datasheet: null,
|
|
50
|
+
descriptions: null,
|
|
51
|
+
images: null
|
|
52
|
+
},
|
|
53
|
+
services: {
|
|
54
|
+
datasheets: 1,
|
|
55
|
+
descriptions: 1,
|
|
56
|
+
images: 1
|
|
57
|
+
},
|
|
58
|
+
article: {
|
|
59
|
+
category: "Navidad|Decoración Interior|Mallas y Listones",
|
|
60
|
+
company_name: "THD IMPORTACIONES",
|
|
61
|
+
country: null,
|
|
62
|
+
id_category: "2902",
|
|
63
|
+
id_datasheet_especialist: 2757,
|
|
64
|
+
id_datasheet_facilitator: null,
|
|
65
|
+
id_description_especialist: 2757,
|
|
66
|
+
id_description_facilitator: null,
|
|
67
|
+
id_images_especialist: 1259,
|
|
68
|
+
id_images_facilitator: null,
|
|
69
|
+
id_order: 8086,
|
|
70
|
+
id_article: 127595,
|
|
71
|
+
id_auditor: 514,
|
|
72
|
+
name: "LISTON DECORATIVO DISNEY 5M 2 ESTILOS",
|
|
73
|
+
timestamp: "2024-06-05T14:30:33.000Z",
|
|
74
|
+
upc: "214715"
|
|
75
|
+
},
|
|
76
|
+
retailers: [{
|
|
77
|
+
id: 58
|
|
78
|
+
}],
|
|
79
|
+
statusByRetailer: {
|
|
80
|
+
"58": {
|
|
81
|
+
datasheet: "AA",
|
|
82
|
+
description: "AA",
|
|
83
|
+
images: "AA"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
47
86
|
retailersAvailable: [{
|
|
48
|
-
|
|
49
|
-
id: 74
|
|
87
|
+
id: 58
|
|
50
88
|
}],
|
|
51
|
-
|
|
89
|
+
categoryName: "Navidad|Decoración Interior|Mallas y Listones",
|
|
90
|
+
upc: "214715",
|
|
91
|
+
id_article: 127595,
|
|
92
|
+
id_order: 8086
|
|
52
93
|
},
|
|
53
94
|
productToEdit: {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
product:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
95
|
+
ArticleId: 127595,
|
|
96
|
+
idCategory: "2902",
|
|
97
|
+
product: {
|
|
98
|
+
orderId: 8086,
|
|
99
|
+
status: "AA",
|
|
100
|
+
datasheet_status: "AA",
|
|
101
|
+
prio: "none",
|
|
102
|
+
version: 3,
|
|
103
|
+
description_status: "AA",
|
|
104
|
+
images_status: "AA",
|
|
105
|
+
brand: null,
|
|
106
|
+
retailerOrder: 0,
|
|
107
|
+
missing: {
|
|
108
|
+
datasheet: null,
|
|
109
|
+
descriptions: null,
|
|
110
|
+
images: null
|
|
111
|
+
},
|
|
112
|
+
services: {
|
|
113
|
+
datasheets: 1,
|
|
114
|
+
descriptions: 1,
|
|
115
|
+
images: 1
|
|
116
|
+
},
|
|
117
|
+
article: {
|
|
118
|
+
category: "Navidad|Decoración Interior|Mallas y Listones",
|
|
119
|
+
company_name: "THD IMPORTACIONES",
|
|
120
|
+
country: null,
|
|
121
|
+
id_category: "2902",
|
|
122
|
+
id_datasheet_especialist: 2757,
|
|
123
|
+
id_datasheet_facilitator: null,
|
|
124
|
+
id_description_especialist: 2757,
|
|
125
|
+
id_description_facilitator: null,
|
|
126
|
+
id_images_especialist: 1259,
|
|
127
|
+
id_images_facilitator: null,
|
|
128
|
+
id_order: 8086,
|
|
129
|
+
id_article: 127595,
|
|
130
|
+
id_auditor: 514,
|
|
131
|
+
name: "LISTON DECORATIVO DISNEY 5M 2 ESTILOS",
|
|
132
|
+
timestamp: "2024-06-05T14:30:33.000Z",
|
|
133
|
+
upc: "214715"
|
|
134
|
+
},
|
|
135
|
+
retailers: [{
|
|
136
|
+
id: 58
|
|
137
|
+
}],
|
|
138
|
+
statusByRetailer: {
|
|
139
|
+
"58": {
|
|
140
|
+
datasheet: "AA",
|
|
141
|
+
description: "AA",
|
|
142
|
+
images: "AA"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
65
145
|
retailersAvailable: [{
|
|
66
|
-
|
|
67
|
-
id: 74,
|
|
68
|
-
percentage: 100
|
|
146
|
+
id: 58
|
|
69
147
|
}],
|
|
70
|
-
|
|
71
|
-
|
|
148
|
+
categoryName: "Navidad|Decoración Interior|Mallas y Listones",
|
|
149
|
+
upc: "214715",
|
|
150
|
+
id_article: 127595,
|
|
151
|
+
id_order: 8086
|
|
152
|
+
}
|
|
72
153
|
},
|
|
73
154
|
location: {
|
|
74
155
|
pathname: "/EditProducts",
|
|
@@ -82,21 +163,21 @@ ProviderProductEditionDefault.args = {
|
|
|
82
163
|
key: "24vwut"
|
|
83
164
|
},
|
|
84
165
|
user: {
|
|
85
|
-
id_user:
|
|
86
|
-
name: "Proveedor
|
|
87
|
-
last_name: "
|
|
88
|
-
email: "
|
|
89
|
-
position: "
|
|
90
|
-
telephone: "
|
|
166
|
+
id_user: 419,
|
|
167
|
+
name: "Proveedor",
|
|
168
|
+
last_name: "Prueba",
|
|
169
|
+
email: "liman74026@mnqlm.com",
|
|
170
|
+
position: "Cliente",
|
|
171
|
+
telephone: "5539006570",
|
|
91
172
|
country: "México",
|
|
92
|
-
id_company:
|
|
93
|
-
id_cognito: "
|
|
94
|
-
birth_Date:
|
|
173
|
+
id_company: 535,
|
|
174
|
+
id_cognito: "62379e99-5296-4add-8927-5c56facd9dbc",
|
|
175
|
+
birth_Date: "2021-08-30T00:00:00.000Z",
|
|
95
176
|
about_me: null,
|
|
96
|
-
zip_code:
|
|
97
|
-
address:
|
|
177
|
+
zip_code: "53000",
|
|
178
|
+
address: "Av 16 de Septiembre #27",
|
|
98
179
|
job: null,
|
|
99
|
-
id_stripe:
|
|
180
|
+
id_stripe: "cus_KBCZoGEdXpxqVS",
|
|
100
181
|
id_role: 0,
|
|
101
182
|
active: 1,
|
|
102
183
|
is_retailer: 0,
|
|
@@ -104,24 +185,24 @@ ProviderProductEditionDefault.args = {
|
|
|
104
185
|
is_user_tech: null,
|
|
105
186
|
is_onboarding: 0,
|
|
106
187
|
membership: {
|
|
107
|
-
id:
|
|
108
|
-
start_date: "
|
|
109
|
-
end_date: "
|
|
188
|
+
id: 1119,
|
|
189
|
+
start_date: "2022-06-20T13:35:19.000Z",
|
|
190
|
+
end_date: "2022-06-20T08:35:10.000Z",
|
|
110
191
|
planID: 8,
|
|
111
|
-
plan: "
|
|
192
|
+
plan: "prod_KvGeJs0E9cSO4y",
|
|
112
193
|
name: "Plan Pro",
|
|
113
194
|
user_limit: "50",
|
|
114
195
|
products_limit: "5000",
|
|
115
196
|
type: "Enterprise"
|
|
116
197
|
},
|
|
117
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
198
|
+
src: "https://content-management-profile-prod.s3.amazonaws.com/id-419/419.png?1718820261153"
|
|
118
199
|
},
|
|
119
200
|
company: {
|
|
120
|
-
id_company:
|
|
121
|
-
trade_name: "
|
|
122
|
-
company_name: "
|
|
123
|
-
rfc:
|
|
124
|
-
adress:
|
|
201
|
+
id_company: 535,
|
|
202
|
+
trade_name: "THD IMPORTACIONES",
|
|
203
|
+
company_name: "THD IMPORTACIONES",
|
|
204
|
+
rfc: null,
|
|
205
|
+
adress: null,
|
|
125
206
|
about_company: null,
|
|
126
207
|
telephone: null,
|
|
127
208
|
web_site: null,
|
|
@@ -130,20 +211,30 @@ ProviderProductEditionDefault.args = {
|
|
|
130
211
|
social_link: null,
|
|
131
212
|
is_retailer: 0,
|
|
132
213
|
financedRetailers: [{
|
|
133
|
-
id:
|
|
134
|
-
name: "
|
|
214
|
+
id: 58,
|
|
215
|
+
name: "The Home Depot Golden",
|
|
216
|
+
country: "México",
|
|
217
|
+
id_region: 1,
|
|
218
|
+
active: 1
|
|
219
|
+
}, {
|
|
220
|
+
id: 59,
|
|
221
|
+
name: "The Home Depot Platinum",
|
|
135
222
|
country: "México",
|
|
136
223
|
id_region: 1,
|
|
137
|
-
active: 1
|
|
138
|
-
flow: 1
|
|
224
|
+
active: 1
|
|
139
225
|
}],
|
|
140
226
|
retailers: [{
|
|
141
|
-
id:
|
|
142
|
-
name: "
|
|
227
|
+
id: 58,
|
|
228
|
+
name: "The Home Depot Golden",
|
|
229
|
+
country: "México",
|
|
230
|
+
id_region: 1,
|
|
231
|
+
active: 1
|
|
232
|
+
}, {
|
|
233
|
+
id: 59,
|
|
234
|
+
name: "The Home Depot Platinum",
|
|
143
235
|
country: "México",
|
|
144
236
|
id_region: 1,
|
|
145
|
-
active: 1
|
|
146
|
-
flow: 1
|
|
237
|
+
active: 1
|
|
147
238
|
}]
|
|
148
239
|
},
|
|
149
240
|
showSurvey: function showSurvey(v) {
|
|
@@ -1562,33 +1562,45 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1562
1562
|
};
|
|
1563
1563
|
|
|
1564
1564
|
var createComment = /*#__PURE__*/function () {
|
|
1565
|
-
var _ref16 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
|
|
1566
|
-
var
|
|
1567
|
-
retailerId,
|
|
1568
|
-
data,
|
|
1569
|
-
_args15 = arguments;
|
|
1565
|
+
var _ref16 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15(body) {
|
|
1566
|
+
var concept, data;
|
|
1570
1567
|
return _regenerator.default.wrap(function _callee15$(_context15) {
|
|
1571
1568
|
while (1) {
|
|
1572
1569
|
switch (_context15.prev = _context15.next) {
|
|
1573
1570
|
case 0:
|
|
1574
|
-
|
|
1575
|
-
|
|
1571
|
+
concept = "";
|
|
1572
|
+
_context15.t0 = activeTab;
|
|
1573
|
+
_context15.next = _context15.t0 === "Ficha técnica" ? 4 : _context15.t0 === "Imágenes" ? 6 : 8;
|
|
1574
|
+
break;
|
|
1575
|
+
|
|
1576
|
+
case 4:
|
|
1577
|
+
concept = "datasheet";
|
|
1578
|
+
return _context15.abrupt("break", 10);
|
|
1579
|
+
|
|
1580
|
+
case 6:
|
|
1581
|
+
concept = "images";
|
|
1582
|
+
return _context15.abrupt("break", 10);
|
|
1583
|
+
|
|
1584
|
+
case 8:
|
|
1585
|
+
concept = "description";
|
|
1586
|
+
return _context15.abrupt("break", 10);
|
|
1587
|
+
|
|
1588
|
+
case 10:
|
|
1576
1589
|
data = {
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1590
|
+
articleId: product === null || product === void 0 ? void 0 : product.id_article,
|
|
1591
|
+
orderId: product === null || product === void 0 ? void 0 : product.orderId,
|
|
1592
|
+
message: body,
|
|
1593
|
+
concept: concept,
|
|
1594
|
+
version: version
|
|
1595
|
+
};
|
|
1596
|
+
_context15.next = 13;
|
|
1597
|
+
return _axios.default.post("".concat(process.env.REACT_APP_COMMENTS_ENDPOINT), data, {
|
|
1598
|
+
headers: {
|
|
1585
1599
|
Authorization: token
|
|
1586
1600
|
}
|
|
1587
|
-
};
|
|
1588
|
-
setMessage("");
|
|
1589
|
-
return _context15.abrupt("return", (0, _utils.sendMessage)(data));
|
|
1601
|
+
});
|
|
1590
1602
|
|
|
1591
|
-
case
|
|
1603
|
+
case 13:
|
|
1592
1604
|
case "end":
|
|
1593
1605
|
return _context15.stop();
|
|
1594
1606
|
}
|
|
@@ -1596,7 +1608,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1596
1608
|
}, _callee15);
|
|
1597
1609
|
}));
|
|
1598
1610
|
|
|
1599
|
-
return function createComment() {
|
|
1611
|
+
return function createComment(_x4) {
|
|
1600
1612
|
return _ref16.apply(this, arguments);
|
|
1601
1613
|
};
|
|
1602
1614
|
}();
|
|
@@ -1695,7 +1707,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1695
1707
|
}, _callee17);
|
|
1696
1708
|
}));
|
|
1697
1709
|
|
|
1698
|
-
return function setAssignation(
|
|
1710
|
+
return function setAssignation(_x5, _x6) {
|
|
1699
1711
|
return _ref18.apply(this, arguments);
|
|
1700
1712
|
};
|
|
1701
1713
|
}();
|
|
@@ -1884,7 +1896,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1884
1896
|
}, _callee18, null, [[9, 33]]);
|
|
1885
1897
|
}));
|
|
1886
1898
|
|
|
1887
|
-
return function sendEvaluation(
|
|
1899
|
+
return function sendEvaluation(_x7) {
|
|
1888
1900
|
return _ref19.apply(this, arguments);
|
|
1889
1901
|
};
|
|
1890
1902
|
}();
|
|
@@ -1975,7 +1987,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1975
1987
|
}, _callee19, null, [[0, 27]]);
|
|
1976
1988
|
}));
|
|
1977
1989
|
|
|
1978
|
-
return function validateAll(
|
|
1990
|
+
return function validateAll(_x8) {
|
|
1979
1991
|
return _ref20.apply(this, arguments);
|
|
1980
1992
|
};
|
|
1981
1993
|
}();
|
|
@@ -2022,7 +2034,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2022
2034
|
}, _callee20);
|
|
2023
2035
|
}));
|
|
2024
2036
|
|
|
2025
|
-
return function evaluationToRetailer(
|
|
2037
|
+
return function evaluationToRetailer(_x9) {
|
|
2026
2038
|
return _ref21.apply(this, arguments);
|
|
2027
2039
|
};
|
|
2028
2040
|
}();
|
|
@@ -2332,7 +2344,9 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2332
2344
|
headerType: "input-name-header"
|
|
2333
2345
|
}))]
|
|
2334
2346
|
})
|
|
2335
|
-
}),
|
|
2347
|
+
}), isRevision() && getSectionStatus() ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
2348
|
+
className: "commentary-box"
|
|
2349
|
+
}) : !revision && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2336
2350
|
className: "required-inputs-message",
|
|
2337
2351
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
2338
2352
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
@@ -2424,7 +2438,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2424
2438
|
value: body === null || body === void 0 ? void 0 : body.replace(/<.*?\/?>/gm, "")
|
|
2425
2439
|
}];
|
|
2426
2440
|
_context21.next = 4;
|
|
2427
|
-
return createComment(messages
|
|
2441
|
+
return createComment(messages[0].value);
|
|
2428
2442
|
|
|
2429
2443
|
case 4:
|
|
2430
2444
|
validatedAll ? validateAll("R") : sendToEvaluation("R");
|
|
@@ -31,49 +31,49 @@ RetailerProductEditionDefault.args = {
|
|
|
31
31
|
"Ficha técnica": false,
|
|
32
32
|
Imágenes: false
|
|
33
33
|
},
|
|
34
|
-
token: "eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.
|
|
34
|
+
token: "eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJmNGRiODI2My1jYjA1LTQzMTItOWU0NS1lM2RlY2E2NjllNzIiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfbFN6UVo0WjdSIiwiY29nbml0bzp1c2VybmFtZSI6ImY0ZGI4MjYzLWNiMDUtNDMxMi05ZTQ1LWUzZGVjYTY2OWU3MiIsImF1ZCI6IjUyZDlza2tkY2c4cWpwODhvb2sxdXNlNm1rIiwiZXZlbnRfaWQiOiIwZGZkNTRmZC1lMjU1LTRkNmEtYmE1ZS1hYzdjYWM2NjY0NzciLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTcxODgxMjc1MSwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTcxODgxNjM1MCwiaWF0IjoxNzE4ODEyNzUxLCJlbWFpbCI6ImVtb250YW5vQGNvbnRlbnRvaC5jb20ifQ.eruTcERQql3d7XO5LWbmTAOgrU7avQQ-GN3iiRGuVYUmI1tqMsHxWVsxC8T3QMBkZFL9djpMaOvw53Fc_Gl84WKPr9pmECDsqUkgXKJZxHE5jsRJjsyAd9pdJ00jYdeWePoitxYazBR9TW0TofiB7L5F9b_gjZrGdoAzz1gQvWABL_eGYxrGfJCoNBzxbU8zAIfPJV6u6PR98rumtMVWHW_FyzpZnNKSiP4rEkG7H9cW-Mdzl39seeHQRo9SNht55tnlPkXi7jN6R-AOGhgK0yBHgAwVBbv3aT_TDArXEiXFUFG9viCIq7H6lRvCaXEmJoKnOZOCbpX1y3QI8ayMVQ",
|
|
35
35
|
productSelected: {
|
|
36
36
|
services: {
|
|
37
37
|
datasheets: 1,
|
|
38
38
|
descriptions: 1,
|
|
39
39
|
images: 1
|
|
40
40
|
},
|
|
41
|
-
orderId:
|
|
41
|
+
orderId: 8086,
|
|
42
42
|
status: "RP",
|
|
43
43
|
datasheet_status: "AA",
|
|
44
44
|
prio: "none",
|
|
45
45
|
version: 3,
|
|
46
|
-
description_status: "
|
|
47
|
-
images_status: "
|
|
46
|
+
description_status: "AA",
|
|
47
|
+
images_status: "RA",
|
|
48
48
|
statusByRetailer: {
|
|
49
49
|
"58": {
|
|
50
50
|
datasheet: "AA",
|
|
51
|
-
description: "
|
|
52
|
-
images: "
|
|
51
|
+
description: "AA",
|
|
52
|
+
images: "RA/CA"
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
article: {
|
|
56
|
-
id_article:
|
|
57
|
-
id_category: "
|
|
58
|
-
name: "
|
|
59
|
-
upc: "
|
|
60
|
-
timestamp: "2024-
|
|
61
|
-
id_user:
|
|
56
|
+
id_article: 127595,
|
|
57
|
+
id_category: "2902",
|
|
58
|
+
name: "LISTON DECORATIVO DISNEY 5M 2 ESTILOS",
|
|
59
|
+
upc: "214715",
|
|
60
|
+
timestamp: "2024-06-05T14:29:41.000Z",
|
|
61
|
+
id_user: 673,
|
|
62
62
|
status: null,
|
|
63
63
|
active: 1,
|
|
64
|
-
company_id:
|
|
65
|
-
company_name: "
|
|
66
|
-
country:
|
|
67
|
-
id_order:
|
|
64
|
+
company_id: 535,
|
|
65
|
+
company_name: "THD IMPORTACIONES",
|
|
66
|
+
country: null,
|
|
67
|
+
id_order: 8086,
|
|
68
68
|
id_datasheet_especialist: 2757,
|
|
69
69
|
id_datasheet_facilitator: null,
|
|
70
70
|
id_description_especialist: 2757,
|
|
71
71
|
id_description_facilitator: null,
|
|
72
|
-
id_images_especialist:
|
|
72
|
+
id_images_especialist: 1259,
|
|
73
73
|
id_images_facilitator: null,
|
|
74
74
|
id_auditor: 514,
|
|
75
75
|
id_recepcionist: null,
|
|
76
|
-
category: "
|
|
76
|
+
category: "Navidad|Decoración Interior|Mallas y Listones",
|
|
77
77
|
missingAttributes: 0,
|
|
78
78
|
missingDescriptions: 0,
|
|
79
79
|
missingImages: 0
|
|
@@ -82,8 +82,8 @@ RetailerProductEditionDefault.args = {
|
|
|
82
82
|
id: 58,
|
|
83
83
|
name: "The Home Depot Golden"
|
|
84
84
|
}],
|
|
85
|
-
country: "
|
|
86
|
-
upc: "
|
|
85
|
+
country: "",
|
|
86
|
+
upc: "214715"
|
|
87
87
|
},
|
|
88
88
|
// location: {
|
|
89
89
|
// product: { articleId: 126855, versionId: 3 },
|
|
@@ -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.eyJzdWIiOiI2MjM3OWU5OS01Mjk2LTRhZGQtODkyNy01YzU2ZmFjZDlkYmMiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfbFN6UVo0WjdSIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6IjYyMzc5ZTk5LTUyOTYtNGFkZC04OTI3LTVjNTZmYWNkOWRiYyIsImF1ZCI6IjUyZDlza2tkY2c4cWpwODhvb2sxdXNlNm1rIiwiZXZlbnRfaWQiOiJjN2U0YjlkNy0xMDE5LTQwYzgtYTRhNy00Y2E2NDNhYWI4NmMiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTcxODkxMjczOSwibmFtZSI6IlByb3ZlZWRvciBQcnVlYmEiLCJwaG9uZV9udW1iZXIiOiIrNTI1NTM5MDA2NTcwIiwiZXhwIjoxNzE4OTE2MzM5LCJpYXQiOjE3MTg5MTI3MzksImVtYWlsIjoibGltYW43NDAyNkBtbnFsbS5jb20ifQ.V31vBoxceYYzeTSG6AQaKlSHxsyvGqyjs2Rb4iX0bXc-CEVREWhrz4Nw2GfzY41dW8v5vMTEkaqGpY3uAN9aR4VTiZNSkKXX4NYnVO83q0VGZEOQmpHeHgBXM_fm7FSKBfGDuECskT30Mlb3YFbcUYbpd9SzLrRPDWRQjSzJJ8ol4mlpXBJv6qrdoMWWa2lM_A2Rw-7A9ILrygICUp5233TZkS7b7JhSWyOpqhJZCrwWxjgvTn8mdiByPB8qQv-R0haPUsEAddnoRrjfSqnMxuyfFYuoPUcokjrz-NUO7JihidkA9fxZG4yHsxhyQbwhgaEeOxm0X-BB_pOmJ8X5wg",
|
|
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,32 @@ export const ProviderProductEdition = ({
|
|
|
914
914
|
}
|
|
915
915
|
};
|
|
916
916
|
|
|
917
|
-
const createComment = async (
|
|
917
|
+
const createComment = async (body) => {
|
|
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
|
+
await axios.post(`${process.env.REACT_APP_COMMENTS_ENDPOINT}`, data, {
|
|
939
|
+
headers: {
|
|
940
|
+
Authorization: token,
|
|
941
|
+
},
|
|
942
|
+
});
|
|
930
943
|
};
|
|
931
944
|
|
|
932
945
|
useEffect(() => {
|
|
@@ -1590,41 +1603,89 @@ export const ProviderProductEdition = ({
|
|
|
1590
1603
|
</>
|
|
1591
1604
|
)}
|
|
1592
1605
|
</div>
|
|
1593
|
-
{
|
|
1594
|
-
<div className="
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1606
|
+
{isRevision() && getSectionStatus() ? (
|
|
1607
|
+
<div className="commentary-box">
|
|
1608
|
+
{/* Este lo comento porque la funcionalidad se tiene en el modal al momento de rechazar el producto */}
|
|
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
|
-
|
|
1626
|
-
)}
|
|
1649
|
+
</div>
|
|
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>
|
|
@@ -1701,7 +1762,7 @@ export const ProviderProductEdition = ({
|
|
|
1701
1762
|
const messages = [
|
|
1702
1763
|
{ type: "message", value: body?.replace(/<.*?\/?>/gm, "") },
|
|
1703
1764
|
];
|
|
1704
|
-
await createComment(messages
|
|
1765
|
+
await createComment(messages[0].value);
|
|
1705
1766
|
validatedAll ? validateAll("R") : sendToEvaluation("R");
|
|
1706
1767
|
setShowRejectModal(false);
|
|
1707
1768
|
}}
|
|
@@ -16,49 +16,49 @@ RetailerProductEditionDefault.args = {
|
|
|
16
16
|
Imágenes: false,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.
|
|
19
|
+
"eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJmNGRiODI2My1jYjA1LTQzMTItOWU0NS1lM2RlY2E2NjllNzIiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfbFN6UVo0WjdSIiwiY29nbml0bzp1c2VybmFtZSI6ImY0ZGI4MjYzLWNiMDUtNDMxMi05ZTQ1LWUzZGVjYTY2OWU3MiIsImF1ZCI6IjUyZDlza2tkY2c4cWpwODhvb2sxdXNlNm1rIiwiZXZlbnRfaWQiOiIwZGZkNTRmZC1lMjU1LTRkNmEtYmE1ZS1hYzdjYWM2NjY0NzciLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTcxODgxMjc1MSwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTcxODgxNjM1MCwiaWF0IjoxNzE4ODEyNzUxLCJlbWFpbCI6ImVtb250YW5vQGNvbnRlbnRvaC5jb20ifQ.eruTcERQql3d7XO5LWbmTAOgrU7avQQ-GN3iiRGuVYUmI1tqMsHxWVsxC8T3QMBkZFL9djpMaOvw53Fc_Gl84WKPr9pmECDsqUkgXKJZxHE5jsRJjsyAd9pdJ00jYdeWePoitxYazBR9TW0TofiB7L5F9b_gjZrGdoAzz1gQvWABL_eGYxrGfJCoNBzxbU8zAIfPJV6u6PR98rumtMVWHW_FyzpZnNKSiP4rEkG7H9cW-Mdzl39seeHQRo9SNht55tnlPkXi7jN6R-AOGhgK0yBHgAwVBbv3aT_TDArXEiXFUFG9viCIq7H6lRvCaXEmJoKnOZOCbpX1y3QI8ayMVQ",
|
|
20
20
|
productSelected: {
|
|
21
21
|
services: {
|
|
22
22
|
datasheets: 1,
|
|
23
23
|
descriptions: 1,
|
|
24
24
|
images: 1,
|
|
25
25
|
},
|
|
26
|
-
orderId:
|
|
26
|
+
orderId: 8086,
|
|
27
27
|
status: "RP",
|
|
28
28
|
datasheet_status: "AA",
|
|
29
29
|
prio: "none",
|
|
30
30
|
version: 3,
|
|
31
|
-
description_status: "
|
|
32
|
-
images_status: "
|
|
31
|
+
description_status: "AA",
|
|
32
|
+
images_status: "RA",
|
|
33
33
|
statusByRetailer: {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
"58": {
|
|
35
|
+
datasheet: "AA",
|
|
36
|
+
description: "AA",
|
|
37
|
+
images: "RA/CA",
|
|
38
|
+
},
|
|
38
39
|
},
|
|
39
|
-
},
|
|
40
40
|
article: {
|
|
41
|
-
id_article:
|
|
42
|
-
id_category: "
|
|
43
|
-
name: "
|
|
44
|
-
upc: "
|
|
45
|
-
timestamp: "2024-
|
|
46
|
-
id_user:
|
|
41
|
+
id_article: 127595,
|
|
42
|
+
id_category: "2902",
|
|
43
|
+
name: "LISTON DECORATIVO DISNEY 5M 2 ESTILOS",
|
|
44
|
+
upc: "214715",
|
|
45
|
+
timestamp: "2024-06-05T14:29:41.000Z",
|
|
46
|
+
id_user: 673,
|
|
47
47
|
status: null,
|
|
48
48
|
active: 1,
|
|
49
|
-
company_id:
|
|
50
|
-
company_name: "
|
|
51
|
-
country:
|
|
52
|
-
id_order:
|
|
49
|
+
company_id: 535,
|
|
50
|
+
company_name: "THD IMPORTACIONES",
|
|
51
|
+
country: null,
|
|
52
|
+
id_order: 8086,
|
|
53
53
|
id_datasheet_especialist: 2757,
|
|
54
54
|
id_datasheet_facilitator: null,
|
|
55
55
|
id_description_especialist: 2757,
|
|
56
56
|
id_description_facilitator: null,
|
|
57
|
-
id_images_especialist:
|
|
57
|
+
id_images_especialist: 1259,
|
|
58
58
|
id_images_facilitator: null,
|
|
59
59
|
id_auditor: 514,
|
|
60
60
|
id_recepcionist: null,
|
|
61
|
-
category: "
|
|
61
|
+
category: "Navidad|Decoración Interior|Mallas y Listones",
|
|
62
62
|
missingAttributes: 0,
|
|
63
63
|
missingDescriptions: 0,
|
|
64
64
|
missingImages: 0,
|
|
@@ -69,8 +69,8 @@ RetailerProductEditionDefault.args = {
|
|
|
69
69
|
name: "The Home Depot Golden",
|
|
70
70
|
},
|
|
71
71
|
],
|
|
72
|
-
country: "
|
|
73
|
-
upc: "
|
|
72
|
+
country: "",
|
|
73
|
+
upc: "214715",
|
|
74
74
|
}
|
|
75
75
|
,
|
|
76
76
|
// location: {
|
|
@@ -354,6 +354,15 @@ export const RetailerProductEdition = ({
|
|
|
354
354
|
setObservationVisible(false);
|
|
355
355
|
};
|
|
356
356
|
|
|
357
|
+
const handleCommentSubmit = (e) => {
|
|
358
|
+
e.preventDefault();
|
|
359
|
+
const commentText = document.querySelector(
|
|
360
|
+
"#commentary-box .ql-container .ql-editor > p"
|
|
361
|
+
).innerHTML;
|
|
362
|
+
createComment(e, commentText, activeTab);
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
|
|
357
366
|
useEffect(async () => {
|
|
358
367
|
const { id_article } = product?.article || {};
|
|
359
368
|
if (id_article)
|
|
@@ -1077,19 +1086,35 @@ export const RetailerProductEdition = ({
|
|
|
1077
1086
|
return product?.article[`id_auditor`] === user.id_user;
|
|
1078
1087
|
};
|
|
1079
1088
|
|
|
1080
|
-
const createComment = async (
|
|
1089
|
+
const createComment = async (e, body, tab) => {
|
|
1090
|
+
let concept = "";
|
|
1091
|
+
switch (activeTab) {
|
|
1092
|
+
case "Ficha técnica":
|
|
1093
|
+
concept = "datasheet";
|
|
1094
|
+
break;
|
|
1095
|
+
case "Imágenes":
|
|
1096
|
+
concept = "images";
|
|
1097
|
+
break;
|
|
1098
|
+
|
|
1099
|
+
default:
|
|
1100
|
+
concept = "description";
|
|
1101
|
+
break;
|
|
1102
|
+
}
|
|
1081
1103
|
const data = {
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
status: product.status,
|
|
1088
|
-
},
|
|
1089
|
-
paramsHeader: { Authorization: token },
|
|
1104
|
+
articleId: product?.article?.id_article,
|
|
1105
|
+
orderId: product?.orderId,
|
|
1106
|
+
message: body?.replace(/<.*?\/?>/gm, ""),
|
|
1107
|
+
concept: concept,
|
|
1108
|
+
version: version,
|
|
1090
1109
|
};
|
|
1110
|
+
await axios.post(`${process.env.REACT_APP_COMMENTS_ENDPOINT}`, data, {
|
|
1111
|
+
headers: {
|
|
1112
|
+
Authorization: token,
|
|
1113
|
+
},
|
|
1114
|
+
});
|
|
1115
|
+
await getComments(tab);
|
|
1091
1116
|
setMessage("");
|
|
1092
|
-
|
|
1117
|
+
setComponentsArray([]);
|
|
1093
1118
|
};
|
|
1094
1119
|
|
|
1095
1120
|
const getRequired = (services) => {
|
|
@@ -1341,7 +1366,6 @@ export const RetailerProductEdition = ({
|
|
|
1341
1366
|
};
|
|
1342
1367
|
|
|
1343
1368
|
useEffect(() => {
|
|
1344
|
-
console.log(servicesData, "servicesData");
|
|
1345
1369
|
let status = getRetailerStatus(servicesData, activeTab);
|
|
1346
1370
|
setRetailerStatus(status);
|
|
1347
1371
|
}, [activeTab, servicesData, activeRetailer]);
|
|
@@ -1666,15 +1690,7 @@ export const RetailerProductEdition = ({
|
|
|
1666
1690
|
<Button
|
|
1667
1691
|
buttonType={"general-transparent-button"}
|
|
1668
1692
|
label={"Enviar comentario"}
|
|
1669
|
-
onClick={
|
|
1670
|
-
createComment(
|
|
1671
|
-
e,
|
|
1672
|
-
document.querySelector(
|
|
1673
|
-
"#commentary-box .ql-container .ql-editor > p"
|
|
1674
|
-
).innerHTML,
|
|
1675
|
-
activeTab
|
|
1676
|
-
)
|
|
1677
|
-
}
|
|
1693
|
+
onClick={handleCommentSubmit}
|
|
1678
1694
|
/>
|
|
1679
1695
|
</div>
|
|
1680
1696
|
</div>
|