contentoh-components-library 21.0.2 → 21.0.3
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.
|
@@ -123,7 +123,7 @@ var myBucket = new _awsSdk.default.S3({
|
|
|
123
123
|
});
|
|
124
124
|
|
|
125
125
|
var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
126
|
-
var _productSelected$reta, _product$
|
|
126
|
+
var _productSelected$reta, _product$services5, _product$services6, _datasheets$, _datasheets$$data, _product$services7, _product$article4, _product$services8;
|
|
127
127
|
|
|
128
128
|
var tabsSections = _ref.tabsSections,
|
|
129
129
|
_ref$productSelected = _ref.productSelected,
|
|
@@ -1491,19 +1491,19 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1491
1491
|
setAssignation: setAssignation,
|
|
1492
1492
|
isRetailer: isRetailer,
|
|
1493
1493
|
onClickSave: function onClickSave() {
|
|
1494
|
-
var _product$services2;
|
|
1494
|
+
var _product$services2, _product$services3, _product$services4;
|
|
1495
1495
|
|
|
1496
1496
|
switch (activeTab) {
|
|
1497
1497
|
case "Descripción":
|
|
1498
|
-
saveDescriptions();
|
|
1498
|
+
(product === null || product === void 0 ? void 0 : (_product$services2 = product.services) === null || _product$services2 === void 0 ? void 0 : _product$services2.descriptions) === 1 && saveDescriptions();
|
|
1499
1499
|
break;
|
|
1500
1500
|
|
|
1501
1501
|
case "Ficha técnica":
|
|
1502
|
-
saveDatasheets();
|
|
1502
|
+
(product === null || product === void 0 ? void 0 : (_product$services3 = product.services) === null || _product$services3 === void 0 ? void 0 : _product$services3.datasheets) === 1 && saveDatasheets();
|
|
1503
1503
|
break;
|
|
1504
1504
|
|
|
1505
1505
|
case "Imágenes":
|
|
1506
|
-
(product === null || product === void 0 ? void 0 : (_product$
|
|
1506
|
+
(product === null || product === void 0 ? void 0 : (_product$services4 = product.services) === null || _product$services4 === void 0 ? void 0 : _product$services4.images) === 1 && updateImages();
|
|
1507
1507
|
break;
|
|
1508
1508
|
|
|
1509
1509
|
default:
|
|
@@ -1513,11 +1513,11 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1513
1513
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1514
1514
|
className: "services-information-container " + (imageLayout && activeTab === "Imágenes" ? "image-services" : ""),
|
|
1515
1515
|
children: loading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Loading.Loading, {}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
1516
|
-
children: [!imageLayout && activeTab === "Imágenes" && (product === null || product === void 0 ? void 0 : (_product$
|
|
1516
|
+
children: [!imageLayout && activeTab === "Imágenes" && (product === null || product === void 0 ? void 0 : (_product$services5 = product.services) === null || _product$services5 === void 0 ? void 0 : _product$services5.images) === 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GalleryHeader.GalleryHeader, {
|
|
1517
1517
|
setSelectedImages: setSelectedImages,
|
|
1518
1518
|
checkAll: checkAll,
|
|
1519
1519
|
setCheckAll: setCheckAll
|
|
1520
|
-
}), activeTab === "Ficha técnica" && ((product === null || product === void 0 ? void 0 : (_product$
|
|
1520
|
+
}), activeTab === "Ficha técnica" && ((product === null || product === void 0 ? void 0 : (_product$services6 = product.services) === null || _product$services6 === void 0 ? void 0 : _product$services6.datasheets) === 1 ? (_datasheets$ = datasheets[0]) === null || _datasheets$ === void 0 ? void 0 : (_datasheets$$data = _datasheets$.data) === null || _datasheets$$data === void 0 ? void 0 : _datasheets$$data.map(function (dataGroup, index) {
|
|
1521
1521
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputGroup.InputGroup, {
|
|
1522
1522
|
articleId: productSelected.article.id_article,
|
|
1523
1523
|
version: version,
|
|
@@ -1530,7 +1530,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1530
1530
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
1531
1531
|
text: "No cuentas con este servicio",
|
|
1532
1532
|
headerType: "input-name-header"
|
|
1533
|
-
})), activeTab === "Descripción" && ((product === null || product === void 0 ? void 0 : (_product$
|
|
1533
|
+
})), activeTab === "Descripción" && ((product === null || product === void 0 ? void 0 : (_product$services7 = product.services) === null || _product$services7 === void 0 ? void 0 : _product$services7.descriptions) === 1 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputGroup.InputGroup, {
|
|
1534
1534
|
activeSection: activeTab,
|
|
1535
1535
|
inputGroup: descriptions[0],
|
|
1536
1536
|
updatedDescriptions: updatedDescriptions,
|
|
@@ -1541,7 +1541,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1541
1541
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
1542
1542
|
text: "No cuentas con este servicio",
|
|
1543
1543
|
headerType: "input-name-header"
|
|
1544
|
-
})), activeTab === "Imágenes" && ((product === null || product === void 0 ? void 0 : (_product$
|
|
1544
|
+
})), activeTab === "Imágenes" && ((product === null || product === void 0 ? void 0 : (_product$services8 = product.services) === null || _product$services8 === void 0 ? void 0 : _product$services8.images) === 1 ? /*#__PURE__*/(0, _jsxRuntime.jsx)("section", {
|
|
1545
1545
|
className: "container",
|
|
1546
1546
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _objectSpread2.default)((0, _objectSpread2.default)({}, getRootProps({
|
|
1547
1547
|
className: "dropzone"
|
package/package.json
CHANGED
|
@@ -994,10 +994,10 @@ export const RetailerProductEdition = ({
|
|
|
994
994
|
onClickSave={() => {
|
|
995
995
|
switch (activeTab) {
|
|
996
996
|
case "Descripción":
|
|
997
|
-
saveDescriptions();
|
|
997
|
+
product?.services?.descriptions === 1 && saveDescriptions();
|
|
998
998
|
break;
|
|
999
999
|
case "Ficha técnica":
|
|
1000
|
-
saveDatasheets();
|
|
1000
|
+
product?.services?.datasheets === 1 && saveDatasheets();
|
|
1001
1001
|
break;
|
|
1002
1002
|
case "Imágenes":
|
|
1003
1003
|
product?.services?.images === 1 && updateImages();
|