contentoh-components-library 21.1.63 → 21.1.66
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 +1 -0
- package/.env.production +1 -0
- package/dist/assets/images/versionSelector/acceptIcon.svg +3 -0
- package/dist/assets/images/versionSelector/addVersion.svg +5 -0
- package/dist/assets/images/versionSelector/closeVersionSelector.svg +4 -0
- package/dist/assets/images/versionSelector/createVersion.svg +3 -0
- package/dist/assets/images/versionSelector/nullIcon.svg +3 -0
- package/dist/assets/images/versionSelector/versionSelected.svg +3 -0
- package/dist/components/atoms/GeneralButton/index.js +3 -1
- package/dist/components/atoms/GeneralButton/styles.js +2 -2
- package/dist/components/atoms/InputFormatter/index.js +3 -3
- package/dist/components/atoms/ProductPercentCard/Percent.stories.js +1 -1
- package/dist/components/atoms/ProductPercentCard/styles.js +1 -1
- package/dist/components/atoms/Select/VersionSelect.js +37 -0
- package/dist/components/atoms/Select/index.js +4 -3
- package/dist/components/atoms/Select/style.js +10 -4
- package/dist/components/atoms/SliderToolTip/styles.js +2 -2
- package/dist/components/molecules/AssignedWork/AssignedWork.stories.js +1 -1
- package/dist/components/molecules/AssignedWork/styles.js +1 -1
- package/dist/components/molecules/StatusAsignationInfo/index.js +9 -1
- package/dist/components/molecules/VersionItem/VersionItem.stories.js +28 -0
- package/dist/components/molecules/VersionItem/index.js +64 -0
- package/dist/components/molecules/VersionItem/styles.js +20 -0
- package/dist/components/organisms/CreateVersion/CreateVersion.stories.js +31 -0
- package/dist/components/organisms/CreateVersion/RenderChilds.js +157 -0
- package/dist/components/organisms/CreateVersion/index.js +182 -0
- package/dist/components/organisms/CreateVersion/styles.js +28 -0
- package/dist/components/organisms/FullProductNameHeader/index.js +1 -1
- package/dist/components/organisms/FullTabsMenu/index.js +6 -2
- package/dist/components/organisms/VersionSelector/VersionSelector.stories.js +32 -0
- package/dist/components/organisms/VersionSelector/index.js +129 -0
- package/dist/components/organisms/VersionSelector/styles.js +20 -0
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +102 -112
- package/dist/components/pages/ProviderProductEdition/index.js +449 -431
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +53 -72
- package/dist/components/pages/RetailerProductEdition/index.js +245 -231
- package/dist/global-files/customHooks.js +35 -0
- package/dist/global-files/data.js +8 -8
- package/dist/global-files/global-styles.css +1 -0
- package/package.json +1 -1
- package/src/assets/images/versionSelector/acceptIcon.svg +3 -0
- package/src/assets/images/versionSelector/addVersion.svg +5 -0
- package/src/assets/images/versionSelector/closeVersionSelector.svg +4 -0
- package/src/assets/images/versionSelector/createVersion.svg +3 -0
- package/src/assets/images/versionSelector/nullIcon.svg +3 -0
- package/src/assets/images/versionSelector/versionSelected.svg +3 -0
- package/src/components/atoms/GeneralButton/index.js +2 -0
- package/src/components/atoms/GeneralButton/styles.js +18 -0
- package/src/components/atoms/InputFormatter/index.js +6 -3
- package/src/components/atoms/ProductPercentCard/Percent.stories.js +12 -11
- package/src/components/atoms/ProductPercentCard/styles.js +9 -9
- package/src/components/atoms/ProgressBar/styles.js +69 -0
- package/src/components/atoms/Select/VersionSelect.js +25 -0
- package/src/components/atoms/Select/index.js +1 -1
- package/src/components/atoms/Select/style.js +19 -0
- package/src/components/atoms/SliderToolTip/styles.js +18 -14
- package/src/components/molecules/AssignedWork/AssignedWork.stories.js +8 -8
- package/src/components/molecules/AssignedWork/styles.js +10 -9
- package/src/components/molecules/StatusAsignationInfo/index.js +10 -1
- package/src/components/molecules/VersionItem/VersionItem.stories.js +14 -0
- package/src/components/molecules/VersionItem/index.js +47 -0
- package/src/components/molecules/VersionItem/styles.js +32 -0
- package/src/components/organisms/CreateVersion/CreateVersion.stories.js +14 -0
- package/src/components/organisms/CreateVersion/RenderChilds.js +137 -0
- package/src/components/organisms/CreateVersion/index.js +88 -0
- package/src/components/organisms/CreateVersion/styles.js +79 -0
- package/src/components/organisms/FullProductNameHeader/index.js +2 -2
- package/src/components/organisms/FullTabsMenu/index.js +5 -1
- package/src/components/organisms/VersionSelector/VersionSelector.stories.js +15 -0
- package/src/components/organisms/VersionSelector/index.js +75 -0
- package/src/components/organisms/VersionSelector/styles.js +28 -0
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +116 -134
- package/src/components/pages/ProviderProductEdition/index.js +267 -234
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +53 -74
- package/src/components/pages/RetailerProductEdition/index.js +201 -151
- package/src/global-files/customHooks.js +26 -0
- package/src/global-files/data.js +8 -8
- package/src/global-files/global-styles.css +1 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.closeModals = void 0;
|
|
9
|
+
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
11
|
+
|
|
12
|
+
var _react = require("react");
|
|
13
|
+
|
|
14
|
+
var closeModals = function closeModals(id) {
|
|
15
|
+
var _useState = (0, _react.useState)(false),
|
|
16
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
17
|
+
showModal = _useState2[0],
|
|
18
|
+
setShowModal = _useState2[1];
|
|
19
|
+
|
|
20
|
+
var closeModal = function closeModal(e) {
|
|
21
|
+
if ((!e.target.closest("#".concat(id)) || e.target.closest("#close-button") || e.target.closest("#add-version")) && showModal) {
|
|
22
|
+
document.removeEventListener("click", closeModal);
|
|
23
|
+
setShowModal(false);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
(0, _react.useEffect)(function () {
|
|
28
|
+
if (showModal) {
|
|
29
|
+
document.addEventListener("click", closeModal);
|
|
30
|
+
}
|
|
31
|
+
}, [showModal]);
|
|
32
|
+
return [showModal, setShowModal];
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
exports.closeModals = closeModals;
|
|
@@ -280,18 +280,18 @@ var getNewStatus = function getNewStatus(statusArray) {
|
|
|
280
280
|
statusArray.forEach(function (element) {
|
|
281
281
|
return lookupString += element + "/";
|
|
282
282
|
});
|
|
283
|
-
if (lookupString.includes("
|
|
284
|
-
if (lookupString.includes("RC")) return "RC";
|
|
283
|
+
if (lookupString.includes("RF")) return "RF";
|
|
285
284
|
if (lookupString.includes("RA")) return "RA";
|
|
286
285
|
if (lookupString.includes("RP")) return "RP";
|
|
287
|
-
if (lookupString.includes("
|
|
288
|
-
if (lookupString.includes("
|
|
289
|
-
if (lookupString.includes("
|
|
290
|
-
if (lookupString.includes("
|
|
291
|
-
if (lookupString.includes("
|
|
286
|
+
if (lookupString.includes("RC")) return "RC";
|
|
287
|
+
if (lookupString.includes("UNASSIGNED")) return "IN_PROGRESS";
|
|
288
|
+
if (lookupString.includes("IN_PROGRESS")) return "IN_PROGRESS";
|
|
289
|
+
if (lookupString.includes("QF")) return "QF";
|
|
290
|
+
if (lookupString.includes("AF")) return "AF";
|
|
292
291
|
if (lookupString.includes("AA")) return "AA";
|
|
293
292
|
if (lookupString.includes("AP")) return "AP";
|
|
294
|
-
if (lookupString.includes("
|
|
293
|
+
if (lookupString.includes("AC")) return "AC";
|
|
294
|
+
if (lookupString.includes("RECEIVED")) return "RECEIVED";
|
|
295
295
|
if (lookupString.includes("NA")) return "NA";
|
|
296
296
|
return new Error("Status not found");
|
|
297
297
|
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 10C0 4.48578 4.48578 0 10 0C15.5142 0 20 4.48578 20 10C20 15.5142 15.5142 20 10 20C4.48578 20 0 15.5142 0 10ZM9.65054 13.2973L15.0673 7.88074C15.393 7.55481 15.393 7.02823 15.0673 6.70245C14.7413 6.37653 14.2148 6.37653 13.889 6.70245L9.0614 11.5299L6.94226 9.41074C6.61633 9.08481 6.08975 9.08481 5.76398 9.41074C5.43805 9.73651 5.43805 10.2632 5.76398 10.589L8.47226 13.2973C8.63477 13.4598 8.84808 13.5416 9.0614 13.5416C9.27472 13.5416 9.48804 13.4598 9.65054 13.2973Z" fill="#71DE56"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<line x1="6.72461" y1="10" x2="14.7246" y2="10" stroke="#E33AA9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<line x1="10.7246" y1="6" x2="10.7246" y2="14" stroke="#E33AA9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<rect x="1.22461" y="0.5" width="19.2749" height="19" rx="9.5" stroke="#D4D1D7"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<line x1="0.707107" y1="1" x2="16" y2="16.2929" stroke="#E33AA9" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<line x1="16" y1="1.70711" x2="1.70711" y2="16" stroke="#E33AA9" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="73" height="73" viewBox="0 0 73 73" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M12.1666 18.2497H6.08325V60.833C6.08325 64.1788 8.82075 66.9163 12.1666 66.9163H54.7499V60.833H12.1666V18.2497ZM60.8332 6.08301H24.3333C20.9874 6.08301 18.2499 8.82051 18.2499 12.1663V48.6663C18.2499 52.0122 20.9874 54.7497 24.3333 54.7497H60.8332C64.1791 54.7497 66.9166 52.0122 66.9166 48.6663V12.1663C66.9166 8.82051 64.1791 6.08301 60.8332 6.08301ZM57.7916 33.458H45.6249V45.6247H39.5416V33.458H27.3749V27.3747H39.5416V15.208H45.6249V27.3747H57.7916V33.458Z" fill="#817393"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="22" height="15" viewBox="0 0 22 15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M11 0C6 0 1.73 3.11 0 7.5C1.73 11.89 6 15 11 15C16 15 20.27 11.89 22 7.5C20.27 3.11 16 0 11 0ZM11 12.5C8.24 12.5 6 10.26 6 7.5C6 4.74 8.24 2.5 11 2.5C13.76 2.5 16 4.74 16 7.5C16 10.26 13.76 12.5 11 12.5ZM11 4.5C9.34 4.5 8 5.84 8 7.5C8 9.16 9.34 10.5 11 10.5C12.66 10.5 14 9.16 14 7.5C14 5.84 12.66 4.5 11 4.5Z" fill="#D4D1D7"/>
|
|
3
|
+
</svg>
|
|
@@ -2,6 +2,7 @@ import { Container } from "./styles";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
|
|
4
4
|
export const Button = ({
|
|
5
|
+
id,
|
|
5
6
|
buttonType,
|
|
6
7
|
label,
|
|
7
8
|
image,
|
|
@@ -11,6 +12,7 @@ export const Button = ({
|
|
|
11
12
|
}) => {
|
|
12
13
|
return (
|
|
13
14
|
<Container
|
|
15
|
+
id={id}
|
|
14
16
|
className={buttonType}
|
|
15
17
|
buttonFont={buttonFont}
|
|
16
18
|
onClick={onClick}
|
|
@@ -57,6 +57,7 @@ export const Container = styled.button`
|
|
|
57
57
|
background-color: transparent;
|
|
58
58
|
background-repeat: no-repeat;
|
|
59
59
|
background-position: center;
|
|
60
|
+
|
|
60
61
|
&.accept-button {
|
|
61
62
|
background-image: url(${acceptIcon});
|
|
62
63
|
}
|
|
@@ -106,6 +107,23 @@ export const Container = styled.button`
|
|
|
106
107
|
border: 1px solid ${GlobalColors.magenta_s2};
|
|
107
108
|
}
|
|
108
109
|
}
|
|
110
|
+
|
|
111
|
+
&.disabled {
|
|
112
|
+
opacity: 0.5;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
img {
|
|
116
|
+
width: 100%;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&.version-button {
|
|
120
|
+
color: ${GlobalColors.s3};
|
|
121
|
+
border: 1px solid ${GlobalColors.s3};
|
|
122
|
+
border-radius: 15px;
|
|
123
|
+
font-size: 12px;
|
|
124
|
+
line-height: 25px;
|
|
125
|
+
text-align: center;
|
|
126
|
+
}
|
|
109
127
|
}
|
|
110
128
|
|
|
111
129
|
&.general-arrow-button {
|
|
@@ -22,7 +22,7 @@ export const InputFormatter = ({
|
|
|
22
22
|
const maxLength = maxChar ? maxChar : 999;
|
|
23
23
|
|
|
24
24
|
const getValue = (value) => {
|
|
25
|
-
let temp = value.replace(/\n/gm, "<br>");
|
|
25
|
+
let temp = value.replace(/\n/gm, "<br>").replace(/&/gm, "&");
|
|
26
26
|
return temp;
|
|
27
27
|
};
|
|
28
28
|
|
|
@@ -34,7 +34,10 @@ export const InputFormatter = ({
|
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
const valueFormater = (value) => {
|
|
37
|
-
return value
|
|
37
|
+
return value
|
|
38
|
+
.replace(/<\/p><p>/gm, "\n")
|
|
39
|
+
.replace(/<\/?br>|<\/?p>/gm, "")
|
|
40
|
+
.replace(/&/gm, "&");
|
|
38
41
|
};
|
|
39
42
|
|
|
40
43
|
const onChange = (valueInput, delta, user, h) => {
|
|
@@ -109,7 +112,7 @@ export const InputFormatter = ({
|
|
|
109
112
|
<ReactQuill
|
|
110
113
|
id={inputId + ""}
|
|
111
114
|
ref={(el) => setQuill(el)}
|
|
112
|
-
|
|
115
|
+
defaultValue={getValue(inputValue)}
|
|
113
116
|
//disabled={!props.enableInputs}
|
|
114
117
|
modules={{ toolbar: ["bold"] }}
|
|
115
118
|
onKeyPress={(e) => {
|
|
@@ -3,18 +3,18 @@ import { ProductPercentCard } from "./index";
|
|
|
3
3
|
const status = [
|
|
4
4
|
"-",
|
|
5
5
|
"Pr",
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
6
|
+
"Rc",
|
|
7
|
+
"As",
|
|
8
|
+
"P",
|
|
9
|
+
"QF",
|
|
10
|
+
"AF",
|
|
11
11
|
"AA",
|
|
12
12
|
"AP",
|
|
13
|
-
"
|
|
13
|
+
"AC",
|
|
14
14
|
"RA",
|
|
15
|
-
"
|
|
15
|
+
"RF",
|
|
16
16
|
"RP",
|
|
17
|
-
"
|
|
17
|
+
"RC",
|
|
18
18
|
"Ex",
|
|
19
19
|
];
|
|
20
20
|
|
|
@@ -29,12 +29,13 @@ export default {
|
|
|
29
29
|
},
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
const Template = (args) => <ProductPercentCard {...args}
|
|
32
|
+
const Template = (args) => <ProductPercentCard {...args}/>;
|
|
33
33
|
|
|
34
|
-
export const ProductPercentCardDefault = Template.bind({});
|
|
34
|
+
export const ProductPercentCardDefault = Template.bind ({});
|
|
35
35
|
|
|
36
36
|
ProductPercentCardDefault.args = {
|
|
37
37
|
statusType: "-",
|
|
38
38
|
productsInStatus: 0,
|
|
39
39
|
totalProcucts: 0,
|
|
40
|
-
|
|
40
|
+
|
|
41
|
+
};
|
|
@@ -8,8 +8,8 @@ export const Container = styled.div`
|
|
|
8
8
|
height: 83px;
|
|
9
9
|
padding: 10px;
|
|
10
10
|
|
|
11
|
-
&.status-
|
|
12
|
-
&.status-
|
|
11
|
+
&.status-Pr,
|
|
12
|
+
&.status-Rc {
|
|
13
13
|
border: 1px solid ${GlobalColors.reception};
|
|
14
14
|
.span {
|
|
15
15
|
color: ${GlobalColors.reception};
|
|
@@ -22,19 +22,19 @@ export const Container = styled.div`
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
&.status-
|
|
26
|
-
&.status-
|
|
27
|
-
&.status-
|
|
25
|
+
&.status-As,
|
|
26
|
+
&.status-P,
|
|
27
|
+
&.status-QF {
|
|
28
28
|
border: 1px solid ${GlobalColors.in_progress};
|
|
29
29
|
.span {
|
|
30
30
|
color: ${GlobalColors.in_progress};
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
&.status-
|
|
34
|
+
&.status-AF,
|
|
35
35
|
&.status-AA,
|
|
36
36
|
&.status-AP,
|
|
37
|
-
&.status-
|
|
37
|
+
&.status-AC {
|
|
38
38
|
border: 1px solid ${GlobalColors.finished};
|
|
39
39
|
.span {
|
|
40
40
|
color: ${GlobalColors.finished};
|
|
@@ -42,9 +42,9 @@ export const Container = styled.div`
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
&.status-RA,
|
|
45
|
-
&.status-
|
|
45
|
+
&.status-RF,
|
|
46
46
|
&.status-RP,
|
|
47
|
-
&.status-
|
|
47
|
+
&.status-RC {
|
|
48
48
|
border: 1px solid #d74ded;
|
|
49
49
|
.span {
|
|
50
50
|
color: #d74ded;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
background-color: ${GlobalColors.s3};
|
|
6
|
+
width: fit-content;
|
|
7
|
+
height: 27px;
|
|
8
|
+
padding: 4px;
|
|
9
|
+
border-radius: 15px;
|
|
10
|
+
font-family: ${FontFamily.AvenirNext};
|
|
11
|
+
font-weight: 600;
|
|
12
|
+
font-size: 14px;
|
|
13
|
+
line-height: 19px;
|
|
14
|
+
color: ${(backgroundColor) =>
|
|
15
|
+
backgroundColor === "s2" || backgroundColor === "s1"
|
|
16
|
+
? GlobalColors.s4
|
|
17
|
+
: GlobalColors.white};
|
|
18
|
+
|
|
19
|
+
&.status-As,
|
|
20
|
+
&.status-P {
|
|
21
|
+
background-color: ${GlobalColors.in_progress};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&.status-Pr,
|
|
25
|
+
&.status-Rr {
|
|
26
|
+
background-color: ${GlobalColors.reception};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.status-AA,
|
|
30
|
+
&.status-AP,
|
|
31
|
+
&.status-AC,
|
|
32
|
+
&.status-AF {
|
|
33
|
+
background-color: ${GlobalColors.finished};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&.status-RA,
|
|
37
|
+
&.status-RF,
|
|
38
|
+
&.status-RP,
|
|
39
|
+
&.status-RC {
|
|
40
|
+
background-color: ${GlobalColors.rejected_status};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&.status-Dat,
|
|
44
|
+
&.status-Dsc,
|
|
45
|
+
&.status-Imgs {
|
|
46
|
+
background-color: ${GlobalColors.s4};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.status-Ex {
|
|
50
|
+
background-color: ${GlobalColors.exported};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&.status-DDI {
|
|
54
|
+
background-color: ${GlobalColors.original_purpura};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&.status-GLD {
|
|
58
|
+
background-color: ${GlobalColors.in_progress};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&.status-TAB {
|
|
62
|
+
background-color: ${GlobalColors.deep_gray};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&.status-Pt {
|
|
66
|
+
background-color: ${GlobalColors.s2};
|
|
67
|
+
color: ${GlobalColors.s4};
|
|
68
|
+
}
|
|
69
|
+
`;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { VrsnSelect } from "./style";
|
|
2
|
+
|
|
3
|
+
export const VersionSelect = ({
|
|
4
|
+
id,
|
|
5
|
+
selectedVersions,
|
|
6
|
+
onChange,
|
|
7
|
+
label,
|
|
8
|
+
versions = [],
|
|
9
|
+
}) => {
|
|
10
|
+
return (
|
|
11
|
+
<VrsnSelect>
|
|
12
|
+
<label htmlFor={id}>{label}</label>
|
|
13
|
+
<select
|
|
14
|
+
id={id}
|
|
15
|
+
name={id}
|
|
16
|
+
value={`Version ${selectedVersions[id]}`}
|
|
17
|
+
onChange={onChange}
|
|
18
|
+
>
|
|
19
|
+
{versions.map((item, index) => (
|
|
20
|
+
<option key={`${id}-${index}`}>Version {item.version}</option>
|
|
21
|
+
))}
|
|
22
|
+
</select>
|
|
23
|
+
</VrsnSelect>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
@@ -8,6 +8,7 @@ export default function Select(props) {
|
|
|
8
8
|
width={props.width}
|
|
9
9
|
onChange={props.onChange}
|
|
10
10
|
defaultValue={props.valueSelected ? props.valueSelected : ""}
|
|
11
|
+
className={props.className}
|
|
11
12
|
>
|
|
12
13
|
<option value="" disabled>
|
|
13
14
|
{props.placeholder}
|
|
@@ -29,7 +30,6 @@ export default function Select(props) {
|
|
|
29
30
|
</option>
|
|
30
31
|
))}
|
|
31
32
|
</SelectCustom>
|
|
32
|
-
<BackgroundEnd />
|
|
33
33
|
</Container>
|
|
34
34
|
);
|
|
35
35
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
|
+
import { GlobalColors, FontFamily } from "../../../global-files/variables";
|
|
2
3
|
|
|
3
4
|
export const Container = styled.div`
|
|
4
5
|
position: relative;
|
|
@@ -73,4 +74,22 @@ export const SelectCustom = styled.select`
|
|
|
73
74
|
color: gray;
|
|
74
75
|
}
|
|
75
76
|
}
|
|
77
|
+
|
|
78
|
+
&.version-selector {
|
|
79
|
+
}
|
|
80
|
+
`;
|
|
81
|
+
|
|
82
|
+
export const VrsnSelect = styled.div`
|
|
83
|
+
background-color: ${GlobalColors.deep_gray};
|
|
84
|
+
|
|
85
|
+
select {
|
|
86
|
+
border: 1px solid ${GlobalColors.s3} !important;
|
|
87
|
+
background-color: transparent;
|
|
88
|
+
color: ${GlobalColors.white};
|
|
89
|
+
width: 100%;
|
|
90
|
+
text-align: center;
|
|
91
|
+
padding: 5px;
|
|
92
|
+
border-radius: 15px;
|
|
93
|
+
text-decoration: none;
|
|
94
|
+
}
|
|
76
95
|
`;
|
|
@@ -5,10 +5,14 @@ export const Container = styled.div`
|
|
|
5
5
|
background: transparent;
|
|
6
6
|
cursor: pointer;
|
|
7
7
|
position: relative;
|
|
8
|
+
height: 100%;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
8
11
|
& + * {
|
|
9
12
|
margin-left: 10px;
|
|
10
13
|
}
|
|
11
14
|
img {
|
|
15
|
+
margin: auto 0;
|
|
12
16
|
&.small-image {
|
|
13
17
|
width: 20px;
|
|
14
18
|
height: 20px;
|
|
@@ -101,22 +105,22 @@ export const Slider = styled.div`
|
|
|
101
105
|
}
|
|
102
106
|
}
|
|
103
107
|
span {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
108
|
+
font-family: "Avenir Next";
|
|
109
|
+
font-style: normal;
|
|
110
|
+
font-weight: 500;
|
|
111
|
+
font-size: 15px;
|
|
112
|
+
line-height: 15px;
|
|
113
|
+
text-align: center;
|
|
114
|
+
letter-spacing: -0.015em;
|
|
115
|
+
color: #fafafa;
|
|
116
|
+
display: flex;
|
|
117
|
+
justify-content: center;
|
|
118
|
+
background-color: #281f33;
|
|
119
|
+
& + * {
|
|
120
|
+
margin-top: 10px;
|
|
121
|
+
}
|
|
117
122
|
}
|
|
118
123
|
}
|
|
119
|
-
}
|
|
120
124
|
.end-div {
|
|
121
125
|
div {
|
|
122
126
|
height: 130px;
|
|
@@ -5,18 +5,18 @@ import assignedImage2 from "../../../assets/images/componentAssigned/assignedIma
|
|
|
5
5
|
const status = [
|
|
6
6
|
"-",
|
|
7
7
|
"Pr",
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
8
|
+
"Rc",
|
|
9
|
+
"As",
|
|
10
|
+
"P",
|
|
11
|
+
"QF",
|
|
12
|
+
"AF",
|
|
13
13
|
"AA",
|
|
14
14
|
"AP",
|
|
15
|
-
"
|
|
15
|
+
"AC",
|
|
16
16
|
"RA",
|
|
17
|
-
"
|
|
17
|
+
"RF",
|
|
18
18
|
"RP",
|
|
19
|
-
"
|
|
19
|
+
"RC",
|
|
20
20
|
"Ex",
|
|
21
21
|
];
|
|
22
22
|
|
|
@@ -9,8 +9,8 @@ export const Container = styled.div`
|
|
|
9
9
|
padding-bottom: 5px;
|
|
10
10
|
position: relative;
|
|
11
11
|
|
|
12
|
-
&.status-
|
|
13
|
-
&.status-
|
|
12
|
+
&.status-Pr,
|
|
13
|
+
&.status-Rc {
|
|
14
14
|
border: 1px solid ${GlobalColors.reception};
|
|
15
15
|
.header-and-paragraph {
|
|
16
16
|
color: ${GlobalColors.reception};
|
|
@@ -23,19 +23,19 @@ export const Container = styled.div`
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
&.status-
|
|
27
|
-
&.status-
|
|
28
|
-
&.status-
|
|
26
|
+
&.status-As,
|
|
27
|
+
&.status-P,
|
|
28
|
+
&.status-QF {
|
|
29
29
|
border: 1px solid ${GlobalColors.in_progress};
|
|
30
30
|
.header-and-paragraph {
|
|
31
31
|
color: ${GlobalColors.in_progress};
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
&.status-
|
|
35
|
+
&.status-AF,
|
|
36
36
|
&.status-AA,
|
|
37
37
|
&.status-AP,
|
|
38
|
-
&.status-
|
|
38
|
+
&.status-AC {
|
|
39
39
|
border: 1px solid ${GlobalColors.finished};
|
|
40
40
|
.header-and-paragraph {
|
|
41
41
|
color: ${GlobalColors.finished};
|
|
@@ -43,9 +43,9 @@ export const Container = styled.div`
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
&.status-RA,
|
|
46
|
-
&.status-
|
|
46
|
+
&.status-RF,
|
|
47
47
|
&.status-RP,
|
|
48
|
-
&.status-
|
|
48
|
+
&.status-RC {
|
|
49
49
|
border: 1px solid #d74ded;
|
|
50
50
|
.header-and-paragraph {
|
|
51
51
|
color: #d74ded;
|
|
@@ -56,6 +56,7 @@ export const Container = styled.div`
|
|
|
56
56
|
border: 1px solid ${GlobalColors.exported};
|
|
57
57
|
.header-and-paragraph {
|
|
58
58
|
color: ${GlobalColors.exported};
|
|
59
|
+
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
62
|
|
|
@@ -26,6 +26,8 @@ export const StatusAsignationInfo = ({
|
|
|
26
26
|
onClickSave,
|
|
27
27
|
showSaveButton,
|
|
28
28
|
canAssign,
|
|
29
|
+
version,
|
|
30
|
+
setShowVersionSelector,
|
|
29
31
|
}) => {
|
|
30
32
|
const [showAsignationPanel, setShowAsignationPanel] = useState(false);
|
|
31
33
|
const [layout, setLayout] = useState(false);
|
|
@@ -71,7 +73,14 @@ export const StatusAsignationInfo = ({
|
|
|
71
73
|
slidefront={slidefront}
|
|
72
74
|
iconSize={"medium-image"}
|
|
73
75
|
slidePosition={"bottom-slide"}
|
|
74
|
-
|
|
76
|
+
/>
|
|
77
|
+
<Button
|
|
78
|
+
buttonType={"general circular-button version-button"}
|
|
79
|
+
onClick={() => {
|
|
80
|
+
setShowVersionSelector(true);
|
|
81
|
+
}}
|
|
82
|
+
label={`V${version}`}
|
|
83
|
+
/>
|
|
75
84
|
{status !== "-" && <StatusTag statusType={status} ovalForm={true} />}
|
|
76
85
|
{showSaveButton && (
|
|
77
86
|
<Button
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { VersionItem } from "./index";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/molecules/VersionItem",
|
|
5
|
+
component: VersionItem,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = (args) => <VersionItem {...args} />;
|
|
9
|
+
|
|
10
|
+
export const VersionItemDefault = Template.bind({});
|
|
11
|
+
|
|
12
|
+
VersionItemDefault.args = {
|
|
13
|
+
|
|
14
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Avatar } from "../../atoms/Avatar/index";
|
|
2
|
+
import { Container } from "./styles";
|
|
3
|
+
import nullIcon from "../../../assets/images/versionSelector/nullIcon.svg";
|
|
4
|
+
import acceptIcon from "../../../assets/images/versionSelector/acceptIcon.svg";
|
|
5
|
+
import versionSelected from "../../../assets/images/versionSelector/versionSelected.svg";
|
|
6
|
+
import { Button } from "../../atoms/GeneralButton";
|
|
7
|
+
import { ScreenHeader } from "../../atoms/ScreenHeader";
|
|
8
|
+
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
9
|
+
|
|
10
|
+
export const VersionItem = ({
|
|
11
|
+
version = "",
|
|
12
|
+
articleStatus,
|
|
13
|
+
currentVersion,
|
|
14
|
+
productOwner = "owner test",
|
|
15
|
+
setVersion,
|
|
16
|
+
}) => {
|
|
17
|
+
return (
|
|
18
|
+
<Container>
|
|
19
|
+
<div className="header">
|
|
20
|
+
<Button
|
|
21
|
+
buttonType={"circular-button" + (currentVersion ? " disabled" : "")}
|
|
22
|
+
image={versionSelected}
|
|
23
|
+
onClick={() => setVersion && setVersion(version)}
|
|
24
|
+
/>
|
|
25
|
+
<img
|
|
26
|
+
src={articleStatus ? acceptIcon : nullIcon}
|
|
27
|
+
alt={articleStatus ? "Validated version" : "Unvalidated version"}
|
|
28
|
+
/>
|
|
29
|
+
</div>
|
|
30
|
+
<div className="version-info">
|
|
31
|
+
<ScreenHeader
|
|
32
|
+
text={"Version " + version}
|
|
33
|
+
headerType={"input-name-header"}
|
|
34
|
+
color={GlobalColors.magenta_s2}
|
|
35
|
+
/>
|
|
36
|
+
<p>
|
|
37
|
+
{currentVersion
|
|
38
|
+
? "Version actual"
|
|
39
|
+
: articleStatus
|
|
40
|
+
? "Edición Content-oh!"
|
|
41
|
+
: "Version de " + productOwner}
|
|
42
|
+
</p>
|
|
43
|
+
<p>{articleStatus ? "Content-oh! Digital" : productOwner}</p>
|
|
44
|
+
</div>
|
|
45
|
+
</Container>
|
|
46
|
+
);
|
|
47
|
+
};
|