recette2
cherif 2025-05-22 17:41:25 +02:00
parent 6ea27feca0
commit f7912c8353
2 changed files with 218 additions and 10 deletions

View File

@ -124,6 +124,7 @@ const DisplayPartnerStagiaires = (props) => {
const [selectionModel, setSelectionModel] = React.useState([]);
const [selectionModel_notes, setselectionModel_notes] = React.useState([]);
const [selectionModel_jury, setselectionModel_jury] = React.useState([]);
const [p_filtre1, setp_filtre1] = useState("");
@ -596,6 +597,24 @@ const DisplayPartnerStagiaires = (props) => {
]
const columns_jury = [
{ field: '_id', headerName: '_id', hide: true, editable: false, Width: 0 },
{ field: 'jury_id', headerName: 'jury_id', hide: true, editable: false, Width: 0 },
{ field: 'jury_soutenance_id', headerName: 'jury_soutenance_id', hide: true, editable: false, Width: 0 },
{ field: 'agenda_id', headerName: 'agenda_id', hide: true, editable: false, Width: 0 },
{ field: 'inscription_id', headerName: 'inscription_id', hide: true, editable: false, Width: 0 },
{ field: 'id', headerName: 'id', hide: true, Width: 0 },
{ field: 'soutenance_agenda_event_start', headerName: 'Debut ', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'soutenance_agenda_event_end', headerName: 'Fin', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'soutenance_code', headerName: 'Matière', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'soutenance_sujet', headerName: 'Sujet', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'soutenance_note', headerName: 'Note', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'soutenance_observation', headerName: 'Observation', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
]
function ExpandableCell_50({ value }) {
const [expanded, setExpanded] = React.useState(false);
@ -1225,8 +1244,7 @@ const DisplayPartnerStagiaires = (props) => {
Get_List_Of_All_PJ(line._id);
Get_Inscrit_Notes_Of_Evaluations(line._id, session_id);
Get_Inscrit_Jury(line._id, session_id);
}
@ -3138,6 +3156,45 @@ const DisplayPartnerStagiaires = (props) => {
})
}
const [Get_Inscrit_Jury_api, setGet_Inscrit_Jury_api] = useState();
const [Get_Inscrit_Jury_message, setGet_Inscrit_Jury_message] = useState();
const [Get_Inscrit_Jury_result, setGet_Inscrit_Jury_result] = useState([]);
function Get_Inscrit_Jury(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);
form.append("token", stored_cookie);
form.append("session_id", local_session_id);
form.append("tab_inscrit_ids", tab_my_inscription_ids);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Jury_Soutenenace_With_Filter/";
axios.post(myurl, form).then(res => {
if (String(res.data.status) === String("true")) {
//console.log(" In Get_Inscrit_Jury res.data.status = " + res.data.status);
//console.log(" In Get_Inscrit_Jury res.data.message r_class = " + res.data.message);
setGet_Inscrit_Jury_api("true");
setGet_Inscrit_Jury_result(res.data.message);
}
else {
setGet_Inscrit_Jury_api("false");
setGet_Inscrit_Jury_message(res.data.message);
}
}).catch((error) => {
console.warn('Not good man :( Get_Inscrit_Jury = ', error);
setGet_Inscrit_Jury_api("false");
//setmyApimyApiMessage("")
})
}
const [history_securite_read, sethistory_securite_read] = useState("");
useEffect(() => {
@ -8964,6 +9021,13 @@ const DisplayPartnerStagiaires = (props) => {
</div>
</div>
<div className="div_row" ref={myRef_details} id="myRef_details"> &nbsp;</div>
{selected_id && String(selected_id).length > 0 && <div className="div_row">
<nav style={{ textAlign: 'center', padding: '10px', fontFamily: 'DM Sans' }}> <b>{p_detail_prenom} </b> &nbsp;
<b>{p_detail_nom}</b> &nbsp;&nbsp;&nbsp; Email <b>{p_detail_mail} </b> &nbsp;&nbsp;&nbsp; Session <b> {p_detail_session_class}</b>
</nav>
</div>}
{((selected_id && String(selected_id).length > 2) || (String(addOneParticipant) === "1")) && <div className="div_row">
<Button variant="outlined" ref={myRef} onClick={submenu_detail_stagaire} className="detail_class_submenu" id='detail_session' name='detail_session'>Détail Participant</Button>
@ -11306,7 +11370,7 @@ 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' }}>
<nav style={{ "border": "None", "fontSize": "20px", "paddingTop": "5px", "paddingLeft": "5px", fontFamily: 'DM Sans' }}> Gestion des UE d'un inscrit </nav>
<nav style={{ "border": "None", "fontSize": "20px", "paddingTop": "5px", "paddingLeft": "5px", fontFamily: 'DM Sans' }}> Gestion des UE d'un inscrit </nav>
<div className="div_row">
@ -11451,16 +11515,17 @@ const DisplayPartnerStagiaires = (props) => {
</div>
<div className="div_row">
Afficher ici les notes finales par UE xxx <br/>
Afficher ici les notes finales par UE xxx <br />
</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' }}>
<nav style={{ "border": "None", "fontSize": "20px", "paddingTop": "5px", "paddingLeft": "5px", fontFamily: 'DM Sans' }}> Les notes de l'inscrit </nav>
<nav style={{ "border": "None", "fontSize": "20px", "paddingTop": "5px", "paddingLeft": "5px", fontFamily: 'DM Sans' }}> Les notes </nav>
<div className="div_row" style={{ "textAlign": "right", "marginTop": "0.5rem" }}>
<Button className="bton_emarge" onClick={(event) => {
@ -11607,6 +11672,148 @@ const DisplayPartnerStagiaires = (props) => {
</div>
<br />
<nav style={{ "border": "None", "fontSize": "20px", "paddingTop": "5px", "paddingLeft": "5px", fontFamily: 'DM Sans' }}> Jury de Soutenances </nav>
<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_jury(newSelectionModel);
/*if (newSelectionModel.length === 1)
handleClick_edit_session_From_Line(newSelectionModel);*/
if (newSelectionModel.length !== 1) {
}
}}
selectionModel={selectionModel_jury}
localeText={frFR.components.MuiDataGrid.defaultProps.localeText}
rows={Get_Inscrit_Jury_result.map((item, index) => (
{
id: index,
_id: JSON.parse(item)._id,
jury_id: JSON.parse(item).jury_id,
jury_soutenance_id: JSON.parse(item).jury_soutenance_id,
agenda_id: JSON.parse(item).agenda_id,
inscription_id: JSON.parse(item).inscription_id,
soutenance_sujet: (JSON.parse(item).soutenance_sujet).substring(0, 50),
soutenance_note: JSON.parse(item).soutenance_note,
soutenance_observation: (JSON.parse(item).soutenance_observation).substring(0, 50),
soutenance_agenda_event_start: JSON.parse(item).soutenance_agenda_event_start,
soutenance_agenda_event_end: JSON.parse(item).soutenance_agenda_event_end,
soutenance_code: JSON.parse(item).soutenance_code,
}
))}
columns={columns_jury}
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>}

View File

@ -7021,9 +7021,9 @@ const Jury = (props) => {
</div>}
{selected_jury_cible && String(selected_jury_cible) === "matiere" && New_Option_Cible_Jury &&
{selected_jury_cible && String(selected_jury_cible) === "soutenance" && New_Option_Cible_Jury &&
New_Get_List_UE_From_Session_Id_result && New_Get_List_UE_From_Session_Id_result.length > 0 &&
<div className="session_caract"> <b> Matière 2</b> <br />
<div className="session_caract"> <b> Matière</b> <br />
<Autocomplete
disablePortal
id="detail_jury_matiere"
@ -7480,8 +7480,9 @@ const Jury = (props) => {
</div>}
{selected_jury_cible && String(selected_jury_cible) === "matiere" && New_Option_Cible_Jury &&
{selected_jury_cible && String(selected_jury_cible) === "soutenance" && New_Option_Cible_Jury &&
New_Get_List_UE_From_Session_Id_result && New_Get_List_UE_From_Session_Id_result.length > 0 &&
<div className="session_caract"> <b> Matière </b> <br />
<Autocomplete