contentoh-components-library 21.3.51 → 21.3.52
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.
|
@@ -206,7 +206,7 @@ var myBucket = new _awsSdk.default.S3({
|
|
|
206
206
|
});
|
|
207
207
|
|
|
208
208
|
var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
209
|
-
var _product$retailers, _product$retailersAva, _location$
|
|
209
|
+
var _product$retailers, _product$retailersAva, _location$state4, _location$state5, _datasheets$, _datasheets$$data;
|
|
210
210
|
|
|
211
211
|
var tabsSections = _ref.tabsSections,
|
|
212
212
|
_ref$productSelected = _ref.productSelected,
|
|
@@ -446,14 +446,10 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
446
446
|
validatedAll = _useState60[0],
|
|
447
447
|
setValidatedAll = _useState60[1];
|
|
448
448
|
|
|
449
|
-
console.log({
|
|
450
|
-
location: location
|
|
451
|
-
});
|
|
452
|
-
|
|
453
449
|
var _useState61 = (0, _react.useState)({
|
|
454
|
-
"Ficha técnica":
|
|
455
|
-
Descripción:
|
|
456
|
-
Imágenes:
|
|
450
|
+
"Ficha técnica": null,
|
|
451
|
+
Descripción: null,
|
|
452
|
+
Imágenes: null
|
|
457
453
|
}),
|
|
458
454
|
_useState62 = (0, _slicedToArray2.default)(_useState61, 2),
|
|
459
455
|
origin = _useState62[0],
|
|
@@ -883,6 +879,18 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
883
879
|
setActiveTab("Imágenes");
|
|
884
880
|
}
|
|
885
881
|
}, [showModal]);
|
|
882
|
+
(0, _react.useEffect)(function () {
|
|
883
|
+
var _location$state, _location$state2, _location$state3;
|
|
884
|
+
|
|
885
|
+
console.log({
|
|
886
|
+
location: location
|
|
887
|
+
});
|
|
888
|
+
setOrigin({
|
|
889
|
+
"Ficha técnica": location === null || location === void 0 ? void 0 : (_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.origin,
|
|
890
|
+
Descripción: location === null || location === void 0 ? void 0 : (_location$state2 = location.state) === null || _location$state2 === void 0 ? void 0 : _location$state2.origin,
|
|
891
|
+
Imágenes: location === null || location === void 0 ? void 0 : (_location$state3 = location.state) === null || _location$state3 === void 0 ? void 0 : _location$state3.origin
|
|
892
|
+
});
|
|
893
|
+
}, [location === null || location === void 0 ? void 0 : (_location$state4 = location.state) === null || _location$state4 === void 0 ? void 0 : _location$state4.origin]);
|
|
886
894
|
|
|
887
895
|
var loadData = /*#__PURE__*/function () {
|
|
888
896
|
var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
|
|
@@ -2051,7 +2059,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2051
2059
|
headerTop: headerTop,
|
|
2052
2060
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_HeaderTop.HeaderTop, {
|
|
2053
2061
|
setHeaderTop: setHeaderTop,
|
|
2054
|
-
withChat: location === null || location === void 0 ? void 0 : (_location$
|
|
2062
|
+
withChat: location === null || location === void 0 ? void 0 : (_location$state5 = location.state) === null || _location$state5 === void 0 ? void 0 : _location$state5.withChat,
|
|
2055
2063
|
productSelected: productSelected,
|
|
2056
2064
|
token: token,
|
|
2057
2065
|
activeRetailer: activeRetailer
|
package/package.json
CHANGED
|
@@ -215,11 +215,10 @@ export const ProviderProductEdition = ({
|
|
|
215
215
|
const [loading, setLoading] = useState(true);
|
|
216
216
|
const [validatedAll, setValidatedAll] = useState(false);
|
|
217
217
|
|
|
218
|
-
console.log({ location });
|
|
219
218
|
const [origin, setOrigin] = useState({
|
|
220
|
-
"Ficha técnica":
|
|
221
|
-
Descripción:
|
|
222
|
-
Imágenes:
|
|
219
|
+
"Ficha técnica": null,
|
|
220
|
+
Descripción: null,
|
|
221
|
+
Imágenes: null,
|
|
223
222
|
});
|
|
224
223
|
const [inCart, setInCart] = useState(false);
|
|
225
224
|
const [dataGenericModal, setDataGenericModal] = useState({
|
|
@@ -478,6 +477,15 @@ export const ProviderProductEdition = ({
|
|
|
478
477
|
}
|
|
479
478
|
}, [showModal]);
|
|
480
479
|
|
|
480
|
+
useEffect(() => {
|
|
481
|
+
console.log({ location });
|
|
482
|
+
setOrigin({
|
|
483
|
+
"Ficha técnica": location?.state?.origin,
|
|
484
|
+
Descripción: location?.state?.origin,
|
|
485
|
+
Imágenes: location?.state?.origin,
|
|
486
|
+
});
|
|
487
|
+
}, [location?.state?.origin]);
|
|
488
|
+
|
|
481
489
|
const loadData = async () => {
|
|
482
490
|
const services = await getRetailerServices(
|
|
483
491
|
product?.id_article || product?.article?.id_article,
|