contentoh-components-library 21.4.61 → 21.4.63
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/assets/fonts/roboto/LICENSE.txt +202 -0
- package/dist/components/molecules/BoxAttribute/styles.js +1 -1
- package/dist/components/molecules/BoxButtons/index.js +1 -0
- package/dist/components/molecules/TagAndInput/index.js +64 -3
- package/dist/components/organisms/InputGroup/index.js +153 -48
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +82 -146
- package/dist/components/pages/ProviderProductEdition/index.js +173 -138
- package/dist/components/pages/RetailerProductEdition/index.js +5 -5
- package/package.json +1 -1
- package/src/assets/images/Icons/info.svg +8 -0
- package/src/components/atoms/TabSection/styles.js +1 -1
- package/src/components/molecules/BoxAttribute/BoxAttribute.stories.js +16 -0
- package/src/components/molecules/BoxAttribute/index.js +71 -0
- package/src/components/molecules/BoxAttribute/styles.js +38 -0
- package/src/components/molecules/BoxButtons/BoxButtons.stories.js +15 -0
- package/src/components/molecules/BoxButtons/index.js +28 -0
- package/src/components/molecules/BoxButtons/styles.js +43 -0
- package/src/components/molecules/TagAndInput/index.js +52 -8
- package/src/components/organisms/Box/Box.stories.js +17 -0
- package/src/components/organisms/Box/index.js +103 -0
- package/src/components/organisms/Box/styles.js +48 -0
- package/src/components/organisms/BoxOnboarding/BoxOnboarding.stories.js +17 -0
- package/src/components/organisms/BoxOnboarding/index.js +60 -0
- package/src/components/organisms/BoxOnboarding/styles.js +44 -0
- package/src/components/organisms/InputGroup/index.js +233 -87
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +86 -175
- package/src/components/pages/ProviderProductEdition/index.js +43 -16
- package/src/components/pages/RetailerProductEdition/index.js +7 -5
|
@@ -264,6 +264,11 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
264
264
|
showModal = _useState14[0],
|
|
265
265
|
setShowModal = _useState14[1];
|
|
266
266
|
|
|
267
|
+
var _useState15 = (0, _react.useState)(),
|
|
268
|
+
_useState16 = (0, _slicedToArray2.default)(_useState15, 2),
|
|
269
|
+
boxData = _useState16[0],
|
|
270
|
+
setBoxData = _useState16[1];
|
|
271
|
+
|
|
267
272
|
var _useDropzone = (0, _reactDropzone.useDropzone)({
|
|
268
273
|
accept: "image/*",
|
|
269
274
|
noKeyboard: true,
|
|
@@ -326,141 +331,141 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
326
331
|
getRootProps = _useDropzone.getRootProps,
|
|
327
332
|
getInputProps = _useDropzone.getInputProps;
|
|
328
333
|
|
|
329
|
-
var _useState15 = (0, _react.useState)([]),
|
|
330
|
-
_useState16 = (0, _slicedToArray2.default)(_useState15, 2),
|
|
331
|
-
updatedDatasheets = _useState16[0],
|
|
332
|
-
setUpdatedDatasheets = _useState16[1];
|
|
333
|
-
|
|
334
334
|
var _useState17 = (0, _react.useState)([]),
|
|
335
335
|
_useState18 = (0, _slicedToArray2.default)(_useState17, 2),
|
|
336
|
-
|
|
337
|
-
|
|
336
|
+
updatedDatasheets = _useState18[0],
|
|
337
|
+
setUpdatedDatasheets = _useState18[1];
|
|
338
338
|
|
|
339
|
-
var _useState19 = (0, _react.useState)(
|
|
339
|
+
var _useState19 = (0, _react.useState)([]),
|
|
340
340
|
_useState20 = (0, _slicedToArray2.default)(_useState19, 2),
|
|
341
|
-
|
|
342
|
-
|
|
341
|
+
updatedDescriptions = _useState20[0],
|
|
342
|
+
setUpdatedDescriptions = _useState20[1];
|
|
343
343
|
|
|
344
|
-
var _useState21 = (0, _react.useState)(),
|
|
344
|
+
var _useState21 = (0, _react.useState)(false),
|
|
345
345
|
_useState22 = (0, _slicedToArray2.default)(_useState21, 2),
|
|
346
|
-
|
|
347
|
-
|
|
346
|
+
imagesUploaded = _useState22[0],
|
|
347
|
+
setImagesUploaded = _useState22[1];
|
|
348
348
|
|
|
349
|
-
var _useState23 = (0, _react.useState)(
|
|
349
|
+
var _useState23 = (0, _react.useState)(),
|
|
350
|
+
_useState24 = (0, _slicedToArray2.default)(_useState23, 2),
|
|
351
|
+
dataImages = _useState24[0],
|
|
352
|
+
setDataImages = _useState24[1];
|
|
353
|
+
|
|
354
|
+
var _useState25 = (0, _react.useState)(product !== null && product !== void 0 && product.retailers ? new Array(product === null || product === void 0 ? void 0 : (_product$retailers = product.retailers) === null || _product$retailers === void 0 ? void 0 : _product$retailers.length).fill({
|
|
350
355
|
percentage: 0
|
|
351
356
|
}) : new Array(product === null || product === void 0 ? void 0 : (_product$retailersAva = product.retailersAvailable) === null || _product$retailersAva === void 0 ? void 0 : _product$retailersAva.length).fill({
|
|
352
357
|
percentage: 0
|
|
353
358
|
})),
|
|
354
|
-
_useState24 = (0, _slicedToArray2.default)(_useState23, 2),
|
|
355
|
-
percentages = _useState24[0],
|
|
356
|
-
setPercentages = _useState24[1];
|
|
357
|
-
|
|
358
|
-
var _useState25 = (0, _react.useState)(0),
|
|
359
359
|
_useState26 = (0, _slicedToArray2.default)(_useState25, 2),
|
|
360
|
-
|
|
361
|
-
|
|
360
|
+
percentages = _useState26[0],
|
|
361
|
+
setPercentages = _useState26[1];
|
|
362
362
|
|
|
363
|
-
var _useState27 = (0, _react.useState)(
|
|
363
|
+
var _useState27 = (0, _react.useState)(0),
|
|
364
364
|
_useState28 = (0, _slicedToArray2.default)(_useState27, 2),
|
|
365
|
-
|
|
366
|
-
|
|
365
|
+
activePercentage = _useState28[0],
|
|
366
|
+
setActivePercentage = _useState28[1];
|
|
367
367
|
|
|
368
|
-
var _useState29 = (0, _react.useState)(
|
|
368
|
+
var _useState29 = (0, _react.useState)({}),
|
|
369
369
|
_useState30 = (0, _slicedToArray2.default)(_useState29, 2),
|
|
370
|
-
|
|
371
|
-
|
|
370
|
+
activeRetailer = _useState30[0],
|
|
371
|
+
setActiveRetailer = _useState30[1];
|
|
372
372
|
|
|
373
373
|
var _useState31 = (0, _react.useState)([]),
|
|
374
374
|
_useState32 = (0, _slicedToArray2.default)(_useState31, 2),
|
|
375
|
-
|
|
376
|
-
|
|
375
|
+
services = _useState32[0],
|
|
376
|
+
setServices = _useState32[1];
|
|
377
377
|
|
|
378
|
-
var _useState33 = (0, _react.useState)(
|
|
378
|
+
var _useState33 = (0, _react.useState)([]),
|
|
379
379
|
_useState34 = (0, _slicedToArray2.default)(_useState33, 2),
|
|
380
|
-
|
|
381
|
-
|
|
380
|
+
servicesData = _useState34[0],
|
|
381
|
+
setServicesData = _useState34[1];
|
|
382
382
|
|
|
383
|
-
var _useState35 = (0, _react.useState)(
|
|
383
|
+
var _useState35 = (0, _react.useState)(""),
|
|
384
384
|
_useState36 = (0, _slicedToArray2.default)(_useState35, 2),
|
|
385
|
-
|
|
386
|
-
|
|
385
|
+
message = _useState36[0],
|
|
386
|
+
setMessage = _useState36[1];
|
|
387
387
|
|
|
388
|
-
var _useState37 = (0, _react.useState)(JSON.parse(sessionStorage.getItem("
|
|
388
|
+
var _useState37 = (0, _react.useState)(JSON.parse(sessionStorage.getItem("productSelected")) ? JSON.parse(sessionStorage.getItem("productSelected")) : productSelected),
|
|
389
389
|
_useState38 = (0, _slicedToArray2.default)(_useState37, 2),
|
|
390
|
-
|
|
391
|
-
|
|
390
|
+
product = _useState38[0],
|
|
391
|
+
setProduct = _useState38[1];
|
|
392
392
|
|
|
393
|
-
var _useState39 = (0, _react.useState)(
|
|
393
|
+
var _useState39 = (0, _react.useState)(JSON.parse(sessionStorage.getItem("productEdit")) ? JSON.parse(sessionStorage.getItem("productEdit")) : productToEdit),
|
|
394
394
|
_useState40 = (0, _slicedToArray2.default)(_useState39, 2),
|
|
395
|
-
|
|
396
|
-
|
|
395
|
+
productEdit = _useState40[0],
|
|
396
|
+
setProductEdit = _useState40[1];
|
|
397
397
|
|
|
398
|
-
var _useState41 = (0, _react.useState)(
|
|
399
|
-
_useState42 = (0, _slicedToArray2.default)(_useState41,
|
|
400
|
-
|
|
398
|
+
var _useState41 = (0, _react.useState)(product === null || product === void 0 ? void 0 : product.version),
|
|
399
|
+
_useState42 = (0, _slicedToArray2.default)(_useState41, 2),
|
|
400
|
+
version = _useState42[0],
|
|
401
|
+
setVersion = _useState42[1];
|
|
401
402
|
|
|
402
|
-
var _useState43 = (0, _react.useState)(
|
|
403
|
-
_useState44 = (0, _slicedToArray2.default)(_useState43,
|
|
404
|
-
|
|
405
|
-
setComment = _useState44[1];
|
|
403
|
+
var _useState43 = (0, _react.useState)({}),
|
|
404
|
+
_useState44 = (0, _slicedToArray2.default)(_useState43, 1),
|
|
405
|
+
comments = _useState44[0];
|
|
406
406
|
|
|
407
|
-
var _useState45 = (0, _react.useState)(
|
|
407
|
+
var _useState45 = (0, _react.useState)(""),
|
|
408
408
|
_useState46 = (0, _slicedToArray2.default)(_useState45, 2),
|
|
409
|
-
|
|
410
|
-
|
|
409
|
+
comment = _useState46[0],
|
|
410
|
+
setComment = _useState46[1];
|
|
411
411
|
|
|
412
|
-
var _useState47 = (0, _react.useState)(
|
|
412
|
+
var _useState47 = (0, _react.useState)(false),
|
|
413
413
|
_useState48 = (0, _slicedToArray2.default)(_useState47, 2),
|
|
414
|
-
|
|
415
|
-
|
|
414
|
+
crossComment = _useState48[0],
|
|
415
|
+
setCrossComment = _useState48[1];
|
|
416
416
|
|
|
417
|
-
var _useState49 = (0, _react.useState)(
|
|
417
|
+
var _useState49 = (0, _react.useState)([]),
|
|
418
418
|
_useState50 = (0, _slicedToArray2.default)(_useState49, 2),
|
|
419
|
-
|
|
420
|
-
|
|
419
|
+
userGroups = _useState50[0],
|
|
420
|
+
setUserGroups = _useState50[1];
|
|
421
421
|
|
|
422
|
-
var _useState51 = (0, _react.useState)(
|
|
422
|
+
var _useState51 = (0, _react.useState)({}),
|
|
423
423
|
_useState52 = (0, _slicedToArray2.default)(_useState51, 2),
|
|
424
|
-
|
|
425
|
-
|
|
424
|
+
assig = _useState52[0],
|
|
425
|
+
setAssig = _useState52[1];
|
|
426
426
|
|
|
427
427
|
var _useState53 = (0, _react.useState)([]),
|
|
428
428
|
_useState54 = (0, _slicedToArray2.default)(_useState53, 2),
|
|
429
|
-
|
|
430
|
-
|
|
429
|
+
selectedImages = _useState54[0],
|
|
430
|
+
setSelectedImages = _useState54[1];
|
|
431
431
|
|
|
432
|
-
var _useState55 = (0, _react.useState)(
|
|
432
|
+
var _useState55 = (0, _react.useState)([]),
|
|
433
433
|
_useState56 = (0, _slicedToArray2.default)(_useState55, 2),
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
var isRetailer = user === null || user === void 0 ? void 0 : user.is_retailer;
|
|
434
|
+
componentsArray = _useState56[0],
|
|
435
|
+
setComponentsArray = _useState56[1];
|
|
438
436
|
|
|
439
|
-
var _useState57 = (0, _react.useState)(
|
|
437
|
+
var _useState57 = (0, _react.useState)(false),
|
|
440
438
|
_useState58 = (0, _slicedToArray2.default)(_useState57, 2),
|
|
441
|
-
|
|
442
|
-
|
|
439
|
+
checkAll = _useState58[0],
|
|
440
|
+
setCheckAll = _useState58[1];
|
|
443
441
|
|
|
444
|
-
var
|
|
442
|
+
var isRetailer = user === null || user === void 0 ? void 0 : user.is_retailer;
|
|
443
|
+
|
|
444
|
+
var _useState59 = (0, _react.useState)(true),
|
|
445
445
|
_useState60 = (0, _slicedToArray2.default)(_useState59, 2),
|
|
446
|
-
|
|
447
|
-
|
|
446
|
+
loading = _useState60[0],
|
|
447
|
+
setLoading = _useState60[1];
|
|
448
|
+
|
|
449
|
+
var _useState61 = (0, _react.useState)(false),
|
|
450
|
+
_useState62 = (0, _slicedToArray2.default)(_useState61, 2),
|
|
451
|
+
validatedAll = _useState62[0],
|
|
452
|
+
setValidatedAll = _useState62[1];
|
|
448
453
|
|
|
449
|
-
var
|
|
454
|
+
var _useState63 = (0, _react.useState)({
|
|
450
455
|
"Ficha técnica": null,
|
|
451
456
|
Descripción: null,
|
|
452
457
|
Imágenes: null
|
|
453
458
|
}),
|
|
454
|
-
_useState62 = (0, _slicedToArray2.default)(_useState61, 2),
|
|
455
|
-
origin = _useState62[0],
|
|
456
|
-
setOrigin = _useState62[1];
|
|
457
|
-
|
|
458
|
-
var _useState63 = (0, _react.useState)(false),
|
|
459
459
|
_useState64 = (0, _slicedToArray2.default)(_useState63, 2),
|
|
460
|
-
|
|
461
|
-
|
|
460
|
+
origin = _useState64[0],
|
|
461
|
+
setOrigin = _useState64[1];
|
|
462
462
|
|
|
463
|
-
var _useState65 = (0, _react.useState)(
|
|
463
|
+
var _useState65 = (0, _react.useState)(false),
|
|
464
|
+
_useState66 = (0, _slicedToArray2.default)(_useState65, 2),
|
|
465
|
+
inCart = _useState66[0],
|
|
466
|
+
setInCart = _useState66[1];
|
|
467
|
+
|
|
468
|
+
var _useState67 = (0, _react.useState)({
|
|
464
469
|
message: "¿Estás seguro de continuar?",
|
|
465
470
|
detail: " ".concat(user.is_retailer ? "Asegurate de haber revisado las tres secciones" : "Envíar el producto a la cadena"),
|
|
466
471
|
button1: {
|
|
@@ -475,34 +480,34 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
475
480
|
},
|
|
476
481
|
img: _defaultProfileImage.default
|
|
477
482
|
}),
|
|
478
|
-
_useState66 = (0, _slicedToArray2.default)(_useState65, 2),
|
|
479
|
-
dataGenericModal = _useState66[0],
|
|
480
|
-
setDataGenericModal = _useState66[1];
|
|
481
|
-
|
|
482
|
-
var _useState67 = (0, _react.useState)(null),
|
|
483
483
|
_useState68 = (0, _slicedToArray2.default)(_useState67, 2),
|
|
484
|
-
|
|
485
|
-
|
|
484
|
+
dataGenericModal = _useState68[0],
|
|
485
|
+
setDataGenericModal = _useState68[1];
|
|
486
486
|
|
|
487
|
-
var _useState69 = (0, _react.useState)(
|
|
487
|
+
var _useState69 = (0, _react.useState)(null),
|
|
488
488
|
_useState70 = (0, _slicedToArray2.default)(_useState69, 2),
|
|
489
|
-
|
|
490
|
-
|
|
489
|
+
socketType = _useState70[0],
|
|
490
|
+
setSocketType = _useState70[1];
|
|
491
491
|
|
|
492
|
-
var _useState71 = (0, _react.useState)(
|
|
492
|
+
var _useState71 = (0, _react.useState)(loading),
|
|
493
493
|
_useState72 = (0, _slicedToArray2.default)(_useState71, 2),
|
|
494
|
-
|
|
495
|
-
|
|
494
|
+
saving = _useState72[0],
|
|
495
|
+
setSaving = _useState72[1];
|
|
496
|
+
|
|
497
|
+
var _useState73 = (0, _react.useState)(product.statusByRetailer),
|
|
498
|
+
_useState74 = (0, _slicedToArray2.default)(_useState73, 2),
|
|
499
|
+
retailerStatus = _useState74[0],
|
|
500
|
+
setRetailerStatus = _useState74[1];
|
|
496
501
|
|
|
497
502
|
var _useCloseModal = (0, _customHooks.useCloseModal)("version-selector"),
|
|
498
503
|
_useCloseModal2 = (0, _slicedToArray2.default)(_useCloseModal, 2),
|
|
499
504
|
showVersionSelector = _useCloseModal2[0],
|
|
500
505
|
setShowVersionSelector = _useCloseModal2[1];
|
|
501
506
|
|
|
502
|
-
var
|
|
503
|
-
|
|
504
|
-
globalModal =
|
|
505
|
-
setGlobalModal =
|
|
507
|
+
var _useState75 = (0, _react.useState)(),
|
|
508
|
+
_useState76 = (0, _slicedToArray2.default)(_useState75, 2),
|
|
509
|
+
globalModal = _useState76[0],
|
|
510
|
+
setGlobalModal = _useState76[1];
|
|
506
511
|
|
|
507
512
|
var updateAuditStatus = /*#__PURE__*/function () {
|
|
508
513
|
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(status) {
|
|
@@ -1224,53 +1229,74 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1224
1229
|
|
|
1225
1230
|
var saveDatasheets = /*#__PURE__*/function () {
|
|
1226
1231
|
var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
|
|
1227
|
-
var dataObject, res;
|
|
1232
|
+
var parseBoxData, dataObject, res;
|
|
1228
1233
|
return _regenerator.default.wrap(function _callee12$(_context12) {
|
|
1229
1234
|
while (1) {
|
|
1230
1235
|
switch (_context12.prev = _context12.next) {
|
|
1231
1236
|
case 0:
|
|
1232
|
-
|
|
1233
|
-
|
|
1237
|
+
parseBoxData = [];
|
|
1238
|
+
Object.entries(boxData).forEach(function (_ref11, index) {
|
|
1239
|
+
var _ref12 = (0, _slicedToArray2.default)(_ref11, 2),
|
|
1240
|
+
box = _ref12[1];
|
|
1241
|
+
|
|
1242
|
+
var value = box.value;
|
|
1243
|
+
var attributesIds = Object.keys(value);
|
|
1244
|
+
attributesIds.forEach(function (attributeId) {
|
|
1245
|
+
var boxId = index + 1;
|
|
1246
|
+
var valueOfAtribute = value[attributeId];
|
|
1247
|
+
parseBoxData.push({
|
|
1248
|
+
attributeId: attributeId,
|
|
1249
|
+
value: valueOfAtribute,
|
|
1250
|
+
boxId: boxId
|
|
1251
|
+
});
|
|
1252
|
+
});
|
|
1253
|
+
});
|
|
1254
|
+
dataObject = (0, _objectSpread3.default)({
|
|
1234
1255
|
articleId: product === null || product === void 0 ? void 0 : product.id_article,
|
|
1235
1256
|
articleData: updatedDatasheets
|
|
1236
|
-
}
|
|
1257
|
+
}, parseBoxData.length > 0 && {
|
|
1258
|
+
boxData: parseBoxData
|
|
1259
|
+
});
|
|
1237
1260
|
if (product !== null && product !== void 0 && product.orderId) dataObject["orderId"] = product === null || product === void 0 ? void 0 : product.orderId;
|
|
1238
|
-
_context12.prev =
|
|
1239
|
-
_context12.next =
|
|
1261
|
+
_context12.prev = 4;
|
|
1262
|
+
_context12.next = 7;
|
|
1240
1263
|
return _axios.default.put("".concat(process.env.REACT_APP_ARTICLE_DATA_ENDPOINT, "?datasheet=true&version=").concat(version), dataObject, {
|
|
1241
1264
|
headers: {
|
|
1242
1265
|
Authorization: token
|
|
1243
1266
|
}
|
|
1244
1267
|
});
|
|
1245
1268
|
|
|
1246
|
-
case
|
|
1269
|
+
case 7:
|
|
1247
1270
|
res = _context12.sent;
|
|
1248
1271
|
|
|
1249
1272
|
if (!(res.data.statusCode === 200)) {
|
|
1250
|
-
_context12.next =
|
|
1273
|
+
_context12.next = 13;
|
|
1251
1274
|
break;
|
|
1252
1275
|
}
|
|
1253
1276
|
|
|
1254
1277
|
setUpdatedDatasheets([]);
|
|
1255
1278
|
setMessage("Fichas técnicas guardadas");
|
|
1256
|
-
_context12.next =
|
|
1279
|
+
_context12.next = 13;
|
|
1257
1280
|
return loadData();
|
|
1258
1281
|
|
|
1259
|
-
case
|
|
1260
|
-
_context12.next =
|
|
1282
|
+
case 13:
|
|
1283
|
+
_context12.next = 18;
|
|
1261
1284
|
break;
|
|
1262
1285
|
|
|
1263
|
-
case
|
|
1264
|
-
_context12.prev =
|
|
1265
|
-
_context12.t0 = _context12["catch"](
|
|
1286
|
+
case 15:
|
|
1287
|
+
_context12.prev = 15;
|
|
1288
|
+
_context12.t0 = _context12["catch"](4);
|
|
1266
1289
|
console.log(_context12.t0);
|
|
1267
1290
|
|
|
1268
|
-
case
|
|
1291
|
+
case 18:
|
|
1292
|
+
console.log(dataObject);
|
|
1293
|
+
|
|
1294
|
+
case 19:
|
|
1269
1295
|
case "end":
|
|
1270
1296
|
return _context12.stop();
|
|
1271
1297
|
}
|
|
1272
1298
|
}
|
|
1273
|
-
}, _callee12, null, [[
|
|
1299
|
+
}, _callee12, null, [[4, 15]]);
|
|
1274
1300
|
}));
|
|
1275
1301
|
|
|
1276
1302
|
return function saveDatasheets() {
|
|
@@ -1469,7 +1495,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1469
1495
|
};
|
|
1470
1496
|
|
|
1471
1497
|
var createComment = /*#__PURE__*/function () {
|
|
1472
|
-
var
|
|
1498
|
+
var _ref15 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15(e, body, tab) {
|
|
1473
1499
|
var concept, data;
|
|
1474
1500
|
return _regenerator.default.wrap(function _callee15$(_context15) {
|
|
1475
1501
|
while (1) {
|
|
@@ -1516,7 +1542,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1516
1542
|
}));
|
|
1517
1543
|
|
|
1518
1544
|
return function createComment(_x4, _x5, _x6) {
|
|
1519
|
-
return
|
|
1545
|
+
return _ref15.apply(this, arguments);
|
|
1520
1546
|
};
|
|
1521
1547
|
}();
|
|
1522
1548
|
|
|
@@ -1525,7 +1551,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1525
1551
|
}, [activeTab]);
|
|
1526
1552
|
|
|
1527
1553
|
var commentRevised = /*#__PURE__*/function () {
|
|
1528
|
-
var
|
|
1554
|
+
var _ref16 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
|
|
1529
1555
|
var data;
|
|
1530
1556
|
return _regenerator.default.wrap(function _callee16$(_context16) {
|
|
1531
1557
|
while (1) {
|
|
@@ -1553,12 +1579,12 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1553
1579
|
}));
|
|
1554
1580
|
|
|
1555
1581
|
return function commentRevised() {
|
|
1556
|
-
return
|
|
1582
|
+
return _ref16.apply(this, arguments);
|
|
1557
1583
|
};
|
|
1558
1584
|
}();
|
|
1559
1585
|
|
|
1560
1586
|
var setAssignation = /*#__PURE__*/function () {
|
|
1561
|
-
var
|
|
1587
|
+
var _ref17 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(assignationType, assignationId) {
|
|
1562
1588
|
var concept, productTemp, data;
|
|
1563
1589
|
return _regenerator.default.wrap(function _callee17$(_context17) {
|
|
1564
1590
|
while (1) {
|
|
@@ -1615,7 +1641,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1615
1641
|
}));
|
|
1616
1642
|
|
|
1617
1643
|
return function setAssignation(_x7, _x8) {
|
|
1618
|
-
return
|
|
1644
|
+
return _ref17.apply(this, arguments);
|
|
1619
1645
|
};
|
|
1620
1646
|
}();
|
|
1621
1647
|
|
|
@@ -1699,7 +1725,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1699
1725
|
};
|
|
1700
1726
|
|
|
1701
1727
|
var sendEvaluation = /*#__PURE__*/function () {
|
|
1702
|
-
var
|
|
1728
|
+
var _ref18 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(result) {
|
|
1703
1729
|
var _productTemp$id_order2;
|
|
1704
1730
|
|
|
1705
1731
|
var concept, productTemp, articleId, orderId, sectionStatusKey, evalStatus, data, retailerId, res, newStatuses, orderStatus, serviceStatus, newProductEdit, showSurveyByProvider, showSurveyByRetailer, _JSON$parse, newArticleStatus, newServiceStatus, newStatus, retailerStatusCopy, status;
|
|
@@ -1804,12 +1830,12 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1804
1830
|
}));
|
|
1805
1831
|
|
|
1806
1832
|
return function sendEvaluation(_x9) {
|
|
1807
|
-
return
|
|
1833
|
+
return _ref18.apply(this, arguments);
|
|
1808
1834
|
};
|
|
1809
1835
|
}();
|
|
1810
1836
|
|
|
1811
1837
|
var validateAll = /*#__PURE__*/function () {
|
|
1812
|
-
var
|
|
1838
|
+
var _ref19 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(result) {
|
|
1813
1839
|
var _product$id_order2, evaluationArray, conceptArray, dataGeneral, userType, productTemp, status, retailerStatusCopy;
|
|
1814
1840
|
|
|
1815
1841
|
return _regenerator.default.wrap(function _callee19$(_context19) {
|
|
@@ -1895,12 +1921,12 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1895
1921
|
}));
|
|
1896
1922
|
|
|
1897
1923
|
return function validateAll(_x10) {
|
|
1898
|
-
return
|
|
1924
|
+
return _ref19.apply(this, arguments);
|
|
1899
1925
|
};
|
|
1900
1926
|
}();
|
|
1901
1927
|
|
|
1902
1928
|
var evaluationToRetailer = /*#__PURE__*/function () {
|
|
1903
|
-
var
|
|
1929
|
+
var _ref20 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(result) {
|
|
1904
1930
|
var data, prod, statusComplete;
|
|
1905
1931
|
return _regenerator.default.wrap(function _callee20$(_context20) {
|
|
1906
1932
|
while (1) {
|
|
@@ -1942,7 +1968,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1942
1968
|
}));
|
|
1943
1969
|
|
|
1944
1970
|
return function evaluationToRetailer(_x11) {
|
|
1945
|
-
return
|
|
1971
|
+
return _ref20.apply(this, arguments);
|
|
1946
1972
|
};
|
|
1947
1973
|
}();
|
|
1948
1974
|
|
|
@@ -2206,17 +2232,26 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2206
2232
|
setSelectedImages: setSelectedImages,
|
|
2207
2233
|
checkAll: checkAll,
|
|
2208
2234
|
setCheckAll: setCheckAll
|
|
2209
|
-
}), activeTab === "Ficha técnica" && ((product === null || product === void 0 ? void 0 : product.datasheet_status) !== "NS" ? (
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2235
|
+
}), activeTab === "Ficha técnica" && ((product === null || product === void 0 ? void 0 : product.datasheet_status) !== "NS" ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
2236
|
+
children: (_datasheets$ = datasheets[0]) === null || _datasheets$ === void 0 ? void 0 : (_datasheets$$data = _datasheets$.data) === null || _datasheets$$data === void 0 ? void 0 : _datasheets$$data.map(function (dataGroup, index) {
|
|
2237
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputGroup.InputGroup, {
|
|
2238
|
+
articleId: product.id_article,
|
|
2239
|
+
version: version,
|
|
2240
|
+
activeSection: activeTab,
|
|
2241
|
+
inputGroup: dataGroup,
|
|
2242
|
+
dataInputs: datasheets[1],
|
|
2243
|
+
updatedDatasheets: updatedDatasheets,
|
|
2244
|
+
setUpdatedDatasheets: setUpdatedDatasheets,
|
|
2245
|
+
isShowbox: true,
|
|
2246
|
+
activeRetailer: services[0][activeRetailer.id],
|
|
2247
|
+
groupData: services[0][activeRetailer.id].data,
|
|
2248
|
+
setUpdatedBoxData: function setUpdatedBoxData(e) {
|
|
2249
|
+
setBoxData(e);
|
|
2250
|
+
},
|
|
2251
|
+
index: index //enableActions={enableActions(product.version_status)} ADD THIS VALIDATION
|
|
2252
|
+
|
|
2253
|
+
}, index + "-" + activeRetailer.name);
|
|
2254
|
+
})
|
|
2220
2255
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
2221
2256
|
text: "No cuentas con este servicio",
|
|
2222
2257
|
headerType: "input-name-header"
|
|
@@ -516,7 +516,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
516
516
|
}
|
|
517
517
|
|
|
518
518
|
_context2.next = 3;
|
|
519
|
-
return (0, _data.getRetailerServices)(product === null || product === void 0 ? void 0 : (_product$article = product.article) === null || _product$article === void 0 ? void 0 : _product$article.id_article, product === null || product === void 0 ? void 0 : (_product$article2 = product.article) === null || _product$article2 === void 0 ? void 0 : _product$article2.category, parseInt(product === null || product === void 0 ? void 0 : (_product$article3 = product.article) === null || _product$article3 === void 0 ? void 0 : _product$article3.id_category), auditableVersion.version);
|
|
519
|
+
return (0, _data.getRetailerServices)(product === null || product === void 0 ? void 0 : (_product$article = product.article) === null || _product$article === void 0 ? void 0 : _product$article.id_article, product === null || product === void 0 ? void 0 : (_product$article2 = product.article) === null || _product$article2 === void 0 ? void 0 : _product$article2.category, parseInt(product === null || product === void 0 ? void 0 : (_product$article3 = product.article) === null || _product$article3 === void 0 ? void 0 : _product$article3.id_category), auditableVersion.version, token);
|
|
520
520
|
|
|
521
521
|
case 3:
|
|
522
522
|
_auditServices = _context2.sent;
|
|
@@ -556,7 +556,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
556
556
|
case 0:
|
|
557
557
|
_context3.prev = 0;
|
|
558
558
|
_context3.next = 3;
|
|
559
|
-
return (0, _data.getRetailerServices)(product === null || product === void 0 ? void 0 : (_product$article4 = product.article) === null || _product$article4 === void 0 ? void 0 : _product$article4.id_article, product === null || product === void 0 ? void 0 : (_product$article5 = product.article) === null || _product$article5 === void 0 ? void 0 : _product$article5.category, parseInt(product === null || product === void 0 ? void 0 : (_product$article6 = product.article) === null || _product$article6 === void 0 ? void 0 : _product$article6.id_category), version);
|
|
559
|
+
return (0, _data.getRetailerServices)(product === null || product === void 0 ? void 0 : (_product$article4 = product.article) === null || _product$article4 === void 0 ? void 0 : _product$article4.id_article, product === null || product === void 0 ? void 0 : (_product$article5 = product.article) === null || _product$article5 === void 0 ? void 0 : _product$article5.category, parseInt(product === null || product === void 0 ? void 0 : (_product$article6 = product.article) === null || _product$article6 === void 0 ? void 0 : _product$article6.id_category), version, token);
|
|
560
560
|
|
|
561
561
|
case 3:
|
|
562
562
|
_services = _context3.sent;
|
|
@@ -1351,7 +1351,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1351
1351
|
|
|
1352
1352
|
body.isAproved = result === "A";
|
|
1353
1353
|
_context11.next = 12;
|
|
1354
|
-
return _axios.default.
|
|
1354
|
+
return _axios.default.put("".concat(process.env.REACT_APP_EVALUATION_ENDPOINT), body, {
|
|
1355
1355
|
headers: {
|
|
1356
1356
|
Authorization: token
|
|
1357
1357
|
}
|
|
@@ -1376,7 +1376,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1376
1376
|
}
|
|
1377
1377
|
|
|
1378
1378
|
_context11.next = 21;
|
|
1379
|
-
return _axios.default.
|
|
1379
|
+
return _axios.default.put("".concat(process.env.REACT_APP_EVALUATION_ENDPOINT), body, {
|
|
1380
1380
|
headers: {
|
|
1381
1381
|
Authorization: token
|
|
1382
1382
|
}
|
|
@@ -1839,7 +1839,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1839
1839
|
};
|
|
1840
1840
|
conceptArray.forEach(function (concept) {
|
|
1841
1841
|
body.service = concept;
|
|
1842
|
-
evaluationArray.push(_axios.default.
|
|
1842
|
+
evaluationArray.push(_axios.default.put("".concat(process.env.REACT_APP_EVALUATION_ENDPOINT), body, {
|
|
1843
1843
|
headers: {
|
|
1844
1844
|
Authorization: token
|
|
1845
1845
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<mask id="mask0_37_379" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="8" height="8">
|
|
3
|
+
<rect width="8" height="8" fill="#D9D9D9"/>
|
|
4
|
+
</mask>
|
|
5
|
+
<g mask="url(#mask0_37_379)">
|
|
6
|
+
<path d="M3.63807 5.98825H4.40893V3.62867H3.63807V5.98825ZM3.99596 3.07403C4.124 3.07403 4.2311 3.03169 4.31727 2.947C4.40345 2.86232 4.44653 2.75738 4.44653 2.6322C4.44653 2.49463 4.40331 2.38347 4.31685 2.29871C4.2304 2.21394 4.12327 2.17156 3.99547 2.17156C3.86061 2.17156 3.75166 2.21394 3.66863 2.29871C3.58559 2.38347 3.54407 2.49307 3.54407 2.6275C3.54407 2.7566 3.58737 2.8633 3.67398 2.94759C3.7606 3.03188 3.86792 3.07403 3.99596 3.07403ZM3.9991 8C3.44212 8 2.92156 7.89633 2.43741 7.68899C1.95324 7.48165 1.52964 7.19646 1.16659 6.83341C0.803541 6.47036 0.518349 6.04696 0.311013 5.5632C0.103671 5.07943 0 4.5588 0 4.0013C0 3.44379 0.103671 2.92273 0.311013 2.4381C0.518349 1.95348 0.803049 1.53104 1.16511 1.1708C1.52718 0.810554 1.95032 0.525358 2.43455 0.315215C2.91877 0.105072 3.43989 0 3.99792 0C4.55595 0 5.07764 0.10483 5.56301 0.314491C6.04837 0.524146 6.47094 0.80868 6.83072 1.16809C7.1905 1.52751 7.47533 1.95015 7.6852 2.43603C7.89507 2.92191 8 3.44396 8 4.0022C8 4.56004 7.89493 5.08098 7.68479 5.56504C7.47464 6.04909 7.18945 6.47169 6.8292 6.83282C6.46896 7.19395 6.04646 7.47876 5.56169 7.68726C5.07694 7.89575 4.55607 8 3.9991 8ZM4 7.11633C4.86173 7.11633 5.59499 6.81435 6.19977 6.21037C6.80454 5.60639 7.10693 4.8696 7.10693 4C7.10693 3.13827 6.80513 2.40501 6.20153 1.80024C5.59793 1.19546 4.86095 0.893067 3.9906 0.893067C3.12887 0.893067 2.39561 1.19487 1.79083 1.79847C1.18606 2.40207 0.883666 3.13905 0.883666 4.0094C0.883666 4.87113 1.18565 5.60439 1.78963 6.20917C2.39361 6.81394 3.1304 7.11633 4 7.11633Z" fill="#ECDD1D"/>
|
|
7
|
+
</g>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BoxAttribute } from "./index";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/molecules/BoxAttribute",
|
|
5
|
+
component: BoxAttribute,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = (args) => <BoxAttribute {...args} />;
|
|
9
|
+
|
|
10
|
+
export const BoxAttributeDefault = Template.bind({});
|
|
11
|
+
|
|
12
|
+
BoxAttributeDefault.args = {
|
|
13
|
+
text:"texto prueba",
|
|
14
|
+
titletool:"Porcentaje de requeridos",
|
|
15
|
+
texttool:"Este porcentaje indica la completitud de los atributos requeridos para todos los servicios.",
|
|
16
|
+
};
|