14/12/2023 - 21h
parent
59b5dba3ee
commit
4eb16af0ec
|
@ -1788,6 +1788,15 @@ const AddParnerClient = (props) => {
|
||||||
if (document.getElementsByName("contact_email")) {
|
if (document.getElementsByName("contact_email")) {
|
||||||
contact_email = document.getElementsByName("contact_email")[0].value;
|
contact_email = document.getElementsByName("contact_email")[0].value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Pour activier la fontion de "include com", le contact foit avoir une adresse email
|
||||||
|
var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
|
||||||
|
|
||||||
|
if (!contact_email.match(validRegex)) {
|
||||||
|
alert("L'adresse email est invalide. Pour créer un contact l'adresse email est obligatoire");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
form.append("email", contact_email);
|
form.append("email", contact_email);
|
||||||
|
|
||||||
var contact_nom = ""
|
var contact_nom = ""
|
||||||
|
@ -2136,7 +2145,7 @@ const AddParnerClient = (props) => {
|
||||||
return (
|
return (
|
||||||
<div className="add_partner_client">
|
<div className="add_partner_client">
|
||||||
|
|
||||||
{String(props.new_customer) === "1" && <div className="div_row">
|
{String(props.new_customer) === "1" && <div className="div_row" style={{"paddingRight":"5px"}}>
|
||||||
<div className="div_row">
|
<div className="div_row">
|
||||||
<Button variant="outlined" onClick={submenu_donnee_client} className="detail_submenu" id='submenu_donnee_client' name='submenu_donnee_client'>Données Client</Button>
|
<Button variant="outlined" onClick={submenu_donnee_client} className="detail_submenu" id='submenu_donnee_client' name='submenu_donnee_client'>Données Client</Button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2789,7 +2798,7 @@ const AddParnerClient = (props) => {
|
||||||
<div >
|
<div >
|
||||||
{(JSON.parse(client).nom || JSON.parse(client).prenom) &&
|
{(JSON.parse(client).nom || JSON.parse(client).prenom) &&
|
||||||
<nav style={{ "width": "100%", "float": "left" }}>
|
<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}>
|
<nav className="grid_title" style={{ "width": "75%", "float": "left", "cursor":"pointer" }} 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)}
|
{String(JSON.parse(client).prenom)} {String(JSON.parse(client).nom)}
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
|
@ -2862,7 +2871,7 @@ const AddParnerClient = (props) => {
|
||||||
|
|
||||||
{JSON.parse(client).fonction && <nav> {String(JSON.parse(client).fonction)} </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).email && <nav> {String(JSON.parse(client).email)} </nav>}
|
||||||
{JSON.parse(client).telephone && <nav> {String(JSON.parse(client).telephone)} </nav>}
|
{JSON.parse(client).telephone_mobile && <nav> {String(JSON.parse(client).telephone_mobile)} </nav>}
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -3126,8 +3135,17 @@ const AddParnerClient = (props) => {
|
||||||
//console.log("is_contact_include_com == ", is_contact_include_com);
|
//console.log("is_contact_include_com == ", is_contact_include_com);
|
||||||
if (is_contact_include_com === true)
|
if (is_contact_include_com === true)
|
||||||
setis_contact_include_com(false)
|
setis_contact_include_com(false)
|
||||||
else
|
else{
|
||||||
setis_contact_include_com(true)
|
// Pour activier la fontion de "include com", le contact foit avoir une adresse email
|
||||||
|
var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
|
||||||
|
|
||||||
|
if (!p_contact_email.match(validRegex)) {
|
||||||
|
alert("L'adresse email est invalide. Pour activer cette fontion, vous devez saisir une adresse email valide");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
setis_contact_include_com(true);
|
||||||
|
}
|
||||||
|
|
||||||
}}
|
}}
|
||||||
id="toggleSwitchNav" name="toggleSwitchNav">
|
id="toggleSwitchNav" name="toggleSwitchNav">
|
||||||
|
|
|
@ -31,6 +31,7 @@ import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io";
|
||||||
import { Fab } from "@material-ui/core";
|
import { Fab } from "@material-ui/core";
|
||||||
import fileDownload from 'js-file-download'
|
import fileDownload from 'js-file-download'
|
||||||
import { AiTwotoneEdit, AiTwotoneSave } from "react-icons/ai";
|
import { AiTwotoneEdit, AiTwotoneSave } from "react-icons/ai";
|
||||||
|
import Checkbox from '@mui/material/Checkbox';
|
||||||
|
|
||||||
const Config_Documents = (props) => {
|
const Config_Documents = (props) => {
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
|
@ -347,6 +348,9 @@ const Config_Documents = (props) => {
|
||||||
const [p_detail_type_doc, setp_detail_type_doc] = useState("");
|
const [p_detail_type_doc, setp_detail_type_doc] = useState("");
|
||||||
const [p_detail_duplicate, setp_detail_duplicate] = useState("");
|
const [p_detail_duplicate, setp_detail_duplicate] = useState("");
|
||||||
|
|
||||||
|
const [p_detail_joint_pdf, setp_detail_joint_pdf] = useState(false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const [p_one_detail_cible, setp_one_detail_cible] = useState("");
|
const [p_one_detail_cible, setp_one_detail_cible] = useState("");
|
||||||
const [p_one_detail_contenu_doc, setp_one_detail_contenu_doc] = useState("");
|
const [p_one_detail_contenu_doc, setp_one_detail_contenu_doc] = useState("");
|
||||||
|
@ -632,7 +636,7 @@ const Config_Documents = (props) => {
|
||||||
if (mylocal_document.duplicate) {
|
if (mylocal_document.duplicate) {
|
||||||
setp_one_detail_duplicate(mylocal_document.duplicate);
|
setp_one_detail_duplicate(mylocal_document.duplicate);
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
setp_one_detail_duplicate("0");
|
setp_one_detail_duplicate("0");
|
||||||
}
|
}
|
||||||
setfield_programme("");
|
setfield_programme("");
|
||||||
|
@ -1637,6 +1641,13 @@ const Config_Documents = (props) => {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const [document_principal_ou_corp_mail, setdocument_principal_ou_corp_mail] = useState();
|
||||||
|
/*
|
||||||
|
document_principal_ou_corp_mail = '1' pour le document principal
|
||||||
|
document_principal_ou_corp_mail = '2' pour le corps du mail qui comporte une pièce jointe
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
const [Download_one_attached_document_api, setDownload_one_attached_document_api] = useState();
|
const [Download_one_attached_document_api, setDownload_one_attached_document_api] = useState();
|
||||||
const [Download_one_attached_document_result, setDownload_one_attached_document_result] = useState();
|
const [Download_one_attached_document_result, setDownload_one_attached_document_result] = useState();
|
||||||
const [Download_one_attached_document_message, setDownload_one_attached_document_message] = useState();
|
const [Download_one_attached_document_message, setDownload_one_attached_document_message] = useState();
|
||||||
|
@ -2058,7 +2069,7 @@ const Config_Documents = (props) => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div className="div_row">
|
<div className="div_row" style={{ "paddingRight": "5px" }}>
|
||||||
<div className="session_data">
|
<div className="session_data">
|
||||||
<div style={{ "border": "None" }}>
|
<div style={{ "border": "None" }}>
|
||||||
|
|
||||||
|
@ -2239,7 +2250,7 @@ const Config_Documents = (props) => {
|
||||||
|
|
||||||
|
|
||||||
<div className="div_row_gauche texte_area_filter" >
|
<div className="div_row_gauche texte_area_filter" >
|
||||||
Type de document<br />
|
Type de document 2<br />
|
||||||
<TextField
|
<TextField
|
||||||
name="document_type"
|
name="document_type"
|
||||||
//label="Type de document"
|
//label="Type de document"
|
||||||
|
@ -2280,6 +2291,18 @@ const Config_Documents = (props) => {
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="div_row_gauche texte_area_filter" >
|
||||||
|
Joindre en PDF aaaa <br />
|
||||||
|
|
||||||
|
<Checkbox
|
||||||
|
name="document_join_pdf"
|
||||||
|
className="disabled_style"
|
||||||
|
checked={p_detail_joint_pdf}
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div className="div_row_droite_1_tier" style={{ "textAlign": "left" }}>
|
<div className="div_row_droite_1_tier" style={{ "textAlign": "left" }}>
|
||||||
{String(partner_document_data_edit_mode) === "1" &&
|
{String(partner_document_data_edit_mode) === "1" &&
|
||||||
|
@ -2390,7 +2413,7 @@ const Config_Documents = (props) => {
|
||||||
<nav style={{ "color": "green", "cursor": "pointer" }} onClick={Download_one_attached_document} name={(JSON.parse(val).file_name)} id={(JSON.parse(val).file_name)}> Télécharger <i> {(JSON.parse(val).file_business_object)}</i> </nav>
|
<nav style={{ "color": "green", "cursor": "pointer" }} onClick={Download_one_attached_document} name={(JSON.parse(val).file_name)} id={(JSON.parse(val).file_name)}> Télécharger <i> {(JSON.parse(val).file_business_object)}</i> </nav>
|
||||||
<Popup
|
<Popup
|
||||||
trigger={
|
trigger={
|
||||||
<nav style={{ "color": "red", "cursor": "pointer", "marginBottom":"1rem" }} > Supprimer</nav>
|
<nav style={{ "color": "red", "cursor": "pointer", "marginBottom": "1rem" }} > Supprimer</nav>
|
||||||
|
|
||||||
}
|
}
|
||||||
modal
|
modal
|
||||||
|
@ -2455,6 +2478,7 @@ const Config_Documents = (props) => {
|
||||||
</div>
|
</div>
|
||||||
{String(partner_document_data_edit_mode) === "1" && <div className="div_row">
|
{String(partner_document_data_edit_mode) === "1" && <div className="div_row">
|
||||||
<div style={{ "width": "98%", "marginLeft": "1%", "marginRight": "1%", "float": "left" }}>
|
<div style={{ "width": "98%", "marginLeft": "1%", "marginRight": "1%", "float": "left" }}>
|
||||||
|
|
||||||
<div className="titre_training_text"> Modifier le contenu du document </div>
|
<div className="titre_training_text"> Modifier le contenu du document </div>
|
||||||
<Editor
|
<Editor
|
||||||
id="document_contente"
|
id="document_contente"
|
||||||
|
@ -2657,7 +2681,7 @@ const Config_Documents = (props) => {
|
||||||
|
|
||||||
<div className="div_row_gauche">
|
<div className="div_row_gauche">
|
||||||
<div className="div_row_gauche texte_area_filter" >
|
<div className="div_row_gauche texte_area_filter" >
|
||||||
Type de document <br />
|
Type de document 1 <br />
|
||||||
<TextField
|
<TextField
|
||||||
name="one_document_type"
|
name="one_document_type"
|
||||||
//label="Type de document"
|
//label="Type de document"
|
||||||
|
@ -2668,6 +2692,7 @@ const Config_Documents = (props) => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div className="div_row_gauche texte_area_filter" >
|
<div className="div_row_gauche texte_area_filter" >
|
||||||
Nom document <br />
|
Nom document <br />
|
||||||
<TextField
|
<TextField
|
||||||
|
@ -2711,7 +2736,24 @@ const Config_Documents = (props) => {
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="div_row_gauche texte_area_filter" >
|
||||||
|
Joindre en PDF bbb <br />
|
||||||
|
|
||||||
|
<Checkbox
|
||||||
|
name="document_join_pdf"
|
||||||
|
// className="disabled_style"
|
||||||
|
checked={p_detail_joint_pdf}
|
||||||
|
onChange={(e) => {
|
||||||
|
setp_detail_joint_pdf(e.target.checked);
|
||||||
|
setpartner_document_data_changed("1");
|
||||||
|
}}
|
||||||
|
|
||||||
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div className="div_row"> </div>
|
||||||
<div className="div_row_droite texte_area_filter" style={{ "textAlign": "left" }}>
|
<div className="div_row_droite texte_area_filter" style={{ "textAlign": "left" }}>
|
||||||
<div className="div_row"> Choisir un champ <br />
|
<div className="div_row"> Choisir un champ <br />
|
||||||
<TextField
|
<TextField
|
||||||
|
@ -2750,8 +2792,36 @@ const Config_Documents = (props) => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div className="div_row">
|
<div className="div_row" style={{ "border": "None", "width": "98%", "marginLeft": "1%", "marginRight": "1%", "float": "left" }}>
|
||||||
|
<hr className="hr_break" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="div_row" >
|
||||||
|
|
||||||
|
|
||||||
|
{p_detail_joint_pdf === true && <div className="div_row" style={{ "border": "None", "width": "98%", "marginLeft": "1%", "marginRight": "1%", "float": "left" }}>
|
||||||
|
<Button variant="outlined"
|
||||||
|
onClick={(event) => {
|
||||||
|
setdocument_principal_ou_corp_mail("1");
|
||||||
|
}}
|
||||||
|
className="detail_class_submenu" id='detail_employe' name='detail_employe'>Document principal</Button>
|
||||||
|
<Button variant="outlined"
|
||||||
|
onClick={(event) => {
|
||||||
|
setdocument_principal_ou_corp_mail("2");
|
||||||
|
}}
|
||||||
|
className="detail_class_submenu" id='droit_acces' name='droit_acces'>Corps du mail </Button>
|
||||||
|
</div>}
|
||||||
|
|
||||||
|
|
||||||
|
{p_detail_joint_pdf === true && String(document_principal_ou_corp_mail) === "2" &&
|
||||||
<div style={{ "width": "98%", "marginLeft": "1%", "marginRight": "1%", "float": "left" }}>
|
<div style={{ "width": "98%", "marginLeft": "1%", "marginRight": "1%", "float": "left" }}>
|
||||||
|
Coprs du mail
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{String(document_principal_ou_corp_mail) !== "2" && <div style={{ "width": "98%", "marginLeft": "1%", "marginRight": "1%", "float": "left" }}>
|
||||||
<div className="titre_training_text"> Modifier le contenu du document </div>
|
<div className="titre_training_text"> Modifier le contenu du document </div>
|
||||||
<Editor
|
<Editor
|
||||||
id="document_contente"
|
id="document_contente"
|
||||||
|
@ -2780,7 +2850,8 @@ const Config_Documents = (props) => {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</div>
|
</div>}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -6355,7 +6355,7 @@ const Employes = (props) => {
|
||||||
<div className="session_data">
|
<div className="session_data">
|
||||||
<div style={{ "border": "None" }}>
|
<div style={{ "border": "None" }}>
|
||||||
|
|
||||||
<div style={{ height: 350, width: '100%', paddingRight: '1px' }}>
|
<div style={{ height: 350, width: '100%', paddingRight: '5px' }}>
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
|
|
|
@ -759,7 +759,7 @@ const Partner_Client = (props) => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{String(Edite_Client) === "1" && <div className="div_row">
|
{String(Edite_Client) === "1" && <div className="div_row" style={{"paddingRight":"10px"}}>
|
||||||
|
|
||||||
<div className="titre1"> Detail client : {Client_email}</div>
|
<div className="titre1"> Detail client : {Client_email}</div>
|
||||||
|
|
||||||
|
|
|
@ -736,7 +736,6 @@
|
||||||
border: 1px solid #CCC;
|
border: 1px solid #CCC;
|
||||||
background: none;
|
background: none;
|
||||||
box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%);
|
box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%);
|
||||||
cursor: pointer;
|
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|
Loading…
Reference in New Issue