From 75a9c77bbb5f8b1feb374f008e7ae0e1cb1d2fec Mon Sep 17 00:00:00 2001 From: Cherif Date: Fri, 3 Jul 2026 19:35:49 +0200 Subject: [PATCH] 03/07/26 - 20h --- src/components/DisplayPartnerSession.js | 3 +- src/components/Employes.js | 16 +- .../Module_Connexion_Ent_Student.js | 40 +- .../Module_Connexion_Ent_Student_V2.js | 51 +- src/components/Module_Ent_Mes_Formations.js | 2 +- .../Module_Session_Notes_Classement.js | 1367 +++++++++-------- src/components/Modules_ENT_Mes_Documents.js | 168 +- src/components/Modules_Mes_Documents.js | 564 ++++++- src/components/Student_Account_Ent.js | 2 +- src/components/UpdateUserInfo.js | 63 +- .../_module_ent_mes_formations.scss | 4 +- .../components/_modules_mes_documents.scss | 2 +- src/styles/components/_signin.scss | 2 +- 13 files changed, 1488 insertions(+), 796 deletions(-) diff --git a/src/components/DisplayPartnerSession.js b/src/components/DisplayPartnerSession.js index efaac85..80bf0c3 100644 --- a/src/components/DisplayPartnerSession.js +++ b/src/components/DisplayPartnerSession.js @@ -13870,7 +13870,8 @@ const DisplayPartnerSession = (props) => { { "id": "code_session", "label": "Code Session", "value": "code_session" }, { "id": "class_external_code", "label": "Ftion. Ref. Interne", "value": "class_external_code" }, { "id": "class_title", "label": "Titre Formation", "value": "class_title" }, - { "id": "client_name", "label": "Client (Nom / R.Sociale / Email / Tel)", "value": "client_name" }, + { "id": "client_name", "label": "Client (Nom / R.Sociale / Email / Tel)", "value": "client_name" }, + { "id": "inscrit_name", "label": "Inscrit (Nom / Prénom / Email / Tel)", "value": "inscrit_name" }, { "id": "session_etape", "label": "Session Etape", "value": "session_etape" }, { "id": "session_start_date", "label": "Date début session", "value": "session_start_date" }, { "id": "session_end_date", "label": "Date fin session", "value": "session_end_date" }, diff --git a/src/components/Employes.js b/src/components/Employes.js index fbc8280..9e5aaac 100644 --- a/src/components/Employes.js +++ b/src/components/Employes.js @@ -13894,11 +13894,11 @@ const Employes = (props) => { {String(acces_right_data_edit_mode) === "1" && -
+
  { columns={columns_employee_acces_right} - pageSize={10} + pageSize={15} className="datagridclass" disabled={true} - rowsPerPageOptions={[10]} + rowsPerPageOptions={[15]} //disableSelectionOnClick components={{ Toolbar: GridToolbar, @@ -13967,11 +13967,11 @@ const Employes = (props) => { } {String(acces_right_data_edit_mode) !== "1" && -
+
  { columns={columns_employee_acces_right_disabled} - pageSize={10} + pageSize={15} className="datagridclass" disabled={true} - rowsPerPageOptions={[10]} + rowsPerPageOptions={[15]} //disableSelectionOnClick components={{ Toolbar: GridToolbar, diff --git a/src/components/Module_Connexion_Ent_Student.js b/src/components/Module_Connexion_Ent_Student.js index 6744f2b..065c89c 100644 --- a/src/components/Module_Connexion_Ent_Student.js +++ b/src/components/Module_Connexion_Ent_Student.js @@ -16,6 +16,7 @@ import 'react-tooltip/dist/react-tooltip.css' import { Tooltip } from 'react-tooltip' import ent_studend_img from "../mysy_img/ent_studend_img.jpg"; import { getCookie } from 'react-use-cookie'; +import Module_Alert_Confirmation from "./Module_Alert_Confirmation"; function Module_Connexion_Ent_Student() { const [isconnected, setisconnected] = useState(""); @@ -174,7 +175,8 @@ function Module_Connexion_Ent_Student() { // si c'est une connexion user qui est active if (typeof (stored_user) != "undefined" && String(stored_user) !== String('')) { //alert(" c'est une connexion USERR qui est active"); - Logout_User(); + logout_user_confirmation(); + } @@ -375,12 +377,22 @@ function Module_Connexion_Ent_Student() { setResult(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(" Si cette adresse e-mail correspond à un compte actif, vous recevrez un lien de réinitialisation dans quelques minutes."); + setalert_type("success"); + //alert(" iiiiiiiii "); + + } else { //console.log(" In test res.data.status = " + res.data.status); //console.log(" In test res.data.message = " + res.data.message); setmyApiResponse("false"); setResult(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); + } @@ -466,9 +478,35 @@ function Module_Connexion_Ent_Student() { } }; + const [display_alert_mysy, setdisplay_alert_mysy] = useState(""); + const [alert_message, setalert_message] = useState(""); + const [alert_type, setalert_type] = useState(""); + + function clear_alert_message() { + setalert_message(""); + } + function clear_alert_type() { + setalert_type(""); + } + function clear_display_alert_mysy() { + setdisplay_alert_mysy(""); + } + return (
+ {/*** Affichage des messages d'alerte*/} + {display_alert_mysy && String(display_alert_mysy) === "1" && + + } + {/*** FIN Affichage des messages d'alerte*/} + +
diff --git a/src/components/Module_Connexion_Ent_Student_V2.js b/src/components/Module_Connexion_Ent_Student_V2.js index 9feec3e..2cb7c2b 100644 --- a/src/components/Module_Connexion_Ent_Student_V2.js +++ b/src/components/Module_Connexion_Ent_Student_V2.js @@ -398,12 +398,20 @@ function Module_Connexion_Ent_Student_V2() { setResult(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(" Si cette adresse e-mail correspond à un compte actif, vous recevrez un lien de réinitialisation dans quelques minutes."); + setalert_type("success"); + } else { //console.log(" In test res.data.status = " + res.data.status); //console.log(" In test res.data.message = " + res.data.message); setmyApiResponse("false"); setResult(res.data.message); + + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } @@ -571,13 +579,15 @@ function Module_Connexion_Ent_Student_V2() { {String(initpasswd) !== String("true") && String(closepopup) !== String("1") && Mot de passe oublié} - position="center" className="signin popup-reset-pwd"> + position="center" className="signin popup-reset-pwd" >
+ +
Modifier le mot de passe
+ > Réinitialiser votre mot de passe

@@ -611,14 +621,14 @@ function Module_Connexion_Ent_Student_V2() { /> {errors.sommerandom && ( - la sommes est incorrect + La somme est incorrecte )}
-       - +       +
@@ -679,6 +689,12 @@ const local_css = ` box-sizing: border-box; } + .popup-content{ +margin-left: -7rem !important; + margin-top: -15rem !important; + } + + body { margin: 0; font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", @@ -707,6 +723,7 @@ a { border-radius: 999px; filter: blur(70px); z-index: 0; + } .ent-bg-shape-1 { @@ -993,16 +1010,33 @@ font-family: 'DM Sans'; @media only screen and (min-width: 601px) and (max-width: 991px) { width: 70%; margin: auto; + + .popup-content{ +margin-left: -7rem !important; + margin-top: -15rem !important; + } } @media only screen and (min-width: 992px){ width: 70%; margin: auto; } + + .popup-content{ +margin-left: -7rem !important; + margin-top: -15rem !important; + } } @media (max-width: 640px) { + +.popup-content{ +margin-left: -5rem !important; + margin-top: -18rem !important; + } + + .ent-page { padding: 20px 14px; } @@ -1056,4 +1090,7 @@ font-family: 'DM Sans'; } } + + + `; diff --git a/src/components/Module_Ent_Mes_Formations.js b/src/components/Module_Ent_Mes_Formations.js index d59755b..0d3ba74 100644 --- a/src/components/Module_Ent_Mes_Formations.js +++ b/src/components/Module_Ent_Mes_Formations.js @@ -2843,7 +2843,7 @@ const Module_Ent_Mes_Formations = (props) => { - +
} {selected_id && String(selected_id).length > 0 &&
diff --git a/src/components/Module_Session_Notes_Classement.js b/src/components/Module_Session_Notes_Classement.js index 25d5c01..bddb354 100644 --- a/src/components/Module_Session_Notes_Classement.js +++ b/src/components/Module_Session_Notes_Classement.js @@ -245,7 +245,7 @@ const Module_Session_Notes_Classement = (props) => { { field: 'diplome_id_code', headerName: 'Diplome', width: 200, hide: false, editable: false, renderCell: (params) => , }, { - field: 'pourcentage_absence_non_justifed', headerName: '%Abs. NJ', align: "center", Width: 150, + field: 'pourcentage_absence_non_justifed', headerName: '%Abs. NJ', align: "center", Width: 150, align: "left", renderCell: (params) => { return ( @@ -296,12 +296,12 @@ const Module_Session_Notes_Classement = (props) => { }, - { field: 'domaine_competence_id_code', headerName: 'Dom. compét.', width: 250, hide: false, editable: false, renderCell: (params) => , }, + { field: 'domaine_competence_id_code', headerName: 'Dom. compét.', width: 250, hide: false, editable: false, renderCell: (params) => , }, { field: 'semestre', headerName: 'Sem.', width: 80, hide: false, editable: false, renderCell: (params) => , }, { field: 'inscription_id_nom', headerName: 'Nom', width: 200, hide: false, editable: false, renderCell: (params) => , }, - { field: 'inscription_id_prenom', headerName: 'Prenom', width: 200, hide: false, editable: false, renderCell: (params) => , }, + { field: 'inscription_id_prenom', headerName: 'Prenom', width: 200, hide: false, editable: false, renderCell: (params) => , }, { field: 'ue_id_code', headerName: 'UE', width: 250, hide: false, editable: false, renderCell: (params) => , }, @@ -314,18 +314,18 @@ const Module_Session_Notes_Classement = (props) => { }, { - field: 'moyenne_apres_coef', headerName: 'Moyenne (avec Coef)', width: 150, hide: true, editable: false, renderCell: (params) => , + field: 'moyenne_apres_coef', headerName: 'Moyenne (avec Coef)', width: 150, hide: true, editable: false, renderCell: (params) => , }, - { field: 'ue_credit_ects', headerName: 'ECTS', width: 150, hide: false, editable: false, renderCell: (params) => , }, + { field: 'ue_credit_ects', headerName: 'ECTS', width: 150, hide: false, editable: false, renderCell: (params) => , }, - { field: 'ue_seuil_validation', headerName: 'Seuil. V', width: 150, hide: false, editable: false, renderCell: (params) => , }, + { field: 'ue_seuil_validation', headerName: 'Seuil. V', width: 150, hide: false, editable: false, renderCell: (params) => , }, { - field: 'is_eu_validated', headerName: 'Validé', Width: 100, renderCell: (params) => , + field: 'is_eu_validated', headerName: 'Validé', Width: 100, renderCell: (params) => , renderCell: (cellValues) => { return (
@@ -339,7 +339,7 @@ const Module_Session_Notes_Classement = (props) => { }, { field: 'jury_note', headerName: 'Note Jury', width: 100, editable: false, renderCell: (params) => , align: "center", }, - { field: 'jury_observation', headerName: 'Observ. Jury', width: 200, editable: false, renderCell: (params) => , align: "left", }, + { field: 'jury_observation', headerName: 'Observ. Jury', width: 200, editable: false, renderCell: (params) => , align: "left", }, { field: 'jury_validation', headerName: 'Valid. Jury', width: 100, hide: false, editable: false, renderCell: (cellValues) => { @@ -3022,7 +3022,7 @@ const Module_Session_Notes_Classement = (props) => { // console.log(" ### tab_inscrit_ids = ", tab_inscrit_ids) - var url = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Inscrit_Bulletin_Note_By_PDF/" + stored_cookie + "/" + tab_inscrit_ids + "/" + diplome_id + "/" + final_semestre_data; + var url = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Inscrit_Bulletin_Note_By_PDF/" + stored_cookie + "/" + tab_inscrit_ids + "/" + diplome_id + "/" + final_semestre_data + "/" + impression_test; //console.log(" ## url bulletin = ", url); @@ -4043,6 +4043,8 @@ const Module_Session_Notes_Classement = (props) => { const fixedVal_scope_semestre = []; const [scope_semestre, setscope_semestre] = useState([...fixedVal_scope_semestre]); + const [impression_test, setimpression_test] = useState("0"); + const New_Option_Semestre = [ { "id": "1", "label": "1", "value": "1" }, @@ -4055,6 +4057,9 @@ const Module_Session_Notes_Classement = (props) => { { "id": "", "label": "", "value": "" }, ] + + + return (
@@ -4156,6 +4161,49 @@ const Module_Session_Notes_Classement = (props) => {
+
Test
+ {New_Option_Oui_Non && New_Option_Oui_Non.length > 0 && (data).value === String(impression_test))[0].label} + + onChange={(event, value) => { + if (value && value.value) { + setimpression_test(value.value); + + } else { + setimpression_test(""); + } + }} + + renderInput={(params) => + } + />} + + +
+ + @@ -5057,9 +5105,9 @@ const Module_Session_Notes_Classement = (props) => { {vue_note && String(vue_note) === "classement" &&
{/***** On n'affiche les filtre que si necessaire */} -
+
-
Filtre Classement général +
Filtre Classement général
@@ -5688,7 +5736,7 @@ const Module_Session_Notes_Classement = (props) => {
- {/** La V2 du calcul */} + {/** La V2 du calcul */} {classement_wiew_mode && classement_wiew_mode !== "detail" && { {actionmass_ftion_val && String(actionmass_ftion_val) === "inscription" &&
- -
- - -
- -
- -
-
- - {/******* End filtre */} - -
} - - - - - {vue_note && String(vue_note) === "detail_note" &&
- -
- -
-
- -
- -   - - + + +   { + setp_filtre1(""); + setp_filtre1_value(""); }} - > - { - setselectionModel_note_UE_classement(newSelectionModel); - /*if (newSelectionModel.length === 1) - handleClick_edit_employee_From_Line(newSelectionModel);*/ - if (newSelectionModel.length !== 1) { - /* setsubmenu(); - setdisplay_detail_employe(); - setadd_One_Employee();*/ - } - }} - selectionModel={selectionModel_note_UE_classement} - - localeText={frFR.components.MuiDataGrid.defaultProps.localeText} - rows={Getall_Detail_Note_of_BC_Diplome_UE_result.map((item, index) => ( - { - id: index, - _id: JSON.parse(item)._id, - session_id: JSON.parse(item).session_id, - inscription_id: JSON.parse(item).inscription_id, - - diplome_id: JSON.parse(item).diplome_id, - domaine_competence_id: JSON.parse(item).domaine_competence_id, - evaluation_id: JSON.parse(item).evaluation_id, - class_id: JSON.parse(item).class_id, - class_eu_id: JSON.parse(item).class_eu_id, - - class_eu_code: JSON.parse(item).class_eu_code, - - inscription_id_nom: JSON.parse(item).inscription_id_nom, - inscription_id_prenom: JSON.parse(item).inscription_id_prenom, - inscription_id_mail: JSON.parse(item).inscription_id_mail, - - diplome_id_code: JSON.parse(item).diplome_id_code, - - domaine_competence_id_code: JSON.parse(item).domaine_competence_id_code, - evaluation_code: JSON.parse(item).evaluation_code, - note: JSON.parse(item).note, - eval_date_heure_debut: JSON.parse(item).eval_date_heure_debut, - - eval_date_heure_fin: JSON.parse(item).eval_date_heure_fin, - - semestre: JSON.parse(item).semestre, - - } - ))} - - columns={columns_list_Detailled_Note_After_UE_Calculation} - pageSize={20} - className="datagridclass" - - onRowDoubleClick={(newSelectionModel) => { - - - - }} - - rowsPerPageOptions={[20]} - disableSelectionOnClick - /* components={{ - Toolbar: GridToolbar, - }}*/ - - components={{ - Toolbar: CustomToolbar - }} - componentsProps={{ toolbar: { data_colums: columns_list_evaluation_note_classement_final } }} - //sx={datagridSx} - getCellClassName={(params) => { - - - - }} - getRowClassName={(params) => { - // Pour la gestion de la couleur de zone double cliquée - if (String(params.row.ue_validation) === "1") { - return 'line--statut--isvalide'; - } - - if (String(params.row.id) === String(gridline_id)) { - return 'line--statut--selected'; - } - else 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, - - } - }} - /> - -
+
+
} + + +
+ + {p_filtre2 && +
+
+ + {New_Option_Filter && New_Option_Filter.length > 0 && (data).value === String(p_filtre2))[0].label} + options={New_Option_Filter} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre2(value.value); + + } + + }} + + renderInput={(params) => + } + />} + +
+
+ {String(p_filtre2).length > 2 && String(p_filtre2) === "ue_id" && New_Getall_Class_List_UE_result.length > 0 && + (data)._id === String(p_filtre1_value))[0].label} + options={New_Getall_Class_List_UE_result} + onChange={(event, value) => { + if (value && value._id) { + setp_filtre2_value(value._id); + } + }} + + renderInput={(params) => + } + /> + } + + {String(p_filtre2).length > 2 && String(p_filtre2) === "inscrit_id" && New_GetListeInscrit_result.length > 0 && + (data)._id === String(p_filtre1_value))[0].label} + options={New_GetListeInscrit_result} + onChange={(event, value) => { + if (value && value._id) { + setp_filtre2_value(value._id); + } + }} + + renderInput={(params) => + } + /> + } + + {String(p_filtre2).length > 2 && String(p_filtre2) === "semestre" && + { + setp_filtre2_value(e.target.value); + + }} + + renderInput={(params) => + } + />} + + +
+ + {String(p_filtre2).length > 2 && } + + {String(p_filtre2).length > 2 && } + +
+ } + + + {p_filtre3 && +
+
+ + {New_Option_Filter && New_Option_Filter.length > 0 && (data).value === String(p_filtre3))[0].label} + options={New_Option_Filter} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre3(value.value); + + } + + }} + + renderInput={(params) => + } + />} + + +
+ + + +
+ {p_filtre3 && String(p_filtre3) === "ue_id" && New_Getall_Class_List_UE_result.length > 0 && + + (data)._id === String(p_filtre1_value))[0].label} + options={New_Getall_Class_List_UE_result} + onChange={(event, value) => { + if (value && value._id) { + setp_filtre3_value(value._id); + } + }} + + renderInput={(params) => + } + /> + + } + + {p_filtre3 && String(p_filtre3) === "inscrit_id" && New_GetListeInscrit_result.length > 0 && + + (data)._id === String(p_filtre1_value))[0].label} + options={New_GetListeInscrit_result} + onChange={(event, value) => { + if (value && value._id) { + setp_filtre3_value(value._id); + } + }} + + renderInput={(params) => + } + /> + + } + + {p_filtre3 && String(p_filtre3) === "semestre" && + { + setp_filtre3_value(e.target.value); + + }} + + renderInput={(params) => + } + />} + + +
+ + + + {String(p_filtre2).length > 2 &&
+ + +   + +
} + + {String(p_filtre3).length > 2 && } +
+ } + + +
+ +
+ +
+ +
+
-
+ +
+
+ + {/******* End filtre */} + +
+ } + + + + + { + vue_note && String(vue_note) === "detail_note" &&
+ +
+ +
+
+ +
+ +   + + + { + setselectionModel_note_UE_classement(newSelectionModel); + /*if (newSelectionModel.length === 1) + handleClick_edit_employee_From_Line(newSelectionModel);*/ + if (newSelectionModel.length !== 1) { + /* setsubmenu(); + setdisplay_detail_employe(); + setadd_One_Employee();*/ + } + }} + selectionModel={selectionModel_note_UE_classement} + + localeText={frFR.components.MuiDataGrid.defaultProps.localeText} + rows={Getall_Detail_Note_of_BC_Diplome_UE_result.map((item, index) => ( + { + id: index, + _id: JSON.parse(item)._id, + session_id: JSON.parse(item).session_id, + inscription_id: JSON.parse(item).inscription_id, + + diplome_id: JSON.parse(item).diplome_id, + domaine_competence_id: JSON.parse(item).domaine_competence_id, + evaluation_id: JSON.parse(item).evaluation_id, + class_id: JSON.parse(item).class_id, + class_eu_id: JSON.parse(item).class_eu_id, + + class_eu_code: JSON.parse(item).class_eu_code, + + inscription_id_nom: JSON.parse(item).inscription_id_nom, + inscription_id_prenom: JSON.parse(item).inscription_id_prenom, + inscription_id_mail: JSON.parse(item).inscription_id_mail, + + diplome_id_code: JSON.parse(item).diplome_id_code, + + domaine_competence_id_code: JSON.parse(item).domaine_competence_id_code, + evaluation_code: JSON.parse(item).evaluation_code, + note: JSON.parse(item).note, + eval_date_heure_debut: JSON.parse(item).eval_date_heure_debut, + + eval_date_heure_fin: JSON.parse(item).eval_date_heure_fin, + + semestre: JSON.parse(item).semestre, + + } + ))} + + columns={columns_list_Detailled_Note_After_UE_Calculation} + pageSize={20} + className="datagridclass" + + onRowDoubleClick={(newSelectionModel) => { + + + + }} + + rowsPerPageOptions={[20]} + disableSelectionOnClick + /* components={{ + Toolbar: GridToolbar, + }}*/ + + components={{ + Toolbar: CustomToolbar + }} + componentsProps={{ toolbar: { data_colums: columns_list_evaluation_note_classement_final } }} + //sx={datagridSx} + getCellClassName={(params) => { + + + + }} + getRowClassName={(params) => { + // Pour la gestion de la couleur de zone double cliquée + if (String(params.row.ue_validation) === "1") { + return 'line--statut--isvalide'; + } + + if (String(params.row.id) === String(gridline_id)) { + return 'line--statut--selected'; + } + else 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, + + } + }} + + /> + +
+ +
+ + +
+
+ +
-
+ +
+ +
- -
- -
- - - {/*
+ {/*
@@ -7063,7 +7115,8 @@ const Module_Session_Notes_Classement = (props) => {
*/} -
} +
+ }
); } diff --git a/src/components/Modules_ENT_Mes_Documents.js b/src/components/Modules_ENT_Mes_Documents.js index 9c772ee..a2c52b0 100644 --- a/src/components/Modules_ENT_Mes_Documents.js +++ b/src/components/Modules_ENT_Mes_Documents.js @@ -407,15 +407,15 @@ const Modules_ENT_Mes_Documents = (props) => { useEffect(() => { - console.log(" props.inscription_id={selected_inscription_id} = ", props.inscription_id) + //console.log(" props.inscription_id={selected_inscription_id} = ", props.inscription_id) let windowWidth = window.innerWidth; if (windowWidth <= 991) { setDevice('mobile'); setaffichage_doc("grid"); - + } - + if (props.partner_client_id && props.type_document && autorized_type_document.includes(String(props.type_document)) && props.partner_owner_recid === "") { @@ -785,11 +785,11 @@ const Modules_ENT_Mes_Documents = (props) => { const stored_cookie = getCookie('tokenmysych'); - + formData.append("token", stored_cookie); formData.append("apprenant_id", props.apprenant_id); formData.append("object_owner_collection", "inscription"); - formData.append("object_owner_id", props.inscription_id); + formData.append("object_owner_id", props.inscription_id); if (props.class_id && props.class_id.length > 5) { formData.append("class_id", props.class_id); @@ -800,7 +800,7 @@ const Modules_ENT_Mes_Documents = (props) => { formData.append("object_owner_collection", props.object_owner_collection); } - + //formData.append("class_internal_url", internal_url); //console.log("token = " + stored_cookie); setLoading(true); @@ -1272,19 +1272,19 @@ const Modules_ENT_Mes_Documents = (props) => { }} renderInput={(params) => @@ -1343,19 +1343,19 @@ const Modules_ENT_Mes_Documents = (props) => { }} renderInput={(params) => @@ -1460,19 +1460,19 @@ const Modules_ENT_Mes_Documents = (props) => { }} renderInput={(params) => @@ -1525,19 +1525,19 @@ const Modules_ENT_Mes_Documents = (props) => { }} renderInput={(params) => @@ -1593,19 +1593,19 @@ const Modules_ENT_Mes_Documents = (props) => { }} renderInput={(params) => @@ -1659,19 +1659,19 @@ const Modules_ENT_Mes_Documents = (props) => { }} renderInput={(params) => diff --git a/src/components/Modules_Mes_Documents.js b/src/components/Modules_Mes_Documents.js index 067d0db..0d254bf 100644 --- a/src/components/Modules_Mes_Documents.js +++ b/src/components/Modules_Mes_Documents.js @@ -13,6 +13,7 @@ import { DataGrid, frFR, GridToolbar, } from '@mui/x-data-grid'; + import { FcLock } from "react-icons/fc"; import { FcCancel } from "react-icons/fc"; import Popup from 'reactjs-popup'; @@ -72,6 +73,8 @@ import Paper from '@material-ui/core/Paper'; import Draggable from 'react-draggable'; import FilePresentIcon from '@mui/icons-material/FilePresent'; +import { MdVisibility, MdVisibilityOff } from "react-icons/md"; + function PaperComponent(props) { return ( { ] + const columns_for_inscrit = [ + { field: '_id', headerName: '_id', hide: true, editable: false, disableExport: true }, + { field: 'id', headerName: 'id', hide: true, editable: false, disableExport: true }, + { field: 'file_extention', hide: true, editable: false, disableExport: true }, + { field: 'file_expired', hide: true, editable: false, disableExport: true }, + { field: 'file_name', headerName: 'tech_file_name', hide: true, disableExport: true }, + { + field: 'is_secure_file', headerName: 'Sécu.', hide: false, Width: 100, hide: true, disableExport: true + + }, + { + field: 'creation_date', headerName: 'Date Création', Width: 100, flex: 1, hide: false, editable: false, + renderCell: (cellValues) => { + return ( + <> + {cellValues.row.is_secure_file !== "1" && } + + {cellValues.row.is_secure_file === "1" && } + + ) + + }, + + }, + { field: 'file_business_object', headerName: 'Nom Fichier', minWidth: 200, flex: 1, hide: false, editable: false, }, + { field: 'object_owner_collection', headerName: 'System_Pro', minWidth: 200, flex: 1, hide: true, editable: false }, + { field: 'client_raison_sociale', headerName: 'Client Raison Soc.', minWidth: 200, flex: 1, hide: true, editable: false }, + { field: 'client_nom', headerName: 'Client Nom', minWidth: 150, flex: 1, hide: false, editable: false }, + + { field: 'related_client_nom', headerName: 'Client Nom (2)', Width: 0, flex: 1, hide: true, editable: false }, + { field: 'related_ftion_external_code', headerName: 'Cde Ftion', minWidth: 150, flex: 1, hide: false, editable: false }, + { field: 'related_code_session', headerName: 'Cde Session', minWidth: 150, flex: 1, hide: false, editable: false }, + { field: 'related_inscrit_email', headerName: 'Email Inscrit', minWidth: 150, flex: 1, hide: false, editable: false }, + + { + field: 'type_document', headerName: 'Type doc.', minWidth: 100, flex: 1, hide: false, editable: false, + renderCell: (cellValues) => { + return ( + + ) + }, + + }, + + { + field: 'publish_ent', headerName: 'Visible ENT', minWidth: 100, flex: 1, hide: false, editable: false, align: 'center', headerAlign: "center", + renderCell: (cellValues) => { + return (<> + {cellValues.row.publish_ent === "1" && + + + + } + modal + nested + position="center center" + > + {close => ( +
+ +
MySy Information
+
+ {' '} + + En confirmant cette opération, le document sera dépublié de l'espace ENT de l'apprenant .
+
+
+
+ + +
+
+ +
+
+
+ )} +
} + + {cellValues.row.publish_ent !== "1" && + + + + } + modal + nested + position="center center" + > + {close => ( +
+ +
MySy Information
+
+ {' '} + En confirmant cette opération, le document sera publié dans l'esapce ENT de l'apprenant .
+ +
+
+
+ + +
+
+ +
+
+
+ )} +
} + ) + }, + }, + + { + field: 'file_date_expiration', headerName: 'Expiration', minWidth: 100, flex: 1, hide: false, editable: false, + renderCell: (cellValues) => { + return (<> + {cellValues.row.file_expired === "1" && } + + {cellValues.row.file_expired !== "1" && } + ) + }, + + }, + + { + field: 'Visualiser', headerName: 'Visualiser', minWidth: 50, flex: 1, maxWidth: 100, hide: false, editable: false, + renderCell: (cellValues) => { + return ( + + ) + }, + + }, + + { + field: 'Télécharger', headerName: 'Télécharger', minWidth: 50, flex: 1, maxWidth: 100, hide: false, editable: false, + renderCell: (cellValues) => { + return ( + + ) + }, + + }, + + { + field: 'Supprimer', headerName: 'Supprimer', minWidth: 50, flex: 1, maxWidth: 100, hide: false, editable: false, + renderCell: (cellValues) => { + return ( + <> + {props && props.authorize_deletion && props.authorize_deletion === "1" && + { + // handleClick_delete(event, cellValues); + }} + > + + + } + modal + nested + position="center center" + > + {close => ( +
+ +
MySy Information
+
+ {' '} + + En confirmant cette opération, le document sera définitivement supprimé.
+ + +
+
+
+ + +
+
+ +
+
+
+ )} +
} + + {props.authorize_deletion !== "1" && } + + + + ); + } + + }, + + + /* + { + field: 'bton_vertif', headerName: 'Gestion', minWidth: 50, flex: 1, maxWidth: 100, hideable: true, hide: false, editable: false, align: "center", + renderCell: (cellValues,) => { + return ( + + + + ); + }, + },*/ + ] + + const [selected_doc_img, setselected_doc_img] = React.useState(""); function preview_document_pdf(doc_id, file_extention, file_business_object) { @@ -1138,7 +1500,7 @@ const Modules_Mes_Documents = (props) => { }).catch((error) => { console.warn('Not good man :( Get_All_Documents_With_Filter = ', error); setGet_All_Documents_With_Filter_api("false"); - // alert(" Impossible de recuperer la liste des factures"); + // alert(" Impossible de recuperer la liste des factures"); setdisplay_alert_mysy("1"); setalert_message(" Impossible de récuperer les documents "); setalert_type("error"); @@ -1315,7 +1677,7 @@ const Modules_Mes_Documents = (props) => { .catch((error) => { console.error(' Record_All_PJ Error:', error); setDelete_List_document_api("false"); - // alert(" Impossible de supprimer le document") + // alert(" Impossible de supprimer le document") setdisplay_alert_mysy("1"); setalert_message(" Impossible de supprimer le document"); @@ -1327,6 +1689,93 @@ const Modules_Mes_Documents = (props) => { } + + const [Publish_Unpublish_ENT_api, setPublish_Unpublish_ENT_api] = useState(); + const [Publish_Unpublish_ENT_result, setPublish_Unpublish_ENT_result] = useState(); + const [Publish_Unpublish_ENT_message, setPublish_Unpublish_ENT_message] = useState(); + const Publish_Unpublish_ENT = (local_tab_ids, local_publish_statut) => { + const stored_cookie = getCookie('tokenmysypart'); + + var formData = new FormData(); + + formData.append("token", stored_cookie); + formData.append("tab_document_ids", local_tab_ids); + + if (local_publish_statut === "1") { + formData.append("publish_ent", "0"); + } else { + formData.append("publish_ent", "1"); + } + + + fetch( + process.env.REACT_APP_API_URL + "myclass/api/Update_List_Stored_Downloaded_File_From_Id/", + { + 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']); + setPublish_Unpublish_ENT_result(result['message']); + setPublish_Unpublish_ENT_api("true"); + if (props.partner_client_id && props.type_document && autorized_type_document.includes(String(props.type_document)) && + props.partner_owner_recid === "") { + setmyprops_type_document(props.type_document); + setp_filtre1("filter_type_document"); + setp_filtre1_value(props.type_document); + Get_All_Documents_With_Filter(); + + + } else if (props.partner_client_id && props.type_document && String(props.type_document) === "all" && + props.partner_owner_recid === "") { + + Get_All_Documents_With_Filter(); + } + + else if (props.partner_owner_recid && props.partner_client_id === "") { + + Get_All_Documents_With_Filter(); + } + + else { + + Get_List_Of_All_PJ(); + } + + setdisplay_alert_mysy("1"); + setalert_message(result['message']); + setalert_type("success"); + + } + else { + setPublish_Unpublish_ENT_message(result['message']); + setPublish_Unpublish_ENT_api("false"); + setdisplay_alert_mysy("1"); + setalert_message(result['message']); + setalert_type("error"); + } + + }) + .catch((error) => { + console.error(' Record_All_PJ Error:', error); + setPublish_Unpublish_ENT_api("false"); + // alert(" Impossible de supprimer le document") + + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de publier ou dépublier le document"); + setalert_type("error"); + + }); + + + } + + return (
@@ -2272,7 +2721,7 @@ const Modules_Mes_Documents = (props) => { }} > - { file_date_expiration: JSON.parse(item).file_date_expiration, file_expired: JSON.parse(item).file_expired, + publish_ent: JSON.parse(item).publish_ent, + + } ))} @@ -2372,7 +2824,111 @@ const Modules_Mes_Documents = (props) => { }} - /> + />} + + {props && props.object_owner_collection && props.object_owner_collection === "inscription" && { + setSelectionModel(newSelectionModel); + /*if (newSelectionModel.length === 1) + handleClick_edit_invoice_From_Line(newSelectionModel);*/ + if (newSelectionModel.length !== 1) { + //clean_order_detail_fields(); + //setsubmenu(); + setdisplay_detail_invoice(); + } + }} + + + onRowDoubleClick={(newSelectionModel) => { + setgridline_id(newSelectionModel.row.id); + // setp_detail_header_client_nom_id(newSelectionModel.row.order_header_client_id); + // handleClick_edit_invoice_From_Line(newSelectionModel.row.id); + } + } + selectionModel={selectionModel} + + localeText={frFR.components.MuiDataGrid.defaultProps.localeText} + rows={rowss.map((item, index) => ( + { + id: index, + _id: JSON.parse(item)._id, + file_name: JSON.parse(item).file_name, + file_business_object: JSON.parse(item).file_business_object, + object_owner_collection: JSON.parse(item).object_owner_collection, + type_document: JSON.parse(item).type_document, + file_extention: JSON.parse(item).file_extention, + client_raison_sociale: JSON.parse(item).client_raison_sociale, + client_nom: JSON.parse(item).client_nom, + creation_date: JSON.parse(item).creation_date, + + related_client_nom: JSON.parse(item).related_client_nom, + related_inscrit_email: JSON.parse(item).related_inscrit_email, + related_code_session: JSON.parse(item).related_code_session, + related_ftion_external_code: JSON.parse(item).related_ftion_external_code, + is_secure_file: JSON.parse(item).is_secure_file, + + file_date_expiration: JSON.parse(item).file_date_expiration, + file_expired: JSON.parse(item).file_expired, + + publish_ent: JSON.parse(item).publish_ent, + + } + ))} + + columns={columns_for_inscrit} + pageSize={10} + className="datagridclass" + + rowsPerPageOptions={[10]} + //disableSelectionOnClick + /* components={{ + Toolbar: GridToolbar, + }}*/ + + + //sx={datagridSx} + getCellClassName={(params) => { + + }} + getRowClassName={(params) => { + + // Pour la gestion de la couleur de zone double cliquée + if (String(params.row.file_expired) === "1") { + return 'line--statut-expired'; + } + + else if (String(params.row.id) === String(gridline_id)) { + if (String(params.row.is_secure_file) === "1") + return 'line--statut--selected-secure'; + else + return 'line--statut--selected'; + } + + + else if (parseInt(String(params.row.id)) % 2 === 0) { + if (String(params.row.is_secure_file) === "1") + return 'line--statut--pair--secure'; + else + return 'line--statut--pair'; + } + else if (parseInt(String(params.row.id)) % 2 !== 0) { + if (String(params.row.is_secure_file) === "1") + return 'line--statut--impair--secure'; + else + return 'line--statut--impair'; + } + }} + + + />}
diff --git a/src/components/Student_Account_Ent.js b/src/components/Student_Account_Ent.js index c420248..2b2c0ae 100644 --- a/src/components/Student_Account_Ent.js +++ b/src/components/Student_Account_Ent.js @@ -554,7 +554,7 @@ function Student_Account_Ent() { {connected_user_data && connected_user_data.type &&
-

Espace numérique de travail de
{connected_user_data.prenom && connected_user_data.nom && {connected_user_data.prenom.charAt(0).toUpperCase() + connected_user_data.prenom.slice(1).toLocaleLowerCase()}  {connected_user_data.nom.toUpperCase()} } +

Espace numérique de travail de
{connected_user_data.prenom && connected_user_data.nom && {connected_user_data.prenom.charAt(0).toUpperCase() + connected_user_data.prenom.slice(1).toLocaleLowerCase()}  {connected_user_data.nom.toUpperCase()} }

} diff --git a/src/components/UpdateUserInfo.js b/src/components/UpdateUserInfo.js index 6291798..c6222f5 100644 --- a/src/components/UpdateUserInfo.js +++ b/src/components/UpdateUserInfo.js @@ -128,14 +128,19 @@ function UpdateUserInfo(props) { setResult(res.data.message); var mylocaltraining = JSON.parse(res.data.message); if (mylocaltraining) { - console.log(" ### mylocaltraining = ", mylocaltraining) + //console.log(" ### mylocaltraining = ", mylocaltraining) var current_apprenant_data = {} if (mylocaltraining && mylocaltraining.apprenant_data) { current_apprenant_data = mylocaltraining.apprenant_data } - console.log(" ### current_apprenant_data = ", current_apprenant_data) + setp_detail_age("?"); + if (mylocaltraining.age) { + setp_detail_age(mylocaltraining.age); + } + + //console.log(" ### current_apprenant_data = ", current_apprenant_data) setp_detail_civilite("neutre"); if (current_apprenant_data.civilite) { @@ -188,6 +193,8 @@ function UpdateUserInfo(props) { } + + setp_detail_is_rgpd(false); if (current_apprenant_data.is_rgpd && current_apprenant_data.is_rgpd === "1") { setp_detail_is_rgpd(true); @@ -294,7 +301,7 @@ function UpdateUserInfo(props) { var liste_champs = ["detail_civilite", "last_name", "filds_nom_jeune_fille", "surname", "filds_date_naissance", "mob_phone", "mail", "field_matricule", "field_ine", "field_cvec", "adr_street", "adr_zip", - "adr_city", "adr_country", "link_linkedin", "link_facebook", "link_twitter"] + "adr_city", "adr_country", "link_linkedin", "link_facebook", "link_twitter", "field_num_ss", "field_sitation_famille"] for (let i = 0; i < liste_champs.length; i++) { @@ -314,7 +321,7 @@ function UpdateUserInfo(props) { setuser_data_changed(""); var liste_champs = ["detail_civilite", "last_name", "filds_nom_jeune_fille", "surname", "filds_date_naissance", "mob_phone", - "mail", "field_matricule", "field_ine", "field_cvec", "adr_street", "adr_zip", + "field_cvec", "adr_street", "adr_zip", "adr_city", "adr_country", "link_linkedin", "link_facebook", "link_twitter"] @@ -1153,14 +1160,14 @@ function UpdateUserInfo(props) { InputLabelProps={{ shrink: true, }} - disabled={!Boolean(parseInt(user_edit_data))} + disabled={false} className="disabled_style enable_style" value={p_detail_num_secu} - onChange={(e) => { + /* onChange={(e) => { setp_detail_num_secu(e.target.value); setuser_data_changed("1"); } - } + }*/ />
@@ -1222,7 +1229,7 @@ function UpdateUserInfo(props) { }}> Situation Maritale
@@ -1519,14 +1526,14 @@ function UpdateUserInfo(props) { id="field_matricule" - disabled={true} + disabled={false} className="disabled_style enable_style" value={p_detail_matricule} - onChange={(e) => { - setp_detail_matricule(e.target.value); - setuser_data_changed("1"); - } - } + /* onChange={(e) => { + setp_detail_matricule(e.target.value); + setuser_data_changed("1"); + } + }*/ />
@@ -1542,14 +1549,14 @@ function UpdateUserInfo(props) { id="field_ine" - disabled={true} + disabled={false} className="disabled_style enable_style" value={p_detail_ine} - onChange={(e) => { - setp_detail_ine(e.target.value); - setuser_data_changed("1"); - } - } + /*onChange={(e) => { + setp_detail_ine(e.target.value); + setuser_data_changed("1"); + } + }*/ />
diff --git a/src/styles/components/_module_ent_mes_formations.scss b/src/styles/components/_module_ent_mes_formations.scss index c0656f7..634c07a 100644 --- a/src/styles/components/_module_ent_mes_formations.scss +++ b/src/styles/components/_module_ent_mes_formations.scss @@ -2378,7 +2378,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: pointer; + cursor: default; font-style: italic; background-color: gray; font-weight: normal; @@ -3211,7 +3211,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: pointer; + cursor: default; font-style: italic; background-color: gray; font-weight: normal; diff --git a/src/styles/components/_modules_mes_documents.scss b/src/styles/components/_modules_mes_documents.scss index 8bfbe2d..5e2e46e 100644 --- a/src/styles/components/_modules_mes_documents.scss +++ b/src/styles/components/_modules_mes_documents.scss @@ -71,7 +71,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: pointer; + cursor: default; font-style: italic; background-color: gray; font-weight: normal; diff --git a/src/styles/components/_signin.scss b/src/styles/components/_signin.scss index 62b739f..2fcaa88 100644 --- a/src/styles/components/_signin.scss +++ b/src/styles/components/_signin.scss @@ -11,7 +11,7 @@ .popup-reset-pwd-content { top: 10% !important; left: 2rem !important; - width: 15rem !important; + height: 15rem !important; font-family: "DMS Sans", "verdana", "Quicksand", "Signika", sans-serif !important; font-size: small !important;