contentoh-components-library 21.0.63 → 21.0.64
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 +5 -18
- package/.env.production +3 -16
- package/CHANGELOG.md +33 -31
- package/dist/assets/images/carouselImagesLogin/login2.svg +117 -0
- package/dist/assets/images/carouselImagesLogin/login3.svg +147 -0
- package/dist/assets/images/carouselImagesLogin/loginImage.svg +301 -0
- package/dist/assets/images/sliderToolTip/infoIcon.svg +4 -0
- package/dist/assets/images/sliderToolTip/slide1.svg +5 -0
- package/dist/assets/images/sliderToolTip/slide2.svg +9 -0
- package/dist/assets/images/sliderToolTip/slide3.svg +9 -0
- package/dist/assets/images/sliderToolTip/slide4.svg +9 -0
- package/dist/assets/images/sliderToolTip/slide5.svg +40 -0
- package/dist/components/atoms/AsignationOption/index.js +5 -9
- package/dist/components/atoms/AsignationOption/styles.js +1 -1
- package/dist/components/atoms/CheckBox/index.js +2 -4
- package/dist/components/atoms/GeneralButton/index.js +0 -5
- package/dist/components/atoms/GeneralButton/styles.js +2 -4
- package/dist/components/atoms/GeneralInput/index.js +25 -72
- package/dist/components/atoms/GeneralInput/styles.js +1 -7
- package/dist/components/atoms/GenericModal/index.js +2 -4
- package/dist/components/atoms/GenericModal/styles.js +1 -1
- package/dist/components/atoms/GradientPanel/styles.js +1 -1
- package/dist/components/atoms/ListCommercialRetailers/ListCommercialRetailers.stories.js +36 -0
- package/dist/components/atoms/ListCommercialRetailers/index.js +64 -0
- package/dist/components/atoms/ListCommercialRetailers/styles.js +20 -0
- package/dist/components/atoms/Loading/Loading.stories.js +28 -0
- package/dist/components/atoms/Loading/index.js +1 -0
- package/dist/components/atoms/LogoImage/index.js +1 -0
- package/dist/components/atoms/MenuCommercialRetailers/MenuCommercialRetailers.stories.js +37 -0
- package/dist/components/atoms/MenuCommercialRetailers/index.js +25 -0
- package/dist/components/{molecules/RetailerSelector → atoms/MenuCommercialRetailers}/styles.js +1 -1
- package/dist/components/atoms/MenuProductImage/MenuProductImage.stories.js +28 -0
- package/dist/components/atoms/MenuProductImage/index.js +88 -0
- package/dist/components/atoms/MenuProductImage/styles.js +20 -0
- package/dist/components/atoms/PriorityFlag/index.js +1 -1
- package/dist/components/atoms/ProductImage/styles.js +1 -1
- package/dist/components/atoms/ProgressBar/index.js +2 -2
- package/dist/components/atoms/ProgressBar/styles.js +5 -3
- package/dist/components/atoms/ScreenHeader/index.js +1 -1
- package/dist/components/atoms/ScreenHeader/styles.js +1 -1
- package/dist/components/atoms/SliderToolTip/SliderToolTip.stories.js +47 -0
- package/dist/components/atoms/SliderToolTip/index.js +200 -0
- package/dist/components/atoms/SliderToolTip/styles.js +24 -0
- package/dist/components/atoms/StatusTag/index.js +2 -37
- package/dist/components/atoms/StatusTag/styles.js +1 -1
- package/dist/components/atoms/ValidationPanel/index.js +3 -4
- package/dist/components/atoms/VerticalSideMenuMainPage/VerticalSideMenuMainPage.stories.js +22 -0
- package/dist/components/atoms/VerticalSideMenuMainPage/index.js +49 -0
- package/dist/components/atoms/{Commentary → VerticalSideMenuMainPage}/styles.js +1 -6
- package/dist/components/molecules/ApproveRejetPanel/ApproveRejetPanel.stories.js +25 -0
- package/dist/components/molecules/ApproveRejetPanel/index.js +49 -0
- package/dist/components/{atoms/CharCounter → molecules/ApproveRejetPanel}/styles.js +1 -3
- package/dist/components/molecules/AvatarAndValidation/index.js +7 -17
- package/dist/components/molecules/AvatarAndValidation/styles.js +1 -1
- package/dist/components/molecules/CarouselImagesLogin/index.js +40 -42
- package/dist/components/molecules/EmailResetPasswordLogin/EmailResetPasswordLogin.stories.js +28 -0
- package/dist/components/molecules/EmailResetPasswordLogin/index.js +153 -0
- package/dist/components/molecules/EmailResetPasswordLogin/styles.js +20 -0
- package/dist/components/molecules/FeaturesBar/index.js +1 -1
- package/dist/components/molecules/GalleryElement/index.js +21 -80
- package/dist/components/molecules/GalleryElement/styles.js +1 -1
- package/dist/components/molecules/GalleryHeader/index.js +6 -28
- package/dist/components/molecules/GalleryHeader/styles.js +1 -1
- package/dist/components/molecules/ImageSelector/index.js +4 -2
- package/dist/components/molecules/LoginPasswordStrength/index.js +9 -9
- package/dist/components/molecules/LoginPasswordStrength/styles.js +1 -1
- package/dist/components/{atoms/CharCounter/CharCounter.stories.js → molecules/LogoLoading/Loading.stories.js} +7 -10
- package/dist/components/molecules/LogoLoading/index.js +22 -0
- package/dist/components/molecules/LogoLoading/styles.js +18 -0
- package/dist/components/molecules/ProductNameHeader/index.js +2 -1
- package/dist/components/molecules/RegistrationFirstStep/RegistrationFirstStep.stories.js +28 -0
- package/dist/components/molecules/RegistrationFirstStep/index.js +308 -0
- package/dist/components/molecules/RegistrationFirstStep/styles.js +20 -0
- package/dist/components/molecules/RegistrationSecondStep/RegistrationSecondStep.stories.js +28 -0
- package/dist/components/molecules/RegistrationSecondStep/index.js +173 -0
- package/dist/components/molecules/RegistrationSecondStep/styles.js +20 -0
- package/dist/components/molecules/RegistrationThirdStep/RegistrationThirdStep.stories.js +28 -0
- package/dist/components/molecules/RegistrationThirdStep/index.js +155 -0
- package/dist/components/molecules/RegistrationThirdStep/styles.js +20 -0
- package/dist/components/molecules/SignInLogin/SignInLogin.stories.js +28 -0
- package/dist/components/molecules/SignInLogin/index.js +291 -0
- package/dist/components/molecules/SignInLogin/styles.js +20 -0
- package/dist/components/molecules/SignInLoginCreationApp/SignInLogin.stories.js +28 -0
- package/dist/components/molecules/SignInLoginCreationApp/index.js +270 -0
- package/dist/components/molecules/SignInLoginCreationApp/styles.js +20 -0
- package/dist/components/molecules/StatusAsignationInfo/index.js +25 -46
- package/dist/components/molecules/StatusAsignationInfo/styles.js +1 -1
- package/dist/components/molecules/TableHeader/index.js +5 -12
- package/dist/components/molecules/TableHeader/styles.js +1 -1
- package/dist/components/molecules/TagAndInput/index.js +2 -24
- package/dist/components/molecules/VerificationCodeResetPasswordLogin/VerificationCodeResetPasswordLogin.stories.js +28 -0
- package/dist/components/molecules/VerificationCodeResetPasswordLogin/index.js +211 -0
- package/dist/components/molecules/VerificationCodeResetPasswordLogin/styles.js +20 -0
- package/dist/components/molecules/VerificationCodeResetPasswordLogin/utils.js +69 -0
- package/dist/components/{atoms/InputFormatter/Wysiwyg.stories.js → organisms/ChangePassword/ChangePassword.stories.js} +7 -9
- package/dist/components/organisms/ChangePassword/index.js +124 -0
- package/dist/components/organisms/ChangePassword/styles.js +18 -0
- package/dist/components/organisms/FullProductNameHeader/index.js +8 -32
- package/dist/components/organisms/FullTabsMenu/index.js +5 -18
- package/dist/components/organisms/ImageDataTable/index.js +14 -90
- package/dist/components/organisms/InputGroup/index.js +13 -34
- package/dist/components/organisms/InputGroup/styles.js +1 -1
- package/dist/components/organisms/ProductImageModal/index.js +11 -15
- package/dist/components/organisms/ProductImageModal/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +347 -91
- package/dist/components/pages/RetailerProductEdition/index.js +60 -1608
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/global-files/data.js +53 -212
- package/dist/global-files/global-styles.css +0 -1
- package/dist/global-files/variables.js +0 -1
- package/dist/index.js +277 -30
- package/package.json +14 -12
- package/src/assets/images/sliderToolTip/infoIcon.svg +4 -0
- package/src/assets/images/sliderToolTip/slide1.svg +5 -0
- package/src/assets/images/sliderToolTip/slide2.svg +9 -0
- package/src/assets/images/sliderToolTip/slide3.svg +9 -0
- package/src/assets/images/sliderToolTip/slide4.svg +9 -0
- package/src/assets/images/sliderToolTip/slide5.svg +40 -0
- package/src/components/atoms/AsignationOption/index.js +5 -7
- package/src/components/atoms/AsignationOption/styles.js +1 -9
- package/src/components/atoms/CheckBox/index.js +2 -8
- package/src/components/atoms/GeneralButton/index.js +2 -9
- package/src/components/atoms/GeneralButton/styles.js +0 -23
- package/src/components/atoms/GeneralInput/index.js +23 -71
- package/src/components/atoms/GeneralInput/styles.js +1 -11
- package/src/components/atoms/GenericModal/index.js +2 -2
- package/src/components/atoms/GenericModal/styles.js +2 -10
- package/src/components/atoms/GradientPanel/styles.js +1 -0
- package/src/components/atoms/Loading/Loading.stories.js +10 -0
- package/src/components/atoms/Loading/index.js +3 -2
- package/src/components/atoms/LogoImage/index.js +1 -1
- package/src/components/atoms/PriorityFlag/index.js +1 -1
- package/src/components/atoms/ProductImage/styles.js +1 -1
- package/src/components/atoms/ProgressBar/index.js +2 -2
- package/src/components/atoms/ProgressBar/styles.js +3 -54
- package/src/components/atoms/ScreenHeader/index.js +3 -7
- package/src/components/atoms/ScreenHeader/styles.js +2 -9
- package/src/components/atoms/SliderToolTip/SliderToolTip.stories.js +23 -0
- package/src/components/atoms/SliderToolTip/index.js +182 -0
- package/src/components/atoms/SliderToolTip/styles.js +168 -0
- package/src/components/atoms/StatusTag/index.js +2 -30
- package/src/components/atoms/StatusTag/styles.js +3 -15
- package/src/components/atoms/ValidationPanel/index.js +3 -3
- package/src/components/molecules/AvatarAndValidation/index.js +6 -24
- package/src/components/molecules/AvatarAndValidation/styles.js +1 -1
- package/src/components/molecules/CarouselImagesLogin/index.js +34 -37
- package/src/components/molecules/EmailResetPasswordLogin/EmailResetPasswordLogin.stories.js +11 -0
- package/src/components/molecules/EmailResetPasswordLogin/index.js +85 -0
- package/src/components/molecules/EmailResetPasswordLogin/styles.js +23 -0
- package/src/components/molecules/FeaturesBar/index.js +7 -10
- package/src/components/molecules/GalleryElement/index.js +36 -75
- package/src/components/molecules/GalleryElement/styles.js +11 -38
- package/src/components/molecules/GalleryHeader/index.js +8 -14
- package/src/components/molecules/GalleryHeader/styles.js +0 -16
- package/src/components/molecules/ImageSelector/index.js +3 -2
- package/src/components/molecules/LoginPasswordStrength/index.js +11 -6
- package/src/components/molecules/LoginPasswordStrength/styles.js +5 -1
- package/src/components/molecules/LogoLoading/Loading.stories.js +10 -0
- package/src/components/molecules/LogoLoading/index.js +12 -0
- package/src/components/molecules/LogoLoading/styles.js +16 -0
- package/src/components/molecules/ProductNameHeader/index.js +2 -1
- package/src/components/molecules/RegistrationFirstStep/RegistrationFirstStep.stories.js +11 -0
- package/src/components/molecules/RegistrationFirstStep/index.js +227 -0
- package/src/components/molecules/RegistrationFirstStep/styles.js +87 -0
- package/src/components/molecules/RegistrationSecondStep/RegistrationSecondStep.stories.js +11 -0
- package/src/components/molecules/RegistrationSecondStep/index.js +136 -0
- package/src/components/molecules/RegistrationSecondStep/styles.js +64 -0
- package/src/components/molecules/RegistrationThirdStep/RegistrationThirdStep.stories.js +11 -0
- package/src/components/molecules/RegistrationThirdStep/index.js +130 -0
- package/src/components/molecules/RegistrationThirdStep/styles.js +44 -0
- package/src/components/molecules/SignInLogin/SignInLogin.stories.js +11 -0
- package/src/components/molecules/SignInLogin/index.js +201 -0
- package/src/components/molecules/SignInLogin/styles.js +79 -0
- package/src/components/molecules/StatusAsignationInfo/index.js +38 -62
- package/src/components/molecules/StatusAsignationInfo/styles.js +2 -12
- package/src/components/molecules/TableHeader/index.js +3 -16
- package/src/components/molecules/TableHeader/styles.js +0 -5
- package/src/components/molecules/TagAndInput/index.js +2 -24
- package/src/components/molecules/VerificationCodeResetPasswordLogin/VerificationCodeResetPasswordLogin.stories.js +11 -0
- package/src/components/molecules/VerificationCodeResetPasswordLogin/index.js +171 -0
- package/src/components/molecules/VerificationCodeResetPasswordLogin/styles.js +54 -0
- package/src/components/molecules/VerificationCodeResetPasswordLogin/utils.js +54 -0
- package/src/components/organisms/ChangePassword/ChangePassword.stories.js +11 -0
- package/src/components/organisms/ChangePassword/index.js +77 -0
- package/src/components/organisms/ChangePassword/styles.js +13 -0
- package/src/components/organisms/FullProductNameHeader/index.js +7 -28
- package/src/components/organisms/FullTabsMenu/index.js +3 -15
- package/src/components/organisms/ImageDataTable/index.js +11 -89
- package/src/components/organisms/InputGroup/index.js +11 -46
- package/src/components/organisms/InputGroup/styles.js +0 -3
- package/src/components/organisms/ProductImageModal/index.js +12 -20
- package/src/components/organisms/ProductImageModal/styles.js +0 -3
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +343 -91
- package/src/components/pages/RetailerProductEdition/index.js +48 -1238
- package/src/components/pages/RetailerProductEdition/styles.js +4 -67
- package/src/global-files/data.js +57 -156
- package/src/global-files/global-styles.css +0 -1
- package/src/global-files/variables.js +0 -1
- package/src/index.js +20 -1
- package/dist/assets/images/generalButton/downloadIcon.svg +0 -3
- package/dist/assets/images/modalsSVGs/attributesSent.svg +0 -208
- package/dist/assets/images/modalsSVGs/descriptionSent.svg +0 -237
- package/dist/assets/images/modalsSVGs/providerSent.svg +0 -445
- package/dist/assets/images/modalsSVGs/uploadingImages.svg +0 -148
- package/dist/components/atoms/CharCounter/index.js +0 -22
- package/dist/components/atoms/Commentary/Commentary.stories.js +0 -1
- package/dist/components/atoms/Commentary/index.js +0 -23
- package/dist/components/atoms/Input/index.js +0 -26
- package/dist/components/atoms/Input/style.js +0 -26
- package/dist/components/atoms/InputFormatter/index.js +0 -184
- package/dist/components/atoms/InputFormatter/styles.js +0 -33
- package/dist/components/atoms/LabelToInput/index.js +0 -53
- package/dist/components/atoms/LabelToInput/style.js +0 -22
- package/dist/components/atoms/Percent/Percent.stories.js +0 -39
- package/dist/components/atoms/Percent/index.js +0 -39
- package/dist/components/atoms/Percent/styles.js +0 -20
- package/dist/components/atoms/Select/index.js +0 -39
- package/dist/components/atoms/Select/style.js +0 -32
- package/dist/components/molecules/RetailerSelector/RetailerSelector.stories.js +0 -48
- package/dist/components/molecules/RetailerSelector/index.js +0 -74
- package/dist/components/molecules/TextAndGradient/TextAndGradient.stories.js +0 -31
- package/dist/components/molecules/TextAndGradient/index.js +0 -36
- package/dist/components/molecules/TextAndGradient/styles.js +0 -18
- package/src/assets/images/generalButton/downloadIcon.svg +0 -3
- package/src/assets/images/modalsSVGs/attributesSent.svg +0 -208
- package/src/assets/images/modalsSVGs/descriptionSent.svg +0 -237
- package/src/assets/images/modalsSVGs/providerSent.svg +0 -445
- package/src/assets/images/modalsSVGs/uploadingImages.svg +0 -148
- package/src/components/atoms/CharCounter/CharCounter.stories.js +0 -11
- package/src/components/atoms/CharCounter/index.js +0 -13
- package/src/components/atoms/CharCounter/styles.js +0 -10
- package/src/components/atoms/Commentary/Commentary.stories.js +0 -0
- package/src/components/atoms/Commentary/index.js +0 -9
- package/src/components/atoms/Commentary/styles.js +0 -16
- package/src/components/atoms/Input/index.js +0 -15
- package/src/components/atoms/Input/style.js +0 -31
- package/src/components/atoms/InputFormatter/Wysiwyg.stories.js +0 -12
- package/src/components/atoms/InputFormatter/index.js +0 -144
- package/src/components/atoms/InputFormatter/styles.js +0 -40
- package/src/components/atoms/LabelToInput/index.js +0 -26
- package/src/components/atoms/LabelToInput/style.js +0 -41
- package/src/components/atoms/Select/index.js +0 -35
- package/src/components/atoms/Select/style.js +0 -76
- package/src/components/molecules/RetailerSelector/RetailerSelector.stories.js +0 -35
- package/src/components/molecules/RetailerSelector/index.js +0 -63
- package/src/components/molecules/RetailerSelector/styles.js +0 -18
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { Container } from "./styles";
|
|
2
|
+
import { GradientPanel } from "../../atoms/GradientPanel";
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
|
+
import { LogoImage } from "../../atoms/LogoImage";
|
|
5
|
+
import { ScreenHeader } from "../../atoms/ScreenHeader";
|
|
6
|
+
import { GlobalColors, FontFamily } from "../../../global-files/variables";
|
|
7
|
+
import { GeneralInput } from "../../atoms/GeneralInput";
|
|
8
|
+
import { Button } from "../../atoms/GeneralButton";
|
|
9
|
+
import { validateInput, validate } from "./utils";
|
|
10
|
+
|
|
11
|
+
export const VerificationCodeResetPasswordLogin = (props) => {
|
|
12
|
+
const [resend, setResend] = useState(false);
|
|
13
|
+
const [awsError, setAwsError] = useState("");
|
|
14
|
+
const [emptyVerificationCode, setEmptyVerificationCode] = useState(false);
|
|
15
|
+
const [inputCodeVerificationAll, setInputCodeVerificationAll] = useState(
|
|
16
|
+
document.querySelectorAll("[id^='verificationCodeInput']")
|
|
17
|
+
);
|
|
18
|
+
const inputPositions = [1, 2, 3, 4, 5, 6];
|
|
19
|
+
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
props.confirmationError !== "" && setEmptyVerificationCode(false);
|
|
22
|
+
}, [props.confirmationError]);
|
|
23
|
+
|
|
24
|
+
const checkCode = (e, flag) => {
|
|
25
|
+
let valid = true;
|
|
26
|
+
e.preventDefault();
|
|
27
|
+
let code = "";
|
|
28
|
+
if (awsError === "" && !flag) {
|
|
29
|
+
inputPositions.map(
|
|
30
|
+
(position) =>
|
|
31
|
+
(code =
|
|
32
|
+
code +
|
|
33
|
+
document.querySelector(`#verificationCodeInput${position}`).value)
|
|
34
|
+
);
|
|
35
|
+
if (sessionStorage.getItem("resetError")) {
|
|
36
|
+
JSON.parse(sessionStorage.getItem("confirmationCode")) === code &&
|
|
37
|
+
(valid = false);
|
|
38
|
+
}
|
|
39
|
+
sessionStorage.setItem("confirmationCode", JSON.stringify(code));
|
|
40
|
+
valid &&
|
|
41
|
+
!sessionStorage.getItem("resetPasswordProcess") &&
|
|
42
|
+
props.setPaso(6);
|
|
43
|
+
valid &&
|
|
44
|
+
sessionStorage.getItem("resetPasswordProcess") &&
|
|
45
|
+
props.setPaso(8);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const validateResend = async (e) => {
|
|
50
|
+
e.preventDefault();
|
|
51
|
+
const email = JSON.parse(sessionStorage.getItem("email"));
|
|
52
|
+
try {
|
|
53
|
+
await props.Auth.forgotPassword(email);
|
|
54
|
+
sessionStorage.setItem("email", JSON.stringify(email));
|
|
55
|
+
sessionStorage.setItem("resetPasswordProcess", JSON.stringify("true"));
|
|
56
|
+
props.setPaso(5);
|
|
57
|
+
setEmptyVerificationCode(false);
|
|
58
|
+
setResend(true);
|
|
59
|
+
} catch (err) {
|
|
60
|
+
setAwsError(err.code);
|
|
61
|
+
console.log(err.message);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
setInputCodeVerificationAll(
|
|
67
|
+
document.querySelectorAll("[id^='verificationCodeInput']")
|
|
68
|
+
);
|
|
69
|
+
}, []);
|
|
70
|
+
|
|
71
|
+
const loginRight = [
|
|
72
|
+
<LogoImage key="1" />,
|
|
73
|
+
<div className="credenciales" key={"2"}>
|
|
74
|
+
<ScreenHeader
|
|
75
|
+
fontFamily={FontFamily.AvenirNext}
|
|
76
|
+
color={GlobalColors.s5}
|
|
77
|
+
text={"Ingresa tus credenciales"}
|
|
78
|
+
/>
|
|
79
|
+
</div>,
|
|
80
|
+
<div className="user" key="3">
|
|
81
|
+
{sessionStorage.getItem("email") && (
|
|
82
|
+
<ScreenHeader
|
|
83
|
+
text={`Ingrese el código de verificación enviado a: ${JSON.parse(
|
|
84
|
+
sessionStorage.getItem("email")
|
|
85
|
+
)}`}
|
|
86
|
+
headerType={"input-name-header"}
|
|
87
|
+
/>
|
|
88
|
+
)}
|
|
89
|
+
{!sessionStorage.getItem("email") && (
|
|
90
|
+
<ScreenHeader
|
|
91
|
+
text={`Ingrese código de verificación enviado a: ${
|
|
92
|
+
JSON.parse(sessionStorage.getItem("nuevoRegistro")).email
|
|
93
|
+
}`}
|
|
94
|
+
headerType={"input-name-header"}
|
|
95
|
+
/>
|
|
96
|
+
)}
|
|
97
|
+
<div className="verification-code">
|
|
98
|
+
{inputPositions.map((position) => (
|
|
99
|
+
<GeneralInput
|
|
100
|
+
inputId={`verificationCodeInput${position}`}
|
|
101
|
+
inputType={"text"}
|
|
102
|
+
inputPlaceholder={"X"}
|
|
103
|
+
validateInput={validateInput}
|
|
104
|
+
inputsArray={inputCodeVerificationAll}
|
|
105
|
+
position={position}
|
|
106
|
+
maxLength="1"
|
|
107
|
+
/>
|
|
108
|
+
))}
|
|
109
|
+
</div>
|
|
110
|
+
{emptyVerificationCode && (
|
|
111
|
+
<label>Ingrese su código de verificación</label>
|
|
112
|
+
)}
|
|
113
|
+
{sessionStorage.getItem("resetError") && (
|
|
114
|
+
<label>Código de verifiación incorrecto</label>
|
|
115
|
+
)}
|
|
116
|
+
{props.confirmationError === "LimitExceededException" &&
|
|
117
|
+
!emptyVerificationCode && (
|
|
118
|
+
<label>Haz realizado demasiados intentos, intentalo más tarde</label>
|
|
119
|
+
)}
|
|
120
|
+
{props.confirmationError === "CodeMismatchException" &&
|
|
121
|
+
!emptyVerificationCode && (
|
|
122
|
+
<label>Código de verificación incorrecto</label>
|
|
123
|
+
)}
|
|
124
|
+
{props.confirmationError === "ExpiredCodeException" &&
|
|
125
|
+
!emptyVerificationCode && (
|
|
126
|
+
<label>El código ingresado está expirado</label>
|
|
127
|
+
)}
|
|
128
|
+
{props.confirmationError === "InternalErrorException" &&
|
|
129
|
+
!emptyVerificationCode && (
|
|
130
|
+
<label>Algo salió mal, porfavor vuelva a intentarlo</label>
|
|
131
|
+
)}
|
|
132
|
+
{awsError === "LimitExceededException" && (
|
|
133
|
+
<label>Haz realizado demasiados intentos, intentalo más tarde</label>
|
|
134
|
+
)}
|
|
135
|
+
{awsError === "InternalErrorException" && (
|
|
136
|
+
<label>Algo salió mal, porfavor vuelva a intentarlo</label>
|
|
137
|
+
)}
|
|
138
|
+
{resend && awsError === "" && (
|
|
139
|
+
<label className="resendTrue">
|
|
140
|
+
Se reenvió el código de verificación correctamente
|
|
141
|
+
</label>
|
|
142
|
+
)}
|
|
143
|
+
</div>,
|
|
144
|
+
<div className="resend-code" key="4">
|
|
145
|
+
<p onClick={(e) => validateResend(e)}>Reenviar código de verificación</p>
|
|
146
|
+
</div>,
|
|
147
|
+
<div className="button-center" key="5">
|
|
148
|
+
<Button
|
|
149
|
+
buttonType={"general-default-button"}
|
|
150
|
+
label={"Enviar"}
|
|
151
|
+
onClick={(e) => {
|
|
152
|
+
let flag = validate(inputCodeVerificationAll);
|
|
153
|
+
checkCode(e, flag);
|
|
154
|
+
setEmptyVerificationCode(flag);
|
|
155
|
+
}}
|
|
156
|
+
/>
|
|
157
|
+
</div>,
|
|
158
|
+
<div className="reset-password" key="6">
|
|
159
|
+
<p onClick={() => props.setPaso(10)}>Regresar...</p>
|
|
160
|
+
</div>,
|
|
161
|
+
];
|
|
162
|
+
return (
|
|
163
|
+
<Container>
|
|
164
|
+
<GradientPanel
|
|
165
|
+
componentsArray={loginRight}
|
|
166
|
+
panelType={"home-login"}
|
|
167
|
+
panelColor={GlobalColors.white}
|
|
168
|
+
/>
|
|
169
|
+
</Container>
|
|
170
|
+
);
|
|
171
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
display: flex;
|
|
6
|
+
height: 100vh;
|
|
7
|
+
width: 50%;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
.button-center {
|
|
11
|
+
text-align: center;
|
|
12
|
+
.general-default-button {
|
|
13
|
+
width: 160px;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
.reset-password {
|
|
17
|
+
text-align: center;
|
|
18
|
+
margin: 15px !important;
|
|
19
|
+
color: ${GlobalColors.secondary_magenta};
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
font-weight: bold;
|
|
22
|
+
font-family: ${FontFamily.Raleway};
|
|
23
|
+
font-size: 13px;
|
|
24
|
+
}
|
|
25
|
+
.resend-code {
|
|
26
|
+
margin-top: 8px !important;
|
|
27
|
+
color: ${GlobalColors.magenta_s2};
|
|
28
|
+
font-family: ${FontFamily.AvenirNext};
|
|
29
|
+
font-size: 11px;
|
|
30
|
+
text-decoration: underline rgb(228, 81, 172);
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
& + * {
|
|
33
|
+
margin-top: 30px;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
.verification-code {
|
|
37
|
+
display: flex;
|
|
38
|
+
text-align: center;
|
|
39
|
+
margin: auto;
|
|
40
|
+
margin-top: 10px;
|
|
41
|
+
input[type="number"]::-webkit-inner-spin-button,
|
|
42
|
+
input[type="number"]::-webkit-outer-spin-button {
|
|
43
|
+
-webkit-appearance: none;
|
|
44
|
+
margin: 0;
|
|
45
|
+
}
|
|
46
|
+
input {
|
|
47
|
+
width: 70%;
|
|
48
|
+
text-align: center;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
.resendTrue{
|
|
52
|
+
color: ${GlobalColors.exported};
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {event} e event received triggered by verification code input
|
|
4
|
+
* @param {number} index index position from the verification code(VC) input array (i.e. digit 1,2,3 etc...)
|
|
5
|
+
* @param {array<html nodes>} inputsArray array which contains every VC digit input (used to change focus on input change)
|
|
6
|
+
*/
|
|
7
|
+
export const validateInput = (e, index, inputsArray) => {
|
|
8
|
+
let isValid = false;
|
|
9
|
+
const inputNotEmpty = e.target.value.length > 0;
|
|
10
|
+
if (inputNotEmpty) {
|
|
11
|
+
if (validateInputNumber(e) !== null) {
|
|
12
|
+
isValid = true;
|
|
13
|
+
nextInputFocus(inputsArray, index++);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return isValid ? e.target.value : "";
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @param {event} e event received triggered by verification code input
|
|
22
|
+
* @returns {boolean} if digit is a number
|
|
23
|
+
*/
|
|
24
|
+
const validateInputNumber = (e) => {
|
|
25
|
+
return (e.target.value || String.fromCharCode(e.keyCode)).match(/[0-9]{1}/);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @param {array<html nodes>} inputsArray array which contains every VC digit input (used to change focus on input change)
|
|
31
|
+
* @param {number} index index position from the verification code(VC) input array (i.e. digit 1,2,3 etc...)
|
|
32
|
+
* changes focus to next input if digit typed is a number and there wasn't any before
|
|
33
|
+
*/
|
|
34
|
+
const nextInputFocus = (inputsArray, index) => {
|
|
35
|
+
const button = document.getElementsByClassName("general-default-button");
|
|
36
|
+
|
|
37
|
+
inputsArray?.length && index === inputsArray?.length
|
|
38
|
+
? button[0].focus()
|
|
39
|
+
: inputsArray[index]?.focus();
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @param {array<html nodes>} inputsArray array which contains every VC digit input (used to check if there's any empty)
|
|
45
|
+
* @param {function} setEmptyVerificationCode function to update flag which handles if there's an empty char
|
|
46
|
+
* updates emptyVerificationFlag from father component
|
|
47
|
+
*/
|
|
48
|
+
export const validate = (inputsArray) => {
|
|
49
|
+
let contInputEmpty = 0;
|
|
50
|
+
inputsArray.forEach((element) => {
|
|
51
|
+
element.value === "" ? 0 : contInputEmpty++;
|
|
52
|
+
});
|
|
53
|
+
return contInputEmpty !== inputsArray.length
|
|
54
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChangePassword } from "./index";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/organisms/ChangePassword",
|
|
5
|
+
component: ChangePassword,
|
|
6
|
+
};
|
|
7
|
+
const Template = (args) => <ChangePassword {...args} />;
|
|
8
|
+
|
|
9
|
+
export const ChangePasswordDefault = Template.bind({});
|
|
10
|
+
|
|
11
|
+
ChangePasswordDefault.args = {};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Container } from "./styles";
|
|
2
|
+
import { LoginPasswordStrength } from "../../molecules/LoginPasswordStrength";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { Button } from "../../atoms/GeneralButton";
|
|
5
|
+
import { LogoImage } from "../../atoms/LogoImage";
|
|
6
|
+
import { ScreenHeader } from "../../atoms/ScreenHeader";
|
|
7
|
+
import { GlobalColors, FontFamily } from "../../../global-files/variables";
|
|
8
|
+
import { GradientPanel } from "../../atoms/GradientPanel";
|
|
9
|
+
|
|
10
|
+
export const ChangePassword = (props) => {
|
|
11
|
+
const [emptyPassword, setEmptyPassword] = useState(false);
|
|
12
|
+
const [emptyConfirmPassword, setEmptyConfirmPassword] = useState(false);
|
|
13
|
+
const [matchPasswords, setMatchPasswords] = useState(true);
|
|
14
|
+
|
|
15
|
+
const validate = async (e) => {
|
|
16
|
+
e.preventDefault();
|
|
17
|
+
let password = document.querySelector("#newPasswordInput").value;
|
|
18
|
+
password.length < 8 ? setEmptyPassword(true) : setEmptyPassword(false);
|
|
19
|
+
let confirmPassword = document.querySelector("#confirmPasswordInput").value;
|
|
20
|
+
confirmPassword === ""
|
|
21
|
+
? setEmptyConfirmPassword(true)
|
|
22
|
+
: setEmptyConfirmPassword(false);
|
|
23
|
+
if (password === confirmPassword) {
|
|
24
|
+
setMatchPasswords(true);
|
|
25
|
+
} else {
|
|
26
|
+
setMatchPasswords(false);
|
|
27
|
+
}
|
|
28
|
+
let valid = true;
|
|
29
|
+
if (
|
|
30
|
+
password.length < 8 ||
|
|
31
|
+
confirmPassword === "" ||
|
|
32
|
+
password !== confirmPassword
|
|
33
|
+
) {
|
|
34
|
+
valid = false;
|
|
35
|
+
}
|
|
36
|
+
if (valid) {
|
|
37
|
+
sessionStorage.setItem("newPassword", JSON.stringify(password));
|
|
38
|
+
!sessionStorage.getItem("resetPasswordProcess")
|
|
39
|
+
? props.setPaso(9)
|
|
40
|
+
: props.setPaso(11);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const loginRight = [
|
|
45
|
+
<LogoImage key="1" />,
|
|
46
|
+
<div className="credenciales" key={"2"}>
|
|
47
|
+
<ScreenHeader
|
|
48
|
+
fontFamily={FontFamily.AvenirNext}
|
|
49
|
+
color={GlobalColors.s5}
|
|
50
|
+
text={"Ingresa tus credenciales"}
|
|
51
|
+
/>
|
|
52
|
+
</div>,
|
|
53
|
+
<LoginPasswordStrength
|
|
54
|
+
emptyPassword={emptyPassword}
|
|
55
|
+
emptyConfirmPassword={emptyConfirmPassword}
|
|
56
|
+
matchPasswords={matchPasswords}
|
|
57
|
+
textTittle={"Ingresa tus credenciales"}
|
|
58
|
+
key="3"
|
|
59
|
+
/>,
|
|
60
|
+
<div className="button-center" key="4">
|
|
61
|
+
<Button
|
|
62
|
+
buttonType={"general-default-button"}
|
|
63
|
+
label={"Enviar"}
|
|
64
|
+
onClick={(e) => validate(e)}
|
|
65
|
+
/>
|
|
66
|
+
</div>,
|
|
67
|
+
];
|
|
68
|
+
return (
|
|
69
|
+
<Container>
|
|
70
|
+
<GradientPanel
|
|
71
|
+
panelColor={GlobalColors.white}
|
|
72
|
+
componentsArray={loginRight}
|
|
73
|
+
panelType={"home-login"}
|
|
74
|
+
></GradientPanel>
|
|
75
|
+
</Container>
|
|
76
|
+
);
|
|
77
|
+
};
|
|
@@ -3,43 +3,22 @@ import { ProductNameHeader } from "../../molecules/ProductNameHeader";
|
|
|
3
3
|
import { FeaturesBar } from "../../molecules/FeaturesBar";
|
|
4
4
|
import { AvatarAndValidation } from "../../molecules/AvatarAndValidation";
|
|
5
5
|
|
|
6
|
-
export const FullProductNameHeader = ({
|
|
7
|
-
headerData,
|
|
8
|
-
percent,
|
|
9
|
-
activeRetailer,
|
|
10
|
-
setActiveRetailer,
|
|
11
|
-
approveRejectButtons,
|
|
12
|
-
sendToFacilitator,
|
|
13
|
-
auditorAssigned,
|
|
14
|
-
userAssigned,
|
|
15
|
-
}) => {
|
|
6
|
+
export const FullProductNameHeader = ({ headerData }) => {
|
|
16
7
|
return (
|
|
17
8
|
<Container>
|
|
18
9
|
<ProductNameHeader
|
|
19
|
-
productName={headerData?.
|
|
10
|
+
productName={headerData?.name}
|
|
20
11
|
statusType={headerData?.status}
|
|
21
|
-
percent={percent
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
percent={headerData?.percent}
|
|
13
|
+
backgroundColor={headerData?.backgroundColor}
|
|
14
|
+
priority={headerData?.priority}
|
|
15
|
+
date={headerData?.date}
|
|
24
16
|
/>
|
|
25
17
|
<div className="features-bar-container">
|
|
26
|
-
<FeaturesBar
|
|
27
|
-
features={[
|
|
28
|
-
{ feature: "Categoría", value: headerData?.article?.category },
|
|
29
|
-
{ feature: "Prov", value: headerData?.article?.company_name },
|
|
30
|
-
{ feature: "UPC", value: headerData?.article?.upc },
|
|
31
|
-
]}
|
|
32
|
-
/>
|
|
18
|
+
<FeaturesBar features={headerData?.features} />
|
|
33
19
|
<AvatarAndValidation
|
|
34
|
-
retailers={headerData?.retailers}
|
|
35
20
|
avatarData={headerData?.avatarData}
|
|
36
21
|
validation={headerData?.validation}
|
|
37
|
-
activeRetailer={activeRetailer}
|
|
38
|
-
setActiveRetailer={setActiveRetailer}
|
|
39
|
-
approveRejectButtons={approveRejectButtons}
|
|
40
|
-
sendToFacilitator={sendToFacilitator}
|
|
41
|
-
auditorAssigned={auditorAssigned}
|
|
42
|
-
userAssigned={userAssigned}
|
|
43
22
|
/>
|
|
44
23
|
</div>
|
|
45
24
|
</Container>
|
|
@@ -5,16 +5,10 @@ import { useState } from "react";
|
|
|
5
5
|
|
|
6
6
|
export const FullTabsMenu = ({
|
|
7
7
|
tabsSections,
|
|
8
|
-
status
|
|
9
|
-
|
|
8
|
+
status,
|
|
9
|
+
profileImage,
|
|
10
10
|
setActiveTab,
|
|
11
11
|
setImageLayout,
|
|
12
|
-
assig,
|
|
13
|
-
setAssignation,
|
|
14
|
-
isRetailer,
|
|
15
|
-
downloadImages,
|
|
16
|
-
askToDeleteImages,
|
|
17
|
-
onClickSave,
|
|
18
12
|
}) => {
|
|
19
13
|
const [imagesSection, setImagesSection] = useState(false);
|
|
20
14
|
|
|
@@ -27,15 +21,9 @@ export const FullTabsMenu = ({
|
|
|
27
21
|
/>
|
|
28
22
|
<StatusAsignationInfo
|
|
29
23
|
status={status}
|
|
30
|
-
|
|
24
|
+
image={profileImage}
|
|
31
25
|
setImageLayout={setImageLayout}
|
|
32
26
|
imagesSection={imagesSection}
|
|
33
|
-
assignationsImages={assig}
|
|
34
|
-
setAssignation={setAssignation}
|
|
35
|
-
isRetailer={isRetailer}
|
|
36
|
-
downloadImages={downloadImages}
|
|
37
|
-
onClickSave={onClickSave}
|
|
38
|
-
askToDeleteImages={askToDeleteImages}
|
|
39
27
|
/>
|
|
40
28
|
</Container>
|
|
41
29
|
);
|
|
@@ -1,102 +1,24 @@
|
|
|
1
1
|
import { Container } from "./styles";
|
|
2
2
|
import { TableHeader } from "../../molecules/TableHeader";
|
|
3
|
-
import {
|
|
4
|
-
import { ScreenHeader } from "../../atoms/ScreenHeader";
|
|
5
|
-
import LabelToInput from "../../atoms/LabelToInput";
|
|
3
|
+
import { TableRow } from "../../molecules/TableRow";
|
|
6
4
|
|
|
7
5
|
export const ImageDataTable = ({
|
|
6
|
+
headerInfo,
|
|
7
|
+
imageData,
|
|
8
8
|
activeImage,
|
|
9
9
|
darkMode,
|
|
10
|
-
lists,
|
|
11
|
-
retailerSelected,
|
|
12
|
-
setImages,
|
|
13
|
-
assignationsImages,
|
|
14
|
-
imagesStatus,
|
|
15
|
-
setAssignation,
|
|
16
|
-
isRetailer,
|
|
17
|
-
onClickSave,
|
|
18
10
|
}) => {
|
|
19
11
|
return (
|
|
20
12
|
<Container darkMode={darkMode}>
|
|
21
|
-
<TableHeader
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/>
|
|
29
|
-
<Row>
|
|
30
|
-
<ScreenHeader headerType={"table-row-text"} text="Tipo de toma" />
|
|
31
|
-
<ScreenHeader
|
|
32
|
-
headerType={"table-row-text gray-table-row"}
|
|
33
|
-
text={
|
|
34
|
-
lists?.inputs?.find((f) => f.id === +activeImage?.image_id)?.name ||
|
|
35
|
-
"-"
|
|
36
|
-
}
|
|
13
|
+
<TableHeader headerInfo={headerInfo} activeImage={activeImage} />
|
|
14
|
+
{imageData?.map((attribute, index) => (
|
|
15
|
+
<TableRow
|
|
16
|
+
key={index}
|
|
17
|
+
feature={attribute.feature}
|
|
18
|
+
value={attribute.value}
|
|
19
|
+
valueType={index < 2}
|
|
37
20
|
/>
|
|
38
|
-
|
|
39
|
-
<Row>
|
|
40
|
-
<ScreenHeader headerType={"table-row-text"} text="Tipo de empaque" />
|
|
41
|
-
<ScreenHeader
|
|
42
|
-
headerType={"table-row-text gray-table-row"}
|
|
43
|
-
text={
|
|
44
|
-
lists?.imagePackagingType?.find(
|
|
45
|
-
(f) => f.id === +activeImage?.packing_type
|
|
46
|
-
)?.name || "-"
|
|
47
|
-
}
|
|
48
|
-
/>
|
|
49
|
-
</Row>
|
|
50
|
-
<Row>
|
|
51
|
-
<ScreenHeader headerType={"table-row-text"} text="Tipo de imagen" />
|
|
52
|
-
<ScreenHeader
|
|
53
|
-
headerType={"table-row-text gray-table-row"}
|
|
54
|
-
text={
|
|
55
|
-
lists?.imageType?.find((f) => f.id === +activeImage?.image_type)
|
|
56
|
-
?.name || "-"
|
|
57
|
-
}
|
|
58
|
-
/>
|
|
59
|
-
</Row>
|
|
60
|
-
<Row>
|
|
61
|
-
<ScreenHeader headerType={"table-row-text"} text="Formato" />
|
|
62
|
-
<ScreenHeader
|
|
63
|
-
headerType={"table-row-text"}
|
|
64
|
-
text={activeImage?.ext || "-"}
|
|
65
|
-
/>
|
|
66
|
-
</Row>
|
|
67
|
-
<Row>
|
|
68
|
-
<ScreenHeader headerType={"table-row-text"} text="Tamaño de imagen" />
|
|
69
|
-
<ScreenHeader
|
|
70
|
-
headerType={"table-row-text"}
|
|
71
|
-
text={
|
|
72
|
-
activeImage?.width && activeImage.height
|
|
73
|
-
? `${activeImage?.width}x${activeImage?.height}px`
|
|
74
|
-
: "-"
|
|
75
|
-
}
|
|
76
|
-
/>
|
|
77
|
-
</Row>
|
|
78
|
-
{retailerSelected &&
|
|
79
|
-
lists?.attrForImgs &&
|
|
80
|
-
lists?.attrForImgs[retailerSelected]?.map((attr, index) => (
|
|
81
|
-
<Row key={"row-" + index}>
|
|
82
|
-
<ScreenHeader
|
|
83
|
-
headerType={"table-row-text"}
|
|
84
|
-
text={attr?.name || "-"}
|
|
85
|
-
/>
|
|
86
|
-
<LabelToInput
|
|
87
|
-
width="100px"
|
|
88
|
-
defaultValue={attr?.value}
|
|
89
|
-
onChange={(e) => {
|
|
90
|
-
setImages({
|
|
91
|
-
action: "changeAttrValue",
|
|
92
|
-
retailer: retailerSelected,
|
|
93
|
-
index,
|
|
94
|
-
value: e.target.value || "-",
|
|
95
|
-
});
|
|
96
|
-
}}
|
|
97
|
-
/>
|
|
98
|
-
</Row>
|
|
99
|
-
))}
|
|
21
|
+
))}
|
|
100
22
|
</Container>
|
|
101
23
|
);
|
|
102
24
|
};
|
|
@@ -6,13 +6,6 @@ export const InputGroup = ({
|
|
|
6
6
|
inputGroup = {},
|
|
7
7
|
activeSection,
|
|
8
8
|
dataInputs = {},
|
|
9
|
-
updatedDescriptions,
|
|
10
|
-
setUpdatedDescriptions,
|
|
11
|
-
updatedDatasheets,
|
|
12
|
-
setUpdatedDatasheets,
|
|
13
|
-
articleId,
|
|
14
|
-
version,
|
|
15
|
-
dinamicHeight,
|
|
16
9
|
}) => {
|
|
17
10
|
const inputTypeValue = (type) => {
|
|
18
11
|
switch (type) {
|
|
@@ -24,6 +17,7 @@ export const InputGroup = ({
|
|
|
24
17
|
return "text";
|
|
25
18
|
}
|
|
26
19
|
};
|
|
20
|
+
|
|
27
21
|
return (
|
|
28
22
|
<Container
|
|
29
23
|
className={
|
|
@@ -32,58 +26,29 @@ export const InputGroup = ({
|
|
|
32
26
|
: "descriptions-layout"
|
|
33
27
|
}
|
|
34
28
|
>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
/>
|
|
40
|
-
)}
|
|
29
|
+
<ScreenHeader
|
|
30
|
+
headerType={"retailer-name-header"}
|
|
31
|
+
text={inputGroup?.dataGroup}
|
|
32
|
+
/>
|
|
41
33
|
<div className="inputs-container">
|
|
42
34
|
{inputGroup?.inputs?.map((input, index) =>
|
|
43
35
|
activeSection === "Ficha técnica" ? (
|
|
44
36
|
<TagAndInput
|
|
45
|
-
key={
|
|
46
|
-
|
|
47
|
-
"-" +
|
|
48
|
-
dataInputs[input]?.value +
|
|
49
|
-
"-" +
|
|
50
|
-
dataInputs[input]?.id
|
|
51
|
-
}
|
|
52
|
-
inputId={dataInputs[input]?.id}
|
|
53
|
-
version={version}
|
|
37
|
+
key={index}
|
|
38
|
+
inputId={"datasheet-" + dataInputs[input]?.id + "-" + index}
|
|
54
39
|
inputType={inputTypeValue(dataInputs[input]?.type)}
|
|
55
|
-
label={
|
|
56
|
-
dataInputs[input]?.name +
|
|
57
|
-
(dataInputs[input]?.required ? "*" : "")
|
|
58
|
-
}
|
|
40
|
+
label={dataInputs[input]?.name}
|
|
59
41
|
value={dataInputs[input]?.value}
|
|
60
42
|
inputPlaceHolder={input?.placeholder}
|
|
61
|
-
articleId={articleId}
|
|
62
|
-
isRequired={dataInputs[input]?.required}
|
|
63
|
-
updatedDatasheets={updatedDatasheets}
|
|
64
|
-
setUpdatedDatasheets={setUpdatedDatasheets}
|
|
65
|
-
maxChar={
|
|
66
|
-
dataInputs[input]?.max_chars
|
|
67
|
-
? dataInputs[input]?.max_chars
|
|
68
|
-
: 999
|
|
69
|
-
}
|
|
70
43
|
/>
|
|
71
44
|
) : (
|
|
72
45
|
<TagAndInput
|
|
73
|
-
key={index
|
|
74
|
-
inputId={input
|
|
75
|
-
index={index}
|
|
46
|
+
key={index}
|
|
47
|
+
inputId={"description-" + input?.id + "-" + index}
|
|
76
48
|
inputType={"textarea"}
|
|
77
|
-
label={input?.name
|
|
49
|
+
label={input?.name}
|
|
78
50
|
value={input?.value}
|
|
79
|
-
isRequired={input.required}
|
|
80
|
-
maxChar={input.max_chars}
|
|
81
51
|
inputPlaceHolder={input?.placeholder}
|
|
82
|
-
updatedDescriptions={updatedDescriptions}
|
|
83
|
-
setUpdatedDescriptions={setUpdatedDescriptions}
|
|
84
|
-
articleId={articleId}
|
|
85
|
-
version={version}
|
|
86
|
-
dinamicHeight={dinamicHeight}
|
|
87
52
|
/>
|
|
88
53
|
)
|
|
89
54
|
)}
|