contentoh-components-library 21.3.4 → 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.
Files changed (202) hide show
  1. package/.env.development +2 -5
  2. package/.env.production +25 -25
  3. package/dist/components/atoms/GeneralButton/index.js +6 -2
  4. package/dist/components/atoms/Select/VersionSelect.js +2 -1
  5. package/dist/components/molecules/CustomSelect/CustomSelect.stories.js +22 -21
  6. package/dist/components/molecules/CustomSelect/SelectItem.js +1 -10
  7. package/dist/components/molecules/HeaderTop/index.js +5 -10
  8. package/dist/components/molecules/HeaderTop/styles.js +1 -1
  9. package/dist/components/organisms/CreateVersion/RenderChilds.js +11 -11
  10. package/dist/components/organisms/CreateVersion/index.js +30 -89
  11. package/dist/components/organisms/OrderDetail/OrderDetail.stories.js +1 -1
  12. package/dist/components/organisms/OrderDetail/index.js +20 -11
  13. package/dist/components/organisms/OrderDetail/styles.js +1 -1
  14. package/dist/components/organisms/OrderDetail/utils/Table/styles.js +1 -1
  15. package/dist/components/organisms/OrderDetail/utils/Table/utils.js +45 -15
  16. package/dist/components/organisms/VersionSelector/index.js +28 -2
  17. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +69 -147
  18. package/dist/components/pages/ProviderProductEdition/index.js +19 -39
  19. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +77 -67
  20. package/dist/components/pages/RetailerProductEdition/index.js +5 -24
  21. package/dist/global-files/fonts.css +0 -6
  22. package/dist/global-files/variables.js +0 -2
  23. package/dist/index.js +46 -267
  24. package/package.json +1 -12
  25. package/src/components/atoms/GeneralButton/index.js +4 -1
  26. package/src/components/atoms/Select/VersionSelect.js +4 -2
  27. package/src/components/molecules/CustomSelect/CustomSelect.stories.js +12 -20
  28. package/src/components/molecules/CustomSelect/SelectItem.js +0 -7
  29. package/src/components/molecules/HeaderTop/index.js +6 -11
  30. package/src/components/molecules/HeaderTop/styles.js +0 -4
  31. package/src/components/organisms/CreateVersion/RenderChilds.js +28 -34
  32. package/src/components/organisms/CreateVersion/index.js +16 -36
  33. package/src/components/organisms/OrderDetail/OrderDetail.stories.js +1 -1
  34. package/src/components/organisms/OrderDetail/index.js +19 -12
  35. package/src/components/organisms/OrderDetail/styles.js +1 -0
  36. package/src/components/organisms/OrderDetail/utils/Table/styles.js +26 -0
  37. package/src/components/organisms/OrderDetail/utils/Table/utils.js +30 -15
  38. package/src/components/organisms/VersionSelector/index.js +18 -3
  39. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +75 -166
  40. package/src/components/pages/ProviderProductEdition/index.js +3 -22
  41. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +79 -67
  42. package/src/components/pages/RetailerProductEdition/index.js +2 -14
  43. package/src/global-files/customHooks.js +2 -2
  44. package/src/global-files/fonts.css +0 -6
  45. package/src/global-files/variables.js +0 -2
  46. package/src/index.js +0 -17
  47. package/dist/assets/images/customSelect/starIcon.svg +0 -14
  48. package/dist/assets/images/defaultImages/Spinner.gif +0 -0
  49. package/dist/assets/images/defaultImages/notFound.svg +0 -124
  50. package/dist/components/atoms/ButtonFileChooser/ButtonFileChooser.stories.js +0 -72
  51. package/dist/components/atoms/ButtonFileChooser/index.js +0 -118
  52. package/dist/components/atoms/ButtonFileChooser/styles.js +0 -20
  53. package/dist/components/atoms/ButtonV2/ButtonV2.stories.js +0 -66
  54. package/dist/components/atoms/ButtonV2/index.js +0 -110
  55. package/dist/components/atoms/ButtonV2/styles.js +0 -53
  56. package/dist/components/atoms/CustomIcon/CustomIcon.stories.js +0 -50
  57. package/dist/components/atoms/CustomIcon/index.js +0 -40
  58. package/dist/components/atoms/CustomIcon/styles.js +0 -33
  59. package/dist/components/atoms/IconFile/IconFile.stories.js +0 -48
  60. package/dist/components/atoms/IconFile/index.js +0 -249
  61. package/dist/components/atoms/IconFile/styles.js +0 -23
  62. package/dist/components/atoms/Image/Image.stories.js +0 -73
  63. package/dist/components/atoms/Image/index.js +0 -76
  64. package/dist/components/atoms/Image/styles.js +0 -43
  65. package/dist/components/atoms/ImageLink/ImageLink.stories.js +0 -63
  66. package/dist/components/atoms/ImageLink/index.js +0 -77
  67. package/dist/components/atoms/ImageLink/styles.js +0 -40
  68. package/dist/components/atoms/ImagePreview/ImagePreview.stories.js +0 -70
  69. package/dist/components/atoms/ImagePreview/index.js +0 -222
  70. package/dist/components/atoms/ImagePreview/styles.js +0 -44
  71. package/dist/components/atoms/InputText/InputText.stories.js +0 -60
  72. package/dist/components/atoms/InputText/index.js +0 -66
  73. package/dist/components/atoms/InputText/styles.js +0 -32
  74. package/dist/components/atoms/NotFound/NotFound.stories.js +0 -36
  75. package/dist/components/atoms/NotFound/index.js +0 -75
  76. package/dist/components/atoms/NotFound/styles.js +0 -20
  77. package/dist/components/atoms/SelectItemV2/SelectItemV2.stories.js +0 -45
  78. package/dist/components/atoms/SelectItemV2/index.js +0 -57
  79. package/dist/components/atoms/SelectItemV2/styles.js +0 -30
  80. package/dist/components/atoms/Tooltip/Tooltip.stories.js +0 -66
  81. package/dist/components/atoms/Tooltip/index.js +0 -72
  82. package/dist/components/atoms/Tooltip/styles.js +0 -20
  83. package/dist/components/molecules/ButtonDownloadFile/DownloadFile.stories.js +0 -66
  84. package/dist/components/molecules/ButtonDownloadFile/index.js +0 -179
  85. package/dist/components/molecules/ButtonDownloadFile/styles.js +0 -23
  86. package/dist/components/molecules/Dropdown/Dropdown.stories.js +0 -98
  87. package/dist/components/molecules/Dropdown/index.js +0 -150
  88. package/dist/components/molecules/Dropdown/styles.js +0 -26
  89. package/dist/components/molecules/ImageTooltip/ImageTooltip.stories.js +0 -82
  90. package/dist/components/molecules/ImageTooltip/index.js +0 -85
  91. package/dist/components/molecules/ImageTooltip/styles.js +0 -33
  92. package/dist/components/molecules/SelectV2/SelectV2.stories.js +0 -119
  93. package/dist/components/molecules/SelectV2/index.js +0 -306
  94. package/dist/components/molecules/SelectV2/styles.js +0 -42
  95. package/dist/components/molecules/SelectV2/test.js +0 -95
  96. package/dist/components/molecules/SelectV2/test.stories.js +0 -27
  97. package/dist/components/organisms/Chat/Chat.stories.js +0 -215
  98. package/dist/components/organisms/Chat/ChatLists/ChatLists.stories.js +0 -83
  99. package/dist/components/organisms/Chat/ChatLists/index.js +0 -160
  100. package/dist/components/organisms/Chat/ChatLists/styles.js +0 -29
  101. package/dist/components/organisms/Chat/ContainerItems/ContainerItems.stories.js +0 -176
  102. package/dist/components/organisms/Chat/ContainerItems/index.js +0 -569
  103. package/dist/components/organisms/Chat/ContainerItems/styles.js +0 -20
  104. package/dist/components/organisms/Chat/ContentChat/ContentChat.stories.js +0 -142
  105. package/dist/components/organisms/Chat/ContentChat/index.js +0 -1422
  106. package/dist/components/organisms/Chat/ContentChat/styles.js +0 -20
  107. package/dist/components/organisms/Chat/Footer/Footer.stories.js +0 -43
  108. package/dist/components/organisms/Chat/Footer/index.js +0 -984
  109. package/dist/components/organisms/Chat/Footer/styles.js +0 -32
  110. package/dist/components/organisms/Chat/Header/Header.stories.js +0 -96
  111. package/dist/components/organisms/Chat/Header/index.js +0 -84
  112. package/dist/components/organisms/Chat/Header/styles.js +0 -20
  113. package/dist/components/organisms/Chat/index.js +0 -327
  114. package/dist/components/organisms/Chat/styles.js +0 -29
  115. package/dist/components/organisms/Modal/Modal.stories.js +0 -66
  116. package/dist/components/organisms/Modal/index.js +0 -95
  117. package/dist/components/organisms/Modal/styles.js +0 -20
  118. package/dist/components/organisms/RangeCalendar/RangeCalendar.stories.js +0 -33
  119. package/dist/components/organisms/RangeCalendar/index.js +0 -148
  120. package/dist/components/organisms/RangeCalendar/styles.js +0 -27
  121. package/dist/global-files/handle_http.js +0 -383
  122. package/dist/global-files/utils.js +0 -484
  123. package/src/assets/images/customSelect/starIcon.svg +0 -14
  124. package/src/assets/images/defaultImages/Spinner.gif +0 -0
  125. package/src/assets/images/defaultImages/notFound.svg +0 -124
  126. package/src/components/atoms/ButtonFileChooser/ButtonFileChooser.stories.js +0 -47
  127. package/src/components/atoms/ButtonFileChooser/index.js +0 -69
  128. package/src/components/atoms/ButtonFileChooser/styles.js +0 -4
  129. package/src/components/atoms/ButtonV2/ButtonV2.stories.js +0 -53
  130. package/src/components/atoms/ButtonV2/index.js +0 -85
  131. package/src/components/atoms/ButtonV2/styles.js +0 -217
  132. package/src/components/atoms/CustomIcon/CustomIcon.stories.js +0 -36
  133. package/src/components/atoms/CustomIcon/index.js +0 -41
  134. package/src/components/atoms/CustomIcon/styles.js +0 -85
  135. package/src/components/atoms/IconFile/IconFile.stories.js +0 -35
  136. package/src/components/atoms/IconFile/index.js +0 -119
  137. package/src/components/atoms/IconFile/styles.js +0 -67
  138. package/src/components/atoms/Image/Image.stories.js +0 -51
  139. package/src/components/atoms/Image/index.js +0 -55
  140. package/src/components/atoms/Image/styles.js +0 -34
  141. package/src/components/atoms/ImageLink/ImageLink.stories.js +0 -43
  142. package/src/components/atoms/ImageLink/index.js +0 -57
  143. package/src/components/atoms/ImageLink/styles.js +0 -30
  144. package/src/components/atoms/ImagePreview/ImagePreview.stories.js +0 -52
  145. package/src/components/atoms/ImagePreview/index.js +0 -191
  146. package/src/components/atoms/ImagePreview/styles.js +0 -77
  147. package/src/components/atoms/InputText/InputText.stories.js +0 -39
  148. package/src/components/atoms/InputText/index.js +0 -61
  149. package/src/components/atoms/InputText/styles.js +0 -89
  150. package/src/components/atoms/NotFound/NotFound.stories.js +0 -19
  151. package/src/components/atoms/NotFound/index.js +0 -52
  152. package/src/components/atoms/NotFound/styles.js +0 -55
  153. package/src/components/atoms/SelectItemV2/SelectItemV2.stories.js +0 -26
  154. package/src/components/atoms/SelectItemV2/index.js +0 -61
  155. package/src/components/atoms/SelectItemV2/styles.js +0 -90
  156. package/src/components/atoms/Tooltip/Tooltip.stories.js +0 -51
  157. package/src/components/atoms/Tooltip/index.js +0 -59
  158. package/src/components/atoms/Tooltip/styles.js +0 -42
  159. package/src/components/molecules/ButtonDownloadFile/DownloadFile.stories.js +0 -54
  160. package/src/components/molecules/ButtonDownloadFile/index.js +0 -111
  161. package/src/components/molecules/ButtonDownloadFile/styles.js +0 -66
  162. package/src/components/molecules/Dropdown/Dropdown.stories.js +0 -103
  163. package/src/components/molecules/Dropdown/index.js +0 -150
  164. package/src/components/molecules/Dropdown/styles.js +0 -75
  165. package/src/components/molecules/ImageTooltip/ImageTooltip.stories.js +0 -68
  166. package/src/components/molecules/ImageTooltip/index.js +0 -63
  167. package/src/components/molecules/ImageTooltip/styles.js +0 -18
  168. package/src/components/molecules/SelectV2/SelectV2.stories.js +0 -114
  169. package/src/components/molecules/SelectV2/index.js +0 -350
  170. package/src/components/molecules/SelectV2/styles.js +0 -105
  171. package/src/components/molecules/SelectV2/test.js +0 -61
  172. package/src/components/molecules/SelectV2/test.stories.js +0 -10
  173. package/src/components/organisms/Chat/Chat.stories.js +0 -199
  174. package/src/components/organisms/Chat/ChatLists/ChatLists.stories.js +0 -65
  175. package/src/components/organisms/Chat/ChatLists/Rotoplas.jpeg +0 -0
  176. package/src/components/organisms/Chat/ChatLists/THD.png +0 -0
  177. package/src/components/organisms/Chat/ChatLists/index.js +0 -141
  178. package/src/components/organisms/Chat/ChatLists/styles.js +0 -162
  179. package/src/components/organisms/Chat/ContainerItems/ContainerItems.stories.js +0 -142
  180. package/src/components/organisms/Chat/ContainerItems/index.js +0 -549
  181. package/src/components/organisms/Chat/ContainerItems/styles.js +0 -328
  182. package/src/components/organisms/Chat/ContentChat/ContentChat.stories.js +0 -102
  183. package/src/components/organisms/Chat/ContentChat/Rotoplas.jpeg +0 -0
  184. package/src/components/organisms/Chat/ContentChat/THD.png +0 -0
  185. package/src/components/organisms/Chat/ContentChat/index.js +0 -900
  186. package/src/components/organisms/Chat/ContentChat/styles.js +0 -41
  187. package/src/components/organisms/Chat/Footer/Footer.stories.js +0 -22
  188. package/src/components/organisms/Chat/Footer/index.js +0 -669
  189. package/src/components/organisms/Chat/Footer/styles.js +0 -286
  190. package/src/components/organisms/Chat/Header/Header.stories.js +0 -66
  191. package/src/components/organisms/Chat/Header/index.js +0 -94
  192. package/src/components/organisms/Chat/Header/styles.js +0 -49
  193. package/src/components/organisms/Chat/index.js +0 -294
  194. package/src/components/organisms/Chat/styles.js +0 -42
  195. package/src/components/organisms/Modal/Modal.stories.js +0 -55
  196. package/src/components/organisms/Modal/index.js +0 -97
  197. package/src/components/organisms/Modal/styles.js +0 -103
  198. package/src/components/organisms/RangeCalendar/RangeCalendar.stories.js +0 -16
  199. package/src/components/organisms/RangeCalendar/index.js +0 -121
  200. package/src/components/organisms/RangeCalendar/styles.js +0 -883
  201. package/src/global-files/handle_http.js +0 -231
  202. 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.jsx)("span", {
12
- className: "material-icons small",
13
- children: "\uF8EE"
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.jsx)("span", {
16
- className: "material-icons small",
17
- children: "\uE873"
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.jsx)("span", {
20
- className: "material-icons small",
21
- children: "\uE3F4"
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.jsx)("span", {
24
- className: "material-icons small",
25
- children: "\uE8E2"
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.jsx)("span", {
28
- className: "material-icons small",
29
- children: "\uE1BD"
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.eyJzdWIiOiI5MmFiMWFkNS0zOWM4LTRhMjAtODFlNC02N2VjMTRmMzhmNDMiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6IjkyYWIxYWQ1LTM5YzgtNGEyMC04MWU0LTY3ZWMxNGYzOGY0MyIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiI4Y2U5MjYyMi0xYjZlLTQ1MWEtODUyYy04MjMxYzcwOTk5YTciLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY2ODEwODQ1MiwibmFtZSI6IkVsaSBJbmRhIiwicGhvbmVfbnVtYmVyIjoiKzUyMzExMTkwODg2OCIsImV4cCI6MTY2ODExMjA1MiwiaWF0IjoxNjY4MTA4NDUyLCJlbWFpbCI6Im1hcnRoYTI1Lm1pb0BnbWFpbC5jb20ifQ.JbpinyPv_38xvwwT_td3M_vP3xEffZ6dI0Xl3B9EVjPF7uW4ctZ_B7nKydPyUcB6LTaYEzCI1RfAgZpUQUFbYTfFHJ3T9kgwa9b9mDeDx3kiy2GK3CdYIuWiii5ZivxVKK10gV871OvxDish4w-vEOsClXDncoTX2zAx3wDM4xO83UdI0ahECOTYszuGB3FRnkrHnWJO0b2dpsyhqAmhw0aEcw6gwbqP5l-spOjMM3lE-bGm89pK_9oLYcyRMr09vcGJartmk_ctUisCflrYudnwVgwTwCi1PRBkiaUoDywYeGr6HxRoU1zsiC3LwB-m9b2YnNhEZmPanLfPstKVbw",
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
- "orderId": 3366,
40
- "article_status": "AP",
41
- "datasheet_status": "NS",
42
- "description_status": "NS",
43
- "images_status": "AP",
44
- "prio": "none",
45
- "version": 3,
46
- "brand": null,
47
- "article": {
48
- "category": "Iluminación|Lámparas|Lámparas de Mesa",
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
- "ArticleId": 84492,
80
- "idCategory": "2454",
81
- "product": {
82
- "orderId": 3366,
83
- "article_status": "AP",
84
- "datasheet_status": "NS",
85
- "description_status": "NS",
86
- "images_status": "AP",
87
- "prio": "none",
88
- "version": 3,
89
- "brand": null,
90
- "article": {
91
- "category": "Iluminación|Lámparas|Lámparas de Mesa",
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
- "id_user": 59,
129
- "name": "The Home",
130
- "last_name": "Depot",
131
- "email": "cadena.ismael@allfreemail.net",
132
- "position": "Admin",
133
- "telephone": "+523111366336",
134
- "country": "México",
135
- "id_company": 817,
136
- "id_cognito": "5884ae34-59d6-4454-b98e-821518bcc3a7",
137
- "birth_Date": null,
138
- "about_me": "",
139
- "zip_code": "",
140
- "address": "",
141
- "job": "",
142
- "id_stripe": "",
143
- "id_role": 0,
144
- "active": 1,
145
- "is_retailer": 1,
146
- "email_notify": 0,
147
- "is_user_tech": null,
148
- "membership": {
149
- "id": 47,
150
- "start_date": "2022-05-25T14:31:12.000Z",
151
- "end_date": "2023-05-25T14:31:12.000Z",
152
- "planID": 5,
153
- "plan": "prod_Ktl6B5Ou2gqTB2",
154
- "name": "Plan Pro",
155
- "user_limit": "5",
156
- "products_limit": "500",
157
- "type": "PyMES"
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
- "src": "https://content-management-profile.s3.amazonaws.com/id-59/59.png?1668127460068"
105
+ src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1669927021851"
160
106
  },
161
107
  company: {
162
- "id_company": 817,
163
- "trade_name": "Retailer acc",
164
- "company_name": "Retailer acc",
165
- "rfc": "ASER12345",
166
- "adress": "Av. Insurgentes",
167
- "about_company": null,
168
- "telephone": null,
169
- "web_site": null,
170
- "zip_code": null,
171
- "email": null,
172
- "social_link": null,
173
- "is_retailer": 1,
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('se muestra');
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.REACT_APP_KEY_UPLOAD_TO_S3,
206
- secretAccessKey: process.env.REACT_APP_ACCESS_KEY_UPLOAD_TO_S3
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, _res;
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
- _res = _context5.sent;
836
+ res = _context5.sent;
853
837
 
854
- if (!(_res.data.statusCode === 200)) {
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 = 10;
894
+ _context6.next = 11;
909
895
  break;
910
896
  }
911
897
 
912
898
  setMessage("Fichas técnicas guardadas");
913
- _context6.next = 10;
899
+ _context6.next = 11;
914
900
  return loadData();
915
901
 
916
- case 10:
917
- _context6.next = 15;
902
+ case 11:
903
+ _context6.next = 16;
918
904
  break;
919
905
 
920
- case 12:
921
- _context6.prev = 12;
906
+ case 13:
907
+ _context6.prev = 13;
922
908
  _context6.t0 = _context6["catch"](3);
923
909
  console.log(_context6.t0);
924
910
 
925
- case 15:
911
+ case 16:
926
912
  case "end":
927
913
  return _context6.stop();
928
914
  }
929
915
  }
930
- }, _callee6, null, [[3, 12]]);
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 _res2;
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
- _res2 = _context8.sent;
1071
+ res = _context8.sent;
1087
1072
 
1088
- if (!(_res2.data.statusCode === 200)) {
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
  };