contentoh-components-library 21.2.84 → 21.2.86
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 +6 -1
- package/dist/assets/fonts/Roboto/Roboto-Medium.ttf +0 -0
- package/dist/assets/fonts/Roboto/Roboto-Regular.ttf +0 -0
- package/dist/assets/images/defaultImages/Spinner.gif +0 -0
- package/dist/assets/images/defaultImages/notFound.svg +124 -0
- package/dist/components/atoms/ButtonFileChooser/ButtonFileChooser.stories.js +72 -0
- package/dist/components/atoms/ButtonFileChooser/index.js +116 -0
- package/dist/components/atoms/ButtonFileChooser/styles.js +20 -0
- package/dist/components/atoms/ButtonV2/ButtonV2.stories.js +66 -0
- package/dist/components/atoms/ButtonV2/index.js +109 -0
- package/dist/components/atoms/ButtonV2/styles.js +53 -0
- package/dist/components/atoms/CustomIcon/CustomIcon.stories.js +50 -0
- package/dist/components/atoms/CustomIcon/index.js +38 -0
- package/dist/components/atoms/CustomIcon/styles.js +33 -0
- package/dist/components/atoms/IconFile/IconFile.stories.js +48 -0
- package/dist/components/atoms/IconFile/index.js +251 -0
- package/dist/components/atoms/IconFile/styles.js +23 -0
- package/dist/components/atoms/Image/Image.stories.js +63 -0
- package/dist/components/atoms/Image/index.js +72 -0
- package/dist/components/atoms/Image/styles.js +40 -0
- package/dist/components/atoms/ImageLink/ImageLink.stories.js +63 -0
- package/dist/components/atoms/ImageLink/index.js +75 -0
- package/dist/components/atoms/ImageLink/styles.js +40 -0
- package/dist/components/atoms/ImagePreview/ImagePreview.stories.js +70 -0
- package/dist/components/atoms/ImagePreview/index.js +220 -0
- package/dist/components/atoms/ImagePreview/styles.js +44 -0
- package/dist/components/atoms/InputText/InputText.stories.js +62 -0
- package/dist/components/atoms/InputText/index.js +64 -0
- package/dist/components/atoms/InputText/styles.js +32 -0
- package/dist/components/atoms/NotFound/NotFound.stories.js +36 -0
- package/dist/components/atoms/NotFound/index.js +73 -0
- package/dist/components/atoms/NotFound/styles.js +20 -0
- package/dist/components/atoms/Tooltip/Tooltip.stories.js +36 -6
- package/dist/components/atoms/Tooltip/index.js +41 -26
- package/dist/components/atoms/Tooltip/styles.js +3 -1
- package/dist/components/molecules/ButtonDownloadFile/DownloadFile.stories.js +66 -0
- package/dist/components/molecules/ButtonDownloadFile/index.js +179 -0
- package/dist/components/molecules/ButtonDownloadFile/styles.js +23 -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 +12 -5
- package/dist/components/molecules/HeaderTop/styles.js +1 -1
- package/dist/components/molecules/ImageTooltip/ImageTooltip.stories.js +72 -0
- package/dist/components/molecules/ImageTooltip/index.js +84 -0
- package/dist/components/molecules/ImageTooltip/styles.js +33 -0
- package/dist/components/organisms/Chat/Chat.stories.js +215 -0
- package/dist/components/organisms/Chat/ChatLists/ChatLists.stories.js +83 -0
- package/dist/components/organisms/Chat/ChatLists/index.js +158 -0
- package/dist/components/organisms/Chat/ChatLists/styles.js +29 -0
- package/dist/components/organisms/Chat/ContainerItems/ContainerItems.stories.js +176 -0
- package/dist/components/organisms/Chat/ContainerItems/index.js +570 -0
- package/dist/components/organisms/Chat/ContainerItems/styles.js +20 -0
- package/dist/components/organisms/Chat/ContentChat/ContentChat.stories.js +142 -0
- package/dist/components/organisms/Chat/ContentChat/index.js +1422 -0
- package/dist/components/organisms/Chat/ContentChat/styles.js +20 -0
- package/dist/components/organisms/Chat/Footer/Footer.stories.js +43 -0
- package/dist/components/organisms/Chat/Footer/index.js +983 -0
- package/dist/components/organisms/Chat/Footer/styles.js +32 -0
- package/dist/components/organisms/Chat/Header/Header.stories.js +96 -0
- package/dist/components/organisms/Chat/Header/index.js +84 -0
- package/dist/components/organisms/Chat/Header/styles.js +20 -0
- package/dist/components/organisms/Chat/index.js +325 -0
- package/dist/components/organisms/Chat/styles.js +29 -0
- package/dist/components/organisms/Modal/Modal.stories.js +66 -0
- package/dist/components/organisms/Modal/index.js +95 -0
- package/dist/components/organisms/Modal/styles.js +20 -0
- package/dist/components/pages/Dashboard/Dashboard.stories.js +16 -44
- package/dist/components/pages/Dashboard/index.js +10 -17
- package/dist/components/pages/ProviderProductEdition/index.js +3 -2
- package/dist/components/pages/RetailerProductEdition/index.js +4 -7
- package/dist/global-files/fonts.css +18 -0
- package/dist/global-files/handle_http.js +383 -0
- package/dist/global-files/utils.js +472 -0
- package/dist/global-files/variables.js +3 -1
- package/dist/index.js +52 -39
- package/package.json +13 -1
- package/src/assets/fonts/Roboto/Roboto-Medium.ttf +0 -0
- package/src/assets/fonts/Roboto/Roboto-Regular.ttf +0 -0
- package/src/assets/images/chatPopup/Spinner.gif +0 -0
- package/src/assets/images/chatPopup/close.svg +3 -0
- package/src/assets/images/chatPopup/defaultImage.png +0 -0
- package/src/assets/images/chatPopup/defaultProfile.png +0 -0
- package/src/assets/images/chatPopup/doc.svg +1 -0
- package/src/assets/images/chatPopup/document.svg +1 -0
- package/src/assets/images/chatPopup/iconChat.svg +19 -0
- package/src/assets/images/chatPopup/iconPlus.svg +3 -0
- package/src/assets/images/chatPopup/pdf.svg +75 -0
- package/src/assets/images/chatPopup/remove.svg +4 -0
- package/src/assets/images/chatPopup/send.svg +3 -0
- package/src/assets/images/chatPopup/svgIcon.svg +109 -0
- package/src/assets/images/chatPopup/upload_file.svg +3 -0
- package/src/assets/images/chatPopup/xls.svg +53 -0
- 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/components/atoms/ButtonFileChooser/ButtonFileChooser.stories.js +47 -0
- package/src/components/atoms/ButtonFileChooser/index.js +70 -0
- package/src/components/atoms/ButtonFileChooser/styles.js +4 -0
- package/src/components/atoms/ButtonV2/ButtonV2.stories.js +50 -0
- package/src/components/atoms/ButtonV2/index.js +74 -0
- package/src/components/atoms/ButtonV2/styles.js +187 -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 +120 -0
- package/src/components/atoms/IconFile/styles.js +67 -0
- package/src/components/atoms/Image/Image.stories.js +43 -0
- package/src/components/atoms/Image/index.js +54 -0
- package/src/components/atoms/Image/styles.js +25 -0
- package/src/components/atoms/ImageLink/ImageLink.stories.js +43 -0
- package/src/components/atoms/ImageLink/index.js +58 -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 +192 -0
- package/src/components/atoms/ImagePreview/styles.js +77 -0
- package/src/components/atoms/InputText/InputText.stories.js +40 -0
- package/src/components/atoms/InputText/index.js +63 -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 +53 -0
- package/src/components/atoms/NotFound/styles.js +55 -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 +113 -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/HeaderTop/index.js +11 -6
- package/src/components/molecules/HeaderTop/styles.js +4 -0
- package/src/components/molecules/ImageTooltip/ImageTooltip.stories.js +46 -0
- package/src/components/molecules/ImageTooltip/index.js +64 -0
- package/src/components/molecules/ImageTooltip/styles.js +18 -0
- package/src/components/organisms/Chat/Chat.stories.js +199 -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 +551 -0
- package/src/components/organisms/Chat/ContainerItems/styles.js +336 -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 +900 -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 +669 -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 +295 -0
- package/src/components/organisms/Chat/styles.js +42 -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/pages/Dashboard/Dashboard.stories.js +16 -47
- package/src/components/pages/Dashboard/index.js +4 -13
- package/src/components/pages/ProviderProductEdition/index.js +6 -7
- package/src/components/pages/RetailerProductEdition/index.js +5 -4
- package/src/global-files/fonts.css +18 -0
- package/src/global-files/handle_http.js +231 -0
- package/src/global-files/utils.js +300 -0
- package/src/global-files/variables.js +2 -0
- package/src/index.js +1 -0
- package/dist/components/atoms/ChatPopUp/ChatPopUp.stories.js +0 -28
- package/dist/components/atoms/ChatPopUp/index.js +0 -841
- package/dist/components/atoms/ChatPopUp/styles.js +0 -27
- package/dist/components/atoms/ChatPopUp/utils/handlersChat.js +0 -182
- package/dist/components/atoms/StatusTag/StatusTag.stories.js +0 -48
- package/dist/components/atoms/StatusTag/index.js +0 -58
- package/dist/components/atoms/StatusTag/styles.js +0 -20
- package/dist/components/pages/RegistrationLoginFirstStep/RegistrationLoginFirstStep.stories.js +0 -37
- package/dist/components/pages/RegistrationLoginFirstStep/index.js +0 -269
- package/dist/components/pages/RegistrationLoginFirstStep/styles.js +0 -20
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.default = Modal;
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
|
|
14
|
+
var _styles = require("./styles");
|
|
15
|
+
|
|
16
|
+
var _freeSolidSvgIcons = require("@fortawesome/free-solid-svg-icons");
|
|
17
|
+
|
|
18
|
+
var _reactFontawesome = require("@fortawesome/react-fontawesome");
|
|
19
|
+
|
|
20
|
+
var _material = require("@mui/material");
|
|
21
|
+
|
|
22
|
+
var _ButtonV = _interopRequireDefault(require("../../atoms/ButtonV2"));
|
|
23
|
+
|
|
24
|
+
var _CustomIcon = _interopRequireDefault(require("../../atoms/CustomIcon"));
|
|
25
|
+
|
|
26
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
|
+
|
|
28
|
+
function Modal(props) {
|
|
29
|
+
var className = props.className,
|
|
30
|
+
show = props.show,
|
|
31
|
+
title = props.title,
|
|
32
|
+
message = props.message,
|
|
33
|
+
icon = props.icon,
|
|
34
|
+
customComponent = props.customComponent,
|
|
35
|
+
buttons = props.buttons,
|
|
36
|
+
onClickModal = props.onClickModal,
|
|
37
|
+
onClickBtnDefault = props.onClickBtnDefault;
|
|
38
|
+
var icons = {
|
|
39
|
+
error: _freeSolidSvgIcons.faClose,
|
|
40
|
+
warning: _freeSolidSvgIcons.faExclamationTriangle,
|
|
41
|
+
info: _freeSolidSvgIcons.faExclamation,
|
|
42
|
+
success: _freeSolidSvgIcons.faCheck
|
|
43
|
+
};
|
|
44
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Backdrop, {
|
|
45
|
+
open: show,
|
|
46
|
+
className: "container-backgroundModal",
|
|
47
|
+
timeout: 400,
|
|
48
|
+
style: {
|
|
49
|
+
backgroundColor: "transparent",
|
|
50
|
+
zIndex: 10
|
|
51
|
+
},
|
|
52
|
+
onClick: function onClick(event) {
|
|
53
|
+
return onClickModal && onClickModal(event);
|
|
54
|
+
},
|
|
55
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Fade, {
|
|
56
|
+
in: show,
|
|
57
|
+
timeout: 400,
|
|
58
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.ContainerModal, {
|
|
59
|
+
className: className ? className : "",
|
|
60
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
61
|
+
className: "contentModal",
|
|
62
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("header", {
|
|
63
|
+
children: ![null, undefined, ""].includes(title === null || title === void 0 ? void 0 : title.trim()) && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
64
|
+
className: "label-title",
|
|
65
|
+
children: title.trim()
|
|
66
|
+
})
|
|
67
|
+
}), icons[icon === null || icon === void 0 ? void 0 : icon.toLowerCase()] && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomIcon.default, {
|
|
68
|
+
type: "white",
|
|
69
|
+
className: "iconModal " + "iconModal-" + icon.toLowerCase(),
|
|
70
|
+
size: 35,
|
|
71
|
+
borderType: "circle",
|
|
72
|
+
icon: icons[icon.toLowerCase()]
|
|
73
|
+
}), ![null, undefined, ""].includes(message === null || message === void 0 ? void 0 : message.trim()) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("label", {
|
|
74
|
+
className: "label-message",
|
|
75
|
+
children: [" ", message.trim(), " "]
|
|
76
|
+
}), customComponent && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
77
|
+
className: "container-customComponent",
|
|
78
|
+
children: customComponent
|
|
79
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
80
|
+
className: "container-buttons",
|
|
81
|
+
children: buttons !== null && buttons !== void 0 && buttons.length ? buttons : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.default, {
|
|
82
|
+
type: "white",
|
|
83
|
+
borderType: "oval",
|
|
84
|
+
label: "Aceptar",
|
|
85
|
+
size: 12,
|
|
86
|
+
onClick: function onClick(event) {
|
|
87
|
+
return onClickBtnDefault && onClickBtnDefault(event);
|
|
88
|
+
}
|
|
89
|
+
}, "btn-Aceptar")
|
|
90
|
+
})]
|
|
91
|
+
})
|
|
92
|
+
})
|
|
93
|
+
})
|
|
94
|
+
});
|
|
95
|
+
}
|
|
@@ -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.ContainerModal = 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 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
|
+
|
|
20
|
+
exports.ContainerModal = ContainerModal;
|
|
@@ -27,30 +27,29 @@ var DashboardDeafult = Template.bind({});
|
|
|
27
27
|
exports.DashboardDeafult = DashboardDeafult;
|
|
28
28
|
DashboardDeafult.args = {
|
|
29
29
|
user: {
|
|
30
|
-
id_user:
|
|
31
|
-
name: "
|
|
32
|
-
last_name: "
|
|
33
|
-
email: "
|
|
34
|
-
position: "
|
|
35
|
-
telephone:
|
|
36
|
-
country:
|
|
37
|
-
id_company:
|
|
38
|
-
id_cognito: "
|
|
30
|
+
id_user: 425,
|
|
31
|
+
name: "Auditor QA",
|
|
32
|
+
last_name: " ",
|
|
33
|
+
email: "ladiboh785@mi166.com",
|
|
34
|
+
position: "Tester",
|
|
35
|
+
telephone: null,
|
|
36
|
+
country: null,
|
|
37
|
+
id_company: 254,
|
|
38
|
+
id_cognito: "23a3f496-4e38-4e12-9bf5-7f90b77a2f35",
|
|
39
39
|
birth_Date: null,
|
|
40
40
|
about_me: null,
|
|
41
41
|
zip_code: null,
|
|
42
42
|
address: null,
|
|
43
43
|
job: null,
|
|
44
44
|
id_stripe: null,
|
|
45
|
-
id_role:
|
|
45
|
+
id_role: 6,
|
|
46
46
|
active: 1,
|
|
47
47
|
is_retailer: 0,
|
|
48
|
-
email_notify:
|
|
49
|
-
is_superadmin: 0,
|
|
48
|
+
email_notify: null,
|
|
50
49
|
membership: {
|
|
51
|
-
id:
|
|
52
|
-
start_date: "2022-
|
|
53
|
-
end_date: "2023-
|
|
50
|
+
id: 750,
|
|
51
|
+
start_date: "2022-01-07T21:32:54.000Z",
|
|
52
|
+
end_date: "2023-01-07T21:32:54.000Z",
|
|
54
53
|
planID: 6,
|
|
55
54
|
plan: "prod_KvGd6YSTJyR3AP",
|
|
56
55
|
name: "Plan Small",
|
|
@@ -58,34 +57,7 @@ DashboardDeafult.args = {
|
|
|
58
57
|
products_limit: "1000",
|
|
59
58
|
type: "Enterprise"
|
|
60
59
|
},
|
|
61
|
-
src: "https://content-management-profile-prod.s3.amazonaws.com/id-
|
|
62
|
-
},
|
|
63
|
-
company: {
|
|
64
|
-
id_company: 816,
|
|
65
|
-
trade_name: "Prod Test",
|
|
66
|
-
company_name: "Prod Test",
|
|
67
|
-
rfc: "ASER12345",
|
|
68
|
-
adress: "Av. Insurgentes",
|
|
69
|
-
about_company: null,
|
|
70
|
-
telephone: null,
|
|
71
|
-
web_site: null,
|
|
72
|
-
zip_code: null,
|
|
73
|
-
email: null,
|
|
74
|
-
social_link: null,
|
|
75
|
-
is_retailer: 0,
|
|
76
|
-
financedRetailers: [{
|
|
77
|
-
id: 58,
|
|
78
|
-
name: "The Home Depot Golden",
|
|
79
|
-
country: "México",
|
|
80
|
-
id_region: 1,
|
|
81
|
-
active: 1
|
|
82
|
-
}, {
|
|
83
|
-
id: 59,
|
|
84
|
-
name: "The Home Depot Platinum",
|
|
85
|
-
country: "México",
|
|
86
|
-
id_region: 1,
|
|
87
|
-
active: 1
|
|
88
|
-
}]
|
|
60
|
+
src: "https://content-management-profile-prod.s3.amazonaws.com/id-425/425.png?1666639556174"
|
|
89
61
|
},
|
|
90
|
-
jwt: "
|
|
62
|
+
jwt: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI5YTIxMzEyOC02NDgyLTRjMTYtYTRiNi02ZTY0ZjIyNWIxYmQiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6IjlhMjEzMTI4LTY0ODItNGMxNi1hNGI2LTZlNjRmMjI1YjFiZCIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJkYWVmODU5ZC00ODQyLTRkNDQtYTNiNC02ODZlNmJhNTVkMjgiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY2NzA3MjM5MCwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY2NzA3NTk5MCwiaWF0IjoxNjY3MDcyMzkwLCJlbWFpbCI6ImlzbWFlbDk3bG9wZXpAZ21haWwuY29tIn0.FbGtX1sC3b2c76hGcxkx-GSurEMKZSwNVEnuUOlV9Dhhqrre1VmtfjvodH_3Leipr4g38Sukb6Pr9lVgEy6DJ57MShpS63niXE7Y43FUJ4gVe4F6k8sYbXUaZYS2vw2_PibnycNsFrpD76fZ_ulTqlSuHNrnzf2mjcDFJ5Qlj8hcLlRnpu_DFVpIiXVyK9kvLE5jImHvo4oQZUSrnuIs-oUE7j8mX8-GH2e95Up2wnBMak6S6meMibKoUEFo2qdtDSFbS1JCMBq4vWw2DxToX-7AGXGp_CLxf-sjJ_UpLmFa0KyyxjhAE2cR9BGo8DM8LEUIqMvcz2KH-7e9QTgisA"
|
|
91
63
|
};
|
|
@@ -188,7 +188,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
188
188
|
while (1) {
|
|
189
189
|
switch (_context2.prev = _context2.next) {
|
|
190
190
|
case 0:
|
|
191
|
-
isTHDUser =
|
|
191
|
+
isTHDUser = [657, 818, 819].includes(user.id_company);
|
|
192
192
|
_context2.next = 3;
|
|
193
193
|
return _axios.default.get("".concat(process.env.REACT_APP_RETAILER_ENDPOINT), {
|
|
194
194
|
headers: {
|
|
@@ -219,39 +219,32 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
219
219
|
|
|
220
220
|
var loadProductsByStatus = /*#__PURE__*/function () {
|
|
221
221
|
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(orderByStatus, filter) {
|
|
222
|
-
var
|
|
222
|
+
var _ref5, ordersBydate, ordersByStatus, _ordersByStatus$total, total, _ordersByStatus$R, R, _ordersByStatus$PA, PA, _ordersByStatus$Ex, Ex, inProcess, metricsArray;
|
|
223
223
|
|
|
224
224
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
225
225
|
while (1) {
|
|
226
226
|
switch (_context3.prev = _context3.next) {
|
|
227
227
|
case 0:
|
|
228
|
-
|
|
229
|
-
isProvider = !user.is_retailer && user.id_role === 0;
|
|
230
|
-
isCollaborator = user.id_role > 0;
|
|
231
|
-
_context3.next = 5;
|
|
228
|
+
_context3.next = 2;
|
|
232
229
|
return loadProductVersions(orderByStatus);
|
|
233
230
|
|
|
234
|
-
case
|
|
231
|
+
case 2:
|
|
235
232
|
_context3.t0 = _context3.sent;
|
|
236
233
|
|
|
237
234
|
if (_context3.t0) {
|
|
238
|
-
_context3.next =
|
|
235
|
+
_context3.next = 5;
|
|
239
236
|
break;
|
|
240
237
|
}
|
|
241
238
|
|
|
242
239
|
_context3.t0 = {};
|
|
243
240
|
|
|
244
|
-
case
|
|
241
|
+
case 5:
|
|
245
242
|
_ref5 = _context3.t0;
|
|
246
243
|
ordersBydate = _ref5.ordersBydate;
|
|
247
244
|
ordersByStatus = _ref5.ordersByStatus;
|
|
248
|
-
_ordersByStatus$total = ordersByStatus.total, total = _ordersByStatus$total === void 0 ? 0 : _ordersByStatus$total, _ordersByStatus$R = ordersByStatus.R, R = _ordersByStatus$R === void 0 ? 0 : _ordersByStatus$R, _ordersByStatus$PA = ordersByStatus.PA, PA = _ordersByStatus$PA === void 0 ? 0 : _ordersByStatus$PA, _ordersByStatus$Ex = ordersByStatus.Ex, Ex = _ordersByStatus$Ex === void 0 ? 0 : _ordersByStatus$Ex
|
|
249
|
-
productsFinished = 0;
|
|
250
|
-
if (isTHDUser) productsFinished = Ex;
|
|
251
|
-
if (isProvider) productsFinished = ACA;
|
|
252
|
-
if (isCollaborator) productsFinished = Ex + ACA;
|
|
245
|
+
_ordersByStatus$total = ordersByStatus.total, total = _ordersByStatus$total === void 0 ? 0 : _ordersByStatus$total, _ordersByStatus$R = ordersByStatus.R, R = _ordersByStatus$R === void 0 ? 0 : _ordersByStatus$R, _ordersByStatus$PA = ordersByStatus.PA, PA = _ordersByStatus$PA === void 0 ? 0 : _ordersByStatus$PA, _ordersByStatus$Ex = ordersByStatus.Ex, Ex = _ordersByStatus$Ex === void 0 ? 0 : _ordersByStatus$Ex;
|
|
253
246
|
inProcess = Object.keys(ordersByStatus).reduce(function (prev, curr) {
|
|
254
|
-
return !["total", "PA", "R", "Ex"
|
|
247
|
+
return !["total", "PA", "R", "Ex"].includes(curr) ? prev + ordersByStatus[curr] : prev;
|
|
255
248
|
}, 0);
|
|
256
249
|
metricsArray = [metricsData[0] ? metricsData[0] : {
|
|
257
250
|
label: "Productos totales",
|
|
@@ -268,7 +261,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
268
261
|
value: inProcess
|
|
269
262
|
}, {
|
|
270
263
|
label: "Productos terminados",
|
|
271
|
-
value:
|
|
264
|
+
value: Ex
|
|
272
265
|
});
|
|
273
266
|
setMetricsData(metricsArray);
|
|
274
267
|
setTotalCount(total);
|
|
@@ -276,7 +269,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
276
269
|
setRequiredProducts(ordersBydate);
|
|
277
270
|
setProductsByStatus(ordersByStatus);
|
|
278
271
|
|
|
279
|
-
case
|
|
272
|
+
case 17:
|
|
280
273
|
case "end":
|
|
281
274
|
return _context3.stop();
|
|
282
275
|
}
|
|
@@ -106,7 +106,8 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
106
106
|
var reducerImages = function reducerImages(state, action) {
|
|
107
107
|
var _action$init, _action$init$inputsBy;
|
|
108
108
|
|
|
109
|
-
var values = state.values,
|
|
109
|
+
var _state$values = state.values,
|
|
110
|
+
values = _state$values === void 0 ? [] : _state$values,
|
|
110
111
|
attrForImgs = state.attrForImgs,
|
|
111
112
|
inputsByRetailer = state.inputsByRetailer;
|
|
112
113
|
|
|
@@ -182,7 +183,7 @@ var reducerImages = function reducerImages(state, action) {
|
|
|
182
183
|
inputs = inputsInitial === null || inputsInitial === void 0 ? void 0 : inputsInitial.filter(function (input) {
|
|
183
184
|
return imageIdArray.includes(input.id);
|
|
184
185
|
});
|
|
185
|
-
|
|
186
|
+
if (orderedImages.length > 0) values = orderedImages;
|
|
186
187
|
} catch (error) {
|
|
187
188
|
console.log(error);
|
|
188
189
|
}
|
|
@@ -84,7 +84,8 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
84
84
|
var reducerImages = function reducerImages(state, action) {
|
|
85
85
|
var _action$init, _action$init$inputsBy;
|
|
86
86
|
|
|
87
|
-
var values = state.values,
|
|
87
|
+
var _state$values = state.values,
|
|
88
|
+
values = _state$values === void 0 ? [] : _state$values,
|
|
88
89
|
attrForImgs = state.attrForImgs,
|
|
89
90
|
inputsByRetailer = state.inputsByRetailer;
|
|
90
91
|
|
|
@@ -156,11 +157,7 @@ var reducerImages = function reducerImages(state, action) {
|
|
|
156
157
|
|
|
157
158
|
var orderedImages = [];
|
|
158
159
|
var imageIdArray = [];
|
|
159
|
-
|
|
160
|
-
if (action !== null && action !== void 0 && action.retailerId && !_inputsByRetailer[action.retailerId]) {
|
|
161
|
-
_inputsByRetailer[action.retailerId] = [];
|
|
162
|
-
}
|
|
163
|
-
|
|
160
|
+
if (action !== null && action !== void 0 && action.retailerId && !_inputsByRetailer[action.retailerId]) _inputsByRetailer[action.retailerId] = [];
|
|
164
161
|
action.retailerId && ((_inputsByRetailer$act = _inputsByRetailer[action.retailerId]) === null || _inputsByRetailer$act === void 0 ? void 0 : _inputsByRetailer$act.filter(function (input) {
|
|
165
162
|
imageIdArray.push(input.id_image);
|
|
166
163
|
valuesInitial.forEach(function (value) {
|
|
@@ -170,7 +167,7 @@ var reducerImages = function reducerImages(state, action) {
|
|
|
170
167
|
inputs = inputsInitial === null || inputsInitial === void 0 ? void 0 : inputsInitial.filter(function (input) {
|
|
171
168
|
return imageIdArray.includes(input.id);
|
|
172
169
|
});
|
|
173
|
-
|
|
170
|
+
if (orderedImages.length > 0) values = orderedImages;
|
|
174
171
|
} catch (error) {
|
|
175
172
|
console.log(error);
|
|
176
173
|
}
|
|
@@ -43,3 +43,21 @@
|
|
|
43
43
|
src: url("../assets/fonts/raleway/Raleway-Black.ttf");
|
|
44
44
|
font-weight: 900;
|
|
45
45
|
}
|
|
46
|
+
|
|
47
|
+
@font-face {
|
|
48
|
+
font-family: "RobotoMedium";
|
|
49
|
+
src: url("../assets/fonts/Roboto/Roboto-Medium.ttf");
|
|
50
|
+
font-weight: 500;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@font-face {
|
|
54
|
+
font-family: "RobotoRegular";
|
|
55
|
+
src: url("../assets/fonts/Roboto/Roboto-Regular.ttf");
|
|
56
|
+
font-weight: 400;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.prueba {
|
|
60
|
+
color: #9e3e26;
|
|
61
|
+
color: #b42983;
|
|
62
|
+
color: #e7e7e7;
|
|
63
|
+
}
|