diff --git a/src/components/DisplayPartnerStagiaires.js b/src/components/DisplayPartnerStagiaires.js index eb4fdd4..1b6ab0d 100644 --- a/src/components/DisplayPartnerStagiaires.js +++ b/src/components/DisplayPartnerStagiaires.js @@ -1234,6 +1234,59 @@ const DisplayPartnerStagiaires = (props) => { } + const [Getall_TrainingParticipant_Light_api, setGetall_TrainingParticipant_Light_api] = useState(); + const [Getall_TrainingParticipant_Light_message, setGetall_TrainingParticipant_Light_message] = useState(); + const [Getall_TrainingParticipant_Light_result, setGetall_TrainingParticipant_Light_result] = useState([]); + function Getall_TrainingParticipant_Light(event) { + + setloading_datagrid(true); + setSelectionModel([]); + + var form = new FormData(); + + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + + //console.log(" ### Getall_TrainingParticipant_Light form = ", form) + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Statgaire_List_Partner_with_filter_light/"; + + + setLoading(true); + axios.post(myurl, form).then(res => { + + setLoading(false); + if (String(res.data.status) === String("true")) { + setloading_datagrid(false); + //console.log(" In Getall_TrainingParticipant_Light res.data.status = " + res.data.status); + //console.log(" In Getall_TrainingParticipant_Light res.data.message r_class = " + res.data.message); + setGetall_TrainingParticipant_Light_api("true"); + setGetall_TrainingParticipant_Light_result(res.data.message); + setRows(res.data.message); + + + } + else { + setloading_datagrid(false); + setGetall_TrainingParticipant_Light_api("false"); + setGetall_TrainingParticipant_Light_message(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); + } + + }).catch((error) => { + setloading_datagrid(false); + setLoading(false); + console.warn('Not good man :( Getall_TrainingParticipant_Light = ', error); + setGetall_TrainingParticipant_Light_api("false"); + alert(" Impossible de recuperer la liste des stagiaires") + //setmyApimyApiMessage("") + }) + } + function Getall_TrainingParticpant_no_filter(event) { setloading_datagrid(true); @@ -3473,7 +3526,10 @@ const DisplayPartnerStagiaires = (props) => { sethistory_securite_read(props.check_user_acces_right("historique", "read")) - Getall_TrainingParticipant(); + Getall_TrainingParticipant(); + + //Getall_TrainingParticipant_Light(); + Getall_TrainingSession(); Get_List_Partner_Clients(); GetCurrentPartnerClass(); @@ -10596,10 +10652,10 @@ const DisplayPartnerStagiaires = (props) => { } },*/ "& .MuiDataGrid-columnHeaders": { - backgroundColor: "#dfe8f2", - color: "#0a2a4d", - fontSize: '14px', - fontFamily:'DM Sans', + backgroundColor: "#dfe8f2", + color: "#0a2a4d", + fontSize: '14px', + fontFamily: 'DM Sans', }, @@ -10831,10 +10887,10 @@ const DisplayPartnerStagiaires = (props) => { } },*/ "& .MuiDataGrid-columnHeaders": { - backgroundColor: "#dfe8f2", - color: "#0a2a4d", - fontSize: '14px', - fontFamily:'DM Sans', + backgroundColor: "#dfe8f2", + color: "#0a2a4d", + fontSize: '14px', + fontFamily: 'DM Sans', }, @@ -11728,7 +11784,7 @@ const DisplayPartnerStagiaires = (props) => { {/* -- début champs specifiques **/} - + {rows_champs_specifics && rows_champs_specifics.length > 0 &&
Vos champs spécifiques
@@ -14323,10 +14379,10 @@ const DisplayPartnerStagiaires = (props) => { "& .MuiDataGrid-columnHeaders": { - backgroundColor: "#dfe8f2", - color: "#0a2a4d", - fontSize: '14px', - fontFamily:'DM Sans', + backgroundColor: "#dfe8f2", + color: "#0a2a4d", + fontSize: '14px', + fontFamily: 'DM Sans', }, @@ -14726,9 +14782,9 @@ const DisplayPartnerStagiaires = (props) => { },*/ "& .MuiDataGrid-columnHeaders": { backgroundColor: "#dfe8f2", - color: "#0a2a4d", - fontSize: '14px', - fontFamily:'DM Sans', + color: "#0a2a4d", + fontSize: '14px', + fontFamily: 'DM Sans', }, @@ -14870,9 +14926,9 @@ const DisplayPartnerStagiaires = (props) => { },*/ "& .MuiDataGrid-columnHeaders": { backgroundColor: "#dfe8f2", - color: "#0a2a4d", - fontSize: '14px', - fontFamily:'DM Sans', + color: "#0a2a4d", + fontSize: '14px', + fontFamily: 'DM Sans', }, diff --git a/src/components/Employes.js b/src/components/Employes.js index 38c9f87..45028dc 100644 --- a/src/components/Employes.js +++ b/src/components/Employes.js @@ -183,7 +183,6 @@ const Employes = (props) => { - const columns = [ { field: '_id', headerName: '_id', hide: true, Width: 0, disableExport: true, }, { field: 'id', headerName: 'id', hide: true, Width: 0, disableExport: true, }, @@ -203,7 +202,22 @@ const Employes = (props) => { { field: 'nom', headerName: 'Nom', flex: 1, hide: false, minWidth: 180, renderCell: (params) => , }, { field: 'prenom', headerName: 'Prénom', flex: 1, hide: false, minWidth: 180, renderCell: (params) => , }, { field: 'email', headerName: 'Email', minWidth: 300, flex: 1, renderCell: (params) => , }, - { field: 'user_login', headerName: 'Login', minWidth: 200, flex: 1, renderCell: (params) => , }, + + { + field: 'user_login', headerName: 'Login', maxWidth: 350, flex: 1, hide: false, editable: false, + renderCell: (cellValues) => { + return ( +
+ {cellValues.row.user_login && cellValues.row.user_login.length > 4 && "Oui"} + {!cellValues.row.user_login || cellValues.row.user_login.length <= 4 && "Non"} + +
+ + ); + } + + }, + { field: 'ismanager', headerName: 'Manager', width: 150, hide: false, valueFormatter: (params) => { @@ -216,17 +230,17 @@ const Employes = (props) => { return String(params.value); }, }, - { field: 'telephone_mobile', headerName: 'Mobile', width: 150, hide: false, }, + { field: 'telephone_mobile', headerName: 'Mobile', minWidth: 180, hide: false, }, { field: 'adr_adresse', headerName: 'Adresse', width: 100, hide: true, editable: false, minWidth: 50, maxWidth: 70, flex: 1 }, - { field: 'adr_code_postal', headerName: 'Code Postal', width: 100, hide: false, editable: false, minWidth: 50, maxWidth: 70, flex: 1 }, - { field: 'adr_ville', headerName: 'Ville', width: 100, hide: false, editable: false, minWidth: 50, maxWidth: 70, flex: 1 }, + { field: 'adr_code_postal', headerName: 'Code Postal', width: 100, hide: true, editable: false, minWidth: 50, maxWidth: 70, flex: 1 }, + { field: 'adr_ville', headerName: 'Ville', width: 100, hide: true, editable: false, minWidth: 50, maxWidth: 70, flex: 1 }, { field: 'adr_pays', headerName: 'Pays', width: 100, hide: true, editable: false, minWidth: 50, maxWidth: 70, flex: 1 }, - { field: 'profil', headerName: 'profil', width: 150, hide: false, }, - { field: 'fonction', headerName: 'Fonction', width: 150, hide: false, }, + { field: 'profil', headerName: 'profil', width: 150, hide: true, }, + { field: 'fonction', headerName: 'Fonction', width: 150, hide: true, }, { field: "Detail", headerName: 'Voir détail', @@ -389,40 +403,21 @@ const Employes = (props) => { const columns_employee_acces_right = [ - { field: '_id', headerName: '_id', hide: true }, - { field: 'id', headerName: 'id', hide: true }, - { field: 'module', headerName: 'Module', flex: 1, }, + { field: '_id', headerName: '_id', hide: true, disableExport: true, }, + { field: 'id', headerName: 'id', hide: true, disableExport: true, }, + { field: 'module', headerName: 'Module', flex: 1, hide: true, renderCell: (params) => , }, + { field: 'module_description', headerName: 'Description', flex: 1, renderCell: (params) => , }, { - field: 'read', headerName: 'Lecture', width: 150, hide: false, editable: true, type: 'boolean', + field: 'read', headerName: 'Lecture', width: 250, hide: false, editable: true, type: 'boolean', }, { - field: 'write', headerName: 'Modification', width: 150, hide: false, editable: true, type: 'boolean', + field: 'write', headerName: 'Modification', width: 250, hide: false, editable: true, type: 'boolean', }, ] - const columns_employee_acces_right_v2 = [ - { field: '_id', headerName: '_id', hide: true }, - { field: 'id', headerName: 'id', hide: true }, - { field: 'module', headerName: 'Module', flex: 1, }, - { - field: 'read', headerName: 'Lecture', width: 150, hide: false, editable: true, type: 'boolean', - }, - - { - field: "write", - headername: "write", - rendercell: (params) => ( - handleconfirmchange(params.row.rowid)} - /> - ) - } - - ] const columns_employee_contrat = [ { field: '_id', headerName: '_id', hide: true }, @@ -601,15 +596,16 @@ const Employes = (props) => { const columns_employee_acces_right_disabled = [ - { field: '_id', headerName: '_id', hide: true }, - { field: 'id', headerName: 'id', hide: true }, - { field: 'module', headerName: 'Module', flex: 1, }, + { field: '_id', headerName: '_id', hide: true, disableExport: true, }, + { field: 'id', headerName: 'id', hide: true, disableExport: true, }, + { field: 'module', headerName: 'Module', flex: 1, hide: true, renderCell: (params) => , }, + { field: 'module_description', headerName: 'Description', flex: 1, renderCell: (params) => , }, { - field: 'read', headerName: 'Lecture', width: 150, hide: false, editable: false, type: 'boolean', + field: 'read', headerName: 'Lecture', width: 250, hide: false, editable: false, type: 'boolean', }, { - field: 'write', headerName: 'Modification', width: 150, hide: false, editable: false, type: 'boolean', + field: 'write', headerName: 'Modification', width: 250, hide: false, editable: false, type: 'boolean', }, @@ -661,12 +657,8 @@ const Employes = (props) => { form.append("token", stored_cookie); form.append("user_id", local_employe_id); - - var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Matrix_Acces_Right/"; - - axios.post(myurl, form).then(res => { if (String(res.data.status) === String("true")) { @@ -4676,7 +4668,6 @@ const Employes = (props) => { function OnchangeCellDataGrid(params) { - var num_line = params.id; var colomn = params.field; var new_value = params.value; @@ -4691,8 +4682,10 @@ const Employes = (props) => { const updatedData = rows_acces_right.map((x) => { + var localid = JSON.parse(x).id; var local_id = JSON.parse(x)._id; + var local_module_description = JSON.parse(x).module_description; var local_write_txt = JSON.parse(x).write; @@ -4708,10 +4701,10 @@ const Employes = (props) => { if (JSON.parse(x).module_name === module_nom && module_acces === "read") { - return '{"_id": "' + local_id + '", "module_name": "' + module_nom + '", "valide": "1", "locked": "0", "id": "' + localid + '", "read": ' + new_value + ', "write": ' + local_write + '}'; + return '{"_id": "' + local_id + '", "module_name": "' + module_nom + '", "module_description":"' + local_module_description + '", "valide": "1", "locked": "0", "id": "' + localid + '", "read": ' + new_value + ', "write": ' + local_write + '}'; } if (JSON.parse(x).module_name === module_nom && module_acces === "write") { - return '{"_id": "' + local_id + '", "module_name": "' + module_nom + '", "valide": "1", "locked": "0", "id": "' + localid + '", "read": ' + local_read + ', "write": ' + new_value + '}'; + return '{"_id": "' + local_id + '", "module_name": "' + module_nom + '", "module_description":"' + local_module_description + '", "valide": "1", "locked": "0", "id": "' + localid + '", "read": ' + local_read + ', "write": ' + new_value + '}'; } return x; @@ -9307,10 +9300,10 @@ const Employes = (props) => { } },*/ "& .MuiDataGrid-columnHeaders": { - backgroundColor: "#dfe8f2", - color: "#0a2a4d", - fontSize: '14px', - fontFamily:'DM Sans', + backgroundColor: "#dfe8f2", + color: "#0a2a4d", + fontSize: '14px', + fontFamily: 'DM Sans', }, '& .line--statut--selected': { @@ -9382,6 +9375,8 @@ const Employes = (props) => { setgridline_id(newSelectionModel.row.id); setp_detail_civilite(newSelectionModel.row.civilite); + Disable_acces_right_datagrid(); + if (newSelectionModel.row.date_naissance) { var local_date_naissance = newSelectionModel.row.date_naissance; @@ -9541,7 +9536,7 @@ const Employes = (props) => { {String(submenu) === "detail_employe" && String(add_One_Employee) !== "1" &&
- +
@@ -11214,7 +11209,7 @@ const Employes = (props) => { {String(submenu) === "affectation" &&
- +
@@ -11226,10 +11221,10 @@ const Employes = (props) => { width: '100%', paddingRight: '1px', "& .MuiDataGrid-columnHeaders": { - backgroundColor: "#dfe8f2", - color: "#0a2a4d", - fontSize: '14px', - fontFamily:'DM Sans', + backgroundColor: "#dfe8f2", + color: "#0a2a4d", + fontSize: '14px', + fontFamily: 'DM Sans', }, @@ -11307,7 +11302,7 @@ const Employes = (props) => { {String(display_affectation) === "1" &&
- +
Poste Occupé
@@ -11529,7 +11524,7 @@ const Employes = (props) => { {String(Affectation_data_changed) === "1" && String(edite_affectation_form) === "1" &&
-
} @@ -11566,7 +11561,7 @@ const Employes = (props) => { {String(Add_new_affectation) === "1" &&
- +
Poste Occupé
@@ -11742,13 +11737,13 @@ const Employes = (props) => { {String(submenu) === "droit_acces" &&
- +
Profil utilisateur
- { //className="disabled_style enable_style" disabled={!Boolean(acces_right_data_edit_mode)} options={New_Get_List_RH_Profils_result} + style={{ height: 'unset' }} onChange={(event, value) => { if (value && value.nom) { setp_user_profil_tmp(value.nom); @@ -11770,7 +11766,27 @@ const Employes = (props) => { /> } - /> + />} + + {acces_right_data_edit_mode !== "1" && + + + + + + }
@@ -11788,10 +11804,10 @@ const Employes = (props) => { width: '100%', paddingRight: '1px', "& .MuiDataGrid-columnHeaders": { - backgroundColor: "#dfe8f2", - color: "#0a2a4d", - fontSize: '14px', - fontFamily:'DM Sans', + backgroundColor: "#dfe8f2", + color: "#0a2a4d", + fontSize: '14px', + fontFamily: 'DM Sans', }, }} > @@ -11825,6 +11841,7 @@ const Employes = (props) => { _id: JSON.parse(item)._id, poste: JSON.parse(item).poste, module: JSON.parse(item).module_name, + module_description: JSON.parse(item).module_description, read: JSON.parse(item).read, write: JSON.parse(item).write, @@ -11860,10 +11877,10 @@ const Employes = (props) => { width: '100%', paddingRight: '1px', "& .MuiDataGrid-columnHeaders": { - backgroundColor: "#dfe8f2", - color: "#0a2a4d", - fontSize: '14px', - fontFamily:'DM Sans', + backgroundColor: "#dfe8f2", + color: "#0a2a4d", + fontSize: '14px', + fontFamily: 'DM Sans', }, }} > @@ -11894,7 +11911,7 @@ const Employes = (props) => { module: JSON.parse(item).module_name, read: JSON.parse(item).read, write: JSON.parse(item).write, - + module_description: JSON.parse(item).module_description, } ))} @@ -11931,7 +11948,7 @@ const Employes = (props) => { {String(acces_right_data_changed) === "1" && String(acces_right_data_edit_mode) === "1" &&
-
} @@ -11958,11 +11975,11 @@ const Employes = (props) => {  
-
+
- + {New_GetCurrentPartnerClass_result && New_GetCurrentPartnerClass_result.length > 0 &&
Liste formations
@@ -12066,7 +12083,7 @@ const Employes = (props) => {
} {String(submenu) === "contrat" &&
- +  
@@ -12178,7 +12195,7 @@ const Employes = (props) => { {String(submenu) === "piece_jointe" &&
- +

@@ -12340,7 +12357,7 @@ const Employes = (props) => { {String(submenu) === "tutorat" &&
- + { {String(submenu) === "competence" &&
- +

@@ -12422,13 +12439,13 @@ const Employes = (props) => { {String(submenu) === "evaluation" &&
- +
-
{p_detail_prenom}   {p_detail_nom} : Evaluation par les apprenants
- Evaluation
+
Evaluation par les apprenants
+
{
-
{p_detail_prenom}   {p_detail_nom} : Suivi pédagoqigue
- - +
Suivi pédagoqigue
@@ -12790,7 +12805,7 @@ const Employes = (props) => { {String(add_one_suivi_ped) === "1" && String(display_given_suivi_ped) !== "1" &&
- +
Sujet
@@ -12930,7 +12945,7 @@ const Employes = (props) => {
} {String(add_one_suivi_ped) !== "1" && String(display_given_suivi_ped) === "1" &&
- + {String(given_suivi_ped_data_edit_mode) !== "1" &&
@@ -13248,7 +13263,7 @@ const Employes = (props) => { {String(given_suivi_ped_data_edit_mode) === "1" &&
-
} @@ -13289,7 +13304,7 @@ const Employes = (props) => { {String(submenu) === "statistiques" &&
- + diff --git a/src/components/Module_Pole_Actvitie_Pedagogique.js b/src/components/Module_Pole_Actvitie_Pedagogique.js index c149736..499c9d4 100644 --- a/src/components/Module_Pole_Actvitie_Pedagogique.js +++ b/src/components/Module_Pole_Actvitie_Pedagogique.js @@ -287,6 +287,85 @@ const Module_Pole_Actvitie_Pedagogique = (props) => { ] + const column_competence_with_activite = [ + { field: 'mysy_single_field', headerName: 'mysy_single_field', hide: true, Width: 0, disableExport: true, }, + { field: 'id', headerName: 'id', hide: true, Width: 0, disableExport: true, }, + { field: 'activite_pedagogique_id', headerName: 'activite_pedagogique_id', hide: true, Width: 0, disableExport: true, }, + { field: 'competence_id', headerName: 'competence_id', hide: true, Width: 0, disableExport: true, }, + { field: 'activite_pedagogique_description', headerName: 'activite_pedagogique_description', hide: true, Width: 0, disableExport: true, }, + + { field: 'activite_pedagogique_code', headerName: 'Activite pédago.', flex: 1, hide: false, maxWidth: 250, renderCell: (params) => , }, + { field: 'competence_code', headerName: 'Competence code', flex: 1, hide: false, maxWidth: 250, renderCell: (params) => , }, + { field: 'competence_description', headerName: 'Competence description', flex: 1, hide: false, minWidth: 200, renderCell: (params) => , }, + + + { + field: "delete", headerName: 'Supprimer', + renderCell: (cellValues) => { + return ( + <> + { + // handleClick_delete(event, cellValues); + }} + > + + + } + modal + nested + position="center center" + > + {close => ( +
+ +
MySy Information
+
+ {' '} + + En confirmant cette opération, l'activité sera supprimée de ce pôle .
+ +
+
+
+ + +
+
+ +
+
+
+ )} +
+ + + + ); + } + } + + ] + + + const [handleClick_delete_Competence_From_Activite_In_Pole_Activite_pedago_api, sethandleClick_delete_Competence_From_Activite_In_Pole_Activite_pedago_api] = useState(); const [handleClick_delete_Competence_From_Activite_In_Pole_Activite_message, sethandleClick_delete_Competence_From_Activite_In_Pole_Activite_message] = useState(); const [handleClick_delete_Competence_From_Activite_In_Pole_Activite_result, sethandleClick_delete_Competence_From_Activite_In_Pole_Activite_result] = useState([]); @@ -561,7 +640,7 @@ const Module_Pole_Actvitie_Pedagogique = (props) => { var node = { "_id": local_id, "id": localid, - "label": local_code + " - " + String(local_description).substring(0, 20), + "label": local_code + " - " + String(local_description).substring(0, 50), "description": local_description, "code": local_code, @@ -614,7 +693,7 @@ const Module_Pole_Actvitie_Pedagogique = (props) => { Getall_Partner_Pole_Activite_Pedago(); - + if (props.props_object_id && props.props_object_id.length > 3 && props.props_menu === "pole_activite_padagogique") { setselected_id(props.props_object_id); @@ -624,7 +703,7 @@ const Module_Pole_Actvitie_Pedagogique = (props) => { setadd_one_pole_activite_pedago(""); submenu_detail_activite_padagogique(); - + } else { @@ -1351,7 +1430,7 @@ const Module_Pole_Actvitie_Pedagogique = (props) => { var node = { "_id": local_id, "id": localid, - "label": code + " - " + String(description).substring(0, 15), + "label": code + " - " + String(description).substring(0, 50), "code": code, "description": description, @@ -1458,7 +1537,7 @@ const Module_Pole_Actvitie_Pedagogique = (props) => { var node = { "_id": local_id, "id": localid, - "label": code + " - " + String(description).substring(0, 15), + "label": code + " - " + String(description).substring(0, 50), "code": code, "description": description, @@ -1555,7 +1634,7 @@ const Module_Pole_Actvitie_Pedagogique = (props) => { var node = { "_id": local_id, "id": localid, - "label": code + " - " + String(description).substring(0, 15), + "label": code + " - " + String(description).substring(0, 50), "code": code, "description": description, @@ -2022,7 +2101,7 @@ const Module_Pole_Actvitie_Pedagogique = (props) => {
-

Pôles activités pédagogiques

+

Pôles activités pédagogiques

  @@ -2765,7 +2844,7 @@ const Module_Pole_Actvitie_Pedagogique = (props) => { - {/*
+
@@ -2825,7 +2904,7 @@ const Module_Pole_Actvitie_Pedagogique = (props) => { // checkboxSelection onSelectionModelChange={(newSelectionModel) => { setSelectionModel(newSelectionModel); - + if (newSelectionModel.length !== 1) { } @@ -2934,7 +3013,7 @@ const Module_Pole_Actvitie_Pedagogique = (props) => {
-
*/} +
diff --git a/src/components/Notes_Evaluation.js b/src/components/Notes_Evaluation.js index b83cced..3b853e3 100644 --- a/src/components/Notes_Evaluation.js +++ b/src/components/Notes_Evaluation.js @@ -4557,7 +4557,7 @@ const Notes_Evaluation = (props) => { }} > { setselectionModel_evalutions(newSelectionModel); /*if (newSelectionModel.length === 1) diff --git a/src/components/Partner.js b/src/components/Partner.js index 50b6f14..2ceff37 100644 --- a/src/components/Partner.js +++ b/src/components/Partner.js @@ -11,6 +11,8 @@ import { useHistory } from "react-router-dom"; import PartnerInfo from "./UpdatePartnerInfo"; import PartnerInfo_v2 from "./UpdatePartnerInfo_v2"; +import UpdatePartnerInfo_v2_ARG from "./UpdatePartnerInfo_v2_ARG"; + import { FiBookOpen } from "react-icons/fi"; import SettingsInputComponentIcon from '@mui/icons-material/SettingsInputComponent'; import { FaDraftingCompass } from "react-icons/fa"; diff --git a/src/components/Partner_Securite_Data.js b/src/components/Partner_Securite_Data.js index a560973..06cc1cd 100644 --- a/src/components/Partner_Securite_Data.js +++ b/src/components/Partner_Securite_Data.js @@ -58,20 +58,25 @@ const Partner_Securite_Data = (props) => { const [updatemainmail, setupdatemainmail] = useState(); const [updatepwd, setupdatepwd] = useState(); + const sleep = (milliseconds) => { + return new Promise(resolve => setTimeout(resolve, milliseconds)) + } - function enablesecurtymailfields() { + async function enablesecurtymailfields() { + + await sleep(5); + var liste_champs = ['current_email', 'new_email', 'conf_new_email', + ] - document.getElementsByName("current_email")[0].disabled = false; - document.getElementsByName("current_email")[0].style.backgroundColor = "#FFFFFF"; + for (let i = 0; i < liste_champs.length; i++) { + if (document.getElementsByName(String(liste_champs[i])) && document.getElementsByName(String(liste_champs[i]))[0]) { + document.getElementsByName(String(liste_champs[i]))[0].disabled = false; + document.getElementsByName(String(liste_champs[i]))[0].style.backgroundColor = "#FFFFFF"; - - document.getElementsByName("new_email")[0].disabled = false; - document.getElementsByName("new_email")[0].style.backgroundColor = "#FFFFFF"; - - document.getElementsByName("conf_new_email")[0].disabled = false; - document.getElementsByName("conf_new_email")[0].style.backgroundColor = "#FFFFFF"; + } + } setmailfieldsdesabled(false); @@ -80,20 +85,21 @@ const Partner_Securite_Data = (props) => { setupdatemainmail(); } - function desablesecurtymailfields() { - document.getElementsByName("current_email")[0].disabled = true; - document.getElementsByName("current_email")[0].style.backgroundColor = "#ECEFF1"; - document.getElementsByName("current_email")[0].value = ""; + async function desablesecurtymailfields() { + + await sleep(5); + var liste_champs = ['current_email', 'new_email', 'conf_new_email', + ] - document.getElementsByName("new_email")[0].disabled = true; - document.getElementsByName("new_email")[0].style.backgroundColor = "#ECEFF1"; - document.getElementsByName("new_email")[0].value = ""; + for (let i = 0; i < liste_champs.length; i++) { + if (document.getElementsByName(String(liste_champs[i])) && document.getElementsByName(String(liste_champs[i]))[0]) { + document.getElementsByName(String(liste_champs[i]))[0].disabled = true; + document.getElementsByName(String(liste_champs[i]))[0].style.backgroundColor = "#ECEFF1"; - document.getElementsByName("conf_new_email")[0].disabled = true; - document.getElementsByName("conf_new_email")[0].style.backgroundColor = "#ECEFF1"; - document.getElementsByName("conf_new_email")[0].value = ""; + } + } setmailfieldsdesabled(true); @@ -357,19 +363,21 @@ const Partner_Securite_Data = (props) => { }); } - function desablesecurtypwdfields() { - document.getElementsByName("current_pwd")[0].disabled = true; - document.getElementsByName("current_pwd")[0].style.backgroundColor = "#ECEFF1"; - document.getElementsByName("current_pwd")[0].value = ""; + async function desablesecurtypwdfields() { - document.getElementsByName("new_pwd")[0].disabled = true; - document.getElementsByName("new_pwd")[0].style.backgroundColor = "#ECEFF1"; - document.getElementsByName("new_pwd")[0].value = ""; + await sleep(5); + var liste_champs = ['current_pwd', 'new_pwd', 'new_pwd_conf',] - document.getElementsByName("new_pwd_conf")[0].disabled = true; - document.getElementsByName("new_pwd_conf")[0].style.backgroundColor = "#ECEFF1"; - document.getElementsByName("new_pwd_conf")[0].value = ""; + for (let i = 0; i < liste_champs.length; i++) { + + if (document.getElementsByName(String(liste_champs[i])) && document.getElementsByName(String(liste_champs[i]))[0]) { + document.getElementsByName(String(liste_champs[i]))[0].disabled = true; + document.getElementsByName(String(liste_champs[i]))[0].style.backgroundColor = "#ECEFF1"; + document.getElementsByName(String(liste_champs[i]))[0].value = ""; + + } + } setpwdfieldsdesabled(true); setResult(""); @@ -379,16 +387,19 @@ const Partner_Securite_Data = (props) => { - function enablesecurtypwdfields() { + async function enablesecurtypwdfields() { - document.getElementsByName("current_pwd")[0].disabled = false; - document.getElementsByName("current_pwd")[0].style.backgroundColor = "#FFFFFF"; + await sleep(5); + var liste_champs = ['current_pwd', 'new_pwd', 'new_pwd_conf',] - document.getElementsByName("new_pwd")[0].disabled = false; - document.getElementsByName("new_pwd")[0].style.backgroundColor = "#FFFFFF"; + for (let i = 0; i < liste_champs.length; i++) { - document.getElementsByName("new_pwd_conf")[0].disabled = false; - document.getElementsByName("new_pwd_conf")[0].style.backgroundColor = "#FFFFFF"; + if (document.getElementsByName(String(liste_champs[i])) && document.getElementsByName(String(liste_champs[i]))[0]) { + document.getElementsByName(String(liste_champs[i]))[0].disabled = false; + document.getElementsByName(String(liste_champs[i]))[0].style.backgroundColor = "#FFFFFF"; + + } + } setpwdfieldsdesabled(false); setResult(""); @@ -409,22 +420,25 @@ const Partner_Securite_Data = (props) => { }; } - function desablesecurtyInsertKeyfields() { + async function desablesecurtyInsertKeyfields() { + await sleep(5); setinsert_key_updated(); - document.getElementsByName("current_insert_key")[0].disabled = true; - document.getElementsByName("current_insert_key")[0].style.backgroundColor = "#ECEFF1"; - document.getElementsByName("current_insert_key")[0].value = ""; - document.getElementsByName("new_insert_key")[0].disabled = true; - document.getElementsByName("new_insert_key")[0].style.backgroundColor = "#ECEFF1"; - document.getElementsByName("new_insert_key")[0].value = ""; - document.getElementsByName("conf_new_insert_key")[0].disabled = true; - document.getElementsByName("conf_new_insert_key")[0].style.backgroundColor = "#ECEFF1"; - document.getElementsByName("conf_new_insert_key")[0].value = ""; + var liste_champs = ['current_insert_key', 'new_insert_key', 'conf_new_insert_key',] + for (let i = 0; i < liste_champs.length; i++) { + + if (document.getElementsByName(String(liste_champs[i])) && document.getElementsByName(String(liste_champs[i]))[0]) { + document.getElementsByName(String(liste_champs[i]))[0].disabled = true; + document.getElementsByName(String(liste_champs[i]))[0].style.backgroundColor = "#ECEFF1"; + document.getElementsByName(String(liste_champs[i]))[0].value = ""; + + } + } + setinsert_keyfieldsdesabled(true); setResult(""); setupdatepwd(); @@ -672,7 +686,7 @@ const Partner_Securite_Data = (props) => {
 
-
+ {String(props.is_partner_admin_account) === "1" &&
@@ -809,12 +823,12 @@ const Partner_Securite_Data = (props) => {
-
+ {String(props.is_partner_admin_account) === "1" &&
- Emails contact + Email de contact
{
 
-
+
}
-
+
} + + {String(props.is_partner_admin_account) !== "1" &&
+
+
+ +
+ +
+ Mot de passe +
+ +
+ + { + + {currentpawdvisible ? : } + + + ), + }} + + /> + } + + { + + {newpawdvisible ? : } + + + ), + }} + + /> + } -
+ { + + {confpwdvisible ? : } + + + ), + }} + + /> + } + + +
+ Créez un mot de passe contenant au moins : +
    +
  • + 8 caractères +
  • +
  • + 1 nombre +
  • +
  • + 1 caractère spécial p. ex., $, !, @, %, & +
  • + +
  • + Identiques +
  • +
+
+ + +
+ +
+ + {pwdfieldsdesabled == false &&
+
+ +
+
+
+
+
+ } + {pwdfieldsdesabled == true && +
+ } +
+ +
 
+
+ +
+
+
} + + + {String(props.is_partner_admin_account) === "1" &&
@@ -1077,9 +1230,9 @@ const Partner_Securite_Data = (props) => {
-
+
} + - {/*
Mot de passe
@@ -1220,7 +1373,7 @@ const Partner_Securite_Data = (props) => { {/*
-
Emails contact 00
+
Email de contact 00
{/*updatemainmail === false &&
Erreur mise à jour.
diff --git a/src/components/Session_Admission_FI.js b/src/components/Session_Admission_FI.js index f7db969..01af7dc 100644 --- a/src/components/Session_Admission_FI.js +++ b/src/components/Session_Admission_FI.js @@ -6984,7 +6984,7 @@ const Session_Admission_FI = (props) => { } - }} > Ajout 1 inscrit + }} > Ajout 1 candidat   } diff --git a/src/components/UpdatePartnerInfo_v2.js b/src/components/UpdatePartnerInfo_v2.js index 2a2f542..21f2f8c 100644 --- a/src/components/UpdatePartnerInfo_v2.js +++ b/src/components/UpdatePartnerInfo_v2.js @@ -910,6 +910,121 @@ function UpdatePartnerInfo_v2(props) { document.getElementsByName("iscertifvoltaire")[0].style.backgroundColor = "#ECEFF1"; } + // alert(" La mise à jour a été faite "); + setdisplay_alert_mysy("1"); + setalert_message(" La mise à jour a été faite "); + setalert_type("success"); + + } else if (String(result['status']) === String("Err_Connexion")) { + alert('Erreur: ' + result['message']); + history.push("/Connexion"); + } else { + // alert(" Erreur : " + result['message']); + setdisplay_alert_mysy("1"); + setalert_message(result['message']); + setalert_type("error"); + + } + + }) + .catch((error) => { + console.error('Error:', error); + setmyApiResponse("false"); + alert(" Erreur : Impossible de mettre à jour les informations "); + window.scrollTo({ + top: 0, + behavior: "smooth", + }); + }); + + window.scrollTo({ + top: 0, + behavior: "smooth", + }); + }; + + + function RecordData_for_non_admin_user() { + + + const formData = new FormData(); + const url = process.env.REACT_APP_API_URL + "myclass/api/update_partner_account_employee_account/"; + + var adr_city = document.getElementsByName("adr_city")[0].value + adr_city = adr_city.replace("undefined", ""); + + var adr_zip = document.getElementsByName("adr_zip")[0].value; + adr_zip = adr_zip.replace("undefined", ""); + + + var adr_country = document.getElementsByName("adr_country")[0].value; + adr_country = adr_country.replace("undefined", ""); + + + var telephone = document.getElementsByName("telephone")[0].value; + telephone = telephone.replace("undefined", ""); + + var nom = ""; + if (document.getElementsByName("contact_nom")[0]) { + nom = document.getElementsByName("contact_nom")[0].value; + nom = nom.replace("undefined", ""); + } + + var prenom = ""; + if (document.getElementsByName("contact_prenom")[0]) { + prenom = document.getElementsByName("contact_prenom")[0].value; + prenom = prenom.replace("undefined", ""); + } + + + + var link_facebook = document.getElementsByName("link_facebook")[0].value; + var link_linkedin = document.getElementsByName("link_linkedin")[0].value; + var link_twitter = document.getElementsByName("link_twitter")[0].value; + var adr_street = document.getElementsByName("adr_street")[0].value; + + + formData.append('partner_account_id', partner_account_id); + formData.append('token', stored_user); + formData.append('contact_nom', nom); + formData.append('contact_prenom', prenom); + + + + formData.append('adr_city', adr_city); + formData.append('adr_zip', adr_zip); + formData.append('telephone', telephone); + + formData.append('adr_country', adr_country); + formData.append('link_facebook', link_facebook); + formData.append('link_linkedin', link_linkedin); + formData.append('link_twitter', link_twitter); + formData.append('adr_street', adr_street); + + //console.log(" ### formData = ", formData); + fetch( + url, + { + method: 'POST', + body: formData, + } + ) + .then((response) => response.json()) + .then((result) => { + //console.log('Success:', result['message'], "result['status'] = ", result['status']); + setmyApiResponse(result['status']); + setResult(result['message']); + if (String(result['status']) === String("true")) { + settestval(true); + desablefield1(); + setdatamodification(); + getPartnerImages(); + + setuserformedited(""); + + + + // alert(" La mise à jour a été faite "); setdisplay_alert_mysy("1"); setalert_message(" La mise à jour a été faite "); @@ -1849,6 +1964,8 @@ function UpdatePartnerInfo_v2(props) { const [p_nom, setp_nom] = useState(""); + + const [p_siret, setp_siret] = useState(""); const [p_telephone, setp_telephone] = useState(""); const [p_email, setp_email] = useState(""); @@ -3644,7 +3761,9 @@ function UpdatePartnerInfo_v2(props) {
-

Votre Structure de formation

+ {String(is_partner_admin_account) === "1" &&

Votre Structure de formation

} + + {String(is_partner_admin_account) !== "1" &&

Votre données personnelles

}
@@ -3660,7 +3779,8 @@ function UpdatePartnerInfo_v2(props) { {String(submenu).trim() === "submenu_donnee_securite" &&
- +
} {String(submenu).trim() === "submenu_donnee_facturation" &&
@@ -4125,7 +4245,7 @@ function UpdatePartnerInfo_v2(props) {
- +
Les indicateurs
@@ -5155,7 +5275,7 @@ function UpdatePartnerInfo_v2(props) {
- +
Gestion Bannière
@@ -5241,7 +5361,7 @@ function UpdatePartnerInfo_v2(props) {
- +
Gestion LOGO
@@ -5510,7 +5630,7 @@ function UpdatePartnerInfo_v2(props) {
- +
Footer : Les pièces joints
@@ -5859,7 +5979,9 @@ function UpdatePartnerInfo_v2(props) { {String(submenu).trim() === "submenu_donnee_entreprise" &&
-
+ + + {String(is_partner_admin_account) === "1" &&
@@ -6016,9 +6138,9 @@ function UpdatePartnerInfo_v2(props) {
-
+
} -
+ {String(is_partner_admin_account) === "1" &&
@@ -6171,12 +6293,203 @@ function UpdatePartnerInfo_v2(props) {
-
+
} + + + {String(is_partner_admin_account) !== "1" &&
+
+
+ +
+ +
+ Coordonnées +
+ +
+ + + + + ), + }} + value={p_contact_nom} + onChange={(e) => setp_contact_nom(e.target.value)} + /> + + + + + ), + }} + value={p_contact_prenom} + onChange={(e) => setp_contact_prenom(e.target.value)} + + /> + + + + + + + + ), + }} + value={p_telephone} + onChange={(e) => setp_telephone(e.target.value)} + /> + + + + + + ), + }} + value={p_email} + + /> + + + + + ), + }} + value={p_website} + onChange={(e) => setp_website(e.target.value)} + /> + + +
+
+ +
+ +
+
+
+ Adresse +
+
+ + + + + ), + }} + value={p_adr_street} + onChange={(e) => setp_adr_street(e.target.value)} + /> + + + + + ), + }} + value={p_adr_zip} + onChange={(e) => setp_adr_zip(e.target.value)} + /> + + + + + ), + }} + value={p_adr_city} + onChange={(e) => setp_adr_city(e.target.value)} + /> + + + + + ), + }} + value={p_adr_country} + onChange={(e) => setp_adr_country(e.target.value)} + /> + + +
+ +
+ +
+
+ +
}
-
+ {String(is_partner_admin_account) === "1" &&
@@ -6336,7 +6649,7 @@ function UpdatePartnerInfo_v2(props) {
-
+
}
@@ -6969,9 +7282,15 @@ function UpdatePartnerInfo_v2(props) {
{fields1desabled == false &&
-
+ {String(is_partner_admin_account) === "1" &&
-
+ +
} + + {String(is_partner_admin_account) !== "1" &&
+ + +
}
@@ -7036,7 +7355,7 @@ function UpdatePartnerInfo_v2(props) { -
+ {String(is_partner_admin_account) === "1" &&
@@ -7097,7 +7416,7 @@ function UpdatePartnerInfo_v2(props) {
-
+
} @@ -7106,14 +7425,14 @@ function UpdatePartnerInfo_v2(props) {
-
+ {String(is_partner_admin_account) === "1" &&
Supppression de compte
Pour supprimer votre compte, veuillez vous rapprocher de votre contact commercial ou nous écrire à contact@mysy-training.com.
-
+
}
@@ -7123,159 +7442,138 @@ function UpdatePartnerInfo_v2(props) {
 
+
-
-
+ {String(is_partner_admin_account) === "1" && <> -
+
+
-
- Votre logo -
+
-
+
+ Votre logo +
- {String(is_partner_admin_account) === "1" && -
+
-
-
-
+ {String(is_partner_admin_account) === "1" && +
+ +
+
+
+ +
+
+
+ {String(userformedited) === "1" && } + + {/*isimgclassSelected && */} + {isimgclassdeleted && String(isimgclassdeleted) === "1" && } + {isimgclassdeleted && String(isimgclassdeleted) === "0" && } + {isimgclassSelected && String(isimgclassSaved) === "0" && } +
-
-
- {String(userformedited) === "1" && } - - {/*isimgclassSelected && */} - {isimgclassdeleted && String(isimgclassdeleted) === "1" && } - {isimgclassdeleted && String(isimgclassdeleted) === "0" && } - {isimgclassSelected && String(isimgclassSaved) === "0" && } -
- -
- {String(userformedited) === "1" &&
-
  • - L'image doit etre carrée. -
  • -
  • - Les formats autorisés sont : ['jpg', 'jpeg', 'png', 'jpe', 'webp'] -
  • -
  • - Les dimensions recommandées: 128pixels X 128pixels -- 144pixels X 144pixels -- 168pixels X 168pixels
    - Les dimensions maximales sont de 256pixels X 256pixels -
  • -
  • - La taille de l'image ne doit pas dépasser 1 mega octet -
  • } -
    } - +
    +
    -
    -
    -
    -   -
    +
    +   +
    -
    -
    +
    +
    -
    +
    -
    - Votre cachet -
    -
    +
    + Votre cachet +
    +
    - {String(is_partner_admin_account) === "1" && -
    + {String(is_partner_admin_account) === "1" && +
    -
    -
    -
    +
    +
    +
    + +
    +
    +
    + {String(userformedited) === "1" && } + + {/*isimgclassSelected && */} + {isimgcachetdeleted && String(isimgcachetdeleted) === "1" && } + {isimgcachetdeleted && String(isimgcachetdeleted) === "0" && } + {isimgcachetSelected && String(isimgcachetSaved) === "0" && } +
    -
    -
    - {String(userformedited) === "1" && } - - {/*isimgclassSelected && */} - {isimgcachetdeleted && String(isimgcachetdeleted) === "1" && } - {isimgcachetdeleted && String(isimgcachetdeleted) === "0" && } - {isimgcachetSelected && String(isimgcachetSaved) === "0" && } -
    - -
    - {String(userformedited) === "1" &&
    -
  • - L'image doit etre carrée. -
  • -
  • - Les formats autorisés sont : ['jpg', 'jpeg', 'png', 'jpe', 'webp'] -
  • -
  • - Les dimensions recommandées: 128pixels X 128pixels -- 144pixels X 144pixels -- 168pixels X 168pixels
    - Les dimensions maximales sont de 256pixels X 256pixels -
  • -
  • - La taille de l'image ne doit pas dépasser 1 mega octet -
  • } -
    } - +
    -
    -
    -   -
    - -
    -
    - -
    - -
    - Compte Utilisateurs -
    -
    - - -
    - -
    - -
    -
    - - - {p_detail_partner_is_formation_initiale === "1" && <>
     
    @@ -7286,10 +7584,10 @@ function UpdatePartnerInfo_v2(props) {
    - Compte Etudiants (ENT) + Compte Utilisateurs
    -
    - +
    +
    @@ -7298,11 +7596,36 @@ function UpdatePartnerInfo_v2(props) {
    - } -
    -   -
    + {p_detail_partner_is_formation_initiale === "1" && <> +
    +   +
    + +
    +
    + +
    + +
    + Compte Etudiants (ENT) +
    +
    + + +
    + +
    + +
    +
    + + } +
    +   +
    + + }