contentoh-components-library 21.3.47 → 21.3.49
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/.env.development +0 -2
- package/dist/assets/fonts/roboto/LICENSE.txt +202 -0
- package/dist/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/dist/components/molecules/HeaderTop/index.js +11 -68
- package/dist/components/organisms/Chat/Chat.stories.js +1 -21
- package/dist/components/organisms/Chat/ContainerItems/index.js +1 -1
- package/dist/components/organisms/Chat/ContentChat/index.js +191 -343
- package/dist/components/organisms/Chat/Footer/index.js +39 -48
- package/dist/components/organisms/Chat/index.js +3 -48
- package/dist/components/organisms/OrderDetail/OrderDetail.stories.js +1 -1
- package/dist/components/organisms/OrderDetail/utils/Table/styles.js +1 -1
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +83 -112
- package/dist/components/pages/ProviderProductEdition/index.js +9 -2
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +70 -85
- package/dist/components/pages/RetailerProductEdition/index.js +2 -4
- package/package.json +1 -1
- package/src/components/molecules/AvatarAndValidation/index.js +1 -1
- package/src/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/src/components/molecules/HeaderTop/index.js +6 -52
- package/src/components/organisms/Chat/Chat.stories.js +0 -21
- package/src/components/organisms/Chat/ContainerItems/index.js +1 -4
- package/src/components/organisms/Chat/ContentChat/index.js +6 -81
- package/src/components/organisms/Chat/Footer/index.js +0 -11
- package/src/components/organisms/Chat/index.js +3 -47
- package/src/components/organisms/OrderDetail/OrderDetail.stories.js +1 -1
- package/src/components/organisms/OrderDetail/utils/Table/styles.js +2 -3
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +83 -120
- package/src/components/pages/ProviderProductEdition/index.js +3 -1
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +75 -89
- package/src/components/pages/RetailerProductEdition/index.js +0 -2
|
@@ -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() {
|
|
@@ -46,8 +46,7 @@ var Chat = function Chat(props) {
|
|
|
46
46
|
setData = _useState4[1];
|
|
47
47
|
|
|
48
48
|
var _ref = chatData || {},
|
|
49
|
-
ticketCompany = _ref.ticketCompany
|
|
50
|
-
retailerId = _ref.retailerId;
|
|
49
|
+
ticketCompany = _ref.ticketCompany;
|
|
51
50
|
|
|
52
51
|
(0, _react.useEffect)(function () {
|
|
53
52
|
switch (chatType) {
|
|
@@ -63,10 +62,6 @@ var Chat = function Chat(props) {
|
|
|
63
62
|
validateChatTicket();
|
|
64
63
|
break;
|
|
65
64
|
|
|
66
|
-
case "product_status":
|
|
67
|
-
validateProductStatus();
|
|
68
|
-
break;
|
|
69
|
-
|
|
70
65
|
default:
|
|
71
66
|
setData({
|
|
72
67
|
code: 404,
|
|
@@ -76,41 +71,6 @@ var Chat = function Chat(props) {
|
|
|
76
71
|
}
|
|
77
72
|
}, [chatType]);
|
|
78
73
|
|
|
79
|
-
var validateProductStatus = function validateProductStatus() {
|
|
80
|
-
var userToken = chatData.userToken,
|
|
81
|
-
id = chatData.id,
|
|
82
|
-
version = chatData.version,
|
|
83
|
-
retailerId = chatData.retailerId,
|
|
84
|
-
status = chatData.status,
|
|
85
|
-
orderId = chatData.orderId;
|
|
86
|
-
if (!isValidGeneral(userToken, id)) return; // validar el ID de la cadena asociada al producto en la OT
|
|
87
|
-
|
|
88
|
-
if (!(0, _utils.isValidNaturalNumber)(retailerId)) {
|
|
89
|
-
setDataError("La cadena relacionada al producto no es válida");
|
|
90
|
-
return;
|
|
91
|
-
} // validar el ID de la version asociada al producto en la OT
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
if (!(0, _utils.isValidNaturalNumber)(version)) {
|
|
95
|
-
setDataError("La versión del producto no es válida");
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
if (orderId && !(0, _utils.isValidNaturalNumber)(orderId)) {
|
|
100
|
-
setDataError("La orden del producto no es válida");
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
setData({
|
|
105
|
-
userToken: userToken,
|
|
106
|
-
id: id,
|
|
107
|
-
version: version,
|
|
108
|
-
retailerId: retailerId,
|
|
109
|
-
orderId: orderId,
|
|
110
|
-
status: status
|
|
111
|
-
});
|
|
112
|
-
};
|
|
113
|
-
|
|
114
74
|
var isValidGeneral = function isValidGeneral(userToken, id) {
|
|
115
75
|
// validar token del user
|
|
116
76
|
if ((0, _utils.isStringEmpty)(userToken)) {
|
|
@@ -133,7 +93,6 @@ var Chat = function Chat(props) {
|
|
|
133
93
|
id = chatData.id,
|
|
134
94
|
orderId = chatData.orderId,
|
|
135
95
|
retailerId = chatData.retailerId;
|
|
136
|
-
console.log(chatData, "chatData");
|
|
137
96
|
if (!isValidGeneral(userToken, id)) return; // validar el ID de la OT en donde se encuentra el producto
|
|
138
97
|
|
|
139
98
|
if (!(0, _utils.isValidNaturalNumber)(orderId)) {
|
|
@@ -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
|
})]
|
|
@@ -229,7 +229,7 @@ OrderDetailDefault.args = {
|
|
|
229
229
|
company_name: "GRUPO BRAHMA",
|
|
230
230
|
date: "2022-11-12T00:00:00.000Z",
|
|
231
231
|
type: "En oficina",
|
|
232
|
-
id_order:
|
|
232
|
+
id_order: 15202,
|
|
233
233
|
status: "PA",
|
|
234
234
|
total: 731.2639770507812,
|
|
235
235
|
timestamp: "2022-11-12T22:48:23.000Z",
|
|
@@ -17,7 +17,7 @@ var Header = _styledComponents.default.div(_templateObject || (_templateObject =
|
|
|
17
17
|
|
|
18
18
|
exports.Header = Header;
|
|
19
19
|
|
|
20
|
-
var Column = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n height: 35px;\n width: ", ";\n padding: 10px 15px;\n font-family: Roboto;\n font-size: 12px;\n color: ", ";\n font-weight: ", ";\n white-space: nowrap;\n text-overflow: ellipsis;\n .flex {\n display: flex;\n }\n .material-icons.small {\n font-size: 18px;\n color: #b3b3b3;\n }\n .center {\n margin: auto;\n }\n &:nth-child(2) {\n overflow: hidden;\n }\n
|
|
20
|
+
var Column = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n height: 35px;\n width: ", ";\n padding: 10px 15px;\n font-family: Roboto;\n font-size: 12px;\n color: ", ";\n font-weight: ", ";\n white-space: nowrap;\n text-overflow: ellipsis;\n .flex {\n display: flex;\n }\n .material-icons.small {\n font-size: 18px;\n color: #b3b3b3;\n }\n .center {\n margin: auto;\n }\n &:nth-child(-n + 2) {\n overflow: hidden;\n }\n .tooltip {\n position: relative;\n display: inline-block;\n }\n\n .tooltip .tooltiptext {\n visibility: hidden;\n background-color: #fff;\n color: black;\n text-align: center;\n padding: 5px 0;\n border-radius: 3px;\n\n position: absolute;\n z-index: 1;\n top: -8px;\n left: 3px;\n font-family: Roboto;\n font-size: 10px;\n padding: 2px 5px;\n }\n\n .tooltip:hover .tooltiptext {\n visibility: visible;\n }\n"])), function (_ref) {
|
|
21
21
|
var width = _ref.width;
|
|
22
22
|
return "".concat(width, "px");
|
|
23
23
|
}, function (_ref2) {
|
|
@@ -31,35 +31,32 @@ ProviderProductEditionDefault.args = {
|
|
|
31
31
|
"Ficha técnica": false,
|
|
32
32
|
Imágenes: false
|
|
33
33
|
},
|
|
34
|
-
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
34
|
+
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJmYjIzMDRlZi1lMWEyLTRjMmItODg3NC1lYjc1NGU0ZjYzMzIiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6ImZiMjMwNGVmLWUxYTItNGMyYi04ODc0LWViNzU0ZTRmNjMzMiIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiI4MGFmMGIwNi1iMGYyLTQ5YjgtYjczYy1lMzQ5MTFmMGVkNmEiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY4MzkxOTkxMSwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY4MzkyMzUxMSwiaWF0IjoxNjgzOTE5OTExLCJlbWFpbCI6ImNhZGVuYWJvZGVnYUBhbGxmcmVlbWFpbC5uZXQifQ.h8rhLTIPMxhCs85K5JIn1efY4yZ5TAvzaBbLItby8W7HdLnNjK4Cv39mTCprrk0yjmKhOGIA1gyVeXcm18n5LqSLmOyz85uwTRwZ91s2on49rX3cO9FZp5S3tg4MseNKePBBetwycXttVm_aJZOLGvt2XoAfdxXHTUk2uDu7IphAdz746qrgXxSFyq_cWX9SdWrYhAn_XjHbNOqOuvcmbD7FquvUq-RYWqTAyeT9qeZUjA8oJvENkpohybxc6OoKaPOcdxWvZsvNcFxpEzjHQja3dAQnlA-Pc9_iJf9S4fzf3d3aqXIIDQuozJiixnT6-kK29p4MVbEJ2r4Pd2Ox2A",
|
|
35
35
|
articleId: 238,
|
|
36
36
|
category: 846,
|
|
37
37
|
version: 2,
|
|
38
38
|
productSelected: {
|
|
39
|
-
orderId:
|
|
40
|
-
article_status: "
|
|
41
|
-
datasheet_status: "
|
|
42
|
-
description_status: "
|
|
43
|
-
images_status: "
|
|
39
|
+
orderId: 15104,
|
|
40
|
+
article_status: "AP",
|
|
41
|
+
datasheet_status: "AP",
|
|
42
|
+
description_status: "AP",
|
|
43
|
+
images_status: "AP",
|
|
44
44
|
prio: "none",
|
|
45
45
|
version: 3,
|
|
46
46
|
brand: null,
|
|
47
47
|
article: {
|
|
48
|
-
category: "
|
|
49
|
-
company_name: "
|
|
50
|
-
id_company:
|
|
48
|
+
category: "Juguetes|Juguetes|Juguetes",
|
|
49
|
+
company_name: "Financiado Bodega",
|
|
50
|
+
id_company: 912,
|
|
51
51
|
country: "México",
|
|
52
|
-
id_category: "
|
|
53
|
-
id_article:
|
|
54
|
-
name: "
|
|
55
|
-
upc: "
|
|
52
|
+
id_category: "4208",
|
|
53
|
+
id_article: 37563,
|
|
54
|
+
name: "CARRIOLA Y MUNECA 30CM",
|
|
55
|
+
upc: "26253713351"
|
|
56
56
|
},
|
|
57
57
|
retailers: [{
|
|
58
|
-
id:
|
|
59
|
-
name: "
|
|
60
|
-
}, {
|
|
61
|
-
id: 68,
|
|
62
|
-
name: "The Home Depot Dropship"
|
|
58
|
+
id: 70,
|
|
59
|
+
name: "Bodega Aurrera"
|
|
63
60
|
}],
|
|
64
61
|
services: {
|
|
65
62
|
datasheets: 1,
|
|
@@ -67,50 +64,44 @@ ProviderProductEditionDefault.args = {
|
|
|
67
64
|
images: 1
|
|
68
65
|
},
|
|
69
66
|
statusByRetailer: {
|
|
70
|
-
|
|
71
|
-
datasheet: "
|
|
72
|
-
description: "
|
|
73
|
-
images: "
|
|
67
|
+
70: {
|
|
68
|
+
datasheet: "AP",
|
|
69
|
+
description: "AP",
|
|
70
|
+
images: "AP"
|
|
74
71
|
}
|
|
75
72
|
},
|
|
76
|
-
retailersWithService: ["
|
|
77
|
-
id_article:
|
|
73
|
+
retailersWithService: ["70"],
|
|
74
|
+
id_article: 37563,
|
|
78
75
|
retailersAvailable: [{
|
|
79
|
-
id:
|
|
80
|
-
name: "
|
|
81
|
-
}, {
|
|
82
|
-
id: 68,
|
|
83
|
-
name: "The Home Depot Dropship"
|
|
76
|
+
id: 70,
|
|
77
|
+
name: "Bodega Aurrera"
|
|
84
78
|
}]
|
|
85
79
|
},
|
|
86
80
|
productToEdit: {
|
|
87
|
-
ArticleId:
|
|
88
|
-
idCategory: "
|
|
81
|
+
ArticleId: 37563,
|
|
82
|
+
idCategory: "4208",
|
|
89
83
|
product: {
|
|
90
|
-
orderId:
|
|
91
|
-
article_status: "
|
|
92
|
-
datasheet_status: "
|
|
93
|
-
description_status: "
|
|
94
|
-
images_status: "
|
|
84
|
+
orderId: 15104,
|
|
85
|
+
article_status: "AP",
|
|
86
|
+
datasheet_status: "AP",
|
|
87
|
+
description_status: "AP",
|
|
88
|
+
images_status: "AP",
|
|
95
89
|
prio: "none",
|
|
96
90
|
version: 3,
|
|
97
91
|
brand: null,
|
|
98
92
|
article: {
|
|
99
|
-
category: "
|
|
100
|
-
company_name: "
|
|
101
|
-
id_company:
|
|
93
|
+
category: "Juguetes|Juguetes|Juguetes",
|
|
94
|
+
company_name: "Financiado Bodega",
|
|
95
|
+
id_company: 912,
|
|
102
96
|
country: "México",
|
|
103
|
-
id_category: "
|
|
104
|
-
id_article:
|
|
105
|
-
name: "
|
|
106
|
-
upc: "
|
|
97
|
+
id_category: "4208",
|
|
98
|
+
id_article: 37563,
|
|
99
|
+
name: "CARRIOLA Y MUNECA 30CM",
|
|
100
|
+
upc: "26253713351"
|
|
107
101
|
},
|
|
108
102
|
retailers: [{
|
|
109
|
-
id:
|
|
110
|
-
name: "
|
|
111
|
-
}, {
|
|
112
|
-
id: 68,
|
|
113
|
-
name: "The Home Depot Dropship"
|
|
103
|
+
id: 70,
|
|
104
|
+
name: "Bodega Aurrera"
|
|
114
105
|
}],
|
|
115
106
|
services: {
|
|
116
107
|
datasheets: 1,
|
|
@@ -118,106 +109,86 @@ ProviderProductEditionDefault.args = {
|
|
|
118
109
|
images: 1
|
|
119
110
|
},
|
|
120
111
|
statusByRetailer: {
|
|
121
|
-
|
|
122
|
-
datasheet: "
|
|
123
|
-
description: "
|
|
124
|
-
images: "
|
|
112
|
+
70: {
|
|
113
|
+
datasheet: "AP",
|
|
114
|
+
description: "AP",
|
|
115
|
+
images: "AP"
|
|
125
116
|
}
|
|
126
117
|
},
|
|
127
|
-
retailersWithService: ["
|
|
128
|
-
id_article:
|
|
118
|
+
retailersWithService: ["70"],
|
|
119
|
+
id_article: 37563,
|
|
129
120
|
retailersAvailable: [{
|
|
130
|
-
id:
|
|
131
|
-
name: "
|
|
132
|
-
}, {
|
|
133
|
-
id: 68,
|
|
134
|
-
name: "The Home Depot Dropship"
|
|
121
|
+
id: 70,
|
|
122
|
+
name: "Bodega Aurrera"
|
|
135
123
|
}]
|
|
136
124
|
}
|
|
137
125
|
},
|
|
138
126
|
location: {
|
|
139
|
-
pathname: "/
|
|
127
|
+
pathname: "/products/37563/datasheet",
|
|
140
128
|
search: "",
|
|
141
129
|
hash: "",
|
|
142
130
|
state: {
|
|
143
|
-
|
|
144
|
-
chatType: "product_status"
|
|
131
|
+
origin: "RequestWithContentoh"
|
|
145
132
|
},
|
|
146
|
-
key: "
|
|
133
|
+
key: "144zh0"
|
|
147
134
|
},
|
|
148
135
|
user: {
|
|
149
|
-
id_user:
|
|
150
|
-
name: "
|
|
151
|
-
last_name: "
|
|
152
|
-
email: "
|
|
153
|
-
position: "
|
|
154
|
-
telephone: "+
|
|
136
|
+
id_user: 132,
|
|
137
|
+
name: "Bodega",
|
|
138
|
+
last_name: "Aurrera",
|
|
139
|
+
email: "cadenabodega@allfreemail.net",
|
|
140
|
+
position: "TI",
|
|
141
|
+
telephone: "+529999999999",
|
|
155
142
|
country: "México",
|
|
156
|
-
id_company:
|
|
157
|
-
id_cognito: "
|
|
143
|
+
id_company: 912,
|
|
144
|
+
id_cognito: "fb2304ef-e1a2-4c2b-8874-eb754e4f6332",
|
|
158
145
|
birth_Date: null,
|
|
159
|
-
about_me:
|
|
160
|
-
zip_code:
|
|
161
|
-
address:
|
|
162
|
-
job:
|
|
163
|
-
id_stripe:
|
|
146
|
+
about_me: null,
|
|
147
|
+
zip_code: null,
|
|
148
|
+
address: null,
|
|
149
|
+
job: null,
|
|
150
|
+
id_stripe: null,
|
|
164
151
|
id_role: 0,
|
|
165
152
|
active: 1,
|
|
166
153
|
is_retailer: 1,
|
|
167
|
-
email_notify:
|
|
154
|
+
email_notify: 1,
|
|
168
155
|
is_user_tech: null,
|
|
169
156
|
membership: {
|
|
170
|
-
id:
|
|
171
|
-
start_date: "2022-
|
|
172
|
-
end_date: "2023-
|
|
173
|
-
planID:
|
|
174
|
-
plan: "
|
|
157
|
+
id: 101,
|
|
158
|
+
start_date: "2022-12-22T19:16:53.000Z",
|
|
159
|
+
end_date: "2023-12-22T19:16:53.000Z",
|
|
160
|
+
planID: 8,
|
|
161
|
+
plan: "prod_KtlhECVSFG2iro",
|
|
175
162
|
name: "Plan Pro",
|
|
176
|
-
user_limit: "
|
|
177
|
-
products_limit: "
|
|
178
|
-
type: "
|
|
163
|
+
user_limit: "20",
|
|
164
|
+
products_limit: "5000",
|
|
165
|
+
type: "Enterprise"
|
|
179
166
|
},
|
|
180
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
167
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-132/132.png?1683921632099"
|
|
181
168
|
},
|
|
182
169
|
company: {
|
|
183
|
-
id_company:
|
|
184
|
-
trade_name: "
|
|
185
|
-
company_name: "
|
|
186
|
-
rfc: "
|
|
187
|
-
adress: "
|
|
170
|
+
id_company: 912,
|
|
171
|
+
trade_name: "Financiado Bodega",
|
|
172
|
+
company_name: "Bodega",
|
|
173
|
+
rfc: "9395jwhs",
|
|
174
|
+
adress: "Toluca",
|
|
188
175
|
about_company: null,
|
|
189
176
|
telephone: null,
|
|
190
177
|
web_site: null,
|
|
191
178
|
zip_code: null,
|
|
192
179
|
email: null,
|
|
193
180
|
social_link: null,
|
|
194
|
-
is_retailer:
|
|
181
|
+
is_retailer: 0,
|
|
195
182
|
financedRetailers: [{
|
|
196
|
-
id:
|
|
197
|
-
name: "
|
|
183
|
+
id: 70,
|
|
184
|
+
name: "Bodega Aurrera",
|
|
198
185
|
country: "México",
|
|
199
186
|
id_region: 1,
|
|
200
187
|
active: 1
|
|
201
188
|
}],
|
|
202
189
|
retailers: [{
|
|
203
|
-
id:
|
|
204
|
-
name: "
|
|
205
|
-
country: "México"
|
|
206
|
-
}, {
|
|
207
|
-
id: 60,
|
|
208
|
-
name: "The Home Depot Resizing",
|
|
209
|
-
country: "México"
|
|
210
|
-
}, {
|
|
211
|
-
id: 61,
|
|
212
|
-
name: "Home Depot TAB",
|
|
213
|
-
country: "México"
|
|
214
|
-
}, {
|
|
215
|
-
id: 68,
|
|
216
|
-
name: "The Home Depot Dropship",
|
|
217
|
-
country: "México"
|
|
218
|
-
}, {
|
|
219
|
-
id: 58,
|
|
220
|
-
name: "The Home Depot Golden",
|
|
190
|
+
id: 70,
|
|
191
|
+
name: "Bodega Aurrera",
|
|
221
192
|
country: "México"
|
|
222
193
|
}]
|
|
223
194
|
},
|
|
@@ -206,7 +206,7 @@ var myBucket = new _awsSdk.default.S3({
|
|
|
206
206
|
});
|
|
207
207
|
|
|
208
208
|
var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
209
|
-
var _product$retailers, _product$retailersAva, _location$state, _location$state2,
|
|
209
|
+
var _product$retailers, _product$retailersAva, _location$state, _location$state2, _datasheets$, _datasheets$$data;
|
|
210
210
|
|
|
211
211
|
var tabsSections = _ref.tabsSections,
|
|
212
212
|
_ref$productSelected = _ref.productSelected,
|
|
@@ -446,6 +446,9 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
446
446
|
validatedAll = _useState60[0],
|
|
447
447
|
setValidatedAll = _useState60[1];
|
|
448
448
|
|
|
449
|
+
console.log({
|
|
450
|
+
location: location
|
|
451
|
+
});
|
|
449
452
|
var originProp = location === null || location === void 0 ? void 0 : (_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.origin;
|
|
450
453
|
|
|
451
454
|
var _useState61 = (0, _react.useState)({
|
|
@@ -989,6 +992,10 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
989
992
|
var _revision = ["RequestWithContentoh", "RequestWithoutContentoh", "Contentoh"].includes(orgn);
|
|
990
993
|
|
|
991
994
|
if (_isRetailer) {
|
|
995
|
+
console.log({
|
|
996
|
+
revision: _revision,
|
|
997
|
+
currentService: currentService
|
|
998
|
+
});
|
|
992
999
|
if (_revision && currentService === "AP") return true;
|
|
993
1000
|
} else {
|
|
994
1001
|
var _product = productEdit.product;
|
|
@@ -1938,6 +1945,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1938
1945
|
|
|
1939
1946
|
var getSectionStatus = function getSectionStatus() {
|
|
1940
1947
|
var concept = getConcept(activeTab);
|
|
1948
|
+
console.log("getSectionStatus", productEdit.product["".concat(concept, "_status")]);
|
|
1941
1949
|
return ["AA", "AP", "R", "CA", "RCA"].includes(productEdit.product["".concat(concept, "_status")]);
|
|
1942
1950
|
};
|
|
1943
1951
|
|
|
@@ -2042,7 +2050,6 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2042
2050
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_HeaderTop.HeaderTop, {
|
|
2043
2051
|
setHeaderTop: setHeaderTop,
|
|
2044
2052
|
withChat: location === null || location === void 0 ? void 0 : (_location$state2 = location.state) === null || _location$state2 === void 0 ? void 0 : _location$state2.withChat,
|
|
2045
|
-
chatType: location === null || location === void 0 ? void 0 : (_location$state3 = location.state) === null || _location$state3 === void 0 ? void 0 : _location$state3.chatType,
|
|
2046
2053
|
productSelected: productSelected,
|
|
2047
2054
|
token: token,
|
|
2048
2055
|
activeRetailer: activeRetailer
|