diff --git a/src/components/DisplayPartnerStagiaires.js b/src/components/DisplayPartnerStagiaires.js
index dda993f..d8c5b8e 100644
--- a/src/components/DisplayPartnerStagiaires.js
+++ b/src/components/DisplayPartnerStagiaires.js
@@ -1042,6 +1042,9 @@ const DisplayPartnerStagiaires = (props) => {
const [selected_session_id, setselected_session_id] = useState();
const [selected_code_session, setselected_code_session] = useState();
const [selected_internal_url, setselected_internal_url] = useState();
+
+ const [selected_class_id, setselected_class_id] = useState();
+
const [selected_class_title, setselected_class_title] = useState();
const [selected_participant_email, setselected_participant_email] = useState();
@@ -2004,7 +2007,7 @@ const DisplayPartnerStagiaires = (props) => {
}
function submenu_unite_enseignement() {
-
+
setsubmenu("ue");
setdisplay_detail_stagiaire();
setdisplay_detail_absence();
@@ -2505,6 +2508,106 @@ const DisplayPartnerStagiaires = (props) => {
+ const [New_Get_Inscrit_List_Evaluation_Par_UE_result, setNew_Get_Inscrit_List_Evaluation_Par_UE_result] = useState([]);
+ const [tab_inscrit_evaluation_ue_id, settab_inscrit_evaluation_ue_id] = useState([]);
+
+ const [Get_Inscrit_List_Evaluation_Par_UE_api, setGet_Inscrit_List_Evaluation_Par_UE_api] = useState();
+ const [Get_Inscrit_List_Evaluation_Par_UE_message, setGet_Inscrit_List_Evaluation_Par_UE_message] = useState();
+ const [Get_Inscrit_List_Evaluation_Par_UE_result, setGet_Inscrit_List_Evaluation_Par_UE_result] = useState();
+ function Get_Inscrit_List_Evaluation_Par_UE(local_inscription_id) {
+ var form = new FormData();
+
+ const stored_cookie = getCookie('tokenmysypart');
+ form.append("token", stored_cookie);
+ form.append("inscription_id", local_inscription_id);
+
+
+ var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Inscrit_List_EU_Type_Evaluation/";
+
+ setLoading(true);
+
+ axios.post(myurl, form).then(res => {
+
+ setLoading(false);
+
+ if (String(res.data.status) === String("true")) {
+ //console.log(" In Get_Inscrit_List_Evaluation_Par_UE res.data.status = " + res.data.status);
+ //console.log(" In Get_Inscrit_List_Evaluation_Par_UE res.data.message r_class = " + res.data.message);
+ setGet_Inscrit_List_Evaluation_Par_UE_api("true");
+ setGet_Inscrit_List_Evaluation_Par_UE_result(res.data.message);
+
+ var new_data2 = [];
+
+ var tab_tmp = []
+ const new_data = res.data.message.map((x) => {
+
+ //---
+ var localid = JSON.parse(x).id;
+ var local_id = JSON.parse(x)._id;
+ var local_class_id = JSON.parse(x).class_id;
+ var local_class_eu_id = JSON.parse(x).class_eu_id;
+ var local_class_eu_code = JSON.parse(x).class_eu_code;
+ var local_type_eval__id = JSON.parse(x).type_eval__id;
+ var local_type_eval_code = JSON.parse(x).type_eval_code;
+ var local_type_eval_nom = JSON.parse(x).type_eval_nom;
+
+ tab_tmp.push(local_type_eval__id);
+
+ //---
+ var node = {
+ "_id": local_id,
+ "id": localid,
+ "label": local_class_eu_code + " - " + local_type_eval_code,
+ "class_id": local_class_id,
+ "class_eu_id": local_class_eu_id,
+ "class_eu_code": local_class_eu_code,
+ "type_eval__id": local_type_eval__id,
+ "type_eval_code": local_type_eval_code,
+ "type_eval_nom": local_type_eval_nom,
+ };
+ new_data2.push(node);
+
+
+ });
+
+ //---
+ var node = {
+ "_id": "",
+ "id": "",
+ "label": "",
+ "class_id": "",
+ "class_eu_id": "",
+ "class_eu_code": "",
+ "type_eval__id": "",
+ "type_eval_code": "",
+ "type_eval_nom": "",
+ };
+ new_data2.push(node);
+
+
+ if (new_data2.length > 0) {
+ setNew_Get_Inscrit_List_Evaluation_Par_UE_result(new_data2);
+ settab_inscrit_evaluation_ue_id(tab_tmp)
+
+ }
+
+
+ }
+ else {
+ setGet_Inscrit_List_Evaluation_Par_UE_api("false");
+ setGet_Inscrit_List_Evaluation_Par_UE_message(res.data.message);
+ }
+
+ }).catch((error) => {
+ setLoading(false);
+ console.warn('Not good man :( Get_Inscrit_List_Evaluation_Par_UE = ', error);
+ setGet_Inscrit_List_Evaluation_Par_UE_api("false");
+ //setmyApimyApiMessage("")
+ })
+ }
+
+
+
const [nb_stagiaire_Inscrit, setnb_stagiaire_Inscrit] = useState("0");
const hiddenFileInput_session = React.useRef(null);
const [Edite_session, setEdite_session] = useState();
@@ -2607,6 +2710,100 @@ const DisplayPartnerStagiaires = (props) => {
}
+
+ const [New_Getall_Class_List_Evalution_result, setNew_Getall_Class_List_Evalution_result] = useState([]);
+
+ const [Getall_Class_List_Evalution_api, setGetall_Class_List_Evalution_api] = useState();
+ const [Getall_Class_List_Evalution_message, setGetall_Class_List_Evalution_message] = useState();
+ const [Getall_Class_List_Evalution_result, setGetall_Class_List_Evalution_result] = useState([]);
+ function Getall_Class_List_Evalution(local_class_id) {
+
+ var form = new FormData();
+
+ const stored_cookie = getCookie('tokenmysypart');
+ form.append("token", stored_cookie);
+ form.append("class_id", local_class_id);
+
+ var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Class_Evaluation/";
+
+ setLoading(true);
+
+ axios.post(myurl, form).then(res => {
+
+
+ setLoading(false);
+ if (String(res.data.status) === String("true")) {
+ //console.log(" In Getall_Class_List_Evalution res.data.status = " + res.data.status);
+ //console.log(" In Getall_Class_List_Evalution res.data.message r_class = " + res.data.message);
+ setGetall_Class_List_Evalution_api("true");
+ setGetall_Class_List_Evalution_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_class_id = JSON.parse(x).class_id;
+ var local_class_ue_id = JSON.parse(x).class_ue_id;
+ var local_class_ue_code = JSON.parse(x).class_ue_code;
+ var local_type_evaluation_id = JSON.parse(x).type_evaluation_id;
+ var local_type_evaluation_code = JSON.parse(x).type_evaluation_code;
+ var local_max_note = JSON.parse(x).max_note;
+
+
+ //---
+ var node = {
+ "_id": local_id,
+ "id": localid,
+ "label": local_type_evaluation_code + "-" + local_class_ue_code,
+ "class_id": local_class_id,
+ "class_ue_id": local_class_ue_id,
+ "class_ue_code": local_class_ue_code,
+ "type_evaluation_id": local_type_evaluation_id,
+ "type_evaluation_code": local_type_evaluation_code,
+ "max_note": local_max_note,
+
+
+ };
+ new_data2.push(node);
+ });
+
+ //---
+ var node = {
+ "_id": "",
+ "id": "",
+ "label": "",
+ "class_id": "",
+ "class_ue_id": "",
+ "class_ue_code": "",
+ "type_evaluation_id": "",
+ "type_evaluation_code": "",
+ "max_note": "",
+
+ };
+ new_data2.push(node);
+
+ if (new_data2.length > 0)
+ setNew_Getall_Class_List_Evalution_result(new_data2);
+ }
+ else {
+ setGetall_Class_List_Evalution_api("false");
+ setGetall_Class_List_Evalution_message(res.data.message);
+ alert(res.data.message);
+ }
+
+ }).catch((error) => {
+
+ setLoading(false);
+ console.warn('Not good man :( Getall_Class_List_Evalution = ', error);
+ setGetall_Class_List_Evalution_api("false");
+ alert(" Impossible de recuperer la liste des évaluations de la formatio");
+ //setmyApimyApiMessage("")
+ })
+ }
+
+
useEffect(() => {
Getall_TrainingParticipant();
Getall_TrainingSession();
@@ -5853,6 +6050,9 @@ const DisplayPartnerStagiaires = (props) => {
const icon =