contentoh-components-library 21.5.95 → 21.5.96
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 +6 -2
- package/dist/components/molecules/TabsMenu/index.js +11 -0
- package/dist/components/molecules/TagAndInput/index.js +3 -0
- package/dist/components/pages/ProviderProductEdition/index.js +44 -27
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +31 -100
- package/dist/components/pages/RetailerProductEdition/index.js +52 -32
- package/dist/contexts/AiProductEdition.js +23 -11
- package/package.json +1 -1
- package/src/components/atoms/GeneralInput/index.js +6 -2
- package/src/components/molecules/TabsMenu/index.js +11 -0
- package/src/components/molecules/TagAndInput/index.js +8 -0
- package/src/components/pages/ProviderProductEdition/index.js +102 -63
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +32 -116
- package/src/components/pages/RetailerProductEdition/index.js +22 -3
- package/src/contexts/AiProductEdition.jsx +11 -3
|
@@ -28,7 +28,7 @@ exports.AiProductEdition = AiProductEdition;
|
|
|
28
28
|
|
|
29
29
|
var useAiProductEdition = function useAiProductEdition() {
|
|
30
30
|
var context = (0, _react.useContext)(AiProductEdition);
|
|
31
|
-
if (!context)
|
|
31
|
+
if (!context) return {};
|
|
32
32
|
return context;
|
|
33
33
|
};
|
|
34
34
|
|
|
@@ -219,7 +219,7 @@ var AiProductEditionProvider = function AiProductEditionProvider(_ref) {
|
|
|
219
219
|
|
|
220
220
|
function _generateProductSuggestions() {
|
|
221
221
|
_generateProductSuggestions = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref4) {
|
|
222
|
-
var _ref4$inputName, inputName, _ref4$currentValue, currentValue, _ref4$description, description, _ref4$maxChar, maxChar, _ref4$type, type, articleId, versionId, descriptionId, attributeId, _state$product, _JSON$parse$
|
|
222
|
+
var _ref4$inputName, inputName, _ref4$currentValue, currentValue, _ref4$description, description, _ref4$maxChar, maxChar, _ref4$type, type, articleId, versionId, descriptionId, attributeId, _state$product, _JSON$parse, _JSON$parse2, _JSON$parse2$error, _JSON$parse$data, _JSON$parse3, rateLimitStatus, upc, productName, retailer, category, version, payload, _yield$axios$post, data, errorsRaw, errorMessage, results, _error$message;
|
|
223
223
|
|
|
224
224
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
225
225
|
while (1) {
|
|
@@ -311,32 +311,43 @@ var AiProductEditionProvider = function AiProductEditionProvider(_ref) {
|
|
|
311
311
|
case 20:
|
|
312
312
|
_yield$axios$post = _context2.sent;
|
|
313
313
|
data = _yield$axios$post.data;
|
|
314
|
-
|
|
314
|
+
errorsRaw = (_JSON$parse = JSON.parse(data === null || data === void 0 ? void 0 : data.body)) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse.error;
|
|
315
|
+
errorMessage = errorsRaw ? (_JSON$parse2 = JSON.parse(errorsRaw)) === null || _JSON$parse2 === void 0 ? void 0 : (_JSON$parse2$error = _JSON$parse2.error) === null || _JSON$parse2$error === void 0 ? void 0 : _JSON$parse2$error.message : null;
|
|
316
|
+
|
|
317
|
+
if (!errorMessage) {
|
|
318
|
+
_context2.next = 26;
|
|
319
|
+
break;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
throw new Error(errorMessage !== null && errorMessage !== void 0 ? errorMessage : 'Error desconocido');
|
|
323
|
+
|
|
324
|
+
case 26:
|
|
325
|
+
results = (_JSON$parse$data = (_JSON$parse3 = JSON.parse(data === null || data === void 0 ? void 0 : data.body)) === null || _JSON$parse3 === void 0 ? void 0 : _JSON$parse3.data) !== null && _JSON$parse$data !== void 0 ? _JSON$parse$data : [];
|
|
315
326
|
|
|
316
327
|
if (results) {
|
|
317
|
-
_context2.next =
|
|
328
|
+
_context2.next = 29;
|
|
318
329
|
break;
|
|
319
330
|
}
|
|
320
331
|
|
|
321
332
|
throw new Error("No se encontraron resultados");
|
|
322
333
|
|
|
323
|
-
case
|
|
334
|
+
case 29:
|
|
324
335
|
return _context2.abrupt("return", results);
|
|
325
336
|
|
|
326
|
-
case
|
|
327
|
-
_context2.prev =
|
|
337
|
+
case 32:
|
|
338
|
+
_context2.prev = 32;
|
|
328
339
|
_context2.t0 = _context2["catch"](1);
|
|
329
340
|
console.log("Error generating AI suggestions:", _context2.t0);
|
|
330
341
|
return _context2.abrupt("return", {
|
|
331
342
|
error: (_error$message = _context2.t0 === null || _context2.t0 === void 0 ? void 0 : _context2.t0.message) !== null && _error$message !== void 0 ? _error$message : "Error generating AI suggestions"
|
|
332
343
|
});
|
|
333
344
|
|
|
334
|
-
case
|
|
345
|
+
case 36:
|
|
335
346
|
case "end":
|
|
336
347
|
return _context2.stop();
|
|
337
348
|
}
|
|
338
349
|
}
|
|
339
|
-
}, _callee2, null, [[1,
|
|
350
|
+
}, _callee2, null, [[1, 32]]);
|
|
340
351
|
}));
|
|
341
352
|
return _generateProductSuggestions.apply(this, arguments);
|
|
342
353
|
}
|
|
@@ -344,7 +355,7 @@ var AiProductEditionProvider = function AiProductEditionProvider(_ref) {
|
|
|
344
355
|
(0, _react.useEffect)(function () {
|
|
345
356
|
var _productSelected$perc;
|
|
346
357
|
|
|
347
|
-
if (!productSelected) return;
|
|
358
|
+
if (!productSelected || !isCreators) return;
|
|
348
359
|
var productName = productSelected.name,
|
|
349
360
|
upc = productSelected.upc,
|
|
350
361
|
categoryRetailer = productSelected.categoryRetailer;
|
|
@@ -380,7 +391,7 @@ var AiProductEditionProvider = function AiProductEditionProvider(_ref) {
|
|
|
380
391
|
}, [productSelected]); // Inicializamos la ficha técnica con el objetivo de posteriormente pasarlo a la generación con IA
|
|
381
392
|
|
|
382
393
|
(0, _react.useEffect)(function () {
|
|
383
|
-
if (!datasheetInputs) return;
|
|
394
|
+
if (!datasheetInputs || !isCreators) return;
|
|
384
395
|
var datasheetToArray = Object.values(datasheetInputs);
|
|
385
396
|
var normalizedDatasheet = datasheetToArray.map(function (attribute) {
|
|
386
397
|
return {
|
|
@@ -396,6 +407,7 @@ var AiProductEditionProvider = function AiProductEditionProvider(_ref) {
|
|
|
396
407
|
(0, _react.useEffect)(function () {
|
|
397
408
|
var _imagesData$inputsByR, _imagesData$inputsByR2;
|
|
398
409
|
|
|
410
|
+
if (!isCreators) return;
|
|
399
411
|
var currentRetailerImageInputs = imagesData === null || imagesData === void 0 ? void 0 : (_imagesData$inputsByR = imagesData.inputsByRetailer) === null || _imagesData$inputsByR === void 0 ? void 0 : (_imagesData$inputsByR2 = _imagesData$inputsByR[0]) === null || _imagesData$inputsByR2 === void 0 ? void 0 : _imagesData$inputsByR2.filter(function (input) {
|
|
400
412
|
return (input === null || input === void 0 ? void 0 : input.id_retailer) === (activeRetailer === null || activeRetailer === void 0 ? void 0 : activeRetailer.id_retailer);
|
|
401
413
|
});
|
package/package.json
CHANGED
|
@@ -55,6 +55,7 @@ export const GeneralInput = ({
|
|
|
55
55
|
}) => {
|
|
56
56
|
|
|
57
57
|
const {
|
|
58
|
+
isCreators,
|
|
58
59
|
suggestions,
|
|
59
60
|
currentSuggestion,
|
|
60
61
|
setCurrentSuggestionValue
|
|
@@ -140,6 +141,8 @@ export const GeneralInput = ({
|
|
|
140
141
|
|
|
141
142
|
useEffect(() => {
|
|
142
143
|
|
|
144
|
+
if(!isCreators) return;
|
|
145
|
+
|
|
143
146
|
if(Object.keys(suggestions).length === 0) return;
|
|
144
147
|
|
|
145
148
|
if(currentSuggestion?.[inputId]) return
|
|
@@ -158,11 +161,12 @@ export const GeneralInput = ({
|
|
|
158
161
|
}, [suggestions]);
|
|
159
162
|
|
|
160
163
|
useEffect(() => {
|
|
161
|
-
if(!isAiActive) return;
|
|
164
|
+
if(!isAiActive || !isCreators) return;
|
|
162
165
|
setAiSuggestionAccepted(false);
|
|
163
166
|
}, [isAiActive]);
|
|
164
167
|
|
|
165
168
|
useEffect(() => {
|
|
169
|
+
if(!isCreators) return;
|
|
166
170
|
if(!isAiActive && !aiSuggestionAccepted) {
|
|
167
171
|
setTextValue({ value: valueAccepted });
|
|
168
172
|
}
|
|
@@ -187,7 +191,7 @@ export const GeneralInput = ({
|
|
|
187
191
|
//AI Generation
|
|
188
192
|
|
|
189
193
|
const handleAcceptSuggestion = (suggestionValue) => {
|
|
190
|
-
if(!suggestionValue) return;
|
|
194
|
+
if(!suggestionValue || !isCreators) return;
|
|
191
195
|
|
|
192
196
|
setValueAccepted(suggestionValue);
|
|
193
197
|
setAiSuggestionAccepted(true);
|
|
@@ -20,6 +20,17 @@ export const TabsMenu = ({
|
|
|
20
20
|
}) => {
|
|
21
21
|
const [sections, setSections] = useState(tabsSections);
|
|
22
22
|
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
if (!activeTab) return;
|
|
25
|
+
setSections((prev) => {
|
|
26
|
+
const updated = {};
|
|
27
|
+
Object.keys(prev).forEach((key) => {
|
|
28
|
+
updated[key] = key === activeTab;
|
|
29
|
+
});
|
|
30
|
+
return updated;
|
|
31
|
+
});
|
|
32
|
+
}, [activeTab]);
|
|
33
|
+
|
|
23
34
|
const [modal, setModal] = useState(false);
|
|
24
35
|
const [cancelAccept, setCancelAccept] = useState("");
|
|
25
36
|
const [llave, setLlave] = useState("");
|
|
@@ -257,6 +257,9 @@ export const TagAndInput = ({
|
|
|
257
257
|
}, [boxOnboardingList]);
|
|
258
258
|
|
|
259
259
|
useEffect(() => {
|
|
260
|
+
|
|
261
|
+
if(!isCreators) return;
|
|
262
|
+
|
|
260
263
|
const currentDescriptionUpdate = Array.isArray(updatedDescriptions)
|
|
261
264
|
? updatedDescriptions.find(desc => desc?.attributeId === inputId)
|
|
262
265
|
: null;
|
|
@@ -287,11 +290,16 @@ export const TagAndInput = ({
|
|
|
287
290
|
}, [updatedDescriptions, updatedDatasheets, aiGenerated, inputId]);
|
|
288
291
|
|
|
289
292
|
useEffect(() => {
|
|
293
|
+
|
|
294
|
+
if(!isCreators) return;
|
|
295
|
+
|
|
290
296
|
setIsAiGenerated(!!inputsGeneratedWithAi[`${inputId}-${inputType}-${version}`]?.isAiGenerated);
|
|
291
297
|
}, [inputsGeneratedWithAi]);
|
|
292
298
|
|
|
293
299
|
useEffect(() => {
|
|
294
300
|
|
|
301
|
+
if(!isCreators) return;
|
|
302
|
+
|
|
295
303
|
setInputsUsingAi(prev => ({
|
|
296
304
|
...prev,
|
|
297
305
|
[`${inputId}-${inputType}-${version}`]: {
|
|
@@ -143,8 +143,9 @@ const ProviderProductEditionView = ({
|
|
|
143
143
|
useEffect(() => {
|
|
144
144
|
const setProductData = () => {
|
|
145
145
|
try {
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
const product = productSelected
|
|
147
|
+
? productSelected
|
|
148
|
+
: JSON.parse(sessionStorage.getItem("productSelected"));
|
|
148
149
|
|
|
149
150
|
const productNormalized = normalizeProduct(product);
|
|
150
151
|
|
|
@@ -156,6 +157,22 @@ const ProviderProductEditionView = ({
|
|
|
156
157
|
type: "SET_ACTIVE_RETAILER",
|
|
157
158
|
payload: productNormalized.categoryRetailer[0],
|
|
158
159
|
});
|
|
160
|
+
|
|
161
|
+
const firstRetailerStatus =
|
|
162
|
+
productNormalized.statusByRetailer[
|
|
163
|
+
productNormalized.categoryRetailerInOrder[0].id_retailer
|
|
164
|
+
];
|
|
165
|
+
const initialTab = firstRetailerStatus.description
|
|
166
|
+
? "Descripción"
|
|
167
|
+
: firstRetailerStatus.datasheet
|
|
168
|
+
? "Ficha técnica"
|
|
169
|
+
: firstRetailerStatus.images
|
|
170
|
+
? "Imágenes"
|
|
171
|
+
: "Imágenes";
|
|
172
|
+
dispatch({
|
|
173
|
+
type: "SET_ACTIVE_TAB",
|
|
174
|
+
payload: initialTab,
|
|
175
|
+
});
|
|
159
176
|
} catch (error) {
|
|
160
177
|
console.log("Error setting product data: ", error);
|
|
161
178
|
}
|
|
@@ -229,22 +246,26 @@ const ProviderProductEditionView = ({
|
|
|
229
246
|
|
|
230
247
|
//Cuando carguemos la información de los servicios, las actualizamos en el estado del producto
|
|
231
248
|
|
|
232
|
-
const updatedStatusByRetailer = servicesDataRes.reduce(
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
if(!acc[id_retailer]) acc[id_retailer] = {};
|
|
249
|
+
const updatedStatusByRetailer = servicesDataRes.reduce(
|
|
250
|
+
(acc, current, idx) => {
|
|
251
|
+
const { id_retailer, service, status } = current;
|
|
237
252
|
|
|
238
|
-
|
|
253
|
+
if (!acc[id_retailer]) acc[id_retailer] = {};
|
|
239
254
|
|
|
240
|
-
|
|
255
|
+
acc[id_retailer][service] = status;
|
|
241
256
|
|
|
242
|
-
|
|
257
|
+
return acc;
|
|
258
|
+
},
|
|
259
|
+
{},
|
|
260
|
+
);
|
|
243
261
|
|
|
244
|
-
dispatch({
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
262
|
+
dispatch({
|
|
263
|
+
type: "SET_PRODUCT",
|
|
264
|
+
payload: {
|
|
265
|
+
...state.product,
|
|
266
|
+
statusByRetailer: updatedStatusByRetailer,
|
|
267
|
+
},
|
|
268
|
+
});
|
|
248
269
|
|
|
249
270
|
dispatch({
|
|
250
271
|
type: "SET_SERVICES",
|
|
@@ -295,45 +316,49 @@ const ProviderProductEditionView = ({
|
|
|
295
316
|
const updateInputsActiveRetailer = () => {
|
|
296
317
|
if (!state.services) return;
|
|
297
318
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
319
|
+
if (state.services.datasheets) {
|
|
320
|
+
const retailerDatasheets =
|
|
321
|
+
state.services.datasheets[state.active_retailer.id_retailer];
|
|
322
|
+
const datasheetsActiveRetailer = {
|
|
323
|
+
...retailerDatasheets,
|
|
324
|
+
data: Object.values(retailerDatasheets.data),
|
|
325
|
+
};
|
|
326
|
+
dispatch({
|
|
327
|
+
type: "SET_DATASHEETS_INPUTS",
|
|
328
|
+
payload: [datasheetsActiveRetailer, state.services.datasheets.inputs],
|
|
329
|
+
});
|
|
330
|
+
}
|
|
309
331
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
(input) =>
|
|
314
|
-
input.id_retailer === state.active_retailer.id_retailer &&
|
|
315
|
-
input.id_image === value.image_id
|
|
316
|
-
)
|
|
332
|
+
if (state.services.descriptions) {
|
|
333
|
+
const descriptionsActiveRetailer = state.services.descriptions.filter(
|
|
334
|
+
(item) => item.id === state.active_retailer.id_retailer,
|
|
317
335
|
);
|
|
318
|
-
});
|
|
319
336
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
337
|
+
dispatch({
|
|
338
|
+
type: "SET_DESCRIPTIONS_INPUTS",
|
|
339
|
+
payload: descriptionsActiveRetailer,
|
|
340
|
+
});
|
|
341
|
+
}
|
|
324
342
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
343
|
+
if (state.services.images) {
|
|
344
|
+
const filteredValues = state.services.images.values.filter((value) => {
|
|
345
|
+
return state.services.images.inputsByRetailer.some((retailerInput) =>
|
|
346
|
+
retailerInput.some(
|
|
347
|
+
(input) =>
|
|
348
|
+
input.id_retailer === state.active_retailer.id_retailer &&
|
|
349
|
+
input.id_image === value.image_id,
|
|
350
|
+
),
|
|
351
|
+
);
|
|
352
|
+
});
|
|
329
353
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
354
|
+
dispatch({
|
|
355
|
+
type: "SET_IMAGES_VALUES",
|
|
356
|
+
payload: {
|
|
357
|
+
...state.services.images,
|
|
358
|
+
values: filteredValues,
|
|
359
|
+
},
|
|
360
|
+
});
|
|
361
|
+
}
|
|
337
362
|
};
|
|
338
363
|
|
|
339
364
|
updateInputsActiveRetailer();
|
|
@@ -348,9 +373,11 @@ const ProviderProductEditionView = ({
|
|
|
348
373
|
const currentRetailer = state.active_retailer.id_retailer;
|
|
349
374
|
|
|
350
375
|
//Información del servicio de la cadena seleccionada
|
|
351
|
-
const {
|
|
352
|
-
|
|
353
|
-
|
|
376
|
+
const { status: currentStatus } = state.services_data.find(
|
|
377
|
+
(service) =>
|
|
378
|
+
service.service === currentService &&
|
|
379
|
+
service.id_retailer === currentRetailer,
|
|
380
|
+
);
|
|
354
381
|
|
|
355
382
|
const originTab = origin[state.active_tab];
|
|
356
383
|
const isRetailerUser = user?.is_retailer === 1;
|
|
@@ -1152,7 +1179,7 @@ const ProviderProductEditionView = ({
|
|
|
1152
1179
|
size={12}
|
|
1153
1180
|
onClick={async () => {
|
|
1154
1181
|
const elements = document.querySelectorAll(
|
|
1155
|
-
"#modal-message-box .ql-container .ql-editor > p"
|
|
1182
|
+
"#modal-message-box .ql-container .ql-editor > p",
|
|
1156
1183
|
);
|
|
1157
1184
|
|
|
1158
1185
|
if (!elements || elements.length === 0) {
|
|
@@ -1162,14 +1189,17 @@ const ProviderProductEditionView = ({
|
|
|
1162
1189
|
|
|
1163
1190
|
const isMessageEmpty = Array.from(elements).every((el) => {
|
|
1164
1191
|
const body = el.innerHTML;
|
|
1165
|
-
return
|
|
1192
|
+
return (
|
|
1193
|
+
!body || body.replace(/<.*?\/?>/gm, "").trim() === ""
|
|
1194
|
+
);
|
|
1166
1195
|
});
|
|
1167
1196
|
|
|
1168
1197
|
if (isMessageEmpty) {
|
|
1169
1198
|
const container = document.querySelector(
|
|
1170
|
-
".container-customComponent"
|
|
1199
|
+
".container-customComponent",
|
|
1171
1200
|
);
|
|
1172
|
-
const existingAlert =
|
|
1201
|
+
const existingAlert =
|
|
1202
|
+
container.querySelector(".alert-error");
|
|
1173
1203
|
|
|
1174
1204
|
if (!existingAlert) {
|
|
1175
1205
|
const alert = document.createElement("div");
|
|
@@ -1224,7 +1254,9 @@ const ProviderProductEditionView = ({
|
|
|
1224
1254
|
<div className="data-container">
|
|
1225
1255
|
<div className="image-data-panel">
|
|
1226
1256
|
<ImagePreviewer
|
|
1227
|
-
activeImage={
|
|
1257
|
+
activeImage={
|
|
1258
|
+
state.images_values.values[state.current_image] ?? {}
|
|
1259
|
+
}
|
|
1228
1260
|
imagesArray={state.images_values || []}
|
|
1229
1261
|
setActiveImage={handleOnChangeCurrentImage}
|
|
1230
1262
|
setShowModal={handleOnShowModalGalery}
|
|
@@ -1310,12 +1342,16 @@ const ProviderProductEditionView = ({
|
|
|
1310
1342
|
<InputGroup
|
|
1311
1343
|
activeSection={state.active_tab}
|
|
1312
1344
|
inputGroup={state.descriptions_inputs[0]}
|
|
1313
|
-
updatedDescriptions={
|
|
1345
|
+
updatedDescriptions={
|
|
1346
|
+
state.updated_descriptions_inputs
|
|
1347
|
+
}
|
|
1314
1348
|
articleId={state.product?.id_article}
|
|
1315
1349
|
version={state.product.version}
|
|
1316
1350
|
isShowbox={false}
|
|
1317
1351
|
dinamicHeight={true}
|
|
1318
|
-
setUpdatedDescriptions={
|
|
1352
|
+
setUpdatedDescriptions={
|
|
1353
|
+
handleOnSetUpdatedDescriptions
|
|
1354
|
+
}
|
|
1319
1355
|
updateApprovedInputs={handleOnUpdateApprovedInputs} // No se usa?
|
|
1320
1356
|
/>
|
|
1321
1357
|
) : (
|
|
@@ -1332,12 +1368,14 @@ const ProviderProductEditionView = ({
|
|
|
1332
1368
|
(dataGroup, index) => (
|
|
1333
1369
|
<InputGroup
|
|
1334
1370
|
index={index}
|
|
1335
|
-
key={
|
|
1371
|
+
key={
|
|
1372
|
+
index + "-" + state.active_retailer.retailer
|
|
1373
|
+
}
|
|
1336
1374
|
articleId={state.product.id_article}
|
|
1337
1375
|
version={state.version}
|
|
1338
1376
|
activeSection={state.active_tab}
|
|
1339
1377
|
inputGroup={dataGroup}
|
|
1340
|
-
dataInputs={state.datasheets_inputs[1]}
|
|
1378
|
+
dataInputs={state.datasheets_inputs[1] ?? []}
|
|
1341
1379
|
activeRetailer={
|
|
1342
1380
|
state.services.datasheets[
|
|
1343
1381
|
state.active_retailer.id_retailer
|
|
@@ -1362,7 +1400,7 @@ const ProviderProductEditionView = ({
|
|
|
1362
1400
|
handleOnUpdateApprovedInputs // No se usa?
|
|
1363
1401
|
}
|
|
1364
1402
|
/>
|
|
1365
|
-
)
|
|
1403
|
+
),
|
|
1366
1404
|
)}
|
|
1367
1405
|
</>
|
|
1368
1406
|
) : (
|
|
@@ -1440,7 +1478,8 @@ const ProviderProductEditionView = ({
|
|
|
1440
1478
|
textDecoration: "underline",
|
|
1441
1479
|
}}
|
|
1442
1480
|
>
|
|
1443
|
-
haz clic para abrir el explorador de
|
|
1481
|
+
haz clic para abrir el explorador de
|
|
1482
|
+
archivos
|
|
1444
1483
|
</span>
|
|
1445
1484
|
</p>
|
|
1446
1485
|
</div>
|
|
@@ -1467,7 +1506,7 @@ const ProviderProductEditionView = ({
|
|
|
1467
1506
|
export const ProviderProductEdition = (props) => {
|
|
1468
1507
|
return (
|
|
1469
1508
|
<ProviderProductEditionProvider>
|
|
1470
|
-
|
|
1509
|
+
<ProviderProductEditionView {...props} />
|
|
1471
1510
|
</ProviderProductEditionProvider>
|
|
1472
1511
|
);
|
|
1473
1512
|
};
|
|
@@ -18,107 +18,53 @@ 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
|
-
"articleId":
|
|
21
|
+
"articleId": 145188,
|
|
22
22
|
"services": {
|
|
23
23
|
"datasheets": 1,
|
|
24
24
|
"descriptions": 1,
|
|
25
25
|
"images": 1
|
|
26
26
|
},
|
|
27
|
-
"orderId":
|
|
27
|
+
"orderId": 10451,
|
|
28
28
|
"city": "CDMX, México",
|
|
29
|
-
"status": "
|
|
30
|
-
"datasheet_status": "
|
|
29
|
+
"status": "AS",
|
|
30
|
+
"datasheet_status": "AA",
|
|
31
31
|
"prio": "none",
|
|
32
32
|
"version": 3,
|
|
33
|
-
"description_status": "
|
|
34
|
-
"images_status": "
|
|
33
|
+
"description_status": "CA",
|
|
34
|
+
"images_status": "AA",
|
|
35
35
|
"statusByRetailer": [
|
|
36
36
|
{
|
|
37
|
-
"
|
|
37
|
+
"retailer_id": 2,
|
|
38
38
|
"service": "datasheet",
|
|
39
|
-
"
|
|
40
|
-
"task_user_group_id":
|
|
39
|
+
"status": "AA",
|
|
40
|
+
"task_user_group_id": 2
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
|
-
"
|
|
43
|
+
"retailer_id": 2,
|
|
44
44
|
"service": "description",
|
|
45
|
-
"
|
|
46
|
-
"task_user_group_id":
|
|
45
|
+
"status": "CA",
|
|
46
|
+
"task_user_group_id": 2
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
|
-
"
|
|
49
|
+
"retailer_id": 2,
|
|
50
50
|
"service": "images",
|
|
51
|
-
"
|
|
52
|
-
"task_user_group_id":
|
|
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
|
|
51
|
+
"status": "AA",
|
|
52
|
+
"task_user_group_id": 2
|
|
107
53
|
}
|
|
108
54
|
],
|
|
109
55
|
"article": {
|
|
110
|
-
"id_article":
|
|
111
|
-
"id_category": "
|
|
112
|
-
"brand":
|
|
113
|
-
"name": "
|
|
114
|
-
"upc": "
|
|
115
|
-
"sku": "
|
|
116
|
-
"timestamp": "2026-
|
|
56
|
+
"id_article": 145188,
|
|
57
|
+
"id_category": "5739",
|
|
58
|
+
"brand": null,
|
|
59
|
+
"name": "Pantalla",
|
|
60
|
+
"upc": "91449",
|
|
61
|
+
"sku": "144",
|
|
62
|
+
"timestamp": "2026-04-24T16:09:39.000Z",
|
|
117
63
|
"active": 1,
|
|
118
64
|
"company_id": 291,
|
|
119
65
|
"company_name": "LATAM LOGISTICS",
|
|
120
66
|
"country": "México",
|
|
121
|
-
"id_order":
|
|
67
|
+
"id_order": 10451,
|
|
122
68
|
"id_datasheet_especialist": 426,
|
|
123
69
|
"id_datasheet_facilitator": null,
|
|
124
70
|
"id_description_especialist": 426,
|
|
@@ -127,55 +73,25 @@ RetailerProductEditionDefault.args = {
|
|
|
127
73
|
"id_images_facilitator": null,
|
|
128
74
|
"id_auditor": 425,
|
|
129
75
|
"id_recepcionist": null,
|
|
130
|
-
"category": "
|
|
76
|
+
"category": "Tecnología y Electrónica|Televisores|Pantallas",
|
|
131
77
|
"categoryRetailer": [
|
|
132
78
|
{
|
|
133
|
-
"id_category":
|
|
134
|
-
"id_retailer":
|
|
135
|
-
"category_name": "
|
|
136
|
-
"retailer_name": "
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
"id_category": 4216,
|
|
140
|
-
"id_retailer": 70,
|
|
141
|
-
"category_name": "Limpieza|Cuarto de Lavado|Cuarto de Lavado",
|
|
142
|
-
"retailer_name": "Bodega Aurrera"
|
|
143
|
-
},
|
|
144
|
-
{
|
|
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"
|
|
79
|
+
"id_category": 5739,
|
|
80
|
+
"id_retailer": 2,
|
|
81
|
+
"category_name": "Tecnología y Electrónica|Televisores|Pantallas",
|
|
82
|
+
"retailer_name": "Walmart Mercancías Generales"
|
|
155
83
|
}
|
|
156
84
|
]
|
|
157
85
|
},
|
|
158
86
|
"retailers": [
|
|
159
87
|
{
|
|
160
|
-
"id":
|
|
161
|
-
"name": "
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
"id": 29,
|
|
165
|
-
"name": "Farmacias del Ahorro"
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
"id": 36,
|
|
169
|
-
"name": "Oxxo"
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
"id": 70,
|
|
173
|
-
"name": "Bodega Aurrera"
|
|
88
|
+
"id": 2,
|
|
89
|
+
"name": "Walmart Mercancías Generales"
|
|
174
90
|
}
|
|
175
91
|
],
|
|
176
92
|
"country": "México",
|
|
177
|
-
"upc": "
|
|
178
|
-
|
|
93
|
+
"upc": "91449"
|
|
94
|
+
},
|
|
179
95
|
|
|
180
96
|
|
|
181
97
|
// location: {
|