contentoh-components-library 21.5.90 → 21.5.91
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 +11 -15
- package/dist/components/organisms/ChangeStatusModal/index.js +4 -4
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +179 -126
- package/dist/components/pages/RetailerProductEdition/index.js +40 -32
- package/package.json +1 -1
- package/src/components/atoms/GeneralInput/index.js +9 -9
- package/src/components/organisms/ChangeStatusModal/index.jsx +4 -4
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +196 -132
- package/src/components/pages/RetailerProductEdition/index.js +32 -31
|
@@ -213,19 +213,15 @@ var GeneralInput = function GeneralInput(_ref) {
|
|
|
213
213
|
var _textValue$value;
|
|
214
214
|
|
|
215
215
|
setRequiredEmpty(isRequired && (((_textValue$value = textValue.value) === null || _textValue$value === void 0 ? void 0 : _textValue$value.length) === 0 || textValue.value === undefined));
|
|
216
|
-
}, [textValue]);
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
return e.target.focus();
|
|
226
|
-
}, 0);
|
|
227
|
-
}; //AI Generation
|
|
228
|
-
|
|
216
|
+
}, [textValue]); // const numberInputOnWheelPreventChange = (e) => {
|
|
217
|
+
// // Prevent the input value change
|
|
218
|
+
// e.target.blur();
|
|
219
|
+
// // Prevent the page/container scrolling
|
|
220
|
+
// e.stopPropagation();
|
|
221
|
+
// // Refocus immediately, on the next tick (after the current function is done)
|
|
222
|
+
// setTimeout(() => e.target.focus(), 0);
|
|
223
|
+
// };
|
|
224
|
+
//AI Generation
|
|
229
225
|
|
|
230
226
|
var handleAcceptSuggestion = function handleAcceptSuggestion(suggestionValue) {
|
|
231
227
|
if (!suggestionValue) return;
|
|
@@ -277,8 +273,8 @@ var GeneralInput = function GeneralInput(_ref) {
|
|
|
277
273
|
},
|
|
278
274
|
maxLength: maxChar,
|
|
279
275
|
required: isRequired,
|
|
280
|
-
onKeyDown: onKeyDown
|
|
281
|
-
|
|
276
|
+
onKeyDown: onKeyDown // onWheel={numberInputOnWheelPreventChange}
|
|
277
|
+
|
|
282
278
|
}), hasAiGeneration && isBenefitInput && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
283
279
|
className: "icon_container ".concat(isAiAvailable ? "ai-available" : '', " ").concat(isAiActive ? 'ai-active' : ''),
|
|
284
280
|
title: !isAiAvailable ? 'Debes de completar ficha técnica e imágenes para desbloquear la generación con IA' : '',
|
|
@@ -434,7 +434,7 @@ var ChangeStatusModal = function ChangeStatusModal(_ref) {
|
|
|
434
434
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.SectionTitle, {
|
|
435
435
|
children: "Estatus actual:"
|
|
436
436
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.StatusPill, {
|
|
437
|
-
label: currentStatusObj.name,
|
|
437
|
+
label: currentStatusObj === null || currentStatusObj === void 0 ? void 0 : currentStatusObj.name,
|
|
438
438
|
selected: false,
|
|
439
439
|
disabled: true
|
|
440
440
|
})]
|
|
@@ -445,10 +445,10 @@ var ChangeStatusModal = function ChangeStatusModal(_ref) {
|
|
|
445
445
|
children: Object.values(_statusDictionary.STATUS_DICTIONARY).map(function (status) {
|
|
446
446
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.StatusPill, {
|
|
447
447
|
label: status.name,
|
|
448
|
-
disabled: status.name === currentStatusObj.name,
|
|
448
|
+
disabled: status.name === (currentStatusObj === null || currentStatusObj === void 0 ? void 0 : currentStatusObj.name),
|
|
449
449
|
selected: status.name === newStatus,
|
|
450
450
|
onClick: function onClick() {
|
|
451
|
-
return status.name !== currentStatusObj.name && setNewStatus(status.name);
|
|
451
|
+
return status.name !== (currentStatusObj === null || currentStatusObj === void 0 ? void 0 : currentStatusObj.name) && setNewStatus(status.name);
|
|
452
452
|
}
|
|
453
453
|
}, status.name);
|
|
454
454
|
})
|
|
@@ -483,7 +483,7 @@ var ChangeStatusModal = function ChangeStatusModal(_ref) {
|
|
|
483
483
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
484
484
|
className: "status-flow",
|
|
485
485
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.StatusPill, {
|
|
486
|
-
label: currentStatusObj.name,
|
|
486
|
+
label: currentStatusObj === null || currentStatusObj === void 0 ? void 0 : currentStatusObj.name,
|
|
487
487
|
selected: false,
|
|
488
488
|
disabled: true,
|
|
489
489
|
size: "small"
|
|
@@ -33,87 +33,140 @@ RetailerProductEditionDefault.args = {
|
|
|
33
33
|
},
|
|
34
34
|
token: "eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI4ZDAxMDIxNC01YmZhLTQzYzMtOTZmYi1jNTU2ZGMwNTc3NGIiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfbFN6UVo0WjdSIiwiY29nbml0bzp1c2VybmFtZSI6IjhkMDEwMjE0LTViZmEtNDNjMy05NmZiLWM1NTZkYzA1Nzc0YiIsImF1ZCI6IjUyZDlza2tkY2c4cWpwODhvb2sxdXNlNm1rIiwiZXZlbnRfaWQiOiI1MDgwMTVmMy1mZGVkLTQ2ODUtYTIxNy1mYzgyMTg0ZWRmNGMiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTc2ODI1MzE3NywibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTc2ODI1Njc3NywiaWF0IjoxNzY4MjUzMTc3LCJlbWFpbCI6ImthcmFmZTMyMThAbW9tMmtpZC5jb20ifQ.QiZiscuTvrur0g328Zmh2bI-kZyg7YO_T5jT63096JNuSxGnX9wpK87cVTV1dED4ruD-2NMsgLShUIMcklAg17FL6i5_vCuB1dSIDY0LaybvSpriFJaVVdMUIMGFi_1Q7bI9qqyXYkevcf-HO33vVPdU-_-4-u8YRd-QganUk35vPYPh9vFJWbC0Qtvv25ZR4L2xuRIXx4e7StlTvZXysnYL8A84jkK1zn6d77V-9GqQQW8exO6sBW7R6cGt55vnF80NIfG_9lAqCK0PcZH4o50aqrAVhtfV5edlEmXBHeGK5R3Sz5iTeKb51QF3TWVFZCYGvQJ7FShulUWHcm3X2Q",
|
|
35
35
|
productSelected: {
|
|
36
|
-
"
|
|
37
|
-
"status": "RA",
|
|
38
|
-
"datasheet_status": "AA",
|
|
39
|
-
"prio": "none",
|
|
40
|
-
"version": 3,
|
|
41
|
-
"description_status": "RA",
|
|
42
|
-
"images_status": "RA",
|
|
43
|
-
"brand": "Generico",
|
|
44
|
-
"retailerOrder": 0,
|
|
45
|
-
"missing": {
|
|
46
|
-
"datasheet": null,
|
|
47
|
-
"descriptions": null,
|
|
48
|
-
"images": null
|
|
49
|
-
},
|
|
36
|
+
"articleId": 145210,
|
|
50
37
|
"services": {
|
|
51
38
|
"datasheets": 1,
|
|
52
39
|
"descriptions": 1,
|
|
53
40
|
"images": 1
|
|
54
41
|
},
|
|
42
|
+
"orderId": 10459,
|
|
43
|
+
"city": "CDMX, México",
|
|
44
|
+
"status": "AC",
|
|
45
|
+
"datasheet_status": "AC",
|
|
46
|
+
"prio": "none",
|
|
47
|
+
"version": 3,
|
|
48
|
+
"description_status": "AC",
|
|
49
|
+
"images_status": "AC",
|
|
50
|
+
"statusByRetailer": [{
|
|
51
|
+
"status": "AC",
|
|
52
|
+
"service": "datasheet",
|
|
53
|
+
"retailer_id": 13,
|
|
54
|
+
"task_user_group_id": 4
|
|
55
|
+
}, {
|
|
56
|
+
"status": "AC",
|
|
57
|
+
"service": "description",
|
|
58
|
+
"retailer_id": 13,
|
|
59
|
+
"task_user_group_id": 4
|
|
60
|
+
}, {
|
|
61
|
+
"status": "AC",
|
|
62
|
+
"service": "images",
|
|
63
|
+
"retailer_id": 13,
|
|
64
|
+
"task_user_group_id": 4
|
|
65
|
+
}, {
|
|
66
|
+
"status": "AC",
|
|
67
|
+
"service": "datasheet",
|
|
68
|
+
"retailer_id": 29,
|
|
69
|
+
"task_user_group_id": 4
|
|
70
|
+
}, {
|
|
71
|
+
"status": "AC",
|
|
72
|
+
"service": "description",
|
|
73
|
+
"retailer_id": 29,
|
|
74
|
+
"task_user_group_id": 4
|
|
75
|
+
}, {
|
|
76
|
+
"status": "AC",
|
|
77
|
+
"service": "images",
|
|
78
|
+
"retailer_id": 29,
|
|
79
|
+
"task_user_group_id": 4
|
|
80
|
+
}, {
|
|
81
|
+
"status": "AC",
|
|
82
|
+
"service": "datasheet",
|
|
83
|
+
"retailer_id": 36,
|
|
84
|
+
"task_user_group_id": 4
|
|
85
|
+
}, {
|
|
86
|
+
"status": "AC",
|
|
87
|
+
"service": "description",
|
|
88
|
+
"retailer_id": 36,
|
|
89
|
+
"task_user_group_id": 4
|
|
90
|
+
}, {
|
|
91
|
+
"status": "AC",
|
|
92
|
+
"service": "images",
|
|
93
|
+
"retailer_id": 36,
|
|
94
|
+
"task_user_group_id": 4
|
|
95
|
+
}, {
|
|
96
|
+
"status": "AC",
|
|
97
|
+
"service": "datasheet",
|
|
98
|
+
"retailer_id": 70,
|
|
99
|
+
"task_user_group_id": 4
|
|
100
|
+
}, {
|
|
101
|
+
"status": "AC",
|
|
102
|
+
"service": "description",
|
|
103
|
+
"retailer_id": 70,
|
|
104
|
+
"task_user_group_id": 4
|
|
105
|
+
}, {
|
|
106
|
+
"status": "AC",
|
|
107
|
+
"service": "images",
|
|
108
|
+
"retailer_id": 70,
|
|
109
|
+
"task_user_group_id": 4
|
|
110
|
+
}],
|
|
55
111
|
"article": {
|
|
56
|
-
"
|
|
112
|
+
"id_article": 145210,
|
|
113
|
+
"id_category": "4874",
|
|
114
|
+
"brand": "Generico",
|
|
115
|
+
"name": "Serna Status Bug 7",
|
|
116
|
+
"upc": "16168153",
|
|
117
|
+
"sku": "15631130151",
|
|
118
|
+
"timestamp": "2026-05-07T16:00:51.000Z",
|
|
119
|
+
"active": 1,
|
|
120
|
+
"company_id": 291,
|
|
57
121
|
"company_name": "LATAM LOGISTICS",
|
|
58
122
|
"country": "México",
|
|
59
|
-
"
|
|
123
|
+
"id_order": 10459,
|
|
60
124
|
"id_datasheet_especialist": 426,
|
|
61
125
|
"id_datasheet_facilitator": null,
|
|
62
126
|
"id_description_especialist": 426,
|
|
63
127
|
"id_description_facilitator": null,
|
|
64
128
|
"id_images_especialist": 427,
|
|
65
129
|
"id_images_facilitator": null,
|
|
66
|
-
"id_order": 10458,
|
|
67
|
-
"id_article": 145207,
|
|
68
130
|
"id_auditor": 425,
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"upc": "897654352",
|
|
72
|
-
"sku": "764535242",
|
|
131
|
+
"id_recepcionist": null,
|
|
132
|
+
"category": "Productos de Higiene Personal|Productos de Higiene Personal|Productos de Higiene Personal",
|
|
73
133
|
"categoryRetailer": [{
|
|
74
|
-
"id_category":
|
|
134
|
+
"id_category": 3561,
|
|
135
|
+
"id_retailer": 29,
|
|
136
|
+
"category_name": "Abarrotes Farmacias del Ahorro|Abarrotes|Abarrotes",
|
|
137
|
+
"retailer_name": "Farmacias del Ahorro"
|
|
138
|
+
}, {
|
|
139
|
+
"id_category": 4216,
|
|
75
140
|
"id_retailer": 70,
|
|
76
|
-
"category_name": "
|
|
141
|
+
"category_name": "Limpieza|Cuarto de Lavado|Cuarto de Lavado",
|
|
77
142
|
"retailer_name": "Bodega Aurrera"
|
|
78
143
|
}, {
|
|
79
|
-
"id_category":
|
|
80
|
-
"id_retailer":
|
|
81
|
-
"category_name": "
|
|
82
|
-
"retailer_name": "
|
|
144
|
+
"id_category": 4874,
|
|
145
|
+
"id_retailer": 36,
|
|
146
|
+
"category_name": "Productos de Higiene Personal|Productos de Higiene Personal|Productos de Higiene Personal",
|
|
147
|
+
"retailer_name": "Oxxo"
|
|
148
|
+
}, {
|
|
149
|
+
"id_category": 4941,
|
|
150
|
+
"id_retailer": 13,
|
|
151
|
+
"category_name": "Supermercado Soriana|Supermercado|Supermercado",
|
|
152
|
+
"retailer_name": "Soriana"
|
|
83
153
|
}]
|
|
84
154
|
},
|
|
85
155
|
"retailers": [{
|
|
86
|
-
"id":
|
|
87
|
-
"name": "
|
|
156
|
+
"id": 13,
|
|
157
|
+
"name": "Soriana"
|
|
158
|
+
}, {
|
|
159
|
+
"id": 29,
|
|
160
|
+
"name": "Farmacias del Ahorro"
|
|
161
|
+
}, {
|
|
162
|
+
"id": 36,
|
|
163
|
+
"name": "Oxxo"
|
|
88
164
|
}, {
|
|
89
165
|
"id": 70,
|
|
90
166
|
"name": "Bodega Aurrera"
|
|
91
167
|
}],
|
|
92
|
-
"
|
|
93
|
-
|
|
94
|
-
"service": "datasheet",
|
|
95
|
-
"retailer_id": 9
|
|
96
|
-
}, {
|
|
97
|
-
"status": "AA",
|
|
98
|
-
"service": "description",
|
|
99
|
-
"retailer_id": 9
|
|
100
|
-
}, {
|
|
101
|
-
"status": "RA/AS",
|
|
102
|
-
"service": "images",
|
|
103
|
-
"retailer_id": 9
|
|
104
|
-
}, {
|
|
105
|
-
"status": "AP",
|
|
106
|
-
"service": "datasheet",
|
|
107
|
-
"retailer_id": 70
|
|
108
|
-
}, {
|
|
109
|
-
"status": "RA/AS",
|
|
110
|
-
"service": "description",
|
|
111
|
-
"retailer_id": 70
|
|
112
|
-
}, {
|
|
113
|
-
"status": "AP",
|
|
114
|
-
"service": "images",
|
|
115
|
-
"retailer_id": 70
|
|
116
|
-
}]
|
|
168
|
+
"country": "México",
|
|
169
|
+
"upc": "16168153"
|
|
117
170
|
},
|
|
118
171
|
// location: {
|
|
119
172
|
// product: { articleId: 126855, versionId: 3 },
|
|
@@ -123,41 +176,42 @@ RetailerProductEditionDefault.args = {
|
|
|
123
176
|
// },
|
|
124
177
|
// },
|
|
125
178
|
// EDICION IMAGENES
|
|
126
|
-
user: {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}
|
|
179
|
+
// user: {
|
|
180
|
+
// "id_user": 427,
|
|
181
|
+
// "name": "Especialista Edición",
|
|
182
|
+
// "last_name": null,
|
|
183
|
+
// "email": "kikije1467@mtlcz.com",
|
|
184
|
+
// "position": "Tester",
|
|
185
|
+
// "telephone": null,
|
|
186
|
+
// "country": null,
|
|
187
|
+
// "id_company": 254,
|
|
188
|
+
// "id_cognito": "c7e5a6a4-2b3f-4d54-af98-9e09a4cbc01e",
|
|
189
|
+
// "birth_Date": null,
|
|
190
|
+
// "about_me": null,
|
|
191
|
+
// "zip_code": null,
|
|
192
|
+
// "address": null,
|
|
193
|
+
// "job": null,
|
|
194
|
+
// "id_stripe": null,
|
|
195
|
+
// "id_role": 8,
|
|
196
|
+
// "active": 1,
|
|
197
|
+
// "is_retailer": 0,
|
|
198
|
+
// "email_notify": null,
|
|
199
|
+
// "is_user_tech": null,
|
|
200
|
+
// "is_onboarding": 0,
|
|
201
|
+
// "membership": {
|
|
202
|
+
// "id": 750,
|
|
203
|
+
// "start_date": "2022-01-07T21:32:54.000Z",
|
|
204
|
+
// "end_date": "2023-01-07T21:32:54.000Z",
|
|
205
|
+
// "planID": 6,
|
|
206
|
+
// "plan": "prod_KvGd6YSTJyR3AP",
|
|
207
|
+
// "name": "Plan Small",
|
|
208
|
+
// "user_limit": "10",
|
|
209
|
+
// "products_limit": "1000",
|
|
210
|
+
// "type": "Enterprise"
|
|
211
|
+
// },
|
|
212
|
+
// "src": "https://content-management-profile-prod.s3.amazonaws.com/id-427/427.png?1775592220312"
|
|
213
|
+
// },
|
|
214
|
+
//TEXTOS
|
|
161
215
|
// user: {
|
|
162
216
|
// id_user: 426,
|
|
163
217
|
// name: "Especialista Textos",
|
|
@@ -194,40 +248,39 @@ RetailerProductEditionDefault.args = {
|
|
|
194
248
|
// src: "https://content-management-profile-prod.s3.amazonaws.com/id-426/426.png?1768253179478",
|
|
195
249
|
// },
|
|
196
250
|
// AUDITORES
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
251
|
+
user: {
|
|
252
|
+
"id_user": 425,
|
|
253
|
+
"name": "Auditor QA",
|
|
254
|
+
"last_name": null,
|
|
255
|
+
"email": "ladiboh785@mi166.com",
|
|
256
|
+
"position": "Tester",
|
|
257
|
+
"telephone": null,
|
|
258
|
+
"country": null,
|
|
259
|
+
"id_company": 254,
|
|
260
|
+
"id_cognito": "23a3f496-4e38-4e12-9bf5-7f90b77a2f35",
|
|
261
|
+
"birth_Date": null,
|
|
262
|
+
"about_me": null,
|
|
263
|
+
"zip_code": null,
|
|
264
|
+
"address": null,
|
|
265
|
+
"job": null,
|
|
266
|
+
"id_stripe": null,
|
|
267
|
+
"id_role": 6,
|
|
268
|
+
"active": 1,
|
|
269
|
+
"is_retailer": 0,
|
|
270
|
+
"email_notify": null,
|
|
271
|
+
"is_user_tech": null,
|
|
272
|
+
"is_onboarding": 0,
|
|
273
|
+
"membership": {
|
|
274
|
+
"id": 750,
|
|
275
|
+
"start_date": "2022-01-07T21:32:54.000Z",
|
|
276
|
+
"end_date": "2023-01-07T21:32:54.000Z",
|
|
277
|
+
"planID": 6,
|
|
278
|
+
"plan": "prod_KvGd6YSTJyR3AP",
|
|
279
|
+
"name": "Plan Small",
|
|
280
|
+
"user_limit": "10",
|
|
281
|
+
"products_limit": "1000",
|
|
282
|
+
"type": "Enterprise"
|
|
283
|
+
},
|
|
284
|
+
"src": "https://content-management-profile-prod.s3.amazonaws.com/id-425/425.png?1778260157973"
|
|
285
|
+
}
|
|
233
286
|
};
|
|
@@ -1235,7 +1235,7 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
1235
1235
|
|
|
1236
1236
|
var sendBulkEvaluation = /*#__PURE__*/function () {
|
|
1237
1237
|
var _ref12 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(result) {
|
|
1238
|
-
var _state$services_data3, evaluationArray, conceptArray, status, updatedStatusByRetailer, updatedProduct,
|
|
1238
|
+
var _state$services_data3, evaluationArray, conceptArray, status, updatedStatusByRetailer, updatedProduct, updatedServicesData;
|
|
1239
1239
|
|
|
1240
1240
|
return _regenerator.default.wrap(function _callee9$(_context9) {
|
|
1241
1241
|
while (1) {
|
|
@@ -1247,21 +1247,20 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
1247
1247
|
});
|
|
1248
1248
|
_context9.prev = 1;
|
|
1249
1249
|
evaluationArray = [];
|
|
1250
|
-
conceptArray = (0, _utils.getConceptsByRole)(user.id_role);
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
var service = ret.service,
|
|
1250
|
+
conceptArray = (0, _utils.getConceptsByRole)(user.id_role);
|
|
1251
|
+
(_state$services_data3 = state.services_data) === null || _state$services_data3 === void 0 ? void 0 : _state$services_data3.forEach(function (ret, idx) {
|
|
1252
|
+
var retailer_service = ret.service,
|
|
1254
1253
|
id_retailer = ret.id_retailer,
|
|
1255
|
-
|
|
1254
|
+
status_retailer_service = ret.status;
|
|
1255
|
+
var lastStatusLevel = status_retailer_service.replace(/.*\//, "");
|
|
1256
1256
|
|
|
1257
|
-
if (conceptArray.includes(
|
|
1258
|
-
var data = {
|
|
1259
|
-
data = {
|
|
1257
|
+
if (conceptArray.includes(retailer_service) && statusArray !== null && statusArray !== void 0 && statusArray.includes(lastStatusLevel)) {
|
|
1258
|
+
var data = {
|
|
1260
1259
|
articleId: state.product.id_article,
|
|
1261
1260
|
orderId: state.product.id_order,
|
|
1262
|
-
concept:
|
|
1261
|
+
concept: retailer_service,
|
|
1263
1262
|
result: result,
|
|
1264
|
-
evalStatus:
|
|
1263
|
+
evalStatus: status_retailer_service,
|
|
1265
1264
|
retailerId: id_retailer
|
|
1266
1265
|
};
|
|
1267
1266
|
evaluationArray.push(_axios.default.put("".concat(process.env.REACT_APP_EVALUATION_ENDPOINT), data, {
|
|
@@ -1285,6 +1284,7 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
1285
1284
|
|
|
1286
1285
|
updatedProduct = (0, _objectSpread5.default)((0, _objectSpread5.default)({}, state.product), {}, {
|
|
1287
1286
|
article_status: status,
|
|
1287
|
+
status: status,
|
|
1288
1288
|
datasheet_status: state.product.datasheet_status === "NA" ? "NA" : status,
|
|
1289
1289
|
description_status: state.product.description_status === "NA" ? "NA" : status,
|
|
1290
1290
|
images_status: state.product.images_status === "NA" ? "NA" : status,
|
|
@@ -1294,20 +1294,27 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
1294
1294
|
type: "SET_PRODUCT",
|
|
1295
1295
|
payload: updatedProduct
|
|
1296
1296
|
});
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
datasheet_status: updatedProduct.datasheet_status,
|
|
1302
|
-
description_status: updatedProduct.description_status,
|
|
1303
|
-
images_status: updatedProduct.images_status
|
|
1297
|
+
updatedServicesData = state.services_data.map(function (service) {
|
|
1298
|
+
return conceptArray.includes(service.service) ? (0, _objectSpread5.default)((0, _objectSpread5.default)({}, service), {}, {
|
|
1299
|
+
status: status
|
|
1300
|
+
}) : service;
|
|
1304
1301
|
});
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1302
|
+
dispatch({
|
|
1303
|
+
type: "SET_SERVICES_DATA",
|
|
1304
|
+
payload: updatedServicesData
|
|
1305
|
+
}); // sessionStorage.setItem(
|
|
1306
|
+
// "productSelected",
|
|
1307
|
+
// JSON.stringify(updatedProduct),
|
|
1308
|
+
// );
|
|
1309
|
+
// sessionStorage.setItem(
|
|
1310
|
+
// "productEdit",
|
|
1311
|
+
// JSON.stringify({
|
|
1312
|
+
// ArticleId: updatedProduct.id_article,
|
|
1313
|
+
// idCategory: updatedProduct.id_category,
|
|
1314
|
+
// product: updatedProduct,
|
|
1315
|
+
// }),
|
|
1316
|
+
// );
|
|
1317
|
+
// Mostrar modal de éxito
|
|
1311
1318
|
|
|
1312
1319
|
dispatch({
|
|
1313
1320
|
type: "SET_MODAL",
|
|
@@ -1318,28 +1325,28 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
1318
1325
|
image: _genericModalCheck.default
|
|
1319
1326
|
}
|
|
1320
1327
|
});
|
|
1321
|
-
_context9.next =
|
|
1328
|
+
_context9.next = 19;
|
|
1322
1329
|
break;
|
|
1323
1330
|
|
|
1324
|
-
case
|
|
1325
|
-
_context9.prev =
|
|
1331
|
+
case 16:
|
|
1332
|
+
_context9.prev = 16;
|
|
1326
1333
|
_context9.t0 = _context9["catch"](1);
|
|
1327
1334
|
console.error("Error in bulk evaluation:", _context9.t0);
|
|
1328
1335
|
|
|
1329
|
-
case
|
|
1330
|
-
_context9.prev =
|
|
1336
|
+
case 19:
|
|
1337
|
+
_context9.prev = 19;
|
|
1331
1338
|
dispatch({
|
|
1332
1339
|
type: "SET_SAVING",
|
|
1333
1340
|
payload: false
|
|
1334
1341
|
});
|
|
1335
|
-
return _context9.finish(
|
|
1342
|
+
return _context9.finish(19);
|
|
1336
1343
|
|
|
1337
|
-
case
|
|
1344
|
+
case 22:
|
|
1338
1345
|
case "end":
|
|
1339
1346
|
return _context9.stop();
|
|
1340
1347
|
}
|
|
1341
1348
|
}
|
|
1342
|
-
}, _callee9, null, [[1,
|
|
1349
|
+
}, _callee9, null, [[1, 16, 19, 22]]);
|
|
1343
1350
|
}));
|
|
1344
1351
|
|
|
1345
1352
|
return function sendBulkEvaluation(_x3) {
|
|
@@ -1961,6 +1968,7 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
1961
1968
|
canAssign: ![7, 8].includes(user.id_role)
|
|
1962
1969
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1963
1970
|
className: "services-information-container " + (imageLayout && state.active_tab === "Imágenes" ? "image-services" : ""),
|
|
1971
|
+
id: "services-information-container",
|
|
1964
1972
|
children: state.saving ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Loading.Loading, {}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
1965
1973
|
children: [state.active_tab === "Descripción" && (((_state$product9 = state.product) === null || _state$product9 === void 0 ? void 0 : _state$product9.description_status) !== "NS" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputGroup.InputGroup, {
|
|
1966
1974
|
activeSection: state.active_tab,
|
package/package.json
CHANGED
|
@@ -175,14 +175,14 @@ export const GeneralInput = ({
|
|
|
175
175
|
);
|
|
176
176
|
}, [textValue]);
|
|
177
177
|
|
|
178
|
-
const numberInputOnWheelPreventChange = (e) => {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
};
|
|
178
|
+
// const numberInputOnWheelPreventChange = (e) => {
|
|
179
|
+
// // Prevent the input value change
|
|
180
|
+
// e.target.blur();
|
|
181
|
+
// // Prevent the page/container scrolling
|
|
182
|
+
// e.stopPropagation();
|
|
183
|
+
// // Refocus immediately, on the next tick (after the current function is done)
|
|
184
|
+
// setTimeout(() => e.target.focus(), 0);
|
|
185
|
+
// };
|
|
186
186
|
|
|
187
187
|
//AI Generation
|
|
188
188
|
|
|
@@ -237,7 +237,7 @@ export const GeneralInput = ({
|
|
|
237
237
|
maxLength={maxChar}
|
|
238
238
|
required={isRequired}
|
|
239
239
|
onKeyDown={onKeyDown}
|
|
240
|
-
onWheel={numberInputOnWheelPreventChange}
|
|
240
|
+
// onWheel={numberInputOnWheelPreventChange}
|
|
241
241
|
/>
|
|
242
242
|
{
|
|
243
243
|
|
|
@@ -383,7 +383,7 @@ const ChangeStatusModal = ({
|
|
|
383
383
|
<Section>
|
|
384
384
|
<SectionTitle>Estatus actual:</SectionTitle>
|
|
385
385
|
<StatusPill
|
|
386
|
-
label={currentStatusObj
|
|
386
|
+
label={currentStatusObj?.name}
|
|
387
387
|
selected={false}
|
|
388
388
|
disabled={true}
|
|
389
389
|
/>
|
|
@@ -396,10 +396,10 @@ const ChangeStatusModal = ({
|
|
|
396
396
|
<StatusPill
|
|
397
397
|
key={status.name}
|
|
398
398
|
label={status.name}
|
|
399
|
-
disabled={status.name === currentStatusObj
|
|
399
|
+
disabled={status.name === currentStatusObj?.name}
|
|
400
400
|
selected={status.name === newStatus}
|
|
401
401
|
onClick={() =>
|
|
402
|
-
status.name !== currentStatusObj
|
|
402
|
+
status.name !== currentStatusObj?.name &&
|
|
403
403
|
setNewStatus(status.name)
|
|
404
404
|
}
|
|
405
405
|
/>
|
|
@@ -431,7 +431,7 @@ const ChangeStatusModal = ({
|
|
|
431
431
|
<span className="summary-title">Resumen de impacto:</span>
|
|
432
432
|
<div className="status-flow">
|
|
433
433
|
<StatusPill
|
|
434
|
-
label={currentStatusObj
|
|
434
|
+
label={currentStatusObj?.name}
|
|
435
435
|
selected={false}
|
|
436
436
|
disabled={true}
|
|
437
437
|
size="small"
|
|
@@ -18,101 +18,165 @@ RetailerProductEditionDefault.args = {
|
|
|
18
18
|
token:
|
|
19
19
|
"eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI4ZDAxMDIxNC01YmZhLTQzYzMtOTZmYi1jNTU2ZGMwNTc3NGIiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfbFN6UVo0WjdSIiwiY29nbml0bzp1c2VybmFtZSI6IjhkMDEwMjE0LTViZmEtNDNjMy05NmZiLWM1NTZkYzA1Nzc0YiIsImF1ZCI6IjUyZDlza2tkY2c4cWpwODhvb2sxdXNlNm1rIiwiZXZlbnRfaWQiOiI1MDgwMTVmMy1mZGVkLTQ2ODUtYTIxNy1mYzgyMTg0ZWRmNGMiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTc2ODI1MzE3NywibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTc2ODI1Njc3NywiaWF0IjoxNzY4MjUzMTc3LCJlbWFpbCI6ImthcmFmZTMyMThAbW9tMmtpZC5jb20ifQ.QiZiscuTvrur0g328Zmh2bI-kZyg7YO_T5jT63096JNuSxGnX9wpK87cVTV1dED4ruD-2NMsgLShUIMcklAg17FL6i5_vCuB1dSIDY0LaybvSpriFJaVVdMUIMGFi_1Q7bI9qqyXYkevcf-HO33vVPdU-_-4-u8YRd-QganUk35vPYPh9vFJWbC0Qtvv25ZR4L2xuRIXx4e7StlTvZXysnYL8A84jkK1zn6d77V-9GqQQW8exO6sBW7R6cGt55vnF80NIfG_9lAqCK0PcZH4o50aqrAVhtfV5edlEmXBHeGK5R3Sz5iTeKb51QF3TWVFZCYGvQJ7FShulUWHcm3X2Q",
|
|
20
20
|
productSelected: {
|
|
21
|
-
"
|
|
22
|
-
"status": "RA",
|
|
23
|
-
"datasheet_status": "AA",
|
|
24
|
-
"prio": "none",
|
|
25
|
-
"version": 3,
|
|
26
|
-
"description_status": "RA",
|
|
27
|
-
"images_status": "RA",
|
|
28
|
-
"brand": "Generico",
|
|
29
|
-
"retailerOrder": 0,
|
|
30
|
-
"missing": {
|
|
31
|
-
"datasheet": null,
|
|
32
|
-
"descriptions": null,
|
|
33
|
-
"images": null
|
|
34
|
-
},
|
|
21
|
+
"articleId": 145210,
|
|
35
22
|
"services": {
|
|
36
23
|
"datasheets": 1,
|
|
37
24
|
"descriptions": 1,
|
|
38
25
|
"images": 1
|
|
39
26
|
},
|
|
27
|
+
"orderId": 10459,
|
|
28
|
+
"city": "CDMX, México",
|
|
29
|
+
"status": "AC",
|
|
30
|
+
"datasheet_status": "AC",
|
|
31
|
+
"prio": "none",
|
|
32
|
+
"version": 3,
|
|
33
|
+
"description_status": "AC",
|
|
34
|
+
"images_status": "AC",
|
|
35
|
+
"statusByRetailer": [
|
|
36
|
+
{
|
|
37
|
+
"status": "AC",
|
|
38
|
+
"service": "datasheet",
|
|
39
|
+
"retailer_id": 13,
|
|
40
|
+
"task_user_group_id": 4
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"status": "AC",
|
|
44
|
+
"service": "description",
|
|
45
|
+
"retailer_id": 13,
|
|
46
|
+
"task_user_group_id": 4
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"status": "AC",
|
|
50
|
+
"service": "images",
|
|
51
|
+
"retailer_id": 13,
|
|
52
|
+
"task_user_group_id": 4
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"status": "AC",
|
|
56
|
+
"service": "datasheet",
|
|
57
|
+
"retailer_id": 29,
|
|
58
|
+
"task_user_group_id": 4
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"status": "AC",
|
|
62
|
+
"service": "description",
|
|
63
|
+
"retailer_id": 29,
|
|
64
|
+
"task_user_group_id": 4
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"status": "AC",
|
|
68
|
+
"service": "images",
|
|
69
|
+
"retailer_id": 29,
|
|
70
|
+
"task_user_group_id": 4
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"status": "AC",
|
|
74
|
+
"service": "datasheet",
|
|
75
|
+
"retailer_id": 36,
|
|
76
|
+
"task_user_group_id": 4
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"status": "AC",
|
|
80
|
+
"service": "description",
|
|
81
|
+
"retailer_id": 36,
|
|
82
|
+
"task_user_group_id": 4
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"status": "AC",
|
|
86
|
+
"service": "images",
|
|
87
|
+
"retailer_id": 36,
|
|
88
|
+
"task_user_group_id": 4
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"status": "AC",
|
|
92
|
+
"service": "datasheet",
|
|
93
|
+
"retailer_id": 70,
|
|
94
|
+
"task_user_group_id": 4
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"status": "AC",
|
|
98
|
+
"service": "description",
|
|
99
|
+
"retailer_id": 70,
|
|
100
|
+
"task_user_group_id": 4
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"status": "AC",
|
|
104
|
+
"service": "images",
|
|
105
|
+
"retailer_id": 70,
|
|
106
|
+
"task_user_group_id": 4
|
|
107
|
+
}
|
|
108
|
+
],
|
|
40
109
|
"article": {
|
|
41
|
-
"
|
|
110
|
+
"id_article": 145210,
|
|
111
|
+
"id_category": "4874",
|
|
112
|
+
"brand": "Generico",
|
|
113
|
+
"name": "Serna Status Bug 7",
|
|
114
|
+
"upc": "16168153",
|
|
115
|
+
"sku": "15631130151",
|
|
116
|
+
"timestamp": "2026-05-07T16:00:51.000Z",
|
|
117
|
+
"active": 1,
|
|
118
|
+
"company_id": 291,
|
|
42
119
|
"company_name": "LATAM LOGISTICS",
|
|
43
120
|
"country": "México",
|
|
44
|
-
"
|
|
121
|
+
"id_order": 10459,
|
|
45
122
|
"id_datasheet_especialist": 426,
|
|
46
123
|
"id_datasheet_facilitator": null,
|
|
47
124
|
"id_description_especialist": 426,
|
|
48
125
|
"id_description_facilitator": null,
|
|
49
126
|
"id_images_especialist": 427,
|
|
50
127
|
"id_images_facilitator": null,
|
|
51
|
-
"id_order": 10458,
|
|
52
|
-
"id_article": 145207,
|
|
53
128
|
"id_auditor": 425,
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"upc": "897654352",
|
|
57
|
-
"sku": "764535242",
|
|
129
|
+
"id_recepcionist": null,
|
|
130
|
+
"category": "Productos de Higiene Personal|Productos de Higiene Personal|Productos de Higiene Personal",
|
|
58
131
|
"categoryRetailer": [
|
|
59
132
|
{
|
|
60
|
-
"id_category":
|
|
133
|
+
"id_category": 3561,
|
|
134
|
+
"id_retailer": 29,
|
|
135
|
+
"category_name": "Abarrotes Farmacias del Ahorro|Abarrotes|Abarrotes",
|
|
136
|
+
"retailer_name": "Farmacias del Ahorro"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"id_category": 4216,
|
|
61
140
|
"id_retailer": 70,
|
|
62
|
-
"category_name": "
|
|
141
|
+
"category_name": "Limpieza|Cuarto de Lavado|Cuarto de Lavado",
|
|
63
142
|
"retailer_name": "Bodega Aurrera"
|
|
64
143
|
},
|
|
65
144
|
{
|
|
66
|
-
"id_category":
|
|
67
|
-
"id_retailer":
|
|
68
|
-
"category_name": "
|
|
69
|
-
"retailer_name": "
|
|
145
|
+
"id_category": 4874,
|
|
146
|
+
"id_retailer": 36,
|
|
147
|
+
"category_name": "Productos de Higiene Personal|Productos de Higiene Personal|Productos de Higiene Personal",
|
|
148
|
+
"retailer_name": "Oxxo"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"id_category": 4941,
|
|
152
|
+
"id_retailer": 13,
|
|
153
|
+
"category_name": "Supermercado Soriana|Supermercado|Supermercado",
|
|
154
|
+
"retailer_name": "Soriana"
|
|
70
155
|
}
|
|
71
156
|
]
|
|
72
157
|
},
|
|
73
158
|
"retailers": [
|
|
74
159
|
{
|
|
75
|
-
"id":
|
|
76
|
-
"name": "
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"id": 70,
|
|
80
|
-
"name": "Bodega Aurrera"
|
|
81
|
-
}
|
|
82
|
-
],
|
|
83
|
-
"statusByRetailer": [
|
|
84
|
-
{
|
|
85
|
-
"status": "AA",
|
|
86
|
-
"service": "datasheet",
|
|
87
|
-
"retailer_id": 9
|
|
160
|
+
"id": 13,
|
|
161
|
+
"name": "Soriana"
|
|
88
162
|
},
|
|
89
163
|
{
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"retailer_id": 9
|
|
164
|
+
"id": 29,
|
|
165
|
+
"name": "Farmacias del Ahorro"
|
|
93
166
|
},
|
|
94
167
|
{
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"retailer_id": 9
|
|
168
|
+
"id": 36,
|
|
169
|
+
"name": "Oxxo"
|
|
98
170
|
},
|
|
99
171
|
{
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"retailer_id": 70
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"status": "RA/AS",
|
|
106
|
-
"service": "description",
|
|
107
|
-
"retailer_id": 70
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
"status": "AP",
|
|
111
|
-
"service": "images",
|
|
112
|
-
"retailer_id": 70
|
|
172
|
+
"id": 70,
|
|
173
|
+
"name": "Bodega Aurrera"
|
|
113
174
|
}
|
|
114
|
-
]
|
|
115
|
-
|
|
175
|
+
],
|
|
176
|
+
"country": "México",
|
|
177
|
+
"upc": "16168153"
|
|
178
|
+
},
|
|
179
|
+
|
|
116
180
|
|
|
117
181
|
// location: {
|
|
118
182
|
// product: { articleId: 126855, versionId: 3 },
|
|
@@ -124,41 +188,41 @@ RetailerProductEditionDefault.args = {
|
|
|
124
188
|
|
|
125
189
|
// EDICION IMAGENES
|
|
126
190
|
|
|
127
|
-
user: {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
},
|
|
191
|
+
// user: {
|
|
192
|
+
// "id_user": 427,
|
|
193
|
+
// "name": "Especialista Edición",
|
|
194
|
+
// "last_name": null,
|
|
195
|
+
// "email": "kikije1467@mtlcz.com",
|
|
196
|
+
// "position": "Tester",
|
|
197
|
+
// "telephone": null,
|
|
198
|
+
// "country": null,
|
|
199
|
+
// "id_company": 254,
|
|
200
|
+
// "id_cognito": "c7e5a6a4-2b3f-4d54-af98-9e09a4cbc01e",
|
|
201
|
+
// "birth_Date": null,
|
|
202
|
+
// "about_me": null,
|
|
203
|
+
// "zip_code": null,
|
|
204
|
+
// "address": null,
|
|
205
|
+
// "job": null,
|
|
206
|
+
// "id_stripe": null,
|
|
207
|
+
// "id_role": 8,
|
|
208
|
+
// "active": 1,
|
|
209
|
+
// "is_retailer": 0,
|
|
210
|
+
// "email_notify": null,
|
|
211
|
+
// "is_user_tech": null,
|
|
212
|
+
// "is_onboarding": 0,
|
|
213
|
+
// "membership": {
|
|
214
|
+
// "id": 750,
|
|
215
|
+
// "start_date": "2022-01-07T21:32:54.000Z",
|
|
216
|
+
// "end_date": "2023-01-07T21:32:54.000Z",
|
|
217
|
+
// "planID": 6,
|
|
218
|
+
// "plan": "prod_KvGd6YSTJyR3AP",
|
|
219
|
+
// "name": "Plan Small",
|
|
220
|
+
// "user_limit": "10",
|
|
221
|
+
// "products_limit": "1000",
|
|
222
|
+
// "type": "Enterprise"
|
|
223
|
+
// },
|
|
224
|
+
// "src": "https://content-management-profile-prod.s3.amazonaws.com/id-427/427.png?1775592220312"
|
|
225
|
+
// },
|
|
162
226
|
|
|
163
227
|
//TEXTOS
|
|
164
228
|
|
|
@@ -200,40 +264,40 @@ user: {
|
|
|
200
264
|
|
|
201
265
|
// AUDITORES
|
|
202
266
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
267
|
+
user: {
|
|
268
|
+
"id_user": 425,
|
|
269
|
+
"name": "Auditor QA",
|
|
270
|
+
"last_name": null,
|
|
271
|
+
"email": "ladiboh785@mi166.com",
|
|
272
|
+
"position": "Tester",
|
|
273
|
+
"telephone": null,
|
|
274
|
+
"country": null,
|
|
275
|
+
"id_company": 254,
|
|
276
|
+
"id_cognito": "23a3f496-4e38-4e12-9bf5-7f90b77a2f35",
|
|
277
|
+
"birth_Date": null,
|
|
278
|
+
"about_me": null,
|
|
279
|
+
"zip_code": null,
|
|
280
|
+
"address": null,
|
|
281
|
+
"job": null,
|
|
282
|
+
"id_stripe": null,
|
|
283
|
+
"id_role": 6,
|
|
284
|
+
"active": 1,
|
|
285
|
+
"is_retailer": 0,
|
|
286
|
+
"email_notify": null,
|
|
287
|
+
"is_user_tech": null,
|
|
288
|
+
"is_onboarding": 0,
|
|
289
|
+
"membership": {
|
|
290
|
+
"id": 750,
|
|
291
|
+
"start_date": "2022-01-07T21:32:54.000Z",
|
|
292
|
+
"end_date": "2023-01-07T21:32:54.000Z",
|
|
293
|
+
"planID": 6,
|
|
294
|
+
"plan": "prod_KvGd6YSTJyR3AP",
|
|
295
|
+
"name": "Plan Small",
|
|
296
|
+
"user_limit": "10",
|
|
297
|
+
"products_limit": "1000",
|
|
298
|
+
"type": "Enterprise"
|
|
299
|
+
},
|
|
300
|
+
"src": "https://content-management-profile-prod.s3.amazonaws.com/id-425/425.png?1778260157973"
|
|
301
|
+
}
|
|
238
302
|
|
|
239
303
|
};
|
|
@@ -898,21 +898,24 @@ const RetailerProductEditionView = ({
|
|
|
898
898
|
dispatch({ type: "SET_SAVING", payload: true });
|
|
899
899
|
try {
|
|
900
900
|
const evaluationArray = [];
|
|
901
|
+
|
|
901
902
|
const conceptArray = getConceptsByRole(user.id_role);
|
|
902
903
|
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
904
|
+
state.services_data?.forEach((ret, idx) => {
|
|
905
|
+
const { service: retailer_service, id_retailer, status: status_retailer_service } = ret;
|
|
906
|
+
|
|
907
|
+
const lastStatusLevel = status_retailer_service.replace(/.*\//, "");
|
|
908
|
+
|
|
909
|
+
if (conceptArray.includes(retailer_service) && statusArray?.includes(lastStatusLevel)) {
|
|
910
|
+
const data = {
|
|
909
911
|
articleId: state.product.id_article,
|
|
910
912
|
orderId: state.product.id_order,
|
|
911
|
-
concept:
|
|
913
|
+
concept: retailer_service,
|
|
912
914
|
result,
|
|
913
|
-
evalStatus:
|
|
915
|
+
evalStatus: status_retailer_service,
|
|
914
916
|
retailerId: id_retailer,
|
|
915
917
|
};
|
|
918
|
+
|
|
916
919
|
evaluationArray.push(
|
|
917
920
|
axios.put(`${process.env.REACT_APP_EVALUATION_ENDPOINT}`, data, {
|
|
918
921
|
headers: {
|
|
@@ -922,6 +925,7 @@ const RetailerProductEditionView = ({
|
|
|
922
925
|
);
|
|
923
926
|
}
|
|
924
927
|
});
|
|
928
|
+
|
|
925
929
|
await Promise.all(evaluationArray);
|
|
926
930
|
|
|
927
931
|
const status = `${result}A`;
|
|
@@ -936,6 +940,7 @@ const RetailerProductEditionView = ({
|
|
|
936
940
|
const updatedProduct = {
|
|
937
941
|
...state.product,
|
|
938
942
|
article_status: status,
|
|
943
|
+
status: status,
|
|
939
944
|
datasheet_status:
|
|
940
945
|
state.product.datasheet_status === "NA" ? "NA" : status,
|
|
941
946
|
description_status:
|
|
@@ -949,30 +954,25 @@ const RetailerProductEditionView = ({
|
|
|
949
954
|
payload: updatedProduct,
|
|
950
955
|
});
|
|
951
956
|
|
|
952
|
-
const
|
|
953
|
-
sessionStorage.getItem("productSelected"),
|
|
954
|
-
);
|
|
957
|
+
const updatedServicesData = state.services_data.map(service => conceptArray.includes(service.service) ? { ...service, status: status } : service);
|
|
955
958
|
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
product: updatedProduct,
|
|
974
|
-
}),
|
|
975
|
-
);
|
|
959
|
+
dispatch({
|
|
960
|
+
type: "SET_SERVICES_DATA",
|
|
961
|
+
payload: updatedServicesData,
|
|
962
|
+
});
|
|
963
|
+
|
|
964
|
+
// sessionStorage.setItem(
|
|
965
|
+
// "productSelected",
|
|
966
|
+
// JSON.stringify(updatedProduct),
|
|
967
|
+
// );
|
|
968
|
+
// sessionStorage.setItem(
|
|
969
|
+
// "productEdit",
|
|
970
|
+
// JSON.stringify({
|
|
971
|
+
// ArticleId: updatedProduct.id_article,
|
|
972
|
+
// idCategory: updatedProduct.id_category,
|
|
973
|
+
// product: updatedProduct,
|
|
974
|
+
// }),
|
|
975
|
+
// );
|
|
976
976
|
|
|
977
977
|
// Mostrar modal de éxito
|
|
978
978
|
dispatch({
|
|
@@ -1572,6 +1572,7 @@ const RetailerProductEditionView = ({
|
|
|
1572
1572
|
? "image-services"
|
|
1573
1573
|
: "")
|
|
1574
1574
|
}
|
|
1575
|
+
id="services-information-container"
|
|
1575
1576
|
>
|
|
1576
1577
|
{state.saving ? (
|
|
1577
1578
|
<Loading />
|