contentoh-components-library 21.5.92 → 21.5.93
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/GeneralButton/styles.js +1 -1
- package/dist/components/atoms/GeneralInput/index.js +54 -245
- package/dist/components/atoms/GeneralInput/styles.js +3 -7
- package/dist/components/atoms/InputFormatter/index.js +68 -223
- package/dist/components/atoms/InputFormatter/styles.js +4 -20
- package/dist/components/molecules/StatusAsignationInfo/index.js +1 -11
- package/dist/components/molecules/TabsMenu/index.js +12 -13
- package/dist/components/molecules/TagAndInput/index.js +24 -361
- package/dist/components/molecules/TagAndInput/styles.js +2 -2
- package/dist/components/organisms/FullProductNameHeader/index.js +22 -6
- package/dist/components/organisms/InputGroup/index.js +18 -22
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +337 -150
- package/dist/components/pages/ProviderProductEdition/context/provider-product-edition.context.js +15 -15
- package/dist/components/pages/ProviderProductEdition/index.js +362 -368
- package/dist/components/pages/ProviderProductEdition/utils.js +0 -1
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +196 -179
- package/dist/components/pages/RetailerProductEdition/context/provider-product-edition.context.js +260 -59
- package/dist/components/pages/RetailerProductEdition/context/reducers/product.js +38 -50
- package/dist/components/pages/RetailerProductEdition/index.js +2234 -1716
- package/dist/components/pages/RetailerProductEdition/styles.js +2 -4
- package/dist/components/pages/RetailerProductEdition/utils.js +2 -251
- package/dist/contexts/AiProductEdition.js +158 -230
- package/package.json +2 -4
- package/src/components/atoms/GeneralButton/styles.js +0 -4
- package/src/components/atoms/GeneralInput/index.js +60 -237
- package/src/components/atoms/GeneralInput/styles.js +0 -81
- package/src/components/atoms/InputFormatter/index.js +51 -200
- package/src/components/atoms/InputFormatter/styles.js +0 -284
- package/src/components/molecules/StatusAsignationInfo/index.js +1 -9
- package/src/components/molecules/TabsMenu/index.js +11 -12
- package/src/components/molecules/TagAndInput/index.js +21 -286
- package/src/components/molecules/TagAndInput/styles.js +17 -59
- package/src/components/organisms/FullProductNameHeader/index.js +28 -4
- package/src/components/organisms/FullTabsMenu/index.js +1 -1
- package/src/components/organisms/InputGroup/index.js +4 -12
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +202 -174
- package/src/components/pages/ProviderProductEdition/context/provider-product-edition.context.jsx +14 -14
- package/src/components/pages/ProviderProductEdition/index.js +452 -453
- package/src/components/pages/ProviderProductEdition/utils.js +2 -2
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +224 -201
- package/src/components/pages/RetailerProductEdition/index.js +1718 -1547
- package/src/components/pages/RetailerProductEdition/styles.js +2 -67
- package/src/components/pages/RetailerProductEdition/utils.js +0 -240
- package/dist/ai/utils/compare-strings.js +0 -45
- package/dist/components/organisms/ChangeStatusModal/index.js +0 -531
- package/dist/components/organisms/ChangeStatusModal/styles.js +0 -85
- package/dist/global-files/statusDictionary.js +0 -103
- package/src/ai/utils/compare-strings.js +0 -45
- package/src/assets/images/Icons/arrow.png +0 -0
- package/src/assets/images/Icons/cancel.png +0 -0
- package/src/assets/images/Icons/ia-icon.png +0 -0
- package/src/assets/images/Icons/loading.svg +0 -5
- package/src/assets/images/Icons/reload.png +0 -0
- package/src/components/atoms/RetailerSelector/RetailerSelector.stories.js +0 -10
- package/src/components/atoms/RetailerSelector/index.js +0 -3
- package/src/components/atoms/RetailerSelector/styles.js +0 -0
- package/src/components/organisms/ChangeStatusModal/index.jsx +0 -488
- package/src/components/organisms/ChangeStatusModal/styles.js +0 -333
- package/src/components/pages/RetailerProductEdition/context/provider-product-edition.context.jsx +0 -575
- package/src/components/pages/RetailerProductEdition/context/provider-product-edition.reducer.js +0 -62
- package/src/components/pages/RetailerProductEdition/context/reducers/active-state.js +0 -344
- package/src/components/pages/RetailerProductEdition/context/reducers/inputs.js +0 -155
- package/src/components/pages/RetailerProductEdition/context/reducers/product.js +0 -114
- package/src/components/pages/RetailerProductEdition/context/reducers/system.js +0 -60
- package/src/components/pages/RetailerProductEdition/index_old.js +0 -1979
- package/src/components/pages/RetailerProductEdition/stories/Auditor.stories.js +0 -101
- package/src/components/pages/RetailerProductEdition/stories/ImageEditor.stories.js +0 -115
- package/src/components/pages/RetailerProductEdition/stories/TextEditor.stories.js +0 -174
- package/src/contexts/AiProductEdition.jsx +0 -339
- package/src/global-files/statusDictionary.js +0 -103
|
@@ -77,8 +77,6 @@ var _genericModalWarning = _interopRequireDefault(require("../../../assets/image
|
|
|
77
77
|
|
|
78
78
|
var _styles = require("./styles");
|
|
79
79
|
|
|
80
|
-
var _AiProductEdition = require("../../../contexts/AiProductEdition");
|
|
81
|
-
|
|
82
80
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
83
81
|
|
|
84
82
|
var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
@@ -239,13 +237,22 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
239
237
|
try {
|
|
240
238
|
var product = JSON.parse(sessionStorage.getItem("productSelected")) ? JSON.parse(sessionStorage.getItem("productSelected")) : productSelected;
|
|
241
239
|
var productNormalized = (0, _utils.normalizeProduct)(product);
|
|
240
|
+
console.log({
|
|
241
|
+
productNormalized: productNormalized
|
|
242
|
+
});
|
|
242
243
|
dispatch({
|
|
243
244
|
type: "SET_PRODUCT",
|
|
244
245
|
payload: productNormalized
|
|
245
246
|
});
|
|
246
247
|
dispatch({
|
|
247
248
|
type: "SET_ACTIVE_RETAILER",
|
|
248
|
-
payload: productNormalized.
|
|
249
|
+
payload: productNormalized.categoryRetailerInOrder[0]
|
|
250
|
+
});
|
|
251
|
+
var firstRetailerStatus = productNormalized.statusByRetailer[productNormalized.categoryRetailerInOrder[0].id_retailer];
|
|
252
|
+
var initialTab = firstRetailerStatus.description ? "Descripción" : firstRetailerStatus.datasheet ? "Ficha técnica" : firstRetailerStatus.images ? "Imágenes" : "Imágenes";
|
|
253
|
+
dispatch({
|
|
254
|
+
type: "SET_ACTIVE_TAB",
|
|
255
|
+
payload: initialTab
|
|
249
256
|
});
|
|
250
257
|
} catch (error) {
|
|
251
258
|
console.log("Error setting product data: ", error);
|
|
@@ -387,34 +394,43 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
387
394
|
|
|
388
395
|
var updateInputsActiveRetailer = function updateInputsActiveRetailer() {
|
|
389
396
|
if (!state.services) return;
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
397
|
+
|
|
398
|
+
if (state.services.datasheets) {
|
|
399
|
+
var retailerDatasheets = state.services.datasheets[state.active_retailer.id_retailer];
|
|
400
|
+
var datasheetsActiveRetailer = (0, _objectSpread4.default)((0, _objectSpread4.default)({}, retailerDatasheets), {}, {
|
|
401
|
+
data: Object.values(retailerDatasheets.data)
|
|
402
|
+
});
|
|
403
|
+
dispatch({
|
|
404
|
+
type: "SET_DATASHEETS_INPUTS",
|
|
405
|
+
payload: [datasheetsActiveRetailer, state.services.datasheets.inputs]
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
if (state.services.descriptions) {
|
|
410
|
+
var descriptionsActiveRetailer = state.services.descriptions.filter(function (item) {
|
|
411
|
+
return item.id === state.active_retailer.id_retailer;
|
|
412
|
+
});
|
|
413
|
+
dispatch({
|
|
414
|
+
type: "SET_DESCRIPTIONS_INPUTS",
|
|
415
|
+
payload: descriptionsActiveRetailer
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
if (state.services.images) {
|
|
420
|
+
var filteredValues = state.services.images.values.filter(function (value) {
|
|
421
|
+
return state.services.images.inputsByRetailer.some(function (retailerInput) {
|
|
422
|
+
return retailerInput.some(function (input) {
|
|
423
|
+
return input.id_retailer === state.active_retailer.id_retailer && input.id_image === value.image_id;
|
|
424
|
+
});
|
|
401
425
|
});
|
|
402
426
|
});
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
payload: descriptionsActiveRetailer
|
|
411
|
-
});
|
|
412
|
-
dispatch({
|
|
413
|
-
type: "SET_IMAGES_VALUES",
|
|
414
|
-
payload: (0, _objectSpread4.default)((0, _objectSpread4.default)({}, state.services.images), {}, {
|
|
415
|
-
values: filteredValues
|
|
416
|
-
})
|
|
417
|
-
});
|
|
427
|
+
dispatch({
|
|
428
|
+
type: "SET_IMAGES_VALUES",
|
|
429
|
+
payload: (0, _objectSpread4.default)((0, _objectSpread4.default)({}, state.services.images), {}, {
|
|
430
|
+
values: filteredValues
|
|
431
|
+
})
|
|
432
|
+
});
|
|
433
|
+
}
|
|
418
434
|
};
|
|
419
435
|
|
|
420
436
|
updateInputsActiveRetailer();
|
|
@@ -439,13 +455,7 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
439
455
|
|
|
440
456
|
|
|
441
457
|
var hasNoOrder = !state.product.id_order && !state.product.orderId;
|
|
442
|
-
|
|
443
|
-
originTab: originTab,
|
|
444
|
-
currentStatus: currentStatus,
|
|
445
|
-
hasNoOrder: hasNoOrder
|
|
446
|
-
});
|
|
447
|
-
var condition = originTab === "RequestWithoutContentoh" && (["R", "CA"].includes(currentStatus) || currentStatus === "RCA" && hasNoOrder) || ["RequestWithContentoh", "Contentoh"].includes(originTab) && currentStatus === "AA";
|
|
448
|
-
return condition;
|
|
458
|
+
return originTab === "RequestWithoutContentoh" && (["R", "CA"].includes(currentStatus) || currentStatus === "RCA" && hasNoOrder) || ["RequestWithContentoh", "Contentoh"].includes(originTab) && currentStatus === "AA";
|
|
449
459
|
};
|
|
450
460
|
|
|
451
461
|
var canShowSaveButton = function canShowSaveButton(version_status) {
|
|
@@ -762,8 +772,7 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
762
772
|
var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(result) {
|
|
763
773
|
var _state$product$id_ord, _state$product4, _state$active_retaile2;
|
|
764
774
|
|
|
765
|
-
var concept, articleId, orderId, sectionStatusKey, evalStatus, data, retailerId,
|
|
766
|
-
|
|
775
|
+
var concept, articleId, orderId, sectionStatusKey, evalStatus, data, retailerId, res, newStatuses, serviceStatus, updatedProduct;
|
|
767
776
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
768
777
|
while (1) {
|
|
769
778
|
switch (_context3.prev = _context3.next) {
|
|
@@ -787,7 +796,7 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
787
796
|
_context3.prev = 8;
|
|
788
797
|
|
|
789
798
|
if (!result) {
|
|
790
|
-
_context3.next =
|
|
799
|
+
_context3.next = 21;
|
|
791
800
|
break;
|
|
792
801
|
}
|
|
793
802
|
|
|
@@ -803,25 +812,14 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
803
812
|
case 14:
|
|
804
813
|
res = _context3.sent;
|
|
805
814
|
newStatuses = JSON.parse(res.data.body);
|
|
806
|
-
serviceStatus = newStatuses.newServiceStatus[articleId]["".concat(concept, "Status")];
|
|
807
|
-
console.log({
|
|
808
|
-
product: state.product,
|
|
809
|
-
newStatuses: newStatuses,
|
|
810
|
-
serviceStatus: serviceStatus,
|
|
811
|
-
servicesData: state.services_data
|
|
812
|
-
}); // Actualizar el producto con los nuevos estados
|
|
815
|
+
serviceStatus = newStatuses.newServiceStatus[articleId]["".concat(concept, "Status")]; // Actualizar el producto con los nuevos estados
|
|
813
816
|
|
|
814
817
|
updatedProduct = (0, _objectSpread4.default)((0, _objectSpread4.default)({}, state.product), {}, {
|
|
815
|
-
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,
|
|
818
|
+
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, serviceStatus))))
|
|
819
|
+
});
|
|
820
|
+
console.log({
|
|
821
|
+
updatedProduct: updatedProduct
|
|
816
822
|
});
|
|
817
|
-
updatedServicesData = (_state$services_data = state.services_data) === null || _state$services_data === void 0 ? void 0 : _state$services_data.map(function (service) {
|
|
818
|
-
var _newStatuses$newStatu2;
|
|
819
|
-
|
|
820
|
-
return (0, _objectSpread4.default)((0, _objectSpread4.default)({}, service), {}, {
|
|
821
|
-
status: (service === null || service === void 0 ? void 0 : service.id_retailer) === retailerId && (service === null || service === void 0 ? void 0 : service.service) === concept ? (_newStatuses$newStatu2 = newStatuses === null || newStatuses === void 0 ? void 0 : newStatuses.newStatus) !== null && _newStatuses$newStatu2 !== void 0 ? _newStatuses$newStatu2 : serviceStatus : service === null || service === void 0 ? void 0 : service.status
|
|
822
|
-
});
|
|
823
|
-
}); // console.log({ updatedProduct });
|
|
824
|
-
|
|
825
823
|
dispatch({
|
|
826
824
|
type: "SET_PRODUCT",
|
|
827
825
|
payload: updatedProduct
|
|
@@ -837,12 +835,12 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
837
835
|
}
|
|
838
836
|
});
|
|
839
837
|
|
|
840
|
-
case
|
|
841
|
-
_context3.next =
|
|
838
|
+
case 21:
|
|
839
|
+
_context3.next = 27;
|
|
842
840
|
break;
|
|
843
841
|
|
|
844
|
-
case
|
|
845
|
-
_context3.prev =
|
|
842
|
+
case 23:
|
|
843
|
+
_context3.prev = 23;
|
|
846
844
|
_context3.t0 = _context3["catch"](8);
|
|
847
845
|
console.error("Error sending evaluation:", _context3.t0);
|
|
848
846
|
dispatch({
|
|
@@ -855,20 +853,20 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
855
853
|
}
|
|
856
854
|
});
|
|
857
855
|
|
|
858
|
-
case
|
|
859
|
-
_context3.prev =
|
|
856
|
+
case 27:
|
|
857
|
+
_context3.prev = 27;
|
|
860
858
|
dispatch({
|
|
861
859
|
type: "SET_SAVING",
|
|
862
860
|
payload: false
|
|
863
861
|
});
|
|
864
|
-
return _context3.finish(
|
|
862
|
+
return _context3.finish(27);
|
|
865
863
|
|
|
866
|
-
case
|
|
864
|
+
case 30:
|
|
867
865
|
case "end":
|
|
868
866
|
return _context3.stop();
|
|
869
867
|
}
|
|
870
868
|
}
|
|
871
|
-
}, _callee3, null, [[8,
|
|
869
|
+
}, _callee3, null, [[8, 23, 27, 30]]);
|
|
872
870
|
}));
|
|
873
871
|
|
|
874
872
|
return function sendEvaluation(_x2) {
|
|
@@ -1090,7 +1088,7 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
1090
1088
|
|
|
1091
1089
|
var handleOnEvaluateAll = /*#__PURE__*/function () {
|
|
1092
1090
|
var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(result) {
|
|
1093
|
-
var _state$product$id_ord2, _state$
|
|
1091
|
+
var _state$product$id_ord2, _state$services_data, evaluationArray, conceptArray, dataGeneral, userType, status, updatedStatusByRetailer, updatedProduct;
|
|
1094
1092
|
|
|
1095
1093
|
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
1096
1094
|
while (1) {
|
|
@@ -1110,7 +1108,7 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
1110
1108
|
isAproved: result === "A"
|
|
1111
1109
|
}; // Crear todas las evaluaciones para cada servicio y retailer
|
|
1112
1110
|
|
|
1113
|
-
(_state$
|
|
1111
|
+
(_state$services_data = state.services_data) === null || _state$services_data === void 0 ? void 0 : _state$services_data.forEach(function (ret) {
|
|
1114
1112
|
var service = ret.service,
|
|
1115
1113
|
id_retailer = ret.id_retailer;
|
|
1116
1114
|
var data = {};
|
|
@@ -1240,332 +1238,328 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
|
|
|
1240
1238
|
};
|
|
1241
1239
|
|
|
1242
1240
|
if (state.loading || !state.services || !state.product) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Loading.Loading, {});
|
|
1243
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
},
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1241
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
1242
|
+
headerTop: headerTop,
|
|
1243
|
+
children: [showVersionSelector && /*#__PURE__*/(0, _jsxRuntime.jsx)(_VersionSelector.VersionSelector, {
|
|
1244
|
+
modalId: "version-selector",
|
|
1245
|
+
articleId: state.product.id_article,
|
|
1246
|
+
setVersion: handleOnChangeProductVersion,
|
|
1247
|
+
companyName: company.company_name,
|
|
1248
|
+
currentVersion: state.product.version,
|
|
1249
|
+
setShowVersionSelector: setShowVersionSelector,
|
|
1250
|
+
jwt: token
|
|
1251
|
+
}), showModal && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProductImageModal.ProductImageModal, {
|
|
1252
|
+
images: state.images_values,
|
|
1253
|
+
setShowModal: setShowModal,
|
|
1254
|
+
approveRejectButtons: canShowValidationButtons(),
|
|
1255
|
+
sendToFacilitator: handleOnSendEvaluation
|
|
1256
|
+
}), state.modal.show && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GenericModal.GenericModal, {
|
|
1257
|
+
componentsArray: [state.modal.image && /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
1258
|
+
src: state.modal.image,
|
|
1259
|
+
alt: "modal icon"
|
|
1260
|
+
}, "1"), state.modal.title && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
1261
|
+
headerType: "retailer-name-header",
|
|
1262
|
+
text: state.modal.title,
|
|
1263
|
+
color: "white"
|
|
1264
|
+
}, "2"), state.modal.message && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
1265
|
+
headerType: "retailer-name-header",
|
|
1266
|
+
text: state.modal.message,
|
|
1267
|
+
color: "white"
|
|
1268
|
+
}, "3"), state.modal.buttons && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1269
|
+
style: {
|
|
1270
|
+
marginTop: "16px"
|
|
1271
|
+
},
|
|
1272
|
+
children: state.modal.buttons.map(function (button, index) {
|
|
1273
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
1274
|
+
buttonType: button.buttonType,
|
|
1275
|
+
label: button.text,
|
|
1276
|
+
onClick: button.action
|
|
1277
|
+
}, index);
|
|
1278
|
+
})
|
|
1279
|
+
}, "4")].filter(Boolean),
|
|
1280
|
+
onClick: function onClick() {
|
|
1281
|
+
return dispatch({
|
|
1282
|
+
type: "SET_MODAL",
|
|
1283
|
+
payload: {
|
|
1284
|
+
show: false,
|
|
1285
|
+
title: "",
|
|
1286
|
+
message: "",
|
|
1287
|
+
image: null
|
|
1288
|
+
}
|
|
1289
|
+
});
|
|
1290
|
+
}
|
|
1291
|
+
}), showRejectModal && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.Modal, {
|
|
1292
|
+
title: rejectAll ? "Agregar mensaje para rechazar todo" : "Agregar mensaje de rechazo",
|
|
1293
|
+
show: showRejectModal,
|
|
1294
|
+
customComponent: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TagAndInput, {
|
|
1295
|
+
inputType: "textarea",
|
|
1296
|
+
inputId: "modal-message-box",
|
|
1297
|
+
index: 0,
|
|
1298
|
+
color: "white"
|
|
1299
|
+
}),
|
|
1300
|
+
buttons: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
|
|
1301
|
+
type: "white",
|
|
1302
|
+
label: "Cancelar",
|
|
1303
|
+
size: 12,
|
|
1285
1304
|
onClick: function onClick() {
|
|
1286
|
-
|
|
1287
|
-
type: "SET_MODAL",
|
|
1288
|
-
payload: {
|
|
1289
|
-
show: false,
|
|
1290
|
-
title: "",
|
|
1291
|
-
message: "",
|
|
1292
|
-
image: null
|
|
1293
|
-
}
|
|
1294
|
-
});
|
|
1305
|
+
setShowRejectModal(false);
|
|
1295
1306
|
}
|
|
1296
|
-
}),
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
}, "btn-Cancelar"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
|
|
1313
|
-
type: "pink",
|
|
1314
|
-
label: "Aceptar",
|
|
1315
|
-
size: 12,
|
|
1316
|
-
onClick: /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
|
1317
|
-
var elements, isMessageEmpty, container, existingAlert, alert, fullMessage;
|
|
1318
|
-
return _regenerator.default.wrap(function _callee6$(_context6) {
|
|
1319
|
-
while (1) {
|
|
1320
|
-
switch (_context6.prev = _context6.next) {
|
|
1321
|
-
case 0:
|
|
1322
|
-
elements = document.querySelectorAll("#modal-message-box .ql-container .ql-editor > p");
|
|
1323
|
-
|
|
1324
|
-
if (!(!elements || elements.length === 0)) {
|
|
1325
|
-
_context6.next = 4;
|
|
1326
|
-
break;
|
|
1327
|
-
}
|
|
1307
|
+
}, "btn-Cancelar"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
|
|
1308
|
+
type: "pink",
|
|
1309
|
+
label: "Aceptar",
|
|
1310
|
+
size: 12,
|
|
1311
|
+
onClick: /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
|
1312
|
+
var elements, isMessageEmpty, container, existingAlert, alert, fullMessage;
|
|
1313
|
+
return _regenerator.default.wrap(function _callee6$(_context6) {
|
|
1314
|
+
while (1) {
|
|
1315
|
+
switch (_context6.prev = _context6.next) {
|
|
1316
|
+
case 0:
|
|
1317
|
+
elements = document.querySelectorAll("#modal-message-box .ql-container .ql-editor > p");
|
|
1318
|
+
|
|
1319
|
+
if (!(!elements || elements.length === 0)) {
|
|
1320
|
+
_context6.next = 4;
|
|
1321
|
+
break;
|
|
1322
|
+
}
|
|
1328
1323
|
|
|
1329
|
-
|
|
1330
|
-
|
|
1324
|
+
console.error("Elemento no encontrado");
|
|
1325
|
+
return _context6.abrupt("return");
|
|
1331
1326
|
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1327
|
+
case 4:
|
|
1328
|
+
isMessageEmpty = Array.from(elements).every(function (el) {
|
|
1329
|
+
var body = el.innerHTML;
|
|
1330
|
+
return !body || body.replace(/<.*?\/?>/gm, "").trim() === "";
|
|
1331
|
+
});
|
|
1337
1332
|
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1333
|
+
if (!isMessageEmpty) {
|
|
1334
|
+
_context6.next = 10;
|
|
1335
|
+
break;
|
|
1336
|
+
}
|
|
1342
1337
|
|
|
1343
|
-
|
|
1344
|
-
|
|
1338
|
+
container = document.querySelector(".container-customComponent");
|
|
1339
|
+
existingAlert = container.querySelector(".alert-error");
|
|
1345
1340
|
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1341
|
+
if (!existingAlert) {
|
|
1342
|
+
alert = document.createElement("div");
|
|
1343
|
+
alert.className = "alert-error";
|
|
1344
|
+
alert.style.cssText = "\n color: #d32f2f;\n background-color: #ffebee;\n border: 1px solid #ef5350;\n border-radius: 4px;\n padding: 12px 16px;\n margin-top: 10px;\n font-size: 14px;\n display: flex;\n align-items: center;\n gap: 8px;\n font-family: 'Roboto', sans-serif;\n text-align: center;\n ";
|
|
1345
|
+
alert.innerHTML = "<span>El mensaje no puede estar vac\xEDo.</span>";
|
|
1346
|
+
container.appendChild(alert);
|
|
1347
|
+
}
|
|
1353
1348
|
|
|
1354
|
-
|
|
1349
|
+
return _context6.abrupt("return");
|
|
1355
1350
|
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1351
|
+
case 10:
|
|
1352
|
+
fullMessage = Array.from(elements).map(function (element) {
|
|
1353
|
+
return element.innerHTML;
|
|
1354
|
+
}).join("").replace(/<br\s*\/?>/gi, "\n");
|
|
1355
|
+
_context6.next = 13;
|
|
1356
|
+
return createComment(fullMessage);
|
|
1362
1357
|
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1358
|
+
case 13:
|
|
1359
|
+
rejectAll ? handleOnEvaluateAll("R") : handleOnSendEvaluation("R");
|
|
1360
|
+
setShowRejectModal(false);
|
|
1366
1361
|
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
}
|
|
1362
|
+
case 15:
|
|
1363
|
+
case "end":
|
|
1364
|
+
return _context6.stop();
|
|
1371
1365
|
}
|
|
1372
|
-
}
|
|
1373
|
-
})
|
|
1374
|
-
}
|
|
1375
|
-
}
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
}
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1366
|
+
}
|
|
1367
|
+
}, _callee6);
|
|
1368
|
+
}))
|
|
1369
|
+
}, "btn-Aceptar")]
|
|
1370
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_HeaderTop.HeaderTop, {
|
|
1371
|
+
setHeaderTop: setHeaderTop,
|
|
1372
|
+
withChat: location === null || location === void 0 ? void 0 : (_location$state5 = location.state) === null || _location$state5 === void 0 ? void 0 : _location$state5.withChat,
|
|
1373
|
+
chatType: location === null || location === void 0 ? void 0 : (_location$state6 = location.state) === null || _location$state6 === void 0 ? void 0 : _location$state6.chatType,
|
|
1374
|
+
productSelected: state.product,
|
|
1375
|
+
token: token,
|
|
1376
|
+
activeRetailer: {
|
|
1377
|
+
id: (_state$active_retaile3 = state.active_retailer) === null || _state$active_retaile3 === void 0 ? void 0 : _state$active_retaile3.id_retailer,
|
|
1378
|
+
name: (_state$active_retaile4 = state.active_retailer) === null || _state$active_retaile4 === void 0 ? void 0 : _state$active_retaile4.retailer
|
|
1379
|
+
}
|
|
1380
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1381
|
+
className: "data-container",
|
|
1382
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1383
|
+
className: "image-data-panel",
|
|
1384
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ImagePreviewer.ImagePreviewer, {
|
|
1385
|
+
activeImage: (_state$images_values$2 = state.images_values.values[state.current_image]) !== null && _state$images_values$2 !== void 0 ? _state$images_values$2 : {},
|
|
1386
|
+
imagesArray: state.images_values || [],
|
|
1387
|
+
setActiveImage: handleOnChangeCurrentImage,
|
|
1388
|
+
setShowModal: handleOnShowModalGalery
|
|
1389
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageDataTable.ImageDataTable, {
|
|
1390
|
+
lists: state.images_values || [],
|
|
1391
|
+
activeImage: (_state$images_values10 = state.images_values) !== null && _state$images_values10 !== void 0 && _state$images_values10.values ? (_state$images_values11 = state.images_values) === null || _state$images_values11 === void 0 ? void 0 : _state$images_values11.values[state.current_image] : {},
|
|
1392
|
+
assignationsImages: assig,
|
|
1393
|
+
retailerSelected: (_state$active_retaile5 = state.active_retailer) === null || _state$active_retaile5 === void 0 ? void 0 : _state$active_retaile5.id_retailer,
|
|
1394
|
+
imagesStatus: ((_state$product5 = state.product) === null || _state$product5 === void 0 ? void 0 : _state$product5.images_status) || "-",
|
|
1395
|
+
isRetailer: isRetailer,
|
|
1396
|
+
setShowVersionSelector: setShowVersionSelector,
|
|
1397
|
+
version: state.product.version,
|
|
1398
|
+
setImages: handleOnChangeCurrentImage,
|
|
1399
|
+
onClickSave: handleOnClickSaveImages,
|
|
1400
|
+
setAssignation: handleOnChangeAssignations // No se usa?
|
|
1406
1401
|
|
|
1407
|
-
|
|
1408
|
-
|
|
1402
|
+
})]
|
|
1403
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1404
|
+
className: "product-information",
|
|
1405
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1409
1406
|
className: "product-information",
|
|
1410
|
-
children: /*#__PURE__*/(0, _jsxRuntime.
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1407
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_FullProductNameHeader.FullProductNameHeader, {
|
|
1408
|
+
headerData: state.product,
|
|
1409
|
+
percent: state.active_percentage.percentagesGeneral.required,
|
|
1410
|
+
activeRetailer: {
|
|
1411
|
+
id: (_state$active_retaile6 = state.active_retailer) === null || _state$active_retaile6 === void 0 ? void 0 : _state$active_retaile6.id_retailer,
|
|
1412
|
+
name: (_state$active_retaile7 = state.active_retailer) === null || _state$active_retaile7 === void 0 ? void 0 : _state$active_retaile7.retailer,
|
|
1413
|
+
image: (_state$active_retaile8 = state.active_retailer) === null || _state$active_retaile8 === void 0 ? void 0 : _state$active_retaile8.image
|
|
1414
|
+
},
|
|
1415
|
+
showValidationButtons: canShowValidationButtons(),
|
|
1416
|
+
showApproveRejectAll: canShowValidationButtons(),
|
|
1417
|
+
servicesData: state.services_data ? state.services_data : null,
|
|
1418
|
+
approveAll: handleOnApproveAll,
|
|
1419
|
+
rejectAll: handleOnRejectAll,
|
|
1420
|
+
approve: function approve() {
|
|
1421
|
+
return handleOnSendEvaluation("A");
|
|
1422
|
+
},
|
|
1423
|
+
reject: handleOnReject,
|
|
1424
|
+
setActiveRetailer: handleOnChangeActiveRetailer
|
|
1425
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FullTabsMenu.FullTabsMenu, {
|
|
1426
|
+
tabsSections: tabsSections,
|
|
1427
|
+
status: getStatusByCurrentServiceAndRetailer(),
|
|
1428
|
+
activeTab: state.active_tab,
|
|
1429
|
+
user: user,
|
|
1430
|
+
isRetailer: isRetailer,
|
|
1431
|
+
assig: assig,
|
|
1432
|
+
version: state.product.version,
|
|
1433
|
+
updatedDescriptions: state.updated_descriptions_inputs,
|
|
1434
|
+
updatedDatasheets: state.updated_datasheets_inputs,
|
|
1435
|
+
updatedImages: state.updated_images_values,
|
|
1436
|
+
images: state.services.images // actions
|
|
1437
|
+
,
|
|
1438
|
+
downloadImages: handleOnDownloadImages,
|
|
1439
|
+
askToDeleteImages: handleOnAskToDeleteImages,
|
|
1440
|
+
showSaveButton: canShowSaveButton(state.product.version_status),
|
|
1441
|
+
onClickSave: handleOnClickSave // setters
|
|
1442
|
+
,
|
|
1443
|
+
setActiveTab: handleOnChangeActiveTab,
|
|
1444
|
+
setImageLayout: handleOnSetImageLayout,
|
|
1445
|
+
setUpdatedDescriptions: handleOnSetUpdatedDescriptions,
|
|
1446
|
+
setUpdatedDatasheets: handleOnSetUpdatedDatasheets,
|
|
1447
|
+
setAssignation: handleOnSetAssignation // No se usa?
|
|
1448
|
+
,
|
|
1449
|
+
setImages: handleOnSetImages // No se usa?
|
|
1450
|
+
// setSelectedImages={handleOnSetSelectedImages} // Se pasa hasta TabsMenu, pero no se usa
|
|
1451
|
+
,
|
|
1452
|
+
setShowVersionSelector: setShowVersionSelector
|
|
1453
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1454
|
+
className: "services-information-container " + (imageLayout && state.active_tab === "Imágenes" ? "image-services" : ""),
|
|
1455
|
+
children: state.saving ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Loading.Loading, {}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
1456
|
+
children: [state.active_tab === "Descripción" && (((_state$product6 = state.product) === null || _state$product6 === void 0 ? void 0 : _state$product6.description_status) !== "NS" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputGroup.InputGroup, {
|
|
1457
|
+
activeSection: state.active_tab,
|
|
1458
|
+
inputGroup: state.descriptions_inputs[0],
|
|
1459
|
+
updatedDescriptions: state.updated_descriptions_inputs,
|
|
1460
|
+
articleId: (_state$product7 = state.product) === null || _state$product7 === void 0 ? void 0 : _state$product7.id_article,
|
|
1461
|
+
version: state.product.version,
|
|
1462
|
+
isShowbox: false,
|
|
1463
|
+
dinamicHeight: true,
|
|
1464
|
+
setUpdatedDescriptions: handleOnSetUpdatedDescriptions,
|
|
1465
|
+
updateApprovedInputs: handleOnUpdateApprovedInputs // No se usa?
|
|
1466
|
+
|
|
1467
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
1468
|
+
text: "No cuentas con este servicio",
|
|
1469
|
+
headerType: "input-name-header"
|
|
1470
|
+
})), state.active_tab === "Ficha técnica" && (((_state$product8 = state.product) === null || _state$product8 === void 0 ? void 0 : _state$product8.datasheet_status) !== "NS" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
1471
|
+
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) {
|
|
1472
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputGroup.InputGroup, {
|
|
1473
|
+
index: index,
|
|
1474
|
+
articleId: state.product.id_article,
|
|
1475
|
+
version: state.version,
|
|
1476
|
+
activeSection: state.active_tab,
|
|
1477
|
+
inputGroup: dataGroup,
|
|
1478
|
+
dataInputs: state.datasheets_inputs[1],
|
|
1479
|
+
activeRetailer: state.services.datasheets[state.active_retailer.id_retailer],
|
|
1480
|
+
groupData: state.services.datasheets[state.active_retailer.id_retailer].data,
|
|
1481
|
+
updatedDatasheets: state.updated_datasheets_inputs,
|
|
1482
|
+
setUpdatedDatasheets: handleOnSetUpdatedDatasheets,
|
|
1483
|
+
isShowbox: true,
|
|
1484
|
+
setUpdatedBoxData: function setUpdatedBoxData(e) {
|
|
1485
|
+
setBoxData(e);
|
|
1486
|
+
},
|
|
1487
|
+
updateApprovedInputs: handleOnUpdateApprovedInputs // No se usa?
|
|
1488
|
+
|
|
1489
|
+
}, index + "-" + state.active_retailer.retailer);
|
|
1490
|
+
})
|
|
1491
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
1492
|
+
text: "No cuentas con este servicio",
|
|
1493
|
+
headerType: "input-name-header"
|
|
1494
|
+
})), state.active_tab === "Imágenes" && (((_state$product9 = state.product) === null || _state$product9 === void 0 ? void 0 : _state$product9.images_status) !== "NS" ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
1495
|
+
children: [!imageLayout && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GalleryHeader.GalleryHeader, {
|
|
1496
|
+
checkAll: state.all_image_checked // Determina si el checkbox "Seleccionar todo" está marcado
|
|
1497
|
+
,
|
|
1498
|
+
setCheckAll: handleOnSetCheckAll // Toggler de true o false para el checkbox "Seleccionar todo"
|
|
1499
|
+
,
|
|
1500
|
+
setSelectedImages: handleOnSetSelectedImages
|
|
1501
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("section", {
|
|
1502
|
+
className: "container",
|
|
1503
|
+
style: {
|
|
1504
|
+
position: "relative"
|
|
1505
|
+
},
|
|
1506
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _objectSpread4.default)((0, _objectSpread4.default)({}, getRootProps({
|
|
1507
|
+
className: "dropzone ".concat(isDragActive ? "drag-active" : "")
|
|
1508
|
+
})), {}, {
|
|
1509
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", (0, _objectSpread4.default)({}, getInputProps())), isDragActive && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1510
|
+
className: "drag-overlay",
|
|
1511
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
1512
|
+
children: "Suelta las im\xE1genes aqu\xED"
|
|
1513
|
+
})
|
|
1514
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("aside", {
|
|
1515
|
+
children: thumbs()
|
|
1516
|
+
})]
|
|
1517
|
+
})), ((_state$images_values12 = state.images_values) === null || _state$images_values12 === void 0 ? void 0 : _state$images_values12.values.length) === 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1508
1518
|
style: {
|
|
1509
|
-
position: "
|
|
1519
|
+
position: "absolute",
|
|
1520
|
+
top: "50%",
|
|
1521
|
+
left: "50%",
|
|
1522
|
+
transform: "translate(-50%, -50%)",
|
|
1523
|
+
textAlign: "center",
|
|
1524
|
+
padding: "40px",
|
|
1525
|
+
width: "80%",
|
|
1526
|
+
maxWidth: "500px",
|
|
1527
|
+
fontFamily: "Arial, sans-serif"
|
|
1510
1528
|
},
|
|
1511
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.
|
|
1512
|
-
className: "dropzone ".concat(isDragActive ? "drag-active" : "")
|
|
1513
|
-
})), {}, {
|
|
1514
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", (0, _objectSpread4.default)({}, getInputProps())), isDragActive && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1515
|
-
className: "drag-overlay",
|
|
1516
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
1517
|
-
children: "Suelta las im\xE1genes aqu\xED"
|
|
1518
|
-
})
|
|
1519
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("aside", {
|
|
1520
|
-
children: thumbs()
|
|
1521
|
-
})]
|
|
1522
|
-
})), ((_state$images_values12 = state.images_values) === null || _state$images_values12 === void 0 ? void 0 : _state$images_values12.values.length) === 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1529
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
1523
1530
|
style: {
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
transform: "translate(-50%, -50%)",
|
|
1528
|
-
textAlign: "center",
|
|
1529
|
-
padding: "40px",
|
|
1530
|
-
width: "80%",
|
|
1531
|
-
maxWidth: "500px",
|
|
1532
|
-
fontFamily: "Arial, sans-serif"
|
|
1531
|
+
fontSize: "18px",
|
|
1532
|
+
color: "#666",
|
|
1533
|
+
marginBottom: "16px"
|
|
1533
1534
|
},
|
|
1534
|
-
children:
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1535
|
+
children: "Este producto no tiene im\xE1genes"
|
|
1536
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
|
|
1537
|
+
style: {
|
|
1538
|
+
fontSize: "14px",
|
|
1539
|
+
color: "#999",
|
|
1540
|
+
marginBottom: "20px"
|
|
1541
|
+
},
|
|
1542
|
+
children: ["Arrastra las im\xE1genes aqu\xED o", " ", /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
1543
|
+
onClick: open,
|
|
1542
1544
|
style: {
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1545
|
+
color: "#007bff",
|
|
1546
|
+
cursor: "pointer",
|
|
1547
|
+
textDecoration: "underline"
|
|
1546
1548
|
},
|
|
1547
|
-
children:
|
|
1548
|
-
onClick: open,
|
|
1549
|
-
style: {
|
|
1550
|
-
color: "#007bff",
|
|
1551
|
-
cursor: "pointer",
|
|
1552
|
-
textDecoration: "underline"
|
|
1553
|
-
},
|
|
1554
|
-
children: "haz clic para abrir el explorador de archivos"
|
|
1555
|
-
})]
|
|
1549
|
+
children: "haz clic para abrir el explorador de archivos"
|
|
1556
1550
|
})]
|
|
1557
1551
|
})]
|
|
1558
1552
|
})]
|
|
1559
|
-
})
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
})
|
|
1564
|
-
})
|
|
1565
|
-
})
|
|
1566
|
-
})
|
|
1553
|
+
})]
|
|
1554
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
1555
|
+
text: "No cuentas con este servicio",
|
|
1556
|
+
headerType: "input-name-header"
|
|
1557
|
+
}))]
|
|
1558
|
+
})
|
|
1559
|
+
})]
|
|
1560
|
+
})
|
|
1567
1561
|
})]
|
|
1568
|
-
})
|
|
1562
|
+
})]
|
|
1569
1563
|
});
|
|
1570
1564
|
};
|
|
1571
1565
|
|