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 CheckOut from "./CheckOut";
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 parse from 'html-react-parser';
import { FcViewDetails, FcDisapprove } from "react-icons/fc";
import 'react-tooltip/dist/react-tooltip.css'
import { Tooltip } from 'react-tooltip'
import add_plus from "../mysy_img/plus.png";
import excel_icone from "../mysy_img/excel_icone.png";
import participants from "../mysy_img/participants.png";
import fileDownload from 'js-file-download'
import Popup from 'reactjs-popup';
import 'reactjs-popup/dist/index.css';
import { FcCancel, FcApproval, 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 { 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';
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 { TransitionProps } from '@mui/material/transitions';

const DisplayPartnerStagiaires = (props) => {
    const history = useHistory();
    const [submenu, setsubmenu] = useState("");
    const [rowss, setRows] = useState([]);
    const [selectionModel, setSelectionModel] = React.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_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 filters = [
        { value: 'code_session', label: 'Code Session' },
        { value: 'class_title', label: 'Titre Formation' },
        { value: 'certif', label: 'Certification' }
    ]



    const [datagrid_columns_size_model1, setdatagrid_columns_size_model1] = useState(200);
    const [datagrid_columns_size_model2, setdatagrid_columns_size_model2] = useState(80);

    const columns = [
        { field: '_id', headerName: '_id', hide: true },
        { field: 'session_id', headerName: 'session_id', hide: true },
        { field: 'id', headerName: 'id', hide: true },
        { field: 'class_internal_url', headerName: 'class_internal_url', hide: true },

        { field: 'email', headerName: 'email', width: 150, hideable: false, },
        { field: 'nom', headerName: 'nom', width: 150, hide: false, editable: true },
        { field: 'prenom', headerName: 'prenom', width: 150, hide: false, editable: true },
        { field: 'employeur', headerName: 'Employeur', width: 150, hide: false, editable: true },
        {
            field: 'status', headerName: 'Statut', hide: false, width: datagrid_columns_size_model2,
            valueFormatter: (params) => {
                if (String(params.value) === "0")
                    return "Préinscrit";
                else if (String(params.value) === "1")
                    return "Inscrit";
                else if (String(params.value) === "-1")
                    return "Annulé";
                else if (String(params.value) === "2")
                    return "Encours";
                else
                    return "???";
            },
        },
        { field: 'code_session', headerName: 'Code session', hideable: true, },
        { field: 'title', headerName: 'Formation', width: datagrid_columns_size_model1, align: "center", hideable: true, },
        {
            field: 'distantiel', headerName: 'Distantiel', hideable: false, width: datagrid_columns_size_model2,
            valueFormatter: (params) => {
                if (String(params.value) === "0")
                    return "Non";
                else if (String(params.value) === "1")
                    return "Oui";
                else
                    return "?";
            },
        },
        {
            field: 'presentiel', headerName: 'Presentiel', width: datagrid_columns_size_model2,
            valueFormatter: (params) => {
                if (String(params.value) === "0")
                    return "Non";
                else if (String(params.value) === "1")
                    return "Oui";
                else
                    return "?";
            },

        },
        { field: 'domaine', headerName: 'Domaine', width: datagrid_columns_size_model2, align: "center", hide: true, hideable: true, },
        { field: 'date_debut', headerName: 'Du', width: datagrid_columns_size_model1, hideable: true, },
        { field: 'date_fin', headerName: 'Au', width: datagrid_columns_size_model1, hideable: true, },
       /* {
            field: "Detail", headerName: 'Voir detail',
            renderCell: (cellValues) => {
                return (

                    <Button

                        onClick={(event) => {
                            Display_Detail_Inscription(event, cellValues);
                        }}
                    >
                        <FcViewDetails />

                    </Button>

                );
            }
        },*/
        {
            field: "Imprimer", headerName: 'Imprimer detail',
            renderCell: (cellValues) => {
                return (

                    <Button

                        onClick={(event) => {
                            Print_Detail_Inscription(event, cellValues);
                        }}
                    >
                        <FcPrint />

                    </Button>

                );
            }
        },

    ]

    function clean_all_filters() {
        setp_filtre1();
        setp_filtre1_value();

        setp_filtre2();
        setp_filtre2_value();

        setp_filtre3();
        setp_filtre3_value();

        setp_filtre4();
        setp_filtre4_value();

        setnb_stagiaire_Preinscrit("");
        setnb_stagiaire_Inscrit("");
        setSelectionModel([]);
        setRows([]);
        setRows_insc([]);
        setRows_preinsc([]);

        setsubmenu("");
        Getall_TrainingParticpant_no_filter();
    }

    const myRef = useRef(null)

    const [Getall_TrainingParticipant_api, setGetall_TrainingParticipant_api] = useState();
    const [Getall_TrainingParticipant_message, setGetall_TrainingParticipant_message] = useState();
    const [Getall_TrainingParticipant_result, setGetall_TrainingParticipant_result] = useState();
    function Getall_TrainingParticipant(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);

        //console.log(" ### Getall_TrainingParticipant form = ", form)
        var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Statgaire_List_Partner_with_filter/";



        axios.post(myurl, form).then(res => {

            if (String(res.data.status) === String("true")) {
                //console.log(" In Getall_TrainingParticipant  res.data.status = " + res.data.status);
                //console.log(" In Getall_TrainingParticipant  res.data.message r_class = " + res.data.message);
                setGetall_TrainingParticipant_api("true");
                setGetall_TrainingParticipant_result(res.data.message);
                setRows(res.data.message);
            }
            else {
                setGetall_TrainingParticipant_api("false");
                setGetall_TrainingParticipant_message(res.data.message);
                alert(res.data.message);
            }

        }).catch((error) => {
            console.warn('Not good man :( Getall_TrainingParticipant = ', error);
            setGetall_TrainingParticipant_api("false");
            alert(" Impossible de recuperer la liste des stagiaires")
            //setmyApimyApiMessage("")
        })
    }



    function Getall_TrainingParticpant_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_Statgaire_List_Partner_with_filter/";


        axios.post(myurl, form).then(res => {

            if (String(res.data.status) === String("true")) {
                //console.log(" In Getall_TrainingParticipant  res.data.status = " + res.data.status);
                //console.log(" In Getall_TrainingParticipant  res.data.message r_class = " + res.data.message);
                setGetall_TrainingParticipant_api("true");
                setGetall_TrainingParticipant_result(res.data.message);
                setRows(res.data.message);
            }
            else {
                setGetall_TrainingParticipant_api("false");
                setGetall_TrainingParticipant_message(res.data.message);
            }

        }).catch((error) => {
            console.warn('Not good man :( Getall_TrainingParticipant = ', error);
            setGetall_TrainingParticipant_api("false");
            //setmyApimyApiMessage("")
        })
    }


    const [display_detail_stagiaire, setdisplay_detail_stagiaire] = useState("");

    const [selected_id, setselected_id] = useState("");

    function handleClick_edit_session_From_Line(selected_row_id) {

        var line = JSON.parse(rowss[selected_row_id]);


        var code_session = line.code_session;
        setselected_code_session(line.code_session);


        var session_id = line.session_id;
        setselected_session_id(line.session_id);



        var internal_url = line.class_internal_url;
        setselected_internal_url(line.class_internal_url);

        var participant_email = line.email;
        setselected_participant_email(line.email);

        setselected_class_title(line.title);
        setselected_id(line._id);


        submenu_detail_stagaire();
        setaddOneParticipant();
        setdisplay_detail_stagiaire("1");

        if (myRef.current) {
            myRef.current.scrollIntoView({ behavior: "smooth" });
        }

        GetAttendee_Data(participant_email, session_id, internal_url);

        // Recuperation de l'image de profil
        getStagiaireImages(internal_url, session_id, participant_email);


        // Recuperation des informations de la session
        GetCurrentSession(session_id, internal_url);


    }

    const datagridSx = {
        borderRadius: 2,
        marginRight: 1,
        marginLeft: 1,
        border: 0,
        "& .MuiDataGrid-main": { borderRadius: 0 },
        /*'& div[data-rowIndex][role="row"]:nth-of-type(5n-4)': {
          color: "blue",
          fontSize: 18,
          //risky
          minHeight: "60px !important",
          height: 60,
          "& div": {
            minHeight: "60px !important",
            height: 60,
            lineHeight: "59px !important"
          }
        },*/
        "& .MuiDataGrid-virtualScrollerRenderZone": {
            "& .MuiDataGrid-row": {
                "&:nth-child(2n)": { backgroundColor: "rgba(235, 235, 235, .7)" }
            }
        },
        "& .MuiDataGrid-columnHeaders": {
            backgroundColor: "#c8cfd5",
            color: "black",
            fontSize: 16
        },

    };


    const [selected_session_id, setselected_session_id] = useState();
    const [selected_code_session, setselected_code_session] = useState();
    const [selected_internal_url, setselected_internal_url] = useState();
    const [selected_class_title, setselected_class_title] = useState();
    const [selected_participant_email, setselected_participant_email] = useState();

    const [one_selected_internal_url, setone_selected_internal_url] = useState();

    const BorderLinearProgress = styled(LinearProgress)(() => ({
        height: "20px",
        width: "60px",
        borderRadius: "2px",
        backgroundColor: " #ebf5fb",
        "& .MuiLinearProgress-bar": {
            backgroundColor: "#1bd900",
            transition: "none",
            transformOrigin: "left",
        },
    }));

    const [session_file_name, setsession_file_name] = useState();
    function submenu_import_stagiaire() {
        setsession_file_name();
        setliste_sessions_file_change_api();
        hiddenFileInput_session.current.click();
    }

    const [addOneSession, setaddOneSession] = useState();
    function submenu_add_one_stagiaire() {
        setSelectionModel([]);
        setselected_code_session();
        setaddOneParticipant("1");
        submenu_detail_stagaire();

        if (myRef.current) {
            myRef.current.scrollIntoView({ behavior: "smooth" });
        }

        setdisplay_detail_stagiaire();
        setparticipant_data_changed();
        setparticipant_data_edit_mode();
        disableAttendeeDetailFields();
    }
    function clean_old_messages() {

    }

    const [GetCurrentClass_trainingsession_api, setGetCurrentClass_trainingsession_api] = useState();
    const [GetCurrentClass_trainingsession_message, setGetCurrentClass_trainingsession_message] = useState();
    const [GetCurrentClass_trainingsession_result, setGetCurrentClass_trainingsession_result] = useState();
    function GetCurrentClass_trainingsession(event) {

        var form = new FormData();

        form.append("class_internal_url", selected_internal_url);
        const stored_cookie = getCookie('tokenmysypart');
        form.append("token", stored_cookie);

        var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetAllValideSessionFormation_List/";

        axios.post(myurl, form).then(res => {

            if (String(res.data.status) === String("true")) {
                //console.log(" In GetCurrentClass_trainingsession  res.data.status = " + res.data.status);
                //console.log(" In GetCurrentClass_trainingsession  res.data.message r_class = " + res.data.message);
                setGetCurrentClass_trainingsession_api("true");
                setGetCurrentClass_trainingsession_result(res.data.message);
            }
            else {
                setGetCurrentClass_trainingsession_api("false");
                setGetCurrentClass_trainingsession_message(res.data.message);
            }

        }).catch((error) => {
            console.warn('Not good man :( GetCurrentClass_trainingsession = ', error);
            setGetCurrentClass_trainingsession_api("false");
            //setmyApimyApiMessage("")
        })
    }

    const sleep = (milliseconds) => {
        return new Promise(resolve => setTimeout(resolve, milliseconds))
    }

    const [nb_stagiaire_Preinscrit, setnb_stagiaire_Preinscrit] = useState("0");
    function submenu_inscrit() {
        setsubmenu("inscrit");

        if (document.getElementById("inscrit")) {
            document.getElementById("inscrit").style.backgroundColor = "#104277";
            document.getElementById("inscrit").style.color = "white";
        }

        if (document.getElementById("detail_session")) {
            document.getElementById("detail_session").style.backgroundColor = "#d8edfc";
            document.getElementById("detail_session").style.color = "black";
        }

        if (document.getElementById("preinscrit")) {
            document.getElementById("preinscrit").style.backgroundColor = "#d8edfc";
            document.getElementById("preinscrit").style.color = "black";
        }

    }

    const [print_detail_insc, setprint_detail_insc] = React.useState();
    function Print_Detail_Inscription(event, cellValues) {

        setprint_detail_insc("1");

        var code_session = cellValues.row.code_session;
 
        var session_id = cellValues.row.session_id;

        var internal_url = cellValues.row.class_internal_url;

        var participant_email = cellValues.row.email;



        DownloadAttendeeDetail(session_id, participant_email, internal_url );

    }
    function clearDetailAttendeFields() {

        if (document.getElementsByName("detail_client_rattachement") && document.getElementsByName("detail_client_rattachement")[0])
            document.getElementsByName("detail_client_rattachement")[0].value = "";

        if (document.getElementsByName("detail_session_class") && document.getElementsByName("detail_session_class")[0])
            document.getElementsByName("detail_session_class")[0].value = "";

        if (document.getElementsByName("detail_nom") && document.getElementsByName("detail_nom")[0])
            document.getElementsByName("detail_nom")[0].value = "";

        if (document.getElementsByName("detail_prenom") && document.getElementsByName("detail_prenom")[0])
            document.getElementsByName("detail_prenom")[0].value = "";

        if (document.getElementsByName("detail_prenom") && document.getElementsByName("detail_prenom")[0])
            document.getElementsByName("detail_prenom")[0].value = "";

        if (document.getElementsByName("detail_mail") && document.getElementsByName("detail_mail")[0])
            document.getElementsByName("detail_mail")[0].value = "";

        if (document.getElementsByName("detail_tel") && document.getElementsByName("detail_tel")[0])
            document.getElementsByName("detail_tel")[0].value = "";

        if (document.getElementsByName("detail_adresse") && document.getElementsByName("detail_adresse")[0])
            document.getElementsByName("detail_adresse")[0].value = "";

        if (document.getElementsByName("detail_code_postal") && document.getElementsByName("detail_code_postal")[0])
            document.getElementsByName("detail_code_postal")[0].value = "";

        if (document.getElementsByName("detail_ville") && document.getElementsByName("detail_ville")[0])
            document.getElementsByName("detail_ville")[0].value = "";

        if (document.getElementsByName("detail_pays") && document.getElementsByName("detail_ville")[0])
            document.getElementsByName("detail_pays")[0].value = "";

        if (document.getElementsByName("detail_incr_date") && document.getElementsByName("detail_incr_date")[0])
            document.getElementsByName("detail_incr_date")[0].value = "";

        if (document.getElementsByName("detail_cout") && document.getElementsByName("detail_cout")[0])
            document.getElementsByName("detail_cout")[0].value = "";

        if (document.getElementsByName("detail_mode_fin") && document.getElementsByName("detail_mode_fin")[0])
            document.getElementsByName("detail_mode_fin")[0].value = "";

        if (document.getElementsByName("detail_employeur") && document.getElementsByName("detail_employeur")[0])
            document.getElementsByName("detail_employeur")[0].value = "";

        if (document.getElementsByName("date_evaluation") && document.getElementsByName("date_evaluation")[0])
            document.getElementsByName("date_evaluation")[0].value = "";

        if (document.getElementsByName("note_eval") && document.getElementsByName("note_eval")[0])
            document.getElementsByName("note_eval")[0].value = "";

        if (document.getElementsByName("certif_date") && document.getElementsByName("certif_date")[0])
            document.getElementsByName("certif_date")[0].value = "";

        setp_detail_nom();
        setp_detail_prenom();
        setp_detail_mail();
        setp_detail_tel();
        setp_detail_adresse();
        setp_detail_code_postal();
        setp_detail_ville();
        setp_detail_pays();
        setp_detail_cout();
        setp_detail_mode_fin();
        setp_detail_employeur();
        setp_date_evaluation();
        setp_note_eval();
        setp_detail_session_class();
        setp_detail_status_inscrit();
        setp_detail_status_inscrit_label();
        setp_detail_opco();
        setp_detail_client_rattachement_nom();
        setp_detail_client_rattachement_id();

        setfield_evaluation();
        setdetailuser_date_certification();
        setdetailuser_date_evaluation();
    }


    function clear_one_Attende_Fields() {

        if (document.getElementsByName("one_formation") && document.getElementsByName("one_formation")[0])
            document.getElementsByName("one_formation")[0].value = "";

        if (document.getElementsByName("one_detail_session") && document.getElementsByName("one_detail_session")[0])
            document.getElementsByName("one_detail_session")[0].value = "";

        if (document.getElementsByName("one_nom_part") && document.getElementsByName("one_nom_part")[0])
            document.getElementsByName("one_nom_part")[0].value = "";

        if (document.getElementsByName("one_prenom_part") && document.getElementsByName("one_prenom_part")[0])
            document.getElementsByName("one_prenom_part")[0].value = "";

        if (document.getElementsByName("one_email_part") && document.getElementsByName("one_email_part")[0])
            document.getElementsByName("one_email_part")[0].value = "";

        if (document.getElementsByName("one_phone_part") && document.getElementsByName("one_phone_part")[0])
            document.getElementsByName("one_phone_part")[0].value = "";

        if (document.getElementsByName("one_adresse_part") && document.getElementsByName("one_adresse_part")[0])
            document.getElementsByName("one_adresse_part")[0].value = "";

        if (document.getElementsByName("one_code_postal_part") && document.getElementsByName("one_code_postal_part")[0])
            document.getElementsByName("one_code_postal_part")[0].value = "";

        if (document.getElementsByName("one_ville_part") && document.getElementsByName("one_ville_part")[0])
            document.getElementsByName("one_ville_part")[0].value = "";

        if (document.getElementsByName("one_pays_part") && document.getElementsByName("one_pays_part")[0])
            document.getElementsByName("one_pays_part")[0].value = "";

        if (document.getElementsByName("one_status_part") && document.getElementsByName("one_status_part")[0])
            document.getElementsByName("one_status_part")[0].value = "";

        if (document.getElementsByName("one_detail_client_rattachement") && document.getElementsByName("one_detail_client_rattachement")[0])
            document.getElementsByName("one_detail_client_rattachement")[0].value = "";



        setp_one_detail_session_class("");
        setp_one_nom_part("");
        setp_one_prenom_part("");
        setp_one_email_part("");
        setp_one_phone_part("");
        setp_one_adresse_part("");
        setp_one_ville_part("");
        setp_one_code_postal_part("");
        setp_one_pays_part("");
        setp_one_status_part("");
        setp_one_detail_client_rattachement_nom("");
        setp_one_detail_client_rattachement_id("");
    }


    const [Resend_LMS_Credentials_api, setResend_LMS_Credentials_api] = useState();
    const [Resend_LMS_Credentials_result, setResend_LMS_Credentials_result] = useState();
    const [Resend_LMS_Credentials_message, setResend_LMS_Credentials_message] = useState();
    const Resend_LMS_Credentials = event => {

        clean_old_messages();
        const formData = new FormData();

        const stored_cookie = getCookie('tokenmysypart');

        formData.append("token", stored_cookie);
        formData.append("session_id", selected_session_id);

        var local_mail = ""
        if (document.getElementsByName("detail_mail") && document.getElementsByName("detail_mail")[0])
            local_mail = document.getElementsByName("detail_mail")[0].value;

        var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;

        if (!local_mail.match(validRegex)) {
            alert("L'adresse email est invalide. Impossible de renvoyer les identifiants");
            return;
        }
        formData.append("email", local_mail);
        formData.append("class_internal_url", selected_internal_url);
        //console.log("token = " + stored_cookie);

        fetch(
            process.env.REACT_APP_API_URL + "myclass/api/LMS_Credential_Sending_mail/",
            {
                method: 'POST',
                body: formData,
            }
        )
            .then((response) => response.json())
            .then((result) => {
                if (String(result['status']) === String("true")) {
                    //console.log('Success:', result['message']);
                    setResend_LMS_Credentials_result(result['message']);
                    setResend_LMS_Credentials_api("true");
                    alert(" Les identifiants de connexion ont été correctement envoyés")
                } else if (String(result['status']) === String("Err_Connexion")) {
                    alert('Erreur: ' + result['message']);
                    history.push("/Connexion");
                }

                else {
                    setResend_LMS_Credentials_message(result['message']);
                    setResend_LMS_Credentials_api("false");
                }

            })
            .catch((error) => {
                console.error('Error:', error);
                setResend_LMS_Credentials_api("false");
            });

    };


    const [SessionstartDate, setSessionstartDate] = useState();

    const filterPassedTime_start = (time) => {
        const currentDate = new Date();
        const selectedDate = new Date(time);

        return currentDate.getTime() < selectedDate.getTime();
    };


    const [SessionendDate, setSessionendDate] = useState();

    const filterPassedTime_end = (time) => {
        const currentDate = new Date();
        const selectedDate = new Date(time);

        return currentDate.getTime() < selectedDate.getTime();
    };

    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 > 1000000) {
            alert("L'image ne doit pas depasser un 1 Méga octets");
            return;
        }
        setisimgclassSelected(event.target.files[0]);
        setisimgclassSelectedfile(true);

        setuserimgclassprofil(URL.createObjectURL(event.target.files[0]));
        setuserimgclassprofilchanged("1");

    };


    const editorRef_evaluation = useRef(null);
    const [field_evaluation, setfield_evaluation] = useState("");
    function editor_keyup() {
    }

    const editorRef_contenu_ftion = useRef(null);
    const [editorRef_contenu_ftion_limite, seteditorRef_description_limite] = useState(800);

    const one_editorRef_contenu_ftion = useRef(null);
    const [one_editorRef_contenu_ftion_limite, setone_editorRef_description_limite] = useState(800);

    const [field_contenu_ftion, setfield_contenu_ftion] = useState("");
    function editor_contenu_ftion_keyup() {
        setsessionChanged(true);
    }

    const [SendAttendeeAttestation_api, setSendAttendeeAttestation_api] = useState();
    const [SendAttendeeAttestation_message, setSendAttendeeAttestation_message] = useState();
    const [SendAttendeeAttestation_result, setSendAttendeeAttestation_result] = useState();
    function SendAttendeeAttestation() {
        clean_old_messages();
        var form = new FormData();
        const stored_cookie = getCookie('tokenmysypart');
        form.append("token", stored_cookie);
        form.append("session_id", selected_code_session);
        form.append("attendee_email", selectedattendeeemail);
        form.append("class_internal_url", selected_internal_url);

        var myurl = process.env.REACT_APP_API_URL + "myclass/api/SendAttendeeCertification/";

        axios.post(myurl, form).then(res => {

            if (String(res.data.status) === String("true")) {
                //console.log(" In SendAttendeeAttestation  res.data.status = " + res.data.status);
                //console.log(" In SendAttendeeAttestation  res.data.message r_class = " + res.data.message);
                setSendAttendeeAttestation_api("true");
                setSendAttendeeAttestation_result(res.data.message);

            } else if (String(res.data.status) === String("Err_Connexion")) {
                alert('Erreur: ' + res.data.message);
                history.push("/Connexion");
            }
            else {
                setSendAttendeeAttestation_api("false");
                setSendAttendeeAttestation_message(res.data.message);
            }

        }).catch((error) => {
            console.warn('Not good man :( SendAttendeeAttestation = ', error);
            setSendAttendeeAttestation_api("false");

        })

    }



    const [userimgclassprofil, setuserimgclassprofil] = useState();
    const [userimgclassprofilchanged, setuserimgclassprofilchanged] = useState("");


    function DownloadAttendeeDetail(local_session_id, local_email, local_internal_url) {


        const stored_cookie = getCookie('tokenmysypart');

        var nom_fiche_detaillee = "Fiche_Detaillee.pdf";

        var url = process.env.REACT_APP_API_URL + "myclass/api/PrintAttendeeDetail_perSession/" + stored_cookie + "/" + local_session_id + "/" + local_email + "/" + local_internal_url;


        axios.get(url, { responseType: 'blob', },)
            .then((res) => {
                fileDownload(res.data, nom_fiche_detaillee)
            }).catch((error) => {
                console.error('Error:', error);

            });
    }


    function DownloadAttendeeDetail_one(addendeeEmail) {


        var trainer = ""
        if (document.getElementsByName("formateur")[0])
            trainer = document.getElementsByName("formateur")[0].value;

        if (trainer == "") {
            alert(" Aucun formateur pour cette session ");
            return;
        }

        if (addendeeEmail == "") {
            alert(" Aucun utilisateur choisi ");
            return;
        }

        const stored_cookie = getCookie('tokenmysypart');

        var nom_fiche_detaillee = "Fiche_Detaillee.pdf";

        var url = process.env.REACT_APP_API_URL + "myclass/api/PrintAttendeeDetail_perSession/" + stored_cookie + "/" + selected_code_session + "/" + addendeeEmail + "/" + selected_internal_url;


        axios.get(url, { responseType: 'blob', },)
            .then((res) => {
                fileDownload(res.data, nom_fiche_detaillee)
            }).catch((error) => {
                console.error('Error:', error);

            });
    }


    function DownloadAttendeeAttestation(event) {

        const stored_cookie = getCookie('tokenmysypart');

        var nom_fiche_detaillee = "Attestation.pdf";

        var url = process.env.REACT_APP_API_URL + "myclass/api/PrintAttendeeCertification/" + stored_cookie + "/" + selected_code_session + "/" + selectedattendeeemail + "/" + selected_internal_url;



        axios.get(url, { responseType: 'blob', },)
            .then((res) => {
                fileDownload(res.data, nom_fiche_detaillee)
            })
    }




    const [isimgclassSelected, setisimgclassSelected] = useState(false);
    const [isimgclassSelected_recid, setisimgclassSelected_recid] = useState("");
    const [isimgclassSelectedfile, setisimgclassSelectedfile] = useState(false);


    const [isimgclassdeleted, setisimgclassdeleted] = useState("");
    const [isimgclassdeleted_message, setisimgclassdeleted_message] = useState("");
    const [isimgclassSaved, setisimgclassSaved] = useState("");
    const [isimgclassSaved_message, setisimgclassSaved_message] = useState("");

    function AnnuleAttendeeDetailFields() {

        GetAttendee_Data(selected_participant_email, selected_code_session, selected_internal_url);
        disableAttendeeDetailFields();
        setparticipant_data_changed();
        setparticipant_data_edit_mode();
    }

    function disableAttendeeDetailFields() {
        setparticipant_data_edit_mode("0");


        if (document.getElementsByName("detail_session_class")[0]) {
            document.getElementsByName("detail_session_class")[0].disabled = true;
            document.getElementsByName("detail_session_class")[0].style.backgroundColor = "#ECEFF1";
        }


        if (document.getElementsByName("detail_client_rattachement")[0]) {
            document.getElementsByName("detail_client_rattachement")[0].disabled = true;
            document.getElementsByName("detail_client_rattachement")[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_status_inscript")[0]) {
            document.getElementsByName("detail_status_inscript")[0].disabled = true;
            document.getElementsByName("detail_status_inscript")[0].style.backgroundColor = "#ECEFF1";
        }

        if (document.getElementsByName("detail_opco")[0]) {
            document.getElementsByName("detail_opco")[0].disabled = true;
            document.getElementsByName("detail_opco")[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_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_pays")[0]) {
            document.getElementsByName("detail_pays")[0].disabled = true;
            document.getElementsByName("detail_pays")[0].style.backgroundColor = "#ECEFF1";
        }


        if (document.getElementsByName("detail_cout")[0]) {
            document.getElementsByName("detail_cout")[0].disabled = true;
            document.getElementsByName("detail_cout")[0].style.backgroundColor = "#ECEFF1";
        }


        if (document.getElementsByName("detail_mode_fin")[0]) {
            document.getElementsByName("detail_mode_fin")[0].disabled = true;
            document.getElementsByName("detail_mode_fin")[0].style.backgroundColor = "#ECEFF1";
        }


        if (document.getElementsByName("detail_employeur")[0]) {
            document.getElementsByName("detail_employeur")[0].disabled = true;
            document.getElementsByName("detail_employeur")[0].style.backgroundColor = "#ECEFF1";
        }


        if (document.getElementsByName("date_evaluation")[0]) {
            document.getElementsByName("date_evaluation")[0].disabled = true;
            document.getElementsByName("date_evaluation")[0].style.backgroundColor = "#ECEFF1";
        }



        if (document.getElementsByName("certif_date")[0]) {
            document.getElementsByName("certif_date")[0].disabled = true;
            document.getElementsByName("certif_date")[0].style.backgroundColor = "#ECEFF1";
        }

        if (document.getElementsByName("note_eval")[0]) {
            document.getElementsByName("note_eval")[0].disabled = true;
            document.getElementsByName("note_eval")[0].style.backgroundColor = "#ECEFF1";
        }


        if (document.getElementsByName("date_evaluation")[0]) {
            document.getElementsByName("date_evaluation")[0].disabled = true;
            document.getElementsByName("date_evaluation")[0].style.backgroundColor = "#ECEFF1";
        }


        if (document.getElementsByName("detail_incr_date")[0]) {
            document.getElementsByName("detail_incr_date")[0].disabled = true;
            document.getElementsByName("detail_incr_date")[0].style.backgroundColor = "#ECEFF1";
        }

        if (document.getElementsByName("certif_date")[0]) {
            document.getElementsByName("certif_date")[0].disabled = true;
            document.getElementsByName("certif_date")[0].style.backgroundColor = "#ECEFF1";
        }
    }

    function EnableAttendeeDetailFields() {
        setparticipant_data_edit_mode("1");

        document.getElementsByName("detail_session_class")[0].disabled = false;
        document.getElementsByName("detail_session_class")[0].style.backgroundColor = "#FFFFFF";

        document.getElementsByName("detail_client_rattachement")[0].disabled = false;
        document.getElementsByName("detail_client_rattachement")[0].style.backgroundColor = "#FFFFFF";

        document.getElementsByName("detail_nom")[0].disabled = false;
        document.getElementsByName("detail_nom")[0].style.backgroundColor = "#FFFFFF";



        document.getElementsByName("detail_status_inscript")[0].disabled = false;
        document.getElementsByName("detail_status_inscript")[0].style.backgroundColor = "#FFFFFF";

        document.getElementsByName("detail_opco")[0].disabled = false;
        document.getElementsByName("detail_opco")[0].style.backgroundColor = "#FFFFFF";


        document.getElementsByName("detail_prenom")[0].disabled = false;
        document.getElementsByName("detail_prenom")[0].style.backgroundColor = "#FFFFFF";


        document.getElementsByName("detail_mail")[0].disabled = false;
        document.getElementsByName("detail_mail")[0].style.backgroundColor = "#FFFFFF";


        document.getElementsByName("detail_tel")[0].disabled = false;
        document.getElementsByName("detail_tel")[0].style.backgroundColor = "#FFFFFF";


        document.getElementsByName("detail_adresse")[0].disabled = false;
        document.getElementsByName("detail_adresse")[0].style.backgroundColor = "#FFFFFF";

        document.getElementsByName("detail_code_postal")[0].disabled = false;
        document.getElementsByName("detail_code_postal")[0].style.backgroundColor = "#FFFFFF";

        document.getElementsByName("detail_ville")[0].disabled = false;
        document.getElementsByName("detail_ville")[0].style.backgroundColor = "#FFFFFF";

        document.getElementsByName("detail_pays")[0].disabled = false;
        document.getElementsByName("detail_pays")[0].style.backgroundColor = "#FFFFFF";

        document.getElementsByName("detail_cout")[0].disabled = false;
        document.getElementsByName("detail_cout")[0].style.backgroundColor = "#FFFFFF";


        document.getElementsByName("detail_mode_fin")[0].disabled = false;
        document.getElementsByName("detail_mode_fin")[0].style.backgroundColor = "#FFFFFF";

        document.getElementsByName("detail_employeur")[0].disabled = false;
        document.getElementsByName("detail_employeur")[0].style.backgroundColor = "#FFFFFF";

        document.getElementsByName("date_evaluation")[0].disabled = false;
        document.getElementsByName("date_evaluation")[0].style.backgroundColor = "#FFFFFF";

        document.getElementsByName("certif_date")[0].disabled = false;
        document.getElementsByName("certif_date")[0].style.backgroundColor = "#FFFFFF";

        document.getElementsByName("note_eval")[0].disabled = false;
        document.getElementsByName("note_eval")[0].style.backgroundColor = "#FFFFFF";




        document.getElementsByName("date_evaluation")[0].disabled = false;
        document.getElementsByName("date_evaluation")[0].style.backgroundColor = "#FFFFFF";


        document.getElementsByName("detail_incr_date")[0].disabled = false;
        document.getElementsByName("detail_incr_date")[0].style.backgroundColor = "#FFFFFF";


        document.getElementsByName("certif_date")[0].disabled = false;
        document.getElementsByName("certif_date")[0].style.backgroundColor = "#FFFFFF";
    }


    const [detailuser_date_inscription, setdetailuser_date_inscription] = useState();
    const [detailuser_date_evaluation, setdetailuser_date_evaluation] = useState();
    const [detailuser_date_certification, setdetailuser_date_certification] = useState();
    const [SessionstartDateInscription, setSessionstartDateInscription] = useState();


    const [attendee_lms_pwd, setattendee_lms_pwd] = useState();
    const [attendee_lms_login, setattendee_lms_login] = useState();


    function submenu_sessions() {
        setsubmenu("sessions");
        setdisplay_detail_stagiaire();

        desableSessionFields();
    }

    const [SendEvaluationEmail_api, setSendEvaluationEmail_api] = useState();
    const [SendEvaluationEmail_message, setSendEvaluationEmail_message] = useState();
    const [SendEvaluationEmail_result, setSendEvaluationEmail_result] = useState();
    function SendEvaluationEmail() {
        clean_old_messages();
        var form = new FormData();
        const stored_cookie = getCookie('tokenmysypart');
        form.append("token", stored_cookie);
        form.append("session_id", selected_session_id);
        form.append("attendee_email", selectedattendeeemail);
        form.append("class_internal_url", selected_internal_url);


        var myurl = process.env.REACT_APP_API_URL + "myclass/api/SendTrainingEvaluationEmail/";

        axios.post(myurl, form).then(res => {

            if (String(res.data.status) === String("true")) {
                //console.log(" In SendEvaluationEmail  res.data.status = " + res.data.status);
                //console.log(" In SendEvaluationEmail  res.data.message r_class = " + res.data.message);
                setSendEvaluationEmail_api("true");
                setSendEvaluationEmail_result(res.data.message);

            } else if (String(res.data.status) === String("Err_Connexion")) {
                alert('Erreur: ' + res.data.message);
                history.push("/Connexion");
            }
            else {
                setSendEvaluationEmail_api("false");
                setSendEvaluationEmail_message(res.data.message);
            }

        }).catch((error) => {
            console.warn('Not good man :( SendEvaluationEmail = ', error);
            setSendEvaluationEmail_api("false");

        })
    }

    function SendEvaluationEmail_One(email) {

        var form = new FormData();
        const stored_cookie = getCookie('tokenmysypart');
        form.append("token", stored_cookie);
        form.append("session_id", selected_session_id);
        form.append("attendee_email", email);
        form.append("class_internal_url", selected_internal_url);


        var myurl = process.env.REACT_APP_API_URL + "myclass/api/SendTrainingEvaluationEmail/";

        axios.post(myurl, form).then(res => {

            if (String(res.data.status) === String("true")) {
                //console.log(" In SendEvaluationEmail  res.data.status = " + res.data.status);
                //console.log(" In SendEvaluationEmail  res.data.message r_class = " + res.data.message);
                setSendEvaluationEmail_api("true");
                setSendEvaluationEmail_result(res.data.message);
                alert(" La demande a été correctement envoyée");

            } else if (String(res.data.status) === String("Err_Connexion")) {
                alert('Erreur: ' + res.data.message);
                history.push("/Connexion");
            }
            else {
                setSendEvaluationEmail_api("false");
                setSendEvaluationEmail_message(res.data.message);
                alert(" Erreur : " + res.data.message);
            }

        }).catch((error) => {
            console.warn('Not good man :( SendEvaluationEmail = ', error);
            setSendEvaluationEmail_api("false");

        })
    }


    const [record_Stagiaire_Image_api, setrecord_Stagiaire_Image_api] = useState();
    const [record_Stagiaire_Image_message, setrecord_Stagiaire_Image_message] = useState();
    const [record_Stagiaire_Image_result, setrecord_Stagiaire_Image_result] = useState();
    function record_Stagiaire_Image(l) {

        const formData = new FormData();
        const url = process.env.REACT_APP_API_URL + "myclass/api/Update_Stagiaire_Image/";

        const stored_cookie = getCookie('tokenmysypart');
        formData.append("token", stored_cookie);
        formData.append("class_internal_url", selected_internal_url);
        formData.append("session_id", selected_session_id);
        formData.append("email", selected_participant_email);

        formData.append('file_img', isimgclassSelected);
        formData.append('file_img_recid', isimgclassSelected_recid);


        //console.log(" ### formData = ", formData);
        fetch(
            url,
            {
                method: 'POST',
                body: formData,
            }
        )
            .then((response) => response.json())
            .then((result) => {
                console.log('Success:', result['message'], "result['status'] = ", result['status']);

                if (String(result['status']) === String("true")) {
                    setrecord_Stagiaire_Image_api("true");
                    setuserimgclassprofilchanged("");
                    alert(" L'image à jour a été mise enregistrée ");

                } else if (String(result['status']) === String("Err_Connexion")) {
                    alert('Erreur: ' + result['message']);
                    history.push("/Connexion");
                } else {
                    setrecord_Stagiaire_Image_api("false");
                    alert(" Erreur : " + result['message']);
                }

            })
            .catch((error) => {
                console.error('Error:', error);
                setrecord_Stagiaire_Image_api("false");
                alert(" Erreur : Impossible d'enregistrer l'image ");

            });


    };


    function removeRecodedLogoImage() {
        if (!isimgclassSelected_recid || String(isimgclassSelected_recid).length < 3) {
            alert(" Image incorrecte. Impossible de la supprimer ");
            return;
        }

        var form = new FormData();

        const stored_cookie = getCookie('tokenmysypart');
        form.append("token", stored_cookie);
        form.append("image_recid", isimgclassSelected_recid);

        fetch(
            process.env.REACT_APP_API_URL + "myclass/api/DeleteImage_Stagiaire_v2/",
            {
                method: 'POST',
                body: form,
            }
        ).then((response) => response.json())
            .then((result) => {

                console.log(' removeRecodedClassImage : status:', result['status']);
                console.log('removeRecodedClassImage : Success:', result['message']);


                if (String(result['status']) === String("true")) {
                    setisimgclassSelected("");
                    setisimgclassSelected_recid("");
                    setisimgclassSelectedfile("");
                    setuserimgclassprofil("");
                    getStagiaireImages();

                }
                else if (String(result['status']) === String("Err_Connexion")) {
                    alert('Erreur: ' + result['message']);
                    history.push("/Connexion");
                    return;
                }

                else {
                    alert(result['message']);
                }

            })
            .catch((error) => {
                console.error('Error:', error);
                alert(" Impossible de supprimer l'image ");
            });

    }



    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 => {
        clean_old_messages();

        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 > 1000000) {
            alert("Le fichier ne doit pas depasser un 1 Méga octets");
            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);

        fetch(
            process.env.REACT_APP_API_URL + "myclass/api/AddStagiairetoClass_mass_for_many_session/",
            {
                method: 'POST',
                body: formData,
            }
        )
            .then((response) => response.json())
            .then((result) => {

                //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");

                    Getall_TrainingParticipant();
                    alert(" Les stagiaires ont été correctement importés");

                }

                else {
                    setliste_sessions_file_change_message(result['message']);
                    setliste_sessions_file_change_api("false");
                    alert('Erreur: ' + result['message']);

                }


            })
            .catch((error) => {
                console.error('Error:', error);
                setliste_sessions_file_change_api("false");
                alert(" Impossible d'importer les stagiaires ");
            });
    }


    async function submenu_detail_stagaire() {
        setsubmenu("detail_session");

        await sleep(5);
        /*if (!edit_session_form) {
            desableSessionFields();
        }

        if (document.getElementById("detail_session")) {
            document.getElementById("detail_session").style.backgroundColor = "#104277";
            document.getElementById("detail_session").style.color = "white";
        }

        if (document.getElementById("inscrit")) {
            document.getElementById("inscrit").style.backgroundColor = "#d8edfc";
            document.getElementById("inscrit").style.color = "black";
        }

        if (document.getElementById("preinscrit")) {
            document.getElementById("preinscrit").style.backgroundColor = "#d8edfc";
            document.getElementById("preinscrit").style.color = "black";
        }
*/

    }




    const [Getall_TrainingSession_api, setGetall_TrainingSession_api] = useState();
    const [Getall_TrainingSession_message, setGetall_TrainingSession_message] = useState();
    const [Getall_TrainingSession_result, setGetall_TrainingSession_result] = useState();
    function Getall_TrainingSession(event) {
        var form = new FormData();

        const stored_cookie = getCookie('tokenmysypart');
        form.append("token", stored_cookie);

        var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetAllValideSessionPartner_List/";


        axios.post(myurl, form).then(res => {

            if (String(res.data.status) === String("true")) {
                //console.log(" In Getall_TrainingSession  res.data.status = " + res.data.status);
                //console.log(" In Getall_TrainingSession  res.data.message r_class = " + res.data.message);
                setGetall_TrainingSession_api("true");
                setGetall_TrainingSession_result(res.data.message);

            }
            else {
                setGetall_TrainingSession_api("false");
                setGetall_TrainingSession_message(res.data.message);
            }

        }).catch((error) => {
            console.warn('Not good man :( Getall_TrainingSession = ', error);
            setGetall_TrainingSession_api("false");
            //setmyApimyApiMessage("")
        })
    }

    const [nb_stagiaire_Inscrit, setnb_stagiaire_Inscrit] = useState("0");
    const hiddenFileInput_session = React.useRef(null);
    const [Edite_session, setEdite_session] = useState();
    const [selectionModel_preinsc, setselectionModel_preinsc] = React.useState([]);

    const [selectionModel_insc, setSelectionModel_insc] = React.useState([]);
    const [rowss_insc, setRows_insc] = useState([]);
    const [rowss_preinsc, setRows_preinsc] = useState([]);




    useEffect(() => {
        Getall_TrainingParticipant();
        Getall_TrainingSession();
        Get_List_Partner_Clients();
        GetCurrentPartnerClass();
        let windowWidth = window.innerWidth;
        if (windowWidth < 1001) {
            setdatagrid_columns_size_model2(10);
        }



    }, [])

    const [addOneParticipant, setaddOneParticipant] = useState();
    const status_inscription = [
        {
            value: '1',
            label: 'Inscription',
        },
        {
            value: '0',
            label: 'PréInscription',
        },
        {
            value: '-1',
            label: 'Annulation',
        },
        {
            value: '2',
            label: 'En Cours',
        },

    ];


    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_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_pays, setp_detail_pays] = useState();
    const [p_detail_cout, setp_detail_cout] = useState();
    const [p_detail_mode_fin, setp_detail_mode_fin] = useState();
    const [p_detail_employeur, setp_detail_employeur] = useState();
    const [p_date_evaluation, setp_date_evaluation] = useState();
    const [p_note_eval, setp_note_eval] = useState();
    const [p_detail_session_class, setp_detail_session_class] = useState();
    const [p_detail_session_class_id, setp_detail_session_class_id] = useState();
    const [p_detail_status_inscrit, setp_detail_status_inscrit] = useState();
    const [p_detail_status_inscrit_label, setp_detail_status_inscrit_label] = useState();
    const [p_detail_opco, setp_detail_opco] = useState();
    const [p_detail_client_rattachement_nom, setp_detail_client_rattachement_nom] = useState();
    const [p_detail_client_rattachement_id, setp_detail_client_rattachement_id] = useState();


    //---
    const [p_one_formation, setp_one_formation] = useState();
    const [p_one_detail_session_class, setp_one_detail_session_class] = useState();
    const [p_one_nom_part, setp_one_nom_part] = useState();
    const [p_one_prenom_part, setp_one_prenom_part] = useState();
    const [p_one_email_part, setp_one_email_part] = useState();
    const [p_one_phone_part, setp_one_phone_part] = useState();
    const [p_one_adresse_part, setp_one_adresse_part] = useState();
    const [p_one_ville_part, setp_one_ville_part] = useState();
    const [p_one_code_postal_part, setp_one_code_postal_part] = useState();
    const [p_one_pays_part, setp_one_pays_part] = useState();
    const [p_one_status_part, setp_one_status_part] = useState();
    const [p_one_detail_client_rattachement_nom, setp_one_detail_client_rattachement_nom] = useState();
    const [p_one_detail_client_rattachement_id, setp_one_detail_client_rattachement_id] = useState();

    //----

    const [p_myclass_title, setp_myclass_title] = useState("");
    const [p_code_session, setp_code_session] = useState("");
    const [p_adresse, setp_adresse] = useState("");
    const [p_code_postal, setp_code_postal] = useState("");
    const [p_ville, setp_ville] = useState("");
    const [p_pays, setp_pays] = useState("");
    const [p_formateur, setp_formateur] = useState("");
    const [p_lms_class_code, setp_lms_class_code] = useState("");
    const [p_nb_participant, setp_nb_participant] = useState("");
    const [p_prix_session, setp_prix_session] = useState("");

    const [p_session_ondemande, setp_session_ondemande] = useState("0");
    const [p_session_ondemande_label, setp_session_ondemande_label] = useState("");

    const [p_session_distance, setp_session_distance] = useState("0");
    const [p_session_distance_label, setp_session_distance_label] = useState("");

    const [p_session_presentiel, setp_session_presentiel] = useState("0");
    const [p_session_presentiel_label, setp_session_presentiel_label] = useState("");

    const [p_session_status, setp_session_status] = useState();
    const [p_session_status_label, setp_session_status_label] = useState();


    const [p_session_etape, setp_session_etape] = useState();
    const [p_session_etape_label, setp_session_etape_label] = useState();

    // Cette fonction remplit la zone detail de la personne inscrite
    const [GetAttendee_api, setGetAttendee_api] = useState();
    const [GetAttendee_message, setGetAttendee_message] = useState();
    const [GetAttendee_result, setGetAttendee_result] = useState();
    function GetAttendee_Data(attendee_email, session_id, internal_url) {
        setparticipant_data_changed();
        setparticipant_data_edit_mode();
        clean_old_messages();
        var form = new FormData();

        const stored_cookie = getCookie('tokenmysypart');
        form.append("token", stored_cookie);
        form.append("session_id", session_id);
        form.append("attendee_email", attendee_email);
        form.append("internal_url", internal_url);

        var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetAttendeeDetail_perSession/";

        axios.post(myurl, form).then(res => {

            if (String(res.data.status) === "true") {
                //console.log(" In GetAttendee  res.data.status = " + res.data.status);
                //console.log(" In GetAttendee  res.data.message r_class = " + res.data.message);
                setGetAttendee_api("true");
                setGetAttendee_result(res.data.message);

                if (res.data.message) {
                    var mylocalattendee = JSON.parse(res.data.message);


                    if (mylocalattendee.inscription_validation_date) {
                        var date_du = new Date(moment(mylocalattendee.inscription_validation_date, "DD/MM/YYYY HH:mm:ss"));
                        setdetailuser_date_inscription(date_du);
                    }


                    document.getElementsByName("detail_session")[0].value = "";
                    if (mylocalattendee.code_session)
                        setp_detail_session_class(mylocalattendee.code_session);

                    if (mylocalattendee.session_id)
                        setp_detail_session_class_id(mylocalattendee.session_id);


                    document.getElementsByName("detail_status_inscript")[0].value = "";
                    if (mylocalattendee.status) {
                        setp_detail_status_inscrit(mylocalattendee.status);
                        if (String(mylocalattendee.status) === "1")
                            setp_detail_status_inscrit_label("Inscrit");
                        else if (String(mylocalattendee.status) === "0")
                            setp_detail_status_inscrit_label("Preinsc.");
                        else if (String(mylocalattendee.status) === "-1")
                            setp_detail_status_inscrit_label("Annulé");
                        else if (String(mylocalattendee.status) === "2")
                            setp_detail_status_inscrit_label("Encours");
                        else
                            setp_detail_status_inscrit_label("?");
                    }

                    document.getElementsByName("detail_opco")[0].value = "";
                    if (mylocalattendee.opco)
                        setp_detail_opco(mylocalattendee.opco);


                    document.getElementsByName("detail_client_rattachement")[0].value = "";
                    if (mylocalattendee.client_rattachement_id) {
                        setp_detail_client_rattachement_id(mylocalattendee.client_rattachement_id);
                        setp_detail_client_rattachement_nom(mylocalattendee.client_rattachement_nom);

                    }


                    document.getElementsByName("detail_nom")[0].value = "";
                    if (mylocalattendee.nom)
                        setp_detail_nom(mylocalattendee.nom);

                    document.getElementsByName("detail_prenom")[0].value = "";
                    if (mylocalattendee.prenom)
                        setp_detail_prenom(mylocalattendee.prenom);

                    document.getElementsByName("detail_mail")[0].value = "";
                    if (mylocalattendee.email) {
                        setp_detail_mail(mylocalattendee.email);
                        setattendee_lms_login(mylocalattendee.email);
                    }


                    document.getElementsByName("detail_tel")[0].value = "";
                    if (mylocalattendee.telephone) {
                        setp_detail_tel(mylocalattendee.telephone);
                    }

                    document.getElementsByName("detail_adresse")[0].value = "";
                    if (mylocalattendee.adresse) {
                        setp_detail_adresse(mylocalattendee.adresse);
                    }

                    document.getElementsByName("detail_code_postal")[0].value = "";
                    if (mylocalattendee.code_postal) {
                        setp_detail_code_postal(mylocalattendee.code_postal);
                    }

                    document.getElementsByName("detail_ville")[0].value = "";
                    if (mylocalattendee.ville) {
                        setp_detail_ville(mylocalattendee.ville);
                    }

                    document.getElementsByName("detail_pays")[0].value = "";
                    if (mylocalattendee.pays) {
                        setp_detail_pays(mylocalattendee.pays);
                    }


                    document.getElementsByName("detail_cout")[0].value = "";
                    if (mylocalattendee.price) {
                        setp_detail_cout(mylocalattendee.price);
                    }


                    document.getElementsByName("detail_mode_fin")[0].value = "";
                    if (mylocalattendee.modefinancement) {
                        setp_detail_mode_fin(mylocalattendee.modefinancement);
                    }


                    document.getElementsByName("detail_employeur")[0].value = "";
                    if (mylocalattendee.employeur) {
                        setp_detail_employeur(mylocalattendee.employeur);
                    }

                    document.getElementsByName("date_evaluation")[0].value = "";
                    if (mylocalattendee.eval_date) {

                        var date_eval = new Date(moment(mylocalattendee.eval_date, "YYYY/MM/DD"));
                        setdetailuser_date_evaluation(date_eval);
                    }

                    document.getElementsByName("certif_date")[0].value = "";
                    if (mylocalattendee.certification_send_date) {
                        //alert(" certification_send_date = ", mylocalattendee.certification_send_date);

                        var date_eval = new Date(moment(mylocalattendee.certification_send_date, "DD/MM/YYYY"));
                        setdetailuser_date_certification(date_eval);
                    }



                    document.getElementsByName("note_eval")[0].value = "";
                    if (mylocalattendee.eval_note) {
                        setp_note_eval(mylocalattendee.eval_note);
                    }


                    if (mylocalattendee.eval_eval) {
                        setfield_evaluation(mylocalattendee.eval_eval);

                    }

                    if (mylocalattendee.lms_pwd) {
                        setattendee_lms_pwd("xxxxxx");
                    }


                    var myelement;

                    if (document.getElementById('ajout_participant')) {
                        myelement = document.getElementById('ajout_participant');
                    }

                    if (myelement) {
                        myelement.scrollIntoView({ behavior: 'smooth' });
                    }

                    disableAttendeeDetailFields();


                } else {
                    alert("Aucune donnée récuperée ");
                }

            } else if (String(res.data.status) === String("Err_Connexion")) {
                alert('Erreur: ' + res.data.message);
                history.push("/Connexion");
            }

            else {
                setGetAttendee_api("false");
                setGetAttendee_message(res.data.message);
                alert(res.data.message);
            }

        }).catch((error) => {
            console.warn('Not good man :( GetAttendee = ', error);
            setGetAttendee_api("false");
            alert(" Impossible de recuperer les données du participant");
            //setmyApimyApiMessage("")
        })
    }

    let [sessionChanged, setsessionChanged] = useState(false);
    let [participant_data_changed, setparticipant_data_changed] = useState();
    let [participant_data_edit_mode, setparticipant_data_edit_mode] = useState();

    function IssessionChanged() {
        setsessionChanged(true);
    }




    const [is_lms_class_code, setis_lms_class_code] = useState();

    const [display_detail_insc, setdisplay_detail_insc] = React.useState();

    const [selectedattendeeemail, setselectedattendeeemail] = useState([])

    function Display_Detail_Inscription(event, cellValues) {
        clearDetailAttendeFields();
        setdisplay_detail_insc("1")
        var montant = String(cellValues.row.amount);
        var nom = cellValues.row.nom;
        var email = cellValues.row.email;
        setselectedattendeeemail(email);
        var prenom = cellValues.row.prenom;
        GetAttendee_Data(email, selected_code_session);
        getStagiaireImages(selected_internal_url, selected_code_session, email,);
    }

    const [getPartnerImages_api, setgetPartnerImages_api] = useState();
    const [getPartnerImages_message, setgetPartnerImages_message] = useState();
    const [getPartnerImages_result, setgetPartnerImages_result] = useState();
    function getStagiaireImages(local_internal_url, local_selected_code_session, local_email) {

        var myurl = process.env.REACT_APP_API_URL + "myclass/api/getRecodedStagiaireImage_from_front/";

        var form = new FormData();
        const stored_cookie = getCookie('tokenmysypart');
        form.append("token", stored_cookie);
        form.append("class_internal_url", local_internal_url);
        form.append("session_id", local_selected_code_session);
        form.append("email", local_email);


        axios.post(myurl, form).then(res => {

            //console.log(" getStagiaireImages : In test  res.data.status = " + res.data.status);
            // console.log(" getStagiaireImages: res.data.message.img = " + res.data.message);

            if (String(res.data.status) === "true") {
                setgetPartnerImages_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 {
                setgetPartnerImages_api("false");
                setgetPartnerImages_message(res.data.message)

            }
        }).catch((error) => {
            console.warn('getStagiaireImages ee: Not good man :(  = ', error);
            setgetPartnerImages_api("false");
            setgetPartnerImages_message(" Impossible de recuperer les images/médias du partenaire")
        })

    }

    let [fields1desabled, setfields1desabled] = useState(true);

    const [One_Create_Participant_api, setOne_Create_Participant_api] = useState();
    const [One_Create_Participant_message, setOne_Create_Participant_message] = useState();
    const [One_Create_Participant_result, setOne_Create_Participant_result] = useState();
    function One_Create_Participant() {
        clean_old_messages();
        var form = new FormData();
        var nb_participant = "0";
        var prix_session;



        if (!p_one_nom_part || p_one_nom_part.trim() == "") {
            alert(" Vous devez saisir le nom du participant");
            return;
        }


        if (!p_one_prenom_part || p_one_prenom_part.trim() == "") {
            alert(" Vous devez saisir le prenom du participant");
            return;
        }


        if (!p_one_email_part || p_one_email_part.trim() == "") {
            alert(" Vous devez saisir l'email du participant");
            return;
        }


        var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
        if (!p_one_email_part.match(validRegex)) {
            alert("L'adresse email est invalide.");
            return;
        }


        if (!p_one_phone_part || p_one_phone_part.trim() == "") {
            alert(" Vous devez saisir le téléphone du participant");
            return;
        }


        if (!p_one_detail_session_class || p_one_detail_session_class.trim() == "") {
            alert(" La session est invalide");
            return;
        }


        //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
        const stored_cookie = getCookie('tokenmysypart');
        form.append("token", stored_cookie);
        form.append("class_internal_url", p_one_formation);
        form.append("session_id", p_one_detail_session_class);
        form.append("nom", p_one_nom_part);
        form.append("prenom", p_one_prenom_part);
        form.append("email", p_one_email_part);
        form.append("telephone", p_one_phone_part);

        if (p_one_adresse_part)
            form.append("adresse", p_one_adresse_part);
        else
            form.append("adresse", "");

        if (p_one_code_postal_part)
            form.append("code_postal", p_one_code_postal_part);
        else
            form.append("code_postal", "");

        if (p_one_ville_part)
            form.append("ville", p_one_ville_part);
        else
            form.append("ville", "");

        if (p_one_pays_part)
            form.append("pays", p_one_pays_part);
        else
            form.append("pays", "");


        if (p_one_status_part)
            form.append("status", p_one_status_part);
        else
            form.append("status", "");

        if (p_one_detail_client_rattachement_id)
            form.append("client_rattachement_id", p_one_detail_client_rattachement_id);
        else
            form.append("client_rattachement_id", "");

        form.append("modefinancement", "");

        //console.log(" #### form = ", form);
        var myurl = process.env.REACT_APP_API_URL + "myclass/api/AddStagiairetoClass/";



        axios.post(myurl, form).then(res => {
            //console.log(" In One_Create_Participant  res.data.status = " + res.data.status);
            //console.log(" In One_Create_Participant  res.data.message r_class = " + res.data.message);

            if (String(res.data.status) === String("true")) {
                setOne_Create_Participant_api("true");
                setOne_Create_Participant_result(res.data.message);
                alert(" Le participant a été correctement ajouté");
                setaddOneParticipant();
                Getall_TrainingParticipant();
                clear_one_Attende_Fields();

            } else if (String(res.data.status) === String("Err_Connexion")) {
                alert('Erreur: ' + res.data.message);
                history.push("/Connexion");
            }
            else {
                setOne_Create_Participant_api("false");
                setOne_Create_Participant_message(res.data.message);
                alert(res.data.message);
            }

        }).catch((error) => {

            console.warn('One_Create_Participant : Not good man :(  = ' + error);
            setOne_Create_Participant_api("false");
            alert(" Impossible d'ajouter le participants")

        })
    }

    const myRef_head = useRef(null)

    const [UpdateStagiaireData_api, setUpdateStagiaireData_api] = useState();
    const [UpdateStagiaireData_message, setUpdateStagiaireData_message] = useState();
    const [UpdateStagiaireData_result, setUpdateStagiaireData_result] = useState();
    function Update_One_StagiaireData() {
        var form = new FormData();
        //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");

        if (p_detail_session_class.length <= 0) {
            alert(" Vous devez choisir une session");
            return;
        }
        const stored_cookie = getCookie('tokenmysypart');
        form.append("token", stored_cookie);
        form.append("class_internal_url", selected_internal_url);
        form.append("session_id", p_detail_session_class_id);
        form.append("nom", p_detail_nom);
        form.append("prenom", p_detail_prenom);
        form.append("email", p_detail_mail);

        if (p_detail_employeur)
            form.append("employeur", p_detail_employeur);
        else
            form.append("employeur", "");

        form.append("status", p_detail_status_inscrit);

        if (p_detail_cout)
            form.append("price", p_detail_cout);
        else
            form.append("price", "");

        if (p_detail_mode_fin)
            form.append("modefinancement", p_detail_mode_fin);
        else
            form.append("modefinancement", "");


        if (p_detail_opco)
            form.append("opco", p_detail_opco);
        else
            form.append("opco", "");

        form.append("_id", selected_id);
        if (p_detail_client_rattachement_nom)
            form.append("client_rattachement_id", p_detail_client_rattachement_nom);
        else
            form.append("client_rattachement_id", "");

        //console.log(" form == ", form);

        var myurl = process.env.REACT_APP_API_URL + "myclass/api/UpdateStagiairetoClass/";

        axios.post(myurl, form).then(res => {
            console.log(" In UpdateStagiaireData  res.data.status = " + res.data.status);
            console.log(" In UpdateStagiaireData  res.data.message r_class = " + res.data.message);

            if (String(res.data.status) === String("true")) {
                setUpdateStagiaireData_api("true");
                setUpdateStagiaireData_result(res.data.message);
                setparticipant_data_changed();
                Getall_TrainingParticipant();
                disableAttendeeDetailFields();
                setparticipant_data_changed();
                setparticipant_data_edit_mode();
                GetAttendee_Data(p_detail_mail, p_detail_session_class_id, selected_internal_url);
                alert(" La mise à jour été correctement faite.");


                myRef_head.current.scrollIntoView({ behavior: "smooth" });

            }
            else {
                setUpdateStagiaireData_api("false");
                setUpdateStagiaireData_message(res.data.message);
                alert(res.data.message);
            }

        }).catch((error) => {

            console.warn('UpdateStagiaireData : Not good man :( mysearchtext = ' + error);
            setUpdateStagiaireData_api("false");
            alert(" Impossible de mettre à jour le participant");

        })
    }

    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 [Get_List_Partner_Clients_api, setGet_List_Partner_Clients_api] = useState();
    const [Get_List_Partner_Clients_message, setGet_List_Partner_Clients_message] = useState();
    const [Get_List_Partner_Clients_result, setGet_List_Partner_Clients_result] = useState();
    function Get_List_Partner_Clients(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_List_Partner_Client/";

        axios.post(myurl, form).then(res => {
            //console.log(" In Get_List_Partner_Clients  res.data.status = " + res.data.status);
            //console.log(" In Get_List_Partner_Clients  res.data.message r_class = " + res.data.message);

            if (String(res.data.status) === String("true")) {
                setGet_List_Partner_Clients_api("true");
                setGet_List_Partner_Clients_result(res.data.message);
            }
            else if (String(res.data.status) === String("Err_Connexion")) {
                alert('Erreur: ' + res.data.message);
                history.push("/Connexion");
            }
            else {
                setGet_List_Partner_Clients_api("false");
                setGet_List_Partner_Clients_message(res.data.message);
            }

        }).catch((error) => {
            console.warn('Not good man :( Get_List_Partner_Clients = ', error);
            setGet_List_Partner_Clients_api("false");
            //setmyApimyApiMessage("")
        })
    }


    function annule_Add_One_Participant() {
        clear_one_Attende_Fields();
        setaddOneParticipant();

    }

    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);

        var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_partner_class/";

        axios.post(myurl, form).then(res => {

            if (String(res.data.status) === String("true")) {
                //console.log(" In GetCurrentPartnerClass  res.data.status = " + res.data.status);
                //console.log(" In GetCurrentPartnerClass  res.data.message r_class = " + res.data.message);
                setGetCurrentPartnerClass_api("true");
                setGetCurrentPartnerClass_result(res.data.message);


            } 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);
            }

        }).catch((error) => {
            console.warn('Not good man :( mysearchtext = ', error);
            setGetCurrentPartnerClass_api("false");
            //setmyApimyApiMessage("")
        })
    }

    // Cette fonction va aider à prefiltrer les code session en fonction de formation choisie
    function handle_change_p_one_formation(event) {

        setp_one_formation(event.target.value);
    }

    const [SessionendDateInscription, setSessionendDateInscription] = useState();

    function clearSessionFields() {

        if (document.getElementsByName("sessiondatedebut")[0])
            document.getElementsByName("code_session")[0].value = "";

        if (document.getElementsByName("sessiondatedebut")[0])
            document.getElementsByName("sessiondatedebut")[0].value = "";

        if (document.getElementsByName("sessiondatefin")[0])
            document.getElementsByName("sessiondatefin")[0].value = "";

        if (document.getElementsByName("session_status")[0])
            document.getElementsByName("session_status")[0].value = "";

        if (document.getElementsByName("session_etape")[0])
            document.getElementsByName("session_etape")[0].value = "";



        if (document.getElementsByName("adresse")[0])
            document.getElementsByName("adresse")[0].value = "";

        if (document.getElementsByName("code_postal")[0])
            document.getElementsByName("code_postal")[0].value = "";

        if (document.getElementsByName("ville")[0])
            document.getElementsByName("ville")[0].value = "";


        if (document.getElementsByName("pays")[0])
            document.getElementsByName("pays")[0].value = "";

        if (document.getElementsByName("nb_participant")[0])
            document.getElementsByName("nb_participant")[0].value = "";

        if (document.getElementsByName("prix_session")[0])
            document.getElementsByName("prix_session")[0].value = "";

        if (document.getElementsByName("presentiel")[0])
            document.getElementsByName("presentiel")[0].value = "";

        if (document.getElementsByName("session_ondemande")[0])
            document.getElementsByName("session_ondemande")[0].value = "";

        if (document.getElementsByName("distantiel")[0])
            document.getElementsByName("distantiel")[0].value = "";

        if (document.getElementsByName("sessiondatedebutinscription")[0])
            document.getElementsByName("sessiondatedebutinscription")[0].value = "";

        if (document.getElementsByName("sessiondatefininscription")[0])
            document.getElementsByName("sessiondatefininscription")[0].value = "";

        setSessionstartDateInscription();
        setSessionendDateInscription();
        setSessionendDate();
        setSessionstartDate();

        setfield_contenu_ftion();


        setp_myclass_title();
        setp_code_session();
        setp_adresse();
        setp_ville();
        setp_pays();
        setp_formateur();
        setp_lms_class_code();
        setp_nb_participant();
        setp_prix_session();
        setp_session_etape_label();
        setp_session_etape();
        setp_session_status_label();
        setp_session_status();
        setp_session_presentiel_label();
        setp_session_presentiel();
        setp_session_distance_label();
        setp_session_distance();
        setp_session_ondemande_label();
        setp_session_ondemande();



    }

    let [sessionStatus, setsessionStatus] = useState(false);
    const [selectedCertif, setselectedCertif] = useState();
    const [GetCurrentSession_id, setGetCurrentSession_id] = useState();

    const [urlpreview_certif, seturlpreview_certif] = useState();

    const [GetSpecificAttestation_Certif_api, setGetSpecificAttestation_Certif_api] = useState();
    const [GetSpecificAttestation_Certif_message, setGetSpecificAttestation_Certif_message] = useState();
    const [GetSpecificAttestation_Certif_result, setGetSpecificAttestation_Certif_result] = useState();
    function GetSpecificAttestation_Certif(nom) {
        clean_old_messages();
        var form = new FormData();

        const stored_cookie = getCookie('tokenmysypart');
        form.append("token", stored_cookie);
        form.append("nom", nom);

        var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetSpecificPartnerAttestation_Certificat/";

        axios.post(myurl, form).then(res => {

            if (String(res.data.status) === "true") {
                //console.log(" In GetSpecificAttestation_Certif  res.data.status = " + res.data.status);
                //console.log(" In GetSpecificAttestation_Certif  res.data.message r_class = " + res.data.message);
                setGetSpecificAttestation_Certif_api("true");
                setGetSpecificAttestation_Certif_result(res.data.message);

                var mylocal = JSON.parse(res.data.message);
                //console.log(" ####  (mylocal.preview_url = ", mylocal.preview_url);
                seturlpreview_certif(mylocal.preview_url);


            }
            else if (String(res.data.status) === String("Err_Connexion")) {
                alert('Erreur: ' + res.data.message);
                history.push("/Connexion");
            }
            else {
                setGetSpecificAttestation_Certif_api("false");
                setGetSpecificAttestation_Certif_message(res.data.message);
            }

        }).catch((error) => {
            console.warn('Not good man :( GetSpecificAttestation_Certif = ', error);
            setGetSpecificAttestation_Certif_api("false");

        })
    }


    const [GetCurrentSession_api, setGetCurrentSession_api] = useState();
    const [GetCurrentSession_message, setGetCurrentSession_message] = useState();
    const [GetCurrentSession_result, setGetCurrentSession_result] = useState();
    function GetCurrentSession(local_session_id, local_selected_internal_url) {

        clean_old_messages();
        clearSessionFields();

        var form = new FormData();
        //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
        const stored_cookie = getCookie('tokenmysypart');
        form.append("token", stored_cookie);
        form.append("class_internal_url", local_selected_internal_url);
        form.append("session_id", local_session_id);

        var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetSessionFormation/";

        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);

                setGetCurrentSession_api("true");
                if (String(res.data.message).length > 0) {
                    setGetCurrentSession_result(res.data.message);
                    var mylocaltraining = JSON.parse(res.data.message);

                    if (mylocaltraining._id) {
                        setGetCurrentSession_id(mylocaltraining._id);
                    }

                    if (mylocaltraining.session_status) {
                        setp_session_status(mylocaltraining.session_status);
                        if (String(mylocaltraining.session_status) === "1")
                            setp_session_status_label("Actif");
                        else
                            setp_session_status_label("Inactif");
                    }

                    if (mylocaltraining.session_etape) {
                        setp_session_etape(mylocaltraining.session_etape);
                        if (String(mylocaltraining.session_etape) === "0")
                            setp_session_etape_label("Projet");
                        else if (String(mylocaltraining.session_etape) === "1")
                            setp_session_etape_label("Planification");
                        else if (String(mylocaltraining.session_etape) === "2")
                            setp_session_etape_label("Planifiée");
                        else if (String(mylocaltraining.session_etape) === "3")
                            setp_session_etape_label("Terminée");
                        else if (String(mylocaltraining.session_etape) === "4")
                            setp_session_etape_label("Facturée");
                        else if (String(mylocaltraining.session_etape) === "-1")
                            setp_session_etape_label("Annulée");

                    } else {


                        setp_session_etape_label("Projet");
                        setp_session_etape("0");
                    }



                    if (mylocaltraining.date_debut) {
                        //var date_du = new Date(moment(mylocaltraining.date_debut, "DD/MM/YYYY HH:mm:ss"));
                        setSessionstartDate(String(mylocaltraining.date_debut).substring(0, 10));
                    }

                    if (mylocaltraining.date_fin) {

                        setSessionendDate(String(mylocaltraining.date_fin).substring(0, 10));
                    }

                    if (mylocaltraining.date_debut_inscription) {

                        setSessionstartDateInscription(String(mylocaltraining.date_debut_inscription).substring(0, 10));

                    }

                    if (mylocaltraining.date_fin_inscription) {

                        setSessionendDateInscription(String(mylocaltraining.date_fin_inscription).substring(0, 10));
                    }

                    if (mylocaltraining.attestation_certif) {
                        setselectedCertif(mylocaltraining.attestation_certif);
                        GetSpecificAttestation_Certif(mylocaltraining.attestation_certif);

                    }


                    if (mylocaltraining.myclass[0].title)
                        setp_myclass_title(mylocaltraining.myclass[0].title);



                    if (mylocaltraining.code_session)
                        setp_code_session(mylocaltraining.code_session);


                    if (mylocaltraining.nb_participant)
                        setp_nb_participant(mylocaltraining.nb_participant);


                    if (mylocaltraining.prix_session)
                        setp_prix_session(mylocaltraining.prix_session);

                    if (mylocaltraining.distantiel) {
                        setp_session_distance(mylocaltraining.distantiel);
                        if (String(mylocaltraining.distantiel) === "1")
                            setp_session_distance_label("Oui");
                        else
                            setp_session_distance_label("Non")
                    }


                    if (mylocaltraining.session_ondemande) {
                        setp_session_ondemande(mylocaltraining.session_ondemande);
                        if (String(mylocaltraining.session_ondemande) === "1")
                            setp_session_ondemande_label("Oui");
                        else
                            setp_session_ondemande_label("Non")

                    }

                    if (mylocaltraining.presentiel) {
                        setp_session_presentiel(mylocaltraining.presentiel);
                        if (String(mylocaltraining.presentiel) === "1")
                            setp_session_presentiel_label("Oui");
                        else
                            setp_session_presentiel_label("Non")
                    }

                    if (mylocaltraining.contenu_ftion)
                        setfield_contenu_ftion(mylocaltraining.contenu_ftion);




                    if (mylocaltraining.adresse)
                        setp_adresse(mylocaltraining.adresse);


                    if (mylocaltraining.ville) {
                        setp_ville(mylocaltraining.ville);
                    }


                    if (mylocaltraining.ville) {
                        setp_pays(mylocaltraining.pays);
                    }


                    if (mylocaltraining.formateur) {
                        setp_formateur(mylocaltraining.formateur);
                    }


                    if (mylocaltraining.lms_class_code) {

                        setis_lms_class_code(mylocaltraining.lms_class_code);
                    }


                    if (mylocaltraining.code_postal)
                        setp_code_postal(mylocaltraining.code_postal);


                    if (String(mylocaltraining.session_status) === "true")
                        setsessionStatus(true);
                    else if (String(mylocaltraining.session_status) === "false")
                        setsessionStatus(false);


                    if (myRef.current) {
                        myRef.current.scrollIntoView({ behavior: "smooth" });
                    }
                }

            } else if (String(res.data.status) === String("Err_Connexion")) {
                alert('Erreur: ' + res.data.message);
                history.push("/Connexion");
            }

            else {
                setGetCurrentSession_api("false");
                setGetCurrentSession_message(res.data.message);
                alert("Erreur : " + res.data.message);
            }

        }).catch((error) => {
            console.warn('Not good man :( GetCurrentSession = ', error);
            setGetCurrentSession_api("false");

        })
    }


    function desableSessionFields() {

        if (document.getElementsByName("myclass_title")[0]) {
            document.getElementsByName("myclass_title")[0].disabled = true;
            document.getElementsByName("myclass_title")[0].style.backgroundColor = "#ECEFF1";
        }

        if (document.getElementsByName("code_session")[0]) {
            document.getElementsByName("code_session")[0].disabled = true;
            document.getElementsByName("code_session")[0].style.backgroundColor = "#ECEFF1";
        }

        if (document.getElementsByName("session_status")[0]) {
            document.getElementsByName("session_status")[0].disabled = true;
            document.getElementsByName("session_status")[0].style.backgroundColor = "#ECEFF1";
        }

        if (document.getElementsByName("session_etape")[0]) {
            document.getElementsByName("session_etape")[0].disabled = true;
            document.getElementsByName("session_etape")[0].style.backgroundColor = "#ECEFF1";
        }

        if (document.getElementsByName("sessiondatedebut")[0]) {
            document.getElementsByName("sessiondatedebut")[0].disabled = true;
            document.getElementsByName("sessiondatedebut")[0].style.backgroundColor = "#ECEFF1";
        }

        if (document.getElementsByName("sessiondatefin")[0]) {
            document.getElementsByName("sessiondatefin")[0].disabled = true;
            document.getElementsByName("sessiondatefin")[0].style.backgroundColor = "#ECEFF1";
        }


        if (document.getElementsByName("adresse")[0]) {
            document.getElementsByName("adresse")[0].disabled = true;
            document.getElementsByName("adresse")[0].style.backgroundColor = "#ECEFF1";
        }

        if (document.getElementsByName("code_postal")[0]) {
            document.getElementsByName("code_postal")[0].disabled = true;
            document.getElementsByName("code_postal")[0].style.backgroundColor = "#ECEFF1";
        }

        if (document.getElementsByName("ville")[0]) {
            document.getElementsByName("ville")[0].disabled = true;
            document.getElementsByName("ville")[0].style.backgroundColor = "#ECEFF1";
        }


        if (document.getElementsByName("pays")[0]) {
            document.getElementsByName("pays")[0].disabled = true;
            document.getElementsByName("pays")[0].style.backgroundColor = "#ECEFF1";
        }

        if (document.getElementsByName("formateur")[0]) {
            document.getElementsByName("formateur")[0].disabled = true;
            document.getElementsByName("formateur")[0].style.backgroundColor = "#ECEFF1";
        }


        if (document.getElementsByName("lms_class_code")[0]) {
            document.getElementsByName("lms_class_code")[0].disabled = true;
            document.getElementsByName("lms_class_code")[0].style.backgroundColor = "#ECEFF1";
        }


        if (document.getElementsByName("nb_participant")[0]) {
            document.getElementsByName("nb_participant")[0].disabled = true;
            document.getElementsByName("nb_participant")[0].style.backgroundColor = "#ECEFF1";
        }

        if (document.getElementsByName("prix_session")[0]) {
            document.getElementsByName("prix_session")[0].disabled = true;
            document.getElementsByName("prix_session")[0].style.backgroundColor = "#ECEFF1";
        }

        if (document.getElementsByName("session_ondemande")[0]) {
            document.getElementsByName("session_ondemande")[0].disabled = true;
            document.getElementsByName("session_ondemande")[0].style.backgroundColor = "#ECEFF1";
        }

        if (document.getElementsByName("presentiel")[0]) {
            document.getElementsByName("presentiel")[0].disabled = true;
            document.getElementsByName("presentiel")[0].style.backgroundColor = "#ECEFF1";
        }

        if (document.getElementsByName("distantiel")[0]) {
            document.getElementsByName("distantiel")[0].disabled = true;
            document.getElementsByName("distantiel")[0].style.backgroundColor = "#ECEFF1";
        }

        if (document.getElementsByName("sessiondatedebutinscription")[0]) {
            document.getElementsByName("sessiondatedebutinscription")[0].disabled = true;
            document.getElementsByName("sessiondatedebutinscription")[0].style.backgroundColor = "#ECEFF1";
        }

        if (document.getElementsByName("sessiondatefininscription")[0]) {
            document.getElementsByName("sessiondatefininscription")[0].disabled = true;
            document.getElementsByName("sessiondatefininscription")[0].style.backgroundColor = "#ECEFF1";
        }

        setfields1desabled(true);

    }
    return (
        <div className="displaypartnerstagiaire">
            <Dialog
                open={Dialog_1_open}
                onClose={Dialog_1_handleClose}

            >

                <DialogTitle>MySy Information</DialogTitle>
                <DialogContent>
                    <DialogContentText>
                        {Dialog_1_message}
                    </DialogContentText>

                </DialogContent>

                <DialogActions>
                    <Button onClick={Dialog_1_handleClose_buton}>OK</Button>

                </DialogActions>
            </Dialog>



            <h3> Vos stagiaires </h3>
            <div className="div_row">
                <div className="titre1">  Utilisez les filtres !</div>
                <div className="div_row" style={{ "marginBottom": "5px" }}>
                    <div className="div_row_gauche texte_area_filter" >
                        <TextField
                            name="filtre1"
                            label="Choisir un champ"
                            select
                            sx={{ m: 1, width: '100%' }}
                            value={p_filtre1}
                            onChange={(e) => {
                                setp_filtre1(e.target.value);

                            }}
                        >
                            <MenuItem value="email" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Email &nbsp;</MenuItem>
                            <MenuItem value="nom" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Nom  &nbsp;</MenuItem>
                            <MenuItem value="code_session" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Code Session &nbsp;&nbsp;</MenuItem>
                            <MenuItem value="class_title" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Titre Formation &nbsp;</MenuItem>


                        </TextField>
                    </div>



                    <div className="div_row_droite texte_area_filter_value" >
                        {p_filtre1 &&
                            <TextField
                                sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                required
                                name="filtre1_value"
                                id="filtre1_value"

                                InputLabelProps={{
                                    shrink: true,
                                }}
                                disabled={false}
                                className="disabled_style"
                                value={p_filtre1_value}
                                onChange={(e) => { setp_filtre1_value(e.target.value); }}
                                InputProps={{
                                    endAdornment: (
                                        <InputAdornment position="end">
                                            <AiFillCloseCircle
                                                style={{ 'cursor': "pointer", "color": "orangered" }}
                                                onClick={(e) => {
                                                    setp_filtre1_value("");
                                                }} />
                                        </InputAdornment>
                                    ),
                                }}

                            />

                        }
                    </div>
                    {p_filtre1 && <div className='filter_bton_add'>
                        <Tooltip id="my-tooltip01" style={{ "fontSize": "12px" }} />
                        <a data-tooltip-id="my-tooltip01" data-tooltip-content="Ajouter une nouvelle ligne de filtre">
                            &nbsp; <MdAddCircleOutline onClick={(e) => {
                                setp_filtre2("1");
                                setp_filtre2_value("");
                            }} />
                        </a>
                    </div>}
                    {p_filtre1 && <div className='filter_bton_add'>
                        <Tooltip id="my-tooltip02" style={{ "fontSize": "12px" }} />
                        <a data-tooltip-id="my-tooltip02" data-tooltip-content="Supprimer cette ligne de filtre">
                            &nbsp; <MdRemoveCircleOutline onClick={(e) => {
                                setp_filtre1();
                                setp_filtre1_value();
                            }}
                            />
                        </a>
                    </div>}


                </div>

                {p_filtre2 &&
                    <div className="div_row" style={{ "marginBottom": "5px" }}>
                        <div className="div_row_gauche texte_area_filter">
                            <TextField
                                name="filtre2"
                                label="Choisir un champ"
                                select
                                sx={{ m: 1, width: '100%' }}
                                options={filters}
                                value={p_filtre2}
                                onChange={(e) => {
                                    setp_filtre2(e.target.value);

                                }}
                            >
                                <MenuItem value="email" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Email &nbsp;</MenuItem>
                                <MenuItem value="nom" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Nom  &nbsp;</MenuItem>
                                <MenuItem value="code_session" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Code Session &nbsp;&nbsp;</MenuItem>
                                <MenuItem value="class_title" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Titre Formation &nbsp;</MenuItem>


                            </TextField>
                        </div>
                        <div className="div_row_droite texte_area_filter_value" style={{ "marginTop": "0.5rem" }}>
                            {String(p_filtre2).length > 2 &&
                                <TextField
                                    sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                    required
                                    name="filtre2_value"
                                    id="filtre2_value"

                                    InputLabelProps={{
                                        shrink: true,
                                    }}
                                    disabled={false}
                                    className="disabled_style"
                                    value={p_filtre2_value}
                                    onChange={(e) => setp_filtre2_value(e.target.value)}
                                    InputProps={{
                                        endAdornment: (
                                            <InputAdornment position="end">
                                                <AiFillCloseCircle
                                                    style={{ 'cursor': "pointer", "color": "orangered" }}
                                                    onClick={(e) => {
                                                        setp_filtre2_value("");
                                                    }} />
                                            </InputAdornment>
                                        ),
                                    }}

                                />}
                        </div>

                        {String(p_filtre2).length > 2 && <div className='filter_bton_add' >
                            <Tooltip id="my-tooltip03" style={{ "fontSize": "12px" }} />
                            <a data-tooltip-id="my-tooltip03" data-tooltip-content="Ajouter une nouvelle ligne de filtre">
                                &nbsp; <MdAddCircleOutline
                                    onClick={(e) => {
                                        setp_filtre3("1");
                                        setp_filtre3_value("");
                                    }}
                                />
                            </a>
                        </div>}

                        {String(p_filtre2).length > 2 && <div className='filter_bton_add'>
                            <Tooltip id="my-tooltip04" style={{ "fontSize": "12px" }} />
                            <a data-tooltip-id="my-tooltip04" data-tooltip-content="Supprimer cette ligne de filtre">
                                &nbsp; <MdRemoveCircleOutline
                                    onClick={(e) => {
                                        setp_filtre2();
                                        setp_filtre2_value();
                                    }}
                                />
                            </a>
                        </div>}

                    </div>
                }


                {p_filtre3 &&
                    <div className="div_row" style={{ "marginBottom": "5px" }}>
                        <div className="div_row_gauche texte_area_filter">
                            <TextField
                                name="filtre3"
                                label="Choisir un champ"
                                select
                                sx={{ m: 1, width: '100%' }}
                                options={filters}
                                value={p_filtre3}
                                onChange={(e) => {
                                    setp_filtre3(e.target.value)
                                }}
                            >
                                <MenuItem value="email" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Email &nbsp;</MenuItem>
                                <MenuItem value="nom" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Nom  &nbsp;</MenuItem>
                                <MenuItem value="code_session" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Code Session &nbsp;&nbsp;</MenuItem>
                                <MenuItem value="class_title" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Titre Formation &nbsp;</MenuItem>


                            </TextField>
                        </div>
                        <div className="div_row_droite texte_area_filter_value" style={{ "marginTop": "0.5rem" }}>
                            {String(p_filtre3).length > 2 &&
                                <TextField
                                    sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                    required
                                    name="filtre3_value"
                                    id="filtre3_value"

                                    InputLabelProps={{
                                        shrink: true,
                                    }}
                                    disabled={false}
                                    className="disabled_style"
                                    value={p_filtre3_value}
                                    onChange={(e) => setp_filtre3_value(e.target.value)}
                                    InputProps={{
                                        endAdornment: (
                                            <InputAdornment position="end">
                                                <AiFillCloseCircle
                                                    style={{ 'cursor': "pointer", "color": "orangered" }}
                                                    onClick={(e) => {
                                                        setp_filtre3_value("");
                                                    }} />
                                            </InputAdornment>
                                        ),
                                    }}

                                />}
                        </div>

                        {String(p_filtre2).length > 2 && <div className='filter_bton_add' >
                            <Tooltip id="my-tooltip03" style={{ "fontSize": "12px" }} />
                            <a data-tooltip-id="my-tooltip03" data-tooltip-content="Ajouter une nouvelle ligne de filtre">
                                &nbsp; <MdAddCircleOutline
                                    onClick={(e) => {
                                        setp_filtre4("1");
                                        setp_filtre4_value("");
                                    }}
                                />
                            </a>
                        </div>}

                        {String(p_filtre3).length > 2 && <div className='filter_bton_add'>
                            <Tooltip id="my-tooltip05" style={{ "fontSize": "12px" }} />
                            <a data-tooltip-id="my-tooltip05" data-tooltip-content="Supprimer cette ligne de filtre">
                                &nbsp; <MdRemoveCircleOutline onClick={(e) => {
                                    setp_filtre3();
                                    setp_filtre3_value();
                                }} />
                            </a>
                        </div>}
                    </div>
                }

                {p_filtre4 &&
                    <div className="div_row" style={{ "marginBottom": "5px" }}>
                        <div className="div_row_gauche texte_area_filter">
                            <TextField
                                name="filtre4"
                                label="Choisir un champ"
                                select
                                sx={{ m: 1, width: '100%' }}
                                options={filters}
                                value={p_filtre4}
                                onChange={(e) => {
                                    setp_filtre4(e.target.value)
                                }}
                            >
                                <MenuItem value="email" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Email &nbsp;</MenuItem>
                                <MenuItem value="nom" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Nom  &nbsp;</MenuItem>
                                <MenuItem value="code_session" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Code Session &nbsp;&nbsp;</MenuItem>
                                <MenuItem value="class_title" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Titre Formation &nbsp;</MenuItem>


                            </TextField>
                        </div>
                        <div className="div_row_droite texte_area_filter_value" style={{ "marginTop": "0.5rem" }}>
                            {String(p_filtre4).length > 2 &&
                                <TextField
                                    sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                    required
                                    name="filtre4_value"
                                    id="filtre4_value"

                                    InputLabelProps={{
                                        shrink: true,
                                    }}
                                    disabled={false}
                                    className="disabled_style"
                                    value={p_filtre4_value}
                                    onChange={(e) => setp_filtre2_value(e.target.value)}
                                    InputProps={{
                                        endAdornment: (
                                            <InputAdornment position="end">
                                                <AiFillCloseCircle
                                                    style={{ 'cursor': "pointer", "color": "orangered" }}
                                                    onClick={(e) => {
                                                        setp_filtre4_value("");
                                                    }} />
                                            </InputAdornment>
                                        ),
                                    }}

                                />}
                        </div>



                        {String(p_filtre2).length > 2 && <div className='filter_bton_add'>
                            <Tooltip id="my-tooltip04" style={{ "fontSize": "12px" }} />
                            <a data-tooltip-id="my-tooltip04" data-tooltip-content="Supprimer cette ligne de filtre">
                                &nbsp; <MdRemoveCircleOutline
                                    onClick={(e) => {
                                        setp_filtre4();
                                        setp_filtre4_value();
                                    }}
                                />
                            </a>
                        </div>}

                    </div>
                }
                <div className="div_row" ref={myRef_head} style={{ "border": "None", "color": "orange", "textAlign": "center" }}>

                    <div className="div_row_gauche" style={{ "textAlign": 'left', 'marginLeft': '15px' }}>
                        <Button variant="contained" className="bton_enreg" onClick={Getall_TrainingParticipant}>Rechercher
                        </Button>
                    </div>

                    <div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
                        <Button variant="contained" className="bton_annule" onClick={clean_all_filters}>Annuler
                        </Button>

                    </div>

                </div>
            </div>

            <div style={{ "textAlign": "left", "float": "left", "width": "100%" }} id="participant_menu_tab">

                <div className="session_data">
                    <div style={{ "border": "None" }}>

                        <div style={{ height: 550, width: '100%', paddingRight: '1px' }}>
                            &nbsp;
                            <Box
                                sx={{
                                    height: 500,
                                    width: '100%',
                                    paddingRight: '1px',

                                    // Gestion des cellule a distance ou presentiel
                                    '& .cell--distantiel': {
                                        backgroundColor: '#AFE1AF',
                                        color: 'black',
                                    },

                                    '& .cell--presentiel': {
                                        backgroundColor: '#AFE1AF',
                                        color: 'black',
                                    },


                                    // gestion couleur des lignes avec le statut d'inscription
                                    '& .line--statut--annule': {
                                        backgroundColor: '#D8D8D8',
                                        color: 'white',
                                    },

                                    '& .line--statut--inscrit': {
                                        backgroundColor: '#CEF6D8',
                                        color: 'black',
                                    },
                                    '& .line--statut--preinscrit': {
                                        backgroundColor: '#F7F2E0',
                                        color: 'black',
                                    },

                                    /*"& .MuiDataGrid-virtualScrollerRenderZone": {
                                        "& .MuiDataGrid-row": {
                                            "&:nth-child(2n)": { backgroundColor: "rgba(235, 235, 235, .7)" }
                                        }
                                    },*/
                                    "& .MuiDataGrid-columnHeaders": {
                                        backgroundColor: "#c8cfd5",
                                        color: "black",
                                        fontSize: 14
                                    },

                                }}
                            >
                                <DataGrid
                                    checkboxSelection
                                    onSelectionModelChange={(newSelectionModel) => {
                                        setSelectionModel(newSelectionModel);
                                        if (newSelectionModel.length === 1)
                                            handleClick_edit_session_From_Line(newSelectionModel);
                                        if (newSelectionModel.length !== 1) {
                                            setaddOneParticipant();
                                            setdisplay_detail_stagiaire();
                                            setselected_code_session();
                                            setsubmenu();
                                        }
                                    }}
                                    selectionModel={selectionModel}

                                    localeText={frFR.components.MuiDataGrid.defaultProps.localeText}
                                    rows={rowss.map((item, index) => (
                                        {
                                            id: index,
                                            _id: JSON.parse(item)._id,
                                            class_internal_url: JSON.parse(item).class_internal_url,
                                            code_session: JSON.parse(item).code_session,
                                            session_id: JSON.parse(item).session_id,
                                            email: JSON.parse(item).email,
                                            nom: JSON.parse(item).nom,
                                            prenom: JSON.parse(item).prenom,
                                            employeur: JSON.parse(item).employeur,
                                            status: JSON.parse(item).status,
                                            title: JSON.parse(item).title,
                                            distantiel: JSON.parse(item).distantiel,
                                            presentiel: JSON.parse(item).presentiel,
                                            domaine: JSON.parse(item).domaine,
                                            date_debut: JSON.parse(item).date_du,
                                            date_fin: JSON.parse(item).date_au,

                                        }
                                    ))}

                                    columns={columns}
                                    pageSize={10}
                                    className="datagridclass"

                                    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';
                                        }


                                        //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) => {

                                        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';
                                        }
                                    }}


                                />
                            </Box>
                            <br />

                        </div>

                    </div>

                </div>

                <div className="div_row" style={{ "border": "None" }}>

                    <div className="div_row_gauche div_row_gauche_etendu" style={{ "textAlign": "left", "paddingLeft": "5px" }}>

                        <Button variant="outlined" onClick={submenu_import_stagiaire} className="detail_class_submenu bton_import_excel"
                            id='menu_import_participant' name='menu_import_participant'>Importer des Stagiaires Excel &nbsp;
                            <img src={excel_icone} alt="ajout csv" className="icon_excel" />
                        </Button>


                        <Button variant="outlined" onClick={submenu_add_one_stagiaire}
                            className="detail_class_submenu bton_add_session"
                            id='menu_import_participant' name='menu_import_participant'>Ajout 1 Stagiaire &nbsp;
                            <img src={add_plus} alt="ajout session" className="icon_plus" />
                        </Button>

                        <br />
                        {session_file_name && <nav><i>{session_file_name}</i></nav>}
                        {String(liste_sessions_file_change_api) === String("true") && <nav className="okUpdateData"> Les stagiaires ont été correctement importés</nav>}
                        {String(liste_sessions_file_change_api) === String("false") && <nav className="koUpdateData"> {liste_sessions_file_change_message} </nav>}

                        <input type="file"
                            accept=".csv"
                            ref={hiddenFileInput_session}
                            style={{ display: 'none' }}
                            name="liste_sessions_file"
                            onChange={liste_sessions_file_change}
                        />

                        <a href='/sample/template_import_session_plusieurs_formations.csv' download>Télécharger un fichier modèle</a>
                    </div>
                </div>
                <div className="div_row"> &nbsp;</div>
                <div className="div_row">
                    <Button variant="outlined" ref={myRef} onClick={submenu_detail_stagaire} className="detail_class_submenu" id='detail_session' name='detail_session'>Détail Stagiaire</Button>
                    <Button variant="outlined" onClick={submenu_sessions} className="detail_class_submenu" id='preinscrit' name='preinscrit'>Détail Session </Button>

                </div>



                {String(addOneParticipant) === "1" && <div className="div_row session_data" style={{ "border": "None", "backgroundColor": "#F0F0F0" }}>
                    <nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}> Ajouter un nouveau stagiaire </nav>

                    <div className="session_caract"> Formation <br />
                        <TextField
                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                            required
                            name="one_formation"
                            id="one_formation"
                            select
                            InputLabelProps={{
                                shrink: true,
                            }}
                            disabled={false}
                            className="disabled_style"
                            value={p_one_formation}
                            onChange={(e) => {
                                handle_change_p_one_formation(e);

                            }
                            }

                        >
                            {GetCurrentPartnerClass_result &&
                                GetCurrentPartnerClass_result.map((myclass) => (
                                    <MenuItem key={JSON.parse(myclass).title} value={JSON.parse(myclass).internal_url} style={{ "paddingLeft": "5px", "textAlign": "left", }}>
                                        {JSON.parse(myclass).title}

                                    </MenuItem>
                                ))}
                        </TextField>
                    </div>

                    <div className="session_caract"> Session <br />
                        <TextField
                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                            required
                            name="one_detail_session"
                            id="one_detail_session"
                            select
                            InputLabelProps={{
                                shrink: true,
                            }}
                            disabled={false}
                            className="disabled_style"
                            value={p_one_detail_session_class}
                            onChange={(e) => {
                                setp_one_detail_session_class(e.target.value);

                            }
                            }

                        >
                            {p_one_formation && Getall_TrainingSession_result &&
                                Getall_TrainingSession_result.filter((session_ch) => JSON.parse(session_ch).class_internal_url === p_one_formation).map((mysession) => (
                                    <MenuItem key={JSON.parse(mysession).code_session} value={JSON.parse(mysession)._id}
                                        style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontSize": "12px" }}>
                                        {JSON.parse(mysession).code_session}&nbsp;&nbsp;

                                    </MenuItem>
                                ))}
                            {!p_one_formation && Getall_TrainingSession_result &&
                                Getall_TrainingSession_result.map((mysession) => (
                                    <MenuItem key={JSON.parse(mysession).code_session} value={JSON.parse(mysession)._id}
                                        style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontSize": "12px" }}>
                                        {JSON.parse(mysession).code_session}&nbsp;&nbsp;

                                    </MenuItem>
                                ))}
                        </TextField>
                    </div>



                    <div className="session_caract"> Nom *<br />
                        <TextField
                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                            required
                            name="one_nom_part"
                            id="one_nom_part"

                            InputLabelProps={{
                                shrink: true,
                            }}
                            disabled={false}
                            className="disabled_style enable_style"
                            value={p_one_nom_part}
                            onChange={(e) => {
                                setp_one_nom_part(e.target.value);
                            }
                            }

                        />
                    </div>


                    <div className="session_caract"> Prenom *<br />
                        <TextField
                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                            required
                            name="one_prenom_part"
                            id="one_prenom_part"

                            InputLabelProps={{
                                shrink: true,
                            }}
                            disabled={false}
                            className="disabled_style enable_style"
                            value={p_one_prenom_part}
                            onChange={(e) => {
                                setp_one_prenom_part(e.target.value);
                            }
                            }
                        />
                    </div>

                    <div className="session_caract"> Email *<br />
                        <TextField
                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                            required
                            name="one_email_part"
                            id="one_email_part"

                            InputLabelProps={{
                                shrink: true,
                            }}
                            disabled={false}
                            className="disabled_style enable_style"
                            value={p_one_email_part}
                            onChange={(e) => {
                                setp_one_email_part(e.target.value);
                            }
                            }
                        />
                    </div>

                    <div className="session_caract"> téléphone *<br />
                        <TextField
                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                            required
                            name="one_phone_part"
                            id="one_phone_part"

                            InputLabelProps={{
                                shrink: true,
                            }}
                            disabled={false}
                            className="disabled_style enable_style"
                            value={p_one_phone_part}
                            onChange={(e) => {
                                setp_one_phone_part(e.target.value);
                            }
                            }
                        />
                    </div>


                    <div className="session_caract"> Adresse <br />
                        <TextField
                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                            required
                            name="one_adresse_part"
                            id="one_adresse_part"

                            InputLabelProps={{
                                shrink: true,
                            }}
                            disabled={false}
                            className="disabled_style enable_style"
                            value={p_one_adresse_part}
                            onChange={(e) => {
                                setp_one_adresse_part(e.target.value);
                            }
                            }
                        />
                    </div>


                    <div className="session_caract"> Code postal <br />
                        <TextField
                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                            required
                            name="one_code_postal_part"
                            id="one_code_postal_part"

                            InputLabelProps={{
                                shrink: true,
                            }}
                            disabled={false}
                            className="disabled_style enable_style"
                            value={p_one_code_postal_part}
                            onChange={(e) => {
                                setp_one_code_postal_part(e.target.value);
                            }
                            }
                        />
                    </div>


                    <div className="session_caract"> Ville <br />
                        <TextField
                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                            required
                            name="one_ville_part"
                            id="one_ville_part"

                            InputLabelProps={{
                                shrink: true,
                            }}
                            disabled={false}
                            className="disabled_style enable_style"
                            value={p_one_ville_part}
                            onChange={(e) => {
                                setp_one_ville_part(e.target.value);
                            }
                            }
                        />
                    </div>

                    <div className="session_caract"> Pays <br />
                        <TextField
                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                            required
                            name="one_pays_part"
                            id="one_pays_part"

                            InputLabelProps={{
                                shrink: true,
                            }}
                            disabled={false}
                            className="disabled_style enable_style"
                            value={p_one_pays_part}
                            onChange={(e) => {
                                setp_one_pays_part(e.target.value);
                            }
                            }
                        />
                    </div>




                    <div className="session_caract"> Status Inscription *<br />
                        <TextField
                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                            required
                            select
                            value={p_one_status_part}
                            onChange={(e) => {
                                setp_one_status_part(e.target.value);
                            }
                            }
                            name="one_status_part"
                            id="one_status_part"

                            InputLabelProps={{
                                shrink: true,
                            }}

                            disabled={false}
                            className="disabled_style enable_style"
                        >
                            {status_inscription.map((option) => (
                                <MenuItem key={option.value} value={option.value} style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontSize": "12px" }}>
                                    {option.label} &nbsp; <br />
                                </MenuItem>
                            ))}
                        </TextField>
                    </div>

                    <div className="session_caract"> Client <br />
                        <TextField
                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                            required
                            name="one_detail_client_rattachement"
                            id="one_detail_client_rattachement"
                            select
                            InputLabelProps={{
                                shrink: true,
                            }}
                            disabled={false}
                            className="disabled_style"
                            value={p_one_detail_client_rattachement_id}
                            onChange={(e) => {
                                setp_one_detail_client_rattachement_id(e.target.value);

                                //console.log(" setp_one_detail_client_rattachement_id = ", e.target.value);
                            }
                            }

                        >
                            {Get_List_Partner_Clients_result &&
                                Get_List_Partner_Clients_result.map((myclient) => (
                                    <MenuItem key={JSON.parse(myclient)._id} value={JSON.parse(myclient)._id}
                                        style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontSize": "12px" }}>
                                        {JSON.parse(myclient).nom}&nbsp;&nbsp;

                                    </MenuItem>
                                ))}
                        </TextField>
                    </div>

                    <div className="div_row" style={{ "border": "None" }}>
                        &nbsp;
                    </div>
                    {<div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>

                        <div className="div_row_gauche" style={{ "textAlign": 'left', 'marginLeft': '15px' }}>
                            <Button variant="contained" className="bton_enreg" onClick={One_Create_Participant}>Enregistrer le participant
                            </Button>
                        </div>

                        <div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
                            <Button variant="contained" className="bton_annule" onClick={annule_Add_One_Participant}>Annuler
                            </Button>

                        </div>

                    </div>}
                    <div className="div_row" style={{ "border": "None" }}>
                        &nbsp;
                    </div>

                </div>
                }


                {String(display_detail_stagiaire) === "1" && selected_code_session && <div className="div_row" style={{ "border": "None", "background": '#F8F9F9', "padding": '5px' }}>
                    <nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}> Détail inscrit </nav>
                    {String(GetAttendee_api) === "true" && <div className="div_row" style={{ "border": "None" }}>

                        {String(Resend_LMS_Credentials_api) === "true" && <div className="div_row okUpdateData" style={{ "textAlign": "center" }}>
                            Les identifiants de connexion ont été correctement envoyés</div>}


                        {String(Resend_LMS_Credentials_api) === "false" && <div className="div_row okUpdateData" style={{ "textAlign": "center" }}>
                            {Resend_LMS_Credentials_message}</div>}

                        <div className="div_row" style={{ "border": "None" }}>

                            <div className="div_row" style={{ "border": "None" }}>
                                <div className="div_row_gauche">

                                    <div className="div_row_bis" style={{ "marginBottom": "10px", "marginTop": "1rem" }} >
                                        <div className="div_row_gauche_image">
                                            <img class="img_class_logo" src={userimgclassprofil} /><br />

                                        </div>
                                        <div className="div_row_droite_image">
                                            <input type="file" id="files_img_class" accept="image/*" onChange={imglogoclasschangeHandler} style={{ opacity: "0", zIndex: "-1", maxWidth: "5px", maxHeight: "0px" }} /><br />
                                            {<nav>

                                                <label for="files_img_class" className="bton_image_class">Charger une photo</label><br />

                                                {String(userimgclassprofilchanged) === "1" &&
                                                    <nav className="bton_image_class" onClick={record_Stagiaire_Image}>Enregistrer la photo<br />  </nav>
                                                }

                                                {String(isimgclassSelected_recid) && String(isimgclassSelected_recid).length > 3 &&
                                                    <nav className="bton_supprime_image_class" onClick={removeRecodedLogoImage}>Supprimer la photo<br />  </nav>
                                                }
                                                {String(userimgclassprofilchanged) === "1" &&
                                                    <div className="koUpdateData" style={{ "color": "orange", "textAlign": "center" }}> /!\ Pensez à enregistrer la photo
                                                    </div>}


                                            </nav>}

                                            {/*isimgclassSelected && <Button variant="outlined" onClick={sendClassImage} className="bton_image_class">Enregistrer image</Button>*/}
                                            {isimgclassdeleted && String(isimgclassdeleted) === "1" && <nav className="koUpdateData"> {isimgclassdeleted_message}</nav>}
                                            {isimgclassdeleted && String(isimgclassdeleted) === "0" && <nav className="okUpdateData"> {isimgclassdeleted_message}</nav>}
                                            {isimgclassSelected && String(isimgclassSaved) === "0" && <nav className="koUpdateData"> {isimgclassSaved_message}</nav>}
                                        </div>

                                    </div>
                                    <div className="div_row_bis tips_img_class">
                                        <li>
                                            L'image doit etre carrée.
                                        </li>
                                        <li>
                                            Les formats autorisés sont : <i>['jpg', 'jpeg', 'png', 'jpe', 'webp']</i>
                                        </li>
                                        <li>
                                            Les dimensions recommandées: 128pixels X 128pixels --   144pixels X 144pixels --  168pixels X 168pixels<br />
                                            Les dimensions maximales sont de 256pixels X 256pixels
                                        </li>
                                        <li>
                                            La taille de l'image ne doit pas depasser 1 mega octet
                                        </li>
                                    </div>

                                </div>
                            </div>

                            <div className="session_data" >
                                <div>

                                    {String(participant_data_edit_mode) !== "1" && <div className="session_caract"> Session aa<br />
                                        <TextField
                                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                            required
                                            name="detail_session_class"
                                            id="detail_session_class"

                                            InputLabelProps={{
                                                shrink: true,
                                            }}
                                            disabled={false}
                                            className="disabled_style"
                                            value={p_detail_session_class}


                                        />

                                    </div>}


                                    {String(participant_data_edit_mode) === "1" && <div className="session_caract"> Session bb <br />
                                        <TextField
                                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                            required
                                            name="detail_session_class"
                                            id="detail_session_class"
                                            select
                                            InputLabelProps={{
                                                shrink: true,
                                            }}
                                            disabled={false}
                                            className="disabled_style"
                                            value={p_detail_session_class_id}
                                            onChange={(e) => {
                                                setp_detail_session_class(e.target.value);
                                                setparticipant_data_changed("1");
                                                setp_detail_session_class_id(e.target.value);
                                                Dialog_1_handle_change_participant_session(" Attention, vous allez modifier la session d'affectation du participant");
                                            }
                                            }

                                        >
                                            {Getall_TrainingSession_result &&
                                                Getall_TrainingSession_result.map((mysession) => (
                                                    <MenuItem key={JSON.parse(mysession)._id} value={JSON.parse(mysession)._id}
                                                        style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontSize": "12px" }}>
                                                        {JSON.parse(mysession).code_session}&nbsp;&nbsp;

                                                    </MenuItem>
                                                ))}
                                        </TextField>
                                    </div>}


                                    {String(participant_data_edit_mode) === "1" && <div className="session_caract"> Client <br />
                                        <TextField
                                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                            required
                                            name="detail_client_rattachement"
                                            id="detail_client_rattachement"
                                            select
                                            InputLabelProps={{
                                                shrink: true,
                                            }}
                                            disabled={false}
                                            className="disabled_style"
                                            value={p_detail_client_rattachement_nom}
                                            onChange={(e) => {
                                                //setp_detail_client_rattachement_id(e.target.value);
                                                setp_detail_client_rattachement_nom(e.target.value);
                                                setparticipant_data_changed("1");
                                                Dialog_1_handle_change_participant_session(" Attention, vous allez modifier le client de rattachement du participant");
                                            }
                                            }

                                        >
                                            {Get_List_Partner_Clients_result &&
                                                Get_List_Partner_Clients_result.map((myclient) => (
                                                    <MenuItem key={JSON.parse(myclient).nom} value={JSON.parse(myclient)._id}
                                                        style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontSize": "12px" }}>
                                                        {JSON.parse(myclient).nom}&nbsp;&nbsp;

                                                    </MenuItem>
                                                ))}
                                        </TextField>
                                    </div>}

                                    {String(participant_data_edit_mode) !== "1" && <div className="session_caract"> Client<br />
                                        <TextField
                                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                            required
                                            name="detail_client_rattachement"
                                            id="detail_client_rattachement"

                                            InputLabelProps={{
                                                shrink: true,
                                            }}
                                            disabled={false}
                                            className="disabled_style"
                                            value={p_detail_client_rattachement_nom}
                                        />

                                    </div>}

                                    {String(participant_data_edit_mode) !== "1" && <div className="session_caract"> Statut<br />
                                        <TextField
                                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                            required
                                            name="detail_status_inscript"
                                            id="detail_status_inscript"

                                            InputLabelProps={{
                                                shrink: true,
                                            }}
                                            disabled={false}
                                            className="disabled_style"
                                            value={p_detail_status_inscrit_label}
                                        />

                                    </div>}

                                    {String(participant_data_edit_mode) === "1" && <div className="session_caract"> Statut<br />
                                        <TextField
                                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                            required
                                            name="detail_status_inscript"
                                            id="detail_status_inscript"
                                            select
                                            InputLabelProps={{
                                                shrink: true,
                                            }}
                                            disabled={false}
                                            className="disabled_style"
                                            value={p_detail_status_inscrit}
                                            onChange={(e) => {
                                                setp_detail_status_inscrit(e.target.value);
                                                setparticipant_data_changed("1");
                                            }
                                            }

                                        >
                                            <MenuItem value="1" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Inscrit &nbsp;&nbsp;</MenuItem>
                                            <MenuItem value="0" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Preinscrit &nbsp;</MenuItem>
                                            <MenuItem value="-1" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Annule &nbsp;</MenuItem>
                                            <MenuItem value="2" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Encours &nbsp;</MenuItem>
                                        </TextField>
                                    </div>}


                                    <div className="session_caract"> Nom<br />
                                        <TextField
                                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                            required
                                            name="detail_nom"
                                            id="detail_nom"

                                            InputLabelProps={{
                                                shrink: true,
                                            }}
                                            disabled={false}
                                            className="disabled_style"
                                            value={p_detail_nom}
                                            onChange={(e) => {
                                                setp_detail_nom(e.target.value);
                                                setparticipant_data_changed("1");
                                            }
                                            }

                                        />
                                    </div>

                                    <div className="session_caract"> Prenom<br />
                                        <TextField
                                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                            required
                                            name="detail_prenom"
                                            id="detail_prenom"

                                            InputLabelProps={{
                                                shrink: true,
                                            }}
                                            disabled={false}
                                            className="disabled_style"
                                            value={p_detail_prenom}
                                            onChange={(e) => {
                                                setp_detail_prenom(e.target.value);
                                                setparticipant_data_changed("1");
                                            }}
                                        />
                                    </div>

                                    <div className="session_caract"> Email<br />
                                        <TextField
                                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                            required
                                            name="detail_mail"
                                            id="detail_mail"

                                            InputLabelProps={{
                                                shrink: true,
                                            }}
                                            disabled={false}
                                            className="disabled_style"
                                            value={p_detail_mail}
                                            onChange={(e) => {
                                                setp_detail_mail(e.target.value);
                                                setparticipant_data_changed("1");
                                            }
                                            }

                                        />
                                    </div>

                                    <div className="session_caract"> Téléphone <br />
                                        <TextField
                                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                            required
                                            name="detail_tel"
                                            id="detail_tel"

                                            InputLabelProps={{
                                                shrink: true,
                                            }}
                                            disabled={false}
                                            className="disabled_style"
                                            value={p_detail_tel}
                                            onChange={(e) => {
                                                setp_detail_tel(e.target.value);
                                                setparticipant_data_changed("1");
                                            }
                                            }
                                        />
                                    </div>


                                    <div className="session_caract"> Adresse<br />
                                        <TextField
                                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                            required
                                            name="detail_adresse"
                                            id="detail_adresse"

                                            InputLabelProps={{
                                                shrink: true,
                                            }}
                                            disabled={false}
                                            className="disabled_style"
                                            value={p_detail_adresse}
                                            onChange={(e) => {
                                                setp_detail_adresse(e.target.value);
                                                setparticipant_data_changed("1");
                                            }}
                                        />
                                    </div>
                                    <div className="session_caract"> Code postal<br />
                                        <TextField
                                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                            required
                                            name="detail_code_postal"
                                            id="detail_code_postal"

                                            InputLabelProps={{
                                                shrink: true,
                                            }}
                                            disabled={false}
                                            className="disabled_style"
                                            value={p_detail_code_postal}
                                            onChange={(e) => {
                                                setp_detail_code_postal(e.target.value);
                                                setparticipant_data_changed("1");
                                            }}
                                        />
                                    </div>
                                    <div className="session_caract"> Ville<br />
                                        <TextField
                                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                            required
                                            name="detail_ville"
                                            id="detail_ville"

                                            InputLabelProps={{
                                                shrink: true,
                                            }}
                                            disabled={false}
                                            className="disabled_style"
                                            value={p_detail_ville}
                                            onChange={(e) => {
                                                setp_detail_ville(e.target.value);
                                                setparticipant_data_changed("1");
                                            }}
                                        />
                                    </div>

                                    <div className="session_caract"> Pays<br />
                                        <TextField
                                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                            required
                                            name="detail_pays"
                                            id="detail_pays"

                                            InputLabelProps={{
                                                shrink: true,
                                            }}
                                            disabled={false}
                                            className="disabled_style"
                                            value={p_detail_pays}
                                            onChange={(e) => {
                                                setp_detail_pays(e.target.value);
                                                setparticipant_data_changed("1");
                                            }}
                                        />
                                    </div>


                                    <div className="session_caract">
                                        Date Inscription
                                        <DatePicker
                                            name="detail_incr_date"
                                            id="detail_incr_date"
                                            selected={detailuser_date_inscription}

                                            dateFormat="dd/MM/yyyy"
                                            className="disabled_style"
                                            locale='fr-FR'

                                        />
                                    </div>


                                    <div className="session_caract"> Cout <br />
                                        <TextField sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                            required
                                            name="detail_cout"
                                            id="detail_cout"
                                            type="number"
                                            InputLabelProps={{
                                                shrink: true,
                                            }}
                                            inputProps={{ min: "1", max: "999999", step: "1" }}
                                            disabled={false}
                                            className="disabled_style"
                                            value={p_detail_cout}
                                            onChange={(e) => {
                                                setp_detail_cout(e.target.value);
                                                setparticipant_data_changed("1");
                                            }}
                                        />
                                    </div>


                                    <div className="session_caract"> Opco <br />
                                        <TextField sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                            required
                                            name="detail_opco"
                                            id="detail_opco"

                                            InputLabelProps={{
                                                shrink: true,
                                            }}

                                            disabled={false}
                                            className="disabled_style"
                                            value={p_detail_opco}
                                            onChange={(e) => {
                                                setp_detail_opco(e.target.value);
                                                setparticipant_data_changed("1");
                                            }}
                                        />
                                    </div>



                                    <div className="session_caract"> Mode Financement<br />
                                        <TextField
                                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                            required
                                            name="detail_mode_fin"
                                            id="detail_mode_fin"

                                            InputLabelProps={{
                                                shrink: true,
                                            }}
                                            disabled={false}
                                            className="disabled_style"
                                            value={p_detail_mode_fin}
                                            onChange={(e) => {
                                                setp_detail_mode_fin(e.target.value);
                                                setparticipant_data_changed("1");
                                            }}
                                        />
                                    </div>


                                    <div className="session_caract"> Employeur<br />
                                        <TextField
                                            sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                            required
                                            name="detail_employeur"
                                            id="detail_employeur"

                                            InputLabelProps={{
                                                shrink: true,
                                            }}
                                            disabled={false}
                                            className="disabled_style"
                                            value={p_detail_employeur}
                                            onChange={(e) => {
                                                setp_detail_employeur(e.target.value);
                                                setparticipant_data_changed("1");
                                            }}
                                        />
                                    </div>
                                    {is_lms_class_code && <div>
                                        <div className="div_row" style={{ "border": "None" }}>
                                            <hr className="hr_break" />
                                        </div>
                                        <div className="div_row" style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}>
                                            Acces LMS

                                        </div>
                                        <div className="div_row" style={{ "border": "None" }}>
                                            <div className="session_caract"> login LMS<br />
                                                <TextField
                                                    sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}

                                                    name="login_lms"
                                                    id="login_lms"
                                                    value={attendee_lms_login}
                                                    InputLabelProps={{
                                                        shrink: true,
                                                    }}
                                                    disabled={true}
                                                    className="disabled_style"
                                                    onChange={(e) => setattendee_lms_login(e.target.value)}
                                                />
                                            </div>

                                            <div className="session_caract"> Mot de passe LMS<br />
                                                <TextField
                                                    sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                                    required
                                                    type="password"
                                                    name="lms_pwd"
                                                    id="lms_pwd"
                                                    value="xxxxx"
                                                    InputLabelProps={{
                                                        shrink: true,
                                                    }}
                                                    disabled={true}
                                                    className="disabled_style"

                                                />
                                            </div>
                                            <div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>

                                                <Button variant="contained" className="bton_fermer" onClick={Resend_LMS_Credentials}> (R)envoyer les Identifiants
                                                </Button>

                                            </div>
                                        </div>
                                    </div>}
                                    <div className="div_row" style={{ "border": "None" }}>
                                        &nbsp;
                                    </div>
                                    {String(participant_data_changed) === "1" && String(participant_data_edit_mode) === "1" && <div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
                                        /!\ Pensez à enregistrer les modifications
                                    </div>}


                                    <div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>

                                        {String(participant_data_changed) === "1" && String(participant_data_edit_mode) === "1" && <div className="div_row_gauche" style={{ "textAlign": 'left', 'marginLeft': '15px' }}>

                                            <Button variant="contained" className="bton_enreg" onClick={Update_One_StagiaireData}>Enregistrer les modifications
                                            </Button>

                                        </div>}

                                        {String(participant_data_edit_mode) === "1" && <div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }} onClick={AnnuleAttendeeDetailFields}>
                                            <Button variant="contained" className="bton_annule" onClick={AnnuleAttendeeDetailFields}>Annuler
                                            </Button>
                                        </div>}
                                    </div>


                                    {String(participant_data_edit_mode) !== "1" && <div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>

                                        <Button variant="contained" className="bton_edit" onClick={EnableAttendeeDetailFields}>Editer
                                        </Button>


                                    </div>}


                                    <div className="div_row" style={{ "border": "None" }}>
                                        <hr className="hr_break" />
                                    </div>

                                </div>
                                <div className="div_row" style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}>
                                    Evaluation

                                </div>

                                <div className="div_row" style={{ "border": "None" }}>
                                    <div className="session_caract">
                                        Date Evaluation
                                        <DatePicker
                                            name="date_evaluation"
                                            id="date_evaluation"
                                            selected={detailuser_date_evaluation}
                                            dateFormat="dd/MM/yyyy"
                                            className="disabled_style"
                                            locale='fr-FR'


                                        />
                                    </div>

                                    <div className="session_caract"> Note Evaluation<br />
                                        <TextField sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                            required
                                            name="note_eval"
                                            id="note_eval"
                                            type="number"


                                            InputLabelProps={{
                                                shrink: true,
                                            }}
                                            inputProps={{ min: "0", max: "5", step: "1", readOnly: true, }}
                                            className="disabled_style"
                                            value={p_note_eval}

                                        />
                                    </div>

                                    <div className="session_caract"> Evaluation<br />
                                        <Editor
                                            onInit={(evt, editor) => editorRef_evaluation.current = editor}
                                            initialValue={field_evaluation}
                                            onKeyUp={editor_keyup}
                                            disabled={true}

                                            init={{
                                                resize: false,

                                                height: 100,
                                                menubar: false,
                                                plugins: [
                                                    'advlist autolink lists link image charmap print preview anchor',
                                                    'searchreplace visualblocks code fullscreen',
                                                    'insertdatetime media table paste code help wordcount'
                                                ],
                                                toolbar: false,
                                                content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px; }'
                                            }}
                                        />



                                    </div>


                                </div>


                                <div className="div_row" style={{ "border": "None" }}>
                                    &nbsp;
                                </div>

                                {<div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>

                                    <div className="div_row_gauche" style={{ "textAlign": 'left', 'marginLeft': '15px' }}>

                                        {String(SendEvaluationEmail_api) === "false" && <div className="div_row koUpdateData" style={{ "textAlign": "center" }}>
                                            {SendEvaluationEmail_message}</div>}


                                        {String(SendEvaluationEmail_api) === "true" && <div className="div_row okUpdateData" style={{ "textAlign": "center" }}>
                                            La demande d'evaluation ete envoyée par email </div>}


                                        <Button variant="contained" className="bton_enreg" onClick={SendEvaluationEmail}>Envoi demande evaluation
                                        </Button>

                                    </div>

                                    <div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>

                                        <Button variant="contained" className="bton_edit" onClick={DownloadAttendeeDetail}>Imprimer fiche detaillée
                                        </Button>

                                    </div>

                                </div>}
                                <div className="div_row" style={{ "border": "None" }}>
                                    <hr className="hr_break" />
                                </div>

                                <div className="div_row" style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}>
                                    Attestation

                                </div>
                                <div className="div_row" style={{ "border": "None" }}>
                                    {detailuser_date_certification && <div className="session_caract">
                                        Attestation delivrée le
                                        <DatePicker
                                            name="certif_date"
                                            id="certif_date"
                                            selected={detailuser_date_certification}

                                            dateFormat="dd/MM/yyyy"
                                            className="disabled_style"
                                            locale='fr-FR'


                                        />
                                    </div>}

                                    {!detailuser_date_certification && <div className="session_caract">
                                        Attestation NON délivrée encore
                                        <nav style={{ "visibility": "hidden" }}> <DatePicker
                                            name="certif_date"
                                            id="certif_date"
                                            selected={detailuser_date_certification}

                                            dateFormat="dd/MM/yyyy"
                                            className="disabled_style"
                                            locale='fr-FR'
                                            style={{ "visibility": "hidden" }}

                                        />
                                        </nav>
                                    </div>}

                                </div>
                                <div className="div_row" style={{ "border": "None" }}>
                                    &nbsp;
                                </div>



                                {<div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>

                                    <div className="div_row_gauche" style={{ "textAlign": 'left', 'marginLeft': '15px' }}>


                                        {String(SendAttendeeAttestation_api) === "true" &&
                                            <div className="div_row okUpdateData" style={{ "textAlign": "center" }}>
                                                L'attestation a été bien envoyée par email
                                            </div>}

                                        {String(SendAttendeeAttestation_api) === "false" &&
                                            <div className="div_row koUpdateData" style={{ "textAlign": "center" }}>
                                                {SendAttendeeAttestation_message}
                                            </div>}


                                        {!detailuser_date_certification && <Button variant="contained" className="bton_enreg" onClick={SendAttendeeAttestation}>Delivrer l'attestation de formation
                                        </Button>}
                                    </div>

                                    <div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>

                                        <Button variant="contained" className="bton_edit" onClick={DownloadAttendeeAttestation}>Imprimer l'attestation de formation
                                        </Button>




                                    </div>

                                </div>}
                                <div className="div_row" style={{ "border": "None" }}>
                                    &nbsp;
                                </div>


                            </div>


                        </div>

                    </div>}

                    {String(GetAttendee_api) === "false" && <div className="div_row koUpdateData">
                        {GetAttendee_message}
                    </div>}


                </div>}


                {String(submenu) === "sessions" && selected_code_session && <div className="div_row" style={{ "border": "None", "background": '#F8F9F9', "padding": '5px' }}>

                    <div className="session_data">
                        <div className="session_caract"> Formation <br />
                            <TextField
                                sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                required

                                name="myclass_title"
                                id="myclass_title"
                                text
                                InputLabelProps={{
                                    shrink: true,
                                }}
                                disabled={true}
                                className="disabled_style enable_style"
                                value={p_myclass_title}


                            />


                        </div>
                        <div className="session_caract"> Code Session<br />
                            <TextField
                                sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                required
                                name="code_session"
                                id="code_session"

                                InputLabelProps={{
                                    shrink: true,
                                }}
                                //disabled={true}
                                className="disabled_style"
                                value={p_code_session}


                            />
                        </div>


                        <div className="session_caract">Session à la demande* <br />
                            <TextField
                                name="session_ondemande"
                                id="session_ondemande"
                                text
                                InputLabelProps={{
                                    shrink: true,
                                }}
                                inputProps={{ min: "0", max: "1", step: "1" }}
                                disabled={false}
                                className="disabled_style enable_style"


                            />

                        </div>

                        <div className="session_caract">Statut * <br />
                            <TextField
                                name="session_status_not_change_font"
                                id="session_status_not_change_font"
                                value={p_session_status_label}
                                className="disabled_style enable_style"
                                style={{ "background": "#D2E6AA" }}
                                sx={{
                                    backgroundColor: '#ffd60a',
                                    border: '3px solid #001d3d',
                                }}
                                InputLabelProps={{
                                    sx: {
                                        color: '#003566',
                                        textTransform: 'capitalize',
                                    },
                                }}
                                disabled={false}

                                inputProps={{
                                    sx: {
                                        color: 'black',
                                        paddingLeft: '15px',
                                        //fontSize: '20px',
                                    },
                                }}
                            />
                        </div>

                        <div className="session_caract">Etape *<br />

                            <TextField
                                name="session_etape"
                                id="session_etape"
                                text
                                InputLabelProps={{
                                    shrink: true,
                                }}
                                inputProps={{ min: "0", max: "1", step: "1" }}
                                disabled={false}
                                className="disabled_style enable_style"
                                value={p_session_etape_label}

                            />

                        </div>

                        <div className="session_caract">
                            Date Debut
                            <TextField
                                name="sessiondatedebut"
                                id="sessiondatedebut"
                                text
                                InputLabelProps={{
                                    shrink: true,
                                }}
                                inputProps={{ min: "0", max: "1", step: "1" }}
                                disabled={false}
                                className="disabled_style"
                                value={SessionstartDate}
                            />


                        </div>

                        <div className="session_caract"> Date Fin
                            <TextField
                                name="sessiondatefin"
                                id="sessiondatefin"
                                text
                                InputLabelProps={{
                                    shrink: true,
                                }}
                                inputProps={{ min: "0", max: "1", step: "1" }}
                                disabled={false}
                                className="disabled_style"
                                value={SessionendDate}
                            />


                        </div>

                        <div className="session_caract"> Date Debut des inscriptions *
                            <TextField
                                name="sessiondatedebutinscription"
                                id="sessiondatedebutinscription"
                                text
                                InputLabelProps={{
                                    shrink: true,
                                }}
                                inputProps={{ min: "0", max: "1", step: "1" }}
                                disabled={false}
                                className="disabled_style"
                                value={SessionstartDateInscription}
                            />


                        </div>


                        <div className="session_caract"> Date Fin des inscriptions *
                            <TextField
                                name="sessiondatefininscription"
                                id="sessiondatefininscription"
                                text
                                InputLabelProps={{
                                    shrink: true,
                                }}
                                inputProps={{ min: "0", max: "1", step: "1" }}
                                disabled={false}
                                className="disabled_style"
                                value={SessionendDateInscription}
                            />


                        </div>

                        <div className="session_caract">Présentiel *<br />
                            <TextField
                                name="presentiel"
                                id="presentiel"
                                text
                                InputLabelProps={{
                                    shrink: true,
                                }}
                                inputProps={{ min: "0", max: "1", step: "1" }}
                                disabled={false}
                                className="disabled_style"
                                value={p_session_presentiel_label}
                            />

                        </div>

                        <div className="session_caract">A distance* <br />
                            <TextField
                                name="distantiel"
                                id="distantiel"
                                text
                                InputLabelProps={{
                                    shrink: true,
                                }}
                                inputProps={{ min: "0", max: "1", step: "1" }}
                                disabled={false}
                                className="disabled_style"
                                value={p_session_distance_label}
                            />

                        </div>

                        <div className="session_caract"> Adresse<br />
                            <TextField
                                sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                required
                                name="adresse"
                                id="adresse"
                                text
                                InputLabelProps={{
                                    shrink: true,
                                }}
                                disabled={false}
                                className="disabled_style"
                                value={p_adresse}


                            />
                        </div>
                        <div className="session_caract"> Code postal<br />
                            <TextField
                                sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                required
                                name="code_postal"
                                id="code_postal"

                                InputLabelProps={{
                                    shrink: true,
                                }}
                                disabled={false}
                                className="disabled_style"
                                value={p_code_postal}

                            />
                        </div>
                        <div className="session_caract"> Ville<br />
                            <TextField
                                sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                required
                                name="ville"
                                id="ville"

                                InputLabelProps={{
                                    shrink: true,
                                }}
                                disabled={false}
                                className="disabled_style"
                                value={p_ville}

                            />
                        </div>

                        <div className="session_caract"> Pays<br />
                            <TextField
                                sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                required
                                name="pays"
                                id="pays"

                                InputLabelProps={{
                                    shrink: true,
                                }}
                                disabled={false}
                                className="disabled_style"
                                value={p_pays}

                            />
                        </div>

                        <div className="session_caract"> Formateur<br />
                            <TextField
                                sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                required
                                name="formateur"
                                id="formateur"

                                InputLabelProps={{
                                    shrink: true,
                                }}
                                disabled={false}
                                className="disabled_style"
                                value={p_formateur}

                            />
                        </div>

                        <div className="session_caract"> Code Formation LMS
                            <i> (le code créé dans le LMS) </i>
                            <TextField
                                sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                required
                                name="lms_class_code"
                                id="lms_class_code"

                                InputLabelProps={{
                                    shrink: true,
                                }}
                                disabled={false}
                                className="disabled_style"
                                value={p_lms_class_code}

                            />
                        </div>


                        <div className="session_caract"> Nombre participants *<br />
                            <TextField sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                required
                                name="nb_participant"
                                id="nb_participant"
                                type="number"
                                InputLabelProps={{
                                    shrink: true,
                                }}
                                inputProps={{ min: "1", max: "1000", step: "1" }}
                                disabled={false}
                                className="disabled_style"
                                value={p_nb_participant}

                            />
                        </div>

                        <div className="session_caract"> Prix session <br />
                            <TextField sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
                                required
                                name="prix_session"
                                id="prix_session"
                                type="number"
                                InputLabelProps={{
                                    shrink: true,
                                }}
                                inputProps={{ min: "1", max: "1000", step: "1" }}
                                disabled={false}
                                className="disabled_style"
                                value={p_prix_session}

                            />
                        </div>


                    </div>

                </div>}



            </div>

        </div >
    );
}

export default DisplayPartnerStagiaires;

