27/08/23 - 13h
parent
e78c0fe585
commit
01b4a9dba6
|
@ -183,8 +183,71 @@ const Employes = (props) => {
|
|||
{ field: 'poste', headerName: 'Poste', width: 150, hideable: false, },
|
||||
{ field: 'date_du', headerName: 'Du', width: 150, hide: false, editable: true },
|
||||
{ field: 'date_au', headerName: 'Au', width: 150, hide: false, editable: true },
|
||||
{ field: 'target_related_collection', headerName: 'Type', width: 150, hide: false, editable: true },
|
||||
{ field: 'target_related_collection_id', headerName: 'Type ID', width: 150, hide: false, editable: true },
|
||||
{ field: 'related_target_collection_object', headerName: 'Cible', width: 150, hide: false, editable: true },
|
||||
{ field: 'related_target_collection_id_nom', headerName: 'Cible Nom', width: 150, hide: false, editable: true },
|
||||
{ field: 'target_related_collection', headerName: 'Type', hide: true },
|
||||
{ field: 'target_related_collection_id', headerName: 'Type ID', hide: true },
|
||||
{
|
||||
field: "delete", headerName: 'Supprimer',
|
||||
renderCell: (cellValues) => {
|
||||
return (
|
||||
|
||||
<Popup
|
||||
trigger={<Button
|
||||
|
||||
onClick={(event) => {
|
||||
//handleClick_delete(event, cellValues);
|
||||
}}
|
||||
>
|
||||
<CiTrash />
|
||||
|
||||
</Button>}
|
||||
modal
|
||||
nested
|
||||
position="center center"
|
||||
>
|
||||
{close => (
|
||||
<div>
|
||||
<button className="gest_close" onClick={close}>
|
||||
×
|
||||
</button>
|
||||
<div className="gest_header"> MySy Information </div>
|
||||
<div className="gest_content">
|
||||
{' '}
|
||||
|
||||
En confirmant cette opération, la fonction sera <i><font color="red"> définitivement supprimé</font></i>. <br />
|
||||
|
||||
</div>
|
||||
<div className="gest_actions">
|
||||
<div style={{ "width": "45%", "float": "left" }}>
|
||||
<button className="gest_bton_popup" onClick={(event) => {
|
||||
//handleClick_delete(event, cellValues);
|
||||
//console.log('modal closed ');
|
||||
close();
|
||||
}}> Valider </button>
|
||||
|
||||
</div>
|
||||
<div style={{ "width": "45%", "float": "right" }}>
|
||||
<button
|
||||
className="gest_bton_popup"
|
||||
onClick={() => {
|
||||
//console.log('modal closed ');
|
||||
close();
|
||||
}}
|
||||
>
|
||||
Annuler
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</Popup>
|
||||
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
]
|
||||
function clean_all_filters() {
|
||||
|
@ -226,6 +289,7 @@ const Employes = (props) => {
|
|||
Getall_Training_Employee_No_Filter();
|
||||
Get_List_Managers();
|
||||
Get_List_RH_Profils();
|
||||
Get_Employee_Related_Target_Collection_Data();
|
||||
|
||||
}, [])
|
||||
|
||||
|
@ -234,7 +298,7 @@ const Employes = (props) => {
|
|||
|
||||
const [selected_id, setselected_id] = useState("");
|
||||
const [selected_employe_email, setselected_employe_email] = useState("");
|
||||
function handleClick_edit_session_From_Line(selected_row_id) {
|
||||
function handleClick_edit_employee_From_Line(selected_row_id) {
|
||||
|
||||
submenu_detail_employe();
|
||||
|
||||
|
@ -258,6 +322,26 @@ const Employes = (props) => {
|
|||
}
|
||||
|
||||
|
||||
const [selected_affectation_id, set_selected_affectation_id] = useState();
|
||||
function handleClick_edit_affectation_From_Line(selected_row_id) {
|
||||
|
||||
setdisplay_affectation("1");
|
||||
|
||||
var line = JSON.parse(rows_affectations[selected_row_id]);
|
||||
|
||||
//console.log("### line = ", line);
|
||||
var affectation_id = line._id;
|
||||
set_selected_affectation_id(affectation_id);
|
||||
|
||||
|
||||
if (myRef_affectation.current) {
|
||||
myRef_affectation.current.scrollIntoView({ behavior: "smooth" });
|
||||
}
|
||||
|
||||
Get_Given_Employee_Affectation(affectation_id);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function Display_Detail_Employe(employee_id) {
|
||||
//clearDetailAttendeFields();
|
||||
|
@ -664,6 +748,83 @@ const Employes = (props) => {
|
|||
}
|
||||
|
||||
|
||||
const [Get_Given_Employee_Affectation_api, setGet_Given_Employee_Affectation_api] = useState();
|
||||
const [Get_Given_Employee_Affectation_message, setGet_Given_Employee_Affectation_message] = useState();
|
||||
const [Get_Given_Employee_Affectation_result, setGet_Given_Employee_Affectation_result] = useState();
|
||||
function Get_Given_Employee_Affectation(local_affectation_id) {
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("affectation_id", local_affectation_id);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Given_Affectation_Ressource_Humaine_Poste/";
|
||||
|
||||
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
//console.log(" In Get_Given_Employee_Affectation res.data.status = " + res.data.status);
|
||||
//console.log(" In Get_Given_Employee_Affectation res.data.message r_class = " + res.data.message);
|
||||
setGet_Given_Employee_Affectation_api("true");
|
||||
|
||||
|
||||
|
||||
if (String(res.data.message).length > 0) {
|
||||
setGet_Given_Employee_Affectation_result(res.data.message);
|
||||
var mylocal_affectation = JSON.parse(res.data.message);
|
||||
|
||||
if (mylocal_affectation.poste) {
|
||||
setp_affect_poste(mylocal_affectation.poste);
|
||||
}
|
||||
|
||||
if (mylocal_affectation.date_du) {
|
||||
setp_affect_date_du(mylocal_affectation.date_du);
|
||||
|
||||
}
|
||||
|
||||
if (mylocal_affectation.date_au) {
|
||||
setp_affect_date_au(mylocal_affectation.date_au);
|
||||
}
|
||||
|
||||
if (mylocal_affectation.related_target_collection_object) {
|
||||
setp_affect_cible(mylocal_affectation.related_target_collection_object);
|
||||
}
|
||||
|
||||
|
||||
if (mylocal_affectation.related_target_collection_id_nom) {
|
||||
setp_affect_cible_nom(mylocal_affectation.related_target_collection_id_nom);
|
||||
}
|
||||
|
||||
if (mylocal_affectation.comment) {
|
||||
setp_affect_comment(mylocal_affectation.comment);
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
alert(" Aucune donnée recuperée");
|
||||
}
|
||||
|
||||
Disable_Detail_Affectation_Fields();
|
||||
}
|
||||
else {
|
||||
setGet_Given_Employee_Affectation_api("false");
|
||||
setGet_Given_Employee_Affectation_message(res.data.message);
|
||||
alert(res.data.message)
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
console.warn('Not good man :( Get_Given_Employee_Affectation = ', error);
|
||||
setGet_Given_Employee_Affectation_api("false");
|
||||
alert(" Impossible de recuperer l'affectation de l'employé");
|
||||
//setmyApimyApiMessage("")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const [Getall_Employee_Affectation_api, setGetall_Employee_Affectation_api] = useState();
|
||||
const [Getall_Employee_Affectation_message, setGetall_Employee_Affectation_message] = useState();
|
||||
const [Getall_Employee_Affectation_result, setGetall_Employee_Affectation_result] = useState();
|
||||
|
@ -692,18 +853,57 @@ const Employes = (props) => {
|
|||
else {
|
||||
setGetall_Employee_Affectation_api("false");
|
||||
setGetall_Employee_Affectation_message(res.data.message);
|
||||
alert(res.data.message)
|
||||
alert(res.data.message)
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
console.warn('Not good man :( Getall_Employee_Affectation = ', error);
|
||||
setGetall_Employee_Affectation_api("false");
|
||||
alert(" Impossible de recuperer les affectations de l'employé");
|
||||
alert(" Impossible de recuperer les affectations de l'employé");
|
||||
//setmyApimyApiMessage("")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const [Get_Employee_Related_Target_Collection_Data_api, setGet_Employee_Related_Target_Collection_Data_api] = useState();
|
||||
const [Get_Employee_Related_Target_Collection_Data_message, setGet_Employee_Related_Target_Collection_Data_message] = useState();
|
||||
const [Get_Employee_Related_Target_Collection_Data_result, setGet_Employee_Related_Target_Collection_Data_result] = useState();
|
||||
function Get_Employee_Related_Target_Collection_Data() {
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Related_Target_Collection_Data/";
|
||||
|
||||
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
//console.log(" In Get_Employee_Related_Target_Collection_Data res.data.status = " + res.data.status);
|
||||
//console.log(" In Get_Employee_Related_Target_Collection_Data res.data.message r_class = " + res.data.message);
|
||||
setGet_Employee_Related_Target_Collection_Data_api("true");
|
||||
setGet_Employee_Related_Target_Collection_Data_result(res.data.message);
|
||||
setrows_affectations(res.data.message);
|
||||
}
|
||||
else {
|
||||
setGet_Employee_Related_Target_Collection_Data_api("false");
|
||||
setGet_Employee_Related_Target_Collection_Data_message(res.data.message);
|
||||
alert(res.data.message)
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
console.warn('Not good man :( Get_Employee_Related_Target_Collection_Data = ', error);
|
||||
setGet_Employee_Related_Target_Collection_Data_api("false");
|
||||
alert(" Impossible de recuperer les cibles d'affectation");
|
||||
//setmyApimyApiMessage("")
|
||||
})
|
||||
}
|
||||
|
||||
function disable_Employee_DetailFields() {
|
||||
setemployee_data_edit_mode("0");
|
||||
|
||||
|
@ -1258,6 +1458,7 @@ const Employes = (props) => {
|
|||
const [userimgclassprofilchanged, setuserimgclassprofilchanged] = useState("");
|
||||
|
||||
const myRef_head = useRef(null)
|
||||
const myRef_affectation = useRef(null)
|
||||
const hiddenFileInput_session = React.useRef(null);
|
||||
const [Employee_data_changed, setEmployee_data_changed] = useState();
|
||||
|
||||
|
@ -1467,7 +1668,7 @@ const Employes = (props) => {
|
|||
document.getElementById("affectation").style.color = "black";
|
||||
}
|
||||
|
||||
//console.log(" ### employee_data_edit_mode = ", employee_data_edit_mode);
|
||||
//console.log(" ### employee_data_edit_mode = ", employee_data_edit_mode);
|
||||
if (String(employee_data_edit_mode) !== "1")
|
||||
disable_Employee_DetailFields();
|
||||
|
||||
|
@ -1529,6 +1730,207 @@ const Employes = (props) => {
|
|||
}
|
||||
|
||||
|
||||
const [display_affectation, setdisplay_affectation] = useState();
|
||||
const [p_affect_poste, setp_affect_poste] = useState();
|
||||
const [p_affect_date_du, setp_affect_date_du] = useState();
|
||||
const [p_affect_date_au, setp_affect_date_au] = useState();
|
||||
const [p_affect_cible, setp_affect_cible] = useState();
|
||||
const [p_affect_cible_nom, setp_affect_cible_nom] = useState();
|
||||
const [edite_affectation_form, setedite_affectation_form] = useState();
|
||||
const [p_affect_comment, setp_affect_comment] = useState();
|
||||
const [p_related_target_collection, setp_related_target_collection] = useState();
|
||||
const [p_related_target_collection_id, setp_related_target_collection_id] = useState();
|
||||
|
||||
|
||||
const [Affectation_data_changed, setAffectation_data_changed] = useState();
|
||||
|
||||
|
||||
|
||||
function Disable_Detail_Affectation_Fields() {
|
||||
setedite_affectation_form("0");
|
||||
|
||||
if (document.getElementsByName("affect_poste")[0]) {
|
||||
document.getElementsByName("affect_poste")[0].disabled = true;
|
||||
document.getElementsByName("affect_poste")[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
|
||||
|
||||
if (document.getElementsByName("affect_cible")[0]) {
|
||||
document.getElementsByName("affect_cible")[0].disabled = true;
|
||||
document.getElementsByName("affect_cible")[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
|
||||
|
||||
if (document.getElementsByName("affect_cible_nom")[0]) {
|
||||
document.getElementsByName("affect_cible_nom")[0].disabled = true;
|
||||
document.getElementsByName("affect_cible_nom")[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
|
||||
|
||||
if (document.getElementsByName("affect_date_du")[0]) {
|
||||
document.getElementsByName("affect_date_du")[0].disabled = true;
|
||||
document.getElementsByName("affect_date_du")[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
|
||||
|
||||
if (document.getElementsByName("affect_date_au")[0]) {
|
||||
document.getElementsByName("affect_date_au")[0].disabled = true;
|
||||
document.getElementsByName("affect_date_au")[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
|
||||
if (document.getElementsByName("affect_comment")[0]) {
|
||||
document.getElementsByName("affect_comment")[0].disabled = true;
|
||||
document.getElementsByName("affect_comment")[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function Enable_Detail_Affectation_Fields() {
|
||||
|
||||
setedite_affectation_form("1");
|
||||
|
||||
if (document.getElementsByName("affect_poste")[0]) {
|
||||
document.getElementsByName("affect_poste")[0].disabled = false;
|
||||
document.getElementsByName("affect_poste")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
||||
|
||||
if (document.getElementsByName("affect_cible")[0]) {
|
||||
document.getElementsByName("affect_cible")[0].disabled = false;
|
||||
document.getElementsByName("affect_cible")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
||||
|
||||
if (document.getElementsByName("affect_cible_nom")[0]) {
|
||||
document.getElementsByName("affect_cible_nom")[0].disabled = false;
|
||||
document.getElementsByName("affect_cible_nom")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
||||
|
||||
if (document.getElementsByName("affect_date_du")[0]) {
|
||||
document.getElementsByName("affect_date_du")[0].disabled = false;
|
||||
document.getElementsByName("affect_date_du")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
||||
|
||||
if (document.getElementsByName("affect_date_au")[0]) {
|
||||
document.getElementsByName("affect_date_au")[0].disabled = false;
|
||||
document.getElementsByName("affect_date_au")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
||||
if (document.getElementsByName("affect_comment")[0]) {
|
||||
document.getElementsByName("affect_comment")[0].disabled = false;
|
||||
document.getElementsByName("affect_comment")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function Annule_Affectation_DetailFields() {
|
||||
Get_Given_Employee_Affectation(selected_affectation_id);
|
||||
setAffectation_data_changed("");
|
||||
setedite_affectation_form("");
|
||||
|
||||
}
|
||||
|
||||
const [Update_One_Affectation_Data_api, setUpdate_One_Affectation_Data_api] = useState();
|
||||
const [Update_One_Affectation_Data_message, setUpdate_One_Affectation_Data_message] = useState();
|
||||
const [Update_One_Affectation_Data_result, setUpdate_One_Affectation_Data_result] = useState();
|
||||
function Update_One_Affectation_Data() {
|
||||
var form = new FormData();
|
||||
//form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
|
||||
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("_id", selected_affectation_id);
|
||||
form.append("rh_id", selected_id);
|
||||
|
||||
if (p_affect_poste)
|
||||
form.append("poste", p_affect_poste);
|
||||
else {
|
||||
alert(" Vous devez definir une poste pour cette affectation");
|
||||
return;
|
||||
}
|
||||
|
||||
if (p_affect_date_du)
|
||||
form.append("date_du", p_affect_date_du);
|
||||
else {
|
||||
alert(" Vous devez definir une date de debut pour cette affectation");
|
||||
return;
|
||||
}
|
||||
|
||||
if (p_affect_date_au)
|
||||
form.append("date_au", p_affect_date_au);
|
||||
else
|
||||
form.append("date_au", "");
|
||||
|
||||
|
||||
if (p_affect_comment)
|
||||
form.append("p_affect_comment", p_detail_tel);
|
||||
else
|
||||
form.append("p_affect_comment", "");
|
||||
|
||||
|
||||
if (p_related_target_collection)
|
||||
form.append("related_target_collection", p_related_target_collection);
|
||||
else
|
||||
form.append("related_target_collection", "");
|
||||
|
||||
if (p_related_target_collection_id)
|
||||
form.append("related_target_collection_id", p_related_target_collection_id);
|
||||
else
|
||||
form.append("related_target_collection_id", "");
|
||||
|
||||
|
||||
|
||||
console.log(" affectation form == ", form);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Update_Affectation_Ressource_Humaine_Poste/";
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
console.log(" In Update_One_Affectation_Data res.data.status = " + res.data.status);
|
||||
console.log(" In Update_One_Affectation_Data res.data.message r_class = " + res.data.message);
|
||||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
setUpdate_One_Affectation_Data_api("true");
|
||||
setUpdate_One_Affectation_Data_result(res.data.message);
|
||||
|
||||
Getall_Training_Employee();
|
||||
|
||||
disable_Employee_DetailFields();
|
||||
setemployee_data_changed("");
|
||||
setemployee_data_edit_mode("");
|
||||
Get_Employee_Data(selected_id);
|
||||
alert(" La mise à jour été correctement faite.");
|
||||
|
||||
myRef_head.current.scrollIntoView({ behavior: "smooth" });
|
||||
|
||||
}
|
||||
else {
|
||||
setUpdate_One_Affectation_Data_api("false");
|
||||
setUpdate_One_Affectation_Data_message(res.data.message);
|
||||
alert(res.data.message);
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
|
||||
console.warn('UpdateStagiaireData : Not good man :( Update_One_Affectation_Data = ' + error);
|
||||
setUpdate_One_Affectation_Data_api("false");
|
||||
alert(" Impossible de mettre à jour l'employé");
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const filterPassedTime_start = (time) => {
|
||||
const currentDate = new Date();
|
||||
const selectedDate = new Date(time);
|
||||
|
||||
return currentDate.getTime() < selectedDate.getTime();
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<div className="employes">
|
||||
<Dialog
|
||||
|
@ -1562,7 +1964,7 @@ const Employes = (props) => {
|
|||
select
|
||||
sx={{ m: 1, width: '100%' }}
|
||||
value={p_filtre1}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_filtre1(e.target.value);
|
||||
|
||||
}}
|
||||
|
@ -1591,7 +1993,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_filtre1_value}
|
||||
onChange={(e) => { setp_filtre1_value(e.target.value); }}
|
||||
onBlur={(e) => { setp_filtre1_value(e.target.value); }}
|
||||
InputProps={{
|
||||
endAdornment: (
|
||||
<InputAdornment position="end">
|
||||
|
@ -1641,7 +2043,7 @@ const Employes = (props) => {
|
|||
sx={{ m: 1, width: '100%' }}
|
||||
|
||||
value={p_filtre2}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_filtre2(e.target.value);
|
||||
|
||||
}}
|
||||
|
@ -1666,7 +2068,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_filtre2_value}
|
||||
onChange={(e) => setp_filtre2_value(e.target.value)}
|
||||
onBlur={(e) => setp_filtre2_value(e.target.value)}
|
||||
InputProps={{
|
||||
endAdornment: (
|
||||
<InputAdornment position="end">
|
||||
|
@ -1930,8 +2332,9 @@ const Employes = (props) => {
|
|||
onSelectionModelChange={(newSelectionModel) => {
|
||||
setSelectionModel(newSelectionModel);
|
||||
if (newSelectionModel.length === 1)
|
||||
handleClick_edit_session_From_Line(newSelectionModel);
|
||||
if (newSelectionModel.length === 0) {
|
||||
handleClick_edit_employee_From_Line(newSelectionModel);
|
||||
if (newSelectionModel.length !== 1) {
|
||||
setsubmenu();
|
||||
setdisplay_detail_employe();
|
||||
setadd_One_Employee();
|
||||
}
|
||||
|
@ -2129,7 +2532,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_nom}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_detail_nom(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}
|
||||
|
@ -2151,7 +2554,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_prenom}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_detail_prenom(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}}
|
||||
|
@ -2212,7 +2615,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_mail}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_detail_mail(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}
|
||||
|
@ -2234,7 +2637,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_tel_mobile}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_detail_tel_mobile(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}
|
||||
|
@ -2255,7 +2658,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_tel}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_detail_tel(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}
|
||||
|
@ -2276,7 +2679,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_adresse}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_detail_adresse(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}}
|
||||
|
@ -2295,7 +2698,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_code_postal}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_detail_code_postal(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}}
|
||||
|
@ -2314,7 +2717,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_ville}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_detail_ville(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}}
|
||||
|
@ -2334,7 +2737,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_pays}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_detail_pays(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}}
|
||||
|
@ -2354,7 +2757,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_linkedIn}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_detail_linkedIn(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}}
|
||||
|
@ -2374,7 +2777,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_facebook}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_detail_facebook(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}}
|
||||
|
@ -2394,7 +2797,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_twitter}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_detail_twitter(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}}
|
||||
|
@ -2460,7 +2863,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_fonction}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_detail_fonction(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}}
|
||||
|
@ -2612,7 +3015,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_one_detail_nom}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_one_detail_nom(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}
|
||||
|
@ -2634,7 +3037,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_one_detail_prenom}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_one_detail_prenom(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}}
|
||||
|
@ -2679,7 +3082,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_one_detail_mail}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_one_detail_mail(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}
|
||||
|
@ -2701,7 +3104,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_one_detail_tel_mobile}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_one_detail_tel_mobile(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}
|
||||
|
@ -2722,7 +3125,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_one_detail_tel}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_one_detail_tel(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}
|
||||
|
@ -2743,7 +3146,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_one_detail_adresse}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_one_detail_adresse(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}}
|
||||
|
@ -2762,7 +3165,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_one_detail_code_postal}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_one_detail_code_postal(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}}
|
||||
|
@ -2781,7 +3184,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_one_detail_ville}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_one_detail_ville(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}}
|
||||
|
@ -2801,7 +3204,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_one_detail_pays}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_one_detail_pays(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}}
|
||||
|
@ -2821,7 +3224,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_one_detail_linkedIn}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_one_detail_linkedIn(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}}
|
||||
|
@ -2841,7 +3244,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_one_detail_facebook}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_one_detail_facebook(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}}
|
||||
|
@ -2861,7 +3264,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_one_detail_twitter}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_one_detail_twitter(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}}
|
||||
|
@ -2910,7 +3313,7 @@ const Employes = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_one_detail_fonction}
|
||||
onChange={(e) => {
|
||||
onBlur={(e) => {
|
||||
setp_one_detail_fonction(e.target.value);
|
||||
setEmployee_data_changed("1");
|
||||
}}
|
||||
|
@ -3059,12 +3462,12 @@ const Employes = (props) => {
|
|||
checkboxSelection
|
||||
onSelectionModelChange={(newSelectionModel) => {
|
||||
setSelectionModel_affectations(newSelectionModel);
|
||||
/*if (newSelectionModel.length === 1)
|
||||
handleClick_edit_session_From_Line(newSelectionModel);
|
||||
if (newSelectionModel.length === 0) {
|
||||
setdisplay_detail_employe();
|
||||
setadd_One_Employee();
|
||||
}*/
|
||||
if (newSelectionModel.length === 1)
|
||||
handleClick_edit_affectation_From_Line(newSelectionModel);
|
||||
if (newSelectionModel.length !== 1) {
|
||||
setedite_affectation_form();
|
||||
setdisplay_affectation();
|
||||
}
|
||||
}}
|
||||
selectionModel={selectionModel_affectations}
|
||||
|
||||
|
@ -3078,6 +3481,8 @@ const Employes = (props) => {
|
|||
date_au: JSON.parse(item).date_au,
|
||||
target_related_collection: JSON.parse(item).target_related_collection,
|
||||
target_related_collection_id: JSON.parse(item).target_related_collection_id,
|
||||
related_target_collection_id_nom: JSON.parse(item).related_target_collection_id_nom,
|
||||
related_target_collection_object: JSON.parse(item).related_target_collection_object,
|
||||
|
||||
|
||||
}
|
||||
|
@ -3140,6 +3545,233 @@ const Employes = (props) => {
|
|||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<nav ref={myRef_affectation}> </nav>
|
||||
{String(display_affectation) === "1" && <div className="div_row" style={{ "border": "None", "background": '#F8F9F9', "padding": '5px' }}>
|
||||
<nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}> Détail Affectation </nav>
|
||||
|
||||
<div className="session_data" >
|
||||
<div className="session_caract">Poste Occupé <br />
|
||||
<TextField
|
||||
name="affect_poste"
|
||||
id="affect_poste"
|
||||
text
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style enable_style"
|
||||
value={p_affect_poste}
|
||||
Onblur={(e) => {
|
||||
setp_affect_poste(e.target.value);
|
||||
setAffectation_data_changed("1");
|
||||
}}
|
||||
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{String(edite_affectation_form) !== "1" && <div className="session_caract">Cible <br />
|
||||
<TextField
|
||||
name="affect_cible"
|
||||
id="affect_cible"
|
||||
text
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style enable_style"
|
||||
value={p_affect_cible}
|
||||
|
||||
/>
|
||||
|
||||
</div>}
|
||||
|
||||
{String(edite_affectation_form) === "1" && <div className="session_caract">Cible edit<br />
|
||||
<TextField
|
||||
name="affect_cible"
|
||||
id="affect_cible"
|
||||
select
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style enable_style"
|
||||
value={p_affect_cible}
|
||||
onChange={(e) => {
|
||||
setp_affect_cible(e.target.value);
|
||||
setAffectation_data_changed("1");
|
||||
}}
|
||||
|
||||
>
|
||||
<MenuItem value="myclass" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Formation </MenuItem>
|
||||
<MenuItem value="session_formation" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Session de formation </MenuItem>
|
||||
<MenuItem value="" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Aucun </MenuItem>
|
||||
|
||||
</TextField>
|
||||
|
||||
</div>}
|
||||
|
||||
|
||||
{String(edite_affectation_form) !== "1" && <div className="session_caract">Cible Nom <br />
|
||||
<TextField
|
||||
name="affect_cible_nom"
|
||||
id="affect_cible_nom"
|
||||
text
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style enable_style"
|
||||
value={p_affect_cible_nom}
|
||||
|
||||
/>
|
||||
|
||||
</div>}
|
||||
|
||||
{String(edite_affectation_form) === "1" && <div className="session_caract">Cible Nom edit <br />
|
||||
|
||||
<TextField
|
||||
name="affect_cible_nom"
|
||||
id="affect_cible_nom"
|
||||
select
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style enable_style"
|
||||
value={p_affect_cible_nom}
|
||||
onChange={(e) => {
|
||||
setp_affect_cible_nom(e.target.value);
|
||||
setAffectation_data_changed("1");
|
||||
}}
|
||||
>
|
||||
|
||||
{Get_Employee_Related_Target_Collection_Data_result &&
|
||||
Get_Employee_Related_Target_Collection_Data_result.filter((local_mymanager) => JSON.parse(local_mymanager).related_target_collection === p_affect_cible).map((mymanager) => (
|
||||
<MenuItem key={JSON.parse(mymanager).related_target_collection_id} value={JSON.parse(mymanager).related_target_collection_id}
|
||||
style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontSize": "12px" }}>
|
||||
{JSON.parse(mymanager).related_target_collection_id_nom}
|
||||
|
||||
</MenuItem>
|
||||
))}
|
||||
|
||||
|
||||
</TextField>
|
||||
|
||||
</div>}
|
||||
|
||||
|
||||
|
||||
{String(edite_affectation_form) !== "1" && <div className="session_caract">Date du <br />
|
||||
<TextField
|
||||
name="affect_date_du"
|
||||
id="affect_date_du"
|
||||
text
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style enable_style"
|
||||
value={p_affect_date_du}
|
||||
|
||||
/>
|
||||
|
||||
</div>}
|
||||
|
||||
{String(edite_affectation_form) === "1" && <div className="session_caract">Date du edit <br />
|
||||
|
||||
<DatePicker
|
||||
name="affect_date_du"
|
||||
id="affect_date_du"
|
||||
selected={new Date(moment(p_affect_date_du, "DD/MM/YYYY HH:mm:ss"))}
|
||||
onChange={(date) => {
|
||||
setp_affect_date_du(date);
|
||||
setAffectation_data_changed("1");
|
||||
}
|
||||
}
|
||||
showTimeSelect={false}
|
||||
//filterTime={filterPassedTime_start}
|
||||
dateFormat="dd/MM/yyyy"
|
||||
className="disabled_style enable_style"
|
||||
locale='fr-FR'
|
||||
/>
|
||||
|
||||
</div>}
|
||||
|
||||
|
||||
{String(edite_affectation_form) !== "1" && <div className="session_caract">Date au <br />
|
||||
<TextField
|
||||
name="affect_date_au"
|
||||
id="affect_date_au"
|
||||
text
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style enable_style"
|
||||
value={p_affect_date_au}
|
||||
|
||||
/>
|
||||
|
||||
</div>}
|
||||
|
||||
{String(edite_affectation_form) === "1" && <div className="session_caract">Date au <br />
|
||||
<DatePicker
|
||||
name="affect_date_au"
|
||||
id="affect_date_au"
|
||||
selected={new Date(moment(p_affect_date_au, "DD/MM/YYYY HH:mm:ss"))}
|
||||
onChange={(date) => {
|
||||
setp_affect_date_au(date);
|
||||
setAffectation_data_changed("1");
|
||||
}
|
||||
}
|
||||
showTimeSelect={false}
|
||||
//filterTime={filterPassedTime_start}
|
||||
dateFormat="dd/MM/yyyy"
|
||||
className="disabled_style enable_style"
|
||||
locale='fr-FR'
|
||||
/>
|
||||
|
||||
</div>}
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
|
||||
</div>
|
||||
{String(Affectation_data_changed) === "1" && String(edite_affectation_form) === "1" && <div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
|
||||
/!\ Pensez à enregistrer les modifications
|
||||
</div>}
|
||||
|
||||
|
||||
<div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
|
||||
|
||||
{String(Affectation_data_changed) === "1" && String(edite_affectation_form) === "1" && <div className="div_row_gauche" style={{ "textAlign": 'left', 'marginLeft': '15px' }}>
|
||||
|
||||
<Button variant="contained" className="bton_enreg" onClick={Update_One_Affectation_Data}>Enregistrer les modifications
|
||||
</Button>
|
||||
|
||||
</div>}
|
||||
|
||||
{String(edite_affectation_form) === "1" && <div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }} >
|
||||
<Button variant="contained" className="bton_annule" onClick={Annule_Affectation_DetailFields}>Annuler
|
||||
</Button>
|
||||
</div>}
|
||||
</div>
|
||||
|
||||
|
||||
{String(edite_affectation_form) !== "1" && <div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
|
||||
|
||||
<Button variant="contained" className="bton_edit" onClick={Enable_Detail_Affectation_Fields}>Editer
|
||||
</Button>
|
||||
|
||||
</div>}
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
</div>}
|
||||
|
||||
{String(submenu) === "droit_acces" && <div className="div_row">
|
||||
|
|
|
@ -342,12 +342,12 @@ const Partner_Client = (props) => {
|
|||
ref={hiddenFileInput}
|
||||
style={{ display: 'none' }}
|
||||
name="liste_participants_file"
|
||||
onChange={liste_part_client_file_change}
|
||||
onBlur={liste_part_client_file_change}
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
<Box
|
||||
|
||||
<Box
|
||||
sx={{
|
||||
height: "500px",
|
||||
width: '100%',
|
||||
|
@ -387,7 +387,7 @@ const Partner_Client = (props) => {
|
|||
onSelectionModelChange={(newSelectionModel) => {
|
||||
|
||||
setSelectionModel(newSelectionModel);
|
||||
if( newSelectionModel.length === 1)
|
||||
if (newSelectionModel.length === 1)
|
||||
handleClick_edit_session_From_Line(newSelectionModel);
|
||||
}}
|
||||
selectionModel={selectionModel}
|
||||
|
|
|
@ -310,7 +310,7 @@ function Partner_Invoicing_Data(props) {
|
|||
),
|
||||
}}
|
||||
value={p_nom}
|
||||
onChange={(e) => setp_nom(e.target.value)}
|
||||
onBlur={(e) => setp_nom(e.target.value)}
|
||||
|
||||
/>
|
||||
|
||||
|
@ -329,7 +329,7 @@ function Partner_Invoicing_Data(props) {
|
|||
),
|
||||
}}
|
||||
value={p_vat_num}
|
||||
onChange={(e) => setp_vat_num(e.target.value)}
|
||||
onBlur={(e) => setp_vat_num(e.target.value)}
|
||||
|
||||
/>
|
||||
|
||||
|
@ -348,7 +348,7 @@ function Partner_Invoicing_Data(props) {
|
|||
),
|
||||
}}
|
||||
value={p_telephone}
|
||||
onChange={(e) => setp_telephone(e.target.value)}
|
||||
onBlur={(e) => setp_telephone(e.target.value)}
|
||||
|
||||
/>
|
||||
|
||||
|
@ -367,7 +367,7 @@ function Partner_Invoicing_Data(props) {
|
|||
),
|
||||
}}
|
||||
value={p_email}
|
||||
onChange={(e) => setp_email(e.target.value)}
|
||||
onBlur={(e) => setp_email(e.target.value)}
|
||||
|
||||
/>
|
||||
|
||||
|
@ -386,7 +386,7 @@ function Partner_Invoicing_Data(props) {
|
|||
),
|
||||
}}
|
||||
value={p_adr_street}
|
||||
onChange={(e) => setp_adr_street(e.target.value)}
|
||||
onBlur={(e) => setp_adr_street(e.target.value)}
|
||||
|
||||
/>
|
||||
|
||||
|
@ -404,7 +404,7 @@ function Partner_Invoicing_Data(props) {
|
|||
),
|
||||
}}
|
||||
value={p_adr_zip}
|
||||
onChange={(e) => setp_adr_zip(e.target.value)}
|
||||
onBlur={(e) => setp_adr_zip(e.target.value)}
|
||||
|
||||
/>
|
||||
|
||||
|
@ -422,7 +422,7 @@ function Partner_Invoicing_Data(props) {
|
|||
),
|
||||
}}
|
||||
value={p_adr_city}
|
||||
onChange={(e) => setp_adr_city(e.target.value)}
|
||||
onBlur={(e) => setp_adr_city(e.target.value)}
|
||||
|
||||
/>
|
||||
<br />
|
||||
|
@ -440,7 +440,7 @@ function Partner_Invoicing_Data(props) {
|
|||
),
|
||||
}}
|
||||
value={p_adr_country}
|
||||
onChange={(e) => setp_adr_country(e.target.value)}
|
||||
onBlur={(e) => setp_adr_country(e.target.value)}
|
||||
|
||||
/>
|
||||
|
||||
|
|
|
@ -876,7 +876,7 @@ const Partner_Securite_Data = (props) => {
|
|||
),
|
||||
}}
|
||||
value={p_current_email}
|
||||
onChange={(e) => setp_current_email(e.target.value)}
|
||||
onBlur={(e) => setp_current_email(e.target.value)}
|
||||
/>
|
||||
|
||||
<TextField
|
||||
|
@ -891,7 +891,7 @@ const Partner_Securite_Data = (props) => {
|
|||
),
|
||||
}}
|
||||
value={p_new_email}
|
||||
onChange={(e) => setp_new_email(e.target.value)}
|
||||
onBlur={(e) => setp_new_email(e.target.value)}
|
||||
/>
|
||||
|
||||
<TextField
|
||||
|
@ -906,7 +906,7 @@ const Partner_Securite_Data = (props) => {
|
|||
),
|
||||
}}
|
||||
value={p_conf_new_email}
|
||||
onChange={(e) => setp_conf_new_email(e.target.value)}
|
||||
onBlur={(e) => setp_conf_new_email(e.target.value)}
|
||||
/>
|
||||
<div className="text_pwd_crit">
|
||||
|
||||
|
|
Loading…
Reference in New Issue