08/05/2025 - 14h
parent
6e87449aa6
commit
a920814520
|
@ -724,8 +724,70 @@ const Jury = (props) => {
|
|||
}, [])
|
||||
|
||||
|
||||
|
||||
|
||||
const [GetCurrentSession_api, setGetCurrentSession_api] = useState();
|
||||
const [GetCurrentSession_message, setGetCurrentSession_message] = useState();
|
||||
const [GetCurrentSession_result, setGetCurrentSession_result] = useState([]);
|
||||
function GetCurrentSession(local_session_id) {
|
||||
|
||||
|
||||
var form = new FormData();
|
||||
//form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("session_id", local_session_id);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Given_SessionFormation_From_Id/";
|
||||
|
||||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
||||
if (String(res.data.status) === "true") {
|
||||
//console.log(" In GetCurrentSession res.data.status = " + res.data.status);
|
||||
//console.log(" In GetCurrentSession res.data.message r_class = " + res.data.message);
|
||||
//console.log(" In GetCurrentSession res.data.message len = " + String(res.data.message).length);
|
||||
|
||||
setLoading(false);
|
||||
setGetCurrentSession_api("true");
|
||||
if (String(res.data.message).length > 0) {
|
||||
setGetCurrentSession_result(res.data.message);
|
||||
}
|
||||
|
||||
} else if (String(res.data.status) === String("Err_Connexion")) {
|
||||
setLoading(false);
|
||||
alert('Erreur: ' + res.data.message);
|
||||
history.push("/Connexion");
|
||||
}
|
||||
|
||||
else {
|
||||
setLoading(false);
|
||||
setGetCurrentSession_api("false");
|
||||
setGetCurrentSession_message(res.data.message);
|
||||
// alert(res.data.message);
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("error");
|
||||
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.warn('Not good man :( GetCurrentSession = ', error);
|
||||
setGetCurrentSession_api("false");
|
||||
alert(" Impossible de récuperer les données de la session ");
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const myRef_head = useRef(null);
|
||||
const myRef = useRef(null)
|
||||
const myRef_note_classemment = useRef(null)
|
||||
|
||||
|
||||
|
||||
const sleep = (milliseconds) => {
|
||||
return new Promise(resolve => setTimeout(resolve, milliseconds))
|
||||
}
|
||||
|
@ -1920,6 +1982,8 @@ const Jury = (props) => {
|
|||
const [p_detail_linked_collection, setp_detail_linked_collection] = useState("");
|
||||
const [p_detail_linked_collection_recid, setp_detail_linked_collection_recid] = useState("");
|
||||
|
||||
const [seance_linked_class_id, setseance_linked_class_id] = useState("");
|
||||
|
||||
|
||||
const [startDate, setStartDate] = useState(new Date());
|
||||
const [endDate, setendDate] = useState(new Date());
|
||||
|
@ -2089,7 +2153,7 @@ const Jury = (props) => {
|
|||
'justified': String(JSON.parse(obj).justified),
|
||||
|
||||
'linked_collection': String(local_linked_collection),
|
||||
'linked_collection_recid':String(local_linked_collection_recid),
|
||||
'linked_collection_recid': String(local_linked_collection_recid),
|
||||
}
|
||||
|
||||
tab_event.push(local_val);
|
||||
|
@ -2302,7 +2366,7 @@ const Jury = (props) => {
|
|||
})
|
||||
}
|
||||
|
||||
const [display_view, setdisplay_view] = useState("planning");
|
||||
const [display_view, setdisplay_view] = useState("list");
|
||||
function func_display_planning_view() {
|
||||
setdisplay_view("planning");
|
||||
}
|
||||
|
@ -2347,6 +2411,10 @@ const Jury = (props) => {
|
|||
var local_code_session = JSON.parse(x).code_session;
|
||||
var local_invoiced_statut = JSON.parse(x).invoiced_statut;
|
||||
|
||||
var local_class_id = ""
|
||||
if( JSON.parse(x).class_id)
|
||||
local_class_id = JSON.parse(x).class_id;
|
||||
|
||||
|
||||
|
||||
//---
|
||||
|
@ -2358,6 +2426,7 @@ const Jury = (props) => {
|
|||
"titre": local_title_session,
|
||||
"code_session": local_code_session,
|
||||
"invoiced_statut": local_invoiced_statut,
|
||||
"class_id": local_class_id,
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
||||
|
@ -2373,6 +2442,7 @@ const Jury = (props) => {
|
|||
"titre": "",
|
||||
"code_session": "",
|
||||
"invoiced_statut": "",
|
||||
"class_id": "",
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
||||
|
@ -2588,7 +2658,7 @@ const Jury = (props) => {
|
|||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
setp_detail_linked_collection_recid(value._id);
|
||||
}else{
|
||||
} else {
|
||||
setp_detail_linked_collection_recid("");
|
||||
}
|
||||
|
||||
|
@ -2638,7 +2708,7 @@ const Jury = (props) => {
|
|||
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div className="session_caract_Dialog" > Titre
|
||||
<TextField
|
||||
|
@ -4302,7 +4372,17 @@ const Jury = (props) => {
|
|||
onRowDoubleClick={(newSelectionModel) => {
|
||||
setp_detail_linked_collection_recid(newSelectionModel.row.event_linked_collection_recid);
|
||||
setsubmenu_detail_seance("notes_classement");
|
||||
|
||||
GetCurrentSession(newSelectionModel.row.event_linked_collection_recid);
|
||||
|
||||
if (document.getElementById('myRef_note_classemment')) {
|
||||
var divh = document.getElementById('myRef_note_classemment').offsetTop;
|
||||
|
||||
window.scrollTo({
|
||||
top: divh,
|
||||
behavior: "smooth",
|
||||
});
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
rowsPerPageOptions={[10]}
|
||||
|
@ -4374,15 +4454,16 @@ const Jury = (props) => {
|
|||
</div>}
|
||||
|
||||
|
||||
|
||||
{String(submenu_detail_seance) === String("notes_classement") && <div style={{ "border": "None" }}>
|
||||
<div className="div_row" ref={myRef_note_classemment} id="myRef_note_classemment"> </div>
|
||||
{String(submenu_detail_seance) === String("notes_classement") && GetCurrentSession_result.length > 0 &&
|
||||
|
||||
<div style={{ "border": "None" }}>
|
||||
|
||||
|
||||
|
||||
<Module_Session_Notes_Classement
|
||||
<Module_Session_Notes_Classement
|
||||
conntected_employee_id={props.conntected_employee_id}
|
||||
related_collection={"session_formation"}
|
||||
related_collection_recid={p_detail_linked_collection_recid}
|
||||
session_class_id={JSON.parse(GetCurrentSession_result).class_id}
|
||||
/>
|
||||
|
||||
</div>}
|
||||
|
|
|
@ -8,18 +8,12 @@ import { getCookie, setCookie } from 'react-use-cookie';
|
|||
import { useHistory } from "react-router-dom";
|
||||
import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid';
|
||||
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
|
||||
|
||||
import 'react-tooltip/dist/react-tooltip.css'
|
||||
|
||||
import 'reactjs-popup/dist/index.css';
|
||||
|
||||
|
||||
import "react-datepicker/dist/react-datepicker.css";
|
||||
|
||||
import 'moment/locale/fr';
|
||||
|
||||
import Box from '@mui/material/Box';
|
||||
|
||||
import { Tooltip } from 'react-tooltip'
|
||||
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
|
||||
|
||||
import Autocomplete from '@mui/material/Autocomplete';
|
||||
|
@ -30,9 +24,9 @@ import { PiDotsThree } from "react-icons/pi";
|
|||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import Paper from '@material-ui/core/Paper';
|
||||
import Draggable from 'react-draggable';
|
||||
|
||||
|
||||
|
||||
import InputAdornment from '@mui/material/InputAdornment';
|
||||
import { AiFillCloseCircle } from "react-icons/ai";
|
||||
import { MdAddCircleOutline, MdRemoveCircleOutline } from "react-icons/md";
|
||||
import Module_Alert_Confirmation from "./Module_Alert_Confirmation";
|
||||
|
||||
function PaperComponent(props) {
|
||||
|
@ -177,8 +171,8 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
{ field: 'seuil_validation', headerName: 'Seuil val.', minwidth: 100, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'ue_coefficient', headerName: 'Coeff.', minwidth: 100, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'credit', headerName: 'Credit.', minwidth: 100, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
field: 'ue_validation', headerName: 'Validé', minwidth: 100, flex: 1, hide: false, editable: false,
|
||||
|
||||
|
@ -206,7 +200,7 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
{ field: 'regle_calcul', headerName: 'regle_calcul', hide: true },
|
||||
|
||||
]
|
||||
|
||||
const myRef_head = useRef(null);
|
||||
|
||||
const [New_Getall_Session_Detail_Final_Note_Classement_result, setNew_Getall_Session_Detail_Final_Note_Classement_result] = useState([]);
|
||||
|
||||
|
@ -222,6 +216,36 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
form.append("token", stored_cookie);
|
||||
form.append("tab_session_id", props.related_collection_recid);
|
||||
|
||||
// Recuperation des parametres
|
||||
var filtre1 = p_filtre1;
|
||||
var filtre2 = p_filtre2;
|
||||
|
||||
|
||||
var filtre1_value = "";
|
||||
var filtre2_value = "";
|
||||
|
||||
// Recuperation des valeurs de filtres
|
||||
|
||||
if (p_filtre1_value && String(p_filtre1) === "ue_id") {
|
||||
filtre1_value = p_filtre1_value;
|
||||
form.append("tab_ue_id", filtre1_value);
|
||||
}
|
||||
else if (p_filtre1_value && String(p_filtre1) === "inscrit_id") {
|
||||
filtre1_value = p_filtre1_value;
|
||||
form.append("tab_inscrit_id", filtre1_value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (p_filtre2_value && String(p_filtre2) === "ue_id") {
|
||||
filtre2_value = p_filtre2_value;
|
||||
form.append("tab_ue_id", filtre2_value);
|
||||
}
|
||||
else if (p_filtre2_value && String(p_filtre2) === "inscrit_id") {
|
||||
filtre2_value = p_filtre2_value;
|
||||
form.append("tab_inscrit_id", filtre2_value);
|
||||
}
|
||||
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Evaluation_Final_Note_Classement_Detail_With_Filter";
|
||||
|
||||
|
@ -328,6 +352,9 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const [Calcul_Note_Classement_Session_api, setCalcul_Note_Classement_Session_api] = useState();
|
||||
const [Calcul_Note_Classement_Session_message, setCalcul_Note_Classement_Session_message] = useState();
|
||||
const [Calcul_Note_Classement_Session_result, setCalcul_Note_Classement_Session_result] = useState([]);
|
||||
|
@ -398,6 +425,37 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
form.append("tab_session_id", props.related_collection_recid);
|
||||
|
||||
|
||||
// Recuperation des parametres
|
||||
var filtre1 = p_filtre1;
|
||||
var filtre2 = p_filtre2;
|
||||
|
||||
|
||||
var filtre1_value = "";
|
||||
var filtre2_value = "";
|
||||
|
||||
// Recuperation des valeurs de filtres
|
||||
|
||||
if (p_filtre1_value && String(p_filtre1) === "ue_id") {
|
||||
filtre1_value = p_filtre1_value;
|
||||
form.append("tab_ue_id", filtre1_value);
|
||||
}
|
||||
else if (p_filtre1_value && String(p_filtre1) === "inscrit_id") {
|
||||
filtre1_value = p_filtre1_value;
|
||||
form.append("tab_inscrit_id", filtre1_value);
|
||||
}
|
||||
|
||||
|
||||
if (p_filtre2_value && String(p_filtre2) === "ue_id") {
|
||||
filtre2_value = p_filtre2_value;
|
||||
form.append("tab_ue_id", filtre2_value);
|
||||
}
|
||||
else if (p_filtre2_value && String(p_filtre2) === "inscrit_id") {
|
||||
filtre2_value = p_filtre2_value;
|
||||
form.append("tab_inscrit_id", filtre2_value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Evaluation_UE_Note_Classement_With_Filter";
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
@ -525,6 +583,7 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
|
||||
|
||||
|
||||
|
||||
const [New_Getall_Session_Final_Note_Classement_result, setNew_Getall_Session_Final_Note_Classement_result] = useState([]);
|
||||
|
||||
const [Getall_Session_Final_Note_Classement_api, setGetall_Session_Final_Note_Classement_api] = useState();
|
||||
|
@ -540,6 +599,8 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
form.append("session_id", props.related_collection_recid);
|
||||
|
||||
|
||||
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Evaluation_Inscriptio_Note_Classement_With_Filter";
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
@ -635,11 +696,240 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
Getall_Session_Detail_Final_Note_Classement();
|
||||
Getall_Session_UE_Final_Note_Classement();
|
||||
Getall_Session_Final_Note_Classement();
|
||||
Getall_Class_List_UE();
|
||||
|
||||
GetListeInscrit(props.related_collection_recid);
|
||||
|
||||
}, [])
|
||||
|
||||
const [nb_stagiaire_Inscrit, setnb_stagiaire_Inscrit] = useState("0");
|
||||
const [rowss_insc, setRows_insc] = useState([]);
|
||||
|
||||
|
||||
const [New_GetListeInscrit_result, setNew_GetListeInscrit_result] = useState([]);
|
||||
|
||||
const [GetListeInscrit_insc_api, setGetListeInscrit_insc_api] = useState();
|
||||
const [GetListeInscrit_insc_meassage, setGetListeInscrit_insc_meassage] = useState();
|
||||
const [GetListeInscrit_insc_result, setGetListeInscrit_insc_result] = useState([])
|
||||
function GetListeInscrit(localsessionid) {
|
||||
var form = new FormData();
|
||||
//form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("session_id", localsessionid);
|
||||
form.append("status", "1");
|
||||
|
||||
/*
|
||||
|
||||
/!\ : Cette fonction a besoin d'un token actif
|
||||
*/
|
||||
|
||||
if (String(stored_cookie) === String("")) {
|
||||
alert(" La session n'est plus valide ");
|
||||
history.push("/Connexion");
|
||||
return;
|
||||
}
|
||||
|
||||
setLoading(true);
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetAllClassStagiaire/";
|
||||
|
||||
fetch(myurl,
|
||||
{
|
||||
method: 'POST',
|
||||
body: form,
|
||||
})
|
||||
.then((data) => data.json())
|
||||
.then((data) => {
|
||||
setLoading(false);
|
||||
//console.log(' GetListeInscrit : Success:', data['message'], "data['status'] = ", data['status']);
|
||||
setGetListeInscrit_insc_result(data['message']);
|
||||
|
||||
if (String(data['status']) === String("true")) {
|
||||
|
||||
//console.log("erreur rrrr:" + data['status'])
|
||||
setGetListeInscrit_insc_api("true");
|
||||
setnb_stagiaire_Inscrit(data['message'].length);
|
||||
//console.log(" ### setnb_stagiaire_Inscrit = ", data['message'].length);
|
||||
|
||||
|
||||
var new_data2 = [];
|
||||
const new_data = data['message'].map((x) => {
|
||||
|
||||
//---
|
||||
var localid = JSON.parse(x).id;
|
||||
var local_id = JSON.parse(x)._id;
|
||||
var email = JSON.parse(x).email;
|
||||
var civilite = JSON.parse(x).civilite;
|
||||
var prenom = JSON.parse(x).prenom;
|
||||
var nom = JSON.parse(x).nom;
|
||||
|
||||
var label = JSON.parse(x).nom + " " + JSON.parse(x).prenom;
|
||||
|
||||
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
"email": email,
|
||||
"civilite": civilite,
|
||||
"prenom": prenom,
|
||||
"nom": nom,
|
||||
"label": label,
|
||||
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
});
|
||||
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": "",
|
||||
"id": "",
|
||||
"email": "",
|
||||
"civilite": "",
|
||||
"prenom": "",
|
||||
"label": "",
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
||||
if (new_data2.length > 0)
|
||||
setNew_GetListeInscrit_result(new_data2);
|
||||
else
|
||||
setNew_GetListeInscrit_result([])
|
||||
|
||||
//console.log(" ## new_data2 = ", new_data2)
|
||||
|
||||
} else if (String(data['status']) === String("Err_Connexion")) {
|
||||
alert('Erreur: ' + data['message']);
|
||||
history.push("/Connexion");
|
||||
}
|
||||
else {
|
||||
setGetListeInscrit_insc_api("false");
|
||||
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.error('Error:', error);
|
||||
setGetListeInscrit_insc_api("false");
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
const [New_Getall_Class_List_UE_result, setNew_Getall_Class_List_UE_result] = useState([]);
|
||||
|
||||
const [Getall_Class_List_UE_api, setGetall_Class_List_UE_api] = useState();
|
||||
const [Getall_Class_List_UE_message, setGetall_Class_List_UE_message] = useState();
|
||||
const [Getall_Class_List_UE_result, setGetall_Class_List_UE_result] = useState([]);
|
||||
function Getall_Class_List_UE(event) {
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
|
||||
if (props.session_class_id)
|
||||
form.append("class_id", props.session_class_id);
|
||||
|
||||
else {
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(" Paramètres incomplets");
|
||||
setalert_type("error");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Unite_Enseignement_Of_Given_Class/";
|
||||
|
||||
setLoading(true);
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
||||
setLoading(false);
|
||||
if (String(res.data.status) === String("true")) {
|
||||
//console.log(" In Getall_Class_List_UE res.data.status = " + res.data.status);
|
||||
// console.log(" In Getall_Class_List_UE res.data.message r_class = " + res.data.message);
|
||||
setGetall_Class_List_UE_api("true");
|
||||
setGetall_Class_List_UE_result(res.data.message);
|
||||
|
||||
var new_data2 = [];
|
||||
const new_data = res.data.message.map((x) => {
|
||||
|
||||
//---
|
||||
var localid = JSON.parse(x).id;
|
||||
var local_id = JSON.parse(x)._id;
|
||||
var local_code = JSON.parse(x).code;
|
||||
var local_titre = JSON.parse(x).titre;
|
||||
|
||||
|
||||
var local_credit = JSON.parse(x).credit;
|
||||
var local_pres_dist_hyp = JSON.parse(x).pres_dist_hyp;
|
||||
var local_is_noted = JSON.parse(x).is_noted;
|
||||
var local_coefficient = JSON.parse(x).coefficient;
|
||||
var local_seuil_validation = JSON.parse(x).seuil_validation;
|
||||
|
||||
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
"label": local_code,
|
||||
"code": local_code,
|
||||
"titre": local_titre,
|
||||
"credit": local_credit,
|
||||
"pres_dist_hyp": local_pres_dist_hyp,
|
||||
"is_noted": local_is_noted,
|
||||
"coefficient": local_coefficient,
|
||||
"seuil_validation": local_seuil_validation,
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
});
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": "",
|
||||
"id": "",
|
||||
"label": "",
|
||||
"code": "",
|
||||
"titre": "",
|
||||
"credit": "",
|
||||
"pres_dist_hyp": "",
|
||||
"is_noted": "",
|
||||
"coefficient": "",
|
||||
"seuil_validation": "",
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
||||
if (new_data2.length > 0)
|
||||
setNew_Getall_Class_List_UE_result(new_data2);
|
||||
}
|
||||
else {
|
||||
setGetall_Class_List_UE_api("false");
|
||||
setGetall_Class_List_UE_message(res.data.message);
|
||||
//alert(res.data.message);
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("error");
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
|
||||
setLoading(false);
|
||||
console.warn('Not good man :( Getall_Class_List_UE = ', error);
|
||||
setGetall_Class_List_UE_api("false");
|
||||
alert(" Impossible de recuperer la liste des UE de la formation");
|
||||
//setmyApimyApiMessage("")
|
||||
})
|
||||
}
|
||||
|
||||
const [gridline_session_inscrit_id, setgridline_session_inscrit_id] = useState("");
|
||||
const [selectionModel_note_Session_classement, setselectionModel_note_Session_classement] = React.useState([]);
|
||||
|
||||
|
@ -666,6 +956,69 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
}
|
||||
|
||||
|
||||
|
||||
const [p_filtre1, setp_filtre1] = useState("");
|
||||
const [p_filtre1_value, setp_filtre1_value] = useState("");
|
||||
|
||||
const [p_filtre2, setp_filtre2] = useState("");
|
||||
const [p_filtre2_value, setp_filtre2_value] = useState("");
|
||||
|
||||
const [p_filtre3, setp_filtre3] = useState("");
|
||||
const [p_filtre3_value, setp_filtre3_value] = useState("");
|
||||
|
||||
const [p_filtre4, setp_filtre4] = useState("");
|
||||
const [p_filtre4_value, setp_filtre4_value] = useState("");
|
||||
|
||||
function clean_all_filters() {
|
||||
setgridline_id('');
|
||||
setp_filtre1("");
|
||||
setp_filtre1_value("");
|
||||
|
||||
setp_filtre2("");
|
||||
setp_filtre2_value("");
|
||||
|
||||
setp_filtre3("");
|
||||
setp_filtre3_value("");
|
||||
|
||||
setp_filtre4("");
|
||||
setp_filtre4_value("");
|
||||
|
||||
// Annule_Add_One_Jury_DetailFields();
|
||||
|
||||
// Getall_Partner_Jury();
|
||||
|
||||
}
|
||||
|
||||
const New_Option_Filter = [
|
||||
{ "id": "ue_id", "label": "Code UE", "value": "ue_id" },
|
||||
{ "id": "inscrit_id", "label": "Apprenant ", "value": "inscrit_id" },
|
||||
{ "id": "", "label": "", "value": "" },
|
||||
{ "id": "1", "label": "", "value": "1" }, // Cette ligne pour couvrir l'ajout d'une ligne de filter. C'est fait expres.
|
||||
]
|
||||
|
||||
function clean_all_filters() {
|
||||
|
||||
setp_filtre1("");
|
||||
setp_filtre1_value("");
|
||||
|
||||
setp_filtre2("");
|
||||
setp_filtre2_value("");
|
||||
|
||||
setp_filtre3("");
|
||||
setp_filtre3_value("");
|
||||
|
||||
setp_filtre4("");
|
||||
setp_filtre4_value("");
|
||||
|
||||
Getall_Session_Detail_Final_Note_Classement();
|
||||
Getall_Session_UE_Final_Note_Classement();
|
||||
Getall_Session_Final_Note_Classement();
|
||||
Getall_Class_List_UE();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<div className="module_session_note_classement">
|
||||
|
||||
|
@ -684,6 +1037,8 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
}
|
||||
{/*** FIN Affichage des messages d'alerte*/}
|
||||
|
||||
|
||||
|
||||
<div style={{ "border": "None" }}>
|
||||
|
||||
<div className="div_row" style={{ paddingRight: '10px' }}>
|
||||
|
@ -873,6 +1228,323 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
|
||||
<div style={{ "border": "None" }}>
|
||||
|
||||
{/***** On n'affiche les filtre que si necessaire */}
|
||||
<div className="div_row">
|
||||
|
||||
<div className="div_row" style={{ "marginBottom": "5px" }}>
|
||||
<div className="div_row_gauche texte_area_filter" >
|
||||
|
||||
{New_Option_Filter && New_Option_Filter.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="filtre1"
|
||||
id="filtre1"
|
||||
className="disabled_style"
|
||||
value={New_Option_Filter.filter((data) => (data).value === String(p_filtre1))[0].label}
|
||||
options={New_Option_Filter}
|
||||
onChange={(event, value) => {
|
||||
if (value && value.value) {
|
||||
setp_filtre1(value.value);
|
||||
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div className="div_row_droite texte_area_filter_value" >
|
||||
{p_filtre1 && String(p_filtre1) === "ue_id" && New_Getall_Class_List_UE_result.length > 0 &&
|
||||
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="filtre1_value"
|
||||
id="filtre1_value"
|
||||
className="disabled_style"
|
||||
// value={New_Getall_Class_List_UE_result.filter((data) => (data)._id === String(p_filtre1_value))[0].label}
|
||||
options={New_Getall_Class_List_UE_result}
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
setp_filtre1_value(value._id);
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
}
|
||||
|
||||
{p_filtre1 && String(p_filtre1) === "inscrit_id" && New_GetListeInscrit_result.length > 0 &&
|
||||
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="filtre1_value"
|
||||
id="filtre1_value"
|
||||
className="disabled_style"
|
||||
// value={New_Getall_Class_List_UE_result.filter((data) => (data)._id === String(p_filtre1_value))[0].label}
|
||||
options={New_GetListeInscrit_result}
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
setp_filtre1_value(value._id);
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
}
|
||||
|
||||
</div>
|
||||
{p_filtre1 && <div className='filter_bton_add'>
|
||||
<Tooltip className="tooltip_css" id="my-tooltip01" style={{ "fontSize": "12px" }} />
|
||||
<a data-tooltip-id="my-tooltip01" data-tooltip-html="Ajouter une nouvelle ligne de filtre">
|
||||
<MdAddCircleOutline onClick={(e) => {
|
||||
setp_filtre2("1");
|
||||
setp_filtre2_value("");
|
||||
}} />
|
||||
</a>
|
||||
</div>}
|
||||
{p_filtre1 && <div className='filter_bton_add'>
|
||||
<Tooltip className="tooltip_css" id="my-tooltip02" style={{ "fontSize": "12px" }} />
|
||||
<a data-tooltip-id="my-tooltip02" data-tooltip-html="Supprimer cette ligne de filtre">
|
||||
<MdRemoveCircleOutline onClick={(e) => {
|
||||
setp_filtre1("");
|
||||
setp_filtre1_value("");
|
||||
}}
|
||||
/>
|
||||
</a>
|
||||
</div>}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
{p_filtre2 &&
|
||||
<div className="div_row" style={{ "marginBottom": "5px" }}>
|
||||
<div className="div_row_gauche texte_area_filter">
|
||||
|
||||
{New_Option_Filter && New_Option_Filter.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="filtre2"
|
||||
id="filtre2"
|
||||
className="disabled_style"
|
||||
value={New_Option_Filter.filter((data) => (data).value === String(p_filtre2))[0].label}
|
||||
options={New_Option_Filter}
|
||||
onChange={(event, value) => {
|
||||
if (value && value.value) {
|
||||
setp_filtre2(value.value);
|
||||
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
|
||||
</div>
|
||||
<div className="div_row_droite texte_area_filter_value" style={{ "marginTop": "0.5rem" }}>
|
||||
{String(p_filtre2).length > 2 && String(p_filtre2) === "ue_id" && New_Getall_Class_List_UE_result.length > 0 &&
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="filtre2_value"
|
||||
id="filtre2_value"
|
||||
className="disabled_style"
|
||||
// value={New_Getall_Class_List_UE_result.filter((data) => (data)._id === String(p_filtre1_value))[0].label}
|
||||
options={New_Getall_Class_List_UE_result}
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
setp_filtre2_value(value._id);
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
}
|
||||
|
||||
{String(p_filtre2).length > 2 && String(p_filtre2) === "inscrit_id" && New_GetListeInscrit_result.length > 0 &&
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="filtre2_value"
|
||||
id="filtre2_value"
|
||||
className="disabled_style"
|
||||
// value={New_Getall_Class_List_UE_result.filter((data) => (data)._id === String(p_filtre1_value))[0].label}
|
||||
options={New_GetListeInscrit_result}
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
setp_filtre2_value(value._id);
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
|
||||
{String(p_filtre2).length > 2 && <div className='filter_bton_add' >
|
||||
<Tooltip className="tooltip_css" id="my-tooltip03" style={{ "fontSize": "12px" }} />
|
||||
<a data-tooltip-id="my-tooltip03" data-tooltip-html="Ajouter une nouvelle ligne de filtre">
|
||||
<MdAddCircleOutline
|
||||
onClick={(e) => {
|
||||
setp_filtre3("1");
|
||||
setp_filtre3_value("");
|
||||
}}
|
||||
/>
|
||||
</a>
|
||||
</div>}
|
||||
|
||||
{String(p_filtre2).length > 2 && <div className='filter_bton_add'>
|
||||
<Tooltip className="tooltip_css" id="my-tooltip04" style={{ "fontSize": "12px" }} />
|
||||
<a data-tooltip-id="my-tooltip04" data-tooltip-html="Supprimer cette ligne de filtre">
|
||||
<MdRemoveCircleOutline
|
||||
onClick={(e) => {
|
||||
setp_filtre2("");
|
||||
setp_filtre2_value("");
|
||||
}}
|
||||
/>
|
||||
</a>
|
||||
</div>}
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
{p_filtre3 &&
|
||||
<div className="div_row" style={{ "marginBottom": "5px" }}>
|
||||
<div className="div_row_gauche texte_area_filter">
|
||||
|
||||
{New_Option_Filter && New_Option_Filter.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="filtre3"
|
||||
id="filtre3"
|
||||
className="disabled_style"
|
||||
value={New_Option_Filter.filter((data) => (data).value === String(p_filtre3))[0].label}
|
||||
options={New_Option_Filter}
|
||||
onChange={(event, value) => {
|
||||
if (value && value.value) {
|
||||
setp_filtre3(value.value);
|
||||
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
|
||||
|
||||
</div>
|
||||
<div className="div_row_droite texte_area_filter_value" style={{ "marginTop": "0.5rem" }}>
|
||||
{String(p_filtre3).length > 2 &&
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="filtre3_value"
|
||||
id="filtre3_value"
|
||||
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_filtre3_value}
|
||||
onChange={(e) => setp_filtre3_value(e.target.value)}
|
||||
InputProps={{
|
||||
endAdornment: (
|
||||
<InputAdornment position="end">
|
||||
<AiFillCloseCircle
|
||||
style={{ 'cursor': "pointer", "color": "orangered" }}
|
||||
onClick={(e) => {
|
||||
setp_filtre3_value("");
|
||||
}} />
|
||||
</InputAdornment>
|
||||
),
|
||||
}}
|
||||
|
||||
/>}
|
||||
</div>
|
||||
|
||||
{String(p_filtre2).length > 2 && <div className='filter_bton_add' >
|
||||
<Tooltip className="tooltip_css" id="my-tooltip03" style={{ "fontSize": "12px" }} />
|
||||
<a data-tooltip-id="my-tooltip03" data-tooltip-html="Ajouter une nouvelle ligne de filtre">
|
||||
<MdAddCircleOutline
|
||||
onClick={(e) => {
|
||||
setp_filtre4("1");
|
||||
setp_filtre4_value("");
|
||||
}}
|
||||
/>
|
||||
</a>
|
||||
</div>}
|
||||
|
||||
{String(p_filtre3).length > 2 && <div className='filter_bton_add'>
|
||||
<Tooltip className="tooltip_css" id="my-tooltip05" style={{ "fontSize": "12px" }} />
|
||||
<a data-tooltip-id="my-tooltip05" data-tooltip-html="Supprimer cette ligne de filtre">
|
||||
<MdRemoveCircleOutline onClick={(e) => {
|
||||
setp_filtre3("");
|
||||
setp_filtre3_value("");
|
||||
}} />
|
||||
</a>
|
||||
</div>}
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
<div className="div_row" ref={myRef_head} id="myRef_head" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
|
||||
|
||||
<div className="div_row_gauche" style={{ "textAlign": 'left', 'marginLeft': '15px' }}>
|
||||
<Button variant="contained" className="bton_enreg"
|
||||
onClick={(event) => {
|
||||
|
||||
Getall_Session_UE_Final_Note_Classement();
|
||||
Getall_Session_Detail_Final_Note_Classement();
|
||||
}} >
|
||||
|
||||
Appliquer
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
|
||||
<Button variant="contained" className="bton_annule" onClick={clean_all_filters}>Annuler
|
||||
</Button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<br />
|
||||
</div>
|
||||
|
||||
{/******* End filtre */}
|
||||
|
||||
<div className="div_row" style={{ paddingRight: '10px' }}>
|
||||
|
||||
<div className="session_data">
|
||||
|
|
Loading…
Reference in New Issue