qsd
parent
1df79cd52f
commit
f6ede35e6e
|
@ -9,7 +9,8 @@ import { useHistory } from "react-router-dom";
|
|||
import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid';
|
||||
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
|
||||
import TextareaAutosize from '@mui/material/TextareaAutosize';
|
||||
|
||||
import MoreVertIcon from '@mui/icons-material/MoreVert';
|
||||
import Menu from '@mui/material/Menu';
|
||||
import 'react-tooltip/dist/react-tooltip.css'
|
||||
import { Tooltip } from 'react-tooltip'
|
||||
|
||||
|
@ -524,6 +525,115 @@ const Jury = (props) => {
|
|||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'gestion', headerName: 'Gestion', minWidth: 50, flex: 1, maxWidth: 100, hideable: true, hide: false, editable: false, align: "center",
|
||||
renderCell: (cellValues) => {
|
||||
return (
|
||||
<div>
|
||||
<nav style={{ width: '100%', 'textAlign': 'center' }}>
|
||||
<IconButton
|
||||
aria-label="more"
|
||||
id="long-button"
|
||||
aria-controls={open ? 'long-menu_p' : undefined}
|
||||
aria-expanded={open ? 'true' : undefined}
|
||||
aria-haspopup="true"
|
||||
// onClick={handleClick_option_button_vertical}
|
||||
onClick={(e) => {
|
||||
setselected_agenda_id(cellValues.row._id);
|
||||
setselected_jury_soutenance_id(cellValues.row.jury_soutenance_id);
|
||||
GetCurrentSession(cellValues.row.jury_session_id);
|
||||
handleClick_option_button_vertical(e);
|
||||
setworking_cellValues(cellValues);
|
||||
|
||||
if (String(selected_jury_cible) === "soutenance") {
|
||||
|
||||
|
||||
setStartDate(new Date(cellValues.row.event_start));
|
||||
setendDate(new Date(cellValues.row.event_end));
|
||||
Get_Jury_List_Apprenant_Seance(cellValues.row._id, cellValues.row.jury_soutenance_id);
|
||||
|
||||
GetListeInscrit();
|
||||
|
||||
settab_selected_apprenant([]);
|
||||
}
|
||||
else if (String(selected_jury_cible) === "examen") {
|
||||
setp_detail_linked_collection_recid(cellValues.row.jury_session_id);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}}
|
||||
|
||||
>
|
||||
<MoreVertIcon />
|
||||
</IconButton>
|
||||
<Menu
|
||||
id="long-menu_p"
|
||||
MenuListProps={{
|
||||
'aria-labelledby': 'long-button',
|
||||
}}
|
||||
anchorEl={anchorEl}
|
||||
open={open}
|
||||
onClose={handleClose_option_button_vertical}
|
||||
slotProps={{
|
||||
paper: {
|
||||
style: {
|
||||
maxHeight: ITEM_HEIGHT * 4.5,
|
||||
width: '20ch',
|
||||
boxShadow: "-3px 4px 0px -30px #000000",
|
||||
borderRadius: '0px !important',
|
||||
lineHeight: '3rem'
|
||||
},
|
||||
},
|
||||
}}
|
||||
>
|
||||
{options_menu_vertical.map((option) => (
|
||||
<MenuItem key={option}
|
||||
|
||||
onClick={(e) => {
|
||||
//handleClose_option_button_vertical(e, option);
|
||||
setAnchorEl(null);
|
||||
|
||||
if (option && String(option) === "Jury Edit" && String(selected_jury_cible) === "soutenance") {
|
||||
setDialog_JURY_INFO_open(true);
|
||||
}
|
||||
|
||||
else if (option && String(option) === "Jury Edit" && String(selected_jury_cible) === "examen") {
|
||||
setsubmenu_detail_seance("display_jury_seance");
|
||||
|
||||
if (document.getElementById('myRef_note_classemment')) {
|
||||
var divh = document.getElementById('myRef_note_classemment').offsetTop;
|
||||
|
||||
window.scrollTo({
|
||||
top: divh,
|
||||
behavior: "smooth",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
else if (option && String(option) === "Apprenants") {
|
||||
setDialog_Jury_Apprenant_open(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}}
|
||||
>
|
||||
{option}
|
||||
</MenuItem>
|
||||
))}
|
||||
</Menu>
|
||||
|
||||
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
|
||||
{ field: 'event_comment', headerName: 'Comment', flex: 1, hide: true, editable: false, },
|
||||
|
||||
]
|
||||
|
@ -600,6 +710,35 @@ const Jury = (props) => {
|
|||
]
|
||||
|
||||
|
||||
const [working_cellValues, setworking_cellValues] = useState(false);
|
||||
|
||||
const [dialogOpen_supp, setdialogOpen_supp] = useState(false);
|
||||
const Dialog_menuitem_close_supp = () => {
|
||||
setdialogOpen_supp(false)
|
||||
};
|
||||
|
||||
|
||||
const options_menu_vertical = [
|
||||
'Apprenants',
|
||||
'Supprimer',
|
||||
'Jury Edit',
|
||||
];
|
||||
|
||||
|
||||
const ITEM_HEIGHT = 48;
|
||||
|
||||
|
||||
const [anchorEl, setAnchorEl] = React.useState(null);
|
||||
const open = Boolean(anchorEl);
|
||||
const handleClick_option_button_vertical = (event) => {
|
||||
setAnchorEl(event.currentTarget);
|
||||
};
|
||||
const handleClose_option_button_vertical = (event, value) => {
|
||||
setAnchorEl(null);
|
||||
};
|
||||
|
||||
|
||||
|
||||
const [selectionModel_jury_seance_participants, setselectionModel_jury_seance_participants] = React.useState([]);
|
||||
|
||||
const [selectionModel_columns_jury_seance, setselectionModel_columns_jury_seance] = React.useState([]);
|
||||
|
@ -1558,6 +1697,7 @@ const Jury = (props) => {
|
|||
form.append("token", stored_cookie);
|
||||
|
||||
form.append("jury_id", selected_id);
|
||||
form.append("jury_soutenance_id", selected_jury_soutenance_id);
|
||||
form.append("agenda_id", selected_agenda_id);
|
||||
form.append("sujet", p_detail_soutenance_sujet);
|
||||
form.append("note", p_detail_soutenance_note);
|
||||
|
@ -2592,7 +2732,7 @@ const Jury = (props) => {
|
|||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("equipe_id", selected_id);
|
||||
form.append("jury_id", selected_id);
|
||||
form.append("tab_ids", local_tab_ids);
|
||||
|
||||
|
||||
|
@ -4033,6 +4173,18 @@ const Jury = (props) => {
|
|||
|
||||
|
||||
|
||||
const [Dialog_JURY_INFO_open, setDialog_JURY_INFO_open] = React.useState(false);
|
||||
|
||||
const Dialog_JURY_INFO_handleClose_buton = () => {
|
||||
setDialog_JURY_INFO_open(false);
|
||||
};
|
||||
|
||||
const [p_detail_jury_observation, setp_detail_jury_observation] = useState("");
|
||||
const [p_detail_jury_note, setp_detail_jury_note] = useState("");
|
||||
const [p_detail_jury_validation, setp_detail_jury_validation] = useState("");
|
||||
const [selected_inscription_id_for_jury, setselected_inscription_id_for_jury] = useState("");
|
||||
|
||||
|
||||
return (
|
||||
<div className="jurys">
|
||||
{isLoading && <div className="loader-container">
|
||||
|
@ -4051,6 +4203,145 @@ const Jury = (props) => {
|
|||
{/*** FIN Affichage des messages d'alerte*/}
|
||||
|
||||
|
||||
{/* Dialog pour gerer les JURY_INFO */}
|
||||
<Dialog
|
||||
open={Dialog_JURY_INFO_open}
|
||||
|
||||
className="displaypartnersession"
|
||||
|
||||
static
|
||||
onClose={() => null}
|
||||
|
||||
PaperProps={{
|
||||
|
||||
|
||||
className: classes.paper, // Apply the paper style
|
||||
style: {
|
||||
overflowY: 'unset',
|
||||
position: 'absolute',
|
||||
top: '7rem',
|
||||
margin: "2px",
|
||||
},
|
||||
}}
|
||||
hideBackdrop={true}
|
||||
disableScrollLock
|
||||
classes={{
|
||||
paper: classes.dialog
|
||||
}}
|
||||
|
||||
PaperComponent={PaperComponent}
|
||||
aria-labelledby="draggable-dialog-title"
|
||||
|
||||
>
|
||||
|
||||
<DialogTitle> Délibération du Jury</DialogTitle>
|
||||
<DialogContent className="DialogContent_width" style={{ "minHeight": "30rem" }}>
|
||||
<DialogContentText>
|
||||
{Dialog_1_message}
|
||||
</DialogContentText>
|
||||
|
||||
<div className="session_caract_Dialog" > <b> Observation </b> <br />
|
||||
|
||||
<TextareaAutosize
|
||||
name="detail_jury_observation"
|
||||
id="detail_jury_observation"
|
||||
aria-label="minimum height"
|
||||
minRows={3}
|
||||
maxRows={4}
|
||||
//placeholder="Minimum 3 rows"
|
||||
style={{
|
||||
border: "1px solid gainsboro", width: '99%', padding: '2px',
|
||||
maxHeight: '15rem', height: '10rem', minHeight: '10rem', marginBottom: '3rem'
|
||||
}}
|
||||
value={p_detail_jury_observation}
|
||||
onChange={(e) => {
|
||||
setp_detail_jury_observation(e.target.value);
|
||||
|
||||
}}
|
||||
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="session_caract_Dialog" > <b> Note </b> <br />
|
||||
|
||||
<TextareaAutosize
|
||||
name="detail_jury_note"
|
||||
id="detail_jury_note"
|
||||
aria-label="minimum height"
|
||||
rows={1}
|
||||
|
||||
style={{
|
||||
border: "1px solid gainsboro", width: '99%', padding: '2px',
|
||||
maxHeight: '3rem', height: '3rem', minHeight: '3rem', marginBottom: '3rem'
|
||||
}}
|
||||
value={p_detail_jury_note}
|
||||
onChange={(e) => {
|
||||
setp_detail_jury_note(e.target.value);
|
||||
}}
|
||||
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="session_caract_Dialog" > <b> Validation </b> <br />
|
||||
|
||||
<TextareaAutosize
|
||||
name="detail_jury_note"
|
||||
id="detail_jury_note"
|
||||
aria-label="minimum height"
|
||||
rows={1}
|
||||
|
||||
style={{
|
||||
border: "1px solid gainsboro", width: '99%', padding: '2px',
|
||||
maxHeight: '3rem', height: '3rem', minHeight: '3rem', marginBottom: '3rem'
|
||||
}}
|
||||
value={p_detail_jury_validation}
|
||||
onChange={(e) => {
|
||||
setp_detail_jury_validation(e.target.value);
|
||||
}}
|
||||
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</DialogContent>
|
||||
|
||||
<DialogActions>
|
||||
|
||||
<IconButton
|
||||
autoFocus
|
||||
onClick={Dialog_JURY_INFO_handleClose_buton}
|
||||
color="primary"
|
||||
className={classes.customizedButton}
|
||||
>
|
||||
<CancelPresentationIcon />
|
||||
</IconButton>
|
||||
|
||||
<div className="div_row">
|
||||
<div className="div_row_gauche">
|
||||
<Button
|
||||
className="bton_enreg_dialog" onClick={(e) => {
|
||||
// Update_Jury_Promo_List_Inscrit();
|
||||
Dialog_JURY_INFO_handleClose_buton();
|
||||
}}
|
||||
>Mettre à jour </Button>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
|
||||
<Button onClick={Dialog_JURY_INFO_handleClose_buton} className="bton_annule_dialog" >Fermer</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</DialogActions>
|
||||
|
||||
</Dialog>
|
||||
{/* FIN Dialog pour gerer les JURY_INFO */}
|
||||
|
||||
|
||||
|
||||
{/* Dialog pour gerer les CONVOCATION_JURY_MEMBRE */}
|
||||
|
@ -4881,6 +5172,7 @@ const Jury = (props) => {
|
|||
<DataGrid
|
||||
// checkboxSelection
|
||||
disableRowSelectionOnClick
|
||||
disableSelectionOnClick
|
||||
onSelectionModelChange={(newSelectionModel) => {
|
||||
setselectionModel_jury_seance_participants(newSelectionModel);
|
||||
/*if (newSelectionModel.length === 1)
|
||||
|
@ -4914,7 +5206,7 @@ const Jury = (props) => {
|
|||
}}
|
||||
|
||||
rowsPerPageOptions={[10]}
|
||||
disableSelectionOnClick
|
||||
|
||||
components={{
|
||||
Toolbar: GridToolbar,
|
||||
}}
|
||||
|
@ -5756,6 +6048,7 @@ const Jury = (props) => {
|
|||
>
|
||||
<DataGrid
|
||||
checkboxSelection
|
||||
disableSelectionOnClick
|
||||
|
||||
components={{
|
||||
Toolbar: CustomToolbar
|
||||
|
@ -5824,11 +6117,7 @@ const Jury = (props) => {
|
|||
}}
|
||||
|
||||
rowsPerPageOptions={[10]}
|
||||
disableSelectionOnClick
|
||||
/* components={{
|
||||
Toolbar: GridToolbar,
|
||||
}}*/
|
||||
//sx={datagridSx}
|
||||
|
||||
getCellClassName={(params) => {
|
||||
|
||||
|
||||
|
@ -6707,6 +6996,7 @@ const Jury = (props) => {
|
|||
componentsProps={{ toolbar: { data_colums: columns_jury_membre } }}
|
||||
|
||||
checkboxSelection
|
||||
disableSelectionOnClick
|
||||
onSelectionModelChange={(newSelectionModel) => {
|
||||
setselectionModel_columns_jury_membre(newSelectionModel);
|
||||
/*if (newSelectionModel.length === 1)
|
||||
|
@ -6751,11 +7041,8 @@ const Jury = (props) => {
|
|||
}}
|
||||
|
||||
rowsPerPageOptions={[10]}
|
||||
disableSelectionOnClick
|
||||
/* components={{
|
||||
Toolbar: GridToolbar,
|
||||
}}*/
|
||||
//sx={datagridSx}
|
||||
|
||||
|
||||
getCellClassName={(params) => {
|
||||
|
||||
// Traitement de la cellule 'notes'
|
||||
|
@ -7165,6 +7452,7 @@ const Jury = (props) => {
|
|||
>
|
||||
<DataGrid
|
||||
disableRowSelectionOnClick
|
||||
disableSelectionOnClick
|
||||
checkboxSelection
|
||||
onSelectionModelChange={(newSelectionModel) => {
|
||||
setselectionModel_columns_jury_seance(newSelectionModel);
|
||||
|
@ -7194,7 +7482,6 @@ const Jury = (props) => {
|
|||
jury_session_id: (item).jury_session_id,
|
||||
convocation_apprenant_send: (item).convocation_apprenant_send,
|
||||
convocation_apprenant_date_sending: (item).convocation_apprenant_date_sending,
|
||||
|
||||
}
|
||||
|
||||
))}
|
||||
|
@ -7205,10 +7492,7 @@ const Jury = (props) => {
|
|||
|
||||
onRowDoubleClick={(newSelectionModel) => {
|
||||
setselected_agenda_id(newSelectionModel.row._id);
|
||||
|
||||
|
||||
setselected_jury_soutenance_id(newSelectionModel.row.jury_soutenance_id);
|
||||
|
||||
setp_detail_linked_collection_recid(newSelectionModel.row.jury_session_id);
|
||||
setsubmenu_detail_seance("display_jury_seance");
|
||||
GetCurrentSession(newSelectionModel.row.jury_session_id);
|
||||
|
|
Loading…
Reference in New Issue