02/08/2024 - 17h

recette2
cherif 2024-08-02 20:15:25 +02:00
parent 3a9b3ec036
commit 026534282f
1 changed files with 56 additions and 48 deletions

View File

@ -153,6 +153,7 @@ const Groupe_Apprenant = (props) => {
{ field: 'code', headerName: 'Code', flex: 1, hide: false, minWidth: 180, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'nom', headerName: 'Nom', flex: 1, hide: false, minWidth: 180, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'type_groupe_code', headerName: 'Type GRoupe', flex: 1, hide: false, minWidth: 180, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'nb_membre', headerName: 'Nb membres', flex: 1, hide: false, minWidth: 180, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'class_id', headerName: 'class_id', hide: true, Width: 0 },
{
@ -193,57 +194,65 @@ const Groupe_Apprenant = (props) => {
field: "delete", headerName: 'Supprimer',
renderCell: (cellValues) => {
return (
<Popup
trigger={<Button
>
<nav>
{String(cellValues.row.nb_membre) !== "0" && <Button onClick={(e) => {
alert(" Vous devez supprimer les membres avant de supprimer le groupe");
}}>
<CiTrash />
</Button>}
modal
nested
position="center center"
>
{close => (
<div>
<button className="gest_close" onClick={close}>
&times;
</button>
<div className="gest_header"> MySy Information </div>
<div className="gest_content">
{' '}
En confirmant cette opération, le groupe sera <i><font color="red"> définitivement supprimé</font></i>. <br />
{String(cellValues.row.nb_membre) === "0" &&
<Popup
trigger={<Button
</div>
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
handleClick_delete_groupe(event, cellValues);
//console.log('modal closed ');
close();
}}> Valider </button>
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
onClick={() => {
//console.log('modal closed ');
close();
}}
>
Annuler
>
<CiTrash />
</Button>}
modal
nested
position="center center"
>
{close => (
<div>
<button className="gest_close" onClick={close}>
&times;
</button>
<div className="gest_header"> MySy Information </div>
<div className="gest_content">
{' '}
En confirmant cette opération, le groupe sera <i><font color="red"> définitivement supprimé</font></i>. <br />
</div>
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
handleClick_delete_groupe(event, cellValues);
//console.log('modal closed ');
close();
}}> Valider </button>
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
onClick={() => {
//console.log('modal closed ');
close();
}}
>
Annuler
</button>
</div>
</div>
</div>
</div>
</div>
)}
</Popup>
)}
</Popup>}
</nav>
);
}
}
@ -1909,7 +1918,7 @@ const Groupe_Apprenant = (props) => {
Delete_LIST_Grp(liste_grp_apprenant);
}
}
const [Delete_LIST_Grp_api, setDelete_LIST_Grp_api] = useState();
@ -1942,7 +1951,7 @@ const Groupe_Apprenant = (props) => {
setselectionModel_grp_apprenant([]);
setgridline_id('');
window.scrollTo({
top: 0,
@ -1982,7 +1991,7 @@ const Groupe_Apprenant = (props) => {
//console.log(rowss[myid]['external_code']);
}
return tab_tmp;
return tab_tmp;
}
@ -2547,8 +2556,7 @@ const Groupe_Apprenant = (props) => {
type_groupe_code: JSON.parse(item).type_groupe_code,
class_id: JSON.parse(item).class_id,
session_id: JSON.parse(item).session_id,
nb_membre: JSON.parse(item).nb_membre,
}
))}
@ -2712,7 +2720,7 @@ const Groupe_Apprenant = (props) => {
id='menu_import_participant' name='menu_import_participant' onClick={(event) => {
setDialog_GRP_AUTOMATIC_open(true);
}} > Subdivision automatique
}} > Création automatique
&nbsp; <FcMultipleSmartphones />
</Button>