09/01/24 - 19h30
parent
e7dc6fb1ef
commit
94898c374f
|
@ -1663,7 +1663,8 @@ const Apprenant = (props) => {
|
||||||
const value = event.target.value;
|
const value = event.target.value;
|
||||||
|
|
||||||
|
|
||||||
if (String(value) === "supprimer" || String(value) === "inscription") {
|
if (String(value) === "supprimer" || String(value) === "inscription"
|
||||||
|
|| String(value) === "exporter") {
|
||||||
setactionmass_ftion_val(value);
|
setactionmass_ftion_val(value);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -1691,10 +1692,44 @@ const Apprenant = (props) => {
|
||||||
setDialog_add_inscription_open(true);
|
setDialog_add_inscription_open(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if (String(actionmass_ftion_val) === String("exporter")) {
|
||||||
|
Export_apprenant(liste_apprenant);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function Export_apprenant(tab_class) {
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
|
||||||
|
var nom_fichier_cmd = "export_apprenant.xlsx";
|
||||||
|
|
||||||
|
var url = process.env.REACT_APP_API_URL + "myclass/api/Export_Apprenant_To_Excel_From_from_List_Id/" + stored_cookie + "/" + tab_class;
|
||||||
|
|
||||||
|
|
||||||
|
setLoading(true);
|
||||||
|
axios.get(url, { responseType: 'blob', },)
|
||||||
|
.then((res) => {
|
||||||
|
setLoading(false);
|
||||||
|
//console.log(" In Export_Dashbord_to_CSV res.data = " + res.data);
|
||||||
|
if (String(res.data) === String("false")) {
|
||||||
|
alert("Impossible d'exporter les apprenants (2) ");
|
||||||
|
} else {
|
||||||
|
fileDownload(res.data, nom_fichier_cmd)
|
||||||
|
|
||||||
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
setLoading(false);
|
||||||
|
console.error('Error:', error);
|
||||||
|
alert(" Impossible d'exporter les apprenants ")
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
setLoading(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const [rows_champs_specifics_stagiaire, setrows_champs_specifics_stagiaire] = useState([]);
|
const [rows_champs_specifics_stagiaire, setrows_champs_specifics_stagiaire] = useState([]);
|
||||||
|
|
||||||
function GetSelectedRowsSession() {
|
function GetSelectedRowsSession() {
|
||||||
|
@ -3560,6 +3595,14 @@ const Apprenant = (props) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const New_Option = [
|
||||||
|
|
||||||
|
{ "id": "0", "label": "Dupliquer", "value": "dupliquer" },
|
||||||
|
{ "id": "1", "label": "Exporter", "value": "exporter" },
|
||||||
|
{ "id": "2", "label": "Supprimer", "value": "supprimer" },
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="apprenant">
|
<div className="apprenant">
|
||||||
|
|
||||||
|
@ -4645,7 +4688,30 @@ const Apprenant = (props) => {
|
||||||
{selectionModel && selectionModel.length >= 1 && <div className="block_en_mass">
|
{selectionModel && selectionModel.length >= 1 && <div className="block_en_mass">
|
||||||
<nav >Traitement en masse </nav>
|
<nav >Traitement en masse </nav>
|
||||||
|
|
||||||
<TextField
|
<Autocomplete
|
||||||
|
disablePortal
|
||||||
|
id="combo-box-demo"
|
||||||
|
className="block_en_mass_select"
|
||||||
|
fullWidth
|
||||||
|
options={New_Option}
|
||||||
|
onChange={(event, value) => {
|
||||||
|
if (value && value.value) {
|
||||||
|
if( String(value.value) === "supprimer"
|
||||||
|
|| String(value.value) === "dupliquer" || String(value.value) === "exporter") {
|
||||||
|
setactionmass_ftion_val(value.value);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setactionmass_ftion_val();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} label="" />
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
{/*<TextField
|
||||||
|
|
||||||
select
|
select
|
||||||
InputLabelProps={{
|
InputLabelProps={{
|
||||||
|
@ -4661,7 +4727,7 @@ const Apprenant = (props) => {
|
||||||
<MenuItem value="n/a" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Action </MenuItem>
|
<MenuItem value="n/a" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Action </MenuItem>
|
||||||
<MenuItem value="supprimer" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Supprimer </MenuItem>
|
<MenuItem value="supprimer" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Supprimer </MenuItem>
|
||||||
<MenuItem value="inscription" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Inscrire </MenuItem>
|
<MenuItem value="inscription" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Inscrire </MenuItem>
|
||||||
</TextField>
|
</TextField>*/}
|
||||||
|
|
||||||
|
|
||||||
{actionmass_ftion_val && <nav className='block_en_mass_bton_action'>
|
{actionmass_ftion_val && <nav className='block_en_mass_bton_action'>
|
||||||
|
@ -4692,6 +4758,10 @@ const Apprenant = (props) => {
|
||||||
{String(actionmass_ftion_val) === "inscription" &&
|
{String(actionmass_ftion_val) === "inscription" &&
|
||||||
<font> Confirmer l'inscription de {selectionModel.length} apprenants à la session que vous aller choisir à présent.
|
<font> Confirmer l'inscription de {selectionModel.length} apprenants à la session que vous aller choisir à présent.
|
||||||
</font>}
|
</font>}
|
||||||
|
|
||||||
|
{String(actionmass_ftion_val) === "exporter" &&
|
||||||
|
<font> Confirmer l'export excel de {selectionModel.length} apprenant(s).
|
||||||
|
</font>}
|
||||||
</div>
|
</div>
|
||||||
<div className="gest_actions">
|
<div className="gest_actions">
|
||||||
<div style={{ "width": "45%", "float": "left" }}>
|
<div style={{ "width": "45%", "float": "left" }}>
|
||||||
|
@ -5998,6 +6068,7 @@ const Apprenant = (props) => {
|
||||||
{selectionModel && selectionModel.length >= 1 && <div className="block_en_mass">
|
{selectionModel && selectionModel.length >= 1 && <div className="block_en_mass">
|
||||||
<nav >Traitement en masse </nav>
|
<nav >Traitement en masse </nav>
|
||||||
|
|
||||||
|
|
||||||
<TextField
|
<TextField
|
||||||
|
|
||||||
select
|
select
|
||||||
|
@ -6014,7 +6085,7 @@ const Apprenant = (props) => {
|
||||||
<MenuItem value="n/a" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Action </MenuItem>
|
<MenuItem value="n/a" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Action </MenuItem>
|
||||||
<MenuItem value="supprimer" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Supprimer </MenuItem>
|
<MenuItem value="supprimer" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Supprimer </MenuItem>
|
||||||
<MenuItem value="dupliquer" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Dupliquer </MenuItem>
|
<MenuItem value="dupliquer" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Dupliquer </MenuItem>
|
||||||
</TextField>
|
</TextField>
|
||||||
|
|
||||||
|
|
||||||
{actionmass_ftion_val && <nav className='block_en_mass_bton_action'>
|
{actionmass_ftion_val && <nav className='block_en_mass_bton_action'>
|
||||||
|
|
|
@ -190,7 +190,7 @@ const Dashbord_Formation_Evol_Session = (props) => {
|
||||||
const stored_cookie = getCookie('tokenmysypart');
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
|
||||||
var nom_fichier_cmd = "export_csv.csv";
|
var nom_fichier_cmd = "export_csv.csv";
|
||||||
console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- local_dashbord_internal_id = ", local_dashbord_internal_id);
|
//console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- local_dashbord_internal_id = ", local_dashbord_internal_id);
|
||||||
|
|
||||||
var url = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_Formation_By_Session_By_Periode_Export_CSV/" + stored_cookie + "/" + local_dashbord_internal_id;
|
var url = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_Formation_By_Session_By_Periode_Export_CSV/" + stored_cookie + "/" + local_dashbord_internal_id;
|
||||||
|
|
||||||
|
|
|
@ -2285,7 +2285,7 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
const [p_detail_client_rattachement_nom, setp_detail_client_rattachement_nom] = useState();
|
const [p_detail_client_rattachement_nom, setp_detail_client_rattachement_nom] = useState();
|
||||||
const [p_detail_client_rattachement_id, setp_detail_client_rattachement_id] = useState();
|
const [p_detail_client_rattachement_id, setp_detail_client_rattachement_id] = useState();
|
||||||
|
|
||||||
const [p_detail_apprenant_id, setp_detail_apprenant_id] = useState();
|
const [p_detail_apprenant_id, setp_detail_apprenant_id] = useState("");
|
||||||
|
|
||||||
const [p_detail_tuteur1_nom, setp_detail_tuteur1_nom] = useState("");
|
const [p_detail_tuteur1_nom, setp_detail_tuteur1_nom] = useState("");
|
||||||
const [p_detail_tuteur1_prenom, setp_detail_tuteur1_prenom] = useState("");
|
const [p_detail_tuteur1_prenom, setp_detail_tuteur1_prenom] = useState("");
|
||||||
|
@ -4205,7 +4205,8 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
const value = event.target.value;
|
const value = event.target.value;
|
||||||
|
|
||||||
|
|
||||||
if (String(value) === "supprimer" || String(value) === "convention" || String(value) === "desactiver") {
|
if (String(value) === "supprimer" || String(value) === "convention" || String(value) === "desactiver"
|
||||||
|
|| String(value) === "exporter") {
|
||||||
setactionmass_ftion_val(value);
|
setactionmass_ftion_val(value);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -4238,10 +4239,39 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
setDialog_convention_open(true);
|
setDialog_convention_open(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (String(actionmass_ftion_val) === String("desactiver")) {
|
else if (String(actionmass_ftion_val) === String("exporter")) {
|
||||||
|
Export_Inscriptions(liste_session);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Export_Inscriptions(tab_class) {
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
|
||||||
|
var nom_fichier_cmd = "export_inscriptions.xlsx";
|
||||||
|
|
||||||
|
var url = process.env.REACT_APP_API_URL + "myclass/api/Export_Inscription_To_Excel_From_from_List_Id/" + stored_cookie + "/" + tab_class;
|
||||||
|
|
||||||
|
|
||||||
|
setLoading(true);
|
||||||
|
axios.get(url, { responseType: 'blob', },)
|
||||||
|
.then((res) => {
|
||||||
|
setLoading(false);
|
||||||
|
//console.log(" In Export_Dashbord_to_CSV res.data = " + res.data);
|
||||||
|
if (String(res.data) === String("false")) {
|
||||||
|
alert("Impossible d'exporter les inscrits (2) ");
|
||||||
|
} else {
|
||||||
|
fileDownload(res.data, nom_fichier_cmd)
|
||||||
|
|
||||||
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
setLoading(false);
|
||||||
|
console.error('Error:', error);
|
||||||
|
alert(" Impossible d'exporter les inscrits ")
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
setLoading(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
const [selectedtraining, setselectedtraining] = useState([])
|
const [selectedtraining, setselectedtraining] = useState([])
|
||||||
|
@ -5103,6 +5133,11 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
setDialog_stagiaire_open(false);
|
setDialog_stagiaire_open(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const New_Option = [
|
||||||
|
{ "id": "0", "label": "Exporter", "value": "exporter" },
|
||||||
|
{ "id": "1", "label": "Supprimer", "value": "supprimer" },
|
||||||
|
]
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="displaypartnerstagiaire">
|
<div className="displaypartnerstagiaire">
|
||||||
{isLoading && <div className="loader-container">
|
{isLoading && <div className="loader-container">
|
||||||
|
@ -5305,7 +5340,7 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div className="session_caract_Dialog" > Nom
|
<div className="session_caract_Dialog" > <b>Nom </b>
|
||||||
<TextField
|
<TextField
|
||||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||||
|
|
||||||
|
@ -5322,7 +5357,7 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="session_caract_Dialog" > Prénom
|
<div className="session_caract_Dialog" > <b> Prénom</b>
|
||||||
<TextField
|
<TextField
|
||||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||||
|
|
||||||
|
@ -5336,7 +5371,7 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="session_caract_Dialog" > Email
|
<div className="session_caract_Dialog" > <b> Email</b>
|
||||||
<TextField
|
<TextField
|
||||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||||
|
|
||||||
|
@ -5467,7 +5502,7 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
</DialogContentText>
|
</DialogContentText>
|
||||||
|
|
||||||
|
|
||||||
<div className="session_caract_Dialog" > Nom
|
<div className="session_caract_Dialog" ><b> Nom </b>
|
||||||
<TextField
|
<TextField
|
||||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||||
|
|
||||||
|
@ -5484,7 +5519,7 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="session_caract_Dialog" > Prénom
|
<div className="session_caract_Dialog" > <b>Prénom</b>
|
||||||
<TextField
|
<TextField
|
||||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||||
|
|
||||||
|
@ -5498,7 +5533,7 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="session_caract_Dialog" > Email
|
<div className="session_caract_Dialog" > <b> Email</b>
|
||||||
<TextField
|
<TextField
|
||||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||||
|
|
||||||
|
@ -6526,10 +6561,34 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
|
|
||||||
<div className="div_row">
|
<div className="div_row">
|
||||||
|
|
||||||
{selectionModel && selectionModel.length > 1 && <div className="block_en_mass">
|
{selectionModel && selectionModel.length >= 1 && <div className="block_en_mass">
|
||||||
<nav >Traitement en masse </nav>
|
<nav >Traitement en masse </nav>
|
||||||
|
|
||||||
<TextField
|
<Autocomplete
|
||||||
|
disablePortal
|
||||||
|
id="combo-box-demo"
|
||||||
|
className="block_en_mass_select"
|
||||||
|
fullWidth
|
||||||
|
options={New_Option}
|
||||||
|
onChange={(event, value) => {
|
||||||
|
if (value && value.value) {
|
||||||
|
if( String(value.value) === "supprimer"
|
||||||
|
|| String(value.value) === "convention" || String(value.value) === "exporter") {
|
||||||
|
setactionmass_ftion_val(value.value);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setactionmass_ftion_val();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} label="" />
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
{/*<TextField
|
||||||
|
|
||||||
select
|
select
|
||||||
InputLabelProps={{
|
InputLabelProps={{
|
||||||
|
@ -6543,10 +6602,10 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
onChange={actionmass_ftion}
|
onChange={actionmass_ftion}
|
||||||
>
|
>
|
||||||
<MenuItem value="n/a" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Action </MenuItem>
|
<MenuItem value="n/a" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Action </MenuItem>
|
||||||
{/*<MenuItem value="convention" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Envoyer Convention </MenuItem>*/}
|
{/*<MenuItem value="convention" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Envoyer Convention </MenuItem>* /}
|
||||||
<MenuItem value="supprimer" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Supprimer </MenuItem>
|
<MenuItem value="supprimer" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Supprimer </MenuItem>
|
||||||
|
|
||||||
</TextField>
|
</TextField>*/}
|
||||||
{actionmass_ftion_val && <nav className='block_en_mass_bton_action'>
|
{actionmass_ftion_val && <nav className='block_en_mass_bton_action'>
|
||||||
<Popup
|
<Popup
|
||||||
trigger={<Button className="bton_enreg" style={{ "width": "90%" }}>
|
trigger={<Button className="bton_enreg" style={{ "width": "90%" }}>
|
||||||
|
@ -6568,9 +6627,19 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
<div className="gest_header"> MySy Information </div>
|
<div className="gest_header"> MySy Information </div>
|
||||||
<div className="gest_content">
|
<div className="gest_content">
|
||||||
{' '}
|
{' '}
|
||||||
|
{String(actionmass_ftion_val) === "supprimer" &&
|
||||||
|
<font color="red"> Confirmer la <b> suppression </b> en masse pour {selectionModel.length} lignes.
|
||||||
|
</font>}
|
||||||
|
|
||||||
<font color="red"> Confirmer l'action <b> {actionmass_ftion_val} </b> en masse pour {selectionModel.length} lignes.
|
{String(actionmass_ftion_val) === "exporter" &&
|
||||||
</font>
|
<font> Confirmer l' <b> export </b> en masse pour {selectionModel.length} lignes.
|
||||||
|
</font>}
|
||||||
|
|
||||||
|
{String(actionmass_ftion_val) === "convention" &&
|
||||||
|
<font> Confirmer l' <b> édition des conventions </b> en masse pour {selectionModel.length} lignes.
|
||||||
|
</font>}
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div className="gest_actions">
|
<div className="gest_actions">
|
||||||
<div style={{ "width": "45%", "float": "left" }}>
|
<div style={{ "width": "45%", "float": "left" }}>
|
||||||
|
@ -7929,7 +7998,7 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
<div style={{ "width": '100%', "float": 'left' }}>
|
<div style={{ "width": '100%', "float": 'left' }}>
|
||||||
<div style={{ "width": '50%', "float": 'left', "borderRight": "thick double #32a1ce" }}>
|
<div style={{ "width": '50%', "float": 'left', "borderRight": "thick double #32a1ce" }}>
|
||||||
<div className="tuteur_field" style={{ "textAlign": "center", "width": "100%" }}> Tuteur 1 </div>
|
<div className="tuteur_field" style={{ "textAlign": "center", "width": "100%" }}> Tuteur 1 </div>
|
||||||
<div className="tuteur_field"> Nom <br />
|
<div className="tuteur_field"> <b> Nom </b> <br />
|
||||||
<TextField
|
<TextField
|
||||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||||
required
|
required
|
||||||
|
@ -7952,7 +8021,7 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="tuteur_field" > Prénom <br />
|
<div className="tuteur_field" > <b>Prénom </b><br />
|
||||||
<TextField
|
<TextField
|
||||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||||
required
|
required
|
||||||
|
@ -7974,7 +8043,7 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="tuteur_field"> Email <br />
|
<div className="tuteur_field"> <b> Email </b> <br />
|
||||||
<TextField
|
<TextField
|
||||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||||
required
|
required
|
||||||
|
@ -7996,7 +8065,7 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="tuteur_field"> <b> Téléphone </b><br />
|
<div className="tuteur_field"> Téléphone <br />
|
||||||
<TextField
|
<TextField
|
||||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||||
required
|
required
|
||||||
|
@ -8017,21 +8086,23 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{!p_detail_apprenant_id ||
|
|
||||||
String(p_detail_apprenant_id).trim().length <= 0 && <div className="tuteur_field" style={{ "cursor": "pointer" }} onClick={(e) => {
|
{String(p_detail_apprenant_id).trim().length <= 0 && <div className="tuteur_field" style={{ "cursor": "pointer" }} onClick={(e) => {
|
||||||
setquel_tuteur("1");
|
setquel_tuteur("1");
|
||||||
setDialog_tuteur_1_open(true);
|
setDialog_tuteur_1_open(true);
|
||||||
}}> Voir plus <RiMoreFill /> <FcEditImage style={{ "fontSize": "large" }} />
|
}}> Voir plus <RiMoreFill /> <FcEditImage style={{ "fontSize": "large" }} />
|
||||||
|
|
||||||
</div>}
|
</div>}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div style={{ "width": '50%', "float": 'left', }}>
|
<div style={{ "width": '50%', "float": 'left', }}>
|
||||||
|
|
||||||
<div className="tuteur_field" style={{ "textAlign": "center", "width": "100%" }}> Tuteur 2 </div>
|
<div className="tuteur_field" style={{ "textAlign": "center", "width": "100%" }}> Tuteur 2 </div>
|
||||||
<div className="tuteur_field"> Nom <br />
|
<div className="tuteur_field"> <b>Nom </b><br />
|
||||||
<TextField
|
<TextField
|
||||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||||
required
|
required
|
||||||
|
@ -8054,7 +8125,7 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="tuteur_field"> Prénom <br />
|
<div className="tuteur_field"> <b>Prénom </b><br />
|
||||||
<TextField
|
<TextField
|
||||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||||
required
|
required
|
||||||
|
@ -8076,7 +8147,7 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="tuteur_field"> Email <br />
|
<div className="tuteur_field"> <b>Email </b><br />
|
||||||
<TextField
|
<TextField
|
||||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||||
required
|
required
|
||||||
|
@ -8098,7 +8169,7 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="tuteur_field"> <b> Téléphone </b> <br />
|
<div className="tuteur_field"> Téléphone <br />
|
||||||
<TextField
|
<TextField
|
||||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||||
required
|
required
|
||||||
|
@ -8120,8 +8191,7 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{!p_detail_apprenant_id ||
|
{String(p_detail_apprenant_id).trim().length <= 0 && <div className="tuteur_field" style={{ "cursor": "pointer" }} onClick={(e) => {
|
||||||
String(p_detail_apprenant_id).trim().length <= 0 && <div className="tuteur_field" style={{ "cursor": "pointer" }} onClick={(e) => {
|
|
||||||
setquel_tuteur("2");
|
setquel_tuteur("2");
|
||||||
setDialog_tuteur_1_open(true);
|
setDialog_tuteur_1_open(true);
|
||||||
}}> Voir plus <RiMoreFill /> <FcEditImage style={{ "fontSize": "large" }} />
|
}}> Voir plus <RiMoreFill /> <FcEditImage style={{ "fontSize": "large" }} />
|
||||||
|
|
|
@ -5,10 +5,12 @@ import TrainingForm from "./AddClassManual"
|
||||||
import TextField from '@mui/material/TextField';
|
import TextField from '@mui/material/TextField';
|
||||||
import Button from '@mui/material/Button';
|
import Button from '@mui/material/Button';
|
||||||
import Select from 'react-select'
|
import Select from 'react-select'
|
||||||
|
import Autocomplete from '@mui/material/Autocomplete';
|
||||||
import { getCookie } from 'react-use-cookie';
|
import { getCookie } from 'react-use-cookie';
|
||||||
import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid';
|
import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid';
|
||||||
import excel_icone from "../mysy_img/excel_icone.png";
|
import excel_icone from "../mysy_img/excel_icone.png";
|
||||||
import Popup from 'reactjs-popup';
|
import Popup from 'reactjs-popup';
|
||||||
|
import fileDownload from 'js-file-download'
|
||||||
import 'reactjs-popup/dist/index.css';
|
import 'reactjs-popup/dist/index.css';
|
||||||
import { AiFillCloseCircle, } from "react-icons/ai";
|
import { AiFillCloseCircle, } from "react-icons/ai";
|
||||||
import parse from 'html-react-parser'
|
import parse from 'html-react-parser'
|
||||||
|
@ -878,6 +880,7 @@ const DistplayPartnerTraningsPage = (props) => {
|
||||||
|
|
||||||
var url = process.env.REACT_APP_API_URL + "myclass/api/Duplicate_Class_from_internal_url/";
|
var url = process.env.REACT_APP_API_URL + "myclass/api/Duplicate_Class_from_internal_url/";
|
||||||
|
|
||||||
|
setLoading(true);
|
||||||
for (var i = 0; i < tab_class.length; i++) {
|
for (var i = 0; i < tab_class.length; i++) {
|
||||||
|
|
||||||
//alert(" début desactivation de la formation " + tab_class[i]);
|
//alert(" début desactivation de la formation " + tab_class[i]);
|
||||||
|
@ -902,12 +905,46 @@ const DistplayPartnerTraningsPage = (props) => {
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
setLoading(false);
|
||||||
console.error('Error:', error);
|
console.error('Error:', error);
|
||||||
//alert(" KOO pour la formation :" + tab_class[i]);
|
//alert(" KOO pour la formation :" + tab_class[i]);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
setLoading(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function Export_class(tab_class) {
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
|
||||||
|
var nom_fichier_cmd = "export_formation.xlsx";
|
||||||
|
|
||||||
|
var url = process.env.REACT_APP_API_URL + "myclass/api/Export_Class_To_Excel_From_from_List_Id/" + stored_cookie + "/" + tab_class;
|
||||||
|
|
||||||
|
|
||||||
|
setLoading(true);
|
||||||
|
axios.get(url, { responseType: 'blob', },)
|
||||||
|
.then((res) => {
|
||||||
|
setLoading(false);
|
||||||
|
//console.log(" In Export_Dashbord_to_CSV res.data = " + res.data);
|
||||||
|
if (String(res.data) === String("false")) {
|
||||||
|
alert("Impossible d'exporter les formations (2) ");
|
||||||
|
} else {
|
||||||
|
fileDownload(res.data, nom_fichier_cmd)
|
||||||
|
|
||||||
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
setLoading(false);
|
||||||
|
console.error('Error:', error);
|
||||||
|
alert(" Impossible d'exporter les formations ")
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
setLoading(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -948,7 +985,10 @@ const DistplayPartnerTraningsPage = (props) => {
|
||||||
GetAllClass_WOfilter();
|
GetAllClass_WOfilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if (String(actionenmasse) === String("exporter")) {
|
||||||
|
Export_class(liste_formation_ids_values);
|
||||||
|
GetAllClass_WOfilter();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1207,7 +1247,7 @@ const DistplayPartnerTraningsPage = (props) => {
|
||||||
|
|
||||||
if (String(value) === "publier" || String(value) === "depublier" ||
|
if (String(value) === "publier" || String(value) === "depublier" ||
|
||||||
String(value) === "desactiver" || String(value) === "supprimer"
|
String(value) === "desactiver" || String(value) === "supprimer"
|
||||||
|| String(value) === "dupliquer") {
|
|| String(value) === "dupliquer" || String(value) === "exporter") {
|
||||||
setactionmass_ftion_val(value);
|
setactionmass_ftion_val(value);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -1270,6 +1310,11 @@ const DistplayPartnerTraningsPage = (props) => {
|
||||||
//window.location.reload();
|
//window.location.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
else if (String(actionmass_ftion_val) === String("exporter")) {
|
||||||
|
Export_class(liste_formation_ids_values);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const sleep = (milliseconds) => {
|
const sleep = (milliseconds) => {
|
||||||
|
@ -1350,6 +1395,15 @@ const DistplayPartnerTraningsPage = (props) => {
|
||||||
|
|
||||||
const [selected_row_data_json, setselected_row_data_json] = useState([]);
|
const [selected_row_data_json, setselected_row_data_json] = useState([]);
|
||||||
|
|
||||||
|
|
||||||
|
const New_Option = [
|
||||||
|
{ "id": "0", "label": "Publier", "value": "publier" },
|
||||||
|
{ "id": "1", "label": "Depublier", "value": "depublier" },
|
||||||
|
{ "id": "2", "label": "Dupliquer", "value": "dupliquer" },
|
||||||
|
{ "id": "3", "label": "Exporter", "value": "exporter" },
|
||||||
|
{ "id": "4", "label": "Supprimer", "value": "supprimer" },
|
||||||
|
]
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
||||||
<div className='displaypartnertrainingpagination'>
|
<div className='displaypartnertrainingpagination'>
|
||||||
|
@ -1902,9 +1956,33 @@ const DistplayPartnerTraningsPage = (props) => {
|
||||||
{selectionModel && selectionModel.length >= 1 && <div className="block_en_mass">
|
{selectionModel && selectionModel.length >= 1 && <div className="block_en_mass">
|
||||||
<nav >Traitement en masse </nav>
|
<nav >Traitement en masse </nav>
|
||||||
|
|
||||||
|
<Autocomplete
|
||||||
|
disablePortal
|
||||||
|
id="combo-box-demo"
|
||||||
|
className="block_en_mass_select"
|
||||||
|
fullWidth
|
||||||
|
options={New_Option}
|
||||||
|
onChange={(event, value) => {
|
||||||
|
if (value && value.value) {
|
||||||
|
if (String(value.value) === "publier" || String(value.value) === "depublier" ||
|
||||||
|
String(value.value) === "desactiver" || String(value.value) === "supprimer"
|
||||||
|
|| String(value.value) === "dupliquer" || String(value.value) === "exporter") {
|
||||||
|
setactionmass_ftion_val(value.value);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setactionmass_ftion_val();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} label="" />
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
<TextField
|
{/* <TextField
|
||||||
|
|
||||||
select
|
select
|
||||||
InputLabelProps={{
|
InputLabelProps={{
|
||||||
|
@ -1922,8 +2000,9 @@ const DistplayPartnerTraningsPage = (props) => {
|
||||||
<MenuItem value="depublier" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Dépublier </MenuItem>
|
<MenuItem value="depublier" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Dépublier </MenuItem>
|
||||||
<MenuItem value="dupliquer" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Dupliquer </MenuItem>
|
<MenuItem value="dupliquer" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Dupliquer </MenuItem>
|
||||||
<MenuItem value="supprimer" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Supprimer </MenuItem>
|
<MenuItem value="supprimer" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Supprimer </MenuItem>
|
||||||
|
<MenuItem value="exporter" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Exporter </MenuItem>
|
||||||
|
|
||||||
</TextField>
|
</TextField>*/}
|
||||||
|
|
||||||
{actionmass_ftion_val && <nav className='block_en_mass_bton_action'>
|
{actionmass_ftion_val && <nav className='block_en_mass_bton_action'>
|
||||||
<Popup
|
<Popup
|
||||||
|
@ -1946,9 +2025,29 @@ const DistplayPartnerTraningsPage = (props) => {
|
||||||
<div className="gest_header"> MySy Information </div>
|
<div className="gest_header"> MySy Information </div>
|
||||||
<div className="gest_content">
|
<div className="gest_content">
|
||||||
{' '}
|
{' '}
|
||||||
|
{String(actionmass_ftion_val) === "supprimer" &&
|
||||||
|
<font color="red"> Confirmer la <b> suppression </b> en masse pour {selectionModel.length} formations.
|
||||||
|
</font>}
|
||||||
|
|
||||||
|
{String(actionmass_ftion_val) === "dupliquer" &&
|
||||||
|
<font color="red"> Confirmer la <b> duplication </b> en masse pour {selectionModel.length} formations.
|
||||||
|
</font>}
|
||||||
|
|
||||||
|
{String(actionmass_ftion_val) === "exporter" &&
|
||||||
|
<font> Confirmer l' <b> export </b> en masse pour {selectionModel.length} formations.
|
||||||
|
</font>}
|
||||||
|
|
||||||
|
{String(actionmass_ftion_val) === "publier" &&
|
||||||
|
<font> Confirmer la <b> publication </b> en masse pour {selectionModel.length} formations.
|
||||||
|
</font>}
|
||||||
|
|
||||||
|
{String(actionmass_ftion_val) === "depublier" &&
|
||||||
|
<font> Confirmer la <b> dépublication </b> en masse pour {selectionModel.length} formations.
|
||||||
|
</font>}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<font color="red"> Confirmer l'action <b> {actionmass_ftion_val} </b> en masse pour {selectionModel.length} lignes.
|
|
||||||
</font>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="gest_actions">
|
<div className="gest_actions">
|
||||||
<div style={{ "width": "45%", "float": "left" }}>
|
<div style={{ "width": "45%", "float": "left" }}>
|
||||||
|
|
Loading…
Reference in New Issue