recette2
cherif 2024-08-09 13:17:13 +02:00
parent 5ac928d0e4
commit 2de6c2e331
3 changed files with 286 additions and 111 deletions

View File

@ -60,7 +60,36 @@ import Module_Selection_Apprenants from "./Module_Selection_Apprenants";
import { FcAlarmClock, FcMultipleSmartphones, FcWorkflow } from "react-icons/fc";
import { makeStyles } from "@material-ui/core/styles";
import CancelPresentationIcon from '@mui/icons-material/CancelPresentation';
import { IconButton } from '@material-ui/core';
import Paper from '@material-ui/core/Paper';
import Draggable from 'react-draggable';
const useStyles = makeStyles((theme) => ({
dialog: {
position: 'fixed',
// left: 10,
top: 400
},
paper: {
overflowY: 'unset',
},
customizedButton: {
position: 'absolute',
left: '95%',
top: '-9%',
backgroundColor: 'lightgray',
color: 'gray',
},
}));
const Groupe_Apprenant = (props) => {
const classes = useStyles();
const history = useHistory();
const [submenu, setsubmenu] = useState("");
const [rowss, setRows] = useState([]);
@ -71,6 +100,8 @@ const Groupe_Apprenant = (props) => {
date_today_90j.setDate(date_today_90j.getDate() + 90);
const [p_filtre1, setp_filtre1] = useState("");
const [p_filtre1_value, setp_filtre1_value] = useState("");
@ -939,7 +970,7 @@ const Groupe_Apprenant = (props) => {
}
if (file_1_name && file_1_name.name) {
console.log(" ### Traitement de : ", file_1_name.name);
//console.log(" ### Traitement de : ", file_1_name.name);
const formData = new FormData();
formData.append('File', file_1_name);
@ -1867,14 +1898,12 @@ const Groupe_Apprenant = (props) => {
alert(res.data.message);
if (document.getElementById('myRef')) {
// myRef.current.scrollIntoView({ behavior: "smooth" });
var divh = document.getElementById('myRef').offsetTop;
window.scrollTo({
top: divh,
top: 0,
behavior: "smooth",
});
}
}
else {
@ -1908,10 +1937,14 @@ const Groupe_Apprenant = (props) => {
form.append("split_type", p_detail_split_type_auto);
form.append("class_id", p_detail_class_id_auto);
form.append("session_id", p_detail_session_id_auto);
form.append("type_groupe_code", p_detail_type_groupe_code_auto);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Automatic_Split_Member_Inscrit_To_Grps/";
setLoading(true);
axios.post(myurl, form).then(res => {
//console.log(" In Automatic_Split_Membre_No_Grp_Creation res.data.status = " + res.data.status);
@ -1928,20 +1961,17 @@ const Groupe_Apprenant = (props) => {
setgrp_apprenant_data_edit_mode("");
setSelectionModel([]);
clear_DetailFieds();
// Dialog_GRP_AUTOMATIC_handleClose_buton();
Dialog_GRP_AUTOMATIC_handleClose_buton();
Getall_Partner_Groupe_Inscrit();
alert(res.data.message);
if (document.getElementById('myRef')) {
// myRef.current.scrollIntoView({ behavior: "smooth" });
var divh = document.getElementById('myRef').offsetTop;
window.scrollTo({
top: divh,
top: 0,
behavior: "smooth",
});
}
}
else {
@ -2076,6 +2106,10 @@ const Groupe_Apprenant = (props) => {
setsubmenu_grp_dialog("update");
}
const handleClose = () => {
//setOpen(false);
};
return (
<div className="groupe_apprenant">
{isLoading && <div className="loader-container">
@ -2092,6 +2126,23 @@ const Groupe_Apprenant = (props) => {
static
onClose={() => null}
PaperProps={{
className: classes.paper, // Apply the paper style
style: {
overflowY: 'unset',
position: 'absolute',
//top: '5rem'
},
}}
hideBackdrop={true}
disableScrollLock
classes={{
paper: classes.dialog
}}
>
<DialogTitle> Création automatique des groupes </DialogTitle>
@ -2180,6 +2231,43 @@ const Groupe_Apprenant = (props) => {
</div>
<div className="session_caract_Dialog" ><b>Type de Groupe </b> <br />
{New_Getall_Groupe_Apprenant_Type_result && New_Getall_Groupe_Apprenant_Type_result.length > 0 &&
<Autocomplete
disablePortal
name="detail_type_grp"
id="detail_type_grp"
fullWidth
options={New_Getall_Groupe_Apprenant_Type_result}
value={New_Getall_Groupe_Apprenant_Type_result.filter((data) => (data).code === String(p_detail_type_groupe_code_auto))[0].label}
onChange={(event, value) => {
if (value && value.code) {
setp_detail_type_groupe_code_auto(value.code);
setgrp_apprenant_data_changed("1");
} else {
setp_detail_type_groupe_code_auto("");
setgrp_apprenant_data_changed("1");
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
/>
}
</div>
<div className="session_caract_Dialog" > <b> Grouper les inscrits par </b>
<Autocomplete
disablePortal
@ -2225,43 +2313,6 @@ const Groupe_Apprenant = (props) => {
</div>
<div className="session_caract_Dialog" ><b>Type de Groupe </b> <br />
{New_Getall_Groupe_Apprenant_Type_result && New_Getall_Groupe_Apprenant_Type_result.length > 0 &&
<Autocomplete
disablePortal
name="detail_type_grp"
id="detail_type_grp"
fullWidth
options={New_Getall_Groupe_Apprenant_Type_result}
value={New_Getall_Groupe_Apprenant_Type_result.filter((data) => (data).code === String(p_detail_type_groupe_code_auto))[0].label}
onChange={(event, value) => {
if (value && value.code) {
setp_detail_type_groupe_code_auto(value.code);
setgrp_apprenant_data_changed("1");
} else {
setp_detail_type_groupe_code_auto("");
setgrp_apprenant_data_changed("1");
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
/>
}
</div>
<div className="session_caract_Dialog" > Racine
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
@ -2289,11 +2340,13 @@ const Groupe_Apprenant = (props) => {
<div className="div_row">
<div className="div_row_gauche">
&nbsp;
<Button onClick={Automatic_Split_Membre_No_Grp_Creation} className="bton_enreg_dialog">Mettre à jour Membres</Button>
</div>
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
<Button onClick={Automatic_Split_Membre_No_Grp_Creation} className="bton_enreg_dialog">Mettre à jour Membres</Button>
<Button onClick={Dialog_GRP_AUTOMATIC_handleClose_buton} className="bton_annule_dialog" >Fermer</Button>
</div>
</div>
@ -2314,10 +2367,37 @@ const Groupe_Apprenant = (props) => {
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
<Button onClick={Dialog_GRP_AUTOMATIC_handleClose_buton} className="bton_annule_dialog" >Fermer</Button>
</div>
</div>
<IconButton
autoFocus
onClick={Dialog_GRP_AUTOMATIC_handleClose_buton}
color="primary"
className={classes.customizedButton}
>
<CancelPresentationIcon />
</IconButton>
</DialogActions>}
{String(submenu_grp_dialog) !== "create" && <DialogActions>
<IconButton
autoFocus
onClick={Dialog_GRP_AUTOMATIC_handleClose_buton}
color="primary"
className={classes.customizedButton}
>
<CancelPresentationIcon />
</IconButton>
</DialogActions>}
</Dialog>
@ -2843,14 +2923,20 @@ const Groupe_Apprenant = (props) => {
</div>
<div className="div_row" style={{ "border": "None" }}>
<div className="div_row" style={{ "border": "None" }} id="bton_gestion_grp" name="bton_gestion_grp">
<div className="div_row_gauche div_row_gauche_etendu" style={{ "textAlign": "left", "paddingLeft": "5px" }}>
<Button variant="outlined"
className="detail_class_submenu bton_add_session bton_add_session_create_automatic" style={{ "width": "40%" }}
id='menu_import_participant' name='menu_import_participant' onClick={(event) => {
setDialog_GRP_AUTOMATIC_open(true);
submenu_create_grp();
Annule_Add_One_Evaluaton_DetailFields();
}} > Gestion automatique
&nbsp; <FcMultipleSmartphones />
</Button>

View File

@ -40,6 +40,12 @@ import Module_Editique from "./Module_Editique";
import Module_Attestation_Formation from "./Module_Attestation_Formation";
import Module_Email_Management from "./Module_Email_Management";
import Paper from '@material-ui/core/Paper';
import { makeStyles } from '@material-ui/core/styles';
import CancelPresentationIcon from '@mui/icons-material/CancelPresentation';
import { IconButton } from '@material-ui/core';
import ReactDOM from 'react-dom';
import Draggable from 'react-draggable';
@ -47,6 +53,32 @@ import Draggable from 'react-draggable';
import SignatureCanvas from 'react-signature-canvas';
const useStyles = makeStyles((theme) => ({
paper: {
overflowY: 'unset',
},
customizedButton: {
position: 'absolute',
left: '95%',
top: '-9%',
backgroundColor: 'lightgray',
color: 'gray',
},
}));
function PaperComponent(props) {
return (
<Draggable
handle="#draggable-dialog-title"
cancel={'[class*="MuiDialogContent-root"]'}
>
<Paper {...props} />
</Draggable>
);
}
const locales = {
'en-US': enUS,
}
@ -611,7 +643,16 @@ const TestUrl_New = (props) => {
}
const classes = useStyles();
const [open1, setOpen1] = React.useState(false);
const handleClickOpen1 = () => {
setOpen1(true);
};
const handleClose1 = () => {
setOpen1(false);
};
return (
<div className="testurl_new">
@ -655,16 +696,25 @@ const TestUrl_New = (props) => {
{ /********* Dialog email */}
<Dialog
onClose={() => null}
onClose={Dialog_1_handleClose}
//onClose={Dialog_1_handleClose}
className="module_email_management"
PaperProps={{
sx: {
width: "100%",
maxWidth: "920px!important",
},
className: classes.paper, // Apply the paper style
style: {
overflowY: 'unset',
position: 'absolute',
top: '5rem'
},
}}
open={Dialog_1_open}
hideBackdrop={true}
disableScrollLock
>
@ -681,18 +731,17 @@ const TestUrl_New = (props) => {
{/* <DialogActions>
<div className="div_row">
<div className="div_row_gauche">
<Button onClick={"Update_One_Agenda_Event"} className="bton_enreg_dialog">Mettre à jour</Button>
<DialogActions>
<IconButton
autoFocus
onClick={Dialog_1_handleClose}
color="primary"
className={classes.customizedButton}
>
<CancelPresentationIcon />
</IconButton>
</div>
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
<Button onClick={Dialog_1_handleClose} className="bton_annule_dialog" >Fermer</Button>
</div>
</div>
</DialogActions>*/}
</DialogActions>
</Dialog>
{ /********* Fin Dialog email */}
@ -703,21 +752,49 @@ const TestUrl_New = (props) => {
<h3> Page de test * testurl_new </h3>
parametres courseid = {courseid}, tabid = {tabid}
<br />
<h3> Signature padd </h3>
<SignatureCanvas ref={signatureCanvasRef} style={{ "border": "solid 1px red" }} penColor="green"
canvasProps={{
width: 315,
height: 200,
style: { border: "1px solid black", borderRadius: "10px" },
}} />
<button onClick={checkIfEmpty}>Check if Empty</button>
<button onClick={clearCanvas}>Clear Canvas</button>
<hr />
image signé :
<img src={pad_signature_img} />
<div>
<Button variant="outlined" color="primary" onClick={handleClickOpen1}>
Open form dialog laa
</Button>
<Dialog
open={open1}
onClose={handleClose1}
// PaperComponent={PaperComponent}
aria-labelledby="draggable-dialog-title"
<h3> FIN Signature padd </h3>
PaperProps={{
className: classes.paper, // Apply the paper style
style: {
overflowY: 'unset',
},
}}
>
<DialogTitle style={{ cursor: 'move' }} id="draggable-dialog-title">
Subscribe
</DialogTitle>
<DialogContent>
<DialogContentText>
To subscribe to this website, please enter your email address here.
We will send updates occasionally.
</DialogContentText>
</DialogContent>
<DialogActions>
<IconButton
autoFocus
onClick={handleClose1}
color="primary"
className={classes.customizedButton}
>
<CancelPresentationIcon />
</IconButton>
<Button onClick={handleClose} color="primary">
Subscribe
</Button>
</DialogActions>
</Dialog>
</div>
<Draggable >
<div style={{ cursor: 'pointer', border: "1px solid" }}>I can now be moved around!</div>
@ -735,7 +812,7 @@ const TestUrl_New = (props) => {
}}>Envoie email</button>
zzz
</div>

View File

@ -1616,6 +1616,7 @@
width: 40%;
height: 2rem !important;
}
.bton_add_session_create_automatic {
background: #c8cfd5;
color: black;
@ -2799,6 +2800,17 @@
max-width: none !important;
}
.MuiModal-root {
position: absolute !important;
}
.css-zw3mfo-MuiModal-root-MuiDialog-root {
position: absolute !important;
}
}
.MuiModal-root {
position: absolute !important;
}
.MuiMenu-paper {