contentoh-components-library 21.0.78 → 21.0.79
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/package.json +1 -1
- package/src/components/atoms/GeneralInput/index.js +24 -1
- package/src/components/atoms/GeneralInput/styles.js +25 -0
- package/src/components/atoms/ScreenHeader/styles.js +5 -0
- package/src/components/atoms/VerticalSideMenuMainPage/index.js +0 -1
- package/src/components/molecules/RegistrationSecondStep/index.js +0 -1
- package/src/components/molecules/TagAndInput/index.js +8 -1
- package/src/components/molecules/TagAndInput/styles.js +28 -0
- package/src/components/organisms/InputGroup/index.js +3 -1
- package/src/components/organisms/InputGroup/styles.js +2 -2
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +34 -39
- package/src/global-files/data.js +0 -1
package/package.json
CHANGED
|
@@ -21,6 +21,8 @@ export const GeneralInput = ({
|
|
|
21
21
|
maxChar,
|
|
22
22
|
isRequired,
|
|
23
23
|
version,
|
|
24
|
+
optionList = [],
|
|
25
|
+
description,
|
|
24
26
|
}) => {
|
|
25
27
|
const [textValue, setTextValue] = useState({
|
|
26
28
|
value: inputValue,
|
|
@@ -72,7 +74,27 @@ export const GeneralInput = ({
|
|
|
72
74
|
|
|
73
75
|
return (
|
|
74
76
|
<Container isRequired={requiredEmpty}>
|
|
75
|
-
{
|
|
77
|
+
{optionList?.length > 0 ? (
|
|
78
|
+
<select
|
|
79
|
+
key={`dropdownK${inputId}`}
|
|
80
|
+
id={`dropdown${inputId}`}
|
|
81
|
+
//disabled={!enableInputs}
|
|
82
|
+
onChange={(e) => onHandleChange(e)}
|
|
83
|
+
>
|
|
84
|
+
<option value="" selected disabled>
|
|
85
|
+
{description}
|
|
86
|
+
</option>
|
|
87
|
+
{JSON.parse(optionList || "[]").map((element) => (
|
|
88
|
+
<option
|
|
89
|
+
key={element}
|
|
90
|
+
value={element}
|
|
91
|
+
selected={element === textValue.value ? "selected" : ""}
|
|
92
|
+
>
|
|
93
|
+
{element}
|
|
94
|
+
</option>
|
|
95
|
+
))}
|
|
96
|
+
</select>
|
|
97
|
+
) : inputType === "checkbox" ? (
|
|
76
98
|
<CheckBox
|
|
77
99
|
id={inputId}
|
|
78
100
|
onChange={(e) => onHandleChange(e)}
|
|
@@ -104,6 +126,7 @@ export const GeneralInput = ({
|
|
|
104
126
|
isRequired={isRequired}
|
|
105
127
|
/>
|
|
106
128
|
)}
|
|
129
|
+
<p>{description}</p>
|
|
107
130
|
</Container>
|
|
108
131
|
);
|
|
109
132
|
};
|
|
@@ -32,4 +32,29 @@ export const Container = styled.div`
|
|
|
32
32
|
border: 1px solid ${GlobalColors.magenta_s2};
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
+
|
|
36
|
+
select {
|
|
37
|
+
background: #fafafa;
|
|
38
|
+
outline: none;
|
|
39
|
+
border: 1px solid
|
|
40
|
+
${({ isRequired }) => (isRequired ? "red" : `${GlobalColors.s2}`)};
|
|
41
|
+
width: 100%;
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
font-family: ${FontFamily.AvenirNext};
|
|
44
|
+
color: ${GlobalColors.s4};
|
|
45
|
+
font-size: 12px;
|
|
46
|
+
line-height: 21px;
|
|
47
|
+
padding: 10px;
|
|
48
|
+
border-right: 2px solid #e33aa9;
|
|
49
|
+
|
|
50
|
+
&:focus {
|
|
51
|
+
border: 1px solid ${GlobalColors.magenta_s2};
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
p {
|
|
56
|
+
font-family: ${FontFamily.Raleway};
|
|
57
|
+
font-size: 11px;
|
|
58
|
+
color: ${GlobalColors.s4};
|
|
59
|
+
}
|
|
35
60
|
`;
|
|
@@ -9,6 +9,7 @@ export const Container = styled.h2`
|
|
|
9
9
|
line-height: 42px;
|
|
10
10
|
font-feature-settings: "pnum" on, "lnum" on;
|
|
11
11
|
color: ${(props) => props.color};
|
|
12
|
+
position: relative;
|
|
12
13
|
|
|
13
14
|
&.with-bold-text {
|
|
14
15
|
span {
|
|
@@ -34,8 +35,12 @@ export const Container = styled.h2`
|
|
|
34
35
|
&.input-name-header {
|
|
35
36
|
font-size: 14px;
|
|
36
37
|
line-height: 19px;
|
|
38
|
+
height: 19px;
|
|
39
|
+
max-width: 100%;
|
|
37
40
|
font-weight: 400;
|
|
38
41
|
color: ${({ color }) => (color ? color : GlobalColors.s5)};
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
text-overflow: ellipsis;
|
|
39
44
|
}
|
|
40
45
|
|
|
41
46
|
&.date-header {
|
|
@@ -11,7 +11,6 @@ import React, { useState, useEffect, useCallback } from "react";
|
|
|
11
11
|
export const VerticalSideMenuMainPage = () => {
|
|
12
12
|
const [trueBar, setTrueBar] = useState(false);
|
|
13
13
|
const active = () => {
|
|
14
|
-
console.log(window.location.href);
|
|
15
14
|
//document.getElementById("slidea1").style.border= "1px solid rgb(227, 58, 169)";
|
|
16
15
|
};
|
|
17
16
|
return (
|
|
@@ -21,7 +21,6 @@ export const RegistrationSecondStep = (props) => {
|
|
|
21
21
|
!termsCheck && (valid = false);
|
|
22
22
|
!privacyCheck && (valid = false);
|
|
23
23
|
if (valid) {
|
|
24
|
-
console.log(valid)
|
|
25
24
|
nuevoUsuario.password = password;
|
|
26
25
|
sessionStorage.setItem("nuevoRegistro", JSON.stringify(nuevoUsuario));
|
|
27
26
|
valid && props.setPaso(3);
|
|
@@ -21,6 +21,8 @@ export const TagAndInput = ({
|
|
|
21
21
|
inputRows,
|
|
22
22
|
maxChar,
|
|
23
23
|
required,
|
|
24
|
+
optionList,
|
|
25
|
+
description,
|
|
24
26
|
}) => {
|
|
25
27
|
return (
|
|
26
28
|
<Container
|
|
@@ -28,7 +30,10 @@ export const TagAndInput = ({
|
|
|
28
30
|
className={"input-container"}
|
|
29
31
|
key={`generalTagInput-${inputType}`}
|
|
30
32
|
>
|
|
31
|
-
<
|
|
33
|
+
<div className="title-container">
|
|
34
|
+
<ScreenHeader text={label} headerType={"input-name-header"} />
|
|
35
|
+
<span className="tooltip">{label}</span>
|
|
36
|
+
</div>
|
|
32
37
|
<GeneralInput
|
|
33
38
|
inputId={inputId}
|
|
34
39
|
inputType={inputType}
|
|
@@ -47,6 +52,8 @@ export const TagAndInput = ({
|
|
|
47
52
|
inputRows={inputRows}
|
|
48
53
|
maxChar={maxChar}
|
|
49
54
|
required={required}
|
|
55
|
+
optionList={optionList}
|
|
56
|
+
description={description}
|
|
50
57
|
/>
|
|
51
58
|
</Container>
|
|
52
59
|
);
|
|
@@ -1,9 +1,37 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
|
+
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
2
3
|
|
|
3
4
|
export const Container = styled.div`
|
|
5
|
+
.title-container {
|
|
6
|
+
position: relative;
|
|
7
|
+
|
|
8
|
+
.tooltip {
|
|
9
|
+
display: none;
|
|
10
|
+
position: absolute;
|
|
11
|
+
background-color: ${GlobalColors.white};
|
|
12
|
+
color: ${({ color }) => (color ? color : GlobalColors.s5)};
|
|
13
|
+
font-family: ${FontFamily.Raleway};
|
|
14
|
+
font-size: 14px;
|
|
15
|
+
line-height: 19px;
|
|
16
|
+
left: 0;
|
|
17
|
+
top: 0;
|
|
18
|
+
height: fit-content;
|
|
19
|
+
transition: display 2s;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&:hover {
|
|
23
|
+
.tooltip {
|
|
24
|
+
display: block;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
4
29
|
& > :first-child {
|
|
5
30
|
& + * {
|
|
6
31
|
margin-top: ${({ inputType }) => (inputType !== "textarea" ? 4 : 15)}px;
|
|
7
32
|
}
|
|
8
33
|
}
|
|
34
|
+
& + * {
|
|
35
|
+
margin-top: ${({ inputType }) => (inputType !== "textarea" ? 0 : 10)}px;
|
|
36
|
+
}
|
|
9
37
|
`;
|
|
@@ -14,7 +14,6 @@ export const InputGroup = ({
|
|
|
14
14
|
version,
|
|
15
15
|
dinamicHeight,
|
|
16
16
|
}) => {
|
|
17
|
-
console.log(dataInputs, "dataInputs");
|
|
18
17
|
const inputTypeValue = (type) => {
|
|
19
18
|
switch (type) {
|
|
20
19
|
case "Booleano":
|
|
@@ -68,6 +67,8 @@ export const InputGroup = ({
|
|
|
68
67
|
? dataInputs[input]?.max_chars
|
|
69
68
|
: 999
|
|
70
69
|
}
|
|
70
|
+
optionList={dataInputs[input]?.option_list}
|
|
71
|
+
description={dataInputs[input]?.description}
|
|
71
72
|
/>
|
|
72
73
|
) : (
|
|
73
74
|
<TagAndInput
|
|
@@ -85,6 +86,7 @@ export const InputGroup = ({
|
|
|
85
86
|
articleId={articleId}
|
|
86
87
|
version={version}
|
|
87
88
|
dinamicHeight={dinamicHeight}
|
|
89
|
+
description={input?.description}
|
|
88
90
|
/>
|
|
89
91
|
)
|
|
90
92
|
)}
|
|
@@ -18,14 +18,14 @@ export const Container = styled.div`
|
|
|
18
18
|
.inputs-container {
|
|
19
19
|
display: flex;
|
|
20
20
|
flex-wrap: wrap;
|
|
21
|
+
width: 100%;
|
|
22
|
+
gap: 5px;
|
|
21
23
|
|
|
22
24
|
.input-container {
|
|
23
25
|
flex: 1 1 20%;
|
|
24
|
-
margin-right: 10px;
|
|
25
26
|
min-width: 227px;
|
|
26
27
|
display: flex;
|
|
27
28
|
flex-direction: column;
|
|
28
|
-
justify-content: space-between;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -21,55 +21,50 @@ RetailerProductEditionDefault.args = {
|
|
|
21
21
|
category: 846,
|
|
22
22
|
version: 2,
|
|
23
23
|
productSelected: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
orderId: 152,
|
|
30
|
-
status: "ASSIGNED",
|
|
31
|
-
datasheet_status: "IN_PROGRESS",
|
|
24
|
+
orderId: 132,
|
|
25
|
+
id_category: "612",
|
|
26
|
+
status: "IN_PROGRESS",
|
|
27
|
+
datasheet_status: "QF",
|
|
32
28
|
prio: "none",
|
|
33
|
-
version:
|
|
29
|
+
version: 2,
|
|
34
30
|
description_status: "IN_PROGRESS",
|
|
35
31
|
images_status: "IN_PROGRESS",
|
|
32
|
+
brand: null,
|
|
33
|
+
missing: {
|
|
34
|
+
datasheet: 0,
|
|
35
|
+
descriptions: 0,
|
|
36
|
+
images: 0,
|
|
37
|
+
},
|
|
36
38
|
article: {
|
|
37
|
-
|
|
38
|
-
id_category: "2898",
|
|
39
|
-
name: "Producto prueba dos ",
|
|
40
|
-
upc: "2004202212",
|
|
41
|
-
timestamp: "2022-04-20T17:01:17.000Z",
|
|
42
|
-
id_user: 28,
|
|
43
|
-
status: "NULL",
|
|
44
|
-
active: 1,
|
|
45
|
-
company_id: 1,
|
|
39
|
+
category: "ROPA, ACCESORIOS, FRAGANCIAS Y JOYERÍA|ACCESORIOS|COLLARES",
|
|
46
40
|
company_name: "COMPANY DEV",
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
id_description_facilitator: 52,
|
|
53
|
-
id_images_especialist: 55,
|
|
54
|
-
id_images_facilitator: 53,
|
|
55
|
-
id_auditor: 30,
|
|
56
|
-
id_recepcionist: null,
|
|
57
|
-
category: "HALLOWEN|DECORACIÓN E INFLABLES|DECORACIÓN E INFLABLES",
|
|
58
|
-
missingAttributes: null,
|
|
59
|
-
missingDescriptions: null,
|
|
60
|
-
missingImages: null,
|
|
41
|
+
id_category: "612",
|
|
42
|
+
id_article: 109490,
|
|
43
|
+
name: "Collar con dije letra ",
|
|
44
|
+
timestamp: "2022-05-05T16:45:49.000Z",
|
|
45
|
+
upc: "123434",
|
|
61
46
|
},
|
|
62
47
|
retailers: [
|
|
63
48
|
{
|
|
64
|
-
id:
|
|
65
|
-
name: "
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
49
|
+
id: 2,
|
|
50
|
+
name: "Walmart Mercancías Generales",
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
services: {
|
|
54
|
+
datasheets: 1,
|
|
55
|
+
descriptions: 1,
|
|
56
|
+
images: 1,
|
|
57
|
+
},
|
|
58
|
+
checked: false,
|
|
59
|
+
retailersAvailable: [
|
|
60
|
+
{
|
|
61
|
+
id: 2,
|
|
62
|
+
name: "Walmart Mercancías Generales",
|
|
69
63
|
},
|
|
70
64
|
],
|
|
71
|
-
|
|
72
|
-
|
|
65
|
+
id_article: 109490,
|
|
66
|
+
categoryName: "ROPA, ACCESORIOS, FRAGANCIAS Y JOYERÍA|ACCESORIOS|COLLARES",
|
|
67
|
+
version_status: "IN_PROGRESS",
|
|
73
68
|
},
|
|
74
69
|
location: {
|
|
75
70
|
product: { articleId: 109485, versionId: 3 },
|
package/src/global-files/data.js
CHANGED
|
@@ -183,7 +183,6 @@ export const fetchUsers = async (auth) => {
|
|
|
183
183
|
export const getNewStatus = (statusArray) => {
|
|
184
184
|
let lookupString = "";
|
|
185
185
|
statusArray.forEach((element) => (lookupString += element + "/"));
|
|
186
|
-
console.log(lookupString, "productTemp");
|
|
187
186
|
if (lookupString.includes("RF")) return "RF";
|
|
188
187
|
if (lookupString.includes("RA")) return "RA";
|
|
189
188
|
if (lookupString.includes("RP")) return "RP";
|