13/02/2024 - 11h
parent
7b965dd81f
commit
ee43110758
|
@ -2331,7 +2331,7 @@ const AddParnerClient = (props) => {
|
|||
|
||||
{String(props.new_customer) === "1" && <div className="div_row" style={{ "paddingRight": "5px" }}>
|
||||
<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 Principales</Button>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -2699,7 +2699,7 @@ const AddParnerClient = (props) => {
|
|||
|
||||
{String(props.new_customer) !== "1" && <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 Principales</Button>
|
||||
<Button variant="outlined" onClick={submenu_donnee_facturation} className="detail_submenu" id='submenu_donnee_facturation' name='submenu_donnee_facturation'>Données Facturation</Button>
|
||||
<Button variant="outlined" onClick={submenu_contact} className="detail_submenu" id='submenu_contact' name='submenu_contact'>Contact & Adresses</Button>
|
||||
<Button variant="outlined" onClick={submenu_activite} className="detail_submenu" id='submenu_activite' name='submenu_activite'>Activité</Button>
|
||||
|
|
|
@ -1375,6 +1375,87 @@ const DisplayPartnerSession = (props) => {
|
|||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
const [New_Get_List_Partner_Financeurs_result, setNew_Get_List_Partner_Financeurs_result] = useState([]);
|
||||
|
||||
const [Get_List_Partner_Financeurs_api, setGet_List_Partner_Financeurs_api] = useState();
|
||||
const [Get_List_Partner_Financeurs_message, setGet_List_Partner_Financeurs_message] = useState();
|
||||
const [Get_List_Partner_Financeurs_result, setGet_List_Partner_Financeurs_result] = useState();
|
||||
function Get_List_Partner_Financeurs(event) {
|
||||
|
||||
var form = new FormData();
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
|
||||
form.append("token", stored_cookie);
|
||||
form.append("is_financeur", "1");
|
||||
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Partner_List_Partner_Client_with_filter_Like/";
|
||||
setLoading(true);
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
//console.log(" In Get_List_Partner_Financeurs res.data.status = " + res.data.status);
|
||||
//console.log(" In Get_List_Partner_Financeurs res.data.message r_class = " + res.data.message);
|
||||
setLoading(false);
|
||||
if (String(res.data.status) === String("true")) {
|
||||
setGet_List_Partner_Financeurs_api("true");
|
||||
setGet_List_Partner_Financeurs_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_raison_sociale = JSON.parse(x).raison_sociale;
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
"label": local_nom,
|
||||
"nom": local_nom,
|
||||
"raison_sociale": local_raison_sociale,
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
});
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": "",
|
||||
"id": "",
|
||||
"label": "",
|
||||
"nom": "",
|
||||
"raison_sociale": "",
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
||||
if (new_data2.length > 0)
|
||||
setNew_Get_List_Partner_Financeurs_result(new_data2);
|
||||
}
|
||||
else if (String(res.data.status) === String("Err_Connexion")) {
|
||||
alert('Erreur: ' + res.data.message);
|
||||
history.push("/Connexion");
|
||||
}
|
||||
else {
|
||||
setGet_List_Partner_Financeurs_api("false");
|
||||
setGet_List_Partner_Financeurs_message(res.data.message);
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.warn('Not good man :( Get_List_Partner_Financeurs = ', error);
|
||||
setGet_List_Partner_Financeurs_api("false");
|
||||
//setmyApimyApiMessage("")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
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();
|
||||
|
@ -1583,6 +1664,8 @@ const DisplayPartnerSession = (props) => {
|
|||
Getall_Training_Employee_No_Filter();
|
||||
Getall_Training_Materiel_No_Filter();
|
||||
|
||||
Get_List_Partner_Financeurs();
|
||||
|
||||
Getall_Parter_OR_Default_Session_Steps();
|
||||
|
||||
GetCurrentPartnerClass();
|
||||
|
@ -2404,6 +2487,8 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
const [addOneParticipant, setaddOneParticipant] = useState();
|
||||
function submenu_add_one_participant() {
|
||||
|
||||
Get_List_Partner_Financeurs();
|
||||
setaddOneParticipant("1");
|
||||
|
||||
var myelement;
|
||||
|
@ -2701,6 +2786,12 @@ const DisplayPartnerSession = (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_financeur_rattachement_id, setp_one_detail_financeur_rattachement_id] = useState();
|
||||
const [p_one_detail_financeur_rattachement_nom, setp_one_detail_financeur_rattachement_nom] = useState();
|
||||
|
||||
|
||||
|
||||
const [p_one_detail_type_apprenant, setp_one_detail_type_apprenant] = useState();
|
||||
|
||||
|
||||
|
@ -2812,6 +2903,12 @@ const DisplayPartnerSession = (props) => {
|
|||
form.append("client_rattachement_id", "");
|
||||
|
||||
|
||||
if (p_one_detail_financeur_rattachement_id)
|
||||
form.append("financeur_rattachement_id", p_one_detail_financeur_rattachement_id);
|
||||
else
|
||||
form.append("financeur_rattachement_id", "");
|
||||
|
||||
|
||||
if (p_one_detail_type_apprenant)
|
||||
form.append("type_apprenant", p_one_detail_type_apprenant);
|
||||
else
|
||||
|
@ -3374,6 +3471,11 @@ const DisplayPartnerSession = (props) => {
|
|||
else
|
||||
form.append("client_rattachement_id", "");
|
||||
|
||||
if (p_detail_financeur_rattachement_id)
|
||||
form.append("financeur_rattachement_id", p_detail_financeur_rattachement_id);
|
||||
else
|
||||
form.append("financeur_rattachement_id", "");
|
||||
|
||||
/*
|
||||
Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenaire
|
||||
*/
|
||||
|
@ -4065,6 +4167,10 @@ const DisplayPartnerSession = (props) => {
|
|||
document.getElementsByName("one_detail_client_rattachement")[0].value = "";
|
||||
|
||||
|
||||
if (document.getElementsByName("one_detail_financeur_rattachement") && document.getElementsByName("one_detail_financeur_rattachement")[0])
|
||||
document.getElementsByName("one_detail_financeur_rattachement")[0].value = "";
|
||||
|
||||
|
||||
if (document.getElementsByName("one_civilite_part")[0])
|
||||
document.getElementsByName("one_civilite_part")[0].value = "";
|
||||
|
||||
|
@ -6679,6 +6785,10 @@ const DisplayPartnerSession = (props) => {
|
|||
const [p_detail_opco, setp_detail_opco] = useState();
|
||||
const [p_detail_client_rattachement_nom, setp_detail_client_rattachement_nom] = useState();
|
||||
const [p_detail_client_rattachement_id, setp_detail_client_rattachement_id] = useState();
|
||||
|
||||
const [p_detail_financeur_rattachement_id, setp_detail_financeur_rattachement_id] = useState();
|
||||
const [p_detail_financeur_rattachement_nom, setp_detail_financeur_rattachement_nom] = useState();
|
||||
|
||||
const [p_detail_titre, setp_detail_titre] = useState();
|
||||
|
||||
const [p_detail_location_type, setp_detail_location_type] = useState();
|
||||
|
@ -13560,27 +13670,7 @@ const DisplayPartnerSession = (props) => {
|
|||
}
|
||||
/>
|
||||
|
||||
{/*<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
select
|
||||
value={myinscript_status}
|
||||
name="one_status_part"
|
||||
id="one_status_part"
|
||||
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
onChange={handleChangeInscription_Status}
|
||||
disabled={false}
|
||||
className="disabled_style enable_style"
|
||||
>
|
||||
{status_inscription_add.map((option) => (
|
||||
<MenuItem key={option.value} value={option.value} style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontSize": "12px" }}>
|
||||
{option.label} <br />
|
||||
</MenuItem>
|
||||
))}
|
||||
</TextField>*/}
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -13609,6 +13699,32 @@ const DisplayPartnerSession = (props) => {
|
|||
/>
|
||||
</div>
|
||||
|
||||
{New_Get_List_Partner_Financeurs_result && New_Get_List_Partner_Financeurs_result.length > 0 &&
|
||||
<div className="session_caract"> Financeur <br />
|
||||
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="one_detail_financeur_rattachement"
|
||||
id="one_detail_financeur_rattachement"
|
||||
className="disabled_style"
|
||||
options={New_Get_List_Partner_Financeurs_result}
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
setp_one_detail_financeur_rattachement_id(value._id);
|
||||
setp_one_detail_financeur_rattachement_nom(value.nom);
|
||||
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
</div>}
|
||||
|
||||
<div className="session_caract"> Type apprenant <br />
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
|
@ -13850,7 +13966,7 @@ const DisplayPartnerSession = (props) => {
|
|||
</Button>
|
||||
<Button variant="outlined" onClick={submenu_add_one_participant}
|
||||
className="detail_class_submenu bton_add_session"
|
||||
id='menu_one_participant' name='menu_one_participant'>Ajouter 1 participant
|
||||
id='menu_one_participant' name='menu_one_participant'>Ajout 1 participant
|
||||
<img src={participants} alt="ajout un participant" className="icon_plus" />
|
||||
</Button>
|
||||
|
||||
|
@ -14325,6 +14441,33 @@ const DisplayPartnerSession = (props) => {
|
|||
/>
|
||||
</div>
|
||||
|
||||
{New_Get_List_Partner_Financeurs_result && New_Get_List_Partner_Financeurs_result.length > 0 &&
|
||||
<div className="session_caract"> Financeur <br />
|
||||
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="one_detail_financeur_rattachement"
|
||||
id="one_detail_financeur_rattachement"
|
||||
className="disabled_style"
|
||||
options={New_Get_List_Partner_Financeurs_result}
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
setp_one_detail_financeur_rattachement_id(value._id);
|
||||
setp_one_detail_financeur_rattachement_nom(value.nom);
|
||||
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
</div>}
|
||||
|
||||
|
||||
<div className="session_caract"> Type apprenant <br />
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
|
@ -14568,7 +14711,7 @@ const DisplayPartnerSession = (props) => {
|
|||
</Button>
|
||||
<Button variant="outlined" onClick={submenu_add_one_participant}
|
||||
className="detail_class_submenu bton_add_session"
|
||||
id='menu_one_participant' name='menu_one_participant'>Ajouter 1 participant
|
||||
id='menu_one_participant' name='menu_one_participant'>Ajout 1 participant
|
||||
<img src={participants} alt="ajout un participant" className="icon_plus" />
|
||||
</Button>
|
||||
|
||||
|
@ -14764,6 +14907,79 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
</div>}
|
||||
|
||||
{New_Get_List_Partner_Financeurs_result && New_Get_List_Partner_Financeurs_result.length > 0 &&
|
||||
String(participant_data_edit_mode) === "1" && <div className="session_caract"> Financeur <br />
|
||||
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="detail_financeur_rattachement"
|
||||
id="detail_financeur_rattachement"
|
||||
className="disabled_style"
|
||||
options={New_Get_List_Partner_Financeurs_result}
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
setp_detail_financeur_rattachement_id(value._id);
|
||||
setp_detail_financeur_rattachement_nom(value.nom);
|
||||
|
||||
|
||||
setparticipant_data_changed("1");
|
||||
Dialog_1_handle_change_participant_session(" Attention, vous allez modifier l'organisme financeur du participant");
|
||||
|
||||
|
||||
}
|
||||
}}
|
||||
value={p_detail_financeur_rattachement_nom}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
</div>}
|
||||
|
||||
{String(participant_data_edit_mode) !== "1" && <div className="session_caract"> Financeur<br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="detail_financeur_rattachement"
|
||||
id="detail_financeur_rattachement"
|
||||
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style disabled_style_left_text_with_visualiser_icone"
|
||||
value={p_detail_financeur_rattachement_nom}
|
||||
/>
|
||||
|
||||
<Tooltip className="tooltip_css" id="detail_01" style={{ "fontSize": "12px" }} />
|
||||
<a data-tooltip-id="detail_01" data-tooltip-html="Voir les détails">
|
||||
<div className="disabled_style disabled_style_right_bton_visualiser" onClick={(event) => {
|
||||
|
||||
if (p_detail_financeur_rattachement_id && String(p_detail_financeur_rattachement_id).length > 2) {
|
||||
window.open(
|
||||
process.env.REACT_APP_FRONT_URL + "Partner/mes_clients/" + String(p_detail_financeur_rattachement_id),
|
||||
'_blank'
|
||||
);
|
||||
}
|
||||
else {
|
||||
alert(" Aucun financeur selectionné")
|
||||
}
|
||||
}
|
||||
}
|
||||
>
|
||||
<div className="disabled_style_with_visualiser_icone" >
|
||||
<FcOpenedFolder />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
</div>}
|
||||
|
||||
|
||||
{String(participant_data_edit_mode) !== "1" && <div className="session_caract"> Statut<br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
|
|
|
@ -1091,6 +1091,9 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
if (document.getElementsByName("detail_client_rattachement") && document.getElementsByName("detail_client_rattachement")[0])
|
||||
document.getElementsByName("detail_client_rattachement")[0].value = "";
|
||||
|
||||
if (document.getElementsByName("detail_financeur_rattachement") && document.getElementsByName("detail_financeur_rattachement")[0])
|
||||
document.getElementsByName("detail_financeur_rattachement")[0].value = "";
|
||||
|
||||
if (document.getElementsByName("detail_session_class") && document.getElementsByName("detail_session_class")[0])
|
||||
document.getElementsByName("detail_session_class")[0].value = "";
|
||||
|
||||
|
@ -1226,6 +1229,11 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
if (document.getElementsByName("one_detail_client_rattachement") && document.getElementsByName("one_detail_client_rattachement")[0])
|
||||
document.getElementsByName("one_detail_client_rattachement")[0].value = "";
|
||||
|
||||
if (document.getElementsByName("one_detail_financeur_rattachement") && document.getElementsByName("one_detail_financeur_rattachement")[0])
|
||||
document.getElementsByName("one_detail_financeur_rattachement")[0].value = "";
|
||||
|
||||
|
||||
|
||||
|
||||
if (document.getElementsByName("one_status_part") && document.getElementsByName("one_status_part")[0])
|
||||
document.getElementsByName("one_status_part")[0].value = "";
|
||||
|
@ -1536,6 +1544,11 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
document.getElementsByName("detail_client_rattachement")[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
|
||||
if (document.getElementsByName("detail_financeur_rattachement")[0]) {
|
||||
document.getElementsByName("detail_financeur_rattachement")[0].disabled = true;
|
||||
document.getElementsByName("detail_financeur_rattachement")[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
|
||||
|
||||
if (document.getElementsByName("detail_civilite")[0]) {
|
||||
document.getElementsByName("detail_civilite")[0].disabled = true;
|
||||
|
@ -1760,6 +1773,9 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
document.getElementsByName("detail_client_rattachement")[0].disabled = false;
|
||||
document.getElementsByName("detail_client_rattachement")[0].style.backgroundColor = "#FFFFFF";
|
||||
|
||||
document.getElementsByName("detail_financeur_rattachement")[0].disabled = false;
|
||||
document.getElementsByName("detail_financeur_rattachement")[0].style.backgroundColor = "#FFFFFF";
|
||||
|
||||
document.getElementsByName("detail_nom")[0].disabled = false;
|
||||
document.getElementsByName("detail_nom")[0].style.backgroundColor = "#FFFFFF";
|
||||
|
||||
|
@ -7865,7 +7881,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
);
|
||||
}
|
||||
else {
|
||||
alert(" Aucun client selectionné")
|
||||
alert(" Aucun financeur selectionné")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1256,12 +1256,12 @@ const Partner = (props) => {
|
|||
|
||||
|
||||
|
||||
<div class="separator"> Mes Clients </div>
|
||||
<div class="separator"> Mes partenaires </div>
|
||||
|
||||
<div>
|
||||
<hr className="my_hr" />
|
||||
{String(menu) !== "mes_clients" && <div className="sousmenu" onClick={mes_clients_func}> <FcBusinesswoman className="icone_menu" /> MES CLIENTS</div>}
|
||||
{String(menu) === "mes_clients" && <div className="sousmenu_selected" onClick={mes_clients_func}> <FcBusinesswoman className="icone_menu" /> MES CLIENTS</div>}
|
||||
{String(menu) !== "mes_clients" && <div className="sousmenu" onClick={mes_clients_func}> <FcBusinesswoman className="icone_menu" />CLIENTS / FINANCEURS</div>}
|
||||
{String(menu) === "mes_clients" && <div className="sousmenu_selected" onClick={mes_clients_func}> <FcBusinesswoman className="icone_menu" />CLIENTS / FINANCEURS</div>}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
|
|
@ -669,7 +669,7 @@ const Partner_Client = (props) => {
|
|||
<div className="div_row">
|
||||
|
||||
|
||||
<h3> Vos clients</h3>
|
||||
<h3> Vos clients & Organismes Financeurs</h3>
|
||||
|
||||
<div className="titre1"> Utilisez les filtres !</div>
|
||||
<div>
|
||||
|
@ -970,7 +970,7 @@ const Partner_Client = (props) => {
|
|||
|
||||
<Button variant="outlined" onClick={handleClick_add_new_client}
|
||||
className="detail_class_submenu bton_add_session"
|
||||
id='menu_one_participant' name='menu_one_participant'> Ajout 1 Client <img src={participants} alt="ajout un client" className="icon_plus" />
|
||||
id='menu_one_participant' name='menu_one_participant'> Ajout 1 Client / Financeur <img src={participants} alt="ajout un client" className="icon_plus" />
|
||||
|
||||
|
||||
</Button>
|
||||
|
@ -998,7 +998,7 @@ const Partner_Client = (props) => {
|
|||
|
||||
{String(Edite_Client) === "1" && <div className="div_row" style={{ "paddingRight": "10px" }}>
|
||||
|
||||
<div className="titre1"> Detail client : {Client_email}</div>
|
||||
<div className="titre1"> Detail client / Financeur: {Client_email}</div>
|
||||
|
||||
<AddParnerClient client_mail={Client_email} close_detail_client={close_detail_client} father_scroll_to_top={father_scroll_to_top}
|
||||
client_id={selected_id} />
|
||||
|
@ -1007,7 +1007,7 @@ const Partner_Client = (props) => {
|
|||
|
||||
{String(Edite_Client) === "2" && <div className="div_row">
|
||||
|
||||
<div className="titre1"> Detail client : {Client_email}</div>
|
||||
<div className="titre1"> Detail client / Financeur : {Client_email}</div>
|
||||
<div ref={myRef_add_client}> </div>
|
||||
<AddParnerClient client_mail={Client_email} close_detail_client={close_detail_client} new_customer="1" client_id={selected_id}
|
||||
Get_List_Partner_Clients={Get_List_Partner_Clients} father_scroll_to_top={father_scroll_to_top} />
|
||||
|
|
Loading…
Reference in New Issue