recette2
cherif 2024-06-08 19:32:25 +02:00
parent b19682f330
commit 10050539a7
3 changed files with 1315 additions and 58 deletions

File diff suppressed because it is too large Load Diff

View File

@ -6255,6 +6255,47 @@ const DisplayPartnerStagiaires = (props) => {
})
}
function Export_Inscrit_Notes() {
const stored_cookie = getCookie('tokenmysypart');
var tab_my_inscription_ids = [];
tab_my_inscription_ids.push(selected_id);
var tab_session_id = [];
tab_session_id.push(selected_session_id);
var nom_fichier_cmd = "export_notes.xlsx";
var url = process.env.REACT_APP_API_URL + "myclass/api/Export_Excel_List_Participant_Notes/" + stored_cookie + "/" + tab_session_id + "/"+tab_my_inscription_ids+"/";
//console.log(" ### url = ", url);
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 notes (2) ");
} else {
fileDownload(res.data, nom_fichier_cmd)
}
}).catch((error) => {
setLoading(false);
console.error('Error:', error);
alert(" Impossible d'exporter les notes ")
});
setLoading(false);
}
return (
<div className="displaypartnerstagiaire">
{isLoading && <div className="loader-container">
@ -10428,6 +10469,11 @@ const DisplayPartnerStagiaires = (props) => {
{String(props.formation_initiale) === "1" && String(submenu) === "notes" && String(display_notes) === "1" && String(addOneParticipant) !== "1" && <div className="div_row" style={{ "border": "None", "background": '#F8F9F9', "padding": '5px' }}>
<h3> Les notes de l'inscrit </h3>
<div className="div_row" style={{ "textAlign": "right", "marginTop": "0.5rem" }}>
<Button className="bton_emarge" onClick={(event) => {
Export_Inscrit_Notes();
}}>Exporter (excel)</Button>
</div>
<div className="session_data">
<div style={{ "border": "None", paddingRight: '10px' }}>

View File

@ -4657,6 +4657,7 @@ const Notes_Evaluation = (props) => {
}
</div>
<div className="div_row" style={{ "border": "None" }}>
&nbsp;
</div>
@ -4672,8 +4673,6 @@ const Notes_Evaluation = (props) => {
</div>
<div className="div_row" style={{ "border": "None" }}>
<div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
<div className="div_row_gauche" style={{ "textAlign": 'left', 'marginLeft': '15px' }}>