passwort button melly pics
This commit is contained in:
BIN
docs/IMG_20230218_184419_227.jpg
Executable file
BIN
docs/IMG_20230218_184419_227.jpg
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 4.4 MiB |
BIN
docs/IMG_20230218_184426_227.jpg
Executable file
BIN
docs/IMG_20230218_184426_227.jpg
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 4.5 MiB |
BIN
docs/IMG_20230218_184429_386.jpg
Executable file
BIN
docs/IMG_20230218_184429_386.jpg
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 4.3 MiB |
@ -9,8 +9,3 @@
|
||||
{
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
button
|
||||
{
|
||||
max-width: 30%;
|
||||
}
|
||||
@ -30,7 +30,7 @@ form
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.InputForm button, input
|
||||
.InputForm button, input[type=file]
|
||||
{
|
||||
background-color: #aa0404;
|
||||
color: white;
|
||||
@ -42,6 +42,10 @@ form
|
||||
width: auto;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.InputForm .IF_pw button
|
||||
{
|
||||
color: black;
|
||||
}
|
||||
|
||||
.InputForm input
|
||||
{
|
||||
|
||||
@ -84,7 +84,7 @@ const Login = () =>
|
||||
id="email"
|
||||
value={formData.email}
|
||||
required />
|
||||
<PasswordInput
|
||||
<PasswordInput className='IF_pw'
|
||||
sx = {{ maxWidth: '80vw', minWidth: '30vw', width: '300px' }}
|
||||
label = 'Passwort:'
|
||||
name="password"
|
||||
|
||||
@ -10,9 +10,17 @@ import './Profil.css';
|
||||
import { TextInput } from '@mantine/core';
|
||||
import { notificationError, notificationSuccess } from '../services/Notifications';
|
||||
|
||||
type TFormData =
|
||||
{
|
||||
email: string,
|
||||
name: string,
|
||||
phone: string,
|
||||
qr_code: string
|
||||
};
|
||||
|
||||
function Profil()
|
||||
{
|
||||
const [formData, setFormData] = useState({
|
||||
const [formData, setFormData] = useState<TFormData>({
|
||||
email:'',
|
||||
name:'',
|
||||
phone:'',
|
||||
@ -51,7 +59,7 @@ function Profil()
|
||||
});
|
||||
}
|
||||
|
||||
let formData_loc =
|
||||
let formData_loc: TFormData =
|
||||
{
|
||||
email: '',
|
||||
name: '',
|
||||
@ -99,6 +107,21 @@ function Profil()
|
||||
}
|
||||
}
|
||||
|
||||
async function submitData(fd: TFormData)
|
||||
{
|
||||
if(!Object.values(fd).every(val => val?.trim() !== ''))
|
||||
{
|
||||
notificationError('Bitte alle Felder ausfüllen!');
|
||||
return;
|
||||
}
|
||||
setFormData(fd);
|
||||
|
||||
const data = await updateDog(fd);
|
||||
mutate();
|
||||
showData(data);
|
||||
|
||||
}
|
||||
|
||||
const submitForm = async (e: React.FormEvent<HTMLFormElement>) =>
|
||||
{
|
||||
e.preventDefault();
|
||||
@ -106,17 +129,14 @@ function Profil()
|
||||
console.log(formData_loc);
|
||||
console.log(formDataSave.current);
|
||||
|
||||
|
||||
if(!Object.values(formData).every(val => val?.trim() !== ''))
|
||||
if( formData.email || formData.name || formData.name || formData.name )
|
||||
{
|
||||
notificationError('Bitte alle Felder ausfüllen!');
|
||||
return;
|
||||
submitData(formData);
|
||||
}
|
||||
else
|
||||
{
|
||||
submitData(formData_loc);
|
||||
}
|
||||
setFormData(formData);
|
||||
|
||||
const data = await updateDog(formData);
|
||||
mutate();
|
||||
showData(data);
|
||||
}
|
||||
|
||||
const qr_refresh = (e: React.MouseEvent<HTMLButtonElement>) =>
|
||||
|
||||
@ -65,7 +65,7 @@ const Register = () =>
|
||||
id="email"
|
||||
value={formData.email}
|
||||
required />
|
||||
<PasswordInput
|
||||
<PasswordInput className='IF_pw'
|
||||
sx = {{ maxWidth: '80vw', minWidth: '30vw', width: '300px' }}
|
||||
label = 'Passwort:'
|
||||
name="password"
|
||||
@ -73,7 +73,7 @@ const Register = () =>
|
||||
placeholder="Passwort"
|
||||
id="password" value={formData.password}
|
||||
required/>
|
||||
<PasswordInput
|
||||
<PasswordInput className='IF_pw'
|
||||
sx = {{ maxWidth: '80vw', minWidth: '30vw', width: '300px' }}
|
||||
label = 'Passwort:'
|
||||
name="password2"
|
||||
|
||||
Reference in New Issue
Block a user