contentoh-components-library 21.3.16 → 21.3.17
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/images/generalButton/closeIcon.svg +2 -2
- package/dist/components/atoms/ProgressBar/index.js +36 -6
- package/dist/components/atoms/ProgressBar/styles.js +11 -3
- 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/RetailerProductEdition/RetailerProductEdition.stories.js +36 -44
- package/dist/components/pages/RetailerProductEdition/index.js +13 -12
- package/dist/global-files/data.js +18 -23
- 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 -9
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +36 -46
- package/src/components/pages/RetailerProductEdition/index.js +14 -10
- package/src/global-files/data.js +18 -23
- 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
package/.env.development
CHANGED
|
@@ -21,6 +21,9 @@ REACT_APP_READ_REQUIRED_ORDERS=https://fc069ovhuk.execute-api.us-east-1.amazonaw
|
|
|
21
21
|
REACT_APP_CATEGORY_ENDPOINT=https://fc069ovhuk.execute-api.us-east-1.amazonaws.com/dev/categories
|
|
22
22
|
REACT_APP_READ_PROVIDERS=https://fc069ovhuk.execute-api.us-east-1.amazonaws.com/dev/providers
|
|
23
23
|
REACT_APP_PENDING_INVITATIONS=https://fc069ovhuk.execute-api.us-east-1.amazonaws.com/dev/pending-invitations
|
|
24
|
+
REACT_APP_PRODUCTS_CHAT_ENDPOINT=https://fc069ovhuk.execute-api.us-east-1.amazonaws.com/dev/products-chat
|
|
25
|
+
REACT_APP_TICKETS_CHAT_ENDPOINT=https://ocqbzaa4a2.execute-api.us-east-1.amazonaws.com/dev/ticket-chat
|
|
26
|
+
REACT_APP_IMAGES_ENDPOINT=https://content-management-images.s3.amazonaws.com
|
|
24
27
|
|
|
25
28
|
REACT_APP_IMAGES_BUCKET=content-management-images
|
|
26
29
|
REACT_APP_IMAGES_PROFILE_BUCKET=content-management-profile
|
|
@@ -28,3 +31,5 @@ REACT_APP_KUTS3=AKIA5CPHLQTTS22HCGHW
|
|
|
28
31
|
REACT_APP_AKUTS3=RSpwEaM0fsLEgN7BJzRyCKqyU0lNExTsPUvxyNXm
|
|
29
32
|
REACT_APP_USER_POOL_ID=us-east-1_XMZQdqkGj
|
|
30
33
|
REACT_APP_USER_POOL_WEB_CLIENT_ID=5ac8tpgs6gbsq13frvrpieep40
|
|
34
|
+
REACT_APP_KEY_UPLOAD_TO_S3=AKIA5CPHLQTTYNYWQ2TM
|
|
35
|
+
REACT_APP_ACCESS_KEY_UPLOAD_TO_S3=zGYWR4rW52rqg1bW1CrC00zBXv2od0mNCF8WGcvr
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<svg width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<line x1="13.3585" y1="12.1333" x2="39.8661" y2="38.641" stroke="#E33AA9" stroke-width="
|
|
3
|
-
<path d="M39.8672 12.1333L13.8672 38.1333" stroke="#E33AA9" stroke-width="
|
|
2
|
+
<line x1="13.3585" y1="12.1333" x2="39.8661" y2="38.641" stroke="#E33AA9" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<path d="M39.8672 12.1333L13.8672 38.1333" stroke="#E33AA9" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
4
|
</svg>
|
|
@@ -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;
|
|
@@ -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
|
}
|
|
@@ -31,70 +31,73 @@ ProviderProductEditionDefault.args = {
|
|
|
31
31
|
"Ficha técnica": true,
|
|
32
32
|
Imágenes: true
|
|
33
33
|
},
|
|
34
|
-
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
34
|
+
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIwM2ViMjZhMC1hYjU2LTQ3NjctYjY0Zi04NDkyNTgwNzcwMmEiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6IjAzZWIyNmEwLWFiNTYtNDc2Ny1iNjRmLTg0OTI1ODA3NzAyYSIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJmNmNkMzA1My1iODE4LTQzYzgtOGZhMC0yNTZmMTBhMDYwNjciLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY3NDU5OTgwNiwibmFtZSI6IlBydWViYSBNZXJjaGFudHMiLCJwaG9uZV9udW1iZXIiOiIrNTIxMjM0NTY3ODkxIiwiZXhwIjoxNjc0NjAzNDA2LCJpYXQiOjE2NzQ1OTk4MDYsImVtYWlsIjoibWVyY2hhbnRzMjRlbmVAYWxsZnJlZW1haWwubmV0In0.osGY8Rdr20hTwL86dZ_CzXxHLvPe-L0iaLtWVwJ78prdMlbDoEZWNePr-Di1rb8F2efV6FAsf9mELW6Tw3PETo_d5yeDEPVAGD0pXFvVntTlSrJGtfEDMnpNWTG2uaMlL1_zJ8BcFYmIUniZN8VvEKW6ezFOt01cK3We-Vrv92TqKa-ePQRkDnhKu52nnTgxs5aysGf-mYLxLumQ4TcOPXJ2x6OsszedJaujFDeCPN7JVGbg9HC68__WklpgocSasU6fQg4Glh1kXWQ-fy4XaFw6cBParJjkqic2Gg1iqwB5wGbrwD4E0crZyPkgwwPydTLLu6WguGWBuQHhcoG-xg",
|
|
35
35
|
articleId: 238,
|
|
36
36
|
category: 846,
|
|
37
37
|
version: 2,
|
|
38
38
|
productSelected: {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
category: "Decoración|Accesorios Decorativos|Accesorios Decorativos",
|
|
40
|
+
company_name: "merchants24ene@allfreemail.net",
|
|
41
|
+
company_id: 918,
|
|
42
|
+
id_category: "2028",
|
|
43
|
+
id_article: 432,
|
|
44
|
+
name: "VELA AROMA 18 OZ MAN/CAN",
|
|
45
|
+
upc: "102852",
|
|
45
46
|
version: 1,
|
|
46
47
|
retailersAvailable: [{
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
id: 68,
|
|
49
|
+
name: "The Home Depot Merchants"
|
|
49
50
|
}]
|
|
50
51
|
},
|
|
51
52
|
productToEdit: {
|
|
52
|
-
idCategory:
|
|
53
|
-
ArticleId:
|
|
53
|
+
idCategory: "2028",
|
|
54
|
+
ArticleId: 432,
|
|
54
55
|
product: [{
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
category: "Decoración|Accesorios Decorativos|Accesorios Decorativos",
|
|
57
|
+
company_name: "merchants24ene@allfreemail.net",
|
|
58
|
+
company_id: 918,
|
|
59
|
+
id_category: "2028",
|
|
60
|
+
id_article: 432,
|
|
61
|
+
name: "VELA AROMA 18 OZ MAN/CAN",
|
|
62
|
+
upc: "102852",
|
|
61
63
|
version: 1,
|
|
62
64
|
retailersAvailable: [{
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
id: 68,
|
|
66
|
+
name: "The Home Depot Merchants"
|
|
65
67
|
}]
|
|
66
68
|
}]
|
|
67
69
|
},
|
|
68
70
|
location: {
|
|
69
71
|
state: {
|
|
70
|
-
origin: "Contentoh"
|
|
72
|
+
origin: "Contentoh",
|
|
73
|
+
withChat: true
|
|
71
74
|
}
|
|
72
75
|
},
|
|
73
76
|
user: {
|
|
74
|
-
id_user:
|
|
75
|
-
name: "
|
|
76
|
-
last_name: "
|
|
77
|
-
email: "
|
|
78
|
-
position: "
|
|
79
|
-
telephone: "+
|
|
77
|
+
id_user: 140,
|
|
78
|
+
name: "Prueba",
|
|
79
|
+
last_name: "Merchants",
|
|
80
|
+
email: "merchants24ene@allfreemail.net",
|
|
81
|
+
position: "merchants24ene@allfreemail.net",
|
|
82
|
+
telephone: "+521234567891",
|
|
80
83
|
country: "México",
|
|
81
|
-
id_company:
|
|
82
|
-
id_cognito: "
|
|
84
|
+
id_company: 918,
|
|
85
|
+
id_cognito: "03eb26a0-ab56-4767-b64f-84925807702a",
|
|
83
86
|
birth_Date: null,
|
|
84
|
-
about_me:
|
|
85
|
-
zip_code:
|
|
86
|
-
address:
|
|
87
|
-
job:
|
|
88
|
-
id_stripe:
|
|
87
|
+
about_me: null,
|
|
88
|
+
zip_code: null,
|
|
89
|
+
address: null,
|
|
90
|
+
job: null,
|
|
91
|
+
id_stripe: null,
|
|
89
92
|
id_role: 0,
|
|
90
93
|
active: 1,
|
|
91
94
|
is_retailer: 0,
|
|
92
|
-
email_notify:
|
|
93
|
-
is_user_tech:
|
|
95
|
+
email_notify: 1,
|
|
96
|
+
is_user_tech: null,
|
|
94
97
|
membership: {
|
|
95
|
-
id:
|
|
96
|
-
start_date: "
|
|
97
|
-
end_date: "
|
|
98
|
+
id: 109,
|
|
99
|
+
start_date: "2023-01-24T22:07:34.000Z",
|
|
100
|
+
end_date: "2024-01-24T22:07:34.000Z",
|
|
98
101
|
planID: 8,
|
|
99
102
|
plan: "prod_KtlhECVSFG2iro",
|
|
100
103
|
name: "Plan Pro",
|
|
@@ -102,21 +105,33 @@ ProviderProductEditionDefault.args = {
|
|
|
102
105
|
products_limit: "5000",
|
|
103
106
|
type: "Enterprise"
|
|
104
107
|
},
|
|
105
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
108
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-140/140.png?1674599807427"
|
|
106
109
|
},
|
|
107
110
|
company: {
|
|
108
|
-
id_company:
|
|
109
|
-
trade_name: "
|
|
110
|
-
company_name: "
|
|
111
|
-
rfc: "
|
|
112
|
-
adress: "
|
|
113
|
-
about_company:
|
|
114
|
-
telephone:
|
|
115
|
-
web_site:
|
|
116
|
-
zip_code:
|
|
111
|
+
id_company: 918,
|
|
112
|
+
trade_name: "merchants24ene@allfreemail.net",
|
|
113
|
+
company_name: "merchants24ene@allfreemail.net",
|
|
114
|
+
rfc: "merchants24ene@allfreemail.net",
|
|
115
|
+
adress: "merchants24ene@allfreemail.net",
|
|
116
|
+
about_company: null,
|
|
117
|
+
telephone: null,
|
|
118
|
+
web_site: null,
|
|
119
|
+
zip_code: null,
|
|
117
120
|
email: null,
|
|
118
|
-
social_link:
|
|
119
|
-
is_retailer: 0
|
|
121
|
+
social_link: null,
|
|
122
|
+
is_retailer: 0,
|
|
123
|
+
financedRetailers: [{
|
|
124
|
+
id: 68,
|
|
125
|
+
name: "The Home Depot Merchants",
|
|
126
|
+
country: "México",
|
|
127
|
+
id_region: 1,
|
|
128
|
+
active: 1
|
|
129
|
+
}],
|
|
130
|
+
retailers: [{
|
|
131
|
+
id: null,
|
|
132
|
+
name: null,
|
|
133
|
+
country: null
|
|
134
|
+
}]
|
|
120
135
|
},
|
|
121
136
|
showSurvey: function showSurvey(v) {
|
|
122
137
|
return v && alert("se muestra");
|
|
@@ -212,7 +212,7 @@ var myBucket = new _awsSdk.default.S3({
|
|
|
212
212
|
});
|
|
213
213
|
|
|
214
214
|
var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
215
|
-
var _product$retailers, _product$retailersAva, _location$state, _datasheets$, _datasheets$$data;
|
|
215
|
+
var _product$retailers, _product$retailersAva, _location$state, _location$state2, _datasheets$, _datasheets$$data;
|
|
216
216
|
|
|
217
217
|
var tabsSections = _ref.tabsSections,
|
|
218
218
|
_ref$productSelected = _ref.productSelected,
|
|
@@ -227,7 +227,8 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
227
227
|
revision = _ref$revision === void 0 ? false : _ref$revision,
|
|
228
228
|
setShowContentohRequestModal = _ref.setShowContentohRequestModal,
|
|
229
229
|
showSurvey = _ref.showSurvey,
|
|
230
|
-
company = _ref.company
|
|
230
|
+
company = _ref.company,
|
|
231
|
+
withChat = _ref.withChat;
|
|
231
232
|
|
|
232
233
|
var _useState = (0, _react.useState)("Descripción"),
|
|
233
234
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -565,7 +566,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
565
566
|
(0, _data.getPercentage)({
|
|
566
567
|
data: [product]
|
|
567
568
|
}).then(function (res) {
|
|
568
|
-
return setPercentages(res);
|
|
569
|
+
return setPercentages(res[0]);
|
|
569
570
|
});
|
|
570
571
|
setLoading(false);
|
|
571
572
|
|
|
@@ -720,17 +721,17 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
720
721
|
loadAssignations(product);
|
|
721
722
|
}, [userGroups]);
|
|
722
723
|
(0, _react.useEffect)(function () {
|
|
723
|
-
var _retailers$;
|
|
724
|
+
var _Object$keys, _percentages$productT, _retailers$;
|
|
724
725
|
|
|
725
726
|
var productTemp = product;
|
|
726
727
|
var retailers = (productTemp === null || productTemp === void 0 ? void 0 : productTemp.retailersAvailable) || (productTemp === null || productTemp === void 0 ? void 0 : productTemp.retailers);
|
|
727
|
-
retailers === null || retailers === void 0 ? void 0 : retailers.forEach(function (retailer) {
|
|
728
|
-
var _percentages$find;
|
|
729
728
|
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
729
|
+
if (((_Object$keys = Object.keys((_percentages$productT = percentages[productTemp.id_article]) !== null && _percentages$productT !== void 0 ? _percentages$productT : {})) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) > 0) {
|
|
730
|
+
retailers === null || retailers === void 0 ? void 0 : retailers.forEach(function (retailer, index) {
|
|
731
|
+
retailer["percentage"] = Number(percentages[productTemp.id_article][retailer.id].percentageRequired);
|
|
732
|
+
});
|
|
733
|
+
}
|
|
734
|
+
|
|
734
735
|
setProduct(productTemp);
|
|
735
736
|
setActivePercentage((_retailers$ = retailers[0]) === null || _retailers$ === void 0 ? void 0 : _retailers$.percentage);
|
|
736
737
|
}, [percentages]);
|
|
@@ -1680,7 +1681,10 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1680
1681
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
1681
1682
|
headerTop: headerTop,
|
|
1682
1683
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_HeaderTop.HeaderTop, {
|
|
1683
|
-
setHeaderTop: setHeaderTop
|
|
1684
|
+
setHeaderTop: setHeaderTop,
|
|
1685
|
+
withChat: location === null || location === void 0 ? void 0 : (_location$state2 = location.state) === null || _location$state2 === void 0 ? void 0 : _location$state2.withChat,
|
|
1686
|
+
productSelected: productSelected,
|
|
1687
|
+
token: token
|
|
1684
1688
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1685
1689
|
className: "data-container",
|
|
1686
1690
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|