Compare commits

...

2 Commits

Author SHA1 Message Date
cherif f7912c8353 dd 2025-05-22 17:41:25 +02:00
cherif 6ea27feca0 hhh 2025-05-21 20:22:11 +02:00
6 changed files with 1185 additions and 32 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,7 +11515,7 @@ 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>
@ -11460,7 +11524,8 @@ 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' }}>
<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>}

File diff suppressed because it is too large Load Diff

View File

@ -1914,7 +1914,6 @@
align-items: center;
text-align: center;
margin-bottom: 0.5rem !important;
}
.separator::before {

View File

@ -496,7 +496,7 @@
}
.bton_enreg {
font-family: DM sans;
font-family: DM sans;
border-radius: 5rem;
font-size: small;
background: #81BC3A !important;
@ -1103,7 +1103,7 @@
}
.bton_enreg {
font-family: DM sans;
font-family: DM sans;
border-radius: 5rem;
font-size: small;
background: #81BC3A !important;
@ -1552,7 +1552,7 @@
}
.bton_enreg {
font-family: DM sans;
font-family: DM sans;
border-radius: 5rem;
font-size: small;
background: #81BC3A !important;
@ -1734,7 +1734,7 @@
text-align: center;
margin-bottom: 0.8rem;
color: white;
cursor: normal;
cursor: normal;
font-style: italic;
background-color: gray;
font-weight: normal;
@ -2150,7 +2150,7 @@
}
.bton_enreg {
font-family: DM sans;
font-family: DM sans;
border-radius: 5rem;
font-size: small;
background: #81BC3A !important;
@ -2332,7 +2332,7 @@
text-align: center;
margin-bottom: 0.8rem;
color: white;
cursor: normal;
cursor: normal;
font-style: italic;
background-color: gray;
font-weight: normal;
@ -2429,6 +2429,48 @@
// end media
.separator {
display: flex;
align-items: center;
text-align: center;
margin-bottom: 0.5rem !important;
}
.separator::before {
content: '';
flex: 1;
border-top: 4px double #999;
}
.separator::after {
content: '';
flex: 1;
border-top: 4px double #999;
}
.separator:not(:empty)::before {
margin-right: .35em;
}
.separator:not(:empty)::after {
margin-left: .35em;
}
.separator_label {
width: 10rem;
float: left;
font-family: 'DM Sans';
color: blue;
font-weight: 600;
font-size: 14px;
background: #d5d8dc;
text-align: center;
border: none;
}
.session_caract_Dialog_comment_2_lines {
width: 100%;