branche_01062025
Cherif 2026-07-21 21:29:00 +02:00
parent e9bc234758
commit a27e4e3e91
2 changed files with 537 additions and 915 deletions

File diff suppressed because it is too large Load Diff

View File

@ -123,7 +123,7 @@ function UpdateUserInfo(props) {
axios.post(url, formData).then(res => {
if (String(res.data.status) !== String("false")) {
//console.log(" In test res.data.status = " + res.data.status);
//console.log(" In test res.data.message = " + res.data.message);
console.log(" In getCurrentUserData res.data.message = " + res.data.message);
setmyApiResponse("True");
setResult(res.data.message);
var mylocaltraining = JSON.parse(res.data.message);
@ -144,6 +144,8 @@ function UpdateUserInfo(props) {
if (current_apprenant_data.length > 0) {
console.log(" ### AAAAAAAAAAAA current_apprenant_data = ", current_apprenant_data);
setp_detail_civilite("neutre");
if (current_apprenant_data.civilite) {
setp_detail_civilite(current_apprenant_data.civilite);
@ -269,6 +271,8 @@ function UpdateUserInfo(props) {
else {
console.log(" ### BBBBBBBBBBBBBBBBB mylocaltraining = ", mylocaltraining);
setp_detail_civilite("neutre");
if (mylocaltraining.civilite) {
setp_detail_civilite(mylocaltraining.civilite);
@ -305,23 +309,21 @@ function UpdateUserInfo(props) {
}
setp_detail_naissance("01/01/1900");
if (mylocaltraining.date_naissance) {
setp_detail_naissance(mylocaltraining.date_naissance);
if (mylocaltraining.birthday) {
setp_detail_naissance(mylocaltraining.birthday);
}
setp_detail_tel("");
if (mylocaltraining.telephone) {
setp_detail_tel(mylocaltraining.telephone);
if (mylocaltraining.mob_phone) {
setp_detail_tel(mylocaltraining.mob_phone);
}
setp_detail_adresse("");
if (mylocaltraining.adresse) {
setp_detail_adresse(mylocaltraining.adresse);
if (mylocaltraining.adr_city) {
setp_detail_adresse(mylocaltraining.adr_city);
}
setp_detail_is_rgpd(false);
if (mylocaltraining.is_rgpd && mylocaltraining.is_rgpd === "1") {
setp_detail_is_rgpd(true);
@ -346,18 +348,18 @@ function UpdateUserInfo(props) {
setp_detail_code_postal("");
if (mylocaltraining.code_postal) {
setp_detail_code_postal(mylocaltraining.code_postal);
if (mylocaltraining.adr_zip) {
setp_detail_code_postal(mylocaltraining.adr_zip);
}
setp_detail_ville("");
if (mylocaltraining.ville) {
setp_detail_ville(mylocaltraining.ville);
if (mylocaltraining.adr_city) {
setp_detail_ville(mylocaltraining.adr_city);
}
setp_detail_pays("");
if (mylocaltraining.pays) {
setp_detail_pays(mylocaltraining.pays);
if (mylocaltraining.adr_country) {
setp_detail_pays(mylocaltraining.adr_country);
}
setp_detail_matricule("");
@ -835,6 +837,7 @@ function UpdateUserInfo(props) {
var form = new FormData();
form.append('token', stored_user);
form.append("apprenant_id", props.apprenant_id);
form.append('type_connexion', "tuteur");
@ -894,335 +897,8 @@ function UpdateUserInfo(props) {
{/*** FIN Affichage des messages d'alerte*/}
{/*<>
<div className="titre1"> Données personnelles </div>
&nbsp;
<div style={{ width: '100%', float: 'left', }}>
<div style={{
display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', width: '95%', paddingLeft: '10px',
flexWrap: 'wrap', paddingLeft: '10px', border: 'none',
}}>
<div className="session_caract"> <b> Nom oo</b> <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="last_name"
id="last_name"
InputLabelProps={{
shrink: true,
startAdornment: (
<InputAdornment position="start">
<AccountCircle />
</InputAdornment>
),
}}
disabled={false}
className="disabled_style enable_style"
value={p_detail_nom}
onChange={(e) => {
setp_detail_nom(e.target.value);
setuser_data_changed("1");
}
}
/>
</div>
<div className="session_caract"> <b> Prénom </b> <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="surname"
id="surname"
InputLabelProps={{
shrink: true,
startAdornment: (
<InputAdornment position="start">
<AccountCircle />
</InputAdornment>
),
}}
disabled={false}
value={p_detail_prenom}
onChange={(e) => {
setp_detail_prenom(e.target.value);
setuser_data_changed("1");
}
}
/>
</div>
<div className="session_caract"> <b> Téléphone </b> <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="mob_phone"
id="mob_phone"
InputLabelProps={{
shrink: true,
startAdornment: (
<InputAdornment position="start">
<AccountCircle />
</InputAdornment>
),
}}
disabled={false}
className="disabled_style enable_style"
value={p_detail_tel}
onChange={(e) => {
setp_detail_tel(e.target.value);
setuser_data_changed("1");
}
}
/>
</div>
<div className="session_caract"> <b> Email </b> <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="mail"
id="mail"
InputLabelProps={{
shrink: true,
startAdornment: (
<InputAdornment position="start">
<AccountCircle />
</InputAdornment>
),
}}
disabled={false}
className="disabled_style enable_style"
//value={p_detail_telephone}
onChange={(e) => {
//setp_detail_telephone(e.target.value);
//setapprenant_data_changed("1");
}
}
/>
</div>
<div className="session_caract"> LinkedIn <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="link_linkedin"
id="link_linkedin"
InputLabelProps={{
shrink: true,
startAdornment: (
<InputAdornment position="start">
<LinkedInIcon />
</InputAdornment>
),
}}
disabled={false}
className="disabled_style enable_style"
//value={p_detail_telephone}
onChange={(e) => {
//setp_detail_telephone(e.target.value);
//setapprenant_data_changed("1");
}
}
/>
</div>
<div className="session_caract"> Facebook <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="link_facebook"
id="link_facebook"
InputLabelProps={{
shrink: true,
startAdornment: (
<InputAdornment position="start">
<FacebookIcon />
</InputAdornment>
),
}}
disabled={false}
className="disabled_style enable_style"
//value={p_detail_telephone}
onChange={(e) => {
//setp_detail_telephone(e.target.value);
//setapprenant_data_changed("1");
}
}
/>
</div>
<div className="session_caract"> X (Twitter) <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="link_twitter"
id="link_twitter"
InputLabelProps={{
shrink: true,
startAdornment: (
<InputAdornment position="start">
<FacebookIcon />
</InputAdornment>
),
}}
disabled={false}
className="disabled_style enable_style"
//value={p_detail_telephone}
onChange={(e) => {
//setp_detail_telephone(e.target.value);
//setapprenant_data_changed("1");
}
}
/>
</div>
<div className="session_caract"> Adresse <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="adr_street"
id="adr_street"
InputLabelProps={{
shrink: true,
startAdornment: (
<InputAdornment position="start">
<FacebookIcon />
</InputAdornment>
),
}}
disabled={false}
className="disabled_style enable_style"
//value={p_detail_telephone}
onChange={(e) => {
//setp_detail_telephone(e.target.value);
//setapprenant_data_changed("1");
}
}
/>
</div>
<div className="session_caract"> Code Postal <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="adr_zip"
id="adr_zip"
InputLabelProps={{
shrink: true,
startAdornment: (
<InputAdornment position="start">
<FacebookIcon />
</InputAdornment>
),
}}
disabled={false}
className="disabled_style enable_style"
//value={p_detail_telephone}
onChange={(e) => {
//setp_detail_telephone(e.target.value);
//setapprenant_data_changed("1");
}
}
/>
</div>
<div className="session_caract"> Ville <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="adr_city"
id="adr_city"
InputLabelProps={{
shrink: true,
startAdornment: (
<InputAdornment position="start">
<FacebookIcon />
</InputAdornment>
),
}}
disabled={false}
className="disabled_style enable_style"
//value={p_detail_telephone}
onChange={(e) => {
//setp_detail_telephone(e.target.value);
//setapprenant_data_changed("1");
}
}
/>
</div>
<div className="session_caract"> Pays <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="adr_country"
id="adr_country"
InputLabelProps={{
shrink: true,
startAdornment: (
<InputAdornment position="start">
<FacebookIcon />
</InputAdornment>
),
}}
disabled={false}
className="disabled_style enable_style"
//value={p_detail_telephone}
onChange={(e) => {
//setp_detail_telephone(e.target.value);
//setapprenant_data_changed("1");
}
}
/>
</div>
</div>
</div>
<Box alignItems="left" sx={{ '& > :not(style)': { m: 1 }, width: '100%', }}>
<div className="div_row22">
{fields1desabled == false && <div className="div_row">
<div className="div_row_gauche" style={{ "textAlign": "left" }}>
<Button variant="contained" color="success" className="div_row22 btn_enreg" onClick={RecordData}>Enregistrer</Button>
</div>
<div className="div_row_droite" style={{ "textAlign": "right" }}>
<Button variant="contained" color="success" className="div_row22 btn_modif" onClick={desablefield1}>Annuler</Button>
</div>
</div>
}
{fields1desabled == true && <div className="div_row">
<div className="div_row_droite" style={{ "textAlign": "right" }} >
<Button variant="contained" color="success" className="div_row22 btn_modif" onClick={enablefieds1}>Editer</Button>
</div>
</div>}
</div>
</Box>
</> */}
<div className="div_row" >
<div className="Grid_1_col" >
@ -2026,122 +1702,7 @@ function UpdateUserInfo(props) {
{/*<>
<div style={{ "width": "10%" }}> &nbsp;</div>
<div className="titre1"> Securité </div>
&nbsp;
<Box alignItems="left" sx={{ '& > :not(style)': { m: 1 }, }}>
<div style={{ width: "100%", float: 'left', fontFamily: 'DM Sans' }}>
<div style={{ fontFamily: 'DM Sans' }}> Mot de passe actuel <br />
<FormControl sx={{ m: 1, width: '100%' }} variant="standard" size="small" className="texte_area_passwd">
<InputLabel htmlFor="outlined-adornment-password"></InputLabel>
<OutlinedInput
id="current_pwd"
name="current_pwd"
type={values.showPassword1 ? 'text' : 'password'}
value={values.password1}
onChange={handleChange1('password1')}
endAdornment={
<InputAdornment position="end">
<IconButton
aria-label="toggle password visibility"
onClick={handleClickShowPassword_current_pwd}
edge="end"
>
{currentpawdvisible ? <Visibility /> : <VisibilityOff />}
</IconButton>
</InputAdornment>
}
label=""
/>
</FormControl>
</div>
</div>
<br />
<div style={{ width: "100%", float: 'left', fontFamily: 'DM Sans' }}>
<div style={{ fontFamily: 'DM Sans' }}> Nouveau mot de passe <br />
<FormControl sx={{ m: 1, width: '100%' }} variant="standard" size="small" className="texte_area_passwd">
<InputLabel htmlFor="outlined-adornment-password2"></InputLabel>
<OutlinedInput
id="new_pwd"
name="new_pwd"
type={values.showPassword ? 'text' : 'password'}
value={values.password2}
onChange={handleChange2('password2')}
endAdornment={
<InputAdornment position="end">
<IconButton
aria-label="toggle password visibility"
onClick={handleClickShowPassword_new_pwd}
edge="end"
>
{newpawdvisible ? <Visibility /> : <VisibilityOff />}
</IconButton>
</InputAdornment>
}
label=""
/>
</FormControl>
</div>
</div>
<br />
<div style={{ width: "100%", float: 'left', fontFamily: 'DM Sans' }}>
<div style={{ fontFamily: 'DM Sans' }}> Nouveau mot de passe (2) 001 <br />
<FormControl sx={{ m: 1, width: '100%' }} variant="standard" size="small" className="texte_area_passwd">
<InputLabel htmlFor="outlined-adornment-password"></InputLabel>
<OutlinedInput
id="new_pwd_conf"
name="new_pwd_conf"
type={values.showPassword ? 'text' : 'password'}
value={values.password3}
onChange={handleChange3('password3')}
endAdornment={
<InputAdornment position="end">
<IconButton
aria-label="toggle password visibility"
onClick={handleClickShowPassword_new_pwd_conf}
onMouseDown={handleMouseDownPassword}
edge="end"
>
{confpwdvisible ? <Visibility /> : <VisibilityOff />}
</IconButton>
</InputAdornment>
}
label=""
/>
</FormControl>
</div>
</div>
<div className="div_row22">
{pwdfieldsdesabled == false && <div className="div_row">
<div className="div_row_gauche" style={{ "textAlign": "left" }}>
<Button variant="contained" color="success" className="div_row22 btn_enreg" onClick={UpdateUserPwd}>Enregistrer</Button>
</div>
<div className="div_row_droite" style={{ "textAlign": "right" }} >
<Button variant="contained" color="success" className="div_row22 btn_modif" onClick={desablesecurtypwdfields}>Annuler</Button>
</div>
</div>
}
{pwdfieldsdesabled == true && <div className="div_row">
<div className="div_row_droite" style={{ "textAlign": "right" }} >
<Button variant="contained" color="success" className="div_row22 btn_modif" onClick={enablesecurtypwdfields}>Editer</Button>
</div>
</div>}
</div>
</Box>
</>*/}
<br />
<style>{local_css}</style>