contentoh-components-library 21.0.40 → 21.0.43
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/components/atoms/GeneralInput/index.js +2 -6
- package/dist/components/atoms/Loading/styles.js +1 -1
- package/dist/components/molecules/LoginPasswordStrength/index.js +2 -8
- package/dist/components/molecules/RegistrationFirstStep/index.js +35 -27
- package/dist/components/molecules/RegistrationFirstStep/styles.js +1 -1
- package/dist/components/molecules/RegistrationSecondStep/index.js +42 -110
- package/dist/components/molecules/RegistrationThirdStep/index.js +19 -33
- package/dist/components/molecules/TagAndInput/index.js +2 -6
- package/dist/components/molecules/VerificationCodeResetPasswordLogin/index.js +18 -17
- package/dist/components/molecules/VerificationCodeResetPasswordLogin/utils.js +2 -2
- package/dist/components/organisms/ChangePassword/index.js +13 -3
- package/dist/components/organisms/ChangePassword/styles.js +1 -1
- package/package.json +2 -2
- package/src/components/atoms/GeneralInput/index.js +0 -4
- package/src/components/atoms/Loading/styles.js +2 -2
- package/src/components/molecules/EmailResetPasswordLogin/index.js +0 -1
- package/src/components/molecules/LoginPasswordStrength/index.js +0 -5
- package/src/components/molecules/RegistrationFirstStep/index.js +46 -39
- package/src/components/molecules/RegistrationFirstStep/styles.js +3 -3
- package/src/components/molecules/RegistrationSecondStep/index.js +51 -86
- package/src/components/molecules/RegistrationThirdStep/index.js +14 -1
- package/src/components/molecules/TagAndInput/index.js +0 -4
- package/src/components/molecules/VerificationCodeResetPasswordLogin/index.js +17 -15
- package/src/components/molecules/VerificationCodeResetPasswordLogin/utils.js +2 -4
- package/src/components/organisms/ChangePassword/index.js +16 -3
- package/src/components/organisms/ChangePassword/styles.js +2 -3
|
@@ -7,15 +7,17 @@ import { ScreenHeader } from "../../atoms/ScreenHeader";
|
|
|
7
7
|
import { GlobalColors, FontFamily } from "../../../global-files/variables";
|
|
8
8
|
import { GradientPanel } from "../../atoms/GradientPanel";
|
|
9
9
|
|
|
10
|
-
export const ChangePassword = () => {
|
|
10
|
+
export const ChangePassword = (props) => {
|
|
11
|
+
|
|
11
12
|
const [emptyPassword, setEmptyPassword] = useState(false);
|
|
12
13
|
const [emptyConfirmPassword, setEmptyConfirmPassword] = useState(false);
|
|
13
14
|
const [matchPasswords, setMatchPasswords] = useState(true);
|
|
15
|
+
|
|
14
16
|
const validate = async (e) => {
|
|
15
17
|
e.preventDefault();
|
|
16
|
-
|
|
18
|
+
let password = document.querySelector("#newPasswordInput").value;
|
|
17
19
|
password.length < 8 ? setEmptyPassword(true) : setEmptyPassword(false);
|
|
18
|
-
|
|
20
|
+
let confirmPassword = document.querySelector(
|
|
19
21
|
"#confirmPasswordInput"
|
|
20
22
|
).value;
|
|
21
23
|
confirmPassword === ""
|
|
@@ -26,7 +28,18 @@ export const ChangePassword = () => {
|
|
|
26
28
|
} else {
|
|
27
29
|
setMatchPasswords(false);
|
|
28
30
|
}
|
|
31
|
+
let valid = true;
|
|
32
|
+
emptyPassword && (valid = false);
|
|
33
|
+
emptyConfirmPassword && (valid = false);
|
|
34
|
+
!matchPasswords && (valid = false);
|
|
35
|
+
if (valid) {
|
|
36
|
+
sessionStorage.setItem("newPassword", JSON.stringify(password));
|
|
37
|
+
!sessionStorage.getItem("resetPasswordProcess")
|
|
38
|
+
? props.setPaso(9)
|
|
39
|
+
: props.setPaso(11);
|
|
40
|
+
}
|
|
29
41
|
};
|
|
42
|
+
|
|
30
43
|
const loginRight = [
|
|
31
44
|
<LogoImage key="1" />,
|
|
32
45
|
<div className="credenciales" key={"2"}>
|