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
|
@@ -22,13 +22,9 @@ var ValidationPanel = function ValidationPanel(_ref) {
|
|
|
22
22
|
setOptionClicked = _ref.setOptionClicked,
|
|
23
23
|
setShowValidationPanel = _ref.setShowValidationPanel,
|
|
24
24
|
approve = _ref.approve,
|
|
25
|
-
reject = _ref.reject
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
setOptionClicked("".concat(option, "-button"));
|
|
29
|
-
setShowValidationPanel(false);
|
|
30
|
-
};
|
|
31
|
-
|
|
25
|
+
reject = _ref.reject,
|
|
26
|
+
showApproveRejectAll = _ref.showApproveRejectAll;
|
|
27
|
+
console.log(showApproveRejectAll);
|
|
32
28
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
33
29
|
id: id,
|
|
34
30
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
@@ -53,16 +49,29 @@ var ValidationPanel = function ValidationPanel(_ref) {
|
|
|
53
49
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
54
50
|
children: "Rechazado"
|
|
55
51
|
})]
|
|
56
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
52
|
+
}), showApproveRejectAll && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
53
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
54
|
+
onClick: function onClick() {
|
|
55
|
+
approve && approve();
|
|
56
|
+
},
|
|
57
|
+
className: "validation-option",
|
|
58
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
59
|
+
src: _acceptIcon.default,
|
|
60
|
+
alt: "accept button"
|
|
61
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
62
|
+
children: "Validar todo y enviar a evaluaci\xF3n"
|
|
63
|
+
})]
|
|
64
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
65
|
+
onClick: function onClick() {
|
|
66
|
+
reject && reject();
|
|
67
|
+
},
|
|
68
|
+
className: "validation-option",
|
|
69
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
70
|
+
src: _rejectIcon.default,
|
|
71
|
+
alt: "reject button"
|
|
72
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
73
|
+
children: "Rechazar todo y enviar a evaluaci\xF3n"
|
|
74
|
+
})]
|
|
66
75
|
})]
|
|
67
76
|
})]
|
|
68
77
|
});
|
|
@@ -15,6 +15,6 @@ var _variables = require("../../../global-files/variables");
|
|
|
15
15
|
|
|
16
16
|
var _templateObject;
|
|
17
17
|
|
|
18
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n width:
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n width: max-content;\n padding: 8px;\n border: 1px solid ", ";\n box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25);\n border-radius: 3px;\n position: absolute;\n right: 0;\n top: 100%;\n z-index: 100;\n\n button {\n width: 100%;\n height: 20px;\n display: flex;\n align-items: center;\n border: none;\n cursor: pointer;\n font-family: ", ";\n color: ", ";\n font-weight: 400;\n font-size: 13px;\n line-height: 18px;\n\n img {\n & + p {\n margin-left: 7px;\n }\n }\n\n &:hover {\n background-color: ", ";\n border-radius: 10px;\n }\n\n & + * {\n margin-top: 8px;\n }\n }\n"])), _variables.GlobalColors.s2, _variables.GlobalColors.s3, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s4, _variables.GlobalColors.s3);
|
|
19
19
|
|
|
20
20
|
exports.Container = Container;
|
|
@@ -29,7 +29,8 @@ var AvatarAndValidation = function AvatarAndValidation(_ref) {
|
|
|
29
29
|
setActiveRetailer = _ref.setActiveRetailer,
|
|
30
30
|
showValidationButtons = _ref.showValidationButtons,
|
|
31
31
|
approve = _ref.approve,
|
|
32
|
-
reject = _ref.reject
|
|
32
|
+
reject = _ref.reject,
|
|
33
|
+
showApproveRejectAll = _ref.showApproveRejectAll;
|
|
33
34
|
|
|
34
35
|
var _useState = (0, _react.useState)(false),
|
|
35
36
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -72,7 +73,8 @@ var AvatarAndValidation = function AvatarAndValidation(_ref) {
|
|
|
72
73
|
setOptionClicked: setButtonType,
|
|
73
74
|
setShowValidationPanel: setShowValidationPanel,
|
|
74
75
|
approve: approve,
|
|
75
|
-
reject: reject
|
|
76
|
+
reject: reject,
|
|
77
|
+
showApproveRejectAll: showApproveRejectAll
|
|
76
78
|
})]
|
|
77
79
|
});
|
|
78
80
|
};
|
|
@@ -31,7 +31,8 @@ var FullProductNameHeader = function FullProductNameHeader(_ref) {
|
|
|
31
31
|
showValidationButtons = _ref.showValidationButtons,
|
|
32
32
|
approve = _ref.approve,
|
|
33
33
|
reject = _ref.reject,
|
|
34
|
-
servicesData = _ref.servicesData
|
|
34
|
+
servicesData = _ref.servicesData,
|
|
35
|
+
showApproveRejectAll = _ref.showApproveRejectAll;
|
|
35
36
|
|
|
36
37
|
var _useState = (0, _react.useState)([]),
|
|
37
38
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -79,6 +80,7 @@ var FullProductNameHeader = function FullProductNameHeader(_ref) {
|
|
|
79
80
|
activeRetailer: activeRetailer,
|
|
80
81
|
setActiveRetailer: setActiveRetailer,
|
|
81
82
|
showValidationButtons: showValidationButtons,
|
|
83
|
+
showApproveRejectAll: showApproveRejectAll,
|
|
82
84
|
approve: approve,
|
|
83
85
|
reject: reject
|
|
84
86
|
})]
|
|
@@ -31,89 +31,134 @@ ProviderProductEditionDefault.args = {
|
|
|
31
31
|
"Ficha técnica": false,
|
|
32
32
|
Imágenes: false
|
|
33
33
|
},
|
|
34
|
-
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
34
|
+
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJmNTkyN2Y4ZS1jYmY3LTQ5MjItOWUwOS1lNjllYzBiMjczMWEiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI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: {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
39
|
+
orderId: 64,
|
|
40
|
+
status: "AP",
|
|
41
|
+
datasheet_status: "AP",
|
|
42
|
+
prio: "none",
|
|
43
|
+
version: 7,
|
|
44
|
+
description_status: "AP",
|
|
45
|
+
images_status: "AP",
|
|
46
|
+
brand: "1",
|
|
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: "ABARROTES|BOTANAS, GOLOSINAS Y CHOCOLATES|BOTANAS",
|
|
60
|
+
company_name: "COMPANY DEV",
|
|
52
61
|
country: "México",
|
|
53
|
-
|
|
54
|
-
|
|
62
|
+
id_category: "41",
|
|
63
|
+
id_datasheet_especialist: 54,
|
|
64
|
+
id_datasheet_facilitator: 52,
|
|
65
|
+
id_description_especialist: 54,
|
|
66
|
+
id_description_facilitator: 52,
|
|
67
|
+
id_images_especialist: 55,
|
|
68
|
+
id_images_facilitator: 53,
|
|
69
|
+
id_order: 64,
|
|
70
|
+
id_article: 35707,
|
|
71
|
+
id_auditor: 37,
|
|
72
|
+
name: "chetos",
|
|
73
|
+
upc: "1010101010"
|
|
74
|
+
},
|
|
75
|
+
retailers: [{
|
|
76
|
+
id: 3,
|
|
77
|
+
name: "Sam´s Club"
|
|
78
|
+
}, {
|
|
79
|
+
id: 8,
|
|
80
|
+
name: "Fragua"
|
|
55
81
|
}],
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
82
|
+
retailersAvailable: [{
|
|
83
|
+
id: 3,
|
|
84
|
+
name: "Sam´s Club"
|
|
85
|
+
}, {
|
|
86
|
+
id: 8,
|
|
87
|
+
name: "Fragua"
|
|
88
|
+
}],
|
|
89
|
+
categoryName: "ABARROTES|BOTANAS, GOLOSINAS Y CHOCOLATES|BOTANAS",
|
|
90
|
+
upc: "1010101010",
|
|
91
|
+
id_article: 35707,
|
|
92
|
+
id_order: 64
|
|
93
|
+
},
|
|
94
|
+
productToEdit: {
|
|
95
|
+
ArticleId: 35707,
|
|
96
|
+
idCategory: "41",
|
|
97
|
+
product: {
|
|
98
|
+
orderId: 64,
|
|
99
|
+
status: "AP",
|
|
100
|
+
datasheet_status: "AP",
|
|
101
|
+
prio: "none",
|
|
102
|
+
version: 7,
|
|
103
|
+
description_status: "AP",
|
|
104
|
+
images_status: "AP",
|
|
105
|
+
brand: "1",
|
|
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: "ABARROTES|BOTANAS, GOLOSINAS Y CHOCOLATES|BOTANAS",
|
|
119
|
+
company_name: "COMPANY DEV",
|
|
120
|
+
country: "México",
|
|
121
|
+
id_category: "41",
|
|
122
|
+
id_datasheet_especialist: 54,
|
|
123
|
+
id_datasheet_facilitator: 52,
|
|
124
|
+
id_description_especialist: 54,
|
|
125
|
+
id_description_facilitator: 52,
|
|
126
|
+
id_images_especialist: 55,
|
|
127
|
+
id_images_facilitator: 53,
|
|
128
|
+
id_order: 64,
|
|
129
|
+
id_article: 35707,
|
|
130
|
+
id_auditor: 37,
|
|
131
|
+
name: "chetos",
|
|
132
|
+
upc: "1010101010"
|
|
133
|
+
},
|
|
134
|
+
retailers: [{
|
|
135
|
+
id: 3,
|
|
136
|
+
name: "Sam´s Club"
|
|
137
|
+
}, {
|
|
138
|
+
id: 8,
|
|
139
|
+
name: "Fragua"
|
|
140
|
+
}],
|
|
141
|
+
retailersAvailable: [{
|
|
142
|
+
id: 3,
|
|
143
|
+
name: "Sam´s Club"
|
|
144
|
+
}, {
|
|
145
|
+
id: 8,
|
|
146
|
+
name: "Fragua"
|
|
147
|
+
}],
|
|
148
|
+
categoryName: "ABARROTES|BOTANAS, GOLOSINAS Y CHOCOLATES|BOTANAS",
|
|
149
|
+
upc: "1010101010",
|
|
150
|
+
id_article: 35707,
|
|
151
|
+
id_order: 64
|
|
60
152
|
}
|
|
61
153
|
},
|
|
62
|
-
// productToEdit: {
|
|
63
|
-
// idCategory: "2976",
|
|
64
|
-
// ArticleId: 55070,
|
|
65
|
-
// product: [
|
|
66
|
-
// {
|
|
67
|
-
// id_article: 55070,
|
|
68
|
-
// id_category: "2976",
|
|
69
|
-
// name: "TOALLERO CORTO ACCESS NEGRO ÉBANO",
|
|
70
|
-
// upc: "161788",
|
|
71
|
-
// timestamp: "2022-06-17T17:31:14.000Z",
|
|
72
|
-
// status: "NULL",
|
|
73
|
-
// categoryName: "BAÑOS|ACCESORIOS PARA BAÑO|TOALLEROS",
|
|
74
|
-
// asignations: [],
|
|
75
|
-
// version: 1,
|
|
76
|
-
// version_status: null,
|
|
77
|
-
// retailersAvailable: [
|
|
78
|
-
// {
|
|
79
|
-
// id: 58,
|
|
80
|
-
// name: "The Home Depot Golden",
|
|
81
|
-
// country: "México",
|
|
82
|
-
// id_region: 1,
|
|
83
|
-
// active: 1,
|
|
84
|
-
// },
|
|
85
|
-
// {
|
|
86
|
-
// id: 59,
|
|
87
|
-
// name: "The Home Depot Platinum",
|
|
88
|
-
// country: "México",
|
|
89
|
-
// id_region: 1,
|
|
90
|
-
// active: 1,
|
|
91
|
-
// },
|
|
92
|
-
// {
|
|
93
|
-
// id: 60,
|
|
94
|
-
// name: "The Home Depot Resizing",
|
|
95
|
-
// country: "México",
|
|
96
|
-
// id_region: 1,
|
|
97
|
-
// active: 1,
|
|
98
|
-
// },
|
|
99
|
-
// {
|
|
100
|
-
// id: 61,
|
|
101
|
-
// name: "Home Depot TAB",
|
|
102
|
-
// country: "México",
|
|
103
|
-
// id_region: 1,
|
|
104
|
-
// active: 1,
|
|
105
|
-
// },
|
|
106
|
-
// ],
|
|
107
|
-
// missing: {},
|
|
108
|
-
// },
|
|
109
|
-
// ],
|
|
110
|
-
// },
|
|
111
154
|
location: {
|
|
112
155
|
product: {
|
|
113
156
|
articleId: 109485,
|
|
114
157
|
versionId: 3
|
|
115
158
|
},
|
|
116
|
-
state: {
|
|
159
|
+
state: {
|
|
160
|
+
origin: "Contentoh"
|
|
161
|
+
}
|
|
117
162
|
},
|
|
118
163
|
user: {
|
|
119
164
|
id_user: 28,
|
|
@@ -133,7 +178,8 @@ ProviderProductEditionDefault.args = {
|
|
|
133
178
|
id_stripe: "cus_KuEt6R6vwmN09f",
|
|
134
179
|
id_role: 0,
|
|
135
180
|
active: 1,
|
|
136
|
-
is_retailer:
|
|
181
|
+
is_retailer: 1,
|
|
182
|
+
email_notify: 0,
|
|
137
183
|
membership: {
|
|
138
184
|
id: 38,
|
|
139
185
|
start_date: "2022-01-18T17:25:35.000Z",
|
|
@@ -145,6 +191,6 @@ ProviderProductEditionDefault.args = {
|
|
|
145
191
|
products_limit: "5000",
|
|
146
192
|
type: "Enterprise"
|
|
147
193
|
},
|
|
148
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?
|
|
194
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1656087239674"
|
|
149
195
|
}
|
|
150
196
|
};
|
|
@@ -1343,8 +1343,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1343
1343
|
data = {
|
|
1344
1344
|
articleId: product.id_article,
|
|
1345
1345
|
orderId: (_product$id_order3 = product.id_order) !== null && _product$id_order3 !== void 0 ? _product$id_order3 : product.orderId,
|
|
1346
|
-
concept: concept
|
|
1347
|
-
retailerId: retailerId
|
|
1346
|
+
concept: concept
|
|
1348
1347
|
};
|
|
1349
1348
|
|
|
1350
1349
|
_axios.default.put("".concat(process.env.REACT_APP_SEND_EVAL), data, {
|
|
@@ -1385,12 +1384,73 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1385
1384
|
};
|
|
1386
1385
|
}();
|
|
1387
1386
|
|
|
1388
|
-
var
|
|
1387
|
+
var validateAll = /*#__PURE__*/function () {
|
|
1389
1388
|
var _ref15 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(result) {
|
|
1390
|
-
var
|
|
1389
|
+
var evaluationArray, sendAll, conceptArray;
|
|
1391
1390
|
return _regenerator.default.wrap(function _callee14$(_context14) {
|
|
1392
1391
|
while (1) {
|
|
1393
1392
|
switch (_context14.prev = _context14.next) {
|
|
1393
|
+
case 0:
|
|
1394
|
+
try {
|
|
1395
|
+
evaluationArray = [];
|
|
1396
|
+
sendAll = [];
|
|
1397
|
+
conceptArray = ["description", "datasheet", "images"];
|
|
1398
|
+
console.log(servicesData);
|
|
1399
|
+
servicesData === null || servicesData === void 0 ? void 0 : servicesData.forEach(function (ret) {
|
|
1400
|
+
var _product$id_order4;
|
|
1401
|
+
|
|
1402
|
+
var data = {
|
|
1403
|
+
articleId: product.id_article,
|
|
1404
|
+
orderId: (_product$id_order4 = product.id_order) !== null && _product$id_order4 !== void 0 ? _product$id_order4 : product.orderId,
|
|
1405
|
+
concept: ret.service,
|
|
1406
|
+
result: result,
|
|
1407
|
+
retailerId: ret.id_retailer
|
|
1408
|
+
};
|
|
1409
|
+
evaluationArray.push(_axios.default.put("".concat(process.env.REACT_APP_EVALUATION_ENDPOINT), data, {
|
|
1410
|
+
headers: {
|
|
1411
|
+
Authorization: token
|
|
1412
|
+
}
|
|
1413
|
+
}));
|
|
1414
|
+
});
|
|
1415
|
+
conceptArray.forEach(function (concept) {
|
|
1416
|
+
var _product$id_order5;
|
|
1417
|
+
|
|
1418
|
+
var data = {
|
|
1419
|
+
articleId: product.id_article,
|
|
1420
|
+
orderId: (_product$id_order5 = product.id_order) !== null && _product$id_order5 !== void 0 ? _product$id_order5 : product.orderId,
|
|
1421
|
+
concept: concept
|
|
1422
|
+
};
|
|
1423
|
+
sendAll.push(_axios.default.put("".concat(process.env.REACT_APP_SEND_EVAL), data, {
|
|
1424
|
+
headers: {
|
|
1425
|
+
Authorization: token
|
|
1426
|
+
}
|
|
1427
|
+
}));
|
|
1428
|
+
});
|
|
1429
|
+
Promise.all(conceptArray);
|
|
1430
|
+
Promise.all(sendAll);
|
|
1431
|
+
} catch (error) {
|
|
1432
|
+
console.log(error);
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
case 1:
|
|
1436
|
+
case "end":
|
|
1437
|
+
return _context14.stop();
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
}, _callee14);
|
|
1441
|
+
}));
|
|
1442
|
+
|
|
1443
|
+
return function validateAll(_x8) {
|
|
1444
|
+
return _ref15.apply(this, arguments);
|
|
1445
|
+
};
|
|
1446
|
+
}();
|
|
1447
|
+
|
|
1448
|
+
var evaluationToRetailer = /*#__PURE__*/function () {
|
|
1449
|
+
var _ref16 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15(result) {
|
|
1450
|
+
var data, prod, statusComplete;
|
|
1451
|
+
return _regenerator.default.wrap(function _callee15$(_context15) {
|
|
1452
|
+
while (1) {
|
|
1453
|
+
switch (_context15.prev = _context15.next) {
|
|
1394
1454
|
case 0:
|
|
1395
1455
|
data = {
|
|
1396
1456
|
articleId: product.id_article,
|
|
@@ -1398,7 +1458,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1398
1458
|
versionId: product.version,
|
|
1399
1459
|
status: result
|
|
1400
1460
|
};
|
|
1401
|
-
|
|
1461
|
+
_context15.next = 3;
|
|
1402
1462
|
return _axios.default.put("".concat(process.env.REACT_APP_RETAILER_REQUEST), data, {
|
|
1403
1463
|
headers: {
|
|
1404
1464
|
Authorization: token
|
|
@@ -1420,14 +1480,14 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1420
1480
|
|
|
1421
1481
|
case 14:
|
|
1422
1482
|
case "end":
|
|
1423
|
-
return
|
|
1483
|
+
return _context15.stop();
|
|
1424
1484
|
}
|
|
1425
1485
|
}
|
|
1426
|
-
},
|
|
1486
|
+
}, _callee15);
|
|
1427
1487
|
}));
|
|
1428
1488
|
|
|
1429
|
-
return function evaluationToRetailer(
|
|
1430
|
-
return
|
|
1489
|
+
return function evaluationToRetailer(_x9) {
|
|
1490
|
+
return _ref16.apply(this, arguments);
|
|
1431
1491
|
};
|
|
1432
1492
|
}();
|
|
1433
1493
|
|
|
@@ -1455,6 +1515,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1455
1515
|
(0, _react.useEffect)(function () {
|
|
1456
1516
|
setSaving(loading);
|
|
1457
1517
|
}, [loading]);
|
|
1518
|
+
console.log(user.is_retailer === 1, product.id_order || product.orderId, isRevision(), getSectionStatus(), "XD");
|
|
1458
1519
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
1459
1520
|
headerTop: headerTop,
|
|
1460
1521
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_HeaderTop.HeaderTop, {
|
|
@@ -1492,6 +1553,13 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1492
1553
|
setActiveRetailer: setActiveRetailer,
|
|
1493
1554
|
showValidationButtons: isRevision() && getSectionStatus(),
|
|
1494
1555
|
servicesData: servicesData ? servicesData : null,
|
|
1556
|
+
showApproveRejectAll: user.is_retailer === 1 && (product.id_order || product.orderId) && isRevision() && getSectionStatus(),
|
|
1557
|
+
approveAll: function approveAll() {
|
|
1558
|
+
return validateAll("A");
|
|
1559
|
+
},
|
|
1560
|
+
rejectAll: function rejectAll() {
|
|
1561
|
+
return validateAll("R");
|
|
1562
|
+
},
|
|
1495
1563
|
approve: function approve() {
|
|
1496
1564
|
if (origin[activeTab] === "RequestWithoutContentoh" && !user.is_retailer && (!product.id_order || !product.orderId)) {
|
|
1497
1565
|
setDataGenericModal(function (prev) {
|
|
@@ -1658,20 +1726,20 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1658
1726
|
reviewed: crossComment
|
|
1659
1727
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
1660
1728
|
buttonType: "circular-button accept-button",
|
|
1661
|
-
onClick: /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1662
|
-
return _regenerator.default.wrap(function
|
|
1729
|
+
onClick: /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
|
|
1730
|
+
return _regenerator.default.wrap(function _callee16$(_context16) {
|
|
1663
1731
|
while (1) {
|
|
1664
|
-
switch (
|
|
1732
|
+
switch (_context16.prev = _context16.next) {
|
|
1665
1733
|
case 0:
|
|
1666
1734
|
setCrossComment(true);
|
|
1667
1735
|
commentRevised();
|
|
1668
1736
|
|
|
1669
1737
|
case 2:
|
|
1670
1738
|
case "end":
|
|
1671
|
-
return
|
|
1739
|
+
return _context16.stop();
|
|
1672
1740
|
}
|
|
1673
1741
|
}
|
|
1674
|
-
},
|
|
1742
|
+
}, _callee16);
|
|
1675
1743
|
}))
|
|
1676
1744
|
})]
|
|
1677
1745
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
@@ -31,7 +31,7 @@ RetailerProductEditionDefault.args = {
|
|
|
31
31
|
"Ficha técnica": false,
|
|
32
32
|
Imágenes: false
|
|
33
33
|
},
|
|
34
|
-
token: "
|
|
34
|
+
token: "eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lK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
|
@@ -41,38 +41,38 @@ RetailerProductEditionDefault.args = {
|
|
|
41
41
|
descriptions: 1,
|
|
42
42
|
images: 1
|
|
43
43
|
},
|
|
44
|
-
orderId:
|
|
45
|
-
status: "
|
|
46
|
-
datasheet_status: "
|
|
47
|
-
prio: "
|
|
44
|
+
orderId: 1213,
|
|
45
|
+
status: "AA",
|
|
46
|
+
datasheet_status: "AA",
|
|
47
|
+
prio: "low",
|
|
48
48
|
version: 2,
|
|
49
|
-
description_status: "
|
|
50
|
-
images_status: "
|
|
49
|
+
description_status: "AA",
|
|
50
|
+
images_status: "AA",
|
|
51
51
|
article: {
|
|
52
|
-
id_article:
|
|
53
|
-
id_category: "
|
|
54
|
-
name: "
|
|
55
|
-
upc: "
|
|
56
|
-
timestamp: "
|
|
57
|
-
id_user:
|
|
58
|
-
status: "
|
|
52
|
+
id_article: 17517,
|
|
53
|
+
id_category: "691",
|
|
54
|
+
name: "Antitranspirante Lady Speed Stick Clinical Complete en Barra para Dama 45 g",
|
|
55
|
+
upc: "7509546066172",
|
|
56
|
+
timestamp: "2021-10-09T16:33:17.000Z",
|
|
57
|
+
id_user: 203,
|
|
58
|
+
status: "RECEPTION",
|
|
59
59
|
active: 1,
|
|
60
|
-
company_id:
|
|
61
|
-
company_name: "
|
|
62
|
-
country: "
|
|
63
|
-
id_order:
|
|
64
|
-
id_datasheet_especialist:
|
|
65
|
-
id_datasheet_facilitator:
|
|
66
|
-
id_description_especialist:
|
|
67
|
-
id_description_facilitator:
|
|
68
|
-
id_images_especialist:
|
|
69
|
-
id_images_facilitator:
|
|
70
|
-
id_auditor:
|
|
60
|
+
company_id: 226,
|
|
61
|
+
company_name: "Prueba Test S.A de C.V.",
|
|
62
|
+
country: "null",
|
|
63
|
+
id_order: 1213,
|
|
64
|
+
id_datasheet_especialist: 334,
|
|
65
|
+
id_datasheet_facilitator: 158,
|
|
66
|
+
id_description_especialist: 334,
|
|
67
|
+
id_description_facilitator: 158,
|
|
68
|
+
id_images_especialist: 366,
|
|
69
|
+
id_images_facilitator: 14,
|
|
70
|
+
id_auditor: 94,
|
|
71
71
|
id_recepcionist: null,
|
|
72
|
-
category: "SALUD Y BELLEZA|CUIDADO
|
|
73
|
-
missingAttributes:
|
|
74
|
-
missingDescriptions:
|
|
75
|
-
missingImages:
|
|
72
|
+
category: "SALUD Y BELLEZA|CUIDADO CORPORAL|DESODORANTES CABALLERO Y DAMA",
|
|
73
|
+
missingAttributes: 1,
|
|
74
|
+
missingDescriptions: 0,
|
|
75
|
+
missingImages: -4
|
|
76
76
|
},
|
|
77
77
|
retailers: [{
|
|
78
78
|
id: 4,
|
|
@@ -81,14 +81,20 @@ RetailerProductEditionDefault.args = {
|
|
|
81
81
|
id_region: 1,
|
|
82
82
|
active: 1
|
|
83
83
|
}, {
|
|
84
|
-
id:
|
|
85
|
-
name: "
|
|
84
|
+
id: 6,
|
|
85
|
+
name: "HEB",
|
|
86
|
+
country: "México",
|
|
87
|
+
id_region: 1,
|
|
88
|
+
active: 1
|
|
89
|
+
}, {
|
|
90
|
+
id: 29,
|
|
91
|
+
name: "Farmacias del Ahorro",
|
|
86
92
|
country: "México",
|
|
87
93
|
id_region: 1,
|
|
88
94
|
active: 1
|
|
89
95
|
}],
|
|
90
|
-
country: "
|
|
91
|
-
upc: "
|
|
96
|
+
country: "null",
|
|
97
|
+
upc: "7509546066172"
|
|
92
98
|
},
|
|
93
99
|
location: {
|
|
94
100
|
product: {
|
|
@@ -97,35 +103,36 @@ RetailerProductEditionDefault.args = {
|
|
|
97
103
|
}
|
|
98
104
|
},
|
|
99
105
|
user: {
|
|
100
|
-
id_user:
|
|
101
|
-
name: "
|
|
102
|
-
last_name: "",
|
|
103
|
-
email: "
|
|
104
|
-
position:
|
|
106
|
+
id_user: 423,
|
|
107
|
+
name: "Facilitador Textos",
|
|
108
|
+
last_name: " ",
|
|
109
|
+
email: "bayadi1538@mnqlm.com",
|
|
110
|
+
position: "Tester",
|
|
105
111
|
telephone: null,
|
|
106
112
|
country: null,
|
|
107
|
-
id_company:
|
|
108
|
-
id_cognito: "
|
|
113
|
+
id_company: 254,
|
|
114
|
+
id_cognito: "0b66a4a9-7790-4034-a30a-c00808962867",
|
|
109
115
|
birth_Date: null,
|
|
110
116
|
about_me: null,
|
|
111
117
|
zip_code: null,
|
|
112
118
|
address: null,
|
|
113
119
|
job: null,
|
|
114
120
|
id_stripe: null,
|
|
115
|
-
id_role:
|
|
121
|
+
id_role: 4,
|
|
116
122
|
active: 1,
|
|
117
123
|
is_retailer: 0,
|
|
124
|
+
email_notify: null,
|
|
118
125
|
membership: {
|
|
119
|
-
id:
|
|
120
|
-
start_date: "
|
|
121
|
-
end_date: "
|
|
122
|
-
planID:
|
|
123
|
-
plan: "
|
|
124
|
-
name: "Plan
|
|
125
|
-
user_limit: "
|
|
126
|
-
products_limit: "
|
|
127
|
-
type: "
|
|
126
|
+
id: 750,
|
|
127
|
+
start_date: "2022-01-07T21:32:54.000Z",
|
|
128
|
+
end_date: "2023-01-07T21:32:54.000Z",
|
|
129
|
+
planID: 6,
|
|
130
|
+
plan: "prod_KvGd6YSTJyR3AP",
|
|
131
|
+
name: "Plan Small",
|
|
132
|
+
user_limit: "10",
|
|
133
|
+
products_limit: "1000",
|
|
134
|
+
type: "Enterprise"
|
|
128
135
|
},
|
|
129
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
136
|
+
src: "https://content-management-profile-prod.s3.amazonaws.com/id-423/423.png?1656100361978"
|
|
130
137
|
}
|
|
131
138
|
};
|