contentoh-components-library 21.3.27 → 21.3.28
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/dist/assets/images/generalButton/Icono AB.svg +14 -0
- package/dist/components/molecules/HeaderTop/index.js +8 -5
- package/dist/components/molecules/HeaderTop/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/index.js +2 -1
- package/package.json +1 -1
- package/src/assets/images/generalButton/Icono AB.svg +14 -0
- package/src/components/molecules/HeaderTop/index.js +10 -5
- package/src/components/molecules/HeaderTop/styles.js +6 -0
- package/src/components/pages/RetailerProductEdition/index.js +1 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="19.995" height="14.282" viewBox="0 0 19.995 14.282">
|
|
2
|
+
<g id="Grupo_608" data-name="Grupo 608" transform="translate(-1323 -104)">
|
|
3
|
+
<g id="Rectángulo_432" data-name="Rectángulo 432" transform="translate(1323 104)" fill="#fff" stroke="#e33aa9" stroke-width="1">
|
|
4
|
+
<rect width="11.426" height="11.426" rx="2" stroke="none"/>
|
|
5
|
+
<rect x="0.5" y="0.5" width="10.426" height="10.426" rx="1.5" fill="none"/>
|
|
6
|
+
</g>
|
|
7
|
+
<path id="Trazado_8" data-name="Trazado 8" d="M4.44-8.819H2.007l-.463,1.4H.068l2.508-6.8H3.862l2.521,6.8H4.908ZM2.382-9.954H4.066L3.219-12.5Z" transform="translate(1325.487 120.531)" fill="#e33aa9"/>
|
|
8
|
+
<g id="Rectángulo_431" data-name="Rectángulo 431" transform="translate(1331.569 106.856)" fill="#e33aa9" stroke="#e33aa9" stroke-width="1">
|
|
9
|
+
<rect width="11.426" height="11.426" rx="2" stroke="none"/>
|
|
10
|
+
<rect x="0.5" y="0.5" width="10.426" height="10.426" rx="1.5" fill="none"/>
|
|
11
|
+
</g>
|
|
12
|
+
<path id="Trazado_7" data-name="Trazado 7" d="M1.27-7.418v-6.8h2.29a2.918,2.918,0,0,1,1.8.474,1.647,1.647,0,0,1,.615,1.39,1.582,1.582,0,0,1-.247.88,1.437,1.437,0,0,1-.687.558,1.376,1.376,0,0,1,.792.528,1.6,1.6,0,0,1,.29.972,1.829,1.829,0,0,1-.6,1.485,2.635,2.635,0,0,1-1.715.514Zm1.347-2.961v1.836H3.77a1.085,1.085,0,0,0,.743-.236.824.824,0,0,0,.267-.652.837.837,0,0,0-.929-.948Zm0-.99h1q1.019-.019,1.019-.845a.8.8,0,0,0-.258-.666,1.317,1.317,0,0,0-.815-.2H2.616Z" transform="translate(1333.823 123.387)" fill="#fff"/>
|
|
13
|
+
</g>
|
|
14
|
+
</svg>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -13,14 +15,15 @@ var _index2 = require("../../atoms/GeneralButton/index");
|
|
|
13
15
|
|
|
14
16
|
var _react = require("react");
|
|
15
17
|
|
|
16
|
-
var
|
|
18
|
+
var _IconoAB = _interopRequireDefault(require("../../../../src/assets/images/generalButton/Icono AB.svg"));
|
|
17
19
|
|
|
18
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
21
|
|
|
20
22
|
var HeaderTop = function HeaderTop(_ref) {
|
|
21
23
|
var setHeaderTop = _ref.setHeaderTop,
|
|
22
24
|
auditableVersion = _ref.auditableVersion,
|
|
23
|
-
setCompare = _ref.setCompare
|
|
25
|
+
setCompare = _ref.setCompare,
|
|
26
|
+
isAuditor = _ref.isAuditor;
|
|
24
27
|
var headerTop = (0, _react.useRef)();
|
|
25
28
|
(0, _react.useEffect)(function () {
|
|
26
29
|
setHeaderTop && setHeaderTop(headerTop.current.clientHeight);
|
|
@@ -31,14 +34,14 @@ var HeaderTop = function HeaderTop(_ref) {
|
|
|
31
34
|
text: "Edici\xF3n de producto"
|
|
32
35
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
33
36
|
className: "buttons-container",
|
|
34
|
-
children: [auditableVersion && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Button, {
|
|
37
|
+
children: [isAuditor && auditableVersion && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Button, {
|
|
35
38
|
buttonType: "general-white-button circular-button",
|
|
36
|
-
label: "A|B",
|
|
37
39
|
onClick: function onClick() {
|
|
38
40
|
setCompare(function (current) {
|
|
39
41
|
return !current;
|
|
40
42
|
});
|
|
41
|
-
}
|
|
43
|
+
},
|
|
44
|
+
image: _IconoAB.default
|
|
42
45
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Button, {
|
|
43
46
|
buttonType: "general-white-button close-button",
|
|
44
47
|
onClick: function onClick() {
|
|
@@ -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 .buttons-top {\n display: flex;\n align-items: center;\n padding-top: 10px;\n }\n\n .buttons-container {\n display: flex;\n\n button {\n width: 30px;\n height: 30px;\n border: 1px solid #f0f0f0;\n background-size: 20px;\n padding: 0;\n\n & + * {\n margin-left: 10px;\n }\n }\n }\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 padding-top: 10px;\n }\n\n .buttons-container {\n display: flex;\n\n button {\n width: 30px;\n height: 30px;\n border: 1px solid #f0f0f0;\n background-size: 20px;\n padding: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n img {\n height: 15px;\n }\n\n & + * {\n margin-left: 10px;\n }\n }\n }\n"])));
|
|
17
17
|
|
|
18
18
|
exports.Container = Container;
|
|
@@ -1896,7 +1896,8 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1896
1896
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_HeaderTop.HeaderTop, {
|
|
1897
1897
|
setHeaderTop: setHeaderTop,
|
|
1898
1898
|
auditableVersion: auditableVersion,
|
|
1899
|
-
setCompare: setCompare
|
|
1899
|
+
setCompare: setCompare,
|
|
1900
|
+
isAuditor: [1, 6].includes(user.id_role)
|
|
1900
1901
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1901
1902
|
className: "data-container",
|
|
1902
1903
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
package/package.json
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="19.995" height="14.282" viewBox="0 0 19.995 14.282">
|
|
2
|
+
<g id="Grupo_608" data-name="Grupo 608" transform="translate(-1323 -104)">
|
|
3
|
+
<g id="Rectángulo_432" data-name="Rectángulo 432" transform="translate(1323 104)" fill="#fff" stroke="#e33aa9" stroke-width="1">
|
|
4
|
+
<rect width="11.426" height="11.426" rx="2" stroke="none"/>
|
|
5
|
+
<rect x="0.5" y="0.5" width="10.426" height="10.426" rx="1.5" fill="none"/>
|
|
6
|
+
</g>
|
|
7
|
+
<path id="Trazado_8" data-name="Trazado 8" d="M4.44-8.819H2.007l-.463,1.4H.068l2.508-6.8H3.862l2.521,6.8H4.908ZM2.382-9.954H4.066L3.219-12.5Z" transform="translate(1325.487 120.531)" fill="#e33aa9"/>
|
|
8
|
+
<g id="Rectángulo_431" data-name="Rectángulo 431" transform="translate(1331.569 106.856)" fill="#e33aa9" stroke="#e33aa9" stroke-width="1">
|
|
9
|
+
<rect width="11.426" height="11.426" rx="2" stroke="none"/>
|
|
10
|
+
<rect x="0.5" y="0.5" width="10.426" height="10.426" rx="1.5" fill="none"/>
|
|
11
|
+
</g>
|
|
12
|
+
<path id="Trazado_7" data-name="Trazado 7" d="M1.27-7.418v-6.8h2.29a2.918,2.918,0,0,1,1.8.474,1.647,1.647,0,0,1,.615,1.39,1.582,1.582,0,0,1-.247.88,1.437,1.437,0,0,1-.687.558,1.376,1.376,0,0,1,.792.528,1.6,1.6,0,0,1,.29.972,1.829,1.829,0,0,1-.6,1.485,2.635,2.635,0,0,1-1.715.514Zm1.347-2.961v1.836H3.77a1.085,1.085,0,0,0,.743-.236.824.824,0,0,0,.267-.652.837.837,0,0,0-.929-.948Zm0-.99h1q1.019-.019,1.019-.845a.8.8,0,0,0-.258-.666,1.317,1.317,0,0,0-.815-.2H2.616Z" transform="translate(1333.823 123.387)" fill="#fff"/>
|
|
13
|
+
</g>
|
|
14
|
+
</svg>
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { Container } from "./styles";
|
|
2
2
|
import { ScreenHeader } from "../../atoms/ScreenHeader/index";
|
|
3
3
|
import { Button } from "../../atoms/GeneralButton/index";
|
|
4
|
-
import { useEffect, useRef
|
|
5
|
-
import
|
|
4
|
+
import { useEffect, useRef } from "react";
|
|
5
|
+
import auditIcon from "../../../../src/assets/images/generalButton/Icono AB.svg";
|
|
6
6
|
|
|
7
|
-
export const HeaderTop = ({
|
|
7
|
+
export const HeaderTop = ({
|
|
8
|
+
setHeaderTop,
|
|
9
|
+
auditableVersion,
|
|
10
|
+
setCompare,
|
|
11
|
+
isAuditor,
|
|
12
|
+
}) => {
|
|
8
13
|
const headerTop = useRef();
|
|
9
14
|
|
|
10
15
|
useEffect(() => {
|
|
@@ -15,13 +20,13 @@ export const HeaderTop = ({ setHeaderTop, auditableVersion, setCompare }) => {
|
|
|
15
20
|
<Container ref={headerTop}>
|
|
16
21
|
<ScreenHeader text="Edición de producto" />
|
|
17
22
|
<div className="buttons-container">
|
|
18
|
-
{auditableVersion && (
|
|
23
|
+
{isAuditor && auditableVersion && (
|
|
19
24
|
<Button
|
|
20
25
|
buttonType="general-white-button circular-button"
|
|
21
|
-
label={"A|B"}
|
|
22
26
|
onClick={() => {
|
|
23
27
|
setCompare((current) => !current);
|
|
24
28
|
}}
|
|
29
|
+
image={auditIcon}
|
|
25
30
|
/>
|
|
26
31
|
)}
|
|
27
32
|
<Button
|
|
@@ -1268,6 +1268,7 @@ export const RetailerProductEdition = ({
|
|
|
1268
1268
|
setHeaderTop={setHeaderTop}
|
|
1269
1269
|
auditableVersion={auditableVersion}
|
|
1270
1270
|
setCompare={setCompare}
|
|
1271
|
+
isAuditor={[1, 6].includes(user.id_role)}
|
|
1271
1272
|
/>
|
|
1272
1273
|
<div className="data-container">
|
|
1273
1274
|
<div className="image-data-panel">
|