contentoh-components-library 21.1.50 → 21.1.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/atoms/GeneralInput/index.js +1 -0
- package/dist/components/molecules/HeaderTop/index.js +1 -4
- package/dist/components/molecules/RetailerSelector/index.js +0 -34
- package/dist/components/molecules/StatusAsignationInfo/index.js +2 -3
- package/dist/components/organisms/FullTabsMenu/index.js +2 -4
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +46 -80
- package/dist/components/pages/ProviderProductEdition/index.js +21 -48
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +35 -32
- package/dist/components/pages/RetailerProductEdition/index.js +8 -11
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/package.json +1 -1
- package/src/components/atoms/StatusTag/index.js +12 -2
- package/src/components/atoms/StatusTag/styles.js +11 -11
- package/src/components/atoms/ValidationPanel/index.js +1 -1
- package/src/components/molecules/RetailerSelector/index.js +0 -1
- package/src/components/molecules/StatusAsignationInfo/index.js +1 -1
- package/src/components/organisms/FullProductNameHeader/index.js +1 -1
- package/src/components/organisms/FullTabsMenu/index.js +1 -1
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +99 -115
- package/src/components/pages/ProviderProductEdition/index.js +183 -177
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +31 -77
- package/src/components/pages/RetailerProductEdition/index.js +165 -140
- package/src/components/pages/RetailerProductEdition/styles.js +1 -1
- package/src/global-files/data.js +3 -4
- package/src/index.js +1 -0
|
@@ -65,6 +65,7 @@ var GeneralInput = function GeneralInput(_ref) {
|
|
|
65
65
|
if ((optionList === null || optionList === void 0 ? void 0 : optionList.length) > 0) {
|
|
66
66
|
var index = evt.target.selectedIndex;
|
|
67
67
|
var valueSelected = evt.target.value;
|
|
68
|
+
console.log(valueSelected);
|
|
68
69
|
generalValue = valueSelected;
|
|
69
70
|
setTextValue({
|
|
70
71
|
value: generalValue
|
|
@@ -26,10 +26,7 @@ var HeaderTop = function HeaderTop(_ref) {
|
|
|
26
26
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScreenHeader, {
|
|
27
27
|
text: "Edici\xF3n de producto"
|
|
28
28
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Button, {
|
|
29
|
-
buttonType: "close-button"
|
|
30
|
-
onClick: function onClick() {
|
|
31
|
-
window.location.href = "/products";
|
|
32
|
-
}
|
|
29
|
+
buttonType: "close-button"
|
|
33
30
|
})]
|
|
34
31
|
});
|
|
35
32
|
};
|
|
@@ -7,10 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.RetailerSelector = void 0;
|
|
9
9
|
|
|
10
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
|
-
|
|
12
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/asyncToGenerator"));
|
|
13
|
-
|
|
14
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
15
11
|
|
|
16
12
|
var _styles = require("./styles");
|
|
@@ -23,8 +19,6 @@ var _AsignationOption = require("../../atoms/AsignationOption");
|
|
|
23
19
|
|
|
24
20
|
var _DropDownButton = require("../../atoms/DropDownButton");
|
|
25
21
|
|
|
26
|
-
var _axios = _interopRequireDefault(require("axios"));
|
|
27
|
-
|
|
28
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
29
23
|
|
|
30
24
|
var RetailerSelector = function RetailerSelector(_ref) {
|
|
@@ -45,39 +39,11 @@ var RetailerSelector = function RetailerSelector(_ref) {
|
|
|
45
39
|
}
|
|
46
40
|
};
|
|
47
41
|
|
|
48
|
-
var getRetailerImage = /*#__PURE__*/function () {
|
|
49
|
-
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
50
|
-
return _regenerator.default.wrap(function _callee$(_context) {
|
|
51
|
-
while (1) {
|
|
52
|
-
switch (_context.prev = _context.next) {
|
|
53
|
-
case 0:
|
|
54
|
-
console.log("https://content-management-images.s3.amazonaws.com/retailers/".concat(activeRetailer.id, ".png"));
|
|
55
|
-
activeRetailer.image = "https://content-management-images.s3.amazonaws.com/retailers/".concat(activeRetailer.id, ".png");
|
|
56
|
-
retailers.forEach(function (retailer) {
|
|
57
|
-
return retailer.image = "https://content-management-images.s3.amazonaws.com/retailers/".concat(retailer.id, ".png");
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
case 3:
|
|
61
|
-
case "end":
|
|
62
|
-
return _context.stop();
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}, _callee);
|
|
66
|
-
}));
|
|
67
|
-
|
|
68
|
-
return function getRetailerImage() {
|
|
69
|
-
return _ref2.apply(this, arguments);
|
|
70
|
-
};
|
|
71
|
-
}();
|
|
72
|
-
|
|
73
42
|
(0, _react.useEffect)(function () {
|
|
74
43
|
if (retailersPanel) {
|
|
75
44
|
document.addEventListener("click", closeRetailersPanel, false);
|
|
76
45
|
}
|
|
77
46
|
}, [retailersPanel]);
|
|
78
|
-
(0, _react.useEffect)(function () {
|
|
79
|
-
getRetailerImage();
|
|
80
|
-
}, [activeRetailer]);
|
|
81
47
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
82
48
|
id: "retailers-assignation",
|
|
83
49
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.Avatar, {
|
|
@@ -54,8 +54,7 @@ var StatusAsignationInfo = function StatusAsignationInfo(_ref) {
|
|
|
54
54
|
_ref$id = _ref.id,
|
|
55
55
|
id = _ref$id === void 0 ? "default-id" : _ref$id,
|
|
56
56
|
onClickSave = _ref.onClickSave,
|
|
57
|
-
showSaveButton = _ref.showSaveButton
|
|
58
|
-
canAssign = _ref.canAssign;
|
|
57
|
+
showSaveButton = _ref.showSaveButton;
|
|
59
58
|
|
|
60
59
|
var _useState = (0, _react.useState)(false),
|
|
61
60
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -147,7 +146,7 @@ var StatusAsignationInfo = function StatusAsignationInfo(_ref) {
|
|
|
147
146
|
color: "#969696",
|
|
148
147
|
fontFamily: "Avenir Next",
|
|
149
148
|
headerType: "input-name-header"
|
|
150
|
-
}), showAsignationPanel &&
|
|
149
|
+
}), showAsignationPanel && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
151
150
|
className: "asignation-panel",
|
|
152
151
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
153
152
|
className: "asignation-header",
|
|
@@ -32,8 +32,7 @@ var FullTabsMenu = function FullTabsMenu(_ref) {
|
|
|
32
32
|
downloadImages = _ref.downloadImages,
|
|
33
33
|
askToDeleteImages = _ref.askToDeleteImages,
|
|
34
34
|
onClickSave = _ref.onClickSave,
|
|
35
|
-
showSaveButton = _ref.showSaveButton
|
|
36
|
-
canAssign = _ref.canAssign;
|
|
35
|
+
showSaveButton = _ref.showSaveButton;
|
|
37
36
|
|
|
38
37
|
var _useState = (0, _react.useState)(false),
|
|
39
38
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -56,8 +55,7 @@ var FullTabsMenu = function FullTabsMenu(_ref) {
|
|
|
56
55
|
downloadImages: downloadImages,
|
|
57
56
|
onClickSave: onClickSave,
|
|
58
57
|
askToDeleteImages: askToDeleteImages,
|
|
59
|
-
showSaveButton: showSaveButton
|
|
60
|
-
canAssign: canAssign
|
|
58
|
+
showSaveButton: showSaveButton
|
|
61
59
|
})]
|
|
62
60
|
});
|
|
63
61
|
};
|
|
@@ -28,27 +28,27 @@ exports.ProviderProductEditionDefault = ProviderProductEditionDefault;
|
|
|
28
28
|
ProviderProductEditionDefault.args = {
|
|
29
29
|
tabsSections: {
|
|
30
30
|
Descripción: true,
|
|
31
|
-
"Ficha técnica":
|
|
32
|
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k1OTU2NSwiZW1haWwiOiJpbG9wZXpAY29udGVudG9oLmNvbSJ9.hWU0Pt-6PIw61M40SLu47E6_U9_Kt3k-j5PhuTlRkiX9OzU7bQUwWfeXAUxAAUYk_s1DhsYBqTyAmhmcQ3EECDcw2K6byyU4o-SFR-itTAUapnEy5Hzxf1ObDGMlfpVtPu1GQsmvIEXe6DuLuvpLZgOjqgnG5rHPAxpEJKfnEkv01h396sI2sh2bOXYcg4jPqyoRhqMjpj161MA5Fxl1a4O-2qHoyPTcoRXERk96M-63_PxPbcCuqSS8bhOr8jnUWvcmjhhwWXjYv44cLwCkwjFp8uBOStxBaUKHFIGpX4LjAFSqVCxoLb2bKSAJ_MH0ywO1Nke1VsicIGe-yluuGg",
|
|
35
|
+
articleId: 55157,
|
|
36
|
+
category: 4,
|
|
37
37
|
version: 3,
|
|
38
38
|
productSelected: {
|
|
39
|
-
orderId:
|
|
39
|
+
orderId: 89,
|
|
40
40
|
status: "AA",
|
|
41
41
|
datasheet_status: "AA",
|
|
42
42
|
prio: "none",
|
|
43
43
|
version: 3,
|
|
44
44
|
description_status: "AA",
|
|
45
45
|
images_status: "AA",
|
|
46
|
-
brand:
|
|
46
|
+
brand: "123",
|
|
47
47
|
retailerOrder: 0,
|
|
48
48
|
missing: {
|
|
49
|
-
datasheet:
|
|
50
|
-
descriptions:
|
|
51
|
-
images:
|
|
49
|
+
datasheet: 17,
|
|
50
|
+
descriptions: 4,
|
|
51
|
+
images: 3
|
|
52
52
|
},
|
|
53
53
|
services: {
|
|
54
54
|
datasheets: 1,
|
|
@@ -56,69 +56,52 @@ ProviderProductEditionDefault.args = {
|
|
|
56
56
|
images: 1
|
|
57
57
|
},
|
|
58
58
|
article: {
|
|
59
|
-
category: "
|
|
59
|
+
category: "ABARROTES|ABARROTES SECOS|ALIMENTOS DESHIDRATADOS",
|
|
60
60
|
company_name: "COMPANY DEV",
|
|
61
61
|
country: "México",
|
|
62
|
-
id_category: "
|
|
62
|
+
id_category: "4",
|
|
63
63
|
id_datasheet_especialist: 54,
|
|
64
64
|
id_datasheet_facilitator: 52,
|
|
65
65
|
id_description_especialist: 54,
|
|
66
66
|
id_description_facilitator: 52,
|
|
67
67
|
id_images_especialist: 55,
|
|
68
68
|
id_images_facilitator: 53,
|
|
69
|
-
id_order:
|
|
70
|
-
id_article:
|
|
69
|
+
id_order: 89,
|
|
70
|
+
id_article: 55157,
|
|
71
71
|
id_auditor: 37,
|
|
72
|
-
name: "
|
|
73
|
-
|
|
74
|
-
upc: "977812"
|
|
72
|
+
name: "testing",
|
|
73
|
+
upc: "807526"
|
|
75
74
|
},
|
|
76
75
|
retailers: [{
|
|
77
|
-
id:
|
|
78
|
-
name: "
|
|
79
|
-
}, {
|
|
80
|
-
id: 59,
|
|
81
|
-
name: "The Home Depot Platinum"
|
|
76
|
+
id: 3,
|
|
77
|
+
name: "Sam´s Club"
|
|
82
78
|
}],
|
|
83
|
-
statusByRetailer: {
|
|
84
|
-
58: {
|
|
85
|
-
datasheet: "AA",
|
|
86
|
-
description: "AA",
|
|
87
|
-
images: "AA"
|
|
88
|
-
},
|
|
89
|
-
59: {
|
|
90
|
-
images: "AA"
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
79
|
retailersAvailable: [{
|
|
94
|
-
id:
|
|
95
|
-
name: "
|
|
96
|
-
}, {
|
|
97
|
-
id: 59,
|
|
98
|
-
name: "The Home Depot Platinum"
|
|
80
|
+
id: 3,
|
|
81
|
+
name: "Sam´s Club"
|
|
99
82
|
}],
|
|
100
|
-
categoryName: "
|
|
101
|
-
upc: "
|
|
102
|
-
id_article:
|
|
103
|
-
id_order:
|
|
83
|
+
categoryName: "ABARROTES|ABARROTES SECOS|ALIMENTOS DESHIDRATADOS",
|
|
84
|
+
upc: "807526",
|
|
85
|
+
id_article: 55157,
|
|
86
|
+
id_order: 89
|
|
104
87
|
},
|
|
105
88
|
productToEdit: {
|
|
106
|
-
ArticleId:
|
|
107
|
-
idCategory: "
|
|
89
|
+
ArticleId: 55157,
|
|
90
|
+
idCategory: "4",
|
|
108
91
|
product: {
|
|
109
|
-
orderId:
|
|
92
|
+
orderId: 89,
|
|
110
93
|
status: "AA",
|
|
111
94
|
datasheet_status: "AA",
|
|
112
95
|
prio: "none",
|
|
113
96
|
version: 3,
|
|
114
97
|
description_status: "AA",
|
|
115
98
|
images_status: "AA",
|
|
116
|
-
brand:
|
|
99
|
+
brand: "123",
|
|
117
100
|
retailerOrder: 0,
|
|
118
101
|
missing: {
|
|
119
|
-
datasheet:
|
|
120
|
-
descriptions:
|
|
121
|
-
images:
|
|
102
|
+
datasheet: 17,
|
|
103
|
+
descriptions: 4,
|
|
104
|
+
images: 3
|
|
122
105
|
},
|
|
123
106
|
services: {
|
|
124
107
|
datasheets: 1,
|
|
@@ -126,51 +109,34 @@ ProviderProductEditionDefault.args = {
|
|
|
126
109
|
images: 1
|
|
127
110
|
},
|
|
128
111
|
article: {
|
|
129
|
-
category: "
|
|
112
|
+
category: "ABARROTES|ABARROTES SECOS|ALIMENTOS DESHIDRATADOS",
|
|
130
113
|
company_name: "COMPANY DEV",
|
|
131
114
|
country: "México",
|
|
132
|
-
id_category: "
|
|
115
|
+
id_category: "4",
|
|
133
116
|
id_datasheet_especialist: 54,
|
|
134
117
|
id_datasheet_facilitator: 52,
|
|
135
118
|
id_description_especialist: 54,
|
|
136
119
|
id_description_facilitator: 52,
|
|
137
120
|
id_images_especialist: 55,
|
|
138
121
|
id_images_facilitator: 53,
|
|
139
|
-
id_order:
|
|
140
|
-
id_article:
|
|
122
|
+
id_order: 89,
|
|
123
|
+
id_article: 55157,
|
|
141
124
|
id_auditor: 37,
|
|
142
|
-
name: "
|
|
143
|
-
|
|
144
|
-
upc: "977812"
|
|
125
|
+
name: "testing",
|
|
126
|
+
upc: "807526"
|
|
145
127
|
},
|
|
146
128
|
retailers: [{
|
|
147
|
-
id:
|
|
148
|
-
name: "
|
|
149
|
-
}, {
|
|
150
|
-
id: 59,
|
|
151
|
-
name: "The Home Depot Platinum"
|
|
129
|
+
id: 3,
|
|
130
|
+
name: "Sam´s Club"
|
|
152
131
|
}],
|
|
153
|
-
statusByRetailer: {
|
|
154
|
-
58: {
|
|
155
|
-
datasheet: "AA",
|
|
156
|
-
description: "AA",
|
|
157
|
-
images: "AA"
|
|
158
|
-
},
|
|
159
|
-
59: {
|
|
160
|
-
images: "AA"
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
132
|
retailersAvailable: [{
|
|
164
|
-
id:
|
|
165
|
-
name: "
|
|
166
|
-
}, {
|
|
167
|
-
id: 59,
|
|
168
|
-
name: "The Home Depot Platinum"
|
|
133
|
+
id: 3,
|
|
134
|
+
name: "Sam´s Club"
|
|
169
135
|
}],
|
|
170
|
-
categoryName: "
|
|
171
|
-
upc: "
|
|
172
|
-
id_article:
|
|
173
|
-
id_order:
|
|
136
|
+
categoryName: "ABARROTES|ABARROTES SECOS|ALIMENTOS DESHIDRATADOS",
|
|
137
|
+
upc: "807526",
|
|
138
|
+
id_article: 55157,
|
|
139
|
+
id_order: 89
|
|
174
140
|
}
|
|
175
141
|
},
|
|
176
142
|
location: {
|
|
@@ -213,6 +179,6 @@ ProviderProductEditionDefault.args = {
|
|
|
213
179
|
products_limit: "5000",
|
|
214
180
|
type: "Enterprise"
|
|
215
181
|
},
|
|
216
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?
|
|
182
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1656607722122"
|
|
217
183
|
}
|
|
218
184
|
};
|
|
@@ -473,11 +473,6 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
473
473
|
saving = _useState82[0],
|
|
474
474
|
setSaving = _useState82[1];
|
|
475
475
|
|
|
476
|
-
var _useState83 = (0, _react.useState)(product.statusByRetailer),
|
|
477
|
-
_useState84 = (0, _slicedToArray2.default)(_useState83, 2),
|
|
478
|
-
retailerStatus = _useState84[0],
|
|
479
|
-
setRetailerStatus = _useState84[1];
|
|
480
|
-
|
|
481
476
|
(0, _react.useEffect)(function () {
|
|
482
477
|
checkAll && setSelectedImages(images.values);
|
|
483
478
|
}, [checkAll]);
|
|
@@ -1346,8 +1341,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1346
1341
|
var _ref13 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12(result) {
|
|
1347
1342
|
var _productTemp$id_order;
|
|
1348
1343
|
|
|
1349
|
-
var concept, productTemp, articleId, orderId, evalStatus, data, retailerId, res, orderStatus,
|
|
1350
|
-
|
|
1344
|
+
var concept, productTemp, articleId, orderId, evalStatus, data, retailerId, res, orderStatus, newProductEdit;
|
|
1351
1345
|
return _regenerator.default.wrap(function _callee12$(_context12) {
|
|
1352
1346
|
while (1) {
|
|
1353
1347
|
switch (_context12.prev = _context12.next) {
|
|
@@ -1401,22 +1395,11 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1401
1395
|
|
|
1402
1396
|
case 22:
|
|
1403
1397
|
if (!(res.data.statusCode === 200)) {
|
|
1404
|
-
_context12.next =
|
|
1398
|
+
_context12.next = 32;
|
|
1405
1399
|
break;
|
|
1406
1400
|
}
|
|
1407
1401
|
|
|
1408
|
-
|
|
1409
|
-
if (newArticleStatus) productTemp.status = newArticleStatus[articleId];
|
|
1410
|
-
retailerStatusCopy = (0, _objectSpread3.default)({}, retailerStatus);
|
|
1411
|
-
retailerStatusCopy[activeRetailer.id][concept] = newStatus;
|
|
1412
|
-
setRetailerStatus(retailerStatusCopy);
|
|
1413
|
-
productTemp.statusByRetailer = retailerStatusCopy;
|
|
1414
|
-
|
|
1415
|
-
if (newServiceStatus) {
|
|
1416
|
-
status = newServiceStatus[articleId]["".concat(concept, "Status")];
|
|
1417
|
-
productTemp["".concat(concept, "_status")] = status;
|
|
1418
|
-
}
|
|
1419
|
-
|
|
1402
|
+
productTemp["".concat(concept, "_status")] = "Evaluated";
|
|
1420
1403
|
setProduct(productTemp);
|
|
1421
1404
|
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
1422
1405
|
newProductEdit = {
|
|
@@ -1427,26 +1410,26 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1427
1410
|
setProductEdit(newProductEdit);
|
|
1428
1411
|
sessionStorage.setItem("productEdit", JSON.stringify(newProductEdit));
|
|
1429
1412
|
setOrigin(function (prev) {
|
|
1430
|
-
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, prev), {}, (0, _defineProperty2.default)({}, concept,
|
|
1413
|
+
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, prev), {}, (0, _defineProperty2.default)({}, concept, "Evaluated"));
|
|
1431
1414
|
});
|
|
1432
|
-
_context12.next =
|
|
1415
|
+
_context12.next = 32;
|
|
1433
1416
|
return loadData();
|
|
1434
1417
|
|
|
1435
|
-
case
|
|
1436
|
-
_context12.next =
|
|
1418
|
+
case 32:
|
|
1419
|
+
_context12.next = 37;
|
|
1437
1420
|
break;
|
|
1438
1421
|
|
|
1439
|
-
case
|
|
1440
|
-
_context12.prev =
|
|
1422
|
+
case 34:
|
|
1423
|
+
_context12.prev = 34;
|
|
1441
1424
|
_context12.t0 = _context12["catch"](8);
|
|
1442
1425
|
console.log(_context12.t0);
|
|
1443
1426
|
|
|
1444
|
-
case
|
|
1427
|
+
case 37:
|
|
1445
1428
|
case "end":
|
|
1446
1429
|
return _context12.stop();
|
|
1447
1430
|
}
|
|
1448
1431
|
}
|
|
1449
|
-
}, _callee12, null, [[8,
|
|
1432
|
+
}, _callee12, null, [[8, 34]]);
|
|
1450
1433
|
}));
|
|
1451
1434
|
|
|
1452
1435
|
return function sendEvaluation(_x7) {
|
|
@@ -1456,7 +1439,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1456
1439
|
|
|
1457
1440
|
var validateAll = /*#__PURE__*/function () {
|
|
1458
1441
|
var _ref14 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13(result) {
|
|
1459
|
-
var evaluationArray, sendAll, conceptArray, productTemp
|
|
1442
|
+
var evaluationArray, sendAll, conceptArray, productTemp;
|
|
1460
1443
|
return _regenerator.default.wrap(function _callee13$(_context13) {
|
|
1461
1444
|
while (1) {
|
|
1462
1445
|
switch (_context13.prev = _context13.next) {
|
|
@@ -1509,16 +1492,6 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1509
1492
|
productTemp.datasheet_status = productTemp.datasheet_status === "NA" ? "NA" : "".concat(result, "CA");
|
|
1510
1493
|
productTemp.description_status = productTemp.description_status === "NA" ? "NA" : "".concat(result, "CA");
|
|
1511
1494
|
productTemp.images_status = productTemp.images_status === "NA" ? "NA" : "".concat(result, "CA");
|
|
1512
|
-
retailerStatusCopy = (0, _objectSpread3.default)({}, retailerStatus);
|
|
1513
|
-
Object.keys(retailerStatusCopy).forEach(function (key) {
|
|
1514
|
-
conceptArray.forEach(function (concept) {
|
|
1515
|
-
if (retailerStatusCopy[key][concept]) {
|
|
1516
|
-
retailerStatusCopy[key][concept] = "".concat(result, "CA");
|
|
1517
|
-
}
|
|
1518
|
-
});
|
|
1519
|
-
});
|
|
1520
|
-
setRetailerStatus(retailerStatusCopy);
|
|
1521
|
-
productTemp.statusByRetailer = retailerStatusCopy;
|
|
1522
1495
|
setProduct(productTemp);
|
|
1523
1496
|
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
1524
1497
|
setProductEdit({
|
|
@@ -1531,24 +1504,24 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1531
1504
|
idCategory: productTemp.article.id_category,
|
|
1532
1505
|
product: productTemp
|
|
1533
1506
|
}));
|
|
1534
|
-
_context13.next =
|
|
1507
|
+
_context13.next = 22;
|
|
1535
1508
|
return loadData();
|
|
1536
1509
|
|
|
1537
|
-
case
|
|
1538
|
-
_context13.next =
|
|
1510
|
+
case 22:
|
|
1511
|
+
_context13.next = 27;
|
|
1539
1512
|
break;
|
|
1540
1513
|
|
|
1541
|
-
case
|
|
1542
|
-
_context13.prev =
|
|
1514
|
+
case 24:
|
|
1515
|
+
_context13.prev = 24;
|
|
1543
1516
|
_context13.t0 = _context13["catch"](0);
|
|
1544
1517
|
console.log(_context13.t0);
|
|
1545
1518
|
|
|
1546
|
-
case
|
|
1519
|
+
case 27:
|
|
1547
1520
|
case "end":
|
|
1548
1521
|
return _context13.stop();
|
|
1549
1522
|
}
|
|
1550
1523
|
}
|
|
1551
|
-
}, _callee13, null, [[0,
|
|
1524
|
+
}, _callee13, null, [[0, 24]]);
|
|
1552
1525
|
}));
|
|
1553
1526
|
|
|
1554
1527
|
return function validateAll(_x8) {
|
|
@@ -1799,7 +1772,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1799
1772
|
}
|
|
1800
1773
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FullTabsMenu.FullTabsMenu, {
|
|
1801
1774
|
tabsSections: tabsSections,
|
|
1802
|
-
status:
|
|
1775
|
+
status: product["".concat(getConcept(activeTab), "_status")] || (product === null || product === void 0 ? void 0 : product.version_status),
|
|
1803
1776
|
activeTab: activeTab,
|
|
1804
1777
|
setActiveTab: setActiveTab,
|
|
1805
1778
|
setImageLayout: setImageLayout,
|
|
@@ -1918,7 +1891,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1918
1891
|
}))
|
|
1919
1892
|
})]
|
|
1920
1893
|
})
|
|
1921
|
-
}) :
|
|
1894
|
+
}) : revision ? null : /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1922
1895
|
className: "required-inputs-message",
|
|
1923
1896
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1924
1897
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
@@ -39,52 +39,55 @@ RetailerProductEditionDefault.args = {
|
|
|
39
39
|
"Ficha técnica": false,
|
|
40
40
|
Imágenes: false
|
|
41
41
|
},
|
|
42
|
-
token: "e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1K_8yxyyOJOCC3760Meo60dAuOuV0bPNe1V_w5kuOCu2qB33OogE4_S4GKv5qeN14jkQxKN728aIlcVFLU-_0WMb7Lx1k1T7DQ1i91G7OzyGYCT1jENpJxwrlWWddu4U7eMi0v_v1wEgLoozwsGlqHW4kBraeWWC1vidYrRjjyoDaF27QAd5DcIxj2EuoLRVVrYDcnlondc7XyX8-crJwYQhruy3NHMajxyLaXPQ_vFEojKG9wgJMjQ",
|
|
43
43
|
productSelected: {
|
|
44
44
|
services: {
|
|
45
|
-
datasheets:
|
|
46
|
-
descriptions:
|
|
45
|
+
datasheets: 1,
|
|
46
|
+
descriptions: 1,
|
|
47
47
|
images: 1
|
|
48
48
|
},
|
|
49
|
-
orderId:
|
|
50
|
-
status: "
|
|
51
|
-
datasheet_status:
|
|
49
|
+
orderId: 89,
|
|
50
|
+
status: "IE",
|
|
51
|
+
datasheet_status: "IE",
|
|
52
52
|
prio: "none",
|
|
53
|
-
version:
|
|
54
|
-
description_status:
|
|
55
|
-
images_status:
|
|
53
|
+
version: 3,
|
|
54
|
+
description_status: "IE",
|
|
55
|
+
images_status: "IE",
|
|
56
56
|
article: {
|
|
57
|
-
id_article:
|
|
58
|
-
id_category: "
|
|
59
|
-
name: "
|
|
60
|
-
upc: "
|
|
61
|
-
timestamp: "2022-
|
|
57
|
+
id_article: 55157,
|
|
58
|
+
id_category: "4",
|
|
59
|
+
name: "testing",
|
|
60
|
+
upc: "807526",
|
|
61
|
+
timestamp: "2022-06-23T18:28:29.000Z",
|
|
62
62
|
id_user: 28,
|
|
63
63
|
status: "NULL",
|
|
64
64
|
active: 1,
|
|
65
65
|
company_id: 1,
|
|
66
66
|
company_name: "COMPANY DEV",
|
|
67
67
|
country: "México",
|
|
68
|
-
id_order:
|
|
68
|
+
id_order: 89,
|
|
69
69
|
id_datasheet_especialist: 54,
|
|
70
70
|
id_datasheet_facilitator: 52,
|
|
71
71
|
id_description_especialist: 54,
|
|
72
72
|
id_description_facilitator: 52,
|
|
73
73
|
id_images_especialist: 55,
|
|
74
74
|
id_images_facilitator: 53,
|
|
75
|
-
id_auditor:
|
|
75
|
+
id_auditor: 37,
|
|
76
76
|
id_recepcionist: null,
|
|
77
|
-
category: "ABARROTES|ABARROTES SECOS|
|
|
78
|
-
missingAttributes:
|
|
79
|
-
missingDescriptions:
|
|
80
|
-
missingImages:
|
|
77
|
+
category: "ABARROTES|ABARROTES SECOS|ALIMENTOS DESHIDRATADOS",
|
|
78
|
+
missingAttributes: 17,
|
|
79
|
+
missingDescriptions: 4,
|
|
80
|
+
missingImages: 3
|
|
81
81
|
},
|
|
82
82
|
retailers: [{
|
|
83
|
-
id:
|
|
84
|
-
name: "
|
|
83
|
+
id: 3,
|
|
84
|
+
name: "Sam´s Club",
|
|
85
|
+
country: "México",
|
|
86
|
+
id_region: 1,
|
|
87
|
+
active: 1
|
|
85
88
|
}],
|
|
86
89
|
country: "México",
|
|
87
|
-
upc: "
|
|
90
|
+
upc: "807526"
|
|
88
91
|
},
|
|
89
92
|
location: {
|
|
90
93
|
services: {
|
|
@@ -136,22 +139,22 @@ RetailerProductEditionDefault.args = {
|
|
|
136
139
|
upc: "807526"
|
|
137
140
|
},
|
|
138
141
|
user: {
|
|
139
|
-
id_user:
|
|
140
|
-
name: "
|
|
141
|
-
last_name: "
|
|
142
|
-
email: "
|
|
143
|
-
position:
|
|
142
|
+
id_user: 53,
|
|
143
|
+
name: "FACILITADOR TXT PRUEBA",
|
|
144
|
+
last_name: "",
|
|
145
|
+
email: "azarate@contentoh.com",
|
|
146
|
+
position: null,
|
|
144
147
|
telephone: null,
|
|
145
|
-
country:
|
|
148
|
+
country: null,
|
|
146
149
|
id_company: 2,
|
|
147
|
-
id_cognito: "
|
|
150
|
+
id_cognito: "b2ce5b2a-609c-4e79-9ea9-2f74cff43889",
|
|
148
151
|
birth_Date: null,
|
|
149
152
|
about_me: null,
|
|
150
153
|
zip_code: null,
|
|
151
154
|
address: null,
|
|
152
155
|
job: null,
|
|
153
156
|
id_stripe: null,
|
|
154
|
-
id_role:
|
|
157
|
+
id_role: 5,
|
|
155
158
|
active: 1,
|
|
156
159
|
is_retailer: 0,
|
|
157
160
|
email_notify: 0,
|
|
@@ -166,6 +169,6 @@ RetailerProductEditionDefault.args = {
|
|
|
166
169
|
products_limit: "3",
|
|
167
170
|
type: "PyMES"
|
|
168
171
|
},
|
|
169
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
172
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-52/52.png?1656559362901"
|
|
170
173
|
}
|
|
171
174
|
};
|