- re done login con uuid;

- re done reset password con uuid;
- re done user management con uuid;
This commit is contained in:
Vitalii Kiiko
2024-10-21 11:14:29 +02:00
parent 250a75e375
commit 3dae98a19e
11 changed files with 163 additions and 80 deletions

View File

@@ -17,6 +17,8 @@ import LogoIcon from '../../icons/LogoIcon';
import { Button } from 'primereact/button';
import { Messages } from 'primereact/messages';
const APP_HUB_ID = process.env.REACT_APP_HUB_ID;
const LoginAdmin = () => {
const navigate = useNavigate();
const token = useStore().main.token();
@@ -28,11 +30,16 @@ const LoginAdmin = () => {
formState: { errors },
} = useForm({ mode: 'onChange' });
const gotToResetPassword = () => {
navigate('/reset-password');
}
const onSubmit = (formData) => {
errorMsgs.current.clear();
setLoading(true);
const request = {
...formData,
hubUuid: APP_HUB_ID,
rememberMe: true
}
@@ -64,10 +71,6 @@ const LoginAdmin = () => {
setLoading(false);
}
const gotToResetPassword = () => {
navigate('/reset-password');
}
useEffect(() => {
if (!isEmpty(token)) {
setLoading(true);