24/08/23 - 12h

recette2
cherif 2023-08-24 12:54:01 +02:00
parent d204058101
commit c3ab4c755d
5 changed files with 122 additions and 79 deletions

View File

@ -187,7 +187,7 @@ const Employes = (props) => {
setp_filtre4(); setp_filtre4();
setp_filtre4_value(); setp_filtre4_value();
//Getall_TrainingParticpant_no_filter(); Getall_Training_Employee_No_Filter();
} }
const myRef = useRef(null) const myRef = useRef(null)
@ -210,7 +210,7 @@ const Employes = (props) => {
useEffect(() => { useEffect(() => {
Getall_Training_Employee(); Getall_Training_Employee_No_Filter();
Get_List_Managers(); Get_List_Managers();
Get_List_RH_Profils(); Get_List_RH_Profils();
@ -538,6 +538,42 @@ const Employes = (props) => {
} }
const [Getall_Training_Employee_No_Filter_api, setGetall_Training_Employee_No_Filter_api] = useState();
const [Getall_Training_Employee_No_Filter_message, setGetall_Training_Employee_No_Filter_message] = useState();
const [Getall_Training_Employee_No_Filter_result, setGetall_Training_Employee_No_Filter_result] = useState();
function Getall_Training_Employee_No_Filter(event) {
var form = new FormData();
const stored_cookie = getCookie('tokenmysypart');
form.append("token", stored_cookie);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Ressource_Humaine_with_filter/";
axios.post(myurl, form).then(res => {
if (String(res.data.status) === String("true")) {
//console.log(" In Getall_Training_Employee_No_Filter res.data.status = " + res.data.status);
//console.log(" In Getall_Training_Employee_No_Filter res.data.message r_class = " + res.data.message);
setGetall_Training_Employee_No_Filter_api("true");
setGetall_Training_Employee_No_Filter_result(res.data.message);
setRows(res.data.message);
}
else {
setGetall_Training_Employee_No_Filter_api("false");
setGetall_Training_Employee_No_Filter_message(res.data.message);
}
}).catch((error) => {
console.warn('Not good man :( Getall_Training_Employee_No_Filter = ', error);
setGetall_Training_Employee_No_Filter_api("false");
//setmyApimyApiMessage("")
})
}
const [session_file_name, setsession_file_name] = useState(); const [session_file_name, setsession_file_name] = useState();
const [liste_sessions_file_change_api, setliste_sessions_file_change_api] = useState(); const [liste_sessions_file_change_api, setliste_sessions_file_change_api] = useState();
@ -567,7 +603,7 @@ const Employes = (props) => {
//console.log("token = " + stored_cookie); //console.log("token = " + stored_cookie);
fetch( fetch(
process.env.REACT_APP_API_URL + "myclass/api/AddStagiairetoClass_mass_for_many_session/", process.env.REACT_APP_API_URL + "myclass/api/Add_Ressource_Humaine_mass/",
{ {
method: 'POST', method: 'POST',
body: formData, body: formData,
@ -588,7 +624,7 @@ const Employes = (props) => {
setliste_sessions_file_change_api("true"); setliste_sessions_file_change_api("true");
Getall_Training_Employee(); Getall_Training_Employee();
alert(" Les stagiaires ont été correctement importés"); alert(" Les employés ont été correctement importés");
} }
@ -604,7 +640,7 @@ const Employes = (props) => {
.catch((error) => { .catch((error) => {
console.error('Error:', error); console.error('Error:', error);
setliste_sessions_file_change_api("false"); setliste_sessions_file_change_api("false");
alert(" Impossible d'importer les stagiaires "); alert(" Impossible d'importer les employés ");
}); });
} }
@ -1339,6 +1375,12 @@ const Employes = (props) => {
} }
function submenu_import_employee() {
setsession_file_name();
setliste_sessions_file_change_api();
hiddenFileInput_session.current.click();
}
return ( return (
<div className="employes"> <div className="employes">
<Dialog <Dialog
@ -1379,8 +1421,7 @@ const Employes = (props) => {
> >
<MenuItem value="email" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Email &nbsp;</MenuItem> <MenuItem value="email" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Email &nbsp;</MenuItem>
<MenuItem value="nom" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Nom &nbsp;</MenuItem> <MenuItem value="nom" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Nom &nbsp;</MenuItem>
<MenuItem value="code_session" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Code Session &nbsp;&nbsp;</MenuItem>
<MenuItem value="class_title" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Titre Formation &nbsp;</MenuItem>
</TextField> </TextField>
@ -1459,8 +1500,6 @@ const Employes = (props) => {
> >
<MenuItem value="email" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Email &nbsp;</MenuItem> <MenuItem value="email" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Email &nbsp;</MenuItem>
<MenuItem value="nom" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Nom &nbsp;</MenuItem> <MenuItem value="nom" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Nom &nbsp;</MenuItem>
<MenuItem value="code_session" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Code Session &nbsp;&nbsp;</MenuItem>
<MenuItem value="class_title" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Titre Formation &nbsp;</MenuItem>
</TextField> </TextField>
@ -1521,7 +1560,7 @@ const Employes = (props) => {
</div> </div>
} }
{/*
{p_filtre3 && {p_filtre3 &&
<div className="div_row" style={{ "marginBottom": "5px" }}> <div className="div_row" style={{ "marginBottom": "5px" }}>
@ -1667,15 +1706,16 @@ const Employes = (props) => {
</div> </div>
} }
*/}
<div className="div_row" ref={myRef_head} style={{ "border": "None", "color": "orange", "textAlign": "center" }}> <div className="div_row" ref={myRef_head} style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
<div className="div_row_gauche" style={{ "textAlign": 'left', 'marginLeft': '15px' }}> <div className="div_row_gauche" style={{ "textAlign": 'left', 'marginLeft': '15px' }}>
<Button variant="contained" className="bton_enreg" onClick={"Getall_TrainingParticipant"}>Rechercher <Button variant="contained" className="bton_enreg" onClick={Getall_Training_Employee}>Rechercher
</Button> </Button>
</div> </div>
<div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}> <div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
<Button variant="contained" className="bton_annule" onClick={"clean_all_filters"}>Annuler <Button variant="contained" className="bton_annule" onClick={clean_all_filters}>Annuler
</Button> </Button>
</div> </div>
@ -1829,7 +1869,7 @@ const Employes = (props) => {
<div className="div_row_gauche div_row_gauche_etendu" style={{ "textAlign": "left", "paddingLeft": "5px" }}> <div className="div_row_gauche div_row_gauche_etendu" style={{ "textAlign": "left", "paddingLeft": "5px" }}>
<Button variant="outlined" onClick={"submenu_import_stagiaire"} className="detail_class_submenu bton_import_excel" <Button variant="outlined" onClick={submenu_import_employee} className="detail_class_submenu bton_import_excel"
id='menu_import_participant' name='menu_import_participant'>Importer des employes Excel &nbsp; id='menu_import_participant' name='menu_import_participant'>Importer des employes Excel &nbsp;
<img src={excel_icone} alt="ajout csv" className="icon_excel" /> <img src={excel_icone} alt="ajout csv" className="icon_excel" />
</Button> </Button>
@ -1926,7 +1966,7 @@ const Employes = (props) => {
</div> </div>
<div className="session_data" > <div className="session_data" >
employee_data_changed = {Employee_data_changed} / employee_data_edit_mode = {employee_data_edit_mode} <br />
<div className="session_caract"> Nom<br /> <div className="session_caract"> Nom<br />
<TextField <TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }} sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
@ -2409,7 +2449,7 @@ const Employes = (props) => {
<nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}> Ajouter un Employé </nav> <nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}> Ajouter un Employé </nav>
<div className="session_data" > <div className="session_data" >
employee_data_changed = {Employee_data_changed} / employee_data_edit_mode = {employee_data_edit_mode} <br />
<div className="session_caract"> Nom<br /> <div className="session_caract"> Nom<br />
<TextField <TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }} sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}

View File

@ -163,44 +163,44 @@ function Partner_Invoicing_Data(props) {
if (mylocaltraining.invoice_nom) { if (mylocaltraining.invoice_nom) {
setp_nom (mylocaltraining.invoice_nom); setp_nom(mylocaltraining.invoice_nom);
document.getElementsByName("nom")[0].disabled = true; document.getElementsByName("nom")[0].disabled = true;
document.getElementsByName("nom")[0].style.backgroundColor = "#ECEFF1"; document.getElementsByName("nom")[0].style.backgroundColor = "#ECEFF1";
} }
if (mylocaltraining.invoice_adr_street) { if (mylocaltraining.invoice_adr_street) {
setp_adr_street (mylocaltraining.invoice_adr_street); setp_adr_street(mylocaltraining.invoice_adr_street);
document.getElementsByName("adr_street")[0].disabled = true; document.getElementsByName("adr_street")[0].disabled = true;
document.getElementsByName("adr_street")[0].style.backgroundColor = "#ECEFF1"; document.getElementsByName("adr_street")[0].style.backgroundColor = "#ECEFF1";
} }
if (mylocaltraining.invoice_adr_city) { if (mylocaltraining.invoice_adr_city) {
setp_adr_city (mylocaltraining.invoice_adr_city); setp_adr_city(mylocaltraining.invoice_adr_city);
document.getElementsByName("adr_city")[0].disabled = true; document.getElementsByName("adr_city")[0].disabled = true;
document.getElementsByName("adr_city")[0].style.backgroundColor = "#ECEFF1"; document.getElementsByName("adr_city")[0].style.backgroundColor = "#ECEFF1";
} }
if (mylocaltraining.invoice_adr_zip) { if (mylocaltraining.invoice_adr_zip) {
setp_adr_zip (mylocaltraining.invoice_adr_zip); setp_adr_zip(mylocaltraining.invoice_adr_zip);
document.getElementsByName("adr_zip")[0].disabled = true; document.getElementsByName("adr_zip")[0].disabled = true;
document.getElementsByName("adr_zip")[0].style.backgroundColor = "#ECEFF1"; document.getElementsByName("adr_zip")[0].style.backgroundColor = "#ECEFF1";
} }
if (mylocaltraining.invoice_adr_country) { if (mylocaltraining.invoice_adr_country) {
setp_adr_country (mylocaltraining.invoice_adr_country); setp_adr_country(mylocaltraining.invoice_adr_country);
document.getElementsByName("adr_country")[0].disabled = true; document.getElementsByName("adr_country")[0].disabled = true;
document.getElementsByName("adr_country")[0].style.backgroundColor = "#ECEFF1"; document.getElementsByName("adr_country")[0].style.backgroundColor = "#ECEFF1";
} }
if (mylocaltraining.invoice_email) { if (mylocaltraining.invoice_email) {
setp_email( mylocaltraining.invoice_email); setp_email(mylocaltraining.invoice_email);
document.getElementsByName("email")[0].disabled = true; document.getElementsByName("email")[0].disabled = true;
document.getElementsByName("email")[0].style.backgroundColor = "#ECEFF1"; document.getElementsByName("email")[0].style.backgroundColor = "#ECEFF1";
} }
if (mylocaltraining.invoice_telephone) { if (mylocaltraining.invoice_telephone) {
setp_telephone (mylocaltraining.invoice_telephone); setp_telephone(mylocaltraining.invoice_telephone);
document.getElementsByName("telephone")[0].disabled = true; document.getElementsByName("telephone")[0].disabled = true;
document.getElementsByName("telephone")[0].style.backgroundColor = "#ECEFF1"; document.getElementsByName("telephone")[0].style.backgroundColor = "#ECEFF1";
} }
@ -293,11 +293,11 @@ function Partner_Invoicing_Data(props) {
{String(RecordData_api) === String("false") && <div className="koUpdateData"> Impossible de modifier les informations </div>} {String(RecordData_api) === String("false") && <div className="koUpdateData"> Impossible de modifier les informations </div>}
&nbsp; &nbsp;
<Box alignItems="left" sx={{ '& > :not(style)': { m: 1 }, width: '100%', }}> <Box alignItems="left" sx={{ '& > :not(style)': { m: 1 }, width: '100%', }}>
<TextField <TextField
required required
disabled
label="Raison sociale" label="Raison sociale"
name="nom" name="nom"
className="texte_area" className="texte_area"
@ -316,7 +316,7 @@ function Partner_Invoicing_Data(props) {
<TextField <TextField
disabled
label="num TVA" label="num TVA"
name="vat_num" name="vat_num"
className="texte_area" className="texte_area"
@ -335,7 +335,7 @@ function Partner_Invoicing_Data(props) {
<TextField <TextField
disabled
name="telephone" name="telephone"
label="Téléphone" label="Téléphone"
className="texte_area" className="texte_area"
@ -355,7 +355,7 @@ function Partner_Invoicing_Data(props) {
<TextField <TextField
name="email" name="email"
disabled
label="Adresse mail" label="Adresse mail"
className="texte_area" className="texte_area"
sx={{ m: 1, width: '48%' }} sx={{ m: 1, width: '48%' }}
@ -374,7 +374,7 @@ function Partner_Invoicing_Data(props) {
<TextField <TextField
name="adr_street" name="adr_street"
disabled
label="Adresse" label="Adresse"
className="texte_area_adress" className="texte_area_adress"
sx={{ m: 1, width: '96%' }} sx={{ m: 1, width: '96%' }}
@ -392,7 +392,7 @@ function Partner_Invoicing_Data(props) {
<TextField <TextField
name="adr_zip" name="adr_zip"
disabled
label="Code Postal" label="Code Postal"
className="texte_area" className="texte_area"
sx={{ m: 1, width: '48%' }} sx={{ m: 1, width: '48%' }}
@ -410,7 +410,7 @@ function Partner_Invoicing_Data(props) {
<TextField <TextField
name="adr_city" name="adr_city"
disabled
label="Ville" label="Ville"
className="texte_area" className="texte_area"
sx={{ m: 1, width: '48%' }} sx={{ m: 1, width: '48%' }}
@ -429,7 +429,7 @@ function Partner_Invoicing_Data(props) {
<TextField <TextField
name="adr_country" name="adr_country"
label="Pays" label="Pays"
disabled
className="texte_area" className="texte_area"
sx={{ m: 1, width: '48%' }} sx={{ m: 1, width: '48%' }}
InputProps={{ InputProps={{

View File

@ -633,7 +633,7 @@ const Partner_Securite_Data = (props) => {
</div> </div>
} }
&nbsp; &nbsp;
<Box alignItems="left" sx={{ '& > :not(style)': { m: 1 } }}> <Box alignItems="left" sx={{ '& > :not(style)': { m: 1 } }}>
{/*<FormControl sx={{ m: 1, width: '90%' }} size="small" className="texte_area_passwd"> {/*<FormControl sx={{ m: 1, width: '90%' }} size="small" className="texte_area_passwd">
<Label>Mot de passe actuel</Label> <Label>Mot de passe actuel</Label>
@ -863,7 +863,7 @@ const Partner_Securite_Data = (props) => {
La mise à jour été faite La mise à jour été faite
</div> </div>
} }
<br />
<TextField <TextField
name="current_email" name="current_email"
label="Adresse mail" label="Adresse mail"
@ -964,7 +964,7 @@ const Partner_Securite_Data = (props) => {
&nbsp; &nbsp;
<Box alignItems="left" sx={{ '& > :not(style)': { m: 1 } }} > <Box alignItems="left" sx={{ '& > :not(style)': { m: 1 } }} >
{/*<FormControl sx={{ m: 1, width: '90%' }} variant="standard" size="small" className="texte_area_passwd"> {/*<FormControl sx={{ m: 1, width: '90%' }} variant="standard" size="small" className="texte_area_passwd">
<Label>Clé de rattachement actuelle</Label> <Label>Clé de rattachement actuelle</Label>
@ -1137,7 +1137,7 @@ const Partner_Securite_Data = (props) => {
</ul> </ul>
</div> </div>
<div className="div_row22" style={{"textAlign":"left"}}> <div className="div_row22" style={{ "textAlign": "left" }}>
{insert_keyfieldsdesabled == false && <div className="div_row"> {insert_keyfieldsdesabled == false && <div className="div_row">

View File

@ -825,8 +825,8 @@ function UpdateParnterInfo() {
} else if (String(result['status']) === String("Err_Connexion")) { } else if (String(result['status']) === String("Err_Connexion")) {
alert('Erreur: ' + result['message']); alert('Erreur: ' + result['message']);
history.push("/Connexion"); history.push("/Connexion");
}else{ } else {
alert(" Erreur : "+result['message']); alert(" Erreur : " + result['message']);
} }
}) })
@ -1531,7 +1531,7 @@ function UpdateParnterInfo() {
function sleep(ms) { function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms)); return new Promise(resolve => setTimeout(resolve, ms));
} }
async function submenu_donnee_entreprise() { async function submenu_donnee_entreprise() {
setsubmenu("submenu_donnee_entreprise"); setsubmenu("submenu_donnee_entreprise");
@ -1621,7 +1621,7 @@ function UpdateParnterInfo() {
&nbsp; &nbsp;
<Box alignItems="left" sx={{ '& > :not(style)': { m: 1 }, width: '100%', }} onChange={DataUpdated}> <Box alignItems="left" sx={{ '& > :not(style)': { m: 1 }, width: '100%', }} onChange={DataUpdated}>
<TextField <TextField
required required

View File

@ -769,31 +769,34 @@
} }
.texte_area { .texte_area {
float: left;
width: 47% !important; width: 47% !important;
font-size: small !important; font-size: x-small !important;
font-family: "verdana", "Quicksand", "Signika", sans-serif; font-family: "verdana", "Quicksand", "Signika", sans-serif;
margin: 0rem !important; margin: 0.4rem !important;
margin-right: 0.4rem !important; margin-top: 0px !important;
margin-top: 0.4rem !important; margin-bottom: 1.5rem !important;
background-color: "#ECEFF1";
background: "#ECEFF1";
color: black;
margin: 0.5rem !important;
} }
.texte_area_adress { .texte_area_adress {
width: 96.5% !important; float: left;
font-size: small !important; width: 95% !important;
font-size: x-small !important;
font-family: "verdana", "Quicksand", "Signika", sans-serif; font-family: "verdana", "Quicksand", "Signika", sans-serif;
margin: 0rem !important; margin: 0.4rem !important;
margin-right: 0.4rem !important; margin-bottom: 1.5rem !important;
margin-top: 0.4rem !important;
background-color: "#ECEFF1";
background: "#ECEFF1";
color: black;
margin: 0.5rem !important;
} }
.texte_area_passwd {
float: left;
width: 95% !important;
font-size: x-small !important;
font-family: "verdana", "Quicksand", "Signika", sans-serif;
margin: 0.4rem !important;
margin-bottom: 1.5rem !important;
}
.titre1 { .titre1 {
font-family: "Quicksand", "Signika", sans-serif; font-family: "Quicksand", "Signika", sans-serif;
font-size: medium; font-size: medium;