contentoh-components-library 21.6.30 → 21.6.32
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/RetailerProductEdition/context/provider-product-edition.context.js +44 -26
- package/dist/components/pages/RetailerProductEdition/index.js +554 -172
- package/dist/components/pages/RetailerProductEdition/styles.js +5 -2
- package/dist/components/pages/RetailerProductEdition/utils.js +8 -0
- package/package.json +1 -1
- package/src/components/pages/RetailerProductEdition/context/provider-product-edition.context.jsx +22 -2
- package/src/components/pages/RetailerProductEdition/index.js +279 -2
- package/src/components/pages/RetailerProductEdition/styles.js +85 -0
- package/src/components/pages/RetailerProductEdition/utils.js +8 -0
|
@@ -73,6 +73,12 @@ var _VersionSelector = require("../../organisms/VersionSelector");
|
|
|
73
73
|
|
|
74
74
|
var _Modal = require("../../organisms/Modal");
|
|
75
75
|
|
|
76
|
+
var _LinkVariantsModal = require("../../organisms/LinkVariantsModal");
|
|
77
|
+
|
|
78
|
+
var _PropagateChangesModal = require("../../organisms/PropagateChangesModal");
|
|
79
|
+
|
|
80
|
+
var _api = require("../../organisms/LinkVariantsModal/api");
|
|
81
|
+
|
|
76
82
|
var _genericModalCheck = _interopRequireDefault(require("../../../assets/images/genericModal/genericModalCheck.svg"));
|
|
77
83
|
|
|
78
84
|
var _errorModal = _interopRequireDefault(require("../../../assets/images/genericModal/errorModal.svg"));
|
|
@@ -154,81 +160,81 @@ function regenerateVideoThumbnails(_x) {
|
|
|
154
160
|
}
|
|
155
161
|
|
|
156
162
|
function _regenerateVideoThumbnails() {
|
|
157
|
-
_regenerateVideoThumbnails = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
158
|
-
return _regenerator.default.wrap(function
|
|
163
|
+
_regenerateVideoThumbnails = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(values) {
|
|
164
|
+
return _regenerator.default.wrap(function _callee17$(_context17) {
|
|
159
165
|
while (1) {
|
|
160
|
-
switch (
|
|
166
|
+
switch (_context17.prev = _context17.next) {
|
|
161
167
|
case 0:
|
|
162
168
|
if (Array.isArray(values)) {
|
|
163
|
-
|
|
169
|
+
_context17.next = 2;
|
|
164
170
|
break;
|
|
165
171
|
}
|
|
166
172
|
|
|
167
|
-
return
|
|
173
|
+
return _context17.abrupt("return", values);
|
|
168
174
|
|
|
169
175
|
case 2:
|
|
170
|
-
return
|
|
171
|
-
var
|
|
176
|
+
return _context17.abrupt("return", Promise.all(values.map( /*#__PURE__*/function () {
|
|
177
|
+
var _ref19 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16(value) {
|
|
172
178
|
var base64, videoSrc, thumbnail;
|
|
173
|
-
return _regenerator.default.wrap(function
|
|
179
|
+
return _regenerator.default.wrap(function _callee16$(_context16) {
|
|
174
180
|
while (1) {
|
|
175
|
-
switch (
|
|
181
|
+
switch (_context16.prev = _context16.next) {
|
|
176
182
|
case 0:
|
|
177
183
|
if (!((value === null || value === void 0 ? void 0 : value.ext) !== "mp4" || !(value !== null && value !== void 0 && value.srcDB))) {
|
|
178
|
-
|
|
184
|
+
_context16.next = 2;
|
|
179
185
|
break;
|
|
180
186
|
}
|
|
181
187
|
|
|
182
|
-
return
|
|
188
|
+
return _context16.abrupt("return", value);
|
|
183
189
|
|
|
184
190
|
case 2:
|
|
185
|
-
|
|
186
|
-
|
|
191
|
+
_context16.prev = 2;
|
|
192
|
+
_context16.next = 5;
|
|
187
193
|
return convertirVideoABase64("https://" + process.env.REACT_APP_IMAGES_BUCKET + ".s3.amazonaws.com/" + value.srcDB);
|
|
188
194
|
|
|
189
195
|
case 5:
|
|
190
|
-
base64 =
|
|
196
|
+
base64 = _context16.sent;
|
|
191
197
|
videoSrc = "data:video/mp4;base64," + base64.split(",")[1];
|
|
192
|
-
|
|
198
|
+
_context16.next = 9;
|
|
193
199
|
return (0, _generateThumnail.default)(videoSrc, 2);
|
|
194
200
|
|
|
195
201
|
case 9:
|
|
196
|
-
thumbnail =
|
|
197
|
-
return
|
|
202
|
+
thumbnail = _context16.sent;
|
|
203
|
+
return _context16.abrupt("return", (0, _objectSpread5.default)((0, _objectSpread5.default)({}, value), {}, {
|
|
198
204
|
src: thumbnail
|
|
199
205
|
}));
|
|
200
206
|
|
|
201
207
|
case 13:
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
console.error("Error al generar thumbnail del video:",
|
|
205
|
-
return
|
|
208
|
+
_context16.prev = 13;
|
|
209
|
+
_context16.t0 = _context16["catch"](2);
|
|
210
|
+
console.error("Error al generar thumbnail del video:", _context16.t0);
|
|
211
|
+
return _context16.abrupt("return", value);
|
|
206
212
|
|
|
207
213
|
case 17:
|
|
208
214
|
case "end":
|
|
209
|
-
return
|
|
215
|
+
return _context16.stop();
|
|
210
216
|
}
|
|
211
217
|
}
|
|
212
|
-
},
|
|
218
|
+
}, _callee16, null, [[2, 13]]);
|
|
213
219
|
}));
|
|
214
220
|
|
|
215
|
-
return function (
|
|
216
|
-
return
|
|
221
|
+
return function (_x9) {
|
|
222
|
+
return _ref19.apply(this, arguments);
|
|
217
223
|
};
|
|
218
224
|
}())));
|
|
219
225
|
|
|
220
226
|
case 3:
|
|
221
227
|
case "end":
|
|
222
|
-
return
|
|
228
|
+
return _context17.stop();
|
|
223
229
|
}
|
|
224
230
|
}
|
|
225
|
-
},
|
|
231
|
+
}, _callee17);
|
|
226
232
|
}));
|
|
227
233
|
return _regenerateVideoThumbnails.apply(this, arguments);
|
|
228
234
|
}
|
|
229
235
|
|
|
230
236
|
var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
231
|
-
var _state$errors, _location$state, _location$state2, _state$
|
|
237
|
+
var _state$product10, _family$variants, _state$product11, _state$errors, _family$variants2, _state$product14, _state$product15, _state$product16, _state$active_retaile5, _location$state, _location$state2, _state$active_retaile6, _state$active_retaile7, _state$images_values$2, _state$images_values10, _state$images_values11, _state$product17, _state$active_retaile8, _family$variants3, _family$variants4, _state$active_percent, _state$active_percent2, _state$active_percent3, _state$active_retaile9, _state$active_retaile10, _state$active_retaile11, _state$product18, _state$product19, _state$product20, _state$datasheets_inp, _state$datasheets_inp2, _state$product21, _state$images_values12, _state$comment;
|
|
232
238
|
|
|
233
239
|
var tabsSections = _ref.tabsSections,
|
|
234
240
|
_ref$productSelected = _ref.productSelected,
|
|
@@ -304,32 +310,58 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
304
310
|
var _useState19 = (0, _react.useState)(false),
|
|
305
311
|
_useState20 = (0, _slicedToArray2.default)(_useState19, 2),
|
|
306
312
|
rejectAll = _useState20[0],
|
|
307
|
-
setRejectAll = _useState20[1];
|
|
313
|
+
setRejectAll = _useState20[1]; // Variantes: mismo comportamiento que la ficha de la aplicación de clientes.
|
|
308
314
|
|
|
309
|
-
|
|
315
|
+
|
|
316
|
+
var _useState21 = (0, _react.useState)(false),
|
|
310
317
|
_useState22 = (0, _slicedToArray2.default)(_useState21, 2),
|
|
311
|
-
|
|
312
|
-
|
|
318
|
+
showLinkVariants = _useState22[0],
|
|
319
|
+
setShowLinkVariants = _useState22[1];
|
|
313
320
|
|
|
314
|
-
var _useState23 = (0, _react.useState)(
|
|
321
|
+
var _useState23 = (0, _react.useState)(null),
|
|
315
322
|
_useState24 = (0, _slicedToArray2.default)(_useState23, 2),
|
|
316
|
-
|
|
317
|
-
|
|
323
|
+
family = _useState24[0],
|
|
324
|
+
setFamily = _useState24[1];
|
|
318
325
|
|
|
319
|
-
var _useState25 = (0, _react.useState)(
|
|
326
|
+
var _useState25 = (0, _react.useState)(false),
|
|
320
327
|
_useState26 = (0, _slicedToArray2.default)(_useState25, 2),
|
|
321
|
-
|
|
322
|
-
|
|
328
|
+
showFamily = _useState26[0],
|
|
329
|
+
setShowFamily = _useState26[1];
|
|
323
330
|
|
|
324
|
-
var _useState27 = (0, _react.useState)(
|
|
331
|
+
var _useState27 = (0, _react.useState)(null),
|
|
325
332
|
_useState28 = (0, _slicedToArray2.default)(_useState27, 2),
|
|
326
|
-
|
|
327
|
-
|
|
333
|
+
pendingPropagation = _useState28[0],
|
|
334
|
+
setPendingPropagation = _useState28[1];
|
|
328
335
|
|
|
329
336
|
var _useState29 = (0, _react.useState)(false),
|
|
330
337
|
_useState30 = (0, _slicedToArray2.default)(_useState29, 2),
|
|
331
|
-
|
|
332
|
-
|
|
338
|
+
preparandoPropagacion = _useState30[0],
|
|
339
|
+
setPreparandoPropagacion = _useState30[1];
|
|
340
|
+
|
|
341
|
+
var _useState31 = (0, _react.useState)([]),
|
|
342
|
+
_useState32 = (0, _slicedToArray2.default)(_useState31, 2),
|
|
343
|
+
auditServices = _useState32[0],
|
|
344
|
+
setAuditServices = _useState32[1];
|
|
345
|
+
|
|
346
|
+
var _useState33 = (0, _react.useState)([]),
|
|
347
|
+
_useState34 = (0, _slicedToArray2.default)(_useState33, 2),
|
|
348
|
+
auditDatasheets = _useState34[0],
|
|
349
|
+
setAuditDatasheets = _useState34[1];
|
|
350
|
+
|
|
351
|
+
var _useState35 = (0, _react.useState)([]),
|
|
352
|
+
_useState36 = (0, _slicedToArray2.default)(_useState35, 2),
|
|
353
|
+
auditDescriptions = _useState36[0],
|
|
354
|
+
setAuditDescriptions = _useState36[1];
|
|
355
|
+
|
|
356
|
+
var _useState37 = (0, _react.useState)(false),
|
|
357
|
+
_useState38 = (0, _slicedToArray2.default)(_useState37, 2),
|
|
358
|
+
showModal = _useState38[0],
|
|
359
|
+
setShowModal = _useState38[1];
|
|
360
|
+
|
|
361
|
+
var _useState39 = (0, _react.useState)(false),
|
|
362
|
+
_useState40 = (0, _slicedToArray2.default)(_useState39, 2),
|
|
363
|
+
compare = _useState40[0],
|
|
364
|
+
setCompare = _useState40[1];
|
|
333
365
|
|
|
334
366
|
var _useDropzone = (0, _reactDropzone.useDropzone)({
|
|
335
367
|
accept: "image/*, video/mp4",
|
|
@@ -465,10 +497,10 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
465
497
|
isDragActive = _useDropzone.isDragActive,
|
|
466
498
|
open = _useDropzone.open;
|
|
467
499
|
|
|
468
|
-
var
|
|
469
|
-
|
|
470
|
-
openChangeStatusModal =
|
|
471
|
-
setOpenChangeStatusModal =
|
|
500
|
+
var _useState41 = (0, _react.useState)(false),
|
|
501
|
+
_useState42 = (0, _slicedToArray2.default)(_useState41, 2),
|
|
502
|
+
openChangeStatusModal = _useState42[0],
|
|
503
|
+
setOpenChangeStatusModal = _useState42[1];
|
|
472
504
|
|
|
473
505
|
var thumbs = function thumbs() {
|
|
474
506
|
var _state$images_values, _state$images_values$, _state$images_values4, _state$images_values5, _state$images_values6, _state$images_values7, _state$images_values8, _state$images_values9;
|
|
@@ -1095,63 +1127,307 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
1095
1127
|
saveImageAttrs(token);
|
|
1096
1128
|
}
|
|
1097
1129
|
};
|
|
1130
|
+
/*
|
|
1131
|
+
Trae la familia: las variantes del producto, o sus hermanas si el abierto es
|
|
1132
|
+
una de ellas. Se pide al abrir la sección y no al montar la pantalla: la
|
|
1133
|
+
mayoría de los productos no son familia.
|
|
1134
|
+
*/
|
|
1098
1135
|
|
|
1099
|
-
|
|
1136
|
+
|
|
1137
|
+
var loadFamily = /*#__PURE__*/function () {
|
|
1100
1138
|
var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
1139
|
+
var forzar,
|
|
1140
|
+
_state$product8,
|
|
1141
|
+
res,
|
|
1142
|
+
data,
|
|
1143
|
+
_args5 = arguments;
|
|
1144
|
+
|
|
1101
1145
|
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
1102
1146
|
while (1) {
|
|
1103
1147
|
switch (_context5.prev = _context5.next) {
|
|
1104
1148
|
case 0:
|
|
1105
|
-
|
|
1106
|
-
|
|
1149
|
+
forzar = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : false;
|
|
1150
|
+
|
|
1151
|
+
if (!(family && !forzar)) {
|
|
1152
|
+
_context5.next = 3;
|
|
1153
|
+
break;
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
return _context5.abrupt("return", family);
|
|
1157
|
+
|
|
1158
|
+
case 3:
|
|
1159
|
+
_context5.prev = 3;
|
|
1160
|
+
_context5.next = 6;
|
|
1161
|
+
return _axios.default.post("".concat(process.env.REACT_APP_VARIANTS_ENDPOINT, "/family"), {
|
|
1162
|
+
articleId: (_state$product8 = state.product) === null || _state$product8 === void 0 ? void 0 : _state$product8.id_article
|
|
1163
|
+
}, {
|
|
1164
|
+
headers: {
|
|
1165
|
+
Authorization: token
|
|
1166
|
+
}
|
|
1167
|
+
});
|
|
1168
|
+
|
|
1169
|
+
case 6:
|
|
1170
|
+
res = _context5.sent;
|
|
1171
|
+
data = (0, _api.readPayload)(res);
|
|
1172
|
+
setFamily(data);
|
|
1173
|
+
return _context5.abrupt("return", data);
|
|
1174
|
+
|
|
1175
|
+
case 12:
|
|
1176
|
+
_context5.prev = 12;
|
|
1177
|
+
_context5.t0 = _context5["catch"](3);
|
|
1178
|
+
console.error("loadFamily: ", _context5.t0);
|
|
1179
|
+
setFamily({
|
|
1180
|
+
variants: [],
|
|
1181
|
+
parent: null,
|
|
1182
|
+
error: true
|
|
1183
|
+
});
|
|
1184
|
+
return _context5.abrupt("return", null);
|
|
1185
|
+
|
|
1186
|
+
case 17:
|
|
1187
|
+
case "end":
|
|
1188
|
+
return _context5.stop();
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
}, _callee5, null, [[3, 12]]);
|
|
1192
|
+
}));
|
|
1193
|
+
|
|
1194
|
+
return function loadFamily() {
|
|
1195
|
+
return _ref8.apply(this, arguments);
|
|
1196
|
+
};
|
|
1197
|
+
}();
|
|
1198
|
+
/*
|
|
1199
|
+
En Creators el parentesco se pregunta, no viene con el producto.
|
|
1200
|
+
Su listado sale del endpoint de reportes, que no trae `variantsCount` ni
|
|
1201
|
+
`parentArticleId`: esas columnas se agregaron a las vistas pero DynamoDB no
|
|
1202
|
+
las tiene hasta que se corra el recorrido de datos. Y aunque las tuviera,
|
|
1203
|
+
dependería de lo actualizado que esté ese recorrido.
|
|
1204
|
+
Preguntar a `family` cuesta una llamada por ficha y da el dato de la base, no
|
|
1205
|
+
de una copia. Además aplica el alcance del perfil (§5.1): al equipo interno le
|
|
1206
|
+
devuelve los productos solicitados a ContentOh, que es justo lo que puede
|
|
1207
|
+
tocar.
|
|
1208
|
+
*/
|
|
1209
|
+
|
|
1210
|
+
|
|
1211
|
+
(0, _react.useEffect)(function () {
|
|
1212
|
+
var _state$product9;
|
|
1213
|
+
|
|
1214
|
+
if (!((_state$product9 = state.product) !== null && _state$product9 !== void 0 && _state$product9.id_article)) return;
|
|
1215
|
+
loadFamily(true); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1216
|
+
}, [(_state$product10 = state.product) === null || _state$product10 === void 0 ? void 0 : _state$product10.id_article]); // El conteo sale de la familia recién consultada, no del producto.
|
|
1217
|
+
|
|
1218
|
+
var variantesDelProducto = family !== null && family !== void 0 && family.error ? 0 : ((_family$variants = family === null || family === void 0 ? void 0 : family.variants) !== null && _family$variants !== void 0 ? _family$variants : []).filter(function (v) {
|
|
1219
|
+
return !v.isCurrent;
|
|
1220
|
+
}).length;
|
|
1221
|
+
var esVarianteDeOtro = family !== null && family !== void 0 && family.error ? !!((_state$product11 = state.product) !== null && _state$product11 !== void 0 && _state$product11.parentArticleId) : !!(family !== null && family !== void 0 && family.parent);
|
|
1222
|
+
/*
|
|
1223
|
+
En Creators la lista de familia es INFORMATIVA: no se salta a otra variante.
|
|
1224
|
+
Saltar exige precargar el producto destino, y el endpoint que hace eso en la
|
|
1225
|
+
aplicación de clientes —read-articles-v2— filtra por la compañía del usuario:
|
|
1226
|
+
`AND a.company_id = <la del usuario>`. El equipo interno pertenece a ContentOh
|
|
1227
|
+
y trabaja productos de sus clientes, así que ahí no devuelve nada.
|
|
1228
|
+
Navegar sin precargar sería peor que no ofrecerlo: esta pantalla lee el
|
|
1229
|
+
producto de sessionStorage, así que cambiaría la URL y seguiría mostrando el
|
|
1230
|
+
producto anterior, dando a entender que se cambió de variante cuando no.
|
|
1231
|
+
Para habilitarlo hace falta una forma de traer un producto por id sin filtro
|
|
1232
|
+
de compañía, respetando el alcance del perfil interno (§5.1 del contrato).
|
|
1233
|
+
*/
|
|
1234
|
+
|
|
1235
|
+
/*
|
|
1236
|
+
Refresca tras ligar, sin recargar: el producto sale de sessionStorage, así que
|
|
1237
|
+
un refresh devolvería el mismo objeto y el contador seguiría igual.
|
|
1238
|
+
*/
|
|
1239
|
+
|
|
1240
|
+
var handleOnLinkedVariants = function handleOnLinkedVariants(result) {
|
|
1241
|
+
var _state$product$varian, _state$product12, _result$linked, _result$parentArticle;
|
|
1242
|
+
|
|
1243
|
+
if (!result) return;
|
|
1244
|
+
var updatedProduct = result.mode === "children" ? (0, _objectSpread5.default)((0, _objectSpread5.default)({}, state.product), {}, {
|
|
1245
|
+
variantsCount: ((_state$product$varian = (_state$product12 = state.product) === null || _state$product12 === void 0 ? void 0 : _state$product12.variantsCount) !== null && _state$product$varian !== void 0 ? _state$product$varian : 0) + ((_result$linked = result.linked) !== null && _result$linked !== void 0 ? _result$linked : []).length
|
|
1246
|
+
}) : (0, _objectSpread5.default)((0, _objectSpread5.default)({}, state.product), {}, {
|
|
1247
|
+
parentArticleId: (_result$parentArticle = result.parentArticleId) !== null && _result$parentArticle !== void 0 ? _result$parentArticle : null,
|
|
1248
|
+
variantsCount: 0
|
|
1249
|
+
});
|
|
1250
|
+
dispatch({
|
|
1251
|
+
type: "SET_PRODUCT",
|
|
1252
|
+
payload: updatedProduct
|
|
1253
|
+
});
|
|
1254
|
+
setFamily(null);
|
|
1255
|
+
|
|
1256
|
+
try {
|
|
1257
|
+
sessionStorage.setItem("productSelected", JSON.stringify(updatedProduct));
|
|
1258
|
+
} catch (error) {
|
|
1259
|
+
console.error("linkVariants/sessionStorage: ", error);
|
|
1260
|
+
}
|
|
1261
|
+
};
|
|
1262
|
+
/*
|
|
1263
|
+
Acción "Volver a heredar" de los chips. Repinta en sitio con lo que devuelve
|
|
1264
|
+
el endpoint: recargar la ficha se llevaría lo que haya sin guardar.
|
|
1265
|
+
*/
|
|
1266
|
+
|
|
1267
|
+
|
|
1268
|
+
var handleOnRestoreInheritance = /*#__PURE__*/function () {
|
|
1269
|
+
var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(attributeId) {
|
|
1270
|
+
var _state$product13;
|
|
1271
|
+
|
|
1272
|
+
var res, data;
|
|
1273
|
+
return _regenerator.default.wrap(function _callee6$(_context6) {
|
|
1274
|
+
while (1) {
|
|
1275
|
+
switch (_context6.prev = _context6.next) {
|
|
1276
|
+
case 0:
|
|
1277
|
+
if (!(!attributeId || !((_state$product13 = state.product) !== null && _state$product13 !== void 0 && _state$product13.id_article))) {
|
|
1278
|
+
_context6.next = 2;
|
|
1279
|
+
break;
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
return _context6.abrupt("return");
|
|
1283
|
+
|
|
1284
|
+
case 2:
|
|
1285
|
+
_context6.prev = 2;
|
|
1286
|
+
_context6.next = 5;
|
|
1287
|
+
return _axios.default.post("".concat(process.env.REACT_APP_VARIANTS_ENDPOINT, "/restore"), {
|
|
1288
|
+
articleId: state.product.id_article,
|
|
1289
|
+
attributes: [Number(attributeId)]
|
|
1290
|
+
}, {
|
|
1291
|
+
headers: {
|
|
1292
|
+
Authorization: token
|
|
1293
|
+
}
|
|
1294
|
+
});
|
|
1295
|
+
|
|
1296
|
+
case 5:
|
|
1297
|
+
res = _context6.sent;
|
|
1298
|
+
data = (0, _api.readPayload)(res);
|
|
1299
|
+
dispatch({
|
|
1300
|
+
type: "UPDATE_DATASHEETS_INPUTS",
|
|
1301
|
+
payload: (data.values || []).map(function (item) {
|
|
1302
|
+
return {
|
|
1303
|
+
attributeId: item.id,
|
|
1304
|
+
value: item.value,
|
|
1305
|
+
isOverridden: 0
|
|
1306
|
+
};
|
|
1307
|
+
})
|
|
1308
|
+
});
|
|
1309
|
+
_context6.next = 13;
|
|
1310
|
+
break;
|
|
1311
|
+
|
|
1312
|
+
case 10:
|
|
1313
|
+
_context6.prev = 10;
|
|
1314
|
+
_context6.t0 = _context6["catch"](2);
|
|
1315
|
+
console.error("restoreInheritance: ", _context6.t0);
|
|
1316
|
+
|
|
1317
|
+
case 13:
|
|
1318
|
+
case "end":
|
|
1319
|
+
return _context6.stop();
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
}, _callee6, null, [[2, 10]]);
|
|
1323
|
+
}));
|
|
1324
|
+
|
|
1325
|
+
return function handleOnRestoreInheritance(_x3) {
|
|
1326
|
+
return _ref9.apply(this, arguments);
|
|
1327
|
+
};
|
|
1328
|
+
}();
|
|
1329
|
+
/*
|
|
1330
|
+
Los atributos recién tocados, con el nombre que ve el usuario:
|
|
1331
|
+
`updated_datasheets_inputs` solo trae { attributeId, value }.
|
|
1332
|
+
*/
|
|
1333
|
+
|
|
1334
|
+
|
|
1335
|
+
var cambiosDeFichaTecnica = function cambiosDeFichaTecnica() {
|
|
1336
|
+
var _state$active_retaile3, _state$services$datas, _state$services, _state$services$datas2, _state$updated_datash;
|
|
1337
|
+
|
|
1338
|
+
var retailerId = (_state$active_retaile3 = state.active_retailer) === null || _state$active_retaile3 === void 0 ? void 0 : _state$active_retaile3.id_retailer;
|
|
1339
|
+
var inputs = (_state$services$datas = (_state$services = state.services) === null || _state$services === void 0 ? void 0 : (_state$services$datas2 = _state$services.datasheets) === null || _state$services$datas2 === void 0 ? void 0 : _state$services$datas2.inputs) !== null && _state$services$datas !== void 0 ? _state$services$datas : {};
|
|
1340
|
+
return ((_state$updated_datash = state.updated_datasheets_inputs) !== null && _state$updated_datash !== void 0 ? _state$updated_datash : []).map(function (item) {
|
|
1341
|
+
var _input$name;
|
|
1342
|
+
|
|
1343
|
+
var input = inputs["".concat(item.attributeId, "_").concat(retailerId)];
|
|
1344
|
+
return {
|
|
1345
|
+
id: Number(item.attributeId),
|
|
1346
|
+
name: (_input$name = input === null || input === void 0 ? void 0 : input.name) !== null && _input$name !== void 0 ? _input$name : "Atributo ".concat(item.attributeId),
|
|
1347
|
+
value: item.value
|
|
1348
|
+
};
|
|
1349
|
+
});
|
|
1350
|
+
};
|
|
1351
|
+
|
|
1352
|
+
var handleOnClickSave = /*#__PURE__*/function () {
|
|
1353
|
+
var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
|
1354
|
+
var esPadre, cambios;
|
|
1355
|
+
return _regenerator.default.wrap(function _callee7$(_context7) {
|
|
1356
|
+
while (1) {
|
|
1357
|
+
switch (_context7.prev = _context7.next) {
|
|
1358
|
+
case 0:
|
|
1359
|
+
if (!(state.saving || preparandoPropagacion)) {
|
|
1360
|
+
_context7.next = 2;
|
|
1107
1361
|
break;
|
|
1108
1362
|
}
|
|
1109
1363
|
|
|
1110
|
-
return
|
|
1364
|
+
return _context7.abrupt("return");
|
|
1111
1365
|
|
|
1112
1366
|
case 2:
|
|
1113
|
-
|
|
1114
|
-
|
|
1367
|
+
_context7.t0 = state.active_tab;
|
|
1368
|
+
_context7.next = _context7.t0 === "Descripción" ? 5 : _context7.t0 === "Ficha técnica" ? 8 : _context7.t0 === "Imágenes" ? 17 : 20;
|
|
1115
1369
|
break;
|
|
1116
1370
|
|
|
1117
1371
|
case 5:
|
|
1118
|
-
|
|
1372
|
+
_context7.next = 7;
|
|
1119
1373
|
return saveDescriptions(token);
|
|
1120
1374
|
|
|
1121
1375
|
case 7:
|
|
1122
|
-
return
|
|
1376
|
+
return _context7.abrupt("break", 21);
|
|
1123
1377
|
|
|
1124
1378
|
case 8:
|
|
1125
|
-
|
|
1379
|
+
// Guardar un padre con variantes abre la decisión de propagar. Sin este
|
|
1380
|
+
// paso el cambio se queda solo en el padre y las variantes se van
|
|
1381
|
+
// separando de él sin que nadie lo note.
|
|
1382
|
+
esPadre = variantesDelProducto > 0;
|
|
1383
|
+
cambios = cambiosDeFichaTecnica();
|
|
1384
|
+
|
|
1385
|
+
if (!(esPadre && cambios.length > 0)) {
|
|
1386
|
+
_context7.next = 14;
|
|
1387
|
+
break;
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
setPreparandoPropagacion(true);
|
|
1391
|
+
loadFamily().then(function () {
|
|
1392
|
+
return setPendingPropagation({
|
|
1393
|
+
cambios: cambios
|
|
1394
|
+
});
|
|
1395
|
+
}).finally(function () {
|
|
1396
|
+
return setPreparandoPropagacion(false);
|
|
1397
|
+
});
|
|
1398
|
+
return _context7.abrupt("return");
|
|
1399
|
+
|
|
1400
|
+
case 14:
|
|
1401
|
+
_context7.next = 16;
|
|
1126
1402
|
return saveDatasheets(token);
|
|
1127
1403
|
|
|
1128
|
-
case
|
|
1129
|
-
return
|
|
1404
|
+
case 16:
|
|
1405
|
+
return _context7.abrupt("break", 21);
|
|
1130
1406
|
|
|
1131
|
-
case
|
|
1132
|
-
|
|
1407
|
+
case 17:
|
|
1408
|
+
_context7.next = 19;
|
|
1133
1409
|
return updateImages(token);
|
|
1134
1410
|
|
|
1135
|
-
case
|
|
1136
|
-
return
|
|
1411
|
+
case 19:
|
|
1412
|
+
return _context7.abrupt("break", 21);
|
|
1137
1413
|
|
|
1138
|
-
case
|
|
1139
|
-
return
|
|
1414
|
+
case 20:
|
|
1415
|
+
return _context7.abrupt("break", 21);
|
|
1140
1416
|
|
|
1141
|
-
case
|
|
1142
|
-
|
|
1417
|
+
case 21:
|
|
1418
|
+
_context7.next = 23;
|
|
1143
1419
|
return loadData(false);
|
|
1144
1420
|
|
|
1145
|
-
case
|
|
1421
|
+
case 23:
|
|
1146
1422
|
case "end":
|
|
1147
|
-
return
|
|
1423
|
+
return _context7.stop();
|
|
1148
1424
|
}
|
|
1149
1425
|
}
|
|
1150
|
-
},
|
|
1426
|
+
}, _callee7);
|
|
1151
1427
|
}));
|
|
1152
1428
|
|
|
1153
1429
|
return function handleOnClickSave() {
|
|
1154
|
-
return
|
|
1430
|
+
return _ref10.apply(this, arguments);
|
|
1155
1431
|
};
|
|
1156
1432
|
}();
|
|
1157
1433
|
|
|
@@ -1219,24 +1495,24 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
1219
1495
|
};
|
|
1220
1496
|
|
|
1221
1497
|
var handleOnApproveSingleService = /*#__PURE__*/function () {
|
|
1222
|
-
var
|
|
1223
|
-
return _regenerator.default.wrap(function
|
|
1498
|
+
var _ref11 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
|
|
1499
|
+
return _regenerator.default.wrap(function _callee8$(_context8) {
|
|
1224
1500
|
while (1) {
|
|
1225
|
-
switch (
|
|
1501
|
+
switch (_context8.prev = _context8.next) {
|
|
1226
1502
|
case 0:
|
|
1227
|
-
|
|
1503
|
+
_context8.next = 2;
|
|
1228
1504
|
return sendSingleEvaluation("A");
|
|
1229
1505
|
|
|
1230
1506
|
case 2:
|
|
1231
1507
|
case "end":
|
|
1232
|
-
return
|
|
1508
|
+
return _context8.stop();
|
|
1233
1509
|
}
|
|
1234
1510
|
}
|
|
1235
|
-
},
|
|
1511
|
+
}, _callee8);
|
|
1236
1512
|
}));
|
|
1237
1513
|
|
|
1238
1514
|
return function handleOnApproveSingleService() {
|
|
1239
|
-
return
|
|
1515
|
+
return _ref11.apply(this, arguments);
|
|
1240
1516
|
};
|
|
1241
1517
|
}();
|
|
1242
1518
|
|
|
@@ -1245,21 +1521,21 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
1245
1521
|
};
|
|
1246
1522
|
|
|
1247
1523
|
var sendSingleEvaluation = /*#__PURE__*/function () {
|
|
1248
|
-
var
|
|
1249
|
-
var _state$product$id_ord, _state$
|
|
1524
|
+
var _ref12 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(result) {
|
|
1525
|
+
var _state$product$id_ord, _state$active_retaile4;
|
|
1250
1526
|
|
|
1251
1527
|
var concept, articleId, orderId, sectionStatusKey, evalStatus, retailerId, data, res, message, icon, activeTab, newStatuses, serviceStatus, articleStatus, updatedStatusByRetailer, updatedProduct, specialistDone, _objectSpread2, _state$services_data2, _JSON$parse2, newStatus, newOrderStatus, newArticleStatus, _articleStatus, updatedStatusByRetailerForSend, _updatedProduct, updatedServicesData, sessionProduct, _objectSpread3, productInSession, updatedProductInSession;
|
|
1252
1528
|
|
|
1253
|
-
return _regenerator.default.wrap(function
|
|
1529
|
+
return _regenerator.default.wrap(function _callee9$(_context9) {
|
|
1254
1530
|
while (1) {
|
|
1255
|
-
switch (
|
|
1531
|
+
switch (_context9.prev = _context9.next) {
|
|
1256
1532
|
case 0:
|
|
1257
1533
|
if (!state.saving) {
|
|
1258
|
-
|
|
1534
|
+
_context9.next = 2;
|
|
1259
1535
|
break;
|
|
1260
1536
|
}
|
|
1261
1537
|
|
|
1262
|
-
return
|
|
1538
|
+
return _context9.abrupt("return");
|
|
1263
1539
|
|
|
1264
1540
|
case 2:
|
|
1265
1541
|
dispatch({
|
|
@@ -1271,7 +1547,7 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
1271
1547
|
orderId = (_state$product$id_ord = state.product.id_order) !== null && _state$product$id_ord !== void 0 ? _state$product$id_ord : state.product.orderId;
|
|
1272
1548
|
sectionStatusKey = "".concat(concept, "_status");
|
|
1273
1549
|
evalStatus = state.product[sectionStatusKey];
|
|
1274
|
-
retailerId = (_state$
|
|
1550
|
+
retailerId = (_state$active_retaile4 = state.active_retailer) === null || _state$active_retaile4 === void 0 ? void 0 : _state$active_retaile4.id_retailer;
|
|
1275
1551
|
data = {
|
|
1276
1552
|
articleId: articleId,
|
|
1277
1553
|
orderId: orderId,
|
|
@@ -1280,16 +1556,16 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
1280
1556
|
retailerId: retailerId
|
|
1281
1557
|
};
|
|
1282
1558
|
activeTab = state.active_tab;
|
|
1283
|
-
|
|
1559
|
+
_context9.prev = 11;
|
|
1284
1560
|
|
|
1285
1561
|
if (!result) {
|
|
1286
|
-
|
|
1562
|
+
_context9.next = 28;
|
|
1287
1563
|
break;
|
|
1288
1564
|
}
|
|
1289
1565
|
|
|
1290
1566
|
data.result = result;
|
|
1291
1567
|
data.retailerId = retailerId;
|
|
1292
|
-
|
|
1568
|
+
_context9.next = 17;
|
|
1293
1569
|
return _axios.default.put("".concat(process.env.REACT_APP_EVALUATION_ENDPOINT), data, {
|
|
1294
1570
|
headers: {
|
|
1295
1571
|
Authorization: token
|
|
@@ -1297,7 +1573,7 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
1297
1573
|
});
|
|
1298
1574
|
|
|
1299
1575
|
case 17:
|
|
1300
|
-
res =
|
|
1576
|
+
res = _context9.sent;
|
|
1301
1577
|
newStatuses = JSON.parse(res.data.body);
|
|
1302
1578
|
serviceStatus = newStatuses.newServiceStatus[articleId]["".concat(concept, "Status")];
|
|
1303
1579
|
articleStatus = newStatuses.newArticleStatus[articleId];
|
|
@@ -1328,7 +1604,7 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
1328
1604
|
image: _genericModalCheck.default
|
|
1329
1605
|
}
|
|
1330
1606
|
});
|
|
1331
|
-
|
|
1607
|
+
_context9.next = 33;
|
|
1332
1608
|
break;
|
|
1333
1609
|
|
|
1334
1610
|
case 28:
|
|
@@ -1344,7 +1620,7 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
1344
1620
|
icon = _genericModalCheck.default;
|
|
1345
1621
|
}
|
|
1346
1622
|
|
|
1347
|
-
|
|
1623
|
+
_context9.next = 32;
|
|
1348
1624
|
return _axios.default.put("".concat(process.env.REACT_APP_SEND_EVAL), data, {
|
|
1349
1625
|
headers: {
|
|
1350
1626
|
Authorization: token
|
|
@@ -1352,7 +1628,7 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
1352
1628
|
});
|
|
1353
1629
|
|
|
1354
1630
|
case 32:
|
|
1355
|
-
res =
|
|
1631
|
+
res = _context9.sent;
|
|
1356
1632
|
|
|
1357
1633
|
case 33:
|
|
1358
1634
|
if (res.data.statusCode === 200) {
|
|
@@ -1437,13 +1713,13 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
1437
1713
|
});
|
|
1438
1714
|
}
|
|
1439
1715
|
|
|
1440
|
-
|
|
1716
|
+
_context9.next = 40;
|
|
1441
1717
|
break;
|
|
1442
1718
|
|
|
1443
1719
|
case 36:
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
console.error("Error sending evaluation:",
|
|
1720
|
+
_context9.prev = 36;
|
|
1721
|
+
_context9.t0 = _context9["catch"](11);
|
|
1722
|
+
console.error("Error sending evaluation:", _context9.t0);
|
|
1447
1723
|
dispatch({
|
|
1448
1724
|
type: "SET_MODAL",
|
|
1449
1725
|
payload: {
|
|
@@ -1455,45 +1731,45 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
1455
1731
|
});
|
|
1456
1732
|
|
|
1457
1733
|
case 40:
|
|
1458
|
-
|
|
1734
|
+
_context9.prev = 40;
|
|
1459
1735
|
dispatch({
|
|
1460
1736
|
type: "SET_SAVING",
|
|
1461
1737
|
payload: false
|
|
1462
1738
|
});
|
|
1463
|
-
return
|
|
1739
|
+
return _context9.finish(40);
|
|
1464
1740
|
|
|
1465
1741
|
case 43:
|
|
1466
1742
|
case "end":
|
|
1467
|
-
return
|
|
1743
|
+
return _context9.stop();
|
|
1468
1744
|
}
|
|
1469
1745
|
}
|
|
1470
|
-
},
|
|
1746
|
+
}, _callee9, null, [[11, 36, 40, 43]]);
|
|
1471
1747
|
}));
|
|
1472
1748
|
|
|
1473
|
-
return function sendSingleEvaluation(
|
|
1474
|
-
return
|
|
1749
|
+
return function sendSingleEvaluation(_x4) {
|
|
1750
|
+
return _ref12.apply(this, arguments);
|
|
1475
1751
|
};
|
|
1476
1752
|
}();
|
|
1477
1753
|
|
|
1478
1754
|
var handleOnApproveAllServices = /*#__PURE__*/function () {
|
|
1479
|
-
var
|
|
1480
|
-
return _regenerator.default.wrap(function
|
|
1755
|
+
var _ref13 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {
|
|
1756
|
+
return _regenerator.default.wrap(function _callee10$(_context10) {
|
|
1481
1757
|
while (1) {
|
|
1482
|
-
switch (
|
|
1758
|
+
switch (_context10.prev = _context10.next) {
|
|
1483
1759
|
case 0:
|
|
1484
|
-
|
|
1760
|
+
_context10.next = 2;
|
|
1485
1761
|
return sendBulkEvaluation("A");
|
|
1486
1762
|
|
|
1487
1763
|
case 2:
|
|
1488
1764
|
case "end":
|
|
1489
|
-
return
|
|
1765
|
+
return _context10.stop();
|
|
1490
1766
|
}
|
|
1491
1767
|
}
|
|
1492
|
-
},
|
|
1768
|
+
}, _callee10);
|
|
1493
1769
|
}));
|
|
1494
1770
|
|
|
1495
1771
|
return function handleOnApproveAllServices() {
|
|
1496
|
-
return
|
|
1772
|
+
return _ref13.apply(this, arguments);
|
|
1497
1773
|
};
|
|
1498
1774
|
}();
|
|
1499
1775
|
|
|
@@ -1503,18 +1779,18 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
1503
1779
|
};
|
|
1504
1780
|
|
|
1505
1781
|
var sendBulkEvaluation = /*#__PURE__*/function () {
|
|
1506
|
-
var
|
|
1782
|
+
var _ref14 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(result) {
|
|
1507
1783
|
var _state$services_data3, evaluationArray, conceptArray, status, updatedStatusByRetailer, updatedProduct, updatedServicesData;
|
|
1508
1784
|
|
|
1509
|
-
return _regenerator.default.wrap(function
|
|
1785
|
+
return _regenerator.default.wrap(function _callee11$(_context11) {
|
|
1510
1786
|
while (1) {
|
|
1511
|
-
switch (
|
|
1787
|
+
switch (_context11.prev = _context11.next) {
|
|
1512
1788
|
case 0:
|
|
1513
1789
|
dispatch({
|
|
1514
1790
|
type: "SET_SAVING",
|
|
1515
1791
|
payload: true
|
|
1516
1792
|
});
|
|
1517
|
-
|
|
1793
|
+
_context11.prev = 1;
|
|
1518
1794
|
evaluationArray = [];
|
|
1519
1795
|
conceptArray = (0, _utils.getConceptsByRole)(user.id_role);
|
|
1520
1796
|
(_state$services_data3 = state.services_data) === null || _state$services_data3 === void 0 ? void 0 : _state$services_data3.forEach(function (ret, idx) {
|
|
@@ -1539,7 +1815,7 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
1539
1815
|
}));
|
|
1540
1816
|
}
|
|
1541
1817
|
});
|
|
1542
|
-
|
|
1818
|
+
_context11.next = 7;
|
|
1543
1819
|
return Promise.all(evaluationArray);
|
|
1544
1820
|
|
|
1545
1821
|
case 7:
|
|
@@ -1594,41 +1870,41 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
1594
1870
|
image: _genericModalCheck.default
|
|
1595
1871
|
}
|
|
1596
1872
|
});
|
|
1597
|
-
|
|
1873
|
+
_context11.next = 19;
|
|
1598
1874
|
break;
|
|
1599
1875
|
|
|
1600
1876
|
case 16:
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
console.error("Error in bulk evaluation:",
|
|
1877
|
+
_context11.prev = 16;
|
|
1878
|
+
_context11.t0 = _context11["catch"](1);
|
|
1879
|
+
console.error("Error in bulk evaluation:", _context11.t0);
|
|
1604
1880
|
|
|
1605
1881
|
case 19:
|
|
1606
|
-
|
|
1882
|
+
_context11.prev = 19;
|
|
1607
1883
|
dispatch({
|
|
1608
1884
|
type: "SET_SAVING",
|
|
1609
1885
|
payload: false
|
|
1610
1886
|
});
|
|
1611
|
-
return
|
|
1887
|
+
return _context11.finish(19);
|
|
1612
1888
|
|
|
1613
1889
|
case 22:
|
|
1614
1890
|
case "end":
|
|
1615
|
-
return
|
|
1891
|
+
return _context11.stop();
|
|
1616
1892
|
}
|
|
1617
1893
|
}
|
|
1618
|
-
},
|
|
1894
|
+
}, _callee11, null, [[1, 16, 19, 22]]);
|
|
1619
1895
|
}));
|
|
1620
1896
|
|
|
1621
|
-
return function sendBulkEvaluation(
|
|
1622
|
-
return
|
|
1897
|
+
return function sendBulkEvaluation(_x5) {
|
|
1898
|
+
return _ref14.apply(this, arguments);
|
|
1623
1899
|
};
|
|
1624
1900
|
}();
|
|
1625
1901
|
|
|
1626
1902
|
var handleOnChangeAssignations = /*#__PURE__*/function () {
|
|
1627
|
-
var
|
|
1903
|
+
var _ref15 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12(assignationType, assignationId) {
|
|
1628
1904
|
var concept, data, updatedProduct;
|
|
1629
|
-
return _regenerator.default.wrap(function
|
|
1905
|
+
return _regenerator.default.wrap(function _callee12$(_context12) {
|
|
1630
1906
|
while (1) {
|
|
1631
|
-
switch (
|
|
1907
|
+
switch (_context12.prev = _context12.next) {
|
|
1632
1908
|
case 0:
|
|
1633
1909
|
concept = (0, _utils.getConceptByTab)(state.active_tab);
|
|
1634
1910
|
data = {
|
|
@@ -1639,7 +1915,7 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
1639
1915
|
concept: concept,
|
|
1640
1916
|
userId: assignationId
|
|
1641
1917
|
};
|
|
1642
|
-
|
|
1918
|
+
_context12.next = 4;
|
|
1643
1919
|
return (0, _axios.default)({
|
|
1644
1920
|
method: "post",
|
|
1645
1921
|
url: process.env.REACT_APP_ASSIGNATIONS_ENDPOINT,
|
|
@@ -1658,14 +1934,14 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
1658
1934
|
|
|
1659
1935
|
case 6:
|
|
1660
1936
|
case "end":
|
|
1661
|
-
return
|
|
1937
|
+
return _context12.stop();
|
|
1662
1938
|
}
|
|
1663
1939
|
}
|
|
1664
|
-
},
|
|
1940
|
+
}, _callee12);
|
|
1665
1941
|
}));
|
|
1666
1942
|
|
|
1667
|
-
return function handleOnChangeAssignations(
|
|
1668
|
-
return
|
|
1943
|
+
return function handleOnChangeAssignations(_x6, _x7) {
|
|
1944
|
+
return _ref15.apply(this, arguments);
|
|
1669
1945
|
};
|
|
1670
1946
|
}();
|
|
1671
1947
|
|
|
@@ -1700,16 +1976,16 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
1700
1976
|
};
|
|
1701
1977
|
|
|
1702
1978
|
var handleOnSubmitComment = /*#__PURE__*/function () {
|
|
1703
|
-
var
|
|
1979
|
+
var _ref16 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13(e) {
|
|
1704
1980
|
var commentText;
|
|
1705
|
-
return _regenerator.default.wrap(function
|
|
1981
|
+
return _regenerator.default.wrap(function _callee13$(_context13) {
|
|
1706
1982
|
while (1) {
|
|
1707
|
-
switch (
|
|
1983
|
+
switch (_context13.prev = _context13.next) {
|
|
1708
1984
|
case 0:
|
|
1709
1985
|
e.preventDefault();
|
|
1710
1986
|
commentText = document.querySelector("#commentary-box .ql-container .ql-editor > p").innerHTML;
|
|
1711
|
-
|
|
1712
|
-
|
|
1987
|
+
_context13.prev = 2;
|
|
1988
|
+
_context13.next = 5;
|
|
1713
1989
|
return createComment(commentText, token);
|
|
1714
1990
|
|
|
1715
1991
|
case 5:
|
|
@@ -1722,13 +1998,13 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
1722
1998
|
image: _genericModalCheck.default
|
|
1723
1999
|
}
|
|
1724
2000
|
});
|
|
1725
|
-
|
|
2001
|
+
_context13.next = 12;
|
|
1726
2002
|
break;
|
|
1727
2003
|
|
|
1728
2004
|
case 8:
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
console.error("Error saving comment:",
|
|
2005
|
+
_context13.prev = 8;
|
|
2006
|
+
_context13.t0 = _context13["catch"](2);
|
|
2007
|
+
console.error("Error saving comment:", _context13.t0);
|
|
1732
2008
|
dispatch({
|
|
1733
2009
|
type: "SET_MODAL",
|
|
1734
2010
|
payload: {
|
|
@@ -1741,14 +2017,14 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
1741
2017
|
|
|
1742
2018
|
case 12:
|
|
1743
2019
|
case "end":
|
|
1744
|
-
return
|
|
2020
|
+
return _context13.stop();
|
|
1745
2021
|
}
|
|
1746
2022
|
}
|
|
1747
|
-
},
|
|
2023
|
+
}, _callee13, null, [[2, 8]]);
|
|
1748
2024
|
}));
|
|
1749
2025
|
|
|
1750
|
-
return function handleOnSubmitComment(
|
|
1751
|
-
return
|
|
2026
|
+
return function handleOnSubmitComment(_x8) {
|
|
2027
|
+
return _ref16.apply(this, arguments);
|
|
1752
2028
|
};
|
|
1753
2029
|
}();
|
|
1754
2030
|
|
|
@@ -2069,7 +2345,30 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
2069
2345
|
state: state,
|
|
2070
2346
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
2071
2347
|
headerTop: headerTop,
|
|
2072
|
-
children: [
|
|
2348
|
+
children: [pendingPropagation && /*#__PURE__*/(0, _jsxRuntime.jsx)(_PropagateChangesModal.PropagateChangesModal, {
|
|
2349
|
+
changedAttributes: pendingPropagation.cambios,
|
|
2350
|
+
variants: ((_family$variants2 = family === null || family === void 0 ? void 0 : family.variants) !== null && _family$variants2 !== void 0 ? _family$variants2 : []).filter(function (v) {
|
|
2351
|
+
return !v.isCurrent;
|
|
2352
|
+
}),
|
|
2353
|
+
saving: state.saving,
|
|
2354
|
+
onCancel: function onCancel() {
|
|
2355
|
+
return setPendingPropagation(null);
|
|
2356
|
+
},
|
|
2357
|
+
onConfirm: function onConfirm(propagation) {
|
|
2358
|
+
setPendingPropagation(null);
|
|
2359
|
+
saveDatasheets(token, propagation !== null && propagation !== void 0 ? propagation : undefined);
|
|
2360
|
+
}
|
|
2361
|
+
}), showLinkVariants && /*#__PURE__*/(0, _jsxRuntime.jsx)(_LinkVariantsModal.LinkVariantsModal, {
|
|
2362
|
+
articleId: (_state$product14 = state.product) === null || _state$product14 === void 0 ? void 0 : _state$product14.id_article,
|
|
2363
|
+
articleName: (_state$product15 = state.product) === null || _state$product15 === void 0 ? void 0 : _state$product15.name,
|
|
2364
|
+
articleUpc: (_state$product16 = state.product) === null || _state$product16 === void 0 ? void 0 : _state$product16.upc,
|
|
2365
|
+
activeRetailerId: (_state$active_retaile5 = state.active_retailer) === null || _state$active_retaile5 === void 0 ? void 0 : _state$active_retaile5.id_retailer,
|
|
2366
|
+
token: token,
|
|
2367
|
+
onClose: function onClose() {
|
|
2368
|
+
return setShowLinkVariants(false);
|
|
2369
|
+
},
|
|
2370
|
+
onLinked: handleOnLinkedVariants
|
|
2371
|
+
}), showRejectModal && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.Modal, {
|
|
2073
2372
|
title: rejectAll ? "Agregar mensaje para rechazar todo" : "Agregar mensaje de rechazo",
|
|
2074
2373
|
show: showRejectModal,
|
|
2075
2374
|
customComponent: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TagAndInput, {
|
|
@@ -2089,21 +2388,21 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
2089
2388
|
type: "pink",
|
|
2090
2389
|
label: "Aceptar",
|
|
2091
2390
|
size: 12,
|
|
2092
|
-
onClick: /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
2391
|
+
onClick: /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14() {
|
|
2093
2392
|
var elements, isMessageEmpty, container, existingAlert, alert, fullMessage;
|
|
2094
|
-
return _regenerator.default.wrap(function
|
|
2393
|
+
return _regenerator.default.wrap(function _callee14$(_context14) {
|
|
2095
2394
|
while (1) {
|
|
2096
|
-
switch (
|
|
2395
|
+
switch (_context14.prev = _context14.next) {
|
|
2097
2396
|
case 0:
|
|
2098
2397
|
elements = document.querySelectorAll("#modal-message-box .ql-container .ql-editor > p");
|
|
2099
2398
|
|
|
2100
2399
|
if (!(!elements || elements.length === 0)) {
|
|
2101
|
-
|
|
2400
|
+
_context14.next = 4;
|
|
2102
2401
|
break;
|
|
2103
2402
|
}
|
|
2104
2403
|
|
|
2105
2404
|
console.error("Elemento no encontrado");
|
|
2106
|
-
return
|
|
2405
|
+
return _context14.abrupt("return");
|
|
2107
2406
|
|
|
2108
2407
|
case 4:
|
|
2109
2408
|
isMessageEmpty = Array.from(elements).every(function (el) {
|
|
@@ -2112,7 +2411,7 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
2112
2411
|
});
|
|
2113
2412
|
|
|
2114
2413
|
if (!isMessageEmpty) {
|
|
2115
|
-
|
|
2414
|
+
_context14.next = 10;
|
|
2116
2415
|
break;
|
|
2117
2416
|
}
|
|
2118
2417
|
|
|
@@ -2127,13 +2426,13 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
2127
2426
|
container.appendChild(alert);
|
|
2128
2427
|
}
|
|
2129
2428
|
|
|
2130
|
-
return
|
|
2429
|
+
return _context14.abrupt("return");
|
|
2131
2430
|
|
|
2132
2431
|
case 10:
|
|
2133
2432
|
fullMessage = Array.from(elements).map(function (element) {
|
|
2134
2433
|
return element.innerHTML;
|
|
2135
2434
|
}).join("").replace(/<br\s*\/?>/gi, "\n");
|
|
2136
|
-
|
|
2435
|
+
_context14.next = 13;
|
|
2137
2436
|
return createComment(fullMessage, token);
|
|
2138
2437
|
|
|
2139
2438
|
case 13:
|
|
@@ -2142,10 +2441,10 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
2142
2441
|
|
|
2143
2442
|
case 15:
|
|
2144
2443
|
case "end":
|
|
2145
|
-
return
|
|
2444
|
+
return _context14.stop();
|
|
2146
2445
|
}
|
|
2147
2446
|
}
|
|
2148
|
-
},
|
|
2447
|
+
}, _callee14);
|
|
2149
2448
|
}))
|
|
2150
2449
|
}, "btn-Aceptar")]
|
|
2151
2450
|
}), state.modal.show && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GenericModal.GenericModal, {
|
|
@@ -2206,8 +2505,8 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
2206
2505
|
productSelected: state.product,
|
|
2207
2506
|
token: token,
|
|
2208
2507
|
activeRetailer: {
|
|
2209
|
-
id: (_state$
|
|
2210
|
-
name: (_state$
|
|
2508
|
+
id: (_state$active_retaile6 = state.active_retailer) === null || _state$active_retaile6 === void 0 ? void 0 : _state$active_retaile6.id_retailer,
|
|
2509
|
+
name: (_state$active_retaile7 = state.active_retailer) === null || _state$active_retaile7 === void 0 ? void 0 : _state$active_retaile7.retailer
|
|
2211
2510
|
}
|
|
2212
2511
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2213
2512
|
className: "data-container",
|
|
@@ -2223,8 +2522,8 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
2223
2522
|
lists: state.images_values || [],
|
|
2224
2523
|
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] : {},
|
|
2225
2524
|
assignationsImages: state.collaborator_assignations["Imágenes"],
|
|
2226
|
-
imagesStatus: ((_state$
|
|
2227
|
-
retailerSelected: (_state$
|
|
2525
|
+
imagesStatus: ((_state$product17 = state.product) === null || _state$product17 === void 0 ? void 0 : _state$product17.images_status) || "-",
|
|
2526
|
+
retailerSelected: (_state$active_retaile8 = state.active_retailer) === null || _state$active_retaile8 === void 0 ? void 0 : _state$active_retaile8.id_retailer,
|
|
2228
2527
|
isRetailer: isRetailer,
|
|
2229
2528
|
version: state.product.version,
|
|
2230
2529
|
shotThd: shotThd,
|
|
@@ -2238,15 +2537,94 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
2238
2537
|
})]
|
|
2239
2538
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2240
2539
|
className: "product-information",
|
|
2241
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.
|
|
2540
|
+
children: [!esVarianteDeOtro && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2541
|
+
className: "variants-actions",
|
|
2542
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
2543
|
+
type: "button",
|
|
2544
|
+
className: "link-variants",
|
|
2545
|
+
onClick: function onClick() {
|
|
2546
|
+
return setShowLinkVariants(true);
|
|
2547
|
+
},
|
|
2548
|
+
children: "Ligar productos"
|
|
2549
|
+
}), variantesDelProducto > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
2550
|
+
type: "button",
|
|
2551
|
+
className: "variants-count",
|
|
2552
|
+
"aria-expanded": showFamily,
|
|
2553
|
+
onClick: function onClick() {
|
|
2554
|
+
setShowFamily(function (abierto) {
|
|
2555
|
+
return !abierto;
|
|
2556
|
+
});
|
|
2557
|
+
loadFamily();
|
|
2558
|
+
},
|
|
2559
|
+
children: [variantesDelProducto, " variante", variantesDelProducto === 1 ? "" : "s", /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
2560
|
+
"aria-hidden": "true",
|
|
2561
|
+
children: showFamily ? " ▴" : " ▾"
|
|
2562
|
+
})]
|
|
2563
|
+
})]
|
|
2564
|
+
}), esVarianteDeOtro && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
2565
|
+
className: "variants-actions",
|
|
2566
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
2567
|
+
type: "button",
|
|
2568
|
+
className: "variants-count",
|
|
2569
|
+
"aria-expanded": showFamily,
|
|
2570
|
+
onClick: function onClick() {
|
|
2571
|
+
setShowFamily(function (abierto) {
|
|
2572
|
+
return !abierto;
|
|
2573
|
+
});
|
|
2574
|
+
loadFamily();
|
|
2575
|
+
},
|
|
2576
|
+
children: ["Variante de otro producto", /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
2577
|
+
"aria-hidden": "true",
|
|
2578
|
+
children: showFamily ? " ▴" : " ▾"
|
|
2579
|
+
})]
|
|
2580
|
+
})
|
|
2581
|
+
}), showFamily && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2582
|
+
className: "variants-family",
|
|
2583
|
+
children: [!family && /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
2584
|
+
className: "loading",
|
|
2585
|
+
children: "Cargando familia\u2026"
|
|
2586
|
+
}), (family === null || family === void 0 ? void 0 : family.error) && /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
2587
|
+
className: "loading",
|
|
2588
|
+
children: "No se pudo cargar la familia de este producto."
|
|
2589
|
+
}), (family === null || family === void 0 ? void 0 : family.parent) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2590
|
+
className: "family-row parent",
|
|
2591
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
2592
|
+
className: "role",
|
|
2593
|
+
children: "Producto padre"
|
|
2594
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
2595
|
+
className: "name",
|
|
2596
|
+
children: family.parent.name
|
|
2597
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
2598
|
+
className: "upc",
|
|
2599
|
+
children: family.parent.upc
|
|
2600
|
+
})]
|
|
2601
|
+
}), family === null || family === void 0 ? void 0 : (_family$variants3 = family.variants) === null || _family$variants3 === void 0 ? void 0 : _family$variants3.map(function (variant) {
|
|
2602
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2603
|
+
className: "family-row".concat(variant.isCurrent ? " current" : ""),
|
|
2604
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
2605
|
+
className: "role",
|
|
2606
|
+
children: variant.isCurrent ? "Estás aquí" : "Variante"
|
|
2607
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
2608
|
+
className: "name",
|
|
2609
|
+
children: variant.name
|
|
2610
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
2611
|
+
className: "upc",
|
|
2612
|
+
children: variant.upc
|
|
2613
|
+
})]
|
|
2614
|
+
}, variant.articleId);
|
|
2615
|
+
}), family && !family.error && !((_family$variants4 = family.variants) !== null && _family$variants4 !== void 0 && _family$variants4.length) && /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
2616
|
+
className: "loading",
|
|
2617
|
+
children: "Este producto no tiene variantes."
|
|
2618
|
+
})]
|
|
2619
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FullProductNameHeader.FullProductNameHeader // states
|
|
2242
2620
|
, {
|
|
2243
2621
|
headerData: state.product,
|
|
2244
2622
|
productObservation: observation,
|
|
2245
2623
|
percent: (_state$active_percent = (_state$active_percent2 = state.active_percentage) === null || _state$active_percent2 === void 0 ? void 0 : (_state$active_percent3 = _state$active_percent2.percentagesGeneral) === null || _state$active_percent3 === void 0 ? void 0 : _state$active_percent3.required) !== null && _state$active_percent !== void 0 ? _state$active_percent : 0,
|
|
2246
2624
|
activeRetailer: {
|
|
2247
|
-
id: (_state$
|
|
2248
|
-
name: (_state$
|
|
2249
|
-
image: (_state$
|
|
2625
|
+
id: (_state$active_retaile9 = state.active_retailer) === null || _state$active_retaile9 === void 0 ? void 0 : _state$active_retaile9.id_retailer,
|
|
2626
|
+
name: (_state$active_retaile10 = state.active_retailer) === null || _state$active_retaile10 === void 0 ? void 0 : _state$active_retaile10.retailer,
|
|
2627
|
+
image: (_state$active_retaile11 = state.active_retailer) === null || _state$active_retaile11 === void 0 ? void 0 : _state$active_retaile11.image
|
|
2250
2628
|
},
|
|
2251
2629
|
servicesData: state.services_data ? state.services_data : null,
|
|
2252
2630
|
isObservationVisible: isObservationVisible // actions
|
|
@@ -2296,11 +2674,11 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
2296
2674
|
className: "services-information-container " + (imageLayout && state.active_tab === "Imágenes" ? "image-services" : ""),
|
|
2297
2675
|
id: "services-information-container",
|
|
2298
2676
|
children: state.saving ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Loading.Loading, {}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
2299
|
-
children: [state.active_tab === "Descripción" && (((_state$
|
|
2677
|
+
children: [state.active_tab === "Descripción" && (((_state$product18 = state.product) === null || _state$product18 === void 0 ? void 0 : _state$product18.description_status) !== "NS" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputGroup.InputGroup, {
|
|
2300
2678
|
activeSection: state.active_tab,
|
|
2301
2679
|
inputGroup: state.descriptions_inputs[0],
|
|
2302
2680
|
updatedDescriptions: state.updated_descriptions_inputs,
|
|
2303
|
-
articleId: (_state$
|
|
2681
|
+
articleId: (_state$product19 = state.product) === null || _state$product19 === void 0 ? void 0 : _state$product19.id_article,
|
|
2304
2682
|
version: state.product.version,
|
|
2305
2683
|
auditInputGroup: auditDescriptions[0],
|
|
2306
2684
|
setUpdatedDescriptions: handleOnSetUpdatedDescriptions,
|
|
@@ -2309,14 +2687,18 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
2309
2687
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
2310
2688
|
text: "No cuentas con este servicio",
|
|
2311
2689
|
headerType: "input-name-header"
|
|
2312
|
-
})), state.active_tab === "Ficha técnica" && (((_state$
|
|
2690
|
+
})), state.active_tab === "Ficha técnica" && (((_state$product20 = state.product) === null || _state$product20 === void 0 ? void 0 : _state$product20.datasheet_status) !== "NS" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
2313
2691
|
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) {
|
|
2692
|
+
var _state$services2, _state$services2$data;
|
|
2693
|
+
|
|
2314
2694
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputGroup.InputGroup, {
|
|
2315
2695
|
articleId: state.product.id_article,
|
|
2316
2696
|
version: state.version,
|
|
2317
2697
|
activeSection: state.active_tab,
|
|
2318
2698
|
inputGroup: dataGroup,
|
|
2319
2699
|
dataInputs: state.datasheets_inputs[1],
|
|
2700
|
+
variant: (_state$services2 = state.services) === null || _state$services2 === void 0 ? void 0 : (_state$services2$data = _state$services2.datasheets) === null || _state$services2$data === void 0 ? void 0 : _state$services2$data.variant,
|
|
2701
|
+
onRestoreInheritance: handleOnRestoreInheritance,
|
|
2320
2702
|
auditInputs: auditDatasheets[1],
|
|
2321
2703
|
updatedDatasheets: state.updated_datasheets_inputs,
|
|
2322
2704
|
setUpdatedDatasheets: handleOnSetUpdatedDatasheets,
|
|
@@ -2326,7 +2708,7 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
2326
2708
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
2327
2709
|
text: "No cuentas con este servicio",
|
|
2328
2710
|
headerType: "input-name-header"
|
|
2329
|
-
})), state.active_tab === "Imágenes" && (((_state$
|
|
2711
|
+
})), state.active_tab === "Imágenes" && (((_state$product21 = state.product) === null || _state$product21 === void 0 ? void 0 : _state$product21.images_status) !== "NS" ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
2330
2712
|
children: [!imageLayout && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GalleryHeader.GalleryHeader, {
|
|
2331
2713
|
checkAll: state.all_image_checked // Determina si el checkbox "Seleccionar todo" está marcado
|
|
2332
2714
|
,
|
|
@@ -2418,20 +2800,20 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
|
|
|
2418
2800
|
reviewed: crossComment
|
|
2419
2801
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
2420
2802
|
buttonType: "circular-button accept-button",
|
|
2421
|
-
onClick: /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
2422
|
-
return _regenerator.default.wrap(function
|
|
2803
|
+
onClick: /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
|
|
2804
|
+
return _regenerator.default.wrap(function _callee15$(_context15) {
|
|
2423
2805
|
while (1) {
|
|
2424
|
-
switch (
|
|
2806
|
+
switch (_context15.prev = _context15.next) {
|
|
2425
2807
|
case 0:
|
|
2426
2808
|
setCrossComment(true);
|
|
2427
2809
|
commentRevised();
|
|
2428
2810
|
|
|
2429
2811
|
case 2:
|
|
2430
2812
|
case "end":
|
|
2431
|
-
return
|
|
2813
|
+
return _context15.stop();
|
|
2432
2814
|
}
|
|
2433
2815
|
}
|
|
2434
|
-
},
|
|
2816
|
+
}, _callee15);
|
|
2435
2817
|
}))
|
|
2436
2818
|
})]
|
|
2437
2819
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|