contentoh-components-library 21.1.94 → 21.1.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/pages/ProviderProductEdition/index.js +33 -21
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +31 -31
- package/dist/components/pages/RetailerProductEdition/index.js +3 -7
- package/package.json +1 -1
- package/src/components/pages/ProviderProductEdition/index.js +25 -17
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +31 -31
- package/src/components/pages/RetailerProductEdition/index.js +3 -3
|
@@ -162,24 +162,31 @@ var reducerImages = function reducerImages(state, action) {
|
|
|
162
162
|
|
|
163
163
|
case "orderImages":
|
|
164
164
|
{
|
|
165
|
-
var _inputsByRetailer$act;
|
|
166
|
-
|
|
167
165
|
var _inputsByRetailer = state.inputsByRetailer,
|
|
168
166
|
valuesInitial = state.valuesInitial,
|
|
169
167
|
inputsInitial = state.inputsInitial,
|
|
170
168
|
inputs = state.inputs;
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
169
|
+
|
|
170
|
+
try {
|
|
171
|
+
var _inputsByRetailer$act;
|
|
172
|
+
|
|
173
|
+
var orderedImages = [];
|
|
174
|
+
var imageIdArray = [];
|
|
175
|
+
if (!_inputsByRetailer[action.retailerId]) _inputsByRetailer[action.retailerId] = [];
|
|
176
|
+
action.retailerId && ((_inputsByRetailer$act = _inputsByRetailer[action.retailerId]) === null || _inputsByRetailer$act === void 0 ? void 0 : _inputsByRetailer$act.filter(function (input) {
|
|
177
|
+
imageIdArray.push(input.id_image);
|
|
178
|
+
valuesInitial.forEach(function (value) {
|
|
179
|
+
if (value.image_id === input.id_image) orderedImages.push(value);
|
|
180
|
+
});
|
|
181
|
+
}));
|
|
182
|
+
inputs = inputsInitial === null || inputsInitial === void 0 ? void 0 : inputsInitial.filter(function (input) {
|
|
183
|
+
return imageIdArray.includes(input.id);
|
|
177
184
|
});
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
|
|
185
|
+
values = orderedImages.length > 0 ? orderedImages : [];
|
|
186
|
+
} catch (error) {
|
|
187
|
+
console.log(error);
|
|
188
|
+
}
|
|
189
|
+
|
|
183
190
|
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, state), {}, {
|
|
184
191
|
values: values,
|
|
185
192
|
inputs: inputs
|
|
@@ -548,8 +555,10 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
548
555
|
services = _context2.sent;
|
|
549
556
|
//Converts the data inside the datasheets object to array
|
|
550
557
|
setServices(services);
|
|
551
|
-
|
|
558
|
+
_context2.next = 6;
|
|
559
|
+
return getServices();
|
|
552
560
|
|
|
561
|
+
case 6:
|
|
553
562
|
if (!originProp) {
|
|
554
563
|
setActiveRetailer(product !== null && product !== void 0 && product.retailers ? product === null || product === void 0 ? void 0 : product.retailers[0] : product === null || product === void 0 ? void 0 : product.retailersAvailable[0]);
|
|
555
564
|
} // setActiveRetailer(product?.retailers[0]);
|
|
@@ -567,7 +576,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
567
576
|
});
|
|
568
577
|
setLoading(false);
|
|
569
578
|
|
|
570
|
-
case
|
|
579
|
+
case 11:
|
|
571
580
|
case "end":
|
|
572
581
|
return _context2.stop();
|
|
573
582
|
}
|
|
@@ -584,7 +593,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
584
593
|
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
585
594
|
var _product$article4;
|
|
586
595
|
|
|
587
|
-
var productInOrder, idArticle, _product$id_order, _servicesResponse$dat, servicesResponse, parsedResponse, retailerResponse
|
|
596
|
+
var productInOrder, idArticle, retailers, active, _product$id_order, _servicesResponse$dat, servicesResponse, parsedResponse, retailerResponse;
|
|
588
597
|
|
|
589
598
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
590
599
|
while (1) {
|
|
@@ -592,29 +601,32 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
592
601
|
case 0:
|
|
593
602
|
productInOrder = product.id_order || product.orderId;
|
|
594
603
|
idArticle = (product === null || product === void 0 ? void 0 : product.id_article) || (product === null || product === void 0 ? void 0 : (_product$article4 = product.article) === null || _product$article4 === void 0 ? void 0 : _product$article4.id_article);
|
|
604
|
+
retailers = product.retailers || product.retailersAvailable;
|
|
605
|
+
active = null;
|
|
595
606
|
|
|
596
607
|
if (!(isRevision() || productInOrder)) {
|
|
597
608
|
_context3.next = 12;
|
|
598
609
|
break;
|
|
599
610
|
}
|
|
600
611
|
|
|
601
|
-
_context3.next =
|
|
612
|
+
_context3.next = 7;
|
|
602
613
|
return _axios.default.get("".concat(process.env.REACT_APP_SERVICES_ENDPOINT, "?articleId=").concat(idArticle, "&orderId=").concat((_product$id_order = product === null || product === void 0 ? void 0 : product.id_order) !== null && _product$id_order !== void 0 ? _product$id_order : product.orderId, "&end=true"));
|
|
603
614
|
|
|
604
|
-
case
|
|
615
|
+
case 7:
|
|
605
616
|
servicesResponse = _context3.sent;
|
|
606
617
|
parsedResponse = JSON.parse(servicesResponse === null || servicesResponse === void 0 ? void 0 : (_servicesResponse$dat = servicesResponse.data) === null || _servicesResponse$dat === void 0 ? void 0 : _servicesResponse$dat.body).data;
|
|
607
618
|
retailerResponse = parsedResponse === null || parsedResponse === void 0 ? void 0 : parsedResponse.map(function (srv) {
|
|
608
619
|
return srv.id_retailer;
|
|
609
620
|
});
|
|
610
|
-
retailers = product.retailers || product.retailersAvailable;
|
|
611
621
|
active = retailers === null || retailers === void 0 ? void 0 : retailers.find(function (retailer) {
|
|
612
622
|
return retailerResponse.includes(retailer.id);
|
|
613
623
|
});
|
|
614
|
-
!activeRetailer.id && setActiveRetailer(active ? active : retailers[0]);
|
|
615
624
|
setServicesData(parsedResponse);
|
|
616
625
|
|
|
617
626
|
case 12:
|
|
627
|
+
!activeRetailer.id && setActiveRetailer(active ? active : retailers[0]);
|
|
628
|
+
|
|
629
|
+
case 13:
|
|
618
630
|
case "end":
|
|
619
631
|
return _context3.stop();
|
|
620
632
|
}
|
|
@@ -744,7 +756,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
744
756
|
|
|
745
757
|
(0, _react.useEffect)(function () {
|
|
746
758
|
loadInputs();
|
|
747
|
-
setImages({
|
|
759
|
+
activeRetailer.id && setImages({
|
|
748
760
|
action: "orderImages",
|
|
749
761
|
retailerId: activeRetailer.id
|
|
750
762
|
});
|
|
@@ -31,59 +31,59 @@ RetailerProductEditionDefault.args = {
|
|
|
31
31
|
"Ficha técnica": false,
|
|
32
32
|
Imágenes: false
|
|
33
33
|
},
|
|
34
|
-
token: "eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.
|
|
34
|
+
token: "eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIwYjY2YTRhOS03NzkwLTQwMzQtYTMwYS1jMDA4MDg5NjI4NjciLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfbFN6UVo0WjdSIiwiY29nbml0bzp1c2VybmFtZSI6IjBiNjZhNGE5LTc3OTAtNDAzNC1hMzBhLWMwMDgwODk2Mjg2NyIsImF1ZCI6IjUyZDlza2tkY2c4cWpwODhvb2sxdXNlNm1rIiwiZXZlbnRfaWQiOiI4ZjA2YmU0NC04ZWEzLTQ5OWMtOGFjZC0xMDlmMDZiZWI1MjAiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY2MDA3NjQ5MywibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY2MDA4MDA5MywiaWF0IjoxNjYwMDc2NDkzLCJlbWFpbCI6ImJheWFkaTE1MzhAbW5xbG0uY29tIn0.aw_x1A8WR2MCp_Kz-T2Jcg0ZtuKwyzQ23yT_OoKr-aGJmEjSPihmksWgLZr9hJXyfvU0JndaVMM_3DRly1TdtJ264zwH4dZ7Cp9gF4TSXG16HQxIIPUA4NnwdpOnlBdE9E27mCXs4XYnCZ7dRMXnkjpRL4PVbrGji9qbEEJR6TxCJafR-zes1o4HC1KfQ5QF4s5I_LYQYbD-Ot0A1zDiJg34HR9tTILu5f4uc_2Nj8bqqYJsEdKg982WWO9ac2uKRPXQqNL6CsdltnSeQQcnS6Wj5DJTRRoc-lRdE6ekpAvDGPo0Dyj1Q8GYH3uxvM-pVu8J1Z_JOtO5j5mPN9krpA",
|
|
35
35
|
productSelected: {
|
|
36
36
|
services: {
|
|
37
|
-
datasheets:
|
|
38
|
-
descriptions:
|
|
37
|
+
datasheets: 0,
|
|
38
|
+
descriptions: 0,
|
|
39
39
|
images: 1
|
|
40
40
|
},
|
|
41
|
-
orderId:
|
|
41
|
+
orderId: 1789,
|
|
42
42
|
status: "ACA",
|
|
43
|
-
datasheet_status: "
|
|
43
|
+
datasheet_status: "NS",
|
|
44
44
|
prio: "none",
|
|
45
45
|
version: 2,
|
|
46
|
-
description_status: "
|
|
46
|
+
description_status: "NS",
|
|
47
47
|
images_status: "ACA",
|
|
48
48
|
article: {
|
|
49
|
-
id_article:
|
|
50
|
-
id_category: "
|
|
51
|
-
name: "
|
|
52
|
-
upc: "
|
|
53
|
-
timestamp: "2022-
|
|
54
|
-
id_user:
|
|
49
|
+
id_article: 68865,
|
|
50
|
+
id_category: "2999",
|
|
51
|
+
name: "RESIZE",
|
|
52
|
+
upc: "169955",
|
|
53
|
+
timestamp: "2022-06-21T16:03:10.000Z",
|
|
54
|
+
id_user: 1238,
|
|
55
55
|
status: "NULL",
|
|
56
|
-
active:
|
|
57
|
-
company_id:
|
|
56
|
+
active: 0,
|
|
57
|
+
company_id: 819,
|
|
58
58
|
SKU: null,
|
|
59
59
|
Descripcion: null,
|
|
60
60
|
Proveedor: null,
|
|
61
61
|
id_proveedor: 0,
|
|
62
|
-
company_name: "",
|
|
63
|
-
country:
|
|
64
|
-
id_order:
|
|
65
|
-
id_datasheet_especialist:
|
|
66
|
-
id_datasheet_facilitator:
|
|
67
|
-
id_description_especialist:
|
|
68
|
-
id_description_facilitator:
|
|
62
|
+
company_name: "The Home Depot Resize",
|
|
63
|
+
country: "México",
|
|
64
|
+
id_order: 1789,
|
|
65
|
+
id_datasheet_especialist: null,
|
|
66
|
+
id_datasheet_facilitator: null,
|
|
67
|
+
id_description_especialist: null,
|
|
68
|
+
id_description_facilitator: null,
|
|
69
69
|
id_images_especialist: 1250,
|
|
70
|
-
id_images_facilitator:
|
|
71
|
-
id_auditor:
|
|
70
|
+
id_images_facilitator: 424,
|
|
71
|
+
id_auditor: null,
|
|
72
72
|
id_recepcionist: null,
|
|
73
|
-
category: "
|
|
74
|
-
missingAttributes:
|
|
75
|
-
missingDescriptions:
|
|
76
|
-
missingImages:
|
|
73
|
+
category: "Resizing|Resizing|Resizing",
|
|
74
|
+
missingAttributes: null,
|
|
75
|
+
missingDescriptions: null,
|
|
76
|
+
missingImages: null
|
|
77
77
|
},
|
|
78
78
|
retailers: [{
|
|
79
|
-
id:
|
|
80
|
-
name: "The Home Depot
|
|
79
|
+
id: 60,
|
|
80
|
+
name: "The Home Depot Resizing",
|
|
81
81
|
country: "México",
|
|
82
82
|
id_region: 1,
|
|
83
83
|
active: 1
|
|
84
84
|
}],
|
|
85
|
-
country:
|
|
86
|
-
upc: "
|
|
85
|
+
country: "México",
|
|
86
|
+
upc: "169955"
|
|
87
87
|
},
|
|
88
88
|
location: {
|
|
89
89
|
product: {
|
|
@@ -157,7 +157,7 @@ var reducerImages = function reducerImages(state, action) {
|
|
|
157
157
|
inputs = inputsInitial === null || inputsInitial === void 0 ? void 0 : inputsInitial.filter(function (input) {
|
|
158
158
|
return imageIdArray.includes(input.id);
|
|
159
159
|
});
|
|
160
|
-
values = orderedImages.length > 0 ? orderedImages :
|
|
160
|
+
values = orderedImages.length > 0 ? orderedImages : [];
|
|
161
161
|
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, {
|
|
162
162
|
values: values,
|
|
163
163
|
inputs: inputs
|
|
@@ -618,12 +618,8 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
618
618
|
|
|
619
619
|
case 20:
|
|
620
620
|
setStatusArray(arr);
|
|
621
|
-
setImages({
|
|
622
|
-
action: "orderImages",
|
|
623
|
-
retailerId: activeRetailer.id
|
|
624
|
-
});
|
|
625
621
|
|
|
626
|
-
case
|
|
622
|
+
case 21:
|
|
627
623
|
case "end":
|
|
628
624
|
return _context4.stop();
|
|
629
625
|
}
|
|
@@ -709,7 +705,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
709
705
|
setDescriptions(_descriptions);
|
|
710
706
|
}
|
|
711
707
|
|
|
712
|
-
setImages({
|
|
708
|
+
(activeRetailer === null || activeRetailer === void 0 ? void 0 : activeRetailer.id) && setImages({
|
|
713
709
|
action: "orderImages",
|
|
714
710
|
retailerId: activeRetailer.id
|
|
715
711
|
});
|
package/package.json
CHANGED
|
@@ -83,21 +83,27 @@ const reducerImages = (state, action) => {
|
|
|
83
83
|
return { ...state, values };
|
|
84
84
|
case "orderImages": {
|
|
85
85
|
let { inputsByRetailer, valuesInitial, inputsInitial, inputs } = state;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
inputsByRetailer[action.retailerId]
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
86
|
+
try {
|
|
87
|
+
const orderedImages = [];
|
|
88
|
+
const imageIdArray = [];
|
|
89
|
+
if (!inputsByRetailer[action.retailerId])
|
|
90
|
+
inputsByRetailer[action.retailerId] = [];
|
|
91
|
+
action.retailerId &&
|
|
92
|
+
inputsByRetailer[action.retailerId]?.filter((input) => {
|
|
93
|
+
imageIdArray.push(input.id_image);
|
|
94
|
+
valuesInitial.forEach((value) => {
|
|
95
|
+
if (value.image_id === input.id_image) orderedImages.push(value);
|
|
96
|
+
});
|
|
93
97
|
});
|
|
94
|
-
});
|
|
95
98
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
+
inputs = inputsInitial?.filter((input) =>
|
|
100
|
+
imageIdArray.includes(input.id)
|
|
101
|
+
);
|
|
99
102
|
|
|
100
|
-
|
|
103
|
+
values = orderedImages.length > 0 ? orderedImages : [];
|
|
104
|
+
} catch (error) {
|
|
105
|
+
console.log(error);
|
|
106
|
+
}
|
|
101
107
|
return { ...state, values, inputs };
|
|
102
108
|
}
|
|
103
109
|
default:
|
|
@@ -263,7 +269,7 @@ export const ProviderProductEdition = ({
|
|
|
263
269
|
|
|
264
270
|
//Converts the data inside the datasheets object to array
|
|
265
271
|
setServices(services);
|
|
266
|
-
getServices();
|
|
272
|
+
await getServices();
|
|
267
273
|
|
|
268
274
|
if (!originProp) {
|
|
269
275
|
setActiveRetailer(
|
|
@@ -284,6 +290,8 @@ export const ProviderProductEdition = ({
|
|
|
284
290
|
const getServices = async () => {
|
|
285
291
|
const productInOrder = product.id_order || product.orderId;
|
|
286
292
|
const idArticle = product?.id_article || product?.article?.id_article;
|
|
293
|
+
let retailers = product.retailers || product.retailersAvailable;
|
|
294
|
+
let active = null;
|
|
287
295
|
if (isRevision() || productInOrder) {
|
|
288
296
|
const servicesResponse = await axios.get(
|
|
289
297
|
`${
|
|
@@ -294,13 +302,12 @@ export const ProviderProductEdition = ({
|
|
|
294
302
|
);
|
|
295
303
|
const parsedResponse = JSON.parse(servicesResponse?.data?.body).data;
|
|
296
304
|
const retailerResponse = parsedResponse?.map((srv) => srv.id_retailer);
|
|
297
|
-
|
|
298
|
-
let active = retailers?.find((retailer) =>
|
|
305
|
+
active = retailers?.find((retailer) =>
|
|
299
306
|
retailerResponse.includes(retailer.id)
|
|
300
307
|
);
|
|
301
|
-
!activeRetailer.id && setActiveRetailer(active ? active : retailers[0]);
|
|
302
308
|
setServicesData(parsedResponse);
|
|
303
309
|
}
|
|
310
|
+
!activeRetailer.id && setActiveRetailer(active ? active : retailers[0]);
|
|
304
311
|
};
|
|
305
312
|
|
|
306
313
|
const isRevision = () => {
|
|
@@ -392,7 +399,8 @@ export const ProviderProductEdition = ({
|
|
|
392
399
|
|
|
393
400
|
useEffect(() => {
|
|
394
401
|
loadInputs();
|
|
395
|
-
|
|
402
|
+
activeRetailer.id &&
|
|
403
|
+
setImages({ action: "orderImages", retailerId: activeRetailer.id });
|
|
396
404
|
}, [servicesData, activeRetailer, services]);
|
|
397
405
|
|
|
398
406
|
const thumbs = () => {
|
|
@@ -16,61 +16,61 @@ RetailerProductEditionDefault.args = {
|
|
|
16
16
|
Imágenes: false,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.
|
|
19
|
+
"eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIwYjY2YTRhOS03NzkwLTQwMzQtYTMwYS1jMDA4MDg5NjI4NjciLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfbFN6UVo0WjdSIiwiY29nbml0bzp1c2VybmFtZSI6IjBiNjZhNGE5LTc3OTAtNDAzNC1hMzBhLWMwMDgwODk2Mjg2NyIsImF1ZCI6IjUyZDlza2tkY2c4cWpwODhvb2sxdXNlNm1rIiwiZXZlbnRfaWQiOiI4ZjA2YmU0NC04ZWEzLTQ5OWMtOGFjZC0xMDlmMDZiZWI1MjAiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY2MDA3NjQ5MywibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY2MDA4MDA5MywiaWF0IjoxNjYwMDc2NDkzLCJlbWFpbCI6ImJheWFkaTE1MzhAbW5xbG0uY29tIn0.aw_x1A8WR2MCp_Kz-T2Jcg0ZtuKwyzQ23yT_OoKr-aGJmEjSPihmksWgLZr9hJXyfvU0JndaVMM_3DRly1TdtJ264zwH4dZ7Cp9gF4TSXG16HQxIIPUA4NnwdpOnlBdE9E27mCXs4XYnCZ7dRMXnkjpRL4PVbrGji9qbEEJR6TxCJafR-zes1o4HC1KfQ5QF4s5I_LYQYbD-Ot0A1zDiJg34HR9tTILu5f4uc_2Nj8bqqYJsEdKg982WWO9ac2uKRPXQqNL6CsdltnSeQQcnS6Wj5DJTRRoc-lRdE6ekpAvDGPo0Dyj1Q8GYH3uxvM-pVu8J1Z_JOtO5j5mPN9krpA",
|
|
20
20
|
productSelected: {
|
|
21
21
|
services: {
|
|
22
|
-
datasheets:
|
|
23
|
-
descriptions:
|
|
22
|
+
datasheets: 0,
|
|
23
|
+
descriptions: 0,
|
|
24
24
|
images: 1,
|
|
25
25
|
},
|
|
26
|
-
orderId:
|
|
26
|
+
orderId: 1789,
|
|
27
27
|
status: "ACA",
|
|
28
|
-
datasheet_status: "
|
|
28
|
+
datasheet_status: "NS",
|
|
29
29
|
prio: "none",
|
|
30
30
|
version: 2,
|
|
31
|
-
description_status: "
|
|
31
|
+
description_status: "NS",
|
|
32
32
|
images_status: "ACA",
|
|
33
33
|
article: {
|
|
34
|
-
id_article:
|
|
35
|
-
id_category: "
|
|
36
|
-
name: "
|
|
37
|
-
upc: "
|
|
38
|
-
timestamp: "2022-
|
|
39
|
-
id_user:
|
|
34
|
+
id_article: 68865,
|
|
35
|
+
id_category: "2999",
|
|
36
|
+
name: "RESIZE",
|
|
37
|
+
upc: "169955",
|
|
38
|
+
timestamp: "2022-06-21T16:03:10.000Z",
|
|
39
|
+
id_user: 1238,
|
|
40
40
|
status: "NULL",
|
|
41
|
-
active:
|
|
42
|
-
company_id:
|
|
41
|
+
active: 0,
|
|
42
|
+
company_id: 819,
|
|
43
43
|
SKU: null,
|
|
44
44
|
Descripcion: null,
|
|
45
45
|
Proveedor: null,
|
|
46
46
|
id_proveedor: 0,
|
|
47
|
-
company_name: "",
|
|
48
|
-
country:
|
|
49
|
-
id_order:
|
|
50
|
-
id_datasheet_especialist:
|
|
51
|
-
id_datasheet_facilitator:
|
|
52
|
-
id_description_especialist:
|
|
53
|
-
id_description_facilitator:
|
|
47
|
+
company_name: "The Home Depot Resize",
|
|
48
|
+
country: "México",
|
|
49
|
+
id_order: 1789,
|
|
50
|
+
id_datasheet_especialist: null,
|
|
51
|
+
id_datasheet_facilitator: null,
|
|
52
|
+
id_description_especialist: null,
|
|
53
|
+
id_description_facilitator: null,
|
|
54
54
|
id_images_especialist: 1250,
|
|
55
|
-
id_images_facilitator:
|
|
56
|
-
id_auditor:
|
|
55
|
+
id_images_facilitator: 424,
|
|
56
|
+
id_auditor: null,
|
|
57
57
|
id_recepcionist: null,
|
|
58
|
-
category: "
|
|
59
|
-
missingAttributes:
|
|
60
|
-
missingDescriptions:
|
|
61
|
-
missingImages:
|
|
58
|
+
category: "Resizing|Resizing|Resizing",
|
|
59
|
+
missingAttributes: null,
|
|
60
|
+
missingDescriptions: null,
|
|
61
|
+
missingImages: null,
|
|
62
62
|
},
|
|
63
63
|
retailers: [
|
|
64
64
|
{
|
|
65
|
-
id:
|
|
66
|
-
name: "The Home Depot
|
|
65
|
+
id: 60,
|
|
66
|
+
name: "The Home Depot Resizing",
|
|
67
67
|
country: "México",
|
|
68
68
|
id_region: 1,
|
|
69
69
|
active: 1,
|
|
70
70
|
},
|
|
71
71
|
],
|
|
72
|
-
country:
|
|
73
|
-
upc: "
|
|
72
|
+
country: "México",
|
|
73
|
+
upc: "169955",
|
|
74
74
|
},
|
|
75
75
|
location: {
|
|
76
76
|
product: { articleId: 109485, versionId: 3 },
|
|
@@ -87,7 +87,7 @@ const reducerImages = (state, action) => {
|
|
|
87
87
|
imageIdArray.includes(input.id)
|
|
88
88
|
);
|
|
89
89
|
|
|
90
|
-
values = orderedImages.length > 0 ? orderedImages :
|
|
90
|
+
values = orderedImages.length > 0 ? orderedImages : [];
|
|
91
91
|
return { ...state, values, inputs };
|
|
92
92
|
}
|
|
93
93
|
default:
|
|
@@ -305,7 +305,6 @@ export const RetailerProductEdition = ({
|
|
|
305
305
|
break;
|
|
306
306
|
}
|
|
307
307
|
setStatusArray(arr);
|
|
308
|
-
setImages({ action: "orderImages", retailerId: activeRetailer.id });
|
|
309
308
|
}, [product, version]);
|
|
310
309
|
|
|
311
310
|
const loadAssignations = (currentProduct) => {
|
|
@@ -390,7 +389,8 @@ export const RetailerProductEdition = ({
|
|
|
390
389
|
setDatasheets([datagroups, inputs]);
|
|
391
390
|
setDescriptions(descriptions);
|
|
392
391
|
}
|
|
393
|
-
|
|
392
|
+
activeRetailer?.id &&
|
|
393
|
+
setImages({ action: "orderImages", retailerId: activeRetailer.id });
|
|
394
394
|
}, [activeRetailer, services]);
|
|
395
395
|
|
|
396
396
|
const thumbs = () => {
|