From a6baa4cbfef2b0e89386b75c0728b71631f163eb Mon Sep 17 00:00:00 2001 From: Cherif Date: Wed, 25 Jun 2025 11:45:10 +0200 Subject: [PATCH] qsdq --- src/App.js | 24 +- src/components/AddClassManual.js | 464 +- src/components/AddPartnerClient.js | 115 +- src/components/Apprenant.js | 219 +- src/components/DisplayDetailClass_new_v2.js | 2 +- src/components/DisplayPartnerPromotion.js | 650 ++- src/components/DisplayPartnerSession.js | 688 ++- src/components/DisplayPartnerStagiaires.js | 332 +- .../DisplayPartnerTrainingsPagination.js | 17 +- ...play_Partner_Catalog_DetailClass_new_v2.js | 2 +- src/components/Employes.js | 840 ++-- src/components/Groupe_Apprenant.js | 244 +- src/components/HebergementLms.js | 45 +- .../Jmjformation_Catalogue_Public.js | 4063 +++++++++++++++++ src/components/Jurys.js | 277 +- src/components/Materiel_Salle.js | 383 +- src/components/Materiels.js | 236 +- src/components/Module_Absence.js | 78 +- .../Module_Session_Planification.js | 614 +-- src/components/Mon_Catalogue_Public.js | 86 +- src/components/Notes_Evaluation.js | 392 +- src/components/Partner.js | 43 +- src/components/Partner_Client.js | 110 +- src/components/Partner_Commande.js | 235 +- src/components/Partner_Facture.js | 274 +- ...play_partner_catalog_detailclass_new_v2.js | 1 - src/pages/jmjformation_catalogue_public.js | 19 + src/pages/mon_catalogue_public.js | 2 - src/styles/components/_addpartnerclient.scss | 8 +- 29 files changed, 7108 insertions(+), 3355 deletions(-) create mode 100644 src/components/Jmjformation_Catalogue_Public.js create mode 100644 src/pages/jmjformation_catalogue_public.js diff --git a/src/App.js b/src/App.js index ac8c2b4..e9d63f8 100644 --- a/src/App.js +++ b/src/App.js @@ -1,10 +1,10 @@ import React, { useState, useEffect } from "react"; -import { BrowserRouter, Switch, Route } from "react-router-dom" +import { BrowserRouter, Route, Switch, useHistory } from "react-router-dom"; + import './App.css'; import NotFound from './pages/NotFound' import Contact from './pages/Contact' import Connexion from './pages/Connexion' -import Login from './pages/Login'; import Recherche_new_v2 from "./pages/recherche_new_v2"; import Recherche_new_v3 from "./pages/recherche_new_v3"; @@ -73,9 +73,11 @@ import New_Fonctionnalite_2025 from "./pages/new_p_fonctionnalite_2025"; import New_A_Propos_2025 from "./pages/new_p_a_propos_2025"; import New_Home_Page_2025 from "./pages/new_p_home_page_2025"; +import Jmjformation_catalogue from "./pages/jmjformation_catalogue_public"; import New_Test_Header_Footer_2025 from "./pages/new_p_test_header_footer_2025"; +import img_loading_spin from "./mysy_img/mysy_spin_loading.gif"; function App() { @@ -93,9 +95,12 @@ function App() { return subdomain; }; + const history = useHistory(); + + const [isLoading, setLoading] = useState(); useEffect(() => { - + setLoading(true); let myurl = window.location.host; let myurl_pathname = window.location.pathname; @@ -118,22 +123,28 @@ function App() { var tab_action = ['/moncatalog', '/Display-Partner-Catalog-Detail-formation', 'Display-Partner-Catalog-Detail-formation', 'moncatalog']; - + if (tab_myurl_pathname.length > 0 && !tab_action.includes(tab_myurl_pathname[1]) && !tab_reserved_subdomain.includes(subdomain)) { var new_url = window.location.protocol + "//" + domain.split('.')[0] + "." + domain.split('.')[1] + "/moncatalog"; } - - } + setLoading(false); + }, []); return (
+ + {isLoading &&
+
+
} + + {/*API DEV = {process.env.REACT_APP_API_URL_DEV}
API REC = {process.env.REACT_APP_API_URL_REC}
API URL = {process.env.REACT_APP_API_URL}
@@ -245,6 +256,7 @@ function App() { + {/* Debut Migration */} diff --git a/src/components/AddClassManual.js b/src/components/AddClassManual.js index 078e07d..ee86460 100644 --- a/src/components/AddClassManual.js +++ b/src/components/AddClassManual.js @@ -221,57 +221,56 @@ const AddClassManual = (props) => { field: "delete", headerName: 'Supprimer', renderCell: (cellValues) => { return ( - - + {String(props.check_user_acces_right("formation", "write")) === "1" && + + + } + modal + nested + position="center center" > - + {close => ( +
+ +
MySy Information
+
+ {' '} - } - modal - nested - position="center center" - > - {close => ( -
- -
MySy Information
-
- {' '} - - En confirmant cette opération, l'UE définitivement supprimée de cette formation .
- -
-
-
- + En confirmant cette opération, l'UE définitivement supprimée de cette formation .
-
- + }}> Valider + +
+
+ +
-
- )} - - - + )} + } + ); } }, @@ -305,53 +304,55 @@ const AddClassManual = (props) => { renderCell: (cellValues) => { return ( - + {String(props.check_user_acces_right("formation", "write")) === "1" && + + + } + modal + nested + position="center center" > - + {close => ( +
+ +
MySy Information
+
+ {' '} - } - modal - nested - position="center center" - > - {close => ( -
- -
MySy Information
-
- {' '} - - En confirmant cette opération, la caractéristique financière sera définitivement supprimée de cette formation .
- -
-
-
- + En confirmant cette opération, la caractéristique financière sera définitivement supprimée de cette formation .
-
- + }}> Valider + +
+
+ +
-
- )} - + )} + } + ); @@ -417,55 +418,56 @@ const AddClassManual = (props) => { renderCell: (cellValues) => { return ( - + {String(props.check_user_acces_right("formation", "write")) === "1" && + + + } + modal + nested + position="center center" > - + {close => ( +
+ +
MySy Information
+
+ {' '} - } - modal - nested - position="center center" - > - {close => ( -
- -
MySy Information
-
- {' '} - - En confirmant cette opération, l'évaluation définitivement supprimée de l'UE ainsi que de la formation .
- -
-
-
- + En confirmant cette opération, l'évaluation définitivement supprimée de l'UE ainsi que de la formation .
-
- + }}> Valider + +
+
+ +
-
- )} - - + )} + } + ); } @@ -2693,8 +2695,10 @@ const AddClassManual = (props) => { }; function DataUpdated() { - setdatamodification("1"); - setimportmessage(); + if (String(props.check_user_acces_right("formation", "write")) === "1") { + setdatamodification("1"); + setimportmessage(); + } } @@ -5614,7 +5618,6 @@ const AddClassManual = (props) => { coefficient: JSON.parse(item).coefficient, seuil_validation: JSON.parse(item).seuil_validation, - duration: JSON.parse(item).duration, duration_unite: JSON.parse(item).duration_unite, duration_concat: JSON.parse(item).duration_concat, @@ -5627,21 +5630,22 @@ const AddClassManual = (props) => { className="datagridclass" onRowDoubleClick={(newSelectionModel) => { - clean_ue_data(); - setgridline_ue_id(newSelectionModel.row.id); - setselected_ue_id(newSelectionModel.row._id) + if (String(props.check_user_acces_right("formation", "write")) === "1") { + clean_ue_data(); + setgridline_ue_id(newSelectionModel.row.id); + setselected_ue_id(newSelectionModel.row._id) - var current_class_ue_data = New_Getall_Class_List_UE_result.filter((ue_data) => ue_data._id === String((newSelectionModel.row._id))) + var current_class_ue_data = New_Getall_Class_List_UE_result.filter((ue_data) => ue_data._id === String((newSelectionModel.row._id))) - // console.log(" ### current_class_ue_data[0] = ", current_class_ue_data[0]); - setselected_ue_credit_ects(current_class_ue_data[0]['credit']); - setselected_ue_is_noted(current_class_ue_data[0]['is_noted']); - setselected_ue_pres_dist_hyp(current_class_ue_data[0]['pres_dist_hyp']); - setselected_ue_coefficient(current_class_ue_data[0]['coefficient']); - setselected_ue_seuil_validation(current_class_ue_data[0]['seuil_validation']); - setadd_one_eu_to_class("0"); - - setDialog_Unite_Enseignement_open(true); + // console.log(" ### current_class_ue_data[0] = ", current_class_ue_data[0]); + setselected_ue_credit_ects(current_class_ue_data[0]['credit']); + setselected_ue_is_noted(current_class_ue_data[0]['is_noted']); + setselected_ue_pres_dist_hyp(current_class_ue_data[0]['pres_dist_hyp']); + setselected_ue_coefficient(current_class_ue_data[0]['coefficient']); + setselected_ue_seuil_validation(current_class_ue_data[0]['seuil_validation']); + setadd_one_eu_to_class("0"); + setDialog_Unite_Enseignement_open(true); + } }} @@ -5657,9 +5661,6 @@ const AddClassManual = (props) => { getCellClassName={(params) => { - - - // Pour la gestion de la couleur de zone double cliquée if (String(params.row.id) === String(ue_gridline_id)) { return 'line--statut--selected'; @@ -5706,7 +5707,7 @@ const AddClassManual = (props) => {
-
+ {String(props.check_user_acces_right("formation", "write")) === "1" &&
-
+
}
} @@ -5789,19 +5790,19 @@ const AddClassManual = (props) => { className="datagridclass" onRowDoubleClick={(newSelectionModel) => { + if (String(props.check_user_acces_right("formation", "write")) === "1") { + setadd_ue_evalution("0"); + setsetgridline_evaluation_ue_id(newSelectionModel.row.id); + setselected_eu_evalution_id(newSelectionModel.row.type_evaluation_id) + setselected_ue_id(newSelectionModel.row.class_ue_id); + setp_detail_max_note(newSelectionModel.row.max_note); + setp_detail_ponderation_type_eval(newSelectionModel.row.ponderation_type_eval); + setclass_unite_enseignement_type_evaluation_id(newSelectionModel.row._id); - setadd_ue_evalution("0"); - setsetgridline_evaluation_ue_id(newSelectionModel.row.id); - setselected_eu_evalution_id(newSelectionModel.row.type_evaluation_id) - setselected_ue_id(newSelectionModel.row.class_ue_id); - setp_detail_max_note(newSelectionModel.row.max_note); - setp_detail_ponderation_type_eval(newSelectionModel.row.ponderation_type_eval); - setclass_unite_enseignement_type_evaluation_id(newSelectionModel.row._id); - - Getall_Partner_Type_Evalution_List(); - - setDialog_Evaluation_Unite_Enseignement_open(true); + Getall_Partner_Type_Evalution_List(); + setDialog_Evaluation_Unite_Enseignement_open(true); + } }} @@ -5849,7 +5850,7 @@ const AddClassManual = (props) => {
-
+ {String(props.check_user_acces_right("formation", "write")) === "1" &&
-
+
}

@@ -5873,7 +5874,7 @@ const AddClassManual = (props) => { (data)._id === String(selected_class_note_calculation_id))[0].calcul_rule}> -
+
{ id="regle_calcul_note_formation" className="disabled_style" options={New_Get_List_Regle_Calcul_Note_Formation_result} - + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} value={New_Get_List_Regle_Calcul_Note_Formation_result.filter((data) => (data)._id === String(selected_class_note_calculation_id))[0].label} onChange={(event, value) => { if (value && value._id) { @@ -5903,7 +5904,7 @@ const AddClassManual = (props) => {
- {String(props.ispending) === String("0") &&
+ {/*String(props.ispending) === String("0") &&
{(String(datamodification) === String("1") || String(editor_tochange) === String("1")) &&
@@ -5970,7 +5971,7 @@ const AddClassManual = (props) => {
} -
} +
*/} @@ -5984,7 +5985,7 @@ const AddClassManual = (props) => {

-
+ {String(props.check_user_acces_right("formation", "write")) === "1" &&
+
} {file_1_name && file_1_name.name &&
@@ -6066,7 +6067,7 @@ const AddClassManual = (props) => { id={(JSON.parse(val).file_name)} onClick={Download_one_attached_document}> Télécharger   - Supprimer @@ -6114,7 +6115,7 @@ const AddClassManual = (props) => {
)} - + }
))} @@ -6149,10 +6150,11 @@ const AddClassManual = (props) => { required name="external_code" label="Code" + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} InputLabelProps={{ shrink: true, }} - disabled={false} + className="disabled_style" value={p_detail_external_code} @@ -6173,7 +6175,7 @@ const AddClassManual = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} className="disabled_style" value={p_detail_title} onChange={(e) => { @@ -6192,6 +6194,7 @@ const AddClassManual = (props) => { className="disabled_style" options={New_Getall_Training_Employee_No_Filter_result} value={p_formateur_label} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} onChange={(event, value) => { if (value && value._id) { setp_formateur_id(value._id); @@ -6225,6 +6228,7 @@ const AddClassManual = (props) => { className="disabled_style" options={cpf} value={mycpf_label} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} onChange={(event, value) => { if (value && value.value) { @@ -6254,6 +6258,7 @@ const AddClassManual = (props) => { className="disabled_style" options={certif} value={mycertif_label} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} onChange={(event, value) => { if (value && value.value) { @@ -6279,7 +6284,7 @@ const AddClassManual = (props) => { { className="disabled_style" options={publiee} value={mypublished_label} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} onChange={(event, value) => { if (value && value.value) { // console.log(" value = ", value); @@ -6341,7 +6347,7 @@ const AddClassManual = (props) => { { {New_Get_List_Domaines_result && New_Get_List_Domaines_result.length > 0 &&
{
{ {(!mytrainingdomaine || String(mytrainingdomaine).trim().length <= 0 || String(mytrainingdomaine).trim() === "") &&
{
{ {(!mytrainingdomaine || String(mytrainingdomaine).trim().length <= 0 || String(mytrainingdomaine).trim() === "") &&
{ {New_Getall_Parter_referentiel_padagogique_result && New_Getall_Parter_referentiel_padagogique_result.length > 0 &&
{ InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} className="disabled_style" value={p_detail_duree} onChange={(e) => { @@ -6593,6 +6599,7 @@ const AddClassManual = (props) => { name="duration_unit" id="duration_unit" className="disabled_style" + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} options={New_duration_unit_list} value={mytrainingdurationunit} onChange={(event, value) => { @@ -6621,7 +6628,7 @@ const AddClassManual = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} className="disabled_style" value={p_detail_price} onChange={(e) => { @@ -6656,7 +6663,7 @@ const AddClassManual = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} className="disabled_style" value={p_detail_url} onChange={(e) => { @@ -6674,7 +6681,7 @@ const AddClassManual = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} className="disabled_style" value={p_detail_lms_class_code} onChange={(e) => { @@ -6693,7 +6700,7 @@ const AddClassManual = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} className="disabled_style" value={p_detail_class_inscription_url} onChange={(e) => { @@ -6720,7 +6727,7 @@ const AddClassManual = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} className="disabled_style" value={p_detail_class_banner_img_url} @@ -6743,7 +6750,7 @@ const AddClassManual = (props) => { shrink: true, }} inputProps={{ min: "1", max: "5", step: "0.5" }} - disabled={false} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} className="disabled_style" value={p_detail_note} onChange={(e) => { @@ -6761,7 +6768,7 @@ const AddClassManual = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} className="disabled_style" value={p_detail_version_catalogue} onChange={(e) => { @@ -6780,7 +6787,7 @@ const AddClassManual = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} className="disabled_style" value={p_detail_recyclage_delai} onChange={(e) => { @@ -6799,7 +6806,7 @@ const AddClassManual = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} className="disabled_style" value={p_detail_recyclage_alert} onChange={(e) => { @@ -6840,7 +6847,7 @@ const AddClassManual = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} className="disabled_style" onChange={(e) => { change_champs_spec_handle(e.target.value); @@ -6857,7 +6864,7 @@ const AddClassManual = (props) => { InputLabelProps={{ shrink: true, }} - disabled={false} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} className="disabled_style" onChange={(e) => { change_champs_spec_handle(e.target.value); @@ -6929,7 +6936,7 @@ const AddClassManual = (props) => {
} - {submenu && String(submenu) === "finance" &&
+ {submenu && String(submenu) === "finance" && String(props.check_user_acces_right("formation", "write")) === "1" &&
@@ -6999,27 +7006,27 @@ const AddClassManual = (props) => { className="datagridclass" onRowDoubleClick={(newSelectionModel) => { + if (String(props.check_user_acces_right("formation", "write")) === "1") { + setfinance_data_gridline_id(newSelectionModel.row.id); + setselected_finance_data_id(newSelectionModel.row._id) - setfinance_data_gridline_id(newSelectionModel.row.id); - setselected_finance_data_id(newSelectionModel.row._id) - - var current_class_finance_data = New_Getall_Class_Finance_Caracteristic_result.filter((finance_data) => finance_data._id === String((newSelectionModel.row._id))) + var current_class_finance_data = New_Getall_Class_Finance_Caracteristic_result.filter((finance_data) => finance_data._id === String((newSelectionModel.row._id))) - // console.log(" ### current_class_ue_data = ", current_class_finance_data); - setp_detail_fin_data_code(current_class_finance_data[0]['code']); - setp_detail_fin_data_description(current_class_finance_data[0]['description']); - setp_detail_fin_data_commentaire(current_class_finance_data[0]['commentaire']); - setp_detail_fin_data_montant(current_class_finance_data[0]['montant']); - setp_detail_fin_data_type_cout(current_class_finance_data[0]['type_cout']); - if (String(current_class_finance_data[0]['inclus_calcul']) === "1") - setp_detail_fin_data_inclus_calcul(true); - else - setp_detail_fin_data_inclus_calcul(false); + // console.log(" ### current_class_ue_data = ", current_class_finance_data); + setp_detail_fin_data_code(current_class_finance_data[0]['code']); + setp_detail_fin_data_description(current_class_finance_data[0]['description']); + setp_detail_fin_data_commentaire(current_class_finance_data[0]['commentaire']); + setp_detail_fin_data_montant(current_class_finance_data[0]['montant']); + setp_detail_fin_data_type_cout(current_class_finance_data[0]['type_cout']); + if (String(current_class_finance_data[0]['inclus_calcul']) === "1") + setp_detail_fin_data_inclus_calcul(true); + else + setp_detail_fin_data_inclus_calcul(false); - setDialog_Financial_Data_open(true); - + setDialog_Financial_Data_open(true); + } }} @@ -7080,7 +7087,7 @@ const AddClassManual = (props) => {
-
+ {String(props.check_user_acces_right("formation", "write")) === "1" &&
-
+
}
@@ -7105,15 +7112,13 @@ const AddClassManual = (props) => { {submenu && String(submenu) === "detail_formation" &&
- -
+ {String(props.check_user_acces_right("formation", "write")) === "1" &&
{String(datamodification) === String("1") &&
/!\ Pensez à enregistrer les modifications
} {String(props.ispending) === String("0") &&
- {(String(datamodification) === String("1") || String(editor_tochange) === String("1")) &&
@@ -7214,7 +7219,7 @@ const AddClassManual = (props) => { {importmessage}
} -
+
} editorRef_description.current = editor} initialValue={field_description} onKeyUp={editor_keyup} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} onEditorChange={(newValue, editor) => { if (String(editor_tochange) === "1") { @@ -7281,7 +7286,7 @@ const AddClassManual = (props) => { - + {String(props.check_user_acces_right("formation", "write")) === "1" && - + }
editorRef_objectif.current = editor} initialValue={field_objectif} onKeyUp={editor_keyup} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} onEditorChange={(newValue, editor) => { if (String(editor_tochange) === "1") { //alert(" change"); @@ -7336,7 +7342,7 @@ const AddClassManual = (props) => { - + {String(props.check_user_acces_right("formation", "write")) === "1" && - + }
editorRef_programme.current = editor} initialValue={field_programme} onKeyUp={editor_keyup} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} onEditorChange={(newValue, editor) => { if (String(editor_tochange) === "1") { //alert(" change"); @@ -7394,6 +7401,7 @@ const AddClassManual = (props) => { onInit={(evt, editor) => editorRef_methode_pedago.current = editor} initialValue={field_methode_pedago} onKeyUp={editor_keyup} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} onEditorChange={(newValue, editor) => { if (String(editor_tochange) === "1") { //alert(" change"); @@ -7426,6 +7434,7 @@ const AddClassManual = (props) => { onInit={(evt, editor) => editorRef_suivi_eval.current = editor} initialValue={field_suivi_eval} onKeyUp={editor_keyup} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} onEditorChange={(newValue, editor) => { if (String(editor_tochange) === "1") { //alert(" change"); @@ -7459,6 +7468,7 @@ const AddClassManual = (props) => { onInit={(evt, editor) => editorRef_handicap.current = editor} initialValue={field_handicap} onKeyUp={editor_keyup} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} onEditorChange={(newValue, editor) => { if (String(editor_tochange) === "1") { //alert(" change"); @@ -7489,7 +7499,7 @@ const AddClassManual = (props) => { editorRef_prerequis.current = editor} initialValue={field_prerequis} onKeyUp={editor_keyup} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} onEditorChange={(newValue, editor) => { if (String(editor_tochange) === "1") { //alert(" change"); @@ -7545,6 +7556,7 @@ const AddClassManual = (props) => { onInit={(evt, editor) => editorRef_pourqui.current = editor} initialValue={field_pourqui} onKeyUp={editor_keyup} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} onEditorChange={(newValue, editor) => { if (String(editor_tochange) === "1") { //alert(" change"); @@ -7576,6 +7588,7 @@ const AddClassManual = (props) => { onInit={(evt, editor) => editorRef_mots_cle.current = editor} initialValue={field_mots_cle} onKeyUp={editor_keyup} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} onEditorChange={(newValue, editor) => { if (String(editor_tochange) === "1") { //alert(" change"); @@ -7606,7 +7619,7 @@ const AddClassManual = (props) => { - + {String(props.check_user_acces_right("formation", "write")) === "1" && - + }
editorRef_plus_produit.current = editor} initialValue={field_plus_produit} onKeyUp={editor_keyup} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} onEditorChange={(newValue, editor) => { if (String(editor_tochange) === "1") { //alert(" change"); @@ -7660,7 +7674,7 @@ const AddClassManual = (props) => { - + {String(props.check_user_acces_right("formation", "write")) === "1" && - + }
editorRef_contenu_attestation.current = editor} initialValue={field_contenu_attestation} onKeyUp={editor_keyup} + disabled={!Boolean(props.check_user_acces_right("formation", "write"))} onEditorChange={(newValue, editor) => { if (String(editor_tochange) === "1") { //alert(" change"); @@ -7842,7 +7857,7 @@ const AddClassManual = (props) => {
-
+ {String(props.check_user_acces_right("formation", "write")) === "1" &&



@@ -7850,10 +7865,10 @@ const AddClassManual = (props) => { {isimgclassdeleted && String(isimgclassdeleted) === "1" && } {isimgclassdeleted && String(isimgclassdeleted) === "0" && } {isimgclassSelected && String(isimgclassSaved) === "0" && } -
+
}
-
+ {String(props.check_user_acces_right("formation", "write")) === "1" &&
  • L'image doit etre carrée.
  • @@ -7867,7 +7882,7 @@ const AddClassManual = (props) => {
  • La taille de l'image ne doit pas dépasser 1 mega octet
  • -
    +
    }
    @@ -7965,7 +7980,6 @@ const AddClassManual = (props) => { disablePortal id="competence_nom" name="competence_nom" - fullWidth options={New_Getall_Employee_Statistic_Question_List_result} diff --git a/src/components/AddPartnerClient.js b/src/components/AddPartnerClient.js index 8ae6239..e25e0a2 100644 --- a/src/components/AddPartnerClient.js +++ b/src/components/AddPartnerClient.js @@ -353,12 +353,16 @@ const AddParnerClient = (props) => { } function DataUpdated() { - setdatamodification("1"); + if (String(props.check_user_acces_right("client", "write")) === "1") { + setdatamodification("1"); + } } function DataEditMode() { - setformedit_mode("1"); - Enable_fields(); + if (String(props.check_user_acces_right("client", "write")) === "1") { + setformedit_mode("1"); + Enable_fields(); + } } function AnnulerEdit() { @@ -371,23 +375,31 @@ const AddParnerClient = (props) => { } function DataUpdated_Invoice_Data() { - setdatamodification_invoice("1"); + if (String(props.check_user_acces_right("client", "write")) === "1") { + setdatamodification_invoice("1"); + } } function DataEditMode_Invoice_Data() { - setformedit_mode_invoice("1"); - Enable_invoice_fields(); + if (String(props.check_user_acces_right("client", "write")) === "1") { + setformedit_mode_invoice("1"); + Enable_invoice_fields(); + } } function DataUpdated_Contact_Data() { - setdatamodification_contact("1"); + if (String(props.check_user_acces_right("client", "write")) === "1") { + setdatamodification_contact("1"); + } } function DataEditMode_Contact_Data() { - setformedit_mode_contact("1"); - Enable_contact_fields(); + if (String(props.check_user_acces_right("client", "write")) === "1") { + setformedit_mode_contact("1"); + Enable_contact_fields(); + } } @@ -3301,7 +3313,7 @@ const AddParnerClient = (props) => { aria-labelledby="draggable-dialog-title" > - Gestion compte intranet + Gestion compte intranet @@ -3428,6 +3440,7 @@ const AddParnerClient = (props) => {  

    - {String(datamodification) === "1" &&
    + {String(props.check_user_acces_right("client", "write")) === "1" && String(datamodification) === "1" &&
    /!\ Pensez à enregistrer les modifications
    } - {String(formedit_mode) === "1" &&
    + {String(props.check_user_acces_right("client", "write")) === "1" && String(formedit_mode) === "1" &&
    @@ -4398,7 +4423,7 @@ const AddParnerClient = (props) => { } - {String(formedit_mode) !== "1" &&
    + {String(props.check_user_acces_right("client", "write")) === "1" && String(formedit_mode) !== "1" &&
    @@ -4633,10 +4658,10 @@ const AddParnerClient = (props) => {
    } - {String(formedit_mode_invoice) !== "1" &&
    + {String(props.check_user_acces_right("client", "write")) === "1" && String(formedit_mode_invoice) !== "1" &&
    - +
    } @@ -4646,7 +4671,7 @@ const AddParnerClient = (props) => { {String(submenu).trim() === "submenu_contact" &&
    } @@ -5109,7 +5134,7 @@ const AddParnerClient = (props) => {
    -
    + {String(props.check_user_acces_right("client", "write")) === "1" &&
    -
    +
    } {file_1_name && file_1_name.name && - Supprimer @@ -5237,7 +5262,7 @@ const AddParnerClient = (props) => {
    )} - + }
    ))} diff --git a/src/components/Apprenant.js b/src/components/Apprenant.js index ccf9773..ba381b5 100644 --- a/src/components/Apprenant.js +++ b/src/components/Apprenant.js @@ -222,7 +222,6 @@ const Apprenant = (props) => { field: "Detail", headerName: 'Voir détail', disableExport: true, renderCell: (cellValues) => { return ( - + ); } }, @@ -242,54 +242,55 @@ const Apprenant = (props) => { field: "delete", headerName: 'Supprimer', disableExport: true, renderCell: (cellValues) => { return ( + <> + {String(props.check_user_acces_right("stagiaire", "write")) === "1" && + + } + modal + nested + position="center center" > - + {close => ( +
    + +
    MySy Information
    +
    + {' '} - } - modal - nested - position="center center" - > - {close => ( -
    - -
    MySy Information
    -
    - {' '} - - En confirmant cette opération, l'apprenant sera définitivement supprimé.
    - -
    -
    -
    - + En confirmant cette opération, l'apprenant sera définitivement supprimé.
    -
    - + }}> Valider + +
    +
    + +
    -
    - )} - + )} + } + ); @@ -488,53 +489,55 @@ const Apprenant = (props) => { renderCell: (cellValues) => { return ( - + {String(props.check_user_acces_right("stagiaire", "write")) === "1" && + + + } + modal + nested + position="center center" > - + {close => ( +
    + +
    MySy Information
    +
    + {' '} - } - modal - nested - position="center center" - > - {close => ( -
    - -
    MySy Information
    -
    - {' '} - - En confirmant cette opération, le suivi pédagogique sera définitivement supprimé.
    - -
    -
    -
    - + En confirmant cette opération, le suivi pédagogique sera définitivement supprimé.
    -
    - + }}> Valider + +
    +
    + +
    -
    - )} - + )} + } + ); @@ -655,7 +658,7 @@ const Apprenant = (props) => { const [p_detail_email, setp_detail_email] = useState(""); const [p_detail_naissance, setp_detail_naissance] = useState(new Date().toLocaleDateString('fr-FR')); - const [p_detail_is_ent_compte, setp_detail_is_ent_compte] = useState(""); + const [p_detail_is_ent_compte, setp_detail_is_ent_compte] = useState(""); // ajout 04/06/2025 const [p_detail_is_handicap, setp_detail_is_handicap] = useState(false); @@ -843,7 +846,7 @@ const Apprenant = (props) => { setp_detail_civilite(""); } - if (mylocaltraining.is_ent_compte) { + if (mylocaltraining.is_ent_compte) { setp_detail_is_ent_compte(mylocaltraining.is_ent_compte); } else { setp_detail_is_ent_compte(""); @@ -7248,7 +7251,7 @@ const Apprenant = (props) => { employeur: JSON.parse(item).employeur, client_nom: JSON.parse(item).client_rattachement_nom, - is_ent_compte: JSON.parse(item).is_ent_compte, + is_ent_compte: JSON.parse(item).is_ent_compte, } @@ -7333,7 +7336,7 @@ const Apprenant = (props) => {
    - {selectionModel && selectionModel.length >= 1 &&
    + {String(props.check_user_acces_right("stagiaire", "write")) === "1" && selectionModel && selectionModel.length >= 1 && } - {String(add_One_Apprenant) === "1" &&
    + {String(props.check_user_acces_right("stagiaire", "write")) === "1" && String(add_One_Apprenant) === "1" &&
    {} - {
    @@ -9260,7 +9263,7 @@ const Apprenant = (props) => {
    - {String(apprenant_data_edit_mode) !== "1" &&
    + {String(props.check_user_acces_right("stagiaire", "write")) === "1" && String(apprenant_data_edit_mode) !== "1" &&
    @@ -9417,11 +9420,11 @@ const Apprenant = (props) => { - + }
    @@ -9439,7 +9442,9 @@ const Apprenant = (props) => { inscription_id={selected_apprenant_id} related_collection={"apprenant"} read_access={props.read_access} - write_access={props.write_access} /> + write_access={props.write_access} + check_user_acces_right={props.check_user_acces_right} + origin={"apprenant"} />
    } {String(display_detail_historique) === "1" && String(add_One_Apprenant) !== "1" && selected_apprenant_id &&
    @@ -9452,7 +9457,7 @@ const Apprenant = (props) => {
    -
    + {String(props.check_user_acces_right("stagiaire", "write")) === "1" &&
    -
    +
    } {file_1_name && file_1_name.name && @@ -9576,7 +9581,7 @@ const Apprenant = (props) => {
    )} - + }
    ))} @@ -9726,11 +9731,11 @@ const Apprenant = (props) => { - + }
    @@ -10496,7 +10501,7 @@ const Apprenant = (props) => {
    - {String(given_suivi_ped_data_edit_mode) !== "1" &&
    + {String(props.check_user_acces_right("stagiaire", "write")) === "1" && String(given_suivi_ped_data_edit_mode) !== "1" &&
    diff --git a/src/components/DisplayDetailClass_new_v2.js b/src/components/DisplayDetailClass_new_v2.js index 380942e..38d6300 100644 --- a/src/components/DisplayDetailClass_new_v2.js +++ b/src/components/DisplayDetailClass_new_v2.js @@ -576,7 +576,7 @@ const DisplayDetailClass_new_v2 = (props) => { //console.log(" ON PASSE  au MIN"); var local_tmp_val = 2100 + decalage_pr_certificat; var local_main_h_px = 4800 + decalage_pr_certificat; - + local_tmp = local_tmp_val + "px"; main_h_px = local_main_h_px + "px"; diff --git a/src/components/DisplayPartnerPromotion.js b/src/components/DisplayPartnerPromotion.js index 4511746..0dd02bf 100644 --- a/src/components/DisplayPartnerPromotion.js +++ b/src/components/DisplayPartnerPromotion.js @@ -432,89 +432,14 @@ const DisplayPartnerPromotion = (props) => { }, { field: 'duration', headerName: 'Durée', minWidth: datagrid_columns_size_model2, align: "center", hide: true, renderCell: (params) => , }, - /* { - field: "Detail", headerName: 'Voir détail', disableExport: true, - renderCell: (cellValues) => { - return ( - - ); - } - },*/ - /* { - field: "delete", headerName: 'Supprimer', disableExport: true, - renderCell: (cellValues) => { - return ( - - { - //handleClick_delete_Session_Formation(event, cellValues); - }} - > - - - } - modal - nested - position="center center" - > - {close => ( -
    - -
    MySy Information
    -
    - {' '} - - En confirmant cette opération, la promotion de formation sera définitivement supprimée.
    - -
    -
    -
    - - -
    -
    - -
    -
    -
    - )} -
    - - - ); - } - },*/ { field: 'bton_vertif', headerName: 'Gestion', minWidth: 50, flex: 1, maxWidth: 100, hideable: true, hide: false, editable: false, align: "center", renderCell: (cellValues) => { return (
    - }
    ); }, @@ -850,54 +775,57 @@ const DisplayPartnerPromotion = (props) => { renderCell: (cellValues) => { return ( - + {String(props.check_user_acces_right("session", "write")) === "1" && { - handleClick_accept(event, cellValues); - }} + onClick={(event) => { + handleClick_accept(event, cellValues); + }} + > + + + } + modal + nested + position="center center" > - - - } - modal - nested - position="center center" - > - {close => ( -
    - -
    MySy Information
    -
    - {' '} - - Confirmer la mise à jour des informations du stagiaire -
    -
    -
    - + {close => ( +
    + +
    MySy Information
    +
    + {' '} + Confirmer la mise à jour des informations du stagiaire
    -
    - + }}> Valider + +
    +
    + +
    -
    - )} - + )} + } + + ); } @@ -910,7 +838,7 @@ const DisplayPartnerPromotion = (props) => { return (
    - }
    ); @@ -1377,36 +1305,38 @@ const DisplayPartnerPromotion = (props) => { field: "split_invoice", headerName: 'Eclat. Fact', renderCell: (cellValues) => { return ( - + } + ); @@ -1421,7 +1351,7 @@ const DisplayPartnerPromotion = (props) => { return (
    - }
    ); @@ -1768,22 +1698,24 @@ const DisplayPartnerPromotion = (props) => { renderCell: (cellValues) => { return ( - + } + ); } @@ -1854,40 +1786,42 @@ const DisplayPartnerPromotion = (props) => { renderCell: (cellValues) => { return ( - + } + ); } @@ -1898,31 +1832,33 @@ const DisplayPartnerPromotion = (props) => { renderCell: (cellValues) => { return ( - + } + ); } @@ -1933,56 +1869,59 @@ const DisplayPartnerPromotion = (props) => { renderCell: (cellValues) => { return ( - + {String(props.check_user_acces_right("session", "write")) === "1" && { + onClick={(event) => { - }} + }} + > + + + } + modal + nested + position="center center" > - + {close => ( +
    + +
    MySy Information
    +
    + {' '} - } - modal - nested - position="center center" - > - {close => ( -
    - -
    MySy Information
    -
    - {' '} - - En confirmant cette opération, la séquence sera définitivement supprimée.
    - -
    -
    -
    - + En confirmant cette opération, la séquence sera définitivement supprimée.
    -
    - + }}> Valider + +
    +
    + +
    -
    - )} - + )} + } + + ); @@ -2007,57 +1946,60 @@ const DisplayPartnerPromotion = (props) => { renderCell: (cellValues) => { return ( - + {String(props.check_user_acces_right("session", "write")) === "1" && { + onClick={(event) => { - }} + }} + > + + + } + modal + nested + position="center center" > - + {close => ( +
    + +
    MySy Information
    +
    + {' '} - } - modal - nested - position="center center" - > - {close => ( -
    - -
    MySy Information
    -
    - {' '} - - En confirmant cette opération, la ressource sera définitivement supprimée.
    - -
    -
    -
    - + En confirmant cette opération, la ressource sera définitivement supprimée.
    -
    - + }}> Valider + +
    +
    + +
    -
    - )} - + )} + } + + ); @@ -2095,53 +2037,56 @@ const DisplayPartnerPromotion = (props) => { renderCell: (cellValues) => { return ( - + {String(props.check_user_acces_right("session", "write")) === "1" && + + + } + modal + nested + position="center center" > - + {close => ( +
    + +
    MySy Information
    +
    + {' '} - } - modal - nested - position="center center" - > - {close => ( -
    - -
    MySy Information
    -
    - {' '} - - En confirmant cette opération, la caractéristique financière sera définitivement supprimée de cette formation .
    - -
    -
    -
    - + En confirmant cette opération, la caractéristique financière sera définitivement supprimée de cette formation .
    -
    - + }}> Valider + +
    +
    + +
    -
    - )} - + )} + } + + ); @@ -6909,7 +6854,7 @@ const DisplayPartnerPromotion = (props) => { setalert_type("success"); - if (document.getElementById('myRef_head')) { + if (document.getElementById('myRef_head')) { var divh = document.getElementById('myRef_head').offsetTop; window.scrollTo({ @@ -20784,7 +20729,7 @@ const DisplayPartnerPromotion = (props) => {
    - {selectionModel && selectionModel.length >= 1 &&
    + {String(props.check_user_acces_right("session", "write")) === "1" && selectionModel && selectionModel.length >= 1 &&
      { - - - {/**/} - - - - + {String(props.check_user_acces_right("session", "write")) === "1" && + } + + {String(props.check_user_acces_right("session", "write")) === "1" && + } + {/**/} + {String(props.check_user_acces_right("session", "write")) === "1" && } + {String(props.check_user_acces_right("session", "write")) === "1" && } + + {String(props.check_user_acces_right("session", "write")) === "1" && } + {String(props.check_user_acces_right("session", "write")) === "1" && } - {String(props.formation_initiale) === "1" && } + {String(props.check_user_acces_right("session", "write")) === "1" && String(props.formation_initiale) === "1" && } @@ -21981,7 +21930,7 @@ const DisplayPartnerPromotion = (props) => { /!\ Pensez à enregistrer les modifications
    } - {
    + {String(props.check_user_acces_right("session", "write")) === "1" &&
    @@ -22865,7 +22814,7 @@ const DisplayPartnerPromotion = (props) => { - {selectionModel_sequence && selectionModel_sequence.length > 1 && + {String(props.check_user_acces_right("session", "write")) === "1" && selectionModel_sequence && selectionModel_sequence.length > 1 &&
      - - - -  */} + {

    -
    + {String(props.check_user_acces_right("session", "write")) === "1" &&
    +
    } @@ -26768,7 +26710,7 @@ const DisplayPartnerPromotion = (props) => { {Get_List_Of_All_PJ_For_Session_result && Get_List_Of_All_PJ_For_Session_result.map((val) => (

    - Supprimer @@ -26816,7 +26758,7 @@ const DisplayPartnerPromotion = (props) => {
    )} - + }
    ))} diff --git a/src/components/DisplayPartnerSession.js b/src/components/DisplayPartnerSession.js index 581cb1a..f11aa72 100644 --- a/src/components/DisplayPartnerSession.js +++ b/src/components/DisplayPartnerSession.js @@ -432,89 +432,13 @@ const DisplayPartnerSession = (props) => { }, { field: 'duration', headerName: 'Durée', minWidth: datagrid_columns_size_model2, align: "center", hide: true, renderCell: (params) => , }, - /* { - field: "Detail", headerName: 'Voir détail', disableExport: true, - renderCell: (cellValues) => { - return ( - - ); - } - },*/ - /* { - field: "delete", headerName: 'Supprimer', disableExport: true, - renderCell: (cellValues) => { - return ( - - { - //handleClick_delete_Session_Formation(event, cellValues); - }} - > - - - } - modal - nested - position="center center" - > - {close => ( -
    - -
    MySy Information
    -
    - {' '} - - En confirmant cette opération, la promotion de formation sera définitivement supprimée.
    - -
    -
    -
    - - -
    -
    - -
    -
    -
    - )} -
    - - - ); - } - },*/ { field: 'bton_vertif', headerName: 'Gestion', minWidth: 50, flex: 1, maxWidth: 100, hideable: true, hide: false, editable: false, align: "center", renderCell: (cellValues) => { return (
    - -
    )} - + }
    ))} @@ -26857,6 +26783,8 @@ const DisplayPartnerSession = (props) => { related_collection_recid={selected_session_id} SessionstartDate={new Date(moment(SessionstartDate, "DD/MM/YYYY"))} SessionendDate={new Date(moment(SessionendDate, "DD/MM/YYYY"))} selected_session_invoiced_statut={selected_session_invoiced_statut} session_class_id={session_selected_class_id} + check_user_acces_right={props.check_user_acces_right} + origin={"session"} />
    } @@ -26868,7 +26796,11 @@ const DisplayPartnerSession = (props) => { related_collection_recid={selected_session_id} SessionstartDate={new Date(moment(SessionstartDate, "DD/MM/YYYY"))} SessionendDate={new Date(moment(SessionendDate, "DD/MM/YYYY"))} session_formateur_id={p_formateur_id} session_class_id={session_selected_class_id} - selected_session_invoiced_statut={selected_session_invoiced_statut} /> + selected_session_invoiced_statut={selected_session_invoiced_statut} + check_user_acces_right={props.check_user_acces_right} + origin={"session"} + /> +
    } @@ -26880,7 +26812,11 @@ const DisplayPartnerSession = (props) => { session_class_id={session_selected_class_id} selected_session_invoiced_statut={selected_session_invoiced_statut} jury_cell_editable={false} - jury_id={""} /> + jury_id={""} + check_user_acces_right={props.check_user_acces_right} + origin={"session"} + /> +
    } diff --git a/src/components/DisplayPartnerStagiaires.js b/src/components/DisplayPartnerStagiaires.js index 9c879e4..b696e3a 100644 --- a/src/components/DisplayPartnerStagiaires.js +++ b/src/components/DisplayPartnerStagiaires.js @@ -8,8 +8,6 @@ import { getCookie, setCookie } from 'react-use-cookie'; import AttachFileIcon from '@mui/icons-material/AttachFile'; import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid'; import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css"; -import { Editor } from '@tinymce/tinymce-react'; -import { IoShareSocialOutline } from "react-icons/io5"; import 'react-tooltip/dist/react-tooltip.css' import { Tooltip } from 'react-tooltip' import add_plus from "../mysy_img/plus.png"; @@ -321,116 +319,117 @@ const DisplayPartnerStagiaires = (props) => { renderCell: (cellValues) => { return ( -