recette2
parent
6283e86a8f
commit
6f197dbdbf
|
@ -2684,6 +2684,16 @@ const DisplayPartnerSession = (props) => {
|
|||
new_data2.push(node);
|
||||
});
|
||||
|
||||
var node = {
|
||||
"_id": "",
|
||||
"id": "",
|
||||
"label": "",
|
||||
"nom": "",
|
||||
"prenom": "",
|
||||
"ismanager": ""
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
||||
if (new_data2.length > 0)
|
||||
setNew_Getall_Training_Employee_No_Filter_result(new_data2);
|
||||
|
||||
|
@ -2783,7 +2793,7 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
const [Getall_Parter_OR_Default_Session_Steps_api, setGetall_Parter_OR_Default_Session_Steps_api] = useState();
|
||||
const [Getall_Parter_OR_Default_Session_Steps_message, setGetall_Parter_OR_Default_Session_Steps_message] = useState();
|
||||
const [Getall_Parter_OR_Default_Session_Steps_result, setGetall_Parter_OR_Default_Session_Steps_result] = useState();
|
||||
const [Getall_Parter_OR_Default_Session_Steps_result, setGetall_Parter_OR_Default_Session_Steps_result] = useState([]);
|
||||
function Getall_Parter_OR_Default_Session_Steps(event) {
|
||||
|
||||
var form = new FormData();
|
||||
|
@ -9485,7 +9495,8 @@ const DisplayPartnerSession = (props) => {
|
|||
}
|
||||
|
||||
else if (String(actionmass_ftion_val) === String("dupliquer")) {
|
||||
Dupliquer_LIST_Session_Formation(liste_session);
|
||||
setDialog_dupliquer_open(true);
|
||||
// Dupliquer_LIST_Session_Formation(liste_session);
|
||||
}
|
||||
|
||||
else if (String(actionmass_ftion_val) === String("publier")) {
|
||||
|
@ -9605,7 +9616,10 @@ const DisplayPartnerSession = (props) => {
|
|||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("tab_session_id", local_liste_session);
|
||||
|
||||
form.append("date_debut", String(dup_p_date_du));
|
||||
form.append("date_fin", String(dup_p_date_au));
|
||||
form.append("session_etape", String(dup_p_session_etape));
|
||||
form.append("formateur_id", String(dup_p_session_formateur_id));
|
||||
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Duplicate_List_Session_Formation/";
|
||||
|
@ -13921,7 +13935,30 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
/***** Fin gestion Convention par choix unitaire */
|
||||
|
||||
const [Dialog_dupliquer_message, setDialog_dupliquer_message] = React.useState(false);
|
||||
const [Dialog_dupliquer_open, setDialog_dupliquer_open] = React.useState(false);
|
||||
function Dialog_dupliquer_handle_change_participant_session(message) {
|
||||
setDialog_dupliquer_message(message);
|
||||
setDialog_dupliquer_open(true);
|
||||
}
|
||||
|
||||
const Dialog_dupliquer_handleClose = () => {
|
||||
//alert(" Utiliser le bouton 'fermer' ");
|
||||
//setOpen(false);
|
||||
};
|
||||
|
||||
const Dialog_dupliquer_handleClose_buton = () => {
|
||||
|
||||
setDialog_dupliquer_open(false);
|
||||
};
|
||||
|
||||
|
||||
const [dup_list_session_code, setdup_list_session_code] = useState("");
|
||||
|
||||
const [dup_p_date_du, setdup_p_date_du] = useState(new Date().toLocaleDateString('fr-FR'));
|
||||
const [dup_p_date_au, setdup_p_date_au] = useState(new Date().toLocaleDateString('fr-FR'));
|
||||
const [dup_p_session_etape, setdup_p_session_etape] = useState("");
|
||||
const [dup_p_session_formateur_id, setdup_p_session_formateur_id] = useState("");
|
||||
|
||||
return (
|
||||
<div className="displaypartnersession">
|
||||
|
@ -13941,6 +13978,196 @@ const DisplayPartnerSession = (props) => {
|
|||
}
|
||||
{/*** FIN Affichage des messages d'alerte*/}
|
||||
|
||||
|
||||
|
||||
|
||||
{/* Dialog pour gerer les DUPLIQUER SESSION*/}
|
||||
<Dialog
|
||||
open={Dialog_dupliquer_open}
|
||||
// onClose={Dialog_dupliquer_handleClose}
|
||||
//className="displaypartnersession"
|
||||
|
||||
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 style={{ cursor: 'move' }} id="draggable-dialog-title"> Dupliquer : <i>{dup_list_session_code} </i> </DialogTitle>
|
||||
<DialogContent className="DialogContent_width" style={{ "minHeight": "20rem" }}>
|
||||
<DialogContentText>
|
||||
{Dialog_1_message}
|
||||
</DialogContentText>
|
||||
|
||||
{dup_p_session_etape && New_Getall_Parter_OR_Default_Session_Steps_result && New_Getall_Parter_OR_Default_Session_Steps_result.length > 0 &&
|
||||
<div className="session_caract_Dialog">Etape <br />
|
||||
|
||||
<Autocomplete
|
||||
disablePortalNew
|
||||
name="duplicate_session_etape"
|
||||
id="duplicate_session_etape"
|
||||
className="disabled_style"
|
||||
options={New_Getall_Parter_OR_Default_Session_Steps_result}
|
||||
value={New_Getall_Parter_OR_Default_Session_Steps_result.filter((data) => (data).session_step_name === String(dup_p_session_etape))[0].session_step_name}
|
||||
|
||||
onChange={(event, value) => {
|
||||
if (value && value.session_step_name) {
|
||||
setdup_p_session_etape(value.session_step_name);
|
||||
|
||||
} else {
|
||||
setdup_p_session_etape("");
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</div>}
|
||||
|
||||
|
||||
{New_Getall_Training_Employee_No_Filter_result && New_Getall_Training_Employee_No_Filter_result.length > 0 && <div className="session_caract_Dialog"> Formateur <br />
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="dup_formateur_id"
|
||||
id="dup_formateur_id"
|
||||
className="disabled_style"
|
||||
options={New_Getall_Training_Employee_No_Filter_result}
|
||||
value={New_Getall_Training_Employee_No_Filter_result.filter((data) => (data)._id === String(dup_p_session_formateur_id))[0].label}
|
||||
|
||||
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
setdup_p_session_formateur_id(value._id);
|
||||
} else {
|
||||
setdup_p_session_formateur_id("");
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</div>}
|
||||
|
||||
<div className="session_caract_Dialog" > Date Session<br />
|
||||
<div style={{ width: "45%", float: "left", textAlign: "left" }}>
|
||||
<DatePicker
|
||||
name="date_du"
|
||||
id="date_du"
|
||||
selected={new Date(moment(dup_p_date_du, "DD/MM/YYYY"))}
|
||||
onChange={(date) => {
|
||||
setdup_p_date_du(format(date, 'd/MM/yyyy'));
|
||||
|
||||
}
|
||||
}
|
||||
showTimeSelect={false}
|
||||
dateFormat="dd/MM/yyyy"
|
||||
className="disabled_style enable_style datepicker_complement"
|
||||
locale='fr-FR'
|
||||
|
||||
/>
|
||||
|
||||
</div>
|
||||
<div style={{ float: "left", textAlign: "center", paddingTop: "20px", fontSize: "12px" }}>
|
||||
Au
|
||||
|
||||
</div>
|
||||
<div style={{ width: "45%", float: "left", textAlign: "right" }}>
|
||||
|
||||
<DatePicker
|
||||
name="date_du"
|
||||
id="date_du"
|
||||
selected={new Date(moment(dup_p_date_au, "DD/MM/YYYY"))}
|
||||
onChange={(date) => {
|
||||
setdup_p_date_au(format(date, 'd/MM/yyyy'));
|
||||
|
||||
}
|
||||
}
|
||||
showTimeSelect={false}
|
||||
dateFormat="dd/MM/yyyy"
|
||||
className="disabled_style enable_style datepicker_complement"
|
||||
locale='fr-FR'
|
||||
|
||||
/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</DialogContent>
|
||||
|
||||
<DialogActions>
|
||||
|
||||
<IconButton
|
||||
autoFocus
|
||||
onClick={Dialog_dupliquer_handleClose_buton}
|
||||
color="primary"
|
||||
className={classes.customizedButton}
|
||||
>
|
||||
<CancelPresentationIcon />
|
||||
</IconButton>
|
||||
|
||||
|
||||
<div className="div_row">
|
||||
<div className="div_row_gauche">
|
||||
<Button onClick={(e) => {
|
||||
var liste_session = ""
|
||||
if (display_session_with_alert && display_session_with_alert === true)
|
||||
liste_session = GetSelectedRowsSession_filtered_on_alert();
|
||||
else
|
||||
liste_session = GetSelectedRowsSession();
|
||||
|
||||
Dialog_dupliquer_handleClose_buton();
|
||||
|
||||
Dupliquer_LIST_Session_Formation(liste_session);
|
||||
|
||||
}}
|
||||
className="bton_enreg_dialog">Dupliquer </Button>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
|
||||
<Button onClick={Dialog_dupliquer_handleClose_buton} className="bton_annule_dialog" >Fermer</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</DialogActions>
|
||||
|
||||
</Dialog>
|
||||
{/* FIN Dialog pour gerer les DUPLIQUER SESSION*/}
|
||||
|
||||
|
||||
|
||||
|
||||
{/* Dialog pour gerer les CONVENTIONS ENTREPRISE*/}
|
||||
<Dialog
|
||||
open={Dialog_convention_open}
|
||||
|
@ -19579,57 +19806,93 @@ const DisplayPartnerSession = (props) => {
|
|||
</TextField>
|
||||
|
||||
|
||||
{actionmass_ftion_val && String(actionmass_ftion_val).length > 1 && <nav className='block_en_mass_bton_action'>
|
||||
<Popup
|
||||
trigger={<Button className="bton_enreg" style={{ "width": "90%" }}>
|
||||
{actionmass_ftion_val && String(actionmass_ftion_val).length > 1 && String(actionmass_ftion_val) !== "dupliquer" &&
|
||||
<nav className='block_en_mass_bton_action'>
|
||||
<Popup
|
||||
trigger={<Button className="bton_enreg" style={{ "width": "90%" }}>
|
||||
|
||||
<FcAcceptDatabase /> Traiter
|
||||
|
||||
</Button>}
|
||||
modal
|
||||
nested
|
||||
position="center center"
|
||||
|
||||
>
|
||||
|
||||
{close => (
|
||||
<div>
|
||||
<button className="gest_close" onClick={close}>
|
||||
×
|
||||
</button>
|
||||
<div className="gest_header"> MySy Information </div>
|
||||
<div className="gest_content">
|
||||
{' '}
|
||||
|
||||
<font color="red"> Confirmer l'action <b> {actionmass_ftion_val} </b> en masse pour {selectionModel.length} lignes.
|
||||
</font>
|
||||
</div>
|
||||
<div className="gest_actions">
|
||||
<div style={{ "width": "45%", "float": "left" }}>
|
||||
<button className="gest_bton_popup" onClick={(event) => {
|
||||
actionmass_ftion_Traitemet();
|
||||
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>
|
||||
)}
|
||||
</Popup>
|
||||
</nav>
|
||||
}
|
||||
{actionmass_ftion_val && String(actionmass_ftion_val).length > 1 && String(actionmass_ftion_val) === "dupliquer" &&
|
||||
<nav className='block_en_mass_bton_action'>
|
||||
<Button className="bton_enreg" style={{ "width": "90%" }}
|
||||
onClick={(e) => {
|
||||
var tab_code_session_to_duplicate = []
|
||||
for (var i = 0; i < selectionModel.length; i++) {
|
||||
var myid = parseInt(String(selectionModel[i]));
|
||||
var line = JSON.parse(rowss[myid]);
|
||||
tab_code_session_to_duplicate.push(line.code_session);
|
||||
|
||||
}
|
||||
|
||||
var list_code_session_to_duplicate = tab_code_session_to_duplicate.join(", ");
|
||||
setdup_list_session_code(list_code_session_to_duplicate);
|
||||
|
||||
|
||||
if (selectionModel.length > 0) {
|
||||
|
||||
var myid = parseInt(String(selectionModel[0]));
|
||||
var line = JSON.parse(rowss[myid]);
|
||||
setdup_p_session_formateur_id(line.formateur_id);
|
||||
} else {
|
||||
setdup_p_session_formateur_id("");
|
||||
}
|
||||
setdup_p_session_etape(New_Getall_Parter_OR_Default_Session_Steps_result[0].session_step_name);
|
||||
setDialog_dupliquer_open(true);
|
||||
}} >
|
||||
|
||||
<FcAcceptDatabase /> Traiter
|
||||
|
||||
</Button>}
|
||||
modal
|
||||
nested
|
||||
position="center center"
|
||||
</Button>
|
||||
|
||||
>
|
||||
|
||||
{close => (
|
||||
<div>
|
||||
<button className="gest_close" onClick={close}>
|
||||
×
|
||||
</button>
|
||||
<div className="gest_header"> MySy Information </div>
|
||||
<div className="gest_content">
|
||||
{' '}
|
||||
|
||||
<font color="red"> Confirmer l'action <b> {actionmass_ftion_val} </b> en masse pour {selectionModel.length} lignes.
|
||||
</font>
|
||||
</div>
|
||||
<div className="gest_actions">
|
||||
<div style={{ "width": "45%", "float": "left" }}>
|
||||
<button className="gest_bton_popup" onClick={(event) => {
|
||||
actionmass_ftion_Traitemet();
|
||||
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>
|
||||
)}
|
||||
</Popup>
|
||||
</nav>
|
||||
</nav>
|
||||
}
|
||||
|
||||
|
||||
</div>}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -24974,7 +25237,7 @@ const DisplayPartnerSession = (props) => {
|
|||
GetListeInscrit={GetListeInscrit}
|
||||
internal_url={selected_internal_url}
|
||||
check_user_acces_right={props.check_user_acces_right}
|
||||
|
||||
|
||||
submenu_emargement={submenu_emargement}
|
||||
submenu_evaluation={submenu_evaluation_session}
|
||||
submenu_attestation={submenu_attestation}
|
||||
|
|
|
@ -48,7 +48,7 @@ const Module_Alert_Confirmation = (props) => {
|
|||
<Stack sx={{ width: '10%', float: 'right', textAlign: 'right', paddingRight: "10px", cursor: 'pointer', paddingLeft: '7%', paddingTop: '10px' }} onClick={() => {
|
||||
props.clear_display_alert_mysy();
|
||||
setShowElement(false);
|
||||
}}> <IoCloseCircleOutline />
|
||||
}}> <IoCloseCircleOutline style={{color:'#FFF'}}/>
|
||||
</Stack>
|
||||
|
||||
</div>}
|
||||
|
@ -64,7 +64,7 @@ const Module_Alert_Confirmation = (props) => {
|
|||
<Stack sx={{ width: '10%', float: 'right', textAlign: 'right', paddingRight: "10px", cursor: 'pointer', paddingLeft: '7%', paddingTop: '10px' }} onClick={() => {
|
||||
props.clear_display_alert_mysy();
|
||||
setShowElement(false);
|
||||
}}> <IoCloseCircleOutline />
|
||||
}}> <IoCloseCircleOutline style={{color:'#FFF'}}/>
|
||||
</Stack>
|
||||
</div>}
|
||||
|
||||
|
@ -81,7 +81,7 @@ const Module_Alert_Confirmation = (props) => {
|
|||
<Stack sx={{ width: '10%', float: 'right', textAlign: 'right', paddingRight: "10px", cursor: 'pointer', paddingLeft: '7%', paddingTop: '10px' }} onClick={() => {
|
||||
props.clear_display_alert_mysy();
|
||||
setShowElement(false);
|
||||
}}> <IoCloseCircleOutline />
|
||||
}}> <IoCloseCircleOutline style={{color:'#FFF'}}/>
|
||||
</Stack>
|
||||
|
||||
</div>}
|
||||
|
|
Loading…
Reference in New Issue