From d035cafa8492158a7d977fbb83437d8781bf6154 Mon Sep 17 00:00:00 2001 From: cherif Date: Sun, 21 Jan 2024 18:48:15 +0100 Subject: [PATCH] 21/01/2024 -18h30 --- .../DisplayPartnerTrainingsPagination.js | 4 +- src/components/Employes.js | 67 ++++++++++++++++--- src/components/Materiels.js | 1 + src/components/Partner_Client.js | 4 +- src/styles/components/_partnerclient.scss | 12 +++- 5 files changed, 72 insertions(+), 16 deletions(-) diff --git a/src/components/DisplayPartnerTrainingsPagination.js b/src/components/DisplayPartnerTrainingsPagination.js index 0312af5..173e6e9 100644 --- a/src/components/DisplayPartnerTrainingsPagination.js +++ b/src/components/DisplayPartnerTrainingsPagination.js @@ -345,7 +345,7 @@ const DistplayPartnerTraningsPage = (props) => { const [expanded, setExpanded] = React.useState(false); return ( -
+
{expanded ? value : value.slice(0, 50)}  {value.length > 50 && ( // eslint-disable-next-line jsx-a11y/anchor-is-valid @@ -384,7 +384,7 @@ const DistplayPartnerTraningsPage = (props) => { { field: 'zone_diffusion', headerName: 'zone_diffusion', hide: true, maxWidth: 1, editable: false, }, { field: 'internal_url', headerName: 'internal_url', hide: true, editable: false, }, { field: 'external_code', headerName: 'Code Formation', hideable: false, minWidth: 150, flex: 1, maxWidth: 250, editable: false, renderCell: (params) => , }, - { field: 'title', headerName: 'Titre', flex: 1, hideable: false, minWidth: 250, flex: 1, editable: false, renderCell: (params) => , }, + { field: 'title', headerName: 'Titre', hideable: false, minWidth: 300, flex: 1, editable: false, renderCell: (params) => , }, { field: 'domain', headerName: 'Domaine', minWidth: 50, flex: 1, maxWidth: 150, hideable: true, editable: false, }, { field: 'metier', headerName: 'Métier', minWidth: 50, flex: 1, maxWidth: 150, hideable: true, hide: true, editable: false, }, { field: 'nb_session_formation', headerName: 'Nb Session', minWidth: 50, flex: 1, maxWidth: 100, hideable: true, hide: false , editable: false, align: "center",}, diff --git a/src/components/Employes.js b/src/components/Employes.js index caeb866..c613a14 100644 --- a/src/components/Employes.js +++ b/src/components/Employes.js @@ -122,6 +122,7 @@ const Employes = (props) => { { field: 'nom', headerName: 'Nom', flex: 1, hide: false, minWidth: 150, renderCell: (params) => , }, { field: 'prenom', headerName: 'Prénom', flex: 1, hide: false, minWidth: 150, renderCell: (params) => , }, { field: 'email', headerName: 'Email', minWidth: 300, flex: 1, renderCell: (params) => , }, + { field: 'user_login', headerName: 'Login', minWidth: 200, flex: 1, renderCell: (params) => , }, { field: 'ismanager', headerName: 'Manager', width: 150, hide: false, valueFormatter: (params) => { @@ -5573,6 +5574,7 @@ const Employes = (props) => { adr_ville: JSON.parse(item).adr_ville, adr_pays: JSON.parse(item).adr_pays, date_naissance: JSON.parse(item).date_naissance, + user_login: JSON.parse(item).user_login, } @@ -5872,7 +5874,11 @@ const Employes = (props) => { -
Email
+
+ + + Email +
{ className="disabled_style" value={p_detail_mail} onChange={(e) => { - setp_detail_mail(e.target.value); - setEmployee_data_changed("1"); + if (String(p_detail_user_login).trim() === "") { + setp_detail_mail(e.target.value); + setEmployee_data_changed("1"); + } else { + alert(" Cet utilisateur a déjà un compte utilisateur associé cet email") + } } } @@ -6355,19 +6365,19 @@ const Employes = (props) => { - { String(p_detail_user_login) === "" &&
+ {String(p_detail_user_login) === "" &&
} - { String(p_detail_user_login) !== "" &&
+ {String(p_detail_user_login) !== "" &&
} - { String(p_detail_user_login) !== "" && String(p_detail_user_login_locked) !== "1" + {String(p_detail_user_login) !== "" && String(p_detail_user_login_locked) !== "1" &&
{
} - { String(p_detail_user_login) !== "" && String(p_detail_user_login_locked) === "1" + {String(p_detail_user_login) !== "" && String(p_detail_user_login_locked) === "1" && - + {String(p_detail_mysy_lms_user_id) === "" && String(p_detail_user_login) !== "" && String(p_detail_user_login_locked) !== "1" && @@ -6623,6 +6633,42 @@ const Employes = (props) => {
}
+
+   +
+
+ {String(Employee_data_changed) === "1" && String(employee_data_edit_mode) === "1" &&
+ /!\ Pensez à enregistrer les modifications +
} + + +
+ + {String(Employee_data_changed) === "1" && String(employee_data_edit_mode) === "1" &&
+ + + +
} + + {String(employee_data_edit_mode) === "1" &&
+ +
} +
+ + + {String(employee_data_edit_mode) !== "1" &&
+ + + +
} +
+   +
+
+

@@ -6768,7 +6814,7 @@ const Employes = (props) => {
 
- {String(Employee_data_changed) === "1" && String(employee_data_edit_mode) === "1" &&
+ {/* {String(Employee_data_changed) === "1" && String(employee_data_edit_mode) === "1" &&
/!\ Pensez à enregistrer les modifications
} @@ -6795,6 +6841,7 @@ const Employes = (props) => {
} + */}
 
diff --git a/src/components/Materiels.js b/src/components/Materiels.js index 40bc720..3dcecd0 100644 --- a/src/components/Materiels.js +++ b/src/components/Materiels.js @@ -1507,6 +1507,7 @@ const Materiels = (props) => { setsubmenu(""); setadd_One_Materiel(""); + setgridline_id(""); //Get_Materiel_Data(selected_id); Display_Detail_Material_Data(selected_id); diff --git a/src/components/Partner_Client.js b/src/components/Partner_Client.js index bb1ed7c..71dc088 100644 --- a/src/components/Partner_Client.js +++ b/src/components/Partner_Client.js @@ -910,8 +910,8 @@ const Partner_Client = (props) => { diff --git a/src/styles/components/_partnerclient.scss b/src/styles/components/_partnerclient.scss index 5e664a1..70c1cf9 100644 --- a/src/styles/components/_partnerclient.scss +++ b/src/styles/components/_partnerclient.scss @@ -274,12 +274,14 @@ background: #c8cfd5; color: black; width: 100%; + height: 2rem; } .bton_import_excel { background: #c8cfd5; color: black; width: 100% !important; + height: 2rem; } .div_row_gauche_etendu { @@ -824,12 +826,14 @@ background: #c8cfd5; color: black; width: 50%; + height: 2rem; } .bton_import_excel { background: #c8cfd5; color: black; width: 65% !important; + height: 2rem; } .div_row_gauche_etendu { @@ -1390,19 +1394,21 @@ } .icon_plus { - width: 8%; + width: 6%; } .bton_add_session { background: #c8cfd5; color: black; width: 40%; + height: 2rem; } .bton_import_excel { background: #c8cfd5; color: black; width: 50% !important; + height: 2rem; } .div_row_gauche_etendu { @@ -1850,19 +1856,21 @@ } .icon_plus { - width: 8%; + width: 6%; } .bton_add_session { background: #c8cfd5; color: black; width: 25% !important; + height: 2rem; } .bton_import_excel { background: #c8cfd5; color: black; width: 40% !important; + height: 2rem; } .div_row_gauche_etendu {