contentoh-components-library 21.4.29 → 21.4.30
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/Avatar/index.js +2 -3
- package/dist/components/atoms/Card/index.js +5 -46
- package/dist/components/atoms/Card/styles.js +1 -3
- package/dist/components/atoms/CheckBox/index.js +2 -7
- package/dist/components/atoms/CheckBox/styles.js +1 -1
- package/dist/components/atoms/InputFormatter/styles.js +1 -1
- package/dist/components/atoms/SliderToolTip/styles.js +1 -1
- package/dist/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/dist/components/molecules/HeaderTop/index.js +11 -68
- package/dist/components/molecules/TagAndInput/index.js +1 -1
- package/dist/components/organisms/Chat/Chat.stories.js +8 -27
- package/dist/components/organisms/Chat/ContainerItems/index.js +3 -19
- package/dist/components/organisms/Chat/ContainerItems/styles.js +1 -1
- package/dist/components/organisms/Chat/ContentChat/index.js +197 -350
- package/dist/components/organisms/Chat/Footer/index.js +39 -48
- package/dist/components/organisms/Chat/index.js +4 -49
- package/dist/components/organisms/Chat/styles.js +1 -1
- package/dist/components/organisms/FullProductNameHeader/index.js +2 -2
- package/dist/components/organisms/Modal/styles.js +1 -1
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +4 -6
- package/dist/components/pages/ProviderProductEdition/index.js +142 -117
- package/dist/components/pages/ProviderProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +3 -7
- package/dist/components/pages/RetailerProductEdition/index.js +274 -276
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/utils.js +2 -61
- package/dist/index.js +52 -247
- package/package.json +1 -4
- package/src/components/atoms/Avatar/index.js +2 -8
- package/src/components/atoms/Card/index.js +2 -35
- package/src/components/atoms/Card/styles.js +5 -41
- package/src/components/atoms/CheckBox/index.js +1 -4
- package/src/components/atoms/CheckBox/styles.js +0 -2
- package/src/components/atoms/InputFormatter/styles.js +1 -2
- package/src/components/atoms/SliderToolTip/styles.js +1 -1
- package/src/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/src/components/molecules/HeaderTop/index.js +6 -52
- package/src/components/molecules/TagAndInput/index.js +8 -10
- package/src/components/organisms/Chat/Chat.stories.js +7 -27
- package/src/components/organisms/Chat/ContainerItems/index.js +2 -18
- package/src/components/organisms/Chat/ContainerItems/styles.js +2 -14
- package/src/components/organisms/Chat/ContentChat/index.js +12 -88
- package/src/components/organisms/Chat/Footer/index.js +0 -11
- package/src/components/organisms/Chat/index.js +4 -46
- package/src/components/organisms/Chat/styles.js +0 -4
- package/src/components/organisms/FullProductNameHeader/index.js +1 -1
- package/src/components/organisms/Modal/styles.js +1 -4
- package/src/components/organisms/OrderDetail/utils/Table/utils.js +16 -6
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +4 -6
- package/src/components/pages/ProviderProductEdition/index.js +129 -97
- package/src/components/pages/ProviderProductEdition/styles.js +1 -5
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +2 -6
- package/src/components/pages/RetailerProductEdition/index.js +142 -111
- package/src/components/pages/RetailerProductEdition/styles.js +0 -4
- package/src/components/pages/RetailerProductEdition/utils.js +0 -37
- package/src/index.js +0 -15
- package/.env.development +0 -39
- package/.env.production +0 -36
- package/dist/assets/fonts/roboto/LICENSE.txt +0 -202
- package/dist/components/atoms/ImageCarousel/ImgeSlider.stories.js +0 -90
- package/dist/components/atoms/ImageCarousel/index.js +0 -120
- package/dist/components/atoms/ImageCarousel/styles.js +0 -18
- package/dist/components/atoms/PercentTag/PercentTag.stories.js +0 -31
- package/dist/components/atoms/PercentTag/index.js +0 -23
- package/dist/components/atoms/PercentTag/styles.js +0 -22
- package/dist/components/atoms/RatingStars/RatingStars.stories.js +0 -30
- package/dist/components/atoms/RatingStars/index.js +0 -53
- package/dist/components/atoms/RatingStars/styles.js +0 -18
- package/dist/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +0 -48
- package/dist/components/atoms/RetailerCatalog/index.js +0 -69
- package/dist/components/atoms/RetailerCatalog/styles.js +0 -20
- package/dist/components/atoms/RetailerOption/RetailerOption.stories.js +0 -33
- package/dist/components/atoms/RetailerOption/index.js +0 -62
- package/dist/components/atoms/RetailerOption/styles.js +0 -20
- package/dist/components/atoms/RetailersList/RetailersList.stories.js +0 -45
- package/dist/components/atoms/RetailersList/index.js +0 -46
- package/dist/components/atoms/RetailersList/styles.js +0 -18
- package/dist/components/atoms/UserCatalog/UserCatalog.stories.js +0 -73
- package/dist/components/atoms/UserCatalog/index.js +0 -101
- package/dist/components/atoms/UserCatalog/styles.js +0 -18
- package/dist/components/atoms/UserOption/UserOption.stories.js +0 -40
- package/dist/components/atoms/UserOption/index.js +0 -130
- package/dist/components/atoms/UserOption/styles.js +0 -20
- package/dist/components/atoms/UserSelector/UserSelector.stories.js +0 -40
- package/dist/components/atoms/UserSelector/index.js +0 -98
- package/dist/components/atoms/UserSelector/styles.js +0 -32
- package/dist/components/molecules/GridItem/GridItem.stories.js +0 -123
- package/dist/components/molecules/GridItem/index.js +0 -152
- package/dist/components/molecules/GridItem/styles.js +0 -20
- package/dist/components/molecules/HeaderItem/ColumnItem.js +0 -23
- package/dist/components/molecules/HeaderItem/HeaderItem.stories.js +0 -70
- package/dist/components/molecules/HeaderItem/index.js +0 -42
- package/dist/components/molecules/HeaderItem/styles.js +0 -30
- package/dist/components/molecules/RowItem/ColumnItem.js +0 -23
- package/dist/components/molecules/RowItem/RowItem.stories.js +0 -5242
- package/dist/components/molecules/RowItem/index.js +0 -58
- package/dist/components/molecules/RowItem/styles.js +0 -30
- package/dist/components/molecules/StripeCardForm/StripeCardForm.stories.js +0 -32
- package/dist/components/molecules/StripeCardForm/index.js +0 -94
- package/dist/components/molecules/StripeCardForm/paymentForm.js +0 -194
- package/dist/components/molecules/StripeCardForm/styles.js +0 -27
- package/dist/components/molecules/StripeCardSelector/CardSelector.stories.js +0 -30
- package/dist/components/molecules/StripeCardSelector/index.js +0 -120
- package/dist/components/molecules/StripeCardSelector/styles.js +0 -22
- package/dist/components/molecules/StripeCardSelector/utils.js +0 -56
- package/dist/components/organisms/GridProducts/GridProducts.stories.js +0 -5097
- package/dist/components/organisms/GridProducts/index.js +0 -63
- package/dist/components/organisms/GridProducts/styles.js +0 -18
- package/dist/components/organisms/GridProducts/utils.js +0 -149
- package/dist/components/organisms/PanelLayout/PanelLayout.stories.js +0 -87
- package/dist/components/organisms/PanelLayout/index.js +0 -29
- package/dist/components/organisms/PanelLayout/styles.js +0 -32
- package/dist/components/organisms/SideModal/SideModal.stories.js +0 -42
- package/dist/components/organisms/SideModal/index.js +0 -72
- package/dist/components/organisms/SideModal/styles.js +0 -18
- package/src/components/atoms/ImageCarousel/ImgeSlider.stories.js +0 -76
- package/src/components/atoms/ImageCarousel/index.js +0 -103
- package/src/components/atoms/ImageCarousel/styles.js +0 -79
- package/src/components/atoms/PercentTag/PercentTag.stories.js +0 -7
- package/src/components/atoms/PercentTag/index.js +0 -9
- package/src/components/atoms/PercentTag/styles.js +0 -69
- package/src/components/atoms/RatingStars/RatingStars.stories.js +0 -10
- package/src/components/atoms/RatingStars/index.js +0 -31
- package/src/components/atoms/RatingStars/styles.js +0 -28
- package/src/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +0 -36
- package/src/components/atoms/RetailerCatalog/index.js +0 -49
- package/src/components/atoms/RetailerCatalog/styles.js +0 -30
- package/src/components/atoms/RetailerOption/RetailerOption.stories.js +0 -15
- package/src/components/atoms/RetailerOption/index.js +0 -53
- package/src/components/atoms/RetailerOption/styles.js +0 -41
- package/src/components/atoms/RetailersList/RetailersList.stories.js +0 -33
- package/src/components/atoms/RetailersList/index.js +0 -20
- package/src/components/atoms/RetailersList/styles.js +0 -19
- package/src/components/atoms/UserCatalog/UserCatalog.stories.js +0 -67
- package/src/components/atoms/UserCatalog/index.js +0 -100
- package/src/components/atoms/UserCatalog/styles.js +0 -24
- package/src/components/atoms/UserOption/UserOption.stories.js +0 -25
- package/src/components/atoms/UserOption/index.js +0 -95
- package/src/components/atoms/UserOption/styles.js +0 -61
- package/src/components/atoms/UserSelector/UserSelector.stories.js +0 -25
- package/src/components/atoms/UserSelector/index.js +0 -86
- package/src/components/atoms/UserSelector/styles.js +0 -55
- package/src/components/molecules/GridItem/GridItem.stories.js +0 -126
- package/src/components/molecules/GridItem/index.js +0 -105
- package/src/components/molecules/GridItem/styles.js +0 -104
- package/src/components/molecules/HeaderItem/ColumnItem.js +0 -9
- package/src/components/molecules/HeaderItem/HeaderItem.stories.js +0 -24
- package/src/components/molecules/HeaderItem/index.js +0 -26
- package/src/components/molecules/HeaderItem/styles.js +0 -27
- package/src/components/molecules/RowItem/ColumnItem.js +0 -9
- package/src/components/molecules/RowItem/RowItem.stories.js +0 -5660
- package/src/components/molecules/RowItem/index.js +0 -45
- package/src/components/molecules/RowItem/styles.js +0 -40
- package/src/components/molecules/StripeCardForm/StripeCardForm.stories.js +0 -14
- package/src/components/molecules/StripeCardForm/index.js +0 -45
- package/src/components/molecules/StripeCardForm/paymentForm.js +0 -125
- package/src/components/molecules/StripeCardForm/styles.js +0 -74
- package/src/components/molecules/StripeCardSelector/CardSelector.stories.js +0 -12
- package/src/components/molecules/StripeCardSelector/index.js +0 -57
- package/src/components/molecules/StripeCardSelector/styles.js +0 -6
- package/src/components/molecules/StripeCardSelector/utils.js +0 -17
- package/src/components/organisms/GridProducts/GridProducts.stories.js +0 -5485
- package/src/components/organisms/GridProducts/index.js +0 -50
- package/src/components/organisms/GridProducts/styles.js +0 -14
- package/src/components/organisms/GridProducts/utils.js +0 -111
- package/src/components/organisms/PanelLayout/PanelLayout.stories.js +0 -63
- package/src/components/organisms/PanelLayout/index.js +0 -11
- package/src/components/organisms/PanelLayout/styles.js +0 -39
- package/src/components/organisms/SideModal/SideModal.stories.js +0 -23
- package/src/components/organisms/SideModal/index.js +0 -50
- package/src/components/organisms/SideModal/styles.js +0 -30
|
@@ -168,7 +168,7 @@ var Footer = function Footer(props) {
|
|
|
168
168
|
switch (_context.prev = _context.next) {
|
|
169
169
|
case 0:
|
|
170
170
|
if (!createItemsChat) {
|
|
171
|
-
_context.next =
|
|
171
|
+
_context.next = 88;
|
|
172
172
|
break;
|
|
173
173
|
}
|
|
174
174
|
|
|
@@ -200,7 +200,7 @@ var Footer = function Footer(props) {
|
|
|
200
200
|
|
|
201
201
|
case 12:
|
|
202
202
|
if ((_step = _iterator.n()).done) {
|
|
203
|
-
_context.next =
|
|
203
|
+
_context.next = 39;
|
|
204
204
|
break;
|
|
205
205
|
}
|
|
206
206
|
|
|
@@ -228,7 +228,7 @@ var Footer = function Footer(props) {
|
|
|
228
228
|
|
|
229
229
|
fileKey = "chat/";
|
|
230
230
|
_context.t0 = chatType;
|
|
231
|
-
_context.next = _context.t0 === "merchant_product" ? 26 : _context.t0 === "order_product" ? 28 : _context.t0 === "ticket" ? 30 :
|
|
231
|
+
_context.next = _context.t0 === "merchant_product" ? 26 : _context.t0 === "order_product" ? 28 : _context.t0 === "ticket" ? 30 : 32;
|
|
232
232
|
break;
|
|
233
233
|
|
|
234
234
|
case 26:
|
|
@@ -238,7 +238,7 @@ var Footer = function Footer(props) {
|
|
|
238
238
|
errorMessage = "El ID o la version del producto no es valido";
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
-
return _context.abrupt("break",
|
|
241
|
+
return _context.abrupt("break", 33);
|
|
242
242
|
|
|
243
243
|
case 28:
|
|
244
244
|
if ((0, _utils.isValidNaturalNumber)(dataChat === null || dataChat === void 0 ? void 0 : dataChat.id) && (0, _utils.isValidNaturalNumber)(dataChat === null || dataChat === void 0 ? void 0 : dataChat.version)) {
|
|
@@ -247,7 +247,7 @@ var Footer = function Footer(props) {
|
|
|
247
247
|
errorMessage = "El ID o la version del producto no es valido";
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
-
return _context.abrupt("break",
|
|
250
|
+
return _context.abrupt("break", 33);
|
|
251
251
|
|
|
252
252
|
case 30:
|
|
253
253
|
if ((0, _utils.isValidNaturalNumber)(dataChat === null || dataChat === void 0 ? void 0 : dataChat.id)) {
|
|
@@ -256,21 +256,12 @@ var Footer = function Footer(props) {
|
|
|
256
256
|
errorMessage = "El ID del ticket no es valido";
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
-
return _context.abrupt("break",
|
|
259
|
+
return _context.abrupt("break", 33);
|
|
260
260
|
|
|
261
261
|
case 32:
|
|
262
|
-
if ((0, _utils.isValidNaturalNumber)(dataChat === null || dataChat === void 0 ? void 0 : dataChat.id) && (0, _utils.isValidNaturalNumber)(dataChat === null || dataChat === void 0 ? void 0 : dataChat.version) && (0, _utils.isValidNaturalNumber)(dataChat === null || dataChat === void 0 ? void 0 : dataChat.retailerId)) {
|
|
263
|
-
fileKey += "productStatus/".concat(dataChat.id, "-").concat(dataChat === null || dataChat === void 0 ? void 0 : dataChat.version, "-").concat(dataChat === null || dataChat === void 0 ? void 0 : dataChat.retailerId, "/");
|
|
264
|
-
} else {
|
|
265
|
-
errorMessage = "El ID del ticket no es valido";
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
return _context.abrupt("break", 35);
|
|
269
|
-
|
|
270
|
-
case 34:
|
|
271
262
|
errorMessage = "El tipo de chat no se especifico de manera correcta";
|
|
272
263
|
|
|
273
|
-
case
|
|
264
|
+
case 33:
|
|
274
265
|
if (!errorMessage) {
|
|
275
266
|
today = new Date();
|
|
276
267
|
fileKey += "".concat((0, _uuid.v4)(), "-").concat(today.getTime(), ".").concat((0, _utils.getFileExtension)(file.name));
|
|
@@ -292,32 +283,32 @@ var Footer = function Footer(props) {
|
|
|
292
283
|
};
|
|
293
284
|
fileUploadRequests.push(myBucket.putObject(paramsCreate).promise());
|
|
294
285
|
|
|
295
|
-
case
|
|
286
|
+
case 37:
|
|
296
287
|
_context.next = 12;
|
|
297
288
|
break;
|
|
298
289
|
|
|
299
|
-
case
|
|
300
|
-
_context.next =
|
|
290
|
+
case 39:
|
|
291
|
+
_context.next = 44;
|
|
301
292
|
break;
|
|
302
293
|
|
|
303
|
-
case
|
|
304
|
-
_context.prev =
|
|
294
|
+
case 41:
|
|
295
|
+
_context.prev = 41;
|
|
305
296
|
_context.t1 = _context["catch"](10);
|
|
306
297
|
|
|
307
298
|
_iterator.e(_context.t1);
|
|
308
299
|
|
|
309
|
-
case
|
|
310
|
-
_context.prev =
|
|
300
|
+
case 44:
|
|
301
|
+
_context.prev = 44;
|
|
311
302
|
|
|
312
303
|
_iterator.f();
|
|
313
304
|
|
|
314
|
-
return _context.finish(
|
|
305
|
+
return _context.finish(44);
|
|
315
306
|
|
|
316
|
-
case
|
|
317
|
-
_context.next =
|
|
307
|
+
case 47:
|
|
308
|
+
_context.next = 49;
|
|
318
309
|
return Promise.allSettled(fileUploadRequests);
|
|
319
310
|
|
|
320
|
-
case
|
|
311
|
+
case 49:
|
|
321
312
|
responseAWS = _context.sent;
|
|
322
313
|
responseAWS.forEach(function (responseFile, index) {
|
|
323
314
|
if (responseFile.status === "rejected") {
|
|
@@ -327,11 +318,11 @@ var Footer = function Footer(props) {
|
|
|
327
318
|
customFiles[index].uploaded = true;
|
|
328
319
|
}
|
|
329
320
|
});
|
|
330
|
-
_context.next =
|
|
321
|
+
_context.next = 59;
|
|
331
322
|
break;
|
|
332
323
|
|
|
333
|
-
case
|
|
334
|
-
_context.prev =
|
|
324
|
+
case 53:
|
|
325
|
+
_context.prev = 53;
|
|
335
326
|
_context.t2 = _context["catch"](7);
|
|
336
327
|
console.log(_context.t2);
|
|
337
328
|
disableSecondaryContainer(false);
|
|
@@ -343,21 +334,21 @@ var Footer = function Footer(props) {
|
|
|
343
334
|
});
|
|
344
335
|
return _context.abrupt("return");
|
|
345
336
|
|
|
346
|
-
case
|
|
337
|
+
case 59:
|
|
347
338
|
// obtener las keys de los files subidos
|
|
348
339
|
items = [];
|
|
349
340
|
index = 0;
|
|
350
341
|
|
|
351
|
-
case
|
|
342
|
+
case 61:
|
|
352
343
|
if (!(index < customFiles.length)) {
|
|
353
|
-
_context.next =
|
|
344
|
+
_context.next = 74;
|
|
354
345
|
break;
|
|
355
346
|
}
|
|
356
347
|
|
|
357
348
|
_file = customFiles[index];
|
|
358
349
|
|
|
359
350
|
if (!_file.uploaded) {
|
|
360
|
-
_context.next =
|
|
351
|
+
_context.next = 71;
|
|
361
352
|
break;
|
|
362
353
|
}
|
|
363
354
|
|
|
@@ -367,14 +358,14 @@ var Footer = function Footer(props) {
|
|
|
367
358
|
}; // caso imagen -> obtener width y height
|
|
368
359
|
|
|
369
360
|
if (!(_file.itemType === "img")) {
|
|
370
|
-
_context.next =
|
|
361
|
+
_context.next = 70;
|
|
371
362
|
break;
|
|
372
363
|
}
|
|
373
364
|
|
|
374
|
-
_context.next =
|
|
365
|
+
_context.next = 68;
|
|
375
366
|
return (0, _utils.getImageSize)(files[index]);
|
|
376
367
|
|
|
377
|
-
case
|
|
368
|
+
case 68:
|
|
378
369
|
imgSize = _context.sent;
|
|
379
370
|
|
|
380
371
|
if (imgSize) {
|
|
@@ -382,31 +373,31 @@ var Footer = function Footer(props) {
|
|
|
382
373
|
valueItem.height = imgSize.height;
|
|
383
374
|
}
|
|
384
375
|
|
|
385
|
-
case
|
|
376
|
+
case 70:
|
|
386
377
|
items.push({
|
|
387
378
|
type: _file.itemType,
|
|
388
379
|
value: JSON.stringify(valueItem)
|
|
389
380
|
});
|
|
390
381
|
|
|
391
|
-
case
|
|
382
|
+
case 71:
|
|
392
383
|
index++;
|
|
393
|
-
_context.next =
|
|
384
|
+
_context.next = 61;
|
|
394
385
|
break;
|
|
395
386
|
|
|
396
|
-
case
|
|
387
|
+
case 74:
|
|
397
388
|
if (!items.length) {
|
|
398
|
-
_context.next =
|
|
389
|
+
_context.next = 82;
|
|
399
390
|
break;
|
|
400
391
|
}
|
|
401
392
|
|
|
402
|
-
_context.next =
|
|
393
|
+
_context.next = 77;
|
|
403
394
|
return createItemsChat(items);
|
|
404
395
|
|
|
405
|
-
case
|
|
396
|
+
case 77:
|
|
406
397
|
responseError = _context.sent;
|
|
407
398
|
|
|
408
399
|
if (!responseError) {
|
|
409
|
-
_context.next =
|
|
400
|
+
_context.next = 82;
|
|
410
401
|
break;
|
|
411
402
|
}
|
|
412
403
|
|
|
@@ -419,7 +410,7 @@ var Footer = function Footer(props) {
|
|
|
419
410
|
disableSecondaryContainer(false);
|
|
420
411
|
return _context.abrupt("return");
|
|
421
412
|
|
|
422
|
-
case
|
|
413
|
+
case 82:
|
|
423
414
|
// obtener los errores de los files no subidos a AWS
|
|
424
415
|
failedFiles = [];
|
|
425
416
|
errorDetailFiles = "";
|
|
@@ -448,12 +439,12 @@ var Footer = function Footer(props) {
|
|
|
448
439
|
disableSecondaryContainer(false);
|
|
449
440
|
setFilesPreview(failedFiles);
|
|
450
441
|
|
|
451
|
-
case
|
|
442
|
+
case 88:
|
|
452
443
|
case "end":
|
|
453
444
|
return _context.stop();
|
|
454
445
|
}
|
|
455
446
|
}
|
|
456
|
-
}, _callee, null, [[7,
|
|
447
|
+
}, _callee, null, [[7, 53], [10, 41, 44, 47]]);
|
|
457
448
|
}));
|
|
458
449
|
|
|
459
450
|
return function sendFilesPreview() {
|
|
@@ -30,8 +30,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
30
30
|
var Chat = function Chat(props) {
|
|
31
31
|
var chatType = props.chatType,
|
|
32
32
|
chatContainerType = props.chatContainerType,
|
|
33
|
-
|
|
34
|
-
chatData = _props$chatData === void 0 ? {} : _props$chatData,
|
|
33
|
+
chatData = props.chatData,
|
|
35
34
|
classNameContainerFixed = props.classNameContainerFixed,
|
|
36
35
|
_props$size = props.size,
|
|
37
36
|
size = _props$size === void 0 ? 14 : _props$size;
|
|
@@ -47,8 +46,7 @@ var Chat = function Chat(props) {
|
|
|
47
46
|
setData = _useState4[1];
|
|
48
47
|
|
|
49
48
|
var _ref = chatData || {},
|
|
50
|
-
ticketCompany = _ref.ticketCompany
|
|
51
|
-
retailerId = _ref.retailerId;
|
|
49
|
+
ticketCompany = _ref.ticketCompany;
|
|
52
50
|
|
|
53
51
|
(0, _react.useEffect)(function () {
|
|
54
52
|
switch (chatType) {
|
|
@@ -64,10 +62,6 @@ var Chat = function Chat(props) {
|
|
|
64
62
|
validateChatTicket();
|
|
65
63
|
break;
|
|
66
64
|
|
|
67
|
-
case "product_status":
|
|
68
|
-
validateProductStatus();
|
|
69
|
-
break;
|
|
70
|
-
|
|
71
65
|
default:
|
|
72
66
|
setData({
|
|
73
67
|
code: 404,
|
|
@@ -77,41 +71,6 @@ var Chat = function Chat(props) {
|
|
|
77
71
|
}
|
|
78
72
|
}, [chatType]);
|
|
79
73
|
|
|
80
|
-
var validateProductStatus = function validateProductStatus() {
|
|
81
|
-
var userToken = chatData.userToken,
|
|
82
|
-
id = chatData.id,
|
|
83
|
-
version = chatData.version,
|
|
84
|
-
retailerId = chatData.retailerId,
|
|
85
|
-
status = chatData.status,
|
|
86
|
-
orderId = chatData.orderId;
|
|
87
|
-
if (!isValidGeneral(userToken, id)) return; // validar el ID de la cadena asociada al producto en la OT
|
|
88
|
-
|
|
89
|
-
if (!(0, _utils.isValidNaturalNumber)(retailerId)) {
|
|
90
|
-
setDataError("La cadena relacionada al producto no es válida");
|
|
91
|
-
return;
|
|
92
|
-
} // validar el ID de la version asociada al producto en la OT
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
if (!(0, _utils.isValidNaturalNumber)(version)) {
|
|
96
|
-
setDataError("La versión del producto no es válida");
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if (orderId && !(0, _utils.isValidNaturalNumber)(orderId)) {
|
|
101
|
-
setDataError("La orden del producto no es válida");
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
setData({
|
|
106
|
-
userToken: userToken,
|
|
107
|
-
id: id,
|
|
108
|
-
version: version,
|
|
109
|
-
retailerId: retailerId,
|
|
110
|
-
orderId: orderId,
|
|
111
|
-
status: status
|
|
112
|
-
});
|
|
113
|
-
};
|
|
114
|
-
|
|
115
74
|
var isValidGeneral = function isValidGeneral(userToken, id) {
|
|
116
75
|
// validar token del user
|
|
117
76
|
if ((0, _utils.isStringEmpty)(userToken)) {
|
|
@@ -258,9 +217,7 @@ var Chat = function Chat(props) {
|
|
|
258
217
|
dataChat: data,
|
|
259
218
|
showBtnClose: false,
|
|
260
219
|
ticketCompany: ticketCompany,
|
|
261
|
-
activeRetailer: props.activeRetailer
|
|
262
|
-
id: retailerId
|
|
263
|
-
}
|
|
220
|
+
activeRetailer: props.activeRetailer
|
|
264
221
|
})
|
|
265
222
|
});
|
|
266
223
|
} else {
|
|
@@ -292,9 +249,7 @@ var Chat = function Chat(props) {
|
|
|
292
249
|
onClickBtnClose: function onClickBtnClose() {
|
|
293
250
|
setShowPopUpChat(false);
|
|
294
251
|
},
|
|
295
|
-
activeRetailer: props.activeRetailer
|
|
296
|
-
id: retailerId
|
|
297
|
-
}
|
|
252
|
+
activeRetailer: props.activeRetailer
|
|
298
253
|
})
|
|
299
254
|
})
|
|
300
255
|
})]
|
|
@@ -16,7 +16,7 @@ var _variables = require("../../../global-files/variables");
|
|
|
16
16
|
var _templateObject, _templateObject2, _templateObject3;
|
|
17
17
|
|
|
18
18
|
// Container para chat fixed
|
|
19
|
-
var ContainerFixed = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: auto;\n max-width: 550px;\n min-width: 325px;\n height: 100%;\n flex-grow: 2;\n background-color: white;\n border: 1px solid #f0f0f0;\n z-index: 1000;\n padding: 0px;\n @media (max-width:
|
|
19
|
+
var ContainerFixed = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: auto;\n max-width: 550px;\n min-width: 325px;\n height: 100%;\n flex-grow: 2;\n background-color: white;\n border: 1px solid #f0f0f0;\n z-index: 1000;\n padding: 0px;\n @media (max-width: 600px) {\n width: 90%;\n min-width: 300px;\n }\n"])));
|
|
20
20
|
|
|
21
21
|
exports.ContainerFixed = ContainerFixed;
|
|
22
22
|
|
|
@@ -43,7 +43,7 @@ var FullProductNameHeader = function FullProductNameHeader(_ref) {
|
|
|
43
43
|
|
|
44
44
|
(0, _react.useEffect)(function () {
|
|
45
45
|
var rtls = (headerData === null || headerData === void 0 ? void 0 : headerData.retailers) || (headerData === null || headerData === void 0 ? void 0 : headerData.retailersAvailable);
|
|
46
|
-
servicesData &&
|
|
46
|
+
servicesData && rtls.forEach(function (rt) {
|
|
47
47
|
var element = [];
|
|
48
48
|
servicesData.forEach(function (sd) {
|
|
49
49
|
if (sd.id_retailer === rt.id) {
|
|
@@ -52,7 +52,7 @@ var FullProductNameHeader = function FullProductNameHeader(_ref) {
|
|
|
52
52
|
|
|
53
53
|
rt["services"] = element;
|
|
54
54
|
});
|
|
55
|
-
})
|
|
55
|
+
});
|
|
56
56
|
setRetailers(rtls);
|
|
57
57
|
}, [servicesData]);
|
|
58
58
|
|
|
@@ -15,6 +15,6 @@ var _variables = require("../../../global-files/variables");
|
|
|
15
15
|
|
|
16
16
|
var _templateObject;
|
|
17
17
|
|
|
18
|
-
var ContainerModal = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: 100%;\n overflow: auto;\n display: grid;\n place-items: center;\n background-color: rgba(0, 0, 0, 0.4);\n\n .contentModal {\n width: fit-content;\n max-width: 80%;\n min-width: 80px;\n height: fit-content;\n max-height: 90%;\n min-height: 120px;\n display: flex;\n flex-direction: column;\n align-items: center;\n background-color: white;\n border-radius: 10px;\n padding: 25px 25px 20px 25px;\n box-shadow: 0px 2px 4px 0px #00000040;\n\n header {\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n gap: 6px;\n\n .label-title {\n width: 100%;\n text-align: center;\n font-family: ", ", sans-serif;\n font-size: 17px;\n line-height: 1.2;\n color: #262626;\n white-space: pre-wrap;\n }\n
|
|
18
|
+
var ContainerModal = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: 100%;\n overflow: auto;\n display: grid;\n place-items: center;\n background-color: rgba(0, 0, 0, 0.4);\n\n .contentModal {\n width: fit-content;\n max-width: 80%;\n min-width: 80px;\n height: fit-content;\n max-height: 90%;\n min-height: 120px;\n display: flex;\n flex-direction: column;\n align-items: center;\n background-color: white;\n border-radius: 10px;\n padding: 25px 25px 20px 25px;\n box-shadow: 0px 2px 4px 0px #00000040;\n\n header {\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n gap: 6px;\n margin-bottom: 20px;\n\n .label-title {\n width: 100%;\n text-align: center;\n font-family: ", ", sans-serif;\n font-size: 17px;\n line-height: 1.2;\n color: #262626;\n white-space: pre-wrap;\n }\n }\n\n .iconModal {\n width: 50px;\n height: 50px;\n font-size: 30px;\n border-width: 4px;\n margin-bottom: 20px;\n overflow: hidden;\n\n &.iconModal-error {\n background-color: #953737;\n border-color: #953737;\n color: white;\n }\n &.iconModal-warning {\n font-size: 27px;\n padding-bottom: 8px;\n color: #af9647;\n border-color: #af9647;\n }\n &.iconModal-info {\n border-color: #9e3e26;\n color: #9e3e26;\n }\n &.iconModal-success {\n }\n }\n\n .label-message {\n width: 100%;\n text-align: center;\n font-family: ", ", sans-serif;\n font-size: 13px;\n color: #707070;\n white-space: pre-wrap;\n }\n\n .container-customComponent {\n width: 100%;\n max-height: 50vh;\n display: flex;\n flex-direction: column;\n margin-top: 20px;\n padding: 0px 0px;\n //border: 1px solid red;\n }\n\n .container-buttons {\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: center;\n gap: 12px;\n margin-top: 20px;\n //border: 1px solid red;\n }\n }\n"])), _variables.FontFamily.RobotoMedium, _variables.FontFamily.RobotoRegular);
|
|
19
19
|
|
|
20
20
|
exports.ContainerModal = ContainerModal;
|
|
@@ -31,10 +31,10 @@ ProviderProductEditionDefault.args = {
|
|
|
31
31
|
"Ficha técnica": false,
|
|
32
32
|
Imágenes: false
|
|
33
33
|
},
|
|
34
|
-
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
35
|
-
articleId:
|
|
36
|
-
category:
|
|
37
|
-
version:
|
|
34
|
+
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJmNTkyN2Y4ZS1jYmY3LTQ5MjItOWUwOS1lNjllYzBiMjczMWEiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6ImY1OTI3ZjhlLWNiZjctNDkyMi05ZTA5LWU2OWVjMGIyNzMxYSIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiIwZmUxYTZjMS05MzcyLTRiNjktOTgwMi1lN2QxOGM2MzU4YzQiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY5MzMzODMzMiwibmFtZSI6IklzbWFlbCBMb3BleiIsInBob25lX251bWJlciI6Iis1MjMxMTEzNjYzMzYiLCJleHAiOjE2OTMzNDE5MzIsImlhdCI6MTY5MzMzODMzMiwiZW1haWwiOiJpbG9wZXpAY29udGVudG9oLmNvbSJ9.lQwTS_RbJalEPmmpWcBsVYd8xx4tkw3U6uyW_laE6ucyHQpXSXYMfadAxxV2PZ5ObbgmX98nFKj32E2F4CxHxw3W7B1Wj7ZoGML409GjlylQ1RuVVHjwTw0OH5TtveV1JNNpts0belvzxbk5vX9E1vKoZLOKn8gO9yaFe0YawKjS0hW-P4NcjIonsNJ5KWMsh0fJCM2oAKAk8oAGZcszYHknMPF6ahf-fWeboVuK89UEsKlQukr7W8fnIePFI8aSlKM1nG0I7nOT_1734Pf-A9QQDXEwhfj8NMHHICb2c_ECgHPEspM9VxIR6Lbws-gCTSG6FTMjsIFKU3EqaQvlVw",
|
|
35
|
+
articleId: 39485,
|
|
36
|
+
category: 11,
|
|
37
|
+
version: 3,
|
|
38
38
|
productSelected: {
|
|
39
39
|
orderId: 15275,
|
|
40
40
|
status: "AA",
|
|
@@ -160,8 +160,6 @@ ProviderProductEditionDefault.args = {
|
|
|
160
160
|
search: "",
|
|
161
161
|
hash: "",
|
|
162
162
|
state: {
|
|
163
|
-
withChat: true,
|
|
164
|
-
chatType: "product_status",
|
|
165
163
|
origin: "RequestWithContentoh"
|
|
166
164
|
},
|
|
167
165
|
key: "24vwut"
|