01/06/2026 - 22h00
parent
c5d3988669
commit
7974ac6875
|
|
@ -2810,7 +2810,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
setdisplay_detail_ue();
|
||||
setdisplay_detail_stages("");
|
||||
setdisplay_stage("")
|
||||
setdisplay_detail_historique();
|
||||
setdisplay_detail_historique("");
|
||||
desableSessionFields();
|
||||
submenu_color_management("sessions");
|
||||
}
|
||||
|
|
@ -3251,7 +3251,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
}
|
||||
|
||||
function submenu_color_management(current_menu) {
|
||||
const list_sous_menu = ['detail_inscrit', 'ue', 'notes', 'stages', 'historique', 'piece_jointe']
|
||||
const list_sous_menu = ['detail_inscrit', 'ue', 'notes', 'stages', 'historique', 'piece_jointe', 'absence']
|
||||
|
||||
for (let i = 0; i < list_sous_menu.length; i++) {
|
||||
|
||||
|
|
@ -3966,7 +3966,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
//console.log(" In Get_Inscrit_Notes_Of_Evaluations res.data.status = " + res.data.status);
|
||||
console.log(" In Get_Inscrit_Notes_Of_Evaluations res.data.message r_class = " + res.data.message);
|
||||
// console.log(" In Get_Inscrit_Notes_Of_Evaluations res.data.message r_class = " + res.data.message);
|
||||
setGet_Inscrit_Notes_Of_Evaluations_api("true");
|
||||
setGet_Inscrit_Notes_Of_Evaluations_result(res.data.message);
|
||||
}
|
||||
|
|
@ -13841,8 +13841,8 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
<Button variant="outlined" onClick={submenu_detail_stagaire} className="detail_class_submenu" id='detail_inscrit' name='detail_inscrit'>Détail Inscrit</Button>
|
||||
|
||||
|
||||
{/* <Button variant="outlined" onClick={submenu_sessions} className="detail_class_submenu" id='preinscrit' name='preinscrit'>Détail Session </Button>
|
||||
<Button variant="outlined" onClick={submenu_absence} className="detail_class_submenu" id='absence' name='absence'>Absence </Button> */}
|
||||
{/* <Button variant="outlined" onClick={submenu_sessions} className="detail_class_submenu" id='preinscrit' name='preinscrit'>Détail Session </Button> */}
|
||||
|
||||
|
||||
{selected_class_is_ftion_initiale == "1" && String(addOneParticipant) !== "1" && <Button variant="outlined" onClick={submenu_unite_enseignement} className="detail_class_submenu" id='ue' name='ue'>Unit. Enseignement </Button>}
|
||||
|
||||
|
|
@ -13850,6 +13850,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
{String(addOneParticipant) !== "1" && <Button variant="outlined" onClick={submenu_piece_jointe} className="detail_class_submenu" id='piece_jointe' name='piece_jointe'>Doc & Eval</Button>}
|
||||
|
||||
<Button variant="outlined" onClick={submenu_absence} className="detail_class_submenu" id='absence' name='absence'>Absences </Button>
|
||||
|
||||
{selected_class_is_ftion_initiale == "1" && String(addOneParticipant) !== "1" && <Button variant="outlined" onClick={submenu_stages_module} className="detail_class_submenu" id='stages' name='stages'>Stages </Button>}
|
||||
|
||||
|
|
@ -17864,7 +17865,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
<nav style={{ "border": "None", "fontSize": "20px", "paddingTop": "5px", "paddingLeft": "5px", fontFamily: 'DM Sans' }}> Les notes </nav>
|
||||
|
||||
|
||||
{/*} <div className="div_row" style={{ "textAlign": "right", "marginTop": "0.5rem" }}>
|
||||
{/*} <div className="div_row" style={{ "textAlign": "right", "marginTop": "0.5rem" }}>
|
||||
<Button className="bton_emarge" onClick={(event) => {
|
||||
Export_Inscrit_Notes();
|
||||
}}>Export excel</Button>
|
||||
|
|
@ -17881,7 +17882,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
width: '100%',
|
||||
paddingRight: '1px',
|
||||
|
||||
|
||||
|
||||
"& .MuiDataGrid-columnHeaders": {
|
||||
backgroundColor: "#dfe8f2",
|
||||
color: "#0a2a4d",
|
||||
|
|
@ -17981,9 +17982,9 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
}}
|
||||
getRowClassName={(params) => {
|
||||
|
||||
|
||||
if (parseInt(String(params.row.id)) % 2 === 0) {
|
||||
|
||||
if (parseInt(String(params.row.id)) % 2 === 0) {
|
||||
return 'line--statut--pair';
|
||||
}
|
||||
else if (parseInt(String(params.row.id)) % 2 !== 0) {
|
||||
|
|
@ -18019,7 +18020,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
height: 500,
|
||||
width: '100%',
|
||||
paddingRight: '1px',
|
||||
|
||||
|
||||
"& .MuiDataGrid-columnHeaders": {
|
||||
backgroundColor: "#dfe8f2",
|
||||
color: "#0a2a4d",
|
||||
|
|
@ -18160,6 +18161,19 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
|
||||
|
||||
{String(submenu) === "absence" && String(addOneParticipant) !== "1" && selected_id && <div className="div_row" style={{ "border": "None", "background": '#F8F9F9', "padding": '5px' }}>
|
||||
<Module_Absence attendee_email={p_detail_mail}
|
||||
inscription_id={selected_id}
|
||||
apprenant_id={""}
|
||||
session_id={selected_session_id}
|
||||
related_collection={"inscription"}
|
||||
read_access={props.read_access}
|
||||
write_access={props.write_access}
|
||||
check_user_acces_right={props.check_user_acces_right}
|
||||
origin={"inscription"} />
|
||||
</div>}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<style>{local_css}</style>
|
||||
|
|
|
|||
|
|
@ -86,6 +86,8 @@ const Module_Absence = (props) => {
|
|||
const classes = useStyles();
|
||||
const attendee_email = props.attendee_email;
|
||||
|
||||
const caller_session_id = props.session_id;
|
||||
|
||||
const [selected_employee_id, setselected_employee_id] = useState(props.conntected_employee_id);
|
||||
|
||||
const [selected_attendee_email, setselected_attendee_email] = useState(props.attendee_email);
|
||||
|
|
@ -257,8 +259,14 @@ const Module_Absence = (props) => {
|
|||
const stored_cookie = getCookie('tokenmysypart');
|
||||
|
||||
form.append("token", stored_cookie);
|
||||
form.append("related_collection", props.related_collection);
|
||||
form.append("related_collection_email", attendee_email);
|
||||
|
||||
if (props.origin === "apprenant") {
|
||||
form.append("related_collection", props.related_collection);
|
||||
form.append("related_collection_email", attendee_email);
|
||||
}
|
||||
else if (props.origin === "inscription") {
|
||||
form.append("inscription_id", props.inscription_id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -268,7 +276,7 @@ const Module_Absence = (props) => {
|
|||
|
||||
axios.post(myurl, form).then(res => {
|
||||
//console.log(" In Get_Connected_User_List_Agenda_Events res.data.status = " + res.data.status);
|
||||
console.log(" In Get_Connected_User_List_Agenda_Events res.data.message r_class = " + res.data.message);
|
||||
// console.log(" In Get_Connected_User_List_Agenda_Events res.data.message r_class = " + res.data.message);
|
||||
|
||||
setLoading(false);
|
||||
if (String(res.data.status) === String("true")) {
|
||||
|
|
@ -885,7 +893,7 @@ const Module_Absence = (props) => {
|
|||
//Getall_Training_Employee_No_Filter();
|
||||
//Getall_Training_Materiel_No_Filter();
|
||||
|
||||
}, [attendee_email])
|
||||
}, [caller_session_id])
|
||||
|
||||
|
||||
const [local_heure_non_justifie, setlocal_heure_non_justifie] = useState();
|
||||
|
|
@ -901,10 +909,14 @@ const Module_Absence = (props) => {
|
|||
const stored_cookie = getCookie('tokenmysypart');
|
||||
|
||||
form.append("token", stored_cookie);
|
||||
form.append("related_collection", props.related_collection);
|
||||
form.append("related_collection_email", attendee_email);
|
||||
|
||||
|
||||
if (props.origin === "apprenant") {
|
||||
form.append("related_collection", props.related_collection);
|
||||
form.append("related_collection_email", attendee_email);
|
||||
}
|
||||
else if (props.origin === "inscription") {
|
||||
form.append("inscription_id", props.inscription_id);
|
||||
}
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_Agenda_Event_List_Stagiaire_Total_Nb_Heure/";
|
||||
|
||||
|
|
@ -947,7 +959,7 @@ const Module_Absence = (props) => {
|
|||
const [p_detail_event_id, setp_detail_event_id] = useState();
|
||||
const [p_detail_title, setp_detail_title] = useState();
|
||||
|
||||
const [p_detail_session_id, setp_detail_session_id] = useState("");
|
||||
const [p_detail_session_id, setp_detail_session_id] = useState(props.session_id);
|
||||
|
||||
const [p_detail_start, setp_detail_start] = useState();
|
||||
const [p_detail_end, setp_detail_end] = useState();
|
||||
|
|
@ -1003,6 +1015,7 @@ const Module_Absence = (props) => {
|
|||
form.append("_id", p_detail_event_id);
|
||||
form.append("inscription_id", props.inscription_id);
|
||||
form.append("apprenant_id", props.apprenant_id);
|
||||
form.append("inscription_id", props.inscription_id);
|
||||
form.append("related_collection", props.related_collection);
|
||||
|
||||
form.append("event_title", new_title);
|
||||
|
|
@ -1031,7 +1044,11 @@ const Module_Absence = (props) => {
|
|||
setUpdate_One_Agenda_Event_api("true");
|
||||
setUpdate_One_Agenda_Event_result(res.data.message);
|
||||
|
||||
Get_List_Agenda_Events_For_Given_User(selected_attendee_email);
|
||||
|
||||
Get_Connected_User_List_Agenda_Events();
|
||||
Get_ENT_Apprenant_Total_Heure();
|
||||
|
||||
|
||||
|
||||
setp_detail_event_id();
|
||||
setp_detail_title("");
|
||||
|
|
@ -1071,6 +1088,140 @@ const Module_Absence = (props) => {
|
|||
}
|
||||
|
||||
|
||||
const [Create_Agenda_Absence_Event_api, setCreate_Agenda_Absence_Event_api] = useState();
|
||||
const [Create_Agenda_Absence_Event_message, setCreate_Agenda_Absence_Event_message] = useState();
|
||||
const [Create_Agenda_Absence_Event_result, setCreate_Agenda_Absence_Event_result] = useState();
|
||||
const Create_Agenda_Absence_Event = event => {
|
||||
|
||||
|
||||
var local_related_collection = p_filtre1;
|
||||
|
||||
if (String(props.session_id).length < 2) {
|
||||
// alert(" Vous devez un stagiaire");
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(" La promotion est invalide ");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
|
||||
if (String(props.inscription_id).length < 2) {
|
||||
// alert(" Vous devez un stagiaire");
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(" L'inscription est invalide ");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (String(selected_attendee_email).length < 2) {
|
||||
// alert(" Vous devez un stagiaire");
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(" Vous devez choisir un stagiaire");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
|
||||
if (moment(endDate) <= moment(startDate)) {
|
||||
//alert(" Les dates de début et de fin sont incohérentes");
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(" Les dates de début et de fin sont incohérentes");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
var new_title = p_detail_title;
|
||||
var new_start_date = moment(startDate).format("DD/MM/YYYY HH:mm");
|
||||
var new_end_date = moment(endDate).format("DD/MM/YYYY HH:mm");
|
||||
var event_id = p_detail_event_id
|
||||
|
||||
// console.log(" ### new event = ", new_title, " -- ", new_start_date, " --- ", new_end_date, " : setp_detail_event_id = ", p_detail_event_id);
|
||||
|
||||
// console.log(" ### new event = ", new_title, " -- ", startDate, " --- ", endDate, " : setp_detail_event_id = ", p_detail_event_id);
|
||||
|
||||
var form = new FormData();
|
||||
//form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
|
||||
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
|
||||
form.append("tab_inscrit_ids", props.inscription_id);
|
||||
|
||||
form.append("start_date", new_start_date);
|
||||
form.append("end_date", new_end_date);
|
||||
form.append("sequence_id", "");
|
||||
form.append("comment", p_detail_comment);
|
||||
|
||||
// form.append("event_type", p_detail_event_type);
|
||||
form.append("justified", p_detail_justified);
|
||||
form.append("session_id", props.session_id);
|
||||
|
||||
var myurl = "";
|
||||
|
||||
if (p_detail_event_id && p_detail_event_id.length > 5) {
|
||||
form.append("_id", p_detail_event_id);
|
||||
} else {
|
||||
myurl = process.env.REACT_APP_API_URL + "myclass/api/Create_Inscrit_Absence_By_Plage_Of_Date_OR_Sequence_Id/";
|
||||
}
|
||||
|
||||
//console.log(" form == ", form);
|
||||
|
||||
|
||||
|
||||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
//console.log(" In Create_Agenda_Absence_Event res.data.status = " + res.data.status);
|
||||
//console.log(" In Create_Agenda_Absence_Event res.data.message r_class = " + res.data.message);
|
||||
|
||||
setLoading(false);
|
||||
if (String(res.data.status) === String("true")) {
|
||||
setCreate_Agenda_Absence_Event_api("true");
|
||||
setCreate_Agenda_Absence_Event_result(res.data.message);
|
||||
|
||||
Get_Connected_User_List_Agenda_Events();
|
||||
|
||||
Get_ENT_Apprenant_Total_Heure();
|
||||
|
||||
setp_detail_event_id();
|
||||
setp_detail_title("");
|
||||
setp_detail_start("");
|
||||
setp_detail_session_id("")
|
||||
setp_detail_end();
|
||||
setp_detail_comment();
|
||||
setp_detail_justified(false);
|
||||
setp_detail_event_type();
|
||||
|
||||
|
||||
// alert(res.data.message);
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("success");
|
||||
Close_Dialog_Detail_Event_open();
|
||||
|
||||
}
|
||||
else {
|
||||
setCreate_Agenda_Absence_Event_api("false");
|
||||
setCreate_Agenda_Absence_Event_message(res.data.message);
|
||||
// alert(res.data.message);
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("error");
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
|
||||
|
||||
setLoading(false);
|
||||
console.warn('UpdateStagiaireData : Not good man :( Create_Agenda_Absence_Event = ' + error);
|
||||
setCreate_Agenda_Absence_Event_api("false");
|
||||
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(" Impossible d'ajouter ou mettre à jour l'événement ");
|
||||
setalert_type("error");
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const [Delete_One_Agenda_Event_api, setDelete_One_Agenda_Event_api] = useState();
|
||||
const [Delete_One_Agenda_Event_message, setDelete_One_Agenda_Event_message] = useState();
|
||||
const [Delete_One_Agenda_Event_result, setDelete_One_Agenda_Event_result] = useState();
|
||||
|
|
@ -1102,7 +1253,10 @@ const Module_Absence = (props) => {
|
|||
setDelete_One_Agenda_Event_api("true");
|
||||
setDelete_One_Agenda_Event_result(res.data.message);
|
||||
|
||||
Get_List_Agenda_Events();
|
||||
Get_Connected_User_List_Agenda_Events();
|
||||
|
||||
Getall_Partner_Session_Reduice_Fields();
|
||||
Get_ENT_Apprenant_Total_Heure();
|
||||
|
||||
setp_detail_event_id();
|
||||
setp_detail_title();
|
||||
|
|
@ -1226,7 +1380,7 @@ const Module_Absence = (props) => {
|
|||
|
||||
>
|
||||
|
||||
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> MySy Information</DialogTitle>
|
||||
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> Absence </DialogTitle>
|
||||
<DialogContent className="DialogContent_width">
|
||||
<DialogContentText>
|
||||
{Dialog_1_message}
|
||||
|
|
@ -1243,8 +1397,9 @@ const Module_Absence = (props) => {
|
|||
|
||||
name="event_dialog_type"
|
||||
id="event_dialog_type"
|
||||
disabled={true}
|
||||
value="Absence"
|
||||
|
||||
select
|
||||
fullWidth
|
||||
|
||||
value={p_detail_event_type}
|
||||
|
|
@ -1258,9 +1413,6 @@ const Module_Absence = (props) => {
|
|||
}
|
||||
|
||||
>
|
||||
<MenuItem value="absence" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Absence </MenuItem>
|
||||
<MenuItem value="planning" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Planning </MenuItem>
|
||||
<MenuItem value="autre" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Autre </MenuItem>
|
||||
|
||||
</TextField>
|
||||
|
||||
|
|
@ -1292,7 +1444,7 @@ const Module_Absence = (props) => {
|
|||
</nav>
|
||||
|
||||
|
||||
<div className="session_caract_Dialog" > Titre <br />
|
||||
{/*<div className="session_caract_Dialog" > Titre <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
|
||||
|
|
@ -1314,55 +1466,9 @@ const Module_Absence = (props) => {
|
|||
|
||||
/>
|
||||
|
||||
</div>
|
||||
<nav style={{ "float": "left", "width": "100%" }}>
|
||||
<div className="session_caract_Dialog" style={{ width: '50%' }}> Promotion <br />
|
||||
{New_Getall_Partner_Session_Reduice_Fields_result && New_Getall_Partner_Session_Reduice_Fields_result.length > 0 &&
|
||||
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="detail_classe"
|
||||
id="detail_classe"
|
||||
// className="disabled_style"
|
||||
//className="disabled_style enable_style"
|
||||
// options={New_Getall_Partner_Session_Reduice_Fields_result}
|
||||
options={New_Getall_Partner_Session_Reduice_Fields_result}
|
||||
fullWidth
|
||||
value={New_Getall_Partner_Session_Reduice_Fields_result.filter((data) => (data)._id === String(p_detail_session_id))[0].label}
|
||||
onChange={(event, value) => {
|
||||
|
||||
setp_detail_data_changed("1");
|
||||
if (value && value._id) {
|
||||
setp_detail_session_id(value._id);
|
||||
} else {
|
||||
setp_detail_session_id("");
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
sx={{
|
||||
"& .MuiOutlinedInput-root": {
|
||||
"& fieldset": {
|
||||
border: "solid #e8eef6 1px;",
|
||||
},
|
||||
"&:hover fieldset": {
|
||||
border: "solid #e8eef6 1px;",
|
||||
},
|
||||
"&.Mui-focused fieldset": {
|
||||
border: "solid #e8eef6 1px;",
|
||||
},
|
||||
},
|
||||
}}
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
}
|
||||
|
||||
</div>
|
||||
|
||||
</div>*/}
|
||||
{/*<nav style={{ "float": "left", "width": "100%" }}>
|
||||
|
||||
<div className="session_caract_Dialog" style={{ width: '50%' }}> UEEE XXX ou Sequence ? <br />
|
||||
{New_Getall_Partner_Session_Reduice_Fields_result && New_Getall_Partner_Session_Reduice_Fields_result.length > 0 &&
|
||||
|
||||
|
|
@ -1411,7 +1517,7 @@ const Module_Absence = (props) => {
|
|||
</div>
|
||||
|
||||
|
||||
</nav>
|
||||
</nav>*/}
|
||||
<nav style={{ "float": "left", "width": "100%" }}>
|
||||
<div className="session_caract_Dialog" style={{ width: '50%' }}> Debut <br />
|
||||
<DatePicker
|
||||
|
|
@ -1494,12 +1600,7 @@ const Module_Absence = (props) => {
|
|||
/>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</DialogContent>
|
||||
|
||||
|
||||
|
||||
<DialogActions>
|
||||
|
||||
|
||||
|
|
@ -1509,15 +1610,32 @@ const Module_Absence = (props) => {
|
|||
</div>}
|
||||
|
||||
{String(props.write_access) === "1" && <div className="div_row_gauche">
|
||||
{p_detail_event_id && String(p_detail_event_id) !== "" && <Button onClick={Update_One_Agenda_Event} className="bton_enreg_dialog">Mettre à jour</Button>}
|
||||
{(!p_detail_event_id || String(p_detail_event_id) === "") && <Button onClick={Update_One_Agenda_Event} className="bton_enreg_dialog">Ajouter</Button>}
|
||||
{p_detail_event_id && String(p_detail_event_id) !== "" && <Button onClick={Update_One_Agenda_Event} className="bton_enreg_dialog" style={{ width: '40%', float: 'left' }} >M.A.J</Button>}
|
||||
{(!p_detail_event_id || String(p_detail_event_id) === "") && <Button onClick={Create_Agenda_Absence_Event} className="bton_enreg_dialog" style={{ float: 'left' }}>Ajouter</Button>}
|
||||
|
||||
|
||||
|
||||
</div>}
|
||||
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
|
||||
{(!p_detail_event_id || String(p_detail_event_id) === "") && <div className="div_row_droite" style={{ "textAlign": 'center' }}>
|
||||
<Button onClick={Close_Dialog_Detail_Event_open} className="bton_annule_dialog" >Fermer</Button>
|
||||
</div>}
|
||||
|
||||
{String(props.write_access) === "1" && p_detail_event_id && String(p_detail_event_id) !== "" && <div className="div_row_droite" style={{ "textAlign": "center" }}>
|
||||
<Button onClick={Close_Dialog_Detail_Event_open} className="bton_annule_dialog" style={{ width: '40%', float: 'right' }}>Fermer</Button>
|
||||
|
||||
<Button onClick={(e) => {
|
||||
const response = window.confirm("Confirmez-vous la suppression de l'événement ?");
|
||||
if (!response) {
|
||||
return;
|
||||
}
|
||||
Delete_One_Agenda_Event();
|
||||
}
|
||||
} className="bton_supprime_dialog" style={{ width: '40%', float: 'right' }}>Supprimer</Button>
|
||||
</div>
|
||||
|
||||
|
||||
}
|
||||
|
||||
</div>
|
||||
|
||||
<IconButton
|
||||
|
|
@ -1534,21 +1652,8 @@ const Module_Absence = (props) => {
|
|||
|
||||
|
||||
|
||||
{String(props.write_access) === "1" && p_detail_event_id && String(p_detail_event_id) !== "" && <DialogActions>
|
||||
<div className="div_row" style={{ "textAlign": "center" }}>
|
||||
<Button onClick={(e) => {
|
||||
const response = window.confirm("Confirmez-vous la suppression de l'événement ?");
|
||||
if (!response) {
|
||||
return;
|
||||
}
|
||||
Delete_One_Agenda_Event();
|
||||
}
|
||||
} className="bton_supprime_dialog">Supprimer l'événement</Button>
|
||||
</div>
|
||||
|
||||
|
||||
</DialogActions>}
|
||||
|
||||
</Dialog>
|
||||
|
||||
{local_heure_non_justifie && local_heure_non_justifie.length > 0 && <h3 style={{ fontFamily: 'DM Sans', fontSize: '26px', width: '100%', textAlign: "center" }}> Absences - {Get_ENT_Apprenant_Total_Heure_result &&
|
||||
|
|
|
|||
|
|
@ -1573,7 +1573,7 @@ const Module_Agenda = (props) => {
|
|||
{/*** Si l'agenda d'une autre personne, je dois etre autorisé à ecrire */}
|
||||
{String(agenda_owner_name) !== "Mon Planning" && String(p_filtre1) === "ressource_humaine" && String(props.check_user_acces_right("agenda_employes", "write")) === "1" &&
|
||||
<div className="div_row_gauche">
|
||||
{p_detail_event_id && String(p_detail_event_id) !== "" && <Button onClick={Update_One_Agenda_Event} className="bton_enreg_dialog" style={{ width: '40%', float: 'left' }}>M.A.J</Button>}
|
||||
{p_detail_event_id && String(p_detail_event_id) !== "" && <Button onClick={Update_One_Agenda_Event} className="bton_enreg_dialog" style={{ width: '40%', float: 'left', marginLeft:'-1rem' }}>M.A.J</Button>}
|
||||
{(!p_detail_event_id || String(p_detail_event_id) === "") && <Button onClick={Update_One_Agenda_Event} className="bton_enreg_dialog" style={{ float: 'left' }}>Ajouter</Button>}
|
||||
|
||||
</div>}
|
||||
|
|
@ -1582,7 +1582,7 @@ const Module_Agenda = (props) => {
|
|||
{/*** Si l'agenda d'un materiel, je dois etre autorisé à ecrire */}
|
||||
{String(agenda_owner_name) !== "Mon Planning" && String(p_filtre1) === "ressource_materielle" && String(props.check_user_acces_right("agenda_materiel_salle", "write")) === "1" &&
|
||||
<div className="div_row_gauche">
|
||||
{p_detail_event_id && String(p_detail_event_id) !== "" && <Button onClick={Update_One_Agenda_Event} className="bton_enreg_dialog" style={{ width: '40%', float: 'left' }}>M.A.J</Button>}
|
||||
{p_detail_event_id && String(p_detail_event_id) !== "" && <Button onClick={Update_One_Agenda_Event} className="bton_enreg_dialog" style={{ width: '40%', float: 'left', marginLeft:'-1rem' }}>M.A.J</Button>}
|
||||
{(!p_detail_event_id || String(p_detail_event_id) === "") && <Button onClick={Update_One_Agenda_Event} className="bton_enreg_dialog" style={{ float: 'left' }}>Ajouter</Button>}
|
||||
|
||||
</div>}
|
||||
|
|
@ -1590,7 +1590,7 @@ const Module_Agenda = (props) => {
|
|||
{/*** Si c'est mon agenda, j'ai tous les droit */}
|
||||
{String(agenda_owner_name) === "Mon Planning" &&
|
||||
<div className="div_row_gauche">
|
||||
{p_detail_event_id && String(p_detail_event_id) !== "" && <Button onClick={Update_One_Agenda_Event} className="bton_enreg_dialog" style={{ width: '40%', float: 'left' }}>M.A.J</Button>}
|
||||
{p_detail_event_id && String(p_detail_event_id) !== "" && <Button onClick={Update_One_Agenda_Event} className="bton_enreg_dialog" style={{ width: '40%', float: 'left', marginLeft:'-1rem' }}>M.A.J</Button>}
|
||||
{(!p_detail_event_id || String(p_detail_event_id) === "") && <Button onClick={Update_One_Agenda_Event} className="bton_enreg_dialog" style={{ float: 'left' }}>Ajouter</Button>}
|
||||
|
||||
</div>}
|
||||
|
|
@ -1639,6 +1639,7 @@ const Module_Agenda = (props) => {
|
|||
<div className="div_row_droite" style={{ "textAlign": "center" }}>
|
||||
|
||||
<Button onClick={Close_Dialog_Detail_Event_open} className="bton_annule_dialog" style={{ width: '40%', float: 'right' }}>Fermer</Button>
|
||||
|
||||
<Button onClick={(e) => {
|
||||
const response = window.confirm("Confirmez-vous la suppression de l'événement ?");
|
||||
if (!response) {
|
||||
|
|
|
|||
|
|
@ -140,15 +140,14 @@ const Module_Domaine_Competence_Pedagogique = (props) => {
|
|||
{ field: '_id', headerName: '_id', hide: true, Width: 0, disableExport: true, },
|
||||
{ field: 'id', headerName: 'id', hide: true, Width: 0, disableExport: true, },
|
||||
{ field: 'code', headerName: 'Code', flex: 1, hide: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'nb_heure', headerName: 'Volume horaire', flex: 1, hide: false, maxWidth: 180, renderCell: (params) => <ExpandableCell_50 {...params} />, align:"center" , headerAlign:'center'},
|
||||
{ field: 'description', headerName: 'Description', flex: 1, hide: false, minWidth: 200, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
|
||||
|
||||
{ field: 'seuil_absence', headerName: 'Seuil Absence', flex: 1, hide: false, maxWidth: 180, renderCell: (params) => <ExpandableCell_50 {...params} />, align:"center" , headerAlign:'center'},
|
||||
{
|
||||
field: 'commentaire', headerName: 'Commentaire', flex: 1, maxWidth: 250, renderCell: (params) => <ExpandableCell_50 {...params} />,
|
||||
|
||||
},
|
||||
{
|
||||
field: 'couleur', headerName: 'Couleur', width: 180,
|
||||
{
|
||||
field: 'couleur', headerName: 'Couleur', width: 180, headerAlign:'center',
|
||||
renderCell: (cellValues) => {
|
||||
return (
|
||||
<div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all", textAlign: 'center', width: '100%', }}>
|
||||
|
|
@ -839,8 +838,12 @@ const Module_Domaine_Competence_Pedagogique = (props) => {
|
|||
const [p_one_detail_pole_activite_pedago_id, setp_one_detail_pole_activite_pedago_id] = useState("");
|
||||
const [p_detail_domaine_compet_pedago_id, setp_detail_domaine_compet_pedago_id] = useState("");
|
||||
const [p_detail_domaine_compet_pedago_code, setp_detail_domaine_compet_pedago_code] = useState("");
|
||||
const [p_detail_domaine_compet_pedago_nb_heure, setp_detail_domaine_compet_pedago_nb_heure] = useState("1");
|
||||
const [p_detail_domaine_compet_pedago_description, setp_detail_domaine_compet_pedago_description] = useState("");
|
||||
|
||||
const [p_detail_domaine_compet_pedago_seuil_absence, setp_detail_domaine_compet_pedago_seuil_absence] = useState("");
|
||||
|
||||
|
||||
const [p_detail_domaine_compet_pedago_tab_competence, setp_detail_domaine_compet_pedago_tab_competence] = useState("");
|
||||
|
||||
const [p_detail_domaine_compet_pedago_commentaire, setp_detail_domaine_compet_pedago_commentaire] = useState("");
|
||||
|
|
@ -895,6 +898,8 @@ const Module_Domaine_Competence_Pedagogique = (props) => {
|
|||
function clear_domain_compet_pedago_fields() {
|
||||
setp_detail_domaine_compet_pedago_id("")
|
||||
setp_detail_domaine_compet_pedago_code("");
|
||||
setp_detail_domaine_compet_pedago_nb_heure("1");
|
||||
setp_detail_domaine_compet_pedago_seuil_absence("");
|
||||
setp_detail_domaine_compet_pedago_description("");
|
||||
setp_detail_domaine_compet_pedago_commentaire("");
|
||||
setp_one_detail_pole_activite_pedago_id("");
|
||||
|
|
@ -1156,6 +1161,17 @@ const Module_Domaine_Competence_Pedagogique = (props) => {
|
|||
else
|
||||
setp_detail_domaine_compet_pedago_code("");
|
||||
|
||||
if (pdomaine_compet_pedago.code)
|
||||
setp_detail_domaine_compet_pedago_nb_heure(pdomaine_compet_pedago.nb_heure);
|
||||
else
|
||||
setp_detail_domaine_compet_pedago_nb_heure("");
|
||||
|
||||
|
||||
if (pdomaine_compet_pedago.seuil_absence)
|
||||
setp_detail_domaine_compet_pedago_seuil_absence(pdomaine_compet_pedago.seuil_absence);
|
||||
else
|
||||
setp_detail_domaine_compet_pedago_seuil_absence("");
|
||||
|
||||
|
||||
if (pdomaine_compet_pedago.couleur)
|
||||
setp_detail_domaine_compet_pedago_couleur(pdomaine_compet_pedago.couleur);
|
||||
|
|
@ -1452,7 +1468,7 @@ const Module_Domaine_Competence_Pedagogique = (props) => {
|
|||
async function Disable_Domaine_Compet_Pedago_DetailFields() {
|
||||
await sleep(5);
|
||||
setdomaine_compet_pedago_edit_data("0")
|
||||
var liste_champs = ['detail_code', 'detail_desc', 'detail_comment',
|
||||
var liste_champs = ['detail_code', 'detail_desc', 'detail_comment', 'detail_heure', 'detail_seuil_absence'
|
||||
]
|
||||
|
||||
|
||||
|
|
@ -1473,7 +1489,7 @@ const Module_Domaine_Competence_Pedagogique = (props) => {
|
|||
|
||||
setdomaine_compet_pedago_edit_data("1")
|
||||
|
||||
var liste_champs = ['detail_code', 'detail_desc', 'detail_comment',
|
||||
var liste_champs = ['detail_code', 'detail_desc', 'detail_comment', 'detail_heure', 'detail_seuil_absence'
|
||||
]
|
||||
|
||||
|
||||
|
|
@ -1515,7 +1531,9 @@ const Module_Domaine_Competence_Pedagogique = (props) => {
|
|||
setp_one_detail_pole_activite_pedago_id("");
|
||||
setp_detail_domaine_compet_pedago_id("");
|
||||
setp_detail_domaine_compet_pedago_code("");
|
||||
setp_detail_domaine_compet_pedago_nb_heure("");
|
||||
setp_detail_domaine_compet_pedago_description("");
|
||||
setp_detail_domaine_compet_pedago_seuil_absence("");
|
||||
setp_detail_domaine_compet_pedago_commentaire("");
|
||||
setp_detail_domaine_compet_pedago_couleur("#3573CB")
|
||||
|
||||
|
|
@ -1551,6 +1569,14 @@ const Module_Domaine_Competence_Pedagogique = (props) => {
|
|||
}
|
||||
|
||||
|
||||
if (p_detail_domaine_compet_pedago_nb_heure.trim() === "") {
|
||||
// alert(" Le nombre de participants est obligatoire");
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message("Vous devez saisir un volume horaire");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
|
|
@ -1572,7 +1598,8 @@ const Module_Domaine_Competence_Pedagogique = (props) => {
|
|||
form.append("description", p_detail_domaine_compet_pedago_description);
|
||||
form.append("commentaire", p_detail_domaine_compet_pedago_commentaire);
|
||||
form.append("couleur", p_detail_domaine_compet_pedago_couleur);
|
||||
|
||||
form.append("nb_heure", p_detail_domaine_compet_pedago_nb_heure);
|
||||
form.append("seuil_absence", p_detail_domaine_compet_pedago_seuil_absence);
|
||||
|
||||
|
||||
setLoading(true);
|
||||
|
|
@ -1591,6 +1618,7 @@ const Module_Domaine_Competence_Pedagogique = (props) => {
|
|||
|
||||
setdomaine_compet_pedago_data_changed("");
|
||||
setdomaine_compet_pedago_edit_data("");
|
||||
|
||||
setadd_one_domaine_compet_pedago("");
|
||||
|
||||
Getall_Partner_Domaine_Competence_Pedago();
|
||||
|
|
@ -2381,7 +2409,7 @@ const Module_Domaine_Competence_Pedagogique = (props) => {
|
|||
}}
|
||||
>
|
||||
<DataGrid
|
||||
// checkboxSelection
|
||||
// checkboxSelection
|
||||
onSelectionModelChange={(newSelectionModel) => {
|
||||
setSelectionModel(newSelectionModel);
|
||||
/*if (newSelectionModel.length === 1)
|
||||
|
|
@ -2403,7 +2431,8 @@ const Module_Domaine_Competence_Pedagogique = (props) => {
|
|||
description: JSON.parse(item).description,
|
||||
commentaire: JSON.parse(item).commentaire,
|
||||
couleur: JSON.parse(item).couleur,
|
||||
|
||||
nb_heure: JSON.parse(item).nb_heure,
|
||||
seuil_absence: JSON.parse(item).seuil_absence,
|
||||
}
|
||||
))}
|
||||
|
||||
|
|
@ -2419,8 +2448,13 @@ const Module_Domaine_Competence_Pedagogique = (props) => {
|
|||
setgridline_id(newSelectionModel.row.id);
|
||||
setp_detail_domaine_compet_pedago_id(newSelectionModel.row._id);
|
||||
setp_detail_domaine_compet_pedago_code(newSelectionModel.row.code);
|
||||
setp_detail_domaine_compet_pedago_nb_heure(newSelectionModel.row.nb_heure);
|
||||
setp_detail_domaine_compet_pedago_description(newSelectionModel.row.description);
|
||||
setp_detail_domaine_compet_pedago_commentaire(newSelectionModel.row.commentaire);
|
||||
setp_detail_domaine_compet_pedago_seuil_absence(newSelectionModel.row.seuil_absence);
|
||||
|
||||
setp_detail_domaine_compet_pedago_seuil_absence(newSelectionModel.row.seuil_absence);
|
||||
|
||||
|
||||
|
||||
setdomaine_compet_pedago_data_changed("");
|
||||
|
|
@ -2579,7 +2613,7 @@ const Module_Domaine_Competence_Pedagogique = (props) => {
|
|||
}}>
|
||||
|
||||
<div style={{ width: '100%', float: 'left', marginTop: "1rem", marginBottom: '1rem' }}>
|
||||
<div style={{ width: '40%', paddingRight: "5px", fontFamily: 'DM Sans', fontSize: '14px', paddingLeft: '10px', float: 'left' }}> Code <br />
|
||||
<div style={{ width: '20%', paddingRight: "5px", fontFamily: 'DM Sans', fontSize: '14px', paddingLeft: '10px', float: 'left' }}> <b> Code </b> <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
|
|
@ -2600,8 +2634,51 @@ const Module_Domaine_Competence_Pedagogique = (props) => {
|
|||
/>
|
||||
</div>
|
||||
|
||||
<div style={{ width: '20%', paddingRight: "5px", fontFamily: 'DM Sans', fontSize: '14px', paddingLeft: '10px', float: 'left' }}> <b> Volume horaire </b> <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="detail_heure"
|
||||
id="detail_heure"
|
||||
type="number"
|
||||
InputProps={{ inputProps: { min: 1, max: 99999 } }}
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_domaine_compet_pedago_nb_heure}
|
||||
onChange={(e) => {
|
||||
setp_detail_domaine_compet_pedago_nb_heure(e.target.value);
|
||||
setdomaine_compet_pedago_data_changed("1");
|
||||
}}
|
||||
|
||||
<div style={{ width: '40%', paddingRight: "5px", fontFamily: 'DM Sans', fontSize: '14px', paddingLeft: '10px', float: 'right' }}> Couleur <br />
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div style={{ width: '20%', paddingRight: "5px", fontFamily: 'DM Sans', fontSize: '14px', paddingLeft: '10px', float: 'left' }}> Seuil d'absence <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="detail_seuil_absence"
|
||||
id="detail_seuil_absence"
|
||||
type="number"
|
||||
InputProps={{ inputProps: { min: 1, max: 99999 } }}
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_domaine_compet_pedago_seuil_absence}
|
||||
onChange={(e) => {
|
||||
setp_detail_domaine_compet_pedago_seuil_absence(e.target.value);
|
||||
setdomaine_compet_pedago_data_changed("1");
|
||||
}}
|
||||
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div style={{ width: '20%', paddingRight: "5px", fontFamily: 'DM Sans', fontSize: '14px', paddingLeft: '10px', float: 'right' }}> Couleur <br />
|
||||
<nav className="disabled_style" style={{ backgroundColor: p_detail_domaine_compet_pedago_couleur, cursor: 'pointer', borderRadius: '10px', paddingTop: '15px' }}
|
||||
disabled={!domaine_compet_pedago_edit_data}
|
||||
onClick={(event, value) => {
|
||||
|
|
@ -2739,7 +2816,7 @@ const Module_Domaine_Competence_Pedagogique = (props) => {
|
|||
|
||||
<div style={{ width: '100%', float: 'left', marginTop: "1rem", marginBottom: '1rem' }}>
|
||||
|
||||
<div style={{ width: '40%', paddingRight: "5px", fontFamily: 'DM Sans', fontSize: '14px', paddingLeft: '10px', float: 'left' }}> Code <br />
|
||||
<div style={{ width: '20%', paddingRight: "5px", fontFamily: 'DM Sans', fontSize: '14px', paddingLeft: '10px', float: 'left' }}> <b> Code </b> <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
|
|
@ -2760,7 +2837,53 @@ const Module_Domaine_Competence_Pedagogique = (props) => {
|
|||
/>
|
||||
</div>
|
||||
|
||||
<div style={{ width: '40%', paddingRight: "5px", fontFamily: 'DM Sans', fontSize: '14px', paddingLeft: '10px', float: 'right' }}> Couleur <br />
|
||||
<div style={{ width: '20%', paddingRight: "5px", fontFamily: 'DM Sans', fontSize: '14px', paddingLeft: '10px', float: 'left' }}> <b> Volume horaire </b> <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="detail_heure"
|
||||
id="detail_heure"
|
||||
|
||||
type="number"
|
||||
InputProps={{ inputProps: { min: 1, max: 99999 } }}
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={!domaine_compet_pedago_edit_data}
|
||||
className="disabled_style"
|
||||
value={p_detail_domaine_compet_pedago_nb_heure}
|
||||
onChange={(e) => {
|
||||
setp_detail_domaine_compet_pedago_nb_heure(e.target.value);
|
||||
setdomaine_compet_pedago_data_changed("1");
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
<div style={{ width: '20%', paddingRight: "5px", fontFamily: 'DM Sans', fontSize: '14px', paddingLeft: '10px', float: 'left' }}> Seuil d'absence <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="detail_seuil_absence"
|
||||
id="detail_seuil_absence"
|
||||
type="number"
|
||||
InputProps={{ inputProps: { min: 1, max: 99999 } }}
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_domaine_compet_pedago_seuil_absence}
|
||||
onChange={(e) => {
|
||||
setp_detail_domaine_compet_pedago_seuil_absence(e.target.value);
|
||||
setdomaine_compet_pedago_data_changed("1");
|
||||
}}
|
||||
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
<div style={{ width: '20%', paddingRight: "5px", fontFamily: 'DM Sans', fontSize: '14px', paddingLeft: '10px', float: 'right' }}> Couleur <br />
|
||||
<nav className="disabled_style" style={{ backgroundColor: p_detail_domaine_compet_pedago_couleur, cursor: 'pointer', borderRadius: '10px', paddingTop: '15px' }}
|
||||
disabled={!domaine_compet_pedago_edit_data}
|
||||
onClick={(event, value) => {
|
||||
|
|
@ -2969,6 +3092,7 @@ const Module_Domaine_Competence_Pedagogique = (props) => {
|
|||
id: index,
|
||||
_id: (item)._id,
|
||||
code: (item).code,
|
||||
nb_heure: (item).nb_heure,
|
||||
description: (item).description,
|
||||
rang: (item).rang,
|
||||
|
||||
|
|
|
|||
|
|
@ -7575,7 +7575,6 @@ const Module_Session_Planification = (props) => {
|
|||
|
||||
{String(submenu_seq_dialog) !== "dialog_ressource" && String(p_detail_sequence_session_id) === "" && p_detail_event_id && String(p_detail_event_id) !== "" &&
|
||||
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
|
||||
<Button onClick={Dialog_DIALOG_AGENDA_handleClose_buton} className="bton_annule_dialog" style={{ width: '40%', float: 'left' }}>Fermer</Button>
|
||||
<Popup
|
||||
trigger={
|
||||
|
||||
|
|
@ -7628,6 +7627,8 @@ const Module_Session_Planification = (props) => {
|
|||
</div>
|
||||
)}
|
||||
</Popup>
|
||||
<Button onClick={Dialog_DIALOG_AGENDA_handleClose_buton} className="bton_annule_dialog" style={{ width: '40%', float: 'left' }}>Fermer</Button>
|
||||
|
||||
</div>}
|
||||
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue