recette2
cherif 2024-07-05 15:06:18 +02:00
parent d6850449bd
commit 672b8a964e
6 changed files with 1242 additions and 690 deletions

View File

@ -2691,7 +2691,7 @@ const Config_Documents = (props) => {
<Checkbox
name="document_join_pdf"
className="disabled_style"
checked={p_detail_joint_pdf}
checked={p_detail_joint_pdf}
/>
</div>}

View File

@ -10,11 +10,11 @@ import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid';
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
import { Editor } from '@tinymce/tinymce-react';
import parse from 'html-react-parser';
import { FcViewDetails, FcDisapprove, FcInfo, FcExpired } from "react-icons/fc";
import { FcViewDetails, FcDisapprove, FcInfo, FcExpired } from "react-icons/fc";
import 'react-tooltip/dist/react-tooltip.css'
import { Tooltip } from 'react-tooltip'
import add_plus from "../mysy_img/plus.png";
import excel_icone from "../mysy_img/excel_icone.png";
import excel_icone from "../mysy_img/excel_icone.png";
import participants from "../mysy_img/participants.png";
import fileDownload from 'js-file-download'
import Popup from 'reactjs-popup';
@ -1060,10 +1060,10 @@ const DisplayPartnerSession = (props) => {
onClick={(event) => {
// handleClick_valide_emargement(event, cellValues); zzz
setp_detail_emargement_comment(cellValues.row.comment) ;
setp_detail_emargement_comment(cellValues.row.comment);
setselected_emargement_user(cellValues.row.prenom+ " "+cellValues.row.nom) ;
setselected_emargement_date("Du "+cellValues.row.sequence_start+" au "+cellValues.row.sequence_end);
setselected_emargement_user(cellValues.row.prenom + " " + cellValues.row.nom);
setselected_emargement_date("Du " + cellValues.row.sequence_start + " au " + cellValues.row.sequence_end);
setselected_emargement_id(cellValues.row._id);
setDialog_COMMENT_EMARGEMENTE_open(true);
}}
@ -2970,6 +2970,10 @@ const DisplayPartnerSession = (props) => {
return;
}
// Gestion du statut d'inscription
if( String(myinscript_status) === ""){
alert(" Vous devez choisir un statut d'inscription ");
}
//form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
const stored_cookie = getCookie('tokenmysypart');
@ -3123,7 +3127,7 @@ const DisplayPartnerSession = (props) => {
const New_status_inscription_add = [
{ "id": "0", "label": "PréInscription", "value": "0" },
{ "id": "1", "label": "Inscription", "value": "1" },
// { "id": "1", "label": "Inscription", "value": "1" },
{ "id": "2", "label": "En Cours", "value": "2" },
]
@ -3149,7 +3153,7 @@ const DisplayPartnerSession = (props) => {
{ "id": "4", "label": "Rech. Emploi", "value": "4" },
]
const [myinscript_status, setmyinscript_status] = useState("");
const [myinscript_status, setmyinscript_status] = useState("0");
@ -9418,7 +9422,7 @@ const DisplayPartnerSession = (props) => {
const [Update_Comment_Given_Emargement_result, setUpdate_Comment_Given_Emargement_result] = useState();
function Update_Comment_Given_Emargement(emargement_id) {
/*console.log(" ### date , email, matin,matin_val, apresmidi, apresmidi_val = ",
date, email, matin, matin_val, apresmidi, apresmidi_val);*/
@ -9428,8 +9432,8 @@ const DisplayPartnerSession = (props) => {
const stored_cookie = getCookie('tokenmysypart');
form.append("token", stored_cookie);
form.append("tab_ids", emargement_id);
form.append("comment", p_detail_emargement_comment);
form.append("comment", p_detail_emargement_comment);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Update_Given_Emargement_Data/";
@ -9438,6 +9442,8 @@ const DisplayPartnerSession = (props) => {
setLoading(false);
if (String(res.data.status) === String("true")) {
Dialog_COMMENT_EMARGEMENTE_handleClose_buton();
//console.log(" In UpdateStagiaireData res.data.status = " + res.data.status);
//console.log(" In UpdateStagiaireData res.data.message r_class = " + res.data.message);
setUpdate_Comment_Given_Emargement_api("true");
@ -11216,10 +11222,10 @@ const DisplayPartnerSession = (props) => {
<DialogTitle>MySy Information</DialogTitle>
<DialogContent className="DialogContent_width" style={{ "minHeight": "15rem" }}>
<DialogContentText>
{selected_emargement_date}<br/>{selected_emargement_user}
{selected_emargement_date}<br />{selected_emargement_user}
</DialogContentText>
<TextField
autoFocus
margin="dense"
@ -11285,7 +11291,7 @@ const DisplayPartnerSession = (props) => {
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
Update_Comment_Given_Emargement(selected_emargement_id);
Update_Comment_Given_Emargement(selected_emargement_id);
close();
}}> Valider </button>
@ -11314,10 +11320,10 @@ const DisplayPartnerSession = (props) => {
</div>
</DialogActions>
</div>}
</Dialog>
{ /******** End de comment emargement */}
@ -12744,8 +12750,8 @@ const DisplayPartnerSession = (props) => {
<DialogContentText>
{Dialog_2_message}
</DialogContentText>
<div className="div_row" > <hr className="mysy_hr_text" />
</div>
@ -17095,7 +17101,7 @@ const DisplayPartnerSession = (props) => {
/>
</div>
<div className="session_caract"> Statut Inscription <br />
<div className="session_caract"> <b> Statut Inscription </b> <br />
<Autocomplete
disablePortal
@ -17107,6 +17113,9 @@ const DisplayPartnerSession = (props) => {
onChange={(event, value) => {
if (value && value.value) {
setmyinscript_status(value.value);
} else {
setmyinscript_status("");
alert(" Vous devez choisir un statut d'inscription")
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
@ -17489,14 +17498,40 @@ const DisplayPartnerSession = (props) => {
{String(addOneParticipant) !== "1" && selected_code_session && selected_internal_url &&
<div id='ajout_participant' style={{ "textAlign": "left", "float": "left", "width": "100%" }}>
<Button variant="outlined" onClick={submenu_import_participant} className="detail_class_submenu bton_import_excel" style={{
"background": "#c8cfd5",
"color": "black", "width": "auto"
}}
<Button variant="outlined"
onClick={(event) => {
if (String(selected_session_invoiced_statut) === "1") {
alert(" La session est en cours de facturation ")
} else if (String(selected_session_invoiced_statut) === "2") {
alert(" La session est déjà facturée ")
} else {
submenu_import_participant()
}
}}
className="detail_class_submenu bton_import_excel" style={{
"background": "#c8cfd5",
"color": "black", "width": "auto"
}}
id='menu_import_participant' name='menu_import_participant'>Importer des participants excel &nbsp;
<img src={excel_icone} alt="ajout csv" className="icon_excel" />
</Button>
<Button variant="outlined" onClick={submenu_add_one_participant}
<Button variant="outlined"
onClick={(event) => {
if (String(selected_session_invoiced_statut) === "1") {
alert(" La session est en cours de facturation ")
} else if (String(selected_session_invoiced_statut) === "2") {
alert(" La session est déjà facturée ")
} else {
submenu_add_one_participant()
}
}}
className="detail_class_submenu bton_add_session"
id='menu_one_participant' name='menu_one_participant'>Ajout 1 participant &nbsp;
<img src={participants} alt="ajout un participant" className="icon_plus" />
@ -17651,7 +17686,7 @@ const DisplayPartnerSession = (props) => {
/>
</div>
<div className="session_caract"> Statut Inscription <br />
<div className="session_caract"> <b> Statut Inscription </b> <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
@ -17869,7 +17904,7 @@ const DisplayPartnerSession = (props) => {
/>
</div>
<div className="session_caract"> Statut Inscription <br />
<div className="session_caract"> <b> Statut Inscription </b> <br />
<Autocomplete
disablePortal
name="one_status_part"
@ -17883,6 +17918,9 @@ const DisplayPartnerSession = (props) => {
} else {
setmyinscript_status("");
alert(" Vous devez choisir un statut d'inscription")
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
@ -18287,14 +18325,43 @@ const DisplayPartnerSession = (props) => {
{String(addOneParticipant) !== "1" && selected_code_session && selected_internal_url && <div id='ajout_participant' style={{ "textAlign": "left", "float": "left", "width": "100%" }}>
<Button variant="outlined" onClick={submenu_import_participant} className="detail_class_submenu bton_import_excel" style={{
"background": "#c8cfd5",
"color": "black", "width": "auto"
}}
<Button variant="outlined"
onClick={(event) => {
if (String(selected_session_invoiced_statut) === "1") {
alert(" La session est en cours de facturation ")
} else if (String(selected_session_invoiced_statut) === "2") {
alert(" La session est déjà facturée ")
} else {
submenu_import_participant()
}
}}
className="detail_class_submenu bton_import_excel" style={{
"background": "#c8cfd5",
"color": "black", "width": "auto"
}}
id='menu_import_participant' name='menu_import_participant'>Importer des participants excel &nbsp;
<img src={excel_icone} alt="ajout csv" className="icon_excel" />
</Button>
<Button variant="outlined" onClick={submenu_add_one_participant}
<Button variant="outlined"
onClick={(event) => {
if (String(selected_session_invoiced_statut) === "1") {
alert(" La session est en cours de facturation ")
} else if (String(selected_session_invoiced_statut) === "2") {
alert(" La session est déjà facturée ")
} else {
submenu_add_one_participant()
}
}}
className="detail_class_submenu bton_add_session"
id='menu_one_participant' name='menu_one_participant'>Ajout 1 participant &nbsp;
<img src={participants} alt="ajout un participant" className="icon_plus" />
@ -19526,55 +19593,56 @@ const DisplayPartnerSession = (props) => {
<div className="div_row" style={{ "textAlign": "right", "marginTop": "0.5rem" }}>
<Popup
trigger={
<Button className="bton_emarge">Initialiser la liste</Button>
}
modal
nested
position="center center"
{String(selected_session_invoiced_statut) !== "1" && String(selected_session_invoiced_statut) !== "2" &&
<Popup
trigger={
<Button className="bton_emarge">Initialiser la liste</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">
{' '}
{close => (
<div>
<button className="gest_close" onClick={close}>
&times;
</button>
<div className="gest_header"> MySy Information </div>
<div className="gest_content">
{' '}
<font> Confirmez la ()initialisation de la liste d'émargement. <br />
<font color="red"> /!\ Si un tableau d'émargement existe pour cette session, il sera supprimé et récréé </font>
</font>
<font> Confirmez la ()initialisation de la liste d'émargement. <br />
<font color="red"> /!\ Si un tableau d'émargement existe pour cette session, il sera supprimé et récréé </font>
</font>
</div>
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
CreateListEmargement();
close();
}}> Valider </button>
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
onClick={() => {
//console.log('modal closed ');
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
CreateListEmargement();
close();
}}
>
Annuler
</button>
}}> 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>
)}
</Popup>
)}
</Popup>}
<Button className="bton_emarge" onClick={(event) => {
@ -19819,7 +19887,7 @@ const DisplayPartnerSession = (props) => {
<Popup
trigger={
<Button className="bton_emarge">Initialiser la demande</Button>
<Button className="bton_emarge">Initialiser la demande</Button>
}
modal
nested
@ -20268,7 +20336,7 @@ const DisplayPartnerSession = (props) => {
<Module_Session_Planification conntected_employee_id={props.conntected_employee_id} related_collection={"session_formation"}
related_collection_recid={selected_session_id} SessionstartDate={new Date(moment(SessionstartDate, "DD/MM/YYYY"))}
SessionendDate={new Date(moment(SessionendDate, "DD/MM/YYYY"))} />
SessionendDate={new Date(moment(SessionendDate, "DD/MM/YYYY"))} selected_session_invoiced_statut={selected_session_invoiced_statut} />
</div>}
@ -20279,7 +20347,9 @@ const DisplayPartnerSession = (props) => {
<Module_Session_Evaluation conntected_employee_id={props.conntected_employee_id} related_collection={"session_formation"}
related_collection_recid={selected_session_id} SessionstartDate={new Date(moment(SessionstartDate, "DD/MM/YYYY"))}
SessionendDate={new Date(moment(SessionendDate, "DD/MM/YYYY"))} session_formateur_id={p_formateur_id} session_class_id={p_detail_session_class_id} />
SessionendDate={new Date(moment(SessionendDate, "DD/MM/YYYY"))} session_formateur_id={p_formateur_id}
session_class_id={p_detail_session_class_id}
selected_session_invoiced_statut={selected_session_invoiced_statut} />
</div>}

View File

@ -432,6 +432,50 @@ const Employes = (props) => {
]
const columns_list_evaluation_enseignant = [
{ field: 'id', headerName: 'id', hide: true },
{ field: '_id', headerName: '_id', hide: true },
{ field: 'form_code', headerName: 'Form. Code', hide: true, minwidth: 200, flex: 1, hideable: true, resizable: true, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'email', headerName: 'email', minwidth: 300, flex: 1, hideable: true, resizable: true, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'nom', headerName: 'nom', minwidth: 300, flex: 1, hide: false, editable: true, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'prenom', headerName: 'prenom', minwidth: 300, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{
field: 'status', headerName: 'Statut', width: 100, editable: false, flex: true,
valueFormatter: (params) => {
if (String(params.value) === "0")
return "Init.";
else if (String(params.value) === "1")
return "Env.";
else if (String(params.value) === "2")
return "Rép.";
else
return " ?";
},
},
{
field: 'date_envoie', headerName: 'Date Envoi', width: 150, editable: false,
valueFormatter: (params) => {
if (params.value)
return String(params.value).substring(0, 16)
else
return ""
},
},
{
field: 'date_reponse', headerName: 'Date Réponse', width: 150, editable: false,
valueFormatter: (params) => {
if (params.value)
return String(params.value).substring(0, 16)
else
return ""
},
},
]
const [tabledata, settabledata] = useState([]);
const [rows_acces_right_v2, setrows_acces_right_v2] = useState([]);
@ -793,7 +837,52 @@ const Employes = (props) => {
}
const [selectionModel_evaluation_formateur, setselectionModel_evaluation_formateur] = React.useState([]);
const [rowss_evaluation_formateur, setRows_evaluation_formateur] = useState([]);
const [Getall_Survey_formateur_evaluation_By_Session_api, setGetall_Survey_formateur_evaluation_By_Session_api] = useState();
const [Getall_Survey_formateur_evaluation_By_Session_message, setGetall_Survey_formateur_evaluation_By_Session_message] = useState();
const [Getall_Survey_formateur_evaluation_By_Session_result, setGetall_Survey_formateur_evaluation_By_Session_result] = useState([]);
function Getall_Survey_formateur_evaluation_By_Session(event) {
setselectionModel_evaluation_formateur([])
var form = new FormData();
const stored_cookie = getCookie('tokenmysypart');
form.append("token", stored_cookie);
form.append("related_collection", "ressource_humaine");
form.append("related_collection_id", selected_id);
form.append("formulaire_type", "human_eval");
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Survey_with_filter/";
setLoading(true);
axios.post(myurl, form).then(res => {
setLoading(false);
if (String(res.data.status) === String("true")) {
// console.log(" In Getall_Survey_formateur_evaluation_By_Session res.data.status = " + res.data.status);
//console.log(" In Getall_Survey_formateur_evaluation_By_Session res.data.message r_class = " + res.data.message);
setGetall_Survey_formateur_evaluation_By_Session_api("true");
setGetall_Survey_formateur_evaluation_By_Session_result(res.data.message);
setRows_evaluation_formateur(res.data.message);
}
else {
setGetall_Survey_formateur_evaluation_By_Session_api("false");
setGetall_Survey_formateur_evaluation_By_Session_message(res.data.message);
}
}).catch((error) => {
setLoading(false);
console.warn('Not good man :( Getall_Survey_formateur_evaluation_By_Session = ', error);
setGetall_Survey_formateur_evaluation_By_Session_api("false");
//setmyApimyApiMessage("")
})
}
useEffect(() => {
Getall_Training_Employee_No_Filter();
@ -804,6 +893,8 @@ const Employes = (props) => {
Get_Partner_Object_Specific_Fields("ressource_humaine");
Getall_Survey_formateur_evaluation_By_Session();
window.scrollTo({
top: 0,
behavior: "smooth",
@ -1256,7 +1347,7 @@ const Employes = (props) => {
* Update 22/10/2023 :
Gestion des champs spécifiques. ils commencent tous par 'my_'
*/
for (let i = 0; i < rows_champs_specifics.length; i++) {
@ -1943,7 +2034,7 @@ const Employes = (props) => {
}
// Pour les champs spécifiques
@ -3003,6 +3094,11 @@ const Employes = (props) => {
document.getElementById("piece_jointe").style.color = "black";
}
if (document.getElementById("evaluation")) {
document.getElementById("evaluation").style.backgroundColor = "#d8edfc";
document.getElementById("evaluation").style.color = "black";
}
//console.log(" ### employee_data_edit_mode = ", employee_data_edit_mode);
if (String(employee_data_edit_mode) !== "1")
disable_Employee_DetailFields();
@ -3055,6 +3151,11 @@ const Employes = (props) => {
document.getElementById("piece_jointe").style.backgroundColor = "#d8edfc";
document.getElementById("piece_jointe").style.color = "black";
}
if (document.getElementById("evaluation")) {
document.getElementById("evaluation").style.backgroundColor = "#d8edfc";
document.getElementById("evaluation").style.color = "black";
}
}
async function submenu_contrat() {
@ -3088,6 +3189,55 @@ const Employes = (props) => {
}
if (document.getElementById("piece_jointe")) {
document.getElementById("piece_jointe").style.backgroundColor = "#d8edfc";
document.getElementById("piece_jointe").style.color = "black";
}
if (document.getElementById("evaluation")) {
document.getElementById("evaluation").style.backgroundColor = "#d8edfc";
document.getElementById("evaluation").style.color = "black";
}
}
async function submenu_evaluation() {
setsubmenu("evaluation");
await sleep(5);
if (document.getElementById("evaluation")) {
document.getElementById("evaluation").style.backgroundColor = "#104277";
document.getElementById("evaluation").style.color = "white";
}
if (document.getElementById("contrat")) {
document.getElementById("contrat").style.backgroundColor = "#d8edfc";
document.getElementById("contrat").style.color = "black";
}
if (document.getElementById("affectation")) {
document.getElementById("affectation").style.backgroundColor = "#d8edfc";
document.getElementById("affectation").style.color = "black";
}
if (document.getElementById("detail_employe")) {
document.getElementById("detail_employe").style.backgroundColor = "#d8edfc";
document.getElementById("detail_employe").style.color = "black";
}
if (document.getElementById("droit_acces")) {
document.getElementById("droit_acces").style.backgroundColor = "#d8edfc";
document.getElementById("droit_acces").style.color = "black";
}
if (document.getElementById("competence")) {
document.getElementById("competence").style.backgroundColor = "#d8edfc";
document.getElementById("competence").style.color = "black";
}
if (document.getElementById("piece_jointe")) {
document.getElementById("piece_jointe").style.backgroundColor = "#d8edfc";
document.getElementById("piece_jointe").style.color = "black";
@ -3134,6 +3284,11 @@ const Employes = (props) => {
document.getElementById("piece_jointe").style.color = "black";
}
if (document.getElementById("evaluation")) {
document.getElementById("evaluation").style.backgroundColor = "#d8edfc";
document.getElementById("evaluation").style.color = "black";
}
setSelectionModel_affectations([]);
setdisplay_affectation("0");
setAdd_new_affectation("");
@ -3216,6 +3371,11 @@ const Employes = (props) => {
document.getElementById("droit_acces").style.color = "black";
}
if (document.getElementById("evaluation")) {
document.getElementById("evaluation").style.backgroundColor = "#d8edfc";
document.getElementById("evaluation").style.color = "black";
}
}
@ -3256,6 +3416,12 @@ const Employes = (props) => {
document.getElementById("affectation").style.backgroundColor = "#d8edfc";
document.getElementById("affectation").style.color = "black";
}
if (document.getElementById("evaluation")) {
document.getElementById("evaluation").style.backgroundColor = "#d8edfc";
document.getElementById("evaluation").style.color = "black";
}
setSelectionModel_affectations([]);
setdisplay_affectation("0");
setAdd_new_affectation("");
@ -6016,7 +6182,7 @@ const Employes = (props) => {
}
/>}
</div>
@ -6629,6 +6795,7 @@ const Employes = (props) => {
<Button variant="outlined" onClick={submenu_droit_acces} className="detail_class_submenu" id='droit_acces' name='droit_acces'>Droits d'accès </Button>
<Button variant="outlined" onClick={submenu_affectation} className="detail_class_submenu" id='affectation' name='affectation'>Affectation </Button>
<Button variant="outlined" onClick={submenu_contrat} className="detail_class_submenu" id='affectation' name='contrat'>Contrat </Button>
<Button variant="outlined" onClick={submenu_evaluation} className="detail_class_submenu" id='evaluation' name='evaluation'>Evaluation </Button>
</div>
@ -7782,7 +7949,7 @@ const Employes = (props) => {
<Button variant="outlined" onClick={submenu_droit_acces} className="detail_class_submenu" id='droit_acces' name='droit_acces'>Droits d'accès </Button>
<Button variant="outlined" onClick={submenu_affectation} className="detail_class_submenu" id='affectation' name='affectation'>Affectation </Button>
<Button variant="outlined" onClick={submenu_contrat} className="detail_class_submenu" id='affectation' name='contrat'>Contrat </Button>
<Button variant="outlined" onClick={submenu_evaluation} className="detail_class_submenu" id='evaluation' name='evaluation'>Evaluation </Button>
</div>
<nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}> Ajouter un Employé </nav>
@ -8300,6 +8467,7 @@ const Employes = (props) => {
<Button variant="outlined" onClick={submenu_droit_acces} className="detail_class_submenu" id='droit_acces' name='droit_acces'>Droits d'accès </Button>
<Button variant="outlined" onClick={submenu_affectation} className="detail_class_submenu" id='affectation' name='affectation'>Affectation </Button>
<Button variant="outlined" onClick={submenu_contrat} className="detail_class_submenu" id='affectation' name='contrat'>Contrat </Button>
<Button variant="outlined" onClick={submenu_evaluation} className="detail_class_submenu" id='evaluation' name='evaluation'>Evaluation </Button>
</div>
<nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}> Liste Affectations </nav>
<div className="session_data">
@ -8864,6 +9032,7 @@ const Employes = (props) => {
<Button variant="outlined" onClick={submenu_droit_acces} className="detail_class_submenu" id='droit_acces' name='droit_acces'>Droits d'accès </Button>
<Button variant="outlined" onClick={submenu_affectation} className="detail_class_submenu" id='affectation' name='affectation'>Affectation </Button>
<Button variant="outlined" onClick={submenu_contrat} className="detail_class_submenu" id='affectation' name='contrat'>Contrat </Button>
<Button variant="outlined" onClick={submenu_evaluation} className="detail_class_submenu" id='evaluation' name='evaluation'>Evaluation </Button>
</div>
<nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}> Droits d'accès système </nav>
@ -9111,6 +9280,7 @@ const Employes = (props) => {
<Button variant="outlined" onClick={submenu_droit_acces} className="detail_class_submenu" id='droit_acces' name='droit_acces'>Droits d'accès </Button>
<Button variant="outlined" onClick={submenu_affectation} className="detail_class_submenu" id='affectation' name='affectation'>Affectation </Button>
<Button variant="outlined" onClick={submenu_contrat} className="detail_class_submenu" id='affectation' name='contrat'>Contrat </Button>
<Button variant="outlined" onClick={submenu_evaluation} className="detail_class_submenu" id='evaluation' name='evaluation'>Evaluation </Button>
</div>
&nbsp;
<div style={{ height: 550, width: '100%', paddingRight: '1px', "marginLeft": "10px", "marginRight": "10px", }}>
@ -9220,6 +9390,7 @@ const Employes = (props) => {
<Button variant="outlined" onClick={submenu_droit_acces} className="detail_class_submenu" id='droit_acces' name='droit_acces'>Droits d'accès </Button>
<Button variant="outlined" onClick={submenu_affectation} className="detail_class_submenu" id='affectation' name='affectation'>Affectation </Button>
<Button variant="outlined" onClick={submenu_contrat} className="detail_class_submenu" id='affectation' name='contrat'>Contrat </Button>
<Button variant="outlined" onClick={submenu_evaluation} className="detail_class_submenu" id='evaluation' name='evaluation'>Evaluation </Button>
</div>
<nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}> Les pièces jointes </nav>
@ -9374,6 +9545,7 @@ const Employes = (props) => {
<Button variant="outlined" onClick={submenu_droit_acces} className="detail_class_submenu" id='droit_acces' name='droit_acces'>Droits d'accès </Button>
<Button variant="outlined" onClick={submenu_affectation} className="detail_class_submenu" id='affectation' name='affectation'>Affectation </Button>
<Button variant="outlined" onClick={submenu_contrat} className="detail_class_submenu" id='affectation' name='contrat'>Contrat </Button>
<Button variant="outlined" onClick={submenu_evaluation} className="detail_class_submenu" id='evaluation' name='evaluation'>Evaluation </Button>
</div>
<nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}> Les Compétences </nav>
<div className="session_data" style={{ "minHeight": '15rem', "paddingLeft": "10px", "paddingRight": "10px" }}>
@ -9443,6 +9615,152 @@ const Employes = (props) => {
</div>}
{String(submenu) === "evaluation" && <div className="div_row" style={{ paddingRight: '10px' }}>
<div className="div_row">
<Button variant="outlined" onClick={submenu_detail_employe} className="detail_class_submenu" id='detail_employe' name='detail_employe'>Détail employé</Button>
<Button variant="outlined" onClick={submenu_competence} className="detail_class_submenu" id='competence' name='contrat'>Compétences </Button>
<Button variant="outlined" onClick={submenu_piece_jointe} className="detail_class_submenu" id='piece_jointe' name='contrat'>Pièces Jointes </Button>
<Button variant="outlined" onClick={submenu_droit_acces} className="detail_class_submenu" id='droit_acces' name='droit_acces'>Droits d'accès </Button>
<Button variant="outlined" onClick={submenu_affectation} className="detail_class_submenu" id='affectation' name='affectation'>Affectation </Button>
<Button variant="outlined" onClick={submenu_contrat} className="detail_class_submenu" id='affectation' name='contrat'>Contrat </Button>
<Button variant="outlined" onClick={submenu_evaluation} className="detail_class_submenu" id='evaluation' name='evaluation'>Evaluation </Button>
</div>
<nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}> Les evaluations </nav>
<div className="session_data" style={{ "minHeight": '15rem', "paddingLeft": "10px", "paddingRight": "10px" }}>
<div className="titre1"> Evaluation par les apprenants </div>
Evaluation <br />
<div style={{ height: "650px", width: '100%', padding: "10px" }} className="session_data">
<Box
sx={{
height: 500,
width: '100%',
paddingRight: '1px',
"& .MuiDataGrid-columnHeaders": {
backgroundColor: "#c8cfd5",
color: "black",
fontSize: 14
},
'& .line--statut--pair': {
backgroundColor: 'rgba(235, 235, 235, .7)',
color: 'black',
},
[`& .${gridClasses.cell}`]: {
py: 1,
},
'& .line--positionnement_envoye': {
backgroundColor: '#F9E79F',
color: 'black',
},
'& .line--positionnement_repondu': {
backgroundColor: '#ABEBC6',
color: 'black',
fontWeight: '600',
},
}}
>
<DataGrid
checkboxSelection
onSelectionModelChange={(newSelectionModel_evaluation) => {
setselectionModel_evaluation_formateur(newSelectionModel_evaluation);
//console.log("ch selected--" + newSelectionModel_evaluation);
}}
selectionModel={selectionModel_evaluation_formateur}
localeText={frFR.components.MuiDataGrid.defaultProps.localeText}
rows={rowss_evaluation_formateur.map((item, index) => (
{
id: index,
_id: JSON.parse(item)._id,
email: JSON.parse(item).email,
nom: JSON.parse(item).nom,
prenom: JSON.parse(item).prenom,
status: JSON.parse(item).statut,
form_code: JSON.parse(item).formulaire.code,
date_envoie: JSON.parse(item).date_envoi,
date_reponse: JSON.parse(item).date_reponse,
}
))}
columns={columns_list_evaluation_enseignant}
pageSize={10}
className="datagridclass"
rowsPerPageOptions={[10]}
disableSelectionOnClick
components={{
Toolbar: GridToolbar,
}}
getRowClassName={(params) => {
if (String(params.row.status) === "1") {
return 'line--positionnement_envoye';
}
if (String(params.row.status) === "2") {
return 'line--positionnement_repondu';
}
// Pour la gestion de la couleur de zone double cliquée
if (parseInt(String(params.row.id)) % 2 === 0) {
return 'line--statut--pair';
}
else if (parseInt(String(params.row.id)) % 2 !== 0) {
return 'line--statut--impair';
}
}}
getEstimatedRowHeight={() => 200}
getRowHeight={() => "auto"}
sx={{
"& .MuiDataGrid-cellContent": {
minHeight: 50,
},
[`& .${gridClasses.cell}`]: {
py: 1,
},
}}
/>
</Box>
<br />
</div>
</div>
<div className="div_row" style={{ "border": "None" }}>
<div className="session_data" style={{ "minHeight": '15rem', "paddingLeft": "10px", "paddingRight": "10px" }}>
<div className="titre1"> Autres évaluations </div>
</div>
</div>
</div>}
</div >

View File

@ -315,12 +315,12 @@ const Module_Session_Evaluation = (props) => {
};
new_data2.push(node);
});
//---
var node = {
//---
var node = {
"_id": "",
"id": "",
"label":"",
"label": "",
"nom": "",
"prenom": "",
"ismanager": ""
@ -514,7 +514,7 @@ const Module_Session_Evaluation = (props) => {
if (String(res.data.status) === String("true")) {
// console.log(" In Getall_Survey_hot_evaluation_By_Session res.data.status = " + res.data.status);
console.log(" In Getall_Survey_hot_evaluation_By_Session res.data.message r_class = " + res.data.message);
//console.log(" In Getall_Survey_hot_evaluation_By_Session res.data.message r_class = " + res.data.message);
setGetall_Survey_hot_evaluation_By_Session_api("true");
setGetall_Survey_hot_evaluation_By_Session_result(res.data.message);
setRows_evaluation(res.data.message);
@ -592,7 +592,7 @@ const Module_Session_Evaluation = (props) => {
const [selectionModel_evaluation_cold, setSelectionModel_evaluation_cold] = React.useState([]);
const [rowss_evaluation_cold, setRows_evaluation_cold] = useState([]);
const [selectionModel_evaluation_formateur, setSelectionModel_evaluation_formateur] = React.useState([]);
const [selectionModel_evaluation_formateur, setselectionModel_evaluation_formateur] = React.useState([]);
const [rowss_evaluation_formateur, setRows_evaluation_formateur] = useState([]);
/**** Les évaluations a froid */
@ -770,7 +770,7 @@ const Module_Session_Evaluation = (props) => {
if (String(res.data.status) === String("true")) {
// console.log(" In Getall_Survey_cold_evaluation_By_Session res.data.status = " + res.data.status);
console.log(" In Getall_Survey_cold_evaluation_By_Session res.data.message r_class = " + res.data.message);
//console.log(" In Getall_Survey_cold_evaluation_By_Session res.data.message r_class = " + res.data.message);
setGetall_Survey_cold_evaluation_By_Session_api("true");
setGetall_Survey_cold_evaluation_By_Session_result(res.data.message);
setRows_evaluation_cold(res.data.message);
@ -794,7 +794,7 @@ const Module_Session_Evaluation = (props) => {
const [Getall_Survey_formateur_evaluation_By_Session_result, setGetall_Survey_formateur_evaluation_By_Session_result] = useState([]);
function Getall_Survey_formateur_evaluation_By_Session(event) {
setSelectionModel_evaluation_formateur([])
setselectionModel_evaluation_formateur([])
var form = new FormData();
@ -813,7 +813,7 @@ const Module_Session_Evaluation = (props) => {
if (String(res.data.status) === String("true")) {
// console.log(" In Getall_Survey_formateur_evaluation_By_Session res.data.status = " + res.data.status);
console.log(" In Getall_Survey_formateur_evaluation_By_Session res.data.message r_class = " + res.data.message);
//console.log(" In Getall_Survey_formateur_evaluation_By_Session res.data.message r_class = " + res.data.message);
setGetall_Survey_formateur_evaluation_By_Session_api("true");
setGetall_Survey_formateur_evaluation_By_Session_result(res.data.message);
setRows_evaluation_formateur(res.data.message);
@ -887,7 +887,7 @@ const Module_Session_Evaluation = (props) => {
const [Create_List_Survey_eval_formateur_For_Session_For_Inscrit_result, setCreate_List_Survey_eval_formateur_For_Session_For_Inscrit_result] = useState();
function Create_List_Survey_eval_formateur_For_Session_For_Inscrit() {
if( String(selected_formateur_id) === "" || String(selected_formateur_id).length < 5 ){
if (String(selected_formateur_id) === "" || String(selected_formateur_id).length < 5) {
alert(" Vous devez choisir un formateur ");
return;
}
@ -917,6 +917,7 @@ const Module_Session_Evaluation = (props) => {
setCreate_List_Survey_eval_formateur_For_Session_For_Inscrit_api("true");
setCreate_List_Survey_eval_formateur_For_Session_For_Inscrit_result(res.data.message);
Getall_Survey_formateur_evaluation_By_Session();
setselected_formateur_id("");
alert(res.data.message);
} else if (String(res.data.status) === String("Err_Connexion")) {
@ -938,6 +939,9 @@ const Module_Session_Evaluation = (props) => {
})
}
const [actionmass_eval_formateur, setactionmass_eval_formateur] = useState();
const [actionmass_eval_froid, setactionmass_eval_froid] = useState();
const [actionmass_eval_val, setactionmass_eval_val] = useState();
@ -969,6 +973,34 @@ const Module_Session_Evaluation = (props) => {
}
function GetSelectedRows_Evaluation_formateur_Ids() {
var tab_tmp = []
for (var i = 0; i < selectionModel_evaluation_formateur.length; i++) {
var myid = parseInt(String(selectionModel_evaluation_formateur[i]));
//var line = JSON.parse(rowss[myid]);
tab_tmp.push(myid);
}
return tab_tmp;
}
async function actionmass_Formation_Traitemet() {
var liste_formation = GetSelectedRows_Evaluation_formateur_Ids();
var tab_ids_survey = []
for (var i = 0; i < selectionModel_evaluation_formateur.length; i++) {
var myid = parseInt(String(selectionModel_evaluation_formateur[i]));
var line = JSON.parse(rowss_evaluation_formateur[myid]);
var line_id = JSON.parse(rowss_evaluation_formateur[myid])._id;
tab_ids_survey.push(line_id);
}
//SendEvaluationEmail_Many_Ids(tab_ids_inscription);
Send_Survey_By_Email_For_Ids(tab_ids_survey);
}
async function actionmass_Evaluation_Traitemet() {
var liste_formation = GetSelectedRows_Evaluation_Ids();
@ -1048,13 +1080,17 @@ const Module_Session_Evaluation = (props) => {
Getall_Survey_hot_evaluation_By_Session();
Getall_Survey_cold_evaluation_By_Session();
Getall_Survey_formateur_evaluation_By_Session();
setSelectionModel_evaluation([]);
setSelectionModel_evaluation_cold([]);
setselectionModel_evaluation_formateur([]);
setactionmass_eval_val("");
setactionmass_eval_froid("");
setactionmass_eval_formateur("");
alert(res.data.message);
@ -1103,9 +1139,9 @@ const Module_Session_Evaluation = (props) => {
useEffect(() => {
if( props.session_formateur_id){
if (props.session_formateur_id) {
setselected_formateur_id(props.session_formateur_id);
}else{
} else {
setselected_formateur_id("");
}
Getall_Training_Employee_No_Filter();
@ -1113,6 +1149,7 @@ const Module_Session_Evaluation = (props) => {
Getall_Survey_hot_evaluation_By_Session();
Getall_Survey_cold_evaluation_By_Session();
Getall_Survey_formateur_evaluation_By_Session();
setSessionendDate(props.SessionendDate);
setSessionstartDate(props.SessionstartDate);
@ -1171,6 +1208,37 @@ const Module_Session_Evaluation = (props) => {
}
function Export_survey_formateur_eval_datatab_class() {
const stored_cookie = getCookie('tokenmysypart');
var nom_fichier_cmd = "export_reponses.xlsx";
var url = process.env.REACT_APP_API_URL + "myclass/api/Export_To_Excel_Survey_with_filter/" + stored_cookie + "/" + selected_session_id + "/human_eval/";
setLoading(true);
axios.get(url, { responseType: 'blob', },)
.then((res) => {
setLoading(false);
//console.log(" In Export_Dashbord_to_CSV res.data = " + res.data);
if (String(res.data) === String("false")) {
alert("Impossible d'exporter les réponses (2) ");
} else {
fileDownload(res.data, nom_fichier_cmd)
}
}).catch((error) => {
setLoading(false);
console.error('Error:', error);
alert(" Impossible d'exporter les réponses ")
});
setLoading(false);
}
function Export_survey_cold_eval_datatab_class() {
const stored_cookie = getCookie('tokenmysypart');
@ -1261,7 +1329,7 @@ const Module_Session_Evaluation = (props) => {
>
<DialogTitle>MySy Information</DialogTitle>
<DialogContent className="DialogContent_width" style={{ "minHeight": "30rem" }}>
<DialogContent className="DialogContent_width" style={{ "minHeight": "20rem" }}>
<DialogContentText>
{Dialog_1_message}
</DialogContentText>
@ -1341,7 +1409,7 @@ const Module_Session_Evaluation = (props) => {
>
<DialogTitle>MySy Information</DialogTitle>
<DialogContent className="DialogContent_width" style={{ "minHeight": "30rem" }}>
<DialogContent className="DialogContent_width" style={{ "minHeight": "20rem" }}>
<DialogContentText>
{Dialog_1_message}
</DialogContentText>
@ -1442,7 +1510,7 @@ const Module_Session_Evaluation = (props) => {
>
<DialogTitle>MySy Information</DialogTitle>
<DialogContent className="DialogContent_width" style={{ "minHeight": "30rem" }}>
<DialogContent className="DialogContent_width" style={{ "minHeight": "20rem" }}>
<DialogContentText>
{Dialog_1_message}
</DialogContentText>
@ -1476,7 +1544,7 @@ const Module_Session_Evaluation = (props) => {
</div>
{New_Getall_Training_Employee_No_Filter_result && New_Getall_Training_Employee_No_Filter_result.length > 0 &&
<div className="session_caract_Dialog"> <b> Choisir un formateur à évaluer </b>
@ -1487,14 +1555,15 @@ const Module_Session_Evaluation = (props) => {
fullWidth
//className="disabled_style enable_style"
options={New_Getall_Training_Employee_No_Filter_result}
value={New_Getall_Training_Employee_No_Filter_result.filter((data) => (data)._id === String(selected_formateur_id))[0].label}
value={New_Getall_Training_Employee_No_Filter_result.filter((data) => (data)._id === String(selected_formateur_id))[0].label}
onChange={(event, value) => {
if (value && value._id) {
setselected_formateur_id(value._id);
} else {
setselected_formateur_id("");
alert(" Vous devez choisir un formateur ")
}
}}
@ -1733,14 +1802,7 @@ const Module_Session_Evaluation = (props) => {
<nav >Traitement en masse / Evaluation</nav>
&nbsp;
{/* &nbsp;<select
id={"actionmassemarg"} name={"actionmassemarg"}
onChange={actionmass_evaluation}
className="action_mass">
<option selected value="n/a">Choisir une action</option>
<option value="demande evaluation">Demande évaluation</option>
</select> &nbsp;*/}
<Autocomplete
disablePortal
@ -1771,7 +1833,9 @@ const Module_Session_Evaluation = (props) => {
/>
{actionmass_eval_val && String(actionmass_eval_val).length > 1 &&
{actionmass_eval_val && String(actionmass_eval_val).length > 1 && String(actionmass_eval_val) !== "" &&
selectionModel_evaluation.length > 0 &&
<Popup
trigger={<Button className="bton_enreg" >
<FcAcceptDatabase /> Traiter
@ -2054,9 +2118,9 @@ const Module_Session_Evaluation = (props) => {
renderInput={(params) => <TextField {...params} placeholder="Choisir une option" />
}
/>
{actionmass_Evaluation_Traitemet_cold && String(actionmass_Evaluation_Traitemet_cold) !== "" && String(actionmass_eval_froid).length > 1 &&
{actionmass_eval_froid && String(actionmass_eval_froid) !== "" && String(actionmass_eval_froid).length > 1 &&
selectionModel_evaluation_cold.length > 0 &&
<Popup
trigger={<Button className="bton_enreg" >
<FcAcceptDatabase /> Traiter
@ -2160,6 +2224,7 @@ const Module_Session_Evaluation = (props) => {
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
Getall_Partner_Formulaires_formateur_evaluation_with_Filter();
setselected_formateur_id("");
setDialog_LIST_EVALUATION_FORMATEUR_open(true);
close();
}}> Valider </button>
@ -2189,7 +2254,7 @@ const Module_Session_Evaluation = (props) => {
<Button className="bton_emarge" onClick={(event) => {
Export_survey_hot_eval_datatab_class();
Export_survey_formateur_eval_datatab_class();
}}>Exporter (excel)</Button>
</div>
</div>
@ -2238,12 +2303,12 @@ const Module_Session_Evaluation = (props) => {
<DataGrid
checkboxSelection
onSelectionModelChange={(newSelectionModel_evaluation) => {
setSelectionModel_evaluation_formateur(newSelectionModel_evaluation);
setselectionModel_evaluation_formateur(newSelectionModel_evaluation);
//console.log("ch selected--" + newSelectionModel_evaluation);
}}
selectionModel={setSelectionModel_evaluation_formateur}
selectionModel={selectionModel_evaluation_formateur}
localeText={frFR.components.MuiDataGrid.defaultProps.localeText}
rows={rowss_evaluation_formateur.map((item, index) => (
{
@ -2305,9 +2370,9 @@ const Module_Session_Evaluation = (props) => {
/>
</Box>
{selectionModel_evaluation_cold && selectionModel_evaluation_cold.length >= 0 &&
{selectionModel_evaluation_formateur && selectionModel_evaluation_formateur.length >= 0 &&
<div className="block_en_mass">
<nav >Traitement en masse / Evaluation froid</nav>
<nav >Traitement en masse / Evaluation Formateur</nav>
&nbsp;
@ -2321,16 +2386,16 @@ const Module_Session_Evaluation = (props) => {
if (value && value.value) {
if (String(value.value) === "demande evaluation") {
setactionmass_eval_froid(value.value);
setactionmass_eval_formateur(value.value);
}
else {
setactionmass_eval_froid("");
setactionmass_eval_formateur("");
}
}
else {
setactionmass_eval_froid("");
setactionmass_eval_formateur("");
}
}}
@ -2340,7 +2405,8 @@ const Module_Session_Evaluation = (props) => {
/>
{actionmass_Evaluation_Traitemet_cold && String(actionmass_Evaluation_Traitemet_cold) !== "" && String(actionmass_eval_froid).length > 1 &&
{actionmass_eval_formateur && String(actionmass_eval_formateur) !== "" && String(actionmass_eval_formateur).length > 1 &&
selectionModel_evaluation_formateur.length > 0 &&
<Popup
trigger={<Button className="bton_enreg" >
<FcAcceptDatabase /> Traiter
@ -2360,12 +2426,12 @@ const Module_Session_Evaluation = (props) => {
<div className="gest_content">
{' '}
Confirmer l'action <b> {actionmass_eval_froid} </b> en masse.
Confirmer l'action <b> {actionmass_eval_formateur} </b> en masse.
</div>
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
actionmass_Evaluation_Traitemet_cold();
actionmass_Formation_Traitemet();
close();
}}> Valider </button>

View File

@ -2287,9 +2287,9 @@ const Module_Session_Planification = (props) => {
onChange={(event, value) => {
if (value && value._id) {
setDialog_seq_ressource_1_selected_ressource_id(value._id);
console.log(" ### check_ressource_avabilities = ", check_ressource_avabilities)
if (check_ressource_avabilities === "1" ) {
if (check_ressource_avabilities === "1") {
// On ne fait le controle de disponibilité que si on une sequence precise. pas quand c'est en masse.
Get_Ressource_Avabilities(value._id);
}
@ -3667,17 +3667,35 @@ const Module_Session_Planification = (props) => {
<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) => {
if (String(props.selected_session_invoiced_statut) === "1") {
alert(" La session est en cours de facturation ")
} else if (String(props.selected_session_invoiced_statut) === "2") {
alert(" La session est déjà facturée ")
} else {
setDialog_seq_choix_model_emargement_open(true);
setDialog_seq_planif_periode_type("");
setDialog_seq_choix_model_emargement_open(true);
setDialog_seq_planif_periode_type("");
}
}} > Planification automatique
<FcMultipleSmartphones />
&nbsp; <FcMultipleSmartphones />
</Button>
&nbsp;
<Button variant="outlined" onClick={submenu_add_one_sequence}
<Button variant="outlined"
onClick={(event) => {
if (String(props.selected_session_invoiced_statut) === "1") {
alert(" La session est en cours de facturation ")
} else if (String(props.selected_session_invoiced_statut) === "2") {
alert(" La session est déjà facturée ")
} else {
submenu_add_one_sequence()
}
}}
className="detail_class_submenu bton_add_session"
id='menu_import_participant' name='menu_import_participant'>Ajout 1 Séquence &nbsp;
<IoAddCircleOutline style={{ "fontSize": "x-large", "color": "green" }} />
@ -3811,7 +3829,20 @@ const Module_Session_Planification = (props) => {
</div>
<div className="div_row_gauche div_row_gauche_etendu" style={{ "textAlign": "left", "paddingLeft": "5px" }}>
<Button variant="outlined" onClick={submenu_add_one_Ressource}
<Button variant="outlined"
onClick={(event) => {
if (String(props.selected_session_invoiced_statut) === "1") {
alert(" La session est en cours de facturation ")
} else if (String(props.selected_session_invoiced_statut) === "2") {
alert(" La session est déjà facturée ")
} else {
submenu_add_one_Ressource()
}
}}
className="detail_class_submenu bton_add_session"
id='menu_import_participant' name='menu_import_participant'>Ajout 1 Ressource &nbsp;
<IoAddCircleOutline style={{ "fontSize": "x-large", "color": "green" }} />

File diff suppressed because it is too large Load Diff