contentoh-components-library 21.1.22 → 21.1.25
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/ValidationPanel/index.js +26 -17
- package/dist/components/atoms/ValidationPanel/styles.js +1 -1
- package/dist/components/molecules/AvatarAndValidation/index.js +4 -2
- package/dist/components/organisms/FullProductNameHeader/index.js +3 -1
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +118 -72
- package/dist/components/pages/ProviderProductEdition/index.js +82 -14
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +58 -51
- package/dist/components/pages/RetailerProductEdition/index.js +18 -18
- package/dist/global-files/data.js +21 -12
- package/package.json +1 -1
- package/src/components/atoms/ValidationPanel/index.js +24 -14
- package/src/components/atoms/ValidationPanel/styles.js +6 -2
- package/src/components/molecules/AvatarAndValidation/index.js +2 -0
- package/src/components/organisms/FullProductNameHeader/index.js +2 -0
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +126 -73
- package/src/components/pages/ProviderProductEdition/index.js +62 -1
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +59 -51
- package/src/components/pages/RetailerProductEdition/index.js +1 -0
- package/src/global-files/data.js +32 -20
|
@@ -135,7 +135,7 @@ var myBucket = new _awsSdk.default.S3({
|
|
|
135
135
|
});
|
|
136
136
|
|
|
137
137
|
var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
138
|
-
var _product$retailers, _product$services2, _datasheets$, _datasheets$$data, _product$
|
|
138
|
+
var _product$retailers, _product$services2, _datasheets$, _datasheets$$data, _product$article14;
|
|
139
139
|
|
|
140
140
|
var tabsSections = _ref.tabsSections,
|
|
141
141
|
_ref$productSelected = _ref.productSelected,
|
|
@@ -384,7 +384,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
384
384
|
|
|
385
385
|
var loadData = /*#__PURE__*/function () {
|
|
386
386
|
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
387
|
-
var _product$article, _product$article2, _services$, _services$$values, _services;
|
|
387
|
+
var _product$article, _product$article2, _product$article3, _services$, _services$$values, _services;
|
|
388
388
|
|
|
389
389
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
390
390
|
while (1) {
|
|
@@ -392,7 +392,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
392
392
|
case 0:
|
|
393
393
|
_context.prev = 0;
|
|
394
394
|
_context.next = 3;
|
|
395
|
-
return (0, _data2.getRetailerServices)(product === null || product === void 0 ? void 0 : (_product$article = product.article) === null || _product$article === void 0 ? void 0 : _product$article.id_article,
|
|
395
|
+
return (0, _data2.getRetailerServices)(product === null || product === void 0 ? void 0 : (_product$article = product.article) === null || _product$article === void 0 ? void 0 : _product$article.id_article, product === null || product === void 0 ? void 0 : (_product$article2 = product.article) === null || _product$article2 === void 0 ? void 0 : _product$article2.category, parseInt(product === null || product === void 0 ? void 0 : (_product$article3 = product.article) === null || _product$article3 === void 0 ? void 0 : _product$article3.id_category), product === null || product === void 0 ? void 0 : product.version);
|
|
396
396
|
|
|
397
397
|
case 3:
|
|
398
398
|
_services = _context.sent;
|
|
@@ -434,7 +434,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
434
434
|
|
|
435
435
|
var getServices = /*#__PURE__*/function () {
|
|
436
436
|
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
437
|
-
var _product$
|
|
437
|
+
var _product$article4, _product$article5, _servicesResponse$dat;
|
|
438
438
|
|
|
439
439
|
var servicesResponse, parsedResponse, retailers, active;
|
|
440
440
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
@@ -442,7 +442,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
442
442
|
switch (_context2.prev = _context2.next) {
|
|
443
443
|
case 0:
|
|
444
444
|
_context2.next = 2;
|
|
445
|
-
return _axios.default.get("".concat(process.env.REACT_APP_SERVICES_ENDPOINT, "?articleId=").concat(product === null || product === void 0 ? void 0 : (_product$
|
|
445
|
+
return _axios.default.get("".concat(process.env.REACT_APP_SERVICES_ENDPOINT, "?articleId=").concat(product === null || product === void 0 ? void 0 : (_product$article4 = product.article) === null || _product$article4 === void 0 ? void 0 : _product$article4.id_article, "&orderId=").concat((product === null || product === void 0 ? void 0 : (_product$article5 = product.article) === null || _product$article5 === void 0 ? void 0 : _product$article5.id_order) || product.orderId, "&end=true"));
|
|
446
446
|
|
|
447
447
|
case 2:
|
|
448
448
|
servicesResponse = _context2.sent;
|
|
@@ -485,7 +485,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
485
485
|
|
|
486
486
|
var getComments = /*#__PURE__*/function () {
|
|
487
487
|
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
488
|
-
var _product$
|
|
488
|
+
var _product$article6, _product$article7, _product$article8;
|
|
489
489
|
|
|
490
490
|
var tab,
|
|
491
491
|
commentsResponse,
|
|
@@ -497,7 +497,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
497
497
|
case 0:
|
|
498
498
|
tab = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : "Descripción";
|
|
499
499
|
_context3.next = 3;
|
|
500
|
-
return Promise.all([_axios.default.get("".concat(process.env.REACT_APP_COMMENTS_ENDPOINT, "?articleId=").concat(product === null || product === void 0 ? void 0 : (_product$
|
|
500
|
+
return Promise.all([_axios.default.get("".concat(process.env.REACT_APP_COMMENTS_ENDPOINT, "?articleId=").concat(product === null || product === void 0 ? void 0 : (_product$article6 = product.article) === null || _product$article6 === void 0 ? void 0 : _product$article6.id_article, "&concept=description&orderIdColab=").concat(product === null || product === void 0 ? void 0 : product.orderId, "&version=").concat(version)), _axios.default.get("".concat(process.env.REACT_APP_COMMENTS_ENDPOINT, "?articleId=").concat(product === null || product === void 0 ? void 0 : (_product$article7 = product.article) === null || _product$article7 === void 0 ? void 0 : _product$article7.id_article, "&concept=datasheet&orderIdColab=").concat(product === null || product === void 0 ? void 0 : product.orderId, "&version=").concat(version)), _axios.default.get("".concat(process.env.REACT_APP_COMMENTS_ENDPOINT, "?articleId=").concat(product === null || product === void 0 ? void 0 : (_product$article8 = product.article) === null || _product$article8 === void 0 ? void 0 : _product$article8.id_article, "&concept=images&orderIdColab=").concat(product === null || product === void 0 ? void 0 : product.orderId, "&version=").concat(version))]);
|
|
501
501
|
|
|
502
502
|
case 3:
|
|
503
503
|
commentsResponse = _context3.sent;
|
|
@@ -686,7 +686,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
686
686
|
|
|
687
687
|
var saveDescriptions = /*#__PURE__*/function () {
|
|
688
688
|
var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
689
|
-
var _product$
|
|
689
|
+
var _product$article9;
|
|
690
690
|
|
|
691
691
|
var productTemp, dataObject;
|
|
692
692
|
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
@@ -696,7 +696,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
696
696
|
setLoading(true);
|
|
697
697
|
productTemp = product;
|
|
698
698
|
dataObject = {
|
|
699
|
-
articleId: product === null || product === void 0 ? void 0 : (_product$
|
|
699
|
+
articleId: product === null || product === void 0 ? void 0 : (_product$article9 = product.article) === null || _product$article9 === void 0 ? void 0 : _product$article9.id_article,
|
|
700
700
|
articleData: updatedDescriptions
|
|
701
701
|
};
|
|
702
702
|
if (product !== null && product !== void 0 && product.orderId) dataObject["orderId"] = product === null || product === void 0 ? void 0 : product.orderId;
|
|
@@ -740,7 +740,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
740
740
|
|
|
741
741
|
var saveDatasheets = /*#__PURE__*/function () {
|
|
742
742
|
var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
|
743
|
-
var _product$
|
|
743
|
+
var _product$article10;
|
|
744
744
|
|
|
745
745
|
var productTemp, dataObject;
|
|
746
746
|
return _regenerator.default.wrap(function _callee6$(_context6) {
|
|
@@ -750,7 +750,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
750
750
|
setLoading(true);
|
|
751
751
|
productTemp = product;
|
|
752
752
|
dataObject = {
|
|
753
|
-
articleId: product === null || product === void 0 ? void 0 : (_product$
|
|
753
|
+
articleId: product === null || product === void 0 ? void 0 : (_product$article10 = product.article) === null || _product$article10 === void 0 ? void 0 : _product$article10.id_article,
|
|
754
754
|
articleData: updatedDatasheets
|
|
755
755
|
};
|
|
756
756
|
if (product !== null && product !== void 0 && product.orderId) dataObject["orderId"] = product === null || product === void 0 ? void 0 : product.orderId;
|
|
@@ -809,7 +809,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
809
809
|
setSocketType(imageInputs);
|
|
810
810
|
}, [images]);
|
|
811
811
|
var updateImages = (0, _react.useCallback)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
|
812
|
-
var _images$values2, _product$
|
|
812
|
+
var _images$values2, _product$article11, _data$articleData, _data$articleData2, _data$updateImages;
|
|
813
813
|
|
|
814
814
|
var imagesList, imagesListTemp, duplicated, attrForImgs, data, valid, _data$updateImages2, _data$articleData3, _data$articleData4, _data$articleData5, promiseArray, productTemp;
|
|
815
815
|
|
|
@@ -828,7 +828,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
828
828
|
attrForImgs = Object.values(images === null || images === void 0 ? void 0 : images.attrForImgs);
|
|
829
829
|
attrForImgs.pop();
|
|
830
830
|
data = {
|
|
831
|
-
articleId: product === null || product === void 0 ? void 0 : (_product$
|
|
831
|
+
articleId: product === null || product === void 0 ? void 0 : (_product$article11 = product.article) === null || _product$article11 === void 0 ? void 0 : _product$article11.id_article,
|
|
832
832
|
attrReqImgs: attrForImgs === null || attrForImgs === void 0 ? void 0 : attrForImgs.map(function (e) {
|
|
833
833
|
var _e$, _e$2;
|
|
834
834
|
|
|
@@ -1218,7 +1218,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1218
1218
|
|
|
1219
1219
|
var createComment = /*#__PURE__*/function () {
|
|
1220
1220
|
var _ref11 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(e, body, tab) {
|
|
1221
|
-
var _product$
|
|
1221
|
+
var _product$article12;
|
|
1222
1222
|
|
|
1223
1223
|
var concept, data;
|
|
1224
1224
|
return _regenerator.default.wrap(function _callee10$(_context10) {
|
|
@@ -1244,7 +1244,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1244
1244
|
|
|
1245
1245
|
case 10:
|
|
1246
1246
|
data = {
|
|
1247
|
-
articleId: product === null || product === void 0 ? void 0 : (_product$
|
|
1247
|
+
articleId: product === null || product === void 0 ? void 0 : (_product$article12 = product.article) === null || _product$article12 === void 0 ? void 0 : _product$article12.id_article,
|
|
1248
1248
|
orderId: product === null || product === void 0 ? void 0 : product.orderId,
|
|
1249
1249
|
message: body,
|
|
1250
1250
|
concept: concept,
|
|
@@ -1381,7 +1381,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1381
1381
|
|
|
1382
1382
|
var setAssignation = /*#__PURE__*/function () {
|
|
1383
1383
|
var _ref13 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12(assignationType, assignationId) {
|
|
1384
|
-
var _product$
|
|
1384
|
+
var _product$article13;
|
|
1385
1385
|
|
|
1386
1386
|
var concept, productTemp, data;
|
|
1387
1387
|
return _regenerator.default.wrap(function _callee12$(_context12) {
|
|
@@ -1411,7 +1411,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1411
1411
|
data = (0, _defineProperty2.default)({
|
|
1412
1412
|
articleList: [{
|
|
1413
1413
|
orderId: product.orderId,
|
|
1414
|
-
articleId: product === null || product === void 0 ? void 0 : (_product$
|
|
1414
|
+
articleId: product === null || product === void 0 ? void 0 : (_product$article13 = product.article) === null || _product$article13 === void 0 ? void 0 : _product$article13.id_article
|
|
1415
1415
|
}],
|
|
1416
1416
|
concept: concept
|
|
1417
1417
|
}, "".concat(assignationType, "Id"), assignationId);
|
|
@@ -1665,7 +1665,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1665
1665
|
inputGroup: descriptions[0],
|
|
1666
1666
|
updatedDescriptions: updatedDescriptions,
|
|
1667
1667
|
setUpdatedDescriptions: setUpdatedDescriptions,
|
|
1668
|
-
articleId: product === null || product === void 0 ? void 0 : (_product$
|
|
1668
|
+
articleId: product === null || product === void 0 ? void 0 : (_product$article14 = product.article) === null || _product$article14 === void 0 ? void 0 : _product$article14.id_article,
|
|
1669
1669
|
version: version,
|
|
1670
1670
|
dinamicHeight: true
|
|
1671
1671
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
@@ -20,39 +20,48 @@ var _jsBase = require("js-base64");
|
|
|
20
20
|
var _uuid = require("uuid");
|
|
21
21
|
|
|
22
22
|
var getRetailerServices = /*#__PURE__*/function () {
|
|
23
|
-
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(articleId, category, version) {
|
|
24
|
-
var _images$values;
|
|
23
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(articleId, category, categoryId, version) {
|
|
24
|
+
var _images$values, responseArray, datasheets, descriptions, images;
|
|
25
25
|
|
|
26
|
-
var responseArray, datasheets, descriptions, images;
|
|
27
26
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
28
27
|
while (1) {
|
|
29
28
|
switch (_context.prev = _context.next) {
|
|
30
29
|
case 0:
|
|
31
|
-
_context.
|
|
32
|
-
|
|
30
|
+
_context.prev = 0;
|
|
31
|
+
_context.next = 3;
|
|
32
|
+
return Promise.all([_axios.default.post("".concat(process.env.REACT_APP_ARTICLE_DATA_DATASHEET_ENDPOINT, "?idCategory=").concat(categoryId, "&articleId=").concat(articleId, "&version=").concat(version)), _axios.default.get("".concat(process.env.REACT_APP_ARTICLE_DATA_DESCRIPTION_ENDPOINT, "?idCategory=").concat(categoryId, "&articleId=").concat(articleId, "&version=").concat(version)), _axios.default.post("".concat(process.env.REACT_APP_ARTICLE_DATA_IMAGES_ENDPOINT, "?articleId=").concat(articleId, "&version=").concat(version), {
|
|
33
|
+
category: category
|
|
34
|
+
})]);
|
|
33
35
|
|
|
34
|
-
case
|
|
36
|
+
case 3:
|
|
35
37
|
responseArray = _context.sent;
|
|
36
38
|
datasheets = JSON.parse(responseArray[0].data.body).data;
|
|
37
39
|
descriptions = JSON.parse(responseArray[1].data.body).data;
|
|
38
40
|
images = JSON.parse(responseArray[2].data.body).data;
|
|
39
41
|
images.values = images === null || images === void 0 ? void 0 : (_images$values = images.values) === null || _images$values === void 0 ? void 0 : _images$values.map(function (value) {
|
|
40
|
-
|
|
42
|
+
var _images$inputs$find;
|
|
43
|
+
|
|
44
|
+
value.name = (_images$inputs$find = images.inputs.find(function (e) {
|
|
41
45
|
return e.id === value.image_id;
|
|
42
|
-
}).name;
|
|
46
|
+
})) === null || _images$inputs$find === void 0 ? void 0 : _images$inputs$find.name;
|
|
43
47
|
return getImage(value);
|
|
44
48
|
});
|
|
45
49
|
return _context.abrupt("return", [datasheets, descriptions, images]);
|
|
46
50
|
|
|
47
|
-
case
|
|
51
|
+
case 11:
|
|
52
|
+
_context.prev = 11;
|
|
53
|
+
_context.t0 = _context["catch"](0);
|
|
54
|
+
console.log(_context.t0);
|
|
55
|
+
|
|
56
|
+
case 14:
|
|
48
57
|
case "end":
|
|
49
58
|
return _context.stop();
|
|
50
59
|
}
|
|
51
60
|
}
|
|
52
|
-
}, _callee);
|
|
61
|
+
}, _callee, null, [[0, 11]]);
|
|
53
62
|
}));
|
|
54
63
|
|
|
55
|
-
return function getRetailerServices(_x, _x2, _x3) {
|
|
64
|
+
return function getRetailerServices(_x, _x2, _x3, _x4) {
|
|
56
65
|
return _ref.apply(this, arguments);
|
|
57
66
|
};
|
|
58
67
|
}();
|
|
@@ -259,7 +268,7 @@ var fetchUsers = /*#__PURE__*/function () {
|
|
|
259
268
|
}, _callee4);
|
|
260
269
|
}));
|
|
261
270
|
|
|
262
|
-
return function fetchUsers(
|
|
271
|
+
return function fetchUsers(_x5) {
|
|
263
272
|
return _ref4.apply(this, arguments);
|
|
264
273
|
};
|
|
265
274
|
}();
|
package/package.json
CHANGED
|
@@ -9,12 +9,9 @@ export const ValidationPanel = ({
|
|
|
9
9
|
setShowValidationPanel,
|
|
10
10
|
approve,
|
|
11
11
|
reject,
|
|
12
|
+
showApproveRejectAll,
|
|
12
13
|
}) => {
|
|
13
|
-
|
|
14
|
-
setOptionClicked(`${option}-button`);
|
|
15
|
-
setShowValidationPanel(false);
|
|
16
|
-
};
|
|
17
|
-
|
|
14
|
+
console.log(showApproveRejectAll);
|
|
18
15
|
return (
|
|
19
16
|
<Container id={id}>
|
|
20
17
|
<button
|
|
@@ -35,15 +32,28 @@ export const ValidationPanel = ({
|
|
|
35
32
|
<img src={rejectIcon} alt="reject button" />
|
|
36
33
|
<p>Rechazado</p>
|
|
37
34
|
</button>
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
35
|
+
{showApproveRejectAll && (
|
|
36
|
+
<>
|
|
37
|
+
<button
|
|
38
|
+
onClick={() => {
|
|
39
|
+
approve && approve();
|
|
40
|
+
}}
|
|
41
|
+
className="validation-option"
|
|
42
|
+
>
|
|
43
|
+
<img src={acceptIcon} alt="accept button" />
|
|
44
|
+
<p>Validar todo y enviar a evaluación</p>
|
|
45
|
+
</button>
|
|
46
|
+
<button
|
|
47
|
+
onClick={() => {
|
|
48
|
+
reject && reject();
|
|
49
|
+
}}
|
|
50
|
+
className="validation-option"
|
|
51
|
+
>
|
|
52
|
+
<img src={rejectIcon} alt="reject button" />
|
|
53
|
+
<p>Rechazar todo y enviar a evaluación</p>
|
|
54
|
+
</button>
|
|
55
|
+
</>
|
|
56
|
+
)}
|
|
47
57
|
</Container>
|
|
48
58
|
);
|
|
49
59
|
};
|
|
@@ -3,8 +3,7 @@ import { GlobalColors, FontFamily } from "../../../global-files/variables";
|
|
|
3
3
|
|
|
4
4
|
export const Container = styled.div`
|
|
5
5
|
background-color: ${GlobalColors.s2};
|
|
6
|
-
width:
|
|
7
|
-
height: 92px;
|
|
6
|
+
width: max-content;
|
|
8
7
|
padding: 8px;
|
|
9
8
|
border: 1px solid ${GlobalColors.s3};
|
|
10
9
|
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25);
|
|
@@ -33,6 +32,11 @@ export const Container = styled.div`
|
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
34
|
|
|
35
|
+
&:hover {
|
|
36
|
+
background-color: ${GlobalColors.s3};
|
|
37
|
+
border-radius: 10px;
|
|
38
|
+
}
|
|
39
|
+
|
|
36
40
|
& + * {
|
|
37
41
|
margin-top: 8px;
|
|
38
42
|
}
|
|
@@ -15,6 +15,7 @@ export const AvatarAndValidation = ({
|
|
|
15
15
|
showValidationButtons,
|
|
16
16
|
approve,
|
|
17
17
|
reject,
|
|
18
|
+
showApproveRejectAll,
|
|
18
19
|
}) => {
|
|
19
20
|
const [showValidationPanel, setShowValidationPanel] = useState(false);
|
|
20
21
|
const [buttonType, setButtonType] = useState(
|
|
@@ -62,6 +63,7 @@ export const AvatarAndValidation = ({
|
|
|
62
63
|
setShowValidationPanel={setShowValidationPanel}
|
|
63
64
|
approve={approve}
|
|
64
65
|
reject={reject}
|
|
66
|
+
showApproveRejectAll={showApproveRejectAll}
|
|
65
67
|
/>
|
|
66
68
|
)}
|
|
67
69
|
</Container>
|
|
@@ -14,6 +14,7 @@ export const FullProductNameHeader = ({
|
|
|
14
14
|
approve,
|
|
15
15
|
reject,
|
|
16
16
|
servicesData,
|
|
17
|
+
showApproveRejectAll,
|
|
17
18
|
}) => {
|
|
18
19
|
const [retailers, setRetailers] = useState([]);
|
|
19
20
|
useEffect(() => {
|
|
@@ -69,6 +70,7 @@ export const FullProductNameHeader = ({
|
|
|
69
70
|
activeRetailer={activeRetailer}
|
|
70
71
|
setActiveRetailer={setActiveRetailer}
|
|
71
72
|
showValidationButtons={showValidationButtons}
|
|
73
|
+
showApproveRejectAll={showApproveRejectAll}
|
|
72
74
|
approve={approve}
|
|
73
75
|
reject={reject}
|
|
74
76
|
/>
|
|
@@ -16,89 +16,141 @@ ProviderProductEditionDefault.args = {
|
|
|
16
16
|
Imágenes: false,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
19
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJmNTkyN2Y4ZS1jYmY3LTQ5MjItOWUwOS1lNjllYzBiMjczMWEiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6ImY1OTI3ZjhlLWNiZjctNDkyMi05ZTA5LWU2OWVjMGIyNzMxYSIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiI5ZmM5YThiNC1mYWViLTQ3ZDUtYjEyYS05NzcxNThmNWUzMWUiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY1NjA4NzIzOSwibmFtZSI6IklzbWFlbCBMb3BleiIsInBob25lX251bWJlciI6Iis1MjMxMTEzNjYzMzYiLCJleHAiOjE2NTYwOTA4MzksImlhdCI6MTY1NjA4NzIzOSwiZW1haWwiOiJpbG9wZXpAY29udGVudG9oLmNvbSJ9.P4HmwNMwF6r9BuH-9onpbU7_iiXwSw1TOEux9seeVwHiEJytl6BOcHkKJEnUZ2dfarK2CRMiYVLVycbT3O4MCVyFb8hWnos_eTBAVIOD9kxd7FMLOL_v5JP6Vw4XxWx2xsut9Jvcw0M-_QipxvAKdHtNcC-pOYs0W2IvyXf0JbYgkthZwRwIOUYhqF2yMtKFFzAX2kZO5_QMNeTLamFoexDU_0heba7sToE_oLyovhPTTRobXQcss8mmiilEfnnGZ_YNlwf-0myAMMJkllESl0tff1YQpHLn1sUN6sA-DotQvYhaGbxNebgQ_sMfPNy8cEFOIrNLP_QMjEC_RCu_tw",
|
|
20
20
|
articleId: 238,
|
|
21
21
|
category: 846,
|
|
22
22
|
version: 2,
|
|
23
23
|
productSelected: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
orderId: 64,
|
|
25
|
+
status: "AP",
|
|
26
|
+
datasheet_status: "AP",
|
|
27
|
+
prio: "none",
|
|
28
|
+
version: 7,
|
|
29
|
+
description_status: "AP",
|
|
30
|
+
images_status: "AP",
|
|
31
|
+
brand: "1",
|
|
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: "ABARROTES|BOTANAS, GOLOSINAS Y CHOCOLATES|BOTANAS",
|
|
45
|
+
company_name: "COMPANY DEV",
|
|
46
|
+
country: "México",
|
|
47
|
+
id_category: "41",
|
|
48
|
+
id_datasheet_especialist: 54,
|
|
49
|
+
id_datasheet_facilitator: 52,
|
|
50
|
+
id_description_especialist: 54,
|
|
51
|
+
id_description_facilitator: 52,
|
|
52
|
+
id_images_especialist: 55,
|
|
53
|
+
id_images_facilitator: 53,
|
|
54
|
+
id_order: 64,
|
|
55
|
+
id_article: 35707,
|
|
56
|
+
id_auditor: 37,
|
|
57
|
+
name: "chetos",
|
|
58
|
+
upc: "1010101010",
|
|
59
|
+
},
|
|
60
|
+
retailers: [
|
|
61
|
+
{
|
|
62
|
+
id: 3,
|
|
63
|
+
name: "Sam´s Club",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: 8,
|
|
67
|
+
name: "Fragua",
|
|
68
|
+
},
|
|
69
|
+
],
|
|
35
70
|
retailersAvailable: [
|
|
36
71
|
{
|
|
37
|
-
id:
|
|
38
|
-
name: "
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
72
|
+
id: 3,
|
|
73
|
+
name: "Sam´s Club",
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: 8,
|
|
77
|
+
name: "Fragua",
|
|
42
78
|
},
|
|
43
79
|
],
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
80
|
+
categoryName: "ABARROTES|BOTANAS, GOLOSINAS Y CHOCOLATES|BOTANAS",
|
|
81
|
+
upc: "1010101010",
|
|
82
|
+
id_article: 35707,
|
|
83
|
+
id_order: 64,
|
|
84
|
+
},
|
|
85
|
+
productToEdit: {
|
|
86
|
+
ArticleId: 35707,
|
|
87
|
+
idCategory: "41",
|
|
88
|
+
product: {
|
|
89
|
+
orderId: 64,
|
|
90
|
+
status: "AP",
|
|
91
|
+
datasheet_status: "AP",
|
|
92
|
+
prio: "none",
|
|
93
|
+
version: 7,
|
|
94
|
+
description_status: "AP",
|
|
95
|
+
images_status: "AP",
|
|
96
|
+
brand: "1",
|
|
97
|
+
retailerOrder: 0,
|
|
98
|
+
missing: {
|
|
99
|
+
datasheet: null,
|
|
100
|
+
descriptions: null,
|
|
101
|
+
images: null,
|
|
102
|
+
},
|
|
103
|
+
services: {
|
|
104
|
+
datasheets: 1,
|
|
105
|
+
descriptions: 1,
|
|
106
|
+
images: 1,
|
|
107
|
+
},
|
|
108
|
+
article: {
|
|
109
|
+
category: "ABARROTES|BOTANAS, GOLOSINAS Y CHOCOLATES|BOTANAS",
|
|
110
|
+
company_name: "COMPANY DEV",
|
|
111
|
+
country: "México",
|
|
112
|
+
id_category: "41",
|
|
113
|
+
id_datasheet_especialist: 54,
|
|
114
|
+
id_datasheet_facilitator: 52,
|
|
115
|
+
id_description_especialist: 54,
|
|
116
|
+
id_description_facilitator: 52,
|
|
117
|
+
id_images_especialist: 55,
|
|
118
|
+
id_images_facilitator: 53,
|
|
119
|
+
id_order: 64,
|
|
120
|
+
id_article: 35707,
|
|
121
|
+
id_auditor: 37,
|
|
122
|
+
name: "chetos",
|
|
123
|
+
upc: "1010101010",
|
|
124
|
+
},
|
|
125
|
+
retailers: [
|
|
126
|
+
{
|
|
127
|
+
id: 3,
|
|
128
|
+
name: "Sam´s Club",
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
id: 8,
|
|
132
|
+
name: "Fragua",
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
retailersAvailable: [
|
|
136
|
+
{
|
|
137
|
+
id: 3,
|
|
138
|
+
name: "Sam´s Club",
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
id: 8,
|
|
142
|
+
name: "Fragua",
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
categoryName: "ABARROTES|BOTANAS, GOLOSINAS Y CHOCOLATES|BOTANAS",
|
|
146
|
+
upc: "1010101010",
|
|
147
|
+
id_article: 35707,
|
|
148
|
+
id_order: 64,
|
|
48
149
|
},
|
|
49
150
|
},
|
|
50
|
-
// productToEdit: {
|
|
51
|
-
// idCategory: "2976",
|
|
52
|
-
// ArticleId: 55070,
|
|
53
|
-
// product: [
|
|
54
|
-
// {
|
|
55
|
-
// id_article: 55070,
|
|
56
|
-
// id_category: "2976",
|
|
57
|
-
// name: "TOALLERO CORTO ACCESS NEGRO ÉBANO",
|
|
58
|
-
// upc: "161788",
|
|
59
|
-
// timestamp: "2022-06-17T17:31:14.000Z",
|
|
60
|
-
// status: "NULL",
|
|
61
|
-
// categoryName: "BAÑOS|ACCESORIOS PARA BAÑO|TOALLEROS",
|
|
62
|
-
// asignations: [],
|
|
63
|
-
// version: 1,
|
|
64
|
-
// version_status: null,
|
|
65
|
-
// retailersAvailable: [
|
|
66
|
-
// {
|
|
67
|
-
// id: 58,
|
|
68
|
-
// name: "The Home Depot Golden",
|
|
69
|
-
// country: "México",
|
|
70
|
-
// id_region: 1,
|
|
71
|
-
// active: 1,
|
|
72
|
-
// },
|
|
73
|
-
// {
|
|
74
|
-
// id: 59,
|
|
75
|
-
// name: "The Home Depot Platinum",
|
|
76
|
-
// country: "México",
|
|
77
|
-
// id_region: 1,
|
|
78
|
-
// active: 1,
|
|
79
|
-
// },
|
|
80
|
-
// {
|
|
81
|
-
// id: 60,
|
|
82
|
-
// name: "The Home Depot Resizing",
|
|
83
|
-
// country: "México",
|
|
84
|
-
// id_region: 1,
|
|
85
|
-
// active: 1,
|
|
86
|
-
// },
|
|
87
|
-
// {
|
|
88
|
-
// id: 61,
|
|
89
|
-
// name: "Home Depot TAB",
|
|
90
|
-
// country: "México",
|
|
91
|
-
// id_region: 1,
|
|
92
|
-
// active: 1,
|
|
93
|
-
// },
|
|
94
|
-
// ],
|
|
95
|
-
// missing: {},
|
|
96
|
-
// },
|
|
97
|
-
// ],
|
|
98
|
-
// },
|
|
99
151
|
location: {
|
|
100
152
|
product: { articleId: 109485, versionId: 3 },
|
|
101
|
-
state: {},
|
|
153
|
+
state: { origin: "Contentoh" },
|
|
102
154
|
},
|
|
103
155
|
user: {
|
|
104
156
|
id_user: 28,
|
|
@@ -118,7 +170,8 @@ ProviderProductEditionDefault.args = {
|
|
|
118
170
|
id_stripe: "cus_KuEt6R6vwmN09f",
|
|
119
171
|
id_role: 0,
|
|
120
172
|
active: 1,
|
|
121
|
-
is_retailer:
|
|
173
|
+
is_retailer: 1,
|
|
174
|
+
email_notify: 0,
|
|
122
175
|
membership: {
|
|
123
176
|
id: 38,
|
|
124
177
|
start_date: "2022-01-18T17:25:35.000Z",
|
|
@@ -130,6 +183,6 @@ ProviderProductEditionDefault.args = {
|
|
|
130
183
|
products_limit: "5000",
|
|
131
184
|
type: "Enterprise",
|
|
132
185
|
},
|
|
133
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?
|
|
186
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1656087239674",
|
|
134
187
|
},
|
|
135
188
|
};
|