branche_01062025
Cherif 2026-05-12 09:20:13 +02:00
parent a762da8cb5
commit 88e13597ee
3 changed files with 144 additions and 26 deletions

View File

@ -1780,6 +1780,7 @@ const Groupe_Apprenant = (props) => {
const [p_detail_class_internal_url, setp_detail_class_internal_url] = React.useState("");
const [p_detail_session_id, setp_detail_session_id] = React.useState("");
const [p_detail_type_groupe_code, setp_detail_type_groupe_code] = React.useState("");
const [p_detail_type_groupe_id, setp_detail_type_groupe_id] = React.useState("");
const [p_detail_color, setp_detail_color] = React.useState("#33b8ff");
const [p_detail_nb_grp_auto, setp_detail_nb_grp_auto] = React.useState("");
@ -1788,6 +1789,7 @@ const Groupe_Apprenant = (props) => {
const [p_detail_session_id_auto, setp_detail_session_id_auto] = React.useState("");
const [p_detail_class_internal_url_auto, setp_detail_class_internal_url_auto] = React.useState("");
const [p_detail_type_groupe_code_auto, setp_detail_type_groupe_code_auto] = React.useState("");
const [p_detail_type_groupe_id_auto, setp_detail_type_groupe_id_auto] = React.useState("");
const [p_detail_split_racine, setp_detail_split_racine] = React.useState("");
function clear_DetailFieds() {
@ -1798,6 +1800,7 @@ const Groupe_Apprenant = (props) => {
setp_detail_class_id("");
setp_detail_session_id("");
setp_detail_type_groupe_code("");
setp_detail_type_groupe_id("");
setp_detail_color("");
}
@ -1816,7 +1819,7 @@ const Groupe_Apprenant = (props) => {
form.append("code", p_detail_code);
form.append("nom", p_detail_nom);
form.append("description", p_detail_description);
form.append("type_groupe_code", p_detail_type_groupe_code);
form.append("groupe_inscription_type_id", p_detail_type_groupe_id);
form.append("class_id", p_detail_class_id);
form.append("session_id", p_detail_session_id);
form.append("color", p_detail_color);
@ -1850,8 +1853,6 @@ const Groupe_Apprenant = (props) => {
setgrp_apprenant_data_edit_mode("");
clear_DetailFieds();
if (selected_id && String(selected_id).length > 5) {
handleClick_edit_evaluation_From_Line(gridline_id);
Disable_Grp_Apprenant_DetailFields();
@ -1908,7 +1909,10 @@ const Groupe_Apprenant = (props) => {
console.log('UpdateStagiaireData : Not good man :( Add_Update_Grp_Apprenant_Data = ' + error);
setAdd_Update_Grp_Apprenant_Data_api("false");
alert(" Impossible d'ajouter ou mettre à jour le groupe");
setdisplay_alert_mysy("1");
setalert_message(" Impossible d'ajouter ou mettre à jour le groupe");
setalert_type("error");
})
}
@ -2244,6 +2248,7 @@ const Groupe_Apprenant = (props) => {
setp_detail_session_id_auto("");
setp_detail_class_internal_url_auto("");
setp_detail_type_groupe_code_auto("");
setp_detail_type_groupe_id_auto("");
setp_detail_split_racine("");
};
@ -2269,7 +2274,7 @@ const Groupe_Apprenant = (props) => {
form.append("nb_groupe", p_detail_nb_grp_auto);
form.append("split_type", p_detail_split_type_auto);
form.append("type_groupe_code", p_detail_type_groupe_code_auto);
form.append("groupe_inscription_type_id", p_detail_type_groupe_id_auto);
form.append("class_id", p_detail_class_id_auto);
form.append("session_id", p_detail_session_id_auto);
@ -2528,7 +2533,7 @@ const Groupe_Apprenant = (props) => {
//setOpen(false);
};
const [Dialog_GRP_COLOR_message, setDialog_GRP_COLOR_message] = React.useState(false);
const [Dialog_GRP_COLOR_open, setDialog_GRP_COLOR_open] = React.useState(false);
@ -3022,7 +3027,7 @@ const Groupe_Apprenant = (props) => {
style: {
overflowY: 'unset',
position: 'absolute',
//top: '5rem'
top: '10rem'
},
}}
hideBackdrop={true}
@ -3137,10 +3142,12 @@ const Groupe_Apprenant = (props) => {
setp_detail_type_groupe_code_auto(value.code);
setgrp_apprenant_data_changed("1");
setp_detail_type_groupe_id_auto(value._id);
} else {
setp_detail_type_groupe_code_auto("");
setgrp_apprenant_data_changed("1");
setp_detail_type_groupe_id_auto("");
}
}}
@ -3821,6 +3828,7 @@ const Groupe_Apprenant = (props) => {
{String(props.check_user_acces_right("stagiaire", "write")) === "1" && <Button variant="outlined"
className="detail_class_submenu bton_add_session bton_add_session_create_automatic" style={{ "width": "40%" }}
id='menu_import_participant' name='menu_import_participant' onClick={(event) => {
Getall_Groupe_Apprenant_Type();
setDialog_GRP_AUTOMATIC_open(true);
submenu_create_grp();
@ -4175,11 +4183,13 @@ const Groupe_Apprenant = (props) => {
if (value && value.code) {
setp_detail_type_groupe_code(value.code);
setgrp_apprenant_data_changed("1");
setp_detail_color(value.code_couleur);
setp_detail_color(value.code_couleur);
setp_detail_type_groupe_id(value._id)
} else {
setp_detail_type_groupe_code("");
setgrp_apprenant_data_changed("1");
setp_detail_type_groupe_id("")
}
}}
@ -4195,12 +4205,12 @@ const Groupe_Apprenant = (props) => {
</div>
<div className="session_caract"> Code couleur &nbsp;
<nav className="disabled_style" style={{ backgroundColor: p_detail_color, cursor: 'pointer', borderRadius: '10px', paddingTop: '15px' }}
onClick={(event, value) => {
<nav className="disabled_style" style={{ backgroundColor: p_detail_color, cursor: 'pointer', borderRadius: '10px', paddingTop: '15px' }}
onClick={(event, value) => {
if (String(props.check_user_acces_right("stagiaire", "write")) === "1")
setDialog_GRP_COLOR_open(true)
}}
if (String(props.check_user_acces_right("stagiaire", "write")) === "1")
setDialog_GRP_COLOR_open(true)
}}
> &nbsp; Cliquer pour choisir </nav>
</div>
@ -4430,13 +4440,15 @@ const Groupe_Apprenant = (props) => {
setp_detail_type_groupe_code(value.code);
setgrp_apprenant_data_changed("1");
setp_detail_color(value.code_couleur);
setp_detail_type_groupe_id(value._id);
// console.log(" ## value = ", value)
// console.log(" ## value = ", value)
} else {
setp_detail_type_groupe_code("");
setgrp_apprenant_data_changed("1");
setp_detail_type_groupe_id("");
}
}}

View File

@ -517,15 +517,24 @@ const Module_Evaluation_Positionnement = (props) => {
setLoading(false);
//console.log(" In Export_Dashbord_to_CSV res.data = " + res.data);
if (String(res.data) === String("false")) {
alert("Impossible de générer le QR code (2) ");
setdisplay_alert_mysy("1");
setalert_message("Impossible de générer le QR code (2) ");
setalert_type("error");
} else {
fileDownload(res.data, nom_fichier_cmd)
fileDownload(res.data, nom_fichier_cmd);
setselectionModel_q_position([]);
setactionmass_q_position_val("");
}
}).catch((error) => {
setLoading(false);
console.error('Error:', error);
alert(" Impossible de générer le QR code ")
setdisplay_alert_mysy("1");
setalert_message(" Impossible de générer le QR code ");
setalert_type("error");
});

View File

@ -3495,6 +3495,103 @@ const Module_Session_Planification = (props) => {
}
const [New_Getall_Session_List_UE_result, setNew_Getall_Session_List_UE_result] = useState([]);
const [Getall_Session_List_UE_api, setGetall_Session_List_UE_api] = useState();
const [Getall_Session_List_UE_message, setGetall_Session_List_UE_message] = useState();
const [Getall_Session_List_UE_result, setGetall_Session_List_UE_result] = useState();
function Getall_Session_List_UE(event) {
var form = new FormData();
const stored_cookie = getCookie('tokenmysypart');
form.append("token", stored_cookie);
form.append("session_id", props.related_collection_recid);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Unite_Enseignement_Of_Given_Session_Id/";
setLoading(true);
axios.post(myurl, form).then(res => {
setLoading(false);
if (String(res.data.status) === String("true")) {
//console.log(" In Getall_Session_List_UE res.data.status = " + res.data.status);
//console.log(" In Getall_Session_List_UE res.data.message r_class = " + res.data.message);
setGetall_Session_List_UE_api("true");
setGetall_Session_List_UE_result(res.data.message);
var new_data2 = [];
const new_data = res.data.message.map((x) => {
//---
var localid = JSON.parse(x).id;
var local_id = JSON.parse(x)._id;
var local_code = JSON.parse(x).code;
var local_titre = JSON.parse(x).titre;
var local_credit = JSON.parse(x).credit;
var local_pres_dist_hyp = JSON.parse(x).pres_dist_hyp;
var local_is_noted = JSON.parse(x).is_noted;
//---
var node = {
"_id": local_id,
"id": localid,
"label": local_code + " - " + String(local_titre).substring(0, 50),
"code": local_code,
"titre": local_titre,
"credit": local_credit,
"pres_dist_hyp": local_pres_dist_hyp,
"is_noted": local_is_noted,
};
new_data2.push(node);
});
//---
var node = {
"_id": "",
"id": "",
"label": "",
"code": "",
"titre": "",
"credit": "",
"pres_dist_hyp": "",
"is_noted": "",
};
new_data2.push(node);
if (new_data2.length > 0)
setNew_Getall_Session_List_UE_result(new_data2);
// console.log(" ### new_data2 = ", new_data2);
}
else {
setGetall_Session_List_UE_api("false");
setGetall_Session_List_UE_message(res.data.message);
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("error");
}
}).catch((error) => {
setLoading(false);
console.warn('Not good man :( Getall_Session_List_UE = ', error);
setGetall_Session_List_UE_api("false");
alert(" Impossible de recuperer la liste des UE de la promotion ");
//setmyApimyApiMessage("")
})
}
const [New_Get_List_Given_UE_Planif_lines_result, setNew_Get_List_Given_UE_Planif_lines_result] = useState([]);
const [Get_List_Given_UE_Planif_lines_api, setGet_List_Given_UE_Planif_lines_api] = useState();
@ -3604,7 +3701,7 @@ const Module_Session_Planification = (props) => {
setSessionendDate(props.SessionendDate);
setSessionstartDate(props.SessionstartDate);
Getall_Class_List_UE();
Getall_Session_List_UE();
Getall_Partner_Groupe_Inscrit();
if (document.getElementById('menu_import_participant')) {
@ -5014,14 +5111,14 @@ const Module_Session_Planification = (props) => {
<div className="session_caract_Dialog" style={{ width: '50%' }}> UE / Matière
{New_Getall_Class_List_UE_result && New_Getall_Class_List_UE_result.length > 0 && <Autocomplete
{New_Getall_Session_List_UE_result && New_Getall_Session_List_UE_result.length > 0 && <Autocomplete
disablePortal
name="event_dialog_ue"
id="event_dialog_ue"
fullWidth
value={New_Getall_Class_List_UE_result.filter((data) => (data)._id === String(p_detail_sequence_ue_id))[0].label}
options={New_Getall_Class_List_UE_result}
value={New_Getall_Session_List_UE_result.filter((data) => (data)._id === String(p_detail_sequence_ue_id))[0].label}
options={New_Getall_Session_List_UE_result}
onChange={(event, value) => {
seteu_planif_line_insdispo("");
setp_detail_sequence_ue_planif_line_id("");
@ -6746,22 +6843,22 @@ const Module_Session_Planification = (props) => {
<div className="session_caract_Dialog" style={{ width: '50%' }}> UE / Matière
{New_Getall_Class_List_UE_result && New_Getall_Class_List_UE_result.length > 0 &&
{New_Getall_Session_List_UE_result && New_Getall_Session_List_UE_result.length > 0 &&
<Autocomplete
disablePortal
name="event_dialog_ue"
id="event_dialog_ue"
fullWidth
value={New_Getall_Class_List_UE_result.filter((data) => (data)._id === String(p_detail_sequence_ue_id))[0].label}
options={New_Getall_Class_List_UE_result}
value={New_Getall_Session_List_UE_result.filter((data) => (data)._id === String(p_detail_sequence_ue_id))[0].label}
options={New_Getall_Session_List_UE_result}
onChange={(event, value) => {
seteu_planif_line_insdispo("");
setp_detail_sequence_ue_planif_line_id("");
if (value && value._id) {
setp_detail_sequence_ue_id(value._id);
Get_List_Given_UE_Planif_lines(value._id);
setp_detail_sequence_title(New_Getall_Class_List_UE_result.filter((data) => (data)._id === String(value._id))[0].label);
setp_detail_sequence_title(New_Getall_Session_List_UE_result.filter((data) => (data)._id === String(value._id))[0].label);
} else {
setp_detail_sequence_ue_id("");
setNew_Get_List_Given_UE_Planif_lines_result([]);
@ -7457,7 +7554,7 @@ const Module_Session_Planification = (props) => {
eventContent={renderEventContent}
eventClick={handleEventClick}
eventChange={handleEventChange}
hiddenDays={[0]}
hiddenDays={[0]}
/>
</div>