27/05/2025 - 12h
parent
fd4325c09c
commit
c5dab0f71d
|
@ -2625,6 +2625,40 @@ const Apprenant = (props) => {
|
|||
var form = new FormData();
|
||||
//form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
|
||||
|
||||
if (!p_detail_suivi_ped_responsable_id || String(p_detail_suivi_ped_responsable_id).length < 5) {
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message("Vous devez choisir un responsable");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!p_detail_suivi_ped_class_id || String(p_detail_suivi_ped_class_id).length < 5) {
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message("Vous devez choisir une formation");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!p_detail_suivi_ped_session_id || String(p_detail_suivi_ped_session_id).length < 5) {
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message("Vous devez choisir une classe");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!p_detail_suivi_ped_class_eu_id || String(p_detail_suivi_ped_class_eu_id).length < 5) {
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message("Vous devez choisir une matière");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!p_detail_suivi_ped_sujet || String(p_detail_suivi_ped_sujet).length < 2) {
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message("Vous devez préciser le sujet du suivi ");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
|
@ -8309,7 +8343,7 @@ const Apprenant = (props) => {
|
|||
|
||||
</div>
|
||||
|
||||
<div className="session_caract"> <b>Unite D'enseignement </b> <br />
|
||||
<div className="session_caract"> <b> Matière </b> <br />
|
||||
{New_Get_List_UE_From_Class_Id_result &&
|
||||
|
||||
<Autocomplete
|
||||
|
@ -8397,7 +8431,7 @@ const Apprenant = (props) => {
|
|||
|
||||
</div>
|
||||
|
||||
<div className="session_caract"> Responsable <br />
|
||||
<div className="session_caract"> <b> Responsable </b> <br />
|
||||
{New_Getall_Training_Employee_No_Filter_result && New_Getall_Training_Employee_No_Filter_result.length > 0 &&
|
||||
|
||||
<Autocomplete
|
||||
|
@ -8520,7 +8554,7 @@ const Apprenant = (props) => {
|
|||
|
||||
</div>
|
||||
|
||||
<div className="session_caract"> <b>Unite D'enseignement </b> <br />
|
||||
<div className="session_caract"> <b>Matière </b> <br />
|
||||
{New_Getall_Partner_List_UE_result && New_Getall_Partner_List_UE_result.length > 0 && <TextField
|
||||
name="suivi_pedago_detail_ue"
|
||||
id="suivi_pedago_detail_ue"
|
||||
|
@ -8576,7 +8610,7 @@ const Apprenant = (props) => {
|
|||
|
||||
</div>
|
||||
|
||||
<div className="session_caract"> Responsable <br />
|
||||
<div className="session_caract"> <b>Responsable </b> <br />
|
||||
{New_Getall_Training_Employee_No_Filter_result && New_Getall_Training_Employee_No_Filter_result.length > 0 && <TextField
|
||||
name="suivi_pedago_responsable"
|
||||
id="suivi_pedago_responsable"
|
||||
|
@ -8757,7 +8791,7 @@ const Apprenant = (props) => {
|
|||
|
||||
</div>
|
||||
|
||||
<div className="session_caract"> <b>Unite D'enseignement </b> <br />
|
||||
<div className="session_caract"> <b>Matière </b> <br />
|
||||
{New_Get_List_UE_From_Class_Id_result &&
|
||||
|
||||
<Autocomplete
|
||||
|
@ -8845,7 +8879,7 @@ const Apprenant = (props) => {
|
|||
|
||||
</div>
|
||||
|
||||
<div className="session_caract"> Responsable <br />
|
||||
<div className="session_caract"> <b> Responsable </b> <br />
|
||||
{New_Getall_Training_Employee_No_Filter_result && New_Getall_Training_Employee_No_Filter_result.length > 0 &&
|
||||
|
||||
<Autocomplete
|
||||
|
|
|
@ -26080,7 +26080,8 @@ const DisplayPartnerSession = (props) => {
|
|||
SessionendDate={new Date(moment(SessionendDate, "DD/MM/YYYY"))} session_formateur_id={p_formateur_id}
|
||||
session_class_id={session_selected_class_id}
|
||||
selected_session_invoiced_statut={selected_session_invoiced_statut}
|
||||
jury_cell_editable={false} />
|
||||
jury_cell_editable={false}
|
||||
jury_id={""} />
|
||||
|
||||
</div>}
|
||||
|
||||
|
|
|
@ -42,9 +42,9 @@ import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
|
|||
import { gridClasses } from '@mui/x-data-grid';
|
||||
import Link from '@mui/material/Link';
|
||||
import { PiDotsThree } from "react-icons/pi";
|
||||
import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5";
|
||||
import { IoAddCircleOutline } from "react-icons/io5";
|
||||
import AttachFileIcon from '@mui/icons-material/AttachFile';
|
||||
import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint, FcPlanner } from "react-icons/fc";
|
||||
import { FcAcceptDatabase, FcPlanner } from "react-icons/fc";
|
||||
|
||||
import Module_Alert_Confirmation from "./Module_Alert_Confirmation";
|
||||
import Module_Historique_Action from "./Module_Historique_Action";
|
||||
|
|
|
@ -49,6 +49,8 @@ import {
|
|||
} from '@mui/x-data-grid';
|
||||
import * as XLSX from 'xlsx';
|
||||
|
||||
import { FcAcceptDatabase, FcPlanner } from "react-icons/fc";
|
||||
|
||||
function PaperComponent(props) {
|
||||
return (
|
||||
<Draggable
|
||||
|
@ -202,11 +204,11 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
const columns_list_session_note_classement_final = [
|
||||
{ field: 'id', headerName: 'id', hide: true },
|
||||
{ field: '_id', headerName: '_id', hide: true },
|
||||
{ field: 'apprenant_id', headerName: 'apprenant_id', hide: true },
|
||||
{ field: 'session_id', headerName: 'session_id', hide: true },
|
||||
{ field: 'class_id', headerName: 'class_id', hide: true },
|
||||
|
||||
|
||||
|
||||
{ field: 'nom', headerName: 'Nom', minwidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'prenom', headerName: 'Prenom', minwidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'rang', headerName: 'Rang', minwidth: 100, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
|
@ -270,7 +272,7 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
renderCell: (cellValues) => {
|
||||
return (
|
||||
<div>
|
||||
<nav style={{ width: '100%', 'textAlign': 'center' }}>
|
||||
{props.jury_id && String(props.jury_id).length > 5 && <nav style={{ width: '100%', 'textAlign': 'center' }}>
|
||||
<IconButton
|
||||
aria-label="more"
|
||||
id="long-button"
|
||||
|
@ -337,7 +339,11 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
|
||||
|
||||
|
||||
</nav>
|
||||
</nav>}
|
||||
|
||||
{(!props.jury_id || String(props.jury_id).length <= 5) && <nav style={{ width: '100%', 'textAlign': 'center' }}>
|
||||
-
|
||||
</nav>}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
|
@ -687,9 +693,6 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
};
|
||||
const handleClose_option_button_vertical = (event, value) => {
|
||||
|
||||
|
||||
console.log("Option traitement = ", value);
|
||||
|
||||
if (value && String(value) === "Jury Edit") {
|
||||
console.log("### Jury Edit= ", value);
|
||||
|
||||
|
@ -706,8 +709,6 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
|
||||
else if (value && String(value) === "Supprimer") {
|
||||
|
||||
console.log("Option traitement 22 = ", value);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -983,6 +984,7 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
var localid = JSON.parse(x).id;
|
||||
var local_id = JSON.parse(x)._id;
|
||||
var session_id = JSON.parse(x).session_id;
|
||||
var apprenant_id = JSON.parse(x).apprenant_id;
|
||||
|
||||
var class_id = JSON.parse(x).class_id;
|
||||
var nom = JSON.parse(x).nom;
|
||||
|
@ -1001,6 +1003,7 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
"apprenant_id": apprenant_id,
|
||||
"label": local_id,
|
||||
"session_id": session_id,
|
||||
|
||||
|
@ -1020,33 +1023,10 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
new_data2.push(node);
|
||||
});
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": "",
|
||||
"id": "",
|
||||
"label": "",
|
||||
"inscription_id": "",
|
||||
"session_id": "",
|
||||
"class_id": "",
|
||||
"nom": "",
|
||||
"prenom": "",
|
||||
"rang": "",
|
||||
"note_finale": "",
|
||||
"rang_calculation_date": "",
|
||||
"credit_acquis": "",
|
||||
|
||||
"jury_note": "",
|
||||
"jury_observation": "",
|
||||
"jury_validation": "",
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
||||
if (new_data2.length > 0)
|
||||
setNew_Getall_Session_Final_Note_Classement_result(new_data2);
|
||||
|
||||
console.log(" ## new_data2 = ", new_data2)
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
|
@ -1079,8 +1059,82 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
|
||||
GetListeInscrit(props.related_collection_recid);
|
||||
|
||||
Getall_TrainingSession();
|
||||
|
||||
}, [])
|
||||
|
||||
|
||||
const [New_Getall_TrainingSession_result, setNew_Getall_TrainingSession_result] = useState();
|
||||
|
||||
const [Getall_TrainingSession_api, setGetall_TrainingSession_api] = useState();
|
||||
const [Getall_TrainingSession_message, setGetall_TrainingSession_message] = useState();
|
||||
const [Getall_TrainingSession_result, setGetall_TrainingSession_result] = useState();
|
||||
function Getall_TrainingSession(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/GetAllValideSessionPartner_List/";
|
||||
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
//console.log(" In Getall_TrainingSession res.data.status = " + res.data.status);
|
||||
//console.log(" In Getall_TrainingSession res.data.message r_class = " + res.data.message);
|
||||
setGetall_TrainingSession_api("true");
|
||||
setGetall_TrainingSession_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_internal_url = JSON.parse(x).class_internal_url;
|
||||
var local_title_session = JSON.parse(x).titre;
|
||||
var local_code_session = JSON.parse(x).code_session;
|
||||
var local_invoiced_statut = JSON.parse(x).invoiced_statut;
|
||||
var local_class_id = JSON.parse(x).class_id;
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
"label": local_code_session,
|
||||
"class_internal_url": local_internal_url,
|
||||
"titre": local_title_session,
|
||||
"code_session": local_code_session,
|
||||
"invoiced_statut": local_invoiced_statut,
|
||||
"class_id": local_class_id,
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
||||
// return {"_id": " + str(local_id) + ", "label": " + local_courrier_template_ref_interne + '" , "courrier_template_ref_interne": "' + local_courrier_template_ref_interne + '", "nom_champ_technique": "' + local_nom_champ_technique + '", "nom_champ_fonctionel": "' + local_nom_champ_fonctionel + '","valide": "1" };
|
||||
|
||||
});
|
||||
|
||||
|
||||
if (new_data2.length > 0)
|
||||
setNew_Getall_TrainingSession_result(new_data2);
|
||||
|
||||
//console.log(" ### new_data2 = ", new_data2)
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
setGetall_TrainingSession_api("false");
|
||||
setGetall_TrainingSession_message(res.data.message);
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
console.warn('Not good man :( Getall_TrainingSession = ', error);
|
||||
setGetall_TrainingSession_api("false");
|
||||
//setmyApimyApiMessage("")
|
||||
})
|
||||
}
|
||||
|
||||
const [nb_stagiaire_Inscrit, setnb_stagiaire_Inscrit] = useState("0");
|
||||
const [rowss_insc, setRows_insc] = useState([]);
|
||||
|
||||
|
@ -1309,6 +1363,108 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
})
|
||||
}
|
||||
|
||||
const [New_Reinscription_Getall_Class_List_UE_Given_Class_result, setNew_Reinscription_Getall_Class_List_UE_Given_Class_result] = useState([]);
|
||||
|
||||
const [Reinscription_Getall_Class_List_UE_Given_Class_api, setReinscription_Getall_Class_List_UE_Given_Class_api] = useState();
|
||||
const [Reinscription_Getall_Class_List_UE_Given_Class_message, setReinscription_Getall_Class_List_UE_Given_Class_message] = useState();
|
||||
const [Reinscription_Getall_Class_List_UE_Given_Class_result, setReinscription_Getall_Class_List_UE_Given_Class_result] = useState([]);
|
||||
function Reinscription_Getall_Class_List_UE_Given_Class(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_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 Reinscription_Getall_Class_List_UE_Given_Class res.data.status = " + res.data.status);
|
||||
// console.log(" In Reinscription_Getall_Class_List_UE_Given_Class res.data.message r_class = " + res.data.message);
|
||||
setReinscription_Getall_Class_List_UE_Given_Class_api("true");
|
||||
setReinscription_Getall_Class_List_UE_Given_Class_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);
|
||||
|
||||
//console.log(" ### node =", node);
|
||||
|
||||
if (new_data2.length > 0)
|
||||
setNew_Reinscription_Getall_Class_List_UE_Given_Class_result(new_data2);
|
||||
}
|
||||
else {
|
||||
setReinscription_Getall_Class_List_UE_Given_Class_api("false");
|
||||
setReinscription_Getall_Class_List_UE_Given_Class_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 :( Reinscription_Getall_Class_List_UE_Given_Class = ', error);
|
||||
setReinscription_Getall_Class_List_UE_Given_Class_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([]);
|
||||
|
||||
|
@ -1875,6 +2031,238 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
// FIN EXPORT EXCEL DATAGRID
|
||||
|
||||
const [vue_note, setvue_note] = useState("classement");
|
||||
const [actionmass_ftion_val, setactionmass_ftion_val] = useState();
|
||||
const New_Option = [
|
||||
{ "id": "0", "label": "(R)Inscrire", "value": "inscription" },
|
||||
{ "id": "2", "label": "", "value": "" },
|
||||
]
|
||||
|
||||
const [Dialog_add_inscription_message, setDialog_add_inscription_message] = React.useState(false);
|
||||
const [Dialog_add_inscription_open, setDialog_add_inscription_open] = React.useState(false);
|
||||
function Dialog_add_inscription_handle_change_participant_session(message) {
|
||||
setDialog_add_inscription_message(message);
|
||||
setDialog_add_inscription_open(true);
|
||||
}
|
||||
|
||||
const Dialog_add_inscription_handleClose = () => {
|
||||
|
||||
};
|
||||
|
||||
const Dialog_add_inscription_handleClose_buton = () => {
|
||||
setDialog_add_inscription_open(false);
|
||||
};
|
||||
const New_Type_apprenant = [
|
||||
{ "id": "0", "label": "Autre" },
|
||||
{ "id": "1", "label": "Salariés" },
|
||||
{ "id": "2", "label": "Apprentis" },
|
||||
{ "id": "3", "label": "Particuliers" },
|
||||
{ "id": "4", "label": "Sans Emploi" }
|
||||
]
|
||||
|
||||
const New_civilite = [
|
||||
{ "id": "mme", "label": "Mme", "value": "mme" },
|
||||
{ "id": "m", "label": "M", "value": "m" },
|
||||
{ "id": "neutre", "label": "Neutre", "value": "neutre" },
|
||||
{ "id": "", "label": "", "value": "" },
|
||||
]
|
||||
|
||||
|
||||
const New_Financement = [
|
||||
{
|
||||
value: 'cpf',
|
||||
label: 'CPF',
|
||||
},
|
||||
{
|
||||
value: 'perso',
|
||||
label: 'Fonds Propres',
|
||||
},
|
||||
{
|
||||
value: 'entreprise',
|
||||
label: 'Votre entreprise',
|
||||
},
|
||||
|
||||
{
|
||||
value: 'mixte_cpf_perso',
|
||||
label: 'CPF & Fonds Propres',
|
||||
},
|
||||
{
|
||||
value: 'modefinancement',
|
||||
label: 'modefinancement',
|
||||
},
|
||||
{
|
||||
value: 'autre',
|
||||
label: 'Autre',
|
||||
},
|
||||
|
||||
];
|
||||
|
||||
const [selected_apprenant_id, setselected_apprenant_id] = useState("");
|
||||
const [selected_apprenant_row_id, setselected_apprenant_row_id] = useState("");
|
||||
|
||||
const [p_dialog_session_id, setp_dialog_session_id] = useState("");
|
||||
const [p_dialog_type_apprenant, setp_dialog_type_apprenant] = useState("");
|
||||
const [p_dialog_financement, setp_dialog_financement] = useState("");
|
||||
const [p_dialog_client_rattachement_id, setp_dialog_client_rattachement_id] = useState("");
|
||||
|
||||
const [p_dialog_eu_id, setp_dialog_eu_id] = useState("");
|
||||
|
||||
const [Add_Inscription_Apprenant_api, setAdd_Inscription_Apprenant_api] = useState();
|
||||
const [Add_Inscription_Apprenant_message, setAdd_Inscription_Apprenant_message] = useState();
|
||||
const [Add_Inscription_Apprenant_result, setAdd_Inscription_Apprenant_result] = useState();
|
||||
function Add_Inscription_Apprenant() {
|
||||
var form = new FormData();
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("_id", selected_apprenant_id);
|
||||
form.append("session_id", p_dialog_session_id);
|
||||
form.append("type_apprenant", p_dialog_type_apprenant);
|
||||
form.append("modefinancement", p_dialog_financement);
|
||||
|
||||
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Apprenant_Inscrire_Session/";
|
||||
|
||||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
//console.log(" In Add_Inscription_Apprenant res.data.status = " + res.data.status);
|
||||
//console.log(" In Add_Inscription_Apprenant res.data.message r_class = " + res.data.message);
|
||||
|
||||
setLoading(false);
|
||||
if (String(res.data.status) === String("true")) {
|
||||
|
||||
setAdd_Inscription_Apprenant_api("true");
|
||||
setAdd_Inscription_Apprenant_result(res.data.message);
|
||||
|
||||
Dialog_add_inscription_handleClose_buton();
|
||||
// Get_Appenant_List_Inscription(selected_apprenant_id);
|
||||
|
||||
|
||||
setp_dialog_session_id('');
|
||||
setp_dialog_type_apprenant('');
|
||||
setp_dialog_financement('');
|
||||
|
||||
// alert(res.data.message);
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("success");
|
||||
if (document.getElementById('myRef_head')) {
|
||||
var divh = document.getElementById('myRef_head').offsetTop;
|
||||
window.scrollTo({
|
||||
top: divh,
|
||||
behavior: "smooth",
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
setAdd_Inscription_Apprenant_api("false");
|
||||
setAdd_Inscription_Apprenant_message(res.data.message);
|
||||
alert(res.data.message);
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.warn('Add_Inscription_Apprenant : Not good man :( Add_Inscription_Apprenant = ' + error);
|
||||
setAdd_Inscription_Apprenant_api("false");
|
||||
alert(" Impossible d'ajouter l'inscription ");
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
function GetSelectedRowsSession() {
|
||||
///alert(" les lignes slected sont : " + selectionModel + " nb item = " + selectionModel.length);
|
||||
//const selectedRowsData = selectionModel.map((id) => rowss.find((row) => row.id === id));
|
||||
//console.log(rowss[0]);
|
||||
var tab_tmp = []
|
||||
for (var i = 0; i < selectionModel_note_Session_classement.length; i++) {
|
||||
var myid = parseInt(String(selectionModel_note_Session_classement[i]));
|
||||
var line = New_Getall_Session_Final_Note_Classement_result[myid];
|
||||
tab_tmp.push(line.apprenant_id);
|
||||
//console.log(rowss[myid]['external_code']);
|
||||
}
|
||||
return tab_tmp;
|
||||
|
||||
}
|
||||
|
||||
|
||||
const [Add_Inscription_List_Apprenant_api, setAdd_Inscription_List_Apprenant_api] = useState();
|
||||
const [Add_Inscription_List_Apprenant_message, setAdd_Inscription_List_Apprenant_message] = useState();
|
||||
const [Add_Inscription_List_Apprenant_result, setAdd_Inscription_List_Apprenant_result] = useState();
|
||||
function Add_Inscription_List_Apprenant() {
|
||||
|
||||
|
||||
var liste_apprenant = GetSelectedRowsSession();
|
||||
var form = new FormData();
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("list_apprenant_id", liste_apprenant);
|
||||
form.append("session_id", p_dialog_session_id);
|
||||
form.append("type_apprenant", p_dialog_type_apprenant);
|
||||
form.append("modefinancement", p_dialog_financement);
|
||||
form.append("tab_ue_ids", p_dialog_eu_id);
|
||||
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Apprenant_Inscrire_Session_List/";
|
||||
|
||||
Dialog_add_inscription_handleClose_buton();
|
||||
|
||||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
//console.log(" In Add_Inscription_List_Apprenant res.data.status = " + res.data.status);
|
||||
//console.log(" In Add_Inscription_List_Apprenant res.data.message r_class = " + res.data.message);
|
||||
|
||||
setLoading(false);
|
||||
if (String(res.data.status) === String("true")) {
|
||||
|
||||
setAdd_Inscription_List_Apprenant_api("true");
|
||||
setAdd_Inscription_List_Apprenant_result(res.data.message);
|
||||
|
||||
Dialog_add_inscription_handleClose_buton();
|
||||
|
||||
setp_dialog_session_id('');
|
||||
setp_dialog_eu_id("");
|
||||
setp_dialog_type_apprenant('');
|
||||
setp_dialog_financement('');
|
||||
|
||||
setselectionModel_note_Session_classement([]);
|
||||
setactionmass_ftion_val('');
|
||||
|
||||
// alert(res.data.message);
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("success");
|
||||
if (document.getElementById('myRef_head')) {
|
||||
var divh = document.getElementById('myRef_head').offsetTop;
|
||||
window.scrollTo({
|
||||
top: divh,
|
||||
behavior: "smooth",
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
setAdd_Inscription_List_Apprenant_api("false");
|
||||
setAdd_Inscription_List_Apprenant_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('Add_Inscription_List_Apprenant : Not good man :( Add_Inscription_List_Apprenant = ' + error);
|
||||
setAdd_Inscription_List_Apprenant_api("false");
|
||||
alert(" Impossible d'inscrire les apprenant à cette session ");
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<div className="module_session_note_classement">
|
||||
|
@ -1895,6 +2283,173 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
{/*** FIN Affichage des messages d'alerte*/}
|
||||
|
||||
|
||||
{/*** Dialog pour reinscrire un apprenant à une session */}
|
||||
<Dialog
|
||||
open={Dialog_add_inscription_open}
|
||||
//onClose={Dialog_add_inscription_handleClose}
|
||||
className="displaypartnersession"
|
||||
static
|
||||
onClose={() => null}
|
||||
|
||||
PaperProps={{
|
||||
className: classes.paper, // Apply the paper style
|
||||
style: {
|
||||
overflowY: 'unset',
|
||||
position: 'absolute',
|
||||
top: '7rem',
|
||||
margin: "2px",
|
||||
},
|
||||
}}
|
||||
hideBackdrop={true}
|
||||
disableScrollLock
|
||||
classes={{
|
||||
paper: classes.dialog
|
||||
}}
|
||||
|
||||
PaperComponent={PaperComponent}
|
||||
aria-labelledby="draggable-dialog-title"
|
||||
>
|
||||
|
||||
<DialogTitle style={{ cursor: 'move', fontFamily: "DM Sans" }} id="draggable-dialog-title" > Inscrire </DialogTitle>
|
||||
<DialogContent className="DialogContent_width">
|
||||
|
||||
{New_Getall_TrainingSession_result && <div className="session_caract_Dialog"> <b> Formation</b>
|
||||
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
id="combo-box-demo"
|
||||
className="session_caract_Dialog"
|
||||
fullWidth
|
||||
options={New_Getall_TrainingSession_result.filter((data) => (data).invoiced_statut !== "2")}
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
setp_dialog_session_id(value._id);
|
||||
Reinscription_Getall_Class_List_UE_Given_Class(value.class_id);
|
||||
|
||||
} else {
|
||||
setReinscription_Getall_Class_List_UE_Given_Class_result([]);
|
||||
setNew_Reinscription_Getall_Class_List_UE_Given_Class_result([]);
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</div>}
|
||||
|
||||
<div className="session_caract_Dialog"> <b> Matière</b>
|
||||
|
||||
{New_GetListeInscrit_result.length > 0 &&
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="eu_data"
|
||||
id="eu_data"
|
||||
className="session_caract_Dialog"
|
||||
// value={New_Getall_Class_List_UE_result.filter((data) => (data)._id === String(p_filtre1_value))[0].label}
|
||||
options={New_Reinscription_Getall_Class_List_UE_Given_Class_result}
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
setp_dialog_eu_id(value._id);
|
||||
} else {
|
||||
setp_dialog_eu_id("");
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div className="session_caract_Dialog" > <b> Type apprenant </b>
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
id="combo-box-demo"
|
||||
className="session_caract_Dialog"
|
||||
fullWidth
|
||||
options={New_Type_apprenant}
|
||||
onChange={(event, value) => {
|
||||
if (value && value.id) {
|
||||
setp_dialog_type_apprenant(value.id);
|
||||
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="session_caract_Dialog" > <b> Mode Financement </b>
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
id="combo-box-demo"
|
||||
className="session_caract_Dialog"
|
||||
fullWidth
|
||||
options={New_Financement}
|
||||
onChange={(event, value) => {
|
||||
if (value && value.value) {
|
||||
setp_dialog_financement(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" >
|
||||
|
||||
</div>
|
||||
</DialogContent>
|
||||
|
||||
<DialogActions>
|
||||
<IconButton
|
||||
autoFocus
|
||||
onClick={Dialog_add_inscription_handleClose_buton}
|
||||
color="primary"
|
||||
className={classes.customizedButton}
|
||||
>
|
||||
<CancelPresentationIcon />
|
||||
</IconButton>
|
||||
|
||||
|
||||
<div className="div_row">
|
||||
<div className="div_row_gauche">
|
||||
|
||||
{selectionModel_note_Session_classement.length >= 1 && <Button onClick={Add_Inscription_List_Apprenant} className="bton_enreg_dialog"> Inscrire {selectionModel_note_Session_classement.length} apprenat(s) </Button>}
|
||||
</div>
|
||||
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
|
||||
<Button onClick={Dialog_add_inscription_handleClose_buton} className="bton_annule_dialog" >Fermer</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</DialogActions>
|
||||
|
||||
|
||||
</Dialog>
|
||||
|
||||
|
||||
{/*** Fin Dialog pour reinscrire un apprenant à une session */}
|
||||
|
||||
|
||||
{/* Dialog pour gerer les JURY_INFO */}
|
||||
|
@ -2071,7 +2626,7 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
|
||||
|
||||
<div style={{ width: '100%', float: 'left' }}>
|
||||
<nav style={{ textAlign: 'center', width: '50%', float: 'left' }}> Notes & Rang Final (session)</nav>
|
||||
<nav style={{ textAlign: 'center', width: '50%', float: 'left' }}> Notes & Classement Final (session)</nav>
|
||||
|
||||
<nav style={{ textAlign: 'right', width: '50%', float: 'left' }}>
|
||||
<Button variant="outlined" onClick={Calcul_Note_Classement_Session} className="detail_class_submenu" id='calcul_moyenne' name='calcul_moyenne'> Calcul Moyenne </Button>
|
||||
|
@ -2150,7 +2705,7 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
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,
|
||||
|
@ -2229,6 +2784,53 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
|
||||
</div>
|
||||
|
||||
<div className="div_row">
|
||||
|
||||
{selectionModel_note_Session_classement && selectionModel_note_Session_classement.length >= 1 && <div className="block_en_mass">
|
||||
<nav >Traitement en masse </nav>
|
||||
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
id="combo-box-demo"
|
||||
className="block_en_mass_select"
|
||||
|
||||
options={New_Option}
|
||||
onChange={(event, value) => {
|
||||
if (value && value.value) {
|
||||
if (String(value.value) === "inscription") {
|
||||
setactionmass_ftion_val(value.value);
|
||||
}
|
||||
else {
|
||||
setactionmass_ftion_val();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
|
||||
{actionmass_ftion_val && String(actionmass_ftion_val) === "inscription" && <nav className='block_en_mass_bton_action'>
|
||||
<Button className="bton_enreg" style={{ "width": "90%" }} onClick={(event) => {
|
||||
|
||||
setDialog_add_inscription_open(true);
|
||||
}}>
|
||||
<FcAcceptDatabase /> Traiter
|
||||
</Button>
|
||||
|
||||
</nav>}
|
||||
|
||||
|
||||
|
||||
</div>}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue