20/05/2024 - 14h00
parent
4ad155a6d4
commit
8c5d5d0fd8
|
@ -3638,6 +3638,8 @@ const AddParnerClient = (props) => {
|
|||
|
||||
{String(datamodification) === "1" && <div className="div_row">
|
||||
<div className="koUpdateData" style={{ "color": "orange", "textAlign": "center" }}> /!\ Pensez à enregistrer les modifications</div></div>}
|
||||
|
||||
|
||||
{String(formedit_mode) === "1" && <div className="div_row">
|
||||
<div className="div_row_gauche">
|
||||
<Button variant="contained" color="success" className="bton_enreg " onClick={recordPartnerClient}>Enregistrer <AiTwotoneSave /> </Button>
|
||||
|
|
|
@ -426,7 +426,7 @@ const Module_Selection_Evaluation_Apprenants = (props) => {
|
|||
{isLoading && <div className="loader-container">
|
||||
<div className="mysy_spinner"> <img src={img_loading_spin} /> </div>
|
||||
</div>}
|
||||
<nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600", "paddingTop": "10px", "paddingLeft": "5px" }}> Selection des Apprenants & Groupe d'apprenants </nav>
|
||||
<nav style={{ "border": "None", "fontSize": "20px", "paddingTop": "10px", "paddingLeft": "5px" }}> Selection des Apprenants & Groupe d'apprenants </nav>
|
||||
|
||||
|
||||
<div className="div_row">
|
||||
|
@ -555,7 +555,6 @@ const Module_Selection_Evaluation_Apprenants = (props) => {
|
|||
<br />
|
||||
</div>
|
||||
|
||||
<nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600", "paddingTop": "10px", "paddingLeft": "5px" }}> Selection des Apprenant & Groupe d'apprenants </nav>
|
||||
<div style={{ height: 550, width: '100%', paddingRight: '5px' }}>
|
||||
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@ import { PiDotsThree } from "react-icons/pi";
|
|||
import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5";
|
||||
import Rating from '@mui/material/Rating';
|
||||
import Module_Selection_Evaluation_Apprenants from "./Module_Selection_Evaluation_Apprenants";
|
||||
import AttachFileIcon from '@mui/icons-material/AttachFile';
|
||||
|
||||
const Notes_Evaluation = (props) => {
|
||||
const history = useHistory();
|
||||
|
@ -114,7 +115,10 @@ const Notes_Evaluation = (props) => {
|
|||
|
||||
return (
|
||||
<nav>
|
||||
{value && <div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all", background:'yellow' }}>
|
||||
{value && <div style={{
|
||||
paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all", color: '#0000FF',
|
||||
"textAlign": "center"
|
||||
}}>
|
||||
|
||||
{expanded ? value : value.slice(0, 50)}
|
||||
{value.length > 50 && (
|
||||
|
@ -130,7 +134,7 @@ const Notes_Evaluation = (props) => {
|
|||
)}
|
||||
</div>}
|
||||
|
||||
{value && <div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all", background:'yellow' }}>
|
||||
{value && <div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all", color: '#0000FF' }}>
|
||||
|
||||
</div>
|
||||
}
|
||||
|
@ -352,12 +356,13 @@ const Notes_Evaluation = (props) => {
|
|||
const columns_evalutions_participant = [
|
||||
{ field: '_id', headerName: '_id', hide: true, Width: 0 },
|
||||
{ field: 'id', headerName: 'id', hide: true, Width: 0 },
|
||||
{ field: 'note_changed', headerName: 'note_changed', hide: true, Width: 0 },
|
||||
|
||||
{ field: 'nom', headerName: 'nom', flex: 1, hide: false, minWidth: 180, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'prenom', headerName: 'prenom', flex: 1, hide: false, minWidth: 180, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'email', headerName: 'email', flex: 1, hide: false, minWidth: 180, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'groupe', headerName: 'groupe', flex: 1, hide: false, minWidth: 180, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'note', headerName: 'Saisir Note', minWidth: 150, flex: 1, editable: true, renderCell: (params) => <ExpandableCell_50_bg_hiligt {...params} />, },
|
||||
{ field: 'note', headerName: 'Note', width: 200, editable: true, renderCell: (params) => <ExpandableCell_50_bg_hiligt {...params} />, align: "center", },
|
||||
|
||||
|
||||
|
||||
|
@ -370,6 +375,7 @@ const Notes_Evaluation = (props) => {
|
|||
trigger={<Button
|
||||
|
||||
onClick={(event) => {
|
||||
|
||||
// handleClick_delete(event, cellValues);
|
||||
}}
|
||||
>
|
||||
|
@ -389,14 +395,15 @@ const Notes_Evaluation = (props) => {
|
|||
<div className="gest_content">
|
||||
{' '}
|
||||
|
||||
En confirmant cette opération, l'employé sera <i><font color="red"> définitivement supprimé</font></i>. <br />
|
||||
En confirmant cette opération, l'inscrit sera <i><font color="red"> définitivement supprimé</font></i>. <br />
|
||||
|
||||
</div>
|
||||
<div className="gest_actions">
|
||||
<div style={{ "width": "45%", "float": "left" }}>
|
||||
<button className="gest_bton_popup" onClick={(event) => {
|
||||
//handleClick_delete(event, cellValues);
|
||||
//console.log('modal closed ');
|
||||
var tab = []
|
||||
tab.push(String(cellValues.row._id));
|
||||
Delete_List_Participant_From_Evaluation(tab);
|
||||
close();
|
||||
}}> Valider </button>
|
||||
|
||||
|
@ -451,8 +458,10 @@ const Notes_Evaluation = (props) => {
|
|||
setDelete_List_Participant_From_Evaluation_api("true");
|
||||
setDelete_List_Participant_From_Evaluation_result(res.data.message);
|
||||
|
||||
setnoted_changed("");
|
||||
|
||||
setselectionModel_evalutions_participant([]);
|
||||
Getall_Evaluation_Participant_List();
|
||||
Getall_Evaluation_Participant_List(selected_id);
|
||||
|
||||
alert(res.data.message)
|
||||
}
|
||||
|
@ -770,14 +779,16 @@ const Notes_Evaluation = (props) => {
|
|||
const [Getall_Evaluation_Participant_List_api, setGetall_Evaluation_Participant_List_api] = useState();
|
||||
const [Getall_Evaluation_Participant_List_message, setGetall_Evaluation_Participant_List_message] = useState();
|
||||
const [Getall_Evaluation_Participant_List_result, setGetall_Evaluation_Participant_List_result] = useState([]);
|
||||
function Getall_Evaluation_Participant_List(event) {
|
||||
function Getall_Evaluation_Participant_List(local_evalutaion_id) {
|
||||
|
||||
var evalutaion_id = "";
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("evaluation_id", selected_id);
|
||||
form.append("evaluation_id", local_evalutaion_id);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Participant_To_Evaluation/";
|
||||
|
||||
|
@ -815,6 +826,7 @@ const Notes_Evaluation = (props) => {
|
|||
"prenom": local_prenom,
|
||||
"email": local_email,
|
||||
"note": local_note,
|
||||
"note_changed": "0",
|
||||
"inscription_id": local_inscription_id,
|
||||
"group_inscription_id": local_group_inscription_id,
|
||||
|
||||
|
@ -831,6 +843,7 @@ const Notes_Evaluation = (props) => {
|
|||
"prenom": "",
|
||||
"email": "",
|
||||
"note": "",
|
||||
"note_changed": "0",
|
||||
"inscription_id": "",
|
||||
"group_inscription_id": "",
|
||||
};
|
||||
|
@ -1774,11 +1787,11 @@ const Notes_Evaluation = (props) => {
|
|||
|
||||
}
|
||||
|
||||
|
||||
async function submenu_apprenant() {
|
||||
await sleep(5);
|
||||
setsubmenu("apprenant");
|
||||
inactive_active_menu_header("apprenant");
|
||||
Getall_Evaluation_Participant_List();
|
||||
|
||||
}
|
||||
|
||||
|
@ -1787,6 +1800,9 @@ const Notes_Evaluation = (props) => {
|
|||
setsubmenu("piece_jointe");
|
||||
inactive_active_menu_header("piece_jointe");
|
||||
|
||||
// Refresh affichage des pièces jointes
|
||||
Get_List_Of_All_PJ(props.client_id);
|
||||
|
||||
}
|
||||
|
||||
async function submenu_ressources() {
|
||||
|
@ -1897,7 +1913,8 @@ const Notes_Evaluation = (props) => {
|
|||
setLoading(false);
|
||||
if (String(res.data.status) === String("true")) {
|
||||
|
||||
Getall_Evaluation_Participant_List();
|
||||
setnoted_changed("");
|
||||
Getall_Evaluation_Participant_List(selected_id);
|
||||
setselectionModel_evalutions_participant([])
|
||||
alert(res.data.message);
|
||||
|
||||
|
@ -1928,6 +1945,7 @@ const Notes_Evaluation = (props) => {
|
|||
var new_value = params.value; // ==> la nouvelle valeur
|
||||
|
||||
|
||||
setnoted_changed("1");
|
||||
|
||||
const updatedData = New_Getall_Evaluation_Participant_List_result.map((x) => {
|
||||
|
||||
|
@ -1942,6 +1960,7 @@ const Notes_Evaluation = (props) => {
|
|||
tmp['prenom'] = (x).prenom;
|
||||
tmp['email'] = (x).email;
|
||||
tmp['groupe'] = (x).groupe;
|
||||
tmp['note_changed'] = "1";
|
||||
tmp['note'] = new_value;
|
||||
|
||||
return tmp;
|
||||
|
@ -1955,6 +1974,7 @@ const Notes_Evaluation = (props) => {
|
|||
tmp['prenom'] = (x).prenom;
|
||||
tmp['email'] = (x).email;
|
||||
tmp['groupe'] = (x).groupe;
|
||||
tmp['note_changed'] = (x).note_changed;
|
||||
tmp['note'] = (x).note;
|
||||
|
||||
return tmp;
|
||||
|
@ -1970,6 +1990,343 @@ const Notes_Evaluation = (props) => {
|
|||
|
||||
}
|
||||
|
||||
const [line_changed_color, setline_changed_color] = useState("red");
|
||||
|
||||
const [noted_changed, setnoted_changed] = useState("");
|
||||
|
||||
function Annuler_change_note() {
|
||||
Getall_Evaluation_Participant_List(selected_id);
|
||||
setnoted_changed("");
|
||||
submenu_apprenant();
|
||||
}
|
||||
|
||||
|
||||
// -- Gestion pièces jointes
|
||||
|
||||
const [Download_one_attached_document_api, setDownload_one_attached_document_api] = useState();
|
||||
const [Download_one_attached_document_result, setDownload_one_attached_document_result] = useState();
|
||||
const [Download_one_attached_document_message, setDownload_one_attached_document_message] = useState();
|
||||
const Download_one_attached_document = (event) => {
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
|
||||
|
||||
var nom_fiche_detaillee = "Fiche_Detaillee.pdf";
|
||||
var token = stored_cookie;
|
||||
var file_name = event.target.id;
|
||||
|
||||
|
||||
var url = process.env.REACT_APP_API_URL + "myclass/api/Get_Stored_Downloaded_File/" + token + "/" + file_name;
|
||||
setLoading(true);
|
||||
|
||||
axios.get(url, { responseType: 'blob', },)
|
||||
.then((res) => {
|
||||
setLoading(false);
|
||||
fileDownload(res.data, nom_fiche_detaillee);
|
||||
setDownload_one_attached_document_api("true");
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.error('Error:', error);
|
||||
setDownload_one_attached_document_api("false");
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
const editorRef_competence = useRef(null);
|
||||
const [editorRef_competence_limite, seteditorRef_competence_limite] = useState(800);
|
||||
|
||||
|
||||
const [file_1_name, setfile_1_name] = useState();
|
||||
|
||||
const [sessions_file_change_1_api, setsessions_file_change_1_api] = useState();
|
||||
const [sessions_file_change_1_result, setsessions_file_change_1_result] = useState();
|
||||
const [sessions_file_change_1_message, setsessions_file_change_1_message] = useState();
|
||||
const sessions_file_change_1 = event => {
|
||||
|
||||
const fileUploaded = event.target.files[0];
|
||||
let file_size = event.target.files[0].size;
|
||||
let file_type = event.target.files[0].type;
|
||||
|
||||
|
||||
|
||||
|
||||
console.log("file_size = ", file_size, " file_type = ", file_type);
|
||||
if (file_size > 10000000) {
|
||||
alert("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
console.log("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
return;
|
||||
}
|
||||
|
||||
setfile_1_name(event.target.files[0]);
|
||||
const formData = new FormData();
|
||||
formData.append('File', fileUploaded);
|
||||
//formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA');
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
|
||||
//formData.append("token", stored_cookie);
|
||||
//formData.append("class_internal_url", internal_url);
|
||||
//console.log("token = " + stored_cookie);
|
||||
|
||||
return;
|
||||
|
||||
};
|
||||
|
||||
|
||||
const [file_2_name, setfile_2_name] = useState();
|
||||
|
||||
const [sessions_file_change_2_api, setsessions_file_change_2_api] = useState();
|
||||
const [sessions_file_change_2_result, setsessions_file_change_2_result] = useState();
|
||||
const [sessions_file_change_2_message, setsessions_file_change_2_message] = useState();
|
||||
const sessions_file_change_2 = event => {
|
||||
|
||||
const fileUploaded = event.target.files[0];
|
||||
let file_size = event.target.files[0].size;
|
||||
let file_type = event.target.files[0].type;
|
||||
|
||||
|
||||
|
||||
|
||||
console.log("file_size = ", file_size, " file_type = ", file_type);
|
||||
if (file_size > 10000000) {
|
||||
alert("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
console.log("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
return;
|
||||
}
|
||||
|
||||
setfile_2_name(event.target.files[0]);
|
||||
const formData = new FormData();
|
||||
formData.append('File', fileUploaded);
|
||||
//formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA');
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
|
||||
//formData.append("token", stored_cookie);
|
||||
//formData.append("class_internal_url", internal_url);
|
||||
//console.log("token = " + stored_cookie);
|
||||
|
||||
return;
|
||||
|
||||
};
|
||||
|
||||
const [Record_All_PJ_api, setRecord_All_PJ_api] = useState();
|
||||
const [Record_All_PJ_result, setRecord_All_PJ_result] = useState();
|
||||
const [Record_All_PJ_message, setRecord_All_PJ_message] = useState();
|
||||
function Record_All_PJ() {
|
||||
|
||||
if (!p_detail_one_file_to_download_type_name) {
|
||||
alert(" Vous devez donner un nom à la pièce jointe");
|
||||
return;
|
||||
}
|
||||
|
||||
if (file_1_name && file_1_name.name) {
|
||||
console.log(" ### Traitement de : ", file_1_name.name);
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append('File', file_1_name);
|
||||
//formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA');
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
|
||||
formData.append("token", stored_cookie);
|
||||
formData.append("file_business_object", p_detail_one_file_to_download_type_name);
|
||||
formData.append("file_name", file_1_name.name);
|
||||
formData.append("status", "0");
|
||||
formData.append("object_owner_collection", "note_evaluation");
|
||||
formData.append("object_owner_id", selected_id);
|
||||
|
||||
//formData.append("class_internal_url", internal_url);
|
||||
//console.log("token = " + stored_cookie);
|
||||
|
||||
|
||||
fetch(
|
||||
process.env.REACT_APP_API_URL + "myclass/api/Store_User_Downloaded_File/",
|
||||
{
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
}
|
||||
)
|
||||
.then((response) => response.json())
|
||||
.then((result) => {
|
||||
|
||||
//console.log(" ## result['status'] = ", result['status'])
|
||||
if (String(result['status']) === String("true")) {
|
||||
//console.log('Success:', result['message']);
|
||||
setRecord_All_PJ_result(result['message']);
|
||||
setRecord_All_PJ_api("true");
|
||||
|
||||
Get_List_Of_All_PJ(props.client_id);
|
||||
setfile_1_name();
|
||||
setp_detail_one_file_to_download_type_name();
|
||||
//GetCurrentClass_trainingsession();
|
||||
alert(" La pièce jointe " + file_1_name.name + " a été bien enregistrée")
|
||||
|
||||
}
|
||||
else {
|
||||
setRecord_All_PJ_message(result['message']);
|
||||
setRecord_All_PJ_api("false");
|
||||
}
|
||||
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(' Record_All_PJ Error:', error);
|
||||
setRecord_All_PJ_api("false");
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
if (file_2_name && file_2_name.name) {
|
||||
console.log(" ### Traitement de : ", file_2_name.name);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
const [Delete_one_attached_document_api, setDelete_one_attached_document_api] = useState();
|
||||
const [Delete_one_attached_document_result, setDelete_one_attached_document_result] = useState();
|
||||
const [Delete_one_attached_document_message, setDelete_one_attached_document_message] = useState();
|
||||
const Delete_one_attached_document = (event) => {
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
|
||||
var formData = new FormData();
|
||||
var nom_fiche_detaillee = "Fiche_Detaillee.pdf";
|
||||
var file_name = event.target.id;
|
||||
|
||||
|
||||
formData.append("token", stored_cookie);
|
||||
formData.append("file_name", file_name);
|
||||
|
||||
var url = process.env.REACT_APP_API_URL + "myclass/api/Delete_Stored_Downloaded_File/";
|
||||
|
||||
|
||||
fetch(
|
||||
process.env.REACT_APP_API_URL + "myclass/api/Delete_Stored_Downloaded_File/",
|
||||
{
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
}
|
||||
)
|
||||
.then((response) => response.json())
|
||||
.then((result) => {
|
||||
|
||||
//console.log(" ## result['status'] = ", result['status'])
|
||||
if (String(result['status']) === String("true")) {
|
||||
//console.log('Success:', result['message']);
|
||||
setDelete_one_attached_document_result(result['message']);
|
||||
setDelete_one_attached_document_api("true");
|
||||
Get_List_Of_All_PJ(props.client_id);
|
||||
alert(result['message'])
|
||||
|
||||
}
|
||||
else {
|
||||
setDelete_one_attached_document_message(result['message']);
|
||||
setDelete_one_attached_document_api("false");
|
||||
}
|
||||
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(' Record_All_PJ Error:', error);
|
||||
setDelete_one_attached_document_api("false");
|
||||
alert(" Impossible de supprimer le document")
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
const [Get_List_Of_All_PJ_api, setGet_List_Of_All_PJ_api] = useState();
|
||||
const [Get_List_Of_All_PJ_result, setGet_List_Of_All_PJ_result] = useState();
|
||||
const [Get_List_Of_All_PJ_message, setGet_List_Of_All_PJ_message] = useState();
|
||||
function Get_List_Of_All_PJ(local_employee_id) {
|
||||
|
||||
const formData = new FormData();
|
||||
|
||||
//formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA');
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
|
||||
formData.append("token", stored_cookie);
|
||||
formData.append("object_owner_collection", "note_evaluation");
|
||||
formData.append("object_owner_id", selected_id);
|
||||
|
||||
|
||||
//formData.append("class_internal_url", internal_url);
|
||||
//console.log("token = " + stored_cookie);
|
||||
|
||||
|
||||
fetch(
|
||||
process.env.REACT_APP_API_URL + "myclass/api/Get_List_object_owner_collection_Stored_Files/",
|
||||
{
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
}
|
||||
)
|
||||
.then((response) => response.json())
|
||||
.then((result) => {
|
||||
|
||||
//console.log(" ## result['status'] = ", result['status'])
|
||||
if (String(result['status']) === String("true")) {
|
||||
//console.log('Message :', result['message']);
|
||||
setGet_List_Of_All_PJ_result(result['message']);
|
||||
setGet_List_Of_All_PJ_api("true");
|
||||
|
||||
}
|
||||
else {
|
||||
setGet_List_Of_All_PJ_message(result['message']);
|
||||
setGet_List_Of_All_PJ_api("false");
|
||||
}
|
||||
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(' Get_List_Of_All_PJ Error:', error);
|
||||
setGet_List_Of_All_PJ_api("false");
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function Delete_file_1_name() {
|
||||
setfile_1_name();
|
||||
}
|
||||
|
||||
function Delete_file_2_name() {
|
||||
setfile_2_name();
|
||||
}
|
||||
|
||||
const [p_detail_one_file_to_download_type_name, setp_detail_one_file_to_download_type_name] = useState();
|
||||
|
||||
// -- end gestion pièces jointes
|
||||
|
||||
|
||||
function Export_evaluation_note_exel() {
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
|
||||
var nom_fichier_cmd = "export_notes.xlsx";
|
||||
|
||||
var url = process.env.REACT_APP_API_URL + "myclass/api/Export_To_Excel_List_Participant_To_Evaluation/" + stored_cookie + "/" + selected_id+"/";
|
||||
|
||||
|
||||
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 notes ")
|
||||
|
||||
});
|
||||
|
||||
|
||||
setLoading(false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<div className="note_evaluation">
|
||||
{isLoading && <div className="loader-container">
|
||||
|
@ -2358,6 +2715,9 @@ const Notes_Evaluation = (props) => {
|
|||
className="datagridclass"
|
||||
|
||||
onRowDoubleClick={(newSelectionModel) => {
|
||||
|
||||
Getall_Evaluation_Participant_List(newSelectionModel.row._id);
|
||||
|
||||
setselected_id(newSelectionModel.row._id);
|
||||
|
||||
setgridline_id(newSelectionModel.row.id);
|
||||
|
@ -3601,13 +3961,28 @@ const Notes_Evaluation = (props) => {
|
|||
|
||||
<div className="div_row" style={{ paddingRight: '10px' }}>
|
||||
|
||||
|
||||
<div className="session_data">
|
||||
|
||||
|
||||
<div style={{ "border": "None" }}>
|
||||
|
||||
<nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600", "paddingTop": "10px", "paddingLeft": "5px" }}> Liste des apprenants ou Groupes d'apprenants </nav>
|
||||
<nav style={{ "border": "None", "fontSize": "20px", "paddingTop": "5px", "paddingLeft": "5px" }}> Liste des apprenants ou Groupes d'apprenants </nav>
|
||||
|
||||
<div className="div_row" style={{ "textAlign": "right", "marginTop": "0.5rem" }}>
|
||||
<Button className="bton_emarge" onClick={(event) => {
|
||||
Getall_Evaluation_Participant_List(selected_id);
|
||||
|
||||
}}>Actualiser la liste</Button>
|
||||
|
||||
<Button className="bton_emarge" onClick={(event) => {
|
||||
Export_evaluation_note_exel();
|
||||
}}>Exporter (excel)</Button><br />
|
||||
|
||||
|
||||
<div style={{ height: 550, width: '100%', paddingRight: '5px' }}>
|
||||
|
||||
</div>
|
||||
<div style={{ height: 650, width: '100%', paddingRight: '5px' }}>
|
||||
|
||||
|
||||
<Box
|
||||
|
@ -3616,25 +3991,13 @@ const Notes_Evaluation = (props) => {
|
|||
width: '100%',
|
||||
paddingRight: '1px',
|
||||
|
||||
// Gestion des cellule a distance ou presentiel
|
||||
'& .cell--distantiel': {
|
||||
|
||||
|
||||
'& .cell--note': {
|
||||
backgroundColor: '#AFE1AF',
|
||||
color: 'black',
|
||||
color: 'red',
|
||||
},
|
||||
|
||||
'& .cell--presentiel': {
|
||||
backgroundColor: '#AFE1AF',
|
||||
color: 'black',
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
/*"& .MuiDataGrid-virtualScrollerRenderZone": {
|
||||
"& .MuiDataGrid-row": {
|
||||
"&:nth-child(2n)": { backgroundColor: "rgba(235, 235, 235, .7)" }
|
||||
}
|
||||
},*/
|
||||
"& .MuiDataGrid-columnHeaders": {
|
||||
backgroundColor: "#c8cfd5",
|
||||
color: "black",
|
||||
|
@ -3653,6 +4016,12 @@ const Notes_Evaluation = (props) => {
|
|||
backgroundColor: '#FFFFFF',
|
||||
color: 'black',
|
||||
},
|
||||
|
||||
'& .line--statut--noted_changed': {
|
||||
backgroundColor: '#F8F6B3',
|
||||
fontStyle: 'italic',
|
||||
},
|
||||
|
||||
[`& .${gridClasses.cell}`]: {
|
||||
py: 1,
|
||||
},
|
||||
|
@ -3686,6 +4055,7 @@ const Notes_Evaluation = (props) => {
|
|||
email: (item).email,
|
||||
groupe: (item).groupe,
|
||||
note: (item).note,
|
||||
note_changed: (item).note_changed,
|
||||
|
||||
}
|
||||
))}
|
||||
|
@ -3713,12 +4083,23 @@ const Notes_Evaluation = (props) => {
|
|||
//sx={datagridSx}
|
||||
getCellClassName={(params) => {
|
||||
|
||||
|
||||
// Traitement de la cellule 'notes'
|
||||
if (String(params.field) === "note") {
|
||||
return 'cell--note';
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
getRowClassName={(params) => {
|
||||
// Pour la gestion de la couleur de zone double cliquée
|
||||
if (String(params.row.id) === String(gridline_inscrit_id)) {
|
||||
|
||||
//console.log(" ### params.row = ", params.row);
|
||||
|
||||
if (String(params.row.note_changed) === "1") {
|
||||
return 'line--statut--noted_changed';
|
||||
}
|
||||
|
||||
else if (String(params.row.id) === String(gridline_inscrit_id)) {
|
||||
return 'line--statut--selected';
|
||||
}
|
||||
else if (parseInt(String(params.row.id)) % 2 === 0) {
|
||||
|
@ -3833,6 +4214,13 @@ const Notes_Evaluation = (props) => {
|
|||
</div>}
|
||||
<br />
|
||||
</div>
|
||||
|
||||
{String(noted_changed) === "1" && <div className="div_row">
|
||||
<div className="koUpdateData" style={{ "color": "orange", "textAlign": "center" }}> /!\ Pensez à enregistrer les modifications</div>
|
||||
</div>}
|
||||
|
||||
|
||||
<div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
|
||||
<div className="div_row_gauche" style={{ "textAlign": 'left', 'marginLeft': '15px' }}>
|
||||
|
||||
<Popup
|
||||
|
@ -3884,22 +4272,20 @@ const Notes_Evaluation = (props) => {
|
|||
|
||||
</div>
|
||||
|
||||
<div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
|
||||
<Button variant="contained" className="bton_annule" onClick={Annuler_change_note}>Annuler
|
||||
</Button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="div_row"> </div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
|
||||
<div className="div_row_gauche div_row_gauche_etendu" style={{ "textAlign": "left", "paddingLeft": "5px" }}>
|
||||
<Button variant="outlined" onClick={"planifier_one_evaluation"}
|
||||
className="detail_class_submenu bton_add_session"
|
||||
id='menu_import_participant' name='menu_import_participant'>Plannier 1 Eval
|
||||
<IoAddCircleOutline style={{ "fontSize": "x-large", "color": "green" }} />
|
||||
</Button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>}
|
||||
|
@ -3918,9 +4304,152 @@ const Notes_Evaluation = (props) => {
|
|||
|
||||
</div>}
|
||||
|
||||
{String(submenu) === "piece_jointe" && <div>
|
||||
<h3> Liste des Pièces jointes</h3>
|
||||
|
||||
{String(submenu) === "piece_jointe" && <div className="div_row ">
|
||||
|
||||
|
||||
<div className="div_row session_data">
|
||||
<div className="div_row" style={{ "padding": "5px", 'paddingTop': '15px' }}>
|
||||
|
||||
<div style={{ "fontSize": "12px" }}>
|
||||
<label htmlFor="upload-photo">
|
||||
<input
|
||||
style={{ display: "none" }}
|
||||
id="upload-photo"
|
||||
name="upload-photo"
|
||||
type="file"
|
||||
onChange={sessions_file_change_1}
|
||||
/>
|
||||
|
||||
<Fab
|
||||
color="secondary"
|
||||
size="small"
|
||||
component="span"
|
||||
aria-label="add"
|
||||
variant="extended"
|
||||
>
|
||||
<IoMdAddCircle /> <nav style={{ "fontSize": "12px" }}> Ajouter un fichier </nav>
|
||||
</Fab>
|
||||
|
||||
</label>
|
||||
</div>
|
||||
{file_1_name && file_1_name.name &&
|
||||
<nav style={{ "fontSize": "12px" }}>
|
||||
<div className="session_caract">Nom du fichier <br />
|
||||
<TextField
|
||||
name="file_to_download_type_name"
|
||||
id="file_to_download_type_name"
|
||||
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
|
||||
disabled={false}
|
||||
className="disabled_style enable_style"
|
||||
value={p_detail_one_file_to_download_type_name}
|
||||
onChange={(e) => {
|
||||
setp_detail_one_file_to_download_type_name(e.target.value);
|
||||
|
||||
}}
|
||||
/>
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
Fichier : {file_1_name.name} <br /> <font style={{ "cursor": "pointer" }}
|
||||
onClick={Delete_file_1_name}> Supprimer <IoIosRemoveCircleOutline /> </font>
|
||||
</nav>}
|
||||
|
||||
{Record_All_PJ_api && String(Record_All_PJ_api) === "true" && <div className="okUpdateData"> Pièce jointe enregistrée </div>}
|
||||
|
||||
{Record_All_PJ_api && String(Record_All_PJ_api) === "false" && <div className="koUpdateData"> {Record_All_PJ_message} </div>}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{file_1_name && file_1_name.name && <div className="div_row">
|
||||
|
||||
<div className="div_row_gauche">
|
||||
<Button variant="contained" onClick={Record_All_PJ}
|
||||
startIcon={<AiTwotoneSave />} className="bton_enreg">ENREGISTRER LA PIECE</Button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>}
|
||||
|
||||
{Get_List_Of_All_PJ_result && <div className="div_row" style={{ "padding": "5px" }}>
|
||||
<div className="div_row">
|
||||
<b> Liste des pièces jointes </b> <br />
|
||||
<div className="div_row">
|
||||
{Get_List_Of_All_PJ_result && Get_List_Of_All_PJ_result.map((val) => (
|
||||
<div className="div_row_list_pj" >
|
||||
<nav name={(JSON.parse(val).file_name)}
|
||||
id={(JSON.parse(val).file_name)}> <i> <AttachFileIcon />{(JSON.parse(val).file_business_object)} </i> <br /><font style={{ "color": "green", "cursor": "pointer" }}
|
||||
name={(JSON.parse(val).file_name)}
|
||||
id={(JSON.parse(val).file_name)} onClick={Download_one_attached_document}> Télécharger </font></nav>
|
||||
|
||||
<Popup
|
||||
trigger={
|
||||
<nav style={{ "color": "red", "cursor": "pointer" }} > Supprimer</nav>
|
||||
|
||||
|
||||
}
|
||||
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">
|
||||
{' '}
|
||||
|
||||
En confirmant cette opération, la pièce jointe sera <i><font color="red"> définitivement supprimée</font></i>. <br />
|
||||
|
||||
|
||||
</div>
|
||||
<div className="gest_actions">
|
||||
<div style={{ "width": "45%", "float": "left" }}>
|
||||
<button className="gest_bton_popup" onClick={(event) => {
|
||||
|
||||
Delete_one_attached_document(event);
|
||||
close();
|
||||
}}
|
||||
name={(JSON.parse(val).file_name)} id={(JSON.parse(val).file_name)}
|
||||
> 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>
|
||||
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>}
|
||||
</div>
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
</div >
|
||||
|
|
|
@ -1732,6 +1732,28 @@
|
|||
|
||||
}
|
||||
|
||||
.block_en_mass {
|
||||
width: 50%;
|
||||
float: left;
|
||||
margin-bottom: 1rem;
|
||||
margin-top: 15px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
.block_en_mass_select {
|
||||
width: 45%;
|
||||
float: left;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.block_en_mass_bton_action {
|
||||
width: 45%;
|
||||
float: left;
|
||||
margin-bottom: 1rem;
|
||||
padding-top: 0.5rem !important;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 1200px) {
|
||||
|
@ -2326,6 +2348,27 @@
|
|||
|
||||
}
|
||||
|
||||
.block_en_mass {
|
||||
width: 50%;
|
||||
float: left;
|
||||
margin-bottom: 1rem;
|
||||
margin-top: 15px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
.block_en_mass_select {
|
||||
width: 45%;
|
||||
float: left;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.block_en_mass_bton_action {
|
||||
width: 45%;
|
||||
float: left;
|
||||
margin-bottom: 1rem;
|
||||
padding-top: 0.5rem !important;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue