30/09/2023 - 19h
parent
263cb03e6d
commit
43257f4537
|
@ -41,7 +41,8 @@ import { TransitionProps } from '@mui/material/transitions';
|
|||
import { Checkbox } from "@mui/material";
|
||||
import { ElectricScooterRounded } from "@mui/icons-material";
|
||||
import { Container, Row, Col } from 'react-grid-system';
|
||||
|
||||
import Visibility from '@mui/icons-material/Visibility';
|
||||
import VisibilityOff from '@mui/icons-material/VisibilityOff';
|
||||
|
||||
|
||||
const Employes = (props) => {
|
||||
|
@ -2950,6 +2951,22 @@ const Employes = (props) => {
|
|||
setp_conf_new_login(randomstring);
|
||||
}
|
||||
|
||||
const [currentpawdvisible, setcurrentpawdvisible] = useState(false);
|
||||
|
||||
|
||||
const handleClickShowPassword = () => {
|
||||
if (currentpawdvisible == false) {
|
||||
document.getElementsByName("new_pwd")[0].type = "text";
|
||||
document.getElementsByName("conf_new_login")[0].type = "text";
|
||||
setcurrentpawdvisible(true);
|
||||
}
|
||||
else if (currentpawdvisible == true) {
|
||||
document.getElementsByName("new_pwd")[0].type = "password";
|
||||
document.getElementsByName("conf_new_login")[0].type = "password";
|
||||
setcurrentpawdvisible(false);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="employes">
|
||||
<Dialog
|
||||
|
@ -3032,7 +3049,21 @@ const Employes = (props) => {
|
|||
|
||||
|
||||
|
||||
<div className="session_caract_Dialog" > Login
|
||||
{String(p_detail_user_login).length > 2 && <div className="session_caract_Dialog" > Login
|
||||
<TextField
|
||||
autoFocus
|
||||
margin="dense"
|
||||
id="new_login"
|
||||
disabled
|
||||
//label="Prix Unitaire"
|
||||
|
||||
fullWidth
|
||||
//variant="standard"
|
||||
value={p_new_login}
|
||||
|
||||
/>
|
||||
</div>}
|
||||
{String(p_detail_user_login).length < 2 && <div className="session_caract_Dialog" > Login
|
||||
<TextField
|
||||
autoFocus
|
||||
margin="dense"
|
||||
|
@ -3048,12 +3079,15 @@ const Employes = (props) => {
|
|||
}
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
<div className="session_caract_Dialog" > Mot de passe
|
||||
<TextField
|
||||
autoFocus
|
||||
margin="dense"
|
||||
id="new_pwd"
|
||||
name="new_pwd"
|
||||
type = "password"
|
||||
//label="Prix Unitaire"
|
||||
|
||||
fullWidth
|
||||
|
@ -3065,12 +3099,18 @@ const Employes = (props) => {
|
|||
}
|
||||
}
|
||||
/>
|
||||
<nav className="show_pwd_div" onClick={handleClickShowPassword}>
|
||||
{currentpawdvisible ? <Visibility /> : <VisibilityOff />}
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
<div className="session_caract_Dialog" > Confirmer Mot de passe
|
||||
<TextField
|
||||
autoFocus
|
||||
margin="dense"
|
||||
id="conf_new_login"
|
||||
name="conf_new_login"
|
||||
type = "password"
|
||||
//label="Prix Unitaire"
|
||||
|
||||
fullWidth
|
||||
|
@ -3082,15 +3122,10 @@ const Employes = (props) => {
|
|||
}
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="div_row">
|
||||
<div className="div_row_droite">
|
||||
<Button onClick={Generate_Pwd} className="bton_enreg_dialog">Generer un mot de passe</Button>
|
||||
<Button onClick={Generate_Pwd} className="bton_enreg_dialog" style={{"width":"100%", "margin":"0px", "background":"orange"}}>Generer un mot de passe</Button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</DialogContent>
|
||||
|
|
|
@ -2240,6 +2240,14 @@
|
|||
max-width: 30% !important;
|
||||
}
|
||||
|
||||
.show_pwd_div {
|
||||
width: 50%;
|
||||
float: right;
|
||||
padding-right: 10px;
|
||||
text-align: right;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue