contentoh-components-library 21.5.95 → 21.5.97
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 +94 -70
- 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 +157 -103
- 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
|
@@ -87,6 +87,7 @@ var GeneralInput = function GeneralInput(_ref) {
|
|
|
87
87
|
handleChangeSuggestion = _ref$handleChangeSugg === void 0 ? function () {} : _ref$handleChangeSugg;
|
|
88
88
|
|
|
89
89
|
var _useAiProductEdition = (0, _AiProductEdition.useAiProductEdition)(),
|
|
90
|
+
isCreators = _useAiProductEdition.isCreators,
|
|
90
91
|
suggestions = _useAiProductEdition.suggestions,
|
|
91
92
|
currentSuggestion = _useAiProductEdition.currentSuggestion,
|
|
92
93
|
setCurrentSuggestionValue = _useAiProductEdition.setCurrentSuggestionValue;
|
|
@@ -188,6 +189,7 @@ var GeneralInput = function GeneralInput(_ref) {
|
|
|
188
189
|
(0, _react.useEffect)(function () {
|
|
189
190
|
var _suggestions$inputId;
|
|
190
191
|
|
|
192
|
+
if (!isCreators) return;
|
|
191
193
|
if (Object.keys(suggestions).length === 0) return;
|
|
192
194
|
if (currentSuggestion !== null && currentSuggestion !== void 0 && currentSuggestion[inputId]) return;
|
|
193
195
|
var firstSuggestion = suggestions === null || suggestions === void 0 ? void 0 : (_suggestions$inputId = suggestions[inputId]) === null || _suggestions$inputId === void 0 ? void 0 : _suggestions$inputId[0];
|
|
@@ -199,10 +201,12 @@ var GeneralInput = function GeneralInput(_ref) {
|
|
|
199
201
|
});
|
|
200
202
|
}, [suggestions]);
|
|
201
203
|
(0, _react.useEffect)(function () {
|
|
202
|
-
if (!isAiActive) return;
|
|
204
|
+
if (!isAiActive || !isCreators) return;
|
|
203
205
|
setAiSuggestionAccepted(false);
|
|
204
206
|
}, [isAiActive]);
|
|
205
207
|
(0, _react.useEffect)(function () {
|
|
208
|
+
if (!isCreators) return;
|
|
209
|
+
|
|
206
210
|
if (!isAiActive && !aiSuggestionAccepted) {
|
|
207
211
|
setTextValue({
|
|
208
212
|
value: valueAccepted
|
|
@@ -224,7 +228,7 @@ var GeneralInput = function GeneralInput(_ref) {
|
|
|
224
228
|
//AI Generation
|
|
225
229
|
|
|
226
230
|
var handleAcceptSuggestion = function handleAcceptSuggestion(suggestionValue) {
|
|
227
|
-
if (!suggestionValue) return;
|
|
231
|
+
if (!suggestionValue || !isCreators) return;
|
|
228
232
|
setValueAccepted(suggestionValue);
|
|
229
233
|
setAiSuggestionAccepted(true);
|
|
230
234
|
setIsAiActive(false);
|
|
@@ -40,6 +40,17 @@ var TabsMenu = function TabsMenu(_ref) {
|
|
|
40
40
|
sections = _useState2[0],
|
|
41
41
|
setSections = _useState2[1];
|
|
42
42
|
|
|
43
|
+
(0, _react.useEffect)(function () {
|
|
44
|
+
if (!activeTab) return;
|
|
45
|
+
setSections(function (prev) {
|
|
46
|
+
var updated = {};
|
|
47
|
+
Object.keys(prev).forEach(function (key) {
|
|
48
|
+
updated[key] = key === activeTab;
|
|
49
|
+
});
|
|
50
|
+
return updated;
|
|
51
|
+
});
|
|
52
|
+
}, [activeTab]);
|
|
53
|
+
|
|
43
54
|
var _useState3 = (0, _react.useState)(false),
|
|
44
55
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
45
56
|
modal = _useState4[0],
|
|
@@ -371,6 +371,7 @@ var TagAndInput = function TagAndInput(_ref) {
|
|
|
371
371
|
onChange && onChange(boxOnboardingList);
|
|
372
372
|
}, [boxOnboardingList]);
|
|
373
373
|
(0, _react.useEffect)(function () {
|
|
374
|
+
if (!isCreators) return;
|
|
374
375
|
var currentDescriptionUpdate = Array.isArray(updatedDescriptions) ? updatedDescriptions.find(function (desc) {
|
|
375
376
|
return (desc === null || desc === void 0 ? void 0 : desc.attributeId) === inputId;
|
|
376
377
|
}) : null;
|
|
@@ -398,9 +399,11 @@ var TagAndInput = function TagAndInput(_ref) {
|
|
|
398
399
|
(0, _react.useEffect)(function () {
|
|
399
400
|
var _inputsGeneratedWithA;
|
|
400
401
|
|
|
402
|
+
if (!isCreators) return;
|
|
401
403
|
setIsAiGenerated(!!((_inputsGeneratedWithA = inputsGeneratedWithAi["".concat(inputId, "-").concat(inputType, "-").concat(version)]) !== null && _inputsGeneratedWithA !== void 0 && _inputsGeneratedWithA.isAiGenerated));
|
|
402
404
|
}, [inputsGeneratedWithAi]);
|
|
403
405
|
(0, _react.useEffect)(function () {
|
|
406
|
+
if (!isCreators) return;
|
|
404
407
|
setInputsUsingAi(function (prev) {
|
|
405
408
|
return (0, _objectSpread6.default)((0, _objectSpread6.default)({}, prev), {}, (0, _defineProperty2.default)({}, "".concat(inputId, "-").concat(inputType, "-").concat(version), {
|
|
406
409
|
using: isAiActive
|
|
@@ -243,10 +243,24 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
243
243
|
type: "SET_PRODUCT",
|
|
244
244
|
payload: productNormalized
|
|
245
245
|
});
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
246
|
+
|
|
247
|
+
if (productNormalized.categoryRetailerInOrder.length > 0 && productNormalized.statusByRetailer) {
|
|
248
|
+
dispatch({
|
|
249
|
+
type: "SET_ACTIVE_RETAILER",
|
|
250
|
+
payload: productNormalized.categoryRetailerInOrder[0]
|
|
251
|
+
});
|
|
252
|
+
var firstRetailerStatus = productNormalized.statusByRetailer[productNormalized.categoryRetailerInOrder[0].id_retailer];
|
|
253
|
+
var initialTab = firstRetailerStatus.description ? "Descripción" : firstRetailerStatus.datasheet ? "Ficha técnica" : firstRetailerStatus.images ? "Imágenes" : "Imágenes";
|
|
254
|
+
dispatch({
|
|
255
|
+
type: "SET_ACTIVE_TAB",
|
|
256
|
+
payload: initialTab
|
|
257
|
+
});
|
|
258
|
+
} else {
|
|
259
|
+
dispatch({
|
|
260
|
+
type: "SET_ACTIVE_RETAILER",
|
|
261
|
+
payload: productNormalized.categoryRetailer[0]
|
|
262
|
+
});
|
|
263
|
+
}
|
|
250
264
|
} catch (error) {
|
|
251
265
|
console.log("Error setting product data: ", error);
|
|
252
266
|
}
|
|
@@ -269,7 +283,7 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
269
283
|
|
|
270
284
|
var fetchData = /*#__PURE__*/function () {
|
|
271
285
|
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
272
|
-
var _JSON$parse$0$relatio, _JSON$parse, _JSON$parse$, _percentageRes$, data, headers, _yield$Promise$all, _yield$Promise$all2, services, percentageRes, servicesDataRes, percentages, orderMap, orderedValues, updatedStatusByRetailer;
|
|
286
|
+
var _JSON$parse$0$relatio, _JSON$parse, _JSON$parse$, _percentageRes$, _services$2$inputsByR, _services$2$values, data, headers, _yield$Promise$all, _yield$Promise$all2, services, percentageRes, servicesDataRes, percentages, orderMap, orderedValues, updatedStatusByRetailer;
|
|
273
287
|
|
|
274
288
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
275
289
|
while (1) {
|
|
@@ -309,11 +323,11 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
309
323
|
percentageRes = _yield$Promise$all2[1];
|
|
310
324
|
servicesDataRes = _yield$Promise$all2[2];
|
|
311
325
|
percentages = (_JSON$parse$0$relatio = (_JSON$parse = JSON.parse(percentageRes === null || percentageRes === void 0 ? void 0 : (_percentageRes$ = percentageRes[0]) === null || _percentageRes$ === void 0 ? void 0 : _percentageRes$.body)) === null || _JSON$parse === void 0 ? void 0 : (_JSON$parse$ = _JSON$parse[0]) === null || _JSON$parse$ === void 0 ? void 0 : _JSON$parse$.relations) !== null && _JSON$parse$0$relatio !== void 0 ? _JSON$parse$0$relatio : [];
|
|
312
|
-
orderMap = services[2].inputsByRetailer.flat().reduce(function (acc, item) {
|
|
326
|
+
orderMap = (_services$2$inputsByR = services[2].inputsByRetailer) !== null && _services$2$inputsByR !== void 0 ? _services$2$inputsByR : [].flat().reduce(function (acc, item) {
|
|
313
327
|
acc[item.id_image] = item.order;
|
|
314
328
|
return acc;
|
|
315
329
|
}, {});
|
|
316
|
-
orderedValues = (0, _toConsumableArray2.default)(services[2].values).sort(function (a, b) {
|
|
330
|
+
orderedValues = (0, _toConsumableArray2.default)((_services$2$values = services[2].values) !== null && _services$2$values !== void 0 ? _services$2$values : []).sort(function (a, b) {
|
|
317
331
|
var _orderMap$a$image_id, _orderMap$b$image_id;
|
|
318
332
|
|
|
319
333
|
var orderA = (_orderMap$a$image_id = orderMap[a.image_id]) !== null && _orderMap$a$image_id !== void 0 ? _orderMap$a$image_id : Number.MAX_SAFE_INTEGER;
|
|
@@ -402,34 +416,43 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
402
416
|
|
|
403
417
|
var updateInputsActiveRetailer = function updateInputsActiveRetailer() {
|
|
404
418
|
if (!state.services) return;
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
419
|
+
|
|
420
|
+
if (state.services.datasheets) {
|
|
421
|
+
var retailerDatasheets = state.services.datasheets[state.active_retailer.id_retailer];
|
|
422
|
+
var datasheetsActiveRetailer = (0, _objectSpread4.default)((0, _objectSpread4.default)({}, retailerDatasheets), {}, {
|
|
423
|
+
data: Object.values(retailerDatasheets.data)
|
|
424
|
+
});
|
|
425
|
+
dispatch({
|
|
426
|
+
type: "SET_DATASHEETS_INPUTS",
|
|
427
|
+
payload: [datasheetsActiveRetailer, state.services.datasheets.inputs]
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
if (state.services.descriptions) {
|
|
432
|
+
var descriptionsActiveRetailer = state.services.descriptions.filter(function (item) {
|
|
433
|
+
return item.id === state.active_retailer.id_retailer;
|
|
434
|
+
});
|
|
435
|
+
dispatch({
|
|
436
|
+
type: "SET_DESCRIPTIONS_INPUTS",
|
|
437
|
+
payload: descriptionsActiveRetailer
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
if (state.services.images) {
|
|
442
|
+
var filteredValues = state.services.images.values.filter(function (value) {
|
|
443
|
+
return state.services.images.inputsByRetailer.some(function (retailerInput) {
|
|
444
|
+
return retailerInput.some(function (input) {
|
|
445
|
+
return input.id_retailer === state.active_retailer.id_retailer && input.id_image === value.image_id;
|
|
446
|
+
});
|
|
416
447
|
});
|
|
417
448
|
});
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
payload: descriptionsActiveRetailer
|
|
426
|
-
});
|
|
427
|
-
dispatch({
|
|
428
|
-
type: "SET_IMAGES_VALUES",
|
|
429
|
-
payload: (0, _objectSpread4.default)((0, _objectSpread4.default)({}, state.services.images), {}, {
|
|
430
|
-
values: filteredValues
|
|
431
|
-
})
|
|
432
|
-
});
|
|
449
|
+
dispatch({
|
|
450
|
+
type: "SET_IMAGES_VALUES",
|
|
451
|
+
payload: (0, _objectSpread4.default)((0, _objectSpread4.default)({}, state.services.images), {}, {
|
|
452
|
+
values: filteredValues
|
|
453
|
+
})
|
|
454
|
+
});
|
|
455
|
+
}
|
|
433
456
|
};
|
|
434
457
|
|
|
435
458
|
updateInputsActiveRetailer();
|
|
@@ -439,30 +462,35 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
439
462
|
var _state$product8;
|
|
440
463
|
|
|
441
464
|
if (!((_state$product8 = state.product) !== null && _state$product8 !== void 0 && _state$product8.statusByRetailer)) return false;
|
|
442
|
-
var currentService = (0, _utils.getConceptByTab)(state.active_tab); // const currentStatus = state.product[`${currentService}_status`];
|
|
443
465
|
|
|
444
|
-
|
|
466
|
+
try {
|
|
467
|
+
var currentService = (0, _utils.getConceptByTab)(state.active_tab); // const currentStatus = state.product[`${currentService}_status`];
|
|
468
|
+
|
|
469
|
+
var currentRetailer = state.active_retailer.id_retailer; //Información del servicio de la cadena seleccionada
|
|
445
470
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
471
|
+
var _state$services_data$ = state.services_data.find(function (service) {
|
|
472
|
+
return service.service === currentService && service.id_retailer === currentRetailer;
|
|
473
|
+
}),
|
|
474
|
+
currentStatus = _state$services_data$.status;
|
|
450
475
|
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
476
|
+
var originTab = origin[state.active_tab];
|
|
477
|
+
var isRetailerUser = (user === null || user === void 0 ? void 0 : user.is_retailer) === 1;
|
|
478
|
+
var validStatuses = ["AA", "AP", "R", "CA", "RCA"];
|
|
479
|
+
if (!validStatuses.includes(currentStatus)) return false;
|
|
480
|
+
var validOrigins = ["RequestWithContentoh", "RequestWithoutContentoh", "Contentoh"];
|
|
481
|
+
if (!validOrigins.includes(originTab)) return false; // Retailer: solo AP
|
|
457
482
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
483
|
+
if (isRetailerUser) {
|
|
484
|
+
return currentStatus === "AP";
|
|
485
|
+
} // No retailer
|
|
461
486
|
|
|
462
487
|
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
488
|
+
var hasNoOrder = !state.product.id_order && !state.product.orderId;
|
|
489
|
+
var condition = originTab === "RequestWithoutContentoh" && (["R", "CA"].includes(currentStatus) || currentStatus === "RCA" && hasNoOrder) || ["RequestWithContentoh", "Contentoh"].includes(originTab) && currentStatus === "AA";
|
|
490
|
+
return condition;
|
|
491
|
+
} catch (error) {
|
|
492
|
+
return false;
|
|
493
|
+
}
|
|
466
494
|
};
|
|
467
495
|
|
|
468
496
|
var canShowSaveButton = function canShowSaveButton(version_status) {
|
|
@@ -483,7 +511,7 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
483
511
|
if (!statusByRetailer) return "-";
|
|
484
512
|
var currentService = (0, _utils.getConceptByTab)(state.active_tab);
|
|
485
513
|
var currentRetailer = state.active_retailer.id_retailer;
|
|
486
|
-
var currentStatus = statusByRetailer[currentRetailer][currentService] || "
|
|
514
|
+
var currentStatus = statusByRetailer[currentRetailer][currentService] || "N/S";
|
|
487
515
|
return currentStatus;
|
|
488
516
|
};
|
|
489
517
|
|
|
@@ -804,7 +832,7 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
804
832
|
_context3.prev = 8;
|
|
805
833
|
|
|
806
834
|
if (!result) {
|
|
807
|
-
_context3.next =
|
|
835
|
+
_context3.next = 22;
|
|
808
836
|
break;
|
|
809
837
|
}
|
|
810
838
|
|
|
@@ -820,13 +848,7 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
820
848
|
case 14:
|
|
821
849
|
res = _context3.sent;
|
|
822
850
|
newStatuses = JSON.parse(res.data.body);
|
|
823
|
-
serviceStatus = newStatuses.newServiceStatus[articleId]["".concat(concept, "Status")];
|
|
824
|
-
console.log({
|
|
825
|
-
product: state.product,
|
|
826
|
-
newStatuses: newStatuses,
|
|
827
|
-
serviceStatus: serviceStatus,
|
|
828
|
-
servicesData: state.services_data
|
|
829
|
-
}); // Actualizar el producto con los nuevos estados
|
|
851
|
+
serviceStatus = newStatuses.newServiceStatus[articleId]["".concat(concept, "Status")]; // Actualizar el producto con los nuevos estados
|
|
830
852
|
|
|
831
853
|
updatedProduct = (0, _objectSpread4.default)((0, _objectSpread4.default)({}, state.product), {}, {
|
|
832
854
|
statusByRetailer: (0, _objectSpread4.default)((0, _objectSpread4.default)({}, state.product.statusByRetailer), {}, (0, _defineProperty2.default)({}, retailerId, (0, _objectSpread4.default)((0, _objectSpread4.default)({}, state.product.statusByRetailer[retailerId]), {}, (0, _defineProperty2.default)({}, concept, (_newStatuses$newStatu = newStatuses === null || newStatuses === void 0 ? void 0 : newStatuses.newStatus) !== null && _newStatuses$newStatu !== void 0 ? _newStatuses$newStatu : serviceStatus))))
|
|
@@ -858,12 +880,12 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
858
880
|
}
|
|
859
881
|
});
|
|
860
882
|
|
|
861
|
-
case
|
|
862
|
-
_context3.next =
|
|
883
|
+
case 22:
|
|
884
|
+
_context3.next = 28;
|
|
863
885
|
break;
|
|
864
886
|
|
|
865
|
-
case
|
|
866
|
-
_context3.prev =
|
|
887
|
+
case 24:
|
|
888
|
+
_context3.prev = 24;
|
|
867
889
|
_context3.t0 = _context3["catch"](8);
|
|
868
890
|
console.error("Error sending evaluation:", _context3.t0);
|
|
869
891
|
dispatch({
|
|
@@ -876,20 +898,20 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
876
898
|
}
|
|
877
899
|
});
|
|
878
900
|
|
|
879
|
-
case
|
|
880
|
-
_context3.prev =
|
|
901
|
+
case 28:
|
|
902
|
+
_context3.prev = 28;
|
|
881
903
|
dispatch({
|
|
882
904
|
type: "SET_SAVING",
|
|
883
905
|
payload: false
|
|
884
906
|
});
|
|
885
|
-
return _context3.finish(
|
|
907
|
+
return _context3.finish(28);
|
|
886
908
|
|
|
887
|
-
case
|
|
909
|
+
case 31:
|
|
888
910
|
case "end":
|
|
889
911
|
return _context3.stop();
|
|
890
912
|
}
|
|
891
913
|
}
|
|
892
|
-
}, _callee3, null, [[8,
|
|
914
|
+
}, _callee3, null, [[8, 24, 28, 31]]);
|
|
893
915
|
}));
|
|
894
916
|
|
|
895
917
|
return function sendEvaluation(_x2) {
|
|
@@ -1495,13 +1517,15 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
1495
1517
|
headerType: "input-name-header"
|
|
1496
1518
|
})), state.active_tab === "Ficha técnica" && (((_state$product14 = state.product) === null || _state$product14 === void 0 ? void 0 : _state$product14.datasheet_status) !== "NS" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
1497
1519
|
children: (_state$datasheets_inp = state.datasheets_inputs[0]) === null || _state$datasheets_inp === void 0 ? void 0 : (_state$datasheets_inp2 = _state$datasheets_inp.data) === null || _state$datasheets_inp2 === void 0 ? void 0 : _state$datasheets_inp2.map(function (dataGroup, index) {
|
|
1520
|
+
var _state$datasheets_inp3;
|
|
1521
|
+
|
|
1498
1522
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputGroup.InputGroup, {
|
|
1499
1523
|
index: index,
|
|
1500
1524
|
articleId: state.product.id_article,
|
|
1501
1525
|
version: state.version,
|
|
1502
1526
|
activeSection: state.active_tab,
|
|
1503
1527
|
inputGroup: dataGroup,
|
|
1504
|
-
dataInputs: state.datasheets_inputs[1],
|
|
1528
|
+
dataInputs: (_state$datasheets_inp3 = state.datasheets_inputs[1]) !== null && _state$datasheets_inp3 !== void 0 ? _state$datasheets_inp3 : [],
|
|
1505
1529
|
activeRetailer: state.services.datasheets[state.active_retailer.id_retailer],
|
|
1506
1530
|
groupData: state.services.datasheets[state.active_retailer.id_retailer].data,
|
|
1507
1531
|
updatedDatasheets: state.updated_datasheets_inputs,
|
|
@@ -33,94 +33,49 @@ 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
|
-
"articleId":
|
|
36
|
+
"articleId": 145188,
|
|
37
37
|
"services": {
|
|
38
38
|
"datasheets": 1,
|
|
39
39
|
"descriptions": 1,
|
|
40
40
|
"images": 1
|
|
41
41
|
},
|
|
42
|
-
"orderId":
|
|
42
|
+
"orderId": 10451,
|
|
43
43
|
"city": "CDMX, México",
|
|
44
|
-
"status": "
|
|
45
|
-
"datasheet_status": "
|
|
44
|
+
"status": "AS",
|
|
45
|
+
"datasheet_status": "AA",
|
|
46
46
|
"prio": "none",
|
|
47
47
|
"version": 3,
|
|
48
|
-
"description_status": "
|
|
49
|
-
"images_status": "
|
|
48
|
+
"description_status": "CA",
|
|
49
|
+
"images_status": "AA",
|
|
50
50
|
"statusByRetailer": [{
|
|
51
|
-
"
|
|
51
|
+
"retailer_id": 2,
|
|
52
52
|
"service": "datasheet",
|
|
53
|
-
"
|
|
54
|
-
"task_user_group_id":
|
|
53
|
+
"status": "AA",
|
|
54
|
+
"task_user_group_id": 2
|
|
55
55
|
}, {
|
|
56
|
-
"
|
|
56
|
+
"retailer_id": 2,
|
|
57
57
|
"service": "description",
|
|
58
|
-
"
|
|
59
|
-
"task_user_group_id":
|
|
58
|
+
"status": "CA",
|
|
59
|
+
"task_user_group_id": 2
|
|
60
60
|
}, {
|
|
61
|
-
"
|
|
61
|
+
"retailer_id": 2,
|
|
62
62
|
"service": "images",
|
|
63
|
-
"
|
|
64
|
-
"task_user_group_id":
|
|
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
|
|
63
|
+
"status": "AA",
|
|
64
|
+
"task_user_group_id": 2
|
|
110
65
|
}],
|
|
111
66
|
"article": {
|
|
112
|
-
"id_article":
|
|
113
|
-
"id_category": "
|
|
114
|
-
"brand":
|
|
115
|
-
"name": "
|
|
116
|
-
"upc": "
|
|
117
|
-
"sku": "
|
|
118
|
-
"timestamp": "2026-
|
|
67
|
+
"id_article": 145188,
|
|
68
|
+
"id_category": "5739",
|
|
69
|
+
"brand": null,
|
|
70
|
+
"name": "Pantalla",
|
|
71
|
+
"upc": "91449",
|
|
72
|
+
"sku": "144",
|
|
73
|
+
"timestamp": "2026-04-24T16:09:39.000Z",
|
|
119
74
|
"active": 1,
|
|
120
75
|
"company_id": 291,
|
|
121
76
|
"company_name": "LATAM LOGISTICS",
|
|
122
77
|
"country": "México",
|
|
123
|
-
"id_order":
|
|
78
|
+
"id_order": 10451,
|
|
124
79
|
"id_datasheet_especialist": 426,
|
|
125
80
|
"id_datasheet_facilitator": null,
|
|
126
81
|
"id_description_especialist": 426,
|
|
@@ -129,44 +84,20 @@ RetailerProductEditionDefault.args = {
|
|
|
129
84
|
"id_images_facilitator": null,
|
|
130
85
|
"id_auditor": 425,
|
|
131
86
|
"id_recepcionist": null,
|
|
132
|
-
"category": "
|
|
87
|
+
"category": "Tecnología y Electrónica|Televisores|Pantallas",
|
|
133
88
|
"categoryRetailer": [{
|
|
134
|
-
"id_category":
|
|
135
|
-
"id_retailer":
|
|
136
|
-
"category_name": "
|
|
137
|
-
"retailer_name": "
|
|
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
|
-
"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"
|
|
89
|
+
"id_category": 5739,
|
|
90
|
+
"id_retailer": 2,
|
|
91
|
+
"category_name": "Tecnología y Electrónica|Televisores|Pantallas",
|
|
92
|
+
"retailer_name": "Walmart Mercancías Generales"
|
|
153
93
|
}]
|
|
154
94
|
},
|
|
155
95
|
"retailers": [{
|
|
156
|
-
"id":
|
|
157
|
-
"name": "
|
|
158
|
-
}, {
|
|
159
|
-
"id": 29,
|
|
160
|
-
"name": "Farmacias del Ahorro"
|
|
161
|
-
}, {
|
|
162
|
-
"id": 36,
|
|
163
|
-
"name": "Oxxo"
|
|
164
|
-
}, {
|
|
165
|
-
"id": 70,
|
|
166
|
-
"name": "Bodega Aurrera"
|
|
96
|
+
"id": 2,
|
|
97
|
+
"name": "Walmart Mercancías Generales"
|
|
167
98
|
}],
|
|
168
99
|
"country": "México",
|
|
169
|
-
"upc": "
|
|
100
|
+
"upc": "91449"
|
|
170
101
|
},
|
|
171
102
|
// location: {
|
|
172
103
|
// product: { articleId: 126855, versionId: 3 },
|