14/12/2023 - 16h16
parent
3801817487
commit
59b5dba3ee
|
@ -228,7 +228,7 @@ const AddClassManual = (props) => {
|
|||
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/delete_Class_by_internal_url/";
|
||||
|
||||
setLoading(true);
|
||||
fetch(
|
||||
myurl,
|
||||
{
|
||||
|
@ -238,6 +238,7 @@ const AddClassManual = (props) => {
|
|||
)
|
||||
.then((response) => response.json())
|
||||
.then((result) => {
|
||||
setLoading(false);
|
||||
//console.log('Success:', result['message'], "result['status'] = ", result['status']);
|
||||
setimportmessage(result['message']);
|
||||
setmyApiResponse(result['status']);
|
||||
|
@ -291,6 +292,7 @@ const AddClassManual = (props) => {
|
|||
|
||||
})
|
||||
.catch((error) => {
|
||||
setLoading(false);
|
||||
console.error('Error:', error);
|
||||
setmyApiResponse("false");
|
||||
});
|
||||
|
@ -313,7 +315,10 @@ const AddClassManual = (props) => {
|
|||
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
||||
setLoading(true);
|
||||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
setLoading(false);
|
||||
//console.log(" In Getall_Training_Employee_No_Filter res.data.status = " + res.data.status);
|
||||
//console.log(" In Getall_Training_Employee_No_Filter res.data.message r_class = " + res.data.message);
|
||||
setGetall_Training_Employee_No_Filter_api("true");
|
||||
|
@ -326,6 +331,7 @@ const AddClassManual = (props) => {
|
|||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.warn('Not good man :( Getall_Training_Employee_No_Filter = ', error);
|
||||
setGetall_Training_Employee_No_Filter_api("false");
|
||||
alert(" Impossible de recuperer la liste des employés");
|
||||
|
@ -338,6 +344,7 @@ const AddClassManual = (props) => {
|
|||
|
||||
Get_Partner_Object_Specific_Fields("myclass");
|
||||
Getall_Training_Employee_No_Filter();
|
||||
Get_List_Niveau_Formation();
|
||||
|
||||
setfield_description("");
|
||||
setfield_objectif("");
|
||||
|
@ -406,8 +413,10 @@ const AddClassManual = (props) => {
|
|||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_partner_class/";
|
||||
|
||||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
if (String(res.data.status) === String("true")) {
|
||||
setLoading(false);
|
||||
//console.log(" In get_partner_class res.data.status = " + res.data.status);
|
||||
//console.log(" In get_partner_class res.data.message r_class = " + res.data.message);
|
||||
setmyApiResponse("True");
|
||||
|
@ -499,10 +508,10 @@ const AddClassManual = (props) => {
|
|||
setmycertif("0");
|
||||
|
||||
if (mylocaltraining.class_level) {
|
||||
document.getElementsByName("class_level")[0].value = mylocaltraining.class_level;
|
||||
setp_class_level(mylocaltraining.class_level);
|
||||
}
|
||||
else
|
||||
document.getElementsByName("class_level")[0].value = "2";
|
||||
setp_class_level("2");
|
||||
|
||||
|
||||
if (mylocaltraining.price)
|
||||
|
@ -627,6 +636,7 @@ const AddClassManual = (props) => {
|
|||
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.warn('Not good man :( mysearchtext = ');
|
||||
setmyApiResponse("False");
|
||||
//setmyApimyApiMessage("")
|
||||
|
@ -681,7 +691,7 @@ const AddClassManual = (props) => {
|
|||
var distentiel = document.getElementsByName("distentiel")[0].value;
|
||||
var domaine = document.getElementsByName("domaine")[0].value;
|
||||
var mypublier = document.getElementsByName("published")[0].value;
|
||||
var niveau_ftion = document.getElementsByName("class_level")[0].value;
|
||||
var niveau_ftion = p_class_level;
|
||||
var price = document.getElementsByName("price")[0].value;
|
||||
var duree = document.getElementsByName("duree")[0].value;
|
||||
var url = document.getElementsByName("url")[0].value;
|
||||
|
@ -936,7 +946,7 @@ const AddClassManual = (props) => {
|
|||
function Get_List_Metiers() {
|
||||
var form = new FormData();
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_List_metier_formation/";
|
||||
|
||||
setLoading(true);
|
||||
fetch(myurl,
|
||||
{
|
||||
method: 'POST',
|
||||
|
@ -944,6 +954,7 @@ const AddClassManual = (props) => {
|
|||
})
|
||||
.then((data) => data.json())
|
||||
.then((data) => {
|
||||
setLoading(false);
|
||||
//console.log(' IN Get_List_Metiers Success:', data['message'], "data['status'] = ", data['status']);
|
||||
|
||||
if (String(data['status']) === String("true")) {
|
||||
|
@ -957,6 +968,7 @@ const AddClassManual = (props) => {
|
|||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.error('Error Get_List_Metiers :', error);
|
||||
setGet_List_Metiers_api("false");
|
||||
});
|
||||
|
@ -1074,7 +1086,7 @@ const AddClassManual = (props) => {
|
|||
form.append("token", stored_cookie);
|
||||
form.append("class_external_code", class_external_code);
|
||||
form.append("type", "partner");
|
||||
|
||||
setLoading(true);
|
||||
fetch(
|
||||
process.env.REACT_APP_API_URL + "myclass/api/DeleteRecodedClassImage/",
|
||||
{
|
||||
|
@ -1083,6 +1095,7 @@ const AddClassManual = (props) => {
|
|||
}
|
||||
).then((response) => response.json())
|
||||
.then((result) => {
|
||||
setLoading(false);
|
||||
|
||||
//console.log(' removeRecodedClassImage : status:', result['status']);
|
||||
//console.log('removeRecodedClassImage : Success:', result['message']);
|
||||
|
@ -1107,6 +1120,7 @@ const AddClassManual = (props) => {
|
|||
|
||||
})
|
||||
.catch((error) => {
|
||||
setLoading(false);
|
||||
console.error('Error:');
|
||||
setisimgclassSelected(true);
|
||||
setisimgclassdeleted("0");
|
||||
|
@ -1134,6 +1148,7 @@ const AddClassManual = (props) => {
|
|||
formData.append("class_external_code", class_external_code);
|
||||
|
||||
formData.append("type", "partner");
|
||||
setLoading(true);
|
||||
fetch(
|
||||
process.env.REACT_APP_API_URL + "myclass/api/recordClassImage/",
|
||||
{
|
||||
|
@ -1142,6 +1157,7 @@ const AddClassManual = (props) => {
|
|||
}
|
||||
).then((response) => response.json())
|
||||
.then((result) => {
|
||||
setLoading(false);
|
||||
//console.log('status:', result['status']);
|
||||
//console.log('Success:', result['message']);
|
||||
setisimgclassSelected(false);
|
||||
|
@ -1157,6 +1173,7 @@ const AddClassManual = (props) => {
|
|||
|
||||
})
|
||||
.catch((error) => {
|
||||
setLoading(false);
|
||||
console.error('Error:');
|
||||
setisimgclassSelected(true);
|
||||
setisimgclassSaved("0");
|
||||
|
@ -1185,10 +1202,11 @@ const AddClassManual = (props) => {
|
|||
form.append("type", "partner");
|
||||
form.append("class_external_code", class_external_code);
|
||||
|
||||
|
||||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
||||
if (res.data.status != "False") {
|
||||
setLoading(false);
|
||||
//console.log(" getClassImage : In test res.data.status = " + res.data.status);
|
||||
//console.log(" getClassImage: res.data.message.img = " + res.data.message);
|
||||
|
||||
|
@ -1210,6 +1228,7 @@ const AddClassManual = (props) => {
|
|||
//alert("4");
|
||||
}
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.warn('getClassImage ee: Not good man :( getClassImage = ');
|
||||
setisclassimage("False");
|
||||
setuserimgclassprofil("");
|
||||
|
@ -1348,10 +1367,11 @@ const AddClassManual = (props) => {
|
|||
form.append("object_name", local_collection_obj_metier);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Partner_Object_Specific_Valide_Displayed_Fields/";
|
||||
|
||||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
setLoading(false);
|
||||
//console.log(" In Get_Partner_Object_Specific_Fields res.data.status = " + res.data.status);
|
||||
//console.log(" In Get_Partner_Object_Specific_Fields res.data.message r_class = " + res.data.message);
|
||||
|
||||
|
@ -1370,6 +1390,7 @@ const AddClassManual = (props) => {
|
|||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.warn('Not good man :( Get_Partner_Object_Specific_Fields = ', error);
|
||||
setGet_Partner_Object_Specific_Fields_api("false");
|
||||
alert(" Impossible de recuperer la liste des collection et champs personnalisables");
|
||||
|
@ -1378,6 +1399,49 @@ const AddClassManual = (props) => {
|
|||
}
|
||||
|
||||
|
||||
const [Get_List_Niveau_Formation_api, setGet_List_Niveau_Formation_api] = useState();
|
||||
const [Get_List_Niveau_Formation_message, setGet_List_Niveau_Formation_message] = useState();
|
||||
const [Get_List_Niveau_Formation_result, setGet_List_Niveau_Formation_result] = useState([]);
|
||||
function Get_List_Niveau_Formation() {
|
||||
var form = new FormData();
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Class_Niveau_Formation/";
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
|
||||
setLoading(true);
|
||||
fetch(myurl,
|
||||
{
|
||||
method: 'POST',
|
||||
body: form,
|
||||
})
|
||||
.then((data) => data.json())
|
||||
.then((data) => {
|
||||
setLoading(false);
|
||||
//console.log(' IN Get_List_Niveau_Formation Success:', data['message'], "data['status'] = ", data['status']);
|
||||
|
||||
if (String(data['status']) === String("true")) {
|
||||
setGet_List_Niveau_Formation_api("true");
|
||||
setGet_List_Niveau_Formation_result(data['message']);
|
||||
|
||||
}
|
||||
else {
|
||||
setGet_List_Niveau_Formation_api("false");
|
||||
setGet_List_Niveau_Formation_message(data['message']);
|
||||
alert(data['message'])
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.error('Error Get_List_Niveau_Formation :', error);
|
||||
setGet_List_Niveau_Formation_api("false");
|
||||
alert(" Impossible de récupérer la liste des niveaux de formation");
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//const [rows_champs_specifics, setrows_champs_specifics] = useState([]);
|
||||
|
||||
// Cas spécifique de cette page.
|
||||
|
@ -1457,6 +1521,8 @@ const AddClassManual = (props) => {
|
|||
const [p_formateur_id, setp_formateur_id] = useState("");
|
||||
const [p_formateur_label, setp_formateur_label] = useState("");
|
||||
|
||||
const [p_class_level, setp_class_level] = useState("");
|
||||
|
||||
|
||||
return (
|
||||
<div className="addclassmanual">
|
||||
|
@ -1623,14 +1689,31 @@ const AddClassManual = (props) => {
|
|||
<TextField
|
||||
name="class_level"
|
||||
label="Niveau (2 à 8)"
|
||||
type="number"
|
||||
select
|
||||
inputProps={{ min: "2", max: "8", step: "1" }}
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
/>
|
||||
value={p_class_level}
|
||||
onChange={(e) => {
|
||||
setp_class_level(e.target.value);
|
||||
DataUpdated();
|
||||
}
|
||||
}
|
||||
>
|
||||
|
||||
{Get_List_Niveau_Formation_result &&
|
||||
Get_List_Niveau_Formation_result.map((niveau) => (
|
||||
<MenuItem key={JSON.parse(niveau).code} value={JSON.parse(niveau).code}
|
||||
style={{ "paddingLeft": "5px", "textAlign": "left", "height": "2rem", "width": '100%' }}>
|
||||
{JSON.parse(niveau).description}
|
||||
|
||||
</MenuItem>
|
||||
))}
|
||||
|
||||
</TextField>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
@ -1,42 +1,28 @@
|
|||
import React, { useRef, useState, useEffect } from "react";
|
||||
import Box from '@mui/material/Box';
|
||||
|
||||
import TextField from '@mui/material/TextField';
|
||||
import MenuItem from '@mui/material/MenuItem';
|
||||
import { confirmAlert } from 'react-confirm-alert'; // Import
|
||||
|
||||
import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css
|
||||
import Button from '@mui/material/Button';
|
||||
import axios from "axios";
|
||||
import DeleteIcon from '@mui/icons-material/Delete';
|
||||
import { getCookie, setCookie } from 'react-use-cookie';
|
||||
import { Alert } from "@mui/material";
|
||||
import { AiTwotoneEdit, AiTwotoneSave } from "react-icons/ai";
|
||||
import profileimg from "../mysy_img/MYSY-profil-2.png";
|
||||
import Abonnement from "./Abonnement";
|
||||
import { ConstructionOutlined, PropaneSharp } from "@mui/icons-material";
|
||||
import { useHistory } from "react-router-dom";
|
||||
import CheckOut from "./CheckOut";
|
||||
|
||||
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
|
||||
import { RichTextEditor } from '@mantine/rte';
|
||||
import { Editor } from '@tinymce/tinymce-react';
|
||||
import { IoArrowUndoCircle } from "react-icons/io5";
|
||||
|
||||
import { GrUserAdmin, GrOrderedList } from "react-icons/gr";
|
||||
import parse from 'html-react-parser';
|
||||
|
||||
import 'react-tooltip/dist/react-tooltip.css'
|
||||
import { Tooltip } from 'react-tooltip'
|
||||
|
||||
import GestionAdministrative from "./GestionAdministrative";
|
||||
import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io";
|
||||
import { Fab } from "@material-ui/core";
|
||||
import { ConsoleView } from "react-device-detect";
|
||||
import fileDownload from 'js-file-download'
|
||||
import { CiEdit, CiTrash } from "react-icons/ci";
|
||||
import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5";
|
||||
import { AiOutlineUserAdd } from "react-icons/ai";
|
||||
import PartnerClientActivite from "./PartnerClient_Activite";
|
||||
import Popup from 'reactjs-popup';
|
||||
import 'reactjs-popup/dist/index.css';
|
||||
|
||||
import ToggleSwitch from "./ToggleSwitch";
|
||||
|
||||
const AddParnerClient = (props) => {
|
||||
const history = useHistory();
|
||||
|
@ -380,6 +366,7 @@ const AddParnerClient = (props) => {
|
|||
|
||||
const [addcontact, setaddcontact] = useState("0");
|
||||
function Add_Contact() {
|
||||
setis_contact_include_com(false);
|
||||
setdatamodification_contact("0");
|
||||
setformedit_mode_contact("1");
|
||||
clean_contact_set_values();
|
||||
|
@ -396,6 +383,7 @@ const AddParnerClient = (props) => {
|
|||
setdatamodification_invoice("0");
|
||||
setformedit_mode_contact("0");
|
||||
setcurrent_contact_recid("");
|
||||
setis_contact_include_com(false);
|
||||
}
|
||||
|
||||
const [Get_List_Client_Type_api, setGet_List_Client_Type_api] = useState();
|
||||
|
@ -413,8 +401,8 @@ const AddParnerClient = (props) => {
|
|||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Client_Type_List/";
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
console.log(" In Get_List_Client_Type res.data.status = " + res.data.status);
|
||||
console.log(" In Get_List_Client_Type res.data.message r_class = " + res.data.message);
|
||||
//console.log(" In Get_List_Client_Type res.data.status = " + res.data.status);
|
||||
//console.log(" In Get_List_Client_Type res.data.message r_class = " + res.data.message);
|
||||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
setGet_List_Client_Type_api("true");
|
||||
|
@ -536,7 +524,7 @@ const AddParnerClient = (props) => {
|
|||
|
||||
setp_client_type_id(mylocalclient.client_type_id);
|
||||
setp_client_type_label(mylocalclient.client_type_code);
|
||||
}else{
|
||||
} else {
|
||||
setp_client_type_id("");
|
||||
setp_client_type_label("");
|
||||
}
|
||||
|
@ -1695,6 +1683,7 @@ const AddParnerClient = (props) => {
|
|||
|
||||
function retour_liste_contact() {
|
||||
setaddcontact("0");
|
||||
setdatamodification_contact('0');
|
||||
}
|
||||
|
||||
|
||||
|
@ -1866,6 +1855,12 @@ const AddParnerClient = (props) => {
|
|||
}
|
||||
form.append("adr_pays", contact_pays);
|
||||
|
||||
var include_com = "0"
|
||||
if (is_contact_include_com) {
|
||||
include_com = "1";
|
||||
}
|
||||
form.append("include_com", include_com);
|
||||
|
||||
|
||||
var contact_telephone = ""
|
||||
if (document.getElementsByName("contact_telephone")) {
|
||||
|
@ -1890,7 +1885,8 @@ const AddParnerClient = (props) => {
|
|||
Get_List_Contact_Of_client_Part();
|
||||
|
||||
setaddcontact("0");
|
||||
setdatamodification_contact("")
|
||||
setdatamodification_contact("");
|
||||
setis_contact_include_com(false)
|
||||
alert(res.data.message);
|
||||
|
||||
|
||||
|
@ -1947,8 +1943,8 @@ const AddParnerClient = (props) => {
|
|||
|
||||
axios.post(myurl, form).then(res => {
|
||||
if (String(res.data.status) === String("true")) {
|
||||
console.log(" In Display_Part_Client_Contact res.data.status = " + res.data.status);
|
||||
console.log(" In Display_Part_Client_Contact res.data.message = " + res.data.message);
|
||||
//console.log(" In Display_Part_Client_Contact res.data.status = " + res.data.status);
|
||||
//console.log(" In Display_Part_Client_Contact res.data.message = " + res.data.message);
|
||||
setDisplay_Part_Client_Contact_api("true");
|
||||
setDisplay_Part_Client_Contact_result(res.data.message);
|
||||
Get_List_Contact_Of_client_Part();
|
||||
|
@ -1976,6 +1972,15 @@ const AddParnerClient = (props) => {
|
|||
setp_contact_prenom("");
|
||||
|
||||
|
||||
setis_contact_include_com(false);
|
||||
if (mylocalclient_contact.include_com){
|
||||
|
||||
if (String(mylocalclient_contact.include_com) === "1")
|
||||
setis_contact_include_com(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (mylocalclient_contact.siret)
|
||||
setcontact_siret(mylocalclient_contact.siret);
|
||||
else
|
||||
|
@ -2068,6 +2073,65 @@ const AddParnerClient = (props) => {
|
|||
}
|
||||
|
||||
|
||||
const [Delete_Part_Client_Contact_api, setDelete_Part_Client_Contact_api] = useState("");
|
||||
const [Delete_Part_Client_Contact_result, setDelete_Part_Client_Contact_result] = useState("");
|
||||
const [Delete_Part_Client_Contact_message, setDelete_Part_Client_Contact_message] = useState("");
|
||||
function Delete_Part_Client_Contact(event) {
|
||||
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
var contactmail = event.currentTarget.getAttribute('contactmail');
|
||||
|
||||
var contact_id = event.currentTarget.getAttribute('contact_id');
|
||||
|
||||
setelected_contact_id(contact_id);
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("_id", contact_id);
|
||||
|
||||
form.append("related_collection", "partner_client");
|
||||
form.append("related_collection_owner_id", props.client_id);
|
||||
|
||||
//console.log(" ### contactmail = ", contactmail);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Delete_Given_Contact/";
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
if (String(res.data.status) === String("true")) {
|
||||
//console.log(" In Delete_Part_Client_Contact res.data.status = " + res.data.status);
|
||||
//console.log(" In Delete_Part_Client_Contact res.data.message = " + res.data.message);
|
||||
setDelete_Part_Client_Contact_api("true");
|
||||
setDelete_Part_Client_Contact_result(res.data.message);
|
||||
Get_List_Contact_Of_client_Part();
|
||||
|
||||
|
||||
|
||||
}
|
||||
else if (String(res.data.status) === String("Err_Connexion")) {
|
||||
alert('Erreur: ' + res.data.message);
|
||||
history.push("/Connexion");
|
||||
return;
|
||||
}
|
||||
else {
|
||||
|
||||
setDelete_Part_Client_Contact_api("false");
|
||||
setDelete_Part_Client_Contact_message(res.data.message);
|
||||
alert(res.data.message);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}).catch((error) => {
|
||||
console.warn('Not good man :( Delete_Part_Client_Contact = ', error);
|
||||
setDelete_Part_Client_Contact_result("false");
|
||||
setDelete_Part_Client_Contact_message(" Impossible de recuperer les detail du contact")
|
||||
alert(" Impossible de supprimer le contact");
|
||||
|
||||
})
|
||||
}
|
||||
const [is_contact_include_com, setis_contact_include_com] = useState(false);
|
||||
|
||||
return (
|
||||
<div className="add_partner_client">
|
||||
|
@ -2403,7 +2467,7 @@ const AddParnerClient = (props) => {
|
|||
|
||||
onChange={(e) => {
|
||||
setp_client_type_id(e.target.value);
|
||||
|
||||
|
||||
}}
|
||||
>
|
||||
|
||||
|
@ -2722,11 +2786,84 @@ const AddParnerClient = (props) => {
|
|||
{Get_List_Contact_Of_client_Part_result && String(Get_List_Contact_Of_client_Part_api) === "true" &&
|
||||
Get_List_Contact_Of_client_Part_result.map((client) => (
|
||||
|
||||
<div contactmail={String(JSON.parse(client).email)} contact_id={String(JSON.parse(client)._id)} onClick={Display_Part_Client_Contact}>
|
||||
{(JSON.parse(client).nom || JSON.parse(client).prenom) && <nav className="grid_title"> {String(JSON.parse(client).prenom)} {String(JSON.parse(client).nom)} <hr /> </nav>}
|
||||
{JSON.parse(client).fonction && <nav> {String(JSON.parse(client).fonction)} </nav>}
|
||||
{JSON.parse(client).email && <nav> {String(JSON.parse(client).email)} </nav>}
|
||||
{JSON.parse(client).telephone && <nav> {String(JSON.parse(client).telephone)} </nav>}
|
||||
<div >
|
||||
{(JSON.parse(client).nom || JSON.parse(client).prenom) &&
|
||||
<nav style={{ "width": "100%", "float": "left" }}>
|
||||
<nav className="grid_title" style={{ "width": "75%", "float": "left" }} contactmail={String(JSON.parse(client).email)} contact_id={String(JSON.parse(client)._id)} onClick={Display_Part_Client_Contact}>
|
||||
{String(JSON.parse(client).prenom)} {String(JSON.parse(client).nom)}
|
||||
|
||||
</nav>
|
||||
<nav style={{ "width": "10%", "float": "left" }}>
|
||||
<CiEdit style={{ "border": "1px solid", "cursor": "pointer" }} contactmail={String(JSON.parse(client).email)} contact_id={String(JSON.parse(client)._id)} onClick={Display_Part_Client_Contact} />
|
||||
</nav>
|
||||
<Popup
|
||||
trigger={
|
||||
<nav style={{ "width": "10%", "float": "right", "cursor": "pointer" }}>
|
||||
<CiTrash style={{ "color": "red", "border": "1px solid" }} />
|
||||
</nav>
|
||||
|
||||
|
||||
}
|
||||
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, le contact 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) => {
|
||||
|
||||
Delete_Part_Client_Contact(event);
|
||||
close();
|
||||
}}
|
||||
contactmail={String(JSON.parse(client).email)} contact_id={String(JSON.parse(client)._id)}
|
||||
|
||||
> 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>
|
||||
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
}
|
||||
|
||||
<div className="div_row" style={{ "border": "None", "marginTop": "2px", "marginBottom": "2px" }}>
|
||||
<hr className="hr_break" style={{ "marginTop": "2px", "marginBottom": "2px" }} />
|
||||
</div>
|
||||
<nav style={{ "fontSize": '12px', fontWeight: "600", letterSpacing: "2px", color: "#616161", "marginTop": "1rem" }} >
|
||||
|
||||
{JSON.parse(client).fonction && <nav> {String(JSON.parse(client).fonction)} </nav>}
|
||||
{JSON.parse(client).email && <nav> {String(JSON.parse(client).email)} </nav>}
|
||||
{JSON.parse(client).telephone && <nav> {String(JSON.parse(client).telephone)} </nav>}
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -2975,6 +3112,31 @@ const AddParnerClient = (props) => {
|
|||
/>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
<hr className="hr_break" />
|
||||
</div>
|
||||
<Tooltip id="tooltip_com" style={{ "fontSize": "12px" }} />
|
||||
<a data-tooltip-id="tooltip_com" data-tooltip-content="Si oui, ce contact recevra tous les emails échangés">
|
||||
<div className="session_caract" style={{ "float": "right", "fontSize": "12px", 'fontWeight': 'bolder', }}>
|
||||
|
||||
<nav onChange={(e) => {
|
||||
DataUpdated_Contact_Data();
|
||||
setformedit_mode_contact("1");
|
||||
//console.log("is_contact_include_com == ", is_contact_include_com);
|
||||
if (is_contact_include_com === true)
|
||||
setis_contact_include_com(false)
|
||||
else
|
||||
setis_contact_include_com(true)
|
||||
|
||||
}}
|
||||
id="toggleSwitchNav" name="toggleSwitchNav">
|
||||
<ToggleSwitch
|
||||
label="Inclure / Exclure de la communication ? " id="toggleSwitch" name="toggleSwitch" checked={is_contact_include_com} style={{ height: "2rem" }} />
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -318,6 +318,10 @@ const Employes = (props) => {
|
|||
{ field: 'date_fin', headerName: 'Au', width: 150, hide: false, },
|
||||
{ field: 'type_contrat', headerName: 'Type Contrat', flex: 1, hide: false, width: 150, },
|
||||
{ field: 'type_employe', headerName: 'Type Employé', flex: 1, hide: false, width: 150, },
|
||||
{ field: 'qte', headerName: 'Quanité', flex: 1, hide: true, width: 150, },
|
||||
{ field: 'cout', headerName: 'Prix', flex: 1, hide: true, width: 150, },
|
||||
{ field: 'comment', headerName: 'Commentaire', flex: 1, hide: true, width: 150, },
|
||||
|
||||
|
||||
{
|
||||
field: "delete", headerName: 'Supprimer',
|
||||
|
@ -515,14 +519,14 @@ const Employes = (props) => {
|
|||
form.append("rh_id", local_employe_id);
|
||||
|
||||
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Employee_Contrat/";
|
||||
|
||||
|
||||
|
||||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
setLoading(false);
|
||||
//console.log(" In Getall_Employee_Contrat res.data.status = " + res.data.status);
|
||||
//console.log(" In Getall_Employee_Contrat res.data.message r_class = " + res.data.message);
|
||||
setGetall_Employee_Contrat_api("true");
|
||||
|
@ -536,6 +540,7 @@ const Employes = (props) => {
|
|||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.warn('Not good man :( Getall_Employee_Contrat = ', error);
|
||||
setGetall_Employee_Contrat_api("false");
|
||||
alert(" Impossible de recuperer les contrat de l'employé");
|
||||
|
@ -545,6 +550,47 @@ const Employes = (props) => {
|
|||
|
||||
|
||||
|
||||
|
||||
const [Getall_Employee_Type_Contrat_api, setGetall_Employee_Type_Contrat_api] = useState();
|
||||
const [Getall_Employee_Type_Contrat_message, setGetall_Employee_Type_Contrat_message] = useState();
|
||||
const [Getall_Employee_Type_Contrat_result, setGetall_Employee_Type_Contrat_result] = useState([]);
|
||||
function Getall_Employee_Type_Contrat() {
|
||||
|
||||
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_Type_Contrat_List/";
|
||||
|
||||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
setLoading(false);
|
||||
//console.log(" In Getall_Employee_Type_Contrat res.data.status = " + res.data.status);
|
||||
//console.log(" In Getall_Employee_Type_Contrat res.data.message r_class = " + res.data.message);
|
||||
setGetall_Employee_Type_Contrat_api("true");
|
||||
setGetall_Employee_Type_Contrat_result(res.data.message);
|
||||
|
||||
}
|
||||
else {
|
||||
setGetall_Employee_Type_Contrat_api("false");
|
||||
setGetall_Employee_Type_Contrat_message(res.data.message);
|
||||
alert(res.data.message)
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.warn('Not good man :( Getall_Employee_Type_Contrat = ', error);
|
||||
setGetall_Employee_Type_Contrat_api("false");
|
||||
alert(" Impossible de recuperer les contrat de l'employé");
|
||||
//setmyApimyApiMessage("")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function clean_all_filters() {
|
||||
setp_filtre1();
|
||||
setp_filtre1_value();
|
||||
|
@ -705,6 +751,9 @@ const Employes = (props) => {
|
|||
//console.log(" ### employe_id = ", employe_id);
|
||||
Display_Detail_Employe(employe_id);
|
||||
|
||||
Get_List_Managers();
|
||||
Get_List_RH_Profils();
|
||||
Get_Employee_Related_Target_Collection_Data();
|
||||
|
||||
if (document.getElementById('myRef')) {
|
||||
var divh = document.getElementById('myRef').offsetTop;
|
||||
|
@ -2142,11 +2191,22 @@ const Employes = (props) => {
|
|||
const [Employee_data_changed, setEmployee_data_changed] = useState();
|
||||
|
||||
const [add_One_Employee, setadd_One_Employee] = useState();
|
||||
|
||||
const myRef_new_employee = useRef(null)
|
||||
|
||||
function submenu_add_one_employee() {
|
||||
setdisplay_detail_employe();
|
||||
setadd_One_Employee("1");
|
||||
setsubmenu("detail_employe");
|
||||
|
||||
if (document.getElementById('myRef_new_employee')) {
|
||||
var divh = document.getElementById('myRef_new_employee').offsetTop;
|
||||
window.scrollTo({
|
||||
top: divh,
|
||||
behavior: "smooth",
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function Annule_add_one_Employee() {
|
||||
|
@ -3795,10 +3855,12 @@ const Employes = (props) => {
|
|||
|
||||
const Dialog_employe_contrat_handleClose_buton = () => {
|
||||
|
||||
setp_employe_contrat_type_contrat();
|
||||
setp_employe_contrat_type_employe();
|
||||
setp_employe_contrat_cout();
|
||||
setp_employe_contrat_groupe_prix_achat_id();
|
||||
setp_employe_contrat_type_contrat("");
|
||||
setp_employe_contrat_type_employe("");
|
||||
setp_employe_contrat_cout("");
|
||||
setp_employe_contrat_comment("");
|
||||
setp_employe_contrat_groupe_prix_achat_id("");
|
||||
setp_employe_contrat_quantite("");
|
||||
setp_employe_contrat_date_debut(new Date().toLocaleDateString('fr-FR'));
|
||||
setp_employe_contrat_date_fin(date_today_90j.toLocaleDateString('fr-FR'));
|
||||
setselected_contrat_id("");
|
||||
|
@ -3874,8 +3936,10 @@ const Employes = (props) => {
|
|||
const [p_employe_contrat_type_employe, setp_employe_contrat_type_employe] = useState("");
|
||||
const [p_employe_contrat_cout, setp_employe_contrat_cout] = useState("");
|
||||
const [p_employe_contrat_groupe_prix_achat_id, setp_employe_contrat_groupe_prix_achat_id] = useState("");
|
||||
const [p_employe_contrat_quantite, setp_employe_contrat_quantite] = useState("");
|
||||
const [p_employe_contrat_date_debut, setp_employe_contrat_date_debut] = useState(new Date().toLocaleDateString('fr-FR'));
|
||||
const [p_employe_contrat_date_fin, setp_employe_contrat_date_fin] = useState(date_today_90j.toLocaleDateString('fr-FR'));
|
||||
const [p_employe_contrat_comment, setp_employe_contrat_comment] = useState("");
|
||||
|
||||
const [Get_Partner_Purchase_Prices_api, setGet_Partner_Purchase_Prices_api] = useState();
|
||||
const [Get_Partner_Purchase_Prices_message, setGet_Partner_Purchase_Prices_message] = useState();
|
||||
|
@ -3930,10 +3994,21 @@ const Employes = (props) => {
|
|||
setp_employe_contrat_type_contrat(line.type_contrat);
|
||||
setp_employe_contrat_type_employe(line.type_employe);
|
||||
setp_employe_contrat_cout(line.cout);
|
||||
|
||||
setp_employe_contrat_comment(line.comment);
|
||||
|
||||
|
||||
setp_employe_contrat_groupe_prix_achat_id(line.groupe_prix_achat_id);
|
||||
|
||||
setp_employe_contrat_quantite(line.qte);
|
||||
|
||||
if (String(line.qte) !== "")
|
||||
settype_contrat_qte("1");
|
||||
|
||||
setp_employe_contrat_date_debut(line.date_debut);
|
||||
setp_employe_contrat_date_fin(line.date_fin);
|
||||
|
||||
Getall_Employee_Type_Contrat();
|
||||
setDialog_employe_contrat_open(true);
|
||||
|
||||
}
|
||||
|
@ -3949,6 +4024,9 @@ const Employes = (props) => {
|
|||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
|
||||
if (String(p_employe_contrat_comment).length > 255) {
|
||||
alert(" Le commentaire du contrat ne doit pas depasser 255 caractères")
|
||||
}
|
||||
|
||||
var myurl = "";
|
||||
|
||||
|
@ -3962,7 +4040,9 @@ const Employes = (props) => {
|
|||
form.append("type_contrat", p_employe_contrat_type_contrat);
|
||||
form.append("type_employe", p_employe_contrat_type_employe);
|
||||
form.append("cout", p_employe_contrat_cout);
|
||||
form.append("quantite", p_employe_contrat_quantite);
|
||||
form.append("groupe_prix_achat_id", p_employe_contrat_groupe_prix_achat_id);
|
||||
form.append("comment", p_employe_contrat_comment);
|
||||
|
||||
|
||||
|
||||
|
@ -3976,7 +4056,9 @@ const Employes = (props) => {
|
|||
form.append("type_contrat", p_employe_contrat_type_contrat);
|
||||
form.append("type_employe", p_employe_contrat_type_employe);
|
||||
form.append("cout", p_employe_contrat_cout);
|
||||
form.append("quantite", p_employe_contrat_quantite);
|
||||
form.append("groupe_prix_achat_id", p_employe_contrat_groupe_prix_achat_id);
|
||||
form.append("comment", p_employe_contrat_comment);
|
||||
}
|
||||
|
||||
setLoading(true);
|
||||
|
@ -4019,6 +4101,7 @@ const Employes = (props) => {
|
|||
}
|
||||
|
||||
const myRef_contrat = useRef(null)
|
||||
const [type_contrat_qte, settype_contrat_qte] = useState();
|
||||
|
||||
return (
|
||||
<div className="employes">
|
||||
|
@ -4232,12 +4315,20 @@ const Employes = (props) => {
|
|||
onChange={(e) => {
|
||||
setp_employe_contrat_type_contrat(e.target.value);
|
||||
setdialog_contrat_data_changed("1");
|
||||
var result2 = Getall_Employee_Type_Contrat_result.filter((val) => JSON.parse(val).code === String(e.target.value));
|
||||
settype_contrat_qte(JSON.parse(result2[0]).quantitatif);
|
||||
|
||||
}
|
||||
}
|
||||
>
|
||||
<MenuItem value="cdi" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >CDI </MenuItem>
|
||||
<MenuItem value="cdd" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >CDD </MenuItem>
|
||||
<MenuItem value="autre" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Autre </MenuItem>
|
||||
{Getall_Employee_Type_Contrat_result &&
|
||||
Getall_Employee_Type_Contrat_result.map((step) => (
|
||||
<MenuItem key={JSON.parse(step).code} value={JSON.parse(step).code}
|
||||
style={{ "paddingLeft": "5px", "textAlign": "left", "height": "2rem", "width": '100%' }}>
|
||||
{JSON.parse(step).description}
|
||||
|
||||
</MenuItem>
|
||||
))}
|
||||
|
||||
</TextField>
|
||||
</div>
|
||||
|
@ -4314,47 +4405,79 @@ const Employes = (props) => {
|
|||
|
||||
</div>
|
||||
|
||||
<div className="session_caract_Dialog" > Groupe de Prix d'Achat
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
<Tooltip id="tooltip_id_1" />
|
||||
<a data-tooltip-id="tooltip_id_1" data-tooltip-content="Si vous souhaitez lier le tarif à un groupe de prix déjà existant ">
|
||||
<div className="session_caract_Dialog" > Groupe de Prix d'Achat
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
|
||||
name="event_dialog_grp_fournisseur"
|
||||
id="event_dialog_grp_fournisseur"
|
||||
name="event_dialog_grp_fournisseur"
|
||||
id="event_dialog_grp_fournisseur"
|
||||
|
||||
fullWidth
|
||||
select
|
||||
fullWidth
|
||||
select
|
||||
|
||||
value={p_employe_contrat_groupe_prix_achat_id}
|
||||
onChange={(e) => {
|
||||
setp_employe_contrat_groupe_prix_achat_id(e.target.value);
|
||||
setdialog_contrat_data_changed("1");
|
||||
}
|
||||
}
|
||||
>
|
||||
{Get_Partner_Purchase_Prices_result &&
|
||||
Get_Partner_Purchase_Prices_result.map((myclient) => (
|
||||
<MenuItem key={JSON.parse(myclient)._id} value={JSON.parse(myclient)._id}
|
||||
style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>
|
||||
{JSON.parse(myclient).code_groupe_prix}
|
||||
value={p_employe_contrat_groupe_prix_achat_id}
|
||||
onChange={(e) => {
|
||||
setp_employe_contrat_groupe_prix_achat_id(e.target.value);
|
||||
setdialog_contrat_data_changed("1");
|
||||
}
|
||||
}
|
||||
>
|
||||
{Get_Partner_Purchase_Prices_result &&
|
||||
Get_Partner_Purchase_Prices_result.map((myclient) => (
|
||||
<MenuItem key={JSON.parse(myclient)._id} value={JSON.parse(myclient)._id}
|
||||
style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>
|
||||
{JSON.parse(myclient).code_groupe_prix}
|
||||
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
|
||||
))}
|
||||
<MenuItem key="" value=""
|
||||
style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>
|
||||
Autre
|
||||
))}
|
||||
<MenuItem key="" value=""
|
||||
style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>
|
||||
Autre
|
||||
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
|
||||
</TextField>
|
||||
</TextField>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
{String(type_contrat_qte) === "1" && <div className="session_caract_Dialog" > Quantité
|
||||
<Tooltip id="tooltip_id_2" />
|
||||
<a data-tooltip-id="tooltip_id_2" data-tooltip-content=" Il s'agit d'un contrat en quantités comme : Le nombre le copies à corriger ">
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
|
||||
name="event_dialog_qte"
|
||||
id="event_dialog_qte"
|
||||
type="number"
|
||||
step="any"
|
||||
fullWidth
|
||||
|
||||
value={p_employe_contrat_quantite}
|
||||
onChange={(e) => {
|
||||
setp_employe_contrat_quantite(e.target.value);
|
||||
setdialog_contrat_data_changed("1");
|
||||
}
|
||||
}
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
{String(p_employe_contrat_groupe_prix_achat_id) === "" && <div className="session_caract_Dialog" > Prix
|
||||
<Tooltip id="tooltip_id_3" />
|
||||
<a data-tooltip-id="tooltip_id_3" data-tooltip-content=" Il s'agit du montant de rémunération (HT) du contrat ">
|
||||
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
|
||||
name="event_dialog_fournisseur"
|
||||
id="event_dialog_fournisseur"
|
||||
name="event_dialog_price"
|
||||
id="event_dialog_qte"
|
||||
type="number"
|
||||
step="any"
|
||||
fullWidth
|
||||
|
@ -4366,8 +4489,31 @@ const Employes = (props) => {
|
|||
}
|
||||
}
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
}
|
||||
<div className="session_caract_Dialog" > Commentaire
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
|
||||
name="event_dialog_price"
|
||||
id="event_dialog_qte"
|
||||
type="text"
|
||||
|
||||
|
||||
fullWidth
|
||||
|
||||
value={p_employe_contrat_cout}
|
||||
onChange={(e) => {
|
||||
if (String(e.target.value).length <= 255) {
|
||||
setp_employe_contrat_cout(e.target.value);
|
||||
setdialog_contrat_data_changed("1");
|
||||
}
|
||||
}
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
{String(dialog_contrat_data_changed) === "1" && <div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center", "width": "100%" }}>
|
||||
/!\ Pensez à enregistrer les modifications
|
||||
|
@ -5723,7 +5869,7 @@ const Employes = (props) => {
|
|||
</div>}
|
||||
|
||||
|
||||
|
||||
<nav id="myRef_new_employee" ref={myRef_new_employee}> </nav>
|
||||
{String(submenu) === "detail_employe" && String(add_One_Employee) === "1" && <div className="div_row">
|
||||
<div className="div_row">
|
||||
<Button variant="outlined" onClick={submenu_detail_employe} className="detail_class_submenu" id='detail_employe' name='detail_employe'>Détail employé</Button>
|
||||
|
@ -7024,6 +7170,10 @@ const Employes = (props) => {
|
|||
date_fin: JSON.parse(item).date_fin,
|
||||
type_contrat: JSON.parse(item).type_contrat,
|
||||
type_employe: JSON.parse(item).type_employe,
|
||||
qte: JSON.parse(item).quantite,
|
||||
cout: JSON.parse(item).cout,
|
||||
comment: JSON.parse(item).comment,
|
||||
|
||||
|
||||
}
|
||||
))}
|
||||
|
@ -7058,14 +7208,18 @@ const Employes = (props) => {
|
|||
<div className="div_row_gauche div_row_gauche_etendu" style={{ "textAlign": "left", "paddingLeft": "5px" }}>
|
||||
<Button variant="outlined" onClick={() => {
|
||||
|
||||
setp_employe_contrat_type_contrat();
|
||||
setp_employe_contrat_type_employe();
|
||||
setp_employe_contrat_cout();
|
||||
setp_employe_contrat_groupe_prix_achat_id();
|
||||
setp_employe_contrat_type_contrat("");
|
||||
setp_employe_contrat_type_employe("");
|
||||
setp_employe_contrat_cout("");
|
||||
setp_employe_contrat_comment("");
|
||||
setp_employe_contrat_groupe_prix_achat_id("");
|
||||
setp_employe_contrat_quantite("");
|
||||
setp_employe_contrat_date_debut(new Date().toLocaleDateString('fr-FR'));
|
||||
setp_employe_contrat_date_fin(date_today_90j.toLocaleDateString('fr-FR'));
|
||||
setselected_contrat_id("");
|
||||
|
||||
Getall_Employee_Type_Contrat();
|
||||
|
||||
setDialog_employe_contrat_open(true);
|
||||
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import { Button, } from "reactstrap";
|
|||
import axios from "axios";
|
||||
import TextField from '@mui/material/TextField';
|
||||
import MenuItem from '@mui/material/MenuItem';
|
||||
import { AiOutlineEdit } from "react-icons/ai";
|
||||
|
||||
import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint } from "react-icons/fc";
|
||||
import { DataGrid, GridToolbar, frFR, GridCellParams } from '@mui/x-data-grid';
|
||||
import { AiFillFolderOpen, AiFillMinusSquare } from "react-icons/ai";
|
||||
|
@ -19,19 +19,18 @@ import Popup from 'reactjs-popup';
|
|||
import 'reactjs-popup/dist/index.css';
|
||||
import DatePicker from "react-datepicker";
|
||||
import "react-datepicker/dist/react-datepicker.css";
|
||||
import setHours from "date-fns/setHours";
|
||||
import setMinutes from "date-fns/setMinutes";
|
||||
|
||||
import ToggleSwitch from "./ToggleSwitch";
|
||||
import { format } from 'date-fns'
|
||||
import moment from "moment";
|
||||
import fileDownload from 'js-file-download'
|
||||
import { ConsoleView } from "react-device-detect";
|
||||
|
||||
import { confirmAlert } from 'react-confirm-alert';
|
||||
import SendIcon from '@mui/icons-material/Send';
|
||||
|
||||
import { FcViewDetails, FcDisapprove } from "react-icons/fc";
|
||||
import parse from 'html-react-parser'
|
||||
import { Editor } from '@tinymce/tinymce-react';
|
||||
import { FcAddImage } from "react-icons/fc";
|
||||
|
||||
import add_plus from "../mysy_img/plus.png";
|
||||
import gif_new from "../mysy_img/new_icon_gif.gif";
|
||||
import excel_icone from "../mysy_img/excel_icone.png";
|
||||
|
|
|
@ -276,7 +276,9 @@ const Partner_Client = (props) => {
|
|||
|
||||
|
||||
function close_detail_client() {
|
||||
|
||||
setSelectionModel([]);
|
||||
setselected_id("");
|
||||
setgridline_id("");
|
||||
setEdite_Client("0");
|
||||
|
||||
}
|
||||
|
@ -618,7 +620,7 @@ const Partner_Client = (props) => {
|
|||
|
||||
</div>
|
||||
|
||||
<div className="div_row" style={{paddingRight: '10px' }}>
|
||||
<div className="div_row" style={{ paddingRight: '10px' }}>
|
||||
<div style={{ height: 550, width: '100%', paddingRight: '1px' }}>
|
||||
|
||||
|
||||
|
@ -638,7 +640,7 @@ const Partner_Client = (props) => {
|
|||
color: "black",
|
||||
fontSize: 14
|
||||
},
|
||||
|
||||
|
||||
'& .line--statut--selected': {
|
||||
backgroundColor: '#FBF2EF',
|
||||
color: 'black',
|
||||
|
@ -702,10 +704,10 @@ const Partner_Client = (props) => {
|
|||
if (String(params.row.id) === String(gridline_id)) {
|
||||
return 'line--statut--selected';
|
||||
}
|
||||
else if( parseInt(String(params.row.id)) % 2 === 0){
|
||||
else if (parseInt(String(params.row.id)) % 2 === 0) {
|
||||
return 'line--statut--pair';
|
||||
}
|
||||
else if( parseInt(String(params.row.id)) % 2 !== 0){
|
||||
else if (parseInt(String(params.row.id)) % 2 !== 0) {
|
||||
return 'line--statut--impair';
|
||||
}
|
||||
}}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
|
||||
@media only screen and (max-width: 600px) {
|
||||
|
||||
|
||||
.div_row {
|
||||
float: left;
|
||||
//border:0px solid black;
|
||||
|
@ -189,7 +189,7 @@
|
|||
}
|
||||
|
||||
@media only screen and (min-width: 601px) and (max-width: 991px) {
|
||||
|
||||
|
||||
.div_row {
|
||||
float: left;
|
||||
//border:0px solid black;
|
||||
|
@ -364,7 +364,7 @@
|
|||
}
|
||||
|
||||
@media only screen and (min-width: 992px) and (max-width: 1199px) {
|
||||
|
||||
|
||||
.div_row {
|
||||
float: left;
|
||||
//border:0px solid black;
|
||||
|
@ -630,7 +630,7 @@
|
|||
margin: 5px !important;
|
||||
margin-bottom: 1rem !important;
|
||||
}
|
||||
|
||||
|
||||
.bton_suppr {
|
||||
background: transparent;
|
||||
color: red;
|
||||
|
@ -713,6 +713,14 @@
|
|||
}
|
||||
}
|
||||
|
||||
// end media
|
||||
.hr_break {
|
||||
border: 5px solid grey;
|
||||
}
|
||||
|
||||
.switch{
|
||||
max-height: 1.5rem !important;
|
||||
}
|
||||
|
||||
.contact_grid {
|
||||
margin-right: 10px !important;
|
||||
|
|
|
@ -192,7 +192,6 @@
|
|||
border: none !important;
|
||||
background: none !important;
|
||||
box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%);
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
padding: 10px;
|
||||
text-align: left;
|
||||
|
@ -460,7 +459,6 @@
|
|||
border: none !important;
|
||||
background: none !important;
|
||||
box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%);
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
padding: 10px;
|
||||
text-align: left;
|
||||
|
@ -726,7 +724,6 @@
|
|||
border: none !important;
|
||||
background: none !important;
|
||||
box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%);
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
padding: 10px;
|
||||
text-align: left;
|
||||
|
@ -1014,7 +1011,6 @@
|
|||
border: none !important;
|
||||
background: none !important;
|
||||
box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%);
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
padding: 10px;
|
||||
text-align: left;
|
||||
|
|
Loading…
Reference in New Issue