diff --git a/public/sample/template_import_stagiaires.csv b/public/sample/template_import_stagiaires.csv index 2eb99ed..671dd57 100644 --- a/public/sample/template_import_stagiaires.csv +++ b/public/sample/template_import_stagiaires.csv @@ -1,6 +1,4 @@ -formation_code_externe;code_session;client_rattachement_email;client_rattachement_nom;prenom;nom;employeur;telephone;email;adresse;code_postal;ville;pays;modefinancement;opco;status;prix -MYSY_Demo_AP_v2;SESS_01_DEMO_AP_V2;;;part 2;part nom2;employeur 2;10101;mysytraining+apprenant1@gmail.com;adresse01;code_postal01;ville01;pays01;modefinancement;opco;0;1500 -MYSY_Demo_AP_v2;SESS_01_DEMO_AP_V2;mysytraining+client1@gmail.com ;Client 1 ;part 3;part nom3_client;employeur 3;10101;mysytraining+apprenant2@gmail.com;adresse02;code_postal02;ville02;pays02;modefinancement;;0;1500 -MYSY_Demo_AP_v2;SESS_01_DEMO_AP_V2;mysytraining+client1@gmail.com ;Client 1 ;part 4;part nom4_client;employeur 4;10101;mysytraining+apprenant3@gmail.com;adresse03;code_postal03;ville03;pays03;modefinancement;;0;1500 -MYSY_Demo_AP_v2;SESS_01_DEMO_AP_V2;mysytraining+client2@gmail.com;Client 2;part 5;part nom5_client;employeur 5;10101; mysylaplumedepierrot+01@gmail.com;adresse04;code_postal04;ville04;pays04;modefinancement;;0;1500 -MYSY_Demo_AP_v2;SESS_01_DEMO_AP_V2;mysytraining+client2@gmail.com;Client 2;part 6;part nom6_client;employeur 6;10101;mysylaplumedepierrot+02@gmail.com;adresse05;code_postal05;ville05;pays05;modefinancement;;0;1500 +formation_code_externe;code_session;client_rattachement_email;client_rattachement_nom;facture_client_rattachement_email;facture_client_rattachement_nom;civilite;prenom;nom;employeur;telephone;email;adresse;code_postal;ville;pays;modefinancement;opco;status;prix;type_apprenant +IFOD_01;test_facturatop_dup ;mysytraining+client1@gmail.com;Client 1;PP_ETAT_GENERAL_01@mysy-training.com ;PP_ETAT_GENERAL_01 ;mme;Ibrahim uuu;nom1;employeur 4;10101;mysytraining+apprenant8@gmail.com;adresse03;code_postal03;ville03;pays03;modefinancement;;0;18500;0 +IFOD_01;test_facturatop_dup ;mysytraining+client2@gmail.com;Client 2;mysylaplumedepierrot@gmail.com;Etat financeur;mme;Alice excel;nom2;employeur 5;10101;mysytraining+apprenant9@gmail.com;adresse04;code_postal04;ville04;pays04;modefinancement;;0;15009; +IFOD_01;test_facturatop_dup ;mysytraining+client2@gmail.com;Client 2;mysylaplumedepierrot@gmail.com;Etat financeur;mme;Thomas excel;nom3;employeur 6;10101;mysytraining+apprenant10@gmail.com;adresse05;code_postal05;ville05;pays05;modefinancement;;0;120;0 diff --git a/public/sample/template_import_stagiaires_old.csv b/public/sample/template_import_stagiaires_old.csv new file mode 100644 index 0000000..2eb99ed --- /dev/null +++ b/public/sample/template_import_stagiaires_old.csv @@ -0,0 +1,6 @@ +formation_code_externe;code_session;client_rattachement_email;client_rattachement_nom;prenom;nom;employeur;telephone;email;adresse;code_postal;ville;pays;modefinancement;opco;status;prix +MYSY_Demo_AP_v2;SESS_01_DEMO_AP_V2;;;part 2;part nom2;employeur 2;10101;mysytraining+apprenant1@gmail.com;adresse01;code_postal01;ville01;pays01;modefinancement;opco;0;1500 +MYSY_Demo_AP_v2;SESS_01_DEMO_AP_V2;mysytraining+client1@gmail.com ;Client 1 ;part 3;part nom3_client;employeur 3;10101;mysytraining+apprenant2@gmail.com;adresse02;code_postal02;ville02;pays02;modefinancement;;0;1500 +MYSY_Demo_AP_v2;SESS_01_DEMO_AP_V2;mysytraining+client1@gmail.com ;Client 1 ;part 4;part nom4_client;employeur 4;10101;mysytraining+apprenant3@gmail.com;adresse03;code_postal03;ville03;pays03;modefinancement;;0;1500 +MYSY_Demo_AP_v2;SESS_01_DEMO_AP_V2;mysytraining+client2@gmail.com;Client 2;part 5;part nom5_client;employeur 5;10101; mysylaplumedepierrot+01@gmail.com;adresse04;code_postal04;ville04;pays04;modefinancement;;0;1500 +MYSY_Demo_AP_v2;SESS_01_DEMO_AP_V2;mysytraining+client2@gmail.com;Client 2;part 6;part nom6_client;employeur 6;10101;mysylaplumedepierrot+02@gmail.com;adresse05;code_postal05;ville05;pays05;modefinancement;;0;1500 diff --git a/src/App.css b/src/App.css index 83485c2..e2849b4 100644 --- a/src/App.css +++ b/src/App.css @@ -13,6 +13,7 @@ @media only screen and (max-width: 600px) { + /*style smartphones et petites tablettes en portrait*/ .react-confirm-alert-body { font-family: Arial, Helvetica, sans-serif; @@ -22,30 +23,31 @@ border-radius: 10px; box-shadow: 0 20px 75px rgb(0 0 0 / 13%); color: #666; - width:90% !important; + width: 90% !important; margin-left: auto !important; margin-right: auto !important; padding-left: 0.2rem !important; padding-right: 0.2rem !important; z-index: 99999999 !important; } - .overlay-custom-class-name{ + + .overlay-custom-class-name { z-index: 99999999 !important; } - .react-confirm-alert{ + .react-confirm-alert { width: 90% !important; z-index: 999999 !important; } - - + + .App { align-items: center; margin-left: 0%; margin-right: 0%; text-align: center; height: calc(100vh - 10rem); - min-height : calc(100vh - 10rem); + min-height: calc(100vh - 10rem); } .App-link { @@ -56,6 +58,7 @@ from { transform: rotate(0deg); } + to { transform: rotate(360deg); } @@ -77,7 +80,7 @@ margin-right: 0%; text-align: center; height: calc(100vh - 10rem); - min-height : calc(100vh - 10rem); + min-height: calc(100vh - 10rem); } .App-link { @@ -88,6 +91,7 @@ from { transform: rotate(0deg); } + to { transform: rotate(360deg); } @@ -109,7 +113,7 @@ margin-right: 0%; text-align: center; height: calc(100vh - 10rem); - min-height : calc(100vh - 10rem); + min-height: calc(100vh - 10rem); } .App-link { @@ -120,6 +124,7 @@ from { transform: rotate(0deg); } + to { transform: rotate(360deg); } @@ -132,7 +137,7 @@ } } -@media only screen and (min-width: 1200px) { +@media only screen and (min-width: 1200px) { /*style petites-moyennes tablettes */ .App { @@ -141,7 +146,7 @@ margin-right: 0%; text-align: center; height: calc(100vh - 10rem); - min-height : calc(100vh - 10rem); + min-height: calc(100vh - 10rem); } .App-link { @@ -152,6 +157,7 @@ from { transform: rotate(0deg); } + to { transform: rotate(360deg); } @@ -164,8 +170,7 @@ } } -.main_cont { -} +.main_cont {} .main_haut { float: left; @@ -177,18 +182,22 @@ .main_bas { - float: left; - border-width: 0.01rem; - width: 100%; - font-family: 'Quicksand', 'Signika', "sans-serif" !important; - font-size: small !important; - color: black; - height: 5rem; - position:fixed; - top: calc(100vh - 5rem); - z-index: 13; + float: left; + border-width: 0.01rem; + width: 100%; + font-family: 'Quicksand', 'Signika', "sans-serif" !important; + font-size: small !important; + color: black; + height: 5rem; + position: fixed; + top: calc(100vh - 5rem); + z-index: 13; } +.MuiAutocomplete-input { + font-size: small !important; + font-family: DM Sans !important; +} .radio-container { justify-content: space-around; @@ -201,11 +210,11 @@ box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.452); } - input{ - transform: translateY(1px); - } +input { + transform: translateY(1px); +} - label { - margin-left: 10px; - cursor: pointer; - } +label { + margin-left: 10px; + cursor: pointer; +} \ No newline at end of file diff --git a/src/components/Account.js b/src/components/Account.js index c97359a..7d05885 100644 --- a/src/components/Account.js +++ b/src/components/Account.js @@ -335,7 +335,7 @@ function Account() { //alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a); - if (file_size > 100000) { + if (file_size > 10000000) { alert("L'image doit faire moins de 100 Kilo Octets"); return; } diff --git a/src/components/AddClassManual.js b/src/components/AddClassManual.js index 12e1f00..8cd9df6 100644 --- a/src/components/AddClassManual.js +++ b/src/components/AddClassManual.js @@ -3130,7 +3130,7 @@ const AddClassManual = (props) => { //alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a); - if (file_size > 1000000) { + if (file_size > 10000000) { // alert("L'image ne doit pas dépasser un 1 Méga octets"); setdisplay_alert_mysy("1"); setalert_message("L'image ne doit pas dépasser un 1 Méga octets"); @@ -3983,7 +3983,7 @@ const AddClassManual = (props) => { setRecord_All_PJ_api("true"); Get_List_Of_All_PJ(selected_class_id); - Get_Class_Catalogue_File(selected_class_id); + Get_Class_Catalogue_File(selected_class_id); setfile_1_name(); setp_detail_one_file_to_download_type_name(); //GetCurrentClass_trainingsession(); @@ -4053,7 +4053,7 @@ const AddClassManual = (props) => { setDelete_one_attached_document_result(result['message']); setDelete_one_attached_document_api("true"); Get_List_Of_All_PJ(selected_class_id); - Get_Class_Catalogue_File(selected_class_id); + Get_Class_Catalogue_File(selected_class_id); // alert(result['message']); setdisplay_alert_mysy("1"); setalert_message(result['message']); @@ -4281,6 +4281,9 @@ const AddClassManual = (props) => { setsubmenu("statistiques"); submenu_color_management("statistiques"); Getall_Employee_Statistic_Question_List(); + Get_Qualiopi_Indic_Apprenant_Formation("1"); + Get_Qualiopi_Indic_Nb_Heure("1"); + Get_Indic_Class_CA_HT("1"); } function submenu_finance() { @@ -4723,7 +4726,7 @@ const AddClassManual = (props) => { setLoading(false); if (String(res.data.status) === String("true")) { //console.log(" In Getall_Qry_Survey_Data res.data.status = " + res.data.status); - console.log(" In Getall_Qry_Survey_Data res.data.message r_class = " + res.data.message); + // console.log(" In Getall_Qry_Survey_Data res.data.message r_class = " + res.data.message); var json_data = JSON.parse(res.data.message[0]); @@ -4800,6 +4803,244 @@ const AddClassManual = (props) => { + const [Get_Qualiopi_Indic_Apprenant_Formation_api, setGet_Qualiopi_Indic_Apprenant_Formation_api] = useState(); + const [Get_Qualiopi_Indic_Apprenant_Formation_message, setGet_Qualiopi_Indic_Apprenant_Formation_message] = useState(); + const [Get_Qualiopi_Indic_Apprenant_Formation_result, setGet_Qualiopi_Indic_Apprenant_Formation_result] = useState([]); + function Get_Qualiopi_Indic_Apprenant_Formation(local_from_beginning) { + + var form = new FormData(); + const stored_cookie = getCookie('tokenmysypart'); + + var date_from = ""; + if (p_filter_date_from) { + date_from = p_filter_date_from; + + } + + var date_to = ""; + if (p_filter_date_to) { + date_to = p_filter_date_to; + + } + + + form.append("token", stored_cookie); + form.append("session_start_date", date_from); + form.append("session_end_date", date_to); + form.append("tab_formation_ids", selected_class_id); + form.append("from_beginning", local_from_beginning); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_Taux_Success_For_List_Class/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + if (String(res.data.status) === String("true")) { + //console.log(" In Get_Qualiopi_Indic_Apprenant_Formation res.data.status = " + res.data.status); + // console.log(" In Get_Qualiopi_Indic_Apprenant_Formation res.data.message r_class = " + res.data.message); + + var json_data = JSON.parse(res.data.message[0]); + + // console.log(" ### json_data = ", json_data); + var jsonObj0 = json_data.data + if (json_data.total_nb_inscrit) { + setqualiopi_indic_nb_apprenant(json_data.total_nb_inscrit) + } else { + setqualiopi_indic_nb_apprenant(""); + } + + if (json_data.taux_success) { + setqualiopi_indic_taux_sucess(json_data.taux_success) + } else { + setqualiopi_indic_taux_sucess(""); + } + + + //console.log(" ### jsonObj0 = ", jsonObj0); + + setGet_Qualiopi_Indic_Apprenant_Formation_api("true"); + setGet_Qualiopi_Indic_Apprenant_Formation_result(res.data.message); + + + } + else { + setGet_Qualiopi_Indic_Apprenant_Formation_api("false"); + setGet_Qualiopi_Indic_Apprenant_Formation_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 :( Get_Qualiopi_Indic_Apprenant_Formation = ', error); + setGet_Qualiopi_Indic_Apprenant_Formation_api("false"); + // alert("Impossible de récuperer les données demandées"); + setdisplay_alert_mysy("1"); + setalert_message("Impossible de récuperer les données demandées"); + setalert_type("error"); + //setmyApimyApiMessage("") + }) + } + + + + const [Get_Qualiopi_Indic_Nb_Heure_api, setGet_Qualiopi_Indic_Nb_Heure_api] = useState(); + const [Get_Qualiopi_Indic_Nb_Heure_message, setGet_Qualiopi_Indic_Nb_Heure_message] = useState(); + const [Get_Qualiopi_Indic_Nb_Heure_result, setGet_Qualiopi_Indic_Nb_Heure_result] = useState([]); + function Get_Qualiopi_Indic_Nb_Heure(local_from_beginning) { + + var form = new FormData(); + const stored_cookie = getCookie('tokenmysypart'); + + var date_from = ""; + if (p_filter_date_from) { + date_from = p_filter_date_from; + + } + + var date_to = ""; + if (p_filter_date_to) { + date_to = p_filter_date_to; + + } + + + form.append("token", stored_cookie); + form.append("session_start_date", date_from); + form.append("session_end_date", date_to); + form.append("tab_formation_ids", selected_class_id); + form.append("from_beginning", local_from_beginning); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_Session_For_List_Class/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + if (String(res.data.status) === String("true")) { + //console.log(" In Get_Qualiopi_Indic_Nb_Heure res.data.status = " + res.data.status); + // console.log(" In Get_Qualiopi_Indic_Nb_Heure res.data.message r_class = " + res.data.message); + + var json_data = JSON.parse(res.data.message[0]); + + // console.log(" ### json_data = ", json_data); + var jsonObj0 = json_data.data + + if (json_data.total_nb_heure) { + setqualiopi_indic_nb_heure(json_data.total_nb_heure) + } else { + setqualiopi_indic_nb_heure("") + } + //console.log(" ### jsonObj0 = ", jsonObj0); + + setGet_Qualiopi_Indic_Nb_Heure_api("true"); + setGet_Qualiopi_Indic_Nb_Heure_result(res.data.message); + + + } + else { + setGet_Qualiopi_Indic_Nb_Heure_api("false"); + setGet_Qualiopi_Indic_Nb_Heure_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 :( Get_Qualiopi_Indic_Nb_Heure = ', error); + setGet_Qualiopi_Indic_Nb_Heure_api("false"); + // alert("Impossible de récuperer les données demandées"); + setdisplay_alert_mysy("1"); + setalert_message("Impossible de récuperer les données demandées"); + setalert_type("error"); + //setmyApimyApiMessage("") + }) + } + + const [Get_Indic_Class_CA_HT_api, setGet_Indic_Class_CA_HT_api] = useState(); + const [Get_Indic_Class_CA_HT_message, setGet_Indic_Class_CA_HT_message] = useState(); + const [Get_Indic_Class_CA_HT_result, setGet_Indic_Class_CA_HT_result] = useState([]); + function Get_Indic_Class_CA_HT(local_from_beginning) { + + var form = new FormData(); + const stored_cookie = getCookie('tokenmysypart'); + + var date_from = ""; + if (p_filter_date_from) { + date_from = p_filter_date_from; + + } + + var date_to = ""; + if (p_filter_date_to) { + date_to = p_filter_date_to; + + } + + + form.append("token", stored_cookie); + form.append("periode_start_date", date_from); + form.append("periode_end_date", date_to); + form.append("tab_formation_ids", selected_class_id); + form.append("from_beginning", local_from_beginning); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_List_Factures_For_List_Class/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + if (String(res.data.status) === String("true")) { + //console.log(" In Get_Indic_Class_CA_HT res.data.status = " + res.data.status); + console.log(" In Get_Indic_Class_CA_HT res.data.message r_class = " + res.data.message); + + var json_data = JSON.parse(res.data.message[0]); + + // console.log(" ### json_data = ", json_data.data[0]); + + + if (json_data.data[0] && json_data.data[0].TotalAmount_HT) { + setindic_class_ca_ht(json_data.data[0].TotalAmount_HT) + } else { + setindic_class_ca_ht("") + } + //console.log(" ### jsonObj0 = ", jsonObj0); + + setGet_Indic_Class_CA_HT_api("true"); + setGet_Indic_Class_CA_HT_result(res.data.message); + + + } + else { + setGet_Indic_Class_CA_HT_api("false"); + setGet_Indic_Class_CA_HT_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 :( Get_Indic_Class_CA_HT = ', error); + setGet_Indic_Class_CA_HT_api("false"); + // alert("Impossible de récuperer les données demandées"); + setdisplay_alert_mysy("1"); + setalert_message("Impossible de récuperer les données demandées"); + setalert_type("error"); + //setmyApimyApiMessage("") + }) + } + + const otherSetting = { height: 300, yAxis: [{ label: '' }], @@ -4947,6 +5188,10 @@ const AddClassManual = (props) => { }; + const [qualiopi_indic_nb_apprenant, setqualiopi_indic_nb_apprenant] = React.useState(""); + const [qualiopi_indic_nb_heure, setqualiopi_indic_nb_heure] = React.useState(""); + const [qualiopi_indic_taux_sucess, setqualiopi_indic_taux_sucess] = React.useState(""); + const [indic_class_ca_ht, setindic_class_ca_ht] = React.useState(""); return (
@@ -8087,8 +8332,8 @@ const AddClassManual = (props) => { } - {String(props.check_user_acces_right("formation", "write")) === "1" &&
+ {String(props.check_user_acces_right("formation", "write")) === "1" &&
Fiche catalogue
{String(props.check_user_acces_right("formation", "write")) === "1" &&
@@ -8138,7 +8383,7 @@ const AddClassManual = (props) => {


- Fichier : {file_1_name.name}
Supprimer } @@ -8154,7 +8399,7 @@ const AddClassManual = (props) => {
+ startIcon={} className="bton_enreg" style={{ "width": "80%", fontFamily: "DM Sans" }}>ENREGISTRER LA PIECE
@@ -8163,7 +8408,7 @@ const AddClassManual = (props) => { {Get_Class_Catalogue_File_result &&
-
+
{Get_Class_Catalogue_File_result && Get_Class_Catalogue_File_result.map((val) => (
@@ -8241,7 +8486,7 @@ const AddClassManual = (props) => { 2 - Image Bannière
3 - L'image par defaut du métier dans le système "> -
Image de profil
+
Image de profil

@@ -8257,7 +8502,7 @@ const AddClassManual = (props) => {
}
- {String(props.check_user_acces_right("formation", "write")) === "1" &&
+ {String(props.check_user_acces_right("formation", "write")) === "1" &&
  • L'image doit etre carrée.
  • @@ -8356,9 +8601,59 @@ const AddClassManual = (props) => { {submenu && String(submenu) === "statistiques" &&
    - + +

    +
    + +
    +
    + + +
    + +
    +
    + +
    + + +
    + +
    +
    + +
    + + +
    + +
    +
    + +
    + +
    + +
    +
    + + + +
    + +
    +
    +
    + +
    +   +
    +
    + +
    Choisir une question {New_Getall_Employee_Statistic_Question_List_result && New_Getall_Employee_Statistic_Question_List_result.length > 0 && diff --git a/src/components/Apprenant.js b/src/components/Apprenant.js index a157b89..7de6c31 100644 --- a/src/components/Apprenant.js +++ b/src/components/Apprenant.js @@ -201,7 +201,7 @@ const Apprenant = (props) => { { field: 'ville', headerName: 'ville', hide: true, editable: false, Width: 0 }, { field: 'pays', headerName: 'pays', hide: true, editable: false, Width: 0 }, { field: 'employeur', headerName: 'Employeur', minWidth: 150, hide: true, editable: false }, - { field: 'client_nom', headerName: 'Client', minWidth: 150, flex: 1, hide: false, editable: false }, + { field: 'client_nom', headerName: 'Client', hide: true, disableExport: true, editable: false }, { field: 'is_ent_compte', headerName: 'ENT compte', minWidth: 100, flex: 1, hide: false, editable: false, renderCell: (cellValues) => { @@ -1054,6 +1054,14 @@ const Apprenant = (props) => { setp_detail_date_creation(""); } + if (mylocaltraining.archive) { + setp_detail_archive(mylocaltraining.archive); + } else { + setp_detail_archive("0"); + } + + + // 04/06/2025 if (mylocaltraining.is_handicap) { setp_detail_is_handicap(false); @@ -1229,7 +1237,10 @@ const Apprenant = (props) => { function Record_All_PJ() { if (!p_detail_one_file_to_download_type_name) { - alert(" Vous devez donner un nom à la pièce jointe"); + // alert(" Vous devez donner un nom à la pièce jointe"); + setdisplay_alert_mysy("1"); + setalert_message(" Vous devez donner un nom à la pièce jointe"); + setalert_type("error"); return; } @@ -1273,7 +1284,10 @@ const Apprenant = (props) => { setfile_1_name(); setp_detail_one_file_to_download_type_name(); //GetCurrentClass_trainingsession(); - alert(" La pièce jointe " + file_1_name.name + " a été bien enregistrée") + var txt = " La pièce jointe " + file_1_name.name + " a été bien enregistrée"; + setdisplay_alert_mysy("1"); + setalert_message(txt); + setalert_type("success"); } else { @@ -1329,7 +1343,12 @@ const Apprenant = (props) => { setDelete_one_attached_document_result(result['message']); setDelete_one_attached_document_api("true"); Get_List_Of_All_PJ(selected_apprenant_id); - alert(result['message']) + // alert(result['message']) + + setdisplay_alert_mysy("1"); + setalert_message(result['message']); + setalert_type("success"); + } else { @@ -1341,7 +1360,10 @@ const Apprenant = (props) => { .catch((error) => { console.error(' Record_All_PJ Error:', error); setDelete_one_attached_document_api("false"); - alert(" Impossible de supprimer le document") + // alert(" Impossible de supprimer le document") + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de supprimer le document"); + setalert_type("error"); }); @@ -2465,9 +2487,95 @@ const Apprenant = (props) => { Enable_ENT_Account_Apprenant(liste_apprenant); } + if (String(actionmass_ftion_val) === String("archive_desarchive")) { + Archive_Given_Apprenant(); + } + } + const [Archive_Given_Apprenant_api, setArchive_Given_Apprenant_api] = useState(); + const [Archive_Given_Apprenant_message, setArchive_Given_Apprenant_message] = useState(); + const [Archive_Given_Apprenant_result, setArchive_Given_Apprenant_result] = useState(); + + function Archive_Given_Apprenant() { + + var archive_statut = "1" + + var tab_tmp = [] + + for (var i = 0; i < selectionModel.length; i++) { + var myid = parseInt(String(selectionModel[i])); + var line = JSON.parse(Get_All_Apprenant_result[myid]); + tab_tmp.push(line._id); + //console.log(rowss[myid]['external_code']); + + // Si une seule ligne est a le statut "non archivé", alors on archive + if (line.archive && String(line.archive) === "0") + archive_statut = String(line.archive) + } + + + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("tab_apprenant_ids", tab_tmp); + + + var myurl = ""; + if (archive_statut !== "1") + myurl = process.env.REACT_APP_API_URL + "myclass/api/archive_apprenant/"; + else + myurl = process.env.REACT_APP_API_URL + "myclass/api/unarchive_apprenant/"; + + + + setLoading(true); + axios.post(myurl, form).then(res => { + //console.log(" In Archive_Given_Apprenant res.data.status = " + res.data.status); + //console.log(" In Archive_Given_Apprenant res.data.message r_class = " + res.data.message); + + setLoading(false); + if (String(res.data.status) === String("true")) { + setArchive_Given_Apprenant_api("true"); + setArchive_Given_Apprenant_result(res.data.message); + + setSelectionModel([]); + setactionmass_ftion_val(""); + + Get_All_Apprenant(); + + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + + } + else { + setArchive_Given_Apprenant_api("false"); + setArchive_Given_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('UpdateStagiaireData : Not good man :( Archive_Given_Apprenant = ' + error); + setArchive_Given_Apprenant_api("false"); + + alert(" Impossible d'archiver/deséarchiver les apprenants "); + + + + }) + } + function Export_apprenant(tab_class) { const stored_cookie = getCookie('tokenmysypart'); @@ -2485,6 +2593,7 @@ const Apprenant = (props) => { alert("Impossible d'exporter les apprenants (2) "); } else { setSelectionModel([]); + setactionmass_ftion_val(""); fileDownload(res.data, nom_fichier_cmd) } @@ -2747,7 +2856,10 @@ const Apprenant = (props) => { else { setGet_All_Apprenant_api("false"); setGet_All_Apprenant_message(res.data.message); - alert(res.data.message) + // alert(res.data.message) + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -3316,7 +3428,10 @@ const Apprenant = (props) => { else { setGetall_Partner_Session_Reduice_Fields_api("false"); setGetall_Partner_Session_Reduice_Fields_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -3399,7 +3514,10 @@ const Apprenant = (props) => { else { setGetall_Partner_List_UE_api("false"); setGetall_Partner_List_UE_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -3490,7 +3608,10 @@ const Apprenant = (props) => { else { setGet_List_UE_From_Class_Id_api("false"); setGet_List_UE_From_Class_Id_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -3571,24 +3692,25 @@ const Apprenant = (props) => { const [selectionModel_apprenant_inscription, setselectionModel_apprenant_inscription] = React.useState([]); const [selectionModel_suivi_pedagogique, setselectionModel_suivi_pedagogique] = React.useState([]); - const [p_filtre1, setp_filtre1] = useState(); - const [p_filtre1_value, setp_filtre1_value] = useState(); + 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_filtre2, setp_filtre2] = useState(""); + const [p_filtre2_value, setp_filtre2_value] = useState(""); function clean_all_filters() { - setp_filtre1(); - setp_filtre1_value(); + setp_filtre1(""); + setp_filtre1_value(""); - setp_filtre2(); - setp_filtre2_value(); + setp_filtre2(""); + setp_filtre2_value(""); setgridline_id(''); setSelectionModel([]); + setactionmass_ftion_val(""); setGet_All_Apprenant_result([]); setsubmenu(""); @@ -3642,7 +3764,7 @@ const Apprenant = (props) => { let file_type = event.target.files[0].type; //console.log("file_size = ",file_size," file_type = ",file_type); - if (file_size > 1000000) { + if (file_size > 10000000) { setdisplay_alert_mysy("1"); setalert_message("Le fichier ne doit pas dépasser un 1 Méga octets"); @@ -4408,7 +4530,10 @@ const Apprenant = (props) => { else { setAdd_Inscription_Apprenant_api("false"); setAdd_Inscription_Apprenant_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -4445,6 +4570,7 @@ const Apprenant = (props) => { setDelete_Apprenant_Data_result(res.data.message); setSelectionModel([]); + setactionmass_ftion_val(""); setadd_One_Apprenant(''); setdisplay_detail_apprenant(''); @@ -4464,7 +4590,10 @@ const Apprenant = (props) => { else { setDelete_Apprenant_Data_api("false"); setDelete_Apprenant_Data_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } @@ -4503,6 +4632,7 @@ const Apprenant = (props) => { setDisable_ENT_Account_Apprenant_result(res.data.message); setSelectionModel([]); + setactionmass_ftion_val(""); setadd_One_Apprenant(''); setdisplay_detail_apprenant(''); @@ -4524,7 +4654,10 @@ const Apprenant = (props) => { else { setDisable_ENT_Account_Apprenant_api("false"); setDisable_ENT_Account_Apprenant_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } @@ -4566,6 +4699,7 @@ const Apprenant = (props) => { setEnable_ENT_Account_Apprenant_result(res.data.message); setSelectionModel([]); + setactionmass_ftion_val(""); setadd_One_Apprenant(''); setdisplay_detail_apprenant(''); @@ -4587,7 +4721,10 @@ const Apprenant = (props) => { else { setEnable_ENT_Account_Apprenant_api("false"); setEnable_ENT_Account_Apprenant_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } @@ -4628,7 +4765,7 @@ const Apprenant = (props) => { setCreate_ENT_Account_Apprenant_result(res.data.message); setSelectionModel([]); - + setactionmass_ftion_val(""); setadd_One_Apprenant(''); setdisplay_detail_apprenant(''); Clear_Detail_Apprenant_Fields(); @@ -4649,7 +4786,10 @@ const Apprenant = (props) => { else { setCreate_ENT_Account_Apprenant_api("false"); setCreate_ENT_Account_Apprenant_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } @@ -4692,7 +4832,7 @@ const Apprenant = (props) => { setDelete_LIST_Apprenant_result(res.data.message); setSelectionModel([]); - + setactionmass_ftion_val(""); setadd_One_Apprenant(''); setdisplay_detail_apprenant(''); Clear_Detail_Apprenant_Fields(); @@ -4713,7 +4853,10 @@ const Apprenant = (props) => { else { setDelete_LIST_Apprenant_api("false"); setDelete_LIST_Apprenant_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } @@ -4766,7 +4909,7 @@ const Apprenant = (props) => { setp_dialog_type_apprenant(''); setp_dialog_financement(''); setSelectionModel([]); - + setactionmass_ftion_val(""); // alert(res.data.message); setdisplay_alert_mysy("1"); setalert_message(res.data.message); @@ -4783,7 +4926,10 @@ const Apprenant = (props) => { else { setAdd_Inscription_List_Apprenant_api("false"); setAdd_Inscription_List_Apprenant_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -4805,6 +4951,7 @@ const Apprenant = (props) => { setadd_One_Apprenant(""); setsubmenu(""); setSelectionModel([]); + setactionmass_ftion_val(""); } const imglogoclasschangeHandler = (event) => { @@ -4821,7 +4968,7 @@ const Apprenant = (props) => { //alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a); - if (file_size > 1000000) { + if (file_size > 10000000) { alert("L'image ne doit pas dépasser un 1 Méga octets"); return; } @@ -4930,7 +5077,10 @@ const Apprenant = (props) => { } else { - alert(result['message']); + //alert(result['message']); + setdisplay_alert_mysy("1"); + setalert_message(result['message']); + setalert_type("error"); } }) @@ -5141,7 +5291,10 @@ const Apprenant = (props) => { else { setAdd_Update_Apprenant_Tuteur_api("false"); setAdd_Update_Apprenant_Tuteur_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -5152,7 +5305,7 @@ const Apprenant = (props) => { }) } - + const New_Type_apprenant = [ { "id": "0", "label": "Autre" }, @@ -5276,7 +5429,10 @@ const Apprenant = (props) => { else { setGet_List_Apprenant_Modele_Courrier_api("false"); setGet_List_Apprenant_Modele_Courrier_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -5345,6 +5501,7 @@ const Apprenant = (props) => { { "id": "3", "label": "(R)Inscrire", "value": "inscrire" }, { "id": "4", "label": "ENT Créer accès", "value": "create_ent" }, { "id": "5", "label": "ENT Désactiver", "value": "disable_ent" }, + { "id": "6", "label": "Archiver/Désarch.", "value": "archive_desarchive" }, { "id": "2", "label": "Supprimer", "value": "supprimer" }, ] @@ -5515,7 +5672,10 @@ const Apprenant = (props) => { setLoading(false); setGet_Geven_Suivi_Ped_Data_api("false"); setGet_Geven_Suivi_Ped_Data_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -6005,10 +6165,20 @@ const Apprenant = (props) => { { "id": "email", "label": "Email ", "value": "email" }, { "id": "nom", "label": "Nom ", "value": "nom" }, { "id": "prenom", "label": "Prénom ", "value": "prenom" }, + { "id": "archive", "label": "Archive", "value": "archive" }, { "id": "", "label": "", "value": "" }, { "id": "1", "label": "", "value": "1" }, // Cette ligne pour couvrir l'ajout d'une ligne de filter. C'est fait expres. ] + const New_Option_Is_archive = [ + { "id": "1", "label": "Oui", "value": "1" }, + { "id": "0", "label": "Non", "value": "0" }, + { "id": "2", "label": "Tout", "value": "2" }, + { "id": "", "label": "", "value": "" }, + ] + + const [is_recherche, setis_recherche] = useState("0"); + const [p_detail_archive, setp_detail_archive] = useState(""); return (
    @@ -6773,7 +6943,7 @@ const Apprenant = (props) => { Inscrire - {New_Getall_TrainingSession_result &&
    Promotion + {New_Getall_TrainingSession_result &&
    Session / Promotion {
    Utilisez les filtres !
    - 0 && (data).value === String(p_filtre1))[0].label} + options={New_Option_Filter} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre1(value.value); + + } + + }} + + renderInput={(params) => + } + />} + {/* { Nom   Prénom   - + */}
    -
    + {String(p_filtre1) !== "archive" &&
    {p_filtre1 && { ), }} + />} +
    } + + {String(p_filtre1) === "archive" &&
    + {p_filtre1 && + (data).id === String(p_filtre1_value))[0].label} + sx={{ float: "right" }} + className="disabled_style" + + options={New_Option_Is_archive} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre1_value(value.value); + } else { + setp_filtre1_value(""); + } + }} + renderInput={(params) => } /> } -
    +
    } + {p_filtre1 &&
    @@ -7085,7 +7302,29 @@ const Apprenant = (props) => { {p_filtre2 &&
    - 0 && (data).value === String(p_filtre2))[0].label} + options={New_Option_Filter} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre2(value.value); + } + + }} + + renderInput={(params) => + } + />} + + + {/* { Nom   Prénom   - + */}
    +
    - {String(p_filtre2).length > 3 && + {String(p_filtre2).length > 2 && String(p_filtre2) !== "archive" && { }} />} + + {String(p_filtre2).length > 2 && String(p_filtre2) === "archive" && + (data).id === String(p_filtre2_value))[0].label} + sx={{ float: "right" }} + className="disabled_style" + + options={New_Option_Is_archive} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre2_value(value.value); + } else { + setp_filtre2_value(""); + } + }} + renderInput={(params) => } + />}
    @@ -7139,8 +7402,8 @@ const Apprenant = (props) => {
      { - setp_filtre2(); - setp_filtre2_value(); + setp_filtre2(''); + setp_filtre2_value(''); }} /> @@ -7152,12 +7415,22 @@ const Apprenant = (props) => { {
    -
    -
    @@ -7336,7 +7609,7 @@ const Apprenant = (props) => {
    - {String(props.check_user_acces_right("stagiaire", "write")) === "1" && selectionModel && selectionModel.length >= 1 &&
    + {String(props.check_user_acces_right("stagiaire", "write")) === "1" && selectionModel && selectionModel.length >= 1 &&
      { || String(value.value) === "inscrire" || String(value.value) === "create_ent" || String(value.value) === "disable_ent" + || String(value.value) === "archive_desarchive" ) { setactionmass_ftion_val(value.value); } @@ -7372,75 +7646,81 @@ const Apprenant = (props) => { - {String(props.check_user_acces_right("stagiaire", "write")) === "1" && actionmass_ftion_val && }
    } @@ -8123,7 +8403,10 @@ const Apprenant = (props) => { {String(display_detail_apprenant) === "1" && String(add_One_Apprenant) !== "1" && selected_apprenant_id &&
    - + {p_detail_archive && String(p_detail_archive) === "1" && +
    Document Archivé
    } + +
    @@ -9277,7 +9560,7 @@ const Apprenant = (props) => {
    } {String(display_detail_inscriptions) === "1" && String(add_One_Apprenant) !== "1" && selected_apprenant_id &&
    - +
    @@ -9533,7 +9816,7 @@ const Apprenant = (props) => { {Get_List_Of_All_PJ_result && Get_List_Of_All_PJ_result.map((val) => (

    - {String(props.check_user_acces_right("stagiaire", "write")) === "1" && Supprimer @@ -9731,7 +10014,7 @@ const Apprenant = (props) => { - {String(props.check_user_acces_right("stagiaire", "write")) === "1" &&
    } {String(add_one_suivi_ped) !== "1" && String(display_given_suivi_ped) === "1" &&
    - + {String(given_suivi_ped_data_edit_mode) !== "1" &&
    diff --git a/src/components/Article.js b/src/components/Article.js index de6be44..e6b13fe 100644 --- a/src/components/Article.js +++ b/src/components/Article.js @@ -484,7 +484,7 @@ const Article = (props) => { //console.log("file_size = ", file_size, " file_type = ", file_type); //console.log(" fileUploaded = ", fileUploaded); - if (file_size > 1000000) { + if (file_size > 10000000) { alert("Le fichier ne doit pas dépasser un 1 Méga octets"); return; } diff --git a/src/components/Autre_RH.js b/src/components/Autre_RH.js new file mode 100644 index 0000000..5de40f8 --- /dev/null +++ b/src/components/Autre_RH.js @@ -0,0 +1,12039 @@ +import React, { useRef, useState, useEffect } from "react"; +import TextField from '@mui/material/TextField'; +import MenuItem from '@mui/material/MenuItem'; +import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css +import Button from '@mui/material/Button'; +import axios from "axios"; +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 { Editor } from '@tinymce/tinymce-react'; +import { FcViewDetails, FcDisapprove } from "react-icons/fc"; +import { FcInfo } from "react-icons/fc"; +import { LiaDharmachakraSolid } from "react-icons/lia"; +import 'react-tooltip/dist/react-tooltip.css' +import { Tooltip } from 'react-tooltip' +import Chip from "@mui/material/Chip"; +import excel_icone from "../mysy_img/excel_icone.png"; +import TextareaAutosize from '@mui/material/TextareaAutosize'; +import fileDownload from 'js-file-download'; +import Popup from 'reactjs-popup'; +import 'reactjs-popup/dist/index.css'; +import { FcAcceptDatabase, FcPrint } from "react-icons/fc"; +import DatePicker from "react-datepicker"; +import "react-datepicker/dist/react-datepicker.css"; +import { format } from 'date-fns' +import moment from "moment"; +import InputAdornment from '@mui/material/InputAdornment'; +import { AiFillCloseCircle } from "react-icons/ai"; +import Box from '@mui/material/Box'; +import { CiTrash } from "react-icons/ci"; +import { MdAddCircleOutline, MdRemoveCircleOutline } from "react-icons/md"; +import Dialog from '@mui/material/Dialog'; +import DialogActions from '@mui/material/DialogActions'; +import DialogContent from '@mui/material/DialogContent'; +import DialogContentText from '@mui/material/DialogContentText'; +import DialogTitle from '@mui/material/DialogTitle'; + +import Visibility from '@mui/icons-material/Visibility'; +import VisibilityOff from '@mui/icons-material/VisibilityOff'; +import { Fab } from "@material-ui/core"; +import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io"; +import { AiTwotoneEdit, AiTwotoneSave } from "react-icons/ai"; +import Autocomplete from '@mui/material/Autocomplete'; +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 } from "react-icons/io5"; +import Rating from '@mui/material/Rating'; +import { BarChart } from '@mui/x-charts'; +import { axisClasses } from '@mui/x-charts'; +import { LineChart } from '@mui/x-charts/LineChart'; +import BarChartIcon from '@mui/icons-material/BarChart'; +import SsidChartIcon from '@mui/icons-material/SsidChart'; +import { RiFileExcel2Line } from "react-icons/ri"; +import AttachFileIcon from '@mui/icons-material/AttachFile'; +import Module_Historique_Action from "./Module_Historique_Action"; +import Module_Alert_Confirmation from "./Module_Alert_Confirmation"; + +import CancelPresentationIcon from '@mui/icons-material/CancelPresentation'; +import { makeStyles } from "@material-ui/core/styles"; +import Paper from '@material-ui/core/Paper'; +import Draggable from 'react-draggable'; +import { IconButton } from '@material-ui/core'; + +function PaperComponent(props) { + return ( + + + + ); +} + + +const useStyles = makeStyles((theme) => ({ + + dialog: { + position: 'absolute', + // left: 10, + top: 400 + }, + + paper: { + overflowY: 'unset', + }, + customizedButton: { + position: 'absolute', + left: '98%', + top: '-3%', + backgroundColor: 'lightgray', + color: 'gray', + }, +})); + +const Autre_RH = (props) => { + const classes = useStyles(); + + const history = useHistory(); + const [submenu, setsubmenu] = useState(""); + const [rowss, setRows] = useState([]); + const [selectionModel, setSelectionModel] = React.useState([]); + + const [rows_affectations, setrows_affectations] = useState([]); + const [selectionModel_affectations, setSelectionModel_affectations] = React.useState([]); + + const [selectionModel_contrat, setselectionModel_contrat] = React.useState([]); + + + const [rows_acces_right, setrows_acces_right] = useState([]); + const [selectionModel_acces_right, setselectionModel_acces_right] = React.useState([]); + + + function ExpandableCell_50({ value }) { + const [expanded, setExpanded] = React.useState(false); + + return ( + + ); + } + + var date_today_90j = new Date(); + date_today_90j.setDate(date_today_90j.getDate() + 90); + + + var date_today_30j = new Date(); + date_today_30j.setDate(date_today_30j.getDate() + 30); + + + var date_today_minus_180j = new Date(); + date_today_minus_180j.setDate(date_today_minus_180j.getDate() - 180); + + + 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(""); + + + + + + const columns = [ + { field: '_id', headerName: '_id', hide: true, Width: 0, disableExport: true, }, + { field: 'id', headerName: 'id', hide: true, Width: 0, disableExport: true, }, + { field: 'date_naissance', headerName: 'date_naissance', hide: true, Width: 0 }, + { + field: 'civilite', headerName: 'Civilité', minWidth: 100, flex: 1, maxWidth: 100, hide: false, + valueFormatter: (params) => { + if (params.value) + return String(params.value)[0].toUpperCase() + String(params.value).slice(1); + else + return "" + + }, + + }, + + { field: 'nom', headerName: 'Nom', flex: 1, hide: false, minWidth: 180, renderCell: (params) => , }, + { field: 'prenom', headerName: 'Prénom', flex: 1, hide: false, minWidth: 180, renderCell: (params) => , }, + { field: 'email', headerName: 'Email', minWidth: 300, flex: 1, renderCell: (params) => , }, + { field: 'fonction', headerName: 'Fonction', width: 150, hide: false, }, + { field: 'telephone_mobile', headerName: 'Mobile', width: 150, hide: false, }, + { field: 'adr_adresse', headerName: 'Adresse', width: 100, hide: true, editable: false, minWidth: 50, maxWidth: 70, flex: 1 }, + { field: 'adr_code_postal', headerName: 'Code Postal', width: 100, hide: false, editable: false, minWidth: 50, maxWidth: 70, flex: 1 }, + { field: 'adr_ville', headerName: 'Ville', width: 100, hide: false, editable: false, minWidth: 50, maxWidth: 70, flex: 1 }, + { field: 'adr_pays', headerName: 'Pays', width: 100, hide: true, editable: false, minWidth: 50, maxWidth: 70, flex: 1 }, + + { + field: "Detail", headerName: 'Voir détail', + renderCell: (cellValues) => { + return ( + + + + ); + } + }, + { + field: "delete", headerName: 'Supprimer', + renderCell: (cellValues) => { + return ( + <> + {String(props.check_user_acces_right("employe", "write")) === "1" && { + // handleClick_delete(event, cellValues); + }} + > + + + } + modal + nested + position="center center" + > + {close => ( +
    + +
    MySy Information
    +
    + {' '} + + En confirmant cette opération, la ressource sera définitivement supprimée.
    + +
    +
    +
    + + +
    +
    + +
    +
    +
    + )} +
    } + + + + ); + } + } + + ] + + const columns_employee_affectation = [ + { field: '_id', headerName: '_id', hide: true }, + { field: 'id', headerName: 'id', hide: true }, + { field: 'poste', headerName: 'Poste', flex: 1, }, + { field: 'date_du', headerName: 'Du', width: 150, hide: false, }, + { field: 'date_au', headerName: 'Au', width: 150, hide: false, }, + { field: 'related_target_collection_object', headerName: 'Cible', flex: 1, hide: false, }, + { field: 'related_target_collection_id_nom', headerName: 'Cible Nom', flex: 1, hide: false, }, + { field: 'target_related_collection', headerName: 'Type', hide: true }, + { field: 'target_related_collection_id', headerName: 'Type ID', hide: true }, + { + field: "delete", headerName: 'Supprimer', + renderCell: (cellValues) => { + return ( + + <> + {String(props.check_user_acces_right("employe", "write")) === "1" && { + //handleClick_delete(event, cellValues); + }} + > + + + } + modal + nested + position="center center" + > + {close => ( +
    + +
    MySy Information
    +
    + {' '} + + En confirmant cette opération, la fonction sera définitivement supprimée.
    + +
    +
    +
    + + +
    +
    + +
    +
    +
    + )} +
    } + + + + ); + } + } + + + ] + + + const columns_employee_acces_right = [ + { field: '_id', headerName: '_id', hide: true }, + { field: 'id', headerName: 'id', hide: true }, + { field: 'module', headerName: 'Module', flex: 1, }, + { + field: 'read', headerName: 'Lecture', width: 150, hide: false, editable: true, type: 'boolean', + }, + { + field: 'write', headerName: 'Modification', width: 150, hide: false, editable: true, type: 'boolean', + + }, + + ] + + const columns_employee_acces_right_v2 = [ + { field: '_id', headerName: '_id', hide: true }, + { field: 'id', headerName: 'id', hide: true }, + { field: 'module', headerName: 'Module', flex: 1, }, + { + field: 'read', headerName: 'Lecture', width: 150, hide: false, editable: true, type: 'boolean', + + }, + + { + field: "write", + headername: "write", + rendercell: (params) => ( + handleconfirmchange(params.row.rowid)} + /> + ) + } + + ] + + const columns_employee_contrat = [ + { field: '_id', headerName: '_id', hide: true }, + { field: 'id', headerName: 'id', hide: true }, + { field: 'rh_id', headerName: 'rh_id', flex: 1, hide: true, }, + { field: 'date_debut', headerName: 'Du', width: 150, hide: false, }, + { field: 'date_fin', headerName: 'Au', width: 150, hide: false, }, + { field: 'type_contrat', headerName: 'Type Contrat', flex: 1, hide: false, width: 150, }, + { field: 'type_employe', headerName: 'Type Employé', flex: 1, hide: false, width: 150, }, + { field: 'qte', headerName: 'Quanité', flex: 1, hide: true, width: 150, }, + { field: 'cout', headerName: 'Prix', flex: 1, hide: true, width: 150, }, + { field: 'periodicite', headerName: 'Périodicité', flex: 1, minWidth: 150, hide: false, editable: false }, + { field: 'comment', headerName: 'Commentaire', flex: 1, hide: true, width: 150, }, + + { + field: "print", headerName: 'Impr.', + renderCell: (cellValues) => { + return ( + <> + {String(props.check_user_acces_right("employe", "write")) === "1" && } + + + ); + } + }, + + + { + field: "delete", headerName: 'Supprimer', + renderCell: (cellValues) => { + return ( + + <> + {String(props.check_user_acces_right("employe", "write")) === "1" && + + + } + modal + nested + position="center center" + > + {close => ( +
    + +
    MySy Information
    +
    + {' '} + + En confirmant cette opération, le contrat sera définitivement supprimé.
    + +
    +
    +
    + + +
    +
    + +
    +
    +
    + )} +
    } + + + + ); + } + } + + + ] + + const columns_list_evaluation_enseignant = [ + { field: 'id', headerName: 'id', hide: true }, + { field: '_id', headerName: '_id', hide: true }, + { field: 'form_code', headerName: 'Form. Code', hide: true, minwidth: 200, flex: 1, hideable: true, resizable: true, renderCell: (params) => , }, + { field: 'email', headerName: 'email', minwidth: 300, flex: 1, hideable: true, resizable: true, renderCell: (params) => , }, + { field: 'nom', headerName: 'nom', minwidth: 300, flex: 1, hide: false, editable: true, renderCell: (params) => , }, + { field: 'prenom', headerName: 'prenom', minwidth: 300, flex: 1, hide: false, editable: false, renderCell: (params) => , }, + { + field: 'status', headerName: 'Statut', width: 100, editable: false, flex: true, + valueFormatter: (params) => { + if (String(params.value) === "0") + return "Init."; + else if (String(params.value) === "1") + return "Env."; + else if (String(params.value) === "2") + return "Rép."; + else + return " ?"; + }, + }, + + { + field: 'date_envoie', headerName: 'Date Envoi', width: 150, editable: false, + valueFormatter: (params) => { + if (params.value) + return String(params.value).substring(0, 16) + else + return "" + + }, + }, + { + field: 'date_reponse', headerName: 'Date Réponse', width: 150, editable: false, + valueFormatter: (params) => { + if (params.value) + return String(params.value).substring(0, 16) + else + return "" + + }, + }, + + ] + + + const [tabledata, settabledata] = useState([]); + const [rows_acces_right_v2, setrows_acces_right_v2] = useState([]); + + + function handleconfirmchange(clickedrow) { + const updateddata = rows_acces_right_v2.map((x) => { + if (x.rowid === clickedrow) { + return { + ...x, + confirmed: true + }; + } + return x; + }); + setrows_acces_right_v2(updateddata); + } + + + + const columns_employee_acces_right_disabled = [ + { field: '_id', headerName: '_id', hide: true }, + { field: 'id', headerName: 'id', hide: true }, + { field: 'module', headerName: 'Module', flex: 1, }, + { + field: 'read', headerName: 'Lecture', width: 150, hide: false, editable: false, type: 'boolean', + + }, + { + field: 'write', headerName: 'Modification', width: 150, hide: false, editable: false, type: 'boolean', + + }, + + ] + + + + const [handleClick_print_employee_contrat_api, sethandleClick_print_employee_contrat_api] = useState(); + const [handleClick_print_employee_contrat_message, sethandleClick_print_employee_contrat_message] = useState(); + const [handleClick_print_employee_contrat_result, sethandleClick_print_employee_contrat_result] = useState(); + function handleClick_print_employee_contrat(local_contract_id) { + + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + + var nom_fiche_detaillee = "Contrat_" + String(p_detail_nom) + ".pdf"; + + var url = process.env.REACT_APP_API_URL + "myclass/api/Print_Employee_Given_Contrat/" + stored_cookie + "/" + selected_id + "/" + local_contract_id + "/"; + + Dialog_print_contrat_handleClose_buton(); + + setLoading(true); + axios.get(url, { responseType: 'blob', },) + .then((res) => { + setLoading(false); + fileDownload(res.data, nom_fiche_detaillee) + }).catch((error) => { + setLoading(false); + console.error('Error:', error); + + }); + + + } + + + const [Getall_Employee_Acces_Right_api, setGetall_Employee_Acces_Right_api] = useState(); + const [Getall_Employee_Acces_Right_message, setGetall_Employee_Acces_Right_message] = useState(); + const [Getall_Employee_Acces_Right_result, setGetall_Employee_Acces_Right_result] = useState(); + function Getall_Employee_Acces_Right(local_employe_id) { + + var form = new FormData(); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("user_id", local_employe_id); + + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Matrix_Acces_Right/"; + + + + axios.post(myurl, form).then(res => { + + if (String(res.data.status) === String("true")) { + //console.log(" In Getall_Employee_Acces_Right res.data.status = " + res.data.status); + //console.log(" In Getall_Employee_Acces_Right res.data.message r_class = " + res.data.message); + setGetall_Employee_Acces_Right_api("true"); + setGetall_Employee_Acces_Right_result(res.data.message); + setrows_acces_right(res.data.message); + + } + else { + setGetall_Employee_Acces_Right_api("false"); + setGetall_Employee_Acces_Right_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_Employee_Acces_Right = ', error); + setGetall_Employee_Acces_Right_api("false"); + //alert(" Impossible de recuperer la matrice des Droits d'accès de l'employé"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de recuperer la matrice des Droits d'accès de l'employé"); + setalert_type("error"); + //setmyApimyApiMessage("") + }) + } + + + const [Getall_Profil_Acces_Right_api, setGetall_Profil_Acces_Right_api] = useState(); + const [Getall_Profil_Acces_Right_message, setGetall_Profil_Acces_Right_message] = useState(); + const [Getall_Profil_Acces_Right_result, setGetall_Profil_Acces_Right_result] = useState(); + function Getall_Profil_Acces_Right(local_profile_name) { + + var form = new FormData(); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("ressource_humaine_profil_id", local_profile_name); + + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Matrix_Acces_Right_By_Profil/"; + + + + axios.post(myurl, form).then(res => { + + if (String(res.data.status) === String("true")) { + //console.log(" In Getall_Profil_Acces_Right res.data.status = " + res.data.status); + //console.log(" In Getall_Profil_Acces_Right res.data.message r_class = " + res.data.message); + setGetall_Profil_Acces_Right_api("true"); + setGetall_Profil_Acces_Right_result(res.data.message); + setrows_acces_right(res.data.message); + + } + else { + setGetall_Profil_Acces_Right_api("false"); + setGetall_Profil_Acces_Right_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_Profil_Acces_Right = ', error); + setGetall_Profil_Acces_Right_api("false"); + // alert(" Impossible de recuperer la matrice des Droits d'accès du profile"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de recuperer la matrice des Droits d'accès du profile"); + setalert_type("error"); + //setmyApimyApiMessage("") + }) + } + + + const [Getall_Employee_Contrat_api, setGetall_Employee_Contrat_api] = useState(); + const [Getall_Employee_Contrat_message, setGetall_Employee_Contrat_message] = useState(); + const [Getall_Employee_Contrat_result, setGetall_Employee_Contrat_result] = useState([]); + function Getall_Employee_Contrat(local_employe_id) { + + var form = new FormData(); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("rh_id", local_employe_id); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Employee_Contrat/"; + + + setLoading(true); + axios.post(myurl, form).then(res => { + + if (String(res.data.status) === String("true")) { + setLoading(false); + //console.log(" In Getall_Employee_Contrat res.data.status = " + res.data.status); + //console.log(" In Getall_Employee_Contrat res.data.message r_class = " + res.data.message); + setGetall_Employee_Contrat_api("true"); + setGetall_Employee_Contrat_result(res.data.message); + + } + else { + setGetall_Employee_Contrat_api("false"); + setGetall_Employee_Contrat_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_Employee_Contrat = ', error); + setGetall_Employee_Contrat_api("false"); + // alert(" Impossible de recuperer les contrat de l'employé"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de recuperer les contrat de l'employé"); + setalert_type("error"); + //setmyApimyApiMessage("") + }) + } + + + + + const [New_Getall_Employee_Type_Contrat_result, setNew_Getall_Employee_Type_Contrat_result] = useState([]); + + const [Getall_Employee_Type_Contrat_api, setGetall_Employee_Type_Contrat_api] = useState(); + const [Getall_Employee_Type_Contrat_message, setGetall_Employee_Type_Contrat_message] = useState(); + const [Getall_Employee_Type_Contrat_result, setGetall_Employee_Type_Contrat_result] = useState([]); + function Getall_Employee_Type_Contrat() { + + 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_Type_Contrat_List/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + + if (String(res.data.status) === String("true")) { + setLoading(false); + //console.log(" In Getall_Employee_Type_Contrat res.data.status = " + res.data.status); + //console.log(" In Getall_Employee_Type_Contrat res.data.message r_class = " + res.data.message); + setGetall_Employee_Type_Contrat_api("true"); + setGetall_Employee_Type_Contrat_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_description = JSON.parse(x).description; + + //--- + var node = { + "_id": local_id, + "id": localid, + "code": local_code, + "label": local_description, + "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_Employee_Type_Contrat_result(new_data2); + + } + else { + setGetall_Employee_Type_Contrat_api("false"); + setGetall_Employee_Type_Contrat_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_Employee_Type_Contrat = ', error); + setGetall_Employee_Type_Contrat_api("false"); + // alert(" Impossible de recuperer les contrat de l'employé"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de recuperer les contrat de l'employé"); + setalert_type("error"); + //setmyApimyApiMessage("") + }) + } + + + 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(""); + + setdisplay_affectation(""); + setAdd_new_affectation(""); + clean_affectation_fields(); + clean_nouvelle_affectation_fields(); + setSelectionModel_affectations([]); + setSelectionModel([]); + setsubmenu(""); + + Getall_Training_Employee_No_Filter(); + } + + const myRef = useRef(null) + + const [Dialog_1_message, setDialog_1_message] = React.useState(false); + const [Dialog_1_open, setDialog_1_open] = React.useState(false); + function Dialog_1_handle_change_participant_session(message) { + setDialog_1_message(message); + setDialog_1_open(true); + } + + const Dialog_1_handleClose = () => { + //alert(" Utiliser le bouton 'fermer' "); + //setOpen(false); + }; + + const Dialog_1_handleClose_buton = () => { + setDialog_1_open(false); + }; + + + + const [Dialog_1_message_profil_access_right, setDialog_1_message_profil_access_right] = React.useState(false); + const [Dialog_1_open_profil_access_right, setDialog_1_open_profil_access_right] = React.useState(false); + function Dialog_1_handle_change_profil_access_right(message, profile_name) { + setDialog_1_message_profil_access_right(message); + setDialog_1_open_profil_access_right(true); + } + + const Dialog_1_handleClose_buton_profil_access_right = () => { + //alert(" Utiliser le bouton 'fermer' "); + //setOpen(false); + }; + + const Dialog_1_handle_OK_buton_profil_access_right = () => { + setp_user_profil(p_user_profil_tmp); + setp_user_profil_changed("1"); + Getall_Profil_Acces_Right(p_user_profil_tmp_id); + Enable_acces_right_datagrid(); + setacces_right_data_changed("1"); + setDialog_1_open_profil_access_right(false); + }; + + + const Dialog_1_handleCancel_buton_profil_access_right = () => { + document.getElementsByName("one_detail_profil")[0].value = ""; + setDialog_1_open_profil_access_right(false); + Disable_acces_right_datagrid(); + }; + + + const [Check_User_Access_Right_api, setCheck_User_Access_Right_api] = useState(); + const [Check_User_Access_Right_message, setCheck_User_Access_Right_message] = useState(); + const [Check_User_Access_Right_result, setCheck_User_Access_Right_result] = useState(); + async function Check_User_Access_Right(local_module_name, local_action) { + + var form = new FormData(); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("module_name", local_module_name); + form.append("action", local_action); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Is_User_Has_Right_To_Action/"; + + + + axios.post(myurl, form).then(res => { + + if (String(res.data.status) === String("true")) { + //console.log(" In Check_User_Access_Right res.data.status = " + res.data.status); + //console.log(" In Check_User_Access_Right res.data.message r_class = " + res.data.message); + setCheck_User_Access_Right_api("true"); + setCheck_User_Access_Right_result(res.data.message); + return 1; + + } + else { + setCheck_User_Access_Right_api("false"); + setCheck_User_Access_Right_message(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); + return 0; + } + + }).catch((error) => { + console.warn('Not good man :( Check_User_Access_Right = ', error); + setCheck_User_Access_Right_api("false"); + // alert(" Impossible de recuperer la matrice des Droits d'accès de l'employé"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de recuperer la matrice des Droits d'accès de l'employé"); + setalert_type("error"); + return 0; + //setmyApimyApiMessage("") + }) + } + + + const [selectionModel_evaluation_formateur, setselectionModel_evaluation_formateur] = React.useState([]); + const [rowss_evaluation_formateur, setRows_evaluation_formateur] = useState([]); + + const [Getall_Survey_formateur_evaluation_By_Session_api, setGetall_Survey_formateur_evaluation_By_Session_api] = useState(); + const [Getall_Survey_formateur_evaluation_By_Session_message, setGetall_Survey_formateur_evaluation_By_Session_message] = useState(); + const [Getall_Survey_formateur_evaluation_By_Session_result, setGetall_Survey_formateur_evaluation_By_Session_result] = useState([]); + function Getall_Survey_formateur_evaluation_By_Session(event) { + + setselectionModel_evaluation_formateur([]) + + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("related_collection", "ressource_humaine"); + form.append("related_collection_id", selected_id); + form.append("formulaire_type", "human_eval"); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Survey_with_filter/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + + setLoading(false); + + if (String(res.data.status) === String("true")) { + // console.log(" In Getall_Survey_formateur_evaluation_By_Session res.data.status = " + res.data.status); + //console.log(" In Getall_Survey_formateur_evaluation_By_Session res.data.message r_class = " + res.data.message); + setGetall_Survey_formateur_evaluation_By_Session_api("true"); + setGetall_Survey_formateur_evaluation_By_Session_result(res.data.message); + setRows_evaluation_formateur(res.data.message); + + } + else { + setGetall_Survey_formateur_evaluation_By_Session_api("false"); + setGetall_Survey_formateur_evaluation_By_Session_message(res.data.message); + } + + }).catch((error) => { + setLoading(false); + console.warn('Not good man :( Getall_Survey_formateur_evaluation_By_Session = ', error); + setGetall_Survey_formateur_evaluation_By_Session_api("false"); + //setmyApimyApiMessage("") + }) + } + + const [history_securite_read, sethistory_securite_read] = useState(""); + + const [New_GetCurrentPartnerClass_result, setNew_GetCurrentPartnerClass_result] = useState([]); + + const [GetCurrentPartnerClass_api, setGetCurrentPartnerClass_api] = useState(); + const [GetCurrentPartnerClass_message, setGetCurrentPartnerClass_message] = useState(); + const [GetCurrentPartnerClass_result, setGetCurrentPartnerClass_result] = useState([]); + function GetCurrentPartnerClass(event) { + var form = new FormData(); + + + //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("archive", "0"); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_partner_class_Without_Scope_Action/"; + + axios.post(myurl, form).then(res => { + //console.log(" In GetCurrentPartnerClass res.data.status = " + res.data.status); + //console.log(" In GetCurrentPartnerClass res.data.message r_class = " + res.data.message); + if (String(res.data.status) === String("true")) { + + setGetCurrentPartnerClass_api("true"); + setGetCurrentPartnerClass_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_title = JSON.parse(x).title; + var local_external_code = JSON.parse(x).external_code; + + + //--- + var node = { + "_id": local_id, + "id": localid, + "label": local_external_code, + "title": local_title, + "external_code": local_external_code, + }; + 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_GetCurrentPartnerClass_result(new_data2); + + + } else if (String(res.data.status) === String("Err_Connexion")) { + alert('Erreur: ' + res.data.message); + history.push("/Connexion"); + } + else { + setGetCurrentPartnerClass_api("false"); + setGetCurrentPartnerClass_message(res.data.message); + alert('Erreur: ' + res.data.message); + } + + }).catch((error) => { + console.warn('Not good man :( mysearchtext = ', error); + setGetCurrentPartnerClass_api("false"); + alert(" Impossible de recuperer la liste des formations") + //setmyApimyApiMessage("") + }) + } + + + const [Get_Given_User_Access_Scope_api, setGet_Given_User_Access_Scope_api] = useState(); + const [Get_Given_User_Access_Scope_message, setGet_Given_User_Access_Scope_message] = useState(); + const [Get_Given_User_Access_Scope_result, setGet_Given_User_Access_Scope_result] = useState([]); + function Get_Given_User_Access_Scope() { + + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("user_id", selected_id); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_User_Access_Scope/"; + + axios.post(myurl, form).then(res => { + // console.log(" In Get_Given_User_Access_Scope res.data.status = " + res.data.status); + // console.log(" In Get_Given_User_Access_Scope res.data.message r_class = " + res.data.message); + + if (String(res.data.status) === String("true")) { + + setGet_Given_User_Access_Scope_api("true"); + setGet_Given_User_Access_Scope_result(res.data.message); + + var local_perimetre = JSON.parse(res.data.message); + + if (local_perimetre.node_class) { + setscope_class(local_perimetre.node_class); + + } else { + setscope_class([]); + } + + + if (local_perimetre.node_session) { + setscope_session(local_perimetre.node_session); + + } else { + setscope_session([]); + } + + + } + else { + setGet_Given_User_Access_Scope_api("false"); + setGet_Given_User_Access_Scope_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 :( Get_Given_User_Access_Scope = ', error); + setGet_Given_User_Access_Scope_api("false"); + alert(" Impossible de recuperer le périmetre d'accès"); + //setmyApimyApiMessage("") + }) + } + + + const [Update_user_Scope_access_api, setUpdate_user_Scope_access_api] = useState(); + const [Update_user_Scope_access_message, setUpdate_user_Scope_access_message] = useState(); + const [Update_user_Scope_access_result, setUpdate_user_Scope_access_result] = useState(); + function Update_user_Scope_access() { + var form = new FormData(); + //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); + + console.log(" scope_class == ", scope_class); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("user_id", selected_id); + + var tab_scope_class_id = [] + for (var i = 0; i < scope_class.length; i++) { + tab_scope_class_id.push(scope_class[i]._id) + } + + var tab_scope_session_id = [] + for (var i = 0; i < scope_session.length; i++) { + tab_scope_session_id.push(scope_session[i]._id) + } + + + form.append("tab_scope_class", tab_scope_class_id); + + form.append("tab_scope_session", tab_scope_session_id); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Update_User_Access_Scope/"; + setLoading(true); + axios.post(myurl, form).then(res => { + //console.log(" In Update_user_Scope_access res.data.status = " + res.data.status); + //console.log(" In Update_user_Scope_access res.data.message r_class = " + res.data.message); + + setLoading(false); + + if (String(res.data.status) === String("true")) { + setUpdate_user_Scope_access_api("true"); + setUpdate_user_Scope_access_result(res.data.message); + setacces_right_data_edit_mode(); + // alert(" La mise à jour a été correctement faite."); + setdisplay_alert_mysy("1"); + setalert_message(" La mise à jour a été correctement faite."); + setalert_type("success"); + setscope_changed(""); + } + else { + setUpdate_user_Scope_access_api("false"); + setUpdate_user_Scope_access_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('UpdateStagiaireData : Not good man :( Update_user_Scope_access = ' + error); + setUpdate_user_Scope_access_api("false"); + // alert(" Impossible de mettre à jour les Droits d'accès de l'employé"); + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de mettre à jour les Droits d'accès de l'employé"); + setalert_type("error"); + + }) + } + + const [New_Getall_TrainingSession_Without_Scope_Action_result, setNew_Getall_TrainingSession_Without_Scope_Action_result] = useState(); + + const [Getall_TrainingSession_Without_Scope_Action_api, setGetall_TrainingSession_Without_Scope_Action_api] = useState(); + const [Getall_TrainingSession_Without_Scope_Action_message, setGetall_TrainingSession_Without_Scope_Action_message] = useState(); + const [Getall_TrainingSession_Without_Scope_Action_result, setGetall_TrainingSession_Without_Scope_Action_result] = useState(); + function Getall_TrainingSession_Without_Scope_Action() { + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("archive", "0"); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetAllValideSessionPartner_List_Without_Scope_Action/"; + + + axios.post(myurl, form).then(res => { + // console.log(" In Getall_TrainingSession_Without_Scope_Action res.data.status = " + res.data.status); + // console.log(" In Getall_TrainingSession_Without_Scope_Action res.data.message r_class = " + res.data.message); + + if (String(res.data.status) === String("true")) { + + setGetall_TrainingSession_Without_Scope_Action_api("true"); + setGetall_TrainingSession_Without_Scope_Action_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_title_session = JSON.parse(x).titre; + var local_code_session = JSON.parse(x).code_session; + + //--- + var node = { + "_id": local_id, + "id": localid, + "label": local_code_session, + "titre": local_title_session, + "code_session": local_code_session, + }; + 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_Without_Scope_Action_result(new_data2); + + //console.log(" ### new_data2 = ", new_data2) + + + } + else { + setGetall_TrainingSession_Without_Scope_Action_api("false"); + setGetall_TrainingSession_Without_Scope_Action_message(res.data.message); + } + + }).catch((error) => { + console.warn('Not good man :( Getall_TrainingSession_Without_Scope_Action = ', error); + setGetall_TrainingSession_Without_Scope_Action_api("false"); + //setmyApimyApiMessage("") + }) + } + + + + useEffect(() => { + sethistory_securite_read(props.check_user_acces_right("historique", "read")) + + Getall_Training_Employee_No_Filter(); + Get_List_Managers(); + Get_List_RH_Profils(); + Get_Employee_Related_Target_Collection_Data(); + Get_List_Competence_Type(); + + Get_Partner_Object_Specific_Fields("ressource_humaine"); + + Getall_Survey_formateur_evaluation_By_Session(); + + window.scrollTo({ + top: 0, + behavior: "smooth", + }); + + }, []) + + + const [display_detail_employe, setdisplay_detail_employe] = React.useState(); + + const [selected_id, setselected_id] = useState(""); + + const [gridline_id, setgridline_id] = useState(""); + + + const [selected_employe_email, setselected_employe_email] = useState(""); + function handleClick_edit_employee_From_Line(selected_row_id) { + + submenu_detail_employe(); + setEmployee_data_changed(); + var line = JSON.parse(rowss[selected_row_id]); + + //console.log("### line = ", line); + var employe_id = line._id; + setselected_id(employe_id); + + var employe_email = line.email; + setselected_employe_email(employe_email); + + setgridline_id(selected_row_id); + + setAffectation_data_changed(); + //console.log(" ### employe_id = ", employe_id); + Display_Detail_Employe(employe_id); + + Get_List_Managers(); + Get_List_RH_Profils(); + Get_Employee_Related_Target_Collection_Data(); + + if (document.getElementById('myRef')) { + var divh = document.getElementById('myRef').offsetTop; + window.scrollTo({ + top: divh, + behavior: "smooth", + }); + } + + Getall_Employee_Affectation(employe_id); + Getall_Employee_Acces_Right(employe_id); + Getall_Employee_Contrat(employe_id); + Get_Partner_Purchase_Prices(); + + Get_List_Of_All_PJ(employe_id); + + + } + + + + function handleClick_edit_acces_right_From_Line(selected_row_id) { + } + + const [Add_new_affectation, setAdd_new_affectation] = useState(); + + const [selected_affectation_id, set_selected_affectation_id] = useState(); + function handleClick_edit_affectation_From_Line(selected_row_id) { + setdisplay_affectation("1"); + setAdd_new_affectation(""); + clean_affectation_fields(); + clean_nouvelle_affectation_fields(); + + + var line = JSON.parse(rows_affectations[selected_row_id]); + + //console.log("### line = ", line); + var affectation_id = line._id; + set_selected_affectation_id(affectation_id); + + if (document.getElementById('myRef_affectation')) { + // myRef.current.scrollIntoView({ behavior: "smooth" }); + var divh = document.getElementById('myRef_affectation').offsetTop; + window.scrollTo({ + top: divh, + behavior: "smooth", + }); + } + + Get_Given_Employee_Affectation(affectation_id); + + } + + + function Display_Detail_Employe(employee_id) { + + + clearEmployeeFields() + setadd_One_Employee(); + setdisplay_detail_employe("1"); + + Get_Employee_Data(employee_id); + get_Employee_Images(employee_id); + } + + + function clearEmployeeFields() { + + setp_one_detail_nom(''); + setp_one_detail_prenom(''); + setp_one_detail_mail(''); + setp_one_detail_naissance(new Date().toLocaleDateString('fr-FR')); + + setp_one_detail_tel(''); + setp_one_detail_adresse(''); + setp_one_detail_code_postal(''); + setp_one_detail_ville(''); + setp_one_detail_resp_hierarchie_id(''); + setp_one_detail_civilite(''); + setp_one_detail_fonction(''); + setp_one_detail_profil(''); + setp_one_detail_profil_label(''); + + setp_one_detail_pays(''); + setp_one_detail_tel_mobile(''); + setp_one_detail_linkedIn(''); + setp_one_detail_facebook(''); + setp_one_detail_twitter(''); + + setp_one_detail_competence(''); + + setp_one_detail_ismanager('0'); + + setp_one_detail_ismanager_label(''); + setp_one_detail_resp_hierarchie_nom(''); + setp_one_detail_resp_hierarchie_prenom(''); + + setp_detail_lms_login(''); + + setp_detail_user_login(''); + setp_detail_user_login_locked(''); + + setp_detail_lms_virtualhost_url(''); + setp_detail_mysy_lms_user_id(''); + setp_detail_lms_account_disable(''); + + + } + + function handleClick_delete(event, cellValues) { + + var local_rh_id = cellValues.row._id; + + Delete_Employee(local_rh_id); + } + + + function handleClick_delete_affection(event, cellValues) { + + var local_affectation_id = cellValues.row._id; + + Delete_affection(selected_id, local_affectation_id); + } + + + + const [p_detail_nom, setp_detail_nom] = useState(""); + const [p_detail_prenom, setp_detail_prenom] = useState(""); + const [p_detail_mail, setp_detail_mail] = useState(""); + const [p_detail_comment, setp_detail_comment] = useState(""); + + const [p_detail_naissance, setp_detail_naissance] = useState(new Date().toLocaleDateString('fr-FR')); + + + const [p_detail_tel, setp_detail_tel] = useState(""); + const [p_detail_adresse, setp_detail_adresse] = useState(""); + const [p_detail_code_postal, setp_detail_code_postal] = useState(""); + const [p_detail_ville, setp_detail_ville] = useState(""); + const [p_detail_resp_hierarchie_id, setp_detail_resp_hierarchie_id] = useState(""); + const [p_detail_civilite, setp_detail_civilite] = useState(""); + const [p_detail_civilite_label, setp_detail_civilite_label] = useState(); + const [p_detail_fonction, setp_detail_fonction] = useState(""); + const [p_detail_profil, setp_detail_profil] = useState(""); + const [p_detail_pays, setp_detail_pays] = useState(""); + const [p_detail_tel_mobile, setp_detail_tel_mobile] = useState(""); + const [p_detail_linkedIn, setp_detail_linkedIn] = useState(""); + const [p_detail_facebook, setp_detail_facebook] = useState(""); + const [p_detail_twitter, setp_detail_twitter] = useState(""); + const [p_detail_list_diffusion_mail, setp_detail_list_diffusion_mail] = useState(""); + + + + const [p_detail_competence, setp_detail_competence] = useState(""); + + + const [p_detail_ismanager, setp_detail_ismanager] = useState("0"); + const [p_detail_ismanager_label, setp_detail_ismanager_label] = useState(""); + const [p_detail_resp_hierarchie_nom, setp_detail_resp_hierarchie_nom] = useState(""); + const [p_detail_resp_hierarchie_prenom, setp_detail_resp_hierarchie_prenom] = useState(""); + + + const [p_detail_lms_login, setp_detail_lms_login] = useState(""); + + const [p_detail_user_login_locked, setp_detail_user_login_locked] = useState(""); + + const [p_detail_user_login, setp_detail_user_login] = useState(""); + const [p_detail_lms_virtualhost_url, setp_detail_lms_virtualhost_url] = useState(""); + const [p_detail_mysy_lms_user_id, setp_detail_mysy_lms_user_id] = useState(""); + + const [p_detail_lms_account_disable, setp_detail_lms_account_disable] = useState(""); + + const [p_detail_user_pass, setp_detail_user_pass] = useState(""); + + + const [p_one_detail_nom, setp_one_detail_nom] = useState(); + const [p_one_detail_prenom, setp_one_detail_prenom] = useState(); + const [p_one_detail_mail, setp_one_detail_mail] = useState(); + const [p_one_detail_comment, setp_one_detail_comment] = useState(""); + + const [p_one_detail_naissance, setp_one_detail_naissance] = useState(new Date().toLocaleDateString('fr-FR')); + + + + const [p_one_detail_tel, setp_one_detail_tel] = useState(); + const [p_one_detail_adresse, setp_one_detail_adresse] = useState(); + const [p_one_detail_code_postal, setp_one_detail_code_postal] = useState(); + const [p_one_detail_ville, setp_one_detail_ville] = useState(); + const [p_one_detail_resp_hierarchie_id, setp_one_detail_resp_hierarchie_id] = useState(); + const [p_one_detail_civilite, setp_one_detail_civilite] = useState(); + const [p_one_detail_fonction, setp_one_detail_fonction] = useState(); + const [p_one_detail_profil, setp_one_detail_profil] = useState(); + const [p_one_detail_profil_label, setp_one_detail_profil_label] = useState(); + const [p_one_detail_pays, setp_one_detail_pays] = useState(); + const [p_one_detail_tel_mobile, setp_one_detail_tel_mobile] = useState(); + const [p_one_detail_linkedIn, setp_one_detail_linkedIn] = useState(); + const [p_one_detail_facebook, setp_one_detail_facebook] = useState(); + const [p_one_detail_twitter, setp_one_detail_twitter] = useState(); + + const [p_one_detail_list_diffusion_mail, setp_one_detail_list_diffusion_mail] = useState(); + + const [p_one_detail_competence, setp_one_detail_competence] = useState(); + + + const [p_one_detail_ismanager, setp_one_detail_ismanager] = useState(); + const [p_one_detail_ismanager_label, setp_one_detail_ismanager_label] = useState("0"); + const [p_one_detail_resp_hierarchie_nom, setp_one_detail_resp_hierarchie_nom] = useState(); + const [p_one_detail_resp_hierarchie_prenom, setp_one_detail_resp_hierarchie_prenom] = useState(); + + + const [employee_data_changed, setemployee_data_changed] = useState(""); + const [employee_data_edit_mode, setemployee_data_edit_mode] = useState("0"); + + + + const [employee_list_competence, setemployee_list_competence] = useState([]); + + const [GetAttendee_api, setGetAttendee_api] = useState(); + const [GetAttendee_message, setGetAttendee_message] = useState(); + const [GetAttendee_result, setGetAttendee_result] = useState(); + function Get_Employee_Data(employe_id) { + setemployee_data_changed(""); + setemployee_data_edit_mode("0"); + setisimgclassSelected(); + setuserimgclassprofil(); + setisimgclassSelected_recid(); + + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("_id", employe_id); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Given_Ressource_Humaine/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + + if (String(res.data.status) === "true") { + setLoading(false); + //console.log(" In Get_Employee_Data res.data.status = " + res.data.status); + // console.log(" In Get_Employee_Data res.data.message r_class = " + res.data.message); + setGetAttendee_api("true"); + setGetAttendee_result(res.data.message); + + if (res.data.message.length > 0) { + var mylocal_employe = JSON.parse(res.data.message); + + if (mylocal_employe.nom) + setp_detail_nom(mylocal_employe.nom); + + + if (mylocal_employe.prenom) + setp_detail_prenom(mylocal_employe.prenom); + + + if (mylocal_employe.email) { + setp_detail_mail(mylocal_employe.email); + } + + if (mylocal_employe.date_naissance) { + setp_detail_naissance(mylocal_employe.date_naissance); + } else { + setp_detail_naissance(""); + } + + + if (mylocal_employe.list_competence) { + setemployee_list_competence(mylocal_employe.list_competence); + } else { + setemployee_list_competence([]); + } + + + if (mylocal_employe.telephone_mobile) { + setp_detail_tel_mobile(mylocal_employe.telephone_mobile); + } else { + setp_detail_tel_mobile(""); + } + + + if (mylocal_employe.civilite) { + setp_detail_civilite(mylocal_employe.civilite); + } else { + setp_detail_civilite(""); + } + + + if (mylocal_employe.telephone) { + setp_detail_tel(mylocal_employe.telephone); + } + + if (mylocal_employe.adr_adresse) { + setp_detail_adresse(mylocal_employe.adr_adresse); + } else { + setp_detail_adresse(""); + } + + if (mylocal_employe.adr_code_postal) { + setp_detail_code_postal(mylocal_employe.adr_code_postal); + } else { + setp_detail_code_postal(""); + } + + if (mylocal_employe.adr_ville) { + setp_detail_ville(mylocal_employe.adr_ville); + } else { + setp_detail_ville(""); + } + + + if (mylocal_employe.adr_pays) { + setp_detail_pays(mylocal_employe.adr_pays); + } else { + setp_detail_pays(""); + } + + if (mylocal_employe.comment) { + setp_detail_comment(mylocal_employe.comment); + } else { + setp_detail_comment(""); + } + + if (mylocal_employe.linkedin) { + setp_detail_linkedIn(mylocal_employe.linkedin); + } else { + setp_detail_linkedIn(""); + } + + + if (mylocal_employe.facebook) { + setp_detail_facebook(mylocal_employe.facebook); + } else { + setp_detail_facebook(""); + } + + if (mylocal_employe.diffusion_mail) { + setp_detail_list_diffusion_mail(mylocal_employe.diffusion_mail); + } else { + setp_detail_list_diffusion_mail(""); + } + + + if (mylocal_employe.twitter) { + setp_detail_twitter(mylocal_employe.twitter); + } else { + setp_detail_twitter(""); + } + + if (mylocal_employe.profil) { + setp_detail_profil(mylocal_employe.profil); + } else { + setp_detail_profil(""); + } + + + if (mylocal_employe.fonction) { + setp_detail_fonction(mylocal_employe.fonction); + } else { + setp_detail_fonction(""); + } + + if (mylocal_employe.lms_username) { + setp_detail_lms_login(mylocal_employe.lms_username); + + } else { + + setp_detail_lms_login(""); + } + + + + if (mylocal_employe.user_login) { + setp_detail_user_login(mylocal_employe.user_login); + setp_new_login(mylocal_employe.user_login) + } else { + setp_new_login(mylocal_employe.email); + setp_detail_user_login(""); + } + + if (mylocal_employe.lms_virtualhost_url) { + setp_detail_lms_virtualhost_url(mylocal_employe.lms_virtualhost_url); + + } else { + setp_detail_lms_virtualhost_url(''); + } + + if (mylocal_employe.locked) { + setp_detail_user_login_locked(mylocal_employe.locked); + + } else { + setp_detail_user_login_locked(''); + } + + if (mylocal_employe.mysy_lms_user_id) { + setp_detail_mysy_lms_user_id(mylocal_employe.mysy_lms_user_id); + + } else { + setp_detail_mysy_lms_user_id(''); + } + + if (mylocal_employe.lms_account_disable) { + setp_detail_lms_account_disable(mylocal_employe.lms_account_disable); + + } else { + setp_detail_lms_account_disable(''); + } + + + setp_detail_ismanager("0"); + if (mylocal_employe.ismanager) { + setp_detail_ismanager(mylocal_employe.ismanager); + if (String(mylocal_employe.ismanager) === "1") + setp_detail_ismanager_label("Oui"); + else + setp_detail_ismanager_label("Non"); + } + + + if (mylocal_employe.superieur_hierarchie_id && String(mylocal_employe.superieur_hierarchie_id).length > 2) { + setp_detail_resp_hierarchie_id(mylocal_employe.superieur_hierarchie_id); + setp_detail_resp_hierarchie_nom(mylocal_employe.superieur_hierarchie_nom); + setp_detail_resp_hierarchie_prenom(mylocal_employe.superieur_hierarchie_prenom); + } else { + setp_detail_resp_hierarchie_nom(""); + setp_detail_resp_hierarchie_prenom(""); + setp_detail_resp_hierarchie_id(""); + } + + /* + * Update 22/10/2023 : + Gestion des champs spécifiques. ils commencent tous par 'my_' + */ + + + for (let i = 0; i < rows_champs_specifics.length; i++) { + + var field_name = JSON.parse(rows_champs_specifics[i]).field_name; + var field_type = JSON.parse(rows_champs_specifics[i]).field_type; + var field_label = JSON.parse(rows_champs_specifics[i]).field_label; + var is_mandatory = JSON.parse(rows_champs_specifics[i]).is_mandatory; + + + if (mylocal_employe.hasOwnProperty(field_name)) { + var local_valeur = mylocal_employe[String(field_name)] + + if (document.getElementById(String(field_name))) + document.getElementById(String(field_name)).value = local_valeur; + + var new_val = { 'field_name': field_name, 'field_value': local_valeur, 'field_type': field_type } + var johnIndex = findIndexByProperty(spec_field_updated_values, 'field_name', field_name); + + if (johnIndex > -1) { + spec_field_updated_values[johnIndex] = new_val; + + } else { + spec_field_updated_values.push(new_val); + } + + } else { + + if (document.getElementById(String(field_name))) + document.getElementById(String(field_name)).value = ""; + + } + } + + setspec_field_updated_values_hooks(spec_field_updated_values); + /* + * end Update 22/10/2023 : + */ + + + + disable_Employee_DetailFields(); + } else { + //alert(" Aucun employé recuperé"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(" Aucun employé recuperé"); + setalert_type("warning"); + } + + + } else if (String(res.data.status) === String("Err_Connexion")) { + alert('Erreur: ' + res.data.message); + history.push("/Connexion"); + } + + else { + setLoading(false); + setGetAttendee_api("false"); + setGetAttendee_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 :( Get_Employee_Data = ', error); + setGetAttendee_api("false"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de recuperer les données de l'employé"); + setalert_type("error"); + // alert(" Impossible de recuperer les données de l'employé"); + //setmyApimyApiMessage("") + }) + } + + + + const [Getall_Training_Employee_api, setGetall_Training_Employee_api] = useState(); + const [Getall_Training_Employee_message, setGetall_Training_Employee_message] = useState(); + const [Getall_Training_Employee_result, setGetall_Training_Employee_result] = useState(); + function Getall_Training_Employee(event) { + + var form = new FormData(); + + + // Recuperation des parametres + var filtre1 = p_filtre1; + var filtre2 = p_filtre2; + var filtre3 = p_filtre3; + var filtre4 = p_filtre4; + + var filtre1_value = ""; + var filtre2_value = ""; + var filtre3_value = ""; + var filtre4_value = ""; + // Recuperation des valeurs de filtres + + if (p_filtre1_value) { + filtre1_value = p_filtre1_value; + form.append(filtre1, filtre1_value); + } + + if (p_filtre2_value) { + filtre2_value = p_filtre2_value; + form.append(filtre2, filtre2_value); + } + + if (p_filtre3_value) { + filtre3_value = p_filtre3_value; + form.append(filtre3, p_filtre3_value); + } + + if (p_filtre4_value) { + filtre4_value = p_filtre4_value; + form.append(filtre4, p_filtre4_value); + } + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("type_rh", "1"); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Ressource_Humaine_with_filter/"; + + + setdisplay_affectation(""); + setAdd_new_affectation(""); + clean_affectation_fields(); + clean_nouvelle_affectation_fields(); + setSelectionModel_affectations([]); + setSelectionModel([]); + setsubmenu(""); + setSelectionModel([]); + + axios.post(myurl, form).then(res => { + + if (String(res.data.status) === String("true")) { + //console.log(" In Getall_Training_Employee res.data.status = " + res.data.status); + //console.log(" In Getall_Training_Employee res.data.message r_class = " + res.data.message); + setGetall_Training_Employee_api("true"); + setGetall_Training_Employee_result(res.data.message); + setRows(res.data.message); + } + else { + setGetall_Training_Employee_api("false"); + setGetall_Training_Employee_message(res.data.message); + } + + }).catch((error) => { + console.warn('Not good man :( Getall_Training_Employee = ', error); + setGetall_Training_Employee_api("false"); + //setmyApimyApiMessage("") + }) + } + + const [New_Getall_Training_Employee_No_Filter_result, setNew_Getall_Training_Employee_No_Filter_result] = useState([]); + + const [Getall_Training_Employee_No_Filter_api, setGetall_Training_Employee_No_Filter_api] = useState(); + const [Getall_Training_Employee_No_Filter_message, setGetall_Training_Employee_No_Filter_message] = useState(); + const [Getall_Training_Employee_No_Filter_result, setGetall_Training_Employee_No_Filter_result] = useState(); + function Getall_Training_Employee_No_Filter(event) { + + var form = new FormData(); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("type_rh", "1"); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Ressource_Humaine_no_filter/"; + + + + axios.post(myurl, form).then(res => { + + if (String(res.data.status) === String("true")) { + //console.log(" In Getall_Training_Employee_No_Filter res.data.status = " + res.data.status); + // console.log(" In Getall_Training_Employee_No_Filter res.data.message r_class = " + res.data.message); + setGetall_Training_Employee_No_Filter_api("true"); + setGetall_Training_Employee_No_Filter_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_nom = JSON.parse(x).nom; + var local_prenom = JSON.parse(x).prenom; + var local_ismanager = JSON.parse(x).ismanager; + + + //--- + var node = { + "_id": local_id, + "id": localid, + "label": local_nom + " " + local_prenom, + "nom": local_nom, + "prenom": local_prenom, + "ismanager": local_ismanager + }; + new_data2.push(node); + }); + + var node = { + "_id": "", + "id": "", + "label": "", + "nom": "", + "prenom": "", + "ismanager": "" + }; + new_data2.push(node); + + if (new_data2.length > 0) + setNew_Getall_Training_Employee_No_Filter_result(new_data2); + + } + else { + setGetall_Training_Employee_No_Filter_api("false"); + setGetall_Training_Employee_No_Filter_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_Training_Employee_No_Filter = ', error); + setGetall_Training_Employee_No_Filter_api("false"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de recuperer la liste des employés"); + setalert_type("error"); + // alert(" Impossible de recuperer la liste des employés"); + //setmyApimyApiMessage("") + }) + } + + const [session_file_name, setsession_file_name] = useState(); + + const [liste_sessions_file_change_api, setliste_sessions_file_change_api] = useState(); + const [liste_sessions_file_change_result, setliste_sessions_file_change_result] = useState(); + const [liste_sessions_file_change_message, setliste_sessions_file_change_message] = useState(); + const liste_sessions_file_change = event => { + + + const fileUploaded = event.target.files[0]; + let file_size = event.target.files[0].size; + let file_type = event.target.files[0].type; + + //console.log("file_size = ",file_size," file_type = ",file_type); + if (file_size > 10000000) { + // alert("Le fichier ne doit pas dépasser un 1 Méga octets"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Le fichier ne doit pas dépasser un 1 Méga octets"); + setalert_type("error"); + return; + } + + setsession_file_name(event.target.files[0].name); + + const formData = new FormData(); + formData.append('File', fileUploaded); + //formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA'); + const stored_cookie = getCookie('tokenmysypart'); + + formData.append("token", stored_cookie); + //console.log("token = " + stored_cookie); + + setLoading(true); + fetch( + process.env.REACT_APP_API_URL + "myclass/api/Add_Ressource_Humaine_mass/", + { + method: 'POST', + body: formData, + } + ) + .then((response) => response.json()) + .then((result) => { + + setLoading(false); + //console.log(" ## result['status'] = ", result['status']) + if (String(result['status']) === String("Err_Connexion")) { + alert('Erreur: ' + result['message']); + history.push("/Connexion"); + } + + else if (String(result['status']) === String("true")) { + //console.log('Success:', result['message']); + setliste_sessions_file_change_result(result['message']); + setliste_sessions_file_change_api("true"); + clean_all_filters(); + Getall_Training_Employee_No_Filter(); + + setdisplay_alert_mysy("1"); + setalert_message(" Les employés ont été correctement importés"); + setalert_type("success"); + + + } + + else { + setliste_sessions_file_change_message(result['message']); + setliste_sessions_file_change_api("false"); + alert('Erreur: ' + result['message']); + + } + + + }) + .catch((error) => { + setLoading(false); + console.error('Error:', error); + setliste_sessions_file_change_api("false"); + // alert(" Impossible d'importer les employés "); + setdisplay_alert_mysy("1"); + setalert_message(" Impossible d'importer les employés "); + setalert_type("error"); + }); + } + + + const [Get_Given_Employee_Affectation_api, setGet_Given_Employee_Affectation_api] = useState(); + const [Get_Given_Employee_Affectation_message, setGet_Given_Employee_Affectation_message] = useState(); + const [Get_Given_Employee_Affectation_result, setGet_Given_Employee_Affectation_result] = useState(); + function Get_Given_Employee_Affectation(local_affectation_id) { + + var form = new FormData(); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("affectation_id", local_affectation_id); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Given_Affectation_Ressource_Humaine_Poste/"; + + + + axios.post(myurl, form).then(res => { + + if (String(res.data.status) === String("true")) { + console.log(" In Get_Given_Employee_Affectation res.data.status = " + res.data.status); + console.log(" In Get_Given_Employee_Affectation res.data.message r_class = " + res.data.message); + setGet_Given_Employee_Affectation_api("true"); + + + + if (String(res.data.message).length > 0) { + setGet_Given_Employee_Affectation_result(res.data.message); + var mylocal_affectation = JSON.parse(res.data.message); + + if (mylocal_affectation.poste) { + setp_affect_poste(mylocal_affectation.poste); + } + + if (mylocal_affectation.date_du) { + setp_affect_date_du(mylocal_affectation.date_du); + + } + + if (mylocal_affectation.date_au) { + setp_affect_date_au(mylocal_affectation.date_au); + } + + if (mylocal_affectation.related_target_collection) { + setp_affect_cible(mylocal_affectation.related_target_collection); + if (String(mylocal_affectation.related_target_collection) === "myclass") + setp_affect_cible_label("Formation"); + else if (String(mylocal_affectation.related_target_collection) === "session_formation") + setp_affect_cible_label("Session formation"); + } + + + if (mylocal_affectation.related_target_collection_id) { + setp_affect_cible_nom(mylocal_affectation.related_target_collection_id); + setp_affect_cible_nom_label(mylocal_affectation.related_target_collection_id_nom); + } + + if (mylocal_affectation.comment) { + setp_affect_comment(mylocal_affectation.comment); + } + + + } else { + // alert(" Aucune donnée recuperée"); + setdisplay_alert_mysy("1"); + setalert_message(" Aucune donnée recuperée"); + setalert_type("warning"); + } + + Disable_Detail_Affectation_Fields(); + } + else { + setGet_Given_Employee_Affectation_api("false"); + setGet_Given_Employee_Affectation_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 :( Get_Given_Employee_Affectation = ', error); + setGet_Given_Employee_Affectation_api("false"); + // alert(" Impossible de recuperer l'affectation de l'employé"); + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de recuperer l'affectation de l'employé"); + setalert_type("error"); + //setmyApimyApiMessage("") + }) + } + + + const [Getall_Employee_Affectation_api, setGetall_Employee_Affectation_api] = useState(); + const [Getall_Employee_Affectation_message, setGetall_Employee_Affectation_message] = useState(); + const [Getall_Employee_Affectation_result, setGetall_Employee_Affectation_result] = useState(); + function Getall_Employee_Affectation(local_employe_id) { + + var form = new FormData(); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("rh_id", local_employe_id); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Ressource_Humaine_Affectation/"; + + + + axios.post(myurl, form).then(res => { + + if (String(res.data.status) === String("true")) { + //console.log(" In Getall_Employee_Affectation res.data.status = " + res.data.status); + //console.log(" In Getall_Employee_Affectation res.data.message r_class = " + res.data.message); + setGetall_Employee_Affectation_api("true"); + setGetall_Employee_Affectation_result(res.data.message); + setrows_affectations(res.data.message); + } + else { + setGetall_Employee_Affectation_api("false"); + setGetall_Employee_Affectation_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_Employee_Affectation = ', error); + setGetall_Employee_Affectation_api("false"); + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de recuperer les affectations de l'employé"); + setalert_type("error"); + // alert(" Impossible de recuperer les affectations de l'employé"); + //setmyApimyApiMessage("") + }) + } + + + const [Get_Employee_Related_Target_Collection_Data_api, setGet_Employee_Related_Target_Collection_Data_api] = useState(); + const [Get_Employee_Related_Target_Collection_Data_message, setGet_Employee_Related_Target_Collection_Data_message] = useState(); + const [Get_Employee_Related_Target_Collection_Data_result, setGet_Employee_Related_Target_Collection_Data_result] = useState(); + function Get_Employee_Related_Target_Collection_Data() { + + 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_Related_Target_Collection_Data/"; + + + + axios.post(myurl, form).then(res => { + + if (String(res.data.status) === String("true")) { + //console.log(" In Get_Employee_Related_Target_Collection_Data res.data.status = " + res.data.status); + //console.log(" In Get_Employee_Related_Target_Collection_Data res.data.message r_class = " + res.data.message); + setGet_Employee_Related_Target_Collection_Data_api("true"); + setGet_Employee_Related_Target_Collection_Data_result(res.data.message); + + } + else { + setGet_Employee_Related_Target_Collection_Data_api("false"); + setGet_Employee_Related_Target_Collection_Data_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 :( Get_Employee_Related_Target_Collection_Data = ', error); + setGet_Employee_Related_Target_Collection_Data_api("false"); + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de recuperer les cibles d'affectation"); + setalert_type("error"); + // alert(" Impossible de recuperer les cibles d'affectation"); + //setmyApimyApiMessage("") + }) + } + + function disable_Employee_DetailFields() { + setemployee_data_edit_mode("0"); + + if (document.getElementsByName("detail_lms_login")[0]) { + document.getElementsByName("detail_lms_login")[0].disabled = true; + document.getElementsByName("detail_lms_login")[0].style.backgroundColor = "#ECEFF1"; + } + + if (document.getElementsByName("detail_nom")[0]) { + document.getElementsByName("detail_nom")[0].disabled = true; + document.getElementsByName("detail_nom")[0].style.backgroundColor = "#ECEFF1"; + } + + + if (document.getElementsByName("detail_prenom")[0]) { + document.getElementsByName("detail_prenom")[0].disabled = true; + document.getElementsByName("detail_prenom")[0].style.backgroundColor = "#ECEFF1"; + } + + if (document.getElementsByName("detail_mail")[0]) { + document.getElementsByName("detail_mail")[0].disabled = true; + document.getElementsByName("detail_mail")[0].style.backgroundColor = "#ECEFF1"; + } + + if (document.getElementsByName("detail_naissance")[0]) { + document.getElementsByName("detail_naissance")[0].disabled = true; + document.getElementsByName("detail_naissance")[0].style.backgroundColor = "#ECEFF1"; + } + + + if (document.getElementsByName("detail_tel")[0]) { + document.getElementsByName("detail_tel")[0].disabled = true; + document.getElementsByName("detail_tel")[0].style.backgroundColor = "#ECEFF1"; + } + + + if (document.getElementsByName("detail_adresse")[0]) { + document.getElementsByName("detail_adresse")[0].disabled = true; + document.getElementsByName("detail_adresse")[0].style.backgroundColor = "#ECEFF1"; + } + + + if (document.getElementsByName("detail_code_postal")[0]) { + document.getElementsByName("detail_code_postal")[0].disabled = true; + document.getElementsByName("detail_code_postal")[0].style.backgroundColor = "#ECEFF1"; + } + + if (document.getElementsByName("detail_ville")[0]) { + document.getElementsByName("detail_ville")[0].disabled = true; + document.getElementsByName("detail_ville")[0].style.backgroundColor = "#ECEFF1"; + } + + if (document.getElementsByName("detail_civilite") && document.getElementsByName("detail_civilite")[0]) { + document.getElementsByName("detail_civilite")[0].disabled = true; + document.getElementsByName("detail_civilite")[0].style.backgroundColor = "#ECEFF1"; + } + + if (document.getElementsByName("detail_tel_mobile")[0]) { + document.getElementsByName("detail_tel_mobile")[0].disabled = true; + document.getElementsByName("detail_tel_mobile")[0].style.backgroundColor = "#ECEFF1"; + } + + if (document.getElementsByName("detail_pays")[0]) { + document.getElementsByName("detail_pays")[0].disabled = true; + document.getElementsByName("detail_pays")[0].style.backgroundColor = "#ECEFF1"; + } + + if (document.getElementsByName("detail_comment")[0]) { + document.getElementsByName("detail_comment")[0].disabled = true; + document.getElementsByName("detail_comment")[0].style.backgroundColor = "#ECEFF1"; + } + + if (document.getElementsByName("detail_linkedin")[0]) { + document.getElementsByName("detail_linkedin")[0].disabled = true; + document.getElementsByName("detail_linkedin")[0].style.backgroundColor = "#ECEFF1"; + } + + if (document.getElementsByName("detail_facebook")[0]) { + document.getElementsByName("detail_facebook")[0].disabled = true; + document.getElementsByName("detail_facebook")[0].style.backgroundColor = "#ECEFF1"; + } + + if (document.getElementsByName("detail_twitter")[0]) { + document.getElementsByName("detail_twitter")[0].disabled = true; + document.getElementsByName("detail_twitter")[0].style.backgroundColor = "#ECEFF1"; + } + + if (document.getElementsByName("detail_profil")[0]) { + document.getElementsByName("detail_profil")[0].disabled = true; + document.getElementsByName("detail_profil")[0].style.backgroundColor = "#ECEFF1"; + } + + if (document.getElementsByName("detail_fonction")[0]) { + document.getElementsByName("detail_fonction")[0].disabled = true; + document.getElementsByName("detail_fonction")[0].style.backgroundColor = "#ECEFF1"; + } + + + if (document.getElementsByName("list_diffusion_mail")[0]) { + document.getElementsByName("list_diffusion_mail")[0].disabled = true; + document.getElementsByName("list_diffusion_mail")[0].style.backgroundColor = "#ECEFF1"; + } + + if (document.getElementsByName("detail_ismanager")[0]) { + document.getElementsByName("detail_ismanager")[0].disabled = true; + document.getElementsByName("detail_ismanager")[0].style.backgroundColor = "#ECEFF1"; + } + + if (document.getElementsByName("detail_user_login")[0]) { + document.getElementsByName("detail_user_login")[0].disabled = true; + document.getElementsByName("detail_user_login")[0].style.backgroundColor = "#ECEFF1"; + } + + + if (document.getElementsByName("detail_resp_hierarchie_id")[0]) { + document.getElementsByName("detail_resp_hierarchie_id")[0].disabled = true; + document.getElementsByName("detail_resp_hierarchie_id")[0].style.backgroundColor = "#ECEFF1"; + } + + if (document.getElementsByName("detail_competence")[0]) { + document.getElementsByName("detail_competence")[0].disabled = true; + document.getElementsByName("detail_competence")[0].style.backgroundColor = "#ECEFF1"; + } + + + // Pour les champs spécifiques + for (let i = 0; i < rows_champs_specifics.length; i++) { + + var field_name = JSON.parse(rows_champs_specifics[i]).field_name; + + if (document.getElementsByName(String(field_name))[0]) { + document.getElementsByName(String(field_name))[0].disabled = true; + document.getElementsByName(String(field_name))[0].style.backgroundColor = "#ECEFF1"; + } + } + + } + + function Enable_Employee_DetailFields() { + setemployee_data_edit_mode("1"); + + if (document.getElementsByName("detail_nom") && document.getElementsByName("detail_nom")[0]) { + document.getElementsByName("detail_nom")[0].disabled = false; + document.getElementsByName("detail_nom")[0].style.backgroundColor = "#FFFFFF"; + } + + + if (document.getElementsByName("detail_prenom") && document.getElementsByName("detail_prenom")[0]) { + document.getElementsByName("detail_prenom")[0].disabled = false; + document.getElementsByName("detail_prenom")[0].style.backgroundColor = "#FFFFFF"; + } + + if (document.getElementsByName("detail_mail") && document.getElementsByName("detail_mail")[0]) { + document.getElementsByName("detail_mail")[0].disabled = false; + document.getElementsByName("detail_mail")[0].style.backgroundColor = "#FFFFFF"; + } + + + if (document.getElementsByName("detail_naissance") && document.getElementsByName("detail_naissance")[0]) { + document.getElementsByName("detail_naissance")[0].disabled = false; + document.getElementsByName("detail_naissance")[0].style.backgroundColor = "#FFFFFF"; + } + + if (document.getElementsByName("detail_tel") && document.getElementsByName("detail_tel")[0]) { + document.getElementsByName("detail_tel")[0].disabled = false; + document.getElementsByName("detail_tel")[0].style.backgroundColor = "#FFFFFF"; + } + + + if (document.getElementsByName("detail_adresse") && document.getElementsByName("detail_adresse")[0]) { + document.getElementsByName("detail_adresse")[0].disabled = false; + document.getElementsByName("detail_adresse")[0].style.backgroundColor = "#FFFFFF"; + } + + + if (document.getElementsByName("detail_code_postal") && document.getElementsByName("detail_code_postal")[0]) { + document.getElementsByName("detail_code_postal")[0].disabled = false; + document.getElementsByName("detail_code_postal")[0].style.backgroundColor = "#FFFFFF"; + } + + + if (document.getElementsByName("detail_ville") && document.getElementsByName("detail_ville")[0]) { + document.getElementsByName("detail_ville")[0].disabled = false; + document.getElementsByName("detail_ville")[0].style.backgroundColor = "#FFFFFF"; + } + + + if (document.getElementsByName("detail_civilite") && document.getElementsByName("detail_civilite")[0]) { + document.getElementsByName("detail_civilite")[0].disabled = false; + document.getElementsByName("detail_civilite")[0].style.backgroundColor = "#FFFFFF"; + } + + + if (document.getElementsByName("detail_tel_mobile") && document.getElementsByName("detail_tel_mobile")[0]) { + document.getElementsByName("detail_tel_mobile")[0].disabled = false; + document.getElementsByName("detail_tel_mobile")[0].style.backgroundColor = "#FFFFFF"; + } + + + if (document.getElementsByName("detail_pays") && document.getElementsByName("detail_pays")[0]) { + document.getElementsByName("detail_pays")[0].disabled = false; + document.getElementsByName("detail_pays")[0].style.backgroundColor = "#FFFFFF"; + } + + if (document.getElementsByName("detail_comment") && document.getElementsByName("detail_comment")[0]) { + document.getElementsByName("detail_comment")[0].disabled = false; + document.getElementsByName("detail_comment")[0].style.backgroundColor = "#FFFFFF"; + } + + + if (document.getElementsByName("detail_linkedin") && document.getElementsByName("detail_linkedin")[0]) { + document.getElementsByName("detail_linkedin")[0].disabled = false; + document.getElementsByName("detail_linkedin")[0].style.backgroundColor = "#FFFFFF"; + } + + + if (document.getElementsByName("detail_facebook") && document.getElementsByName("detail_facebook")[0]) { + document.getElementsByName("detail_facebook")[0].disabled = false; + document.getElementsByName("detail_facebook")[0].style.backgroundColor = "#FFFFFF"; + } + + + if (document.getElementsByName("detail_twitter") && document.getElementsByName("detail_twitter")[0]) { + document.getElementsByName("detail_twitter")[0].disabled = false; + document.getElementsByName("detail_twitter")[0].style.backgroundColor = "#FFFFFF"; + } + + + + if (document.getElementsByName("detail_profil") && document.getElementsByName("detail_profil")[0]) { + document.getElementsByName("detail_profil")[0].disabled = false; + document.getElementsByName("detail_profil")[0].style.backgroundColor = "#FFFFFF"; + } + + + if (document.getElementsByName("detail_fonction") && document.getElementsByName("detail_fonction")[0]) { + document.getElementsByName("detail_fonction")[0].disabled = false; + document.getElementsByName("detail_fonction")[0].style.backgroundColor = "#FFFFFF"; + } + + + + if (document.getElementsByName("detail_ismanager") && document.getElementsByName("detail_ismanager")[0]) { + document.getElementsByName("detail_ismanager")[0].disabled = false; + document.getElementsByName("detail_ismanager")[0].style.backgroundColor = "#FFFFFF"; + } + + if (document.getElementsByName("list_diffusion_mail") && document.getElementsByName("list_diffusion_mail")[0]) { + document.getElementsByName("list_diffusion_mail")[0].disabled = false; + document.getElementsByName("list_diffusion_mail")[0].style.backgroundColor = "#FFFFFF"; + } + + + if (document.getElementsByName("detail_resp_hierarchie_id") && document.getElementsByName("detadetail_resp_hierarchie_idil_civilite")[0]) { + document.getElementsByName("detail_resp_hierarchie_id")[0].disabled = false; + document.getElementsByName("detail_resp_hierarchie_id")[0].style.backgroundColor = "#FFFFFF"; + + } + + + + + // Pour les champs spécifiques + for (let i = 0; i < rows_champs_specifics.length; i++) { + + var field_name = JSON.parse(rows_champs_specifics[i]).field_name; + + if (document.getElementsByName(String(field_name))[0]) { + document.getElementsByName(String(field_name))[0].disabled = false; + document.getElementsByName(String(field_name))[0].style.backgroundColor = "#FFFFFF"; + } + } + + + + } + + + function Annule_Employee_DetailFields() { + + setisimgclassSelected(); + setuserimgclassprofil(); + setisimgclassSelected_recid(); + + Get_Employee_Data(selected_id); + get_Employee_Images(selected_id); + + setemployee_data_changed(""); + setemployee_data_edit_mode("0"); + + } + + + const [Update_One_Employee_Data_api, setUpdate_One_Employee_Data_api] = useState(); + const [Update_One_Employee_Data_message, setUpdate_One_Employee_Data_message] = useState(); + const [Update_One_Employee_Data_result, setUpdate_One_Employee_Data_result] = useState(); + function Update_One_Employee_Data() { + var form = new FormData(); + //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("nom", p_detail_nom); + form.append("email", p_detail_mail); + form.append("date_naissance", p_detail_naissance); + + if (p_detail_prenom) + form.append("prenom", p_detail_prenom); + else + form.append("prenom", ""); + + + if (p_detail_tel) + form.append("telephone", p_detail_tel); + else + form.append("telephone", ""); + + + if (p_detail_tel_mobile) + form.append("telephone_mobile", p_detail_tel_mobile); + else + form.append("telephone_mobile", ""); + + if (p_detail_adresse) + form.append("adr_adresse", p_detail_adresse); + else + form.append("adr_adresse", ""); + + + if (p_detail_code_postal) + form.append("adr_code_postal", p_detail_code_postal); + else + form.append("adr_code_postal", ""); + + if (p_detail_ville) + form.append("adr_ville", p_detail_ville); + else + form.append("adr_ville", ""); + + if (p_detail_pays) + form.append("adr_pays", p_detail_pays); + else + form.append("adr_pays", ""); + + if (p_detail_comment) + form.append("comment", p_detail_comment); + else + form.append("comment", ""); + + if (p_detail_profil) + form.append("profil", p_detail_profil); + else + form.append("profil", ""); + + + if (p_detail_fonction) + form.append("fonction", p_detail_fonction); + else + form.append("fonction", ""); + + + if (p_detail_civilite) + form.append("civilite", p_detail_civilite); + else + form.append("civilite", ""); + + + if (p_detail_resp_hierarchie_id) + form.append("superieur_hierarchie_id", p_detail_resp_hierarchie_id); + else + form.append("superieur_hierarchie_id", ""); + + + if (p_detail_linkedIn) + form.append("linkedin", p_detail_linkedIn); + else + form.append("linkedin", ""); + + if (p_detail_facebook) + form.append("facebook", p_detail_facebook); + else + form.append("facebook", ""); + + + if (p_detail_twitter) + form.append("twitter", p_detail_twitter); + else + form.append("twitter", ""); + + + if (p_detail_ismanager) + form.append("ismanager", p_detail_ismanager); + else + form.append("ismanager", "0"); + + + if (p_detail_ismanager) + form.append("diffusion_mail", p_detail_list_diffusion_mail); + else + form.append("diffusion_mail", ""); + + form.append("_id", selected_id); + + + /* + Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenaire + */ + for (let i = 0; i < spec_field_updated_values_hooks.length; i++) { + var local_value = String(spec_field_updated_values_hooks[i].field_value); + + + if (String(spec_field_updated_values_hooks[i].field_type) === "float") { + + local_value = local_value.replaceAll(",", "."); + + if (isNaN(local_value)) { + alert("Le champ " + spec_field_updated_values_hooks[i].field_label + " doit être numérique.") + return; + } + + } + else if (String(spec_field_updated_values_hooks[i].field_type) === "string") { + + } + + + if (String(spec_field_updated_values_hooks[i].is_mandatory) === "1") { + if (String(local_value).trim().length <= 0) { + // alert("Le champ " + spec_field_updated_values_hooks[i].field_label + " est obligatoire.") + setdisplay_alert_mysy("1"); + setalert_message("Le champ " + spec_field_updated_values_hooks[i].field_label + " est obligatoire."); + setalert_type("error"); + return; + } + + } + + form.append(String(spec_field_updated_values_hooks[i].field_name), local_value); + } + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Update_Ressource_Humaine/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + //console.log(" In Update_One_Employee_Data res.data.status = " + res.data.status); + //console.log(" In Update_One_Employee_Data res.data.message r_class = " + res.data.message); + + setLoading(false); + + + if (String(res.data.status) === String("true")) { + setUpdate_One_Employee_Data_api("true"); + setUpdate_One_Employee_Data_result(res.data.message); + + Get_List_Managers(); + Getall_Training_Employee_No_Filter(); + + disable_Employee_DetailFields(); + setemployee_data_changed(""); + setemployee_data_edit_mode("0"); + Get_Employee_Data(selected_id); + //setgridline_id(''); + // alert(" La mise à jour a été correctement faite."); + setdisplay_alert_mysy("1"); + setalert_message(" La mise à jour a été correctement faite."); + setalert_type("success"); + + + if (document.getElementById('myRef_head')) { + var divh = document.getElementById('myRef_head').offsetTop; + window.scrollTo({ + top: divh, + behavior: "smooth", + }); + } + + } + else { + setUpdate_One_Employee_Data_api("false"); + setUpdate_One_Employee_Data_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('UpdateStagiaireData : Not good man :( Update_One_Employee_Data = ' + error); + setUpdate_One_Employee_Data_api("false"); + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de mettre à jour l'employé"); + setalert_type("error"); + // alert(" Impossible de mettre à jour l'employé"); + + }) + } + + + const [record_employee_Image_api, setrecord_employee_Image_api] = useState(); + const [record_employee_Image_message, setrecord_employee_Image_message] = useState(); + const [record_employee_Image_result, setrecord_employee_Image_result] = useState(); + function record_employee_Image(l) { + + const formData = new FormData(); + const url = process.env.REACT_APP_API_URL + "myclass/api/Update_Ressource_Humaine_Image/"; + + const stored_cookie = getCookie('tokenmysypart'); + formData.append("token", stored_cookie); + formData.append("rh_id", selected_id); + + formData.append('file_img', isimgclassSelected); + formData.append('file_img_recid', isimgclassSelected_recid); + + setLoading(true); + //console.log(" ### formData = ", formData); + fetch( + url, + { + method: 'POST', + body: formData, + } + ) + .then((response) => response.json()) + .then((result) => { + setLoading(false); + //console.log('Success:', result['message'], "result['status'] = ", result['status']); + + if (String(result['status']) === String("true")) { + setrecord_employee_Image_api("true"); + setuserimgclassprofilchanged(""); + // alert(" L'image a été enregistrée "); + setdisplay_alert_mysy("1"); + setalert_message(" L'image a été enregistrée "); + setalert_type("success"); + + } else if (String(result['status']) === String("Err_Connexion")) { + alert('Erreur: ' + result['message']); + history.push("/Connexion"); + } else { + setrecord_employee_Image_api("false"); + setdisplay_alert_mysy("1"); + setalert_message(result['message']); + setalert_type("error"); + + } + + }) + .catch((error) => { + setLoading(false); + console.error('Error:', error); + setrecord_employee_Image_api("false"); + + setdisplay_alert_mysy("1"); + setalert_message("Impossible d'enregistrer l'image"); + setalert_type("error"); + + }); + + + }; + + + const [get_Employee_Images_api, setget_Employee_Images_api] = useState(); + const [get_Employee_Images_message, setget_Employee_Images_message] = useState(); + const [get_Employee_Images_result, setget_Employee_Images_result] = useState(); + function get_Employee_Images(employee_id) { + + setisimgclassSelected(); + setuserimgclassprofil(); + setisimgclassSelected_recid(); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/getRecoded_Employee_Image_from_front/"; + + var form = new FormData(); + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("rh_id", employee_id); + + + axios.post(myurl, form).then(res => { + + //console.log(" get_Employee_Images : In test res.data.status = " + res.data.status); + // console.log(" get_Employee_Images: res.data.message.img = " + res.data.message); + + if (String(res.data.status) === "true") { + setget_Employee_Images_api("true"); + + if (JSON.parse(res.data.message).logo_img) { + var partner_logo_img = "data:image/png;base64," + JSON.parse(res.data.message).logo_img; + setisimgclassSelected(partner_logo_img); + setuserimgclassprofil(partner_logo_img); + setisimgclassSelected_recid(JSON.parse(res.data.message).logo_img_recid); + } + + + } + else if (String(res.data.status) === String("Err_Connexion")) { + alert('Erreur: ' + res.data.message); + history.push("/Connexion"); + return; + } + else { + setget_Employee_Images_api("false"); + get_Employee_Images_message(res.data.message) + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); + + } + }).catch((error) => { + console.warn('get_Employee_Images ee: Not good man :( = ', error); + setget_Employee_Images_api("false"); + get_Employee_Images_message(" Impossible de recuperer l'image de l'employé") + }) + + } + + + function removeRecodedLogoImage() { + if (!isimgclassSelected_recid || String(isimgclassSelected_recid).length < 3) { + + setdisplay_alert_mysy("1"); + setalert_message(" Image incorrecte. Impossible de la supprimer "); + setalert_type("error"); + return; + } + + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("image_recid", isimgclassSelected_recid); + + setLoading(true); + fetch( + process.env.REACT_APP_API_URL + "myclass/api/DeleteImage_Stagiaire_v2/", + { + method: 'POST', + body: form, + } + ).then((response) => response.json()) + .then((result) => { + setLoading(false); + //console.log(' removeRecodedClassImage : status:', result['status']); + //console.log('removeRecodedClassImage : Success:', result['message']); + + + if (String(result['status']) === String("true")) { + setisimgclassSelected(""); + setisimgclassSelected_recid(""); + setisimgclassSelectedfile(""); + setuserimgclassprofil(""); + get_Employee_Images(); + + } + else if (String(result['status']) === String("Err_Connexion")) { + alert('Erreur: ' + result['message']); + history.push("/Connexion"); + return; + } + + else { + + setdisplay_alert_mysy("1"); + setalert_message(result['message']); + setalert_type("error"); + } + + }) + .catch((error) => { + setLoading(false); + console.error('Error:', error); + + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de supprimer l'image "); + setalert_type("error"); + }); + + } + + + const imglogoclasschangeHandler = (event) => { + + + let file_size = event.target.files[0].size; + + //or if you like to have name and type + //console.log(event.target.files); + + let file_name = event.target.files[0].name; + let file_type = event.target.files[0].type; + + + + //alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a); + if (file_size > 10000000) { + + setdisplay_alert_mysy("1"); + setalert_message("L'image ne doit pas dépasser un 1 Méga octets"); + setalert_type("error"); + return; + } + setisimgclassSelected(event.target.files[0]); + setisimgclassSelectedfile(true); + + setuserimgclassprofil(URL.createObjectURL(event.target.files[0])); + setuserimgclassprofilchanged("1"); + + }; + + + const [New_Get_List_Managers_result, setNew_Get_List_Managers_result] = useState(); + + const [Get_List_Managers_api, setGet_List_Managers_api] = useState(); + const [Get_List_Managers_message, setGet_List_Managers_message] = useState(); + const [Get_List_Managers_result, setGet_List_Managers_result] = useState(); + function Get_List_Managers(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_Manager_Ressource_Humaine/"; + + axios.post(myurl, form).then(res => { + //console.log(" In Get_List_Managers res.data.status = " + res.data.status); + //console.log(" In Get_List_Managers res.data.message r_class = " + res.data.message); + + if (String(res.data.status) === String("true")) { + setGet_List_Managers_api("true"); + setGet_List_Managers_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_nom = JSON.parse(x).nom; + var local_prenom = JSON.parse(x).prenom; + var local_ismanager = JSON.parse(x).ismanager; + + + //--- + var node = { + "_id": local_id, + "id": localid, + "label": local_nom + " " + local_prenom, + "nom": local_nom, + "prenom": local_prenom, + "ismanager": local_ismanager + }; + new_data2.push(node); + }); + + + var node = { + "_id": "", + "id": "", + "label": "", + "nom": "", + "prenom": "", + "ismanager": "" + }; + new_data2.push(node); + + if (new_data2.length > 0) { + setNew_Get_List_Managers_result(new_data2); + + } + + } + else if (String(res.data.status) === String("Err_Connexion")) { + alert('Erreur: ' + res.data.message); + history.push("/Connexion"); + } + else { + setGet_List_Managers_api("false"); + setGet_List_Managers_message(res.data.message); + } + + }).catch((error) => { + console.warn('Not good man :( Get_List_Managers = ', error); + setGet_List_Managers_api("false"); + //setmyApimyApiMessage("") + }) + } + + + const [New_Get_List_Competence_Type_result, setNew_Get_List_Competence_Type_result] = useState(); + + const [Get_List_Competence_Type_api, setGet_List_Competence_Type_api] = useState(); + const [Get_List_Competence_Type_message, setGet_List_Competence_Type_message] = useState(); + const [Get_List_Competence_Type_result, setGet_List_Competence_Type_result] = useState(); + function Get_List_Competence_Type(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_Competence_Level/"; + + axios.post(myurl, form).then(res => { + //console.log(" In Get_List_Competence_Type res.data.status = " + res.data.status); + //console.log(" In Get_List_Competence_Type res.data.message r_class = " + res.data.message); + + if (String(res.data.status) === String("true")) { + setGet_List_Competence_Type_api("true"); + setGet_List_Competence_Type_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_note = JSON.parse(x).note; + + + //--- + var node = { + "_id": local_id, + "id": localid, + "label": local_code, + "code": local_code, + "note": local_note, + + }; + new_data2.push(node); + }); + + + var node = { + "_id": "", + "id": "", + "label": "", + "code": "", + "note": "", + }; + + //console.log(" ### new_data2 = ", new_data2); + new_data2.push(node); + + if (new_data2.length > 0) { + setNew_Get_List_Competence_Type_result(new_data2); + + } + + + } + else if (String(res.data.status) === String("Err_Connexion")) { + alert('Erreur: ' + res.data.message); + history.push("/Connexion"); + } + else { + setGet_List_Competence_Type_api("false"); + setGet_List_Competence_Type_message(res.data.message); + } + + }).catch((error) => { + console.warn('Not good man :( Get_List_Competence_Type = ', error); + setGet_List_Competence_Type_api("false"); + //setmyApimyApiMessage("") + }) + } + + const [field_competence, setfield_competence] = useState(""); + const [field_one_competence, setfield_one_competence] = useState(""); + + function editor_competence_keyup() { + //setsessionChanged(true); + } + + + const [isimgclassSelected, setisimgclassSelected] = useState(false); + const [isimgclassSelected_recid, setisimgclassSelected_recid] = useState(""); + const [isimgclassSelectedfile, setisimgclassSelectedfile] = useState(false); + + + const [New_Get_List_RH_Profils_result, setNew_Get_List_RH_Profils_result] = useState([]); + + const [Get_List_RH_Profils_api, setGet_List_RH_Profils_api] = useState(); + const [Get_List_RH_Profils_message, setGet_List_RH_Profils_message] = useState(); + const [Get_List_RH_Profils_result, setGet_List_RH_Profils_result] = useState(); + function Get_List_RH_Profils(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_Profil_Ressource_Humaine/"; + + axios.post(myurl, form).then(res => { + //console.log(" In Get_List_RH_Profils res.data.status = " + res.data.status); + //console.log(" In Get_List_RH_Profils res.data.message r_class = " + res.data.message); + + if (String(res.data.status) === String("true")) { + setGet_List_RH_Profils_api("true"); + setGet_List_RH_Profils_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_nom = JSON.parse(x).profil_nom; + + //--- + var node = { + "_id": local_id, + "id": localid, + "label": local_nom, + "nom": local_nom, + + }; + new_data2.push(node); + + + }); + + var node = { + "_id": "", + "id": "", + "label": "", + "nom": "", + + }; + new_data2.push(node); + if (new_data2.length > 0) { + setNew_Get_List_RH_Profils_result(new_data2); + //console.log(" ### new_data2 = ", new_data2); + + } + + } + else if (String(res.data.status) === String("Err_Connexion")) { + alert('Erreur: ' + res.data.message); + history.push("/Connexion"); + } + else { + setGet_List_RH_Profils_api("false"); + setGet_List_RH_Profils_message(res.data.message); + } + + }).catch((error) => { + console.warn('Not good man :( Get_List_RH_Profils = ', error); + setGet_List_RH_Profils_api("false"); + //setmyApimyApiMessage("") + }) + } + + + const [Delete_Employee_api, setDelete_Employee_api] = useState(); + const [Delete_Employee_message, setDelete_Employee_message] = useState(); + const [Delete_Employee_result, setDelete_Employee_result] = useState(); + function Delete_Employee(local_rh_id) { + + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("_id", local_rh_id); + + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Delete_Ressource_Humaine/"; + setLoading(true); + axios.post(myurl, form).then(res => { + //console.log(" In Delete_Employee res.data.status = " + res.data.status); + //console.log(" In Delete_Employee res.data.message r_class = " + res.data.message); + setLoading(false); + if (String(res.data.status) === String("true")) { + setDelete_Employee_api("true"); + setDelete_Employee_result(res.data.message); + clean_all_filters(); + clearEmployeeFields(); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + } + else { + setDelete_Employee_api("false"); + setDelete_Employee_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('Delete_Employee : Not good man :( Delete_Employee = ' + error); + setDelete_Employee_api("false"); + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de supprimer l'employee"); + setalert_type("error"); + + }) + } + + + const [Delete_affection_api, setDelete_affection_api] = useState(); + const [Delete_affection_message, setDelete_affection_message] = useState(); + const [Delete_affection_result, setDelete_affection_result] = useState(); + function Delete_affection(local_rh_id, local_affectation_id) { + + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("rh_id", local_rh_id); + form.append("_id", local_affectation_id); + + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Delete_Affectation_Ressource_Humaine_Poste/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + //console.log(" In Delete_affection res.data.status = " + res.data.status); + //console.log(" In Delete_affection res.data.message r_class = " + res.data.message); + + setLoading(false); + if (String(res.data.status) === String("true")) { + setDelete_affection_api("true"); + setDelete_affection_result(res.data.message); + clean_affectation_fields(); + setAffectation_data_changed(); + setedite_affectation_form(); + setdisplay_affectation(); + Getall_Employee_Affectation(local_rh_id); + setdisplay_alert_mysy("1"); + setalert_message(" La fonction a été correctement supprimée."); + setalert_type("success"); + + } + else { + setDelete_affection_api("false"); + setDelete_affection_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('Delete_affection : Not good man :( Delete_affection = ' + error); + setDelete_affection_api("false"); + // alert(" Impossible de supprimer la fonction"); + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de supprimer la fonction"); + setalert_type("error"); + }) + } + + + const [isimgclassdeleted, setisimgclassdeleted] = useState(""); + const [isimgclassdeleted_message, setisimgclassdeleted_message] = useState(""); + const [isimgclassSaved, setisimgclassSaved] = useState(""); + const [isimgclassSaved_message, setisimgclassSaved_message] = useState(""); + + const [userimgclassprofil, setuserimgclassprofil] = useState(); + const [userimgclassprofilchanged, setuserimgclassprofilchanged] = useState(""); + + const myRef_head = useRef(null); + const myRef_affectation = useRef(null); + const myRef_new_affectation = useRef(null); + const hiddenFileInput_session = React.useRef(null); + const [Employee_data_changed, setEmployee_data_changed] = useState(); + + const [add_One_Employee, setadd_One_Employee] = useState(); + + const myRef_new_employee = useRef(null) + + function submenu_add_one_employee() { + setdisplay_detail_employe(); + clearEmployeeFields(); + setadd_One_Employee("1"); + setsubmenu("detail_employe"); + + if (document.getElementById('myRef')) { + var divh = document.getElementById('myRef').offsetTop; + window.scrollTo({ + top: divh, + behavior: "smooth", + }); + } + + } + + function Annule_add_one_Employee() { + setdisplay_detail_employe(); + setadd_One_Employee(); + setsubmenu(""); + setgridline_id(''); + setSelectionModel([]); + } + + + const [Add_One_Employee_Data_api, setAdd_One_Employee_Data_api] = useState(); + const [Add_One_Employee_Data_message, setAdd_One_Employee_Data_message] = useState(); + const [Add_One_Employee_Data_result, setAdd_One_Employee_Data_result] = useState(); + function Add_One_Employee_Data() { + var form = new FormData(); + //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); + + // Controle sur les champs + + if (p_one_detail_civilite.trim() == "") { + setdisplay_alert_mysy("1"); + setalert_message(" Vous devez saisir la civilité"); + setalert_type("error"); + return; + } + + if (p_one_detail_nom.trim() == "") { + setdisplay_alert_mysy("1"); + setalert_message(" Vous devez saisir le nom"); + setalert_type("error"); + return; + } + + + if (p_one_detail_prenom.trim() == "") { + setdisplay_alert_mysy("1"); + setalert_message(" Vous devez saisir le prenom "); + setalert_type("error"); + return; + } + + + if (p_one_detail_naissance.trim() == "") { + setdisplay_alert_mysy("1"); + setalert_message(" Vous devez saisir la date de naissance"); + setalert_type("error"); + return; + } + + + + if (p_one_detail_mail.trim() == "") { + setdisplay_alert_mysy("1"); + setalert_message(" Vous devez saisir l'email"); + setalert_type("error"); + return; + } + + + + var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; + if (!p_one_detail_mail.trim().match(validRegex)) { + setdisplay_alert_mysy("1"); + setalert_message("L'adresse email est invalide."); + setalert_type("error"); + return; + } + + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("nom", p_one_detail_nom); + form.append("email", p_one_detail_mail); + form.append("prenom", p_one_detail_prenom); + form.append("civilite", p_one_detail_civilite); + form.append("date_naissance", p_one_detail_naissance); + form.append("type_rh", "1"); + + if (p_one_detail_comment) + form.append("comment", p_one_detail_comment); + else + form.append("comment", ""); + + if (p_one_detail_tel) + form.append("telephone", p_one_detail_tel); + else + form.append("telephone", ""); + + + + if (p_one_detail_tel_mobile) + form.append("telephone_mobile", p_one_detail_tel_mobile); + else + form.append("telephone_mobile", ""); + + if (p_one_detail_adresse) + form.append("adr_adresse", p_one_detail_adresse); + else + form.append("adr_adresse", ""); + + + if (p_one_detail_code_postal) + form.append("adr_code_postal", p_one_detail_code_postal); + else + form.append("adr_code_postal", ""); + + if (p_one_detail_ville) + form.append("adr_ville", p_one_detail_ville); + else + form.append("adr_ville", ""); + + if (p_one_detail_pays) + form.append("adr_pays", p_one_detail_pays); + else + form.append("adr_pays", ""); + + if (p_one_detail_profil) + form.append("profil", p_one_detail_profil); + else + form.append("profil", ""); + + + if (p_one_detail_fonction) + form.append("fonction", p_one_detail_fonction); + else + form.append("fonction", ""); + + + + + + if (p_one_detail_resp_hierarchie_id) + form.append("superieur_hierarchie_id", p_one_detail_resp_hierarchie_id); + else + form.append("superieur_hierarchie_id", ""); + + + if (p_one_detail_linkedIn) + form.append("linkedin", p_one_detail_linkedIn); + else + form.append("linkedin", ""); + + if (p_one_detail_facebook) + form.append("facebook", p_one_detail_facebook); + else + form.append("facebook", ""); + + + if (p_one_detail_twitter) + form.append("twitter", p_one_detail_twitter); + else + form.append("twitter", ""); + + + if (p_one_detail_list_diffusion_mail) + form.append("diffusion_mail", p_one_detail_twitter); + else + form.append("diffusion_mail", ""); + + + if (p_one_detail_ismanager) + form.append("ismanager", p_one_detail_ismanager); + else + form.append("ismanager", "0"); + + + /* + Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenaire + */ + for (let i = 0; i < spec_field_updated_values_hooks.length; i++) { + var local_value = String(spec_field_updated_values_hooks[i].field_value); + + if (String(spec_field_updated_values_hooks[i].field_type) === "float") { + + local_value = local_value.replaceAll(",", "."); + + if (isNaN(local_value)) { + + setdisplay_alert_mysy("1"); + setalert_message("Le champ " + spec_field_updated_values_hooks[i].field_label + " doit être numérique."); + setalert_type("error"); + return; + } + + } + else if (String(spec_field_updated_values_hooks[i].field_type) === "string") { + + } + if (String(spec_field_updated_values_hooks[i].is_mandatory) === "1") { + if (String(local_value).trim().length <= 0) { + + setalert_message("Le champ " + spec_field_updated_values_hooks[i].field_label + " est obligatoire."); + setalert_type("error"); + return; + } + + } + + form.append(String(spec_field_updated_values_hooks[i].field_name), local_value); + } + + + //console.log(" form == ", form); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Ressource_Humaine/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + //console.log(" In Add_One_Employee_Data res.data.status = " + res.data.status); + //console.log(" In Add_One_Employee_Data res.data.message r_class = " + res.data.message); + setLoading(false); + if (String(res.data.status) === String("true")) { + setAdd_One_Employee_Data_api("true"); + setAdd_One_Employee_Data_result(res.data.message); + + Getall_Training_Employee_No_Filter(); + Get_List_Managers(); + + + setemployee_data_changed(""); + setemployee_data_edit_mode("0"); + clearEmployeeFields(); + setadd_One_Employee(""); + setselected_id(''); + setgridline_id(''); + setsubmenu(''); + + // 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_One_Employee_Data_api("false"); + setAdd_One_Employee_Data_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('UpdateStagiaireData : Not good man :( Add_One_Employee_Data = ' + error); + setAdd_One_Employee_Data_api("false"); + + setdisplay_alert_mysy("1"); + setalert_message(" Impossible d'ajouter la ressouces "); + setalert_type("error"); + + }) + } + + + function submenu_import_employee() { + setsession_file_name(); + setliste_sessions_file_change_api(); + hiddenFileInput_session.current.click(); + } + + + const sleep = (milliseconds) => { + return new Promise(resolve => setTimeout(resolve, milliseconds)) + } + + + async function submenu_detail_employe() { + setsubmenu("detail_employe"); + submenu_color_management("detail_employe"); + + //console.log(" ### employee_data_edit_mode = ", employee_data_edit_mode); + if (String(employee_data_edit_mode) !== "1") + disable_Employee_DetailFields(); + + setSelectionModel_affectations([]); + setdisplay_affectation("0"); + setAdd_new_affectation(""); + clean_affectation_fields(); + clean_nouvelle_affectation_fields(); + + } + + + async function submenu_affectation() { + setsubmenu("affectation"); + submenu_color_management("affectation"); + + } + + async function submenu_contrat() { + setsubmenu("contrat"); + submenu_color_management("contrat"); + Get_Partner_List_EMPLOYEE_CONTRACT_Document(); + } + + + async function submenu_evaluation() { + setsubmenu("evaluation"); + submenu_color_management("evaluation"); + } + + + async function submenu_statistiques() { + setsubmenu("statistiques"); + submenu_color_management("statistiques"); + Getall_Employee_Statistic_Question_List(); + } + + + async function submenu_droit_acces() { + + setsubmenu("droit_acces"); + GetCurrentPartnerClass(); + Getall_TrainingSession_Without_Scope_Action(); + + setscope_class([]); + submenu_color_management("droit_acces"); + + setSelectionModel_affectations([]); + setdisplay_affectation("0"); + setAdd_new_affectation(""); + clean_affectation_fields(); + clean_nouvelle_affectation_fields(); + Get_Given_User_Access_Scope(); + + } + + + async function submenu_competence() { + setsubmenu("competence"); + submenu_color_management("competence"); + Getall_Partner_Competence_List(); + } + + + async function submenu_piece_jointe() { + setsubmenu("piece_jointe"); + submenu_color_management("piece_jointe"); + + } + + async function submenu_historique() { + setsubmenu("historique"); + submenu_color_management("historique"); + + } + + + + function submenu_color_management(current_menu) { + const list_sous_menu = ['detail_employe', 'affectation', 'contrat', 'evaluation', 'statistiques', 'droit_acces', 'competence', 'piece_jointe', 'historique'] + + for (let i = 0; i < list_sous_menu.length; i++) { + + var sous_menu = list_sous_menu[i]; + if (String(sous_menu) !== current_menu) { + if (document.getElementById(sous_menu)) { + document.getElementById(sous_menu).style.backgroundColor = "#d8edfc"; + document.getElementById(sous_menu).style.color = "black"; + document.getElementById(sous_menu).style.fontWeight = "normal"; + } + } + } + + if (document.getElementById(current_menu)) { + document.getElementById(current_menu).style.backgroundColor = "#107758"; + document.getElementById(current_menu).style.color = "white"; + document.getElementById(current_menu).style.fontWeight = "bold"; + } + } + + const [New_Getall_Partner_Competence_List_result, setNew_Getall_Partner_Competence_List_result] = useState([]); + + const [Getall_Partner_Competence_List_api, setGetall_Partner_Competence_List_api] = useState(); + const [Getall_Partner_Competence_List_message, setGetall_Partner_Competence_List_message] = useState(); + const [Getall_Partner_Competence_List_result, setGetall_Partner_Competence_List_result] = useState([]); + function Getall_Partner_Competence_List(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_Competence_no_filter/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + + if (String(res.data.status) === String("true")) { + //console.log(" In Getall_Partner_Competence_List res.data.status = " + res.data.status); + //console.log(" In Getall_Partner_Competence_List res.data.message r_class = " + res.data.message); + setGetall_Partner_Competence_List_api("true"); + setGetall_Partner_Competence_List_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_description = JSON.parse(x).description; + + + + //--- + var node = { + "_id": local_id, + "id": localid, + "label": local_description, + "description": local_description, + + + }; + new_data2.push(node); + }); + + //--- + var node = { + "_id": "", + "id": "", + "label": "", + "code": "", + "description": "", + "rang": "", + + }; + new_data2.push(node); + + + if (new_data2.length > 0) + setNew_Getall_Partner_Competence_List_result(new_data2); + + + } + else { + setGetall_Partner_Competence_List_api("false"); + setGetall_Partner_Competence_List_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_Partner_Competence_List = ', error); + setGetall_Partner_Competence_List_api("false"); + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de recuperer la liste des compétences "); + setalert_type("error"); + + //setmyApimyApiMessage("") + }) + } + + + + const [New_Getall_Employee_Statistic_Question_List_result, setNew_Getall_Employee_Statistic_Question_List_result] = useState([]); + + const [Getall_Employee_Statistic_Question_List_api, setGetall_Employee_Statistic_Question_List_api] = useState(); + const [Getall_Employee_Statistic_Question_List_message, setGetall_Employee_Statistic_Question_List_message] = useState(); + const [Getall_Employee_Statistic_Question_List_result, setGetall_Employee_Statistic_Question_List_result] = useState([]); + function Getall_Employee_Statistic_Question_List(event) { + + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("related_collection", "ressource_humaine"); + form.append("related_collection_id", selected_id); + form.append("class_id", ""); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Entity_Question_List_With_Stat_For_Given_related_collection_id/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + + if (String(res.data.status) === String("true")) { + //console.log(" In Getall_Employee_Statistic_Question_List res.data.status = " + res.data.status); + //console.log(" In Getall_Employee_Statistic_Question_List res.data.message r_class = " + res.data.message); + setGetall_Employee_Statistic_Question_List_api("true"); + setGetall_Employee_Statistic_Question_List_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).question_id; + var local_question_id = JSON.parse(x).question_id; + var local_question_question = JSON.parse(x).question_question; + var local_question_type = JSON.parse(x).question_type; + + + //--- + var node = { + "_id": local_id, + "id": localid, + "question_id": local_question_id, + "label": local_question_question, + "question_question": local_question_question, + "question_type": local_question_type, + }; + new_data2.push(node); + }); + + //--- + var node = { + "_id": "", + "id": "", + "question_id": "", + "label": "", + "question_question": "", + "question_type": "", + }; + + new_data2.push(node); + + + if (new_data2.length > 0) + setNew_Getall_Employee_Statistic_Question_List_result(new_data2); + + } + else { + setGetall_Employee_Statistic_Question_List_api("false"); + setGetall_Employee_Statistic_Question_List_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_Employee_Statistic_Question_List = ', error); + setGetall_Employee_Statistic_Question_List_api("false"); + alert(" Impossible de recuperer la liste des questions "); + //setmyApimyApiMessage("") + }) + } + + const New_Option_Oui_Non = [ + { + value: '1', + label: 'Oui', + }, + { + value: '0', + label: 'Non', + }, + ]; + + + const New_Option_Civilite = [ + { + value: 'm', + label: 'M', + }, + { + value: 'mme', + label: 'Mme', + }, + { + value: 'neutre', + label: 'Neutre', + }, + ]; + + const [display_affectation, setdisplay_affectation] = useState(); + const [p_affect_poste, setp_affect_poste] = useState(); + const [p_affect_date_du, setp_affect_date_du] = useState(new Date().toLocaleDateString('fr-FR')); + const [p_affect_date_au, setp_affect_date_au] = useState(date_today_90j.toLocaleDateString('fr-FR')); + const [p_affect_cible, setp_affect_cible] = useState(); + const [p_affect_cible_label, setp_affect_cible_label] = useState(); + + const [p_affect_cible_nom, setp_affect_cible_nom] = useState(); + const [p_affect_cible_nom_label, setp_affect_cible_nom_label] = useState(); + + + const [edite_affectation_form, setedite_affectation_form] = useState(); + const [p_affect_comment, setp_affect_comment] = useState(); + const [p_related_target_collection, setp_related_target_collection] = useState(); + const [p_related_target_collection_id, setp_related_target_collection_id] = useState(); + + + function clean_affectation_fields() { + setp_affect_poste(); + setp_affect_date_du(new Date().toLocaleDateString('fr-FR')); + setp_affect_date_au(date_today_90j.toLocaleDateString('fr-FR')); + setp_affect_cible(); + setp_affect_cible_label(); + setp_affect_cible_nom(); + setp_affect_cible_nom_label(); + setp_affect_comment(); + + if (document.getElementsByName("affect_poste")[0]) + document.getElementsByName("affect_poste")[0].value = ""; + + if (document.getElementsByName("affect_cible")[0]) + document.getElementsByName("affect_cible")[0].value = ""; + + if (document.getElementsByName("affect_cible_nom")[0]) + document.getElementsByName("affect_cible_nom")[0].value = ""; + + if (document.getElementsByName("affect_date_du")[0]) + document.getElementsByName("affect_date_du")[0].value = ""; + + if (document.getElementsByName("affect_date_au")[0]) + document.getElementsByName("affect_date_au")[0].value = ""; + + if (document.getElementsByName("affect_comment")[0]) + document.getElementsByName("affect_comment")[0].value = ""; + + + } + + + const [p_one_affect_poste, setp_one_affect_poste] = useState(); + const [p_one_affect_date_du, setp_one_affect_date_du] = useState(new Date().toLocaleDateString('fr-FR')); + const [p_one_affect_date_au, setp_one_affect_date_au] = useState(date_today_90j.toLocaleDateString('fr-FR')); + const [p_one_affect_cible, setp_one_affect_cible] = useState(); + const [p_one_affect_cible_nom, setp_one_affect_cible_nom] = useState(); + const [p_one_affect_comment, setp_one_affect_comment] = useState(); + + function clean_nouvelle_affectation_fields() { + setp_one_affect_poste(); + setp_one_affect_date_du(new Date().toLocaleDateString('fr-FR')); + setp_one_affect_date_au(date_today_90j.toLocaleDateString('fr-FR')); + setp_one_affect_cible(); + setp_one_affect_cible_nom(); + + setp_one_affect_comment(); + + if (document.getElementsByName("one_affect_poste")[0]) + document.getElementsByName("one_affect_poste")[0].value = ""; + + if (document.getElementsByName("one_affect_cible")[0]) + document.getElementsByName("one_affect_cible")[0].value = ""; + + if (document.getElementsByName("one_affect_cible_nom")[0]) + document.getElementsByName("one_affect_cible_nom")[0].value = ""; + + if (document.getElementsByName("one_affect_date_du")[0]) + document.getElementsByName("one_affect_date_du")[0].value = ""; + + if (document.getElementsByName("one_affect_date_au")[0]) + document.getElementsByName("one_affect_date_au")[0].value = ""; + + if (document.getElementsByName("one_affect_comment")[0]) + document.getElementsByName("one_affect_comment")[0].value = ""; + } + + + const [Affectation_data_changed, setAffectation_data_changed] = useState(); + + + function Disable_Detail_Affectation_Fields() { + setedite_affectation_form("0"); + + if (document.getElementsByName("affect_poste")[0]) { + document.getElementsByName("affect_poste")[0].disabled = true; + document.getElementsByName("affect_poste")[0].style.backgroundColor = "#ECEFF1"; + } + + + if (document.getElementsByName("affect_cible")[0]) { + document.getElementsByName("affect_cible")[0].disabled = true; + document.getElementsByName("affect_cible")[0].style.backgroundColor = "#ECEFF1"; + } + + + if (document.getElementsByName("affect_cible_nom")[0]) { + document.getElementsByName("affect_cible_nom")[0].disabled = true; + document.getElementsByName("affect_cible_nom")[0].style.backgroundColor = "#ECEFF1"; + } + + + if (document.getElementsByName("affect_date_du")[0]) { + document.getElementsByName("affect_date_du")[0].disabled = true; + document.getElementsByName("affect_date_du")[0].style.backgroundColor = "#ECEFF1"; + } + + + if (document.getElementsByName("affect_date_au")[0]) { + document.getElementsByName("affect_date_au")[0].disabled = true; + document.getElementsByName("affect_date_au")[0].style.backgroundColor = "#ECEFF1"; + } + + if (document.getElementsByName("affect_comment")[0]) { + document.getElementsByName("affect_comment")[0].disabled = true; + document.getElementsByName("affect_comment")[0].style.backgroundColor = "#ECEFF1"; + } + + } + + + function Enable_Detail_Affectation_Fields() { + + setedite_affectation_form("1"); + + if (document.getElementsByName("affect_poste")[0]) { + document.getElementsByName("affect_poste")[0].disabled = false; + document.getElementsByName("affect_poste")[0].style.backgroundColor = "#FFFFFF"; + } + + + if (document.getElementsByName("affect_cible")[0]) { + document.getElementsByName("affect_cible")[0].disabled = false; + document.getElementsByName("affect_cible")[0].style.backgroundColor = "#FFFFFF"; + } + + + if (document.getElementsByName("affect_cible_nom")[0]) { + document.getElementsByName("affect_cible_nom")[0].disabled = false; + document.getElementsByName("affect_cible_nom")[0].style.backgroundColor = "#FFFFFF"; + } + + + if (document.getElementsByName("affect_date_du")[0]) { + document.getElementsByName("affect_date_du")[0].disabled = false; + document.getElementsByName("affect_date_du")[0].style.backgroundColor = "#FFFFFF"; + } + + + if (document.getElementsByName("affect_date_au")[0]) { + document.getElementsByName("affect_date_au")[0].disabled = false; + document.getElementsByName("affect_date_au")[0].style.backgroundColor = "#FFFFFF"; + } + + if (document.getElementsByName("affect_comment")[0]) { + document.getElementsByName("affect_comment")[0].disabled = false; + document.getElementsByName("affect_comment")[0].style.backgroundColor = "#FFFFFF"; + } + } + + + function Annule_Affectation_DetailFields() { + clean_affectation_fields(); + Get_Given_Employee_Affectation(selected_affectation_id); + setAffectation_data_changed(""); + setedite_affectation_form(""); + + } + + + function Fermer_Affectation_Fields() { + clean_affectation_fields(); + setedite_affectation_form(); + setdisplay_affectation(); + setSelectionModel_affectations([]); + } + + function Fermer_nouvelle_Affectation_Fields() { + clean_nouvelle_affectation_fields(); + setedite_affectation_form(); + setdisplay_affectation(); + setAdd_new_affectation(); + setSelectionModel_affectations([]); + } + + + + + const [Update_One_Affectation_Data_api, setUpdate_One_Affectation_Data_api] = useState(); + const [Update_One_Affectation_Data_message, setUpdate_One_Affectation_Data_message] = useState(); + const [Update_One_Affectation_Data_result, setUpdate_One_Affectation_Data_result] = useState(); + function Update_One_Affectation_Data() { + var form = new FormData(); + //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("_id", selected_affectation_id); + form.append("rh_id", selected_id); + + if (p_affect_poste) + form.append("poste", p_affect_poste); + else { + alert(" Vous devez definir une poste pour cette affectation"); + return; + } + + if (p_affect_date_du) + form.append("date_du", p_affect_date_du); + else { + alert(" Vous devez definir une date de début pour cette affectation"); + return; + } + + if (p_affect_date_au) + form.append("date_au", p_affect_date_au); + else + form.append("date_au", ""); + + + if (p_affect_comment) + form.append("comment", p_affect_comment); + else + form.append("comment", ""); + + + if (p_affect_cible) + form.append("related_target_collection", p_affect_cible); + else + form.append("related_target_collection", ""); + + if (p_affect_cible_nom) + form.append("related_target_collection_id", p_affect_cible_nom); + else + form.append("related_target_collection_id", ""); + + + + //console.log(" affectation form == ", form); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Update_Affectation_Ressource_Humaine_Poste/"; + setLoading(true); + axios.post(myurl, form).then(res => { + //console.log(" In Update_One_Affectation_Data res.data.status = " + res.data.status); + //console.log(" In Update_One_Affectation_Data res.data.message r_class = " + res.data.message); + + setLoading(false); + + if (String(res.data.status) === String("true")) { + setUpdate_One_Affectation_Data_api("true"); + setUpdate_One_Affectation_Data_result(res.data.message); + + Disable_Detail_Affectation_Fields(); + setAffectation_data_changed(""); + setedite_affectation_form(""); + Getall_Employee_Affectation(selected_id); + setSelectionModel_affectations([]); + + alert(" La mise à jour a été correctement faite."); + + if (document.getElementById('myRef_affectation')) { + // myRef.current.scrollIntoView({ behavior: "smooth" }); + var divh = document.getElementById('myRef_affectation').offsetTop; + window.scrollTo({ + top: divh, + behavior: "smooth", + }); + } + + } + else { + setUpdate_One_Affectation_Data_api("false"); + setUpdate_One_Affectation_Data_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 :( Update_One_Affectation_Data = ' + error); + setUpdate_One_Affectation_Data_api("false"); + alert(" Impossible de mettre à jour l'affectation"); + + }) + } + + + const filterPassedTime_start = (time) => { + const currentDate = new Date(); + const selectedDate = new Date(time); + + return currentDate.getTime() < selectedDate.getTime(); + }; + + + function add_one_affectation_block() { + + setdisplay_affectation(""); + + setAdd_new_affectation("1"); + + if (document.getElementById('myRef_new_affectation')) { + //myRef_new_affectation.current.scrollIntoView({ behavior: "smooth" }); + if (document.getElementById('myRef_new_affectation')) { + //myRef.current.scrollIntoView({ behavior: "smooth" }); + var divh = document.getElementById('myRef_new_affectation').offsetTop; + window.scrollTo({ + top: divh, + behavior: "smooth", + }); + } + } + + clean_affectation_fields(); + + } + + + const [Add_one_affectation_api, setAdd_one_affectation_api] = useState(); + const [Add_one_affectation_message, setAdd_one_affectation_message] = useState(); + const [Add_one_affectation_result, setAdd_one_affectation_result] = useState(); + function Add_one_affectation() { + var form = new FormData(); + //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("rh_id", selected_id); + + if (p_one_affect_poste) + form.append("poste", p_one_affect_poste); + else { + alert(" Vous devez definir une poste pour cette affectation"); + return; + } + + if (p_one_affect_date_du) + form.append("date_du", p_one_affect_date_du); + else { + alert(" Vous devez definir une date de début pour cette affectation"); + return; + } + + + if (p_one_affect_date_au) + form.append("date_au", p_one_affect_date_au); + else + form.append("date_au", ""); + + + if (p_one_affect_comment) + form.append("comment", p_one_affect_comment); + else + form.append("comment", ""); + + + if (p_one_affect_cible) + form.append("related_target_collection", p_one_affect_cible); + else + form.append("related_target_collection", ""); + + if (p_one_affect_cible_nom) + form.append("related_target_collection_id", p_one_affect_cible_nom); + else + form.append("related_target_collection_id", ""); + + + if (String(p_one_affect_cible).length > 0 && String(p_one_affect_cible_nom).length <= 0) { + setdisplay_alert_mysy("1"); + setalert_message(" Les champs 'cible' et 'cible nom' sont incohérents (1) "); + setalert_type("error"); + return; + } + + + //console.log(" Add_one_affectation affectation form == ", form); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Affectation_Ressource_Humaine_Poste/"; + setLoading(true); + axios.post(myurl, form).then(res => { + //console.log(" In Add_one_affectation res.data.status = " + res.data.status); + //console.log(" In Add_one_affectation res.data.message r_class = " + res.data.message); + + setLoading(false); + + if (String(res.data.status) === String("true")) { + setAdd_one_affectation_api("true"); + setAdd_one_affectation_result(res.data.message); + + Disable_Detail_Affectation_Fields(); + setAffectation_data_changed(""); + setedite_affectation_form(""); + setAdd_new_affectation(""); + Getall_Employee_Affectation(selected_id); + setSelectionModel_affectations([]); + // alert(" L'affectation a été ajoutée."); + + setdisplay_alert_mysy("1"); + setalert_message("L'affectation a été ajoutée."); + setalert_type("success"); + + + if (document.getElementById('myRef_affectation')) { + // myRef.current.scrollIntoView({ behavior: "smooth" }); + var divh = document.getElementById('myRef_affectation').offsetTop; + window.scrollTo({ + top: divh, + behavior: "smooth", + }); + } + + } + else { + setLoading(false); + setAdd_one_affectation_api("false"); + setAdd_one_affectation_message(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); + } + + }).catch((error) => { + + console.log('UpdateStagiaireData : Not good man :( Add_one_affectation = ' + error); + setAdd_one_affectation_api("false"); + alert(" Impossible d'ajouter l'affectation"); + + }) + } + + const [p_user_profil, setp_user_profil] = useState(); + const [p_user_profil_tmp, setp_user_profil_tmp] = useState(); + const [p_user_profil_tmp_id, setp_user_profil_tmp_id] = useState(); + const [p_user_profil_changed, setp_user_profil_changed] = useState(); + + const [acces_right_data_changed, setacces_right_data_changed] = useState(); + const [acces_right_data_edit_mode, setacces_right_data_edit_mode] = useState(); + const [acces_right_data_edit_mode_boolean, setacces_right_data_edit_mode_boolean] = useState(false); + + + + const [warning_bg_color, setwarning_bg_color] = useState(''); + + + function Enable_acces_right_datagrid() { + setacces_right_data_edit_mode("1"); + setacces_right_data_edit_mode_boolean(true); + setacces_right_data_changed(); + setwarning_bg_color('#fffff0 '); + } + + function Disable_acces_right_datagrid() { + setacces_right_data_edit_mode(); + setacces_right_data_edit_mode_boolean(false); + setacces_right_data_changed(); + setwarning_bg_color(''); + } + + const [Update_user_access_right_Data_api, setUpdate_user_access_right_Data_api] = useState(); + const [Update_user_access_right_Data_message, setUpdate_user_access_right_Data_message] = useState(); + const [Update_user_access_right_Data_result, setUpdate_user_access_right_Data_result] = useState(); + function Update_user_access_right_Data() { + var form = new FormData(); + //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("user_id", selected_id); + form.append("tab_access", rows_acces_right); + + //console.log(" form == ", form); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Update_User_Access_Right/"; + setLoading(true); + axios.post(myurl, form).then(res => { + //console.log(" In Update_user_access_right_Data res.data.status = " + res.data.status); + //console.log(" In Update_user_access_right_Data res.data.message r_class = " + res.data.message); + + setLoading(false); + + if (String(res.data.status) === String("true")) { + setUpdate_user_access_right_Data_api("true"); + setUpdate_user_access_right_Data_result(res.data.message); + setacces_right_data_edit_mode(); + // alert(" La mise à jour a été correctement faite."); + setdisplay_alert_mysy("1"); + setalert_message(" La mise à jour a été correctement faite."); + setalert_type("success"); + + } + else { + setUpdate_user_access_right_Data_api("false"); + setUpdate_user_access_right_Data_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('UpdateStagiaireData : Not good man :( Update_user_access_right_Data = ' + error); + setUpdate_user_access_right_Data_api("false"); + // alert(" Impossible de mettre à jour les Droits d'accès de l'employé"); + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de mettre à jour les Droits d'accès de l'employé"); + setalert_type("error"); + + }) + } + + + const [acces_right_data_tmp_data, setacces_right_data_tmp_data] = useState([]); + const [tableData, setTableData] = useState(); + + const access_right_datagrid_changed = (event) => { + + var myid = String(event.target.id); + + var tab = myid.split('_'); + var module_nom = tab[0]; + var module_acces = tab[1] + + + //console.log(" #### myid=", myid, " module_nom = ", module_nom, " module_acces = ", module_acces); + + const updatedData = rows_acces_right.map((x) => { + + + var localid = JSON.parse(x).id; + var local_id = JSON.parse(x)._id; + var local_write = JSON.parse(x).write; + var local_read = JSON.parse(x).read + + + if (JSON.parse(x).module_name === module_nom && module_acces === "read") { + var new_valeur_read = "false"; + if (String(local_read) === "false") + new_valeur_read = "true"; + + + return '{"_id": "' + local_id + '", "module_name": "' + module_nom + '", "valide": "1", "locked": "0", "id": "' + localid + '", "read": "' + new_valeur_read + '", "write": "' + local_write + '"}'; + + } + if (JSON.parse(x).module_name === module_nom && module_acces === "write") { + var new_valeur_write = "false"; + if (String(local_write) === "false") + new_valeur_write = "true"; + return '{"_id": "' + local_id + '", "module_name": "' + module_nom + '", "valide": "1", "locked": "0", "id": "' + localid + '", "read": ' + local_read + ', "write": "' + new_valeur_write + '"}'; + + } + + return x; + }); + + + //console.log(" #### changed updatedData=", updatedData); + //console.log(" #### changed rows_acces_right=", rows_acces_right); + + setrows_acces_right(updatedData); + + }; + + + + const [Dialog_1_message_create_update_login_pwd, setDialog_1_message_create_update_login_pwd] = React.useState(false); + const [Dialog_1_open_create_update_login_pwd, setDialog_1_open_create_update_login_pwd] = React.useState(false); + + function Dialog_1_handle_change_login_pwd() { + setDialog_1_message_create_update_login_pwd("Souhaitez-vous modifier les accès (login & pwd) de l'utilisateur ?"); + setDialog_1_open_create_update_login_pwd(true); + } + + const Dialog_1_handleClose_buton_create_update_login_pwd = () => { + //alert(" Utiliser le bouton 'fermer' "); + //setOpen(false); + }; + + const Dialog_1_handle_OK_buton_create_update_login_pwd = () => { + + setDialog_1_open_create_update_login_pwd(false); + setDialog_1_open_create_update_login_pwd_update(true); + }; + + + const Dialog_1_handleCancel_buton_create_update_login_pwd = () => { + setDialog_1_open_create_update_login_pwd(false); + }; + + const [Dialog_1_message_create_update_login_pwd_update, setDialog_1_message_create_update_login_pwd_update] = React.useState(false); + const [Dialog_1_open_create_update_login_pwd_update, setDialog_1_open_create_update_login_pwd_update] = React.useState(false); + + function Dialog_1_handle_change_login_pwd_update() { + setDialog_1_message_create_update_login_pwd_update("Souhaitez-vous modifier les accès (login & pwd) de l'utilisateur ?"); + setDialog_1_open_create_update_login_pwd_update(true); + } + + const Dialog_1_handleClose_buton_create_update_login_pwd_update = () => { + //alert(" Utiliser le bouton 'fermer' "); + //setOpen(false); + }; + + const Dialog_1_handle_OK_buton_create_update_login_pwd_update = () => { + + setDialog_1_open_create_update_login_pwd_update(false); + }; + + + const Dialog_1_handleCancel_buton_create_update_login_pwd_update = () => { + setDialog_1_open_create_update_login_pwd_update(false); + //setp_new_login(''); + setp_new_pwd(''); + setp_conf_new_login(''); + + }; + + + const [p_new_login, setp_new_login] = React.useState(""); + const [p_new_pwd, setp_new_pwd] = React.useState(""); + const [p_conf_new_login, setp_conf_new_login] = React.useState(""); + + function OnchangeCellDataGrid(params) { + + + var num_line = params.id; + var colomn = params.field; + var new_value = params.value; + + //console.log(" €€€ rows_acces_right[num_line]", rows_acces_right[num_line]); + + var module_nom = JSON.parse(rows_acces_right[num_line]).module_name; + var module_acces = colomn; + + //console.log(" la ligne qui nous interresse est : module_nom = ", module_nom, " module_acces = ", module_acces); + + + const updatedData = rows_acces_right.map((x) => { + + var localid = JSON.parse(x).id; + var local_id = JSON.parse(x)._id; + + + var local_write_txt = JSON.parse(x).write; + var local_write = false; + if (String(local_write_txt) === "true") + local_write = true; + + + var local_read_txt = JSON.parse(x).read + var local_read = false; + if (String(local_read_txt) === "true") + local_read = true; + + + if (JSON.parse(x).module_name === module_nom && module_acces === "read") { + return '{"_id": "' + local_id + '", "module_name": "' + module_nom + '", "valide": "1", "locked": "0", "id": "' + localid + '", "read": ' + new_value + ', "write": ' + local_write + '}'; + } + if (JSON.parse(x).module_name === module_nom && module_acces === "write") { + return '{"_id": "' + local_id + '", "module_name": "' + module_nom + '", "valide": "1", "locked": "0", "id": "' + localid + '", "read": ' + local_read + ', "write": ' + new_value + '}'; + } + + return x; + }); + + //console.log(" #### changed updatedData=", updatedData); + //console.log(" #### changed rows_acces_right=", rows_acces_right); + + + setrows_acces_right(updatedData); + setacces_right_data_changed("1"); + + } + + + const [Add_Update_Employee_Login_Pass_Data_api, setAdd_Update_Employee_Login_Pass_Data_api] = useState(); + const [Add_Update_Employee_Login_Pass_Data_message, setAdd_Update_Employee_Login_Pass_Data_message] = useState(); + const [Add_Update_Employee_Login_Pass_Data_result, setAdd_Update_Employee_Login_Pass_Data_result] = useState(); + function Add_Update_Employee_Login_Pass_Data() { + var form = new FormData(); + //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); + + // Controle sur les champs + + if (p_new_login.trim() == "") { + // alert(" Vous devez saisir le mail de login"); + setdisplay_alert_mysy("1"); + setalert_message(" Vous devez saisir l'email de login"); + setalert_type("error"); + return; + } + + + if (p_new_pwd.trim() == "") { + // alert(" Vous devez saisir un mot de passe"); + setdisplay_alert_mysy("1"); + setalert_message(" Vous devez saisir un mot de passe"); + setalert_type("error"); + return; + } + + + if (p_conf_new_login.trim() == "") { + // alert(" Vous devez confirmer le mot de passe"); + setdisplay_alert_mysy("1"); + setalert_message(" Vous devez confirmer le mot de passe"); + setalert_type("error"); + return; + } + + + var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; + if (!p_new_login.match(validRegex)) { + // alert("L'adresse email est invalide."); + setdisplay_alert_mysy("1"); + setalert_message("L'adresse email est invalide."); + setalert_type("error"); + return; + } + + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("email", p_new_login); + form.append("pwd", p_new_pwd); + form.append("ressource_humaine_id", selected_id); + + + + //console.log(" form == ", form); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Update_Employee_Login_Pass/"; + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + //console.log(" In Add_Update_Employee_Login_Pass_Data res.data.status = " + res.data.status); + //console.log(" In Add_Update_Employee_Login_Pass_Data res.data.message r_class = " + res.data.message); + + if (String(res.data.status) === String("true")) { + setAdd_Update_Employee_Login_Pass_Data_api("true"); + setAdd_Update_Employee_Login_Pass_Data_result(res.data.message); + + setp_detail_user_login(p_new_login); + + setDialog_1_open_create_update_login_pwd_update(false); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + setp_new_login(''); + setp_new_pwd(''); + setp_conf_new_login(''); + + } + else { + setAdd_Update_Employee_Login_Pass_Data_api("false"); + setAdd_Update_Employee_Login_Pass_Data_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('UpdateStagiaireData : Not good man :( Add_Update_Employee_Login_Pass_Data = ' + error); + setAdd_Update_Employee_Login_Pass_Data_api("false"); + // alert(" Impossible de créer ou mettre à jour le compte l'employé"); + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de créer ou mettre à jour le compte l'employé"); + setalert_type("error"); + + }) + } + + function Generate_Pwd() { + var randomstring = Math.random().toString(36).slice(-8); + setp_new_pwd(randomstring); + setp_conf_new_login(randomstring); + } + + const [currentpawdvisible, setcurrentpawdvisible] = useState(false); + + + const handleClickShowPassword = () => { + if (currentpawdvisible == false) { + document.getElementsByName("new_pwd")[0].type = "text"; + document.getElementsByName("conf_new_login")[0].type = "text"; + setcurrentpawdvisible(true); + } + else if (currentpawdvisible == true) { + document.getElementsByName("new_pwd")[0].type = "password"; + document.getElementsByName("conf_new_login")[0].type = "password"; + setcurrentpawdvisible(false); + } + }; + + // -- Gestion pièces jointes + + const [Download_one_attached_document_api, setDownload_one_attached_document_api] = useState(); + const [Download_one_attached_document_result, setDownload_one_attached_document_result] = useState(); + const [Download_one_attached_document_message, setDownload_one_attached_document_message] = useState(); + const Download_one_attached_document = (event) => { + const stored_cookie = getCookie('tokenmysypart'); + + + var nom_fiche_detaillee = "Fiche_Detaillee.pdf"; + var token = stored_cookie; + var file_name = event.target.id; + + + var url = process.env.REACT_APP_API_URL + "myclass/api/Get_Stored_Downloaded_File/" + token + "/" + file_name; + setLoading(true); + + axios.get(url, { responseType: 'blob', },) + .then((res) => { + setLoading(false); + fileDownload(res.data, nom_fiche_detaillee); + setDownload_one_attached_document_api("true"); + }).catch((error) => { + setLoading(false); + console.error('Error:', error); + setDownload_one_attached_document_api("false"); + + }); + } + + + const editorRef_competence = useRef(null); + const [editorRef_competence_limite, seteditorRef_competence_limite] = useState(800); + + + const [file_1_name, setfile_1_name] = useState(); + + const [sessions_file_change_1_api, setsessions_file_change_1_api] = useState(); + const [sessions_file_change_1_result, setsessions_file_change_1_result] = useState(); + const [sessions_file_change_1_message, setsessions_file_change_1_message] = useState(); + const sessions_file_change_1 = event => { + + const fileUploaded = event.target.files[0]; + let file_size = event.target.files[0].size; + let file_type = event.target.files[0].type; + + + + //console.log("file_size = ", file_size, " file_type = ", file_type); + if (file_size > 10000000) { + // alert("Le fichier ne doit pas depasser un 1 Méga octets"); + setdisplay_alert_mysy("1"); + setalert_message("Le fichier ne doit pas depasser un 1 Méga octets"); + setalert_type("error"); + // console.log("Le fichier ne doit pas depasser un 1 Méga octets"); + return; + } + + setfile_1_name(event.target.files[0]); + const formData = new FormData(); + formData.append('File', fileUploaded); + //formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA'); + const stored_cookie = getCookie('tokenmysypart'); + + //formData.append("token", stored_cookie); + //formData.append("class_internal_url", internal_url); + //console.log("token = " + stored_cookie); + + return; + + }; + + + const [file_2_name, setfile_2_name] = useState(); + + const [sessions_file_change_2_api, setsessions_file_change_2_api] = useState(); + const [sessions_file_change_2_result, setsessions_file_change_2_result] = useState(); + const [sessions_file_change_2_message, setsessions_file_change_2_message] = useState(); + const sessions_file_change_2 = event => { + + const fileUploaded = event.target.files[0]; + let file_size = event.target.files[0].size; + let file_type = event.target.files[0].type; + + + + + console.log("file_size = ", file_size, " file_type = ", file_type); + if (file_size > 10000000) { + /// alert("Le fichier ne doit pas depasser un 1 Méga octets"); + setdisplay_alert_mysy("1"); + setalert_message("Le fichier ne doit pas depasser un 1 Méga octets"); + setalert_type("error"); + // console.log("Le fichier ne doit pas depasser un 1 Méga octets"); + return; + } + + setfile_2_name(event.target.files[0]); + const formData = new FormData(); + formData.append('File', fileUploaded); + //formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA'); + const stored_cookie = getCookie('tokenmysypart'); + + //formData.append("token", stored_cookie); + //formData.append("class_internal_url", internal_url); + //console.log("token = " + stored_cookie); + + return; + + fetch( + process.env.REACT_APP_API_URL + "myclass/api/Add_Update_SessionFormation_mass/", + { + method: 'POST', + body: formData, + } + ) + .then((response) => response.json()) + .then((result) => { + + //console.log(" ## result['status'] = ", result['status']) + if (String(result['status']) === String("true")) { + //console.log('Success:', result['message']); + setsessions_file_change_2_result(result['message']); + setsessions_file_change_2_api("true"); + //GetCurrentClass_trainingsession(); + + } + else { + setsessions_file_change_2_message(result['message']); + setsessions_file_change_2_api("false"); + } + + }) + .catch((error) => { + console.error('Error:', error); + setsessions_file_change_2_api("false"); + }); + }; + + const [Record_All_PJ_api, setRecord_All_PJ_api] = useState(); + const [Record_All_PJ_result, setRecord_All_PJ_result] = useState(); + const [Record_All_PJ_message, setRecord_All_PJ_message] = useState(); + function Record_All_PJ() { + + if (!p_detail_one_file_to_download_type_name) { + // alert(" Vous devez donner un nom à la pièce jointe"); + setdisplay_alert_mysy("1"); + setalert_message(" Vous devez donner un nom à la pièce jointe"); + setalert_type("error"); + return; + } + + if (file_1_name && file_1_name.name) { + console.log(" ### Traitement de : ", file_1_name.name); + + const formData = new FormData(); + formData.append('File', file_1_name); + //formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA'); + const stored_cookie = getCookie('tokenmysypart'); + + formData.append("token", stored_cookie); + formData.append("file_business_object", p_detail_one_file_to_download_type_name); + formData.append("file_name", file_1_name.name); + formData.append("status", "0"); + formData.append("object_owner_collection", "ressource_humaine"); + formData.append("object_owner_id", selected_id); + formData.append("type_document", ""); + + //formData.append("class_internal_url", internal_url); + //console.log("token = " + stored_cookie); + + + fetch( + process.env.REACT_APP_API_URL + "myclass/api/Store_User_Downloaded_File/", + { + method: 'POST', + body: formData, + } + ) + .then((response) => response.json()) + .then((result) => { + + //console.log(" ## result['status'] = ", result['status']) + if (String(result['status']) === String("true")) { + //console.log('Success:', result['message']); + setRecord_All_PJ_result(result['message']); + setRecord_All_PJ_api("true"); + + Get_List_Of_All_PJ(selected_id); + setfile_1_name(); + setp_detail_one_file_to_download_type_name(); + //GetCurrentClass_trainingsession(); + //alert(" La pièce jointe " + file_1_name.name + " a été bien enregistrée") + var txt = " La pièce jointe " + file_1_name.name + " a été bien enregistrée" + setdisplay_alert_mysy("1"); + setalert_message(txt); + setalert_type("success"); + + } + else { + setRecord_All_PJ_message(result['message']); + setRecord_All_PJ_api("false"); + } + + }) + .catch((error) => { + console.error(' Record_All_PJ Error:', error); + setRecord_All_PJ_api("false"); + }); + + } + + if (file_2_name && file_2_name.name) { + console.log(" ### Traitement de : ", file_2_name.name); + } + + } + + + const [Delete_one_attached_document_api, setDelete_one_attached_document_api] = useState(); + const [Delete_one_attached_document_result, setDelete_one_attached_document_result] = useState(); + const [Delete_one_attached_document_message, setDelete_one_attached_document_message] = useState(); + const Delete_one_attached_document = (event) => { + const stored_cookie = getCookie('tokenmysypart'); + + var formData = new FormData(); + var nom_fiche_detaillee = "Fiche_Detaillee.pdf"; + var file_name = event.target.id; + + + formData.append("token", stored_cookie); + formData.append("file_name", file_name); + + var url = process.env.REACT_APP_API_URL + "myclass/api/Delete_Stored_Downloaded_File/"; + + + fetch( + process.env.REACT_APP_API_URL + "myclass/api/Delete_Stored_Downloaded_File/", + { + method: 'POST', + body: formData, + } + ) + .then((response) => response.json()) + .then((result) => { + + //console.log(" ## result['status'] = ", result['status']) + if (String(result['status']) === String("true")) { + //console.log('Success:', result['message']); + setDelete_one_attached_document_result(result['message']); + setDelete_one_attached_document_api("true"); + Get_List_Of_All_PJ(selected_id); + //alert(result['message']) + setdisplay_alert_mysy("1"); + setalert_message(result['message']); + setalert_type("success"); + + } + else { + setDelete_one_attached_document_message(result['message']); + setDelete_one_attached_document_api("false"); + } + + }) + .catch((error) => { + console.error(' Record_All_PJ Error:', error); + setDelete_one_attached_document_api("false"); + // alert(" Impossible de supprimer le document") + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de supprimer le document"); + setalert_type("error"); + + }); + + + } + + const [Get_List_Of_All_PJ_api, setGet_List_Of_All_PJ_api] = useState(); + const [Get_List_Of_All_PJ_result, setGet_List_Of_All_PJ_result] = useState(); + const [Get_List_Of_All_PJ_message, setGet_List_Of_All_PJ_message] = useState(); + function Get_List_Of_All_PJ(local_employee_id) { + + const formData = new FormData(); + + //formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA'); + const stored_cookie = getCookie('tokenmysypart'); + + formData.append("token", stored_cookie); + formData.append("object_owner_collection", "ressource_humaine"); + formData.append("object_owner_id", local_employee_id); + + + //formData.append("class_internal_url", internal_url); + //console.log("token = " + stored_cookie); + + + fetch( + process.env.REACT_APP_API_URL + "myclass/api/Get_List_object_owner_collection_Stored_Files/", + { + method: 'POST', + body: formData, + } + ) + .then((response) => response.json()) + .then((result) => { + + //console.log(" ## result['status'] = ", result['status']) + if (String(result['status']) === String("true")) { + //console.log('Message :', result['message']); + setGet_List_Of_All_PJ_result(result['message']); + setGet_List_Of_All_PJ_api("true"); + + } + else { + setGet_List_Of_All_PJ_message(result['message']); + setGet_List_Of_All_PJ_api("false"); + } + + }) + .catch((error) => { + console.error(' Get_List_Of_All_PJ Error:', error); + setGet_List_Of_All_PJ_api("false"); + }); + + } + + + + function Delete_file_1_name() { + setfile_1_name(); + } + + function Delete_file_2_name() { + setfile_2_name(); + } + + const [p_detail_one_file_to_download_type_name, setp_detail_one_file_to_download_type_name] = useState(); + + // -- end gestion pièces jointes + + + // Gestion champs specifiques + + /* + *** ALGORITHME + 1 - Récuperer la liste des champs specifiques de la collection concernée - Array : list_nom_champs_spec + 2 - Récupérer les caracteristiques de champs champs spécifique : "id, nom, label, type valeur, etc" + - avec un champ 'value' à vide. Mettre dans le tableau JSON, 'spec_champs_valeur' + + 3 - Créer une nouvelle table qui permettra de gerer les hook : const [rows_champs_specifics, setrows_champs_specifics] = useState([]); + 4 - Afficher en html les elements 'rows_champs_specifics' + 5 - Gerer la modification avec la fonction 'change_champs_spec_handle' + 6 - On recuperer les valeur lors du click d'enregistrement. + + */ + + + const list_nom_champs_spec = [] + const [spec_champs_valeur, setspec_champs_valeur] = useState([]); + + //const spec_champs_valeur = "" + + const [Get_Partner_Object_Specific_Fields_api, setGet_Partner_Object_Specific_Fields_api] = useState(); + const [Get_Partner_Object_Specific_Fields_message, setGet_Partner_Object_Specific_Fields_message] = useState(); + const [Get_Partner_Object_Specific_Fields_result, setGet_Partner_Object_Specific_Fields_result] = useState(); + function Get_Partner_Object_Specific_Fields(local_collection_obj_metier) { + + var form = new FormData(); + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("object_name", local_collection_obj_metier); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Partner_Object_Specific_Valide_Displayed_Fields/"; + + axios.post(myurl, form).then(res => { + + if (String(res.data.status) === String("true")) { + //console.log(" In Get_Partner_Object_Specific_Fields res.data.status = " + res.data.status); + //console.log(" In Get_Partner_Object_Specific_Fields res.data.message r_class = " + res.data.message); + + setGet_Partner_Object_Specific_Fields_api("true"); + setGet_Partner_Object_Specific_Fields_result(res.data.message); + + + setrows_champs_specifics(res.data.message); + + + } + else { + setGet_Partner_Object_Specific_Fields_api("false"); + setGet_Partner_Object_Specific_Fields_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 :( Get_Partner_Object_Specific_Fields = ', error); + setGet_Partner_Object_Specific_Fields_api("false"); + // alert(" Impossible de recuperer la liste des collection et champs personnalisables"); + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de recuperer la liste des collection et champs personnalisables"); + setalert_type("error"); + //setmyApimyApiMessage("") + }) + } + + + const [rows_champs_specifics, setrows_champs_specifics] = useState([]); + const [display_champs_specifics, setdisplay_champs_specifics] = useState("0"); + + function afficher_champs_spec() { + + setdisplay_champs_specifics("1"); + //setrows_champs_specifics(spec_champs_valeur); + + } + + function findIndexByProperty(data, key, value) { + for (var i = 0; i < data.length; i++) { + + if (data[i][key] == value) { + return i; + } + } + return -1; + } + + + function findValueByProperty(data, key, value) { + for (var i = 0; i < data.length; i++) { + if (data[i][key] == value) { + + var tmp_val = JSON.parse(data[i]); + + return tmp_val.field_value + + } + } + return ""; + } + + + const spec_field_updated_values = [] + const [spec_field_updated_values_hooks, setspec_field_updated_values_hooks] = useState([]); + + + function change_champs_spec_handle() { + + for (let i = 0; i < rows_champs_specifics.length; i++) { + + var field_name = JSON.parse(rows_champs_specifics[i]).field_name; + var field_type = JSON.parse(rows_champs_specifics[i]).field_type; + var field_label = JSON.parse(rows_champs_specifics[i]).field_label; + var is_mandatory = JSON.parse(rows_champs_specifics[i]).is_mandatory; + + + + if (document.getElementsByName(String(field_name))[0]) { + + var field_value = document.getElementsByName(String(field_name))[0].value; + var new_val = { 'field_name': field_name, 'field_value': field_value, 'field_type': field_type, 'field_label': field_label, 'is_mandatory': is_mandatory } + var johnIndex = findIndexByProperty(spec_field_updated_values, 'field_name', field_name); + if (johnIndex > -1) { + spec_field_updated_values[johnIndex] = new_val; + + } else { + spec_field_updated_values.push(new_val); + } + } + + } + + //setrows_champs_specifics(spec_champs_valeur); + + //console.log(" OUTT spec_field_updated_values = ", spec_field_updated_values); + setspec_field_updated_values_hooks(spec_field_updated_values) + } + // -- end champs specifiques + + const [Dialog_employe_contrat_open, setDialog_employe_contrat_open] = React.useState(false); + + function func_Dialog_employe_contrat_open(message) { + setDialog_employe_contrat_open(true); + } + + const Dialog_employe_contrat_open_handleClose = () => { + //alert(" Utiliser le bouton 'fermer' "); + //setOpen(false); + }; + + const Dialog_employe_contrat_handleClose_buton = () => { + + setp_employe_contrat_type_contrat(""); + setp_employe_contrat_type_employe(""); + setp_employe_contrat_cout(""); + setp_employe_contrat_comment(""); + setp_employe_contrat_periodicite(""); + setp_employe_contrat_groupe_prix_achat_id(""); + setp_employe_contrat_quantite(""); + setp_employe_contrat_date_debut(new Date().toLocaleDateString('fr-FR')); + setp_employe_contrat_date_fin(date_today_90j.toLocaleDateString('fr-FR')); + setselected_contrat_id(""); + + setDialog_employe_contrat_open(false); + }; + + const Dialog_employe_contrat_handleClose = () => { + setDialog_employe_contrat_open(false); + }; + + const [handleClick_delete_employee_contrat_api, sethandleClick_delete_employee_contrat_api] = useState(); + const [handleClick_delete_employee_contrat_message, sethandleClick_delete_employee_contrat_message] = useState(); + const [handleClick_delete_employee_contrat_result, sethandleClick_delete_employee_contrat_result] = useState(); + function handleClick_delete_employee_contrat(event, cellValues) { + + var local_employe_id = cellValues.row._id; + + var form = new FormData(); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("_id", local_employe_id); + form.append("rh_id", selected_id); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Delete_Employee_Contrat/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + + setLoading(false); + if (String(res.data.status) === String("true")) { + //console.log(" In handleClick_delete_employee_contrat res.data.status = " + res.data.status); + //console.log(" In handleClick_delete_employee_contrat res.data.message r_class = " + res.data.message); + sethandleClick_delete_employee_contrat_api("true"); + sethandleClick_delete_employee_contrat_result(res.data.message); + Dialog_employe_contrat_handleClose_buton(); + Dialog_employe_contrat_handleClose_buton(); + Getall_Employee_Contrat(selected_id); + Get_Partner_Purchase_Prices(); + setselectionModel_contrat([]); + if (document.getElementById('myRef_contrat')) { + var divh = document.getElementById('myRef_contrat').offsetTop; + window.scrollTo({ + top: divh, + behavior: "smooth", + }); + } + + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + + } + else { + sethandleClick_delete_employee_contrat_api("false"); + sethandleClick_delete_employee_contrat_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 :( handleClick_delete_employee_contrat = ', error); + sethandleClick_delete_employee_contrat_api("false"); + alert(" Impossible de supprimer le contrat"); + //setmyApimyApiMessage("") + }) + } + + const [selected_contrat_id, setselected_contrat_id] = useState(); + + const [p_employe_contrat_type_contrat, setp_employe_contrat_type_contrat] = useState(""); + const [p_employe_contrat_type_employe, setp_employe_contrat_type_employe] = useState(""); + const [p_employe_contrat_cout, setp_employe_contrat_cout] = useState(""); + const [p_employe_contrat_groupe_prix_achat_id, setp_employe_contrat_groupe_prix_achat_id] = useState(""); + const [p_employe_contrat_quantite, setp_employe_contrat_quantite] = useState(""); + const [p_employe_contrat_date_debut, setp_employe_contrat_date_debut] = useState(new Date().toLocaleDateString('fr-FR')); + const [p_employe_contrat_date_fin, setp_employe_contrat_date_fin] = useState(date_today_90j.toLocaleDateString('fr-FR')); + const [p_employe_contrat_comment, setp_employe_contrat_comment] = useState(""); + const [p_employe_contrat_periodicite, setp_employe_contrat_periodicite] = useState(""); + + const [Get_Partner_Purchase_Prices_api, setGet_Partner_Purchase_Prices_api] = useState(); + const [Get_Partner_Purchase_Prices_message, setGet_Partner_Purchase_Prices_message] = useState(); + const [Get_Partner_Purchase_Prices_result, setGet_Partner_Purchase_Prices_result] = useState([]); + function Get_Partner_Purchase_Prices(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_Partner_Group_Purchase_Price_List/"; + + + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + if (String(res.data.status) === String("true")) { + //console.log(" In Get_Partner_Purchase_Prices res.data.status = " + res.data.status); + //console.log(" In Get_Partner_Purchase_Prices res.data.message r_class = " + res.data.message); + setGet_Partner_Purchase_Prices_api("true"); + setGet_Partner_Purchase_Prices_result(res.data.message); + } + else { + setGet_Partner_Purchase_Prices_api("false"); + setGet_Partner_Purchase_Prices_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 :( Get_Partner_Purchase_Prices = ', error); + setGet_Partner_Purchase_Prices_api("false"); + alert(" Impossible de recuperer la liste des prix d'achat "); + //setmyApimyApiMessage("") + }) + } + + const [isLoading, setLoading] = useState(); + + const [dialog_contrat_data_changed, setdialog_contrat_data_changed] = useState(); + + function handleClick_edit_employee_contrat_From_Line(row_id) { + + var line = JSON.parse(Getall_Employee_Contrat_result[row_id]); + + //console.log("### line = ", line); + var contrat_id = line._id; + setselected_contrat_id(contrat_id); + + setp_employe_contrat_type_contrat(line.type_contrat); + setp_employe_contrat_type_employe(line.type_employe); + setp_employe_contrat_cout(line.cout); + + setp_employe_contrat_comment(line.comment); + + setp_employe_contrat_periodicite(line.periodicite); + + + setp_employe_contrat_groupe_prix_achat_id(line.groupe_prix_achat_id); + + setp_employe_contrat_quantite(line.qte); + + if (String(line.qte) !== "") + settype_contrat_qte("1"); + + setp_employe_contrat_date_debut(line.date_debut); + setp_employe_contrat_date_fin(line.date_fin); + + Getall_Employee_Type_Contrat(); + setDialog_employe_contrat_open(true); + + } + + const [Add_Update_Employee_Contrat_api, setAdd_Update_Employee_Contrat_api] = useState(); + const [Add_Update_Employee_Contrat_message, setAdd_Update_Employee_Contrat_message] = useState(); + const [Add_Update_Employee_Contrat_result, setAdd_Update_Employee_Contrat_result] = useState(); + function Add_Update_Employee_Contrat(event) { + + var form = new FormData(); + + if (!p_employe_contrat_type_contrat || String(p_employe_contrat_type_contrat).trim() === "") { + //alert(" Le type de contrat est obigatoire "); + setdisplay_alert_mysy("1"); + setalert_message(" Le type de contrat est obigatoire "); + setalert_type("error"); + return; + } + + if (!p_employe_contrat_type_employe || String(p_employe_contrat_type_employe).trim() === "") { + // alert(" Le type d'employé est obigatoire "); + setdisplay_alert_mysy("1"); + setalert_message(" Le type d'employé est obigatoire "); + setalert_type("error"); + return; + } + + + + if (!p_employe_contrat_date_debut || String(p_employe_contrat_date_debut).trim() === "") { + // alert(" Le début du contrat est obigatoire "); + setdisplay_alert_mysy("1"); + setalert_message(" Le début du contrat est obigatoire "); + setalert_type("error"); + return; + } + + + if (!p_employe_contrat_groupe_prix_achat_id || String(p_employe_contrat_groupe_prix_achat_id).trim() === "") { + if (!p_employe_contrat_cout || String(p_employe_contrat_cout).trim() === "") { + // alert(" Le prix est obigatoire "); + setdisplay_alert_mysy("1"); + setalert_message(" Le prix est obigatoire "); + setalert_type("error"); + return; + } + + if (!p_employe_contrat_periodicite || String(p_employe_contrat_periodicite).trim() === "") { + // alert(" La périodicité est obigatoire "); + setdisplay_alert_mysy("1"); + setalert_message(" La périodicité est obigatoire "); + setalert_type("error"); + return; + } + + } + + + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + + if (String(p_employe_contrat_comment).length > 255) { + // alert(" Le commentaire du contrat ne doit pas depasser 255 caractères") + setdisplay_alert_mysy("1"); + setalert_message(" Le commentaire du contrat ne doit pas depasser 255 caractères "); + setalert_type("error"); + return; + } + + var myurl = ""; + + if (String(selected_contrat_id).trim().length > 2) { + // Il s'agit d'une mise à jour + myurl = process.env.REACT_APP_API_URL + "myclass/api/Update_Employee_Contrat/"; + form.append("_id", selected_contrat_id); + form.append("rh_id", selected_id); + form.append("date_debut", p_employe_contrat_date_debut); + form.append("date_fin", p_employe_contrat_date_fin); + form.append("type_contrat", p_employe_contrat_type_contrat); + form.append("type_employe", p_employe_contrat_type_employe); + form.append("cout", p_employe_contrat_cout); + form.append("periodicite", p_employe_contrat_periodicite); + form.append("quantite", p_employe_contrat_quantite); + form.append("groupe_prix_achat_id", p_employe_contrat_groupe_prix_achat_id); + form.append("comment", p_employe_contrat_comment); + + + + } else { + // Il s'agit d'une creation + myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Employee_Contrat/"; + + form.append("rh_id", selected_id); + form.append("date_debut", p_employe_contrat_date_debut); + form.append("date_fin", p_employe_contrat_date_fin); + form.append("type_contrat", p_employe_contrat_type_contrat); + form.append("type_employe", p_employe_contrat_type_employe); + form.append("cout", p_employe_contrat_cout); + form.append("periodicite", p_employe_contrat_periodicite); + form.append("quantite", p_employe_contrat_quantite); + form.append("groupe_prix_achat_id", p_employe_contrat_groupe_prix_achat_id); + form.append("comment", p_employe_contrat_comment); + } + + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + + if (String(res.data.status) === String("true")) { + //console.log(" In Add_Update_Employee_Contrat res.data.status = " + res.data.status); + //console.log(" In Add_Update_Employee_Contrat res.data.message r_class = " + res.data.message); + setAdd_Update_Employee_Contrat_api("true"); + setAdd_Update_Employee_Contrat_result(res.data.message); + Dialog_employe_contrat_handleClose_buton(); + Getall_Employee_Contrat(selected_id); + Get_Partner_Purchase_Prices(); + setselectionModel_contrat([]); + if (document.getElementById('myRef_contrat')) { + var divh = document.getElementById('myRef_contrat').offsetTop; + window.scrollTo({ + top: divh, + behavior: "smooth", + }); + } + + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + } + else { + setAdd_Update_Employee_Contrat_api("false"); + setAdd_Update_Employee_Contrat_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 :( Add_Update_Employee_Contrat = ', error); + setAdd_Update_Employee_Contrat_api("false"); + alert(" Impossible d'ajouter / mettre à jour le contrat"); + //setmyApimyApiMessage("") + }) + } + + const myRef_contrat = useRef(null) + const [type_contrat_qte, settype_contrat_qte] = useState(); + + + const [selected_row_data_json_age, setselected_row_data_json_age] = useState(""); + const [Dialog_employe_message, setDialog_employe_message] = React.useState(false); + const [Dialog_employe_open, setDialog_employe_open] = React.useState(false); + function Dialog_employe_handle_change_participant_session(message) { + setDialog_employe_message(message); + setDialog_employe_open(true); + } + + const Dialog_employe_handleClose = () => { + + }; + + const Dialog_employe_handleClose_buton = () => { + + setuserimgclassprofil(""); + setselected_row_data_json_age(""); + + setDialog_employe_open(false); + setgridline_id(""); + + }; + + function Show_Detailled_employe_Data() { + + setselected_row_data_json_age(""); + setDialog_employe_open(false); + handleClick_edit_employee_From_Line(gridline_id); + + Get_Employee_List_Suivi_Pedagogique(selected_id); + } + + + const [Create_Lms_Trainer_Account_api, setCreate_Lms_Trainer_Account_api] = useState(); + const [Create_Lms_Trainer_Account_message, setCreate_Lms_Trainer_Account_message] = useState(); + const [Create_Lms_Trainer_Account_result, setCreate_Lms_Trainer_Account_result] = useState(); + function Create_Lms_Trainer_Account() { + + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("rh_id", selected_id); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/HR_Create_LMS_Trainer_Account/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + if (String(res.data.status) === String("true")) { + //console.log(" In Create_Lms_Trainer_Account res.data.status = " + res.data.status); + //console.log(" In Create_Lms_Trainer_Account res.data.message r_class = " + res.data.message); + setCreate_Lms_Trainer_Account_api("true"); + setCreate_Lms_Trainer_Account_result(res.data.message); + + handleClick_edit_employee_From_Line(gridline_id); + + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + + } + else { + setCreate_Lms_Trainer_Account_api("false"); + setCreate_Lms_Trainer_Account_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 :( Create_Lms_Trainer_Account = ', error); + setCreate_Lms_Trainer_Account_api("false"); + alert(" Impossible de créer les acces LMS pour Enseignant"); + //setmyApimyApiMessage("") + }) + } + + + const [Locked_MySy_Trainer_Account_api, setLocked_MySy_Trainer_Account_api] = useState(); + const [Locked_MySy_Trainer_Account_message, setLocked_MySy_Trainer_Account_message] = useState(); + const [Locked_MySy_Trainer_Account_result, setLocked_MySy_Trainer_Account_result] = useState(); + function Locked_MySy_Trainer_Account() { + + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("rh_id", selected_id); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Lock_partner_account_From_Rh_Id/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + if (String(res.data.status) === String("true")) { + //console.log(" In Locked_MySy_Trainer_Account res.data.status = " + res.data.status); + //console.log(" In Locked_MySy_Trainer_Account res.data.message r_class = " + res.data.message); + setLocked_MySy_Trainer_Account_api("true"); + setLocked_MySy_Trainer_Account_result(res.data.message); + handleClick_edit_employee_From_Line(gridline_id); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + } + else { + setLocked_MySy_Trainer_Account_api("false"); + setLocked_MySy_Trainer_Account_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 :( Locked_MySy_Trainer_Account = ', error); + setLocked_MySy_Trainer_Account_api("false"); + alert(" Impossible de désactiver le compte utilisateur de l'employé"); + //setmyApimyApiMessage("") + }) + } + + const [UnLocked_MySy_Trainer_Account_api, setUnLocked_MySy_Trainer_Account_api] = useState(); + const [UnLocked_MySy_Trainer_Account_message, setUnLocked_MySy_Trainer_Account_message] = useState(); + const [UnLocked_MySy_Trainer_Account_result, setUnLocked_MySy_Trainer_Account_result] = useState(); + function UnLocked_MySy_Trainer_Account() { + + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("rh_id", selected_id); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Unlock_partner_account_From_Rh_Id/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + if (String(res.data.status) === String("true")) { + //console.log(" In UnLocked_MySy_Trainer_Account res.data.status = " + res.data.status); + //console.log(" In UnLocked_MySy_Trainer_Account res.data.message r_class = " + res.data.message); + setUnLocked_MySy_Trainer_Account_api("true"); + setUnLocked_MySy_Trainer_Account_result(res.data.message); + handleClick_edit_employee_From_Line(gridline_id); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + } + else { + setUnLocked_MySy_Trainer_Account_api("false"); + setUnLocked_MySy_Trainer_Account_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 :( UnLocked_MySy_Trainer_Account = ', error); + setUnLocked_MySy_Trainer_Account_api("false"); + alert(" Impossible de réactiver le compte utilisateur de l'employé"); + //setmyApimyApiMessage("") + }) + } + + + const [Disable_Lms_Trainer_Account_api, setDisable_Lms_Trainer_Account_api] = useState(); + const [Disable_Lms_Trainer_Account_message, setDisable_Lms_Trainer_Account_message] = useState(); + const [Disable_Lms_Trainer_Account_result, setDisable_Lms_Trainer_Account_result] = useState(); + function Disable_Lms_Trainer_Account() { + + var form = new FormData(); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("rh_id_to_disable", selected_id); + + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Disable_MySy_LMS_Account/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + if (String(res.data.status) === String("true")) { + + //console.log(" In Disable_Lms_Trainer_Account res.data.status = " + res.data.status); + //console.log(" In Disable_Lms_Trainer_Account res.data.message r_class = " + res.data.message); + setDisable_Lms_Trainer_Account_api("true"); + setDisable_Lms_Trainer_Account_result(res.data.message); + + handleClick_edit_employee_From_Line(gridline_id); + + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + } + else { + // 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 :( Disable_Lms_Trainer_Account = ', error); + setDisable_Lms_Trainer_Account_api("false"); + alert(" Impossible de créer les acces LMS pour Enseignant"); + //setmyApimyApiMessage("") + }) + } + + const New_Option_Filter = [ + { "id": "nom", "label": "Nom ", "value": "nom" }, + { "id": "email", "label": "Email ", "value": "email" }, + { "id": "formation", "label": "Lié a la Formation (code externe) ", "value": "formation" }, + { "id": "session", "label": "Lié a la Session (code session) ", "value": "session" }, + { "id": "", "label": "", "value": "" }, + { "id": "1", "label": "", "value": "1" }, // Cette ligne pour couvrir l'ajout d'une ligne de filter. C'est fait expres. + ] + + 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 [Dialog_1_open_competence, setDialog_1_open_competence] = React.useState(false); + const [Dialog_1_message_competence, setDialog_1_message_competence] = React.useState("Gestion compétences"); + + const Dialog_1_handleClose_buton_competence = () => { + + }; + + + + const Dialog_1_handle_OK_buton_competence = () => { + setDialog_1_open_competence(false); + }; + + const Dialog_1_handleCancel_buton_competence = () => { + setDialog_1_open_competence(false); + }; + + + const [detail_competence_code, setdetail_competence_code] = React.useState(""); + const [detail_competence_niveau, setdetail_competence_niveau] = React.useState(""); + const [selected_competence_id, setselected_competence_id] = React.useState(""); + + const [Add_Update_One_Competence_api, setAdd_Update_One_Competence_api] = useState(); + const [Add_Update_One_Competence_message, setAdd_Update_One_Competence_message] = useState(); + const [Add_Update_One_Competence_result, setAdd_Update_One_Competence_result] = useState(); + const Add_Update_One_Competence = event => { + + + if (String(selected_id).length < 2) { + alert(" Vous devez choisir un employé "); + return; + } + + + var form = new FormData(); + //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("rh_id", selected_id); + form.append("competence_id", selected_competence_id); + form.append("competence", detail_competence_code); + form.append("niveau", detail_competence_niveau); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Update_RH_Competence/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + //console.log(" In Add_Update_One_Competence res.data.status = " + res.data.status); + //console.log(" In Add_Update_One_Competence res.data.message r_class = " + res.data.message); + + setLoading(false); + if (String(res.data.status) === String("true")) { + setAdd_Update_One_Competence_api("true"); + setAdd_Update_One_Competence_result(res.data.message); + + setdetail_competence_code(""); + setdetail_competence_niveau(""); + setselected_competence_id(""); + + Get_Employee_Data(selected_id); + + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + setDialog_1_open_competence(false); + + } + else { + setAdd_Update_One_Competence_api("false"); + setAdd_Update_One_Competence_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('UpdateStagiaireData : Not good man :( Add_Update_One_Competence = ' + error); + setAdd_Update_One_Competence_api("false"); + alert(" Impossible de mettre à jour la compétence "); + + }) + } + + + + const [Delete_One_Competence_api, setDelete_One_Competence_api] = useState(); + const [Delete_One_Competence_message, setDelete_One_Competence_message] = useState(); + const [Delete_One_Competence_result, setDelete_One_Competence_result] = useState(); + function Delete_One_Competence() { + + var form = new FormData(); + //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("competence_id", selected_competence_id); + form.append("rh_id", selected_id); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Delete_RH_Competence/"; + + setLoading(true); + + axios.post(myurl, form).then(res => { + //console.log(" In Delete_One_Competence res.data.status = " + res.data.status); + //console.log(" In Delete_One_Competence res.data.message r_class = " + res.data.message); + + + setLoading(false); + if (String(res.data.status) === String("true")) { + setDelete_One_Competence_api("true"); + setDelete_One_Competence_result(res.data.message); + + setdetail_competence_code(""); + setdetail_competence_niveau(""); + setselected_competence_id(""); + + Get_Employee_Data(selected_id); + + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + setDialog_1_open_competence(false); + + } + else { + setDelete_One_Competence_api("false"); + setDelete_One_Competence_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('UpdateStagiaireData : Not good man :( Delete_One_Competence = ' + error); + setDelete_One_Competence_api("false"); + alert(" Impossible de supprimer la compétence "); + + }) + } + + const [Dialog_1_open_statistique, setDialog_1_open_statistique] = React.useState(false); + const [Dialog_1_message_statistique, setDialog_1_message_statistique] = React.useState("Gestion Statistique"); + + const Dialog_1_handleClose_buton_statistique = () => { + setDialog_1_open_statistique(false); + + }; + + const [selected_statistic_question_id, setselected_statistic_question_id] = useState(""); + const [selected_statistic_question_type, setselected_statistic_question_type] = useState(""); + + const [p_filter_date_from, setp_filter_date_from] = useState(date_today_minus_180j.toLocaleDateString('fr-FR')); + const [p_filter_date_to, setp_filter_date_to] = useState(date_today_30j.toLocaleDateString('fr-FR')); + + + const [Global_Getall_Qry_Survey_Data_result_JSON, setGlobal_Getall_Qry_Survey_Data_result_JSON] = useState([]); + + const [Getall_Qry_Survey_Data_result_JSON, setGetall_Qry_Survey_Data_result_JSON] = useState([]); + const [Getall_Qry_Survey_Data_api, setGetall_Qry_Survey_Data_api] = useState(); + const [Getall_Qry_Survey_Data_message, setGetall_Qry_Survey_Data_message] = useState(); + const [Getall_Qry_Survey_Data_result, setGetall_Qry_Survey_Data_result] = useState([]); + function Getall_Qry_Survey_Data(event) { + + var form = new FormData(); + const stored_cookie = getCookie('tokenmysypart'); + + var date_from = ""; + if (p_filter_date_from) { + date_from = p_filter_date_from; + + } + + var date_to = ""; + if (p_filter_date_to) { + date_to = p_filter_date_to; + + } + + + form.append("token", stored_cookie); + form.append("periode_start_date", date_from); + form.append("periode_end_date", date_to); + form.append("related_collection", "ressource_humaine"); + form.append("related_collection_id", selected_id); + form.append("question_id", selected_statistic_question_id); + form.append("class_id", ""); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Survey_Stat_Data_For_Given_related_collection_id/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + if (String(res.data.status) === String("true")) { + //console.log(" In Getall_Qry_Survey_Data res.data.status = " + res.data.status); + console.log(" In Getall_Qry_Survey_Data res.data.message r_class = " + res.data.message); + + var json_data = JSON.parse(res.data.message[0]); + + //console.log(" ### json_data = ", json_data); + var jsonObj0 = json_data.data + + //console.log(" ### jsonObj0 = ", jsonObj0); + + var new_data2 = []; + const new_data = jsonObj0.map((x) => { + var month_year = (x).month_year; + var type_question = (x).type_question; + var label = (x).label; + var value = parseFloat((x).value); + var count = (x).count; + var nb_question_response = parseFloat((x).nb_question_response); + var somme_question_response = parseFloat((x).somme_question_response); + var moyenne_question_response = parseFloat((x).moyenne_question_response); + + + //--- + var node = { + "month_year": month_year, + "label": label, + "type_question": type_question, + "value": parseFloat(String(value)), + "count": count, + "nb_question_response": parseInt(String(nb_question_response)), + "somme_question_response": parseFloat(String(somme_question_response)), + "moyenne_question_response": parseFloat(String(moyenne_question_response)), + + }; + new_data2.push(node); + }); + + setGetall_Qry_Survey_Data_result_JSON(new_data2); + //setGetall_Qry_Survey_Data_result_JSON(JSON.parse('[' + res.data.message + ']')); + + //console.log(" ### new_data2 011 = ", new_data2); + + + var jsonObj0_global = json_data.global + //console.log(" ### jsonObj0_global= ", jsonObj0_global); + setGlobal_Getall_Qry_Survey_Data_result_JSON(jsonObj0_global); + + + + setGetall_Qry_Survey_Data_api("true"); + setGetall_Qry_Survey_Data_result(res.data.message); + + + } + else { + setGetall_Qry_Survey_Data_api("false"); + setGetall_Qry_Survey_Data_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_Qry_Survey_Data = ', error); + setGetall_Qry_Survey_Data_api("false"); + alert("Impossible de récuperer les données demandées") + //setmyApimyApiMessage("") + }) + } + + + + const otherSetting = { + height: 300, + yAxis: [{ label: '' }], + grid: { horizontal: true }, + sx: { + [`& .${axisClasses.left} .${axisClasses.label}`]: { + transform: 'translateX(-10px)', + }, + }, + }; + + const valueFormatter = (value) => `${value}`; + + const [display_view, setdisplay_view] = useState("bars"); + function func_display_line_view() { + setdisplay_view("line"); + } + + function func_display_bars_view() { + setdisplay_view("bars"); + } + + + + function Export_Statistic_to_Excel(local_dashbord_internal_id) { + + const stored_cookie = getCookie('tokenmysypart'); + + var date_from = ""; + if (p_filter_date_from) { + date_from = p_filter_date_from; + date_from = date_from.replaceAll('/', "-") + + } + + var date_to = ""; + if (p_filter_date_to) { + date_to = p_filter_date_to; + date_to = date_to.replaceAll('/', "-") + } + + + + //console.log(" #### question_id = ", selected_statistic_question_id, " ### related_collection_id = ", selected_id) + var nom_fichier_cmd_excel = "export_excel.xlsx"; + //console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- local_dashbord_internal_id = ", local_dashbord_internal_id); + + var local_class_id = "-"; + var local_related_collection = "ressource_humaine"; + var url = process.env.REACT_APP_API_URL + "myclass/api/Export_Excel_Survey_Stat_Data_For_Given_related_collection_id/" + stored_cookie + "/" + local_related_collection + "/" + selected_id + "/" + date_from + "/" + date_to + "/" + selected_statistic_question_id + "/" + local_class_id + "/"; + + //console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- selected_id = ", selected_id, " --- url =", url); + + //console.log(" #### url = ", url) + + setLoading(true); + axios.get(url, { responseType: 'blob', },) + .then((res) => { + setLoading(false); + //console.log(" In Export_Dashbord_to_CSV res.data = " + res.data); + if (String(res.data) === String("false")) { + alert("Impossible d'exporter les données (2) "); + } else { + fileDownload(res.data, nom_fichier_cmd_excel) + + } + }).catch((error) => { + setLoading(false); + console.error('Error:', error); + alert(" Impossible d'exporter les données ") + + }); + + } + + /**** Suivi pedago */ + + const [Get_Employee_List_Suivi_Pedagogique_api, setGet_Employee_List_Suivi_Pedagogique_api] = useState(); + const [Get_Employee_List_Suivi_Pedagogique_message, setGet_Employee_List_Suivi_Pedagogique_message] = useState(); + const [Get_Employee_List_Suivi_Pedagogique_result, setGet_Employee_List_Suivi_Pedagogique_result] = useState([]); + function Get_Employee_List_Suivi_Pedagogique(local_selecte_employee_id) { + + var form = new FormData(); + const stored_cookie = getCookie('tokenmysypart'); + + form.append("token", stored_cookie); + form.append("employee_id", local_selecte_employee_id); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Employee_Suivi_Pedagogique_No_Filter/"; + + axios.post(myurl, form).then(res => { + //console.log(" In Get_Employee_List_Suivi_Pedagogique res.data.status = " + res.data.status); + //console.log(" In Get_Employee_List_Suivi_Pedagogique res.data.message r_class = " + res.data.message); + + if (String(res.data.status) === String("true")) { + setGet_Employee_List_Suivi_Pedagogique_api("true"); + setGet_Employee_List_Suivi_Pedagogique_result(res.data.message); + } + else if (String(res.data.status) === String("Err_Connexion")) { + alert('Erreur: ' + res.data.message); + history.push("/Connexion"); + } + else { + setGet_Employee_List_Suivi_Pedagogique_api("false"); + setGet_Employee_List_Suivi_Pedagogique_message(res.data.message); + alert('Erreur: ' + res.data.message); + } + + }).catch((error) => { + console.warn('Not good man :( Get_Employee_List_Suivi_Pedagogique = ', error); + setGet_Employee_List_Suivi_Pedagogique_api("false"); + alert('Erreur: Impossible de recuperer le suivi pédagogique'); + }) + } + + + const [p_detail_suivi_ped_comment, setp_detail_suivi_ped_comment] = React.useState(""); + const [p_detail_suivi_ped_observation, setp_detail_suivi_ped_observation] = React.useState(""); + const [p_detail_suivi_ped_responsable_id, setp_detail_suivi_ped_responsable_id] = React.useState(""); + const [p_detail_suivi_ped_class_id, setp_detail_suivi_ped_class_id] = React.useState(""); + const [p_detail_suivi_ped_class_internal_url, setp_detail_suivi_ped_class_internal_url] = React.useState(""); + const [p_detail_suivi_ped_class_eu_id, setp_detail_suivi_ped_class_eu_id] = React.useState(""); + const [p_detail_suivi_ped_session_id, setp_detail_suivi_ped_session_id] = React.useState(""); + const [p_detail_suivi_ped_eval_date_heure_debut, setp_detail_suivi_ped_eval_date_heure_debut] = useState(format(new Date(), 'dd/MM/yyyy HH:mm')); + const [p_detail_suivi_ped_eval_date_heure_fin, setp_detail_suivi_ped_eval_date_heure_fin] = useState(format(new Date(), 'dd/MM/yyyy HH:mm')); + const [selected_suivi_pedagogique_id, setselected_suivi_pedagogique_id] = useState(""); + + const [p_detail_suivi_ped_sujet, setp_detail_suivi_ped_sujet] = useState(""); + + + function Clear_Suivi_Pedago_Field() { + setp_detail_suivi_ped_comment(""); + setp_detail_suivi_ped_observation(""); + setp_detail_suivi_ped_responsable_id(""); + setp_detail_suivi_ped_class_id(""); + setp_detail_suivi_ped_class_eu_id(""); + setp_detail_suivi_ped_session_id(""); + + setp_detail_suivi_ped_eval_date_heure_debut(format(new Date(), 'dd/MM/yyyy HH:mm')); + setp_detail_suivi_ped_eval_date_heure_fin(format(new Date(), 'dd/MM/yyyy HH:mm')); + setselected_suivi_pedagogique_id(""); + setp_detail_suivi_ped_sujet(""); + } + + + const [Add_Update_Suiv_Pedagogique_api, setAdd_Update_Suiv_Pedagogique_api] = useState(); + const [Add_Update_Suiv_Pedagogique_message, setAdd_Update_Suiv_Pedagogique_message] = useState(); + const [Add_Update_Suiv_Pedagogique_result, setAdd_Update_Suiv_Pedagogique_result] = useState(); + function Add_Update_Suiv_Pedagogique() { + var form = new FormData(); + //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + + + form.append("employee_id", selected_id); + form.append("responsable_id", p_detail_suivi_ped_responsable_id); + form.append("date_heure_debut", p_detail_suivi_ped_eval_date_heure_debut); + form.append("date_heure_fin", p_detail_suivi_ped_eval_date_heure_fin); + form.append("apprenant_id", ""); + + var observation = ""; + if (editorRef_observation.current) { + observation = editorRef_observation.current.getContent(); + } + + form.append("observation", observation); + + var commentaire = ""; + if (editorRef_comment.current) { + commentaire = editorRef_comment.current.getContent(); + } + form.append("commentaire", commentaire); + + + form.append("sujet", p_detail_suivi_ped_sujet); + + + + var myurl = ""; + + if (selected_suivi_pedagogique_id && String(selected_suivi_pedagogique_id).length > 5) { + form.append("_id", selected_suivi_pedagogique_id); + myurl = process.env.REACT_APP_API_URL + "myclass/api/Update_Suivi_Pedagogique/"; + } else { + myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Suivi_Pedagogique/"; + } + + + //console.log(" ### form = ", form); + + + setLoading(true); + axios.post(myurl, form).then(res => { + //console.log(" In Add_Update_Suiv_Pedagogique res.data.status = " + res.data.status); + //console.log(" In Add_Update_Suiv_Pedagogique res.data.message r_class = " + res.data.message); + + setLoading(false); + + if (String(res.data.status) === String("true")) { + setAdd_Update_Suiv_Pedagogique_api("true"); + setAdd_Update_Suiv_Pedagogique_result(res.data.message); + + Dialog_Suivi_Pedago_handleClose_buton(); + + + + setgiven_suivi_ped_changed(""); + setgiven_suivi_ped_data_edit_mode(""); + setadd_one_suivi_ped(""); + if (!selected_suivi_pedagogique_id || String(selected_suivi_pedagogique_id).length < 5) { + setsuivi_pedago_gridline_id(""); + Clear_Suivi_Pedago_Field(); + } else { + Get_Geven_Suivi_Ped_Data(selected_suivi_pedagogique_id); + setdisplay_given_suivi_ped("1"); + setadd_one_suivi_ped(""); + setgiven_suivi_ped_data_edit_mode(""); + setselected_suivi_pedagogique_id(selected_suivi_pedagogique_id); + } + + + Get_Employee_List_Suivi_Pedagogique(selected_id); + + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + + if (document.getElementById('myRef_detail_suivi_ped')) { + // myRef.current.scrollIntoView({ behavior: "smooth" }); + var divh = document.getElementById('myRef_detail_suivi_ped').offsetTop; + window.scrollTo({ + top: divh, + behavior: "smooth", + }); + } + + } + else { + setAdd_Update_Suiv_Pedagogique_api("false"); + setAdd_Update_Suiv_Pedagogique_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 :( Add_Update_Suiv_Pedagogique = ' + error); + setAdd_Update_Suiv_Pedagogique_api("false"); + alert(" Impossible d'ajouter ou mettre à jour le suivi pédagogique"); + + }) + } + + + + const [Get_Geven_Suivi_Ped_Data_api, setGet_Geven_Suivi_Ped_Data_api] = useState(); + const [Get_Geven_Suivi_Ped_Data_message, setGet_Geven_Suivi_Ped_Data_message] = useState(); + const [Get_Geven_Suivi_Ped_Data_result, setGet_Geven_Suivi_Ped_Data_result] = useState(); + function Get_Geven_Suivi_Ped_Data(local_selected_suivi_pedagogique_id) { + + var my_id = local_selected_suivi_pedagogique_id; + + Clear_Suivi_Pedago_Field(); + + var form = new FormData(); + //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("_id", my_id); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Given_Suivi_Pedagogique/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + + if (String(res.data.status) === "true") { + //console.log(" In Get_Geven_Suivi_Ped_Data res.data.status = " + res.data.status); + //console.log(" In Get_Geven_Suivi_Ped_Data res.data.message r_class = " + res.data.message); + //console.log(" In Get_Geven_Suivi_Ped_Data res.data.message len = " + String(res.data.message).length); + + setLoading(false); + setGet_Geven_Suivi_Ped_Data_api("true"); + if (String(res.data.message).length > 0) { + setGet_Geven_Suivi_Ped_Data_result(res.data.message); + + var mylocaltraining = JSON.parse(res.data.message); + + + if (mylocaltraining.responsable_id) { + setp_detail_suivi_ped_responsable_id(mylocaltraining.responsable_id); + } else { + setp_detail_suivi_ped_responsable_id(""); + } + + if (mylocaltraining.class_id) { + setp_detail_suivi_ped_class_id(mylocaltraining.class_id); + } else { + setp_detail_suivi_ped_class_id(""); + } + + + if (mylocaltraining.class_eu_id) { + setp_detail_suivi_ped_class_eu_id(mylocaltraining.class_eu_id); + } else { + setp_detail_suivi_ped_class_eu_id(""); + } + + if (mylocaltraining.session_id) { + setp_detail_suivi_ped_session_id(mylocaltraining.session_id); + } else { + setp_detail_suivi_ped_session_id(""); + } + + + if (mylocaltraining.date_heure_debut) { + setp_detail_suivi_ped_eval_date_heure_debut(mylocaltraining.date_heure_debut); + } else { + setp_detail_suivi_ped_eval_date_heure_debut(""); + } + + if (mylocaltraining.date_heure_fin) { + setp_detail_suivi_ped_eval_date_heure_fin(mylocaltraining.date_heure_fin); + } else { + setp_detail_suivi_ped_eval_date_heure_fin(""); + } + + if (mylocaltraining.observation) { + setfield_contenu_observation(mylocaltraining.observation); + } else { + setfield_contenu_observation(""); + } + + + if (mylocaltraining.commentaire) { + setfield_contenu_comment(mylocaltraining.commentaire); + } else { + setfield_contenu_comment(""); + } + + + + if (mylocaltraining.class_internal_url) { + setp_detail_suivi_ped_class_internal_url(mylocaltraining.class_internal_url); + } else { + setp_detail_suivi_ped_class_internal_url(""); + } + + if (mylocaltraining.sujet) { + setp_detail_suivi_ped_sujet(mylocaltraining.sujet); + } else { + setp_detail_suivi_ped_sujet(""); + } + + + if (document.getElementById('myRef_detail_suivi_ped')) { + // myRef.current.scrollIntoView({ behavior: "smooth" }); + var divh = document.getElementById('myRef_detail_suivi_ped').offsetTop; + window.scrollTo({ + top: divh, + behavior: "smooth", + }); + } + + Disable_Suivi_Pedago_Fields(); + + } + + } else if (String(res.data.status) === String("Err_Connexion")) { + setLoading(false); + alert('Erreur: ' + res.data.message); + history.push("/Connexion"); + } + + else { + setLoading(false); + setGet_Geven_Suivi_Ped_Data_api("false"); + setGet_Geven_Suivi_Ped_Data_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 :( Get_Geven_Suivi_Ped_Data = ', error); + setGet_Geven_Suivi_Ped_Data_api("false"); + alert(" Impossible de récuperer les données de l'apprenant "); + + }) + } + + + const [selectionModel_suivi_pedagogique, setselectionModel_suivi_pedagogique] = React.useState([]); + + + const [display_given_suivi_ped, setdisplay_given_suivi_ped] = useState(""); + const [given_suivi_ped_changed, setgiven_suivi_ped_changed] = useState(""); + const [given_suivi_ped_data_edit_mode, setgiven_suivi_ped_data_edit_mode] = useState(""); + const [add_one_suivi_ped, setadd_one_suivi_ped] = useState(""); + + + function Disable_Suivi_Pedago_Fields() { + + setgiven_suivi_ped_data_edit_mode(""); + const list_fields = ['suivi_pedago_detail_debut', 'suivi_pedago_detail_fin', 'suivi_pedago_responsable', + 'suivi_pedago_observation', 'suivi_pedago_comment', 'suivi_pedago_detail_sujet'] + + for (let i = 0; i < list_fields.length; i++) { + if (document.getElementsByName(String(list_fields[i])) && document.getElementsByName(String(list_fields[i]))[0]) { + document.getElementsByName(String(list_fields[i]))[0].disabled = true; + document.getElementsByName(String(list_fields[i]))[0].style.backgroundColor = "#ECEFF1"; + + } + } + + } + + function Enable_Suivi_Pedago_Fields() { + setgiven_suivi_ped_data_edit_mode("1"); + + + const list_fields = ['suivi_pedago_detail_debut', 'suivi_pedago_detail_fin', 'suivi_pedago_responsable', + 'suivi_pedago_observation', 'suivi_pedago_comment', 'suivi_pedago_detail_sujet'] + + for (let i = 0; i < list_fields.length; i++) { + if (document.getElementsByName(String(list_fields[i])) && document.getElementsByName(String(list_fields[i]))[0]) { + document.getElementsByName(String(list_fields[i]))[0].disabled = false; + document.getElementsByName(String(list_fields[i]))[0].style.backgroundColor = "#FFFFFF"; + + } + } + } + + + const [field_contenu_observation, setfield_contenu_observation] = useState(""); + const editorRef_observation = useRef(null); + const [editorRef_observation_limite, seteditorRef_observation_limite] = useState(800); + + function field_contenu_observation_keyup() { + setgiven_suivi_ped_changed("1"); + } + + const [field_contenu_comment, setfield_contenu_comment] = useState(""); + const editorRef_comment = useRef(null); + const [editorRef_comment_limite, seteditorRef_comment_limite] = useState(800); + + function field_contenu_comment_keyup() { + setgiven_suivi_ped_changed("1"); + } + + function cancel_edit_suivi_ped() { + setgiven_suivi_ped_data_edit_mode(""); + setgiven_suivi_ped_changed(""); + Get_Geven_Suivi_Ped_Data(selected_suivi_pedagogique_id); + + } + + + const columns_suivi_pedagogique = [ + { field: 'id', headerName: 'id', hide: true }, + { field: '_id', headerName: '_id', hide: true }, + { field: 'employee_id', headerName: 'employee_id', hide: true, Width: 1 }, + + { field: 'responsable_id', headerName: 'responsable_id', hide: true, Width: 1 }, + { field: 'sujet', headerName: 'Sujet', hide: false, minWidth: 200, flex: 1, renderCell: (params) => , }, + + { field: 'date_debut', headerName: 'Début', hide: false, minWidth: 200, flex: 1, renderCell: (params) => , }, + { field: 'date_fin', headerName: 'Fin', hide: false, minWidth: 200, flex: 1, renderCell: (params) => , }, + + { + field: 'responsable', headerName: 'responsable', hide: false, minWidth: 200, flex: 1, + + + renderCell: (cellValues) => { + return ( +
    + {New_Getall_Training_Employee_No_Filter_result && New_Getall_Training_Employee_No_Filter_result.length > 0 && } +
    + + ); + } + + + }, + + + { + field: "delete", headerName: 'Supprimer', + renderCell: (cellValues) => { + return ( + + + + + } + modal + nested + position="center center" + > + {close => ( +
    + +
    MySy Information
    +
    + {' '} + + En confirmant cette opération, le suivi pédagogique sera définitivement supprimé.
    + +
    +
    +
    + + +
    +
    + +
    +
    +
    + )} +
    + + + ); + } + }, + + + ] + + + function handleClick_delete_suivi_pedago(event, cellValues) { + + setsuivi_pedago_gridline_id(''); + setdisplay_given_suivi_ped(''); + setgiven_suivi_ped_changed(''); + setgiven_suivi_ped_data_edit_mode(''); + setadd_one_suivi_ped(""); + + var local_apprenant_id = cellValues.row._id; + + Delete_Suivi_Pedago_Data(local_apprenant_id); + } + + + const [Delete_Suivi_Pedago_Data_api, setDelete_Suivi_Pedago_Data_api] = useState(); + const [Delete_Suivi_Pedago_Data_message, setDelete_Suivi_Pedago_Data_message] = useState(); + const [Delete_Suivi_Pedago_Data_result, setDelete_Suivi_Pedago_Data_result] = useState(); + function Delete_Suivi_Pedago_Data(suivi_pedago_id) { + + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("_id", suivi_pedago_id); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Delete_Suivi_Pedagogique/"; + + setLoading(true); + + axios.post(myurl, form).then(res => { + //console.log(" In Delete_Suivi_Pedago_Data res.data.status = " + res.data.status); + //console.log(" In Delete_Suivi_Pedago_Data res.data.message r_class = " + res.data.message); + setLoading(false); + if (String(res.data.status) === String("true")) { + setDelete_Suivi_Pedago_Data_api("true"); + setDelete_Suivi_Pedago_Data_result(res.data.message); + + setselectionModel_suivi_pedagogique([]); + + setsuivi_pedago_gridline_id(''); + setdisplay_given_suivi_ped(''); + setgiven_suivi_ped_changed(''); + setgiven_suivi_ped_data_edit_mode(''); + setadd_one_suivi_ped(""); + + Get_Employee_List_Suivi_Pedagogique(selected_id); + + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + } + else { + setDelete_Suivi_Pedago_Data_api("false"); + setDelete_Suivi_Pedago_Data_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('Delete_Suivi_Pedago_Data : Not good man :( Delete_Suivi_Pedago_Data = ' + error); + setDelete_Suivi_Pedago_Data_api("false"); + alert(" Impossible de supprimer le suivi pédagogique "); + }) + } + + + const Dialog_Suivi_Pedago_handleClose = () => { + + }; + + const Dialog_Suivi_Pedago_handleClose_buton = () => { + setDialog_Suivi_Pedago_open(false); + }; + + + function add_suivi_ped_funct() { + Clear_Suivi_Pedago_Field(); + + setdisplay_given_suivi_ped(""); + setgiven_suivi_ped_changed(""); + setadd_one_suivi_ped("1"); + + if (document.getElementById('myRef_detail_suivi_ped')) { + // myRef.current.scrollIntoView({ behavior: "smooth" }); + var divh = document.getElementById('myRef_detail_suivi_ped').offsetTop; + window.scrollTo({ + top: divh, + behavior: "smooth", + }); + } + + } + + function Annule_Add_One_Suiv_Pedagogique() { + Clear_Suivi_Pedago_Field(); + setdisplay_given_suivi_ped(""); + setgiven_suivi_ped_changed(""); + setadd_one_suivi_ped(""); + } + + + const [suivi_pedago_gridline_id, setsuivi_pedago_gridline_id] = useState(""); + const myRef_detail_suivi_ped = useRef(null); + + const [Dialog_Suivi_Pedago_message, setDialog_Suivi_Pedago_message] = React.useState(false); + const [Dialog_Suivi_Pedago_open, setDialog_Suivi_Pedago_open] = React.useState(false); + + + /***** end suivi pedago */ + + const [New_Get_Partner_List_EMPLOYEE_CONTRACT_Document_result, setNew_Get_Partner_List_EMPLOYEE_CONTRACT_Document_result] = useState([]); + + const [Get_Partner_List_EMPLOYEE_CONTRACT_Document_api, setGet_Partner_List_EMPLOYEE_CONTRACT_Document_api] = useState(); + const [Get_Partner_List_EMPLOYEE_CONTRACT_Document_message, setGet_Partner_List_EMPLOYEE_CONTRACT_Document_message] = useState(); + const [Get_Partner_List_EMPLOYEE_CONTRACT_Document_result, setGet_Partner_List_EMPLOYEE_CONTRACT_Document_result] = useState(); + function Get_Partner_List_EMPLOYEE_CONTRACT_Document() { + + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("ref_interne", "EMPLOYEE_CONTRACT"); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Partner_Document_with_filter/"; + setLoading(true); + + + axios.post(myurl, form).then(res => { + //console.log(" In Get_Partner_List_EMPLOYEE_CONTRACT_Document res.data.status = " + res.data.status); + //console.log(" In Get_Partner_List_EMPLOYEE_CONTRACT_Document res.data.message r_class = " + res.data.message); + setLoading(false); + if (String(res.data.status) === String("true")) { + + + setGet_Partner_List_EMPLOYEE_CONTRACT_Document_api("true"); + setGet_Partner_List_EMPLOYEE_CONTRACT_Document_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_ref_interne = JSON.parse(x).ref_interne; + var local_nom = JSON.parse(x).nom; + var local_sujet = JSON.parse(x).sujet; + var local_type_doc = JSON.parse(x).type_doc; + var local_cible = JSON.parse(x).cible; + var local_joint_pdf = JSON.parse(x).joint_pdf; + var local_contenu_doc = JSON.parse(x).contenu_doc; + + + + //--- + var node = { + "_id": local_id, + "id": localid, + "label": local_nom, + "ref_interne": local_ref_interne, + "nom": local_nom, + "sujet": local_sujet, + "type_doc": local_type_doc, + "cible": local_cible, + "joint_pdf": local_joint_pdf, + "contenu_doc": local_contenu_doc, + + }; + new_data2.push(node); + + // console.log(" ## node = ", node) + }); + + if (new_data2.length > 0) + setNew_Get_Partner_List_EMPLOYEE_CONTRACT_Document_result(new_data2); + + } + else { + setGet_Partner_List_EMPLOYEE_CONTRACT_Document_api("false"); + setGet_Partner_List_EMPLOYEE_CONTRACT_Document_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 :( Get_Partner_List_EMPLOYEE_CONTRACT_Document = ', error); + setGet_Partner_List_EMPLOYEE_CONTRACT_Document_api("false"); + alert("Impossible de récupérer les modèles de document "); + //setmyApimyApiMessage("") + }) + } + + const [Dialog_print_contrat_message, setDialog_print_contrat_message] = React.useState(false); + const [Dialog_print_contrat_open, setDialog_print_contrat_open] = React.useState(false); + + const Dialog_print_contrat_handleClose = () => { + + }; + + const Dialog_print_contrat_handleClose_buton = () => { + setDialog_print_contrat_open(false); + + }; + + const [EMPLOYEE_CONTRACT_modele_id, setEMPLOYEE_CONTRACT_modele_id] = React.useState(""); + + const [display_alert_mysy, setdisplay_alert_mysy] = useState(""); + const [alert_message, setalert_message] = useState(""); + const [alert_type, setalert_type] = useState(""); + + function clear_alert_message() { + setalert_message(""); + } + function clear_alert_type() { + setalert_type(""); + } + + function clear_display_alert_mysy() { + setdisplay_alert_mysy(""); + } + + + const [selectionModel_evaluation, setSelectionModel_evaluation] = React.useState([]); + const New_Option_Evaluation_Masse = [ + { "id": "export_evaluation", "label": "Export Evaluation (PDF) ", "value": "export_evaluation" }, + ] + const [actionmass_eval_val, setactionmass_eval_val] = useState(); + + async function actionmass_Evaluation_Traitemet() { + + var tab_ids_inscription = []; + for (var i = 0; i < selectionModel_evaluation_formateur.length; i++) { + var myid = parseInt(String(selectionModel_evaluation_formateur[i])); + + var line_id = JSON.parse(rowss_evaluation_formateur[myid])._id; + + tab_ids_inscription.push(line_id); + } + + if (String(actionmass_eval_val) === "export_evaluation") + Export_Selected_Survey_PDF(tab_ids_inscription, "Evaluation formateur", "chaud"); + + } + + function Export_Selected_Survey_PDF(tab_ids_survey, type_export, used_datagrid) { + const stored_cookie = getCookie('tokenmysypart'); + + if (tab_ids_survey.length <= 0) { + // alert(" Aucune ligne selectionnée "); + + setdisplay_alert_mysy("1"); + setalert_message("Aucune ligne selectionnée "); + setalert_type("error"); + return; + } + var nom_fichier_cmd = "export_evaluation.zip"; + + var url = process.env.REACT_APP_API_URL + "myclass/api/Export_To_Excel_Survey_with_filter_Tab_Survey_Id/" + stored_cookie + "/" + tab_ids_survey.toString() + "/" + String(type_export); + + + setLoading(true); + axios.get(url, { responseType: 'blob', },) + .then((res) => { + setLoading(false); + //console.log(" In Export_Dashbord_to_CSV res.data = " + res.data); + if (String(res.data) === String("false")) { + alert("Impossible d'exporter les réponses (2) "); + } else { + fileDownload(res.data, nom_fichier_cmd); + + if (used_datagrid === "chaud") { + setselectionModel_evaluation_formateur([]); + setactionmass_eval_val(""); + } + + } + }).catch((error) => { + setLoading(false); + console.error('Error:', error); + alert(" Impossible d'exporter les réponses ") + + }); + + + setLoading(false); + } + + const fixedVal_scope_session = []; + const [scope_session, setscope_session] = useState([...fixedVal_scope_session]); + + + const fixedVal_scope_class = []; + const [scope_class, setscope_class] = useState([...fixedVal_scope_class]); + const CustomChip = (chipVal, getTagProps) => { + return chipVal.map((item, index) => ( + + )); + }; + + + const [scope_changed, setscope_changed] = React.useState(""); + + return ( +
    + + {isLoading &&
    +
    +
    } + + {/*** Affichage des messages d'alerte*/} + {display_alert_mysy && String(display_alert_mysy) === "1" && + + } + {/*** FIN Affichage des messages d'alerte*/} + + + {/*** GESTION STATISTIQUE */} + 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" + > + + MySy Information + + + +
    Choisir une question + + {New_Getall_Employee_Statistic_Question_List_result && New_Getall_Employee_Statistic_Question_List_result.length > 0 && + + (data)._id === String(selected_statistic_question_id))[0].label} + + onChange={(event, value) => { + + if (value && value._id) { + setselected_statistic_question_id(value.question_id); + } else { + setselected_statistic_question_id(""); + } + }} + + renderInput={(params) => + } + />} + + + {selected_statistic_question_id && String(selected_statistic_question_id) !== "d" &&
    +
    + Date Debut + { + setp_filter_date_from(format(date, 'dd/MM/yyyy')); + + } + } + showTimeSelect={false} + dateFormat="dd/MM/yyyy" + className="disabled_style session_caract_Dialog_DatePicker" + locale='fr-FR' + + /> + +
    + +
    + Date Fin + { + setp_filter_date_to(format(date, 'dd/MM/yyyy')); + + } + } + showTimeSelect={false} + dateFormat="dd/MM/yyyy" + className="disabled_style session_caract_Dialog_DatePicker" + /> + +
    + +
    + + +
    } + + +
    + +
    + + +   + +
    + + {Getall_Qry_Survey_Data_result_JSON && Getall_Qry_Survey_Data_result_JSON.length > 0 && + Getall_Qry_Survey_Data_result_JSON && + + context.location === 'tick' + ? `${month.slice(0, 2)}` + "\n" + `${month.slice(3, 7)}` + : `${month}`, + }]} + series={[ + { dataKey: 'nb_question_response', label: 'NB', valueFormatter }, + { dataKey: 'somme_question_response', label: 'Somme', color: '#FA7070', valueFormatter }, + { dataKey: 'moyenne_question_response', label: 'Moyenne', color: '#FA7070', valueFormatter }, + + + ]} + {...otherSetting} + margin={{ right: 15, left: 100 }} + + />} +
    + +
    + +
    +
    + +
    + + +   + +
    + + {Getall_Qry_Survey_Data_result_JSON && Getall_Qry_Survey_Data_result_JSON.length > 0 && + Getall_Qry_Survey_Data_result_JSON && + + + + context.location === 'tick' + ? `${month.slice(0, 2)}` + " \n" + `${month.slice(3, 7)}` + : `${month}`, + }]} + series={[ + { dataKey: 'nb_question_response', label: 'NB', valueFormatter: (value) => (value == null ? 'NaN' : value.toString()), }, + { dataKey: 'somme_question_response', label: 'Somme', color: '#FA7070', valueFormatter: (value) => (value == null ? 'NaN' : value.toString()), }, + { dataKey: 'moyenne_question_response', label: 'Moyenne', color: '#FA7070', valueFormatter: (value) => (value == null ? 'NaN' : value.toString()), }, + ]} + + margin={{ right: 15, left: 100 }} + /> + + + + } +
    + +
    + +
    +
    + +
    + + + + + + + +
    + {String(selected_statistic_question_id) !== "" &&
    } + +
    + +
    +
    + +
    + + +
    + + {/*** FIN GESTION STATISTIQUE */} + + + + {/*** GESTION CONTRAT IMPRESSION */} + 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" + > + + MySy Information + + + + Impression contrat employé + + + +
    Type contrat
    + + { + if (value && value._id) { + setEMPLOYEE_CONTRACT_modele_id(value._id); + + } else { + setEMPLOYEE_CONTRACT_modele_id(""); + } + }} + renderInput={(params) => + } + /> + + + +
    + +
    + + + + + + +
    +
    + {EMPLOYEE_CONTRACT_modele_id && String(EMPLOYEE_CONTRACT_modele_id).length > 5 && + } +
    + +
    + +
    +
    +
    + + +
    + {/*** FIN GESTION CONTRAT IMPRESSION */} + + + + {/*** GESTION COMPETENCES */} + 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" + > + + MySy Information + + + +
    Compétence + + {New_Getall_Partner_Competence_List_result && New_Getall_Partner_Competence_List_result.length > 0 && + + (data).description === String(detail_competence_code))[0].description} + + onChange={(event, value) => { + if (value && value.description) { + setdetail_competence_code(value.description); + } else { + setdetail_competence_code(""); + } + }} + + renderInput={(params) => + } + />} + + +
    + +
    Niveau Compétence + + {New_Get_List_Competence_Type_result && New_Get_List_Competence_Type_result.length > 0 && + + (data).code === String(detail_competence_niveau))[0].code} + + onChange={(event, value) => { + if (value && value._id) { + setdetail_competence_niveau(value.code); + } else { + setdetail_competence_niveau(""); + } + }} + + renderInput={(params) => + } + />} + + +
    + +
    + + + + + + +
    + {String(selected_competence_id) === "" &&
    } + {String(selected_competence_id) !== "" &&
    } + +
    + +
    +
    + +
    + + {String(selected_competence_id) !== "" && + +
    + +
    + +
    } +
    + + {/*** FIN GESTION COMPETENCES */} + + + {/*** GESTION EMPLOYE */} + 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" + > + + Ressouce Humaine + +
    + +
    +
    +
    + +
    + +
    + + +
    +
    +
    + Civilité +
    + {String(gridline_id) !== "" && Getall_Training_Employee_No_Filter_result && selected_id && + String(selected_id).length > 0 &&
    + {String(JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).civilite).length <= 0 && JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).civilite} + {String(JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).civilite).length > 0 && String(JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).civilite)[0].toUpperCase() + String(JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).civilite).slice(1)} +
    } +
    + +
    +
    + Nom & Prénom +
    + {String(gridline_id) !== "" && Getall_Training_Employee_No_Filter_result && selected_id && + String(selected_id).length > 0 &&
    + + {JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).nom.toUpperCase()} {JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).prenom.charAt(0).toUpperCase() + JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).prenom.slice(1)} + + +
    } +
    + +
    +
    + E-mail +
    + {String(gridline_id) !== "" && Getall_Training_Employee_No_Filter_result && selected_id && + String(selected_id).length > 0 &&
    + {JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).email} +
    } +
    + + +
    +
    + Téléphone +
    + {String(gridline_id) !== "" && Getall_Training_Employee_No_Filter_result && selected_id && + String(selected_id).length > 0 &&
    + {JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).telephone} +
    } +
    + +
    +
    + Age +
    + {String(gridline_id) !== "" && Getall_Training_Employee_No_Filter_result && selected_id && + String(selected_id).length > 0 &&
    + {selected_row_data_json_age} ans - {JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).date_naissance} +
    } + +
    + + +
    +
    + Adresse postale +
    + {String(gridline_id) !== "" && Getall_Training_Employee_No_Filter_result && selected_id && + String(selected_id).length > 0 &&
    + {JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).adr_adresse}
    + {JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).adr_code_postal} {JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).adr_ville}
    + {JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).adr_pays.toUpperCase()} +
    } +
    + +
      + +
    +
    + + + + + + +
    +
    + +
    +
    + +
    +
    + +
    + + +
    + {/*** FIN GESTION EMPLOYE */} + + + + + MySy Information + + + {Dialog_1_message} + + + + + + + + + + + + + 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" + + > + + MySy Information + + + {Dialog_1_message_profil_access_right} + + + + + + + + + + + + + + + + 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" + + > + + MySy Information + + + {Dialog_1_message_create_update_login_pwd} + + + + + + + + + + + + + + + + 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" + > + + MySy Information + + + + Mise à jour Login & Mot de passe + + + + + {String(p_detail_user_login).length > 2 &&
    Login + +
    } + {String(p_detail_user_login).length < 2 && +
    Login + { + setp_new_login(e.target.value); + + } + } + /> +
    } + +
    Mot de passe + { + setp_new_pwd(e.target.value); + + } + } + /> + + +
    +
    Confirmer Mot de passe + { + setp_conf_new_login(e.target.value); + + } + } + /> + +
    + + + + +
    + + + + + + + +
    + +
    + +
    + +
    + +
    +
    + + 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" + + > + + Contrat employé + + +
    Type de contrat + { + setp_employe_contrat_type_contrat(e.target.value); + setdialog_contrat_data_changed("1"); + var result2 = Getall_Employee_Type_Contrat_result.filter((val) => JSON.parse(val).code === String(e.target.value)); + settype_contrat_qte(JSON.parse(result2[0]).quantitatif); + + } + } + > + {Getall_Employee_Type_Contrat_result && + Getall_Employee_Type_Contrat_result.map((step) => ( + + {JSON.parse(step).description}  + + + ))} + + +
    + + +
    Type d'employé + { + setp_employe_contrat_type_employe(e.target.value); + setdialog_contrat_data_changed("1"); + } + } + > + Cadre   + Employé   + Stagiaire   + Independant   + Contractuel   + Autre   + + + +
    + + +
    Debut + { + setp_employe_contrat_date_debut(format(date, 'd/MM/yyyy')); + setdialog_contrat_data_changed("1"); + + } + } + showTimeSelect={false} + dateFormat="dd/MM/yyyy" + className="disabled_style session_caract_Dialog_DatePicker" + locale='fr-FR' + + /> + +
    + + +
    Fin + { + + setp_employe_contrat_date_fin(format(date, 'd/MM/yyyy')); + setdialog_contrat_data_changed("1"); + + } + } + showTimeSelect={false} + dateFormat="dd/MM/yyyy" + className="disabled_style session_caract_Dialog_DatePicker" + locale='fr-FR' + /> + +
    + + + +
    Groupe de Prix d'Achat + { + setp_employe_contrat_groupe_prix_achat_id(e.target.value); + setdialog_contrat_data_changed("1"); + } + } + > + +   + + + {Get_Partner_Purchase_Prices_result && + Get_Partner_Purchase_Prices_result.map((myclient) => ( + + {JSON.parse(myclient).code_groupe_prix}  + + + + ))} + + + +
    +
    + + + + {String(type_contrat_qte) === "1" && + } + + + {String(p_employe_contrat_groupe_prix_achat_id) === "" && + } + + {String(p_employe_contrat_groupe_prix_achat_id) === "" && + } + +
    Commentaire + { + if (String(e.target.value).length <= 255) { + setp_employe_contrat_comment(e.target.value); + setdialog_contrat_data_changed("1"); + } + } + } + /> +
    + + + {String(dialog_contrat_data_changed) === "1" &&
    + /!\ Pensez à enregistrer les modifications +
    } + + + +
    + + + + + + + + +
    +
    + + {String(selected_contrat_id).trim().length > 2 && } + {String(selected_contrat_id).trim() === "" && } +
    + +
    + +
    +
    + +
    + + +
    + +

    Autres Ressources Humaines

    +
    +
    Utilisez les filtres !
    +
    +
    + + {New_Option_Filter && New_Option_Filter.length > 0 && (data).value === String(p_filtre1))[0].label} + options={New_Option_Filter} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre1(value.value); + } + }} + + renderInput={(params) => + } + />} + + +
    + + + +
    + {p_filtre1 && + { setp_filtre1_value(e.target.value); }} + InputProps={{ + endAdornment: ( + + { + setp_filtre1_value(""); + }} /> + + ), + }} + + /> + + } +
    + {p_filtre1 && } + {p_filtre1 && } + + +
    + + {p_filtre2 && +
    +
    + + {New_Option_Filter && New_Option_Filter.length > 0 && (data).value === String(p_filtre2))[0].label} + options={New_Option_Filter} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre2(value.value); + + } + + }} + + renderInput={(params) => + } + />} + + {/* { + setp_filtre2(e.target.value); + + }} + > + Email   + Nom   + Lié a la Formation (code externe)   + Lié a la Session (code session)   + + + */} +
    +
    + {String(p_filtre2).length > 2 && + setp_filtre2_value(e.target.value)} + InputProps={{ + endAdornment: ( + + { + setp_filtre2_value(""); + }} /> + + ), + }} + + />} +
    + + {String(p_filtre2).length > 2 && } + + {String(p_filtre2).length > 2 && } + +
    + } + + + {p_filtre3 && +
    +
    + + {New_Option_Filter && New_Option_Filter.length > 0 && (data).value === String(p_filtre3))[0].label} + options={New_Option_Filter} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre3(value.value); + + } + + }} + + renderInput={(params) => + } + />} + + {/* { + setp_filtre3(e.target.value) + }} + > + Email   + Nom   + Lié a la Formation (code externe)   + Lié a la Session (code session)   + + + */} +
    +
    + {String(p_filtre3).length > 2 && + setp_filtre3_value(e.target.value)} + InputProps={{ + endAdornment: ( + + { + setp_filtre3_value(""); + }} /> + + ), + }} + + />} +
    + + {String(p_filtre2).length > 2 && } + + {String(p_filtre3).length > 2 && } +
    + } + + {/* + {p_filtre4 && +
    +
    + { + setp_filtre4(e.target.value) + }} + > + Email   + Nom   + Code Session    + Titre Formation   + + + +
    +
    + {String(p_filtre4).length > 2 && + setp_filtre2_value(e.target.value)} + InputProps={{ + endAdornment: ( + + { + setp_filtre4_value(""); + }} /> + + ), + }} + + />} +
    + + + + {String(p_filtre2).length > 2 && } + +
    + } + */} +
    + +
    + +
    + +
    + + +
    + +
    + +
    +
    + + +
    +
    +
    + +
    +   + + { + setSelectionModel(newSelectionModel); + /*if (newSelectionModel.length === 1) + handleClick_edit_employee_From_Line(newSelectionModel);*/ + if (newSelectionModel.length !== 1) { + setsubmenu(); + setdisplay_detail_employe(); + setadd_One_Employee(); + } + }} + selectionModel={selectionModel} + + localeText={frFR.components.MuiDataGrid.defaultProps.localeText} + rows={rowss.map((item, index) => ( + { + id: index, + _id: JSON.parse(item)._id, + email: JSON.parse(item).email, + nom: JSON.parse(item).nom, + prenom: JSON.parse(item).prenom, + telephone_mobile: JSON.parse(item).telephone_mobile, + civilite: JSON.parse(item).civilite, + profil: JSON.parse(item).profil, + fonction: JSON.parse(item).fonction, + ismanager: JSON.parse(item).ismanager, + adr_adresse: JSON.parse(item).adr_adresse, + adr_code_postal: JSON.parse(item).adr_code_postal, + adr_ville: JSON.parse(item).adr_ville, + adr_pays: JSON.parse(item).adr_pays, + date_naissance: JSON.parse(item).date_naissance, + user_login: JSON.parse(item).user_login, + + } + ))} + + columns={columns} + pageSize={10} + className="datagridclass" + + onRowDoubleClick={(newSelectionModel) => { + setselected_id(newSelectionModel.row._id); + setuserimgclassprofil(""); + setselected_row_data_json_age(""); + get_Employee_Images(newSelectionModel.row._id); + setgridline_id(newSelectionModel.row.id); + setp_detail_civilite(newSelectionModel.row.civilite); + + + if (newSelectionModel.row.date_naissance) { + var local_date_naissance = newSelectionModel.row.date_naissance; + var date_eval = new Date(moment(local_date_naissance, "DD/MM/YYYY")); + var diff = Date.now() - date_eval.getTime(); + var age = new Date(diff); + var reel_age = Math.abs(age.getUTCFullYear() - 1970); + setselected_row_data_json_age(reel_age) + } + + setdisplay_given_suivi_ped(""); + setgiven_suivi_ped_changed(""); + setgiven_suivi_ped_data_edit_mode(""); + setadd_one_suivi_ped(""); + setselectionModel_suivi_pedagogique([]); + setsuivi_pedago_gridline_id(""); + + + setDialog_employe_open(true); + + + //handleClick_edit_employee_From_Line(newSelectionModel.row.id); + + }} + + rowsPerPageOptions={[10]} + disableSelectionOnClick + components={{ + Toolbar: GridToolbar, + }} + //sx={datagridSx} + getCellClassName={(params) => { + //field === 'distantiel' + + + //console.log(" ### params.field = ", params.field) + + + + if (params.field === 'distantiel' && String(params.value) === "1") { + return 'cell--distantiel'; + } + if (params.field === "presentiel" && String(params.value) == "1") { + return 'cell--presentiel'; + } + + + //field === "statut" + if (params.field === "status" && String(params.value) == "0") { + return 'cell--statut--preinscrit'; + } + + if (params.field === "status" && String(params.value) == "1") { + return 'cell--statut--inscrit'; + } + + if (params.field === "status" && String(params.value) == "-1") { + return 'cell--statut--annule'; + } + + }} + getRowClassName={(params) => { + // Pour la gestion de la couleur de zone double cliquée + if (String(params.row.id) === String(gridline_id)) { + return 'line--statut--selected'; + } + else if (parseInt(String(params.row.id)) % 2 === 0) { + return 'line--statut--pair'; + } + else if (parseInt(String(params.row.id)) % 2 !== 0) { + return 'line--statut--impair'; + } + + if (String(params.row.status) === "-1") { + return 'line--statut--annule'; + } + if (String(params.row.status) === "0") { + return 'line--statut--preinscrit'; + } + if (String(params.row.status) === "1") { + return 'line--statut--inscrit'; + } + }} + getEstimatedRowHeight={() => 200} + getRowHeight={() => "auto"} + sx={{ + "& .MuiDataGrid-cellContent": { + minHeight: 50, + + } + }} + + + + /> + +
    + +
    + +
    + +
    + +
    + +
    + + {String(props.check_user_acces_right("employe", "write")) === "1" && } + + + {String(props.check_user_acces_right("employe", "write")) === "1" && } + +
    + {session_file_name && } + {String(liste_sessions_file_change_api) === String("true") && } + {String(liste_sessions_file_change_api) === String("false") && } + + + + Télécharger un fichier modèle +
    +
    +
     
    + + +
    + +
     
    + {selected_id && String(selected_id).length > "5" &&
    + + {/*String(props.check_user_acces_right("employe", "write")) === "1" && */} + {String(props.check_user_acces_right("employe", "write")) === "1" && } + {/*String(props.check_user_acces_right("employe", "write")) === "1" && */} + {/*String(props.check_user_acces_right("employe", "write")) === "1" && */} + {/*String(props.check_user_acces_right("employe", "write")) === "1" && */} + {/*String(props.check_user_acces_right("employe", "write")) === "1" && */} + {/*String(props.check_user_acces_right("employe", "write")) === "1" && */} + {String(props.check_user_acces_right("employe", "write")) === "1" && String(history_securite_read) === "1" && } + +
    } + + + {String(submenu) === "detail_employe" && String(add_One_Employee) !== "1" &&
    + +
    +
    + +
    +
    +
    + +
    +
    +
    + {String(props.check_user_acces_right("employe", "write")) === "1" && } + + {/*isimgclassSelected && */} + {isimgclassdeleted && String(isimgclassdeleted) === "1" && } + {isimgclassdeleted && String(isimgclassdeleted) === "0" && } + {isimgclassSelected && String(isimgclassSaved) === "0" && } +
    + +
    +
    +
  • + L'image doit etre carrée. +
  • +
  • + Les formats autorisés sont : ['jpg', 'jpeg', 'png', 'jpe', 'webp'] +
  • +
  • + Les dimensions recommandées: 128pixels X 128pixels -- 144pixels X 144pixels -- 168pixels X 168pixels
    + Les dimensions maximales sont de 256pixels X 256pixels +
  • +
  • + La taille de l'image ne doit pas dépasser 1 mega octet +
  • +
    + +
    +
    + +
    + +   +
    + +
    + +
    +
    + + {String(employee_data_edit_mode) !== "1" && p_detail_civilite && + String(p_detail_civilite).length > 0 &&
    Civilité
    + + +
    } + + {String(employee_data_edit_mode) === "1" &&
    Civilité
    + + (data).value === String(p_detail_civilite))[0].label} + + onChange={(event, value) => { + if (value && value.value) { + setp_detail_civilite(value.value); + setEmployee_data_changed("1"); + } else { + setp_detail_civilite(""); + setEmployee_data_changed("1"); + } + }} + renderInput={(params) => + } + /> + +
    } + +
    Nom
    + { + setp_detail_nom(e.target.value); + setEmployee_data_changed("1"); + } + } + + /> +
    + +
    Prénom
    + { + setp_detail_prenom(e.target.value); + setEmployee_data_changed("1"); + }} + /> +
    + + + +
    Email
    + { + setp_detail_mail(e.target.value); + setEmployee_data_changed("1"); + } + } + + /> +
    + + +
    Fonction / rôle
    + { + setp_detail_fonction(e.target.value); + setEmployee_data_changed("1"); + }} + /> +
    + + + {String(employee_data_edit_mode) !== "1" &&
    Date Naissance
    + +
    } + + {String(employee_data_edit_mode) === "1" &&
    Date Naissance
    + { + setp_detail_naissance(format(date, 'd/MM/yyyy')); + setEmployee_data_changed("1"); + } + } + readOnly={false} + showTimeSelect={false} + dateFormat="dd/MM/yyyy" + className="disabled_style enable_style" + locale='fr-FR' + + /> +
    } + +
    +
    + +   +
    + +
    + +
    +
    + + +
    Téléphone Mobile
    + { + setp_detail_tel_mobile(e.target.value); + setEmployee_data_changed("1"); + } + } + /> +
    + +
    Téléphone
    + { + setp_detail_tel(e.target.value); + setEmployee_data_changed("1"); + } + } + /> +
    + +
    Adresse
    + { + setp_detail_adresse(e.target.value); + setEmployee_data_changed("1"); + }} + /> +
    +
    Code postal
    + { + setp_detail_code_postal(e.target.value); + setEmployee_data_changed("1"); + }} + /> +
    +
    Ville
    + { + setp_detail_ville(e.target.value); + setEmployee_data_changed("1"); + }} + /> +
    + +
    Pays
    + { + setp_detail_pays(e.target.value); + setEmployee_data_changed("1"); + }} + /> +
    + +
    Linkedin
    + { + setp_detail_linkedIn(e.target.value); + setEmployee_data_changed("1"); + }} + /> +
    + +
    Facebook
    + { + setp_detail_facebook(e.target.value); + setEmployee_data_changed("1"); + }} + /> +
    + +
    X (Twitter)
    + { + setp_detail_twitter(e.target.value); + setEmployee_data_changed("1"); + }} + /> +
    +
    +
    +   + + +
    + +
    + +
    + +
    Commentaire
    + { + setp_detail_comment(e.target.value); + setEmployee_data_changed("1"); + + }} + + /> +
    + + +
    + + +
    +   +
    +
    + {String(Employee_data_changed) === "1" && String(employee_data_edit_mode) === "1" &&
    + /!\ Pensez à enregistrer les modifications +
    } + + +
    + + {String(employee_data_edit_mode) === "1" &&
    + + + +
    } + + {String(employee_data_edit_mode) === "1" &&
    + +
    } +
    + + + {String(props.check_user_acces_right("employe", "write")) === "1" && String(employee_data_edit_mode) !== "1" &&
    + + + +
    } +
    +   +
    +
    + + +
    +   +
    +
    +
    } + + + + {String(submenu) === "detail_employe" && String(add_One_Employee) === "1" &&
    + + +
    + + +   +
    + +
    + +
    +
    + +
    Civilité
    + {New_civilite.length > 0 && { + if (value && value.value) { + setp_one_detail_civilite(value.value); + setEmployee_data_changed("1"); + + } + }} + + renderInput={(params) => + } + />} + +
    + +
    Nom
    + { + setp_one_detail_nom(e.target.value); + setEmployee_data_changed("1"); + } + } + + /> +
    + +
    Prénom
    + { + setp_one_detail_prenom(e.target.value); + setEmployee_data_changed("1"); + }} + /> +
    + + + +
    Email
    + { + setp_one_detail_mail(e.target.value); + setEmployee_data_changed("1"); + } + } + + /> +
    + +
    Fonction / Rôle
    + { + setp_one_detail_fonction(e.target.value); + setEmployee_data_changed("1"); + }} + /> +
    + + + +
    Date Naissance
    + + { + setp_one_detail_naissance(format(date, 'd/MM/yyyy')); + setEmployee_data_changed("1"); + } + } + showTimeSelect={false} + dateFormat="dd/MM/yyyy" + className="disabled_style enable_style" + locale='fr-FR' + + /> + + +
    + +
    +
    +   + +   +
    + +
    + +
    +
    + + +
    Téléphone Mobile
    + { + setp_detail_tel_mobile(e.target.value); + setEmployee_data_changed("1"); + } + } + /> +
    + +
    Téléphone
    + { + setp_detail_tel(e.target.value); + setEmployee_data_changed("1"); + } + } + /> +
    + +
    Adresse
    + { + setp_detail_adresse(e.target.value); + setEmployee_data_changed("1"); + }} + /> +
    +
    Code postal
    + { + setp_detail_code_postal(e.target.value); + setEmployee_data_changed("1"); + }} + /> +
    +
    Ville
    + { + setp_detail_ville(e.target.value); + setEmployee_data_changed("1"); + }} + /> +
    + +
    Pays
    + { + setp_detail_pays(e.target.value); + setEmployee_data_changed("1"); + }} + /> +
    + +
    Linkedin
    + { + setp_detail_linkedIn(e.target.value); + setEmployee_data_changed("1"); + }} + /> +
    + +
    Facebook
    + { + setp_detail_facebook(e.target.value); + setEmployee_data_changed("1"); + }} + /> +
    + +
    X (Twitter)
    + { + setp_detail_twitter(e.target.value); + setEmployee_data_changed("1"); + }} + /> +
    +
    +
    + + +   +
    + +
    + +
    Commentaire
    + { + setp_one_detail_comment(e.target.value); + + }} + + /> +
    + +
    + + {
    + + + +
    } + + {
    + +
    } +
    + +
    +   +
    +
    +
    } + + + + {String(submenu) === "affectation" &&
    + + +
    +
    + +
    +   + + { + setSelectionModel_affectations(newSelectionModel); + if (newSelectionModel.length === 1) + handleClick_edit_affectation_From_Line(newSelectionModel); + + if (newSelectionModel.length !== 1) { + setedite_affectation_form(); + setdisplay_affectation(); + } + }} + selectionModel={selectionModel_affectations} + + localeText={frFR.components.MuiDataGrid.defaultProps.localeText} + rows={rows_affectations.map((item, index) => ( + { + id: index, + _id: JSON.parse(item)._id, + poste: JSON.parse(item).poste, + date_du: JSON.parse(item).date_du, + date_au: JSON.parse(item).date_au, + target_related_collection: JSON.parse(item).target_related_collection, + target_related_collection_id: JSON.parse(item).target_related_collection_id, + related_target_collection_id_nom: JSON.parse(item).related_target_collection_id_nom, + related_target_collection_object: JSON.parse(item).related_target_collection_object, + + + } + ))} + + columns={columns_employee_affectation} + pageSize={10} + className="datagridclass" + + rowsPerPageOptions={[10]} + //disableSelectionOnClick + components={{ + Toolbar: GridToolbar, + }} + + + + /> + +
    + +
    + +
    + +
    + +
    + +
    + + + +
    + +
    +
    + + + + {String(display_affectation) === "1" &&
    + + +
    +
    Poste Occupé
    + { + setp_affect_poste(e.target.value); + setAffectation_data_changed("1"); + }} + + /> + +
    + + + {String(edite_affectation_form) !== "1" &&
    Cible
    + + +
    } + + {String(edite_affectation_form) === "1" &&
    Cible
    + { + setp_affect_cible(e.target.value); + setAffectation_data_changed("1"); + }} + + + > + Formation    + Session de formation   + Aucun   + + + +
    } + + + {String(edite_affectation_form) !== "1" &&
    Cible Nom
    + + +
    } + + {String(edite_affectation_form) === "1" &&
    Cible Nom
    + { + setp_affect_cible_nom(e.target.value); + setAffectation_data_changed("1"); + }} + > + + {Get_Employee_Related_Target_Collection_Data_result && + Get_Employee_Related_Target_Collection_Data_result.filter((local_mymanager) => JSON.parse(local_mymanager).related_target_collection === p_affect_cible).map((mymanager) => ( + + {JSON.parse(mymanager).related_target_collection_id_nom}   + + + ))} + + + + +
    } + + + + {String(edite_affectation_form) !== "1" &&
    Date du
    + + +
    } + + {String(edite_affectation_form) === "1" &&
    Date du
    + + { + setp_affect_date_du(format(date, 'dd/MM/yyyy')); + setAffectation_data_changed("1"); + } + } + showTimeSelect={false} + //filterTime={filterPassedTime_start} + dateFormat="dd/MM/yyyy" + className="disabled_style enable_style" + locale='fr-FR' + /> + +
    } + + + {String(edite_affectation_form) !== "1" &&
    Date au
    + + +
    } + + {String(edite_affectation_form) === "1" &&
    Date au
    + { + setp_affect_date_au(format(date, 'dd/MM/yyyy')); + setAffectation_data_changed("1"); + } + } + showTimeSelect={false} + //filterTime={filterPassedTime_start} + dateFormat="dd/MM/yyyy" + className="disabled_style enable_style" + locale='fr-FR' + /> + +
    } + +
    Commentaire
    + { + setp_affect_comment(e.target.value); + + }} + + /> + +
    + +
    +   +
    + {String(Affectation_data_changed) === "1" && String(edite_affectation_form) === "1" &&
    + /!\ Pensez à enregistrer les modifications +
    } + + +
    + + {String(Affectation_data_changed) === "1" && String(edite_affectation_form) === "1" &&
    + + + +
    } + + {String(edite_affectation_form) === "1" &&
    + +
    } +
    +
    + + {String(edite_affectation_form) !== "1" &&
    + + + +
    } + + + {String(props.check_user_acces_right("employe", "write")) === "1" && String(edite_affectation_form) !== "1" &&
    + + + +
    } +
    +
    +   +
    + +
    +
    } + + + {String(Add_new_affectation) === "1" &&
    + + +
    +
    +
    Poste Occupé
    + { + setp_one_affect_poste(e.target.value); + + }} + + /> + +
    + +
    Cible
    + { + setp_one_affect_cible(e.target.value); + }} + + > + Formation    + Session de formation   + Aucun   + + + +
    + +
    Cible Nom {p_one_affect_cible && String(p_one_affect_cible).length > 2 && + + + + Obligatoire * + + + }
    + { + setp_one_affect_cible_nom(e.target.value); + }} + > + + {Get_Employee_Related_Target_Collection_Data_result && + Get_Employee_Related_Target_Collection_Data_result.filter((local_mymanager) => JSON.parse(local_mymanager).related_target_collection === p_one_affect_cible).map((mymanager) => ( + + {JSON.parse(mymanager).related_target_collection_id_nom}   + + + ))} + + + + +
    + + + +
    Date du
    + { + setp_one_affect_date_du(format(date, 'dd/MM/yyyy')); + } + } + showTimeSelect={false} + //filterTime={filterPassedTime_start} + dateFormat="dd/MM/yyyy" + className="disabled_style enable_style" + locale='fr-FR' + /> + +
    + + +
    Date au
    + { + setp_one_affect_date_au(format(date, 'dd/MM/yyyy')); + } + } + showTimeSelect={false} + //filterTime={filterPassedTime_start} + dateFormat="dd/MM/yyyy" + className="disabled_style enable_style" + locale='fr-FR' + /> + +
    + +
    Commentaire
    + { + setp_one_affect_comment(e.target.value); + + }} + + /> + +
    + +
    +
    +   +
    + +
    + +
    + + + +
    + +
    + +
    +
    + +
    +   +
    +
    + +
    } + +
    } + + {String(submenu) === "droit_acces" &&
    + + + +
    + +
    Profil utilisateur
    + + { + if (value && value.nom) { + setp_user_profil_tmp(value.nom); + setp_user_profil_tmp_id(value._id); + Dialog_1_handle_change_profil_access_right(" Vous êtes sur le point de mettre à jour les droits de l'utilisateur. Pensez à enregistrer pour finaliser l'opération. ", value.nom); + + } + }} + + renderInput={(params) => + } + /> + + +
    + +
    +
    + + + {String(acces_right_data_edit_mode) === "1" && +
    +   + + { + setselectionModel_acces_right(newSelectionModel); + if (newSelectionModel.length === 1) + handleClick_edit_acces_right_From_Line(newSelectionModel); + + if (newSelectionModel.length !== 1) { + setedite_affectation_form(); + setdisplay_affectation(); + } + }} + + + + selectionModel={selectionModel_acces_right} + + localeText={frFR.components.MuiDataGrid.defaultProps.localeText} + rows={rows_acces_right.map((item, index) => ( + { + id: index, + _id: JSON.parse(item)._id, + poste: JSON.parse(item).poste, + module: JSON.parse(item).module_name, + read: JSON.parse(item).read, + write: JSON.parse(item).write, + + } + ))} + + + columns={columns_employee_acces_right} + pageSize={10} + className="datagridclass" + disabled={true} + + rowsPerPageOptions={[10]} + //disableSelectionOnClick + components={{ + Toolbar: GridToolbar, + }} + + /> + +
    + +
    + + } + + {String(acces_right_data_edit_mode) !== "1" && +
    +   + + { + setselectionModel_acces_right(newSelectionModel); + if (newSelectionModel.length === 1) + handleClick_edit_acces_right_From_Line(newSelectionModel); + + if (newSelectionModel.length !== 1) { + setedite_affectation_form(); + setdisplay_affectation(); + } + }} + + + + selectionModel={selectionModel_acces_right} + + localeText={frFR.components.MuiDataGrid.defaultProps.localeText} + rows={rows_acces_right.map((item, index) => ( + { + id: index, + _id: JSON.parse(item)._id, + poste: JSON.parse(item).poste, + module: JSON.parse(item).module_name, + read: JSON.parse(item).read, + write: JSON.parse(item).write, + + } + ))} + + + columns={columns_employee_acces_right_disabled} + pageSize={10} + className="datagridclass" + disabled={true} + + rowsPerPageOptions={[10]} + //disableSelectionOnClick + components={{ + Toolbar: GridToolbar, + }} + + /> + +
    + +
    } + + +
    + +
    +   +
    + {String(acces_right_data_changed) === "1" && String(acces_right_data_edit_mode) === "1" &&
    + /!\ Pensez à enregistrer les modifications +
    } + + +
    + + {String(acces_right_data_changed) === "1" && String(acces_right_data_edit_mode) === "1" &&
    + + + +
    } + + {String(acces_right_data_edit_mode) === "1" &&
    + +
    } +
    + {String(props.check_user_acces_right("employe", "write")) === "1" && String(acces_right_data_edit_mode) !== "1" &&
    + + + +
    } +
    +   +
    + + +
    + +
    +   +
    + +
    + + + + + + + {New_GetCurrentPartnerClass_result && New_GetCurrentPartnerClass_result.length > 0 &&
    Liste formations
    + + { + setscope_changed("1"); + setscope_class([ + ...fixedVal_scope_class, + ...newValue.filter((i) => fixedVal_scope_class.indexOf(i) === -1), + ]); + + }} + value={scope_class} + options={New_GetCurrentPartnerClass_result} + renderInput={(params) => + } + /> + +
    } + + {New_Getall_TrainingSession_Without_Scope_Action_result && New_Getall_TrainingSession_Without_Scope_Action_result.length > 0 &&
    Liste Sessions / Promotions
    + + { + setscope_changed("1"); + setscope_session([ + ...fixedVal_scope_session, + ...newValue.filter((i) => fixedVal_scope_session.indexOf(i) === -1), + ]); + + }} + + + value={scope_session} + options={New_Getall_TrainingSession_Without_Scope_Action_result} + renderInput={(params) => + } + /> + +
    } + + +
    +
    +   +
    +
    +   +
    +
    + {String(scope_changed) === "1" &&
    +
    /!\ Pensez à enregistrer les modifications
    +
    } +
    + +
    + +
    + + + +
    + +
    + +
    +
    + +
    +   +
    + + +
    +
    } + + {String(submenu) === "contrat" &&
    + + +   +
    +   + + + { + setselectionModel_contrat(newSelectionModel); + + }} + + + selectionModel={selectionModel_contrat} + + localeText={frFR.components.MuiDataGrid.defaultProps.localeText} + rows={Getall_Employee_Contrat_result.map((item, index) => ( + { + id: index, + _id: JSON.parse(item)._id, + rh_id: JSON.parse(item).rh_id, + date_debut: JSON.parse(item).date_debut, + date_fin: JSON.parse(item).date_fin, + type_contrat: JSON.parse(item).type_contrat, + type_employe: JSON.parse(item).type_employe, + qte: JSON.parse(item).quantite, + cout: JSON.parse(item).cout, + comment: JSON.parse(item).comment, + periodicite: JSON.parse(item).periodicite, + + + } + ))} + + + columns={columns_employee_contrat} + pageSize={10} + className="datagridclass" + disabled={true} + + onRowDoubleClick={(newSelectionModel) => { + + setselected_contrat_id(newSelectionModel.row._id) + handleClick_edit_employee_contrat_From_Line(newSelectionModel.row.id); + + }} + + rowsPerPageOptions={[10]} + //disableSelectionOnClick + components={{ + Toolbar: GridToolbar, + }} + + /> + +
    + +
    + +
    + +
    + {String(props.check_user_acces_right("employe", "write")) === "1" && } +
    +
    +
    + } + + {String(submenu) === "piece_jointe" &&
    + + + +
    +
    +
    +
    + +
    + +
    + {file_1_name && file_1_name.name && + } + + {Record_All_PJ_api && String(Record_All_PJ_api) === "true" &&
    Pièce jointe enregistrée
    } + + {Record_All_PJ_api && String(Record_All_PJ_api) === "false" &&
    {Record_All_PJ_message}
    } + + +
    + + + + {file_1_name && file_1_name.name &&
    + +
    + +
    + + +
    } + + {Get_List_Of_All_PJ_result &&
    +
    + Liste des pièces jointes
    +
    + {Get_List_Of_All_PJ_result && Get_List_Of_All_PJ_result.map((val) => ( +
    +
    + Supprimer + + + } + modal + nested + position="center center" + > + {close => ( +
    + +
    MySy Information
    +
    + {' '} + + En confirmant cette opération, la pièce jointe sera définitivement supprimée.
    + + +
    +
    +
    + + +
    +
    + +
    +
    +
    + )} +
    + +
    + ))} +
    +
    +
    } +
    +
    +   +
    +
    +
    } + + + {String(submenu) === "competence" &&
    + + +
    +
    + + {employee_list_competence && employee_list_competence.map((competence) => ( + + ))} + + + +
    + +
    + +
    + + + +
    + + + +
    +
    + +
    } + + {String(submenu) === "evaluation" &&
    + + + + + +
    +
    {p_detail_prenom}   {p_detail_nom} : Evaluation par les apprenants
    + Evaluation
    +
    + + + { + setselectionModel_evaluation_formateur(newSelectionModel_evaluation); + // console.log("ch selected--" + newSelectionModel_evaluation); + + }} + + selectionModel={selectionModel_evaluation_formateur} + localeText={frFR.components.MuiDataGrid.defaultProps.localeText} + rows={rowss_evaluation_formateur.map((item, index) => ( + { + id: index, + _id: JSON.parse(item)._id, + email: JSON.parse(item).email, + nom: JSON.parse(item).nom, + prenom: JSON.parse(item).prenom, + status: JSON.parse(item).statut, + form_code: JSON.parse(item).formulaire.code, + date_envoie: JSON.parse(item).date_envoi, + date_reponse: JSON.parse(item).date_reponse, + + } + ))} + + columns={columns_list_evaluation_enseignant} + pageSize={10} + className="datagridclass" + + rowsPerPageOptions={[10]} + disableSelectionOnClick + components={{ + Toolbar: GridToolbar, + }} + + getRowClassName={(params) => { + + if (String(params.row.status) === "1") { + return 'line--positionnement_envoye'; + } + + if (String(params.row.status) === "2") { + return 'line--positionnement_repondu'; + } + + // Pour la gestion de la couleur de zone double cliquée + + 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, + + }, + [`& .${gridClasses.cell}`]: { + py: 1, + }, + }} + + /> + + + {selectionModel_evaluation_formateur && selectionModel_evaluation_formateur.length > 0 && +
    + + +   + + + { + if (value && value.value) { + if (String(value.value) === "export_evaluation") { + setactionmass_eval_val(value.value); + } + else { + setactionmass_eval_val(""); + } + + } + else { + setactionmass_eval_val(""); + } + + }} + + renderInput={(params) => + } + /> + + + {actionmass_eval_val && String(actionmass_eval_val) !== "" && + selectionModel_evaluation_formateur.length > 0 && + + + Traiter + + } + modal + nested + position="center center" + > + + {close => ( +
    + +
    MySy Information
    +
    + {' '} + + + {actionmass_eval_val && String(actionmass_eval_val) === "export_evaluation" && } + +
    +
    +
    + + +
    +
    + +
    +
    +
    + )} +
    + } +
    + + +
    + } + +
    +
    + + +
    + +
    +
    +
    {p_detail_prenom}   {p_detail_nom} : Suivi pédagoqigue
    + + + + +
    +
    + +
    +   + + { + setselectionModel_suivi_pedagogique(newSelectionModel); + + }} + selectionModel={selectionModel_suivi_pedagogique} + + localeText={frFR.components.MuiDataGrid.defaultProps.localeText} + rows={Get_Employee_List_Suivi_Pedagogique_result.map((item, index) => ( + { + id: index, + _id: JSON.parse(item)._id, + employee_id: JSON.parse(item).employee_id, + responsable_id: JSON.parse(item).responsable_id, + date_debut: JSON.parse(item).date_heure_debut, + date_fin: JSON.parse(item).date_heure_fin, + class_title: JSON.parse(item).class_title, + session_code: JSON.parse(item).session_code, + sujet: JSON.parse(item).sujet, + + + } + ))} + + columns={columns_suivi_pedagogique} + pageSize={10} + className="datagridclass" + + onRowDoubleClick={(newSelectionModel) => { + + setsuivi_pedago_gridline_id(newSelectionModel.row.id); + Get_Geven_Suivi_Ped_Data(newSelectionModel.row._id); + setdisplay_given_suivi_ped("1"); + setadd_one_suivi_ped(""); + setgiven_suivi_ped_data_edit_mode(""); + setselected_suivi_pedagogique_id(newSelectionModel.row._id); + + //console.log(" setselected_suivi_pedagogique_id = ", newSelectionModel.row._id); + }} + + + + rowsPerPageOptions={[10]} + disableSelectionOnClick + components={{ + Toolbar: GridToolbar, + }} + //sx={datagridSx} + getCellClassName={(params) => { + //field === 'distantiel' + if (params.field === 'distantiel' && String(params.value) === "1") { + return 'cell--distantiel'; + } + if (params.field === "presentiel" && String(params.value) == "1") { + return 'cell--presentiel'; + } + + }} + + getRowClassName={(params) => { + // Pour la gestion de la couleur de zone double cliquée + if (String(params.row.id) === String(suivi_pedago_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, + + } + }} + /> + +
    + +
    + +
    + + +
    + +
    + +
    + +
    + + {String(props.check_user_acces_right("employe", "write")) === "1" && } + +
    + + +
    +
    + +
    + +
    + + + + {String(add_one_suivi_ped) === "1" && String(display_given_suivi_ped) !== "1" &&
    + + + +
    Sujet
    + { + setp_detail_suivi_ped_sujet(e.target.value); + + } + } + + /> + +
    + +
    Début
    + { + setp_detail_suivi_ped_eval_date_heure_debut(format(date, 'dd/MM/yyyy HH:mm')); + + } + } + + + className="disabled_style enable_style" + locale='fr-FR' + showTimeSelect + timeFormat="HH:mm" + timeIntervals={15} + dateFormat="dd/MM/yyyy HH:mm" + is24Hour + + /> + +
    + + + +
    Fin
    + { + + setp_detail_suivi_ped_eval_date_heure_fin(format(date, 'dd/MM/yyyy HH:mm')); + + } + } + + + className="disabled_style enable_style" + locale='fr-FR' + showTimeSelect + timeFormat="HH:mm" + timeIntervals={15} + dateFormat="dd/MM/yyyy HH:mm" + is24Hour + + /> + +
    + +
    Responsable
    + {New_Getall_Training_Employee_No_Filter_result && New_Getall_Training_Employee_No_Filter_result.length > 0 && + + (data)._id !== String(selected_id))} + value={New_Getall_Training_Employee_No_Filter_result.filter((data) => (data)._id === String(p_detail_suivi_ped_responsable_id))[0].label} + + onChange={(event, value) => { + if (value && value._id) { + setp_detail_suivi_ped_responsable_id(value._id); + + } else { + setp_detail_suivi_ped_responsable_id(""); + + } + }} + + renderInput={(params) => + } + /> + + } + +
    + +
    +   +
    + +
    + +
    + +
    + + + +
    + +
    + +
    +
    + + + +
    +   +
    +
    + +
    } + + {String(add_one_suivi_ped) !== "1" && String(display_given_suivi_ped) === "1" &&
    + + + {String(given_suivi_ped_data_edit_mode) !== "1" &&
    + + +
    Sujet
    + + +
    + + +
    Début
    + + + +
    + + + +
    Fin
    + + + +
    + +
    Responsable
    + {New_Getall_Training_Employee_No_Filter_result && New_Getall_Training_Employee_No_Filter_result.length > 0 && (data)._id === String(p_detail_suivi_ped_responsable_id))[0].label} + + />} + + +
    + +
    + Observation
    +
    + + editorRef_observation.current = editor} + initialValue={field_contenu_observation} + onKeyUp={field_contenu_observation_keyup} + //disabled={false} + + init={{ + resize: false, + height: 300, + menubar: false, + editable_root: false, + plugins: [ + 'advlist autolink lists link image charmap print preview anchor', + 'searchreplace visualblocks code fullscreen', + 'insertdatetime media table paste code help wordcount' + ], + + content_style: 'body { font-family:DM Sans,sans-serif; font-size:14px; }' + }} + /> +
    +
    + +
    + Commentaire
    +
    + + editorRef_comment.current = editor} + initialValue={field_contenu_comment} + onKeyUp={field_contenu_comment_keyup} + //disabled={false} + + init={{ + resize: false, + height: 300, + menubar: false, + editable_root: false, + plugins: [ + 'advlist autolink lists link image charmap print preview anchor', + 'searchreplace visualblocks code fullscreen', + 'insertdatetime media table paste code help wordcount' + ], + + content_style: 'body { font-family:DM Sans,sans-serif; font-size:14px; }' + }} + /> +
    +
    + + + + + +
    + } + + + {String(given_suivi_ped_data_edit_mode) === "1" &&
    + +
    Sujet
    + { + setp_detail_suivi_ped_sujet(e.target.value); + setgiven_suivi_ped_changed("1"); + } + } + + /> + +
    + +
    Début
    + { + setp_detail_suivi_ped_eval_date_heure_debut(format(date, 'dd/MM/yyyy HH:mm')); + setgiven_suivi_ped_changed("1"); + } + } + + + className="disabled_style enable_style" + locale='fr-FR' + showTimeSelect + timeFormat="HH:mm" + timeIntervals={15} + dateFormat="dd/MM/yyyy HH:mm" + is24Hour + + /> + +
    + + +
    Fin
    + { + + setp_detail_suivi_ped_eval_date_heure_fin(format(date, 'dd/MM/yyyy HH:mm')); + setgiven_suivi_ped_changed("1"); + } + } + + + className="disabled_style enable_style" + locale='fr-FR' + showTimeSelect + timeFormat="HH:mm" + timeIntervals={15} + dateFormat="dd/MM/yyyy HH:mm" + is24Hour + + /> + +
    + +
    Responsable
    + {New_Getall_Training_Employee_No_Filter_result && New_Getall_Training_Employee_No_Filter_result.length > 0 && + + (data)._id !== String(selected_id))} + value={New_Getall_Training_Employee_No_Filter_result.filter((data) => (data)._id === String(p_detail_suivi_ped_responsable_id))[0].label} + + onChange={(event, value) => { + if (value && value._id) { + setp_detail_suivi_ped_responsable_id(value._id); + + } else { + setp_detail_suivi_ped_responsable_id(""); + + } + setgiven_suivi_ped_changed("1"); + }} + + renderInput={(params) => + } + /> + + } + +
    + + +
    + Observation
    +
    + + editorRef_observation.current = editor} + initialValue={field_contenu_observation} + onKeyUp={field_contenu_observation_keyup} + //disabled={false} + + init={{ + resize: false, + height: 300, + menubar: false, + editable_root: true, + plugins: [ + 'advlist autolink lists link image charmap print preview anchor', + 'searchreplace visualblocks code fullscreen', + 'insertdatetime media table paste code help wordcount' + ], + + content_style: 'body { font-family:DM Sans,sans-serif; font-size:14px; }' + }} + /> +
    +
    + +
    + Commentaire
    +
    + + editorRef_comment.current = editor} + initialValue={field_contenu_comment} + onKeyUp={field_contenu_comment_keyup} + //disabled={false} + + init={{ + resize: false, + height: 300, + menubar: false, + editable_root: true, + plugins: [ + 'advlist autolink lists link image charmap print preview anchor', + 'searchreplace visualblocks code fullscreen', + 'insertdatetime media table paste code help wordcount' + ], + + content_style: 'body { font-family:DM Sans,sans-serif; font-size:14px; }' + }} + /> +
    +
    + + + +
    + } + + +
    + {String(given_suivi_ped_changed) === "1" && String(given_suivi_ped_data_edit_mode) === "1" &&
    + /!\ Pensez à enregistrer les modifications +
    } + + +
    + + {String(given_suivi_ped_data_edit_mode) === "1" &&
    + + + +
    } + + {String(given_suivi_ped_data_edit_mode) === "1" &&
    + +
    } +
    + + + {String(props.check_user_acces_right("employe", "write")) === "1" && String(props.check_user_acces_right("employe", "write")) === "1" && String(given_suivi_ped_data_edit_mode) !== "1" &&
    + + + + +
    } +
    +   +
    +
    + + + +
    } + + + + + +
    +
    + +
    + +
    } + + {String(submenu) === "statistiques" &&
    + + + + + +
    +
    + Choisir une question + {New_Getall_Employee_Statistic_Question_List_result && New_Getall_Employee_Statistic_Question_List_result.length > 0 && + +
    + + + (data)._id === String(selected_statistic_question_id))[0].label} + + onChange={(event, value) => { + + + if (value && value._id) { + setselected_statistic_question_id(value.question_id); + setselected_statistic_question_type(value.question_type); + } else { + setselected_statistic_question_id(""); + setselected_statistic_question_type(""); + } + }} + + renderInput={(params) => + } + /> +
    } +
    + + {selected_statistic_question_id && String(selected_statistic_question_id) !== "d" && + +
    + +
    +
    + Date Debut + { + setp_filter_date_from(format(date, 'dd/MM/yyyy')); + + } + } + showTimeSelect={false} + dateFormat="dd/MM/yyyy" + className="disabled_style session_caract_Dialog_DatePicker" + locale='fr-FR' + + /> + +
    + +
    +
    + +
    + Date Fin + { + setp_filter_date_to(format(date, 'dd/MM/yyyy')); + + } + } + showTimeSelect={false} + dateFormat="dd/MM/yyyy" + className="disabled_style session_caract_Dialog_DatePicker" + /> + +
    + +
    + + + +
    } +
    +
    + {String(selected_statistic_question_id) !== "" &&
    } + +
    + + {Getall_Qry_Survey_Data_result_JSON && Getall_Qry_Survey_Data_result_JSON.length > 0 && + Getall_Qry_Survey_Data_result_JSON &&
    + + {display_view && String(display_view) === "bars" &&
    + Affichage   + + + + + + +
    } + + {display_view && String(display_view) === "line" &&
    + Affichage   + + + +
    } + + + {display_view && String(display_view) === "bars" && +   + +
    + + {Getall_Qry_Survey_Data_result_JSON && Getall_Qry_Survey_Data_result_JSON.length > 0 && + Getall_Qry_Survey_Data_result_JSON && + + context.location === 'tick' + ? `${month.slice(0, 2)}` + "\n" + `${month.slice(3, 7)}` + : `${month}`, + }]} + series={[ + { dataKey: 'nb_question_response', label: 'NB', valueFormatter }, + { dataKey: 'value', label: `${selected_statistic_question_type}`, color: '#FA7070', valueFormatter }, + + + ]} + {...otherSetting} + margin={{ right: 15, left: 100 }} + height={450} + />} +
    + +
    } + + {display_view && String(display_view) === "line" && +   + +
    + + + {Getall_Qry_Survey_Data_result_JSON && Getall_Qry_Survey_Data_result_JSON.length > 0 && + Getall_Qry_Survey_Data_result_JSON && + + + + context.location === 'tick' + ? `${month.slice(0, 2)}` + " \n" + `${month.slice(3, 7)}` + : `${month}`, + }]} + series={[ + { dataKey: 'nb_question_response', label: 'NB', valueFormatter: (value) => (value == null ? 'NaN' : value.toString()), }, + { dataKey: 'value', label: `${selected_statistic_question_type}`, color: '#FA7070', valueFormatter: (value) => (value == null ? 'NaN' : value.toString()), }, + ]} + + margin={{ right: 15, left: 100 }} + height={450} + /> + + + + } +
    + + + +
    } + +
    + {Global_Getall_Qry_Survey_Data_result_JSON &&
    + + Nombre total d'enquêtes sur la période : {Global_Getall_Qry_Survey_Data_result_JSON['global_nb_question_response']}
    + + {String(selected_statistic_question_type) === "Somme" && + } + + {String(selected_statistic_question_type) === "Moyenne" && + } + +
    } +
    } + + + +
    } + + {String(submenu) === String("historique") &&
    + + +
    } + +
    + + ); +} + +export default Autre_RH; + diff --git a/src/components/Conseil_Classe.js b/src/components/Conseil_Classe.js new file mode 100644 index 0000000..819c482 --- /dev/null +++ b/src/components/Conseil_Classe.js @@ -0,0 +1,8837 @@ +import React, { useRef, useState, useEffect } from "react"; +import TextField from '@mui/material/TextField'; +import MenuItem from '@mui/material/MenuItem'; +import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css +import Button from '@mui/material/Button'; +import axios from "axios"; +import { getCookie, } 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 TextareaAutosize from '@mui/material/TextareaAutosize'; +import MoreVertIcon from '@mui/icons-material/MoreVert'; +import Menu from '@mui/material/Menu'; +import 'react-tooltip/dist/react-tooltip.css' +import { Tooltip } from 'react-tooltip' + +import fileDownload from 'js-file-download'; +import Popup from 'reactjs-popup'; +import 'reactjs-popup/dist/index.css'; + +import DatePicker from "react-datepicker"; +import "react-datepicker/dist/react-datepicker.css"; +import moment from "moment"; +import InputAdornment from '@mui/material/InputAdornment'; +import { AiFillCloseCircle } from "react-icons/ai"; +import Box from '@mui/material/Box'; + +import { MdAddCircleOutline, MdRemoveCircleOutline } from "react-icons/md"; +import Dialog from '@mui/material/Dialog'; +import DialogActions from '@mui/material/DialogActions'; +import DialogContent from '@mui/material/DialogContent'; +import DialogContentText from '@mui/material/DialogContentText'; +import DialogTitle from '@mui/material/DialogTitle'; + +import { Fab } from "@material-ui/core"; +import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io"; +import { AiTwotoneSave } from "react-icons/ai"; +import Autocomplete from '@mui/material/Autocomplete'; +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 } from "react-icons/io5"; +import AttachFileIcon from '@mui/icons-material/AttachFile'; +import { FcAcceptDatabase, FcPlanner } from "react-icons/fc"; + +import Module_Alert_Confirmation from "./Module_Alert_Confirmation"; +import Module_Historique_Action from "./Module_Historique_Action"; +import daygridPlugin from "@fullcalendar/daygrid"; + +import FullCalendar, { formatDate } from "@fullcalendar/react"; +import timeGridPlugin from "@fullcalendar/timegrid"; +import interactionPlugin from "@fullcalendar/interaction"; + +import allLocales from '@fullcalendar/core/locales-all' +import { CiTrash, CiBoxList } from "react-icons/ci"; + +import { makeStyles } from "@material-ui/core/styles"; +import CancelPresentationIcon from '@mui/icons-material/CancelPresentation'; +import { IconButton } from '@material-ui/core'; +import Paper from '@material-ui/core/Paper'; +import Draggable from 'react-draggable'; +import { + GridToolbarContainer, GridToolbarExport, GridToolbarColumnsButton, + GridToolbarFilterButton, GridToolbarDensitySelector, GridToolbarExportContainer, useGridApiContext, + gridFilteredSortedRowIdsSelector, + gridVisibleColumnFieldsSelector, + GridValueGetterParams, + GridPreferencePanelsValue, + +} from '@mui/x-data-grid'; +import * as XLSX from 'xlsx'; +import { TbUsersGroup } from "react-icons/tb"; +import Module_Jury_Selection_Apprenants from "./Module_Jury_Selection_Apprenants"; + +import { FcSearch } from "react-icons/fc"; +import { FcViewDetails, FcDisapprove, FcInfo } from "react-icons/fc"; +import Module_Session_Notes_Classement from "./Module_Session_Notes_Classement"; +import { FaBullseye } from "react-icons/fa"; + +function PaperComponent(props) { + return ( + + + + ); +} + + +const useStyles = makeStyles((theme) => ({ + + dialog: { + position: 'absolute', + // left: 10, + top: 400 + }, + + paper: { + overflowY: 'unset', + }, + customizedButton: { + position: 'absolute', + left: '95%', + top: '-3%', + backgroundColor: 'lightgray', + color: 'gray', + }, +})); + + +const Conseil_Classe = (props) => { + + const classes = useStyles(); + const history = useHistory(); + const [submenu, setsubmenu] = useState(""); + + const [submenu_detail_seance, setsubmenu_detail_seance] = useState(""); + + + const [rowss, setRows] = useState([]); + const [selectionModel, setSelectionModel] = React.useState([]); + const [isLoading, setLoading] = useState(); + + var date_today_90j = new Date(); + date_today_90j.setDate(date_today_90j.getDate() + 90); + + + 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(""); + + const [selected_id, setselected_id] = React.useState(""); + + const [selected_session_id, setselected_session_id] = React.useState(""); + + const [selected_jury_cible, setselected_jury_cible] = React.useState(""); + + const [selected_agenda_id, setselected_agenda_id] = React.useState(""); + + const [selected_jury_soutenance_id, setselected_jury_soutenance_id] = React.useState(""); + + const [selected_ue_id, setselected_ue_id] = React.useState(""); + + const [selected_ue_code, setselected_ue_code] = React.useState(""); + + + const [gridline_id, setgridline_id] = useState(""); + + function ExpandableCell_50({ value }) { + const [expanded, setExpanded] = React.useState(false); + + return ( + + ); + } + + function ExpandableCell_50_bg_hiligt({ value }) { + const [expanded, setExpanded] = React.useState(false); + + return ( + + ); + } + + const columns_jury = [ + { field: '_id', headerName: '_id', hide: true, Width: 0, disableExport: true, }, + { field: 'id', headerName: 'id', hide: true, Width: 0, disableExport: true, }, + { field: 'session_id', headerName: 'session_id', hide: true, Width: 0, disableExport: true, }, + { field: 'chef_jury_id', headerName: 'chef_jury_id', hide: true, Width: 0, disableExport: true, }, + { field: 'code', headerName: 'Code', flex: 1, hide: false, minWidth: 180, renderCell: (params) => , }, + { field: 'description', headerName: 'Description', flex: 1, hide: false, minWidth: 180, renderCell: (params) => , }, + + { field: 'cible', headerName: 'Cible', flex: 1, hide: false, minWidth: 180, renderCell: (params) => , }, + + { field: 'email_jury', headerName: 'Mail Diff.', flex: 1, hide: false, minWidth: 180, renderCell: (params) => , }, + { field: 'chef_jury_nom_prenom', headerName: 'Responsable', flex: 1, hide: false, minWidth: 180, renderCell: (params) => , }, + { field: 'nb_membre', headerName: 'Nb membres', flex: 1, hide: false, minWidth: 180, renderCell: (params) => , }, + + { field: 'code_session', headerName: 'Promotion', flex: 1, hide: false, minWidth: 180, renderCell: (params) => , }, + { field: 'ue_code', headerName: 'Matière', flex: 1, hide: false, minWidth: 180, renderCell: (params) => , }, + + { + field: "delete", headerName: 'Supprimer', disableExport: true, + renderCell: (cellValues) => { + return ( + <> + {String(props.check_user_acces_right("jury", "write")) === "1" && } + + ); + } + } + + ] + + const columns_jury_membre = [ + { field: '_id', headerName: '_id', hide: true, Width: 0, disableExport: true, }, + { field: 'id', headerName: 'id', hide: true, Width: 0, disableExport: true, }, + { + field: 'leader', headerName: 'Leader', hide: false, Width: 100, + renderCell: (cellValues) => { + return ( +
    + {cellValues.row.leader && String(cellValues.row.leader) === "1" && "Oui"} + {cellValues.row.leader && String(cellValues.row.leader) !== "1" && ""} +
    + + ); + } + }, + { + field: 'civilite', headerName: 'Civilite', hide: false, Width: 100, + valueFormatter: (params) => { + if (params.value) + return String(params.value)[0].toUpperCase() + String(params.value).slice(1); + else + return "" + + }, + }, + { field: 'nom', headerName: 'Nom', flex: 1, hide: false, minWidth: 180, renderCell: (params) => , }, + { field: 'prenom', headerName: 'Prenom', flex: 1, hide: false, minWidth: 180, renderCell: (params) => , }, + { field: 'email', headerName: 'Email', flex: 1, hide: false, minWidth: 180, renderCell: (params) => , }, + { field: 'role', headerName: 'Rôle', flex: 1, hide: false, minWidth: 180, renderCell: (params) => , }, + + { + field: "delete", headerName: 'Supprimer', disableExport: true, + renderCell: (cellValues) => { + return ( + <> + {String(props.check_user_acces_right("jury", "write")) === "1" && { + + // handleClick_delete(event, cellValues); + }} + > + + + } + modal + nested + position="center center" + > + {close => ( +
    + +
    MySy Information
    +
    + {' '} + + En confirmant cette opération, la personne sera supprimée de l'équipe .
    + + + +
    +
    +
    + + +
    +
    + +
    +
    +
    + )} +
    } + + + + ); + } + } + + ] + + const columns_jury_seance_planning = [ + { field: '_id', headerName: '_id', hide: true }, + { field: 'id', headerName: 'id', hide: true }, + + { field: 'jury_soutenance_id', headerName: 'jury_soutenance_id', hide: true }, + { field: 'jury_session_id', headerName: 'jury_session_id', hide: true }, + + + { field: 'event_title', headerName: 'Titre', hide: true }, + { + field: 'event_start', headerName: 'Debut', flex: 1, hide: false, editable: false, + valueFormatter: (params) => { + return moment(params.value).format('D/MM/YYYY - H:mm'); + } + }, + { + field: 'event_end', headerName: 'Fin', flex: 1, hide: false, editable: false, + valueFormatter: (params) => { + return moment(params.value).format('D/MM/YYYY - H:mm'); + } + }, + { + field: 'convocation_apprenant_send', headerName: 'Conv. Envoyé', flex: 1, hide: false, minWidth: 180, renderCell: (params) => , + renderCell: (cellValues) => { + return ( +
    + + {cellValues.row.convocation_apprenant_send && String(cellValues.row.convocation_apprenant_send) === "1" && "Oui"} + {cellValues.row.convocation_apprenant_send && String(cellValues.row.convocation_apprenant_send) === "0" && "Non"} + +
    + + ); + } + }, + { field: 'convocation_apprenant_date_sending', headerName: 'Date Envoi Conv.', flex: 1, hide: false, minWidth: 180, renderCell: (params) => , }, + { + field: "apprenant", headerName: 'Apprenant', disableExport: true, + renderCell: (cellValues) => { + return ( + + ); + } + }, + + { + field: "delete", headerName: 'Supprimer', disableExport: true, + renderCell: (cellValues) => { + return ( + + ); + } + }, + + { + field: 'gestion', headerName: 'Gestion', minWidth: 50, flex: 1, maxWidth: 100, hideable: true, hide: false, editable: false, align: "center", + renderCell: (cellValues) => { + return ( +
    + {String(props.check_user_acces_right("jury", "write")) === "1" && } +
    + ); + }, + }, + + + + { field: 'event_comment', headerName: 'Comment', flex: 1, hide: true, editable: false, }, + + ] + + const columns_jury_seance_participant = [ + { field: '_id', headerName: '_id', hide: true, Width: 0 }, + { field: 'id', headerName: 'id', hide: true, Width: 0 }, + { field: 'ue_id', headerName: 'ue_id', hide: true, Width: 0 }, + { field: 'ue_code', headerName: 'UE', hide: true, Width: 0 }, + + { field: 'email', headerName: 'email', flex: 1, hide: false, minWidth: 180, renderCell: (params) => , }, + { field: 'nom', headerName: 'nom', flex: 1, hide: false, minWidth: 180, renderCell: (params) => , }, + { field: 'prenom', headerName: 'prenom', flex: 1, hide: false, minWidth: 180, renderCell: (params) => , }, + + + { + field: "delete", headerName: 'Supprimer', disableExport: true, + renderCell: (cellValues) => { + return ( + + ); + } + } + + ] + + + const [working_cellValues, setworking_cellValues] = useState(false); + + const [dialogOpen_supp, setdialogOpen_supp] = useState(false); + const Dialog_menuitem_close_supp = () => { + setdialogOpen_supp(false) + }; + + + const options_menu_vertical = [ + 'Apprenants', + 'Supprimer', + 'Jury Edit', + ]; + + + const ITEM_HEIGHT = 48; + + + const [anchorEl, setAnchorEl] = React.useState(null); + const open = Boolean(anchorEl); + const handleClick_option_button_vertical = (event) => { + setAnchorEl(event.currentTarget); + }; + const handleClose_option_button_vertical = (event, value) => { + setAnchorEl(null); + }; + + + + const [selectionModel_jury_seance_participants, setselectionModel_jury_seance_participants] = React.useState([]); + + const [selectionModel_columns_jury_seance, setselectionModel_columns_jury_seance] = React.useState([]); + + + const [selectionModel_columns_jury, setselectionModel_columns_jury] = React.useState([]); + const [selectionModel_columns_jury_membre, setselectionModel_columns_jury_membre] = React.useState([]); + + const [New_Getall_Training_Employee_No_Filter_result, setNew_Getall_Training_Employee_No_Filter_result] = useState([]); + + const [Getall_Training_Employee_No_Filter_api, setGetall_Training_Employee_No_Filter_api] = useState(); + const [Getall_Training_Employee_No_Filter_message, setGetall_Training_Employee_No_Filter_message] = useState(); + const [Getall_Training_Employee_No_Filter_result, setGetall_Training_Employee_No_Filter_result] = useState([]); + function Getall_Training_Employee_No_Filter(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_Ressource_Humaine_no_filter/"; + + + + axios.post(myurl, form).then(res => { + + setLoading(true); + + if (String(res.data.status) === String("true")) { + setLoading(false); + //console.log(" In Getall_Training_Employee_No_Filter res.data.status = " + res.data.status); + //console.log(" In Getall_Training_Employee_No_Filter res.data.message r_class = " + res.data.message); + setGetall_Training_Employee_No_Filter_api("true"); + setGetall_Training_Employee_No_Filter_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_nom = JSON.parse(x).nom; + var local_prenom = JSON.parse(x).prenom; + var local_ismanager = JSON.parse(x).ismanager; + + + //--- + var node = { + "_id": local_id, + "id": localid, + "label": local_nom + " " + local_prenom, + "nom": local_nom, + "prenom": local_prenom, + "ismanager": local_ismanager + }; + new_data2.push(node); + }); + + //--- + var node = { + "_id": "", + "id": "", + "label": "", + "nom": "", + "prenom": "", + "ismanager": "" + + }; + new_data2.push(node); + + if (new_data2.length > 0) + setNew_Getall_Training_Employee_No_Filter_result(new_data2); + + } + else { + setGetall_Training_Employee_No_Filter_api("false"); + setGetall_Training_Employee_No_Filter_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_Training_Employee_No_Filter = ', error); + setGetall_Training_Employee_No_Filter_api("false"); + alert(" Impossible de recuperer la liste des employés"); + //setmyApimyApiMessage("") + }) + } + + const [Delete_Given_Jury_api, setDelete_Given_Jury_api] = useState(); + const [Delete_Given_Jury_message, setDelete_Given_Jury_message] = useState(); + const [Delete_Given_Jury_result, setDelete_Given_Jury_result] = useState(); + function Delete_Given_Jury(local_grp_id) { + + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("_id", local_grp_id); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Delete_Jury/"; + + axios.post(myurl, form).then(res => { + //console.log(" In Delete_Given_Jury res.data.status = " + res.data.status); + //console.log(" In Delete_Given_Jury res.data.message r_class = " + res.data.message); + + if (String(res.data.status) === String("true")) { + setDelete_Given_Jury_api("true"); + setDelete_Given_Jury_result(res.data.message); + + Getall_Partner_Jury(); + setdisplay_jury(""); + setequipe_data_changed(""); + setequipe_data_edit_mode(""); + setadd_one_jury(""); + + + setselected_id(""); + setgridline_id(""); + + setsubmenu(""); + + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + + } + else { + setDelete_Given_Jury_api("false"); + setDelete_Given_Jury_message(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); + } + + }).catch((error) => { + + console.warn('Delete_Given_Jury : Not good man :( mysearchtext = ' + error); + setDelete_Given_Jury_api("false"); + alert(" Impossible de supprimer le jury "); + }) + } + + const [Delete_Given_Jury_Apprenant_api, setDelete_Given_Jury_Apprenant_api] = useState(); + const [Delete_Given_Jury_Apprenant_message, setDelete_Given_Jury_Apprenant_message] = useState(); + const [Delete_Given_Jury_Apprenant_result, setDelete_Given_Jury_Apprenant_result] = useState(); + function Delete_Given_Jury_Apprenant(local_jury_apprenant_id) { + + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("jury_id", selected_id); + form.append("tab_ids", local_jury_apprenant_id); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Delete_Jury_Apprenant_Membres/"; + setLoading(true); + axios.post(myurl, form).then(res => { + //console.log(" In Delete_Given_Jury_Apprenant res.data.status = " + res.data.status); + //console.log(" In Delete_Given_Jury_Apprenant res.data.message r_class = " + res.data.message); + + setLoading(false); + if (String(res.data.status) === String("true")) { + setDelete_Given_Jury_Apprenant_api("true"); + setDelete_Given_Jury_Apprenant_result(res.data.message); + + Get_Jury_List_Apprenant_Seance(selected_agenda_id, selected_jury_soutenance_id); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + + } + else { + setDelete_Given_Jury_Apprenant_api("false"); + setDelete_Given_Jury_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('Delete_Given_Jury_Apprenant : Not good man :( mysearchtext = ' + error); + setDelete_Given_Jury_Apprenant_api("false"); + alert(" Impossible de supprimer l'apprenant "); + }) + } + + + + const [Delete_Given_Jury_Seance_api, setDelete_Given_Jury_Seance_api] = useState(); + const [Delete_Given_Jury_Seance_message, setDelete_Given_Jury_Seance_message] = useState(); + const [Delete_Given_Jury_Seance_result, setDelete_Given_Jury_Seance_result] = useState(); + function Delete_Given_Jury_Seance(local_jury_soutenance_id) { + + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("jury_id", selected_id); + form.append("jury_soutenance_id", local_jury_soutenance_id); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Delete_Jury_Seance/"; + setLoading(true); + axios.post(myurl, form).then(res => { + //console.log(" In Delete_Given_Jury_Seance res.data.status = " + res.data.status); + //console.log(" In Delete_Given_Jury_Seance res.data.message r_class = " + res.data.message); + + setLoading(false); + if (String(res.data.status) === String("true")) { + setDelete_Given_Jury_Seance_api("true"); + setDelete_Given_Jury_Seance_result(res.data.message); + + Get_List_Agenda_Events_For_Given_User(selected_id); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + + } + else { + setDelete_Given_Jury_Seance_api("false"); + setDelete_Given_Jury_Seance_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('Delete_Given_Jury_Seance : Not good man :( mysearchtext = ' + error); + setDelete_Given_Jury_Seance_api("false"); + alert(" Impossible de supprimer la Soutenance "); + }) + } + + + + function GetSelectedRows_Jury_Membres_Ids() { + + + var tab_tmp = [] + for (var i = 0; i < selectionModel_columns_jury_membre.length; i++) { + //console.log(" ### selectionModel_insc[i] = ", selectionModel_insc[i]); + var myid = parseInt(String(selectionModel_columns_jury_membre[i])); + //var line = JSON.parse(rowss[myid]); + tab_tmp.push(myid); + } + return tab_tmp; + + } + + async function actionmass_jury_membre_Traitemet() { + + var liste_membre_id = GetSelectedRows_Jury_Membres_Ids(); + var tab_mongo_members_ids = []; + + for (var i = 0; i < liste_membre_id.length; i++) { + + var line = New_Getall_Jury_Members[liste_membre_id[i]] + + + var line_json = line; + //console.log(" line_json['prenom'] = ", line_json['prenom']); + //console.log(" line_json['_id'] = ", line_json['_id']); + tab_mongo_members_ids.push(line_json['_id']) + + } + + if (String(actionmass_jury_membre_val) === String("delete_jury_membre")) { + Delete_List_Membre_From_Jury(tab_mongo_members_ids); + + } + } + + + const [New_Getall_Partner_Jury_result, setNew_Getall_Partner_Jury_result] = useState([]); + + const [Getall_Partner_Jury_api, setGetall_Partner_Jury_api] = useState(); + const [Getall_Partner_Jury_message, setGetall_Partner_Jury_message] = useState(); + const [Getall_Partner_Jury_result, setGetall_Partner_Jury_result] = useState([]); + function Getall_Partner_Jury(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_Jury/"; + + axios.post(myurl, form).then(res => { + + if (String(res.data.status) === String("true")) { + //console.log(" In Getall_Partner_Jury res.data.status = " + res.data.status); + //console.log(" In Getall_Partner_Jury res.data.message r_class = " + res.data.message); + setGetall_Partner_Jury_api("true"); + setGetall_Partner_Jury_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_description = JSON.parse(x).description; + var local_email_jury = JSON.parse(x).email_jury; + var local_chef_jury_id = JSON.parse(x).chef_jury_id; + var local_chef_jury_nom_prenom = JSON.parse(x).chef_jury_nom_prenom; + var local_nb_membre = JSON.parse(x).nb_membre; + var local_session_id = JSON.parse(x).session_id; + + + //--- + var node = { + "_id": local_id, + "id": localid, + "label": local_code, + "code": local_code, + "description": local_description, + "email_jury": local_email_jury, + "chef_jury_id": local_chef_jury_id, + "chef_jury_nom_prenom": local_chef_jury_nom_prenom, + "nb_membre": local_nb_membre, + "session_id": local_session_id, + }; + new_data2.push(node); + }); + + //--- + var node = { + "_id": "", + "_id": "", + "id": "", + "label": "", + "code": "", + "description": "", + "email_jury": "", + "chef_jury_id": "", + "chef_jury_nom_prenom": "", + "nb_membre": "", + "session_id": "", + + }; + new_data2.push(node); + + if (new_data2.length > 0) + setNew_Getall_Partner_Jury_result(new_data2); + + } + else { + setGetall_Partner_Jury_api("false"); + setGetall_Partner_Jury_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_Jury = ', error); + setGetall_Partner_Jury_api("false"); + alert(" Impossible de recuperer la liste des jurys"); + //setmyApimyApiMessage("") + }) + } + + const New_Option = [ + { "id": "0", "label": "Supprimer", "value": "supprimer" }, + { "id": "2", "label": "Conv. Membre Jury", "value": "convocation_jury" }, + ] + + + const New_Option_Jury_Seance = [ + { "id": "0", "label": "Supprimer", "value": "supprimer" }, + { "id": "1", "label": "Conv. Apprenant", "value": "convocation_apprenant" }, + ] + + const New_Option_jury_membre = [ + { "id": "delete_jury_membre", "label": "Supprimer les membres", "value": "delete_jury_membre" }, + { "id": "convocation", "label": "Env. Convocation", "value": "convocation" }, + { "id": "", "label": "", "value": "" }, + ] + const [actionmass_ftion_val, setactionmass_ftion_val] = useState(); + + const actionmass_ftion = (event) => { + const value = event.target.value; + + + if (String(value) === "supprimer") { + setactionmass_ftion_val(value); + } + else { + setactionmass_ftion_val(); + } + } + + const [actionmass_jury_seance, setactionmass_jury_seance] = useState(); + + const func_actionmass_jury_seance = (event) => { + const value = event.target.value; + + + if (String(value) === "supprimer") { + actionmass_jury_seance(value); + } + else if (String(value) === "convocation_apprenant") { + actionmass_jury_seance(value); + } + else { + actionmass_jury_seance(); + } + } + + + const [actionmass_jury_membre, setactionmass_jury_membre] = useState(); + + const func_actionmass_jury_membre = (event) => { + const value = event.target.value; + + + if (String(value) === "supprimer") { + setactionmass_jury_membre(value); + } + else if (String(value) === "convocation_membre") { + setactionmass_jury_membre(value); + } + else { + setactionmass_jury_membre(); + } + } + + + + const [history_securite_read, sethistory_securite_read] = useState(""); + + useEffect(() => { + Getall_Training_Employee_No_Filter(); + Getall_Partner_Jury(); + + sethistory_securite_read(props.check_user_acces_right("historique", "read")) + + Getall_Partner_Site_Formation(); + + Getall_TrainingSession(); + + window.scrollTo({ + top: 0, + behavior: "smooth", + }); + + }, []) + + + + const [New_Getall_Partner_Site_Formation_result, setNew_Getall_Partner_Site_Formation_result] = useState([]); + + const [Getall_Partner_Site_Formation_api, setGetall_Partner_Site_Formation_api] = useState(); + const [Getall_Partner_Site_Formation_message, setGetall_Partner_Site_Formation_message] = useState(); + const [Getall_Partner_Site_Formation_result, setGetall_Partner_Site_Formation_result] = useState([]); + function Getall_Partner_Site_Formation(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_Site_Formation_with_filter/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + + if (String(res.data.status) === String("true")) { + //console.log(" In Getall_Partner_Site_Formation res.data.status = " + res.data.status); + //console.log(" In Getall_Partner_Site_Formation res.data.message r_class = " + res.data.message); + setGetall_Partner_Site_Formation_api("true"); + setGetall_Partner_Site_Formation_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_site = JSON.parse(x).code_site; + var local_nom_site = JSON.parse(x).nom_site; + var local_adr_site = JSON.parse(x).site_adr; + var local_cp_site = JSON.parse(x).site_cp; + var local_ville_site = JSON.parse(x).site_ville; + var local_pays_site = JSON.parse(x).site_pays; + + + //--- + var node = { + "_id": local_id, + "id": localid, + "label": local_code_site, + "code_site": local_code_site, + "nom_site": local_nom_site, + "adr_site": local_adr_site, + "cp_site": local_cp_site, + "ville_site": local_ville_site, + "pays_site": local_pays_site, + + + }; + new_data2.push(node); + }); + + //--- + var node = { + "_id": "", + "id": "", + "label": "", + "code_site": "", + "nom_site": "", + "adr_site": "", + "cp_site": "", + "ville_site": "", + "pays_site": "", + + }; + new_data2.push(node); + + + if (new_data2.length > 0) + setNew_Getall_Partner_Site_Formation_result(new_data2); + + + } + else { + setGetall_Partner_Site_Formation_api("false"); + setGetall_Partner_Site_Formation_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_Partner_Site_Formation = ', error); + setGetall_Partner_Site_Formation_api("false"); + alert(" Impossible de recuperer la liste des sites de formation"); + //setmyApimyApiMessage("") + }) + } + + const [New_Get_List_UE_From_Session_Id_result, setNew_Get_List_UE_From_Session_Id_result] = useState([]); + + const [Get_List_UE_From_Session_Id_api, setGet_List_UE_From_Session_Id_api] = useState(); + const [Get_List_UE_From_Session_Id_message, setGet_List_UE_From_Session_Id_message] = useState(); + const [Get_List_UE_From_Session_Id_result, setGet_List_UE_From_Session_Id_result] = useState([]); + function Get_List_UE_From_Session_Id(local_session_id) { + + var form = new FormData(); + + + 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_List_Unite_Enseignement_Of_Given_Class_From_Session_Id/"; + + setLoading(true); + + axios.post(myurl, form).then(res => { + + + setLoading(false); + if (String(res.data.status) === String("true")) { + //console.log(" In Get_List_UE_From_Session_Id res.data.status = " + res.data.status); + //console.log(" In Get_List_UE_From_Session_Id res.data.message r_class = " + res.data.message); + setGet_List_UE_From_Session_Id_api("true"); + setGet_List_UE_From_Session_Id_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_class_id = JSON.parse(x).class_id; + var local_internal_url = JSON.parse(x).internal_url; + + + + + //--- + var node = { + "_id": local_id, + "id": localid, + "label": local_code, + "code": local_code, + "titre": local_titre, + "class_id": local_class_id, + "internal_url": local_internal_url, + + }; + new_data2.push(node); + }); + + //--- + var node = { + "_id": "", + "id": "", + "label": "", + "code": "", + "titre": "", + "class_id": "", + "internal_url": "", + + }; + new_data2.push(node); + + if (new_data2.length > 0) + setNew_Get_List_UE_From_Session_Id_result(new_data2); + } + else { + setGet_List_UE_From_Session_Id_api("false"); + setGet_List_UE_From_Session_Id_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 :( Get_List_UE_From_Session_Id = ', error); + setGet_List_UE_From_Session_Id_api("false"); + // alert(" Impossible de recuperer la liste des UE de la formation"); + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de recuperer la liste des UE de la formation"); + setalert_type("error"); + //setmyApimyApiMessage("") + }) + } + + 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)) + } + + const New_Option_Filter = [ + { "id": "code", "label": "Code Equipe ", "value": "code" }, + { "id": "description", "label": "Description ", "value": "description" }, + { "id": "membre", "label": "Nom / Prenom membre ", "value": "membre" }, + { "id": "", "label": "", "value": "" }, + { "id": "1", "label": "", "value": "1" }, // Cette ligne pour couvrir l'ajout d'une ligne de filter. C'est fait expres. + ] + + + async function Disable_Jury_DetailFields() { + await sleep(5); + setequipe_data_edit_mode("0"); + + var liste_champs = ['detail_code', 'detail_description', 'detail_email_diffusion', 'detail_responsable', 'detail_session_id', + 'detail_jury_matiere', 'detail_jury_cible', 'detail_adresse', 'detail_code_postal', 'detail_ville', 'detail_pays', + 'detail_site_formation', 'detail_salle'] + + + for (let i = 0; i < liste_champs.length; i++) { + + if (document.getElementsByName(String(liste_champs[i])) && document.getElementsByName(String(liste_champs[i]))[0]) { + document.getElementsByName(String(liste_champs[i]))[0].disabled = true; + document.getElementsByName(String(liste_champs[i]))[0].style.backgroundColor = "#ECEFF1"; + + } + } + + } + + + function handleClick_edit_jury_From_Line(selected_row_id) { + + var line = New_Getall_Partner_Jury_result[selected_row_id]; + + setselected_id(line._id); + setgridline_id(selected_row_id); + + Get_Given_Jury_Data(line._id); + Get_List_Agenda_Events_For_Given_User(line._id); + + setdisplay_jury("1"); + setadd_one_jury(""); + setequipe_data_changed(""); + setequipe_data_edit_mode(""); + submenu_detail(); + + //Getall_Evaluation_Participant_List(); + + } + + + const [New_Employee_Not_Member, setNew_Employee_Not_Member] = useState([]); + + const [New_List_Jury_Members_Id, setNew_List_Jury_Members_Id] = useState([]); + const [New_Getall_Jury_Members, setNew_Getall_Jury_Members] = useState([]); + + const [Get_Given_Jury_Data_api, setGet_Given_Jury_Data_api] = useState(); + const [Get_Given_Jury_Data_message, setGet_Given_Jury_Data_message] = useState(); + const [Get_Given_Jury_Data_result, setGet_Given_Jury_Data_result] = useState([]); + function Get_Given_Jury_Data(equipe_id) { + setequipe_data_changed(""); + setequipe_data_edit_mode(""); + + + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("_id", equipe_id); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Given_Jury_With_Members/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + + if (String(res.data.status) === "true") { + setLoading(false); + //console.log(" In Get_Given_Jury_Data res.data.status = " + res.data.status); + //console.log(" In Get_Given_Jury_Data res.data.message r_class = " + res.data.message); + setGet_Given_Jury_Data_api("true"); + setGet_Given_Jury_Data_result(res.data.message); + + if (res.data.message.length > 0) { + var mylocal_groupe = JSON.parse(res.data.message); + + if (mylocal_groupe.code) + setp_detail_code(mylocal_groupe.code); + else + setp_detail_code(""); + + if (mylocal_groupe.email_jury) { + setp_detail_email_jury(mylocal_groupe.email_jury); + } else { + setp_detail_email_jury(""); + } + + if (mylocal_groupe.session_id) { + setselected_session_id(mylocal_groupe.session_id); + } else { + setselected_session_id(""); + } + + + if (mylocal_groupe.description) { + setp_detail_description(mylocal_groupe.description); + } else { + setp_detail_description(""); + } + + if (mylocal_groupe.chef_jury_id) { + setp_detail_chef_jury_id(mylocal_groupe.chef_jury_id); + } else { + setp_detail_chef_jury_id(""); + } + + + if (mylocal_groupe.adresse) { + setp_detail_adresse(mylocal_groupe.adresse); + } else { + setp_detail_adresse(""); + } + + if (mylocal_groupe.code_postal) { + setp_detail_code_postal(mylocal_groupe.code_postal); + } else { + setp_detail_code_postal(""); + } + + if (mylocal_groupe.ville) { + setp_detail_ville(mylocal_groupe.ville); + } else { + setp_detail_ville(""); + } + + if (mylocal_groupe.pays) { + setp_detail_pays(mylocal_groupe.pays); + } else { + setp_detail_pays(""); + } + + if (mylocal_groupe.site_formation_id) { + setp_detail_site_formation_id(mylocal_groupe.site_formation_id); + } else { + setp_detail_site_formation_id(""); + } + + if (mylocal_groupe.jury_salle) { + setp_detail_salle(mylocal_groupe.jury_salle); + } else { + setp_detail_salle(""); + } + + + var new_data2 = []; + const new_data = res.data.message.map((x) => { + + //--- + var tab_employe_not_member = []; + + var local_jury_membres = JSON.parse(x).list_membre; + setNew_Getall_Jury_Members(local_jury_membres); + + var local_all_Training_Employee = New_Getall_Training_Employee_No_Filter_result; + + for (var i = 0; i < local_all_Training_Employee.length; i++) { + + var is_member = "0"; + + for (var x = 0; x < local_jury_membres.length; x++) { + if (local_all_Training_Employee[i]._id === local_jury_membres[x].rh_id) { + is_member = "1" + } + } + + if (is_member === "0") { + // console.log(" NOT MEMBER = ", local_all_Training_Employee[i]); + tab_employe_not_member.push(local_all_Training_Employee[i]); + } + + + } + + setNew_Employee_Not_Member(tab_employe_not_member); + + }); + + + if (document.getElementById('myRef')) { + var divh = document.getElementById('myRef').offsetTop; + window.scrollTo({ + top: divh, + behavior: "smooth", + }); + } + + Disable_Jury_DetailFields(); + } else { + alert(" Aucune donnée recuperée"); + } + + + } else if (String(res.data.status) === String("Err_Connexion")) { + alert('Erreur: ' + res.data.message); + history.push("/Connexion"); + } + + else { + setLoading(false); + setGet_Given_Jury_Data_api("false"); + setGet_Given_Jury_Data_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 :( Get_Given_Jury_Data = ', error); + setGet_Given_Jury_Data_api("false"); + alert(" Impossible de recuperer les données du jurys"); + //setmyApimyApiMessage("") + }) + } + + + 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 [Add_Update_Jury_Data_api, setAdd_Update_Jury_Data_api] = useState(); + const [Add_Update_Jury_Data_message, setAdd_Update_Jury_Data_message] = useState(); + const [Add_Update_Jury_Data_result, setAdd_Update_Jury_Data_result] = useState([]); + function Add_Update_Jury_Data() { + var form = new FormData(); + //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + + form.append("code", p_detail_code); + form.append("session_id", selected_session_id); + form.append("description", p_detail_description); + form.append("email_jury", p_detail_email_jury); + form.append("chef_jury_id", p_detail_chef_jury_id); + + form.append("cible", selected_jury_cible); + form.append("ue_id", selected_ue_id); + + form.append("adresse", p_detail_adresse); + form.append("adresse", p_detail_adresse); + form.append("code_postal", p_detail_code_postal); + form.append("ville", p_detail_ville); + form.append("pays", p_detail_pays); + form.append("site_formation_id", p_detail_site_formation_id); + form.append("jury_salle", p_detail_salle); + + + var myurl = ""; + + if (selected_id && String(selected_id).length > 5) { + form.append("_id", selected_id); + myurl = process.env.REACT_APP_API_URL + "myclass/api/Update_Jury/"; + } else { + myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Jury/"; + } + + + + setLoading(true); + axios.post(myurl, form).then(res => { + //console.log(" In Add_Update_Jury_Data res.data.status = " + res.data.status); + //console.log(" In Add_Update_Jury_Data res.data.message r_class = " + res.data.message); + + setLoading(false); + + if (String(res.data.status) === String("true")) { + setAdd_Update_Jury_Data_api("true"); + setAdd_Update_Jury_Data_result(res.data.message); + Disable_Jury_DetailFields(); + setequipe_data_changed(""); + setequipe_data_edit_mode(""); + clear_DetailFieds(); + + if (selected_id && String(selected_id).length > 5) { + handleClick_edit_jury_From_Line(gridline_id); + Disable_Jury_DetailFields(); + setequipe_data_changed(""); + setequipe_data_edit_mode(""); + + setdisplay_jury('1'); + if (document.getElementById('myRef')) { + // myRef.current.scrollIntoView({ behavior: "smooth" }); + var divh = document.getElementById('myRef').offsetTop; + window.scrollTo({ + top: divh, + behavior: "smooth", + }); + } + + } else { + Disable_Jury_DetailFields(); + setequipe_data_changed(""); + setequipe_data_edit_mode(""); + setdisplay_jury(""); + setadd_one_jury(""); + setsubmenu(""); + + + window.scrollTo({ + top: 0, + behavior: "smooth", + }); + + } + + + Getall_Partner_Jury(); + + + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + + + + } + else { + setAdd_Update_Jury_Data_api("false"); + setAdd_Update_Jury_Data_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 :( Add_Update_Jury_Data = ' + error); + setAdd_Update_Jury_Data_api("false"); + alert(" Impossible d'ajouter ou mettre à jour les données du jury "); + + }) + } + + + const [Add_Update_Jury_Soutenance_Data_api, setAdd_Update_Jury_Soutenance_Data_api] = useState(); + const [Add_Update_Jury_Soutenance_Data_message, setAdd_Update_Jury_Soutenance_Data_message] = useState(); + const [Add_Update_Jury_Soutenance_Data_result, setAdd_Update_Jury_Soutenance_Data_result] = useState([]); + function Add_Update_Jury_Soutenance_Data() { + var form = new FormData(); + //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + + form.append("jury_id", selected_id); + form.append("jury_soutenance_id", selected_jury_soutenance_id); + form.append("agenda_id", selected_agenda_id); + form.append("sujet", p_detail_soutenance_sujet); + form.append("note", p_detail_soutenance_note); + form.append("observation", p_detail_soutenance_observation); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Update_Jury_Soutenance/"; + + + setLoading(true); + axios.post(myurl, form).then(res => { + //console.log(" In Add_Update_Jury_Soutenance_Data res.data.status = " + res.data.status); + //console.log(" In Add_Update_Jury_Soutenance_Data res.data.message r_class = " + res.data.message); + + setLoading(false); + + if (String(res.data.status) === String("true")) { + setAdd_Update_Jury_Soutenance_Data_api("true"); + setAdd_Update_Jury_Soutenance_Data_result(res.data.message); + Disable_Jury_Soutenance_DetailFields(); + + + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + + + + } + else { + setAdd_Update_Jury_Soutenance_Data_api("false"); + setAdd_Update_Jury_Soutenance_Data_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 :( Add_Update_Jury_Soutenance_Data = ' + error); + setAdd_Update_Jury_Soutenance_Data_api("false"); + alert(" Impossible d'ajouter ou mettre à jour les données de la soutenance du jury "); + + }) + } + + + const [Add_Member_To_Jury_api, setAdd_Member_To_Jury_api] = useState(); + const [Add_Member_To_Jury_message, setAdd_Member_To_Jury_message] = useState(); + const [Add_Member_To_Jury_result, setAdd_Member_To_Jury_result] = useState([]); + function Add_Member_To_Jury() { + + var tab_rh_ids = []; + for (var i = 0; i < tab_selected_users.length; i++) { + + var local_rh_id = tab_selected_users[i]._id; + tab_rh_ids.push(local_rh_id); + } + + + var form = new FormData(); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("_id", selected_id); + form.append("tab_ressource_humaine_ids", tab_rh_ids); + form.append("role", p_detail_member_role); + + + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Update_Jury_Membres/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + //console.log(" In Add_Member_To_Jury res.data.status = " + res.data.status); + //console.log(" In Add_Member_To_Jury res.data.message r_class = " + res.data.message); + + setLoading(false); + + if (String(res.data.status) === String("true")) { + Dialog_Jury_Membre_handleClose_buton(); + setAdd_Member_To_Jury_api("true"); + setAdd_Member_To_Jury_result(res.data.message); + Disable_Jury_DetailFields(); + setequipe_data_changed(""); + setequipe_data_edit_mode(""); + clear_DetailFieds(); + + Get_Given_Jury_Data(selected_id); + + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + + + + } + else { + setAdd_Member_To_Jury_api("false"); + setAdd_Member_To_Jury_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 :( Add_Member_To_Jury = ' + error); + setAdd_Member_To_Jury_api("false"); + alert(" Impossible d'ajouter les membre ou mettre à jour le jury"); + + }) + } + + + const [Add_Apprenant_To_Jury_api, setAdd_Apprenant_To_Jury_api] = useState(); + const [Add_Apprenant_To_Jury_message, setAdd_Apprenant_To_Jury_message] = useState(); + const [Add_Apprenant_To_Jury_result, setAdd_Apprenant_To_Jury_result] = useState([]); + function Add_Apprenant_To_Jury() { + + var tab_inscrit_ids = []; + for (var i = 0; i < tab_selected_apprenant.length; i++) { + + var local_rh_id = tab_selected_apprenant[i]._id; + tab_inscrit_ids.push(local_rh_id); + } + + if (moment(endDate) <= moment(startDate)) { + // alert(" Les dates de début et de fin sont incohérentes"); + setdisplay_alert_mysy("1"); + setalert_message("Les dates de début et de fin sont incohérentes"); + setalert_type("error"); + return; + } + + var new_start_date = moment(startDate).format(); + var new_end_date = moment(endDate).format(); + + + + var form = new FormData(); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("_id", selected_id); + form.append("tab_inscriptions_ids", tab_inscrit_ids); + form.append("agenda_id", selected_agenda_id); + form.append("jury_soutenance_id", selected_jury_soutenance_id); + form.append("jury_seance_ue_id", jury_seance_ue_id); + + form.append("event_start", new_start_date); + form.append("event_end", new_end_date); + + form.append("jury_soutenance_salle", p_detail_soutenance_salle); + form.append("jury_soutenance_adresse", p_detail_soutenance_adresse); + form.append("jury_soutenance_code_postal", p_detail_soutenance_code_postal); + form.append("jury_soutenance_ville", p_detail_soutenance_ville); + form.append("jury_soutenance_pays", p_detail_soutenance_pays); + + + Dialog_Jury_Membre_handleClose_buton(); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Update_Apprenant_To_Jury/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + + //console.log(" In Add_Apprenant_To_Jury res.data.status = " + res.data.status); + //console.log(" In Add_Apprenant_To_Jury res.data.message r_class = " + res.data.message); + + setLoading(false); + + if (String(res.data.status) === String("true")) { + + //console.log(" In Add_Apprenant_To_Jury res.data.message r_class = ", res.data); + setselected_agenda_id(res.data.agenda_id); + setselected_jury_soutenance_id(res.data.soutenance_id); + + setAdd_Apprenant_To_Jury_api("true"); + setAdd_Apprenant_To_Jury_result(res.data.message); + + Get_Jury_List_Apprenant_Seance(res.data.agenda_id, res.data.soutenance_id); + Get_List_Agenda_Events_For_Given_User(selected_id); + + + + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + + settab_selected_apprenant([]); + } + else { + setAdd_Apprenant_To_Jury_api("false"); + setAdd_Apprenant_To_Jury_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 :( Add_Apprenant_To_Jury = ' + error); + setAdd_Apprenant_To_Jury_api("false"); + alert(" Impossible d'ajouter les membre ou mettre à jour les apprenants du jury"); + + }) + } + + + async function submenu_detail() { + + setsubmenu("detail_conseil_classe"); + inactive_active_menu_header("detail_conseil_classe"); + + + if (String(equipe_data_edit_mode) !== "1") { + Disable_Jury_DetailFields(); + } + + } + + async function submenu_membres() { + + setsubmenu("membre"); + inactive_active_menu_header("membre"); + + + if (String(equipe_data_edit_mode) !== "1") { + Disable_Jury_DetailFields(); + } + + } + + async function submenu_piece_jointe() { + + setsubmenu("piece_jointe"); + inactive_active_menu_header("piece_jointe"); + + // Refresh affichage des pièces jointes + Get_List_Of_All_PJ(props.client_id); + + + if (String(equipe_data_edit_mode) !== "1") { + Disable_Jury_DetailFields(); + } + + } + + async function submenu_selection() { + + setsubmenu("selection"); + inactive_active_menu_header("selection"); + + + if (String(equipe_data_edit_mode) !== "1") { + Disable_Jury_DetailFields(); + } + + } + + async function submenu_planning() { + await sleep(5); + setsubmenu("planning"); + inactive_active_menu_header("planning"); + + // Refresh affichage des pièces jointes + Get_List_Of_All_PJ(props.client_id); + + + if (String(equipe_data_edit_mode) !== "1") { + Disable_Jury_DetailFields(); + } + + } + + async function submenu_historique() { + await sleep(5); + setsubmenu("historique"); + inactive_active_menu_header("historique"); + + if (String(equipe_data_edit_mode) !== "1") { + Disable_Jury_DetailFields(); + } + + } + + // Cette fontion desactive tous les menu header et reactive just le menu_header concerné + function inactive_active_menu_header(current_menu_header) { + + + const list_menu_header_names = ['detail_conseil_classe', 'membre', 'piece_jointe', 'historique', 'planning', 'selection'] + for (let i = 0; i < list_menu_header_names.length; i++) { + if (document.getElementsByName(String(list_menu_header_names[i])) && document.getElementsByName(String(list_menu_header_names[i]))[0]) { + document.getElementsByName(String(list_menu_header_names[i]))[0].style.fontWeight = "400"; + document.getElementsByName(String(list_menu_header_names[i]))[0].style.backgroundColor = "#d8edfc"; + document.getElementsByName(String(list_menu_header_names[i]))[0].style.color = "#3b3e40"; + + } + } + + + if (document.getElementsByName(String(current_menu_header)) && document.getElementsByName(String(current_menu_header))[0]) { + document.getElementsByName(String(current_menu_header))[0].style.fontWeight = "700"; + document.getElementsByName(String(current_menu_header))[0].style.backgroundColor = "#107758"; + document.getElementsByName(String(current_menu_header))[0].style.color = "white"; + } + } + + + + // DEBUT EXPORT EXCEL DATAGRID + + function CustomToolbar(props) { + + + return ( + + + + + + + + + + + ); + } + + function getExcelData(apiRef) { + // Select rows and columns + const filteredSortedRowIds = gridFilteredSortedRowIdsSelector(apiRef); + const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef); + + // Format the data. Here we only keep the value + const data = filteredSortedRowIds.map((id) => { + const row = {}; + visibleColumnsField.forEach((field) => { + row[field] = apiRef.current.getCellParams(id, field).value; + }); + return row; + }); + + return data; + } + + + function ExportButton(props) { + return ( + + + + ); + } + + function handleExport(apiRef, data_colums) { + const data = getExcelData(apiRef); + const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef); + + + const local_config = { + keys: visibleColumnsField, + + columnNames: data_colums.filter((mydata) => (mydata).disableExport !== true).map(function (mydata) { + if (mydata.headerName && visibleColumnsField.includes(mydata.field)) { + if (mydata.headerName) { + return mydata.headerName; + } + } + + }), + + fileName: 'data_' + String(new Date().toJSON().slice(0, 10)).replaceAll("-", "_") + '.xlsx', + sheetName: 'Export_' + String(new Date().toJSON().slice(0, 10)).replaceAll("-", "_"), + }; + + local_config.columnNames = local_config.columnNames.filter(function (element) { + return element !== undefined; + }); + + + const rows = data.map((row) => { + const mRow = {}; + for (const key of local_config.keys) { + mRow[key] = row[key]; + } + return mRow; + }); + + const worksheet = XLSX.utils.json_to_sheet(rows); + XLSX.utils.sheet_add_aoa(worksheet, [[...local_config.columnNames]], { + origin: 'A1', + }); + + const workbook = XLSX.utils.book_new(); + XLSX.utils.book_append_sheet(workbook, worksheet, local_config.sheetName); + XLSX.writeFile(workbook, local_config.fileName, { compression: true }); + } + + function ExportMenuItem(props) { + const apiRef = useGridApiContext(); + const { hideMenu } = props; + + return ( + { + handleExport(apiRef, props.data_colums); + // Hide the export menu after the export + hideMenu?.(); + }} + > + Export Excel + + ); + } + + // FIN EXPORT EXCEL DATAGRID + + + const [display_alert_mysy, setdisplay_alert_mysy] = useState(""); + const [alert_message, setalert_message] = useState(""); + const [alert_type, setalert_type] = useState(""); + + function clear_alert_message() { + setalert_message(""); + } + function clear_alert_type() { + setalert_type(""); + } + + function clear_display_alert_mysy() { + setdisplay_alert_mysy(""); + } + + function Ajout_1_jury() { + + clear_DetailFieds(); + + setdisplay_jury(""); + setequipe_data_changed(""); + setequipe_data_edit_mode(""); + + setselected_id(""); + setgridline_id(""); + setadd_one_jury("1"); + setsubmenu("detail_conseil_classe"); + + if (document.getElementById('myRef')) { + // myRef.current.scrollIntoView({ behavior: "smooth" }); + var divh = document.getElementById('myRef').offsetTop; + window.scrollTo({ + top: divh, + behavior: "smooth", + }); + } + + } + + + function Annule_Add_One_Jury_DetailFields() { + + clear_DetailFieds(); + + setdisplay_jury(""); + setequipe_data_changed(""); + setequipe_data_edit_mode(""); + setadd_one_jury(""); + + + setselected_id(""); + setgridline_id(""); + + setsubmenu(""); + + window.scrollTo({ + top: 0, + behavior: "smooth", + }); + + + } + + function Annule_Jury_DetailFields() { + Get_Given_Jury_Data(selected_id); + setequipe_data_changed(""); + setequipe_data_edit_mode(""); + } + + + function Enable_Jury_DetailFields() { + setequipe_data_edit_mode("1"); + + var liste_champs = ['detail_code', 'detail_description', 'detail_email_diffusion', 'detail_responsable', 'detail_session_id', + 'detail_jury_matiere', 'detail_jury_cible', 'detail_adresse', 'detail_code_postal', 'detail_ville', 'detail_pays', + 'detail_site_formation', 'detail_salle'] + + for (let i = 0; i < liste_champs.length; i++) { + if (document.getElementsByName(String(liste_champs[i])) && document.getElementsByName(String(liste_champs[i]))[0]) { + document.getElementsByName(String(liste_champs[i]))[0].disabled = false; + document.getElementsByName(String(liste_champs[i]))[0].style.backgroundColor = "#FFFFFF"; + + } + } + } + + + function Enable_Jury_Soutenance_DetailFields() { + setsoutenance_data_edit_mode("1"); + + var liste_champs = ['detail_soutenance_sujet', 'detail_soutenance_observation', 'detail_soutenance_note'] + + for (let i = 0; i < liste_champs.length; i++) { + if (document.getElementsByName(String(liste_champs[i])) && document.getElementsByName(String(liste_champs[i]))[0]) { + document.getElementsByName(String(liste_champs[i]))[0].disabled = false; + document.getElementsByName(String(liste_champs[i]))[0].style.backgroundColor = "#FFFFFF"; + + } + } + } + + async function Disable_Jury_Soutenance_DetailFields() { + + + setsoutenance_data_edit_mode("0"); + await sleep(5); + var liste_champs = ['detail_soutenance_sujet', 'detail_soutenance_observation', 'detail_soutenance_note'] + + for (let i = 0; i < liste_champs.length; i++) { + + if (document.getElementsByName(String(liste_champs[i])) && document.getElementsByName(String(liste_champs[i]))[0]) { + document.getElementsByName(String(liste_champs[i]))[0].disabled = true; + document.getElementsByName(String(liste_champs[i]))[0].style.backgroundColor = "#ECEFF1"; + } + } + + } + + + + + function Annule_Jury_Soutenance_DetailFields() { + + Get_Jury_List_Apprenant_Soutenance(selected_agenda_id, selected_jury_soutenance_id); + setsoutenance_data_edit_mode("0"); + setsoutenance_data_changed(""); + Disable_Jury_Soutenance_DetailFields(); + } + + + const [p_detail_code, setp_detail_code] = React.useState(""); + const [p_detail_description, setp_detail_description] = React.useState(""); + const [p_detail_email_jury, setp_detail_email_jury] = React.useState(""); + const [p_detail_chef_jury_id, setp_detail_chef_jury_id] = React.useState(""); + + + const [p_detail_site_formation_id, setp_detail_site_formation_id] = React.useState(""); + + const [p_detail_adresse, setp_detail_adresse] = React.useState(""); + const [p_detail_code_postal, setp_detail_code_postal] = React.useState(""); + const [p_detail_ville, setp_detail_ville] = React.useState(""); + const [p_detail_pays, setp_detail_pays] = React.useState(""); + + const [p_detail_salle, setp_detail_salle] = React.useState(""); + + + const [p_detail_soutenance_adresse, setp_detail_soutenance_adresse] = React.useState(""); + const [p_detail_soutenance_code_postal, setp_detail_soutenance_code_postal] = React.useState(""); + const [p_detail_soutenance_ville, setp_detail_soutenance_ville] = React.useState(""); + const [p_detail_soutenance_pays, setp_detail_soutenance_pays] = React.useState(""); + const [p_detail_soutenance_salle, setp_detail_soutenance_salle] = React.useState(""); + + const [display_jury, setdisplay_jury] = React.useState(""); + const [equipe_data_changed, setequipe_data_changed] = React.useState(""); + const [equipe_data_edit_mode, setequipe_data_edit_mode] = useState(""); + const [add_one_jury, setadd_one_jury] = React.useState(""); + + + function clear_DetailFieds() { + setp_detail_code(""); + setp_detail_description(""); + setselected_session_id(""); + setp_detail_email_jury(""); + setp_detail_chef_jury_id(""); + + setp_detail_adresse(""); + setp_detail_code_postal(""); + setp_detail_ville(""); + setp_detail_pays(""); + setp_detail_site_formation_id(""); + setp_detail_salle(""); + + } + + + function clear_Soutenance_DetailFieds() { + setp_detail_soutenance_sujet(""); + setp_detail_soutenance_observation(""); + setp_detail_soutenance_note(""); + } + + const [p_detail_member_role, setp_detail_member_role] = React.useState(""); + + const [gridline_jury_member_id, setgridline_jury_member_id] = useState(""); + + const [Getall_Partner_Jury_With_Filter_api, setGetall_Partner_Jury_With_Filter_api] = useState(); + const [Getall_Partner_Jury_With_Filter_message, setGetall_Partner_Jury_With_Filter_message] = useState(); + const [Getall_Partner_Jury_With_Filter_result, setGetall_Partner_Jury_With_Filter_result] = useState(); + function Getall_Partner_Jury_With_Filter(event) { + + var form = new FormData(); + + + // Recuperation des parametres + var filtre1 = p_filtre1; + var filtre2 = p_filtre2; + var filtre3 = p_filtre3; + var filtre4 = p_filtre4; + + var filtre1_value = ""; + var filtre2_value = ""; + var filtre3_value = ""; + var filtre4_value = ""; + // Recuperation des valeurs de filtres + + if (p_filtre1_value) { + filtre1_value = p_filtre1_value; + form.append(filtre1, filtre1_value); + } + + if (p_filtre2_value) { + filtre2_value = p_filtre2_value; + form.append(filtre2, filtre2_value); + } + + if (p_filtre3_value) { + filtre3_value = p_filtre3_value; + form.append(filtre3, p_filtre3_value); + } + + if (p_filtre4_value) { + filtre4_value = p_filtre4_value; + form.append(filtre4, p_filtre4_value); + } + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_jury_With_Filter/"; + + Annule_Add_One_Jury_DetailFields(); + + axios.post(myurl, form).then(res => { + + if (String(res.data.status) === String("true")) { + //console.log(" In Getall_Partner_Jury_With_Filter res.data.status = " + res.data.status); + //console.log(" In Getall_Partner_Jury_With_Filter res.data.message r_class = " + res.data.message); + setGetall_Partner_Jury_With_Filter_api("true"); + setGetall_Partner_Jury_With_Filter_result(res.data.message); + + setGetall_Partner_Jury_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_description = JSON.parse(x).description; + var local_email_jury = JSON.parse(x).email_jury; + var local_chef_jury_id = JSON.parse(x).chef_jury_id; + var local_chef_jury_nom_prenom = JSON.parse(x).chef_jury_nom_prenom; + var local_nb_membre = JSON.parse(x).nb_membre; + + + //--- + var node = { + "_id": local_id, + "id": localid, + "label": local_code, + "code": local_code, + "description": local_description, + "email_jury": local_email_jury, + "chef_jury_id": local_chef_jury_id, + "chef_jury_nom_prenom": local_chef_jury_nom_prenom, + "nb_membre": local_nb_membre, + }; + new_data2.push(node); + }); + + //--- + var node = { + "_id": "", + "_id": "", + "id": "", + "label": "", + "code": "", + "description": "", + "email_jury": "", + "chef_jury_id": "", + "chef_jury_nom_prenom": "", + "nb_membre": "", + + }; + new_data2.push(node); + + if (new_data2.length > 0) + setNew_Getall_Partner_Jury_result(new_data2); + + } + else { + setGetall_Partner_Jury_With_Filter_api("false"); + setGetall_Partner_Jury_With_Filter_message(res.data.message); + } + + }).catch((error) => { + console.warn('Not good man :( Getall_Partner_Jury_With_Filter = ', error); + setGetall_Partner_Jury_With_Filter_api("false"); + //setmyApimyApiMessage("") + }) + } + + + const [p_detail_soutenance_sujet, setp_detail_soutenance_sujet] = React.useState(""); + const [p_detail_soutenance_observation, setp_detail_soutenance_observation] = React.useState(""); + const [p_detail_soutenance_note, setp_detail_soutenance_note] = React.useState(""); + + const [soutenance_data_edit_mode, setsoutenance_data_edit_mode] = React.useState("0"); + const [soutenance_display, setsoutenance_display] = React.useState(""); + const [soutenance_data_changed, setsoutenance_data_changed] = React.useState(""); + + + // -- Gestion pièces jointes + + const [Download_one_attached_document_api, setDownload_one_attached_document_api] = useState(); + const [Download_one_attached_document_result, setDownload_one_attached_document_result] = useState(); + const [Download_one_attached_document_message, setDownload_one_attached_document_message] = useState(); + const Download_one_attached_document = (event) => { + const stored_cookie = getCookie('tokenmysypart'); + + + var nom_fiche_detaillee = "Fiche_Detaillee.pdf"; + var token = stored_cookie; + var file_name = event.target.id; + + + var url = process.env.REACT_APP_API_URL + "myclass/api/Get_Stored_Downloaded_File/" + token + "/" + file_name; + setLoading(true); + + axios.get(url, { responseType: 'blob', },) + .then((res) => { + setLoading(false); + fileDownload(res.data, nom_fiche_detaillee); + setDownload_one_attached_document_api("true"); + }).catch((error) => { + setLoading(false); + console.error('Error:', error); + setDownload_one_attached_document_api("false"); + + }); + } + + + const editorRef_competence = useRef(null); + const [editorRef_competence_limite, seteditorRef_competence_limite] = useState(800); + + + const [file_1_name, setfile_1_name] = useState(); + + const [sessions_file_change_1_api, setsessions_file_change_1_api] = useState(); + const [sessions_file_change_1_result, setsessions_file_change_1_result] = useState(); + const [sessions_file_change_1_message, setsessions_file_change_1_message] = useState(); + const sessions_file_change_1 = event => { + + const fileUploaded = event.target.files[0]; + let file_size = event.target.files[0].size; + let file_type = event.target.files[0].type; + + + + + console.log("file_size = ", file_size, " file_type = ", file_type); + if (file_size > 10000000) { + alert("Le fichier ne doit pas depasser un 1 Méga octets"); + // console.log("Le fichier ne doit pas depasser un 1 Méga octets"); + return; + } + + setfile_1_name(event.target.files[0]); + const formData = new FormData(); + formData.append('File', fileUploaded); + //formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA'); + const stored_cookie = getCookie('tokenmysypart'); + + //formData.append("token", stored_cookie); + //formData.append("class_internal_url", internal_url); + //console.log("token = " + stored_cookie); + + return; + + }; + + + const [file_2_name, setfile_2_name] = useState(); + + const [sessions_file_change_2_api, setsessions_file_change_2_api] = useState(); + const [sessions_file_change_2_result, setsessions_file_change_2_result] = useState(); + const [sessions_file_change_2_message, setsessions_file_change_2_message] = useState(); + const sessions_file_change_2 = event => { + + const fileUploaded = event.target.files[0]; + let file_size = event.target.files[0].size; + let file_type = event.target.files[0].type; + + + + + console.log("file_size = ", file_size, " file_type = ", file_type); + if (file_size > 10000000) { + alert("Le fichier ne doit pas depasser un 1 Méga octets"); + console.log("Le fichier ne doit pas depasser un 1 Méga octets"); + return; + } + + setfile_2_name(event.target.files[0]); + const formData = new FormData(); + formData.append('File', fileUploaded); + //formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA'); + const stored_cookie = getCookie('tokenmysypart'); + + //formData.append("token", stored_cookie); + //formData.append("class_internal_url", internal_url); + //console.log("token = " + stored_cookie); + + return; + + }; + + const [Record_All_PJ_api, setRecord_All_PJ_api] = useState(); + const [Record_All_PJ_result, setRecord_All_PJ_result] = useState(); + const [Record_All_PJ_message, setRecord_All_PJ_message] = useState(); + function Record_All_PJ() { + + if (!p_detail_one_file_to_download_type_name) { + // alert(" Vous devez donner un nom à la pièce jointe"); + setdisplay_alert_mysy("1"); + setalert_message(" Vous devez donner un nom à la pièce jointe"); + setalert_type("error"); + return; + } + + if (file_1_name && file_1_name.name) { + + const formData = new FormData(); + formData.append('File', file_1_name); + //formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA'); + const stored_cookie = getCookie('tokenmysypart'); + + formData.append("token", stored_cookie); + formData.append("file_business_object", p_detail_one_file_to_download_type_name); + formData.append("file_name", file_1_name.name); + formData.append("status", "0"); + formData.append("object_owner_collection", "groupe_inscription"); + formData.append("object_owner_id", selected_id); + formData.append("type_document", ""); + + //formData.append("class_internal_url", internal_url); + //console.log("token = " + stored_cookie); + + + fetch( + process.env.REACT_APP_API_URL + "myclass/api/Store_User_Downloaded_File/", + { + method: 'POST', + body: formData, + } + ) + .then((response) => response.json()) + .then((result) => { + + //console.log(" ## result['status'] = ", result['status']) + if (String(result['status']) === String("true")) { + //console.log('Success:', result['message']); + setRecord_All_PJ_result(result['message']); + setRecord_All_PJ_api("true"); + + Get_List_Of_All_PJ(props.client_id); + setfile_1_name(); + setp_detail_one_file_to_download_type_name(); + //GetCurrentClass_trainingsession(); + // alert(" La pièce jointe " + file_1_name.name + " a été bien enregistrée") + setdisplay_alert_mysy("1"); + setalert_message(" La pièce jointe " + file_1_name.name + " a été bien enregistrée"); + setalert_type("success"); + + } + else { + setRecord_All_PJ_message(result['message']); + setRecord_All_PJ_api("false"); + } + + }) + .catch((error) => { + console.error(' Record_All_PJ Error:', error); + setRecord_All_PJ_api("false"); + }); + + } + + + + } + + + const [Delete_one_attached_document_api, setDelete_one_attached_document_api] = useState(); + const [Delete_one_attached_document_result, setDelete_one_attached_document_result] = useState(); + const [Delete_one_attached_document_message, setDelete_one_attached_document_message] = useState(); + const Delete_one_attached_document = (event) => { + const stored_cookie = getCookie('tokenmysypart'); + + var formData = new FormData(); + var nom_fiche_detaillee = "Fiche_Detaillee.pdf"; + var file_name = event.target.id; + + + formData.append("token", stored_cookie); + formData.append("file_name", file_name); + + var url = process.env.REACT_APP_API_URL + "myclass/api/Delete_Stored_Downloaded_File/"; + + + fetch( + process.env.REACT_APP_API_URL + "myclass/api/Delete_Stored_Downloaded_File/", + { + method: 'POST', + body: formData, + } + ) + .then((response) => response.json()) + .then((result) => { + + //console.log(" ## result['status'] = ", result['status']) + if (String(result['status']) === String("true")) { + //console.log('Success:', result['message']); + setDelete_one_attached_document_result(result['message']); + setDelete_one_attached_document_api("true"); + Get_List_Of_All_PJ(props.client_id); + alert(result['message']) + + } + else { + setDelete_one_attached_document_message(result['message']); + setDelete_one_attached_document_api("false"); + } + + }) + .catch((error) => { + console.error(' Record_All_PJ Error:', error); + setDelete_one_attached_document_api("false"); + alert(" Impossible de supprimer le document") + + }); + + + } + + const [Get_List_Of_All_PJ_api, setGet_List_Of_All_PJ_api] = useState(); + const [Get_List_Of_All_PJ_result, setGet_List_Of_All_PJ_result] = useState(); + const [Get_List_Of_All_PJ_message, setGet_List_Of_All_PJ_message] = useState(); + function Get_List_Of_All_PJ(local_employee_id) { + + const formData = new FormData(); + + //formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA'); + const stored_cookie = getCookie('tokenmysypart'); + + formData.append("token", stored_cookie); + formData.append("object_owner_collection", "groupe_inscription"); + formData.append("object_owner_id", selected_id); + + + //formData.append("class_internal_url", internal_url); + //console.log("token = " + stored_cookie); + + + fetch( + process.env.REACT_APP_API_URL + "myclass/api/Get_List_object_owner_collection_Stored_Files/", + { + method: 'POST', + body: formData, + } + ) + .then((response) => response.json()) + .then((result) => { + + //console.log(" ## result['status'] = ", result['status']) + if (String(result['status']) === String("true")) { + //console.log('Message :', result['message']); + setGet_List_Of_All_PJ_result(result['message']); + setGet_List_Of_All_PJ_api("true"); + + } + else { + setGet_List_Of_All_PJ_message(result['message']); + setGet_List_Of_All_PJ_api("false"); + } + + }) + .catch((error) => { + console.error(' Get_List_Of_All_PJ Error:', error); + setGet_List_Of_All_PJ_api("false"); + }); + + } + + + + function Delete_file_1_name() { + setfile_1_name(); + } + + function Delete_file_2_name() { + setfile_2_name(); + } + + const [p_detail_one_file_to_download_type_name, setp_detail_one_file_to_download_type_name] = useState(); + + // -- end gestion pièces jointes + + + const [actionmass_jury_membre_val, setactionmass_jury_membre_val] = useState(""); + const [Dialog_Jury_Membre_message, setDialog_Jury_Membre_message] = React.useState(false); + const [Dialog_Jury_Membre_open, setDialog_Jury_Membre_open] = React.useState(false); + + + const Dialog_Jury_Membre_handleClose = () => { + //alert(" Utiliser le bouton 'fermer' "); + //setOpen(false); + }; + + const Dialog_Jury_Membre_handleClose_buton = () => { + + setDialog_Jury_Membre_open(false); + settab_selected_users([]); + setp_detail_member_role(""); + + + }; + + const fixedVal = []; + const [tab_selected_users, settab_selected_users] = useState([...fixedVal]); + + const fixedVal_apprenant = []; + const [tab_selected_apprenant, settab_selected_apprenant] = useState([...fixedVal_apprenant]); + + + const [Delete_List_Membre_From_Jury_api, setDelete_List_Membre_From_Jury_api] = useState(); + const [Delete_List_Membre_From_Jury_message, setDelete_List_Membre_From_Jury_message] = useState(); + const [Delete_List_Membre_From_Jury_result, setDelete_List_Membre_From_Jury_result] = useState(); + function Delete_List_Membre_From_Jury(local_tab_ids) { + + + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("jury_id", selected_id); + form.append("tab_ids", local_tab_ids); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Delete_Jury_Membre/"; + setLoading(true); + + axios.post(myurl, form).then(res => { + //console.log(" In Delete_List_Membre_From_Jury res.data.status = " + res.data.status); + //console.log(" In Delete_List_Membre_From_Jury res.data.message r_class = " + res.data.message); + + setLoading(false); + + if (String(res.data.status) === String("true")) { + setDelete_List_Membre_From_Jury_api("true"); + setDelete_List_Membre_From_Jury_result(res.data.message); + + var line = New_Getall_Partner_Jury_result[gridline_id]; + Get_Given_Jury_Data(line._id); + + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + submenu_membres() + } + else { + setDelete_List_Membre_From_Jury_api("false"); + setDelete_List_Membre_From_Jury_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('Delete_List_Membre_From_Jury : Not good man :( mysearchtext = ' + error); + setDelete_List_Membre_From_Jury_api("false"); + alert(" Impossible de supprimer les membres"); + }) + } + + const [p_detail_event_id, setp_detail_event_id] = useState(); + const [p_detail_title, setp_detail_title] = useState(); + const [p_detail_start, setp_detail_start] = useState(); + const [p_detail_end, setp_detail_end] = useState(); + const [p_detail_comment, setp_detail_comment] = useState(); + const [p_detail_sequence_session_id, setp_detail_sequence_session_id] = useState(""); + + const [p_detail_justified, setp_detail_justified] = useState(false); + const [p_detail_event_type, setp_detail_event_type] = useState(); + + // Ici il s'agit de liée la Soutenance a une session de formation + // En gros, le sens de lecture est : Le jury XXXX a une Soutenance le jj/mm/aaaa hhhh pour la session de formation + 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(""); + + + function add_one_seance_jury() { + + setp_detail_title("Nouvelle") + setp_detail_start(new Date()) + setp_detail_end(new Date()) + setp_detail_comment(""); + setp_detail_sequence_session_id(""); + setp_detail_event_id(""); + + setp_detail_linked_collection(""); + setp_detail_linked_collection_recid(""); + + var current_date_add_1h = new Date(); + current_date_add_1h.setHours(current_date_add_1h.getHours() + 1); + + setStartDate(new Date()); + setendDate(current_date_add_1h); + setDialog_1_open(true); + } + + const [startDate, setStartDate] = useState(new Date()); + const [endDate, setendDate] = useState(new Date()); + const handleSelect = (info) => { + + if (String(props.write_access) !== "1") { + // Pas d'acces en ecriture. + + return; + } + + setp_detail_title("Nouvelle") + setp_detail_start(info.start) + setp_detail_end(info.end) + setp_detail_comment(""); + setp_detail_sequence_session_id(""); + setp_detail_event_id(""); + + setp_detail_linked_collection(""); + setp_detail_linked_collection_recid(""); + + setStartDate(info.start); + setendDate(info.end); + setDialog_1_open(true); + }; + + + const handleSelect_V2 = (info) => { + GetListeInscrit(); + setGet_Jury_List_Apprenant_Seance_insc_result([]); + setselected_agenda_id(""); + settab_selected_apprenant([]); + + var current_date_add_1h = new Date(); + current_date_add_1h.setHours(current_date_add_1h.getHours() + 1); + + setStartDate(info.start); + setendDate(info.end); + + setDialog_Jury_Apprenant_open(true); + }; + + + + const renderEventContent = (eventInfo) => { + //console.log(eventInfo); + return ( + <> + {eventInfo.timeText}
    + {eventInfo.event.title} + + ) + }; + + const handleEventClick = (arg) => { + + setp_detail_title(arg.event.title) + setp_detail_start(arg.event.start) + setp_detail_end(arg.event.end) + setp_detail_event_id(arg.event.id); + + if (arg.event.extendedProps.comment) { + setp_detail_comment(arg.event.extendedProps.comment); + } + else + setp_detail_comment(""); + + + + if (arg.event.extendedProps.linked_collection) { + setp_detail_linked_collection(arg.event.extendedProps.linked_collection); + } + else + setp_detail_linked_collection(""); + + if (arg.event.extendedProps.linked_collection_recid) { + setp_detail_linked_collection_recid(arg.event.extendedProps.linked_collection_recid); + } + else + setp_detail_linked_collection_recid(""); + + + + + if (arg.event.extendedProps.sequence_session_id) { + setp_detail_sequence_session_id(arg.event.extendedProps.sequence_session_id); + } + else + setp_detail_sequence_session_id(""); + + + if (arg.event.extendedProps.justified) { + if (String(arg.event.extendedProps.justified) === "true") + setp_detail_justified(true); + else + setp_detail_justified(false); + } + else + setp_detail_justified(false); + + + + if (arg.event.extendedProps.type) { + setp_detail_event_type(arg.event.extendedProps.type); + } + else + setp_detail_event_type(""); + + setStartDate(arg.event.start); + setendDate(arg.event.end); + setDialog_1_open(true); + } + + const [Dialog_1_message, setDialog_1_message] = React.useState(false); + const [Dialog_1_open, setDialog_1_open] = React.useState(false); + const [Partner_Debut_Journee, setPartner_Debut_Journee] = useState("7:00"); + const [Partner_Fin_Journee, setPartner_Fin_Journee] = useState("20:00"); + const [mysy_events, setmysy_events] = useState(); + + + + const [Get_List_Agenda_Events_For_Given_User_api, setGet_List_Agenda_Events_For_Given_User_api] = useState(); + const [Get_List_Agenda_Events_For_Given_User_message, setGet_List_Agenda_Events_For_Given_User_message] = useState(); + const [Get_List_Agenda_Events_For_Given_User_result, setGet_List_Agenda_Events_For_Given_User_result] = useState([]); + function Get_List_Agenda_Events_For_Given_User(local_selected_id) { + + + var form = new FormData(); + const stored_cookie = getCookie('tokenmysypart'); + + form.append("token", stored_cookie); + form.append("jury_id", local_selected_id); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Jury_Soutenenace/"; + + setLoading(true); + + axios.post(myurl, form).then(res => { + // console.log(" In Get_List_Agenda_Events_For_Given_User res.data.status = " + res.data.status); + // console.log(" In Get_List_Agenda_Events_For_Given_User res.data.message r_class = " + res.data.message); + setLoading(false); + if (String(res.data.status) === String("true")) { + setGet_List_Agenda_Events_For_Given_User_api("true"); + setGet_List_Agenda_Events_For_Given_User_result(res.data.message); + + var tab_event = [] + var filtre2 = res.data.message.map(obj => { + + var local_val = {}; + + var local_comment = ""; + if (JSON.parse(obj).comment) { + local_comment = String(JSON.parse(obj).comment); + } + + + + //console.log( " ### obj = ", obj) + + local_val = { + 'title': String(JSON.parse(obj).soutenance_agenda_event_title), + 'start': String(JSON.parse(obj).soutenance_agenda_event_start), + 'end': String(JSON.parse(obj).soutenance_agenda_event_end), + 'id': String(JSON.parse(obj).soutenance_agenda_id), + '_id': String(JSON.parse(obj).soutenance_agenda_id), + 'jury_soutenance_id': String(JSON.parse(obj)._id), + 'jury_session_id': String(JSON.parse(obj).session_id), + 'convocation_apprenant_send': String(JSON.parse(obj).convocation_apprenant_send), + 'convocation_apprenant_date_sending': String(JSON.parse(obj).convocation_apprenant_date_sending).substring(0, 10), + + } + + tab_event.push(local_val); + + + + }); + + // console.log('### tab_event = ', tab_event) + setmysy_events(tab_event); + + } + else if (String(res.data.status) === String("Err_Connexion")) { + alert('Erreur: ' + res.data.message); + history.push("/Connexion"); + } + else { + setGet_List_Agenda_Events_For_Given_User_api("false"); + setGet_List_Agenda_Events_For_Given_User_message(res.data.message); + } + + }).catch((error) => { + setLoading(false); + console.warn('Not good man :( Get_List_Agenda_Events_For_Given_User = ', error); + setGet_List_Agenda_Events_For_Given_User_api("false"); + //setmyApimyApiMessage("") + }) + } + + const New_Option_Type_Event = [ + { "id": "0", "label": "Jury", "value": "jury" }, + ] + + + const New_Option_Type_Selection = [ + { "id": "0", "label": "Individuel", "value": "individuel" }, + { "id": "1", "label": "Groupe TD", "value": "grp_td" }, + { "id": "2", "label": "Groupe TP", "value": "grp_tp" }, + ] + + const New_Option_Cible_Jury = [ + { "id": "soutenance", "label": "Jury Soutenance", "value": "soutenance" }, + { "id": "examen", "label": "Jury Examen", "value": "examen" }, + { "id": "conseil_class", "label": "Conseil Classe", "value": "conseil_class" }, + { "id": "", "label": "", "value": "" }, + ] + + function Close_Dialog_Detail_Event_open() { + setDialog_1_open(false); + } + const [Update_One_Agenda_Event_api, setUpdate_One_Agenda_Event_api] = useState(); + const [Update_One_Agenda_Event_message, setUpdate_One_Agenda_Event_message] = useState(); + const [Update_One_Agenda_Event_result, setUpdate_One_Agenda_Event_result] = useState(); + const Update_One_Agenda_Event = event => { + + + + if (moment(endDate) <= moment(startDate)) { + // alert(" Les dates de début et de fin sont incohérentes"); + setdisplay_alert_mysy("1"); + setalert_message("Les dates de début et de fin sont incohérentes"); + setalert_type("error"); + return; + } + var new_title = p_detail_title; + var new_start_date = moment(startDate).format(); + var new_end_date = moment(endDate).format(); + var event_id = p_detail_event_id + + //console.log(" ### new event = ", new_title, " -- ", new_start_date, " --- ", new_end_date, " : setp_detail_event_id = ", p_detail_event_id); + + + var form = new FormData(); + //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("_id", p_detail_event_id); + form.append("related_collection", "jury"); + + form.append("event_title", new_title); + form.append("event_start", new_start_date); + form.append("event_end", new_end_date); + form.append("related_collection_recid", selected_id); + form.append("comment", p_detail_comment); + + form.append("event_type", p_detail_event_type); + form.append("justified", p_detail_justified); + + form.append("linked_collection", "session_formation"); + form.append("linked_collection_recid", selected_session_id); + + form.append("ue_id", jury_seance_ue_id); + + // console.log(" form == ", form); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Update_Agenda_Event/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + //console.log(" In Update_One_Agenda_Event res.data.status = " + res.data.status); + //console.log(" In Update_One_Agenda_Event res.data.message r_class = " + res.data.message); + + setLoading(false); + if (String(res.data.status) === String("true")) { + setUpdate_One_Agenda_Event_api("true"); + setUpdate_One_Agenda_Event_result(res.data.message); + + setp_detail_event_id(); + setp_detail_title(); + setp_detail_start(); + setp_detail_end(); + setp_detail_comment(); + setp_detail_sequence_session_id(""); + setp_detail_justified(false); + setp_detail_event_type(); + + setp_detail_linked_collection(""); + setp_detail_linked_collection_recid(""); + + Get_List_Agenda_Events_For_Given_User(selected_id); + + // alert(res.data.message) + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + Close_Dialog_Detail_Event_open(); + + } + else { + setUpdate_One_Agenda_Event_api("false"); + setUpdate_One_Agenda_Event_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('UpdateStagiaireData : Not good man :( Update_One_Agenda_Event = ' + error); + setUpdate_One_Agenda_Event_api("false"); + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de mettre à jour l'événement "); + setalert_type("error"); + + + }) + } + + + const [Delete_One_Agenda_Event_api, setDelete_One_Agenda_Event_api] = useState(); + const [Delete_One_Agenda_Event_message, setDelete_One_Agenda_Event_message] = useState(); + const [Delete_One_Agenda_Event_result, setDelete_One_Agenda_Event_result] = useState(); + function Delete_One_Agenda_Event() { + + + var event_id = p_detail_event_id + + var form = new FormData(); + //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("_id", p_detail_event_id); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Delete_Agenda_Event/"; + + setLoading(true); + + axios.post(myurl, form).then(res => { + //console.log(" In Delete_One_Agenda_Event res.data.status = " + res.data.status); + //console.log(" In Delete_One_Agenda_Event res.data.message r_class = " + res.data.message); + + + setLoading(false); + if (String(res.data.status) === String("true")) { + setDelete_One_Agenda_Event_api("true"); + setDelete_One_Agenda_Event_result(res.data.message); + + Get_List_Agenda_Events_For_Given_User(selected_id); + + setp_detail_event_id(); + setp_detail_title(); + setp_detail_start(); + setp_detail_end(); + setp_detail_comment(); + setp_detail_sequence_session_id(""); + + setp_detail_linked_collection(""); + setp_detail_linked_collection_recid(""); + + setp_detail_justified(false); + setp_detail_event_type(); + + // alert(res.data.message) + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + Close_Dialog_Detail_Event_open(); + + } + else { + setDelete_One_Agenda_Event_api("false"); + setDelete_One_Agenda_Event_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('UpdateStagiaireData : Not good man :( Delete_One_Agenda_Event = ' + error); + setDelete_One_Agenda_Event_api("false"); + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de supprimer l'événement "); + setalert_type("error"); + // alert(" Impossible de supprimer l'événement "); + + }) + } + + const [display_view, setdisplay_view] = useState("list"); + function func_display_planning_view() { + setdisplay_view("planning"); + } + + function func_display_list_view() { + setdisplay_view("list"); + } + + const [mysy_list_event_for_map, setmysy_list_event_for_map] = useState(); + + + 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); + form.append("archive", "0"); + 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 = "" + if (JSON.parse(x).class_id) + 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" }; + + }); + + var node = { + "_id": "", + "id": "", + "label": "", + "class_internal_url": "", + "titre": "", + "code_session": "", + "invoiced_statut": "", + "class_id": "", + }; + new_data2.push(node); + + 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 [type_selection, settype_selection] = useState("promo"); + const [Dialog_Jury_Apprenant_message, setDialog_Jury_Apprenant_message] = React.useState(false); + const [Dialog_Jury_Apprenant_open, setDialog_Jury_Apprenant_open] = React.useState(false); + + + const Dialog_Jury_Apprenant_handleClose = () => { + //alert(" Utiliser le bouton 'fermer' "); + //setOpen(false); + }; + + const Dialog_Jury_Apprenant_handleClose_buton = () => { + + setDialog_Jury_Apprenant_open(false); + settab_selected_users([]); + setp_detail_member_role(""); + }; + + + + const [New_Session_Inscrit, setNew_Session_Inscrit] = useState([]); + + const [GetListePreinscrit_insc_api, setGetListePreinscrit_insc_api] = useState(); + const [GetListePreinscrit_insc_meassage, setGetListePreinscrit_insc_meassage] = useState(); + const [GetListePreinscrit_insc_result, setGetListePreinscrit_insc_result] = useState([]) + function GetListeInscrit() { + + var form = new FormData(); + //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("session_id", selected_session_id); + + // 0,1,2 ==> Les inscription validé ou les preinscriptions + form.append("tab_statut_ids", "0,1,2"); + + + setLoading(true); + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Insription_From_Session_id_Reduice_Fields_With_Filter/"; + + fetch(myurl, + { + method: 'POST', + body: form, + }) + .then((data) => data.json()) + .then((data) => { + setLoading(false); + // console.log(' GetListeInscrit : Success:', data['message'], "data['status'] = ", data['status']); + setGetListePreinscrit_insc_result(data['message']); + + if (String(data['status']) === String("true")) { + + setGetListePreinscrit_insc_api("true"); + + var new_data2 = []; + const new_data = data['message'].map((x) => { + + //--- + var localid = JSON.parse(x).id; + var local_id = JSON.parse(x)._id; + var apprenant_nom = JSON.parse(x).apprenant_nom; + var apprenant_prenom = JSON.parse(x).apprenant_prenom; + var apprenant_email = JSON.parse(x).apprenant_email; + + //--- + var node = { + "_id": local_id, + "id": localid, + "label": apprenant_nom + " " + apprenant_prenom, + "apprenant_nom": apprenant_nom, + "apprenant_prenom": apprenant_prenom, + "apprenant_email": apprenant_email, + + }; + new_data2.push(node); + }); + + //--- + var node = { + "_id": "", + "id": "", + "label": "", + "apprenant_nom": "", + "apprenant_prenom": "", + "apprenant_email": "", + + }; + new_data2.push(node); + + if (new_data2.length > 0) + setNew_Session_Inscrit(new_data2); + + //console.log(" ### new_data2 =", new_data2) + + + } else if (String(data['status']) === String("Err_Connexion")) { + alert('Erreur: ' + data['message']); + history.push("/Connexion"); + } + else { + setGetListePreinscrit_insc_api("false"); + + } + + }).catch((error) => { + setLoading(false); + console.error('Error:', error); + setGetListePreinscrit_insc_api("false"); + }); + + } + + const [Get_Jury_List_Apprenant_Seance_insc_api, setGet_Jury_List_Apprenant_Seance_insc_api] = useState(); + const [Get_Jury_List_Apprenant_Seance_insc_meassage, setGet_Jury_List_Apprenant_Seance_insc_meassage] = useState(); + const [Get_Jury_List_Apprenant_Seance_insc_result, setGet_Jury_List_Apprenant_Seance_insc_result] = useState([]) + function Get_Jury_List_Apprenant_Seance(local_agenda_id, local_soutenance_id) { + + var form = new FormData(); + //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("_id", selected_id); + form.append("agenda_id", local_agenda_id); + form.append("jury_soutenance_id", local_soutenance_id); + + + // console.log(" #### OKKKK ") + setLoading(true); + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Given_Jury_Apprenant_With_Filter/"; + + fetch(myurl, + { + method: 'POST', + body: form, + }) + .then((data) => data.json()) + .then((data) => { + setLoading(false); + //console.log(' Get_Jury_List_Apprenant_Seance : Success:', data['message'], "data['status'] = ", data['status']); + + + if (String(data['status']) === String("true")) { + setGet_Jury_List_Apprenant_Seance_insc_result(data['message']); + //console.log("erreur rrrr:" + data['status']) + setGet_Jury_List_Apprenant_Seance_insc_api("true"); + // setnb_stagiaire_Inscrit(data['message'].length); + //console.log(" ### setnb_stagiaire_Inscrit = ", data['message'].length); + + } else if (String(data['status']) === String("Err_Connexion")) { + alert('Erreur: ' + data['message']); + history.push("/Connexion"); + } + else { + setGet_Jury_List_Apprenant_Seance_insc_api("false"); + + } + + }).catch((error) => { + setLoading(false); + console.error('Error:', error); + setGet_Jury_List_Apprenant_Seance_insc_api("false"); + }); + + } + + + + const [Get_Jury_List_Apprenant_Soutenance_insc_api, setGet_Jury_List_Apprenant_Soutenance_insc_api] = useState(); + const [Get_Jury_List_Apprenant_Soutenance_insc_meassage, setGet_Jury_List_Apprenant_Soutenance_insc_meassage] = useState(); + const [Get_Jury_List_Apprenant_Soutenance_insc_result, setGet_Jury_List_Apprenant_Soutenance_insc_result] = useState([]) + function Get_Jury_List_Apprenant_Soutenance(local_agenda_id, local_jury_soutenance_id) { + + var form = new FormData(); + //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("jury_id", selected_id); + form.append("agenda_id", local_agenda_id); + form.append("jury_soutenance_id", local_jury_soutenance_id); + + + // console.log(" #### OKKKK ") + setLoading(true); + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Given_Jury_Soutenenace/"; + + fetch(myurl, + { + method: 'POST', + body: form, + }) + .then((data) => data.json()) + .then((data) => { + setLoading(false); + // console.log(' Get_Jury_List_Apprenant_Soutenance : Success:', data['message'], "data['status'] = ", data['status']); + + if (String(data['status']) === String("true")) { + + setGet_Jury_List_Apprenant_Soutenance_insc_result(data['message']); + setGet_Jury_List_Apprenant_Soutenance_insc_api("true"); + + if (data['message'].length > 0 && JSON.parse(data['message'])) { + var soutenance_JSON = JSON.parse(data['message']); + if (soutenance_JSON.sujet) { + setp_detail_soutenance_sujet(soutenance_JSON.sujet); + } else { + setp_detail_soutenance_sujet(""); + } + + if (soutenance_JSON.observation) { + setp_detail_soutenance_observation(soutenance_JSON.observation); + } else { + setp_detail_soutenance_observation(""); + } + + if (soutenance_JSON.note) { + setp_detail_soutenance_note(soutenance_JSON.note); + } else { + setp_detail_soutenance_note(""); + } + + + if (soutenance_JSON.jury_soutenance_salle) { + setp_detail_soutenance_salle(soutenance_JSON.jury_soutenance_salle); + } else { + setp_detail_soutenance_salle(""); + } + + + if (soutenance_JSON.jury_soutenance_adresse) { + setp_detail_soutenance_adresse(soutenance_JSON.jury_soutenance_adresse); + } else { + setp_detail_soutenance_adresse(""); + } + + if (soutenance_JSON.jury_soutenance_code_postal) { + setp_detail_soutenance_code_postal(soutenance_JSON.jury_soutenance_code_postal); + } else { + setp_detail_soutenance_code_postal(""); + } + + if (soutenance_JSON.jury_soutenance_ville) { + setp_detail_soutenance_ville(soutenance_JSON.jury_soutenance_ville); + } else { + setp_detail_soutenance_ville(""); + } + + if (soutenance_JSON.jury_soutenance_pays) { + setp_detail_soutenance_pays(soutenance_JSON.jury_soutenance_pays); + } else { + setp_detail_soutenance_pays(""); + } + + //console.log(" ### soutenance_JSON.jury_soutenance_salle = ", soutenance_JSON.jury_soutenance_salle); + + } else { + setp_detail_soutenance_sujet(""); + setp_detail_soutenance_observation(""); + setp_detail_soutenance_note(""); + } + + setsoutenance_data_edit_mode("0"); + Disable_Jury_Soutenance_DetailFields(); + + } else if (String(data['status']) === String("Err_Connexion")) { + alert('Erreur: ' + data['message']); + history.push("/Connexion"); + } + else { + setGet_Jury_List_Apprenant_Soutenance_insc_api("false"); + + } + + }).catch((error) => { + setLoading(false); + console.error('Error:', error); + setGet_Jury_List_Apprenant_Soutenance_insc_api("false"); + }); + + } + + + const [jury_seance_ue_id, setjury_seance_ue_id] = useState(""); + + + function Get_List_Selected_Jury_Id() { + + var tab_tmp = [] + + for (var i = 0; i < selectionModel_columns_jury.length; i++) { + var myid = parseInt(String(selectionModel_columns_jury[i])); + var line = JSON.parse(Getall_Partner_Jury_result[myid]); + tab_tmp.push(line._id); + } + + return tab_tmp; + + } + + + function actionmass_ftion_Traitemet() { + + var liste_jury = Get_List_Selected_Jury_Id(); + + console.log(" Get_List_Selected_Jury_Id = ", liste_jury); + + + if (String(actionmass_ftion_val) === String("supprimer")) { + + //console.log(" ### liste session : ", liste_session) + // Delete_LIST_Apprenant(liste_apprenant); + + } + + else if (String(actionmass_ftion_val) === String("convocation_apprenant")) { + // setDialog_add_inscription_open(true); + } + + else if (String(actionmass_ftion_val) === String("convocation_jury")) { + // Export_apprenant(liste_apprenant); + } + + } + + + const [selected_jury_convocation_apprenant_id, setselected_jury_convocation_apprenant_id] = useState(""); + const [selected_jury_convocation_apprenant_type, setselected_jury_convocation_apprenant_type] = useState(""); + const [selected_jury_convocation_apprenant_email_destinataire_prod, setselected_jury_convocation_apprenant_email_destinataire_prod] = useState(""); + const [selected_jury_convocation_apprenant_email_test, setselected_jury_convocation_apprenant_email_test] = useState(""); + + const [tab_jury_convocation_apprenant_pieces_jointes_result, settab_jury_convocation_apprenant_pieces_jointes_result] = useState([]); + + + const [Dialog_CONVOCATION_JURY_APPRENANT_open, setDialog_CONVOCATION_JURY_APPRENANT_open] = React.useState(false); + const Dialog_CONVOCATION_JURY_APPRENANT_handleClose = () => { + //alert(" Utiliser le bouton 'fermer' "); + //setOpen(false); + }; + + const Dialog_CONVOCATION_JURY_APPRENANT_handleClose_buton = () => { + setDialog_CONVOCATION_JURY_APPRENANT_open(false); + setselected_jury_convocation_apprenant_id(); + setselected_jury_convocation_apprenant_type(""); + setselected_jury_convocation_apprenant_email_destinataire_prod(); + setselected_jury_convocation_apprenant_email_test(); + + setactionmass_ftion_val(); + + settab_jury_convocation_apprenant_pieces_jointes_result([]) + }; + + const [sessions_file_change_1_convention_api, setsessions_file_change_1_convention_api] = useState(); + const [sessions_file_change_1_convention_result, setsessions_file_change_1_convention_result] = useState(); + const [sessions_file_change_1_convention_message, setsessions_file_change_1_convention_message] = useState(); + const sessions_file_change_1_convention = event => { + + + const fileUploaded = event.target.files[0]; + let file_size = event.target.files[0].size; + let file_type = event.target.files[0].type; + + + if (file_type !== "application/pdf") { + alert("Le fichier n'est pas de type PDF"); + return; + } + + + + if (file_size > 10000000) { + alert("Le fichier ne doit pas depasser un 1 Méga octets"); + + return; + } + + //var new_node = {'name':event.target.files[0].name, 'type':event.target.files[0].type} + + + var new_tmp = []; + + if (tab_jury_convocation_apprenant_pieces_jointes_result && tab_jury_convocation_apprenant_pieces_jointes_result.length > 0) { + + tab_jury_convocation_apprenant_pieces_jointes_result.map((x) => { + new_tmp.push(x); + + }); + + } + + new_tmp.push(event.target.files[0]) + + settab_jury_convocation_apprenant_pieces_jointes_result(new_tmp); + + //console.log(" tab_jury_convocation_apprenant_pieces_jointes_result = ", tab_jury_convocation_apprenant_pieces_jointes_result) + return; + }; + + function Delete_Convention_Attached_Doc(event) { + + var doc_to_del_name = event.target.id; + const myArray = tab_jury_convocation_apprenant_pieces_jointes_result; + + let new_myArray = myArray.filter(file => file.name !== String(doc_to_del_name)); + + //console.log(" new_myArray = ", new_myArray); + + + var new_tab = [] + for (let i = 0; i < new_myArray.length; i++) { + new_tab.push(new_myArray[i]); + } + + settab_jury_convocation_apprenant_pieces_jointes_result(new_tab); + + + } + const [New_Get_List_JURY_APPRENANT_Convocations_result, setNew_Get_List_JURY_APPRENANT_Convocations_result] = useState([]); + + const [Get_List_JURY_APPRENANT_Convocations_api, setGet_List_JURY_APPRENANT_Convocations_api] = useState(); + const [Get_List_JURY_APPRENANT_Convocations_message, setGet_List_JURY_APPRENANT_Convocations_message] = useState(); + const [Get_List_JURY_APPRENANT_Convocations_result, setGet_List_JURY_APPRENANT_Convocations_result] = useState(); + function Get_List_JURY_APPRENANT_Convocations(type_doc) { + + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("ref_interne", "JURY_CONVOCATION_APPRENANT"); + form.append("type_doc", type_doc); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Partner_Document_with_filter_No_HTML_Fields/"; + setLoading(true); + + axios.post(myurl, form).then(res => { + // console.log(" In Get_List_JURY_APPRENANT_Convocations res.data.status = " + res.data.status); + // console.log(" In Get_List_JURY_APPRENANT_Convocations res.data.message r_class = " + res.data.message); + setLoading(false); + if (String(res.data.status) === String("true")) { + + + setGet_List_JURY_APPRENANT_Convocations_api("true"); + setGet_List_JURY_APPRENANT_Convocations_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_ref_interne = JSON.parse(x).ref_interne; + var local_nom = JSON.parse(x).nom; + var local_sujet = JSON.parse(x).sujet; + var local_type_doc = JSON.parse(x).type_doc; + var local_cible = JSON.parse(x).cible; + var local_joint_pdf = JSON.parse(x).joint_pdf; + + + + //--- + var node = { + "_id": local_id, + "id": localid, + "label": local_nom, + "ref_interne": local_ref_interne, + "nom": local_nom, + "sujet": local_sujet, + "type_doc": local_type_doc, + "cible": local_cible, + "joint_pdf": local_joint_pdf, + + }; + new_data2.push(node); + }); + + if (new_data2.length > 0) + setNew_Get_List_JURY_APPRENANT_Convocations_result(new_data2); + + + } + else { + setGet_List_JURY_APPRENANT_Convocations_api("false"); + setGet_List_JURY_APPRENANT_Convocations_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 :( Get_List_JURY_APPRENANT_Convocations = ', error); + setGet_List_JURY_APPRENANT_Convocations_api("false"); + alert("Impossible de récupérer les modèles de convocations"); + //setmyApimyApiMessage("") + }) + } + + + const [New_Get_List_JURY_MEMBRE_Convocations_result, setNew_Get_List_JURY_MEMBRE_Convocations_result] = useState([]); + + const [Get_List_JURY_MEMBRE_Convocations_api, setGet_List_JURY_MEMBRE_Convocations_api] = useState(); + const [Get_List_JURY_MEMBRE_Convocations_message, setGet_List_JURY_MEMBRE_Convocations_message] = useState(); + const [Get_List_JURY_MEMBRE_Convocations_result, setGet_List_JURY_MEMBRE_Convocations_result] = useState(); + function Get_List_JURY_MEMBRE_Convocations(type_doc) { + + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("ref_interne", "JURY_CONVOCATION_MEMBRE"); + form.append("type_doc", type_doc); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Partner_Document_with_filter_No_HTML_Fields/"; + setLoading(true); + + axios.post(myurl, form).then(res => { + // console.log(" In Get_List_JURY_MEMBRE_Convocations res.data.status = " + res.data.status); + // console.log(" In Get_List_JURY_MEMBRE_Convocations res.data.message r_class = " + res.data.message); + setLoading(false); + if (String(res.data.status) === String("true")) { + + + setGet_List_JURY_MEMBRE_Convocations_api("true"); + setGet_List_JURY_MEMBRE_Convocations_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_ref_interne = JSON.parse(x).ref_interne; + var local_nom = JSON.parse(x).nom; + var local_sujet = JSON.parse(x).sujet; + var local_type_doc = JSON.parse(x).type_doc; + var local_cible = JSON.parse(x).cible; + var local_joint_pdf = JSON.parse(x).joint_pdf; + + + //--- + var node = { + "_id": local_id, + "id": localid, + "label": local_nom, + "ref_interne": local_ref_interne, + "nom": local_nom, + "sujet": local_sujet, + "type_doc": local_type_doc, + "cible": local_cible, + "joint_pdf": local_joint_pdf, + + }; + new_data2.push(node); + }); + + if (new_data2.length > 0) + setNew_Get_List_JURY_MEMBRE_Convocations_result(new_data2); + + + } + else { + setGet_List_JURY_MEMBRE_Convocations_api("false"); + setGet_List_JURY_MEMBRE_Convocations_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 :( Get_List_JURY_MEMBRE_Convocations = ', error); + setGet_List_JURY_MEMBRE_Convocations_api("false"); + alert("Impossible de récupérer les modèles de convocations"); + //setmyApimyApiMessage("") + }) + } + + + const New_Option_Type_Document = [ + { "id": "email", "label": "Email", "value": "email" }, + { "id": "pdf", "label": "PDF", "value": "pdf" }, + ] + + function Download_Jury_Convocation_membre_PDF() { + + const stored_cookie = getCookie('tokenmysypart'); + + var nom_fichier_cmd = "Convocation_Jury_membres.zip"; + + if (String(selected_jury_convocation_membre_id).trim() === "") { + alert(" Vous devez choisir un modèle de document "); + return; + } + + + // Recuperer la liste des soutenances selectionnées + var tab_jury_id = [] + + for (var i = 0; i < selectionModel_columns_jury.length; i++) { + var myid = parseInt(String(selectionModel_columns_jury[i])); + var line = Getall_Partner_Jury_result[myid]; + //console.log(" ### line = ", line) + tab_jury_id.push(JSON.parse(line)._id); + } + + var url = process.env.REACT_APP_API_URL + "myclass/api/Send_Jury_Membre_Convocation_By_PDF/" + stored_cookie + "/" + tab_jury_id + "/" + selected_jury_convocation_membre_id; + + //console.log(" ### url = ", url); + + setLoading(true); + axios.get(url, { responseType: 'blob', },) + .then((res) => { + setLoading(false); + //console.log(" In Download_Stagiaire_Conventions_PDF res.data = " + res.data); + if (String(res.data) === String("false")) { + alert("Impossible de télécharger la convocation des membres du jury (2) "); + } else { + fileDownload(res.data, nom_fichier_cmd); + // Getall_Editable_Document_By_Partner_By_Collection(); + + setselectionModel_columns_jury_seance([]); + setselected_jury_soutenance_id(""); + setactionmass_jury_seance(""); + + } + }).catch((error) => { + setLoading(false); + console.error('Error:', error); + alert(" Impossible de télécharger la convocation des membres du jury ") + + }); + + } + + + + function Download_Jury_Soutenance_Convocation_Apprenant_PDF() { + + const stored_cookie = getCookie('tokenmysypart'); + + var nom_fichier_cmd = "Convocation_Soutenance_Jury.zip"; + + if (String(selected_jury_convocation_apprenant_id).trim() === "") { + alert(" Vous devez choisir un modèle de document "); + return; + } + + + // Recuperer la liste des soutenances selectionnées + var tab_soutenance_id = [] + + for (var i = 0; i < selectionModel_columns_jury_seance.length; i++) { + var myid = parseInt(String(selectionModel_columns_jury_seance[i])); + var line = mysy_events[myid]; + //console.log(" ### line = ", line) + tab_soutenance_id.push(line.jury_soutenance_id); + } + + //console.log(" ### tab_soutenance_id = ", tab_soutenance_id) + + var url = process.env.REACT_APP_API_URL + "myclass/api/Send_Jury_Apprenant_Soutenance_Convocation_By_PDF/" + stored_cookie + "/" + selected_id + "/" + tab_soutenance_id + "/" + selected_jury_convocation_apprenant_id; + + //console.log(" ### url = ", url); + + setLoading(true); + axios.get(url, { responseType: 'blob', },) + .then((res) => { + setLoading(false); + //console.log(" In Download_Stagiaire_Conventions_PDF res.data = " + res.data); + if (String(res.data) === String("false")) { + alert("Impossible de télécharger la convocation (2) "); + } else { + fileDownload(res.data, nom_fichier_cmd); + // Getall_Editable_Document_By_Partner_By_Collection(); + + setselectionModel_columns_jury_seance([]); + setselected_jury_soutenance_id(""); + setactionmass_jury_seance(""); + + } + }).catch((error) => { + setLoading(false); + console.error('Error:', error); + alert(" Impossible de télécharger la convocation ") + + }); + + } + + const [Send_JURY_MEMBRE_Convocations_By_Email_api, setSend_JURY_MEMBRE_Convocations_By_Email_api] = useState(); + const [Send_JURY_MEMBRE_Convocations_By_Email_message, setSend_JURY_MEMBRE_Convocations_By_Email_message] = useState(); + const [Send_JURY_MEMBRE_Convocations_By_Email_result, setSend_JURY_MEMBRE_Convocations_By_Email_result] = useState(); + function Send_JURY_MEMBRE_Convocations_By_Email(event) { + + var form = new FormData(); + + if (String(selected_jury_convocation_membre_id).trim() === "") { + alert(" Vous devez choisir un modèle de document "); + return; + } + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("courrier_template_id", selected_jury_convocation_membre_id); + form.append("email_test", selected_jury_convocation_apprenant_email_test); + form.append("email_production", selected_jury_convocation_apprenant_email_destinataire_prod); + + + // pièce jointe + form.append("file_business_object", ""); + var list_files = new FormData(); + + for (let i = 0; i < tab_jury_convocation_apprenant_pieces_jointes_result.length; i++) { + form.append('File', tab_jury_convocation_apprenant_pieces_jointes_result[i]); + + } + + // Recuperer la liste des soutenances selectionnées + var tab_jury_id = [] + + for (var i = 0; i < selectionModel_columns_jury.length; i++) { + var myid = parseInt(String(selectionModel_columns_jury[i])); + var line = Getall_Partner_Jury_result[myid]; + //console.log(" ### line = ", line) + tab_jury_id.push(JSON.parse(line)._id); + } + form.append("tab_jury_ids", tab_jury_id); + + + //form.append("File", list_files); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Send_Jury_Membre_Convocation_By_Email/"; + + + //console.log(" ### myurl = ", myurl); + + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + // console.log(" In Send_JURY_MEMBRE_Convocations_By_Email res.data.status = " + res.data.status); + //console.log(" In Send_JURY_MEMBRE_Convocations_By_Email res.data.message r_class = " + res.data.message); + + if (String(res.data.status) === String("true")) { + setSend_JURY_MEMBRE_Convocations_By_Email_api("true"); + setSend_JURY_MEMBRE_Convocations_By_Email_result(res.data.message); + + + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + + setselectionModel_columns_jury([]); + + } + else { + setSend_JURY_MEMBRE_Convocations_By_Email_api("false"); + setSend_JURY_MEMBRE_Convocations_By_Email_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 :( Send_JURY_MEMBRE_Convocations_By_Email = ', error); + setSend_JURY_MEMBRE_Convocations_By_Email_api("false"); + alert("Impossible d'envoyer la convocation par email"); + //setmyApimyApiMessage("") + }) + } + + + const [Send_JURY_APPRENANT_Convocations_By_Email_api, setSend_JURY_APPRENANT_Convocations_By_Email_api] = useState(); + const [Send_JURY_APPRENANT_Convocations_By_Email_message, setSend_JURY_APPRENANT_Convocations_By_Email_message] = useState(); + const [Send_JURY_APPRENANT_Convocations_By_Email_result, setSend_JURY_APPRENANT_Convocations_By_Email_result] = useState(); + function Send_JURY_APPRENANT_Convocations_By_Email(event) { + + var form = new FormData(); + + if (String(selected_jury_convocation_apprenant_id).trim() === "") { + alert(" Vous devez choisir un modèle de document "); + return; + } + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("jury_id", selected_id); + form.append("courrier_template_id", selected_jury_convocation_apprenant_id); + form.append("email_test", selected_jury_convocation_apprenant_email_test); + form.append("email_production", selected_jury_convocation_apprenant_email_destinataire_prod); + + + // pièce jointe + form.append("file_business_object", ""); + var list_files = new FormData(); + + for (let i = 0; i < tab_jury_convocation_apprenant_pieces_jointes_result.length; i++) { + form.append('File', tab_jury_convocation_apprenant_pieces_jointes_result[i]); + + } + + // Recuperer la liste des soutenances selectionnées + var tab_soutenance_id = [] + + for (var i = 0; i < selectionModel_columns_jury_seance.length; i++) { + var myid = parseInt(String(selectionModel_columns_jury_seance[i])); + var line = mysy_events[myid]; + //console.log(" ### line = ", line) + tab_soutenance_id.push(line.jury_soutenance_id); + } + form.append("tab_jury_soutenance_ids", tab_soutenance_id); + + + //form.append("File", list_files); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Send_Jury_Apprenant_Soutenance_Convocation_By_Email/"; + + + //console.log(" ### myurl = ", myurl); + + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + // console.log(" In Send_JURY_APPRENANT_Convocations_By_Email res.data.status = " + res.data.status); + //console.log(" In Send_JURY_APPRENANT_Convocations_By_Email res.data.message r_class = " + res.data.message); + + if (String(res.data.status) === String("true")) { + setSend_JURY_APPRENANT_Convocations_By_Email_api("true"); + setSend_JURY_APPRENANT_Convocations_By_Email_result(res.data.message); + + + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + + setselectionModel_columns_jury_seance([]); + setselected_jury_soutenance_id(""); + setactionmass_jury_seance(""); + } + else { + setSend_JURY_APPRENANT_Convocations_By_Email_api("false"); + setSend_JURY_APPRENANT_Convocations_By_Email_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 :( Send_JURY_APPRENANT_Convocations_By_Email = ', error); + setSend_JURY_APPRENANT_Convocations_By_Email_api("false"); + alert("Impossible d'envoyer la convocation par email"); + //setmyApimyApiMessage("") + }) + } + + const [selected_jury_convocation_membre_id, setselected_jury_convocation_membre_id] = useState(""); + const [selected_jury_convocation_membre_type, setselected_jury_convocation_membre_type] = useState(""); + const [selected_jury_convocation_membre_email_destinataire_prod, setselected_jury_convocation_membre_email_destinataire_prod] = useState(""); + const [selected_jury_convocation_membre_email_test, setselected_jury_convocation_membre_email_test] = useState(""); + + const [tab_jury_convocation_membre_pieces_jointes_result, settab_jury_convocation_membre_pieces_jointes_result] = useState([]); + + + const [Dialog_CONVOCATION_JURY_MEMBRE_open, setDialog_CONVOCATION_JURY_MEMBRE_open] = React.useState(false); + const Dialog_convocation_membre_MEMBRE_handleClose = () => { + //alert(" Utiliser le bouton 'fermer' "); + //setOpen(false); + }; + + const Dialog_CONVOCATION_JURY_MEMBRE_handleClose_buton = () => { + setDialog_CONVOCATION_JURY_MEMBRE_open(false); + setselected_jury_convocation_membre_id(); + setselected_jury_convocation_membre_type(""); + setselected_jury_convocation_membre_email_destinataire_prod(); + setselected_jury_convocation_membre_email_test(); + + setactionmass_ftion_val(); + + settab_jury_convocation_membre_pieces_jointes_result([]) + }; + + + + const [Dialog_JURY_INFO_open, setDialog_JURY_INFO_open] = React.useState(false); + + const Dialog_JURY_INFO_handleClose_buton = () => { + setDialog_JURY_INFO_open(false); + }; + + const [p_detail_jury_observation, setp_detail_jury_observation] = useState(""); + const [p_detail_jury_note, setp_detail_jury_note] = useState(""); + const [p_detail_jury_validation, setp_detail_jury_validation] = useState(""); + const [selected_inscription_id_for_jury, setselected_inscription_id_for_jury] = useState(""); + + + const New_Option_mode_animation = [ + { "id": "1", "label": "Distanciel", "value": "1" }, + { "id": "2", "label": "Hybride", "value": "2" }, + { "id": "0", "label": "Présentiel", "value": "0" }, + { "id": "", "label": "", "value": "" }, + ] + + + return ( +
    + {isLoading &&
    +
    +
    } + + {/*** Affichage des messages d'alerte*/} + {display_alert_mysy && String(display_alert_mysy) === "1" && + + } + {/*** FIN Affichage des messages d'alerte*/} + + + {/* Dialog pour gerer les JURY_INFO */} + 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" + + > + + Délibération du Jury + + + {Dialog_1_message} + + +
    Observation
    + + { + setp_detail_jury_observation(e.target.value); + + }} + + /> + +
    + +
    Note
    + + { + setp_detail_jury_note(e.target.value); + }} + + /> + +
    + +
    Validation
    + + { + setp_detail_jury_validation(e.target.value); + }} + + /> + +
    + + + +
    + + + + + + + +
    +
    + + +
    + + +
    + +
    +
    + +
    + +
    + {/* FIN Dialog pour gerer les JURY_INFO */} + + + + {/* Dialog pour gerer les CONVOCATION_JURY_MEMBRE */} + 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" + + > + + Gestion membres jury + + + {Dialog_1_message} + + + +
    Type Document
    + + { + if (value && value.value) { + setselected_jury_convocation_membre_type(value.value); + Get_List_JURY_MEMBRE_Convocations(String(value.value)); + + + } + }} + renderInput={(params) => + } + /> + + + +
    + + {(String(selected_jury_convocation_membre_type) === "email" || String(selected_jury_convocation_membre_type) === "pdf") && +
    Choisir une convocation (membre jury) + { + if (value && value._id) { + + setselected_jury_convocation_membre_id(value._id); + + if (String(value._id) === "default_mail") { + setselected_jury_convocation_membre_type("email"); + } + else if (String(value._id) === "default_pdf") { + setselected_jury_convocation_membre_type("pdf"); + } else { + var result2 = Get_List_JURY_MEMBRE_Convocations_result.filter((local_mymanager) => JSON.parse(local_mymanager)._id === String(value._id)) + + + setselected_jury_convocation_membre_type(JSON.parse(result2).type_doc); + } + settab_jury_convocation_membre_pieces_jointes_result([]); + } + }} + + renderInput={(params) => + } + /> + +
    } + + {String(selected_jury_convocation_membre_type) === "email" &&
    Type Document
    + + + + {String(selected_jury_convocation_membre_type) === "email" && } + +
    } + + {String(selected_jury_convocation_membre_type) === "pdf" &&
    Type Document
    + + + + +
    } + + + {String(selected_jury_convocation_membre_type) === "email" && + } + + + {String(selected_jury_convocation_membre_type) === "email" && + String(actionmass_ftion_val) !== String("convention") &&
    Email destinaitaire + { + setselected_jury_convocation_membre_email_destinataire_prod(e.target.value); + } + } + /> + +
    + } + + + + {String(selected_jury_convocation_membre_type) === "email" &&
    + +
    +
    +
    +
    + +
    + Pièces jointes Convention + +
    + +
    + +
    + +
    + + +
    + + + {tab_jury_convocation_membre_pieces_jointes_result &&
    + +
    + Liste des pièces jointes
    + {
    + {tab_jury_convocation_membre_pieces_jointes_result && tab_jury_convocation_membre_pieces_jointes_result.map((val) => ( +
    +
    + + +
    + ))} +
    } +
    +
    } + + + +
    +
    } + + + +
    + + + + + + + +
    +
    + {String(selected_jury_convocation_membre_type) === "email" && } + + + {String(selected_jury_convocation_membre_type) === "pdf" && + } + +
    + +
    + +
    +
    + +
    + +
    + {/* FIN Dialog pour gerer les CONVOCATION_JURY_MEMBRE */} + + + + {/* Dialog pour gerer les CONVOCATION_JURY_APPRENANT */} + 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" + + > + + Gestion soutenance + + + {Dialog_1_message} + + + +
    Type Document
    + + { + if (value && value.value) { + setselected_jury_convocation_apprenant_type(value.value); + Get_List_JURY_APPRENANT_Convocations(String(value.value)); + + + } + }} + renderInput={(params) => + } + /> + + + +
    + + {(String(selected_jury_convocation_apprenant_type) === "email" || String(selected_jury_convocation_apprenant_type) === "pdf") && +
    Choisir une convocation + { + if (value && value._id) { + + setselected_jury_convocation_apprenant_id(value._id); + + if (String(value._id) === "default_mail") { + setselected_jury_convocation_apprenant_type("email"); + } + else if (String(value._id) === "default_pdf") { + setselected_jury_convocation_apprenant_type("pdf"); + } else { + var result2 = Get_List_JURY_APPRENANT_Convocations_result.filter((local_mymanager) => JSON.parse(local_mymanager)._id === String(value._id)) + + + setselected_jury_convocation_apprenant_type(JSON.parse(result2).type_doc); + } + settab_jury_convocation_apprenant_pieces_jointes_result([]); + } + }} + + renderInput={(params) => + } + /> + +
    } + + {String(selected_jury_convocation_apprenant_type) === "email" &&
    Type Document
    + + + + {String(selected_jury_convocation_apprenant_type) === "email" && } + +
    } + + {String(selected_jury_convocation_apprenant_type) === "pdf" &&
    Type Document
    + + + + +
    } + + + {String(selected_jury_convocation_apprenant_type) === "email" && + } + + + {String(selected_jury_convocation_apprenant_type) === "email" && + String(actionmass_ftion_val) !== String("convention") &&
    Email destinaitaire + { + setselected_jury_convocation_apprenant_email_destinataire_prod(e.target.value); + } + } + /> + +
    + } + + + + {String(selected_jury_convocation_apprenant_type) === "email" &&
    + +
    +
    +
    +
    + +
    + Pièces jointes Convention + +
    + +
    + +
    + +
    + + +
    + + + {tab_jury_convocation_apprenant_pieces_jointes_result &&
    + +
    + Liste des pièces jointes
    + {
    + {tab_jury_convocation_apprenant_pieces_jointes_result && tab_jury_convocation_apprenant_pieces_jointes_result.map((val) => ( +
    +
    + + +
    + ))} +
    } +
    +
    } + + + +
    +
    } + + + +
    + + + + + + + +
    +
    + {String(selected_jury_convocation_apprenant_type) === "email" && } + + + {String(selected_jury_convocation_apprenant_type) === "pdf" && + } + +
    + +
    + +
    +
    + +
    + +
    + {/* FIN Dialog pour gerer les CONVOCATION_JURY_APPRENANT */} + + + + {/*** Dialog Gestion Apprenant concerné par le jury */} + + null} + + PaperProps={{ + + + className: classes.paper, // Apply the paper style + style: { + overflowY: 'unset', + position: 'absolute', + top: '5rem', + margin: "2px", + }, + }} + hideBackdrop={true} + disableScrollLock + classes={{ + paper: classes.dialog + }} + + PaperComponent={PaperComponent} + aria-labelledby="draggable-dialog-title" + > + + Ajout apprenant + + + + + +
    Créneau
    +
    + +
    + { + if (String(props.write_access) === "1" && String(p_detail_sequence_session_id) === "") + return setStartDate(date); + } + } + + + className="disabled_style enable_style datepicker_complement" + locale='fr-FR' + showTimeSelect + timeFormat="HH:mm" + timeIntervals={15} + dateFormat="dd/MM/yyyy HH:mm" + is24Hour + + /> + +
    +
    + Au + +
    + + +
    + { + if (String(props.write_access) === "1" && String(p_detail_sequence_session_id) === "") + return setendDate(date); + } + } + + + className="disabled_style enable_style datepicker_complement" + locale='fr-FR' + showTimeSelect + timeFormat="HH:mm" + timeIntervals={15} + dateFormat="dd/MM/yyyy HH:mm" + is24Hour + + /> + +
    + +
    + +
     
    +
    Adresse
    + +
    + +
    Salle de soutenance
    + { + setp_detail_soutenance_salle(e.target.value); + + } + } + + /> + +
    + +
    Adresse
    + { + setp_detail_soutenance_adresse(e.target.value); + + } + } + + /> + +
    + +
    CP
    + { + setp_detail_soutenance_code_postal(e.target.value); + + } + } + + /> + +
    + +
    Ville
    + { + setp_detail_soutenance_ville(e.target.value); + + } + } + + /> + +
    + +
    Pays
    + { + setp_detail_soutenance_pays(e.target.value); + + } + } + + /> + +
    + +
    + + + +
    Apprenants
    + + +
    Choisir des apprenants
    + {New_Employee_Not_Member && New_Employee_Not_Member.length > 0 && + { + + settab_selected_apprenant([ + ...fixedVal_apprenant, + ...value.filter((i) => fixedVal_apprenant.indexOf(i) === -1), + ]); + + // console.log(" ### tab_selected_apprenant = ", tab_selected_apprenant) + + + }} + + renderInput={(params) => + } + /> + } + +
    + +
    + + +
    + +
    +
    + +
    + +   + + { + setselectionModel_jury_seance_participants(newSelectionModel); + /*if (newSelectionModel.length === 1) + handleClick_edit_employee_From_Line(newSelectionModel);*/ + if (newSelectionModel.length !== 1) { + /* setsubmenu(); + setdisplay_detail_employe(); + setadd_One_Employee();*/ + } + }} + selectionModel={selectionModel_jury_seance_participants} + + localeText={frFR.components.MuiDataGrid.defaultProps.localeText} + rows={Get_Jury_List_Apprenant_Seance_insc_result.map((item, index) => ( + { + id: index, + _id: JSON.parse(item)._id, + email: JSON.parse(item).email, + nom: JSON.parse(item).nom, + prenom: JSON.parse(item).prenom, + + } + ))} + + columns={columns_jury_seance_participant} + pageSize={10} + className="datagridclass" + + onRowDoubleClick={(newSelectionModel) => { + + }} + + rowsPerPageOptions={[10]} + + components={{ + Toolbar: GridToolbar, + }} + //sx={datagridSx} + getCellClassName={(params) => { + + }} + getRowClassName={(params) => { + // Pour la gestion de la couleur de zone double cliquée + if (String(params.row.id) === String(gridline_id)) { + return 'line--statut--selected'; + } + else if (parseInt(String(params.row.id)) % 2 === 0) { + return 'line--statut--pair'; + } + else if (parseInt(String(params.row.id)) % 2 !== 0) { + return 'line--statut--impair'; + } + + + }} + getEstimatedRowHeight={() => 200} + getRowHeight={() => "auto"} + sx={{ + "& .MuiDataGrid-cellContent": { + minHeight: 50, + + } + }} + + /> + + + + +
    + +
    + + +
    +
    + +
    + + +
    +
    + +
    + +
    + + + +
    +
    + {selected_agenda_id && String(selected_agenda_id).length > 5 && } + {(!selected_agenda_id || String(selected_agenda_id).length < 5) && } +
    + +
    + +
    + + + +
    + + + + +
    + +
    + + {/*** Fin Dialog Gestion Apprenant concerné par le jury */} + + + + {/*** Dialog Gestion membre */} + + null} + + PaperProps={{ + + + className: classes.paper, // Apply the paper style + style: { + overflowY: 'unset', + position: 'absolute', + top: '5rem', + margin: "2px", + }, + }} + hideBackdrop={true} + disableScrollLock + classes={{ + paper: classes.dialog + }} + + PaperComponent={PaperComponent} + aria-labelledby="draggable-dialog-title" + > + + Ajout membre + + + + + + + +
    Nouveau membre
    + {New_Employee_Not_Member && New_Employee_Not_Member.length > 0 && + { + + settab_selected_users([ + ...fixedVal, + ...value.filter((i) => fixedVal.indexOf(i) === -1), + ]); + + + }} + + renderInput={(params) => + } + /> + } + +
    + +
    +
    Rôle
    + { + setp_detail_member_role(e.target.value); + + } + } + /> +
    +
    + + +
    + + + +
    +
    + + +
    + +
    + +
    + + + +
    + + + + +
    + +
    + + {/*** Fin ajout Dialog Gestion membre */} + + {/*** Dialog detail eventement */} + 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" + + > + MySy Information + + + {Dialog_1_message} + + + {New_Getall_TrainingSession_result &&
    + + + + + +
    } + + {New_Option_Cible_Jury && New_Option_Cible_Jury.length > 0 &&
    + + + + + +
    } + + +
    + + + + +
    + +
    + + + + + +
    + + +
    Titre + { + if (String(props.write_access) === "1" && String(p_detail_sequence_session_id) === "") + setp_detail_title(e.target.value); + } + } + + /> + +
    + +
    Debut + { + if (String(props.write_access) === "1" && String(p_detail_sequence_session_id) === "") + return setStartDate(date); + } + } + + + className="disabled_style session_caract_Dialog_DatePicker" + locale='fr-FR' + showTimeSelect + timeFormat="HH:mm" + timeIntervals={15} + dateFormat="dd/MM/yyyy HH:mm" + is24Hour + + /> + +
    + + +
    Fin + { + if (String(props.write_access) === "1" && String(p_detail_sequence_session_id) === "") + return setendDate(date); + } + } + + + className="disabled_style session_caract_Dialog_DatePicker" + locale='fr-FR' + showTimeSelect + timeFormat="HH:mm" + timeIntervals={15} + dateFormat="dd/MM/yyyy HH:mm" + is24Hour + + /> + +
    + +
    Commentaire + { + + // console.log(" dans comment p_detail_sequence_session_id = ", p_detail_sequence_session_id); + if (String(props.write_access) === "1" && String(p_detail_sequence_session_id) === "") + setp_detail_comment(e.target.value); + } + } + multiline + minRows={2} + maxRows={2} + rows={2} + + /> + +
    + + +
    + + + + + + + + + +
    + {String(props.write_access) === "1" && String(p_detail_sequence_session_id) === "" &&
    + {p_detail_event_id && String(p_detail_event_id) !== "" && } + {(!p_detail_event_id || String(p_detail_event_id) === "") && } + + + +
    } +
    + +
    +
    + +
    + + + {String(props.write_access) === "1" && String(p_detail_sequence_session_id) === "" && p_detail_event_id && String(p_detail_event_id) !== "" && + +
    + +
    + + +
    } + +
    + {/*** FIn Dialog detail eventement */} + + + +

    Les conseils de classe

    + +
    +
    Utilisez les filtres !
    +
    +
    + + {New_Option_Filter && New_Option_Filter.length > 0 && (data).value === String(p_filtre1))[0].label} + options={New_Option_Filter} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre1(value.value); + + } + + }} + + renderInput={(params) => + } + />} + + +
    + + + +
    + {p_filtre1 && + { setp_filtre1_value(e.target.value); }} + InputProps={{ + endAdornment: ( + + { + setp_filtre1_value(""); + }} /> + + ), + }} + + /> + + } +
    + {p_filtre1 && } + {p_filtre1 && } + + +
    + + {p_filtre2 && +
    +
    + + {New_Option_Filter && New_Option_Filter.length > 0 && (data).value === String(p_filtre2))[0].label} + options={New_Option_Filter} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre2(value.value); + + } + + }} + + renderInput={(params) => + } + />} + +
    +
    + {String(p_filtre2).length > 2 && + setp_filtre2_value(e.target.value)} + InputProps={{ + endAdornment: ( + + { + setp_filtre2_value(""); + }} /> + + ), + }} + + />} +
    + + {String(p_filtre2).length > 2 && } + + {String(p_filtre2).length > 2 && } + +
    + } + + + {p_filtre3 && +
    +
    + + {New_Option_Filter && New_Option_Filter.length > 0 && (data).value === String(p_filtre3))[0].label} + options={New_Option_Filter} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre3(value.value); + + } + + }} + + renderInput={(params) => + } + />} + + +
    +
    + {String(p_filtre3).length > 2 && + setp_filtre3_value(e.target.value)} + InputProps={{ + endAdornment: ( + + { + setp_filtre3_value(""); + }} /> + + ), + }} + + />} +
    + + {String(p_filtre2).length > 2 && } + + {String(p_filtre3).length > 2 && } +
    + } + + +
    + +
    + +
    + +
    + + +
    + +
    + +
    +
    + +
    + +
    +
    + +
    + +   + + { + setselectionModel_columns_jury(newSelectionModel); + /*if (newSelectionModel.length === 1) + handleClick_edit_employee_From_Line(newSelectionModel);*/ + if (newSelectionModel.length !== 1) { + /* setsubmenu(); + setdisplay_detail_employe(); + setadd_One_Employee();*/ + } + }} + selectionModel={selectionModel_columns_jury} + + localeText={frFR.components.MuiDataGrid.defaultProps.localeText} + rows={Getall_Partner_Jury_result.map((item, index) => ( + { + id: index, + _id: JSON.parse(item)._id, + session_id: JSON.parse(item).session_id, + chef_jury_id: JSON.parse(item).chef_jury_id, + code: JSON.parse(item).code, + email_jury: JSON.parse(item).email_jury, + description: JSON.parse(item).description, + chef_jury_nom_prenom: JSON.parse(item).chef_jury_nom_prenom, + nb_membre: JSON.parse(item).nb_membre, + ue_id: JSON.parse(item).ue_id, + cible: JSON.parse(item).cible, + code_session: JSON.parse(item).code_session, + ue_code: JSON.parse(item).ue_code, + } + ))} + + columns={columns_jury} + pageSize={10} + className="datagridclass" + + onRowDoubleClick={(newSelectionModel) => { + setsoutenance_data_edit_mode(""); + setsoutenance_display(""); + setsoutenance_data_changed(""); + setsubmenu_detail_seance(""); + setselected_jury_cible("") + settab_selected_apprenant([]); + setselectionModel_columns_jury_membre([]); + setactionmass_jury_membre_val(""); + + Get_List_UE_From_Session_Id(newSelectionModel.row.session_id); + + setselected_id(newSelectionModel.row._id); + setgridline_id(newSelectionModel.row.id); + setselected_session_id(newSelectionModel.row.session_id); + setselected_ue_id(newSelectionModel.row.ue_id); + setselected_ue_code(newSelectionModel.row.ue_code) + setselected_jury_cible(newSelectionModel.row.cible); + + handleClick_edit_jury_From_Line(newSelectionModel.row.id); + + + }} + + rowsPerPageOptions={[10]} + + getCellClassName={(params) => { + + + + }} + getRowClassName={(params) => { + // Pour la gestion de la couleur de zone double cliquée + if (String(params.row.id) === String(gridline_id)) { + return 'line--statut--selected'; + } + else if (parseInt(String(params.row.id)) % 2 === 0) { + return 'line--statut--pair'; + } + else if (parseInt(String(params.row.id)) % 2 !== 0) { + return 'line--statut--impair'; + } + + + }} + getEstimatedRowHeight={() => 200} + getRowHeight={() => "auto"} + sx={{ + "& .MuiDataGrid-cellContent": { + minHeight: 50, + + } + }} + + /> + +
    + +
    + +
    + + {selectionModel_columns_jury && selectionModel_columns_jury.length >= 1 &&
    + +   + { + if (value && value.value) { + if (String(value.value) === "supprimer" + || String(value.value) === "convocation_jury") { + setactionmass_ftion_val(value.value); + } + else { + setactionmass_ftion_val(); + } + + } + + }} + + renderInput={(params) => + } + /> + + + {actionmass_ftion_val && String(actionmass_ftion_val) !== "supprimer" && } + + {actionmass_ftion_val && String(actionmass_ftion_val) === "supprimer" && + } + +
    } +
    +
    +
    + +
    + +
    + +   + + {String(props.check_user_acces_right("jury", "write")) === "1" && } + +
    +
    + +
    + +
     
    + + { + selected_id && String(selected_id).length > 5 &&
    + + + + + + {String(history_securite_read) === "1" && } + +
    + } + + + { + String(submenu) === "detail_conseil_classe" &&
    + + {String(display_jury) === "1" && String(add_one_jury) !== "1" &&
    + + + + + {String(equipe_data_edit_mode) !== "1" &&
    +
    + +
    + +
    +
    Code
    + + +
    + +
    Promotion 1
    + {New_Getall_TrainingSession_result && New_Getall_TrainingSession_result.length > 0 && (data)._id === String(selected_session_id))[0].label} + + />} + +
    + + +
    Cible
    + {New_Option_Cible_Jury && New_Option_Cible_Jury.length > 0 && (data).id === String(selected_jury_cible))[0].label} + + />} + +
    + + + {selected_jury_cible && New_Option_Cible_Jury && + New_Get_List_UE_From_Session_Id_result && New_Get_List_UE_From_Session_Id_result.length > 0 && +
    Matière
    + + + +
    } + + + +
    Description
    + + +
    + +
    Email Diffusion
    + + +
    + +
    Responsable
    + {New_Getall_Training_Employee_No_Filter_result && New_Getall_Training_Employee_No_Filter_result.length > 0 && + + (data)._id === String(p_detail_chef_jury_id))[0].label} + + /> + } + +
    + + + + +
    +   +
    +
    + +
    + +
    +
    + +
    Salle
    + + +
    + + + {New_Getall_Partner_Site_Formation_result && New_Getall_Partner_Site_Formation_result.length > 0 && +
    Site de formation
    + (data)._id === String(p_detail_site_formation_id))[0].label} + /> +
    } + + + +
    Adresse
    + + +
    + +
    Code postal
    + + +
    + +
    Ville
    + + +
    + +
    Pays
    + + +
    + + + + +
    +   +
    +
    + +
    } + + + + {String(equipe_data_edit_mode) === "1" &&
    +
    + +
    + +
    +
    Code
    + { + setp_detail_code(e.target.value); + setequipe_data_changed("1"); + + } + } + /> + +
    + + {New_Getall_TrainingSession_result &&
    Promotion 2
    + (data)._id === String(selected_session_id))[0].label} + onChange={(event, value) => { + if (value && value._id) { + setselected_session_id(value._id); + Get_List_UE_From_Session_Id(value._id); + } else { + setselected_session_id(""); + setNew_Get_List_UE_From_Session_Id_result([]); + setGet_List_UE_From_Session_Id_result([]) + } + + setselected_jury_cible(""); + + }} + + renderInput={(params) => + } + /> + +
    } + + {New_Option_Cible_Jury && New_Option_Cible_Jury.length > 0 &&
    Cible
    + (data).id === String(selected_jury_cible))[0].label} + onChange={(event, value) => { + if (value && value.id) { + setselected_jury_cible(value.id); + } else { + setselected_jury_cible(""); + } + + setselected_ue_id(""); + + }} + + renderInput={(params) => + } + /> + +
    } + + + {selected_jury_cible && String(selected_jury_cible) === "soutenance" && New_Option_Cible_Jury && + New_Get_List_UE_From_Session_Id_result && New_Get_List_UE_From_Session_Id_result.length > 0 && +
    Matière
    + (data)._id === String(selected_ue_id))[0].label} + onChange={(event, value) => { + if (value && value._id) { + setselected_ue_id(value._id); + } else { + setselected_ue_id(""); + } + + }} + + renderInput={(params) => + } + /> + +
    } + + +
    Description
    + { + setp_detail_description(e.target.value); + setequipe_data_changed("1"); + + } + } + /> + +
    +
    Email Diffusion
    + { + setp_detail_email_jury(e.target.value); + setequipe_data_changed("1"); + + } + } + + /> + +
    + +
    Responsable
    + {New_Getall_Training_Employee_No_Filter_result && New_Getall_Training_Employee_No_Filter_result.length > 0 && + + (data)._id === String(p_detail_chef_jury_id))[0].label} + onChange={(event, value) => { + if (value && value._id) { + setp_detail_chef_jury_id(value._id); + } else { + setp_detail_chef_jury_id(""); + } + + setequipe_data_changed("1"); + + }} + + renderInput={(params) => + } + /> + + } + +
    + + +
    +   +
    + +
    + +
    + +
    +
    + +
    Salle
    + { + setp_detail_salle(e.target.value); + setequipe_data_changed("1"); + + } + } + + /> + +
    + + {New_Getall_Partner_Site_Formation_result && New_Getall_Partner_Site_Formation_result.length > 0 && +
    Site de formation
    + (data)._id === String(p_detail_site_formation_id))[0].label} + + onChange={(event, value) => { + + if (value && value._id && String(value._id).length > 2) { + setp_detail_site_formation_id(value._id); + setp_detail_adresse(value.adr_site); + setp_detail_code_postal(value.cp_site); + setp_detail_ville(value.ville_site); + setp_detail_pays(value.pays_site); + + if (document.getElementsByName("detail_adresse")[0]) { + document.getElementsByName("detail_adresse")[0].disabled = true; + document.getElementsByName("detail_adresse")[0].style.backgroundColor = "#ECEFF1"; + } + if (document.getElementsByName("detail_code_postal")[0]) { + document.getElementsByName("detail_code_postal")[0].disabled = true; + document.getElementsByName("detail_code_postal")[0].style.backgroundColor = "#ECEFF1"; + } + if (document.getElementsByName("detail_ville")[0]) { + document.getElementsByName("detail_ville")[0].disabled = true; + document.getElementsByName("detail_ville")[0].style.backgroundColor = "#ECEFF1"; + } + + if (document.getElementsByName("detail_pays")[0]) { + document.getElementsByName("detail_pays")[0].disabled = true; + document.getElementsByName("detail_pays")[0].style.backgroundColor = "#ECEFF1"; + } + + + } else { + setp_detail_site_formation_id(""); + setp_detail_adresse(""); + setp_detail_code_postal(""); + setp_detail_ville(""); + setp_detail_pays(""); + + if (document.getElementsByName("detail_adresse")[0]) { + document.getElementsByName("detail_adresse")[0].disabled = false; + document.getElementsByName("detail_adresse")[0].style.backgroundColor = "#FFFFFF"; + } + if (document.getElementsByName("detail_code_postal")[0]) { + document.getElementsByName("detail_code_postal")[0].disabled = false; + document.getElementsByName("detail_code_postal")[0].style.backgroundColor = "#FFFFFF"; + } + if (document.getElementsByName("detail_ville")[0]) { + document.getElementsByName("detail_ville")[0].disabled = false; + document.getElementsByName("detail_ville")[0].style.backgroundColor = "#FFFFFF"; + } + + if (document.getElementsByName("detail_pays")[0]) { + document.getElementsByName("detail_pays")[0].disabled = false; + document.getElementsByName("detail_pays")[0].style.backgroundColor = "#FFFFFF"; + } + } + + } + } + renderInput={(params) => + } + /> +
    } + + + +
    Adresse
    + { + setp_detail_adresse(e.target.value); + setequipe_data_changed("1"); + + } + } + + /> + +
    + +
    Code postal
    + { + setp_detail_code_postal(e.target.value); + setequipe_data_changed("1"); + + } + } + + /> + +
    + +
    Ville
    + { + setp_detail_ville(e.target.value); + setequipe_data_changed("1"); + + } + } + + /> + +
    + +
    Pays
    + { + setp_detail_pays(e.target.value); + setequipe_data_changed("1"); + + } + } + + /> + +
    + + + + +
    +   +
    +
    + +
    } + +
    +   +
    +
    + {String(props.check_user_acces_right("jury", "write")) === "1" && String(equipe_data_changed) === "1" && String(equipe_data_edit_mode) === "1" &&
    + /!\ Pensez à enregistrer les modifications +
    } + + + {String(props.check_user_acces_right("jury", "write")) === "1" &&
    + + {String(equipe_data_edit_mode) === "1" &&
    + + + +
    } + + {String(equipe_data_edit_mode) === "1" &&
    + +
    } +
    } + + + {String(props.check_user_acces_right("jury", "write")) === "1" && String(equipe_data_edit_mode) !== "1" &&
    + + + +
    } +
    +   +
    +
    +
    } + + + {String(add_one_jury) === "1" && String(display_jury) !== "1" &&
    + + +
    +
    + +
    +
    +
    Code
    + { + setp_detail_code(e.target.value); + + } + } + /> + +
    + + + {New_Getall_TrainingSession_result &&
    Promotion
    + (data)._id === String(selected_session_id))[0].label} + onChange={(event, value) => { + if (value && value._id) { + setselected_session_id(value._id); + Get_List_UE_From_Session_Id(value._id); + } else { + setselected_session_id(""); + setselected_session_id(""); + setNew_Get_List_UE_From_Session_Id_result([]); + setGet_List_UE_From_Session_Id_result([]) + } + setselected_jury_cible(""); + + }} + + renderInput={(params) => + } + /> + +
    } + + + {New_Option_Cible_Jury && New_Option_Cible_Jury.length > 0 &&
    Cible
    + (data).id === String(selected_jury_cible))[0].label} + onChange={(event, value) => { + if (value && value.id) { + setselected_jury_cible(value.id); + } else { + setselected_jury_cible(""); + } + + setselected_ue_id(""); + + }} + + renderInput={(params) => + } + /> + +
    } + + +
    Cible
    + Groupe (TD, TP, etc) + +
    + + {selected_jury_cible && String(selected_jury_cible) === "soutenance" && New_Option_Cible_Jury && + New_Get_List_UE_From_Session_Id_result && New_Get_List_UE_From_Session_Id_result.length > 0 && +
    Matière
    + (data)._id === String(selected_ue_id))[0].label} + onChange={(event, value) => { + if (value && value._id) { + setselected_ue_id(value._id); + } else { + setselected_ue_id(""); + } + + }} + + renderInput={(params) => + } + /> + +
    } + + + +
    Description
    + { + setp_detail_description(e.target.value); + + } + } + /> + +
    + +
    Email Diffusion
    + { + setp_detail_email_jury(e.target.value); + + } + } + /> + +
    + +
    Responsable
    + {New_Getall_Training_Employee_No_Filter_result && New_Getall_Training_Employee_No_Filter_result.length > 0 && + + (data)._id === String(p_detail_chef_jury_id))[0].label} + onChange={(event, value) => { + if (value && value._id) { + setp_detail_chef_jury_id(value._id); + } else { + setp_detail_chef_jury_id(""); + } + + }} + + renderInput={(params) => + } + /> + + } + +
    + +
    +   +
    + +
    +
    + +
    + +
    + +
    Salle
    + { + setp_detail_salle(e.target.value); + setequipe_data_changed("1"); + + } + } + + /> + +
    + + {New_Getall_Partner_Site_Formation_result && New_Getall_Partner_Site_Formation_result.length > 0 && +
    Site de formation
    + (data)._id === String(p_detail_site_formation_id))[0].label} + + onChange={(event, value) => { + + if (value && value._id && String(value._id).length > 2) { + setp_detail_site_formation_id(value._id); + setp_detail_adresse(value.adr_site); + setp_detail_code_postal(value.cp_site); + setp_detail_ville(value.ville_site); + setp_detail_pays(value.pays_site); + + if (document.getElementsByName("detail_adresse")[0]) { + document.getElementsByName("detail_adresse")[0].disabled = true; + document.getElementsByName("detail_adresse")[0].style.backgroundColor = "#ECEFF1"; + } + if (document.getElementsByName("detail_code_postal")[0]) { + document.getElementsByName("detail_code_postal")[0].disabled = true; + document.getElementsByName("detail_code_postal")[0].style.backgroundColor = "#ECEFF1"; + } + if (document.getElementsByName("detail_ville")[0]) { + document.getElementsByName("detail_ville")[0].disabled = true; + document.getElementsByName("detail_ville")[0].style.backgroundColor = "#ECEFF1"; + } + + if (document.getElementsByName("detail_pays")[0]) { + document.getElementsByName("detail_pays")[0].disabled = true; + document.getElementsByName("detail_pays")[0].style.backgroundColor = "#ECEFF1"; + } + + + } else { + setp_detail_site_formation_id(""); + setp_detail_adresse(""); + setp_detail_code_postal(""); + setp_detail_ville(""); + setp_detail_pays(""); + + if (document.getElementsByName("detail_adresse")[0]) { + document.getElementsByName("detail_adresse")[0].disabled = false; + document.getElementsByName("detail_adresse")[0].style.backgroundColor = "#FFFFFF"; + } + if (document.getElementsByName("detail_code_postal")[0]) { + document.getElementsByName("detail_code_postal")[0].disabled = false; + document.getElementsByName("detail_code_postal")[0].style.backgroundColor = "#FFFFFF"; + } + if (document.getElementsByName("detail_ville")[0]) { + document.getElementsByName("detail_ville")[0].disabled = false; + document.getElementsByName("detail_ville")[0].style.backgroundColor = "#FFFFFF"; + } + + if (document.getElementsByName("detail_pays")[0]) { + document.getElementsByName("detail_pays")[0].disabled = false; + document.getElementsByName("detail_pays")[0].style.backgroundColor = "#FFFFFF"; + } + } + + } + } + renderInput={(params) => + } + /> +
    } + +
    Adresse
    + { + setp_detail_adresse(e.target.value); + setequipe_data_changed("1"); + + } + } + + /> + +
    + +
    Code postal
    + { + setp_detail_code_postal(e.target.value); + setequipe_data_changed("1"); + } + } + + /> + +
    + +
    Ville
    + { + setp_detail_ville(e.target.value); + setequipe_data_changed("1"); + } + } + + /> + +
    + +
    Pays
    + { + setp_detail_pays(e.target.value); + setequipe_data_changed("1"); + + } + } + /> + +
    + + + +
    +   +
    +
    + +
    + +
    +   +
    +
    + +
    + +
    + + + +
    + +
    + +
    +
    + +
    +   +
    +
    + +
    } + +
    + } + + { + String(submenu) === "membre" &&
    + +
    +
    +
    + + + +
    + +   + + { + setselectionModel_columns_jury_membre(newSelectionModel); + /*if (newSelectionModel.length === 1) + handleClick_edit_employee_From_Line(newSelectionModel);*/ + if (newSelectionModel.length !== 1) { + /* setsubmenu(); + setdisplay_detail_employe(); + setadd_One_Employee();*/ + } + }} + selectionModel={selectionModel_columns_jury_membre} + + localeText={frFR.components.MuiDataGrid.defaultProps.localeText} + rows={New_Getall_Jury_Members.map((item, index) => ( + { + id: index, + _id: (item)._id, + nom: (item).nom, + prenom: (item).prenom, + email: (item).email, + comment: (item).comment, + civilite: (item).civilite, + leader: (item).leader, + role: (item).role, + + } + ))} + + columns={columns_jury_membre} + pageSize={10} + className="datagridclass" + + onRowDoubleClick={(newSelectionModel) => { + /* setselected_id(newSelectionModel.row._id); + + setgridline_id(newSelectionModel.row.id); + + handleClick_edit_evaluation_From_Line(newSelectionModel.row.id); + */ + + + }} + + rowsPerPageOptions={[10]} + + + getCellClassName={(params) => { + + // Traitement de la cellule 'notes' + if (String(params.field) === "note") { + return 'cell--note'; + } + + }} + + getRowClassName={(params) => { + // Pour la gestion de la couleur de zone double cliquée + + + if (String(params.row.id) === String(gridline_jury_member_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, + + } + }} + + /> + + {selectionModel_columns_jury_membre && selectionModel_columns_jury_membre.length >= 1 && +
    +
    + +   + + { + if (value && value.value) { + if (String(value.value) === "delete_jury_membre") { + setactionmass_jury_membre_val(value.value); + } + else { + setactionmass_jury_membre_val(""); + } + } + else { + setactionmass_jury_membre_val(""); + } + + }} + + renderInput={(params) => + } + /> +   + + + {actionmass_jury_membre_val && String(actionmass_jury_membre_val).length > 1 && + } +
    + +
    + +
    } +
    + + +
    + + + +
     
    + +
    + +
    + +   + + + +
    +
    + +
    +
    + + +
    + + +
    + } + + + { + String(submenu) === "piece_jointe" &&
    +
    +
    + + {String(props.check_user_acces_right("jury", "write")) === "1" &&
    + +
    } + {file_1_name && file_1_name.name && + } + + {Record_All_PJ_api && String(Record_All_PJ_api) === "true" &&
    Pièce jointe enregistrée
    } + + {Record_All_PJ_api && String(Record_All_PJ_api) === "false" &&
    {Record_All_PJ_message}
    } + + +
    + + + + {file_1_name && file_1_name.name &&
    + +
    + +
    + + + +
    } + + {Get_List_Of_All_PJ_result &&
    +
    + Liste des pièces jointes
    +
    + {Get_List_Of_All_PJ_result && Get_List_Of_All_PJ_result.map((val) => ( +
    + + + {String(props.check_user_acces_right("jury", "write")) === "1" && Supprimer + + + } + modal + nested + position="center center" + > + {close => ( +
    + +
    MySy Information
    +
    + {' '} + + En confirmant cette opération, la pièce jointe sera définitivement supprimée.
    + + +
    +
    +
    + + +
    +
    + +
    +
    +
    + )} +
    } + +
    + ))} +
    +
    +
    } +
    +
    +   +
    +
    + } + + + { + String(submenu) === "historique" &&
    + +
    + } + + + { + String(submenu) === "planning" &&
    + +
    + Affichage : + +
    + + {String(display_view) === "planning" &&
    +   +
    +
    + + + } + //plugins={[timeGridPlugin]} + plugins={[timeGridPlugin, daygridPlugin, interactionPlugin,]} + views={["dayGridMonth", "dayGridWeek", "dayGridDay"]} + slotMinTime={Partner_Debut_Journee} + slotMaxTime={Partner_Fin_Journee} + scrollTime='08:00' + displayEventEnd={true} + eventContent={renderEventContent} + eventClick={handleEventClick} + eventColor='#378006' + /> +
    +
    +
    } + + {String(display_view) === "list" &&
    +   + +
    +
    +
    + +
    +   + + { + setselectionModel_columns_jury_seance(newSelectionModel); + /* if (newSelectionModel.length === 1) + handleClick_edit_config_From_Line(newSelectionModel); + if (newSelectionModel.length !== 1) { + setp_detail_config_valeur(); + setp_detail_config_point(); + setConfig_data_changed(); + setconfig_data_edit_mode(); + setdisplay_detail_config(); + + + }*/ + }} + selectionModel={selectionModel_columns_jury_seance} + + localeText={frFR.components.MuiDataGrid.defaultProps.localeText} + rows={mysy_events.map((item, index) => ( + { + id: index, + _id: (item)._id, + event_title: (item).title, + event_start: (item).start, + event_end: (item).end, + jury_soutenance_id: (item).jury_soutenance_id, + jury_session_id: (item).jury_session_id, + convocation_apprenant_send: (item).convocation_apprenant_send, + convocation_apprenant_date_sending: (item).convocation_apprenant_date_sending, + } + + ))} + + columns={columns_jury_seance_planning} + pageSize={10} + className="datagridclass" + + onRowDoubleClick={(newSelectionModel) => { + if (String(props.check_user_acces_right("jury", "write")) === "1") { + setselected_agenda_id(newSelectionModel.row._id); + setselected_jury_soutenance_id(newSelectionModel.row.jury_soutenance_id); + setp_detail_linked_collection_recid(newSelectionModel.row.jury_session_id); + setsubmenu_detail_seance("display_jury_seance"); + GetCurrentSession(newSelectionModel.row.jury_session_id); + + if (String(selected_jury_cible) === "soutenance") { + Get_Jury_List_Apprenant_Soutenance(newSelectionModel.row._id, newSelectionModel.row.jury_soutenance_id); + } + + if (document.getElementById('myRef_note_classemment')) { + var divh = document.getElementById('myRef_note_classemment').offsetTop; + + window.scrollTo({ + top: divh, + behavior: "smooth", + }); + } + } + + }} + + rowsPerPageOptions={[10]} + //disableSelectionOnClick + components={{ + Toolbar: GridToolbar, + }} + //sx={datagridSx} + getCellClassName={(params) => { + + + //field === "order_header_status" + if (params.field === "order_header_status" && String(params.value) == "0") { + return 'cell--status--brouillon'; + } + + if (params.field === "order_header_status" && String(params.value) == "1") { + + return 'cell--status--encours'; + } + + if (params.field === "order_header_status" && String(params.value) == "2") { + return 'cell--status--traite'; + } + + if (params.field === "order_header_status" && String(params.value) == "3") { + return 'cell--status--facture'; + } + + }} + getRowClassName={(params) => { + + if (String(params.row.status) === "-1") { + return 'line--statut--annule'; + } + if (String(params.row.status) === "0") { + return 'line--statut--preinscrit'; + } + if (String(params.row.status) === "1") { + return 'line--statut--inscrit'; + } + }} + + + /> + +
    + +
    + +
    + + {selectionModel_columns_jury_seance && selectionModel_columns_jury_seance.length >= 1 &&
    + +   + { + if (value && value.value) { + if (String(value.value) === "supprimer" + || String(value.value) === "convocation_apprenant" + ) { + setactionmass_jury_seance(value.value); + } + else { + setactionmass_jury_seance(); + } + + } + + }} + + renderInput={(params) => + } + /> + + + {actionmass_jury_seance && String(actionmass_jury_seance) === "convocation_apprenant" && } + + {actionmass_jury_seance && String(actionmass_jury_seance) === "supprimer" && + } + +
    } +
    + + +
    + +
    + +
    + +
    + {String(props.check_user_acces_right("jury", "write")) === "1" && } +
    +
    + +
    + + +
    } +
    + } + + { + String(submenu) === "selection" &&
    + + + +
    + } + +
     
    + { + String(submenu_detail_seance) === String("display_jury_seance") && String(selected_jury_cible) === "examen" + && GetCurrentSession_result.length > 0 && +
    + + + +
    + } + + + { + String(submenu_detail_seance) === String("display_jury_seance") && String(selected_jury_cible) === "soutenance" + && GetCurrentSession_result.length > 0 && +
    + + + + + {String(soutenance_data_edit_mode) !== "1" &&
    + +
    + Sujet 1
    + + +
    + + +
    + Observation
    + + + +
    + +
    + Note
    + + +
    + +
    } + + {String(soutenance_data_edit_mode) === "1" &&
    + +
    + Sujet
    + { + setp_detail_soutenance_sujet(e.target.value); + + }} + + /> + + +
    + + +
    + Observation
    + { + setp_detail_soutenance_observation(e.target.value); + + }} + + /> +
    + +
    + Note
    + + { + setp_detail_soutenance_note(e.target.value); + }} + + /> + + +
    + + +
    } + + +
    +   +
    + {String(props.check_user_acces_right("jury", "write")) === "1" && String(soutenance_data_edit_mode) === "1" &&
    + +
    + +
    + + + +
    + +
    + +
    +
    + +
    +   +
    +
    } + + {String(soutenance_data_edit_mode) !== "1" &&
    + + {String(props.check_user_acces_right("jury", "write")) === "1" && } + +
    } + +
    + } +
    + ); +} + + +export default Conseil_Classe; diff --git a/src/components/Crm_Opportunite.js b/src/components/Crm_Opportunite.js index f09cc4a..938dcce 100644 --- a/src/components/Crm_Opportunite.js +++ b/src/components/Crm_Opportunite.js @@ -293,7 +293,7 @@ const CRM_Opportunite = (props) => { let file_type = event.target.files[0].type; //console.log("file_size = ",file_size," file_type = ",file_type); - if (file_size > 1000000) { + if (file_size > 10000000) { alert("Le fichier ne doit pas dépasser un 1 Méga octets"); return; } diff --git a/src/components/Dashbord_Inscription_All_Inscription.js b/src/components/Dashbord_Inscription_All_Inscription.js index 0b50e3c..a69e9d9 100644 --- a/src/components/Dashbord_Inscription_All_Inscription.js +++ b/src/components/Dashbord_Inscription_All_Inscription.js @@ -130,7 +130,7 @@ const Dashbord_Inscriptions_all_inscriptions = (props) => { form.append("filter_value", filter_value); - console.log(" LAAA filter_group_by = ", filter_group_by) + // console.log(" LAAA filter_group_by = ", filter_group_by) var myurl = ""; if (String(filter_group_by) === "class") diff --git a/src/components/DisplayPartnerPromotion.js b/src/components/DisplayPartnerPromotion.js index b789523..64b5e8d 100644 --- a/src/components/DisplayPartnerPromotion.js +++ b/src/components/DisplayPartnerPromotion.js @@ -327,9 +327,8 @@ const DisplayPartnerPromotion = (props) => { return (
    - {String(cellValues.row.distantiel) === "1" && "Actif"}  - {String(cellValues.row.distantiel) !== "1" && "Inactif"}  - + {String(cellValues.row.statut) === "1" && "Actif"}  + {String(cellValues.row.statut) !== "1" && "Inactif"} 
    ); @@ -883,7 +882,7 @@ const DisplayPartnerPromotion = (props) => { setAnchorEl(null); if (option && String(option) === "Mise à jour") { - setdialogOpen_update(true); + setdialogOpen_update(true); } else if (option && String(option) === "Valider Insc.") { @@ -4009,7 +4008,7 @@ const DisplayPartnerPromotion = (props) => { let file_type = event.target.files[0].type; //console.log("file_size = ",file_size," file_type = ",file_type); - if (file_size > 1000000) { + if (file_size > 10000000) { setdisplay_alert_mysy("1"); setalert_message("Le fichier ne doit pas dépasser un 1 Méga octets"); setalert_type("error"); @@ -4345,6 +4344,8 @@ const DisplayPartnerPromotion = (props) => { //console.log(" ### setnb_stagiaire_Inscrit = ", data['message'].length); var new_data2 = []; + var nb_line_invoices = 0; + const new_data = data['message'].map((x) => { //--- @@ -4353,6 +4354,14 @@ const DisplayPartnerPromotion = (props) => { var local_nom = JSON.parse(x).nom; var local_prenom = JSON.parse(x).prenom; + /* + IMPORTANT : + Si une seule ligne est facturée alors on considere que le process de facturation a commencé + */ + + if (JSON.parse(x).invoiced && String(JSON.parse(x).invoiced) === "1") { + nb_line_invoices = nb_line_invoices + 1; + } //--- @@ -4369,6 +4378,12 @@ const DisplayPartnerPromotion = (props) => { }); + if (nb_line_invoices > 0 && nb_line_invoices === data['message'].length) { + setselected_session_invoiced_statut("2"); + } else if (nb_line_invoices > 0 && nb_line_invoices < data['message'].length) { + setselected_session_invoiced_statut("1"); + } + if (new_data2.length > 0) setNew_GetListePreinscrit_insc_result(new_data2); else @@ -4403,7 +4418,7 @@ const DisplayPartnerPromotion = (props) => { let file_type = event.target.files[0].type; //console.log("file_size = ",file_size," file_type = ",file_type); - if (file_size > 1000000) { + if (file_size > 10000000) { alert("Le fichier ne doit pas dépasser un 1 Méga octets"); return; } @@ -6017,7 +6032,7 @@ const DisplayPartnerPromotion = (props) => { function enableSessionFields() { if (rowss && String(gridline_id).length > 0 && rowss.length > 0) { - var local_session_invoice_status = JSON.parse(rowss[gridline_id]).invoiced_statut; + var local_session_invoice_status = selected_session_invoiced_statut; if (String(local_session_invoice_status) === "1") { @@ -8706,7 +8721,7 @@ const DisplayPartnerPromotion = (props) => { //alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a); - if (file_size > 1000000) { + if (file_size > 10000000) { // alert("L'image ne doit pas dépasser un 1 Méga octets"); setdisplay_alert_mysy("1"); setalert_message("L'image ne doit pas dépasser un 1 Méga octets"); @@ -9293,7 +9308,7 @@ const DisplayPartnerPromotion = (props) => { const [p_detail_is_bpf, setp_detail_is_bpf] = useState(); const [p_detail_is_bpf_label, setp_detail_is_bpf_label] = useState(); - + const emplacement_tab = [ { @@ -9302,7 +9317,7 @@ const DisplayPartnerPromotion = (props) => { }, { value: 'extra', - label: 'Extra', + label: 'Inter', }, { value: 'autre', @@ -19316,7 +19331,7 @@ const DisplayPartnerPromotion = (props) => {
    - {String(p_filtre2).length > 3 && String(p_filtre2) !== "archive" && + {String(p_filtre2).length > 2 && String(p_filtre2) !== "archive" && { InputLabelProps={{ shrink: true, }} - //disabled={true} + disabled={!edit_session_form} className="disabled_style" value={p_code_session} onChange={(e) => setp_code_session(e.target.value)} @@ -21480,7 +21495,7 @@ const DisplayPartnerPromotion = (props) => { InputLabelProps={{ shrink: true, }} - //disabled={true} + disabled={!edit_session_form} className="disabled_style" value={p_detail_titre} onChange={(e) => setp_detail_titre(e.target.value)} @@ -21531,7 +21546,7 @@ const DisplayPartnerPromotion = (props) => { InputLabelProps={{ shrink: true, }} - //disabled={true} + disabled={!edit_session_form} className="disabled_style" value={p_detail_location_type_label} @@ -21552,7 +21567,7 @@ const DisplayPartnerPromotion = (props) => { className="disabled_style" options={New_Getall_Partner_Site_Formation_result} value={New_Getall_Partner_Site_Formation_result.filter((data) => (data)._id === String(p_session_site_formation_id))[0].label} - + disabled={!edit_session_form} onChange={(event, value) => { if (value && value._id && String(value._id).length > 2) { @@ -21633,7 +21648,7 @@ const DisplayPartnerPromotion = (props) => { shrink: true, }} inputProps={{ min: "0", max: "1", step: "1" }} - disabled={false} + disabled={!edit_session_form} className="disabled_style" value={p_session_site_formation_code} /> @@ -21652,7 +21667,7 @@ const DisplayPartnerPromotion = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={!edit_session_form} className="disabled_style" value={p_adresse} onChange={(e) => setp_adresse(e.target.value)} @@ -21669,7 +21684,7 @@ const DisplayPartnerPromotion = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={!edit_session_form} className="disabled_style" value={p_code_postal} onChange={(e) => setp_code_postal(e.target.value)} @@ -21685,7 +21700,7 @@ const DisplayPartnerPromotion = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={!edit_session_form} className="disabled_style" value={p_ville} onChange={(e) => setp_ville(e.target.value)} @@ -21702,7 +21717,7 @@ const DisplayPartnerPromotion = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={!edit_session_form} className="disabled_style" value={p_pays} onChange={(e) => setp_pays(e.target.value)} @@ -21719,6 +21734,7 @@ const DisplayPartnerPromotion = (props) => { className="disabled_style" options={inclus_bpf_tab} value={p_detail_is_bpf_label} + disabled={!edit_session_form} onChange={(event, value) => { if (value && value.value) { setp_detail_is_bpf(value.value); @@ -21754,6 +21770,7 @@ const DisplayPartnerPromotion = (props) => { className="disabled_style" options={status_tab} value={p_session_status_label} + disabled={!edit_session_form} onChange={(event, value) => { if (value && value.value) { setp_session_status(value.value); @@ -21793,7 +21810,7 @@ const DisplayPartnerPromotion = (props) => { textTransform: 'capitalize', }, }} - disabled={false} + disabled={!edit_session_form} inputProps={{ sx: { @@ -21822,7 +21839,7 @@ const DisplayPartnerPromotion = (props) => { textTransform: 'capitalize', }, }} - disabled={false} + disabled={!edit_session_form} inputProps={{ sx: { @@ -21843,6 +21860,7 @@ const DisplayPartnerPromotion = (props) => { name="session_etape" id="session_etape" className="disabled_style" + disabled={!edit_session_form} options={New_Getall_Parter_OR_Default_Session_Steps_result} value={p_session_etape_label} onChange={(event, value) => { @@ -21880,9 +21898,10 @@ const DisplayPartnerPromotion = (props) => { shrink: true, }} inputProps={{ min: "0", max: "1", step: "1" }} - disabled={false} + className="disabled_style enable_style" value={p_session_etape_label} + disabled={!edit_session_form} /> @@ -21898,9 +21917,10 @@ const DisplayPartnerPromotion = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + className="disabled_style" value={p_formateur_label} + disabled={!edit_session_form} /> @@ -21914,6 +21934,7 @@ const DisplayPartnerPromotion = (props) => { name="formateur_id" id="formateur_id" className="disabled_style" + disabled={!edit_session_form} options={New_Getall_Training_Employee_No_Filter_result} value={p_formateur_label} onChange={(event, value) => { @@ -22010,7 +22031,7 @@ const DisplayPartnerPromotion = (props) => { shrink: true, }} inputProps={{ min: "1", max: "1000", step: "1" }} - disabled={false} + disabled={!edit_session_form} className="disabled_style" value={p_nb_participant} onChange={(e) => { @@ -22090,7 +22111,7 @@ const DisplayPartnerPromotion = (props) => { shrink: true, }} inputProps={{ min: "1", max: "999999", step: "1" }} - disabled={false} + disabled={!edit_session_form} className="disabled_style_moitier" value={p_prix_session} onChange={(e) => { @@ -22109,7 +22130,7 @@ const DisplayPartnerPromotion = (props) => { shrink: true, }} inputProps={{ min: "1", max: "999999", step: "1" }} - disabled={false} + disabled={!edit_session_form} className="disabled_style_moitier" value={New_Price_by.filter((data) => (data).value === String(p_prix_session_by))[0].label} onChange={(e) => { @@ -22125,7 +22146,7 @@ const DisplayPartnerPromotion = (props) => { id="prix_session_by" className="disabled_style_moitier" value={New_Price_by.filter((data) => (data).value === String(p_prix_session_by))[0].label} - + disabled={!edit_session_form} options={New_Price_by} onChange={(event, value) => { if (value && value.value) { @@ -22167,7 +22188,7 @@ const DisplayPartnerPromotion = (props) => { name="mode_animation" id="mode_animation" value={New_Option_pres_dist_hyp.filter((data) => (data).id === String(p_session_mode_animation))[0].label} - + disabled={!edit_session_form} className="disabled_style" options={New_Option_pres_dist_hyp} @@ -22194,7 +22215,7 @@ const DisplayPartnerPromotion = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={!edit_session_form} className="disabled_style" value={New_Option_pres_dist_hyp.filter((data) => (data).id === String(p_session_mode_animation))[0].label} /> @@ -22212,7 +22233,7 @@ const DisplayPartnerPromotion = (props) => { InputLabelProps={{ shrink: true, }} - //disabled={true} + disabled={!edit_session_form} className="disabled_style" value={p_detail_is_bpf_label} @@ -22231,6 +22252,7 @@ const DisplayPartnerPromotion = (props) => { className="disabled_style" options={session_ondemande_tab} value={p_session_ondemande_label} + disabled={!edit_session_form} onChange={(event, value) => { if (value && value.value) { setp_session_ondemande(value.value); @@ -22264,7 +22286,7 @@ const DisplayPartnerPromotion = (props) => { shrink: true, }} inputProps={{ min: "0", max: "1", step: "1" }} - disabled={false} + disabled={!edit_session_form} className="disabled_style enable_style" value={p_session_ondemande_label} @@ -22345,6 +22367,7 @@ const DisplayPartnerPromotion = (props) => { sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }} required name={JSON.parse(champ_spec).field_name} + disabled={!edit_session_form} id={JSON.parse(champ_spec).field_name} type="number" inputProps={{ min: "1", max: "999999", step: "1" }} @@ -22367,6 +22390,7 @@ const DisplayPartnerPromotion = (props) => { sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }} required name={JSON.parse(champ_spec).field_name} + disabled={!edit_session_form} id={JSON.parse(champ_spec).field_name} type="text" InputLabelProps={{ @@ -26639,7 +26663,7 @@ const DisplayPartnerPromotion = (props) => { submenu_evaluation={submenu_evaluation_session} submenu_attestation={submenu_attestation} submenu_q_positionnement={submenu_q_positionnement} - Get_List_Partner_Clients={Get_List_Partner_Clients} + Get_List_Partner_Clients={Get_List_Partner_Clients} nb_valide_inscription_entreprise={nb_valide_inscription_entreprise} nb_valide_inscription_individuelle={nb_valide_inscription_individuelle} selected_session_invoiced_statut={selected_session_invoiced_statut} diff --git a/src/components/DisplayPartnerSession.js b/src/components/DisplayPartnerSession.js index 05b65c8..c388125 100644 --- a/src/components/DisplayPartnerSession.js +++ b/src/components/DisplayPartnerSession.js @@ -15,7 +15,7 @@ import { Tooltip } from 'react-tooltip' import TextareaAutosize from '@mui/material/TextareaAutosize'; import excel_icone from "../mysy_img/excel_icone.png"; import participants from "../mysy_img/participants.png"; -import fileDownload from 'js-file-download' +import fileDownload from 'js-file-download'; import Popup from 'reactjs-popup'; import 'reactjs-popup/dist/index.css'; import { FcSearch } from "react-icons/fc"; @@ -331,10 +331,9 @@ const DisplayPartnerSession = (props) => { renderCell: (cellValues) => { return ( -
    - {String(cellValues.row.distantiel) === "1" && "Actif"}  - {String(cellValues.row.distantiel) !== "1" && "Inactif"}  - +
    + {String(cellValues.row.statut) === "1" && "Actif"}  + {String(cellValues.row.statut) !== "1" && "Inactif"} 
    ); @@ -1296,7 +1295,7 @@ const DisplayPartnerSession = (props) => { { field: 'employeur', headerName: 'Employeur', minWidth: 150, flex: 1, maxWidth: 200, hide: true, editable: false }, { field: 'opco', headerName: 'Centre Opco', minWidth: 100, flex: 1, maxWidth: 150, hide: true, editable: false }, { field: 'modefinancement', headerName: 'Financement', minWidth: 100, flex: 1, maxWidth: 150, hide: true, editable: false }, - { field: 'amount', headerName: 'Prix', minWidth: 100, flex: 1, maxWidth: 100, type: 'number', flex: 1, editable: true }, + { field: 'amount', headerName: 'Prix', minWidth: 100, flex: 1, maxWidth: 100, type: 'number', flex: 1, editable: false }, { field: 'invoiced', headerName: 'Facturé', minWidth: 100, flex: 1, maxWidth: 100, hide: false, editable: false, @@ -1642,6 +1641,7 @@ const DisplayPartnerSession = (props) => { ); }, }, + { field: 'time_in_hour', headerName: 'Nb Heure', minWidth: 100, flex: 1, hide: false, editable: false, renderCell: (params) => , }, { field: 'date_envoi', headerName: 'Envoyé le', width: 180, hide: false, editable: false, renderCell: (cellValues) => { @@ -4018,7 +4018,7 @@ const DisplayPartnerSession = (props) => { let file_type = event.target.files[0].type; //console.log("file_size = ",file_size," file_type = ",file_type); - if (file_size > 1000000) { + if (file_size > 10000000) { setdisplay_alert_mysy("1"); setalert_message("Le fichier ne doit pas dépasser un 1 Méga octets"); setalert_type("error"); @@ -4356,6 +4356,9 @@ const DisplayPartnerSession = (props) => { //console.log(" ### setnb_stagiaire_Inscrit = ", data['message'].length); var new_data2 = []; + + var nb_line_invoices = 0; + const new_data = data['message'].map((x) => { //--- @@ -4364,7 +4367,14 @@ const DisplayPartnerSession = (props) => { var local_nom = JSON.parse(x).nom; var local_prenom = JSON.parse(x).prenom; + /* + IMPORTANT : + Si une seule ligne est facturée alors on considere que le process de facturation a commencé + */ + if (JSON.parse(x).invoiced && String(JSON.parse(x).invoiced) === "1") { + nb_line_invoices = nb_line_invoices + 1; + } //--- var node = { @@ -4380,6 +4390,14 @@ const DisplayPartnerSession = (props) => { }); + if (nb_line_invoices > 0 && nb_line_invoices === data['message'].length) { + setselected_session_invoiced_statut("2"); + } else if (nb_line_invoices > 0 && nb_line_invoices < data['message'].length) { + setselected_session_invoiced_statut("1"); + } + + + if (new_data2.length > 0) setNew_GetListePreinscrit_insc_result(new_data2); else @@ -4413,7 +4431,7 @@ const DisplayPartnerSession = (props) => { let file_type = event.target.files[0].type; //console.log("file_size = ",file_size," file_type = ",file_type); - if (file_size > 1000000) { + if (file_size > 10000000) { alert("Le fichier ne doit pas dépasser un 1 Méga octets"); return; } @@ -6037,7 +6055,7 @@ const DisplayPartnerSession = (props) => { function enableSessionFields() { if (rowss && String(gridline_id).length > 0 && rowss.length > 0) { - var local_session_invoice_status = JSON.parse(rowss[gridline_id]).invoiced_statut; + var local_session_invoice_status = selected_session_invoiced_statut; if (String(local_session_invoice_status) === "1") { @@ -8762,7 +8780,7 @@ const DisplayPartnerSession = (props) => { //alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a); - if (file_size > 1000000) { + if (file_size > 10000000) { // alert("L'image ne doit pas dépasser un 1 Méga octets"); setdisplay_alert_mysy("1"); setalert_message("L'image ne doit pas dépasser un 1 Méga octets"); @@ -9358,7 +9376,7 @@ const DisplayPartnerSession = (props) => { }, { value: 'extra', - label: 'Extra', + label: 'Inter', }, { value: 'autre', @@ -17829,7 +17847,7 @@ const DisplayPartnerSession = (props) => { -
    Choisir un modèle d'émargement +
    Choisir un modèle d'émargement { onChange={(event, value) => { if (value && value._id) { setDialog_seq_ressource_1_selected_ressource_id(value._id); - - } }} @@ -19201,12 +19217,8 @@ const DisplayPartnerSession = (props) => {
    @@ -19367,7 +19379,7 @@ const DisplayPartnerSession = (props) => {
    - {String(p_filtre2).length > 3 && String(p_filtre2) !== "archive" && + {String(p_filtre2).length > 2 && String(p_filtre2) !== "archive" && { setselected_class_lms_code(newSelectionModel.row.class_lms_class_code); - setsession_selected_row_id(newSelectionModel.row.id); setsession_selected_class_id(newSelectionModel.row.class_id); @@ -21518,7 +21529,7 @@ const DisplayPartnerSession = (props) => { InputLabelProps={{ shrink: true, }} - //disabled={true} + disabled={!edit_session_form} className="disabled_style" value={p_code_session} onChange={(e) => setp_code_session(e.target.value)} @@ -21536,7 +21547,7 @@ const DisplayPartnerSession = (props) => { InputLabelProps={{ shrink: true, }} - //disabled={true} + disabled={!edit_session_form} className="disabled_style" value={p_detail_titre} onChange={(e) => setp_detail_titre(e.target.value)} @@ -21587,7 +21598,7 @@ const DisplayPartnerSession = (props) => { InputLabelProps={{ shrink: true, }} - //disabled={true} + disabled={!edit_session_form} className="disabled_style" value={p_detail_location_type_label} @@ -21595,7 +21606,7 @@ const DisplayPartnerSession = (props) => {
    } - {edit_session_form &&
    Site de formation
    + {edit_session_form &&
    Site de formation
    {New_Getall_Partner_Site_Formation_result && New_Getall_Partner_Site_Formation_result.length > 0 && @@ -21688,8 +21699,9 @@ const DisplayPartnerSession = (props) => { InputLabelProps={{ shrink: true, }} + disabled={!edit_session_form} inputProps={{ min: "0", max: "1", step: "1" }} - disabled={false} + //disabled={false} className="disabled_style" value={p_session_site_formation_code} /> @@ -21708,7 +21720,7 @@ const DisplayPartnerSession = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={!edit_session_form} className="disabled_style" value={p_adresse} onChange={(e) => setp_adresse(e.target.value)} @@ -21725,7 +21737,7 @@ const DisplayPartnerSession = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={!edit_session_form} className="disabled_style" value={p_code_postal} onChange={(e) => setp_code_postal(e.target.value)} @@ -21741,7 +21753,7 @@ const DisplayPartnerSession = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={!edit_session_form} className="disabled_style" value={p_ville} onChange={(e) => setp_ville(e.target.value)} @@ -21758,7 +21770,7 @@ const DisplayPartnerSession = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={!edit_session_form} className="disabled_style" value={p_pays} onChange={(e) => setp_pays(e.target.value)} @@ -21849,7 +21861,7 @@ const DisplayPartnerSession = (props) => { textTransform: 'capitalize', }, }} - disabled={false} + disabled={!edit_session_form} inputProps={{ sx: { @@ -21878,7 +21890,7 @@ const DisplayPartnerSession = (props) => { textTransform: 'capitalize', }, }} - disabled={false} + disabled={!edit_session_form} inputProps={{ sx: { @@ -21936,9 +21948,10 @@ const DisplayPartnerSession = (props) => { shrink: true, }} inputProps={{ min: "0", max: "1", step: "1" }} - disabled={false} + // disabled={false} className="disabled_style enable_style" value={p_session_etape_label} + disabled={!edit_session_form} /> @@ -21954,9 +21967,11 @@ const DisplayPartnerSession = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + //disabled={false} + className="disabled_style" value={p_formateur_label} + disabled={!edit_session_form} /> @@ -21972,6 +21987,7 @@ const DisplayPartnerSession = (props) => { className="disabled_style" options={New_Getall_Training_Employee_No_Filter_result} value={p_formateur_label} + disabled={!edit_session_form} onChange={(event, value) => { if (value && value._id) { setp_formateur_id(value._id); @@ -22066,7 +22082,7 @@ const DisplayPartnerSession = (props) => { shrink: true, }} inputProps={{ min: "1", max: "1000", step: "1" }} - disabled={false} + disabled={!edit_session_form} className="disabled_style" value={p_nb_participant} onChange={(e) => { @@ -22146,7 +22162,7 @@ const DisplayPartnerSession = (props) => { shrink: true, }} inputProps={{ min: "1", max: "999999", step: "1" }} - disabled={false} + disabled={!edit_session_form} className="disabled_style_moitier" value={p_prix_session} onChange={(e) => { @@ -22165,7 +22181,7 @@ const DisplayPartnerSession = (props) => { shrink: true, }} inputProps={{ min: "1", max: "999999", step: "1" }} - disabled={false} + disabled={!edit_session_form} className="disabled_style_moitier" value={New_Price_by.filter((data) => (data).value === String(p_prix_session_by))[0].label} onChange={(e) => { @@ -22224,7 +22240,7 @@ const DisplayPartnerSession = (props) => { value={New_Option_pres_dist_hyp.filter((data) => (data).id === String(p_session_mode_animation))[0].label} className="disabled_style" - + disabled={!edit_session_form} options={New_Option_pres_dist_hyp} onChange={(event, value) => { if (value && value.value) { @@ -22249,7 +22265,7 @@ const DisplayPartnerSession = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={!edit_session_form} className="disabled_style" value={New_Option_pres_dist_hyp.filter((data) => (data).id === String(p_session_mode_animation))[0].label} /> @@ -22267,7 +22283,7 @@ const DisplayPartnerSession = (props) => { InputLabelProps={{ shrink: true, }} - //disabled={true} + disabled={!edit_session_form} className="disabled_style" value={p_detail_is_bpf_label} @@ -22286,6 +22302,7 @@ const DisplayPartnerSession = (props) => { className="disabled_style" options={session_ondemande_tab} value={p_session_ondemande_label} + disabled={!edit_session_form} onChange={(event, value) => { if (value && value.value) { setp_session_ondemande(value.value); @@ -22319,7 +22336,7 @@ const DisplayPartnerSession = (props) => { shrink: true, }} inputProps={{ min: "0", max: "1", step: "1" }} - disabled={false} + disabled={!edit_session_form} className="disabled_style enable_style" value={p_session_ondemande_label} @@ -22408,7 +22425,7 @@ const DisplayPartnerSession = (props) => { shrink: true, }} - + disabled={!edit_session_form} className="disabled_style" onChange={(e) => { change_champs_spec_handle(e.target.value); @@ -22429,7 +22446,7 @@ const DisplayPartnerSession = (props) => { shrink: true, }} - + disabled={!edit_session_form} className="disabled_style" onChange={(e) => { change_champs_spec_handle(e.target.value); @@ -26532,6 +26549,7 @@ const DisplayPartnerSession = (props) => { sequence_start: JSON.parse(item).sequence_start, sequence_end: JSON.parse(item).sequence_end, is_present: JSON.parse(item).is_present, + time_in_hour: JSON.parse(item).time_in_hour, statut: JSON.parse(item).statut, date_envoi: JSON.parse(item).date_envoi, @@ -26711,12 +26729,12 @@ const DisplayPartnerSession = (props) => { submenu_evaluation={submenu_evaluation_session} submenu_attestation={submenu_attestation} submenu_q_positionnement={submenu_q_positionnement} - Get_List_Partner_Clients={Get_List_Partner_Clients} + Get_List_Partner_Clients={Get_List_Partner_Clients} nb_valide_inscription_entreprise={nb_valide_inscription_entreprise} nb_valide_inscription_individuelle={nb_valide_inscription_individuelle} selected_session_invoiced_statut={selected_session_invoiced_statut} Session_automatic_traitement_data={GetCurrentSession_automatic_traitement_data} - + />
    } diff --git a/src/components/DisplayPartnerStagiaires.js b/src/components/DisplayPartnerStagiaires.js index 615909f..d58d4fc 100644 --- a/src/components/DisplayPartnerStagiaires.js +++ b/src/components/DisplayPartnerStagiaires.js @@ -861,6 +861,7 @@ const DisplayPartnerStagiaires = (props) => { setRecyclage_Desactivation_api("true"); setRecyclage_Desactivation_result(res.data.message); setSelectionModel([]); + setactionmass_ftion_val(""); Getall_TrainingParticipant(); // alert(res.data.message); setdisplay_alert_mysy("1"); @@ -984,6 +985,7 @@ const DisplayPartnerStagiaires = (props) => { setnb_stagiaire_Preinscrit(""); setnb_stagiaire_Inscrit(""); setSelectionModel([]); + setactionmass_ftion_val(""); setRows([]); setRows_insc([]); setRows_preinsc([]); @@ -1315,6 +1317,7 @@ const DisplayPartnerStagiaires = (props) => { function submenu_add_one_stagiaire() { setsubmenu(""); setSelectionModel([]); + setactionmass_ftion_val(""); setselected_code_session(); Get_List_Partner_Financeurs(); setaddOneParticipant("1"); @@ -1708,7 +1711,7 @@ const DisplayPartnerStagiaires = (props) => { //alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a); - if (file_size > 1000000) { + if (file_size > 10000000) { // alert("L'image ne doit pas dépasser un 1 Méga octets"); setdisplay_alert_mysy("1"); setalert_message("L'image ne doit pas dépasser un 1 Méga octets"); @@ -2502,7 +2505,7 @@ const DisplayPartnerStagiaires = (props) => { let file_type = event.target.files[0].type; //console.log("file_size = ",file_size," file_type = ",file_type); - if (file_size > 1000000) { + if (file_size > 10000000) { // alert("Le fichier ne doit pas dépasser un 1 Méga octets"); setdisplay_alert_mysy("1"); @@ -4383,7 +4386,7 @@ const DisplayPartnerStagiaires = (props) => { setdisplay_alert_mysy("1"); setalert_message(" La mise à jour a été correctement faite."); - setalert_type("error"); + setalert_type("success"); //myRef_head.current.scrollIntoView({ behavior: "smooth" }); @@ -5643,7 +5646,6 @@ const DisplayPartnerStagiaires = (props) => { const [liste_selected_inscription_id, setliste_selected_inscription_id] = useState([]); async function actionmass_ftion_Traitemet() { - var liste_session = ""; var liste_emails = ""; @@ -5935,6 +5937,7 @@ const DisplayPartnerStagiaires = (props) => { setDelete_LIST_Stagiaires_api("true"); setDelete_LIST_Stagiaires_result(res.data.message); setSelectionModel([]); + setactionmass_ftion_val(""); Getall_TrainingParticipant(); //alert(res.data.message); setdisplay_alert_mysy("1"); @@ -6339,7 +6342,7 @@ const DisplayPartnerStagiaires = (props) => { setselected_convention_email_destinataire_prod(); setselected_convention_email_test(); - setactionmass_ftion_val(); + setactionmass_ftion_val(""); setSelectionModel([]); settab_convention_pieces_jointes_result([]) }; @@ -7021,6 +7024,7 @@ const DisplayPartnerStagiaires = (props) => { const handleChange_display_stagiaire_with_alert = (event) => { setSelectionModel([]); + setactionmass_ftion_val(""); setdisplay_stagiaire_with_alert(event.target.checked); }; @@ -7314,7 +7318,7 @@ const DisplayPartnerStagiaires = (props) => { if (nb_different_session > 1) { setdisplay_alert_mysy("1"); - setalert_message(" Vous ne pouvez pas envoyer des documents qu'aux apprenant de la même promotion"); + setalert_message(" Vous ne pouvez pas envoyer des documents qu'aux apprenant de la même promotion/session"); setalert_type("error"); return; } @@ -9677,7 +9681,7 @@ const DisplayPartnerStagiaires = (props) => { setactionmass_ftion_val(value.value); } else { - setactionmass_ftion_val(); + setactionmass_ftion_val(""); } } @@ -9692,7 +9696,8 @@ const DisplayPartnerStagiaires = (props) => { /> - {String(props.check_user_acces_right("stagiaire", "write")) === "1" && actionmass_ftion_val && String(actionmass_ftion_val) !== "sendemail" + {String(props.check_user_acces_right("stagiaire", "write")) === "1" && selectionModel && selectionModel.length >= 1 && actionmass_ftion_val && String(actionmass_ftion_val).length > 2 && + String(actionmass_ftion_val) !== "sendemail" && String(actionmass_ftion_val) !== "pushdocument" &&
    - {String(p_filtre2).length > 3 && String(p_filtre2) !== "archive" && + {String(p_filtre2).length > 2 && String(p_filtre2) !== "archive" && { let file_type = event.target.files[0].type; //console.log("file_size = ",file_size," file_type = ",file_type); - if (file_size > 1000000) { + if (file_size > 10000000) { alert("Le fichier ne doit pas dépasser un 1 Méga octets"); return; } diff --git a/src/components/ESign.js b/src/components/ESign.js index e82228f..8768a9e 100644 --- a/src/components/ESign.js +++ b/src/components/ESign.js @@ -332,7 +332,7 @@ function ESign() { //alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a); - if (file_size > 1000000) { + if (file_size > 10000000) { alert("L'image ne doit pas dépasser un 1 Méga octets"); return; } diff --git a/src/components/Emarge_QR_Code.js b/src/components/Emarge_QR_Code.js index d6bd407..2599a13 100644 --- a/src/components/Emarge_QR_Code.js +++ b/src/components/Emarge_QR_Code.js @@ -428,7 +428,7 @@ function Emarge_QR_Code() { //alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a); - if (file_size > 1000000) { + if (file_size > 10000000) { alert("L'image ne doit pas dépasser un 1 Méga octets"); return; } diff --git a/src/components/Employes.js b/src/components/Employes.js index e869cf7..b3ab15d 100644 --- a/src/components/Employes.js +++ b/src/components/Employes.js @@ -1589,7 +1589,7 @@ const Employes = (props) => { if (String(res.data.status) === "true") { setLoading(false); //console.log(" In Get_Employee_Data res.data.status = " + res.data.status); - // console.log(" In Get_Employee_Data res.data.message r_class = " + res.data.message); + // console.log(" In Get_Employee_Data res.data.message r_class = " + res.data.message); setGetAttendee_api("true"); setGetAttendee_result(res.data.message); @@ -1898,6 +1898,7 @@ const Employes = (props) => { const stored_cookie = getCookie('tokenmysypart'); form.append("token", stored_cookie); + form.append("type_rh", ""); var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Ressource_Humaine_with_filter/"; @@ -1953,7 +1954,7 @@ const Employes = (props) => { if (String(res.data.status) === String("true")) { //console.log(" In Getall_Training_Employee_No_Filter res.data.status = " + res.data.status); - // console.log(" In Getall_Training_Employee_No_Filter res.data.message r_class = " + res.data.message); + // console.log(" In Getall_Training_Employee_No_Filter res.data.message r_class = " + res.data.message); setGetall_Training_Employee_No_Filter_api("true"); setGetall_Training_Employee_No_Filter_result(res.data.message); setRows(res.data.message); @@ -2029,7 +2030,7 @@ const Employes = (props) => { let file_type = event.target.files[0].type; //console.log("file_size = ",file_size," file_type = ",file_type); - if (file_size > 1000000) { + if (file_size > 10000000) { // alert("Le fichier ne doit pas dépasser un 1 Méga octets"); // alert(res.data.message); setdisplay_alert_mysy("1"); @@ -2967,7 +2968,7 @@ const Employes = (props) => { //alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a); - if (file_size > 1000000) { + if (file_size > 10000000) { setdisplay_alert_mysy("1"); setalert_message("L'image ne doit pas dépasser un 1 Méga octets"); @@ -3449,8 +3450,7 @@ const Employes = (props) => { form.append("prenom", p_one_detail_prenom); form.append("civilite", p_one_detail_civilite); form.append("date_naissance", p_one_detail_naissance); - - + form.append("type_rh", ""); if (p_one_detail_tel) form.append("telephone", p_one_detail_tel); @@ -3497,8 +3497,6 @@ const Employes = (props) => { - - if (p_one_detail_resp_hierarchie_id) form.append("superieur_hierarchie_id", p_one_detail_resp_hierarchie_id); else @@ -3586,7 +3584,6 @@ const Employes = (props) => { Getall_Training_Employee_No_Filter(); Get_List_Managers(); - setemployee_data_changed(""); setemployee_data_edit_mode(""); clearEmployeeFields(); @@ -8903,9 +8900,8 @@ const Employes = (props) => { paddingLeft: '10px', flexWrap: 'wrap' }}> - - - {String(employee_data_edit_mode) !== "1" &&
    Civilité
    + {String(employee_data_edit_mode) !== "1" && p_detail_civilite && + String(p_detail_civilite).length > 0 &&
    Civilité
    { }} disabled={false} className="disabled_style" - value={String(p_detail_civilite)[0].toUpperCase() + String(p_detail_civilite).slice(1)} + value={String(p_detail_civilite)[0].toUpperCase() + String(p_detail_civilite).slice(1)} /> @@ -8925,7 +8921,7 @@ const Employes = (props) => { {String(employee_data_edit_mode) === "1" &&
    Civilité
    - 0 && { /> } - /> + />}
    } @@ -8962,7 +8958,7 @@ const Employes = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={Boolean(employee_data_edit_mode)} className="disabled_style" value={p_detail_nom} onChange={(e) => { @@ -8984,7 +8980,7 @@ const Employes = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={Boolean(employee_data_edit_mode)} className="disabled_style" value={p_detail_prenom} onChange={(e) => { @@ -9010,7 +9006,7 @@ const Employes = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={Boolean(employee_data_edit_mode)} className="disabled_style" value={p_detail_mail} onChange={(e) => { @@ -9027,7 +9023,21 @@ const Employes = (props) => {
    -
    Date Naissance
    + {String(employee_data_edit_mode) !== "1" &&
    Date Naissance
    + +
    } + + {String(employee_data_edit_mode) === "1" &&
    Date Naissance
    { locale='fr-FR' /> - - -
    +
    }
    @@ -9073,7 +9081,7 @@ const Employes = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={Boolean(employee_data_edit_mode)} className="disabled_style" value={p_detail_tel_mobile} onChange={(e) => { @@ -9094,7 +9102,7 @@ const Employes = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={Boolean(employee_data_edit_mode)} className="disabled_style" value={p_detail_tel} onChange={(e) => { @@ -9115,7 +9123,7 @@ const Employes = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={Boolean(employee_data_edit_mode)} className="disabled_style" value={p_detail_adresse} onChange={(e) => { @@ -9134,7 +9142,7 @@ const Employes = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={Boolean(employee_data_edit_mode)} className="disabled_style" value={p_detail_code_postal} onChange={(e) => { @@ -9153,7 +9161,7 @@ const Employes = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={Boolean(employee_data_edit_mode)} className="disabled_style" value={p_detail_ville} onChange={(e) => { @@ -9173,7 +9181,7 @@ const Employes = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={Boolean(employee_data_edit_mode)} className="disabled_style" value={p_detail_pays} onChange={(e) => { @@ -9193,7 +9201,7 @@ const Employes = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={Boolean(employee_data_edit_mode)} className="disabled_style" value={p_detail_linkedIn} onChange={(e) => { @@ -9213,7 +9221,7 @@ const Employes = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={Boolean(employee_data_edit_mode)} className="disabled_style" value={p_detail_facebook} onChange={(e) => { @@ -9223,7 +9231,7 @@ const Employes = (props) => { />
    -
    Twitter
    +
    X (Twitter)
    { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={Boolean(employee_data_edit_mode)} className="disabled_style" value={p_detail_twitter} onChange={(e) => { @@ -9266,7 +9274,7 @@ const Employes = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={Boolean(employee_data_edit_mode)} className="disabled_style" value={p_detail_profil} @@ -9310,7 +9318,7 @@ const Employes = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={Boolean(employee_data_edit_mode)} className="disabled_style" value={p_detail_fonction} onChange={(e) => { @@ -9331,7 +9339,7 @@ const Employes = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={Boolean(employee_data_edit_mode)} className="disabled_style" value={p_detail_ismanager_label} @@ -9348,7 +9356,7 @@ const Employes = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={Boolean(employee_data_edit_mode)} className="disabled_style" value={p_detail_ismanager} onChange={(e) => { @@ -9372,7 +9380,7 @@ const Employes = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={Boolean(employee_data_edit_mode)} className="disabled_style" value={p_detail_resp_hierarchie_nom + " " + p_detail_resp_hierarchie_prenom} @@ -9432,6 +9440,7 @@ const Employes = (props) => { sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }} required name={JSON.parse(champ_spec).field_name} + disabled={Boolean(employee_data_edit_mode)} id={JSON.parse(champ_spec).field_name} type="number" inputProps={{ min: "1", max: "999999", step: "1" }} @@ -9455,6 +9464,7 @@ const Employes = (props) => { required name={JSON.parse(champ_spec).field_name} id={JSON.parse(champ_spec).field_name} + disabled={Boolean(employee_data_edit_mode)} InputLabelProps={{ shrink: true, @@ -9502,7 +9512,7 @@ const Employes = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={Boolean(employee_data_edit_mode)} className="disabled_style" value={p_detail_list_diffusion_mail} onChange={(e) => { @@ -9552,7 +9562,7 @@ const Employes = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={Boolean(employee_data_edit_mode)} className="disabled_style" value={p_detail_user_login} /> @@ -9708,7 +9718,7 @@ const Employes = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={Boolean(employee_data_edit_mode)} className="disabled_style" value={p_detail_lms_login} /> @@ -9840,7 +9850,7 @@ const Employes = (props) => {
    - { String(employee_data_edit_mode) === "1" &&
    + {String(employee_data_edit_mode) === "1" &&
    @@ -10203,7 +10213,7 @@ const Employes = (props) => { />
    -
    Twitter
    +
    X (Twitter)
    { {String(submenu) === "statistiques" &&
    - + diff --git a/src/components/GestionAdministrative.js b/src/components/GestionAdministrative.js index 96fe331..78274d8 100644 --- a/src/components/GestionAdministrative.js +++ b/src/components/GestionAdministrative.js @@ -3548,7 +3548,7 @@ function GestionAdministrative(props) { let file_type = event.target.files[0].type; //console.log("file_size = ",file_size," file_type = ",file_type); - if (file_size > 1000000) { + if (file_size > 10000000) { alert("Le fichier ne doit pas dépasser un 1 Méga octets"); return; } @@ -3793,7 +3793,7 @@ function GestionAdministrative(props) { let file_type = event.target.files[0].type; //console.log("file_size = ",file_size," file_type = ",file_type); - if (file_size > 1000000) { + if (file_size > 10000000) { alert("Le fichier ne doit pas dépasser un 1 Méga octets"); return; } @@ -5135,7 +5135,7 @@ function GestionAdministrative(props) { //alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a); - if (file_size > 1000000) { + if (file_size > 10000000) { alert("L'image ne doit pas dépasser un 1 Méga octets"); return; } diff --git a/src/components/Groupe_Apprenant.js b/src/components/Groupe_Apprenant.js index 5d01621..bc5f9a3 100644 --- a/src/components/Groupe_Apprenant.js +++ b/src/components/Groupe_Apprenant.js @@ -6,26 +6,19 @@ import Button from '@mui/material/Button'; import axios from "axios"; import { getCookie, setCookie } from 'react-use-cookie'; import { useHistory } from "react-router-dom"; - -import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid'; +import MoreVertIcon from '@mui/icons-material/MoreVert'; +import { DataGrid, frFR } from '@mui/x-data-grid'; import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css"; - import 'react-tooltip/dist/react-tooltip.css' import { Tooltip } from 'react-tooltip' - import fileDownload from 'js-file-download'; import Popup from 'reactjs-popup'; import 'reactjs-popup/dist/index.css'; -import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint, FcCheckmark } from "react-icons/fc"; -import DatePicker from "react-datepicker"; +import { FcAcceptDatabase } from "react-icons/fc"; import "react-datepicker/dist/react-datepicker.css"; -import { format } from 'date-fns' -import moment from "moment"; import InputAdornment from '@mui/material/InputAdornment'; import { AiFillCloseCircle } from "react-icons/ai"; import Box from '@mui/material/Box'; -import { Typography, LinearProgress } from '@mui/material'; -import styled from 'styled-components'; import { CiTrash } from "react-icons/ci"; import { MdAddCircleOutline, MdRemoveCircleOutline } from "react-icons/md"; import Dialog from '@mui/material/Dialog'; @@ -34,25 +27,20 @@ import DialogContent from '@mui/material/DialogContent'; import DialogContentText from '@mui/material/DialogContentText'; import DialogTitle from '@mui/material/DialogTitle'; import ColorPicker from 'react-pick-color'; - +import Menu from '@mui/material/Menu'; import { Fab } from "@material-ui/core"; import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io"; import { AiTwotoneSave } from "react-icons/ai"; import Autocomplete from '@mui/material/Autocomplete'; 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 Module_Selection_Apprenants from "./Module_Selection_Apprenants"; - import { FcMultipleSmartphones } from "react-icons/fc"; import Module_Alert_Confirmation from "./Module_Alert_Confirmation"; - - import { makeStyles } from "@material-ui/core/styles"; import CancelPresentationIcon from '@mui/icons-material/CancelPresentation'; import { IconButton } from '@material-ui/core'; @@ -94,7 +82,7 @@ const useStyles = makeStyles((theme) => ({ customizedButton: { position: 'absolute', left: '95%', - top: '-9%', + top: '-2%', backgroundColor: 'lightgray', color: 'gray', }, @@ -322,77 +310,371 @@ const Groupe_Apprenant = (props) => { ] + const ITEM_HEIGHT = 48; + + + const [anchorEl_promo, setanchorEl_promo] = React.useState(null); + const [anchorEl, setAnchorEl] = React.useState(null); + + const open_promo = Boolean(anchorEl_promo); + + + const options_menu_vertical_promotion = [ + 'Modifier', + 'Supprimer', + ]; + + + + + + const handleClick_option_button_vertical_promo = (event) => { + setanchorEl_promo(event.currentTarget); + }; + const handleClick_option_button_vertical = (event) => { + setAnchorEl(event.currentTarget); + }; + + + const handleClose_option_button_vertical_promo = (event, value) => { + setanchorEl_promo(null); + }; + const handleClose_option_button_vertical = (event, value) => { + setAnchorEl(null); + }; + + const [dialogOpen_supp, setdialogOpen_supp] = useState(false); + const Dialog_menuitem_close_supp = () => { + setdialogOpen_supp(false) + }; + + + const [dialogOpen_modif, setdialogOpen_modif] = useState(false); + const Dialog_menuitem_close_modif = () => { + setdialogOpen_modif(false) + }; + + const columns_grp_membre = [ { field: '_id', headerName: '_id', hide: true, Width: 0, disableExport: true, }, { field: 'id', headerName: 'id', hide: true, Width: 0, disableExport: true, }, - { field: 'nom', headerName: 'nom', flex: 1, hide: false, minWidth: 180, renderCell: (params) => , }, - { field: 'prenom', headerName: 'prenom', flex: 1, hide: false, minWidth: 180, renderCell: (params) => , }, - { field: 'email', headerName: 'email', flex: 1, hide: false, minWidth: 180, renderCell: (params) => , }, - + { field: 'nom', headerName: 'nom', flex: 1, hide: false, minWidth: 180, editable: false, renderCell: (params) => , }, + { field: 'prenom', headerName: 'prenom', flex: 1, hide: false, minWidth: 180, editable: false, renderCell: (params) => , }, + { field: 'email', headerName: 'email', flex: 1, hide: false, minWidth: 180, editable: false, renderCell: (params) => , }, { - field: "delete", headerName: 'Supprimer', disableExport: true, + field: 'delegue_level', headerName: 'Delegué', flex: 1, hide: false, minWidth: 180, editable: false, renderCell: (cellValues) => { return ( - <> - {String(props.check_user_acces_right("stagiaire", "write")) === "1" && { - - // handleClick_delete(event, cellValues); - }} - > - - - } - modal - nested - position="center center" - > - {close => ( -
    - -
    MySy Information
    -
    - {' '} - - En confirmant cette opération, la personne sera supprimée du groupe .
    - -
    -
    -
    - - -
    -
    - -
    -
    -
    - )} -
    } - +
    + {New_Delegue_Level && New_Delegue_Level.length > 0 && + + } +
    ); + }, + + + }, + /* { + field: "delete", headerName: 'Supprimer', disableExport: true, + renderCell: (cellValues) => { + return ( + <> + {String(props.check_user_acces_right("stagiaire", "write")) === "1" && { + + // handleClick_delete(event, cellValues); + }} + > + + + } + modal + nested + position="center center" + > + {close => ( +
    + +
    MySy Information
    +
    + {' '} + + En confirmant cette opération, la personne sera supprimée du groupe .
    + +
    +
    +
    + + +
    +
    + +
    +
    +
    + )} +
    } + + + + ); + } + },*/ + + { + field: 'gestion', headerName: 'Gestion', minWidth: 50, flex: 1, maxWidth: 100, hideable: true, hide: false, editable: false, align: "center", + renderCell: (cellValues) => { + return ( +
    + {String(props.check_user_acces_right("session", "write")) === "1" && } + + +
    + ) } - } + }, + + ] @@ -1026,10 +1308,10 @@ const Groupe_Apprenant = (props) => { function Record_All_PJ() { if (!p_detail_one_file_to_download_type_name) { - // alert(" Vous devez donner un nom à la pièce jointe"); + // alert(" Vous devez donner un nom à la pièce jointe"); setdisplay_alert_mysy("1"); - setalert_message(" Vous devez donner un nom à la pièce jointe"); - setalert_type("error"); + setalert_message(" Vous devez donner un nom à la pièce jointe"); + setalert_type("error"); return; } @@ -1073,10 +1355,10 @@ const Groupe_Apprenant = (props) => { setfile_1_name(); setp_detail_one_file_to_download_type_name(); //GetCurrentClass_trainingsession(); - // alert(" La pièce jointe " + file_1_name.name + " a été bien enregistrée") + // alert(" La pièce jointe " + file_1_name.name + " a été bien enregistrée") setdisplay_alert_mysy("1"); - setalert_message(" La pièce jointe " + file_1_name.name + " a été bien enregistrée"); - setalert_type("success"); + setalert_message(" La pièce jointe " + file_1_name.name + " a été bien enregistrée"); + setalert_type("success"); } else { @@ -1760,6 +2042,11 @@ const Groupe_Apprenant = (props) => { }) } + const New_Delegue_Level = [ + { "id": "1", "label": "Principal", "value": "1" }, + { "id": "2", "label": "Secondaire", "value": "2" }, + { "id": "", "label": "", "value": "" }, + ] const [New_Getall_Groupe_Membres_result, setNew_Getall_Groupe_Membres_result] = useState([]); @@ -1800,6 +2087,7 @@ const Groupe_Apprenant = (props) => { var local_prenom = JSON.parse(x).prenom; var local_email = JSON.parse(x).email; var local_inscription_id = JSON.parse(x).inscription_id; + var local_delegue_level = JSON.parse(x).delegue_level; //--- @@ -1810,7 +2098,7 @@ const Groupe_Apprenant = (props) => { "nom": local_nom, "prenom": local_prenom, "email": local_email, - + "delegue_level": local_delegue_level, "inscription_id": local_inscription_id, @@ -2372,6 +2660,92 @@ const Groupe_Apprenant = (props) => { setdisplay_alert_mysy(""); } + const [dialogOpen_archive, setdialogOpen_archive] = useState(false); + const Dialog_menuitem_close_archive = () => { + setdialogOpen_archive(false) + }; + + const [working_cellValues_promo, setworking_cellValues_promo] = useState(false); + const [promo_archive_status, setpromo_archive_status] = React.useState(''); + + + const [Dialog_GRP_MEMBRE_EDIT_message, setDialog_GRP_MEMBRE_EDIT_message] = React.useState(false); + const [Dialog_GRP_MEMBRE_EDIT_open, setDialog_GRP_MEMBRE_EDIT_open] = React.useState(false); + + + const Dialog_GRP_MEMBRE_EDIT_handleClose = () => { + //alert(" Utiliser le bouton 'fermer' "); + //setOpen(false); + }; + + const Dialog_GRP_MEMBRE_EDIT_handleClose_buton = () => { + setDialog_GRP_MEMBRE_EDIT_open(false); + + }; + + + const [apprenant_delegue_level_id, setapprenant_delegue_level_id] = useState(""); + const [selected_groupe_inscription_membre_id, setselected_groupe_inscription_membre_id] = useState(""); + + const [Update_Membres_Groupe_Inscrit_api, setUpdate_Membres_Groupe_Inscrit_api] = useState(); + const [Update_Membres_Groupe_Inscrit_message, setUpdate_Membres_Groupe_Inscrit_message] = useState(); + const [Update_Membres_Groupe_Inscrit_result, setUpdate_Membres_Groupe_Inscrit_result] = useState(); + function Update_Membres_Groupe_Inscrit() { + + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("tab_ids", selected_groupe_inscription_membre_id); + form.append("delegue_level", apprenant_delegue_level_id); + + + setLoading(true); + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Update_Groupe_Inscrit_Membres_From_Id/"; + + axios.post(myurl, form).then(res => { + + if (String(res.data.status) === String("true")) { + setLoading(false); + //console.log(" In UpdateStagiaireData res.data.status = " + res.data.status); + //console.log(" In UpdateStagiaireData res.data.message r_class = " + res.data.message); + + Getall_Groupe_Membres(selected_id); + Dialog_GRP_MEMBRE_EDIT_handleClose_buton(); + + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + + + } else if (String(res.data.status) === String("Err_Connexion")) { + setLoading(false); + alert('Erreur: ' + res.data.message); + history.push("/Connexion"); + } + else { + setLoading(false); + setUpdate_Membres_Groupe_Inscrit_api("false"); + setUpdate_Membres_Groupe_Inscrit_message(res.data.message); + + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); + + } + + }).catch((error) => { + setLoading(false); + console.warn('Update_Membres_Groupe_Inscrit : Not good man :( mysearchtext = ' + error); + setUpdate_Membres_Groupe_Inscrit_api("false"); + + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de mettre à jour les données "); + setalert_type("error"); + + }) + } + return (
    @@ -2390,8 +2764,159 @@ const Groupe_Apprenant = (props) => { } {/*** FIN Affichage des messages d'alerte*/} - {/*** Dialog pickup Color */} + {/*** Dialog GROUPE MEMBRE_EDIT */} + null} + + PaperProps={{ + + + className: classes.paper, // Apply the paper style + style: { + overflowY: 'unset', + position: 'relative', + top: '50rem', + }, + }} + hideBackdrop={true} + disableScrollLock + classes={{ + paper: classes.dialog + }} + className="groupe_apprenant_dialog mysy_MuiPaper-root" + PaperComponent={PaperComponent} + aria-labelledby="draggable-dialog-title" + > + + Mise à jour apprenant + + + + + + {working_cellValues_promo && working_cellValues_promo.row && working_cellValues_promo.row.nom &&
    Nom
    + + + + +
    } + + {working_cellValues_promo && working_cellValues_promo.row && working_cellValues_promo.row.prenom &&
    Prenom
    + +
    } + + + {working_cellValues_promo && working_cellValues_promo.row && working_cellValues_promo.row.email &&
    Email
    + +
    } + + + +
    Delegué + {New_Delegue_Level && New_Delegue_Level.length > 0 && (data).id === String(apprenant_delegue_level_id))[0].label} + + options={New_Delegue_Level} + onChange={(event, value) => { + if (value.value) + setapprenant_delegue_level_id(value.value); + else + setapprenant_delegue_level_id(""); + }} + + renderInput={(params) => + } + />} + + +
    + + + + +
    + + + + {String(submenu_grp_dialog) === "create" && +
    +
    + + +
    + +
    + +
    + + + +
    + + + + +
    } + + {String(submenu_grp_dialog) !== "create" && + + + + + + } + + + + + +
    + + {/*** Fin ajout GROUPE MEMBRE_EDIT */} + + + {/*** Dialog pickup Color */} { {/*** Dialog GROUPE AUTOMATIC */} - { className="datagridclass" onRowDoubleClick={(newSelectionModel) => { - - setselected_id(newSelectionModel.row._id); - setgridline_id(newSelectionModel.row.id); - handleClick_edit_evaluation_From_Line(newSelectionModel.row.id); - }} rowsPerPageOptions={[10]} @@ -3294,9 +3813,7 @@ const Groupe_Apprenant = (props) => { id='menu_import_participant' name='menu_import_participant' onClick={(event) => { setDialog_GRP_AUTOMATIC_open(true); - submenu_create_grp(); - Annule_Add_One_Evaluaton_DetailFields(); }} > Gestion automatique @@ -3330,7 +3847,7 @@ const Groupe_Apprenant = (props) => { {String(display_grp_apprenant) === "1" && String(add_one_grp_apprenant) !== "1" &&
    - + {String(grp_apprenant_data_edit_mode) !== "1" &&
    @@ -4018,7 +4535,7 @@ const Groupe_Apprenant = (props) => { name={(JSON.parse(val).file_name)} id={(JSON.parse(val).file_name)} onClick={Download_one_attached_document}> Télécharger   - {String(props.check_user_acces_right("stagiaire", "write")) === "1" && Supprimer @@ -4095,7 +4612,7 @@ const Groupe_Apprenant = (props) => {
    - +
    -
    Cible 1
    +
    Cible
    {New_Option_Cible_Jury && New_Option_Cible_Jury.length > 0 && {
    } - {New_Option_Cible_Jury && New_Option_Cible_Jury.length > 0 &&
    Cible 2
    + {New_Option_Cible_Jury && New_Option_Cible_Jury.length > 0 &&
    Cible
    {
    -
    MySy Information
    - {String(actionmass_sequence_val) === "ajout_ressource" &&
    - {' '} - Confirmer l'action d'ajout de ressource en masse. -
    } {String(actionmass_sequence_val) === "supprimer" &&
    {' '} @@ -6451,6 +6459,28 @@ const Module_Session_Planification = (props) => { )} } + + {actionmass_sequence_val && String(actionmass_sequence_val).length > 1 && + String(actionmass_sequence_val) === "ajout_ressource" && + + }
    diff --git a/src/components/Mon_Tableau_De_Bord.js b/src/components/Mon_Tableau_De_Bord.js index 23be056..3ab85db 100644 --- a/src/components/Mon_Tableau_De_Bord.js +++ b/src/components/Mon_Tableau_De_Bord.js @@ -1,25 +1,18 @@ import React, { useRef, useState, useEffect } from "react"; - import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css - import axios from "axios"; import { getCookie, setCookie } from 'react-use-cookie'; import { useHistory } from "react-router-dom"; - import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css"; import Link from '@mui/material/Link'; import { PiDotsThree } from "react-icons/pi"; import 'react-tooltip/dist/react-tooltip.css' import { Tooltip } from 'react-tooltip' - import 'reactjs-popup/dist/index.css'; - import "react-datepicker/dist/react-datepicker.css"; - import Button from '@mui/material/Button'; import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif"; import fileDownload from 'js-file-download' - import Dashbord_Session_Par_Fteur from "./Dashbord_Session_Par_Fteur"; import Dashbord_Session_Taux_Remplissage from "./Dashbord_Session_Taux_Remplissage"; import Dashbord_Session_Repartition_Fteur from "./Dashbord_Session_Repartition_Fteur"; @@ -34,25 +27,22 @@ import Dashbord_Factures_Previsionnel_Par_Periode from "./Dashbord_Factures_Prev import Box from '@mui/material/Box'; import { TbColumns2, TbColumns1 } from "react-icons/tb"; import { BarChart } from '@mui/x-charts'; -import { axisClasses } from '@mui/x-charts'; -import { pieArcLabelClasses } from '@mui/x-charts/PieChart'; -import Popup from 'reactjs-popup'; + import 'reactjs-popup/dist/index.css'; -import { MdDeleteForever } from "react-icons/md"; -import { RiFileExcel2Line } from "react-icons/ri"; + import Autocomplete from '@mui/material/Autocomplete'; import TextField from '@mui/material/TextField'; import { format } from 'date-fns' import moment from "moment"; import DatePicker from "react-datepicker"; import "react-datepicker/dist/react-datepicker.css"; -import { ResponsiveBar } from "@nivo/bar"; + import { useTheme, } from "@mui/material"; import { tokens } from "../theme"; import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid'; - +import Module_Alert_Confirmation from "./Module_Alert_Confirmation"; import { FcPrint } from "react-icons/fc"; @@ -467,7 +457,7 @@ const Mon_Tableau_De_Bord = (props) => { setLoading(false); if (String(res.data.status) === String("true")) { //console.log(" In Getall_Qry_Formation_Session res.data.status = " + res.data.status); - // console.log(" In Getall_Qry_Formation_Session res.data.message r_class = " + res.data.message); + // console.log(" In Getall_Qry_Formation_Session res.data.message r_class = " + res.data.message); setGetall_Qry_Formation_Session_result_JSON(JSON.parse('[' + res.data.message + ']')); @@ -1145,7 +1135,7 @@ const Mon_Tableau_De_Bord = (props) => { //console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- selected_id = ", selected_id, " --- url =", url); - console.log(" #### url = ", url) + // console.log(" #### url = ", url) setLoading(true); axios.get(url, { responseType: 'blob', },) @@ -1169,6 +1159,184 @@ const Mon_Tableau_De_Bord = (props) => { + const [Get_Qualiopi_Indic_Apprenant_Formation_api, setGet_Qualiopi_Indic_Apprenant_Formation_api] = useState(); + const [Get_Qualiopi_Indic_Apprenant_Formation_message, setGet_Qualiopi_Indic_Apprenant_Formation_message] = useState(); + const [Get_Qualiopi_Indic_Apprenant_Formation_result, setGet_Qualiopi_Indic_Apprenant_Formation_result] = useState([]); + function Get_Qualiopi_Indic_Apprenant_Formation(local_from_beginning) { + + var form = new FormData(); + const stored_cookie = getCookie('tokenmysypart'); + + var date_from = ""; + if (p_filter_date_from) { + date_from = p_filter_date_from; + + } + + var date_to = ""; + if (p_filter_date_to) { + date_to = p_filter_date_to; + + } + + + form.append("token", stored_cookie); + form.append("session_start_date", date_from); + form.append("session_end_date", date_to); + form.append("tab_formation_ids", ""); + form.append("from_beginning", local_from_beginning); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_Taux_Success_For_List_Class/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + if (String(res.data.status) === String("true")) { + //console.log(" In Get_Qualiopi_Indic_Apprenant_Formation res.data.status = " + res.data.status); + // console.log(" In Get_Qualiopi_Indic_Apprenant_Formation res.data.message r_class = " + res.data.message); + + var json_data = JSON.parse(res.data.message[0]); + + // console.log(" ### json_data = ", json_data); + var jsonObj0 = json_data.data + if (json_data.total_nb_inscrit) { + setqualiopi_indic_nb_apprenant(json_data.total_nb_inscrit) + } else { + setqualiopi_indic_nb_apprenant(""); + } + + if (json_data.taux_success) { + setqualiopi_indic_taux_sucess(json_data.taux_success) + } else { + setqualiopi_indic_taux_sucess(""); + } + + + //console.log(" ### jsonObj0 = ", jsonObj0); + + setGet_Qualiopi_Indic_Apprenant_Formation_api("true"); + setGet_Qualiopi_Indic_Apprenant_Formation_result(res.data.message); + + + } + else { + setGet_Qualiopi_Indic_Apprenant_Formation_api("false"); + setGet_Qualiopi_Indic_Apprenant_Formation_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 :( Get_Qualiopi_Indic_Apprenant_Formation = ', error); + setGet_Qualiopi_Indic_Apprenant_Formation_api("false"); + // alert("Impossible de récuperer les données demandées"); + setdisplay_alert_mysy("1"); + setalert_message("Impossible de récuperer les données demandées"); + setalert_type("error"); + //setmyApimyApiMessage("") + }) + } + + + + const [Get_Qualiopi_Indic_Nb_Heure_api, setGet_Qualiopi_Indic_Nb_Heure_api] = useState(); + const [Get_Qualiopi_Indic_Nb_Heure_message, setGet_Qualiopi_Indic_Nb_Heure_message] = useState(); + const [Get_Qualiopi_Indic_Nb_Heure_result, setGet_Qualiopi_Indic_Nb_Heure_result] = useState([]); + function Get_Qualiopi_Indic_Nb_Heure(local_from_beginning) { + + var form = new FormData(); + const stored_cookie = getCookie('tokenmysypart'); + + var date_from = ""; + if (p_filter_date_from) { + date_from = p_filter_date_from; + + } + + var date_to = ""; + if (p_filter_date_to) { + date_to = p_filter_date_to; + } + + + form.append("token", stored_cookie); + form.append("session_start_date", date_from); + form.append("session_end_date", date_to); + form.append("tab_formation_ids", ""); + form.append("from_beginning", local_from_beginning); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_Session_For_List_Class/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + if (String(res.data.status) === String("true")) { + //console.log(" In Get_Qualiopi_Indic_Nb_Heure res.data.status = " + res.data.status); + // console.log(" In Get_Qualiopi_Indic_Nb_Heure res.data.message r_class = " + res.data.message); + + var json_data = JSON.parse(res.data.message[0]); + + // console.log(" ### json_data = ", json_data); + var jsonObj0 = json_data.data + + if (json_data.total_nb_heure) { + setqualiopi_indic_nb_heure(json_data.total_nb_heure) + } else { + setqualiopi_indic_nb_heure("") + } + //console.log(" ### jsonObj0 = ", jsonObj0); + + setGet_Qualiopi_Indic_Nb_Heure_api("true"); + setGet_Qualiopi_Indic_Nb_Heure_result(res.data.message); + + + } + else { + setGet_Qualiopi_Indic_Nb_Heure_api("false"); + setGet_Qualiopi_Indic_Nb_Heure_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 :( Get_Qualiopi_Indic_Nb_Heure = ', error); + setGet_Qualiopi_Indic_Nb_Heure_api("false"); + // alert("Impossible de récuperer les données demandées"); + setdisplay_alert_mysy("1"); + setalert_message("Impossible de récuperer les données demandées"); + setalert_type("error"); + //setmyApimyApiMessage("") + }) + } + + const [qualiopi_indic_nb_apprenant, setqualiopi_indic_nb_apprenant] = React.useState(""); + const [qualiopi_indic_nb_heure, setqualiopi_indic_nb_heure] = React.useState(""); + const [qualiopi_indic_taux_sucess, setqualiopi_indic_taux_sucess] = React.useState(""); + + const [display_alert_mysy, setdisplay_alert_mysy] = useState(""); + const [alert_message, setalert_message] = useState(""); + const [alert_type, setalert_type] = useState(""); + + function clear_alert_message() { + setalert_message(""); + } + function clear_alert_type() { + setalert_type(""); + } + function clear_display_alert_mysy() { + setdisplay_alert_mysy(""); + } + /****** FIN GESTION BPF */ return ( @@ -1177,6 +1345,17 @@ const Mon_Tableau_De_Bord = (props) => {
    } + {/*** Affichage des messages d'alerte*/} + {display_alert_mysy && String(display_alert_mysy) === "1" && + + } + {/*** FIN Affichage des messages d'alerte*/} +
    {/* */} @@ -1272,6 +1451,8 @@ const Mon_Tableau_De_Bord = (props) => { // Recuperation des rapports d'activités if (String(submenu) === "rapport_activite") { + Get_Qualiopi_Indic_Apprenant_Formation(); + Get_Qualiopi_Indic_Nb_Heure(); Getall_Qry_Inscription_Data(""); Getall_Qry_Formation_Session(""); // Getall_Qry_Session_Data(); @@ -1307,7 +1488,7 @@ const Mon_Tableau_De_Bord = (props) => {
    {String(submenu) === String("rapport_financier") &&
    -

    Rapports Financiers

    +

    Rapports Financiers

    @@ -1497,7 +1678,7 @@ const Mon_Tableau_De_Bord = (props) => { {String(submenu) === String("rapport_rh") &&
    -

    Rapports Ressources Humaines

    +

    Rapports Ressources Humaines

    @@ -1842,10 +2023,43 @@ const Mon_Tableau_De_Bord = (props) => {
    } {String(submenu) === String("rapport_activite") &&
    -

    Rapport d'activité

    +

    Rapport d'activité

    +
    +
    Incateurs Qualiopi
    +
    + +
    +
    + + +
    + Nombre d'apprenants
    + {qualiopi_indic_nb_apprenant} +
    + + +
    + Nombre d'heures dispensé
    + {qualiopi_indic_nb_heure} +
    + + +
    + Taux de réussite
    + {qualiopi_indic_taux_sucess}% +
    +
    +
    +
    + +
    + {Getall_Qry_Inscription_Data_result_JSON && Getall_Qry_Inscription_Data_result_JSON.length > 0 && Getall_Qry_Inscription_Data_result_JSON[0].data &&
    @@ -1872,7 +2086,7 @@ const Mon_Tableau_De_Bord = (props) => { return `${month.slice(0, 4)}` } - else if (String(month).length >= 4 && String(month).length <= 8) { + else if (String(month).length >= 4 && String(month).length <= 8) { return `${month.slice(0, 4)}` + " \n" + `${month.slice(4, String(month).length)}` } @@ -2015,7 +2229,7 @@ const Mon_Tableau_De_Bord = (props) => {
    } {String(submenu) === String("bpf") &&
    -

    Bilan Pédagogique et Financier (BPF)

    +

    Bilan Pédagogique et Financier (BPF)

    C. Bilan financier hors taxes : Origine des produits de l'organisme
    @@ -2456,18 +2670,18 @@ const Mon_Tableau_De_Bord = (props) => { }} > - Imprimer     + Imprimer     - +
    } {String(submenu) === String("montbd") &&
    -

    Mon tableau de bord

    +

    Mon tableau de bord

     
    Affichage   diff --git a/src/components/New_C_Article_2025.js b/src/components/New_C_Article_2025.js index 126c9e6..51b698f 100644 --- a/src/components/New_C_Article_2025.js +++ b/src/components/New_C_Article_2025.js @@ -487,7 +487,7 @@ const New_Article_2025 = (props) => { //console.log("file_size = ", file_size, " file_type = ", file_type); //console.log(" fileUploaded = ", fileUploaded); - if (file_size > 1000000) { + if (file_size > 10000000) { alert("Le fichier ne doit pas dépasser un 1 Méga octets"); return; } diff --git a/src/components/Partner.js b/src/components/Partner.js index 84bb74c..a406a7b 100644 --- a/src/components/Partner.js +++ b/src/components/Partner.js @@ -1,6 +1,5 @@ import React, { useState, useEffect } from "react"; import axios from "axios"; - import profileimg from "../mysy_img/MYSY-profil-2.png"; import TrainingForm from "./AddClassManual" import PartnerTranings from "./DisplayPartnerTrainingsPagination"; @@ -15,44 +14,37 @@ import { Helmet } from "react-helmet"; import RocketIcon from '@mui/icons-material/Rocket'; import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif"; import { GiTeacher } from "react-icons/gi"; -import Footer from "./Fotter"; import { confirmAlert } from 'react-confirm-alert'; // Import import { useCookies } from "react-cookie"; -import Header from "./Header"; import Facture from "./Facture"; import Abonnement from "./Abonnement"; import { useLocation } from "react-router-dom"; import { useParams } from 'react-router-dom'; import CheckOut from "./CheckOut"; - import { FaHandPointRight } from "react-icons/fa"; import OrderConfirmation from "./OrderConfirmation"; import Partner_Client from "./Partner_Client"; import Pricing from "./Pricing"; import { MdAddShoppingCart } from "react-icons/md"; import { - FcHome, FcBullish, FcAddDatabase, FcFolder, + FcHome, FcBullish, FcList, FcCurrencyExchange, - FcFeedback, FcKey, FcVideoCall, FcSettings, - FcBusinesswoman, FcServices, FcCollect, FcCandleSticks, FcKindle, - FcFlowChart, FcReading, FcFinePrint, FcCancel, FcCalendar, FcOrgUnit, + FcFeedback, FcKey, FcVideoCall, + FcBusinesswoman, FcServices, FcCollect, FcKindle, + FcFlowChart, FcReading, FcFinePrint, FcCalendar, FcOrgUnit, FcEngineering } from "react-icons/fc"; import CircleNotificationsIcon from '@mui/icons-material/CircleNotifications'; -import { FcInspection } from "react-icons/fc"; - import { PiStudent } from "react-icons/pi"; - import { BiPurchaseTag } from "react-icons/bi"; - import { BsTools } from "react-icons/bs"; - import DisplayPartnerPromotion from "./DisplayPartnerPromotion"; import DisplayPartnerSession from "./DisplayPartnerSession"; import DisplayPartnerStagiaires from "./DisplayPartnerStagiaires"; import Module_Alert_Confirmation from "./Module_Alert_Confirmation"; import Employes from "./Employes"; +import Autre_RH from "./Autre_RH"; import Materiels from "./Materiels"; import Partner_Commande from "./Partner_Commande"; import Config_Documents from "./Config_Document"; @@ -70,47 +62,33 @@ import Dashbord_Factures from "./Dashbord_Factures"; import Materiel_Salle from "./Materiel_Salle"; import CRM_Opportunite from "./Crm_Opportunite"; import Partner_Config_Formulaires from "./Partner_Config_Formulaires"; -import { AiOutlineUserAdd } from "react-icons/ai"; import PartnerClientActivite from "./PartnerClient_Activite"; import Jury from "./Jurys"; - - - +import Conseil_Classe from "./Conseil_Classe"; import Mon_Tableau_De_Bord from "./Mon_Tableau_De_Bord"; import Dashbord_Formation from "./Dashbord_Formation"; import Partner_Prix_Achat from "./Partner_Prix_Achat"; import Apprenant from "./Apprenant"; import { PiSlideshowFill, PiSlideshowThin } from "react-icons/pi"; - import Dialog from '@mui/material/Dialog'; import DialogActions from '@mui/material/DialogActions'; import DialogContent from '@mui/material/DialogContent'; import DialogContentText from '@mui/material/DialogContentText'; import DialogTitle from '@mui/material/DialogTitle'; import { ImWarning } from "react-icons/im"; -//import { FcHome} from "react-icons/fc"; import 'react-tooltip/dist/react-tooltip.css' import { Tooltip } from 'react-tooltip' -import Dropdown from 'rsuite/Dropdown'; -//import 'rsuite/dist/rsuite.min.css'; import { AiOutlineDashboard } from "react-icons/ai"; -import { FcPodiumWithAudience } from "react-icons/fc"; - -import BusinessIcon from '@mui/icons-material/Business'; import ListAltIcon from '@mui/icons-material/ListAlt'; import SchoolIcon from '@mui/icons-material/School'; - import { Sidebar, Menu, MenuItem, SubMenu } from 'react-pro-sidebar'; - import { FcBusinessContact } from "react-icons/fc"; -import { FcCamcorderPro } from "react-icons/fc"; import { FcVideoProjector } from "react-icons/fc"; import HandymanIcon from '@mui/icons-material/Handyman'; import HubIcon from '@mui/icons-material/Hub'; import EuroSharpIcon from '@mui/icons-material/EuroSharp'; import CameraOutdoorSharpIcon from '@mui/icons-material/CameraOutdoorSharp'; import SettingsIcon from '@mui/icons-material/Settings'; -import DashboardCustomizeIcon from '@mui/icons-material/DashboardCustomize'; import { createTheme, ThemeProvider } from '@mui/material/styles'; import AccountBalanceIcon from '@mui/icons-material/AccountBalance'; import CalendarMonthIcon from '@mui/icons-material/CalendarMonth'; @@ -129,16 +107,14 @@ import { LiaProductHunt } from "react-icons/lia"; import Partner_Product_Service from "./Partner_Product_Service"; import Module_Email_Management from "./Module_Email_Management"; import ForwardToInboxIcon from '@mui/icons-material/ForwardToInbox'; - - - import Badge from '@mui/material/Badge'; import { styled } from '@mui/material/styles'; - - import Modules_Mes_Documents from "./Modules_Mes_Documents"; - import FolderZipIcon from '@mui/icons-material/FolderZip'; +import ReduceCapacityIcon from '@mui/icons-material/ReduceCapacity'; +import { FcPodiumWithAudience } from "react-icons/fc"; +import { FcConferenceCall } from "react-icons/fc"; + const Partner = (props) => { @@ -157,7 +133,7 @@ const Partner = (props) => { const [selectedfilt3, setselectedfilt3] = useState(""); const [excelimportmessage, setexcelimportmessage] = useState(""); const [apiexcelimportmessage, setapiexcelimportmessage] = useState(""); - const [gotocheckout, setgotocheckout] = useState(""); + const [cookie_menu_gauche_reduit, setcookie_menu_gauche_reduit, removecookie_menu_gauche_reduit] = useCookies(['mysy_menu_gauche_reduit']); @@ -304,7 +280,7 @@ const Partner = (props) => { let file_type = event.target.files[0].type; //console.log("file_size = ",file_size," file_type = ",file_type); - if (file_size > 1000000) { + if (file_size > 10000000) { alert("Le fichier ne doit pas dépasser un 1 Méga octets"); return; } @@ -486,7 +462,7 @@ const Partner = (props) => { "dashbord_inscriptions", "mes_salles", "mes_opportunites", "config_formulaires", "dashbord_factures", "mes_ue", "domaine_categorie_metier", "config_formation_initiale", "note_evaluation", "groupe_apprenant", "part_produit_service", "config_document_super_admin", "tous_mes_document", "equipe_team", - "jurys", "mes_promotions"] + "jurys", "mes_promotions", "autre_rh", "conseil_classe"] if (action && list_menu.includes(action)) { @@ -522,7 +498,7 @@ const Partner = (props) => { const list_menu_header_names = ['my_account', 'my_class', 'my_session', 'my_apprenant', 'my_ressource', 'my_planning', 'my_partners', 'my_invoices', 'my_prix_achat', 'my_e_learning', 'my_configuration', 'my_tbd', 'my_ue', 'domaine_categorie_metier', 'config_formation_initiale', 'note_evaluation', 'groupe_apprenant', 'part_produit_service', 'monactivite', 'mon_tableau_de_bord', - 'tous_mes_document', 'equipe_team'] + 'tous_mes_document', 'equipe_team', 'conseil_class', 'autre_rh', 'jury', 'conseil_classe'] for (let i = 0; i < list_menu_header_names.length; i++) { if (document.getElementsByName(String(list_menu_header_names[i])) && document.getElementsByName(String(list_menu_header_names[i]))[0]) { document.getElementsByName(String(list_menu_header_names[i]))[0].style.fontWeight = "400"; @@ -539,7 +515,7 @@ const Partner = (props) => { const list_menu_header_names = ['my_account', 'my_class', 'my_session', 'my_apprenant', 'my_ressource', 'my_planning', 'my_partners', 'my_invoices', 'my_prix_achat', 'my_e_learning', 'my_configuration', 'my_tbd', 'my_ue', 'domaine_categorie_metier', 'config_formation_initiale', 'note_evaluation', 'groupe_apprenant', 'part_produit_service', 'monactivite', 'mon_tableau_de_bord', - 'tous_mes_document', 'equipe_team'] + 'tous_mes_document', 'equipe_team', 'conseil_class', 'autre_rh', 'jury', 'conseil_classe'] for (let i = 0; i < list_menu_header_names.length; i++) { if (document.getElementsByName(String(list_menu_header_names[i])) && document.getElementsByName(String(list_menu_header_names[i]))[0]) { document.getElementsByName(String(list_menu_header_names[i]))[0].style.fontWeight = "400"; @@ -897,7 +873,7 @@ const Partner = (props) => { inactive_active_menu_header("my_ue"); } else { - Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour accéder à la gestion des sessions"); + Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour accéder à cette fonctionnalité"); } } @@ -914,7 +890,7 @@ const Partner = (props) => { inactive_active_menu_header("domaine_categorie_metier"); } else { - Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour accéder à la gestion des sessions"); + Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour accéder à cette fonctionnalité"); } } @@ -931,7 +907,7 @@ const Partner = (props) => { inactive_active_menu_header("part_produit_service"); } else { - Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour accéder à la gestion des sessions"); + Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour accéder à cette fonctionnalité"); } } @@ -948,7 +924,7 @@ const Partner = (props) => { inactive_active_menu_header("my_session"); } else { - Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour accéder à la gestion des sessions"); + Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour accéder à cette fonctionnalité"); } } @@ -964,7 +940,7 @@ const Partner = (props) => { inactive_active_menu_header("my_promotion"); } else { - Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour accéder à la gestion des sessions"); + Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour accéder à cette fonctionnalité"); } } @@ -981,7 +957,7 @@ const Partner = (props) => { inactive_active_menu_header("note_evaluation"); } else { - Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour accéder à la gestion des sessions"); + Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour accéder à cette fonctionnalité"); } } @@ -997,10 +973,46 @@ const Partner = (props) => { inactive_active_menu_header("jurys"); } else { - Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour accéder à la gestion des sessions"); + Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour accéder à cette fonctionnalité"); } } + + function Display_conseil_classe_func(event) { + var security_retval = check_user_acces_right("jury", "read"); + + if (security_retval === 1) { + setmenu("conseil_classe"); + setapiexcelimportmessage(); + setformation_file_name(); + history.push("/Partner/conseil_classe"); + document.body.style.backgroundColor = "#ffffff"; + + inactive_active_menu_header("conseil_classe"); + } else { + Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour accéder à cette fonctionnalité"); + } + } + + + + function Display_conseil_class_func(event) { + var security_retval = check_user_acces_right("jury", "read"); + + if (security_retval === 1) { + setmenu("conseil_class"); + setapiexcelimportmessage(); + setformation_file_name(); + history.push("/Partner/conseil_class"); + document.body.style.backgroundColor = "#ffffff"; + + inactive_active_menu_header("conseil_class"); + } else { + Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour accéder à cette fonctionnalité"); + } + } + + function DiplayStagiaireList(event) { var security_retval = check_user_acces_right("stagiaire", "read"); if (security_retval === 1) { @@ -1065,7 +1077,22 @@ const Partner = (props) => { setformation_file_name(); history.push("/Partner/mes_employes"); document.body.style.backgroundColor = "#ffffff"; - inactive_active_menu_header("my_ressource"); + inactive_active_menu_header("mes_employes"); + } else { + Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour accéder à la gestion des employés"); + } + } + + + function Display_Autre_RH_List(event) { + var security_retval = check_user_acces_right("employe", "read"); + if (security_retval === 1) { + setmenu("autre_rh"); + setapiexcelimportmessage(); + setformation_file_name(); + history.push("/Partner/autre_rh"); + document.body.style.backgroundColor = "#ffffff"; + inactive_active_menu_header("autre_rh"); } else { Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour accéder à la gestion des employés"); } @@ -1301,7 +1328,7 @@ const Partner = (props) => { //alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a); - if (file_size > 100000) { + if (file_size > 10000000) { alert("L'image doit faire moins de 1 mega Kilo Octets"); return; } @@ -2002,18 +2029,11 @@ const Partner = (props) => { {String(formation_initiale) === "1" &&
    - {String(menu) !== "note_evaluation" &&    NOTES & EVALUATIONS } - {String(menu) === "note_evaluation" &&    NOTES & EVALUATIONS } + {String(menu) !== "note_evaluation" &&    NOTES & EVAL. } + {String(menu) === "note_evaluation" &&    NOTES & EVAL. }
    } - {String(formation_initiale) === "1" && -
    - - {String(menu) !== "jurys" &&    JURYS } - {String(menu) === "jurys" &&    JURYS } - -
    }
    @@ -2044,6 +2064,11 @@ const Partner = (props) => { {String(menu) !== "mes_employes" && }> EMPLOYES } {String(menu) === "mes_employes" && }> EMPLOYES } + {String(formation_initiale) === "1" && String(menu) !== "autre_rh" && }> AUTRE RH } + {String(formation_initiale) === "1" && String(menu) === "autre_rh" && }> AUTRE RH } + + + {String(menu) !== "mes_salles" && }> SALLES } {String(menu) === "mes_salles" && }> SALLES } @@ -2133,6 +2158,39 @@ const Partner = (props) => {
    +
    + + {String(formation_initiale) === "1" && +
    + + {String(menu) !== "jurys" &&    JURYS } + {String(menu) === "jurys" &&    JURYS } + +
    } + + + {String(formation_initiale) === "1" &&
    + + + } style={{ overflow: 'hidden' }}> + + {String(menu) !== "jurys" &&    JURYS } + {String(menu) === "jurys" &&    JURYS } + + {String(menu) !== "conseil_class" &&    CONSEILS } + {String(menu) === "conseil_class" &&    CONSEILS } + + + + + + + + +
    } + + +
    @@ -2141,7 +2199,7 @@ const Partner = (props) => { } style={{ overflow: 'hidden' }}> - + {String(has_partner_lms_url) === "1" && { if (String(check_user_acces_right("lms", "write")) === "1") { e.preventDefault(); @@ -2166,7 +2224,7 @@ const Partner = (props) => {
    -
    + {/*
    @@ -2192,7 +2250,7 @@ const Partner = (props) => { -
    +
    */}
    @@ -2371,6 +2429,18 @@ const Partner = (props) => {
    } + {String(menu) === "conseil_classe" && +
    + + +
    + } + {String(menu) === "groupe_apprenant" &&
    @@ -2574,6 +2644,13 @@ const Partner = (props) => {
    } + {String(menu) === "autre_rh" && +
    + +
    + } + {String(menu) === "factures_client" &&
    { {String(menu) === "module_agenda" &&
    - +
    } @@ -2808,7 +2885,7 @@ const Partner = (props) => { {/* div_gauche div_gauche_reduit */} { left_menu === false &&
    -
    + } + {String(menu) === "autre_rh" && +
    + +
    + } + + {String(menu) === "factures_client" &&
    { {String(menu) === "module_agenda" &&
    + write_access={check_user_acces_right("module_agenda", "write")} + check_user_acces_right={check_user_acces_right} />
    } diff --git a/src/components/Partner_Client.js b/src/components/Partner_Client.js index 5b0be7a..5ffab80 100644 --- a/src/components/Partner_Client.js +++ b/src/components/Partner_Client.js @@ -587,7 +587,7 @@ const Partner_Client = (props) => { let file_type = event.target.files[0].type; //console.log("file_size = ",file_size," file_type = ",file_type); - if (file_size > 1000000) { + if (file_size > 10000000) { // alert("Le fichier ne doit pas dépasser un 1 Méga octets"); setdisplay_alert_mysy("1"); setalert_message("Le fichier ne doit pas dépasser un 1 Méga octets"); @@ -1279,7 +1279,7 @@ const Partner_Client = (props) => {
    - {String(p_filtre2).length > 3 && String(p_filtre2) !== "archive" && + {String(p_filtre2).length > 2 && String(p_filtre2) !== "archive" && { let file_type = event.target.files[0].type; //console.log("file_size = ",file_size," file_type = ",file_type); - if (file_size > 1000000) { + if (file_size > 10000000) { // alert(res.data.message); setdisplay_alert_mysy("1"); setalert_message("Le fichier ne doit pas dépasser un 1 Méga octets"); diff --git a/src/components/Partner_Facture.js b/src/components/Partner_Facture.js index 133f65c..3aa466d 100644 --- a/src/components/Partner_Facture.js +++ b/src/components/Partner_Facture.js @@ -166,7 +166,7 @@ const Partner_Facture = (props) => { { field: '_id', headerName: '_id', hide: true, disableExport: true, }, { field: 'id', headerName: 'id', hide: true, disableExport: true }, { field: 'invoice_header_ref_interne', headerName: 'Num Facture', minWidth: 200, flex: 1, hide: false, editable: false, }, - { field: 'order_header_ref_interne', headerName: 'Reference Cmd', minWidth: 200, flex: 1, hide: false, editable: false }, + { field: 'order_header_ref_interne', headerName: 'Réf. Cmd', minWidth: 200, flex: 1, hide: true, editable: false }, { field: 'invoice_header_type', headerName: 'Type', width: 100, hide: false, editable: false }, { field: 'invoice_date', headerName: 'Date Facture', width: 150, hide: false, editable: false }, @@ -180,6 +180,7 @@ const Partner_Facture = (props) => { { field: 'total_header_toutes_taxes', headerName: 'Montant TTC', width: 150, hide: false, editable: false }, { field: 'reste_to_paye', headerName: 'A payer', width: 150, hide: false, editable: false }, { field: 'credit_note_ref', headerName: 'Ref. Avoir', width: 150, hide: true, editable: false, }, + { field: 'invoice_header_origin', headerName: 'Fact. Orig.', width: 150, hide: false, editable: false, }, ] @@ -890,7 +891,7 @@ const Partner_Facture = (props) => { if (String(res.data.status) === String("true")) { //console.log(" In Getall_Parter_Invoice_No_Filter res.data.status = " + res.data.status); //console.log(" In Getall_Parter_Invoice_No_Filter res.data.message r_class = " + res.data.message); - console.log(" In Getall_Parter_Invoice_No_Filter res.data.total_data r_class = ", res.data.total_data); + // console.log(" In Getall_Parter_Invoice_No_Filter res.data.total_data r_class = ", res.data.total_data); setGetall_Parter_Invoice_No_Filter_api("true"); setGetall_Parter_Invoice_No_Filter_result(res.data.message); setRows(res.data.message); @@ -3656,12 +3657,22 @@ const Partner_Facture = (props) => {
    -
    -
    @@ -3752,7 +3763,6 @@ const Partner_Facture = (props) => { //setsubmenu(); setdisplay_detail_invoice(); - } }} @@ -3789,6 +3799,7 @@ const Partner_Facture = (props) => { reste_to_paye: JSON.parse(item).reste_to_paye, credit_note_ref: JSON.parse(item).credit_note_ref, + invoice_header_origin: JSON.parse(item).invoice_header_origin, } ))} @@ -4483,14 +4494,14 @@ const Partner_Facture = (props) => {
    - {String(props.check_user_acces_right("facture_client", "write")) === "1" && } - {String(props.check_user_acces_right("facture_client", "write")) === "1" && } + {String(props.check_user_acces_right("facture_client", "write")) === "1" && } - {String(props.check_user_acces_right("facture_client", "write")) === "1" && String(history_securite_read) === "1" && } @@ -4509,7 +4520,7 @@ const Partner_Facture = (props) => {
     
    - {String(props.check_user_acces_right("facture_client", "write")) === "1" && p_detail_header_invoice_header_type && String(p_detail_header_invoice_header_type) === "facture" && + {String(props.check_user_acces_right("facture_client", "write")) === "1" && p_detail_header_invoice_header_type && String(p_detail_header_invoice_header_type) === "facture" && String(p_detail_header_credit_note_ref) === "" && { //alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a); - if (file_size > 1000000) { + if (file_size > 10000000) { alert("L'image ne doit pas dépasser un 1 Méga octets"); return; } diff --git a/src/components/RechercheArticles_new_v2.js b/src/components/RechercheArticles_new_v2.js index 4cc903d..6fcddea 100644 --- a/src/components/RechercheArticles_new_v2.js +++ b/src/components/RechercheArticles_new_v2.js @@ -936,7 +936,7 @@ const RechercheArticles_new_v2 = (props) => { //console.log("file_size = ", file_size, " file_type = ", file_type); //console.log(" fileUploaded = ", fileUploaded); - if (file_size > 1000000) { + if (file_size > 10000000) { alert("Le fichier ne doit pas dépasser un 1 Méga octets"); return; } diff --git a/src/components/Student_Account.js b/src/components/Student_Account.js index 84bdb4b..c047316 100644 --- a/src/components/Student_Account.js +++ b/src/components/Student_Account.js @@ -303,7 +303,7 @@ function Student_Account() { //alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a); - if (file_size > 100000) { + if (file_size > 10000000) { alert("L'image doit faire moins de 100 Kilo Octets"); return; } diff --git a/src/components/UpdatePartnerInfo.js b/src/components/UpdatePartnerInfo.js index b559713..f74e3c7 100644 --- a/src/components/UpdatePartnerInfo.js +++ b/src/components/UpdatePartnerInfo.js @@ -1677,7 +1677,7 @@ function UpdateParnterInfo(props) { //alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a); - if (file_size > 1000000) { + if (file_size > 10000000) { alert("L'image ne doit pas dépasser un 1 Méga octets"); return; } @@ -1710,7 +1710,7 @@ function UpdateParnterInfo(props) { //alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a); - if (file_size > 1000000) { + if (file_size > 10000000) { alert("L'image ne doit pas dépasser un 1 Méga octets"); return; } @@ -2270,7 +2270,7 @@ function UpdateParnterInfo(props) { sethandleSubmission_bg_api(""); console.log("file_size = ", file_size, " file_type = ", file_type, " naturalWidth = ", fileUploaded.naturalWidth); - if (file_size > 1000000) { + if (file_size > 10000000) { // alert("Le fichier ne doit pas dépasser un 1 Méga octets"); setdisplay_alert_mysy("1"); setalert_message("Le fichier ne doit pas dépasser un 1 Méga octets"); @@ -2479,7 +2479,7 @@ function UpdateParnterInfo(props) { //console.log("file_size = ", file_size, " file_type = ", file_type); //console.log(" fileUploaded = ", fileUploaded); - if (file_size > 1000000) { + if (file_size > 10000000) { alert("Le fichier ne doit pas dépasser un 1 Méga octets"); return; } @@ -2911,7 +2911,7 @@ function UpdateParnterInfo(props) { sethandleSubmission_cgv_api(""); // console.log("file_size = ", file_size, " file_type = ", file_type, " naturalWidth = ", fileUploaded.naturalWidth); - if (file_size > 1000000) { + if (file_size > 10000000) { alert("Le fichier ne doit pas dépasser un 1 Méga octets"); return; } @@ -3072,7 +3072,7 @@ function UpdateParnterInfo(props) { sethandleSubmission_cgu_api(""); // console.log("file_size = ", file_size, " file_type = ", file_type, " naturalWidth = ", fileUploaded.naturalWidth); - if (file_size > 1000000) { + if (file_size > 10000000) { alert("Le fichier ne doit pas dépasser un 1 Méga octets"); return; } @@ -3240,7 +3240,7 @@ function UpdateParnterInfo(props) { sethandleSubmission_mention_legale_api(""); // console.log("file_size = ", file_size, " file_type = ", file_type, " naturalWidth = ", fileUploaded.naturalWidth); - if (file_size > 1000000) { + if (file_size > 10000000) { alert("Le fichier ne doit pas dépasser un 1 Méga octets"); return; } diff --git a/src/styles/components/_abonnement.scss b/src/styles/components/_abonnement.scss index 9a922b9..fb6249f 100644 --- a/src/styles/components/_abonnement.scss +++ b/src/styles/components/_abonnement.scss @@ -127,7 +127,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: normal; + cursor: default; font-style: italic; background-color: gray; font-weight: normal; @@ -345,7 +345,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: normal; + cursor: default; font-style: italic; background-color: gray; font-weight: normal; @@ -570,7 +570,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: normal; + cursor: default; font-style: italic; background-color: gray; font-weight: normal; @@ -796,7 +796,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: normal; + cursor: default; font-style: italic; background-color: gray; font-weight: normal; diff --git a/src/styles/components/_addclassmanual.scss b/src/styles/components/_addclassmanual.scss index e7b1e68..1244330 100644 --- a/src/styles/components/_addclassmanual.scss +++ b/src/styles/components/_addclassmanual.scss @@ -1,11 +1,11 @@ .addclassmanual { - .tooltip_css { - background: #81BC3A; - z-index: 9999; - font-family: "DM Sans", "sans-serif"; - font-size: "10px" !important; - } + .tooltip_css { + background: #81BC3A; + z-index: 9999; + font-family: "DM Sans", "sans-serif"; + font-size: "10px" !important; + } .block_archive { background-color: #774a10; @@ -22,7 +22,7 @@ font-weight: 600; font-size: 14px; } - + .loader-container { width: 100%; height: 100vh; @@ -467,6 +467,24 @@ margin-bottom: 2px; margin-right: 10px; } + + .stat_bloc_indicateur { + display: flex; + flex-direction: column; + justify-content: flex-start; + width: 100%; + padding: 10px; + flex-wrap: wrap; + } + + .stat_bloc_indicateur_pave { + font-size: 20px; + width: 100%; + border: 1px solid #3b3e40; + font-family: 'DM Sans'; + } + + } @media only screen and (min-width: 601px) and (max-width: 991px) { @@ -956,6 +974,24 @@ margin-bottom: 2px; margin-right: 10px; } + + .stat_bloc_indicateur { + display: flex; + flex-direction:column; + justify-content: flex-start; + width: 100%; + padding: 10px; + flex-wrap: wrap; + gap: 1rem; + } + + .stat_bloc_indicateur_pave { + font-size: 22px; + width: 100%; + border: 1px solid #3b3e40; + font-family: 'DM Sans'; + } + } @media only screen and (min-width: 992px) and (max-width: 1199px) { @@ -1447,6 +1483,23 @@ margin-bottom: 2px; margin-right: 10px; } + + .stat_bloc_indicateur { + display: flex; + flex-direction: row; + justify-content: flex-start; + width: 100%; + padding: 10px; + flex-wrap: wrap; + } + + .stat_bloc_indicateur_pave { + font-size: 18px; + width: 25%; + border: 1px solid #3b3e40; + font-family: 'DM Sans'; + } + } @media only screen and (min-width: 1200px) { @@ -1924,6 +1977,26 @@ margin-bottom: 2px; margin-right: 10px; } + + .stat_bloc_indicateur { + display: flex; + flex-direction: row; + justify-content: flex-start; + width: 100%; + padding: 10px; + flex-wrap: wrap; + } + + .stat_bloc_indicateur_pave { + font-size: 22px; + width: 25%; + border: 1px solid #3b3e40; + font-family: 'DM Sans'; + } + + + + } diff --git a/src/styles/components/_addpartnerclient.scss b/src/styles/components/_addpartnerclient.scss index 4ab35ea..cbd98b6 100644 --- a/src/styles/components/_addpartnerclient.scss +++ b/src/styles/components/_addpartnerclient.scss @@ -11,9 +11,9 @@ color: red; font-style: italic; } - - .block_archive { + + .block_archive { background-color: #774a10; width: calc(100% - 20px); margin-left: 10px; @@ -28,8 +28,8 @@ font-weight: 600; font-size: 14px; } - - + + @media only screen and (max-width: 600px) { .div_row { @@ -63,7 +63,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: normal; + cursor: default; font-style: italic; background-color: gray; font-weight: normal; @@ -106,6 +106,8 @@ } .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } @@ -136,7 +138,7 @@ } .bton_enreg { - font-family: DM sans; + font-family: DM sans; border-radius: 5rem; font-size: small; background: #81BC3A !important; @@ -183,7 +185,7 @@ border: 1px solid #9cf; color: #3b3e40; font-family: "DM Sans", "sans-serif"; - font-size: small; + font-size: 11px; letter-spacing: 0.1rem; font-weight: normal; } @@ -205,12 +207,12 @@ padding-right: 1rem !important; } - + .div_row_list_pj { width: 100%; border-left: 3mm ridge rgba(211, 220, 50, .6); float: left; - } + } } @@ -247,7 +249,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: normal; + cursor: default; font-style: italic; background-color: gray; font-weight: normal; @@ -290,6 +292,8 @@ } .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } @@ -320,7 +324,7 @@ } .bton_enreg { - font-family: DM sans; + font-family: DM sans; border-radius: 5rem; font-size: small; background: #81BC3A !important; @@ -367,7 +371,7 @@ border: 1px solid #9cf; color: #3b3e40; font-family: "DM Sans", "sans-serif"; - font-size: small; + font-size: 11px; letter-spacing: 0.1rem; font-weight: normal; } @@ -393,7 +397,7 @@ width: 50%; border-left: 3mm ridge rgba(211, 220, 50, .6); float: left; - } + } } @media only screen and (min-width: 992px) and (max-width: 1199px) { @@ -429,7 +433,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: normal; + cursor: default; font-style: italic; background-color: gray; font-weight: normal; @@ -472,6 +476,8 @@ } .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } @@ -502,7 +508,7 @@ } .bton_enreg { - font-family: DM sans; + font-family: DM sans; border-radius: 5rem; font-size: small; background: #81BC3A !important; @@ -549,7 +555,7 @@ border: 1px solid #9cf; color: #3b3e40; font-family: "DM Sans", "sans-serif"; - font-size: small; + font-size: 11px; letter-spacing: 0.1rem; font-weight: normal; } @@ -575,7 +581,7 @@ width: 30%; border-left: 3mm ridge rgba(211, 220, 50, .6); float: left; - } + } } @media only screen and (min-width: 1200px) { @@ -611,7 +617,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: normal; + cursor: default; font-style: italic; background-color: gray; font-weight: normal; @@ -654,6 +660,8 @@ } .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } @@ -684,7 +692,7 @@ } .bton_enreg { - font-family: DM sans; + font-family: DM sans; border-radius: 5rem; font-size: small; background: #81BC3A !important; @@ -733,7 +741,7 @@ border: 1px solid #9cf; color: #3b3e40; font-family: "DM Sans", "sans-serif"; - font-size: small; + font-size: 11px; letter-spacing: 0.1rem; font-weight: normal; } @@ -760,7 +768,7 @@ width: 30%; border-left: 3mm ridge rgba(211, 220, 50, .6); float: left; - } + } } @@ -768,12 +776,12 @@ .client_menu { - font-size: 12px !important; + font-size: 11px !important; min-width: 15rem !important; height: 2rem !important; } - + .hr_break { border: 5px solid grey; } diff --git a/src/styles/components/_apprenant.scss b/src/styles/components/_apprenant.scss index b72f3b7..b53c4e8 100644 --- a/src/styles/components/_apprenant.scss +++ b/src/styles/components/_apprenant.scss @@ -37,6 +37,21 @@ } + .block_archive { + background-color: #774a10; + width: calc(100% - 20px); + margin-left: 10px; + margin-right: 10px; + border-radius: 5px; + text-align: center; + font-family: DM sans; + color: white; + margin-bottom: 0.5rem; + font-style: italic; + opacity: 80%; + font-weight: 600; + font-size: 14px; + } .Mui-disabled { font-family: 'DM Sans', 'Sans-serif'; @@ -362,7 +377,7 @@ border-width: 0.01rem; border-radius: 1rem; text-align: left; - padding-top: 10px; + padding-top: 10px; } .div_row_droite_image { @@ -644,7 +659,7 @@ width: 100%; border-left: 3mm ridge rgba(211, 220, 50, .6); float: left; - } + } .block_en_mass { width: 100%; @@ -1016,7 +1031,7 @@ border-width: 0.01rem; border-radius: 1rem; text-align: left; - padding-top: 10px; + padding-top: 10px; } .div_row_droite_image { @@ -1709,7 +1724,7 @@ border-width: 0.01rem; border-radius: 1rem; text-align: left; - padding-top: 10px; + padding-top: 10px; } .div_row_droite_image { @@ -2498,7 +2513,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: default; + cursor: default; font-style: italic; background-color: gray; font-weight: normal; @@ -2806,7 +2821,7 @@ } .css-9ddj71-MuiInputBase-root-MuiOutlinedInput-root { - font-family: DM Sans !important; + font-family: "DM Sans" !important; height: 3.5rem !important; } @@ -2816,6 +2831,8 @@ width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_config_champs_personnalise.scss b/src/styles/components/_config_champs_personnalise.scss index f432e5f..2638937 100644 --- a/src/styles/components/_config_champs_personnalise.scss +++ b/src/styles/components/_config_champs_personnalise.scss @@ -1632,7 +1632,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: normal; + cursor: default; font-style: italic; background-color: gray; font-weight: normal; @@ -2200,7 +2200,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: normal; + cursor: default; font-style: italic; background-color: gray; font-weight: normal; @@ -2280,7 +2280,7 @@ } .css-9ddj71-MuiInputBase-root-MuiOutlinedInput-root { - font-family: DM Sans !important; + font-family: "DM Sans" !important; height: 3.5rem !important; } @@ -2290,6 +2290,8 @@ width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_config_document.scss b/src/styles/components/_config_document.scss index eb06fa1..79dc01b 100644 --- a/src/styles/components/_config_document.scss +++ b/src/styles/components/_config_document.scss @@ -2313,6 +2313,8 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_conseil_classe.scss b/src/styles/components/_conseil_classe.scss new file mode 100644 index 0000000..1197f36 --- /dev/null +++ b/src/styles/components/_conseil_classe.scss @@ -0,0 +1,2627 @@ +.conseil_classe { + + .loader-container { + width: 100%; + height: 100vh; + display: flex; + justify-content: center; + align-items: center; + position: fixed; + background: white; + background-color: transparent; + z-index: 1; + top: 0px; + opacity: 80%; + left: 0px; + } + + .tooltip_css { + background: #81BC3A; + z-index: 9999; + } + + .Mui-disabled { + font-family: 'DM Sans', 'Sans-serif'; + font-size: small !important; + padding: 0px !important; + padding-left: 5px !important; + } + + + + @media screen and (max-width: 600px) { + .okUpdateData { + font-size: small; + color: green; + font-style: italic; + } + + .koUpdateData { + font-size: small; + color: red; + font-style: italic; + } + + .div_row { + float: left; + //border: 1px solid #d5d8dc; + border-width: 0.01rem; + width: 100%; + margin-bottom: 1rem; + border-radius: 1rem; + } + + .div_row_gauche { + + width: 100%; + border-radius: 10rem !important; + text-align: left; + + margin: 0px !important; + margin-bottom: 0.5rem !important; + margin-top: 0.5rem !important; + } + + .div_row_droite { + width: 100%; + border-radius: 10rem !important; + text-align: left; + + margin: 0px !important; + margin-bottom: 0.5rem !important; + margin-top: 0.5rem !important; + } + + .selectsession { + width: 90%; + height: 3rem; + font-size: small; + border-radius: 0px !important; + } + + .titre1_aide_finance { + margin-top: 1rem; + font-family: "DM Sans", "sans-serif"; + font-size: medium; + text-align: center; + margin-bottom: 0.8rem; + color: white; + cursor: pointer; + font-style: italic; + background-color: gray; + font-weight: normal; + } + + .pieddepage { + z-index: 50; + width: 100%; + float: left; + margin-top: 12rem; + } + + .div_mobile { + position: absolute; + top: 8rem; + z-index: 1; + width: 100%; + } + + .zone_data { + width: 95%; + margin-left: auto; + margin-right: auto; + } + + .detail_class_submenu { + background: #d8edfc; + border-radius: 15px; + margin-right: 1rem; + padding: 0.3rem; + margin-bottom: 0.5rem; + width: 10.5rem; + text-align: center; + border: 1px solid #9cf; + color: #3b3e40; + font-family: "DM Sans", "sans-serif"; + font-size: 11px; + letter-spacing: 0.1rem; + font-weight: normal; + width: 100%; + height: 2rem !important; + } + + .detail_class_submenu:hover:active, + .detail_class_submenu:hover { + background-color: #107758; + color: white; + } + + .detail_class_submenu:focus { + //border: 3px dotted green; + background-color: #107758; + color: white; + } + + .detail_class_submenu_data { + width: 100%; + min-height: 10rem; + background-color: #d8edfc; + padding-left: 5px; + text-align: left; + padding: 0; + border: 0px; + color: #3b3e40; + padding-left: 5px; + font-family: "DM Sans", "sans-serif"; + font-size: small; + border-radius: 10px; + border: 1px solid; + } + + .disabled_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 97% !important; + //border: none !important; + margin: 5px !important; + height: 3.5rem !important; + background: white; + border: solid gainsboro 1px; + + } + + .training_caract { + width: 100%; + padding: 5px; + float: left; + } + + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input .Mui-disabled { + font-family: 'DM Sans', 'Sans-serif'; + font: inherit; + letter-spacing: inherit; + color: currentColor; + border: 0; + box-sizing: content-box; + background: none; + background-color: rgba(0, 0, 0, 0); + margin: 0; + -webkit-tap-highlight-color: transparent; + display: block; + min-width: 0; + width: 100%; + -webkit-animation-name: mui-auto-fill-cancel; + animation-name: mui-auto-fill-cancel; + -webkit-animation-duration: 10ms; + animation-duration: 10ms; + height: 3rem !important; + padding: 0 !important; + padding-left: 5px !important; + } + + .css-11u53oe-MuiSelect-select-MuiInputBase-input-MuiOutlinedInput-input { + padding: 1px !important; + } + + .selectsession { + width: 100%; + height: 3rem; + font-size: small; + border-radius: 0px !important; + } + + .session_data { + float: left; + width: 100%; + box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5); + border-radius: 10px; + margin-top: 10px; + margin-bottom: 10px; + + + } + + .session_caract { + font-family: DM Sans; + width: 100%; + padding: 5px; + float: left; + text-align: left; + font-size: small; + } + + .session_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 100% !important; + height: 2rem !important; + margin: 5px !important; + } + + .css-1x5jdm { + padding: 5px; + } + + + + .css-1x5jdmq { + padding: 6px !important; + padding-bottom: 0px !important; + } + + .css-qiwgdb { + padding: 6px !important; + } + + .preview_certif { + display: block; + width: 100%; + height: 180px; + border-radius: 1rem !important; + margin-top: 1rem !important; + } + + .hr_break { + border: 2px solid grey; + } + + .icon_plus { + width: 6%; + } + + .bton_add_session { + background: #c8cfd5; + color: black; + width: 100%; + height: 2rem !important; + } + + .bton_import_excel { + background: #c8cfd5; + color: black; + width: 100% !important; + height: 2rem !important; + } + + .div_row_gauche_etendu { + width: 100%; + } + + .icon_excel { + width: 6%; + } + + + .bton_suppr { + background: transparent; + color: red; + border-radius: 5rem; + font-size: small; + text-align: center; + height: 2.5rem; + width: 100%; + margin-left: 10px; + margin-right: 10px; + } + + + + .bton_edit { + border-radius: 5rem; + font-size: small; + background: black !important; + text-align: right; + height: 2.5rem; + width: 100%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_annule { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 100%; + color: black; + margin-left: 10px; + margin-right: 10px; + } + + .div_row_gauche_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + } + + .div_row_droite_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + font-family: "DM Sans", "sans-serif"; + font-size: small; + padding-left: 0.2rem; + } + + .tips_img_class { + font-size: smaller; + font-style: italic; + margin-left: 1rem !important; + text-align: left; + float: left; + width: 100%; + padding-right: 10px; + } + + .img_class_logo { + display: block; + width: 128px; + height: 128px; + border-radius: 10px !important; + border: 1px solid #d5d8dc; + float: left; + } + + .bton_supprime_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + background: white; + color: red; + margin-top: 0.5rem; + width: 10rem; + cursor: pointer; + } + + .bton_supprime_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .bton_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + width: 10rem; + cursor: pointer; + } + + .bton_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .tick_ok_ko { + max-width: 3%; + cursor: pointer; + padding-top: 4px; + } + + .texte_area { + float: left; + width: 47% !important; + font-size: x-small !important; + font-family: "DM Sans", "sans-serif"; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 1.5rem !important; + } + + .texte_area_filter { + float: left; + width: 100% !important; + font-size: x-small !important; + font-family: "DM Sans", "sans-serif"; + margin-top: 0px !important; + margin-bottom: 2px !important; + } + + .texte_area_filter_value { + float: left !important; + width: 100% !important; + font-size: x-small !important; + font-family: "DM Sans", "sans-serif"; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + + } + + + .filter_bton_add { + float: left; + width: 40% !important; + font-size: xx-large !important; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + text-align: right; + cursor: pointer; + } + + + .div_row { + float: left; + border-width: 0.01rem; + width: 100%; + + border-radius: 1rem; + } + + .div_row_gauche { + float: left; + width: 100%; + border-radius: 1rem; + text-align: left; + } + + .div_row_droite { + float: left; + width: 100%; + border-radius: 1rem; + text-align: left; + + } + + .bton_suppr { + background: transparent; + color: red; + border-radius: 5rem; + font-size: small; + text-align: center; + height: 2.5rem; + width: 100%; + margin-left: 10px; + margin-right: 10px; + margin-bottom: 1rem !important; + } + + .bton_enreg { + font-family: DM sans; + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: center; + height: 2.5rem; + width: 100%; + color: white; + margin-bottom: 1rem !important; + } + + + .bton_create_login { + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: center; + height: 2.5rem; + width: 100%; + color: white; + margin-bottom: 1rem !important; + } + + .bton_edit { + border-radius: 5rem; + font-size: small; + background: black !important; + text-align: right; + height: 2.5rem; + width: 100%; + color: white; + margin-bottom: 1rem !important; + } + + .bton_annule { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 100%; + color: black; + margin-bottom: 1rem !important; + } + + + .css-1t10bd6-MuiFormControl-root-MuiTextField-root fieldset { + border-color: transparent !important; + border-radius: 20px !important; + } + + .disabled_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 100% !important; + height: 3.5rem !important; + + //border: none !important; + border-radius: 5px; + background: white; + border: solid gainsboro 1px; + + } + + .training_caract { + width: 100%; + + float: left; + } + + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input .Mui-disabled { + font-family: 'DM Sans', 'Sans-serif'; + font: inherit; + letter-spacing: inherit; + color: currentColor; + border: 0; + box-sizing: content-box; + background: none; + background-color: rgba(0, 0, 0, 0); + margin: 0; + -webkit-tap-highlight-color: transparent; + display: block; + min-width: 0; + width: 100%; + -webkit-animation-name: mui-auto-fill-cancel; + animation-name: mui-auto-fill-cancel; + -webkit-animation-duration: 10ms; + animation-duration: 10ms; + height: 3rem !important; + padding: 0 !important; + padding-left: 5px !important; + } + + .css-11u53oe-MuiSelect-select-MuiInputBase-input-MuiOutlinedInput-input { + padding: 1px !important; + } + + .block_en_mass { + padding: 10px; + width: 100%; + float: left; + margin-bottom: 1rem; + } + + .block_en_mass_select { + width: 100%; + float: left; + margin-bottom: 1rem; + } + + .block_en_mass_bton_action { + width: 100%; + float: left; + margin-bottom: 1rem; + padding-top: 0.5rem !important; + } + + .div_row_list_pj { + width: 100%; + border-left: 3mm ridge rgba(211, 220, 50, .6); + float: left; + } + + .block_competence { + width: 50%; + float: left; + margin-bottom: 1.5rem; + } + + .block_login_pwd { + padding-left: 5px; + width: 100%; + float: left; + + } + + .mode_affichage { + width: 25%; + float: right; + cursor: pointer; + + } + + } + + @media only screen and (min-width: 601px) and (max-width: 991px) { + .okUpdateData { + font-size: small; + color: green; + font-style: italic; + } + + .koUpdateData { + font-size: small; + color: red; + font-style: italic; + } + + .selectsession { + width: 90%; + height: 3rem; + font-size: small; + border-radius: 0px !important; + } + + .titre1_aide_finance { + margin-top: 1rem; + font-family: "DM Sans", "sans-serif"; + font-size: medium; + text-align: center; + margin-bottom: 0.8rem; + color: white; + cursor: pointer; + font-style: italic; + background-color: gray; + font-weight: normal; + } + + .pieddepage { + z-index: 50; + width: 100%; + float: left; + margin-top: 12rem; + } + + .div_mobile { + position: absolute; + top: 8rem; + z-index: 1; + width: 100%; + } + + .zone_data { + width: 95%; + margin-left: auto; + margin-right: auto; + } + + .detail_class_submenu { + background: #d8edfc; + border-radius: 15px; + margin-right: 1rem; + padding: 0.3rem; + margin-bottom: 0.5rem; + min-width: 12rem; + text-align: center; + border: 1px solid #9cf; + color: #3b3e40; + font-family: "DM Sans", "sans-serif"; + font-size: 11px; + letter-spacing: 0.1rem; + font-weight: normal; + height: 2rem !important; + } + + .detail_class_submenu:hover:active, + .detail_class_submenu:hover { + background-color: #107758; + color: white; + } + + .detail_class_submenu:focus { + //border: 3px dotted green; + background-color: #107758; + color: white; + } + + .detail_class_submenu_data { + width: 100%; + min-height: 10rem; + background-color: #d8edfc; + padding-left: 5px; + text-align: left; + padding: 0; + border: 0px; + color: #3b3e40; + padding-left: 5px; + font-family: "DM Sans", "sans-serif"; + font-size: small; + border-radius: 10px; + border: 1px solid; + } + + .disabled_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 90% !important; + height: 3.5rem !important; + margin: 5px !important; + //border: none !important; + border-radius: 5px; + background: white; + border: solid gainsboro 1px; + } + + .training_caract { + width: 48%; + padding: 5px; + float: left; + } + + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input .Mui-disabled { + font-family: 'DM Sans', 'Sans-serif'; + font: inherit; + letter-spacing: inherit; + color: currentColor; + border: 0; + box-sizing: content-box; + background: none; + background-color: rgba(0, 0, 0, 0); + margin: 0; + -webkit-tap-highlight-color: transparent; + display: block; + min-width: 0; + width: 100%; + -webkit-animation-name: mui-auto-fill-cancel; + animation-name: mui-auto-fill-cancel; + -webkit-animation-duration: 10ms; + animation-duration: 10ms; + height: 3rem !important; + padding: 0 !important; + padding-left: 5px !important; + } + + .css-11u53oe-MuiSelect-select-MuiInputBase-input-MuiOutlinedInput-input { + padding: 1px !important; + } + + .selectsession { + width: 90%; + height: 3rem; + font-size: small; + border-radius: 0px !important; + } + + .session_data { + float: left; + width: 100%; + box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5); + border-radius: 10px; + margin-top: 10px; + margin-bottom: 10px; + + + } + + .session_caract { + font-family: DM Sans; + width: 50%; + padding: 5px; + float: left; + text-align: left; + font-size: small; + } + + .session_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 100% !important; + height: 2rem !important; + margin: 5px !important; + } + + .css-1x5jdm { + padding: 5px; + } + + .bton_envoyer { + border-radius: 5px; + font-size: small; + padding: 0.3rem; + width: 80%; + background: #81BC3A; + } + + + .bton_fermer { + border-radius: 5px; + font-size: small; + padding: 0.3rem; + width: 80%; + background-color: white; + color: #107758 !important; + } + + .css-1x5jdmq { + padding: 6px !important; + padding-bottom: 0px !important; + } + + .css-qiwgdb { + padding: 6px !important; + } + + .preview_certif { + display: block; + width: 90%; + height: 200px; + border-radius: 1rem !important; + margin-top: 1rem !important; + } + + .preview_certif:hover { + transform: scale(1.3); + margin-left: 5rem; + } + + .hr_break { + border: 3px solid grey; + } + + .icon_plus { + width: 6%; + } + + .bton_add_session { + background: #c8cfd5; + color: black; + width: 50%; + height: 2rem !important; + } + + .bton_import_excel { + background: #c8cfd5; + color: black; + width: 65% !important; + height: 2rem !important; + } + + .div_row_gauche_etendu { + width: 80% !important; + } + + .icon_excel { + width: 6%; + } + + + .bton_suppr { + background: transparent; + color: red; + border-radius: 5rem; + font-size: small; + text-align: center; + height: 2.5rem; + width: 80%; + margin-left: 10px; + margin-right: 10px; + } + + + + .bton_edit { + border-radius: 5rem; + font-size: small; + background: black !important; + text-align: right; + height: 2.5rem; + width: 80%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_annule { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 80%; + color: black; + margin-left: 10px; + margin-right: 10px; + } + + .div_row_gauche_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + } + + .div_row_droite_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + font-family: "DM Sans", "sans-serif"; + font-size: small; + padding-left: 0.2rem; + } + + .tips_img_class { + font-size: small; + font-style: italic; + margin-left: 1rem !important; + text-align: left; + float: left; + width: 100%; + } + + .img_class_logo { + display: block; + width: 168px; + height: 168px; + border-radius: 10px !important; + border: 1px solid #d5d8dc; + float: left; + } + + .bton_supprime_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + background: white; + color: red; + margin-top: 0.5rem; + width: 15rem; + cursor: pointer; + } + + .bton_supprime_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .bton_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + width: 15rem; + cursor: pointer; + } + + .bton_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .tick_ok_ko { + max-width: 3%; + cursor: pointer; + padding-top: 4px; + } + + .texte_area { + float: left; + width: 47% !important; + font-size: x-small !important; + font-family: "DM Sans", "sans-serif"; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 1.5rem !important; + } + + .texte_area_filter { + float: left; + width: 40% !important; + font-size: x-small !important; + font-family: "DM Sans", "sans-serif"; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + } + + .texte_area_filter_value { + float: left !important; + width: 40% !important; + font-size: x-small !important; + font-family: "DM Sans", "sans-serif"; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + + } + + + .filter_bton_add { + float: left; + width: 5% !important; + font-size: large !important; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + text-align: right; + cursor: pointer; + margin-top: 1rem !important; + } + + .div_row { + float: left; + //border: 1px solid #d5d8dc; + border-width: 0.01rem; + width: 100%; + //margin-bottom: 1rem; + border-radius: 1rem; + } + + .div_row_gauche { + float: left; + // border:1px solid black; + // border-width:0.01rem; + width: 45%; + border-radius: 1rem; + text-align: left; + } + + .div_row_droite { + float: right; + //border:1px solid black; + //border-width:0.01rem; + width: 45%; + border-radius: 1rem; + text-align: right; + } + + .bton_suppr { + background: transparent; + color: red; + border-radius: 5rem; + font-size: small; + text-align: center; + height: 2.5rem; + width: 40%; + margin-left: 10px; + margin-right: 10px; + min-width: 15rem; + } + + .bton_enreg { + font-family: DM sans; + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: center; + height: 2.5rem; + width: 40%; + color: white; + margin-left: 10px; + margin-right: 10px; + min-width: 15rem; + } + + .bton_create_login { + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: center; + height: 2.5rem; + width: 90%; + color: white; + margin-left: 10px; + margin-right: 10px; + min-width: 15rem; + } + + .bton_edit { + border-radius: 5rem; + font-size: small; + background: black !important; + text-align: right; + height: 2.5rem; + width: 40%; + color: white; + margin-left: 10px; + margin-right: 10px; + min-width: 15rem; + } + + .bton_annule { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 40%; + color: black; + margin-left: 10px; + margin-right: 10px; + min-width: 15rem; + } + + + .css-1t10bd6-MuiFormControl-root-MuiTextField-root fieldset { + border-color: transparent !important; + border-radius: 20px !important; + } + + .disabled_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 90% !important; + height: 3.5rem !important; + margin: 5px !important; + //border: none !important; + border-radius: 5px; + background: white; + border: solid gainsboro 1px; + padding-top: 0.5rem !important; + border: none !important; + } + + .training_caract { + width: 30%; + padding: 5px; + float: left; + } + + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input .Mui-disabled { + font-family: 'DM Sans', 'Sans-serif'; + font: inherit; + letter-spacing: inherit; + color: currentColor; + border: 0; + box-sizing: content-box; + background: none; + background-color: rgba(0, 0, 0, 0); + margin: 0; + -webkit-tap-highlight-color: transparent; + display: block; + min-width: 0; + width: 100%; + -webkit-animation-name: mui-auto-fill-cancel; + animation-name: mui-auto-fill-cancel; + -webkit-animation-duration: 10ms; + animation-duration: 10ms; + height: 3rem !important; + padding: 0 !important; + padding-left: 5px !important; + } + + .css-11u53oe-MuiSelect-select-MuiInputBase-input-MuiOutlinedInput-input { + padding: 1px !important; + } + + .block_en_mass { + padding: 10px; + width: 50%; + float: left; + margin-bottom: 1rem; + } + + .block_en_mass_select { + width: 45%; + float: left; + margin-bottom: 1rem; + } + + .block_en_mass_bton_action { + width: 45%; + float: left; + margin-bottom: 1rem; + padding-top: 0.5rem !important; + } + + .div_row_list_pj { + width: 50%; + border-left: 3mm ridge rgba(211, 220, 50, .6); + float: left; + } + + .block_competence { + width: 50%; + float: left; + margin-bottom: 1.5rem; + } + + .block_login_pwd { + padding-left: 5px; + width: 100%; + float: left; + + } + + .mode_affichage { + width: 15%; + float: right; + cursor: pointer; + + } + } + + @media only screen and (min-width: 992px) and (max-width: 1199px) { + .okUpdateData { + font-size: small; + color: green; + font-style: italic; + } + + .koUpdateData { + font-size: small; + color: red; + font-style: italic; + } + + .div_row { + float: left; + //border: 1px solid #d5d8dc; + border-width: 0.01rem; + width: 100%; + margin-bottom: 1rem; + border-radius: 1rem; + } + + .div_row_gauche { + float: left; + // border:1px solid black; + // border-width:0.01rem; + width: 45%; + border-radius: 1rem; + } + + .div_row_droite { + float: right; + //border:1px solid black; + //border-width:0.01rem; + width: 45%; + border-radius: 1rem; + text-align: right; + } + + .selectsession { + width: 90%; + height: 3rem; + font-size: small; + border-radius: 0px !important; + } + + .titre1_aide_finance { + margin-top: 1rem; + font-family: "DM Sans", "sans-serif"; + font-size: medium; + text-align: center; + margin-bottom: 0.8rem; + color: white; + cursor: pointer; + font-style: italic; + background-color: gray; + font-weight: normal; + } + + .pieddepage { + z-index: 50; + width: 100%; + float: left; + margin-top: 12rem; + } + + .div_mobile { + position: absolute; + top: 8rem; + z-index: 1; + width: 100%; + } + + .zone_data { + width: 95%; + margin-left: auto; + margin-right: auto; + } + + .detail_class_submenu { + background: #d8edfc; + border-radius: 15px; + margin-right: 1rem; + padding: 0.3rem; + margin-bottom: 0.5rem; + min-width: 15rem; + text-align: center; + border: 1px solid #9cf; + color: #3b3e40; + font-family: "DM Sans", "sans-serif"; + font-size: 11px; + letter-spacing: 0.1rem; + font-weight: normal; + height: 2rem !important; + } + + .detail_class_submenu:hover:active, + .detail_class_submenu:hover { + background-color: #107758; + color: white; + } + + .detail_class_submenu:focus { + //border: 3px dotted green; + background-color: #107758; + color: white; + } + + .detail_class_submenu_data { + width: 100%; + min-height: 10rem; + background-color: #d8edfc; + padding-left: 5px; + text-align: left; + padding: 0; + border: 0px; + color: #3b3e40; + padding-left: 5px; + font-family: "DM Sans", "sans-serif"; + font-size: small; + border-radius: 10px; + border: 1px solid; + } + + .disabled_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 90% !important; + height: 3.5rem !important; + margin: 5px !important; + //border: none !important; + border-radius: 5px; + background: white; + border: solid gainsboro 1px; + } + + .training_caract { + width: 30%; + padding: 5px; + float: left; + } + + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input .Mui-disabled { + font-family: 'DM Sans', 'Sans-serif'; + font: inherit; + letter-spacing: inherit; + color: currentColor; + border: 0; + box-sizing: content-box; + background: none; + background-color: rgba(0, 0, 0, 0); + margin: 0; + -webkit-tap-highlight-color: transparent; + display: block; + min-width: 0; + width: 100%; + -webkit-animation-name: mui-auto-fill-cancel; + animation-name: mui-auto-fill-cancel; + -webkit-animation-duration: 10ms; + animation-duration: 10ms; + height: 3rem !important; + padding: 0 !important; + padding-left: 5x !important; + } + + .css-11u53oe-MuiSelect-select-MuiInputBase-input-MuiOutlinedInput-input { + padding: 1px !important; + } + + .selectsession { + width: 90%; + height: 3rem; + font-size: small; + border-radius: 0px !important; + } + + .session_data { + float: left; + width: 100%; + box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5); + border-radius: 10px; + margin-top: 10px; + margin-bottom: 10px; + + + } + + .session_caract { + font-family: DM Sans; + width: 33%; + padding: 5px; + float: left; + text-align: left; + font-size: small; + } + + .session_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 100% !important; + height: 2rem !important; + margin: 5px !important; + } + + .css-1x5jdm { + padding: 5px; + } + + .bton_envoyer { + border-radius: 5px; + font-size: small; + padding: 0.3rem; + width: 60%; + background: #81BC3A; + + } + + + .bton_fermer { + border-radius: 5px; + font-size: small; + padding: 0.3rem; + width: 60%; + background-color: white; + color: #107758 !important; + } + + .css-1x5jdmq { + padding: 6px !important; + padding-bottom: 0px !important; + } + + .css-qiwgdb { + padding: 6px !important; + } + + .preview_certif { + display: block; + width: 90%; + height: 180px; + border-radius: 1rem !important; + margin-top: 1rem !important; + } + + .preview_certif:hover { + transform: scale(1.3); + margin-left: 5rem; + } + + .hr_break { + border: 3px solid grey; + } + + .icon_plus { + width: 8%; + } + + .bton_add_session { + background: #c8cfd5; + color: black; + width: 40%; + height: 2rem !important; + } + + .bton_import_excel { + background: #c8cfd5; + color: black; + width: 50% !important; + height: 2rem !important; + } + + .div_row_gauche_etendu { + width: 80%; + } + + .icon_excel { + width: 6%; + } + + + .bton_suppr { + background: transparent; + color: red; + border-radius: 5rem; + font-size: small; + text-align: center; + height: 2.5rem; + width: 65%; + margin-left: 10px; + margin-right: 10px; + } + + .bton_enreg { + font-family: DM sans; + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: center; + height: 2.5rem; + width: 65%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_create_login { + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: center; + height: 2.5rem; + width: 90%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + + .bton_edit { + border-radius: 5rem; + font-size: small; + background: black !important; + text-align: right; + height: 2.5rem; + width: 65%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_annule { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 65%; + color: black; + margin-left: 10px; + margin-right: 10px; + } + + + .div_row_gauche_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + } + + .div_row_droite_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + font-family: "DM Sans", "sans-serif"; + font-size: small; + padding-left: 0.2rem; + } + + .tips_img_class { + font-size: small; + font-style: italic; + margin-left: 1rem !important; + text-align: left; + float: left; + width: 100%; + } + + .img_class_logo { + display: block; + width: 168px; + height: 168px; + border-radius: 10px !important; + border: 1px solid #d5d8dc; + float: left; + } + + .bton_supprime_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + background: white; + color: red; + margin-top: 0.5rem; + width: 15rem; + cursor: pointer; + } + + .bton_supprime_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .bton_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + width: 15rem; + cursor: pointer; + } + + .bton_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .tick_ok_ko { + max-width: 3%; + cursor: pointer; + padding-top: 4px; + } + + .texte_area { + float: left; + width: 47% !important; + font-size: x-small !important; + font-family: "DM Sans", "sans-serif"; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 1.5rem !important; + } + + .texte_area_filter { + float: left; + width: 40% !important; + font-size: x-small !important; + font-family: "DM Sans", "sans-serif"; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + } + + .texte_area_filter_value { + float: left !important; + width: 40% !important; + font-size: x-small !important; + font-family: "DM Sans", "sans-serif"; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + + } + + + .filter_bton_add { + float: left; + width: 5% !important; + font-size: xx-large !important; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + text-align: right; + cursor: pointer; + } + + + .titre1 { + font-family: "DM Sans", "sans-serif"; + font-size: medium; + text-align: center; + margin-bottom: 0.8rem; + color: white; + cursor: default; + font-style: italic; + background-color: gray; + font-weight: normal; + } + + .div_row_list_pj { + width: 30%; + border-left: 3mm ridge rgba(211, 220, 50, .6); + float: left; + } + + .block_competence { + width: 50%; + float: left; + margin-bottom: 1.5rem; + } + + .block_login_pwd { + padding-left: 5px; + width: 33%; + float: left; + + } + + .block_en_mass { + padding: 10px; + width: 50%; + float: left; + margin-bottom: 1rem; + margin-top: 15px; + margin-left: 0px; + } + + .block_en_mass_select { + width: 45%; + float: left; + margin-bottom: 1rem; + } + + .block_en_mass_bton_action { + width: 45%; + float: left; + margin-bottom: 1rem; + padding-top: 0.5rem !important; + } + + .mode_affichage { + width: 12%; + float: right; + cursor: pointer; + + } + } + + @media only screen and (min-width: 1200px) { + .okUpdateData { + font-size: small; + color: green; + font-style: italic; + } + + .koUpdateData { + font-size: small; + color: red; + font-style: italic; + } + + .div_row { + float: left; + //border: 1px solid #d5d8dc; + border-width: 0.01rem; + width: 100%; + //margin-bottom: 1rem; + border-radius: 1rem; + } + + .div_row_gauche { + float: left; + // border:1px solid black; + // border-width:0.01rem; + width: 45%; + border-radius: 1rem; + } + + .div_row_droite { + float: right; + //border:1px solid black; + //border-width:0.01rem; + width: 45%; + border-radius: 1rem; + text-align: right; + } + + .selectsession { + width: 90%; + height: 3rem; + font-size: small; + border-radius: 0px !important; + } + + .titre1_aide_finance { + margin-top: 1rem; + font-family: "DM Sans", "sans-serif"; + font-size: medium; + text-align: center; + margin-bottom: 0.8rem; + color: white; + cursor: pointer; + font-style: italic; + background-color: gray; + font-weight: normal; + } + + .pieddepage { + z-index: 50; + width: 100%; + float: left; + margin-top: 12rem; + } + + .div_mobile { + position: absolute; + top: 8rem; + z-index: 1; + width: 100%; + } + + .zone_data { + width: 95%; + margin-left: auto; + margin-right: auto; + } + + .detail_class_submenu { + background: #d8edfc; + border-radius: 15px; + margin-right: 1rem; + padding: 0.3rem; + margin-bottom: 0.5rem; + min-width: 15rem; + text-align: center; + border: 1px solid #9cf; + color: #3b3e40; + font-family: "DM Sans", "sans-serif"; + font-size: 11px; + letter-spacing: 0.1rem; + font-weight: normal; + height: 2rem !important; + } + + .detail_class_submenu:hover:active, + .detail_class_submenu:hover { + background-color: #107758; + color: white; + } + + .detail_class_submenu:focus { + //border: 3px dotted green; + background-color: #107758; + color: white; + } + + .detail_class_submenu_data { + width: 100%; + min-height: 10rem; + background-color: #d8edfc; + padding-left: 5px; + text-align: left; + padding: 0; + border: 0px; + color: #3b3e40; + padding-left: 5px; + font-family: "DM Sans", "sans-serif"; + font-size: small; + border-radius: 10px; + border: 1px solid; + } + + .disabled_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 90% !important; + height: 3.5rem !important; + margin: 5px !important; + //border: none !important; + border-radius: 5px; + background: white; + border: solid gainsboro 1px; + } + + .training_caract { + width: 30%; + padding: 5px; + float: left; + } + + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input .Mui-disabled { + font-family: 'DM Sans', 'Sans-serif'; + font: inherit; + letter-spacing: inherit; + color: currentColor; + border: 0; + box-sizing: content-box; + background: none; + background-color: rgba(0, 0, 0, 0); + margin: 0; + -webkit-tap-highlight-color: transparent; + display: block; + min-width: 0; + width: 100%; + -webkit-animation-name: mui-auto-fill-cancel; + animation-name: mui-auto-fill-cancel; + -webkit-animation-duration: 10ms; + animation-duration: 10ms; + height: 3rem !important; + padding: 0 !important; + padding-left: 5px !important; + } + + + + .selectsession { + width: 90%; + height: 3rem; + font-size: small; + border-radius: 0px !important; + } + + .session_data { + float: left; + width: 100%; + box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5); + border-radius: 10px; + margin-top: 10px; + margin-bottom: 10px; + + + } + + .session_caract { + font-family: DM Sans; + width: 33%; + padding: 5px; + float: left; + text-align: left; + font-size: small; + } + + .session_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 100% !important; + height: 2rem !important; + margin: 5px !important; + } + + .preview_certif { + display: block; + width: 90%; + height: 200px; + border-radius: 1rem !important; + margin-top: 1rem !important; + } + + .preview_certif:hover { + transform: scale(1.4); + margin-left: 10rem; + } + + + .action_mass { + border-radius: 5px; + font-size: small; + padding: 0.3rem; + width: 40%; + background: #81BC3A; + height: 2.5rem; + } + + + + .block_en_mass { + padding: 10px; + width: 50%; + float: left; + margin-bottom: 1rem; + } + + .session_open_close { + cursor: pointer; + text-align: right; + font-size: small; + margin-right: 10px; + } + + .hr_break { + border: 5px solid grey; + } + + .icon_plus { + width: 8%; + } + + .bton_add_session { + background: #c8cfd5; + color: black; + width: 25% !important; + height: 2rem !important; + } + + .bton_import_excel { + background: #c8cfd5; + color: black; + width: 40% !important; + height: 2rem !important; + } + + .div_row_gauche_etendu { + width: 80%; + } + + .icon_excel { + width: 4%; + } + + .bton_envoyer { + border-radius: 5px; + font-size: small; + padding: 0.3rem; + width: 60%; + background: #81BC3A; + } + + + .bton_traiter_en_mass { + border-radius: 5px; + font-size: small; + padding: 0.3rem; + width: 40%; + background: #81BC3A; + margin-left: 5%; + height: 2.5rem; + color: white; + + } + + .bton_fermer { + border-radius: 5px; + font-size: small; + padding: 0.3rem; + width: 60%; + background-color: white; + color: #107758 !important; + } + + + .enable_style { + background-color: #FFFFFF; + } + + + + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input:invalid { + padding-top: 5px !important; + padding-bottom: 5px !important; + padding-left: 5px !important; + } + + .css-1t10bd6-MuiFormControl-root-MuiTextField-root fieldset { + border-color: transparent !important; + border-radius: 20px !important; + } + + .bton_emarge { + border-radius: 5rem; + height: 2rem !important; + font-size: 11px; + padding: 0.5rem; + background: rgb(129, 188, 58); + margin-left: 5px; + margin-right: 5px; + } + + .css-1x5jdm { + padding: 5px; + } + + + .css-1x5jdmq { + padding: 6px !important; + height: 3rem ! important; + padding-bottom: 0px !important; + } + + .css-qiwgdb { + padding: 6px !important; + } + + + .bton_suppr { + background: transparent; + color: red; + border-radius: 5rem; + font-size: small; + text-align: center; + height: 2.5rem; + width: 40%; + margin-left: 10px; + margin-right: 10px; + } + + .bton_enreg { + font-family: DM sans; + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: center; + height: 2.5rem; + width: 40%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_create_login { + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: center; + height: 2.5rem; + width: 90%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_edit { + border-radius: 5rem; + font-size: small; + background: black !important; + text-align: right; + height: 2.5rem; + width: 40%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_annule { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 40%; + color: black; + margin-left: 10px; + margin-right: 10px; + } + + + + .div_row_gauche_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + } + + .div_row_droite_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + font-family: "DM Sans", "sans-serif"; + font-size: small; + padding-left: 0.2rem; + } + + .tips_img_class { + font-size: small; + font-style: italic; + margin-left: 1rem !important; + text-align: left; + float: left; + width: 100%; + } + + .img_class_logo { + display: block; + width: 170px; + height: 168px; + border-radius: 10px !important; + border: 1px solid #d5d8dc; + float: left; + } + + .bton_supprime_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + background: white; + color: red; + margin-top: 0.5rem; + width: 15rem; + cursor: pointer; + } + + .bton_supprime_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .bton_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + width: 15rem; + cursor: pointer; + } + + .bton_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .tick_ok_ko { + max-width: 3%; + cursor: pointer; + padding-top: 4px; + } + + .texte_area { + float: left; + width: 47% !important; + font-size: x-small !important; + font-family: "DM Sans", "sans-serif"; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 1.5rem !important; + } + + .texte_area_filter { + float: left; + width: 40% !important; + font-size: x-small !important; + font-family: "DM Sans", "sans-serif"; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + } + + .texte_area_filter_value { + float: left !important; + width: 40% !important; + font-size: x-small !important; + font-family: "DM Sans", "sans-serif"; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + + } + + + .filter_bton_add { + float: left; + width: 5% !important; + font-size: xx-large !important; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + text-align: right; + cursor: pointer; + } + + + .titre1 { + font-family: "DM Sans", "sans-serif"; + font-size: medium; + text-align: center; + margin-bottom: 0.8rem; + color: white; + cursor: default; + font-style: italic; + background-color: gray; + font-weight: normal; + } + + .file_ariane { + font-size: large; + font-weight: 600; + width: 100%; + text-align: center; + } + + .div_row_list_pj { + width: 30%; + border-left: 3mm ridge rgba(211, 220, 50, .6); + float: left; + } + + .block_competence { + width: 30%; + float: left; + margin-bottom: 1rem; + } + + .detail_activite { + display: inline-block; + color: black; + border: none; + background: white; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + cursor: pointer; + vertical-align: middle; + padding: 5px; + text-align: left; + width: 20rem; + border-radius: 10px !important; + height: 7rem !important; + font-size: small; + padding-bottom: 10px; + } + + .detail_activite:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + + .block_login_pwd { + padding-left: 5px; + width: 33%; + float: left; + + } + + .block_en_mass { + padding: 10px; + width: 50%; + float: left; + margin-bottom: 1rem; + margin-top: 15px; + margin-left: 0px; + } + + .block_en_mass_select { + width: 45%; + float: left; + margin-bottom: 1rem; + } + + .block_en_mass_bton_action { + width: 45%; + float: left; + margin-bottom: 1rem; + padding-top: 0.5rem !important; + } + + + + .css-zw3mfo-MuiModal-root-MuiDialog-root { + position: absolute; + z-index: 3300; + right: 0; + bottom: 0; + top: 0; + left: 0; + } + + .mode_affichage { + width: 8%; + float: right; + cursor: pointer; + + } + } + + // end media + + + .separator { + display: flex; + align-items: center; + text-align: center; + margin-bottom: 0.5rem !important; + } + + .separator::before { + content: ''; + flex: 1; + border-top: 4px double #999; + } + + + .separator::after { + content: ''; + flex: 1; + border-top: 4px double #999; + } + + .separator:not(:empty)::before { + margin-right: .35em; + } + + .separator:not(:empty)::after { + margin-left: .35em; + } + + + .separator_label { + width: 10rem; + float: left; + font-family: 'DM Sans'; + color: blue; + font-weight: 600; + font-size: 14px; + background: #d5d8dc; + text-align: center; + border: none; + } + + .session_caract_Dialog_comment_2_lines { + + width: 100%; + padding: 5px; + float: left; + text-align: left; + font-size: small; + margin-bottom: 1rem !important; + } + + + + + .datagridclass { + font-size: small !important; + padding: 5px !important; + font-family: 'DM Sans'; + } + + .MuiDataGrid-cellContent { + padding-top: 0.5rem !important; + } + + .bton_action1 { + border-radius: 5rem; + font-size: small; + background: #81BC3A; + text-align: center; + width: 80%; + color: white; + font-size: 11px; + height: 1.5rem; + } + + .session_caract_Dialog { + font-family: 'DM Sans'; + width: 100%; + padding: 5px; + float: left; + text-align: left; + font-size: small; + margin-bottom: 1rem !important; + } + + .bton_enreg_dialog { + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: center; + height: 2.5rem; + width: 80%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + + .bton_annule_dialog { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 80%; + color: black; + margin-left: 10px; + margin-right: 10px; + } + + .css-1v4ccyo { + height: 3.5rem !important; + font-size: small; + } + + + option { + font-weight: normal; + display: block; + white-space-collapse: collapse; + text-wrap: nowrap; + padding: 0px !important; + } + + .mysy_hr_text { + border: none; + border-top: 3px double #333; + color: #333; + overflow: visible; + text-align: center; + height: 5px; + } + + .mysy_hr_text:after { + background: #fff; + content: 'Détails'; + padding: 0 4px; + position: relative; + top: -13px; + } + + .MuiMenu-paper { + max-width: 30% !important; + } + + .show_pwd_div { + width: 50%; + float: right; + padding-right: 10px; + text-align: right; + + } + + .MuiModal-root { + position: absolute !important; + } + +} + +.MuiMenu-paper { + max-width: 30% !important; +} + +.tox-statusbar { + display: none !important; +} + + + + +.css-1x5jdmq { + height: 3rem !important; + font-size: small; +} + +.select_option_css { + border-radius: 0px !important; +} + +.css-9ddj71-MuiInputBase-root-MuiOutlinedInput-root { + font-family: "DM Sans" !important; + height: 3.5rem !important; +} + + + +.react-datepicker__input-container { + width: 110%; +} + + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; + padding-left: 5px !important; +} \ No newline at end of file diff --git a/src/styles/components/_contactpartnerclient.scss b/src/styles/components/_contactpartnerclient.scss index 34a7436..849f1aa 100644 --- a/src/styles/components/_contactpartnerclient.scss +++ b/src/styles/components/_contactpartnerclient.scss @@ -99,7 +99,9 @@ padding-left: 5px; } - .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } diff --git a/src/styles/components/_crm_opportunite.scss b/src/styles/components/_crm_opportunite.scss index 0c1da0d..8d60a46 100644 --- a/src/styles/components/_crm_opportunite.scss +++ b/src/styles/components/_crm_opportunite.scss @@ -2293,6 +2293,8 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_dashbord_formation.scss b/src/styles/components/_dashbord_formation.scss index 26ed1aa..d9a8b8b 100644 --- a/src/styles/components/_dashbord_formation.scss +++ b/src/styles/components/_dashbord_formation.scss @@ -2668,6 +2668,8 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_dashbord_session.scss b/src/styles/components/_dashbord_session.scss index a16f3fa..fc12289 100644 --- a/src/styles/components/_dashbord_session.scss +++ b/src/styles/components/_dashbord_session.scss @@ -2671,6 +2671,8 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_displayPartnerunite_enseignement.scss b/src/styles/components/_displayPartnerunite_enseignement.scss index 4252195..6757aa0 100644 --- a/src/styles/components/_displayPartnerunite_enseignement.scss +++ b/src/styles/components/_displayPartnerunite_enseignement.scss @@ -2930,7 +2930,7 @@ } .css-9ddj71-MuiInputBase-root-MuiOutlinedInput-root { - font-family: DM Sans !important; + font-family: "DM Sans" !important; height: 3.5rem !important; } @@ -2940,6 +2940,8 @@ width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_displaypartnersession.scss b/src/styles/components/_displaypartnersession.scss index b170b53..7b68f10 100644 --- a/src/styles/components/_displaypartnersession.scss +++ b/src/styles/components/_displaypartnersession.scss @@ -3105,7 +3105,7 @@ } .css-9ddj71-MuiInputBase-root-MuiOutlinedInput-root { - font-family: DM Sans !important; + font-family: "DM Sans" !important; height: 3.5rem !important; } @@ -3115,7 +3115,9 @@ width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } diff --git a/src/styles/components/_displaypartnerstagiaire.scss b/src/styles/components/_displaypartnerstagiaire.scss index 1140eb1..654d4b4 100644 --- a/src/styles/components/_displaypartnerstagiaire.scss +++ b/src/styles/components/_displaypartnerstagiaire.scss @@ -2474,7 +2474,7 @@ } .css-9ddj71-MuiInputBase-root-MuiOutlinedInput-root { - font-family: DM Sans !important; + font-family: "DM Sans" !important; height: 3.5rem !important; } @@ -2484,6 +2484,8 @@ width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_emarge_qr_code.scss b/src/styles/components/_emarge_qr_code.scss index 419d26c..2cfe8f1 100644 --- a/src/styles/components/_emarge_qr_code.scss +++ b/src/styles/components/_emarge_qr_code.scss @@ -2750,7 +2750,9 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; padding-right: 1rem !important; } \ No newline at end of file diff --git a/src/styles/components/_employes.scss b/src/styles/components/_employes.scss index 96d654f..e3abe95 100644 --- a/src/styles/components/_employes.scss +++ b/src/styles/components/_employes.scss @@ -2592,7 +2592,7 @@ } .css-9ddj71-MuiInputBase-root-MuiOutlinedInput-root { - font-family: DM Sans !important; + font-family: "DM Sans" !important; height: 3.5rem !important; } @@ -2602,6 +2602,8 @@ width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_equipe_team.scss b/src/styles/components/_equipe_team.scss index 2fe25c9..7f5542c 100644 --- a/src/styles/components/_equipe_team.scss +++ b/src/styles/components/_equipe_team.scss @@ -2538,7 +2538,7 @@ } .css-9ddj71-MuiInputBase-root-MuiOutlinedInput-root { - font-family: DM Sans !important; + font-family: "DM Sans" !important; height: 3.5rem !important; } @@ -2548,6 +2548,8 @@ width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_esign.scss b/src/styles/components/_esign.scss index cbd0f2d..66900ec 100644 --- a/src/styles/components/_esign.scss +++ b/src/styles/components/_esign.scss @@ -2752,7 +2752,9 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; padding-right: 1rem !important; } \ No newline at end of file diff --git a/src/styles/components/_gestionadministrative.scss b/src/styles/components/_gestionadministrative.scss index 2afc3f2..952499a 100644 --- a/src/styles/components/_gestionadministrative.scss +++ b/src/styles/components/_gestionadministrative.scss @@ -1725,7 +1725,9 @@ padding-bottom: 5px !important; } - .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; font: inherit; letter-spacing: inherit; color: currentColor; @@ -1921,7 +1923,9 @@ padding: 0 !important; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; font: inherit; letter-spacing: inherit; color: currentColor; diff --git a/src/styles/components/_groupe_apprenant.scss b/src/styles/components/_groupe_apprenant.scss index c9fb087..b33d605 100644 --- a/src/styles/components/_groupe_apprenant.scss +++ b/src/styles/components/_groupe_apprenant.scss @@ -2548,6 +2548,8 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_groupe_apprenant_dialog.scss b/src/styles/components/_groupe_apprenant_dialog.scss index cc9656e..ff25e60 100644 --- a/src/styles/components/_groupe_apprenant_dialog.scss +++ b/src/styles/components/_groupe_apprenant_dialog.scss @@ -2887,7 +2887,9 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } diff --git a/src/styles/components/_inscription.scss b/src/styles/components/_inscription.scss index a28d578..11a9f1a 100644 --- a/src/styles/components/_inscription.scss +++ b/src/styles/components/_inscription.scss @@ -61,7 +61,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: normal; + cursor: default; font-style: italic; background-color: #043a32; font-weight: normal; @@ -257,7 +257,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: normal; + cursor: default; font-style: italic; background-color: #043a32; font-weight: normal; @@ -459,7 +459,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: normal; + cursor: default; font-style: italic; background-color: #043a32; font-weight: normal; @@ -659,7 +659,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: normal; + cursor: default; font-style: italic; background-color: #043a32; font-weight: normal; diff --git a/src/styles/components/_intranet_factures_client.scss b/src/styles/components/_intranet_factures_client.scss index cedacab..f9c44e5 100644 --- a/src/styles/components/_intranet_factures_client.scss +++ b/src/styles/components/_intranet_factures_client.scss @@ -2487,6 +2487,8 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_intranet_mes_stagiaires.scss b/src/styles/components/_intranet_mes_stagiaires.scss index 2e04e8b..16a5bc0 100644 --- a/src/styles/components/_intranet_mes_stagiaires.scss +++ b/src/styles/components/_intranet_mes_stagiaires.scss @@ -2472,6 +2472,8 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_intranet_tous_documents.scss b/src/styles/components/_intranet_tous_documents.scss index 44bd7ca..a082c70 100644 --- a/src/styles/components/_intranet_tous_documents.scss +++ b/src/styles/components/_intranet_tous_documents.scss @@ -2485,6 +2485,8 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_jurys.scss b/src/styles/components/_jurys.scss index 9d5507b..c0971bd 100644 --- a/src/styles/components/_jurys.scss +++ b/src/styles/components/_jurys.scss @@ -20,7 +20,7 @@ z-index: 9999; } - .Mui-disabled { + .Mui-disabled { font-family: 'DM Sans', 'Sans-serif'; font-size: small !important; padding: 0px !important; @@ -123,7 +123,7 @@ border: 1px solid #9cf; color: #3b3e40; font-family: "DM Sans", "sans-serif"; - font-size: small; + font-size: 11px; letter-spacing: 0.1rem; font-weight: normal; width: 100%; @@ -706,7 +706,7 @@ border: 1px solid #9cf; color: #3b3e40; font-family: "DM Sans", "sans-serif"; - font-size: small; + font-size: 11px; letter-spacing: 0.1rem; font-weight: normal; height: 2rem !important; @@ -1346,7 +1346,7 @@ border: 1px solid #9cf; color: #3b3e40; font-family: "DM Sans", "sans-serif"; - font-size: small; + font-size: 11px; letter-spacing: 0.1rem; font-weight: normal; height: 2rem !important; @@ -1734,7 +1734,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: normal; + cursor: default; font-style: italic; background-color: gray; font-weight: normal; @@ -1879,7 +1879,7 @@ border: 1px solid #9cf; color: #3b3e40; font-family: "DM Sans", "sans-serif"; - font-size: small; + font-size: 11px; letter-spacing: 0.1rem; font-weight: normal; height: 2rem !important; @@ -2332,7 +2332,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: normal; + cursor: default; font-style: italic; background-color: gray; font-weight: normal; @@ -2610,7 +2610,7 @@ } .css-9ddj71-MuiInputBase-root-MuiOutlinedInput-root { - font-family: DM Sans !important; + font-family: "DM Sans" !important; height: 3.5rem !important; } @@ -2620,6 +2620,8 @@ width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_materiel_salle.scss b/src/styles/components/_materiel_salle.scss index d258cc2..0045e3f 100644 --- a/src/styles/components/_materiel_salle.scss +++ b/src/styles/components/_materiel_salle.scss @@ -2298,6 +2298,8 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_materiels.scss b/src/styles/components/_materiels.scss index a51b991..56f0b9c 100644 --- a/src/styles/components/_materiels.scss +++ b/src/styles/components/_materiels.scss @@ -1762,7 +1762,7 @@ } .disabled_style { - font-family: DM Sans !important; + font-family: "DM Sans" !important; //background-color: #ECEFF1; font-size: small !important; color: black; @@ -1782,7 +1782,7 @@ } .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input .Mui-disabled { - font-family: DM Sans !important; + font-family: "DM Sans" !important; font: inherit; letter-spacing: inherit; color: currentColor; @@ -2262,7 +2262,9 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; font-family: DM Sans; } \ No newline at end of file diff --git a/src/styles/components/_module_absence.scss b/src/styles/components/_module_absence.scss index 10bc3d0..f4e34fa 100644 --- a/src/styles/components/_module_absence.scss +++ b/src/styles/components/_module_absence.scss @@ -2634,7 +2634,9 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; padding-right: 1rem !important; } \ No newline at end of file diff --git a/src/styles/components/_module_agenda.scss b/src/styles/components/_module_agenda.scss index 0e00574..7347c15 100644 --- a/src/styles/components/_module_agenda.scss +++ b/src/styles/components/_module_agenda.scss @@ -2640,7 +2640,7 @@ } .css-9ddj71-MuiInputBase-root-MuiOutlinedInput-root { - font-family: DM Sans !important; + font-family: "DM Sans" !important; height: 3.5rem !important; font-size: small !important; @@ -2651,7 +2651,9 @@ width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; padding-right: 1rem !important; } \ No newline at end of file diff --git a/src/styles/components/_module_alert_confirmation.scss b/src/styles/components/_module_alert_confirmation.scss index b069e2f..fab56d3 100644 --- a/src/styles/components/_module_alert_confirmation.scss +++ b/src/styles/components/_module_alert_confirmation.scss @@ -3286,7 +3286,9 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } diff --git a/src/styles/components/_module_attestation_formation.scss b/src/styles/components/_module_attestation_formation.scss index 7dd44d4..de692c9 100644 --- a/src/styles/components/_module_attestation_formation.scss +++ b/src/styles/components/_module_attestation_formation.scss @@ -2647,7 +2647,9 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; padding-right: 1rem !important; } \ No newline at end of file diff --git a/src/styles/components/_module_editique.scss b/src/styles/components/_module_editique.scss index 4fa1e87..08a4134 100644 --- a/src/styles/components/_module_editique.scss +++ b/src/styles/components/_module_editique.scss @@ -2652,7 +2652,9 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; padding-right: 1rem !important; } \ No newline at end of file diff --git a/src/styles/components/_module_email_management.scss b/src/styles/components/_module_email_management.scss index 89cc4e2..5b0132a 100644 --- a/src/styles/components/_module_email_management.scss +++ b/src/styles/components/_module_email_management.scss @@ -1829,7 +1829,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: normal; + cursor: default; font-style: italic; background-color: gray; font-weight: normal; @@ -2477,7 +2477,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: normal; + cursor: default; font-style: italic; background-color: gray; font-weight: normal; @@ -2716,7 +2716,9 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; padding-right: 1rem !important; } diff --git a/src/styles/components/_module_ent_mes_documents.scss b/src/styles/components/_module_ent_mes_documents.scss index 5a0beea..438aa71 100644 --- a/src/styles/components/_module_ent_mes_documents.scss +++ b/src/styles/components/_module_ent_mes_documents.scss @@ -2538,7 +2538,7 @@ } .css-9ddj71-MuiInputBase-root-MuiOutlinedInput-root { - font-family: DM Sans !important; + font-family: "DM Sans" !important; height: 3.5rem !important; } @@ -2548,6 +2548,8 @@ width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_module_ent_mes_formations.scss b/src/styles/components/_module_ent_mes_formations.scss index 4f846d3..d5b08bd 100644 --- a/src/styles/components/_module_ent_mes_formations.scss +++ b/src/styles/components/_module_ent_mes_formations.scss @@ -2790,7 +2790,7 @@ } .css-9ddj71-MuiInputBase-root-MuiOutlinedInput-root { - font-family: DM Sans !important; + font-family: "DM Sans" !important; height: 3.5rem !important; } @@ -2800,6 +2800,8 @@ width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_module_ent_mes_notes.scss b/src/styles/components/_module_ent_mes_notes.scss index 6dff438..0e612cc 100644 --- a/src/styles/components/_module_ent_mes_notes.scss +++ b/src/styles/components/_module_ent_mes_notes.scss @@ -2538,7 +2538,7 @@ } .css-9ddj71-MuiInputBase-root-MuiOutlinedInput-root { - font-family: DM Sans !important; + font-family: "DM Sans" !important; height: 3.5rem !important; } @@ -2548,6 +2548,8 @@ width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_module_ent_mon_planning.scss b/src/styles/components/_module_ent_mon_planning.scss index 23a0a60..e58e513 100644 --- a/src/styles/components/_module_ent_mon_planning.scss +++ b/src/styles/components/_module_ent_mon_planning.scss @@ -2538,7 +2538,7 @@ } .css-9ddj71-MuiInputBase-root-MuiOutlinedInput-root { - font-family: DM Sans !important; + font-family: "DM Sans" !important; height: 3.5rem !important; } @@ -2548,6 +2548,8 @@ width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_module_evaluation_positionnement.scss b/src/styles/components/_module_evaluation_positionnement.scss index 962a2d8..2530c5c 100644 --- a/src/styles/components/_module_evaluation_positionnement.scss +++ b/src/styles/components/_module_evaluation_positionnement.scss @@ -2647,7 +2647,9 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; padding-right: 1rem !important; } \ No newline at end of file diff --git a/src/styles/components/_module_historique_action.scss b/src/styles/components/_module_historique_action.scss index e05204a..b7aa802 100644 --- a/src/styles/components/_module_historique_action.scss +++ b/src/styles/components/_module_historique_action.scss @@ -2297,6 +2297,8 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_module_jury_selection_apprenants.scss b/src/styles/components/_module_jury_selection_apprenants.scss index ddc6bcb..2ca504c 100644 --- a/src/styles/components/_module_jury_selection_apprenants.scss +++ b/src/styles/components/_module_jury_selection_apprenants.scss @@ -2846,7 +2846,9 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } diff --git a/src/styles/components/_module_session_note_classement.scss b/src/styles/components/_module_session_note_classement.scss index e70a80e..cc0b44e 100644 --- a/src/styles/components/_module_session_note_classement.scss +++ b/src/styles/components/_module_session_note_classement.scss @@ -2863,7 +2863,9 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } diff --git a/src/styles/components/_moduleactivite.scss b/src/styles/components/_moduleactivite.scss index 2de64fe..1ebe874 100644 --- a/src/styles/components/_moduleactivite.scss +++ b/src/styles/components/_moduleactivite.scss @@ -2884,7 +2884,9 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } diff --git a/src/styles/components/_moduleia.scss b/src/styles/components/_moduleia.scss index 5dc2d2e..f9f222d 100644 --- a/src/styles/components/_moduleia.scss +++ b/src/styles/components/_moduleia.scss @@ -3290,7 +3290,9 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } diff --git a/src/styles/components/_modules_mes_documents.scss b/src/styles/components/_modules_mes_documents.scss index e4913ce..b1773eb 100644 --- a/src/styles/components/_modules_mes_documents.scss +++ b/src/styles/components/_modules_mes_documents.scss @@ -1671,7 +1671,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: normal; + cursor: default; font-style: italic; background-color: gray; font-weight: normal; @@ -2277,7 +2277,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: normal; + cursor: default; font-style: italic; background-color: gray; font-weight: normal; @@ -2496,6 +2496,8 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_moduleselectionapprenants.scss b/src/styles/components/_moduleselectionapprenants.scss index 0c72166..7cd894f 100644 --- a/src/styles/components/_moduleselectionapprenants.scss +++ b/src/styles/components/_moduleselectionapprenants.scss @@ -2851,7 +2851,9 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } diff --git a/src/styles/components/_moduleselectionevaluationapprenants.scss b/src/styles/components/_moduleselectionevaluationapprenants.scss index fb4d33d..984e881 100644 --- a/src/styles/components/_moduleselectionevaluationapprenants.scss +++ b/src/styles/components/_moduleselectionevaluationapprenants.scss @@ -2846,7 +2846,9 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } diff --git a/src/styles/components/_modulesessionevaluation.scss b/src/styles/components/_modulesessionevaluation.scss index ddbb05e..61e3349 100644 --- a/src/styles/components/_modulesessionevaluation.scss +++ b/src/styles/components/_modulesessionevaluation.scss @@ -2863,7 +2863,9 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } diff --git a/src/styles/components/_modulesessionplanification.scss b/src/styles/components/_modulesessionplanification.scss index 251f264..eec8102 100644 --- a/src/styles/components/_modulesessionplanification.scss +++ b/src/styles/components/_modulesessionplanification.scss @@ -2846,7 +2846,9 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } diff --git a/src/styles/components/_mon_tableau_de_bord.scss b/src/styles/components/_mon_tableau_de_bord.scss index f5ae92f..4187cb2 100644 --- a/src/styles/components/_mon_tableau_de_bord.scss +++ b/src/styles/components/_mon_tableau_de_bord.scss @@ -2741,7 +2741,9 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } diff --git a/src/styles/components/_note_evaluation.scss b/src/styles/components/_note_evaluation.scss index 8df5bde..b5d8e8a 100644 --- a/src/styles/components/_note_evaluation.scss +++ b/src/styles/components/_note_evaluation.scss @@ -2529,6 +2529,8 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_partner.scss b/src/styles/components/_partner.scss index 838af94..dba0c2b 100644 --- a/src/styles/components/_partner.scss +++ b/src/styles/components/_partner.scss @@ -2121,7 +2121,7 @@ background-color: #107758 !important; overflow: hidden !important; box-sizing: unset !important; - font-family: DM Sans !important; + font-family: "DM Sans" !important; } @@ -2160,7 +2160,7 @@ .ps-menuitem-root { box-sizing: unset !important; - font-family: DM Sans !important; + font-family: "DM Sans" !important; } .ps-menu-button { @@ -2169,14 +2169,14 @@ text-transform: uppercase; background-color: #107758 !important; box-sizing: unset !important; - font-family: DM Sans !important; + font-family: "DM Sans" !important; } .tooltip_css { background: #81BC3A; z-index: 9999; - font-family: DM Sans !important; + font-family: "DM Sans" !important; } diff --git a/src/styles/components/_partner_client_activite.scss b/src/styles/components/_partner_client_activite.scss index 3f9bd24..39c6d12 100644 --- a/src/styles/components/_partner_client_activite.scss +++ b/src/styles/components/_partner_client_activite.scss @@ -91,7 +91,9 @@ padding-left: 5px; } - .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } @@ -364,7 +366,9 @@ padding-left: 5px; } - .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } @@ -640,7 +644,9 @@ padding-left: 5px; } - .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } @@ -925,7 +931,9 @@ padding-left: 5px; } - .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } diff --git a/src/styles/components/_partner_commande.scss b/src/styles/components/_partner_commande.scss index bbd6611..b8787c4 100644 --- a/src/styles/components/_partner_commande.scss +++ b/src/styles/components/_partner_commande.scss @@ -2566,6 +2566,8 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_partner_configiguration_formulaires.scss b/src/styles/components/_partner_configiguration_formulaires.scss index b1ff41e..f6bec02 100644 --- a/src/styles/components/_partner_configiguration_formulaires.scss +++ b/src/styles/components/_partner_configiguration_formulaires.scss @@ -2422,6 +2422,8 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_partner_configuration_jours_travail.scss b/src/styles/components/_partner_configuration_jours_travail.scss index f6842be..8100f71 100644 --- a/src/styles/components/_partner_configuration_jours_travail.scss +++ b/src/styles/components/_partner_configuration_jours_travail.scss @@ -2452,6 +2452,8 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_partner_configuration_session_step.scss b/src/styles/components/_partner_configuration_session_step.scss index e018f85..49ad1b6 100644 --- a/src/styles/components/_partner_configuration_session_step.scss +++ b/src/styles/components/_partner_configuration_session_step.scss @@ -2417,6 +2417,8 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_partner_configuration_technique.scss b/src/styles/components/_partner_configuration_technique.scss index 84e367d..35f3e3c 100644 --- a/src/styles/components/_partner_configuration_technique.scss +++ b/src/styles/components/_partner_configuration_technique.scss @@ -2454,7 +2454,7 @@ } .css-9ddj71-MuiInputBase-root-MuiOutlinedInput-root { - font-family: DM Sans !important; + font-family: "DM Sans" !important; height: 3.5rem !important; font-size: small !important; } @@ -2465,6 +2465,8 @@ width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_partner_domaine_categorie_metier.scss b/src/styles/components/_partner_domaine_categorie_metier.scss index 29c6086..c088f96 100644 --- a/src/styles/components/_partner_domaine_categorie_metier.scss +++ b/src/styles/components/_partner_domaine_categorie_metier.scss @@ -2425,6 +2425,8 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_partner_facture.scss b/src/styles/components/_partner_facture.scss index c998f13..84cb7b1 100644 --- a/src/styles/components/_partner_facture.scss +++ b/src/styles/components/_partner_facture.scss @@ -2487,6 +2487,8 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_partner_ftion_initiale_configuration.scss b/src/styles/components/_partner_ftion_initiale_configuration.scss index edf3d3d..4fa8afa 100644 --- a/src/styles/components/_partner_ftion_initiale_configuration.scss +++ b/src/styles/components/_partner_ftion_initiale_configuration.scss @@ -2425,6 +2425,8 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_partner_prix_achat.scss b/src/styles/components/_partner_prix_achat.scss index 0bc6962..b448bdf 100644 --- a/src/styles/components/_partner_prix_achat.scss +++ b/src/styles/components/_partner_prix_achat.scss @@ -2656,6 +2656,8 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_partner_product_service.scss b/src/styles/components/_partner_product_service.scss index 5dbf361..ce54de0 100644 --- a/src/styles/components/_partner_product_service.scss +++ b/src/styles/components/_partner_product_service.scss @@ -2275,6 +2275,8 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_partnerclient.scss b/src/styles/components/_partnerclient.scss index a378057..cbcb0e9 100644 --- a/src/styles/components/_partnerclient.scss +++ b/src/styles/components/_partnerclient.scss @@ -2276,7 +2276,7 @@ } .css-9ddj71-MuiInputBase-root-MuiOutlinedInput-root { - font-family: DM Sans !important; + font-family: "DM Sans" !important; height: 3.5rem !important; } @@ -2286,6 +2286,8 @@ width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_partnerinvoicingdata.scss b/src/styles/components/_partnerinvoicingdata.scss index 19a3ff7..6d1d1ba 100644 --- a/src/styles/components/_partnerinvoicingdata.scss +++ b/src/styles/components/_partnerinvoicingdata.scss @@ -986,7 +986,9 @@ color: #212121 !important; } - .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } } \ No newline at end of file diff --git a/src/styles/components/_surveydocument.scss b/src/styles/components/_surveydocument.scss index 5823a0b..f5695ac 100644 --- a/src/styles/components/_surveydocument.scss +++ b/src/styles/components/_surveydocument.scss @@ -2832,7 +2832,9 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; padding-right: 1rem !important; } \ No newline at end of file diff --git a/src/styles/components/_test_drag_drop.scss b/src/styles/components/_test_drag_drop.scss index 760b916..b93a2a7 100644 --- a/src/styles/components/_test_drag_drop.scss +++ b/src/styles/components/_test_drag_drop.scss @@ -2743,7 +2743,9 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; padding-right: 1rem !important; } \ No newline at end of file diff --git a/src/styles/components/_testurl_new.scss b/src/styles/components/_testurl_new.scss index faeec18..b44129c 100644 --- a/src/styles/components/_testurl_new.scss +++ b/src/styles/components/_testurl_new.scss @@ -2277,6 +2277,8 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file diff --git a/src/styles/components/_updateattendeelist.scss b/src/styles/components/_updateattendeelist.scss index c89ba9a..476e440 100644 --- a/src/styles/components/_updateattendeelist.scss +++ b/src/styles/components/_updateattendeelist.scss @@ -2832,7 +2832,9 @@ font-family: DM Sans !important; width: 110%; } -.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; padding-right: 1rem !important; } \ No newline at end of file diff --git a/src/styles/components/_updateparnterinfo.scss b/src/styles/components/_updateparnterinfo.scss index fa35185..04f1558 100644 --- a/src/styles/components/_updateparnterinfo.scss +++ b/src/styles/components/_updateparnterinfo.scss @@ -1255,7 +1255,9 @@ font-size: small !important; } - .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } diff --git a/src/styles/index.scss b/src/styles/index.scss index 2f85060..e37e278 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -204,6 +204,7 @@ @import "./components/module_ent_mes_notes"; @import "./components/module_ent_mes_documents"; @import "./components/module_ent_mes_formations"; +@import "./components/conseil_classe"; // New Design 2025