08/08/2024 - 20h30
parent
2008934b1f
commit
5ac928d0e4
|
@ -1894,6 +1894,72 @@ const Groupe_Apprenant = (props) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const [Automatic_Split_Membre_No_Grp_Creation_api, setAutomatic_Split_Membre_No_Grp_Creation_api] = useState();
|
||||||
|
const [Automatic_Split_Membre_No_Grp_Creation_message, setAutomatic_Split_Membre_No_Grp_Creation_message] = useState();
|
||||||
|
const [Automatic_Split_Membre_No_Grp_Creation_result, setAutomatic_Split_Membre_No_Grp_Creation_result] = useState();
|
||||||
|
function Automatic_Split_Membre_No_Grp_Creation() {
|
||||||
|
var form = new FormData();
|
||||||
|
//form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
|
||||||
|
|
||||||
|
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
form.append("token", stored_cookie);
|
||||||
|
|
||||||
|
form.append("split_type", p_detail_split_type_auto);
|
||||||
|
form.append("class_id", p_detail_class_id_auto);
|
||||||
|
form.append("session_id", p_detail_session_id_auto);
|
||||||
|
|
||||||
|
|
||||||
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Automatic_Split_Member_Inscrit_To_Grps/";
|
||||||
|
|
||||||
|
setLoading(true);
|
||||||
|
axios.post(myurl, form).then(res => {
|
||||||
|
//console.log(" In Automatic_Split_Membre_No_Grp_Creation res.data.status = " + res.data.status);
|
||||||
|
//console.log(" In Automatic_Split_Membre_No_Grp_Creation res.data.message r_class = " + res.data.message);
|
||||||
|
|
||||||
|
setLoading(false);
|
||||||
|
|
||||||
|
if (String(res.data.status) === String("true")) {
|
||||||
|
setAutomatic_Split_Membre_No_Grp_Creation_api("true");
|
||||||
|
setAutomatic_Split_Membre_No_Grp_Creation_result(res.data.message);
|
||||||
|
|
||||||
|
Disable_Grp_Apprenant_DetailFields();
|
||||||
|
setgrp_apprenant_data_changed("");
|
||||||
|
setgrp_apprenant_data_edit_mode("");
|
||||||
|
setSelectionModel([]);
|
||||||
|
clear_DetailFieds();
|
||||||
|
// Dialog_GRP_AUTOMATIC_handleClose_buton();
|
||||||
|
|
||||||
|
Getall_Partner_Groupe_Inscrit();
|
||||||
|
|
||||||
|
alert(res.data.message);
|
||||||
|
|
||||||
|
if (document.getElementById('myRef')) {
|
||||||
|
// myRef.current.scrollIntoView({ behavior: "smooth" });
|
||||||
|
var divh = document.getElementById('myRef').offsetTop;
|
||||||
|
window.scrollTo({
|
||||||
|
top: divh,
|
||||||
|
behavior: "smooth",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setAutomatic_Split_Membre_No_Grp_Creation_api("false");
|
||||||
|
setAutomatic_Split_Membre_No_Grp_Creation_message(res.data.message);
|
||||||
|
alert(res.data.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch((error) => {
|
||||||
|
setLoading(false);
|
||||||
|
|
||||||
|
console.log('UpdateStagiaireData : Not good man :( Automatic_Split_Membre_No_Grp_Creation = ' + error);
|
||||||
|
setAutomatic_Split_Membre_No_Grp_Creation_api("false");
|
||||||
|
alert(" Impossible de repartir les inscrits ");
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const [actionmass_ftion_val, setactionmass_ftion_val] = useState();
|
const [actionmass_ftion_val, setactionmass_ftion_val] = useState();
|
||||||
const actionmass_ftion = (event) => {
|
const actionmass_ftion = (event) => {
|
||||||
const value = event.target.value;
|
const value = event.target.value;
|
||||||
|
@ -2114,6 +2180,29 @@ const Groupe_Apprenant = (props) => {
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="session_caract_Dialog" > <b> Grouper les inscrits par </b>
|
||||||
|
<Autocomplete
|
||||||
|
disablePortal
|
||||||
|
name="event_dialog_type_ressource"
|
||||||
|
id="event_dialog_type_ressource"
|
||||||
|
fullWidth
|
||||||
|
|
||||||
|
options={New_Option_Groupe_By}
|
||||||
|
onChange={(event, value) => {
|
||||||
|
if (value.value)
|
||||||
|
setp_detail_split_type_auto(value.value);
|
||||||
|
else
|
||||||
|
setp_detail_split_type_auto("");
|
||||||
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} placeholder="Choisir une option " />
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{String(submenu_grp_dialog) === "create" && <div>
|
{String(submenu_grp_dialog) === "create" && <div>
|
||||||
<div className="session_caract_Dialog" > <b> Nombre de Groupe </b>
|
<div className="session_caract_Dialog" > <b> Nombre de Groupe </b>
|
||||||
|
@ -2135,27 +2224,6 @@ const Groupe_Apprenant = (props) => {
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="session_caract_Dialog" > <b> Créer groupe par </b>
|
|
||||||
<Autocomplete
|
|
||||||
disablePortal
|
|
||||||
name="event_dialog_type_ressource"
|
|
||||||
id="event_dialog_type_ressource"
|
|
||||||
fullWidth
|
|
||||||
|
|
||||||
options={New_Option_Groupe_By}
|
|
||||||
onChange={(event, value) => {
|
|
||||||
if (value.value)
|
|
||||||
setp_detail_split_type_auto(value.value);
|
|
||||||
else
|
|
||||||
setp_detail_split_type_auto("");
|
|
||||||
}}
|
|
||||||
|
|
||||||
renderInput={(params) => <TextField {...params} placeholder="Choisir une option " />
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div className="session_caract_Dialog" ><b>Type de Groupe </b> <br />
|
<div className="session_caract_Dialog" ><b>Type de Groupe </b> <br />
|
||||||
|
@ -2225,7 +2293,7 @@ const Groupe_Apprenant = (props) => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
|
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
|
||||||
<Button onClick={Create_Automatic_Grp} className="bton_enreg_dialog">Mettre à jour Membres</Button>
|
<Button onClick={Automatic_Split_Membre_No_Grp_Creation} className="bton_enreg_dialog">Mettre à jour Membres</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue