22/08/23 - 20h

recette2
cherif 2023-08-22 20:00:07 +02:00
parent 7e1a459c25
commit 13b0564c98
1 changed files with 278 additions and 277 deletions

View File

@ -1264,6 +1264,8 @@ const DisplayPartnerStagiaires = (props) => {
alert(" Impossible d'importer les stagiaires ");
});
}
async function submenu_detail_stagaire() {
setsubmenu("detail_session");
@ -1572,7 +1574,7 @@ const DisplayPartnerStagiaires = (props) => {
else {
setGetAttendee_api("false");
setGetAttendee_message(res.data.message);
alert( res.data.message);
alert(res.data.message);
}
}).catch((error) => {
@ -1609,8 +1611,6 @@ const DisplayPartnerStagiaires = (props) => {
setselectedattendeeemail(email);
var prenom = cellValues.row.prenom;
GetAttendee_Data(email, selected_code_session);
getStagiaireImages(selected_internal_url, selected_code_session, email,);
}
@ -1985,97 +1985,18 @@ const DisplayPartnerStagiaires = (props) => {
<h3> Vos stagiaires </h3>
<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">
<div className="titre1"> Utilisez les filtres !</div>
<div className="div_row" style={{ "marginBottom": "5px" }}>
<div className="div_row_gauche texte_area_filter">
<div className="div_row_gauche texte_area_filter" >
<TextField
name="filtre2"
name="filtre1"
label="Choisir un champ"
select
sx={{ m: 1, width: '100%' }}
options={filters}
value={p_filtre2}
value={p_filtre1}
onChange={(e) => {
setp_filtre2(e.target.value);
setp_filtre1(e.target.value);
}}
>
@ -2087,226 +2008,306 @@ const DisplayPartnerStagiaires = (props) => {
</TextField>
</div>
<div className="div_row_droite texte_area_filter_value" style={{ "marginTop": "0.5rem" }}>
{String(p_filtre2).length > 2 &&
<div className="div_row_droite texte_area_filter_value" >
{p_filtre1 &&
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="filtre2_value"
id="filtre2_value"
name="filtre1_value"
id="filtre1_value"
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={p_filtre2_value}
onChange={(e) => setp_filtre2_value(e.target.value)}
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_filtre2_value("");
setp_filtre1_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();
{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>}
</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)
{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();
}}
>
<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>
{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>
<br />
</div>
<br />
<div style={{ "textAlign": "left", "float": "left", "width": "100%" }} id="participant_menu_tab">
<div className="session_data">
@ -2548,7 +2549,7 @@ const DisplayPartnerStagiaires = (props) => {
{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"}}>
style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontSize": "12px" }}>
{JSON.parse(mysession).code_session}&nbsp;&nbsp;
</MenuItem>
@ -2556,7 +2557,7 @@ const DisplayPartnerStagiaires = (props) => {
{!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" }}>
style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontSize": "12px" }}>
{JSON.parse(mysession).code_session}&nbsp;&nbsp;
</MenuItem>
@ -2703,7 +2704,7 @@ const DisplayPartnerStagiaires = (props) => {
{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"}}>
style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontSize": "12px" }}>
{JSON.parse(myclient).nom}&nbsp;&nbsp;
</MenuItem>
@ -2851,7 +2852,7 @@ const DisplayPartnerStagiaires = (props) => {
{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"}}>
style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontSize": "12px" }}>
{JSON.parse(mysession).code_session}&nbsp;&nbsp;
</MenuItem>
@ -2885,7 +2886,7 @@ const DisplayPartnerStagiaires = (props) => {
{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"}}>
style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontSize": "12px" }}>
{JSON.parse(myclient).nom}&nbsp;&nbsp;
</MenuItem>