contentoh-components-library 21.3.3 → 21.3.5
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 +2 -5
- package/.env.production +25 -25
- package/dist/components/atoms/GeneralButton/index.js +6 -2
- package/dist/components/atoms/Select/VersionSelect.js +2 -1
- package/dist/components/molecules/CustomSelect/CustomSelect.stories.js +22 -21
- package/dist/components/molecules/CustomSelect/SelectItem.js +1 -10
- package/dist/components/molecules/HeaderTop/index.js +5 -10
- package/dist/components/molecules/HeaderTop/styles.js +1 -1
- package/dist/components/organisms/CreateVersion/RenderChilds.js +11 -11
- package/dist/components/organisms/CreateVersion/index.js +30 -89
- package/dist/components/organisms/OrderDetail/OrderDetail.stories.js +1 -1
- package/dist/components/organisms/OrderDetail/index.js +20 -11
- package/dist/components/organisms/OrderDetail/styles.js +1 -1
- package/dist/components/organisms/OrderDetail/utils/Table/styles.js +1 -1
- package/dist/components/organisms/OrderDetail/utils/Table/utils.js +45 -15
- package/dist/components/organisms/VersionSelector/index.js +28 -2
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +69 -147
- package/dist/components/pages/ProviderProductEdition/index.js +19 -39
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +77 -67
- package/dist/components/pages/RetailerProductEdition/index.js +5 -24
- package/dist/global-files/fonts.css +3 -15
- package/dist/global-files/variables.js +0 -2
- package/dist/index.js +46 -267
- package/package.json +1 -12
- package/src/components/atoms/GeneralButton/index.js +4 -1
- package/src/components/atoms/Select/VersionSelect.js +4 -2
- package/src/components/molecules/CustomSelect/CustomSelect.stories.js +12 -20
- package/src/components/molecules/CustomSelect/SelectItem.js +0 -7
- package/src/components/molecules/HeaderTop/index.js +6 -11
- package/src/components/molecules/HeaderTop/styles.js +0 -4
- package/src/components/organisms/CreateVersion/RenderChilds.js +28 -34
- package/src/components/organisms/CreateVersion/index.js +16 -36
- package/src/components/organisms/OrderDetail/OrderDetail.stories.js +1 -1
- package/src/components/organisms/OrderDetail/index.js +19 -12
- package/src/components/organisms/OrderDetail/styles.js +1 -0
- package/src/components/organisms/OrderDetail/utils/Table/styles.js +26 -0
- package/src/components/organisms/OrderDetail/utils/Table/utils.js +30 -15
- package/src/components/organisms/VersionSelector/index.js +18 -3
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +75 -166
- package/src/components/pages/ProviderProductEdition/index.js +3 -22
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +79 -67
- package/src/components/pages/RetailerProductEdition/index.js +2 -14
- package/src/global-files/customHooks.js +2 -2
- package/src/global-files/fonts.css +3 -15
- package/src/global-files/variables.js +0 -2
- package/src/index.js +0 -17
- package/dist/assets/images/customSelect/starIcon.svg +0 -14
- package/dist/assets/images/defaultImages/Spinner.gif +0 -0
- package/dist/assets/images/defaultImages/notFound.svg +0 -124
- package/dist/components/atoms/ButtonFileChooser/ButtonFileChooser.stories.js +0 -72
- package/dist/components/atoms/ButtonFileChooser/index.js +0 -118
- package/dist/components/atoms/ButtonFileChooser/styles.js +0 -20
- package/dist/components/atoms/ButtonV2/ButtonV2.stories.js +0 -66
- package/dist/components/atoms/ButtonV2/index.js +0 -110
- package/dist/components/atoms/ButtonV2/styles.js +0 -53
- package/dist/components/atoms/CustomIcon/CustomIcon.stories.js +0 -50
- package/dist/components/atoms/CustomIcon/index.js +0 -40
- package/dist/components/atoms/CustomIcon/styles.js +0 -33
- package/dist/components/atoms/IconFile/IconFile.stories.js +0 -48
- package/dist/components/atoms/IconFile/index.js +0 -249
- package/dist/components/atoms/IconFile/styles.js +0 -23
- package/dist/components/atoms/Image/Image.stories.js +0 -73
- package/dist/components/atoms/Image/index.js +0 -76
- package/dist/components/atoms/Image/styles.js +0 -43
- package/dist/components/atoms/ImageLink/ImageLink.stories.js +0 -63
- package/dist/components/atoms/ImageLink/index.js +0 -77
- package/dist/components/atoms/ImageLink/styles.js +0 -40
- package/dist/components/atoms/ImagePreview/ImagePreview.stories.js +0 -70
- package/dist/components/atoms/ImagePreview/index.js +0 -222
- package/dist/components/atoms/ImagePreview/styles.js +0 -44
- package/dist/components/atoms/InputText/InputText.stories.js +0 -60
- package/dist/components/atoms/InputText/index.js +0 -66
- package/dist/components/atoms/InputText/styles.js +0 -32
- package/dist/components/atoms/NotFound/NotFound.stories.js +0 -36
- package/dist/components/atoms/NotFound/index.js +0 -75
- package/dist/components/atoms/NotFound/styles.js +0 -20
- package/dist/components/atoms/SelectItemV2/SelectItemV2.stories.js +0 -45
- package/dist/components/atoms/SelectItemV2/index.js +0 -57
- package/dist/components/atoms/SelectItemV2/styles.js +0 -30
- package/dist/components/atoms/Tooltip/Tooltip.stories.js +0 -66
- package/dist/components/atoms/Tooltip/index.js +0 -72
- package/dist/components/atoms/Tooltip/styles.js +0 -20
- package/dist/components/molecules/ButtonDownloadFile/DownloadFile.stories.js +0 -66
- package/dist/components/molecules/ButtonDownloadFile/index.js +0 -179
- package/dist/components/molecules/ButtonDownloadFile/styles.js +0 -23
- package/dist/components/molecules/Dropdown/Dropdown.stories.js +0 -98
- package/dist/components/molecules/Dropdown/index.js +0 -150
- package/dist/components/molecules/Dropdown/styles.js +0 -26
- package/dist/components/molecules/ImageTooltip/ImageTooltip.stories.js +0 -82
- package/dist/components/molecules/ImageTooltip/index.js +0 -85
- package/dist/components/molecules/ImageTooltip/styles.js +0 -33
- package/dist/components/molecules/SelectV2/SelectV2.stories.js +0 -119
- package/dist/components/molecules/SelectV2/index.js +0 -306
- package/dist/components/molecules/SelectV2/styles.js +0 -42
- package/dist/components/molecules/SelectV2/test.js +0 -95
- package/dist/components/molecules/SelectV2/test.stories.js +0 -27
- package/dist/components/organisms/Chat/Chat.stories.js +0 -215
- package/dist/components/organisms/Chat/ChatLists/ChatLists.stories.js +0 -83
- package/dist/components/organisms/Chat/ChatLists/index.js +0 -160
- package/dist/components/organisms/Chat/ChatLists/styles.js +0 -29
- package/dist/components/organisms/Chat/ContainerItems/ContainerItems.stories.js +0 -176
- package/dist/components/organisms/Chat/ContainerItems/index.js +0 -569
- package/dist/components/organisms/Chat/ContainerItems/styles.js +0 -20
- package/dist/components/organisms/Chat/ContentChat/ContentChat.stories.js +0 -142
- package/dist/components/organisms/Chat/ContentChat/index.js +0 -1422
- package/dist/components/organisms/Chat/ContentChat/styles.js +0 -20
- package/dist/components/organisms/Chat/Footer/Footer.stories.js +0 -43
- package/dist/components/organisms/Chat/Footer/index.js +0 -984
- package/dist/components/organisms/Chat/Footer/styles.js +0 -32
- package/dist/components/organisms/Chat/Header/Header.stories.js +0 -96
- package/dist/components/organisms/Chat/Header/index.js +0 -84
- package/dist/components/organisms/Chat/Header/styles.js +0 -20
- package/dist/components/organisms/Chat/index.js +0 -327
- package/dist/components/organisms/Chat/styles.js +0 -29
- package/dist/components/organisms/Modal/Modal.stories.js +0 -66
- package/dist/components/organisms/Modal/index.js +0 -95
- package/dist/components/organisms/Modal/styles.js +0 -20
- package/dist/components/organisms/RangeCalendar/RangeCalendar.stories.js +0 -33
- package/dist/components/organisms/RangeCalendar/index.js +0 -148
- package/dist/components/organisms/RangeCalendar/styles.js +0 -27
- package/dist/global-files/handle_http.js +0 -383
- package/dist/global-files/utils.js +0 -484
- package/src/assets/images/customSelect/starIcon.svg +0 -14
- package/src/assets/images/defaultImages/Spinner.gif +0 -0
- package/src/assets/images/defaultImages/notFound.svg +0 -124
- package/src/components/atoms/ButtonFileChooser/ButtonFileChooser.stories.js +0 -47
- package/src/components/atoms/ButtonFileChooser/index.js +0 -69
- package/src/components/atoms/ButtonFileChooser/styles.js +0 -4
- package/src/components/atoms/ButtonV2/ButtonV2.stories.js +0 -53
- package/src/components/atoms/ButtonV2/index.js +0 -85
- package/src/components/atoms/ButtonV2/styles.js +0 -217
- package/src/components/atoms/CustomIcon/CustomIcon.stories.js +0 -36
- package/src/components/atoms/CustomIcon/index.js +0 -41
- package/src/components/atoms/CustomIcon/styles.js +0 -85
- package/src/components/atoms/IconFile/IconFile.stories.js +0 -35
- package/src/components/atoms/IconFile/index.js +0 -119
- package/src/components/atoms/IconFile/styles.js +0 -67
- package/src/components/atoms/Image/Image.stories.js +0 -51
- package/src/components/atoms/Image/index.js +0 -55
- package/src/components/atoms/Image/styles.js +0 -34
- package/src/components/atoms/ImageLink/ImageLink.stories.js +0 -43
- package/src/components/atoms/ImageLink/index.js +0 -57
- package/src/components/atoms/ImageLink/styles.js +0 -30
- package/src/components/atoms/ImagePreview/ImagePreview.stories.js +0 -52
- package/src/components/atoms/ImagePreview/index.js +0 -191
- package/src/components/atoms/ImagePreview/styles.js +0 -77
- package/src/components/atoms/InputText/InputText.stories.js +0 -39
- package/src/components/atoms/InputText/index.js +0 -61
- package/src/components/atoms/InputText/styles.js +0 -89
- package/src/components/atoms/NotFound/NotFound.stories.js +0 -19
- package/src/components/atoms/NotFound/index.js +0 -52
- package/src/components/atoms/NotFound/styles.js +0 -55
- package/src/components/atoms/SelectItemV2/SelectItemV2.stories.js +0 -26
- package/src/components/atoms/SelectItemV2/index.js +0 -61
- package/src/components/atoms/SelectItemV2/styles.js +0 -90
- package/src/components/atoms/Tooltip/Tooltip.stories.js +0 -51
- package/src/components/atoms/Tooltip/index.js +0 -59
- package/src/components/atoms/Tooltip/styles.js +0 -42
- package/src/components/molecules/ButtonDownloadFile/DownloadFile.stories.js +0 -54
- package/src/components/molecules/ButtonDownloadFile/index.js +0 -111
- package/src/components/molecules/ButtonDownloadFile/styles.js +0 -66
- package/src/components/molecules/Dropdown/Dropdown.stories.js +0 -103
- package/src/components/molecules/Dropdown/index.js +0 -150
- package/src/components/molecules/Dropdown/styles.js +0 -75
- package/src/components/molecules/ImageTooltip/ImageTooltip.stories.js +0 -68
- package/src/components/molecules/ImageTooltip/index.js +0 -63
- package/src/components/molecules/ImageTooltip/styles.js +0 -18
- package/src/components/molecules/SelectV2/SelectV2.stories.js +0 -114
- package/src/components/molecules/SelectV2/index.js +0 -350
- package/src/components/molecules/SelectV2/styles.js +0 -105
- package/src/components/molecules/SelectV2/test.js +0 -61
- package/src/components/molecules/SelectV2/test.stories.js +0 -10
- package/src/components/organisms/Chat/Chat.stories.js +0 -199
- package/src/components/organisms/Chat/ChatLists/ChatLists.stories.js +0 -65
- 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 +0 -141
- package/src/components/organisms/Chat/ChatLists/styles.js +0 -162
- package/src/components/organisms/Chat/ContainerItems/ContainerItems.stories.js +0 -142
- package/src/components/organisms/Chat/ContainerItems/index.js +0 -549
- package/src/components/organisms/Chat/ContainerItems/styles.js +0 -328
- package/src/components/organisms/Chat/ContentChat/ContentChat.stories.js +0 -102
- 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 +0 -900
- package/src/components/organisms/Chat/ContentChat/styles.js +0 -41
- package/src/components/organisms/Chat/Footer/Footer.stories.js +0 -22
- package/src/components/organisms/Chat/Footer/index.js +0 -669
- package/src/components/organisms/Chat/Footer/styles.js +0 -286
- package/src/components/organisms/Chat/Header/Header.stories.js +0 -66
- package/src/components/organisms/Chat/Header/index.js +0 -94
- package/src/components/organisms/Chat/Header/styles.js +0 -49
- package/src/components/organisms/Chat/index.js +0 -294
- package/src/components/organisms/Chat/styles.js +0 -42
- package/src/components/organisms/Modal/Modal.stories.js +0 -55
- package/src/components/organisms/Modal/index.js +0 -97
- package/src/components/organisms/Modal/styles.js +0 -103
- package/src/components/organisms/RangeCalendar/RangeCalendar.stories.js +0 -16
- package/src/components/organisms/RangeCalendar/index.js +0 -121
- package/src/components/organisms/RangeCalendar/styles.js +0 -883
- package/src/global-files/handle_http.js +0 -231
- package/src/global-files/utils.js +0 -309
|
@@ -8,25 +8,55 @@ exports.servicesCodeIcon = void 0;
|
|
|
8
8
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
9
|
|
|
10
10
|
var servicesCodeIcon = {
|
|
11
|
-
datasheet: /*#__PURE__*/(0, _jsxRuntime.
|
|
12
|
-
className: "
|
|
13
|
-
children: "
|
|
11
|
+
datasheet: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
12
|
+
className: "tooltip",
|
|
13
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
14
|
+
className: "material-icons small",
|
|
15
|
+
children: "\uF8EE"
|
|
16
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
17
|
+
className: "tooltiptext",
|
|
18
|
+
children: "Ficha T\xE9cnica"
|
|
19
|
+
})]
|
|
14
20
|
}, "datasheet"),
|
|
15
|
-
description: /*#__PURE__*/(0, _jsxRuntime.
|
|
16
|
-
className: "
|
|
17
|
-
children: "
|
|
21
|
+
description: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
22
|
+
className: "tooltip",
|
|
23
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
24
|
+
className: "material-icons small",
|
|
25
|
+
children: "\uE873"
|
|
26
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
27
|
+
className: "tooltiptext",
|
|
28
|
+
children: "Descripci\xF3n"
|
|
29
|
+
})]
|
|
18
30
|
}, "description"),
|
|
19
|
-
image: /*#__PURE__*/(0, _jsxRuntime.
|
|
20
|
-
className: "
|
|
21
|
-
children: "
|
|
31
|
+
image: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
32
|
+
className: "tooltip",
|
|
33
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
34
|
+
className: "material-icons small",
|
|
35
|
+
children: "\uE3F4"
|
|
36
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
37
|
+
className: "tooltiptext",
|
|
38
|
+
children: "Imagen"
|
|
39
|
+
})]
|
|
22
40
|
}, "image"),
|
|
23
|
-
translate: /*#__PURE__*/(0, _jsxRuntime.
|
|
24
|
-
className: "
|
|
25
|
-
children: "
|
|
41
|
+
translate: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
42
|
+
className: "tooltip",
|
|
43
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
44
|
+
className: "material-icons small",
|
|
45
|
+
children: "\uE8E2"
|
|
46
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
47
|
+
className: "tooltiptext",
|
|
48
|
+
children: "Traducci\xF3n"
|
|
49
|
+
})]
|
|
26
50
|
}, "translate"),
|
|
27
|
-
build: /*#__PURE__*/(0, _jsxRuntime.
|
|
28
|
-
className: "
|
|
29
|
-
children: "
|
|
51
|
+
build: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
52
|
+
className: "tooltip",
|
|
53
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
54
|
+
className: "material-icons small",
|
|
55
|
+
children: "\uE1BD"
|
|
56
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
57
|
+
className: "tooltiptext",
|
|
58
|
+
children: "Construcci\xF3n"
|
|
59
|
+
})]
|
|
30
60
|
}, "build")
|
|
31
61
|
};
|
|
32
62
|
exports.servicesCodeIcon = servicesCodeIcon;
|
|
@@ -33,6 +33,10 @@ var _variables2 = require("../../../global-files/variables");
|
|
|
33
33
|
|
|
34
34
|
var _VersionItem = require("../../molecules/VersionItem");
|
|
35
35
|
|
|
36
|
+
var _CreateVersion = require("../../organisms/CreateVersion");
|
|
37
|
+
|
|
38
|
+
var _customHooks = require("../../../global-files/customHooks");
|
|
39
|
+
|
|
36
40
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
37
41
|
|
|
38
42
|
var VersionSelector = function VersionSelector(_ref) {
|
|
@@ -41,7 +45,6 @@ var VersionSelector = function VersionSelector(_ref) {
|
|
|
41
45
|
setVersion = _ref.setVersion,
|
|
42
46
|
companyName = _ref.companyName,
|
|
43
47
|
currentVersion = _ref.currentVersion,
|
|
44
|
-
setShowCreateVersion = _ref.setShowCreateVersion,
|
|
45
48
|
setShowVersionSelector = _ref.setShowVersionSelector,
|
|
46
49
|
jwt = _ref.jwt;
|
|
47
50
|
|
|
@@ -50,6 +53,16 @@ var VersionSelector = function VersionSelector(_ref) {
|
|
|
50
53
|
versions = _useState2[0],
|
|
51
54
|
setVersions = _useState2[1];
|
|
52
55
|
|
|
56
|
+
var _useCloseModal = (0, _customHooks.useCloseModal)("create-version"),
|
|
57
|
+
_useCloseModal2 = (0, _slicedToArray2.default)(_useCloseModal, 2),
|
|
58
|
+
showCreateVersion = _useCloseModal2[0],
|
|
59
|
+
setShowCreateVersion = _useCloseModal2[1];
|
|
60
|
+
|
|
61
|
+
var _useState3 = (0, _react.useState)(false),
|
|
62
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
63
|
+
reload = _useState4[0],
|
|
64
|
+
setReload = _useState4[1];
|
|
65
|
+
|
|
53
66
|
var loadProductVersions = /*#__PURE__*/function () {
|
|
54
67
|
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(articleId) {
|
|
55
68
|
var response, versionList;
|
|
@@ -91,12 +104,16 @@ var VersionSelector = function VersionSelector(_ref) {
|
|
|
91
104
|
}();
|
|
92
105
|
|
|
93
106
|
(0, _react.useEffect)(function () {
|
|
107
|
+
var ac = new AbortController();
|
|
94
108
|
loadProductVersions(articleId);
|
|
95
109
|
return function () {
|
|
96
110
|
setVersions([]);
|
|
97
111
|
setShowCreateVersion(false);
|
|
112
|
+
return function () {
|
|
113
|
+
return ac.abort();
|
|
114
|
+
}; // Abort both fetches on unmount
|
|
98
115
|
};
|
|
99
|
-
}, []);
|
|
116
|
+
}, [reload]);
|
|
100
117
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
101
118
|
id: modalId,
|
|
102
119
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
@@ -136,6 +153,15 @@ var VersionSelector = function VersionSelector(_ref) {
|
|
|
136
153
|
timestamp: item.timestamp
|
|
137
154
|
}, item.version);
|
|
138
155
|
})
|
|
156
|
+
}), showCreateVersion && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CreateVersion.CreateVersion, {
|
|
157
|
+
articleId: articleId,
|
|
158
|
+
version: currentVersion,
|
|
159
|
+
versionsList: versions,
|
|
160
|
+
setShowCreateVersion: setShowCreateVersion,
|
|
161
|
+
realoadVersion: function realoadVersion() {
|
|
162
|
+
return setReload(!reload);
|
|
163
|
+
},
|
|
164
|
+
jwt: jwt
|
|
139
165
|
})]
|
|
140
166
|
});
|
|
141
167
|
};
|
|
@@ -31,93 +31,39 @@ ProviderProductEditionDefault.args = {
|
|
|
31
31
|
"Ficha técnica": true,
|
|
32
32
|
Imágenes: true
|
|
33
33
|
},
|
|
34
|
-
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
34
|
+
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJmNTkyN2Y4ZS1jYmY3LTQ5MjItOWUwOS1lNjllYzBiMjczMWEiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6ImY1OTI3ZjhlLWNiZjctNDkyMi05ZTA5LWU2OWVjMGIyNzMxYSIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiIyOWY3YWY3Zi0yNmQ0LTRiMWItODZmZS0zOWY2ZTUyMDFhNzAiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY2OTkyNzAyMSwibmFtZSI6IklzbWFlbCBMb3BleiIsInBob25lX251bWJlciI6Iis1MjMxMTEzNjYzMzYiLCJleHAiOjE2Njk5MzA2MjEsImlhdCI6MTY2OTkyNzAyMSwiZW1haWwiOiJpbG9wZXpAY29udGVudG9oLmNvbSJ9.NK6hVSiBksguboJ1m8yYqtDq19kzgE3GqYDEJHLUya_n_TsXriv6W1ypq7XiSo9zrqWcmHBpOoJQS7WbWzjGe__NlJEXjo8bykS8QBTTOiMrKxz1KzGRYJkwgG0axk-zVysUQH0_y-fbwgEgMPtd6qO46DB_KlFI_PEL1-uR5MJ9U0kNkS61gMbHwFQFs_DU-sS01NxjBsjUEp783rs1r-jm7TelZac1rGaFNUyi5vHdSozYzlnzfzGcuACZ0lHqvah2FHbDyurp-G_uhpUn5lNmcL4rVNh2lDd4TOnhJ3AtN1wGSmtErmhjmBHTvavh1ub9pklA1B9qjVuTRpYANw",
|
|
35
35
|
articleId: 238,
|
|
36
36
|
category: 846,
|
|
37
37
|
version: 2,
|
|
38
38
|
productSelected: {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"company_name": "Norday",
|
|
50
|
-
"id_company": 810,
|
|
51
|
-
"country": "México",
|
|
52
|
-
"id_category": "2454",
|
|
53
|
-
"id_article": 84492,
|
|
54
|
-
"name": "prueba dos",
|
|
55
|
-
"upc": "8375"
|
|
56
|
-
},
|
|
57
|
-
"retailers": [{
|
|
58
|
-
"id": 59,
|
|
59
|
-
"name": "The Home Depot Platinum"
|
|
60
|
-
}],
|
|
61
|
-
"services": {
|
|
62
|
-
"datasheets": 0,
|
|
63
|
-
"descriptions": 0,
|
|
64
|
-
"images": 1
|
|
65
|
-
},
|
|
66
|
-
"statusByRetailer": {
|
|
67
|
-
"59": {
|
|
68
|
-
"images": "AP"
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
"retailersWithService": ["59"],
|
|
72
|
-
"id_article": 84492,
|
|
73
|
-
"retailersAvailable": [{
|
|
74
|
-
"id": 59,
|
|
75
|
-
"name": "The Home Depot Platinum"
|
|
39
|
+
id_article: 3,
|
|
40
|
+
id_category: 2032,
|
|
41
|
+
name: "CORTINA BLACKOUT DE POLIÉSTER CAFÉ 2.13 X 1.06 M",
|
|
42
|
+
upc: "161157",
|
|
43
|
+
timestamp: "2022-11-14T16:02:47.000Z",
|
|
44
|
+
categoryName: "Decoración|Cortinas y Persianas|Cortinas",
|
|
45
|
+
version: 1,
|
|
46
|
+
retailersAvailable: [{
|
|
47
|
+
name: "The Home Depot Golden",
|
|
48
|
+
id: 58
|
|
76
49
|
}]
|
|
77
50
|
},
|
|
78
51
|
productToEdit: {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
"company_name": "Norday",
|
|
93
|
-
"id_company": 810,
|
|
94
|
-
"country": "México",
|
|
95
|
-
"id_category": "2454",
|
|
96
|
-
"id_article": 84492,
|
|
97
|
-
"name": "prueba dos",
|
|
98
|
-
"upc": "8375"
|
|
99
|
-
},
|
|
100
|
-
"retailers": [{
|
|
101
|
-
"id": 59,
|
|
102
|
-
"name": "The Home Depot Platinum"
|
|
103
|
-
}],
|
|
104
|
-
"services": {
|
|
105
|
-
"datasheets": 0,
|
|
106
|
-
"descriptions": 0,
|
|
107
|
-
"images": 1
|
|
108
|
-
},
|
|
109
|
-
"statusByRetailer": {
|
|
110
|
-
"59": {
|
|
111
|
-
"images": "AP"
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
"retailersWithService": ["59"],
|
|
115
|
-
"id_article": 84492,
|
|
116
|
-
"retailersAvailable": [{
|
|
117
|
-
"id": 59,
|
|
118
|
-
"name": "The Home Depot Platinum"
|
|
52
|
+
idCategory: 2032,
|
|
53
|
+
ArticleId: 3,
|
|
54
|
+
product: [{
|
|
55
|
+
id_article: 3,
|
|
56
|
+
id_category: 2032,
|
|
57
|
+
name: "CORTINA BLACKOUT DE POLIÉSTER CAFÉ 2.13 X 1.06 M",
|
|
58
|
+
upc: "161157",
|
|
59
|
+
timestamp: "2022-11-14T16:02:47.000Z",
|
|
60
|
+
categoryName: "Decoración|Cortinas y Persianas|Cortinas",
|
|
61
|
+
version: 1,
|
|
62
|
+
retailersAvailable: [{
|
|
63
|
+
name: "The Home Depot Golden",
|
|
64
|
+
id: 58
|
|
119
65
|
}]
|
|
120
|
-
}
|
|
66
|
+
}]
|
|
121
67
|
},
|
|
122
68
|
location: {
|
|
123
69
|
state: {
|
|
@@ -125,78 +71,54 @@ ProviderProductEditionDefault.args = {
|
|
|
125
71
|
}
|
|
126
72
|
},
|
|
127
73
|
user: {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
74
|
+
id_user: 28,
|
|
75
|
+
name: "Ismael",
|
|
76
|
+
last_name: "López",
|
|
77
|
+
email: "ilopez@contentoh.com",
|
|
78
|
+
position: "Test States",
|
|
79
|
+
telephone: "+523111366336",
|
|
80
|
+
country: "México",
|
|
81
|
+
id_company: 1,
|
|
82
|
+
id_cognito: "f5927f8e-cbf7-4922-9e09-e69ec0b2731a",
|
|
83
|
+
birth_Date: null,
|
|
84
|
+
about_me: "",
|
|
85
|
+
zip_code: "",
|
|
86
|
+
address: "",
|
|
87
|
+
job: "",
|
|
88
|
+
id_stripe: "cus_KuEt6R6vwmN09f",
|
|
89
|
+
id_role: 0,
|
|
90
|
+
active: 1,
|
|
91
|
+
is_retailer: 0,
|
|
92
|
+
email_notify: 0,
|
|
93
|
+
is_user_tech: "AS",
|
|
94
|
+
membership: {
|
|
95
|
+
id: 76,
|
|
96
|
+
start_date: "2022-01-18T17:25:35.000Z",
|
|
97
|
+
end_date: "2023-01-18T17:25:35.000Z",
|
|
98
|
+
planID: 8,
|
|
99
|
+
plan: "prod_KtlhECVSFG2iro",
|
|
100
|
+
name: "Plan Pro",
|
|
101
|
+
user_limit: "20",
|
|
102
|
+
products_limit: "5000",
|
|
103
|
+
type: "Enterprise"
|
|
158
104
|
},
|
|
159
|
-
|
|
105
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1669927021851"
|
|
160
106
|
},
|
|
161
107
|
company: {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
"financedRetailers": [{
|
|
175
|
-
"id": 68,
|
|
176
|
-
"name": "The Home Depot Merchants",
|
|
177
|
-
"country": "México",
|
|
178
|
-
"id_region": 1,
|
|
179
|
-
"active": 1
|
|
180
|
-
}],
|
|
181
|
-
"retailers": [{
|
|
182
|
-
"id": 59,
|
|
183
|
-
"name": "The Home Depot Platinum",
|
|
184
|
-
"country": "México"
|
|
185
|
-
}, {
|
|
186
|
-
"id": 60,
|
|
187
|
-
"name": "The Home Depot Resizing",
|
|
188
|
-
"country": "México"
|
|
189
|
-
}, {
|
|
190
|
-
"id": 61,
|
|
191
|
-
"name": "Home Depot TAB",
|
|
192
|
-
"country": "México"
|
|
193
|
-
}, {
|
|
194
|
-
"id": 68,
|
|
195
|
-
"name": "The Home Depot Merchants",
|
|
196
|
-
"country": "México"
|
|
197
|
-
}]
|
|
108
|
+
id_company: 1,
|
|
109
|
+
trade_name: "GRUPO BRAHMA",
|
|
110
|
+
company_name: "GRUPO BRAHMA",
|
|
111
|
+
rfc: "XAXX010101000",
|
|
112
|
+
adress: "AA",
|
|
113
|
+
about_company: "",
|
|
114
|
+
telephone: "",
|
|
115
|
+
web_site: "",
|
|
116
|
+
zip_code: "",
|
|
117
|
+
email: null,
|
|
118
|
+
social_link: "",
|
|
119
|
+
is_retailer: 0
|
|
198
120
|
},
|
|
199
121
|
showSurvey: function showSurvey(v) {
|
|
200
|
-
return v && alert(
|
|
122
|
+
return v && alert("se muestra");
|
|
201
123
|
}
|
|
202
124
|
};
|
|
@@ -99,8 +99,6 @@ var _VersionSelector = require("../../organisms/VersionSelector");
|
|
|
99
99
|
|
|
100
100
|
var _customHooks = require("../../../global-files/customHooks");
|
|
101
101
|
|
|
102
|
-
var _CreateVersion = require("../../organisms/CreateVersion");
|
|
103
|
-
|
|
104
102
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
105
103
|
|
|
106
104
|
var reducerImages = function reducerImages(state, action) {
|
|
@@ -202,8 +200,8 @@ var S3_BUCKET = process.env.REACT_APP_IMAGES_BUCKET;
|
|
|
202
200
|
var REGION = "us-east-1";
|
|
203
201
|
|
|
204
202
|
_awsSdk.default.config.update({
|
|
205
|
-
accessKeyId: process.env.
|
|
206
|
-
secretAccessKey: process.env.
|
|
203
|
+
accessKeyId: process.env.REACT_APP_KUTS3,
|
|
204
|
+
secretAccessKey: process.env.REACT_APP_AKUTS3
|
|
207
205
|
});
|
|
208
206
|
|
|
209
207
|
var myBucket = new _awsSdk.default.S3({
|
|
@@ -530,11 +528,6 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
530
528
|
retailerStatus = _useState82[0],
|
|
531
529
|
setRetailerStatus = _useState82[1];
|
|
532
530
|
|
|
533
|
-
var _useState83 = (0, _react.useState)(false),
|
|
534
|
-
_useState84 = (0, _slicedToArray2.default)(_useState83, 2),
|
|
535
|
-
showCreateVersion = _useState84[0],
|
|
536
|
-
setShowCreateVersion = _useState84[1];
|
|
537
|
-
|
|
538
531
|
var _useCloseModal = (0, _customHooks.useCloseModal)("version-selector"),
|
|
539
532
|
_useCloseModal2 = (0, _slicedToArray2.default)(_useCloseModal, 2),
|
|
540
533
|
showVersionSelector = _useCloseModal2[0],
|
|
@@ -564,14 +557,6 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
564
557
|
return getServices();
|
|
565
558
|
|
|
566
559
|
case 6:
|
|
567
|
-
// if (!originProp) {
|
|
568
|
-
// setActiveRetailer(
|
|
569
|
-
// product?.retailers
|
|
570
|
-
// ? product?.retailers[0]
|
|
571
|
-
// : product?.retailersAvailable[0]
|
|
572
|
-
// );
|
|
573
|
-
// }
|
|
574
|
-
// setActiveRetailer(product?.retailers[0]);
|
|
575
560
|
setImages({
|
|
576
561
|
action: "init",
|
|
577
562
|
init: services[2]
|
|
@@ -828,8 +813,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
828
813
|
|
|
829
814
|
var saveDescriptions = /*#__PURE__*/function () {
|
|
830
815
|
var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
831
|
-
var dataObject,
|
|
832
|
-
|
|
816
|
+
var dataObject, res;
|
|
833
817
|
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
834
818
|
while (1) {
|
|
835
819
|
switch (_context5.prev = _context5.next) {
|
|
@@ -849,9 +833,9 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
849
833
|
});
|
|
850
834
|
|
|
851
835
|
case 6:
|
|
852
|
-
|
|
836
|
+
res = _context5.sent;
|
|
853
837
|
|
|
854
|
-
if (!(
|
|
838
|
+
if (!(res.data.statusCode === 200)) {
|
|
855
839
|
_context5.next = 11;
|
|
856
840
|
break;
|
|
857
841
|
}
|
|
@@ -884,7 +868,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
884
868
|
|
|
885
869
|
var saveDatasheets = /*#__PURE__*/function () {
|
|
886
870
|
var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
|
887
|
-
var dataObject;
|
|
871
|
+
var dataObject, res;
|
|
888
872
|
return _regenerator.default.wrap(function _callee6$(_context6) {
|
|
889
873
|
while (1) {
|
|
890
874
|
switch (_context6.prev = _context6.next) {
|
|
@@ -904,30 +888,32 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
904
888
|
});
|
|
905
889
|
|
|
906
890
|
case 6:
|
|
891
|
+
res = _context6.sent;
|
|
892
|
+
|
|
907
893
|
if (!(res.data.statusCode === 200)) {
|
|
908
|
-
_context6.next =
|
|
894
|
+
_context6.next = 11;
|
|
909
895
|
break;
|
|
910
896
|
}
|
|
911
897
|
|
|
912
898
|
setMessage("Fichas técnicas guardadas");
|
|
913
|
-
_context6.next =
|
|
899
|
+
_context6.next = 11;
|
|
914
900
|
return loadData();
|
|
915
901
|
|
|
916
|
-
case
|
|
917
|
-
_context6.next =
|
|
902
|
+
case 11:
|
|
903
|
+
_context6.next = 16;
|
|
918
904
|
break;
|
|
919
905
|
|
|
920
|
-
case
|
|
921
|
-
_context6.prev =
|
|
906
|
+
case 13:
|
|
907
|
+
_context6.prev = 13;
|
|
922
908
|
_context6.t0 = _context6["catch"](3);
|
|
923
909
|
console.log(_context6.t0);
|
|
924
910
|
|
|
925
|
-
case
|
|
911
|
+
case 16:
|
|
926
912
|
case "end":
|
|
927
913
|
return _context6.stop();
|
|
928
914
|
}
|
|
929
915
|
}
|
|
930
|
-
}, _callee6, null, [[3,
|
|
916
|
+
}, _callee6, null, [[3, 13]]);
|
|
931
917
|
}));
|
|
932
918
|
|
|
933
919
|
return function saveDatasheets() {
|
|
@@ -1055,8 +1041,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1055
1041
|
}, _callee7, null, [[11, 26]]);
|
|
1056
1042
|
})), [images, imagesUploaded]);
|
|
1057
1043
|
(0, _react.useEffect)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
|
|
1058
|
-
var
|
|
1059
|
-
|
|
1044
|
+
var res;
|
|
1060
1045
|
return _regenerator.default.wrap(function _callee8$(_context8) {
|
|
1061
1046
|
while (1) {
|
|
1062
1047
|
switch (_context8.prev = _context8.next) {
|
|
@@ -1083,9 +1068,9 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1083
1068
|
});
|
|
1084
1069
|
|
|
1085
1070
|
case 5:
|
|
1086
|
-
|
|
1071
|
+
res = _context8.sent;
|
|
1087
1072
|
|
|
1088
|
-
if (!(
|
|
1073
|
+
if (!(res.data.statusCode === 200)) {
|
|
1089
1074
|
_context8.next = 11;
|
|
1090
1075
|
break;
|
|
1091
1076
|
}
|
|
@@ -2082,13 +2067,8 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2082
2067
|
setVersion: setVersion,
|
|
2083
2068
|
companyName: company.company_name,
|
|
2084
2069
|
currentVersion: version,
|
|
2085
|
-
setShowCreateVersion: setShowCreateVersion,
|
|
2086
2070
|
setShowVersionSelector: setShowVersionSelector,
|
|
2087
2071
|
jwt: token
|
|
2088
|
-
}), showCreateVersion && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CreateVersion.CreateVersion, {
|
|
2089
|
-
idArticle: product.id_article,
|
|
2090
|
-
version: version,
|
|
2091
|
-
setShowCreateVersion: setShowCreateVersion
|
|
2092
2072
|
})]
|
|
2093
2073
|
});
|
|
2094
2074
|
};
|