sds
parent
63c4572f6f
commit
a305e2172c
|
@ -20044,9 +20044,11 @@ const DisplayPartnerSession = (props) => {
|
||||||
|
|
||||||
{String(submenu) === String("evaluation_session") && <div style={{ "border": "None" }}>
|
{String(submenu) === String("evaluation_session") && <div style={{ "border": "None" }}>
|
||||||
|
|
||||||
|
p_formateur_id = {p_formateur_id}
|
||||||
|
|
||||||
<Module_Session_Evaluation conntected_employee_id={props.conntected_employee_id} related_collection={"session_formation"}
|
<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"))}
|
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"))} session_formateur_id={p_formateur_id} session_class_id={p_detail_session_class_id}/>
|
||||||
|
|
||||||
</div>}
|
</div>}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ import DialogActions from '@mui/material/DialogActions';
|
||||||
import DialogContent from '@mui/material/DialogContent';
|
import DialogContent from '@mui/material/DialogContent';
|
||||||
import DialogContentText from '@mui/material/DialogContentText';
|
import DialogContentText from '@mui/material/DialogContentText';
|
||||||
import DialogTitle from '@mui/material/DialogTitle';
|
import DialogTitle from '@mui/material/DialogTitle';
|
||||||
import { RestoreFromTrashRounded } from "@mui/icons-material";
|
import { ResetTvRounded, RestoreFromTrashRounded } from "@mui/icons-material";
|
||||||
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
|
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
|
||||||
import { Fab } from "@material-ui/core";
|
import { Fab } from "@material-ui/core";
|
||||||
import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io";
|
import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io";
|
||||||
|
@ -81,6 +81,7 @@ const Module_Session_Evaluation = (props) => {
|
||||||
const [submenu, setsubmenu] = useState("");
|
const [submenu, setsubmenu] = useState("");
|
||||||
const [rowss, setRows] = useState([]);
|
const [rowss, setRows] = useState([]);
|
||||||
|
|
||||||
|
console.log(" ### props.session_formateur_id = ", props.session_formateur_id);
|
||||||
|
|
||||||
function ExpandableCell_50({ value }) {
|
function ExpandableCell_50({ value }) {
|
||||||
const [expanded, setExpanded] = React.useState(false);
|
const [expanded, setExpanded] = React.useState(false);
|
||||||
|
@ -212,6 +213,51 @@ const Module_Session_Evaluation = (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 [selected_code_session, setselected_code_session] = useState();
|
const [selected_code_session, setselected_code_session] = useState();
|
||||||
const [selected_session_id, setselected_session_id] = useState(props.related_collection_recid);
|
const [selected_session_id, setselected_session_id] = useState(props.related_collection_recid);
|
||||||
const [selected_internal_url, setselected_internal_url] = useState();
|
const [selected_internal_url, setselected_internal_url] = useState();
|
||||||
|
@ -270,6 +316,17 @@ const Module_Session_Evaluation = (props) => {
|
||||||
new_data2.push(node);
|
new_data2.push(node);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//---
|
||||||
|
var node = {
|
||||||
|
"_id": "",
|
||||||
|
"id": "",
|
||||||
|
"label":"",
|
||||||
|
"nom": "",
|
||||||
|
"prenom": "",
|
||||||
|
"ismanager": ""
|
||||||
|
};
|
||||||
|
new_data2.push(node);
|
||||||
|
|
||||||
if (new_data2.length > 0)
|
if (new_data2.length > 0)
|
||||||
setNew_Getall_Training_Employee_No_Filter_result(new_data2);
|
setNew_Getall_Training_Employee_No_Filter_result(new_data2);
|
||||||
|
|
||||||
|
@ -535,6 +592,8 @@ const Module_Session_Evaluation = (props) => {
|
||||||
const [selectionModel_evaluation_cold, setSelectionModel_evaluation_cold] = React.useState([]);
|
const [selectionModel_evaluation_cold, setSelectionModel_evaluation_cold] = React.useState([]);
|
||||||
const [rowss_evaluation_cold, setRows_evaluation_cold] = useState([]);
|
const [rowss_evaluation_cold, setRows_evaluation_cold] = useState([]);
|
||||||
|
|
||||||
|
const [selectionModel_evaluation_formateur, setSelectionModel_evaluation_formateur] = React.useState([]);
|
||||||
|
const [rowss_evaluation_formateur, setRows_evaluation_formateur] = useState([]);
|
||||||
|
|
||||||
/**** Les évaluations a froid */
|
/**** Les évaluations a froid */
|
||||||
const [New_Getall_Partner_Formulaires_cold_evaluation_with_Filter, setNew_Getall_Partner_Formulaires_cold_evaluation_with_Filter] = useState([]);
|
const [New_Getall_Partner_Formulaires_cold_evaluation_with_Filter, setNew_Getall_Partner_Formulaires_cold_evaluation_with_Filter] = useState([]);
|
||||||
|
@ -611,6 +670,82 @@ const Module_Session_Evaluation = (props) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const [New_Getall_Partner_Formulaires_formateur_evaluation_with_Filter, setNew_Getall_Partner_Formulaires_formateur_evaluation_with_Filter] = useState([]);
|
||||||
|
|
||||||
|
const [Getall_Partner_Formulaires_formateur_evaluation_with_Filter_api, setGetall_Partner_Formulaires_formateur_evaluation_with_Filter_api] = useState();
|
||||||
|
const [Getall_Partner_Formulaires_formateur_evaluation_with_Filter_message, setGetall_Partner_Formulaires_formateur_evaluation_with_Filter_message] = useState();
|
||||||
|
const [Getall_Partner_Formulaires_formateur_evaluation_with_Filter_result, setGetall_Partner_Formulaires_formateur_evaluation_with_Filter_result] = useState([]);
|
||||||
|
function Getall_Partner_Formulaires_formateur_evaluation_with_Filter(event) {
|
||||||
|
|
||||||
|
var form = new FormData();
|
||||||
|
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
form.append("token", stored_cookie);
|
||||||
|
form.append("type", "human_eval");
|
||||||
|
|
||||||
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Formulaire_with_filter/";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
setLoading(true);
|
||||||
|
axios.post(myurl, form).then(res => {
|
||||||
|
setLoading(false);
|
||||||
|
|
||||||
|
if (String(res.data.status) === String("true")) {
|
||||||
|
//console.log(" In Getall_Partner_Formulaires_formateur_evaluation_with_Filter res.data.status = " + res.data.status);
|
||||||
|
//console.log(" In Getall_Partner_Formulaires_formateur_evaluation_with_Filter res.data.message r_class = " + res.data.message);
|
||||||
|
setGetall_Partner_Formulaires_formateur_evaluation_with_Filter_api("true");
|
||||||
|
setGetall_Partner_Formulaires_formateur_evaluation_with_Filter_result(res.data.message);
|
||||||
|
|
||||||
|
var new_data2 = [];
|
||||||
|
const new_data = res.data.message.map((x) => {
|
||||||
|
|
||||||
|
//---
|
||||||
|
var localid = JSON.parse(x).id;
|
||||||
|
var local_id = JSON.parse(x)._id;
|
||||||
|
var local_code = JSON.parse(x).code;
|
||||||
|
var local_nom = JSON.parse(x).nom;
|
||||||
|
|
||||||
|
|
||||||
|
//---
|
||||||
|
var node = {
|
||||||
|
"_id": local_id,
|
||||||
|
"id": localid,
|
||||||
|
"label": local_code + " " + local_nom,
|
||||||
|
"nom": local_nom,
|
||||||
|
"code": local_code,
|
||||||
|
};
|
||||||
|
new_data2.push(node);
|
||||||
|
});
|
||||||
|
|
||||||
|
var node = {
|
||||||
|
"_id": "",
|
||||||
|
"id": "",
|
||||||
|
"label": "",
|
||||||
|
"nom": "",
|
||||||
|
"code": "",
|
||||||
|
|
||||||
|
};
|
||||||
|
new_data2.push(node);
|
||||||
|
|
||||||
|
if (new_data2.length > 0)
|
||||||
|
setNew_Getall_Partner_Formulaires_formateur_evaluation_with_Filter(new_data2);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setGetall_Partner_Formulaires_formateur_evaluation_with_Filter_api("false");
|
||||||
|
setGetall_Partner_Formulaires_formateur_evaluation_with_Filter_message(res.data.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch((error) => {
|
||||||
|
setLoading(false);
|
||||||
|
console.warn('Not good man :( Getall_Partner_Formulaires_formateur_evaluation_with_Filter = ', error);
|
||||||
|
setGetall_Partner_Formulaires_formateur_evaluation_with_Filter_api("false");
|
||||||
|
//setmyApimyApiMessage("")
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const [Getall_Survey_cold_evaluation_By_Session_api, setGetall_Survey_cold_evaluation_By_Session_api] = useState();
|
const [Getall_Survey_cold_evaluation_By_Session_api, setGetall_Survey_cold_evaluation_By_Session_api] = useState();
|
||||||
const [Getall_Survey_cold_evaluation_By_Session_message, setGetall_Survey_cold_evaluation_By_Session_message] = useState();
|
const [Getall_Survey_cold_evaluation_By_Session_message, setGetall_Survey_cold_evaluation_By_Session_message] = useState();
|
||||||
const [Getall_Survey_cold_evaluation_By_Session_result, setGetall_Survey_cold_evaluation_By_Session_result] = useState([]);
|
const [Getall_Survey_cold_evaluation_By_Session_result, setGetall_Survey_cold_evaluation_By_Session_result] = useState([]);
|
||||||
|
@ -654,6 +789,49 @@ const Module_Session_Evaluation = (props) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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("session_id", selected_session_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("")
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const [Create_List_Survey_cold_eval_For_Session_For_Inscrit_api, setCreate_List_Survey_cold_eval_For_Session_For_Inscrit_api] = useState();
|
const [Create_List_Survey_cold_eval_For_Session_For_Inscrit_api, setCreate_List_Survey_cold_eval_For_Session_For_Inscrit_api] = useState();
|
||||||
const [Create_List_Survey_cold_eval_For_Session_For_Inscrit_message, setCreate_List_Survey_cold_eval_For_Session_For_Inscrit_message] = useState();
|
const [Create_List_Survey_cold_eval_For_Session_For_Inscrit_message, setCreate_List_Survey_cold_eval_For_Session_For_Inscrit_message] = useState();
|
||||||
|
@ -703,6 +881,63 @@ const Module_Session_Evaluation = (props) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const [Create_List_Survey_eval_formateur_For_Session_For_Inscrit_api, setCreate_List_Survey_eval_formateur_For_Session_For_Inscrit_api] = useState();
|
||||||
|
const [Create_List_Survey_eval_formateur_For_Session_For_Inscrit_message, setCreate_List_Survey_eval_formateur_For_Session_For_Inscrit_message] = useState();
|
||||||
|
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 ){
|
||||||
|
alert(" Vous devez choisir un formateur ");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var form = new FormData();
|
||||||
|
//form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
form.append("token", stored_cookie);
|
||||||
|
form.append("session_id", selected_session_id);
|
||||||
|
form.append("formulaire_id", selected_formulaire_id);
|
||||||
|
form.append("related_collection", "ressource_humaine");
|
||||||
|
form.append("related_collection_id", selected_formateur_id);
|
||||||
|
//form.append("class_id", props.session_class_id);
|
||||||
|
form.append("survey_type", "human_eval");
|
||||||
|
form.append("sending_date", "");
|
||||||
|
|
||||||
|
|
||||||
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Init_Survey_Tab_For_All_Session_Inscrit/";
|
||||||
|
|
||||||
|
|
||||||
|
setLoading(true);
|
||||||
|
axios.post(myurl, form).then(res => {
|
||||||
|
|
||||||
|
setLoading(false);
|
||||||
|
if (String(res.data.status) === String("true")) {
|
||||||
|
//console.log(" In UpdateStagiaireData res.data.status = " + res.data.status);
|
||||||
|
//console.log(" In UpdateStagiaireData res.data.message r_class = " + res.data.message);
|
||||||
|
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();
|
||||||
|
alert(res.data.message);
|
||||||
|
|
||||||
|
} else if (String(res.data.status) === String("Err_Connexion")) {
|
||||||
|
alert('Erreur: ' + res.data.message);
|
||||||
|
history.push("/Connexion");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setCreate_List_Survey_eval_formateur_For_Session_For_Inscrit_api("false");
|
||||||
|
setCreate_List_Survey_eval_formateur_For_Session_For_Inscrit_message(res.data.message);
|
||||||
|
alert(res.data.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch((error) => {
|
||||||
|
setLoading(false);
|
||||||
|
console.warn('Create_List_Survey_eval_formateur_For_Session_For_Inscrit : Not good man :( mysearchtext = ' + error);
|
||||||
|
setCreate_List_Survey_eval_formateur_For_Session_For_Inscrit_api("false");
|
||||||
|
alert(" Impossible d'initialiser la liste des enquête ");
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const [actionmass_eval_froid, setactionmass_eval_froid] = useState();
|
const [actionmass_eval_froid, setactionmass_eval_froid] = useState();
|
||||||
|
|
||||||
const [actionmass_eval_val, setactionmass_eval_val] = useState();
|
const [actionmass_eval_val, setactionmass_eval_val] = useState();
|
||||||
|
@ -867,6 +1102,12 @@ const Module_Session_Evaluation = (props) => {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
||||||
|
|
||||||
|
if( props.session_formateur_id){
|
||||||
|
setselected_formateur_id(props.session_formateur_id);
|
||||||
|
}else{
|
||||||
|
setselected_formateur_id("");
|
||||||
|
}
|
||||||
Getall_Training_Employee_No_Filter();
|
Getall_Training_Employee_No_Filter();
|
||||||
Getall_Training_Materiel_No_Filter();
|
Getall_Training_Materiel_No_Filter();
|
||||||
|
|
||||||
|
@ -977,7 +1218,7 @@ const Module_Session_Evaluation = (props) => {
|
||||||
|
|
||||||
const [selected_formulaire_id, setselected_formulaire_id] = useState();
|
const [selected_formulaire_id, setselected_formulaire_id] = useState();
|
||||||
|
|
||||||
|
const [selected_formateur_id, setselected_formateur_id] = useState("");
|
||||||
|
|
||||||
const [Dialog_LIST_COLD_EVALUATION_QUESTION_open, setDialog_LIST_COLD_EVALUATION_QUESTION_open] = React.useState(false);
|
const [Dialog_LIST_COLD_EVALUATION_QUESTION_open, setDialog_LIST_COLD_EVALUATION_QUESTION_open] = React.useState(false);
|
||||||
const Dialog_LIST_COLD_EVALUATION_QUESTION_handleClose = () => {
|
const Dialog_LIST_COLD_EVALUATION_QUESTION_handleClose = () => {
|
||||||
|
@ -994,6 +1235,17 @@ const Module_Session_Evaluation = (props) => {
|
||||||
const [date_cold_eval_sending, setdate_cold_eval_sending] = useState(date_today_90j.toLocaleDateString('fr-FR'));
|
const [date_cold_eval_sending, setdate_cold_eval_sending] = useState(date_today_90j.toLocaleDateString('fr-FR'));
|
||||||
|
|
||||||
|
|
||||||
|
const [Dialog_LIST_EVALUATION_FORMATEUR_open, setDialog_LIST_EVALUATION_FORMATEUR_open] = React.useState(false);
|
||||||
|
const Dialog_LIST_EVALUATION_FORMATEUR_handleClose = () => {
|
||||||
|
//alert(" Utiliser le bouton 'fermer' ");
|
||||||
|
//setOpen(false);
|
||||||
|
};
|
||||||
|
|
||||||
|
const Dialog_LIST_EVALUATION_FORMATEUR_handleClose_buton = () => {
|
||||||
|
setDialog_LIST_EVALUATION_FORMATEUR_open(false);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="modulesessionevaluation">
|
<div className="modulesessionevaluation">
|
||||||
|
|
||||||
|
@ -1057,8 +1309,6 @@ const Module_Session_Evaluation = (props) => {
|
||||||
tab_ids_inscription.push(line_id);
|
tab_ids_inscription.push(line_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Create_List_Survey_hot_eval_For_Session_For_Inscrit();
|
Create_List_Survey_hot_eval_For_Session_For_Inscrit();
|
||||||
Dialog_LIST_HOT_EVALUATION_QUESTION_handleClose_buton();
|
Dialog_LIST_HOT_EVALUATION_QUESTION_handleClose_buton();
|
||||||
|
|
||||||
|
@ -1083,8 +1333,6 @@ const Module_Session_Evaluation = (props) => {
|
||||||
{/* FIN Dialog pour gerer les LIST_HOT_EVALUATION_QUESTION */}
|
{/* FIN Dialog pour gerer les LIST_HOT_EVALUATION_QUESTION */}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{/* Dialog pour gerer les LIST_COLD_EVALUATION_QUESTION */}
|
{/* Dialog pour gerer les LIST_COLD_EVALUATION_QUESTION */}
|
||||||
<Dialog
|
<Dialog
|
||||||
open={Dialog_LIST_COLD_EVALUATION_QUESTION_open}
|
open={Dialog_LIST_COLD_EVALUATION_QUESTION_open}
|
||||||
|
@ -1186,6 +1434,121 @@ const Module_Session_Evaluation = (props) => {
|
||||||
{/* FIN Dialog pour gerer les LIST_COLD_EVALUATION_QUESTION */}
|
{/* FIN Dialog pour gerer les LIST_COLD_EVALUATION_QUESTION */}
|
||||||
|
|
||||||
|
|
||||||
|
{/* Dialog pour gerer les LIST_EVALUATION_FORMATEUR */}
|
||||||
|
<Dialog
|
||||||
|
open={Dialog_LIST_EVALUATION_FORMATEUR_open}
|
||||||
|
onClose={Dialog_LIST_EVALUATION_FORMATEUR_handleClose}
|
||||||
|
className="displaypartnersession"
|
||||||
|
>
|
||||||
|
|
||||||
|
<DialogTitle>MySy Information</DialogTitle>
|
||||||
|
<DialogContent className="DialogContent_width" style={{ "minHeight": "30rem" }}>
|
||||||
|
<DialogContentText>
|
||||||
|
{Dialog_1_message}
|
||||||
|
</DialogContentText>
|
||||||
|
|
||||||
|
|
||||||
|
<div className="session_caract_Dialog"> <b> Choisir un questionnaire d'évaluation pour le formateur </b>
|
||||||
|
<Autocomplete
|
||||||
|
disablePortal
|
||||||
|
name="event_dialog_version_q_COLD_evaluation"
|
||||||
|
id="event_dialog_version_q_COLD_evaluation"
|
||||||
|
fullWidth
|
||||||
|
//className="disabled_style enable_style"
|
||||||
|
options={New_Getall_Partner_Formulaires_formateur_evaluation_with_Filter}
|
||||||
|
|
||||||
|
onChange={(event, value) => {
|
||||||
|
if (value && value._id) {
|
||||||
|
|
||||||
|
setselected_formulaire_id(value._id);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
setselected_formulaire_id("");
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une questionnaire"
|
||||||
|
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"> <b> Choisir un formateur à évaluer </b>
|
||||||
|
<Autocomplete
|
||||||
|
disablePortal
|
||||||
|
name="event_dialog_formateur"
|
||||||
|
id="event_dialog_formateur"
|
||||||
|
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}
|
||||||
|
onChange={(event, value) => {
|
||||||
|
if (value && value._id) {
|
||||||
|
|
||||||
|
setselected_formateur_id(value._id);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
setselected_formateur_id("");
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une questionnaire"
|
||||||
|
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||||
|
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</DialogContent>
|
||||||
|
|
||||||
|
<DialogActions>
|
||||||
|
<div className="div_row">
|
||||||
|
<div className="div_row_gauche">
|
||||||
|
<Button onClick={(e) => {
|
||||||
|
|
||||||
|
var tab_ids_inscription = []
|
||||||
|
for (var i = 0; i < selectionModel_evaluation.length; i++) {
|
||||||
|
var myid = parseInt(String(selectionModel_evaluation[i]));
|
||||||
|
var line = JSON.parse(selectionModel_evaluation[myid]);
|
||||||
|
var line_id = JSON.parse(selectionModel_evaluation[myid])._id;
|
||||||
|
tab_ids_inscription.push(line_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Create_List_Survey_eval_formateur_For_Session_For_Inscrit();
|
||||||
|
Dialog_LIST_EVALUATION_FORMATEUR_handleClose_buton();
|
||||||
|
|
||||||
|
}}
|
||||||
|
className="bton_enreg_dialog">Initialiser la liste </Button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
|
||||||
|
<Button onClick={Dialog_LIST_EVALUATION_FORMATEUR_handleClose_buton} className="bton_annule_dialog" >Fermer</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</DialogActions>
|
||||||
|
|
||||||
|
</Dialog>
|
||||||
|
{/* FIN Dialog pour gerer les LIST_EVALUATION_FORMATEUR */}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div style={{ "border": "None" }}>
|
<div style={{ "border": "None" }}>
|
||||||
|
|
||||||
|
|
||||||
|
@ -1750,6 +2113,290 @@ const Module_Session_Evaluation = (props) => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div className="div_row"> </div>
|
||||||
|
<div style={{ "border": "None" }}>
|
||||||
|
|
||||||
|
|
||||||
|
<div className="div_row" style={{ "textAlign": "right", "marginTop": "0.5rem", "width": "100%", "float": "right" }}>
|
||||||
|
<div className="titre1"> Evaluation à Enseignant </div>
|
||||||
|
|
||||||
|
<div style={{ width: "100%", float: "left" }}>
|
||||||
|
|
||||||
|
<div style={{ width: "80%", float: "right" }}>
|
||||||
|
<Popup
|
||||||
|
trigger={
|
||||||
|
<Button className="bton_emarge">Initialisation</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> Confirmez la (ré)initialisation de la demande. <br />
|
||||||
|
<font color="red"> /!\ Si une demande d'évaluation existe pour cette session, elle sera supprimée et récréée </font>
|
||||||
|
</font>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div className="gest_actions">
|
||||||
|
<div style={{ "width": "45%", "float": "left" }}>
|
||||||
|
<button className="gest_bton_popup" onClick={(event) => {
|
||||||
|
Getall_Partner_Formulaires_formateur_evaluation_with_Filter();
|
||||||
|
setDialog_LIST_EVALUATION_FORMATEUR_open(true);
|
||||||
|
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>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<Button className="bton_emarge" onClick={(event) => {
|
||||||
|
Getall_Survey_formateur_evaluation_By_Session();
|
||||||
|
}}>Actualiser la liste</Button>
|
||||||
|
|
||||||
|
|
||||||
|
<Button className="bton_emarge" onClick={(event) => {
|
||||||
|
Export_survey_hot_eval_datatab_class();
|
||||||
|
}}>Exporter (excel)</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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={setSelectionModel_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>
|
||||||
|
|
||||||
|
{selectionModel_evaluation_cold && selectionModel_evaluation_cold.length >= 0 &&
|
||||||
|
<div className="block_en_mass">
|
||||||
|
<nav >Traitement en masse / Evaluation froid</nav>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<Autocomplete
|
||||||
|
disablePortal
|
||||||
|
id="combo-box-demo"
|
||||||
|
className="block_en_mass_select"
|
||||||
|
fullWidth
|
||||||
|
options={New_Option_Evaluation_Masse}
|
||||||
|
onChange={(event, value) => {
|
||||||
|
if (value && value.value) {
|
||||||
|
if (String(value.value) === "demande evaluation") {
|
||||||
|
|
||||||
|
setactionmass_eval_froid(value.value);
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setactionmass_eval_froid("");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setactionmass_eval_froid("");
|
||||||
|
}
|
||||||
|
|
||||||
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} placeholder="Choisir une option" />
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
{actionmass_Evaluation_Traitemet_cold && String(actionmass_Evaluation_Traitemet_cold) !== "" && String(actionmass_eval_froid).length > 1 &&
|
||||||
|
<Popup
|
||||||
|
trigger={<Button className="bton_enreg" >
|
||||||
|
<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">
|
||||||
|
{' '}
|
||||||
|
|
||||||
|
Confirmer l'action <b> {actionmass_eval_froid} </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();
|
||||||
|
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>
|
||||||
|
}
|
||||||
|
<br />
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -746,6 +746,8 @@ const Partner_Config_Formulaires = (props) => {
|
||||||
{ "id": "pos", "label": "Q. Positionnement", "value": "pos" },
|
{ "id": "pos", "label": "Q. Positionnement", "value": "pos" },
|
||||||
{ "id": "hot_eval", "label": "Eval. Chaud ", "value": "hot_eval" },
|
{ "id": "hot_eval", "label": "Eval. Chaud ", "value": "hot_eval" },
|
||||||
{ "id": "cold_eval", "label": "Eval. Froid", "value": "cold_eval" },
|
{ "id": "cold_eval", "label": "Eval. Froid", "value": "cold_eval" },
|
||||||
|
{ "id": "human_eval", "label": "Eval. Employé", "value": "human_eval" },
|
||||||
|
{ "id": "autre_eval", "label": "Autre", "value": "autre_eval" },
|
||||||
{ "id": "", "label": "", "value": "" },
|
{ "id": "", "label": "", "value": "" },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ function SurveyDocument() {
|
||||||
|
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
//console.log(" get_Given_Survey_Data : In test res.data.status = " + res.data.status);
|
//console.log(" get_Given_Survey_Data : In test res.data.status = " + res.data.status);
|
||||||
//console.log(" get_Given_Survey_Data: res.data.message = " + res.data.message);
|
console.log(" get_Given_Survey_Data: res.data.message = " + res.data.message);
|
||||||
|
|
||||||
if (String(res.data.status) === "true") {
|
if (String(res.data.status) === "true") {
|
||||||
setget_Given_Survey_Data_api("true");
|
setget_Given_Survey_Data_api("true");
|
||||||
|
@ -319,12 +319,20 @@ function SurveyDocument() {
|
||||||
Questionnaire d'évaluation
|
Questionnaire d'évaluation
|
||||||
</div>}
|
</div>}
|
||||||
|
|
||||||
|
{String(JSON.parse(get_Given_Survey_Data_result).survey_type) === "human_eval" && <div className="question_box_entete">
|
||||||
|
Questionnaire d'évaluation
|
||||||
|
</div>}
|
||||||
|
|
||||||
|
{String(JSON.parse(get_Given_Survey_Data_result).survey_type) === "autre_eval" && <div className="question_box_entete">
|
||||||
|
Questionnaire d'évaluation
|
||||||
|
</div>}
|
||||||
|
|
||||||
<div className="question_box_entete">
|
<div className="question_box_entete">
|
||||||
Formation : {JSON.parse(get_Given_Survey_Data_result).class_title} <br />
|
{JSON.parse(get_Given_Survey_Data_result).class_title && <nav> Formation : {JSON.parse(get_Given_Survey_Data_result).class_title} </nav>}
|
||||||
Code Session : {JSON.parse(get_Given_Survey_Data_result).session_code} <br />
|
{JSON.parse(get_Given_Survey_Data_result).session_code && <nav> Code Session : {JSON.parse(get_Given_Survey_Data_result).session_code} </nav>}
|
||||||
Titre Session : {JSON.parse(get_Given_Survey_Data_result).session_title} <br />
|
{JSON.parse(get_Given_Survey_Data_result).session_title && <nav> Titre Session : {JSON.parse(get_Given_Survey_Data_result).session_title} </nav>}
|
||||||
Date début : {JSON.parse(get_Given_Survey_Data_result).session_code_date_debut} <br />
|
{JSON.parse(get_Given_Survey_Data_result).session_code_date_debut && <nav> Date début : {JSON.parse(get_Given_Survey_Data_result).session_code_date_debut} </nav>}
|
||||||
Date fin : {JSON.parse(get_Given_Survey_Data_result).session_code_date_fin} <br />
|
{JSON.parse(get_Given_Survey_Data_result).session_code_date_fin && <nav> Date fin : {JSON.parse(get_Given_Survey_Data_result).session_code_date_fin} </nav>}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{JSON.parse(get_Given_Survey_Data_result).list_questions && JSON.parse(get_Given_Survey_Data_result).list_questions.length > 0 &&
|
{JSON.parse(get_Given_Survey_Data_result).list_questions && JSON.parse(get_Given_Survey_Data_result).list_questions.length > 0 &&
|
||||||
|
@ -503,7 +511,8 @@ function SurveyDocument() {
|
||||||
<div style={{ "width": "80%", "marginLeft": "10%", "background": "#F2F4F4", overflow: "auto", "paddingBottom": "1rem" }}>
|
<div style={{ "width": "80%", "marginLeft": "10%", "background": "#F2F4F4", overflow: "auto", "paddingBottom": "1rem" }}>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
{get_Given_Survey_Data_result && get_Given_Survey_Data_result.length > 0 && <div className="question_box_entete">
|
{get_Given_Survey_Data_result && get_Given_Survey_Data_result.length > 0 && JSON.parse(get_Given_Survey_Data_result).class_internal_url &&
|
||||||
|
String(JSON.parse(get_Given_Survey_Data_result).class_internal_url).length > 5 && <div className="question_box_entete">
|
||||||
<Display_Action_And_Class classId={JSON.parse(get_Given_Survey_Data_result).class_internal_url} action={""} />
|
<Display_Action_And_Class classId={JSON.parse(get_Given_Survey_Data_result).class_internal_url} action={""} />
|
||||||
|
|
||||||
</div>}
|
</div>}
|
||||||
|
|
Loading…
Reference in New Issue