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

@ -2917,7 +2917,7 @@ const DisplayPartnerStagiaires = (props) => {
form.append("tab_session_id", tab_session_id);
form.append("tab_inscription_id", tab_my_inscription_ids);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Participant_Notes/";
axios.post(myurl, form).then(res => {
@ -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' }}>
@ -10440,7 +10486,7 @@ const DisplayPartnerStagiaires = (props) => {
width: '100%',
paddingRight: '1px',
/*"& .MuiDataGrid-virtualScrollerRenderZone": {
"& .MuiDataGrid-row": {
"&:nth-child(2n)": { backgroundColor: "rgba(235, 235, 235, .7)" }
@ -10476,7 +10522,7 @@ const DisplayPartnerStagiaires = (props) => {
/*if (newSelectionModel.length === 1)
handleClick_edit_session_From_Line(newSelectionModel);*/
if (newSelectionModel.length !== 1) {
}
}}
selectionModel={selectionModel_notes}
@ -10497,7 +10543,7 @@ const DisplayPartnerStagiaires = (props) => {
eval_date_heure_debut: JSON.parse(item).eval_date_heure_debut,
eval_date_heure_fin: JSON.parse(item).eval_date_heure_fin,
note: JSON.parse(item).note,
}
))}
@ -10506,7 +10552,7 @@ const DisplayPartnerStagiaires = (props) => {
className="datagridclass"
onRowDoubleClick={(newSelectionModel) => {
}}
rowsPerPageOptions={[10]}
@ -10545,7 +10591,7 @@ const DisplayPartnerStagiaires = (props) => {
return 'line--statut--selected';
}
else if (parseInt(String(params.row.id)) % 2 === 0) {
return 'line--statut--pair';
}

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' }}>