16/05/2025 - 18h

recette2
cherif 2025-05-16 18:43:00 +02:00
parent 1d0189b0c9
commit da34ce1096
6 changed files with 2126 additions and 1251 deletions

View File

@ -531,6 +531,27 @@ const Apprenant = (props) => {
]
const columns_notes = [
{ field: '_id', headerName: '_id', hide: true, editable: false, Width: 0 },
{ field: 'evaluation_id', headerName: 'evaluation_id', hide: true, editable: false, Width: 0 },
{ field: 'inscription_id', headerName: 'inscription_id', hide: true, editable: false, Width: 0 },
{ field: 'note_evaluation_id', headerName: 'session_id', hide: true, editable: false, Width: 0 },
{ field: 'id', headerName: 'id', hide: true, Width: 0 },
{ field: 'class_eu_id', headerName: 'class_eu_id', hide: true, Width: 0 },
{ field: 'type_eval_id', headerName: 'type_eval_id', hide: true, Width: 0 },
{ field: 'class_ue_code', headerName: 'Code UE', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'class_ue_titre', headerName: 'Titre UE', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'note_evaluation_code', headerName: 'Evaluation', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'eval_date_heure_debut', headerName: 'Debut Eval', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'eval_date_heure_fin', headerName: 'Fin Eval', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'note', headerName: 'Note', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
]
function handleClick_delete_suivi_pedago(event, cellValues) {
@ -1186,6 +1207,7 @@ const Apprenant = (props) => {
const [p_detail_one_file_to_download_type_name, setp_detail_one_file_to_download_type_name] = useState();
const [selectionModel_notes, setselectionModel_notes] = React.useState([]);
const [getPartnerImages_api, setgetPartnerImages_api] = useState();
@ -1909,6 +1931,9 @@ const Apprenant = (props) => {
Get_Appenant_List_Inscription(line._id);
Get_Apprenant_Notes_Of_Evaluations(line._id, "");
}
@ -2071,7 +2096,6 @@ const Apprenant = (props) => {
setDialog_add_inscription_open(true);
}
}
@ -2537,8 +2561,8 @@ const Apprenant = (props) => {
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Suivi_Pedagogique_No_Filter/";
axios.post(myurl, form).then(res => {
//console.log(" In Get_Appenant_List_Suivi_Pedagogique res.data.status = " + res.data.status);
//console.log(" In Get_Appenant_List_Suivi_Pedagogique res.data.message r_class = " + res.data.message);
// console.log(" In Get_Appenant_List_Suivi_Pedagogique res.data.status = " + res.data.status);
// console.log(" In Get_Appenant_List_Suivi_Pedagogique res.data.message r_class = " + res.data.message);
if (String(res.data.status) === String("true")) {
setGet_Appenant_List_Suivi_Pedagogique_api("true");
@ -3346,6 +3370,8 @@ const Apprenant = (props) => {
const [display_detail_piece_joint, setdisplay_detail_piece_joint] = useState("");
const [display_menu_suivi_pedagogique, setdisplay_menu_suivi_pedagogique] = useState("");
const [display_detail_notes, setdisplay_detail_notes] = useState("");
async function submenu_add_one_inscription() {
setDialog_add_inscription_open(true);
@ -3367,6 +3393,8 @@ const Apprenant = (props) => {
setdisplay_detail_absence("");
setdisplay_detail_historique("");
setdisplay_detail_piece_joint("");
setdisplay_detail_notes("");
@ -3381,7 +3409,8 @@ const Apprenant = (props) => {
}
function submenu_color_management(current_menu) {
const list_sous_menu = ['detail_apprenant', 'inscriptions', 'absences', 'suivi_pedagogique', 'historique', 'piece_jointe', 'piece_jointe']
const list_sous_menu = ['detail_apprenant', 'inscriptions', 'absences', 'suivi_pedagogique', 'historique',
'piece_jointe', 'notes']
for (let i = 0; i < list_sous_menu.length; i++) {
@ -3425,7 +3454,8 @@ const Apprenant = (props) => {
setdisplay_detail_absence("");
setdisplay_detail_historique("");
setdisplay_detail_piece_joint("");
setdisplay_menu_suivi_pedagogique("")
setdisplay_menu_suivi_pedagogique("");
setdisplay_detail_notes("");
}
@ -3443,7 +3473,8 @@ const Apprenant = (props) => {
setdisplay_detail_absence("");
setdisplay_detail_historique("");
setdisplay_detail_piece_joint("");
setdisplay_menu_suivi_pedagogique("")
setdisplay_menu_suivi_pedagogique("");
setdisplay_detail_notes("");
}
async function submenu_absence() {
@ -3458,7 +3489,8 @@ const Apprenant = (props) => {
setdisplay_detail_inscriptions("");
setdisplay_detail_historique("");
setdisplay_detail_piece_joint("");
setdisplay_menu_suivi_pedagogique("")
setdisplay_menu_suivi_pedagogique("");
setdisplay_detail_notes("");
}
async function submenu_suivi_pedagogique() {
@ -3474,6 +3506,7 @@ const Apprenant = (props) => {
setdisplay_detail_inscriptions("");
setdisplay_detail_historique("");
setdisplay_detail_piece_joint("");
setdisplay_detail_notes("");
Get_Appenant_List_Suivi_Pedagogique(selected_apprenant_id);
}
@ -3491,6 +3524,7 @@ const Apprenant = (props) => {
setdisplay_detail_inscriptions("");
setdisplay_detail_absence("");
setdisplay_detail_piece_joint("");
setdisplay_detail_notes("");
}
async function submenu_piece_jointe() {
@ -3506,6 +3540,24 @@ const Apprenant = (props) => {
setdisplay_detail_apprenant("");
setdisplay_detail_inscriptions("");
setdisplay_detail_absence("");
setdisplay_detail_notes("");
}
async function submenu_notes() {
setsubmenu("notes");
submenu_color_management("notes");
//await sleep(5);
setdisplay_detail_notes("1")
setdisplay_detail_piece_joint("")
setdisplay_detail_historique("");
setadd_One_Apprenant("");
setdisplay_detail_apprenant("");
setdisplay_detail_inscriptions("");
setdisplay_detail_absence("");
setdisplay_menu_suivi_pedagogique("");
}
@ -3530,6 +3582,8 @@ const Apprenant = (props) => {
submenu_detail_apprenant();
Get_Apprenant_Notes_Of_Evaluations(selected_apprenant_id, "");
}
@ -4461,10 +4515,10 @@ const Apprenant = (props) => {
setAdd_Update_Apprenant_Tuteur_result(res.data.message);
Dialog_tuteur_1_handleClose_buton();
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("success");
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("success");
}
else {
@ -5046,7 +5100,90 @@ const Apprenant = (props) => {
function clear_display_alert_mysy() {
setdisplay_alert_mysy("");
}
const [Get_Apprenant_Notes_Of_Evaluations_api, setGet_Apprenant_Notes_Of_Evaluations_api] = useState();
const [Get_Apprenant_Notes_Of_Evaluations_message, setGet_Apprenant_Notes_Of_Evaluations_message] = useState();
const [Get_Apprenant_Notes_Of_Evaluations_result, setGet_Apprenant_Notes_Of_Evaluations_result] = useState([]);
function Get_Apprenant_Notes_Of_Evaluations(local_inscription, local_session_id) {
var form = new FormData();
const stored_cookie = getCookie('tokenmysypart');
var tab_my_inscription_ids = [];
tab_my_inscription_ids.push(local_inscription);
var tab_session_id = [];
tab_session_id.push(local_session_id);
form.append("token", stored_cookie);
form.append("list_session_id", tab_session_id);
form.append("list_apprenant_id", tab_my_inscription_ids);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Apprenant_Notes_With_Filter/";
axios.post(myurl, form).then(res => {
// console.log(" In Get_Apprenant_Notes_Of_Evaluations res.data.status = " + res.data.status);
// console.log(" In Get_Apprenant_Notes_Of_Evaluations res.data.message r_class = " + res.data.message);
if (String(res.data.status) === String("true")) {
setGet_Apprenant_Notes_Of_Evaluations_api("true");
setGet_Apprenant_Notes_Of_Evaluations_result(res.data.message);
}
else {
setGet_Apprenant_Notes_Of_Evaluations_api("false");
setGet_Apprenant_Notes_Of_Evaluations_message(res.data.message);
}
}).catch((error) => {
console.warn('Not good man :( Get_Apprenant_Notes_Of_Evaluations = ', error);
setGet_Apprenant_Notes_Of_Evaluations_api("false");
//setmyApimyApiMessage("")
})
}
function Export_Apprenant_Notes() {
const stored_cookie = getCookie('tokenmysypart');
var list_session_id = "-";
var list_ue_id = "-";
var list_apprenant_id = String(selected_apprenant_id)
var nom_fichier_cmd = "export_notes.xlsx";
var url = process.env.REACT_APP_API_URL + "myclass/api/Export_To_Excel_List_Apprenant_Notes_With_Filter/" + stored_cookie + "/" + list_session_id + "/" + list_ue_id + "/"+list_apprenant_id;
//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="apprenant">
@ -5096,7 +5233,7 @@ const Apprenant = (props) => {
>
<DialogTitle style={{ cursor: 'move', fontFamily:"DM Sans"}} id="draggable-dialog-title" >MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', fontFamily: "DM Sans" }} id="draggable-dialog-title" >MySy Information</DialogTitle>
<DialogContent>
<DialogContentText>
{Dialog_Suivi_Pedago_message}
@ -5213,7 +5350,7 @@ const Apprenant = (props) => {
aria-labelledby="draggable-dialog-title"
>
<DialogTitle style={{ cursor: 'move', fontFamily:"DM Sans"}} id="draggable-dialog-title" >Apprenant</DialogTitle>
<DialogTitle style={{ cursor: 'move', fontFamily: "DM Sans" }} id="draggable-dialog-title" >Apprenant</DialogTitle>
<DialogContent className="DialogContent_width">
<div>
@ -5372,7 +5509,7 @@ const Apprenant = (props) => {
>
<DialogTitle style={{ cursor: 'move', fontFamily:"DM Sans"}} id="draggable-dialog-title">Tuteur {quel_tuteur}</DialogTitle>
<DialogTitle style={{ cursor: 'move', fontFamily: "DM Sans" }} id="draggable-dialog-title">Tuteur {quel_tuteur}</DialogTitle>
{String(quel_tuteur) === "1" && <DialogContent className="DialogContent_width">
<DialogContentText>
{Dialog_tuteur_1_message}
@ -5806,7 +5943,7 @@ const Apprenant = (props) => {
aria-labelledby="draggable-dialog-title"
>
<DialogTitle style={{ cursor: 'move', fontFamily:"DM Sans"}} id="draggable-dialog-title" > Inscrire </DialogTitle>
<DialogTitle style={{ cursor: 'move', fontFamily: "DM Sans" }} id="draggable-dialog-title" > Inscrire </DialogTitle>
<DialogContent className="DialogContent_width">
{New_Getall_TrainingSession_result && <div className="session_caract_Dialog"> <b> Session</b>
@ -5969,7 +6106,7 @@ const Apprenant = (props) => {
aria-labelledby="draggable-dialog-title"
>
<DialogTitle style={{ cursor: 'move', fontFamily:"DM Sans"}} id="draggable-dialog-title" >MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', fontFamily: "DM Sans" }} id="draggable-dialog-title" >MySy Information</DialogTitle>
<DialogContent className="DialogContent_width" style={{ "minHeight": "20rem" }}>
@ -6040,7 +6177,7 @@ const Apprenant = (props) => {
</Dialog>
<h3 style={{ fontFamily:'DM Sans' }}> Mes apprenants </h3>
<h3 style={{ fontFamily: 'DM Sans' }}> Mes apprenants </h3>
<div>
<div className="titre1"> Utilisez les filtres !</div>
<div className="div_row" style={{ "marginBottom": "5px" }}>
@ -6516,6 +6653,9 @@ const Apprenant = (props) => {
<Button variant="outlined" onClick={submenu_piece_jointe} className="detail_class_submenu" id='piece_jointe' name='piece_jointe'>Pièces Jointes </Button>
<Button variant="outlined" onClick={submenu_absence} className="detail_class_submenu" id='absences' name='absences'>Absences </Button>
{String(props.formation_initiale) === "1" && <Button variant="outlined" onClick={submenu_notes} className="detail_class_submenu" id='notes' name='notes'>Notes </Button>}
<Button variant="outlined" onClick={submenu_suivi_pedagogique} className="detail_class_submenu" id='suivi_pedagogique' name='suivi_pedagogique'>Suivi Pédago. </Button>
{/*<Button variant="outlined" onClick={submenu_historique} className="detail_class_submenu" id='historique' name='historique'>Historique </Button>*/}
@ -8846,6 +8986,160 @@ const Apprenant = (props) => {
</div>}
{String(display_detail_notes) === "1" && String(add_One_Apprenant) !== "1" && selected_apprenant_id && <div className="div_row" style={{ "border": "None", "background": '#F8F9F9', "padding": '5px' }}>
<nav style={{ "border": "None", "fontSize": "20px", "paddingTop": "5px", "paddingLeft": "5px", fontFamily: 'DM Sans' }}> Les notes de l'apprenant </nav>
<div className="div_row" style={{ "textAlign": "right", "marginTop": "0.5rem" }}>
<Button className="bton_emarge" onClick={(event) => {
Export_Apprenant_Notes();
}}>Exporter (excel)</Button>
</div>
<div className="session_data">
<div style={{ "border": "None", paddingRight: '10px' }}>
<div style={{ height: 550, width: '100%', paddingRight: '5px' }}>
&nbsp;
<Box
sx={{
height: 500,
width: '100%',
paddingRight: '1px',
/*"& .MuiDataGrid-virtualScrollerRenderZone": {
"& .MuiDataGrid-row": {
"&:nth-child(2n)": { backgroundColor: "rgba(235, 235, 235, .7)" }
}
},*/
"& .MuiDataGrid-columnHeaders": {
backgroundColor: "#c8cfd5",
color: "black",
fontSize: 14
},
'& .line--statut--pair': {
backgroundColor: 'rgba(235, 235, 235, .7)',
color: 'black',
},
'& .line--statut--impair': {
backgroundColor: '#FFFFFF',
color: 'black',
},
'& .line--statut--selected': {
backgroundColor: '#FBF2EF',
color: 'black',
},
}}
>
<DataGrid
checkboxSelection
onSelectionModelChange={(newSelectionModel) => {
setselectionModel_notes(newSelectionModel);
/*if (newSelectionModel.length === 1)
handleClick_edit_session_From_Line(newSelectionModel);*/
if (newSelectionModel.length !== 1) {
}
}}
selectionModel={selectionModel_notes}
localeText={frFR.components.MuiDataGrid.defaultProps.localeText}
rows={Get_Apprenant_Notes_Of_Evaluations_result.map((item, index) => (
{
id: index,
_id: JSON.parse(item)._id,
evaluation_id: JSON.parse(item).evaluation_id,
inscription_id: JSON.parse(item).inscription_id,
note_evaluation_id: JSON.parse(item).note_evaluation_id,
class_eu_id: JSON.parse(item).class_eu_id,
type_eval_id: JSON.parse(item).type_eval_id,
class_ue_code: JSON.parse(item).class_ue_code,
class_ue_titre: JSON.parse(item).class_ue_titre,
note_evaluation_code: JSON.parse(item).note_evaluation_code,
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,
}
))}
columns={columns_notes}
pageSize={10}
className="datagridclass"
onRowDoubleClick={(newSelectionModel) => {
}}
rowsPerPageOptions={[10]}
disableSelectionOnClick
components={{
Toolbar: GridToolbar,
}}
//sx={datagridSx}
getCellClassName={(params) => {
//field === 'distantiel'
if (params.field === 'distantiel' && String(params.value) === "1") {
return 'cell--distantiel';
}
if (params.field === "presentiel" && String(params.value) == "1") {
return 'cell--presentiel';
}
//field === "statut"
if (params.field === "status" && String(params.value) == "0") {
return 'cell--statut--preinscrit';
}
if (params.field === "status" && String(params.value) == "1") {
return 'cell--statut--inscrit';
}
if (params.field === "status" && String(params.value) == "-1") {
return 'cell--statut--annule';
}
}}
getRowClassName={(params) => {
// Pour la gestion de la couleur de zone double cliquée
if (String(params.row.id) === String(gridline_id)) {
return 'line--statut--selected';
}
else if (parseInt(String(params.row.id)) % 2 === 0) {
return 'line--statut--pair';
}
else if (parseInt(String(params.row.id)) % 2 !== 0) {
return 'line--statut--impair';
}
}}
getEstimatedRowHeight={() => 200}
getRowHeight={() => "auto"}
/>
</Box>
<br />
</div>
</div>
</div>
</div>}
</div >
);
}

View File

@ -11306,7 +11306,9 @@ const DisplayPartnerStagiaires = (props) => {
{String(props.formation_initiale) === "1" && String(submenu) === "ue" && String(addOneParticipant) !== "1" && <div className="div_row" style={{ "border": "None", "background": '#F8F9F9', "padding": '5px' }}>
<h3 style={{ fontFamily: 'DM Sans' }}> Gestion des UE d'un inscrit </h3>
<nav style={{ "border": "None", "fontSize": "20px", "paddingTop": "5px", "paddingLeft": "5px", fontFamily: 'DM Sans' }}> Gestion des UE d'un inscrit </nav>
<div className="div_row">
<div className="session_caract"> <b>Unite D'enseignement </b> <br />
@ -11453,11 +11455,13 @@ const DisplayPartnerStagiaires = (props) => {
</div>
</div>}
</div>}
{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 style={{ fontFamily: 'DM Sans' }}> Les notes de l'inscrit </h3>
<nav style={{ "border": "None", "fontSize": "20px", "paddingTop": "5px", "paddingLeft": "5px", fontFamily: 'DM Sans' }}> Les notes de l'inscrit </nav>
<div className="div_row" style={{ "textAlign": "right", "marginTop": "0.5rem" }}>
<Button className="bton_emarge" onClick={(event) => {
Export_Inscrit_Notes();

File diff suppressed because it is too large Load Diff

View File

@ -2274,7 +2274,8 @@ const Module_Editique = (props) => {
</div>
{(String(selected_convention_type) === "email" || String(selected_convention_type) === "pdf") && <div className="session_caract_Dialog" > Choisir une convocation
{(String(selected_convention_type) === "email" || String(selected_convention_type) === "pdf") &&
<div className="session_caract_Dialog" > Choisir une convocation
<Autocomplete
disablePortal
name="event_dialog_version_convention"

View File

@ -5586,7 +5586,7 @@ const Notes_Evaluation = (props) => {
<div style={{ "border": "None" }}>
<nav style={{ "border": "None", "fontSize": "20px", "paddingTop": "5px", "paddingLeft": "5px" }}> Liste des apprenants ou Groupes d'apprenants </nav>
<nav style={{ "border": "None", "fontSize": "20px", "paddingTop": "5px", "paddingLeft": "5px", fontFamily: 'DM Sans' }}> Liste des apprenants ou Groupes d'apprenants </nav>
<div className="div_row" style={{ "textAlign": "right", "marginTop": "0.5rem" }}>
<Button className="bton_emarge" onClick={(event) => {

View File

@ -2610,7 +2610,8 @@ const Partner = (props) => {
<Apprenant conntected_employee_id={conntected_employee_id} object_key={orderid} subdata={packs}
read_access={check_user_acces_right("stagiaire", "read")} write_access={check_user_acces_right("stagiaire", "write")}
check_user_acces_right={check_user_acces_right} />
check_user_acces_right={check_user_acces_right}
formation_initiale={formation_initiale} />
</div>
}
@ -3401,7 +3402,8 @@ const Partner = (props) => {
<Apprenant conntected_employee_id={conntected_employee_id} object_key={orderid} subdata={packs}
read_access={check_user_acces_right("stagiaire", "read")} write_access={check_user_acces_right("stagiaire", "write")}
check_user_acces_right={check_user_acces_right} />
check_user_acces_right={check_user_acces_right}
formation_initiale={formation_initiale}/>
</div>
}