contentoh-components-library 21.3.23 → 21.3.24
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/molecules/GalleryElement/index.js +1 -1
- package/dist/components/pages/RetailerProductEdition/index.js +4 -2
- package/dist/components/pages/RetailerProductEdition/utils.js +2 -3
- package/package.json +1 -1
- package/src/components/molecules/GalleryElement/index.js +1 -1
- package/src/components/pages/RetailerProductEdition/index.js +4 -8
- package/src/components/pages/RetailerProductEdition/utils.js +2 -2
|
@@ -88,7 +88,7 @@ var GalleryElement = function GalleryElement(_ref) {
|
|
|
88
88
|
}, [showValidationPanel]);
|
|
89
89
|
|
|
90
90
|
var isEquals = function isEquals(value, auditValue) {
|
|
91
|
-
return
|
|
91
|
+
return value === auditValue;
|
|
92
92
|
};
|
|
93
93
|
|
|
94
94
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
@@ -537,7 +537,9 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
537
537
|
}();
|
|
538
538
|
|
|
539
539
|
(0, _react.useEffect)(function () {
|
|
540
|
-
|
|
540
|
+
if (auditableVersion) {
|
|
541
|
+
loadAuditableData();
|
|
542
|
+
}
|
|
541
543
|
}, [auditableVersion]);
|
|
542
544
|
(0, _react.useEffect)(function () {
|
|
543
545
|
checkAll && setSelectedImages(images.values);
|
|
@@ -796,7 +798,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
796
798
|
}, [percentages]);
|
|
797
799
|
(0, _react.useEffect)(function () {
|
|
798
800
|
(0, _utils.getInputsData)(services, activeRetailer, setDatasheets, setDescriptions);
|
|
799
|
-
auditableVersion && (
|
|
801
|
+
auditableVersion && loadAuditableData();
|
|
800
802
|
setActivePercentage(Math.round(activeRetailer === null || activeRetailer === void 0 ? void 0 : activeRetailer.percentage, 0));
|
|
801
803
|
(activeRetailer === null || activeRetailer === void 0 ? void 0 : activeRetailer.id) && setImages({
|
|
802
804
|
action: "orderImages",
|
|
@@ -29,13 +29,12 @@ var getAuditVersion = /*#__PURE__*/function () {
|
|
|
29
29
|
|
|
30
30
|
case 2:
|
|
31
31
|
auditResponse = _context.sent;
|
|
32
|
-
console.log(auditResponse, "auditResponse");
|
|
33
32
|
|
|
34
33
|
if (auditResponse.status === 200) {
|
|
35
|
-
setState(JSON.parse(auditResponse.data.body).data);
|
|
34
|
+
setState(JSON.parse(auditResponse.data.body).data || "{}");
|
|
36
35
|
}
|
|
37
36
|
|
|
38
|
-
case
|
|
37
|
+
case 4:
|
|
39
38
|
case "end":
|
|
40
39
|
return _context.stop();
|
|
41
40
|
}
|
package/package.json
CHANGED
|
@@ -244,7 +244,9 @@ export const RetailerProductEdition = ({
|
|
|
244
244
|
};
|
|
245
245
|
|
|
246
246
|
useEffect(() => {
|
|
247
|
-
|
|
247
|
+
if (auditableVersion) {
|
|
248
|
+
loadAuditableData();
|
|
249
|
+
}
|
|
248
250
|
}, [auditableVersion]);
|
|
249
251
|
|
|
250
252
|
useEffect(() => {
|
|
@@ -424,13 +426,7 @@ export const RetailerProductEdition = ({
|
|
|
424
426
|
|
|
425
427
|
useEffect(() => {
|
|
426
428
|
getInputsData(services, activeRetailer, setDatasheets, setDescriptions);
|
|
427
|
-
auditableVersion &&
|
|
428
|
-
getInputsData(
|
|
429
|
-
auditServices,
|
|
430
|
-
activeRetailer,
|
|
431
|
-
setAuditDatasheets,
|
|
432
|
-
setAuditDescriptions
|
|
433
|
-
);
|
|
429
|
+
auditableVersion && loadAuditableData();
|
|
434
430
|
setActivePercentage(Math.round(activeRetailer?.percentage, 0));
|
|
435
431
|
activeRetailer?.id &&
|
|
436
432
|
setImages({ action: "orderImages", retailerId: activeRetailer.id });
|
|
@@ -5,9 +5,9 @@ export const getAuditVersion = async (articleId, setState, token) => {
|
|
|
5
5
|
`${process.env.REACT_APP_GET_AUDIT}?articleId=${articleId}`,
|
|
6
6
|
{ headers: { Authorization: token } }
|
|
7
7
|
);
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
if (auditResponse.status === 200) {
|
|
10
|
-
setState(JSON.parse(auditResponse.data.body).data);
|
|
10
|
+
setState(JSON.parse(auditResponse.data.body).data || "{}");
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
|