18/12/2023 - 18:00
parent
49334cee17
commit
8c9fbc8f9e
|
@ -23,6 +23,7 @@ import PartnerClientActivite from "./PartnerClient_Activite";
|
|||
import Popup from 'reactjs-popup';
|
||||
import 'reactjs-popup/dist/index.css';
|
||||
import ToggleSwitch from "./ToggleSwitch";
|
||||
import { FcSpeaker } from "react-icons/fc";
|
||||
|
||||
const AddParnerClient = (props) => {
|
||||
const history = useHistory();
|
||||
|
@ -1198,10 +1199,11 @@ const AddParnerClient = (props) => {
|
|||
|
||||
var client_email = ""
|
||||
if (document.getElementsByName("client_email")) {
|
||||
client_email = document.getElementsByName("client_email")[0].value;
|
||||
client_email = String(document.getElementsByName("client_email")[0].value).trim();
|
||||
}
|
||||
var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
|
||||
|
||||
|
||||
|
||||
if (!client_email.match(validRegex)) {
|
||||
alert("L'adresse email est invalide.");
|
||||
return;
|
||||
|
@ -1212,7 +1214,7 @@ const AddParnerClient = (props) => {
|
|||
|
||||
var client_nom = ""
|
||||
if (document.getElementsByName("client_nom")) {
|
||||
client_nom = document.getElementsByName("client_nom")[0].value;
|
||||
client_nom = String(document.getElementsByName("client_nom")[0].value).trim();
|
||||
}
|
||||
form.append("nom", client_nom);
|
||||
if (String(client_nom).trim() === "") {
|
||||
|
@ -1342,7 +1344,7 @@ const AddParnerClient = (props) => {
|
|||
|
||||
var client_email = ""
|
||||
if (document.getElementsByName("client_email")) {
|
||||
client_email = document.getElementsByName("client_email")[0].value;
|
||||
client_email = String(document.getElementsByName("client_email")[0].value).trim();
|
||||
}
|
||||
var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
|
||||
if (!client_email.match(validRegex)) {
|
||||
|
@ -1810,7 +1812,7 @@ const AddParnerClient = (props) => {
|
|||
// Données de contact du client du partner
|
||||
var contact_email = ""
|
||||
if (document.getElementsByName("contact_email")) {
|
||||
contact_email = document.getElementsByName("contact_email")[0].value;
|
||||
contact_email = String(document.getElementsByName("contact_email")[0].value).trim();
|
||||
}
|
||||
|
||||
// Pour activier la fontion de "include com", le contact foit avoir une adresse email
|
||||
|
@ -1825,9 +1827,14 @@ const AddParnerClient = (props) => {
|
|||
|
||||
var contact_nom = ""
|
||||
if (document.getElementsByName("contact_nom")) {
|
||||
contact_nom = document.getElementsByName("contact_nom")[0].value;
|
||||
contact_nom = String(document.getElementsByName("contact_nom")[0].value).trim();
|
||||
}
|
||||
form.append("nom", contact_nom);
|
||||
if (contact_nom.length < 2) {
|
||||
alert("Le nom du contact est invalide ");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var contact_prenom = ""
|
||||
if (document.getElementsByName("contact_prenom")) {
|
||||
|
@ -2174,7 +2181,7 @@ const AddParnerClient = (props) => {
|
|||
<Button variant="outlined" onClick={submenu_donnee_client} className="detail_submenu" id='submenu_donnee_client' name='submenu_donnee_client'>Données Client</Button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div className="session_caract"> Raison sociale <br />
|
||||
<TextField
|
||||
|
@ -2207,7 +2214,7 @@ const AddParnerClient = (props) => {
|
|||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div className="session_caract"> Type client <br />
|
||||
<TextField
|
||||
|
@ -2271,7 +2278,7 @@ const AddParnerClient = (props) => {
|
|||
</div>
|
||||
|
||||
<div className="session_caract">
|
||||
<b>Email</b> <br />
|
||||
<b>Email</b> <br />
|
||||
<TextField
|
||||
required
|
||||
name="client_email"
|
||||
|
@ -2343,7 +2350,7 @@ const AddParnerClient = (props) => {
|
|||
/>
|
||||
</div>
|
||||
|
||||
<div className="session_caract"> Telephone <br />
|
||||
<div className="session_caract"> Téléphone <br />
|
||||
<TextField
|
||||
required
|
||||
name="client_telephone"
|
||||
|
@ -2362,7 +2369,7 @@ const AddParnerClient = (props) => {
|
|||
<TextField
|
||||
required
|
||||
name="client_website"
|
||||
label="Site web"
|
||||
//label="Site web"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
|
@ -2450,8 +2457,8 @@ const AddParnerClient = (props) => {
|
|||
|
||||
{String(submenu).trim() === "submenu_donnee_client" && <div className="training_data" onChange={DataUpdated}>
|
||||
|
||||
|
||||
<div className="session_caract"> Raison sociale <br />
|
||||
|
||||
<div className="session_caract"> Raison sociale <br />
|
||||
<TextField
|
||||
required
|
||||
name="client_raison_sociale"
|
||||
|
@ -2484,7 +2491,7 @@ const AddParnerClient = (props) => {
|
|||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
{String(formedit_mode) !== "1" && <div className="session_caract"> Type client<br />
|
||||
<TextField
|
||||
required
|
||||
|
@ -2855,17 +2862,39 @@ const AddParnerClient = (props) => {
|
|||
<div >
|
||||
{(JSON.parse(client).nom || JSON.parse(client).prenom) &&
|
||||
<nav style={{ "width": "100%", "float": "left" }}>
|
||||
<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}>
|
||||
<nav className="grid_title" style={{ "width": "69%", "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)}
|
||||
|
||||
</nav>
|
||||
{String(JSON.parse(client).include_com) === "1" && <nav style={{ "width": "10%", "float": "left" }}>
|
||||
<Tooltip id="tooltip_speacker" />
|
||||
<a data-tooltip-id="tooltip_speacker" data-tooltip-content="Contacte utilisé dans les échanges de mails">
|
||||
<FcSpeaker style={{ "border": "1px solid", "cursor": "pointer" }} />
|
||||
</a>
|
||||
</nav>}
|
||||
|
||||
{String(JSON.parse(client).include_com) !== "1" && <nav style={{ "width": "10%", "float": "left" }}>
|
||||
|
||||
</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} />
|
||||
<Tooltip id="tooltip_edit" />
|
||||
<a data-tooltip-id="tooltip_edit" data-tooltip-content="Editer le contact">
|
||||
|
||||
<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} />
|
||||
</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<Popup
|
||||
trigger={
|
||||
<nav style={{ "width": "10%", "float": "right", "cursor": "pointer" }}>
|
||||
<CiTrash style={{ "color": "red", "border": "1px solid" }} />
|
||||
<Tooltip id="tooltip_delete" />
|
||||
<a data-tooltip-id="tooltip_delete" data-tooltip-content="Suppimer le contact">
|
||||
<CiTrash style={{ "color": "red", "border": "1px solid" }} />
|
||||
</a>
|
||||
</nav>
|
||||
|
||||
|
||||
|
@ -2940,21 +2969,6 @@ const AddParnerClient = (props) => {
|
|||
</div>}
|
||||
|
||||
{String(addcontact) === "1" && <div className="div_row" style={{ "marginLeft": "5px", "marginRight": "5px" }} onChange={DataUpdated_Contact_Data}>
|
||||
<div className="session_caract"> Email <br />
|
||||
<TextField
|
||||
required
|
||||
name="contact_email"
|
||||
//label="Email"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_contact_email}
|
||||
onChange={(e) => setp_contact_email(e.target.value)}
|
||||
|
||||
/>
|
||||
</div>
|
||||
|
||||
{String(formedit_mode_contact) === "1" && <div className="session_caract">
|
||||
Civilité <br />
|
||||
|
@ -3001,7 +3015,7 @@ const AddParnerClient = (props) => {
|
|||
|
||||
|
||||
<div className="session_caract">
|
||||
Nom <br />
|
||||
<b>Nom </b> <br />
|
||||
<TextField
|
||||
required
|
||||
name="contact_nom"
|
||||
|
@ -3019,7 +3033,7 @@ const AddParnerClient = (props) => {
|
|||
|
||||
|
||||
<div className="session_caract">
|
||||
Prenom <br />
|
||||
Prénom <br />
|
||||
<TextField
|
||||
required
|
||||
name="contact_prenom"
|
||||
|
@ -3033,6 +3047,21 @@ const AddParnerClient = (props) => {
|
|||
onChange={(e) => setp_contact_prenom(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<div className="session_caract"> <b> Email </b> <br />
|
||||
<TextField
|
||||
required
|
||||
name="contact_email"
|
||||
//label="Email"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_contact_email}
|
||||
onChange={(e) => setp_contact_email(e.target.value)}
|
||||
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="session_caract">
|
||||
|
@ -3053,38 +3082,41 @@ const AddParnerClient = (props) => {
|
|||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div className="session_caract">
|
||||
N° Siret <br />
|
||||
Téléphone Fixe <br />
|
||||
<TextField
|
||||
required
|
||||
name="contact_siret"
|
||||
//label="N° Siret"
|
||||
name="contact_telephone"
|
||||
//label="Telephone"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_contact_siret}
|
||||
onChange={(e) => setcontact_siret(e.target.value)}
|
||||
value={p_contact_telephone}
|
||||
onChange={(e) => setcontact_telephone(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="session_caract">
|
||||
N° TVA <br />
|
||||
Téléphone Mobile <br />
|
||||
<TextField
|
||||
required
|
||||
name="contact_tva"
|
||||
//label="N° TVA"
|
||||
name="contact_telephone_mobile"
|
||||
// label="Téléphone Mobile"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_contact_tva}
|
||||
onChange={(e) => setcontact_tva(e.target.value)}
|
||||
value={p_contact_telephone_mobile}
|
||||
onChange={(e) => setp_contact_telephone_mobile(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="session_caract">
|
||||
Adresse <br />
|
||||
<TextField
|
||||
|
@ -3147,38 +3179,43 @@ const AddParnerClient = (props) => {
|
|||
</div>
|
||||
|
||||
<div className="session_caract">
|
||||
Telephone <br />
|
||||
<TextField
|
||||
required
|
||||
name="contact_telephone"
|
||||
//label="Telephone"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_contact_telephone}
|
||||
onChange={(e) => setcontact_telephone(e.target.value)}
|
||||
/>
|
||||
<Tooltip id="tooltip_siret" />
|
||||
<a data-tooltip-id="tooltip_siret" data-tooltip-content="Pour les contacts de type entreprise ">
|
||||
N° Siret <br />
|
||||
<TextField
|
||||
required
|
||||
name="contact_siret"
|
||||
//label="N° Siret"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_contact_siret}
|
||||
onChange={(e) => setcontact_siret(e.target.value)}
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div className="session_caract">
|
||||
Téléphone Mobile <br />
|
||||
<TextField
|
||||
required
|
||||
name="contact_telephone_mobile"
|
||||
// label="Téléphone Mobile"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_contact_telephone_mobile}
|
||||
onChange={(e) => setp_contact_telephone_mobile(e.target.value)}
|
||||
/>
|
||||
<Tooltip id="tooltip_tva" />
|
||||
<a data-tooltip-id="tooltip_tva" data-tooltip-content="Pour les contacts de type entreprise ">
|
||||
N° TVA <br />
|
||||
<TextField
|
||||
required
|
||||
name="contact_tva"
|
||||
//label="N° TVA"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_contact_tva}
|
||||
onChange={(e) => setcontact_tva(e.target.value)}
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
<hr className="hr_break" />
|
||||
</div>
|
||||
|
@ -3196,7 +3233,7 @@ const AddParnerClient = (props) => {
|
|||
// 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)) {
|
||||
if (!String(p_contact_email).trim().match(validRegex)) {
|
||||
alert("L'adresse email est invalide. Pour activer cette fontion, vous devez saisir une adresse email valide");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -3169,7 +3169,7 @@ const Config_Documents = (props) => {
|
|||
</div>
|
||||
|
||||
<div className="div_row_gauche texte_area_filter" >
|
||||
Edition par client bbb <br />
|
||||
Edition par client <br />
|
||||
|
||||
<Checkbox
|
||||
name="document_join_pdf"
|
||||
|
|
|
@ -1168,6 +1168,7 @@ const DisplayPartnerSession = (props) => {
|
|||
})
|
||||
}
|
||||
|
||||
const [New_Getall_Training_Employee_No_Filter_result, setNew_Getall_Training_Employee_No_Filter_result] = useState([]);
|
||||
|
||||
const [Getall_Training_Employee_No_Filter_api, setGetall_Training_Employee_No_Filter_api] = useState();
|
||||
const [Getall_Training_Employee_No_Filter_message, setGetall_Training_Employee_No_Filter_message] = useState();
|
||||
|
@ -1191,6 +1192,33 @@ const DisplayPartnerSession = (props) => {
|
|||
//console.log(" In Getall_Training_Employee_No_Filter res.data.message r_class = " + res.data.message);
|
||||
setGetall_Training_Employee_No_Filter_api("true");
|
||||
setGetall_Training_Employee_No_Filter_result(res.data.message);
|
||||
|
||||
var new_data2 = [];
|
||||
const new_data = res.data.message.map((x) => {
|
||||
|
||||
//---
|
||||
var localid = JSON.parse(x).id;
|
||||
var local_id = JSON.parse(x)._id;
|
||||
var local_nom = JSON.parse(x).nom;
|
||||
var local_prenom = JSON.parse(x).prenom;
|
||||
var local_ismanager = JSON.parse(x).ismanager;
|
||||
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
"label": local_nom + " " + local_prenom,
|
||||
"nom": local_nom,
|
||||
"prenom": local_prenom,
|
||||
"ismanager": local_ismanager
|
||||
};
|
||||
new_data2.push(node);
|
||||
});
|
||||
|
||||
if (new_data2.length > 0)
|
||||
setNew_Getall_Training_Employee_No_Filter_result(new_data2);
|
||||
|
||||
}
|
||||
else {
|
||||
setGetall_Training_Employee_No_Filter_api("false");
|
||||
|
@ -1693,14 +1721,14 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
|
||||
|
||||
if (document.getElementById('detail_session')) {
|
||||
//myRef.current.scrollIntoView({ behavior: "smooth" });
|
||||
var divh = document.getElementById('detail_session').offsetTop;
|
||||
window.scrollTo({
|
||||
top: divh,
|
||||
behavior: "smooth",
|
||||
});
|
||||
}
|
||||
|
||||
//myRef.current.scrollIntoView({ behavior: "smooth" });
|
||||
var divh = document.getElementById('myRef_add_session').offsetTop;
|
||||
window.scrollTo({
|
||||
top: divh,
|
||||
behavior: "smooth",
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -2087,7 +2115,7 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
|
||||
var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
|
||||
if (!one_email_part.match(validRegex)) {
|
||||
if (!one_email_part.trim().match(validRegex)) {
|
||||
alert("L'adresse email est invalide.");
|
||||
return;
|
||||
}
|
||||
|
@ -2116,7 +2144,7 @@ const DisplayPartnerSession = (props) => {
|
|||
form.append("session_id", selected_session_id);
|
||||
form.append("nom", one_nom_part);
|
||||
form.append("prenom", one_prenom_part);
|
||||
form.append("email", one_email_part);
|
||||
form.append("email", one_email_part.trim());
|
||||
form.append("telephone", one_phone_part);
|
||||
form.append("status", myinscript_status);
|
||||
form.append("modefinancement", "");
|
||||
|
@ -2622,7 +2650,7 @@ const DisplayPartnerSession = (props) => {
|
|||
}
|
||||
|
||||
var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
|
||||
if (!p_detail_mail.match(validRegex)) {
|
||||
if (!p_detail_mail.trim().match(validRegex)) {
|
||||
alert("L'adresse email est invalide.");
|
||||
return;
|
||||
}
|
||||
|
@ -3572,8 +3600,8 @@ const DisplayPartnerSession = (props) => {
|
|||
var one_myclass_title = ""
|
||||
|
||||
|
||||
if (document.getElementsByName("one_myclass_title")[0] && document.getElementsByName("one_myclass_title")[0].value != "") {
|
||||
one_myclass_title = document.getElementsByName("one_myclass_title")[0].value;
|
||||
if (p_one_myclass_title) {
|
||||
one_myclass_title = p_one_myclass_title;
|
||||
}
|
||||
if (one_myclass_title.trim() == "") {
|
||||
alert(" Vous devez choisir une formation ");
|
||||
|
@ -3581,9 +3609,6 @@ const DisplayPartnerSession = (props) => {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var nb_participant = ""
|
||||
if (document.getElementById("one_nb_participant") && document.getElementById("one_nb_participant").value != "") {
|
||||
nb_participant = document.getElementById("one_nb_participant").value;
|
||||
|
@ -4144,7 +4169,7 @@ const DisplayPartnerSession = (props) => {
|
|||
const [p_one_session_etape_label, setp_one_session_etape_label] = useState();
|
||||
const [p_one_titre, setp_one_titre] = useState("");
|
||||
const [p_one_location_type, setp_one_location_type] = useState("");
|
||||
const [p_one_is_bpf, setp_one_is_bpf] = useState("");
|
||||
const [p_one_is_bpf, setp_one_is_bpf] = useState("0");
|
||||
|
||||
function annuleSessionUpdate() {
|
||||
clearSessionFields();
|
||||
|
@ -4336,11 +4361,11 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
//console.log(" In GetCurrentPartnerClass res.data.status = " + res.data.status);
|
||||
console.log(" In GetCurrentPartnerClass res.data.message r_class = " + res.data.message);
|
||||
//console.log(" In GetCurrentPartnerClass res.data.message r_class = " + res.data.message);
|
||||
setGetCurrentPartnerClass_api("true");
|
||||
setGetCurrentPartnerClass_result(res.data.message);
|
||||
|
||||
|
||||
|
||||
var new_data2 = [];
|
||||
|
||||
const new_data = res.data.message.map((x) => {
|
||||
|
@ -5101,11 +5126,11 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
|
||||
|
||||
if (!local_mail.match(validRegex)) {
|
||||
if (!local_mail.trim().match(validRegex)) {
|
||||
alert("L'adresse email est invalide. Impossible de renvoyer les identifiants");
|
||||
return;
|
||||
}
|
||||
formData.append("email", local_mail);
|
||||
formData.append("email", local_mail.trim());
|
||||
formData.append("class_internal_url", selected_internal_url);
|
||||
//console.log("token = " + stored_cookie);
|
||||
|
||||
|
@ -7190,6 +7215,7 @@ const DisplayPartnerSession = (props) => {
|
|||
}
|
||||
|
||||
const myRef_seq_ressource = useRef(null)
|
||||
const myRef_add_session = useRef(null)
|
||||
|
||||
const [update_sequence, setupdate_sequence] = useState();
|
||||
|
||||
|
@ -8760,13 +8786,13 @@ const DisplayPartnerSession = (props) => {
|
|||
Dialog_convention_handleClose_buton();
|
||||
}
|
||||
}}
|
||||
className="bton_enreg_dialog">Envoyer mail aaa</Button>}
|
||||
className="bton_enreg_dialog">Envoyer mail </Button>}
|
||||
{String(selected_convention_type) === "pdf" &&
|
||||
<Button className="bton_enreg_dialog" onClick={(e) => {
|
||||
Download_Session_Conventions_PDF();
|
||||
Dialog_convention_handleClose_buton();
|
||||
}}
|
||||
>Télécharger bbb</Button>}
|
||||
>Télécharger </Button>}
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -9313,7 +9339,7 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
|
||||
<div className="div_row" style={{ "marginTop": "1rem", "marginBottom": "1rem" }}>
|
||||
cherif convention
|
||||
|
||||
<div className="div_row_gauche">
|
||||
|
||||
</div>
|
||||
|
@ -9337,7 +9363,7 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
</div>
|
||||
|
||||
<div className="session_caract"> Formation <br />
|
||||
<div className="session_caract"> <b> Formation </b><br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
|
@ -9364,7 +9390,7 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
|
||||
</div>
|
||||
<div className="session_caract"> Code Session<br />
|
||||
<div className="session_caract"><b> Code Session </b><br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
|
@ -9483,7 +9509,7 @@ const DisplayPartnerSession = (props) => {
|
|||
</div>}
|
||||
|
||||
|
||||
{edit_session_form && <div className="session_caract">Session à la demande* <br />
|
||||
{edit_session_form && <div className="session_caract">Session à la demande <br />
|
||||
<TextField
|
||||
name="session_ondemande"
|
||||
id="session_ondemande"
|
||||
|
@ -9523,7 +9549,7 @@ const DisplayPartnerSession = (props) => {
|
|||
</div>}
|
||||
|
||||
|
||||
{edit_session_form && <div className="session_caract">Statut* <br />
|
||||
{edit_session_form && <div className="session_caract">Statut <br />
|
||||
<TextField
|
||||
name="session_status"
|
||||
id="session_status"
|
||||
|
@ -9545,7 +9571,7 @@ const DisplayPartnerSession = (props) => {
|
|||
<MenuItem value="1" style={{ "paddingLeft": "5px", "textAlign": "left", "background": "green" }}>Actif </MenuItem>
|
||||
</TextField>
|
||||
</div>}
|
||||
{!edit_session_form && String(p_session_status) === "1" && <div className="session_caract">Statut * <br />
|
||||
{!edit_session_form && String(p_session_status) === "1" && <div className="session_caract">Statut <br />
|
||||
<TextField
|
||||
name="session_status_not_change_font"
|
||||
id="session_status_not_change_font"
|
||||
|
@ -9574,7 +9600,7 @@ const DisplayPartnerSession = (props) => {
|
|||
/>
|
||||
</div>}
|
||||
|
||||
{!edit_session_form && String(p_session_status) === "0" && <div className="session_caract">Statut * <br />
|
||||
{!edit_session_form && String(p_session_status) === "0" && <div className="session_caract">Statut <br />
|
||||
<TextField
|
||||
name="session_status_not_change_font"
|
||||
id="session_status_not_change_font"
|
||||
|
@ -9677,10 +9703,8 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<div className="session_caract">
|
||||
Date Debut
|
||||
<b>Date Debut </b>
|
||||
<DatePicker
|
||||
name="sessiondatedebut"
|
||||
id="sessiondatedebut"
|
||||
|
@ -9703,7 +9727,7 @@ const DisplayPartnerSession = (props) => {
|
|||
</div>
|
||||
|
||||
|
||||
<div className="session_caract"> Date Fin
|
||||
<div className="session_caract"> <b>Date Fin </b>
|
||||
<DatePicker
|
||||
name="sessiondatefin"
|
||||
id="sessiondatefin"
|
||||
|
@ -9724,7 +9748,7 @@ const DisplayPartnerSession = (props) => {
|
|||
</div>
|
||||
|
||||
|
||||
<div className="session_caract"> Date Debut des inscriptions *
|
||||
<div className="session_caract"> <b>Date Debut des inscriptions </b>
|
||||
<DatePicker
|
||||
required
|
||||
name="sessiondatedebutinscription"
|
||||
|
@ -9749,7 +9773,7 @@ const DisplayPartnerSession = (props) => {
|
|||
</div>
|
||||
|
||||
|
||||
<div className="session_caract"> Date Fin des inscriptions *
|
||||
<div className="session_caract"> <b>Date Fin des inscriptions </b>
|
||||
<DatePicker
|
||||
required
|
||||
name="sessiondatefininscription"
|
||||
|
@ -9771,7 +9795,7 @@ const DisplayPartnerSession = (props) => {
|
|||
</div>
|
||||
|
||||
|
||||
{edit_session_form && <div className="session_caract">Présentiel *<br />
|
||||
{edit_session_form && <div className="session_caract">Présentiel <br />
|
||||
<TextField
|
||||
name="presentiel"
|
||||
id="presentiel"
|
||||
|
@ -9812,7 +9836,7 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
|
||||
|
||||
{edit_session_form && <div className="session_caract">A distance* <br />
|
||||
{edit_session_form && <div className="session_caract">A distance <br />
|
||||
<TextField
|
||||
name="distantiel"
|
||||
id="distantiel"
|
||||
|
@ -9835,7 +9859,7 @@ const DisplayPartnerSession = (props) => {
|
|||
</TextField>
|
||||
</div>}
|
||||
|
||||
{!edit_session_form && <div className="session_caract">A distance* <br />
|
||||
{!edit_session_form && <div className="session_caract">A distance <br />
|
||||
<TextField
|
||||
name="distantiel"
|
||||
id="distantiel"
|
||||
|
@ -9954,7 +9978,7 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
</div>}
|
||||
|
||||
{edit_session_form && <div className="session_caract"> Formateur <br />
|
||||
{/*edit_session_form && <div className="session_caract"> Formateur <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
|
@ -9985,12 +10009,35 @@ const DisplayPartnerSession = (props) => {
|
|||
))}
|
||||
|
||||
</TextField>
|
||||
</div>*/}
|
||||
|
||||
{edit_session_form && <div className="session_caract"> Formateur <br />
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="formateur_id"
|
||||
id="formateur_id"
|
||||
className="disabled_style"
|
||||
options={New_Getall_Training_Employee_No_Filter_result}
|
||||
value={p_formateur_label}
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
setp_formateur_id(value._id);
|
||||
setp_formateur_label(value.label);
|
||||
IssessionChanged();
|
||||
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" />
|
||||
}
|
||||
/>
|
||||
</div>}
|
||||
|
||||
|
||||
|
||||
|
||||
<div className="session_caract"> Nombre participants *<br />
|
||||
|
||||
<div className="session_caract"> <b> Nombre participants </b><br />
|
||||
<TextField sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="nb_participant"
|
||||
|
@ -10231,11 +10278,12 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
</div>*/}
|
||||
|
||||
<div className="session_caract" > Choisir une formation <br />
|
||||
<div className="session_caract" > <b>Choisir une formation </b> <br />
|
||||
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
id="combo-box-demo"
|
||||
name="one_myclass_title"
|
||||
id="one_myclass_title"
|
||||
className="disabled_style enable_style"
|
||||
options={New_GetCurrentPartnerClass_result}
|
||||
onChange={(event, value) => {
|
||||
|
@ -10246,7 +10294,7 @@ const DisplayPartnerSession = (props) => {
|
|||
}}
|
||||
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="Choisir " />
|
||||
renderInput={(params) => <TextField {...params} label="" />
|
||||
}
|
||||
/>
|
||||
|
||||
|
@ -10335,7 +10383,7 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
|
||||
|
||||
<div className="session_caract">Session à la demande* <br />
|
||||
<div className="session_caract">Session à la demande <br />
|
||||
<TextField
|
||||
name="one_session_ondemande"
|
||||
id="one_session_ondemande"
|
||||
|
@ -10359,7 +10407,7 @@ const DisplayPartnerSession = (props) => {
|
|||
</div>
|
||||
|
||||
|
||||
<div className="session_caract">Statut * <br />
|
||||
<div className="session_caract">Statut <br />
|
||||
<TextField
|
||||
name="session_status"
|
||||
id="session_status"
|
||||
|
@ -10407,7 +10455,7 @@ const DisplayPartnerSession = (props) => {
|
|||
</div>
|
||||
|
||||
<div className="session_caract">
|
||||
Date Debut *
|
||||
<b> Date Debut </b>
|
||||
<DatePicker
|
||||
name="one_sessiondatedebut"
|
||||
id="one_sessiondatedebut"
|
||||
|
@ -10426,8 +10474,7 @@ const DisplayPartnerSession = (props) => {
|
|||
/>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="session_caract"> Date Fin *
|
||||
<div className="session_caract"> <b>Date Fin </b>
|
||||
<DatePicker
|
||||
name="one_sessiondatefin"
|
||||
id="one_sessiondatefin"
|
||||
|
@ -10445,7 +10492,7 @@ const DisplayPartnerSession = (props) => {
|
|||
</div>
|
||||
|
||||
|
||||
<div className="session_caract"> Date Debut des inscriptions *
|
||||
<div className="session_caract"> <b> Date Debut des inscriptions </b>
|
||||
<DatePicker
|
||||
required
|
||||
name="one_sessiondatedebutinscription"
|
||||
|
@ -10467,7 +10514,7 @@ const DisplayPartnerSession = (props) => {
|
|||
</div>
|
||||
|
||||
|
||||
<div className="session_caract"> Date Fin des inscriptions *
|
||||
<div className="session_caract"> <b> Date Fin des inscriptions </b>
|
||||
<DatePicker
|
||||
required
|
||||
name="one_sessiondatefininscription"
|
||||
|
@ -10486,7 +10533,7 @@ const DisplayPartnerSession = (props) => {
|
|||
</div>
|
||||
|
||||
|
||||
<div className="session_caract">Présentiel* <br />
|
||||
<div className="session_caract">Présentiel <br />
|
||||
<TextField
|
||||
name="one_presentiel"
|
||||
id="one_presentiel"
|
||||
|
@ -10507,7 +10554,7 @@ const DisplayPartnerSession = (props) => {
|
|||
</TextField>
|
||||
</div>
|
||||
|
||||
<div className="session_caract">A distance* <br />
|
||||
<div className="session_caract">A distance <br />
|
||||
<TextField
|
||||
name="one_distantiel"
|
||||
id="one_distantiel"
|
||||
|
@ -10613,7 +10660,7 @@ const DisplayPartnerSession = (props) => {
|
|||
/>
|
||||
</div>*/}
|
||||
|
||||
<div className="session_caract"> Formateur<br />
|
||||
{/* <div className="session_caract"> Formateur<br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
|
@ -10641,12 +10688,31 @@ const DisplayPartnerSession = (props) => {
|
|||
</MenuItem>
|
||||
))}
|
||||
</TextField>
|
||||
</div>*/}
|
||||
|
||||
|
||||
<div className="session_caract"> Formateur <br />
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="formateur_id"
|
||||
id="formateur_id"
|
||||
className="disabled_style"
|
||||
options={New_Getall_Training_Employee_No_Filter_result}
|
||||
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
setp_formateur_id(value._id);
|
||||
IssessionChanged();
|
||||
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" />
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div className="session_caract"> Nombre participants *<br />
|
||||
<div className="session_caract"> Nombre participants <br />
|
||||
<TextField sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="one_nb_participant"
|
||||
|
@ -11380,6 +11446,11 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
</MenuItem>
|
||||
))}
|
||||
<MenuItem key="" value=""
|
||||
style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontSize": "12px" }}>
|
||||
|
||||
|
||||
</MenuItem>
|
||||
</TextField>
|
||||
</div>
|
||||
|
||||
|
@ -11617,6 +11688,7 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
|
||||
</div>}
|
||||
<div className="div_row" ref={myRef_add_session} id="myRef_add_session"> </div>
|
||||
|
||||
{String(submenu) === String("inscrit") && <div style={{ "border": "None" }}>
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
|
@ -11924,6 +11996,11 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
</MenuItem>
|
||||
))}
|
||||
<MenuItem key="" value=""
|
||||
style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontSize": "12px" }}>
|
||||
|
||||
|
||||
</MenuItem>
|
||||
</TextField>
|
||||
</div>
|
||||
|
||||
|
@ -12235,7 +12312,7 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
<div className="session_data" >
|
||||
<div>
|
||||
{String(participant_data_edit_mode) !== "1" && <div className="session_caract"> Session<br />
|
||||
{String(participant_data_edit_mode) !== "1" && <div className="session_caract"> <b> Session </b><br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
|
@ -12511,7 +12588,7 @@ const DisplayPartnerSession = (props) => {
|
|||
}
|
||||
/>
|
||||
</div>
|
||||
<div className="session_caract"> Ville <br />
|
||||
<div className="session_caract"> Ville r <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
|
@ -12523,7 +12600,7 @@ const DisplayPartnerSession = (props) => {
|
|||
}}
|
||||
disabled={false}
|
||||
value={p_detail_ville}
|
||||
conChange={(e) => {
|
||||
onChange={(e) => {
|
||||
setp_detail_ville(e.target.value);
|
||||
setparticipant_data_changed("1");
|
||||
}
|
||||
|
|
|
@ -856,6 +856,8 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
hiddenFileInput_session.current.click();
|
||||
}
|
||||
|
||||
const myRef_details = useRef(null)
|
||||
|
||||
const [addOneSession, setaddOneSession] = useState();
|
||||
function submenu_add_one_stagiaire() {
|
||||
setsubmenu("");
|
||||
|
@ -864,9 +866,9 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
setaddOneParticipant("1");
|
||||
|
||||
|
||||
if (document.getElementById('detail_session')) {
|
||||
if (document.getElementById('myRef_details')) {
|
||||
// myRef.current.scrollIntoView({ behavior: "smooth" });
|
||||
var divh = document.getElementById('detail_session').offsetTop;
|
||||
var divh = document.getElementById('myRef_details').offsetTop;
|
||||
window.scrollTo({
|
||||
top: divh,
|
||||
behavior: "smooth",
|
||||
|
@ -1075,7 +1077,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
if (document.getElementsByName("one_pays_part") && document.getElementsByName("one_pays_part")[0])
|
||||
document.getElementsByName("one_pays_part")[0].value = "";
|
||||
|
||||
if (document.getElementsByName("one_detail_type_apprenant") && document.getElementsByName("one_pays_part")[0])
|
||||
if (document.getElementsByName("one_detail_type_apprenant") && document.getElementsByName("one_detail_type_apprenant")[0])
|
||||
document.getElementsByName("one_detail_type_apprenant")[0].value = "";
|
||||
|
||||
if (document.getElementsByName("one_status_part") && document.getElementsByName("one_status_part")[0])
|
||||
|
@ -1085,6 +1087,10 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
document.getElementsByName("one_detail_client_rattachement")[0].value = "";
|
||||
|
||||
|
||||
if (document.getElementsByName("one_status_part") && document.getElementsByName("one_status_part")[0])
|
||||
document.getElementsByName("one_status_part")[0].value = "";
|
||||
|
||||
|
||||
|
||||
setp_one_detail_session_class("");
|
||||
setp_one_nom_part("");
|
||||
|
@ -1100,6 +1106,8 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
setp_one_detail_client_rattachement_id("");
|
||||
|
||||
setp_one_detail_type_apprenant("");
|
||||
setp_one_detail_client_rattachement_id("");
|
||||
setp_one_status_part("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -1122,7 +1130,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
|
||||
|
||||
if (!local_mail.match(validRegex)) {
|
||||
if (!local_mail.trim().match(validRegex)) {
|
||||
alert("L'adresse email est invalide. Impossible de renvoyer les identifiants");
|
||||
return;
|
||||
}
|
||||
|
@ -1989,7 +1997,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
//console.log(" In Getall_TrainingSession res.data.status = " + res.data.status);
|
||||
console.log(" In Getall_TrainingSession res.data.message r_class = " + res.data.message);
|
||||
//console.log(" In Getall_TrainingSession res.data.message r_class = " + res.data.message);
|
||||
setGetall_TrainingSession_api("true");
|
||||
setGetall_TrainingSession_result(res.data.message);
|
||||
|
||||
|
@ -1999,7 +2007,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
//---
|
||||
var localid = JSON.parse(x).id;
|
||||
var local_id = JSON.parse(x)._id;
|
||||
var local_internal_url = JSON.parse(x).internal_url;
|
||||
var local_internal_url = JSON.parse(x).class_internal_url;
|
||||
var local_title_session = JSON.parse(x).titre;
|
||||
var local_code_session = JSON.parse(x).code_session;
|
||||
|
||||
|
@ -2011,7 +2019,8 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
"id": localid,
|
||||
"label": local_code_session,
|
||||
"class_internal_url": local_internal_url,
|
||||
"titre": local_title_session
|
||||
"titre": local_title_session,
|
||||
"code_session": local_code_session,
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
||||
|
@ -2023,6 +2032,8 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
if (new_data2.length > 0)
|
||||
setNew_Getall_TrainingSession_result(new_data2);
|
||||
|
||||
//console.log(" ### new_data2 = ", new_data2)
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
|
@ -2156,6 +2167,10 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
const [p_one_detail_client_rattachement_nom, setp_one_detail_client_rattachement_nom] = useState();
|
||||
const [p_one_detail_client_rattachement_id, setp_one_detail_client_rattachement_id] = useState();
|
||||
|
||||
|
||||
const [p_one_detail_code_session, setp_one_detail_code_session] = useState();
|
||||
|
||||
|
||||
//----
|
||||
|
||||
const [p_myclass_title, setp_myclass_title] = useState("");
|
||||
|
@ -2640,8 +2655,8 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
|
||||
var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
|
||||
if (!p_one_email_part.match(validRegex)) {
|
||||
alert("L'adresse email est invalide.");
|
||||
if (!p_one_email_part.trim().match(validRegex)) {
|
||||
alert("L'adresse email est invalide 1.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2663,10 +2678,10 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
form.append("token", stored_cookie);
|
||||
form.append("class_internal_url", p_one_formation);
|
||||
form.append("session_id", p_one_detail_session_class);
|
||||
form.append("nom", p_one_nom_part);
|
||||
form.append("prenom", p_one_prenom_part);
|
||||
form.append("email", p_one_email_part);
|
||||
form.append("telephone", p_one_phone_part);
|
||||
form.append("nom", p_one_nom_part.trim());
|
||||
form.append("prenom", p_one_prenom_part.trim());
|
||||
form.append("email", p_one_email_part.trim());
|
||||
form.append("telephone", p_one_phone_part.trim());
|
||||
|
||||
if (String(p_one_nom_part).trim().length < 2) {
|
||||
alert("Le nom est invalide.");
|
||||
|
@ -2683,12 +2698,6 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
return;
|
||||
}
|
||||
|
||||
var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
|
||||
if (!p_one_email_part.match(validRegex)) {
|
||||
alert("L'adresse email est invalide.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (p_one_adresse_part)
|
||||
form.append("adresse", p_one_adresse_part);
|
||||
|
@ -2775,6 +2784,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
Getall_TrainingParticipant();
|
||||
clear_one_Attende_Fields();
|
||||
setselected_id("");
|
||||
|
||||
alert(" Le participant a été correctement ajouté");
|
||||
|
||||
//myRef_head.current.scrollIntoView({ behavior: "smooth" });
|
||||
|
@ -2840,12 +2850,12 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
}
|
||||
|
||||
if (String(p_detail_tel).trim().length < 2) {
|
||||
alert("Le Téléphone est invalide.");
|
||||
alert("Le numéro de téléphone est invalide.");
|
||||
return;
|
||||
}
|
||||
|
||||
var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
|
||||
if (!p_detail_mail.match(validRegex)) {
|
||||
if (!p_detail_mail.trim().match(validRegex)) {
|
||||
alert("L'adresse email est invalide.");
|
||||
return;
|
||||
}
|
||||
|
@ -3062,6 +3072,8 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
}
|
||||
|
||||
const [New_GetCurrentPartnerClass_result, setNew_GetCurrentPartnerClass_result] = useState([]);
|
||||
|
||||
const [GetCurrentPartnerClass_api, setGetCurrentPartnerClass_api] = useState();
|
||||
const [GetCurrentPartnerClass_message, setGetCurrentPartnerClass_message] = useState();
|
||||
const [GetCurrentPartnerClass_result, setGetCurrentPartnerClass_result] = useState();
|
||||
|
@ -3083,6 +3095,33 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
setGetCurrentPartnerClass_api("true");
|
||||
setGetCurrentPartnerClass_result(res.data.message);
|
||||
|
||||
var new_data2 = [];
|
||||
const new_data = res.data.message.map((x) => {
|
||||
|
||||
//---
|
||||
var localid = JSON.parse(x).id;
|
||||
var local_id = JSON.parse(x)._id;
|
||||
var local_internal_url = JSON.parse(x).internal_url;
|
||||
var local_title = JSON.parse(x).title;
|
||||
var local_external_code = JSON.parse(x).external_code;
|
||||
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
"label": local_title,
|
||||
"internal_url": local_internal_url,
|
||||
"title": local_title,
|
||||
"external_code": local_external_code
|
||||
};
|
||||
new_data2.push(node);
|
||||
});
|
||||
|
||||
if (new_data2.length > 0)
|
||||
setNew_GetCurrentPartnerClass_result(new_data2);
|
||||
|
||||
|
||||
|
||||
} else if (String(res.data.status) === String("Err_Connexion")) {
|
||||
alert('Erreur: ' + res.data.message);
|
||||
|
@ -4235,12 +4274,12 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
if (p_detail_tuteur1_email && String(p_detail_tuteur1_email).trim() !== "") {
|
||||
var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
|
||||
if (!p_detail_tuteur1_email.match(validRegex)) {
|
||||
alert("L'adresse email est invalide.");
|
||||
if (!p_detail_tuteur1_email.trim().match(validRegex)) {
|
||||
alert("L'adresse email du tuteur est invalide.");
|
||||
return;
|
||||
}
|
||||
|
||||
form.append("tuteur1_email", p_detail_tuteur1_email);
|
||||
form.append("tuteur1_email", p_detail_tuteur1_email.trim());
|
||||
}
|
||||
|
||||
|
||||
|
@ -4294,11 +4333,11 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
if (p_detail_tuteur2_email && String(p_detail_tuteur2_email).trim() !== "") {
|
||||
var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
|
||||
if (!p_detail_tuteur2_email.match(validRegex)) {
|
||||
alert("L'adresse email est invalide.");
|
||||
if (!p_detail_tuteur2_email.trim().match(validRegex)) {
|
||||
alert("L'adresse email du tuteur est invalide.");
|
||||
return;
|
||||
}
|
||||
form.append("tuteur2_email", p_detail_tuteur2_email);
|
||||
form.append("tuteur2_email", p_detail_tuteur2_email.trim());
|
||||
}
|
||||
|
||||
|
||||
|
@ -4928,7 +4967,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
// 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_detail_tuteur1_email.match(validRegex)) {
|
||||
if (!p_detail_tuteur1_email.trim().match(validRegex)) {
|
||||
alert("L'adresse email est invalide. Pour activer cette fontion, vous devez saisir une adresse email valide");
|
||||
return;
|
||||
}
|
||||
|
@ -5090,7 +5129,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
// 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_detail_tuteur2_email.match(validRegex)) {
|
||||
if (!p_detail_tuteur2_email.trim().match(validRegex)) {
|
||||
alert("L'adresse email est invalide. Pour activer cette fontion, vous devez saisir une adresse email valide");
|
||||
return;
|
||||
}
|
||||
|
@ -6057,7 +6096,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
<a href='/sample/template_import_stagiaires.csv' download>Télécharger un fichier modèle</a>
|
||||
</div>
|
||||
</div>
|
||||
<div className="div_row"> </div>
|
||||
<div className="div_row" ref={myRef_details} id="myRef_details"> </div>
|
||||
|
||||
{((selected_id && String(selected_id).length > 2) || (String(addOneParticipant) === "1")) && <div className="div_row">
|
||||
<Button variant="outlined" ref={myRef} onClick={submenu_detail_stagaire} className="detail_class_submenu" id='detail_session' name='detail_session'>Détail Stagiaire</Button>
|
||||
|
@ -6067,12 +6106,12 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
</div>}
|
||||
|
||||
|
||||
|
||||
|
||||
{String(addOneParticipant) === "1" && <div className="div_row session_data" style={{ "border": "None", "backgroundColor": "#F0F0F0" }}>
|
||||
<nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}> Ajouter un nouveau stagiaire </nav>
|
||||
|
||||
<div className="session_caract"> Formation <br />
|
||||
{/*<div className="session_caract"> Formation <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
|
@ -6100,9 +6139,71 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
</MenuItem>
|
||||
))}
|
||||
</TextField>
|
||||
</div>*/}
|
||||
|
||||
<div className="session_caract"> Formation <br />
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
id="combo-box-demo"
|
||||
className="disabled_style enable_style"
|
||||
options={New_GetCurrentPartnerClass_result}
|
||||
|
||||
onChange={(event, value) => {
|
||||
if (value && value.internal_url) {
|
||||
setp_one_formation(value.internal_url);
|
||||
setp_one_detail_session_class('');
|
||||
setp_one_detail_session_class("");
|
||||
}
|
||||
}}
|
||||
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" />
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="session_caract"> <b> Session </b><br />
|
||||
{p_one_formation && Getall_TrainingSession_result && <div className="session_caract"> <b> Session</b>
|
||||
<br />
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
id="combo-box-demo"
|
||||
className="disabled_style enable_style"
|
||||
options={New_Getall_TrainingSession_result.filter((session_ch) => session_ch.class_internal_url === p_one_formation)}
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
setp_one_detail_session_class(value._id);
|
||||
setp_one_detail_code_session(value.code_session);
|
||||
}
|
||||
|
||||
}}
|
||||
value={p_one_detail_code_session}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" />
|
||||
}
|
||||
/>
|
||||
</div>}
|
||||
|
||||
{!p_one_formation && Getall_TrainingSession_result && <div className="session_caract"> <b> Session </b><br />
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
id="combo-box-demo"
|
||||
className="disabled_style enable_style"
|
||||
options={New_Getall_TrainingSession_result}
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
setp_one_detail_session_class(value._id);
|
||||
}
|
||||
}}
|
||||
value={p_one_detail_code_session}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" />
|
||||
}
|
||||
/>
|
||||
</div>}
|
||||
|
||||
|
||||
|
||||
{/*<div className="session_caract"> <b> Session </b><br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
|
@ -6139,7 +6240,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
</MenuItem>
|
||||
))}
|
||||
</TextField>
|
||||
</div>
|
||||
</div>*/}
|
||||
|
||||
|
||||
<div className="session_caract"> <b> Nom </b> <br />
|
||||
|
@ -6335,7 +6436,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
</TextField>
|
||||
</div>
|
||||
|
||||
<div className="session_caract"> Client 2<br />
|
||||
<div className="session_caract"> Client <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
|
@ -6362,6 +6463,11 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
</MenuItem>
|
||||
))}
|
||||
<MenuItem key="" value=""
|
||||
style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontSize": "12px" }}>
|
||||
|
||||
|
||||
</MenuItem>
|
||||
</TextField>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1874,7 +1874,7 @@ const Partner_Configuration_Jours_Travail = (props) => {
|
|||
/>
|
||||
</div>
|
||||
<div className="div_row" style={{ "textAlign": "left" }}>
|
||||
<Button value="mercredi" onClick={add_one_nb_sequence}> <IoMdAddCircle /> aa Séquence</Button> <br />
|
||||
<Button value="mercredi" onClick={add_one_nb_sequence}> <IoMdAddCircle /> Séquence</Button> <br />
|
||||
<Button value="mercredi" onClick={minus_one_nb_sequence}><IoIosRemoveCircleOutline /> Séquence </Button>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue