contentoh-components-library 21.3.13 → 21.3.14
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 +5 -0
- package/dist/assets/fonts/{roboto → Roboto}/LICENSE.txt +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-Black.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-BlackItalic.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-Bold.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-BoldItalic.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-Italic.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-Light.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-LightItalic.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-Medium.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-MediumItalic.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-Regular.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-Thin.ttf +0 -0
- package/dist/assets/fonts/{roboto → Roboto}/Roboto-ThinItalic.ttf +0 -0
- package/dist/assets/images/chatPopup/Spinner.gif +0 -0
- package/dist/assets/images/chatPopup/close.svg +3 -0
- package/dist/assets/images/chatPopup/defaultImage.png +0 -0
- package/dist/assets/images/chatPopup/defaultProfile.png +0 -0
- package/dist/assets/images/chatPopup/doc.svg +1 -0
- package/dist/assets/images/chatPopup/document.svg +1 -0
- package/dist/assets/images/chatPopup/iconChat.svg +19 -0
- package/dist/assets/images/chatPopup/iconPlus.svg +3 -0
- package/dist/assets/images/chatPopup/pdf.svg +75 -0
- package/dist/assets/images/chatPopup/remove.svg +4 -0
- package/dist/assets/images/chatPopup/send.svg +3 -0
- package/dist/assets/images/chatPopup/svgIcon.svg +109 -0
- package/dist/assets/images/chatPopup/upload_file.svg +3 -0
- package/dist/assets/images/chatPopup/xls.svg +53 -0
- package/dist/assets/images/generalButton/closeIcon.svg +2 -2
- package/dist/components/atoms/ChatPopUp/ChatPopUp.stories.js +28 -0
- package/dist/components/atoms/ChatPopUp/index.js +841 -0
- package/dist/components/atoms/ChatPopUp/styles.js +27 -0
- package/dist/components/atoms/ChatPopUp/utils/handlersChat.js +182 -0
- package/dist/components/atoms/ProgressBar/index.js +36 -6
- package/dist/components/atoms/ProgressBar/styles.js +11 -3
- package/dist/components/atoms/StatusTag/StatusTag.stories.js +48 -0
- package/dist/components/atoms/StatusTag/index.js +58 -0
- package/dist/components/atoms/StatusTag/styles.js +20 -0
- package/dist/components/molecules/CustomSelect/CustomSelect.stories.js +21 -22
- package/dist/components/molecules/CustomSelect/SelectItem.js +10 -1
- package/dist/components/molecules/HeaderTop/index.js +23 -6
- package/dist/components/molecules/HeaderTop/styles.js +1 -1
- package/dist/components/molecules/ProductNameHeader/index.js +6 -4
- package/dist/components/organisms/FullProductNameHeader/index.js +1 -0
- package/dist/components/organisms/RangeCalendar/index.js +4 -3
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +65 -50
- package/dist/components/pages/ProviderProductEdition/index.js +15 -11
- package/dist/components/pages/RegistrationLoginFirstStep/RegistrationLoginFirstStep.stories.js +37 -0
- package/dist/components/pages/RegistrationLoginFirstStep/index.js +269 -0
- package/dist/components/pages/RegistrationLoginFirstStep/styles.js +20 -0
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +60 -86
- package/dist/components/pages/RetailerProductEdition/index.js +13 -12
- package/dist/global-files/fonts.css +6 -0
- package/dist/global-files/utils.js +22 -2
- package/dist/global-files/variables.js +2 -0
- package/dist/index.js +267 -46
- package/package.json +12 -1
- package/src/assets/images/customSelect/starIcon.svg +14 -0
- package/src/assets/images/defaultImages/Spinner.gif +0 -0
- package/src/assets/images/defaultImages/notFound.svg +124 -0
- package/src/assets/images/generalButton/closeIcon.svg +2 -2
- package/src/components/atoms/ButtonFileChooser/ButtonFileChooser.stories.js +47 -0
- package/src/components/atoms/ButtonFileChooser/index.js +68 -0
- package/src/components/atoms/ButtonFileChooser/styles.js +4 -0
- package/src/components/atoms/ButtonV2/ButtonV2.stories.js +53 -0
- package/src/components/atoms/ButtonV2/index.js +85 -0
- package/src/components/atoms/ButtonV2/styles.js +217 -0
- package/src/components/atoms/CustomIcon/CustomIcon.stories.js +36 -0
- package/src/components/atoms/CustomIcon/index.js +41 -0
- package/src/components/atoms/CustomIcon/styles.js +85 -0
- package/src/components/atoms/IconFile/IconFile.stories.js +35 -0
- package/src/components/atoms/IconFile/index.js +119 -0
- package/src/components/atoms/IconFile/styles.js +67 -0
- package/src/components/atoms/Image/Image.stories.js +51 -0
- package/src/components/atoms/Image/index.js +55 -0
- package/src/components/atoms/Image/styles.js +34 -0
- package/src/components/atoms/ImageLink/ImageLink.stories.js +43 -0
- package/src/components/atoms/ImageLink/index.js +57 -0
- package/src/components/atoms/ImageLink/styles.js +30 -0
- package/src/components/atoms/ImagePreview/ImagePreview.stories.js +52 -0
- package/src/components/atoms/ImagePreview/index.js +178 -0
- package/src/components/atoms/ImagePreview/styles.js +77 -0
- package/src/components/atoms/InputText/InputText.stories.js +39 -0
- package/src/components/atoms/InputText/index.js +61 -0
- package/src/components/atoms/InputText/styles.js +89 -0
- package/src/components/atoms/NotFound/NotFound.stories.js +19 -0
- package/src/components/atoms/NotFound/index.js +52 -0
- package/src/components/atoms/NotFound/styles.js +55 -0
- package/src/components/atoms/ProgressBar/index.js +40 -5
- package/src/components/atoms/ProgressBar/styles.js +24 -0
- package/src/components/atoms/SelectItemV2/SelectItemV2.stories.js +26 -0
- package/src/components/atoms/SelectItemV2/index.js +61 -0
- package/src/components/atoms/SelectItemV2/styles.js +90 -0
- package/src/components/atoms/Tooltip/Tooltip.stories.js +51 -0
- package/src/components/atoms/Tooltip/index.js +59 -0
- package/src/components/atoms/Tooltip/styles.js +42 -0
- package/src/components/molecules/ButtonDownloadFile/DownloadFile.stories.js +54 -0
- package/src/components/molecules/ButtonDownloadFile/index.js +109 -0
- package/src/components/molecules/ButtonDownloadFile/styles.js +66 -0
- package/src/components/molecules/CustomSelect/CustomSelect.stories.js +20 -12
- package/src/components/molecules/CustomSelect/SelectItem.js +7 -0
- package/src/components/molecules/Dropdown/Dropdown.stories.js +103 -0
- package/src/components/molecules/Dropdown/index.js +150 -0
- package/src/components/molecules/Dropdown/styles.js +75 -0
- package/src/components/molecules/HeaderTop/index.js +29 -8
- package/src/components/molecules/HeaderTop/styles.js +4 -0
- package/src/components/molecules/ImageTooltip/ImageTooltip.stories.js +68 -0
- package/src/components/molecules/ImageTooltip/index.js +63 -0
- package/src/components/molecules/ImageTooltip/styles.js +18 -0
- package/src/components/molecules/ProductNameHeader/index.js +7 -2
- package/src/components/molecules/SelectV2/SelectV2.stories.js +115 -0
- package/src/components/molecules/SelectV2/index.js +357 -0
- package/src/components/molecules/SelectV2/styles.js +105 -0
- package/src/components/molecules/SelectV2/test.js +61 -0
- package/src/components/molecules/SelectV2/test.stories.js +10 -0
- package/src/components/organisms/Chat/Chat.stories.js +147 -0
- package/src/components/organisms/Chat/ChatLists/ChatLists.stories.js +65 -0
- package/src/components/organisms/Chat/ChatLists/Rotoplas.jpeg +0 -0
- package/src/components/organisms/Chat/ChatLists/THD.png +0 -0
- package/src/components/organisms/Chat/ChatLists/index.js +141 -0
- package/src/components/organisms/Chat/ChatLists/styles.js +162 -0
- package/src/components/organisms/Chat/ContainerItems/ContainerItems.stories.js +142 -0
- package/src/components/organisms/Chat/ContainerItems/index.js +512 -0
- package/src/components/organisms/Chat/ContainerItems/styles.js +328 -0
- package/src/components/organisms/Chat/ContentChat/ContentChat.stories.js +102 -0
- package/src/components/organisms/Chat/ContentChat/Rotoplas.jpeg +0 -0
- package/src/components/organisms/Chat/ContentChat/THD.png +0 -0
- package/src/components/organisms/Chat/ContentChat/index.js +897 -0
- package/src/components/organisms/Chat/ContentChat/styles.js +41 -0
- package/src/components/organisms/Chat/Footer/Footer.stories.js +22 -0
- package/src/components/organisms/Chat/Footer/index.js +661 -0
- package/src/components/organisms/Chat/Footer/styles.js +286 -0
- package/src/components/organisms/Chat/Header/Header.stories.js +66 -0
- package/src/components/organisms/Chat/Header/index.js +94 -0
- package/src/components/organisms/Chat/Header/styles.js +49 -0
- package/src/components/organisms/Chat/index.js +235 -0
- package/src/components/organisms/Chat/styles.js +42 -0
- package/src/components/organisms/FullProductNameHeader/index.js +1 -0
- package/src/components/organisms/Modal/Modal.stories.js +55 -0
- package/src/components/organisms/Modal/index.js +97 -0
- package/src/components/organisms/Modal/styles.js +103 -0
- package/src/components/organisms/RangeCalendar/RangeCalendar.stories.js +16 -0
- package/src/components/organisms/RangeCalendar/index.js +121 -0
- package/src/components/organisms/RangeCalendar/styles.js +883 -0
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +67 -49
- package/src/components/pages/ProviderProductEdition/index.js +16 -7
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +62 -85
- package/src/components/pages/RetailerProductEdition/index.js +12 -10
- package/src/global-files/fonts.css +6 -0
- package/src/global-files/handle_http.js +225 -0
- package/src/global-files/handle_userTech.js +7 -0
- package/src/global-files/utils.js +330 -0
- package/src/global-files/variables.js +2 -0
- package/src/index.js +17 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.Slider = exports.Container = void 0;
|
|
9
|
+
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
11
|
+
|
|
12
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
|
+
|
|
14
|
+
var _variables = require("../../../global-files/variables");
|
|
15
|
+
|
|
16
|
+
var _templateObject, _templateObject2;
|
|
17
|
+
|
|
18
|
+
var Container = _styledComponents.default.button(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: 34px;\n width: 34px;\n background-color: transparent;\n border: 1px solid #f0f0f0;\n border-radius: 50px;\n padding: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n cursor: pointer;\n &:hover {\n background-color: #f0f0f0;\n }\n .icon-chat {\n margin: 0;\n width: 15px;\n height: 15px;\n }\n"])));
|
|
19
|
+
|
|
20
|
+
exports.Container = Container;
|
|
21
|
+
|
|
22
|
+
var Slider = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n -webkit-box-shadow: 0px 0px 10px -1px rgba(0, 0, 0, 0.8);\n box-shadow: 0px 0px 10px -1px rgba(0, 0, 0, 0.8);\n z-index: 200;\n width: 425px;\n height: 600px;\n border-radius: 10px;\n background: white;\n padding: 37px 16px 17px 20px;\n position: absolute;\n right: ", "%;\n top: 3%;\n transition: right 2s ease 0;\n .image {\n display: flex;\n justify-content: center;\n align-content: center;\n background-color: #f7f7f7;\n border-radius: 10px;\n #myList {\n list-style: none;\n img {\n width: 365px;\n border-radius: 10px;\n }\n }\n }\n .close {\n background-color: #e33aa9;\n border: 3px solid white;\n height: 35px;\n width: 35px;\n border-radius: 50%;\n position: absolute;\n top: -18px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n }\n .content-chat {\n height: 495px;\n max-height: 495px;\n overflow-y: auto;\n overflow-x: hidden;\n background-color: transparent;\n font-family: sans-serif;\n font-size: 12px;\n & + * {\n margin-top: 12px;\n }\n ::-webkit-scrollbar {\n width: 0;\n }\n .cargar-mas {\n border: none;\n border-radius: 10px;\n font: normal normal normal 11px/11px sans-serif;\n letter-spacing: 0.1px;\n color: #8a6caa;\n background-color: #f7f7fc;\n padding: 5px 17px;\n margin: 0 35%;\n display: flex;\n cursor: pointer;\n white-space: nowrap;\n &:hover {\n background-color: #f0f0f0;\n }\n img {\n margin-right: 7px;\n height: 13px;\n }\n }\n #myListChat {\n list-style: none;\n margin: 0;\n padding: 0;\n height: 100%;\n overflow-y: auto;\n overflow-x: hidden;\n display: flex;\n flex-direction: column-reverse;\n gap: 3px;\n .group-date {\n display: flex;\n justify-content: center;\n align-items: center;\n hr {\n width: 120px;\n border: 0.3px solid #f0f0f0;\n }\n p {\n margin: 0 10px;\n color: #b3b3b3;\n }\n }\n li {\n width: 100%;\n padding: 5px 0;\n margin: 0;\n display: flex;\n flex-direction: row-reverse;\n justify-content: flex-start;\n flex-wrap: nowrap;\n gap: 5px;\n align-items: center;\n .tooltip-userName {\n background-color: #f0f0f0;\n padding: 6px 10px;\n color: #000000;\n font-size: 11px;\n margin-bottom: 6px;\n .MuiTooltip-arrow {\n color: #f0f0f0;\n }\n }\n\n .profile {\n display: grid;\n place-items: center;\n align-self: start;\n width: 34px;\n height: 34px;\n border-radius: 50%;\n overflow: hidden;\n img {\n width: 100%;\n height: 100%;\n border-radius: inherit;\n }\n }\n .img-file {\n margin: 0 10px;\n width: 165px;\n img {\n width: 100%;\n object-fit: contain;\n border-radius: 10px;\n }\n }\n .body-message {\n margin: 0 10px;\n border-radius: 10px;\n box-sizing: border-box;\n background-color: #f0f0f0;\n padding: 10px 10px 10px 12px;\n max-width: 280px;\n p {\n color: #262626;\n margin: 0;\n padding: 0;\n }\n a {\n text-decoration: none;\n }\n div {\n cursor: pointer;\n background-color: white;\n border-radius: 10px;\n padding: 7px 10px;\n display: flex;\n align-items: center;\n img {\n height: 20px;\n width: 20px;\n margin-right: 5px;\n }\n p {\n color: #262626 !important;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n }\n }\n .date {\n display: flex;\n align-items: center;\n white-space: nowrap;\n p {\n color: #d9d9d9;\n font-size: 9px;\n }\n }\n &.own-message {\n flex-direction: row;\n justify-content: flex-start;\n .body-message {\n background-color: #8386ee;\n p {\n margin: 0;\n padding: 0;\n color: #ffffff;\n }\n }\n }\n }\n }\n }\n .input-chat {\n display: flex;\n align-items: center;\n border-radius: 17px;\n background-color: #f7f7f7;\n padding: 10px 7px 10px 15px;\n .send-message {\n background-color: transparent;\n width: 157%;\n border: none;\n font-family: sans-serif;\n font-size: 13px;\n line-height: initial;\n color: #242424;\n ::placeholder {\n font: normal normal medium 12px/14px sans-serif;\n letter-spacing: 0.6px;\n color: #b3b3b3;\n }\n :focus {\n outline: none;\n }\n & + * {\n margin-left: 10px;\n }\n }\n .upload {\n border: none;\n background: transparent;\n cursor: pointer;\n & + * {\n margin-left: 7px;\n }\n }\n .add-picture-input {\n display: none;\n }\n .send {\n width: 35.4px;\n height: 20px;\n border: none;\n background-color: #e33aa9;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n cursor: pointer;\n align-items: center;\n img {\n width: 11px;\n height: 11px;\n }\n }\n }\n"])), function (_ref) {
|
|
23
|
+
var showMenu = _ref.showMenu;
|
|
24
|
+
return showMenu ? 2 : -50;
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
exports.Slider = Slider;
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.getBD = exports.createItemBD = void 0;
|
|
9
|
+
|
|
10
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
|
+
|
|
12
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/asyncToGenerator"));
|
|
13
|
+
|
|
14
|
+
var _axios = _interopRequireDefault(require("axios"));
|
|
15
|
+
|
|
16
|
+
var getBD = function getBD(id_article, version_article, get_type, item_date, tokenUser) {
|
|
17
|
+
return new Promise( /*#__PURE__*/function () {
|
|
18
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(response, error) {
|
|
19
|
+
var URL, respHTTPjson, body;
|
|
20
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
21
|
+
while (1) {
|
|
22
|
+
switch (_context.prev = _context.next) {
|
|
23
|
+
case 0:
|
|
24
|
+
_context.prev = 0;
|
|
25
|
+
URL = "https://fc069ovhuk.execute-api.us-east-1.amazonaws.com/dev/products-chat"; // endpoint
|
|
26
|
+
|
|
27
|
+
URL += "?id_article=".concat(id_article);
|
|
28
|
+
URL += "&version_article=".concat(version_article);
|
|
29
|
+
URL += "&get_type=".concat(get_type);
|
|
30
|
+
URL += "&item_date=".concat(item_date);
|
|
31
|
+
_context.next = 8;
|
|
32
|
+
return _axios.default.get(URL, {
|
|
33
|
+
headers: {
|
|
34
|
+
// AQUI COLOCAR EL TOKEN DEL USUARIO CONECTADO
|
|
35
|
+
Authorization: tokenUser
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
case 8:
|
|
40
|
+
respHTTPjson = _context.sent;
|
|
41
|
+
|
|
42
|
+
if (!(respHTTPjson.status != 200)) {
|
|
43
|
+
_context.next = 12;
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
response({
|
|
48
|
+
message: "No fue posible llevar a cabo la operacion",
|
|
49
|
+
errorDetails: respHTTPjson.statusText
|
|
50
|
+
});
|
|
51
|
+
return _context.abrupt("return");
|
|
52
|
+
|
|
53
|
+
case 12:
|
|
54
|
+
// obtener body backend
|
|
55
|
+
body = JSON.parse(respHTTPjson.data.body); //console.log( "resHTTP body:" , body );
|
|
56
|
+
// verificar si existe error desde el backend
|
|
57
|
+
|
|
58
|
+
if (!(respHTTPjson.data.statusCode != 200)) {
|
|
59
|
+
_context.next = 16;
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
response({
|
|
64
|
+
message: body.message,
|
|
65
|
+
errorDetails: body.errorDetail
|
|
66
|
+
});
|
|
67
|
+
return _context.abrupt("return");
|
|
68
|
+
|
|
69
|
+
case 16:
|
|
70
|
+
// cuando se ejecuto bien el create ... tomar un posible message
|
|
71
|
+
response({
|
|
72
|
+
body: body
|
|
73
|
+
});
|
|
74
|
+
_context.next = 22;
|
|
75
|
+
break;
|
|
76
|
+
|
|
77
|
+
case 19:
|
|
78
|
+
_context.prev = 19;
|
|
79
|
+
_context.t0 = _context["catch"](0);
|
|
80
|
+
//console.log("error catch get items chat" , err);
|
|
81
|
+
response({
|
|
82
|
+
message: "Algo salio mal al obtener los items del chat",
|
|
83
|
+
errorDetails: _context.t0.message
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
case 22:
|
|
87
|
+
case "end":
|
|
88
|
+
return _context.stop();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}, _callee, null, [[0, 19]]);
|
|
92
|
+
}));
|
|
93
|
+
|
|
94
|
+
return function (_x, _x2) {
|
|
95
|
+
return _ref.apply(this, arguments);
|
|
96
|
+
};
|
|
97
|
+
}());
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
exports.getBD = getBD;
|
|
101
|
+
|
|
102
|
+
var createItemBD = function createItemBD(id_article, version_article, value_type, value, tokenUser) {
|
|
103
|
+
return new Promise( /*#__PURE__*/function () {
|
|
104
|
+
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(response, error) {
|
|
105
|
+
var URL, bodyData, respHTTPjson, body;
|
|
106
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
107
|
+
while (1) {
|
|
108
|
+
switch (_context2.prev = _context2.next) {
|
|
109
|
+
case 0:
|
|
110
|
+
_context2.prev = 0;
|
|
111
|
+
URL = "https://fc069ovhuk.execute-api.us-east-1.amazonaws.com/dev/products-chat";
|
|
112
|
+
bodyData = {
|
|
113
|
+
id_article: id_article,
|
|
114
|
+
version_article: version_article,
|
|
115
|
+
value_type: value_type,
|
|
116
|
+
value: value
|
|
117
|
+
};
|
|
118
|
+
_context2.next = 5;
|
|
119
|
+
return _axios.default.post(URL, bodyData, {
|
|
120
|
+
headers: {
|
|
121
|
+
Authorization: tokenUser
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
case 5:
|
|
126
|
+
respHTTPjson = _context2.sent;
|
|
127
|
+
|
|
128
|
+
if (!(respHTTPjson.status != 200)) {
|
|
129
|
+
_context2.next = 9;
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
response({
|
|
134
|
+
message: "No fue posible llevar a cabo la operacion",
|
|
135
|
+
errorDetails: respHTTPjson.statusText
|
|
136
|
+
});
|
|
137
|
+
return _context2.abrupt("return");
|
|
138
|
+
|
|
139
|
+
case 9:
|
|
140
|
+
body = JSON.parse(respHTTPjson.data.body);
|
|
141
|
+
|
|
142
|
+
if (!(respHTTPjson.data.statusCode != 200)) {
|
|
143
|
+
_context2.next = 13;
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
response({
|
|
148
|
+
message: body.message,
|
|
149
|
+
errorDetails: body.errorDetail
|
|
150
|
+
});
|
|
151
|
+
return _context2.abrupt("return");
|
|
152
|
+
|
|
153
|
+
case 13:
|
|
154
|
+
response({
|
|
155
|
+
body: true
|
|
156
|
+
});
|
|
157
|
+
_context2.next = 19;
|
|
158
|
+
break;
|
|
159
|
+
|
|
160
|
+
case 16:
|
|
161
|
+
_context2.prev = 16;
|
|
162
|
+
_context2.t0 = _context2["catch"](0);
|
|
163
|
+
response({
|
|
164
|
+
message: "Algo salio mal al agregar el item en el chat",
|
|
165
|
+
errorDetails: _context2.t0.message
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
case 19:
|
|
169
|
+
case "end":
|
|
170
|
+
return _context2.stop();
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}, _callee2, null, [[0, 16]]);
|
|
174
|
+
}));
|
|
175
|
+
|
|
176
|
+
return function (_x3, _x4) {
|
|
177
|
+
return _ref2.apply(this, arguments);
|
|
178
|
+
};
|
|
179
|
+
}());
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
exports.createItemBD = createItemBD;
|
|
@@ -7,16 +7,46 @@ exports.ProgressBar = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _styles = require("./styles");
|
|
9
9
|
|
|
10
|
+
var _Tooltip = require("../Tooltip");
|
|
11
|
+
|
|
10
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
13
|
|
|
12
14
|
var ProgressBar = function ProgressBar(_ref) {
|
|
13
15
|
var percent = _ref.percent,
|
|
14
|
-
progressBarType = _ref.progressBarType
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
children: /*#__PURE__*/(0, _jsxRuntime.
|
|
18
|
-
children:
|
|
19
|
-
|
|
16
|
+
progressBarType = _ref.progressBarType,
|
|
17
|
+
percentRequired = _ref.percentRequired;
|
|
18
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
19
|
+
children: [percentRequired ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
20
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.Tooltip, {
|
|
21
|
+
componentTooltip: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
22
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
23
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("b", {
|
|
24
|
+
children: "Campos requeridos"
|
|
25
|
+
})
|
|
26
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
|
|
27
|
+
children: ["Este nuevo icono te indicar\xE1 cuando ", /*#__PURE__*/(0, _jsxRuntime.jsx)("br", {}), " completes todos los campos requeridos"]
|
|
28
|
+
})]
|
|
29
|
+
}),
|
|
30
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.ContainerIcon, {
|
|
31
|
+
className: "fondo",
|
|
32
|
+
percentageRequired: percentRequired,
|
|
33
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
34
|
+
class: "hola",
|
|
35
|
+
children: "local_police"
|
|
36
|
+
})
|
|
37
|
+
}),
|
|
38
|
+
classNameTooltip: "container-tooltip",
|
|
39
|
+
position: undefined,
|
|
40
|
+
addArrow: undefined,
|
|
41
|
+
transitionType: undefined,
|
|
42
|
+
followCursor: undefined
|
|
43
|
+
})
|
|
44
|
+
}) : "", /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
45
|
+
className: "status-".concat(progressBarType),
|
|
46
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
|
|
47
|
+
children: [percent, "%"]
|
|
48
|
+
})
|
|
49
|
+
})]
|
|
20
50
|
});
|
|
21
51
|
};
|
|
22
52
|
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.Container = void 0;
|
|
8
|
+
exports.ContainerIcon = exports.Container = void 0;
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
11
11
|
|
|
@@ -13,10 +13,18 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
13
13
|
|
|
14
14
|
var _variables = require("../../../global-files/variables");
|
|
15
15
|
|
|
16
|
-
var _templateObject;
|
|
16
|
+
var _templateObject, _templateObject2;
|
|
17
17
|
|
|
18
18
|
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n width: fit-content;\n height: 27px;\n padding: 4px;\n border-radius: 15px;\n font-family: ", ";\n font-weight: 600;\n font-size: 14px;\n line-height: 19px;\n color: ", ";\n\n &.status-CA,\n &.status-IE {\n background-color: ", ";\n }\n\n &.status-R,\n &.status-AS,\n &.status-PA {\n background-color: ", ";\n }\n\n &.status-AA,\n &.status-AP,\n &.status-ACA,\n &.status-AC {\n background-color: ", ";\n }\n\n &.status-RA,\n &.status-RC,\n &.status-RP,\n &.status-RCA {\n background-color: ", ";\n }\n\n &.status-Dat,\n &.status-Dsc,\n &.status-Imgs {\n background-color: ", ";\n }\n\n &.status-Ex {\n background-color: ", ";\n }\n\n &.status-DDI {\n background-color: ", ";\n }\n\n &.status-GLD {\n background-color: ", ";\n }\n\n &.status-TAB {\n background-color: ", ";\n }\n\n &.status-Pt {\n background-color: ", ";\n color: ", ";\n }\n"])), _variables.GlobalColors.s3, _variables.FontFamily.AvenirNext, function (backgroundColor) {
|
|
19
19
|
return backgroundColor === "s2" || backgroundColor === "s1" ? _variables.GlobalColors.s4 : _variables.GlobalColors.white;
|
|
20
20
|
}, _variables.GlobalColors.in_progress, _variables.GlobalColors.reception, _variables.GlobalColors.finished, _variables.GlobalColors.rejected_status, _variables.GlobalColors.s4, _variables.GlobalColors.exported, _variables.GlobalColors.original_purpura, _variables.GlobalColors.in_progress, _variables.GlobalColors.deep_gray, _variables.GlobalColors.s2, _variables.GlobalColors.s4);
|
|
21
21
|
|
|
22
|
-
exports.Container = Container;
|
|
22
|
+
exports.Container = Container;
|
|
23
|
+
|
|
24
|
+
var ContainerIcon = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n cursor: pointer;\n @font-face {\n font-family: \"Material Symbols Outlined\";\n font-style: normal;\n font-weight: 100 700;\n src: url(https://fonts.gstatic.com/s/materialsymbolsoutlined/v68/kJEhBvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oFsLjBuVY.woff2)\n format(\"woff2\");\n }\n\n .hola {\n font-family: \"Material Symbols Outlined\";\n font-size: 30px;\n //line-height: 1;\n margin-top: 10px;\n }\n .hola {\n font-variation-settings: \"FILL\"\n ", ",\n \"wght\" 400, \"GRAD\" 0, \"opsz\" 48;\n color: ", ";\n }\n"])), function (props) {
|
|
25
|
+
return props.percentageRequired < 100 ? 0 : 1;
|
|
26
|
+
}, function (props) {
|
|
27
|
+
return props.percentageRequired < 100 ? "#d4d1d7" : "#e33aa9";
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
exports.ContainerIcon = ContainerIcon;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = exports.StatusTagDefault = void 0;
|
|
9
|
+
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
|
+
|
|
12
|
+
var _index = require("./index");
|
|
13
|
+
|
|
14
|
+
var _variables = require("../../../global-files/variables");
|
|
15
|
+
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
|
|
18
|
+
var status = _variables.GlobalStatus;
|
|
19
|
+
var _default = {
|
|
20
|
+
title: "Components/atoms/StatusTag",
|
|
21
|
+
component: _index.StatusTag,
|
|
22
|
+
argTypes: {
|
|
23
|
+
statusType: {
|
|
24
|
+
options: status,
|
|
25
|
+
control: {
|
|
26
|
+
type: "select"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
ovalForm: {
|
|
30
|
+
options: [true, false],
|
|
31
|
+
control: {
|
|
32
|
+
type: "boolean"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
exports.default = _default;
|
|
38
|
+
|
|
39
|
+
var Template = function Template(args) {
|
|
40
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.StatusTag, (0, _objectSpread2.default)({}, args));
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
var StatusTagDefault = Template.bind({});
|
|
44
|
+
exports.StatusTagDefault = StatusTagDefault;
|
|
45
|
+
StatusTagDefault.args = {
|
|
46
|
+
statusType: "-",
|
|
47
|
+
ovalForm: false
|
|
48
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StatusTag = void 0;
|
|
7
|
+
|
|
8
|
+
var _styles = require("./styles");
|
|
9
|
+
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
|
|
12
|
+
var StatusTag = function StatusTag(_ref) {
|
|
13
|
+
var statusType = _ref.statusType,
|
|
14
|
+
ovalForm = _ref.ovalForm;
|
|
15
|
+
|
|
16
|
+
var getShortStatus = function getShortStatus(status) {
|
|
17
|
+
switch (status) {
|
|
18
|
+
case "COMPLETED":
|
|
19
|
+
return "C";
|
|
20
|
+
|
|
21
|
+
case "RECEPTION":
|
|
22
|
+
return "Pr";
|
|
23
|
+
|
|
24
|
+
case "NULL":
|
|
25
|
+
return "-";
|
|
26
|
+
|
|
27
|
+
case "RECEIVED":
|
|
28
|
+
return "Rc";
|
|
29
|
+
|
|
30
|
+
case "IN_PROGRESS":
|
|
31
|
+
return "P";
|
|
32
|
+
|
|
33
|
+
case "ASSIGNED":
|
|
34
|
+
return "As";
|
|
35
|
+
|
|
36
|
+
case "APPROVED":
|
|
37
|
+
return "Ap";
|
|
38
|
+
|
|
39
|
+
case "VALIDATING":
|
|
40
|
+
return "V";
|
|
41
|
+
|
|
42
|
+
case "PAID_OUT":
|
|
43
|
+
return "Po";
|
|
44
|
+
|
|
45
|
+
default:
|
|
46
|
+
return status;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
51
|
+
className: "status-".concat(getShortStatus(statusType), " ").concat(ovalForm && "oval-form"),
|
|
52
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
53
|
+
children: getShortStatus(statusType)
|
|
54
|
+
})
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
exports.StatusTag = StatusTag;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.Container = void 0;
|
|
9
|
+
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
11
|
+
|
|
12
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
|
+
|
|
14
|
+
var _variables = require("../../../global-files/variables");
|
|
15
|
+
|
|
16
|
+
var _templateObject;
|
|
17
|
+
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: fit-content;\n padding: 0 10px;\n height: 20px;\n background-color: ", ";\n border-radius: 3px;\n\n p {\n text-align: center;\n color: ", ";\n font-family: ", ";\n font-size: 12px;\n line-height: 20px;\n }\n\n &.status-As,\n &.status-P,\n &.status-IN_PROGRESS,\n &.status-QF {\n background-color: ", ";\n }\n\n &.status-Pr,\n &.status-Rr,\n &.status-Rc {\n background-color: ", ";\n }\n\n &.status-AA,\n &.status-AP,\n &.status-AC,\n &.status-AF {\n background-color: ", ";\n }\n\n &.status-RA,\n &.status-RF,\n &.status-RP,\n &.status-RC {\n background-color: ", ";\n }\n\n &.status-Dat,\n &.status-Dsc,\n &.status-Imgs {\n background-color: ", ";\n }\n\n &.status-Ex {\n background-color: ", ";\n }\n\n &.status-DDI {\n background-color: ", ";\n }\n\n &.status-GLD {\n background-color: ", ";\n }\n\n &.status-TAB {\n background-color: ", ";\n }\n\n &.status-Pt {\n background-color: ", ";\n color: ", ";\n }\n\n &.oval-form {\n border-radius: 10px;\n }\n"])), _variables.GlobalColors.s3, _variables.GlobalColors.white, _variables.FontFamily.Lato, _variables.GlobalColors.in_progress, _variables.GlobalColors.reception, _variables.GlobalColors.finished, _variables.GlobalColors.rejected_status, _variables.GlobalColors.s4, _variables.GlobalColors.exported, _variables.GlobalColors.original_purpura, _variables.GlobalColors.in_progress, _variables.GlobalColors.deep_gray, _variables.GlobalColors.s2, _variables.GlobalColors.s4);
|
|
19
|
+
|
|
20
|
+
exports.Container = Container;
|
|
@@ -11,6 +11,8 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/
|
|
|
11
11
|
|
|
12
12
|
var _index = require("./index");
|
|
13
13
|
|
|
14
|
+
var _starIcon = _interopRequireDefault(require("../../../assets/images/customSelect/starIcon.svg"));
|
|
15
|
+
|
|
14
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
17
|
|
|
16
18
|
var _default = {
|
|
@@ -26,29 +28,26 @@ var Template = function Template(args) {
|
|
|
26
28
|
var CustomSelectDefault = Template.bind({});
|
|
27
29
|
exports.CustomSelectDefault = CustomSelectDefault;
|
|
28
30
|
CustomSelectDefault.args = {
|
|
29
|
-
selectLabel: "Todos los departamentos",
|
|
31
|
+
// selectLabel: "Todos los departamentos",
|
|
30
32
|
defaultOption: "Todos los departamentos",
|
|
31
33
|
options: [{
|
|
32
|
-
id:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
id: 1,
|
|
36
|
-
value: "Espejos"
|
|
37
|
-
}, {
|
|
38
|
-
id: 2,
|
|
39
|
-
value: "Persianas"
|
|
40
|
-
}]
|
|
41
|
-
}, {
|
|
42
|
-
id: 2,
|
|
43
|
-
value: "Eléctrico"
|
|
44
|
-
}, {
|
|
45
|
-
id: 3,
|
|
46
|
-
value: "Ferretería"
|
|
47
|
-
}, {
|
|
48
|
-
id: 4,
|
|
49
|
-
value: "Herramientas"
|
|
34
|
+
id: 47,
|
|
35
|
+
name: "Enero 2023",
|
|
36
|
+
isSelected: true
|
|
50
37
|
}, {
|
|
51
|
-
id:
|
|
52
|
-
|
|
53
|
-
}]
|
|
38
|
+
id: 49,
|
|
39
|
+
name: "Mis Favoritos"
|
|
40
|
+
}],
|
|
41
|
+
onClickItem: function onClickItem(v, id) {
|
|
42
|
+
if (v) {
|
|
43
|
+
console.log("Agregar a la lista", id);
|
|
44
|
+
} else {
|
|
45
|
+
console.log("Eliminar a la lista", id);
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
icon: _starIcon.default,
|
|
49
|
+
showSearchBar: true,
|
|
50
|
+
customOptions: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
51
|
+
children: "Esto es un customOptions"
|
|
52
|
+
})
|
|
54
53
|
};
|
|
@@ -26,7 +26,8 @@ var SelecItem = function SelecItem(_ref) {
|
|
|
26
26
|
customSelectId = _ref.customSelectId,
|
|
27
27
|
setParameterArray = _ref.setParameterArray,
|
|
28
28
|
activeFilters = _ref.activeFilters,
|
|
29
|
-
setActiveFilters = _ref.setActiveFilters
|
|
29
|
+
setActiveFilters = _ref.setActiveFilters,
|
|
30
|
+
onClickItem = _ref.onClickItem;
|
|
30
31
|
|
|
31
32
|
var _useState = (0, _react.useState)(false),
|
|
32
33
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -46,6 +47,10 @@ var SelecItem = function SelecItem(_ref) {
|
|
|
46
47
|
id: "main-item-" + option.id,
|
|
47
48
|
label: option.name,
|
|
48
49
|
onChange: function onChange(e) {
|
|
50
|
+
if (onClickItem) {
|
|
51
|
+
onClickItem(e.target.checked, option.id);
|
|
52
|
+
}
|
|
53
|
+
|
|
49
54
|
var subOptions = option.subOptions;
|
|
50
55
|
var filtersCopy = (0, _objectSpread2.default)({}, activeFilters);
|
|
51
56
|
|
|
@@ -108,6 +113,10 @@ var SelecItem = function SelecItem(_ref) {
|
|
|
108
113
|
label: sub.name,
|
|
109
114
|
defaultChecked: activeFilters[option.name] && activeFilters[option.name][sub.name],
|
|
110
115
|
onChange: function onChange(e) {
|
|
116
|
+
if (onClickItem) {
|
|
117
|
+
onClickItem(e.target.checked, sub.id);
|
|
118
|
+
}
|
|
119
|
+
|
|
111
120
|
if (e.target.checked) {
|
|
112
121
|
setParameterArray(function (current) {
|
|
113
122
|
return [].concat((0, _toConsumableArray2.default)(current), [sub.id]).sort(function (a, b) {
|
|
@@ -13,10 +13,15 @@ var _index2 = require("../../atoms/GeneralButton/index");
|
|
|
13
13
|
|
|
14
14
|
var _react = require("react");
|
|
15
15
|
|
|
16
|
+
var _Chat = require("../../organisms/Chat");
|
|
17
|
+
|
|
16
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
19
|
|
|
18
20
|
var HeaderTop = function HeaderTop(_ref) {
|
|
19
|
-
var setHeaderTop = _ref.setHeaderTop
|
|
21
|
+
var setHeaderTop = _ref.setHeaderTop,
|
|
22
|
+
withChat = _ref.withChat,
|
|
23
|
+
productSelected = _ref.productSelected,
|
|
24
|
+
token = _ref.token;
|
|
20
25
|
var headerTop = (0, _react.useRef)();
|
|
21
26
|
(0, _react.useEffect)(function () {
|
|
22
27
|
setHeaderTop && setHeaderTop(headerTop.current.clientHeight);
|
|
@@ -25,11 +30,23 @@ var HeaderTop = function HeaderTop(_ref) {
|
|
|
25
30
|
ref: headerTop,
|
|
26
31
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScreenHeader, {
|
|
27
32
|
text: "Edici\xF3n de producto"
|
|
28
|
-
}), /*#__PURE__*/(0, _jsxRuntime.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
34
|
+
className: "buttons-top",
|
|
35
|
+
children: [withChat && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chat.Chat, {
|
|
36
|
+
chatType: "merchant_product",
|
|
37
|
+
chatContainerType: "popUp",
|
|
38
|
+
chatData: {
|
|
39
|
+
userToken: token,
|
|
40
|
+
id: productSelected.id_article,
|
|
41
|
+
version: productSelected.version
|
|
42
|
+
},
|
|
43
|
+
size: 18
|
|
44
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Button, {
|
|
45
|
+
buttonType: "close-button",
|
|
46
|
+
onClick: function onClick() {
|
|
47
|
+
window.location.href = "/products";
|
|
48
|
+
}
|
|
49
|
+
})]
|
|
33
50
|
})]
|
|
34
51
|
});
|
|
35
52
|
};
|
|
@@ -13,6 +13,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
13
13
|
|
|
14
14
|
var _templateObject;
|
|
15
15
|
|
|
16
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n"])));
|
|
16
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n .buttons-top {\n display: flex;\n align-items: center;\n }\n"])));
|
|
17
17
|
|
|
18
18
|
exports.Container = Container;
|
|
@@ -22,16 +22,18 @@ var ProductNameHeader = function ProductNameHeader(_ref) {
|
|
|
22
22
|
statusType = _ref.statusType,
|
|
23
23
|
percent = _ref.percent,
|
|
24
24
|
priority = _ref.priority,
|
|
25
|
-
date = _ref.date
|
|
25
|
+
date = _ref.date,
|
|
26
|
+
percentRequired = _ref.percentRequired;
|
|
26
27
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
27
28
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScreenHeader, {
|
|
28
29
|
headerType: "product-name-header",
|
|
29
30
|
text: productName
|
|
30
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Status, {
|
|
31
|
+
}), statusType && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Status, {
|
|
31
32
|
statusType: statusType
|
|
32
33
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index3.ProgressBar, {
|
|
33
|
-
percent:
|
|
34
|
-
progressBarType: statusType
|
|
34
|
+
percent: percentRequired,
|
|
35
|
+
progressBarType: statusType,
|
|
36
|
+
percentRequired: percentRequired
|
|
35
37
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index4.PriorityFlag, {
|
|
36
38
|
priority: priority
|
|
37
39
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScreenHeader, {
|
|
@@ -59,6 +59,7 @@ var FullProductNameHeader = function FullProductNameHeader(_ref) {
|
|
|
59
59
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ProductNameHeader.ProductNameHeader, {
|
|
60
60
|
productName: (headerData === null || headerData === void 0 ? void 0 : (_headerData$article = headerData.article) === null || _headerData$article === void 0 ? void 0 : _headerData$article.name) || (headerData === null || headerData === void 0 ? void 0 : headerData.name),
|
|
61
61
|
statusType: (headerData === null || headerData === void 0 ? void 0 : headerData.version_status) || (headerData === null || headerData === void 0 ? void 0 : headerData.status) || (headerData === null || headerData === void 0 ? void 0 : headerData.article_status),
|
|
62
|
+
percentRequired: percent,
|
|
62
63
|
percent: percent === null || percent === void 0 ? void 0 : percent.toFixed(0),
|
|
63
64
|
priority: headerData === null || headerData === void 0 ? void 0 : headerData.prio,
|
|
64
65
|
date: new Date((headerData === null || headerData === void 0 ? void 0 : (_headerData$article2 = headerData.article) === null || _headerData$article2 === void 0 ? void 0 : _headerData$article2.timestamp) || (headerData === null || headerData === void 0 ? void 0 : headerData.timestamp)).toLocaleDateString()
|
|
@@ -23,6 +23,8 @@ var _es = _interopRequireDefault(require("date-fns/locale/es"));
|
|
|
23
23
|
|
|
24
24
|
var _customHooks = require("../../../global-files/customHooks");
|
|
25
25
|
|
|
26
|
+
var _utils = require("../../../global-files/utils");
|
|
27
|
+
|
|
26
28
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
29
|
|
|
28
30
|
(0, _reactDatepicker.registerLocale)("es", _es.default);
|
|
@@ -54,7 +56,6 @@ var RangeCalendar = function RangeCalendar(_ref) {
|
|
|
54
56
|
|
|
55
57
|
(0, _react.useEffect)(function () {
|
|
56
58
|
if (currentDates) {
|
|
57
|
-
console.log(currentDates);
|
|
58
59
|
setStartDate(new Date(currentDates.start));
|
|
59
60
|
setEndDate(new Date(currentDates.end));
|
|
60
61
|
}
|
|
@@ -71,8 +72,8 @@ var RangeCalendar = function RangeCalendar(_ref) {
|
|
|
71
72
|
if (end) {
|
|
72
73
|
setParameterArray && setParameterArray(function (current) {
|
|
73
74
|
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, current), {}, {
|
|
74
|
-
estimatedStartDate:
|
|
75
|
-
estimatedDate:
|
|
75
|
+
estimatedStartDate: (0, _utils.getFormatedDate)(new Date(start), "-"),
|
|
76
|
+
estimatedDate: (0, _utils.getFormatedDate)(new Date(end), "-")
|
|
76
77
|
});
|
|
77
78
|
});
|
|
78
79
|
}
|