1. Change Password fixed. 2. Personal Data implemented. 3. New alerts style. 4. Better dropdowns.

This commit is contained in:
AG
2025-11-19 22:52:32 +02:00
parent bb705c8a63
commit 8cc9ab29b7
14 changed files with 1266 additions and 632 deletions

View File

@@ -36,11 +36,15 @@ const Login: React.FC<LoginProps> = ({ onLogin, language, onLanguageChange }) =>
}
};
const handleChangePassword = () => {
const handleChangePassword = async () => {
if (tempUser && newPassword.length >= 4) {
changePassword(tempUser.id, newPassword);
const updatedUser = { ...tempUser, isFirstLogin: false };
onLogin(updatedUser);
const res = await changePassword(tempUser.id, newPassword);
if (res.success) {
const updatedUser = { ...tempUser, isFirstLogin: false };
onLogin(updatedUser);
} else {
setError(res.error || t('change_pass_error', language));
}
} else {
setError(t('login_password_short', language));
}