diff --git a/src/components/AddClassManual.js b/src/components/AddClassManual.js index f77a38e..15ea58f 100644 --- a/src/components/AddClassManual.js +++ b/src/components/AddClassManual.js @@ -498,10 +498,9 @@ const AddClassManual = (props) => { const columns_list_evaluation_unite_enseignement = [ { field: 'id', headerName: 'id', hide: true }, { field: '_id', headerName: '_id', hide: true }, - { diplome_id: '_id', headerName: 'diplome_id', hide: true }, + { field: 'diplome_id', headerName: 'diplome_id', hide: true }, { field: 'class_id', headerName: 'class_id', Width: 0, hide: true, }, - - { field: 'class_ue_id', headerName: 'class_ue_id', Width: 0, hide: true }, + { field: 'class_ue_id', headerName: 'class_ue_id', hide: true }, { field: 'diplome_code', headerName: 'Diplome.', minWidth: 150, flex: 1, renderCell: (params) => , }, @@ -511,11 +510,21 @@ const AddClassManual = (props) => { renderCell: (cellValues) => { return (
- {New_Getall_Class_List_UE_result && New_Getall_Class_List_UE_result.length > 0 && } + { + New_Getall_Class_List_UE_result && + New_Getall_Class_List_UE_result.length > 0 && ( + + ) + } +
@@ -4738,6 +4747,7 @@ const AddClassManual = (props) => { setadd_one_eu_to_class(""); setselected_ue_coefficient("1"); setselected_ue_seuil_validation(""); + setselected_ue_domaine_competence_id(""); setselected_ue_diplome_id("") setselected_ue_semestre(""); @@ -4748,6 +4758,7 @@ const AddClassManual = (props) => { setselected_ue_id(""); setselected_ue_credit_ects(""); setselected_ue_seuil_validation(""); + setselected_ue_domaine_competence_id(""); setselected_ue_semestre(""); setselected_ue_is_noted("1"); setselected_ue_pres_dist_hyp("0"); @@ -4762,6 +4773,7 @@ const AddClassManual = (props) => { setselected_ue_id(""); setselected_ue_credit_ects(""); setselected_ue_seuil_validation(""); + setselected_ue_domaine_competence_id(""); setselected_ue_semestre(""); setselected_ue_is_noted("1"); setselected_ue_pres_dist_hyp("0"); @@ -4796,6 +4808,10 @@ const AddClassManual = (props) => { form.append("is_noted", selected_ue_is_noted); form.append("seuil_validation", selected_ue_seuil_validation); + form.append("diplome_id", selected_ue_diplome_id); + form.append("domaine_competence_id", selected_ue_domaine_competence_id); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Update_UE_To_Class/"; @@ -6891,6 +6907,7 @@ const AddClassManual = (props) => { setselected_ue_diplome_id(""); setselected_ue_credit_ects(""); setselected_ue_seuil_validation(""); + setselected_ue_domaine_competence_id(""); setselected_ue_semestre(""); setselected_ue_is_noted("1"); setselected_ue_pres_dist_hyp("0"); @@ -7658,7 +7675,7 @@ const AddClassManual = (props) => { - +
Est Evalué
@@ -8369,7 +8386,11 @@ const AddClassManual = (props) => { setgridline_ue_id(newSelectionModel.row.id); setselected_ue_id(newSelectionModel.row._id) - var current_class_ue_data = New_Getall_Class_List_UE_result.filter((ue_data) => ue_data._id === String((newSelectionModel.row._id))) + var current_class_ue_data = New_Getall_Class_List_UE_result.filter((ue_data) => + ue_data._id === String(newSelectionModel.row._id) && + ue_data.diplome_id === String(newSelectionModel.row.diplome_id) && + ue_data.domaine_competence_id === String(newSelectionModel.row.domaine_competence_id) + ); // console.log(" ### current_class_ue_data[0] = ", current_class_ue_data[0]); setselected_ue_credit_ects(current_class_ue_data[0]['credit']); @@ -8378,6 +8399,8 @@ const AddClassManual = (props) => { setselected_ue_pres_dist_hyp(current_class_ue_data[0]['pres_dist_hyp']); setselected_ue_coefficient(current_class_ue_data[0]['coefficient']); setselected_ue_seuil_validation(current_class_ue_data[0]['seuil_validation']); + setselected_ue_domaine_competence_id(current_class_ue_data[0]['domaine_competence_id']); + setadd_one_eu_to_class("0"); setDialog_Unite_Enseignement_open(true); } @@ -8518,7 +8541,6 @@ const AddClassManual = (props) => { max_note: JSON.parse(item).max_note, type_notation: JSON.parse(item).type_notation, ponderation_type_eval: JSON.parse(item).ponderation_type_eval, - diplome_id: JSON.parse(item).diplome_id, diplome_code: JSON.parse(item).diplome_code, } diff --git a/src/components/DisplayPartnerPromotion.js b/src/components/DisplayPartnerPromotion.js index d8dc8bb..8561488 100644 --- a/src/components/DisplayPartnerPromotion.js +++ b/src/components/DisplayPartnerPromotion.js @@ -15713,7 +15713,7 @@ const DisplayPartnerPromotion = (props) => { 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); + // 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); @@ -15780,7 +15780,7 @@ const DisplayPartnerPromotion = (props) => { setNew_Getall_Class_List_UE_result(new_data2); - console.log(" ### new_data2 = ", new_data2) + // console.log(" ### new_data2 = ", new_data2) } else { setGetall_Class_List_UE_api("false"); diff --git a/src/components/Module_Session_Notes_Classement.js b/src/components/Module_Session_Notes_Classement.js index bc9fdbf..72141ac 100644 --- a/src/components/Module_Session_Notes_Classement.js +++ b/src/components/Module_Session_Notes_Classement.js @@ -12,6 +12,7 @@ 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 Chip from "@mui/material/Chip"; import Box from '@mui/material/Box'; import { Tooltip } from 'react-tooltip' import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif"; @@ -201,6 +202,147 @@ const Module_Session_Notes_Classement = (props) => { ); } + const columns_list_session_note_classement_final_BC_Diplome_UE = [ + { field: 'id', headerName: 'id', hide: true }, + { field: '_id', headerName: '_id', hide: true }, + { field: 'session_id', headerName: 'session_id', hide: true }, + { field: 'inscrit_id', headerName: 'inscrit_id', hide: true }, + { field: 'diplome_id', headerName: 'diplome_id', hide: true }, + { field: 'domaine_competence_id', headerName: 'domaine_competence_id', hide: true }, + { field: 'class_id', headerName: 'class_id', hide: true }, + { field: 'ue_id', headerName: 'ue_id', hide: true }, + + + + { field: 'inscription_id_nom', headerName: 'Nom', minwidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => , }, + { field: 'inscription_id_prenom', headerName: 'Prenom', minwidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => , }, + + { field: 'diplome_id_code', headerName: 'diplome_id_code', minwidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => , }, + { field: 'domaine_competence_id_code', headerName: 'domaine_competence_id_code', minwidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => , }, + { field: 'ue_id_code', headerName: 'ue_id_code', minwidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => , }, + + + { + field: 'moyenne_avant_coef', headerName: 'moyenne_avant_coef', minwidth: 100, flex: 1, hide: false, editable: false, renderCell: (params) => , + + }, + { + field: 'coef', headerName: 'coef', minwidth: 100, flex: 1, hide: false, editable: false, renderCell: (params) => , + + }, + { + field: 'moyenne_apres_coef', headerName: 'moyenne_apres_coef', minwidth: 100, flex: 1, hide: false, editable: false, renderCell: (params) => , + + }, + + + + { field: 'ue_credit_ects', headerName: 'ue_credit_ects', minwidth: 100, flex: 1, hide: false, editable: false, renderCell: (params) => , }, + + { field: 'ue_seuil_validation', headerName: 'ue_seuil_validation', minwidth: 100, flex: 1, hide: false, editable: false, renderCell: (params) => , }, + { field: 'is_eu_validated', headerName: 'ue_cis_eu_validatedredit_ects', minwidth: 100, flex: 1, hide: false, editable: false, renderCell: (params) => , }, + + + { field: 'jury_note', headerName: 'Note Jury', width: 200, editable: false, renderCell: (params) => , align: "center", }, + { field: 'jury_observation', headerName: 'Observ. Jury', width: 200, editable: false, renderCell: (params) => , align: "left", }, + { + field: 'jury_validation', headerName: 'Validation Jury', width: 150, hide: false, editable: false, + renderCell: (cellValues) => { + return ( +
+ {cellValues.row.jury_validation && String(cellValues.row.jury_validation) === "1" && "Oui"} + {cellValues.row.jury_validation && String(cellValues.row.jury_validation) === "0" && "Non"} + +
+ + ); + } + }, + + + { + field: 'gestion', headerName: 'Gestion', minWidth: 50, flex: 1, maxWidth: 100, hideable: true, hide: false, editable: false, align: "center", + renderCell: (cellValues) => { + return ( +
+ {props.jury_id && String(props.jury_id).length > 5 && } + + {(!props.jury_id || String(props.jury_id).length <= 5) && } +
+ ); + }, + } + + ] const columns_list_session_note_classement_final = [ @@ -339,8 +481,8 @@ const Module_Session_Notes_Classement = (props) => { { field: '_id', headerName: '_id', hide: true }, { field: 'inscription_id', headerName: 'inscription_id', hide: true }, { field: 'session_id', headerName: 'session_id', hide: true }, - { field: 'diplome_id', headerName: 'diplome_id', hide: true }, - { field: 'domaine_competence_id', headerName: 'domaine_competence_id', hide: true }, + { field: 'diplome_id', headerName: 'diplome_id', hide: true }, + { field: 'domaine_competence_id', headerName: 'domaine_competence_id', hide: true }, { field: 'ue_id', headerName: 'ue_id', hide: true }, { field: 'class_id', headerName: 'class_id', hide: true }, @@ -554,7 +696,7 @@ const Module_Session_Notes_Classement = (props) => { if (String(res.data.status) === String("true")) { // console.log(" In Getall_Session_Detail_Final_Note_Classement res.data.status = " + res.data.status); - console.log(" In Getall_Session_Detail_Final_Note_Classement res.data.message r_class = " + res.data.message); + //console.log(" In Getall_Session_Detail_Final_Note_Classement res.data.message r_class = " + res.data.message); setGetall_Session_Detail_Final_Note_Classement_api("true"); setGetall_Session_Detail_Final_Note_Classement_result(res.data.message); @@ -1235,6 +1377,8 @@ const Module_Session_Notes_Classement = (props) => { Getall_Session_Final_Note_Classement(); Getall_Class_List_UE(); + Getall_Session_Final_Note_Classement_By_BC_Diplome_UE(); + GetListeInscrit(props.related_collection_recid); Getall_TrainingSession(); @@ -1967,7 +2111,6 @@ const Module_Session_Notes_Classement = (props) => { setp_detail_jury_validation(""); setsession_formation_final_note_classement_id(""); setselected_jury_type_for_observation(""); - }; @@ -2501,9 +2644,404 @@ const Module_Session_Notes_Classement = (props) => { } + const [New_Getall_Partner_Domaine_Competence_result, setNew_Getall_Partner_Domaine_Competence_result] = useState([{ + "_id": "", + "id": "", + "label": "", + "code": "", + "description": "", + "couleur": "", + }]); + + const [Getall_Partner_Domaine_Competence_api, setGetall_Partner_Domaine_Competence_api] = useState(); + const [Getall_Partner_Domaine_Competence_message, setGetall_Partner_Domaine_Competence_message] = useState(); + const [Getall_Partner_Domaine_Competence_result, setGetall_Partner_Domaine_Competence_result] = useState([]); + function Getall_Partner_Domaine_Competence(event) { + + var form = new FormData(); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_domaine_competence_pedagogique_no_filter/"; + + + axios.post(myurl, form).then(res => { + + if (String(res.data.status) === String("true")) { + //console.log(" In Getall_Partner_Domaine_Competence res.data.status = " + res.data.status); + // console.log(" In Getall_Partner_Domaine_Competence res.data.message r_class = " + res.data.message); + setGetall_Partner_Domaine_Competence_api("true"); + setGetall_Partner_Domaine_Competence_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 code = JSON.parse(x).code; + var description = JSON.parse(x).description; + var couleur = JSON.parse(x).couleur; + + + + var node = { + "_id": local_id, + "id": localid, + "label": code + " - " + String(description).substring(0, 50), + "code": code, + "description": description, + "couleur": couleur, + + }; + new_data2.push(node); + + + }); + + + var node = { + "_id": "", + "id": "", + "label": "", + "code": "", + "description": "", + "couleur": "", + }; + new_data2.push(node); + + if (new_data2.length > 0) { + setNew_Getall_Partner_Domaine_Competence_result(new_data2); + } else { + setNew_Getall_Partner_Domaine_Competence_result([]); + } + + + + } + else { + setGetall_Partner_Domaine_Competence_api("false"); + setGetall_Partner_Domaine_Competence_message(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); + } + + }).catch((error) => { + console.warn('Not good man :( Getall_Partner_Domaine_Competence = ', error); + setGetall_Partner_Domaine_Competence_api("false"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de recuperer la liste des domaines de compétence "); + setalert_type("error"); + + }) + } + + const [New_Getall_Parter_config_diplome_result, setNew_Getall_Parter_config_diplome_result] = useState([]); + + const [Getall_Parter_config_diplome_api, setGetall_Parter_config_diplome_api] = useState(); + const [Getall_Parter_config_diplome_message, setGetall_Parter_config_diplome_message] = useState(); + const [Getall_Parter_config_diplome_result, setGetall_Parter_config_diplome_result] = useState([]); + function Getall_Parter_config_diplome(event) { + + var form = new FormData(); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Diplome/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + + if (String(res.data.status) === String("true")) { + //console.log(" In Getall_Parter_config_diplome res.data.status = " + res.data.status); + //console.log(" In Getall_Parter_config_diplome res.data.message r_class = " + res.data.message); + setGetall_Parter_config_diplome_api("true"); + setGetall_Parter_config_diplome_result(res.data.message); + //setRows(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_description = JSON.parse(x).description; + + + //--- + var node = { + "_id": local_id, + "id": localid, + "label": local_code, + "code": local_code, + "description": local_description, + + }; + new_data2.push(node); + }); + + //--- + var node = { + "_id": "", + "id": "", + "label": "", + "code": "", + "description": "", + + }; + new_data2.push(node); + + + if (new_data2.length > 0) + setNew_Getall_Parter_config_diplome_result(new_data2); + + } + else { + setGetall_Parter_config_diplome_api("false"); + setGetall_Parter_config_diplome_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_Parter_config_diplome = ', error); + setGetall_Parter_config_diplome_api("false"); + + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de recuperer la liste des diplomes"); + setalert_type("error"); + //setmyApimyApiMessage("") + }) + } + const fixedVal_list_ue = []; const [tab_selected_list_ue, settab_selected_list_ue] = useState([...fixedVal_list_ue]); + const [Dialog_CALCUL_NOTE_open, setDialog_CALCUL_NOTE_open] = React.useState(false); + + const Dialog_CALCUL_NOTE_handleClose_buton = () => { + setDialog_CALCUL_NOTE_open(false); + }; + + const [selected_calculation_diplome, setselected_calculation_diplome] = useState(""); + const [selected_calculation_rattrapage, setselected_calculation_rattrapage] = useState("0"); + + const fixedVal_domaine_compet = []; + const [selected_calculation_domaine_compet, setselected_calculation_domaine_compet] = useState([...fixedVal_domaine_compet]); + + + + const New_Option_Oui_Non = [ + { "id": "1", "label": "Oui", "value": "1" }, + { "id": "0", "label": "Non", "value": "0" }, + { "id": "", "label": "", "value": "" }, + ] + + const [Run_Calculation_Notes_api, setRun_Calculation_Notes_api] = useState(); + const [Run_Calculation_Notes_message, setRun_Calculation_Notes_message] = useState(); + const [Run_Calculation_Notes_result, setRun_Calculation_Notes_result] = useState([]); + function Run_Calculation_Notes() { + var form = new FormData(); + //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + + form.append("class_id", props.session_class_id); + form.append("session_id", props.related_collection_recid); + form.append("semestre", "1"); + + var tab_domaine_compet_id = [] + for (var i = 0; i < selected_calculation_domaine_compet.length; i++) { + tab_domaine_compet_id.push(selected_calculation_domaine_compet[i]._id) + } + + form.append("tab_domaine_competence_ids", tab_domaine_compet_id); + form.append("diplome_id", selected_calculation_diplome); + form.append("rattrapage", selected_calculation_rattrapage); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Calcul_Moyen_evaluation_participant_note_BC_UE"; + + + + setLoading(true); + axios.post(myurl, form).then(res => { + //console.log(" In Run_Calculation_Notes res.data.status = " + res.data.status); + //console.log(" In Run_Calculation_Notes res.data.message r_class = " + res.data.message); + + setLoading(false); + + if (String(res.data.status) === String("true")) { + setRun_Calculation_Notes_api("true"); + setRun_Calculation_Notes_result(res.data.message); + + Getall_Session_Final_Note_Classement_By_BC_Diplome_UE(); + + Dialog_CALCUL_NOTE_handleClose_buton(); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + } + else { + setRun_Calculation_Notes_api("false"); + setRun_Calculation_Notes_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.log('UpdateStagiaireData : Not good man :( Run_Calculation_Notes = ' + error); + setRun_Calculation_Notes_api("false"); + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de lancer le calcul des notes"); + setalert_type("error"); + + }) + } + + + + const [New_Getall_Session_Final_Note_Classement_By_BC_Diplome_UE_result, setNew_Getall_Session_Final_Note_Classement_By_BC_Diplome_UE_result] = useState([]); + + const [Getall_Session_Final_Note_Classement_By_BC_Diplome_UE_api, setGetall_Session_Final_Note_Classement_By_BC_Diplome_UE_api] = useState(); + const [Getall_Session_Final_Note_Classement_By_BC_Diplome_UE_message, setGetall_Session_Final_Note_Classement_By_BC_Diplome_UE_message] = useState(); + const [Getall_Session_Final_Note_Classement_By_BC_Diplome_UE_result, setGetall_Session_Final_Note_Classement_By_BC_Diplome_UE_result] = useState([]); + function Getall_Session_Final_Note_Classement_By_BC_Diplome_UE(event) { + + var form = new FormData(); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("tab_session_id", props.related_collection_recid); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Evaluation_by_ue_bc_diplome_session_semestre_With_Filter"; + + axios.post(myurl, form).then(res => { + + if (String(res.data.status) === String("true")) { + // console.log(" In Getall_Session_Final_Note_Classement_By_BC_Diplome_UE res.data.status = " + res.data.status); + //console.log(" In Getall_Session_Final_Note_Classement_By_BC_Diplome_UE res.data.message r_class = " + res.data.message); + setGetall_Session_Final_Note_Classement_By_BC_Diplome_UE_api("true"); + setGetall_Session_Final_Note_Classement_By_BC_Diplome_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 session_id = JSON.parse(x).session_id; + var inscrit_id = JSON.parse(x).inscrit_id; + var diplome_id = JSON.parse(x).diplome_id; + var domaine_competence_id = JSON.parse(x).domaine_competence_id; + var class_id = JSON.parse(x).class_id; + var ue_id = JSON.parse(x).ue_id; + var inscription_id_nom = JSON.parse(x).inscription_id_nom; + var inscription_id_prenom = JSON.parse(x).inscription_id_prenom; + var inscription_id_mail = JSON.parse(x).inscription_id_mail; + var diplome_id_code = JSON.parse(x).diplome_id_code; + var domaine_competence_id_code = JSON.parse(x).domaine_competence_id_code; + var ue_id_code = JSON.parse(x).ue_id_code; + + var moyenne_avant_coef = JSON.parse(x).moyenne_avant_coef; + var coef = JSON.parse(x).coef; + var moyenne_apres_coef = JSON.parse(x).moyenne_apres_coef; + var ue_credit_ects = JSON.parse(x).ue_credit_ects; + var ue_seuil_validation = JSON.parse(x).ue_seuil_validation; + var is_eu_validated = JSON.parse(x).is_eu_validated; + + + var jury_note = JSON.parse(x).jury_note; + var jury_observation = JSON.parse(x).jury_observation; + var jury_validation = JSON.parse(x).jury_validation; + + + //--- + var node = { + "_id": local_id, + "id": localid, + "session_id": session_id, + "label": local_id, + "inscrit_id": inscrit_id, + + "diplome_id": diplome_id, + "domaine_competence_id": domaine_competence_id, + "class_id": class_id, + "ue_id": ue_id, + "inscription_id_nom": inscription_id_nom, + "inscription_id_prenom": inscription_id_prenom, + "inscription_id_mail": inscription_id_mail, + "diplome_id_code": diplome_id_code, + + "domaine_competence_id_code": domaine_competence_id_code, + "ue_id_code": ue_id_code, + "moyenne_avant_coef": moyenne_avant_coef, + "coef": coef, + + "moyenne_apres_coef": moyenne_apres_coef, + "ue_credit_ects": ue_credit_ects, + "ue_seuil_validation": ue_seuil_validation, + "is_eu_validated": is_eu_validated, + + + "jury_note": jury_note, + "jury_observation": jury_observation, + "jury_validation": jury_validation, + + }; + new_data2.push(node); + }); + + + + setNew_Getall_Session_Final_Note_Classement_By_BC_Diplome_UE_result(new_data2); + // console.log(" ## new_data2 = ", new_data2) + + + } + else { + setGetall_Session_Final_Note_Classement_By_BC_Diplome_UE_api("false"); + setGetall_Session_Final_Note_Classement_By_BC_Diplome_UE_message(res.data.message); + // alert(res.data.message) + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); + } + + }).catch((error) => { + console.warn('Not good man :( Getall_Session_Final_Note_Classement_By_BC_Diplome_UE = ', error); + setGetall_Session_Final_Note_Classement_By_BC_Diplome_UE_api("false"); + // alert(" Impossible de recuperer la liste des évaluations"); + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de recuperer les notes calculées "); + setalert_type("error"); + //setmyApimyApiMessage("") + }) + } + + + return (
@@ -2522,6 +3060,209 @@ const Module_Session_Notes_Classement = (props) => { } {/*** FIN Affichage des messages d'alerte*/} + {/* Dialog pour gerer les CALCUL_NOTE */} + null} + + PaperProps={{ + + + className: classes.paper, // Apply the paper style + style: { + overflowY: 'unset', + position: 'absolute', + top: '10rem', + margin: "2px", + }, + }} + hideBackdrop={true} + disableScrollLock + classes={{ + paper: classes.dialog + }} + + PaperComponent={PaperComponent} + aria-labelledby="draggable-dialog-title" + + > + + Observation + + + {Dialog_1_message} + + +
Diplome
+ + {New_Getall_Parter_config_diplome_result && New_Getall_Parter_config_diplome_result.length > 0 && + { + if (newValue._id) + setselected_calculation_diplome(newValue._id); + else + setselected_calculation_diplome(""); + + }} + + options={New_Getall_Parter_config_diplome_result} + + + renderInput={(params) => + } + /> + } + + +
+ +
Bloc de compétence
+ + {New_Getall_Partner_Domaine_Competence_result && New_Getall_Partner_Domaine_Competence_result.length > 0 && { + + setselected_calculation_domaine_compet([ + ...fixedVal_domaine_compet, + ...newValue.filter((i) => fixedVal_domaine_compet.indexOf(i) === -1), + ]); + + }} + + + renderInput={(params) => + } + />} + +
+ +
Rattrapge
+ {New_Option_Oui_Non && New_Option_Oui_Non.length > 0 && { + if (value && value.value) { + setselected_calculation_rattrapage(value.value); + + } else { + setselected_calculation_rattrapage(""); + } + }} + + renderInput={(params) => + } + />} + + +
+ + + +
+ + + + + + + +
+
+ + +
+ + +
+ +
+
+ +
+ +
+ {/* FIN Dialog pour gerer les CALCUL_NOTE */} + + + + {/*** Dialog pour reinscrire un apprenant à une session */} {
+ {/* + { + setselectionModel_note_Session_classement(newSelectionModel); + + if (newSelectionModel.length !== 1) { + + } + }} + + + + + selectionModel={selectionModel_note_Session_classement} + + localeText={frFR.components.MuiDataGrid.defaultProps.localeText} + rows={New_Getall_Session_Final_Note_Classement_result.map((item, index) => ( + { + id: index, + _id: (item)._id, + session_id: (item).session_id, + apprenant_id: (item).apprenant_id, + class_id: (item).class_id, + nom: (item).nom, + prenom: (item).prenom, + rang: (item).rang, + note_finale: (item).note_finale, + rang_calculation_date: (item).rang_calculation_date.substring(0, 10), + credit_acquis: (item).credit_acquis, + + jury_note: (item).jury_note, + jury_observation: (item).jury_observation, + jury_validation: (item).jury_validation, + jury_validation_champ_technique: (item).jury_validation_champ_technique, + + } + ))} + + columns={columns_list_session_note_classement_final} + pageSize={10} + className="datagridclass" + + onRowDoubleClick={(newSelectionModel) => { + + }} + + rowsPerPageOptions={[10]} + disableSelectionOnClick + + + components={{ + Toolbar: CustomToolbar + }} + componentsProps={{ toolbar: { data_colums: columns_list_session_note_classement_final } }} + //sx={datagridSx} + + + getCellClassName={(params) => { + + // Traitement des cellules du jury (note, commentaire, validation) + if (String(params.field).startsWith("jury")) { + return 'cell--jury'; + } + + }} + getRowClassName={(params) => { + // Pour la gestion de la couleur de zone double cliquée + if (String(params.row.ue_validation) === "1") { + return 'line--statut--isvalide'; + } + + 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"} + sx={{ + "& .MuiDataGrid-cellContent": { + minHeight: 50, + + } + }} + + /> + */} +
+ + {/** La V2 du calcul */} Calcul V222 + { } }} - - - selectionModel={selectionModel_note_Session_classement} localeText={frFR.components.MuiDataGrid.defaultProps.localeText} - rows={New_Getall_Session_Final_Note_Classement_result.map((item, index) => ( + rows={New_Getall_Session_Final_Note_Classement_By_BC_Diplome_UE_result.map((item, index) => ( { id: index, _id: (item)._id, session_id: (item).session_id, - apprenant_id: (item).apprenant_id, + inscrit_id: (item).inscrit_id, + diplome_id: (item).diplome_id, + domaine_competence_id: (item).domaine_competence_id, class_id: (item).class_id, - nom: (item).nom, - prenom: (item).prenom, - rang: (item).rang, - note_finale: (item).note_finale, - rang_calculation_date: (item).rang_calculation_date.substring(0, 10), - credit_acquis: (item).credit_acquis, + ue_id: (item).ue_id, + inscription_id_nom: (item).inscription_id_nom, + inscription_id_prenom: (item).inscription_id_prenom, + inscription_id_mail: (item).inscription_id_mail, + diplome_id_code: (item).diplome_id_code, + + domaine_competence_id_code: (item).domaine_competence_id_code, + ue_id_code: (item).ue_id_code, + moyenne_avant_coef: (item).moyenne_avant_coef, + coef: (item).coef, + moyenne_apres_coef: (item).moyenne_apres_coef, + ue_credit_ects: (item).ue_credit_ects, + ue_seuil_validation: (item).ue_seuil_validation, + is_eu_validated: (item).is_eu_validated, + jury_note: (item).jury_note, jury_observation: (item).jury_observation, jury_validation: (item).jury_validation, - jury_validation_champ_technique: (item).jury_validation_champ_technique, + } ))} - columns={columns_list_session_note_classement_final} + columns={columns_list_session_note_classement_final_BC_Diplome_UE} pageSize={10} className="datagridclass" @@ -3151,7 +4053,7 @@ const Module_Session_Notes_Classement = (props) => { /> -
+
diff --git a/src/components/Notes_Evaluation.js b/src/components/Notes_Evaluation.js index 2a8bd0e..107867d 100644 --- a/src/components/Notes_Evaluation.js +++ b/src/components/Notes_Evaluation.js @@ -2134,7 +2134,7 @@ const Notes_Evaluation = (props) => { }) } - + useEffect(() => { sethistory_securite_read(props.check_user_acces_right("historique", "read")) @@ -6684,7 +6684,7 @@ const Notes_Evaluation = (props) => { multiple onChange={(event, newValue) => { setevaluation_data_changed("1"); - console.log(" ## == newValue EDIIIT =", newValue) + setscope_diplome([ ...fixedVal_scope_diplome, ...newValue.filter((i) => fixedVal_scope_diplome.indexOf(i) === -1),