diff --git a/src/components/AddClassManual.js b/src/components/AddClassManual.js index 40361ca..28d2e10 100644 --- a/src/components/AddClassManual.js +++ b/src/components/AddClassManual.js @@ -664,7 +664,7 @@ const AddClassManual = (props) => { var node = { "_id": local_id, "id": localid, - "label": local_code, + "label": local_code+" - "+String(local_titre).substring(0, 20), "code": local_code, "titre": local_titre, "credit": local_credit, diff --git a/src/components/Apprenant.js b/src/components/Apprenant.js index ea38635..5cece2a 100644 --- a/src/components/Apprenant.js +++ b/src/components/Apprenant.js @@ -3581,7 +3581,7 @@ const Apprenant = (props) => { var node = { "_id": local_id, "id": localid, - "label": local_code, + "label": local_code+" - "+String(local_titre).substring(0, 20), "code": local_code, "titre": local_titre, "class_id": local_class_id, @@ -10144,7 +10144,7 @@ const Apprenant = (props) => { -
Matière
+
Matière / UE
{New_Get_List_UE_From_Class_Id_result && {
-
Matière
+
Matière / UE
{New_Getall_Partner_List_UE_result && New_Getall_Partner_List_UE_result.length > 0 && {
-
Matière
+
Matière / UE
{New_Get_List_UE_From_Class_Id_result && { var node = { "_id": local_id, "id": localid, - "label": local_code, + "label": local_code+" - "+String(local_titre).substring(0, 20), "code": local_code, "titre": local_titre, "class_id": local_class_id, @@ -5702,7 +5702,7 @@ const Conseil_Classe = (props) => { var node = { "_id": local_id, "id": localid, - "label": local_code, + "label": local_code+" - "+String(local_titre).substring(0, 20), "code": local_code, "titre": local_titre, "class_id": local_class_id, diff --git a/src/components/DisplayPartnerPromotion.js b/src/components/DisplayPartnerPromotion.js index 3aeed14..3c488b1 100644 --- a/src/components/DisplayPartnerPromotion.js +++ b/src/components/DisplayPartnerPromotion.js @@ -15643,7 +15643,7 @@ const DisplayPartnerPromotion = (props) => { var node = { "_id": local_id, "id": localid, - "label": local_code, + "label": local_code+" - "+String(local_titre).substring(0, 20), "code": local_code, "titre": local_titre, "credit": local_credit, diff --git a/src/components/DisplayPartnerSession.js b/src/components/DisplayPartnerSession.js index a120767..43ccfa7 100644 --- a/src/components/DisplayPartnerSession.js +++ b/src/components/DisplayPartnerSession.js @@ -24,7 +24,6 @@ import { FaComment } from "react-icons/fa6"; import fr from 'date-fns/locale/fr'; import { registerLocale } from 'react-datepicker'; import DatePicker from "react-datepicker"; - import "react-datepicker/dist/react-datepicker.css"; import { format } from 'date-fns' import moment from "moment"; @@ -12600,9 +12599,9 @@ const DisplayPartnerSession = (props) => { setGet_Class_Default_Document_id_api("false"); setGet_Class_Default_Document_id_message(res.data.message); // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message(res.data.message); - setalert_type("error"); + // setdisplay_alert_mysy("1"); + //setalert_message(res.data.message); + //setalert_type("error"); } diff --git a/src/components/DisplayPartnerStagiaires.js b/src/components/DisplayPartnerStagiaires.js index eb09936..b2a78da 100644 --- a/src/components/DisplayPartnerStagiaires.js +++ b/src/components/DisplayPartnerStagiaires.js @@ -69,7 +69,7 @@ import { GridPreferencePanelsValue, } from '@mui/x-data-grid'; - +import { gridClasses } from '@mui/x-data-grid'; import * as XLSX from 'xlsx'; import Modules_Mes_Documents from "./Modules_Mes_Documents"; import Module_Alert_Confirmation from "./Module_Alert_Confirmation"; @@ -602,6 +602,69 @@ const DisplayPartnerStagiaires = (props) => { ] + const columns_list_evaluation_inscrit = [ + { field: 'id', headerName: 'id', hide: true }, + { field: '_id', headerName: '_id', hide: true }, + { field: 'form_code', headerName: 'Form. Code', hide: true, flex: 1, hideable: true, resizable: true, renderCell: (params) => , }, + { field: 'class_title', headerName: 'Ftion', hide: true, flex: 1, hideable: true, resizable: true, renderCell: (params) => , }, + { field: 'session_code', headerName: 'Ftion', hide: true, flex: 1, hideable: true, resizable: true, renderCell: (params) => , }, + { + field: 'form_type', headerName: 'Type', width: 100, editable: false, flex: true, + valueFormatter: (params) => { + if (String(params.value) === "pos") + return "Position"; + else if (String(params.value) === "hot_eval") + return "Chaud"; + else if (String(params.value) === "cold_eval") + return "Froid"; + else if (String(params.value) === "autre_eval") + return "Spécifique"; + else + return " "; + }, + }, + + + { field: 'email', headerName: 'email', minwidth: 300, flex: 1, hideable: true, resizable: true, renderCell: (params) => , }, + { field: 'nom', headerName: 'nom', minwidth: 300, flex: 1, hide: false, editable: true, renderCell: (params) => , }, + { field: 'prenom', headerName: 'prenom', minwidth: 300, flex: 1, hide: false, editable: false, renderCell: (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 "" + + }, + }, + + ] + function ExpandableCell_50({ value }) { const [expanded, setExpanded] = React.useState(false); @@ -2647,14 +2710,13 @@ const DisplayPartnerStagiaires = (props) => { } - async function submenu_piece_jointe() { + function submenu_piece_jointe() { setsubmenu("piece_jointe"); - await sleep(5); setdisplay_detail_stagiaire(""); setaddOneParticipant(); - + Getall_Survey_Inscrit_evaluation_By_Session(); if (document.getElementById("piece_jointe")) { document.getElementById("piece_jointe").style.backgroundColor = "#107758"; @@ -3039,7 +3101,7 @@ const DisplayPartnerStagiaires = (props) => { var node = { "_id": local_id, "id": localid, - "label": local_code, + "label": local_code + " - " + String(local_titre).substring(0, 20), "code": local_code, "titre": local_titre, "class_id": local_class_id, @@ -7461,6 +7523,120 @@ const DisplayPartnerStagiaires = (props) => { const [is_recherche, setis_recherche] = useState("0"); + + const [selectionModel_evaluation_Inscrit, setselectionModel_evaluation_Inscrit] = React.useState([]); + const [rowss_evaluation_Inscrit, setRows_evaluation_formateur] = useState([]); + + const [Getall_Survey_Inscrit_evaluation_By_Session_api, setGetall_Survey_Inscrit_evaluation_By_Session_api] = useState(); + const [Getall_Survey_Inscrit_evaluation_By_Session_message, setGetall_Survey_Inscrit_evaluation_By_Session_message] = useState(); + const [Getall_Survey_Inscrit_evaluation_By_Session_result, setGetall_Survey_Inscrit_evaluation_By_Session_result] = useState([]); + function Getall_Survey_Inscrit_evaluation_By_Session(event) { + + setselectionModel_evaluation_Inscrit([]) + + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("related_collection", "inscription"); + form.append("related_collection_id", selected_id); + form.append("session_id", selected_session_id); + + + + 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_Inscrit_evaluation_By_Session res.data.status = " + res.data.status); + //console.log(" In Getall_Survey_Inscrit_evaluation_By_Session res.data.message r_class = " + res.data.message); + setGetall_Survey_Inscrit_evaluation_By_Session_api("true"); + setGetall_Survey_Inscrit_evaluation_By_Session_result(res.data.message); + setRows_evaluation_formateur(res.data.message); + + } + else { + setGetall_Survey_Inscrit_evaluation_By_Session_api("false"); + setGetall_Survey_Inscrit_evaluation_By_Session_message(res.data.message); + } + + }).catch((error) => { + setLoading(false); + console.warn('Not good man :( Getall_Survey_Inscrit_evaluation_By_Session = ', error); + setGetall_Survey_Inscrit_evaluation_By_Session_api("false"); + //setmyApimyApiMessage("") + }) + } + + const New_Option_Evaluation_Masse = [ + { "id": "export_evaluation", "label": "Export Evaluation (PDF) ", "value": "export_evaluation" }, + ] + const [actionmass_eval_val, setactionmass_eval_val] = useState(); + + async function actionmass_Evaluation_Traitemet() { + + var tab_ids_inscription = []; + for (var i = 0; i < selectionModel_evaluation_Inscrit.length; i++) { + var myid = parseInt(String(selectionModel_evaluation_Inscrit[i])); + + var line_id = JSON.parse(rowss_evaluation_Inscrit[myid])._id; + + tab_ids_inscription.push(line_id); + } + + if (String(actionmass_eval_val) === "export_evaluation") + Export_Selected_Survey_PDF(tab_ids_inscription, "Evaluation formateur", "chaud"); + + } + + function Export_Selected_Survey_PDF(tab_ids_survey, type_export, used_datagrid) { + const stored_cookie = getCookie('tokenmysypart'); + + if (tab_ids_survey.length <= 0) { + // alert(" Aucune ligne selectionnée "); + + setdisplay_alert_mysy("1"); + setalert_message("Aucune ligne selectionnée "); + setalert_type("error"); + return; + } + var nom_fichier_cmd = "export_evaluation.zip"; + + var url = process.env.REACT_APP_API_URL + "myclass/api/Export_To_Excel_Survey_with_filter_Tab_Survey_Id/" + stored_cookie + "/" + tab_ids_survey.toString() + "/" + String(type_export); + + + 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); + + if (used_datagrid === "chaud") { + setselectionModel_evaluation_Inscrit([]); + setactionmass_eval_val(""); + } + + } + }).catch((error) => { + setLoading(false); + console.error('Error:', error); + alert(" Impossible d'exporter les réponses ") + + }); + + + setLoading(false); + } + + return (
{isLoading &&
@@ -9899,7 +10075,7 @@ const DisplayPartnerStagiaires = (props) => {
 
{selected_id && String(selected_id).length > 0 &&
} @@ -9916,7 +10092,7 @@ const DisplayPartnerStagiaires = (props) => { {String(props.formation_initiale) === "1" && String(addOneParticipant) !== "1" && } - + {String(addOneParticipant) !== "1" && String(history_securite_read) === "1" && } @@ -12281,12 +12457,234 @@ const DisplayPartnerStagiaires = (props) => { my_title={"Gestion Documentaire"} object_owner_collection={"inscription"} object_owner_id={selected_id} - authorize_deletion={"1"} + authorize_deletion={"1"} />
+
+ +
+
Liste des évaluations
+ Evaluation
+
+ + + { + setselectionModel_evaluation_Inscrit(newSelectionModel_evaluation); + // console.log("ch selected--" + newSelectionModel_evaluation); + + }} + + selectionModel={selectionModel_evaluation_Inscrit} + localeText={frFR.components.MuiDataGrid.defaultProps.localeText} + rows={rowss_evaluation_Inscrit.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, + + form_type: JSON.parse(item).formulaire.type, + class_title: JSON.parse(item).class_title, + session_code: JSON.parse(item).session_code, + session_title: JSON.parse(item).session_title, + + } + ))} + + columns={columns_list_evaluation_inscrit} + 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, + }, + }} + + /> + + + {selectionModel_evaluation_Inscrit && selectionModel_evaluation_Inscrit.length > 0 && +
+ + +   + + + { + if (value && value.value) { + if (String(value.value) === "export_evaluation") { + setactionmass_eval_val(value.value); + } + else { + setactionmass_eval_val(""); + } + + } + else { + setactionmass_eval_val(""); + } + + }} + + renderInput={(params) => + } + /> + + + {actionmass_eval_val && String(actionmass_eval_val) !== "" && + selectionModel_evaluation_Inscrit.length > 0 && + + + Traiter + + } + modal + nested + position="center center" + > + + {close => ( +
+ +
MySy Information
+
+ {' '} + + + {actionmass_eval_val && String(actionmass_eval_val) === "export_evaluation" && } + +
+
+
+ + +
+
+ +
+
+
+ )} +
+ } +
+ + +
+ } + +
+
+ + +
+ +
+ +
} diff --git a/src/components/Document_Affichage_Grid.js b/src/components/Document_Affichage_Grid.js index 91c2789..8f5ff83 100644 --- a/src/components/Document_Affichage_Grid.js +++ b/src/components/Document_Affichage_Grid.js @@ -188,11 +188,14 @@ const Document_Affichage_Grid = (props) => { className: classes.paper, // Apply the paper style style: { - overflowY: 'unset', + overflowY: 'unset', position: 'absolute', top: '7rem', margin: "2px", - width: '40rem' + width: '50rem', + maxWidth:'unset', + background:'#efefef', + borderRadius:'20px!important' }, }} hideBackdrop={true} @@ -205,16 +208,16 @@ const Document_Affichage_Grid = (props) => { aria-labelledby="draggable-dialog-title" > - {selected_doc_name} + {selected_doc_name} {Dialog_Preview_Doc_message} -

+

{selected_doc_img && - } + }
@@ -247,8 +250,8 @@ const Document_Affichage_Grid = (props) => {
-
{JSON.parse(document).file_business_object}
-
Créé le {String(JSON.parse(document).creation_date).substring(0, 10)}
+
{JSON.parse(document).file_business_object}
+
Créé le {String(JSON.parse(document).creation_date).substring(0, 16)}
{ preview_document_pdf(JSON.parse(document)._id, JSON.parse(document).file_extention, JSON.parse(document).file_business_object); setselected_doc_name(JSON.parse(document).file_business_object); diff --git a/src/components/Groupe_Apprenant.js b/src/components/Groupe_Apprenant.js index dd36669..22beb51 100644 --- a/src/components/Groupe_Apprenant.js +++ b/src/components/Groupe_Apprenant.js @@ -2419,8 +2419,6 @@ const Groupe_Apprenant = (props) => { ] async function actionmass_ftion_Traitemet() { - - var liste_grp_apprenant = GetSelectedRowsApprenantGrp(); if (String(actionmass_ftion_val) === String("supprimer")) { @@ -3768,7 +3766,7 @@ const Groupe_Apprenant = (props) => { -
MySy Information - {actionmass_ftion_val}
+
MySy Information
{' '} {String(actionmass_ftion_val) === "supprimer" && @@ -4197,7 +4195,7 @@ const Groupe_Apprenant = (props) => { {String(grp_apprenant_data_edit_mode) === "1" &&
-
} diff --git a/src/components/Intranet_Mes_Stagiaires.js b/src/components/Intranet_Mes_Stagiaires.js index 308490b..fb7a040 100644 --- a/src/components/Intranet_Mes_Stagiaires.js +++ b/src/components/Intranet_Mes_Stagiaires.js @@ -2626,7 +2626,7 @@ registerLocale('fr', fr); var node = { "_id": local_id, "id": localid, - "label": local_code, + "label": local_code+" - "+String(local_titre).substring(0, 20), "code": local_code, "titre": local_titre, "class_id": local_class_id, diff --git a/src/components/Jurys.js b/src/components/Jurys.js index f5ec43c..5b2ba02 100644 --- a/src/components/Jurys.js +++ b/src/components/Jurys.js @@ -1349,7 +1349,7 @@ const Jury = (props) => { var node = { "_id": local_id, "id": localid, - "label": local_code, + "label": local_code+" - "+String(local_titre).substring(0, 20), "code": local_code, "titre": local_titre, "class_id": local_class_id, @@ -6709,7 +6709,7 @@ const Jury = (props) => { {selected_jury_cible && New_Option_Cible_Jury && New_Get_List_UE_From_Session_Id_result && New_Get_List_UE_From_Session_Id_result.length > 0 && -
Matière
+
/ UE
{ {selected_jury_cible && String(selected_jury_cible) === "soutenance" && New_Option_Cible_Jury && New_Get_List_UE_From_Session_Id_result && New_Get_List_UE_From_Session_Id_result.length > 0 && -
Matière
+
Matière / UE
{ setGet_Class_Default_Document_id_api("false"); setGet_Class_Default_Document_id_message(res.data.message); // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message(res.data.message); - setalert_type("error"); + //setdisplay_alert_mysy("1"); + //setalert_message(res.data.message); + //setalert_type("error"); } diff --git a/src/components/Module_Editique.js b/src/components/Module_Editique.js index 8a65c33..d071173 100644 --- a/src/components/Module_Editique.js +++ b/src/components/Module_Editique.js @@ -1611,9 +1611,9 @@ const Module_Editique = (props) => { setGet_Class_Default_Document_id_api("false"); setGet_Class_Default_Document_id_message(res.data.message); // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message(res.data.message); - setalert_type("error"); + // setdisplay_alert_mysy("1"); + //setalert_message(res.data.message); + //setalert_type("error"); } diff --git a/src/components/Module_Ent_Mes_Formations.js b/src/components/Module_Ent_Mes_Formations.js index 4bdc90e..6e4f821 100644 --- a/src/components/Module_Ent_Mes_Formations.js +++ b/src/components/Module_Ent_Mes_Formations.js @@ -1848,168 +1848,6 @@ const Module_Ent_Mes_Formations = (props) => { - {/*
-
Utilisez les filtres !
-
-
- { - setp_filtre1(e.target.value) - }} - > - - Email    - Nom   - Prénom   - - -
- - - -
- {p_filtre1 && - { setp_filtre1_value(e.target.value); }} - InputProps={{ - endAdornment: ( - - { - setp_filtre1_value(""); - }} /> - - ), - }} - - /> - - } -
- {p_filtre1 && } - {p_filtre1 && } - - -
- - {p_filtre2 && -
-
- { - setp_filtre2(e.target.value) - }} - > - - Email    - Nom   - Prénom   - - -
-
- {String(p_filtre2).length > 3 && - setp_filtre2_value(e.target.value)} - InputProps={{ - endAdornment: ( - - { - setp_filtre2_value(""); - }} /> - - ), - }} - - />} -
- - - {String(p_filtre2).length > 3 && } -
- } - - - {
- -
- -
- -
- - -
- -
} - -
-
*/} -