05/05/2026 - 19h
parent
cdcaa7fdcb
commit
6dba6d312b
|
|
@ -265,6 +265,9 @@ const AddParnerClient = (props) => {
|
|||
|
||||
|
||||
async function submenu_donnee_facturation() {
|
||||
|
||||
Get_List_Partner_Clients_except_current();
|
||||
|
||||
setsubmenu("submenu_donnees_facturation");
|
||||
/*
|
||||
Ceci est super crade, fair eun wait de pour attendre l'afficage avant de desacitcation si on a desactiver, mais bon ... on avance.
|
||||
|
|
@ -720,6 +723,126 @@ const AddParnerClient = (props) => {
|
|||
})
|
||||
}
|
||||
|
||||
|
||||
const [New_Get_List_Partner_Clients_except_current_result, setNew_Get_List_Partner_Clients_except_current_result] = useState([]);
|
||||
|
||||
const [Get_List_Partner_Clients_except_current_api, setGet_List_Partner_Clients_except_current_api] = useState();
|
||||
const [Get_List_Partner_Clients_except_current_message, setGet_List_Partner_Clients_except_current_message] = useState();
|
||||
const [Get_List_Partner_Clients_except_current_result, setGet_List_Partner_Clients_except_current_result] = useState([]);
|
||||
function Get_List_Partner_Clients_except_current(event) {
|
||||
|
||||
|
||||
var form = new FormData();
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
|
||||
form.append("token", stored_cookie);
|
||||
form.append("archive", "0");
|
||||
form.append("not_id", props.client_id);
|
||||
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Partner_List_Partner_Client_with_filter_Like/";
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
//console.log(" In Get_List_Partner_Clients_except_current res.data.status = " + res.data.status);
|
||||
//console.log(" In Get_List_Partner_Clients_except_current res.data.message r_class = " + res.data.message);
|
||||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
setGet_List_Partner_Clients_except_current_api("true");
|
||||
setGet_List_Partner_Clients_except_current_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 raison_sociale = JSON.parse(x).raison_sociale;
|
||||
var invoice_nom = JSON.parse(x).invoice_nom;
|
||||
var invoice_adresse = JSON.parse(x).invoice_adresse;
|
||||
var invoice_code_postal = JSON.parse(x).invoice_code_postal;
|
||||
var invoice_ville = JSON.parse(x).invoice_ville;
|
||||
var invoice_pays = JSON.parse(x).invoice_pays;
|
||||
var invoice_email = JSON.parse(x).invoice_email;
|
||||
var telephone = JSON.parse(x).telephone;
|
||||
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
"raison_sociale": raison_sociale,
|
||||
"invoice_nom": invoice_nom,
|
||||
"invoice_adresse": invoice_adresse,
|
||||
"invoice_code_postal": invoice_code_postal,
|
||||
"invoice_ville": invoice_ville,
|
||||
"invoice_pays": invoice_pays,
|
||||
"invoice_email": invoice_email,
|
||||
"telephone": telephone,
|
||||
|
||||
"label": raison_sociale + " " + invoice_nom
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
||||
// return {"_id": " + str(local_id) + ", "label": " + local_courrier_template_ref_interne + '" , "courrier_template_ref_interne": "' + local_courrier_template_ref_interne + '", "nom_champ_technique": "' + local_nom_champ_technique + '", "nom_champ_fonctionel": "' + local_nom_champ_fonctionel + '","valide": "1" };
|
||||
|
||||
});
|
||||
|
||||
var node = {
|
||||
"_id": "",
|
||||
"id": "",
|
||||
"raison_sociale": "",
|
||||
"invoice_nom": "",
|
||||
"invoice_adresse": "",
|
||||
"invoice_code_postal": "",
|
||||
"invoice_ville": "",
|
||||
"invoice_pays": "",
|
||||
"invoice_email": "",
|
||||
"telephone": "",
|
||||
"label": "",
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
||||
if (new_data2.length > 0) {
|
||||
setNew_Get_List_Partner_Clients_except_current_result(new_data2);
|
||||
|
||||
} else {
|
||||
setNew_Get_List_Partner_Clients_except_current_result({
|
||||
"_id": "",
|
||||
"id": "",
|
||||
"raison_sociale": "",
|
||||
"invoice_nom": "",
|
||||
"invoice_adresse": "",
|
||||
"invoice_code_postal": "",
|
||||
"invoice_ville": "",
|
||||
"invoice_pays": "",
|
||||
"invoice_email": "",
|
||||
"telephone": "",
|
||||
"label": "",
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else if (String(res.data.status) === String("Err_Connexion")) {
|
||||
alert('Erreur: ' + res.data.message);
|
||||
history.push("/Connexion");
|
||||
|
||||
}
|
||||
else {
|
||||
setGet_List_Partner_Clients_except_current_api("false");
|
||||
setGet_List_Partner_Clients_except_current_message(res.data.message);
|
||||
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
console.warn('Not good man :( Get_List_Partner_Clients_except_current = ', error);
|
||||
setGet_List_Partner_Clients_except_current_api("false");
|
||||
|
||||
//setmyApimyApiMessage("")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
Get_List_Client_Type();
|
||||
Get_List_Client_Groupe();
|
||||
|
|
@ -728,6 +851,8 @@ const AddParnerClient = (props) => {
|
|||
Get_List_Type_Financeur();
|
||||
Get_List_Type_Pouvoir_Public();
|
||||
|
||||
|
||||
|
||||
if (String(props.new_customer) !== "1") {
|
||||
setformedit_mode("0");
|
||||
setformedit_mode_invoice("0");
|
||||
|
|
@ -982,6 +1107,11 @@ const AddParnerClient = (props) => {
|
|||
else
|
||||
setp_detail_facturation_automatique("");
|
||||
|
||||
if (mylocalclient.client_facturation_id)
|
||||
setp_detail_client_facturation_id(mylocalclient.client_facturation_id);
|
||||
else
|
||||
setp_detail_client_facturation_id("");
|
||||
|
||||
setdatamodification("0");
|
||||
setdatamodification_invoice("0");
|
||||
|
||||
|
|
@ -1098,6 +1228,11 @@ const AddParnerClient = (props) => {
|
|||
else
|
||||
setp_detail_facturation_automatique("");
|
||||
|
||||
if (mylocalclient.client_facturation_id)
|
||||
setp_detail_client_facturation_id(mylocalclient.client_facturation_id);
|
||||
else
|
||||
setp_detail_client_facturation_id("");
|
||||
|
||||
Disable_invoice_fields();
|
||||
}
|
||||
}
|
||||
|
|
@ -1826,6 +1961,8 @@ const AddParnerClient = (props) => {
|
|||
form.append("type_pouvoir_public_id", p_client_type_pouvoir_public);
|
||||
|
||||
|
||||
form.append("client_facturation_id", p_detail_client_facturation_id);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Partner_Client/";
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
|
@ -2159,6 +2296,8 @@ const AddParnerClient = (props) => {
|
|||
|
||||
form.append("invoice_automatique", p_detail_facturation_automatique);
|
||||
|
||||
form.append("client_facturation_id", p_detail_client_facturation_id);
|
||||
|
||||
form.append("_id", props.client_id);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Update_Partner_Client/";
|
||||
|
|
@ -2264,6 +2403,11 @@ const AddParnerClient = (props) => {
|
|||
document.getElementsByName("client_invoice_nom")[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
|
||||
if (document.getElementsByName("field_client_facture_id")) {
|
||||
document.getElementsByName("field_client_facture_id")[0].disabled = true;
|
||||
document.getElementsByName("field_client_facture_id")[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
|
||||
if (document.getElementsByName("client_invoice_siret")) {
|
||||
document.getElementsByName("client_invoice_siret")[0].disabled = true;
|
||||
document.getElementsByName("client_invoice_siret")[0].style.backgroundColor = "#ECEFF1";
|
||||
|
|
@ -2323,6 +2467,11 @@ const AddParnerClient = (props) => {
|
|||
document.getElementsByName("client_invoice_nom")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
||||
if (document.getElementsByName("field_client_facture_id")) {
|
||||
document.getElementsByName("field_client_facture_id")[0].disabled = false;
|
||||
document.getElementsByName("field_client_facture_id")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
||||
if (document.getElementsByName("client_invoice_siret")) {
|
||||
document.getElementsByName("client_invoice_siret")[0].disabled = false;
|
||||
document.getElementsByName("client_invoice_siret")[0].style.backgroundColor = "#FFFFFF";
|
||||
|
|
@ -2874,6 +3023,8 @@ const AddParnerClient = (props) => {
|
|||
|
||||
const [p_detail_facturation_automatique, setp_detail_facturation_automatique] = useState("");
|
||||
|
||||
const [p_detail_client_facturation_id, setp_detail_client_facturation_id] = useState("");
|
||||
|
||||
const [p_client_is_financeur, setp_client_is_financeur] = useState(false);
|
||||
const [p_client_is_fournisseur, setp_client_is_fournisseur] = useState(false);
|
||||
const [p_client_is_client, setp_client_is_client] = useState(true);
|
||||
|
|
@ -4947,102 +5098,62 @@ const AddParnerClient = (props) => {
|
|||
|
||||
{String(submenu).trim() === "submenu_donnees_facturation" && <div className="training_data" onChange={DataUpdated_Invoice_Data}>
|
||||
|
||||
<div className="session_caract"><b> Email de Facturation </b> <br />
|
||||
<TextField
|
||||
required
|
||||
name="client_invoice_email"
|
||||
//label="Email de Facturation"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_invoice_email}
|
||||
onChange={(e) => setclient_invoice_email(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="session_caract">
|
||||
<Tooltip className="tooltip_css" id="tooltip_client_facture" style={{ "fontSize": "10px" }} />
|
||||
<a data-tooltip-id="tooltip_client_facture" data-tooltip-html="Permet de définir le client à facturer lorsque le client actuel est le donneur d’ordre">
|
||||
Client facturé <FcInfo />
|
||||
</a>
|
||||
<br />
|
||||
|
||||
<div className="session_caract"> Nom de Facturation<br />
|
||||
<TextField
|
||||
required
|
||||
name="client_invoice_nom"
|
||||
//label="Nom de Facturation"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_invoice_nom}
|
||||
onChange={(e) => setclient_invoice_nom(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
{String(formedit_mode_invoice) !== "1" && New_Get_List_Partner_Clients_except_current_result && New_Get_List_Partner_Clients_except_current_result.length > 0 &&
|
||||
<TextField
|
||||
required
|
||||
name="field_client_facture_id"
|
||||
//label="Adresse"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={New_Get_List_Partner_Clients_except_current_result.filter((data) => (data)._id === String(p_detail_client_facturation_id))[0].label}
|
||||
|
||||
/>}
|
||||
|
||||
|
||||
<div className="session_caract"> N° Siret Facturation<br />
|
||||
<TextField
|
||||
required
|
||||
name="client_invoice_siret"
|
||||
//label="N° Siret Facturation"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_invoice_siret}
|
||||
onChange={(e) => setclient_invoice_siret(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="session_caract"> N° TVA Facturation<br />
|
||||
<TextField
|
||||
required
|
||||
name="client_invoice_tva"
|
||||
// label="N° TVA Facturation"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_invoice_tva}
|
||||
onChange={(e) => setclient_invoice_tva(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="session_caract"> <b> Conditions Paiement </b><br />
|
||||
{/*String(formedit_mode_invoice) !== "1" && <TextField
|
||||
required
|
||||
name="client_invoice_paiement_condition"
|
||||
//label="Adresse"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_invoice_paiement_condition_code}
|
||||
// onChange={(e) => setp_client_invoice_paiement_condition_code(e.target.value)}
|
||||
/>*/}
|
||||
{New_Getall_Partner_Paiement_Condition_result && New_Getall_Partner_Paiement_Condition_result.length > 0 &&
|
||||
{String(formedit_mode_invoice) === "1" && New_Get_List_Partner_Clients_except_current_result && New_Get_List_Partner_Clients_except_current_result.length > 0 &&
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="client_invoice_paiement_condition"
|
||||
id="client_invoice_paiement_condition"
|
||||
style={{ height: '3.5re' }}
|
||||
disabled={!Boolean(parseInt(formedit_mode_invoice))}
|
||||
value={New_Getall_Partner_Paiement_Condition_result.filter((data) => (data).label === String(p_client_invoice_paiement_condition_code))[0].label}
|
||||
options={New_Getall_Partner_Paiement_Condition_result}
|
||||
className="disabled_style"
|
||||
|
||||
name="field_client_facture_id"
|
||||
id="field_client_facture_id"
|
||||
className="disabled_style enable_style"
|
||||
value={New_Get_List_Partner_Clients_except_current_result.filter((data) => (data)._id === String(p_detail_client_facturation_id))[0].label}
|
||||
options={New_Get_List_Partner_Clients_except_current_result}
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
setp_client_invoice_paiement_condition_code(value.code);
|
||||
setp_client_invoice_paiement_condition_id(value._id);
|
||||
setp_detail_client_facturation_id(value._id);
|
||||
setclient_invoice_nom(value.invoice_nom);
|
||||
setclient_invoice_email(value.invoice_email);
|
||||
setclient_invoice_adresse(value.invoice_adresse);
|
||||
setclient_invoice_ville(value.invoice_ville);
|
||||
setclient_invoice_code_postal(value.invoice_code_postal);
|
||||
setclient_invoice_pays(value.invoice_pays);
|
||||
|
||||
|
||||
DataUpdated_Invoice_Data();
|
||||
} else {
|
||||
setp_detail_client_facturation_id("");
|
||||
|
||||
setp_detail_client_facturation_id("");
|
||||
setclient_invoice_nom("");
|
||||
setclient_invoice_email("");
|
||||
setclient_invoice_adresse("");
|
||||
setclient_invoice_ville("");
|
||||
setclient_invoice_code_postal("");
|
||||
setclient_invoice_pays("");
|
||||
|
||||
DataUpdated_Invoice_Data();
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
|
|
@ -5051,68 +5162,206 @@ const AddParnerClient = (props) => {
|
|||
/>}
|
||||
</div>
|
||||
|
||||
<div className="session_caract"> Adresse<br />
|
||||
<TextField
|
||||
required
|
||||
name="client_invoice_adresse"
|
||||
//label="Adresse"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_invoice_adresse}
|
||||
onChange={(e) => setclient_invoice_adresse(e.target.value)}
|
||||
/>
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
<hr className="hr_break" />
|
||||
</div>
|
||||
|
||||
<div className="div_row" >
|
||||
<div className="Grid_2_col" >
|
||||
|
||||
<div className="Grid_2_col_sub_colone" style={{ minHeight: '10rem', padding: "0px" }}>
|
||||
<div style={{ width: '100%', float: 'left' }}>
|
||||
|
||||
<div className="Grid_2_col_sub_colone_header">
|
||||
Contact
|
||||
</div>
|
||||
|
||||
<div style={{
|
||||
display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', width: '100%',
|
||||
paddingLeft: '10px', flexWrap: 'wrap'
|
||||
}}>
|
||||
|
||||
|
||||
<div className="session_caract"> Nom de Facturation<br />
|
||||
<TextField
|
||||
required
|
||||
name="client_invoice_nom"
|
||||
//label="Nom de Facturation"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_invoice_nom}
|
||||
onChange={(e) => setclient_invoice_nom(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="session_caract"><b> Email de Facturation </b> <br />
|
||||
<TextField
|
||||
required
|
||||
name="client_invoice_email"
|
||||
//label="Email de Facturation"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_invoice_email}
|
||||
onChange={(e) => setclient_invoice_email(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="session_caract"> N° Siret Facturation<br />
|
||||
<TextField
|
||||
required
|
||||
name="client_invoice_siret"
|
||||
//label="N° Siret Facturation"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_invoice_siret}
|
||||
onChange={(e) => setclient_invoice_siret(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="session_caract"> N° TVA Facturation<br />
|
||||
<TextField
|
||||
required
|
||||
name="client_invoice_tva"
|
||||
// label="N° TVA Facturation"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_invoice_tva}
|
||||
onChange={(e) => setclient_invoice_tva(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="session_caract"> <b> Conditions Paiement </b><br />
|
||||
|
||||
{New_Getall_Partner_Paiement_Condition_result && New_Getall_Partner_Paiement_Condition_result.length > 0 &&
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="client_invoice_paiement_condition"
|
||||
id="client_invoice_paiement_condition"
|
||||
style={{ height: '3.5re' }}
|
||||
disabled={!Boolean(parseInt(formedit_mode_invoice))}
|
||||
value={New_Getall_Partner_Paiement_Condition_result.filter((data) => (data).label === String(p_client_invoice_paiement_condition_code))[0].label}
|
||||
options={New_Getall_Partner_Paiement_Condition_result}
|
||||
className="disabled_style"
|
||||
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
setp_client_invoice_paiement_condition_code(value.code);
|
||||
setp_client_invoice_paiement_condition_id(value._id);
|
||||
DataUpdated_Invoice_Data();
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="Grid_2_col_sub_colone" style={{ minHeight: '10rem', padding: "0px" }}>
|
||||
<div style={{ width: '100%', float: 'left' }}>
|
||||
|
||||
<div className="Grid_2_col_sub_colone_header">
|
||||
Coordonnées
|
||||
</div>
|
||||
|
||||
<div style={{
|
||||
display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', width: '100%',
|
||||
paddingLeft: '10px', flexWrap: 'wrap'
|
||||
}}>
|
||||
|
||||
<div className="session_caract"> Adresse<br />
|
||||
<TextField
|
||||
required
|
||||
name="client_invoice_adresse"
|
||||
//label="Adresse"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_invoice_adresse}
|
||||
onChange={(e) => setclient_invoice_adresse(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="session_caract"> Ville<br />
|
||||
<TextField
|
||||
required
|
||||
name="client_invoice_ville"
|
||||
//label="Ville"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_invoice_ville}
|
||||
onChange={(e) => setclient_invoice_ville(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<div className="session_caract"> Code Postal<br />
|
||||
<TextField
|
||||
required
|
||||
name="client_invoice_code_postal"
|
||||
//label="Code Postal"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_invoice_code_postal}
|
||||
onChange={(e) => setclient_invoice_code_postal(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<div className="session_caract"> Pays<br />
|
||||
<TextField
|
||||
required
|
||||
name="client_invoice_pays"
|
||||
//label="Pays"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_invoice_pays}
|
||||
|
||||
onChange={(e) => {
|
||||
setclient_invoice_pays(e.target.value);
|
||||
DataUpdated_Invoice_Data();
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="session_caract"> Ville<br />
|
||||
<TextField
|
||||
required
|
||||
name="client_invoice_ville"
|
||||
//label="Ville"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_invoice_ville}
|
||||
onChange={(e) => setclient_invoice_ville(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<div className="session_caract"> Code Postal<br />
|
||||
<TextField
|
||||
required
|
||||
name="client_invoice_code_postal"
|
||||
//label="Code Postal"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_invoice_code_postal}
|
||||
onChange={(e) => setclient_invoice_code_postal(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<div className="session_caract"> Pays<br />
|
||||
<TextField
|
||||
required
|
||||
name="client_invoice_pays"
|
||||
//label="Pays"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_invoice_pays}
|
||||
|
||||
onChange={(e) => {
|
||||
setclient_invoice_pays(e.target.value);
|
||||
DataUpdated_Invoice_Data();
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
<hr className="hr_break" />
|
||||
|
|
@ -5726,7 +5975,7 @@ const AddParnerClient = (props) => {
|
|||
</div>}
|
||||
|
||||
|
||||
{/* <div className="div_row">
|
||||
{/* <div className="div_row">
|
||||
|
||||
<main className="mtt-main">
|
||||
<div className="mtt-left-column" >
|
||||
|
|
|
|||
|
|
@ -341,91 +341,91 @@ const Apprenant = (props) => {
|
|||
{ field: 'nb_jour_avant_recyclage', headerName: 'Jrs avant Recycl.', hide: true, flex: 1, minWidth: 100, },
|
||||
|
||||
|
||||
/* {
|
||||
field: "Detail", headerName: 'Voir détail',
|
||||
renderCell: (cellValues) => {
|
||||
return (
|
||||
/* {
|
||||
field: "Detail", headerName: 'Voir détail',
|
||||
renderCell: (cellValues) => {
|
||||
return (
|
||||
|
||||
<Button
|
||||
|
||||
onClick={(event) => {
|
||||
|
||||
if (cellValues.row._id && String(cellValues.row._id).length > 2) {
|
||||
var tmp = cellValues.row.session_code + "&" + cellValues.row.session_id + "&" + cellValues.row.class_internal_url + "&" + p_detail_email;
|
||||
|
||||
window.open(
|
||||
process.env.REACT_APP_FRONT_URL + "Partner/mes_stagiaires/" + String(cellValues.row._id) + "/" + String(tmp),
|
||||
'_blank'
|
||||
);
|
||||
}
|
||||
//handleClick_edit_apprenant_From_Line(cellValues.row.id);
|
||||
}}
|
||||
>
|
||||
<FcViewDetails />
|
||||
|
||||
</Button>
|
||||
|
||||
);
|
||||
}
|
||||
},*/
|
||||
|
||||
<Button
|
||||
|
||||
onClick={(event) => {
|
||||
|
||||
if (cellValues.row._id && String(cellValues.row._id).length > 2) {
|
||||
var tmp = cellValues.row.session_code + "&" + cellValues.row.session_id + "&" + cellValues.row.class_internal_url + "&" + p_detail_email;
|
||||
|
||||
window.open(
|
||||
process.env.REACT_APP_FRONT_URL + "Partner/mes_stagiaires/" + String(cellValues.row._id) + "/" + String(tmp),
|
||||
'_blank'
|
||||
);
|
||||
}
|
||||
//handleClick_edit_apprenant_From_Line(cellValues.row.id);
|
||||
}}
|
||||
>
|
||||
<FcViewDetails />
|
||||
|
||||
</Button>
|
||||
|
||||
);
|
||||
}
|
||||
},*/
|
||||
|
||||
/* {
|
||||
field: "delete", headerName: 'Supprimer',
|
||||
renderCell: (cellValues) => {
|
||||
return (
|
||||
|
||||
<Popup
|
||||
trigger={<Button
|
||||
|
||||
>
|
||||
<CiTrash />
|
||||
|
||||
</Button>}
|
||||
modal
|
||||
nested
|
||||
position="center center"
|
||||
>
|
||||
{close => (
|
||||
<div>
|
||||
<button className="gest_close" onClick={close}>
|
||||
×
|
||||
</button>
|
||||
<div className="gest_header"> MySy Information </div>
|
||||
<div className="gest_content">
|
||||
{' '}
|
||||
|
||||
En confirmant cette opération, l'inscription sera <i><font color="red"> définitivement supprimée</font></i>. <br />
|
||||
|
||||
</div>
|
||||
<div className="gest_actions">
|
||||
<div style={{ "width": "45%", "float": "left" }}>
|
||||
<button className="gest_bton_popup" onClick={(event) => {
|
||||
//handleClick_delete_Apprenant(event, cellValues);
|
||||
|
||||
close();
|
||||
}}> Valider </button>
|
||||
|
||||
</div>
|
||||
<div style={{ "width": "45%", "float": "right" }}>
|
||||
<button
|
||||
className="gest_bton_popup_annuler"
|
||||
onClick={() => {
|
||||
//console.log('modal closed ');
|
||||
close();
|
||||
}}
|
||||
>
|
||||
Annuler
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</Popup>
|
||||
|
||||
|
||||
);
|
||||
}
|
||||
},*/
|
||||
/* {
|
||||
field: "delete", headerName: 'Supprimer',
|
||||
renderCell: (cellValues) => {
|
||||
return (
|
||||
|
||||
<Popup
|
||||
trigger={<Button
|
||||
|
||||
>
|
||||
<CiTrash />
|
||||
|
||||
</Button>}
|
||||
modal
|
||||
nested
|
||||
position="center center"
|
||||
>
|
||||
{close => (
|
||||
<div>
|
||||
<button className="gest_close" onClick={close}>
|
||||
×
|
||||
</button>
|
||||
<div className="gest_header"> MySy Information </div>
|
||||
<div className="gest_content">
|
||||
{' '}
|
||||
|
||||
En confirmant cette opération, l'inscription sera <i><font color="red"> définitivement supprimée</font></i>. <br />
|
||||
|
||||
</div>
|
||||
<div className="gest_actions">
|
||||
<div style={{ "width": "45%", "float": "left" }}>
|
||||
<button className="gest_bton_popup" onClick={(event) => {
|
||||
//handleClick_delete_Apprenant(event, cellValues);
|
||||
|
||||
close();
|
||||
}}> Valider </button>
|
||||
|
||||
</div>
|
||||
<div style={{ "width": "45%", "float": "right" }}>
|
||||
<button
|
||||
className="gest_bton_popup_annuler"
|
||||
onClick={() => {
|
||||
//console.log('modal closed ');
|
||||
close();
|
||||
}}
|
||||
>
|
||||
Annuler
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</Popup>
|
||||
|
||||
|
||||
);
|
||||
}
|
||||
},*/
|
||||
|
||||
|
||||
]
|
||||
|
|
@ -4136,9 +4136,176 @@ const Apprenant = (props) => {
|
|||
})
|
||||
}
|
||||
|
||||
const [New_Get_List_Mode_Financement_result, setNew_Get_List_Mode_Financement_result] = useState([]);
|
||||
|
||||
const [Get_List_Mode_Financement_api, setGet_List_Mode_Financement_api] = useState();
|
||||
const [Get_List_Mode_Financement_message, setGet_List_Mode_Financement_message] = useState();
|
||||
const [Get_List_Mode_Financement_result, setGet_List_Mode_Financement_result] = useState([]);
|
||||
function Get_List_Mode_Financement() {
|
||||
var form = new FormData();
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
|
||||
|
||||
//console.log("### form = ", form);
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Financement_Mode/";
|
||||
|
||||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
//console.log(" In Get_List_Mode_Financement res.data.status = " + res.data.status);
|
||||
//console.log(" In Get_List_Mode_Financement res.data.message r_class = " + res.data.message);
|
||||
|
||||
setLoading(false);
|
||||
if (String(res.data.status) === String("true")) {
|
||||
setGet_List_Mode_Financement_api("true");
|
||||
setGet_List_Mode_Financement_message(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 code = JSON.parse(x).code;
|
||||
var description = JSON.parse(x).description;
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
"label": code,
|
||||
"code": code,
|
||||
"description": description,
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
});
|
||||
|
||||
var node = {
|
||||
"_id": "",
|
||||
"id": "",
|
||||
"label": "",
|
||||
"code": "",
|
||||
"description": "",
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
||||
setNew_Get_List_Mode_Financement_result(new_data2);
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
setGet_List_Mode_Financement_api("false");
|
||||
setGet_List_Mode_Financement_message(res.data.message);
|
||||
|
||||
// alert(res.data.message);
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("error");
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
|
||||
console.warn('Get_List_Mode_Financement : Not good man :( Get_List_Mode_Financement = ' + error);
|
||||
setGet_List_Mode_Financement_api("false");
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(" Impossible de récuperer la liste des modes de financement ");
|
||||
setalert_type("error");
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
const [New_Get_List_Type_Apprenant_result, setNew_Get_List_Type_Apprenant_result] = useState([]);
|
||||
|
||||
const [Get_List_Type_Apprenant_api, setGet_List_Type_Apprenant_api] = useState();
|
||||
const [Get_List_Type_Apprenant_message, setGet_List_Type_Apprenant_message] = useState();
|
||||
const [Get_List_Type_Apprenant_result, setGet_List_Type_Apprenant_result] = useState([]);
|
||||
function Get_List_Type_Apprenant() {
|
||||
var form = new FormData();
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
|
||||
|
||||
//console.log("### form = ", form);
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Type_Apprenant/";
|
||||
|
||||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
//console.log(" In Get_List_Type_Apprenant res.data.status = " + res.data.status);
|
||||
//console.log(" In Get_List_Type_Apprenant res.data.message r_class = " + res.data.message);
|
||||
|
||||
setLoading(false);
|
||||
if (String(res.data.status) === String("true")) {
|
||||
setGet_List_Type_Apprenant_api("true");
|
||||
setGet_List_Type_Apprenant_message(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 code = JSON.parse(x).code;
|
||||
var description = JSON.parse(x).description;
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
"label": code,
|
||||
"code": code,
|
||||
"description": description,
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
});
|
||||
|
||||
var node = {
|
||||
"_id": "",
|
||||
"id": "",
|
||||
"label": "",
|
||||
"code": "",
|
||||
"description": "",
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
||||
setNew_Get_List_Type_Apprenant_result(new_data2);
|
||||
|
||||
}
|
||||
else {
|
||||
setGet_List_Type_Apprenant_api("false");
|
||||
setGet_List_Type_Apprenant_message(res.data.message);
|
||||
|
||||
// alert(res.data.message);
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("error");
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
|
||||
console.warn('Get_List_Type_Apprenant : Not good man :( Get_List_Type_Apprenant = ' + error);
|
||||
setGet_List_Type_Apprenant_api("false");
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(" Impossible de récuperer la liste des types d'apprenants ");
|
||||
setalert_type("error");
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Get_List_Mode_Financement();
|
||||
Get_List_Type_Apprenant();
|
||||
|
||||
Getall_Partner_Default_Paiement_Mode();
|
||||
|
||||
Getall_Partner_Class_Reduice_Fields();
|
||||
|
|
@ -7726,7 +7893,7 @@ const Apprenant = (props) => {
|
|||
</div>}
|
||||
|
||||
<div className="session_caract_Dialog" > Type apprenant
|
||||
<Autocomplete
|
||||
{/*<Autocomplete
|
||||
disablePortal
|
||||
id="combo-box-demo"
|
||||
className="session_caract_Dialog"
|
||||
|
|
@ -7745,12 +7912,36 @@ const Apprenant = (props) => {
|
|||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
/>*/}
|
||||
|
||||
{New_Get_List_Type_Apprenant_result && New_Get_List_Type_Apprenant_result.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="one_detail_type_apprenant"
|
||||
id="one_detail_type_apprenant"
|
||||
className="session_caract_Dialog"
|
||||
options={New_Get_List_Type_Apprenant_result}
|
||||
onChange={(event, value) => {
|
||||
|
||||
if (value && value._id) {
|
||||
setp_dialog_type_apprenant(value._id);
|
||||
|
||||
} else {
|
||||
setp_dialog_type_apprenant("");
|
||||
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
|
||||
</div>
|
||||
|
||||
<div className="session_caract_Dialog" > Mode Financement
|
||||
<Autocomplete
|
||||
{/* <Autocomplete
|
||||
disablePortal
|
||||
id="combo-box-demo"
|
||||
className="session_caract_Dialog"
|
||||
|
|
@ -7759,8 +7950,7 @@ const Apprenant = (props) => {
|
|||
onChange={(event, value) => {
|
||||
if (value && value.value) {
|
||||
setp_dialog_financement(value.value);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
|
|
@ -7769,7 +7959,32 @@ const Apprenant = (props) => {
|
|||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
/>*/}
|
||||
|
||||
{New_Get_List_Mode_Financement_result && New_Get_List_Mode_Financement_result.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="one_detail_mode_financement"
|
||||
id="one_detail_mode_financement"
|
||||
className="session_caract_Dialog"
|
||||
options={New_Get_List_Mode_Financement_result}
|
||||
|
||||
onChange={(event, value) => {
|
||||
|
||||
if (value && value._id) {
|
||||
setp_dialog_financement(value._id);
|
||||
|
||||
} else {
|
||||
setp_dialog_financement('');
|
||||
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -440,7 +440,7 @@ const DisplayPartnerPromotion = (props) => {
|
|||
{ field: 'nb_inscrit', headerName: 'Insc', minWidth: 20, align: "center", hide: true, hideable: true, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'nb_preinscrit', headerName: 'Preinsc.', minWidth: 20, align: "center", hide: true, hideable: true, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{
|
||||
field: 'prix_session', headerName: 'Scolarité', minWidth: 50, align: "center", hide: false,
|
||||
field: 'prix_session', headerName: 'Scolarité', minWidth: 50, align:'right', hide: false,
|
||||
renderCell: (params) => <ExpandableCell_String_to_monetaire {...params} />,
|
||||
},
|
||||
{ field: 'title', headerName: 'Formation', minWidth: 250, flex: 1, align: "center", hide: true, hideable: true, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
|
|
|
|||
|
|
@ -499,7 +499,7 @@ const DisplayPartnerSession = (props) => {
|
|||
{ field: 'nb_inscrit', headerName: 'Insc', minWidth: 20, align: "center", hide: true, hideable: true, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'nb_preinscrit', headerName: 'Preinsc.', minWidth: 20, align: "center", hide: false, hideable: true, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{
|
||||
field: 'prix_session', headerName: 'Prix', minWidth: 50, align: "center",
|
||||
field: 'prix_session', headerName: 'Prix', minWidth: 50, align:'right',
|
||||
renderCell: (params) => <ExpandableCell_String_to_monetaire {...params} />,
|
||||
},
|
||||
{ field: 'title', headerName: 'Formation', minWidth: 250, flex: 1, align: "center", hide: true, hideable: true, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
|
|
|
|||
|
|
@ -4183,7 +4183,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
if (String(res.data.status) === "true") {
|
||||
// console.log(" In GetAttendee res.data.status = " + res.data.status);
|
||||
// console.log(" In GetAttendee res.data.message r_class = " + res.data.message);
|
||||
// console.log(" In GetAttendee res.data.message r_class = " + res.data.message);
|
||||
setGetAttendee_api("true");
|
||||
setGetAttendee_result(res.data.message);
|
||||
|
||||
|
|
@ -4207,6 +4207,12 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
setp_detail_session_class_id("");
|
||||
}
|
||||
|
||||
if (mylocalattendee.is_ftion_initiale)
|
||||
setselected_class_is_ftion_initiale(mylocalattendee.is_ftion_initiale);
|
||||
else {
|
||||
setselected_class_is_ftion_initiale("0");
|
||||
}
|
||||
|
||||
if (mylocalattendee.invoiced)
|
||||
setinscription_invoiced(mylocalattendee.invoiced);
|
||||
else
|
||||
|
|
@ -12699,7 +12705,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
</div>}
|
||||
|
||||
|
||||
|
||||
|
||||
{((selected_id && String(selected_id).length > 2) || (String(addOneParticipant) === "1")) && <div className="div_row" ref={myRef}>
|
||||
|
||||
|
|
@ -12710,14 +12716,14 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
{/* <Button variant="outlined" onClick={submenu_sessions} className="detail_class_submenu" id='preinscrit' name='preinscrit'>Détail Session </Button>
|
||||
<Button variant="outlined" onClick={submenu_absence} className="detail_class_submenu" id='absence' name='absence'>Absence </Button> */}
|
||||
|
||||
{(props.formation_initiale === "1" || props.formation_initiale === "2") && String(addOneParticipant) !== "1" && <Button variant="outlined" onClick={submenu_unite_enseignement} className="detail_class_submenu" id='ue' name='ue'>Unit. Enseignement </Button>}
|
||||
{selected_class_is_ftion_initiale == "1" && String(addOneParticipant) !== "1" && <Button variant="outlined" onClick={submenu_unite_enseignement} className="detail_class_submenu" id='ue' name='ue'>Unit. Enseignement </Button>}
|
||||
|
||||
{(props.formation_initiale === "1" || props.formation_initiale === "2") && String(addOneParticipant) !== "1" && <Button variant="outlined" onClick={submenu_notes} className="detail_class_submenu" id='notes' name='notes'>Notes </Button>}
|
||||
{selected_class_is_ftion_initiale == "1" && String(addOneParticipant) !== "1" && <Button variant="outlined" onClick={submenu_notes} className="detail_class_submenu" id='notes' name='notes'>Notes </Button>}
|
||||
|
||||
<Button variant="outlined" onClick={submenu_piece_jointe} className="detail_class_submenu" id='piece_jointe' name='piece_jointe'>Doc & Eval</Button>
|
||||
|
||||
|
||||
{(props.formation_initiale === "1" || props.formation_initiale === "2") && String(addOneParticipant) !== "1" && <Button variant="outlined" onClick={submenu_stages_module} className="detail_class_submenu" id='stages' name='stages'>Stages </Button>}
|
||||
{selected_class_is_ftion_initiale == "1" && String(addOneParticipant) !== "1" && <Button variant="outlined" onClick={submenu_stages_module} className="detail_class_submenu" id='stages' name='stages'>Stages </Button>}
|
||||
|
||||
|
||||
{String(addOneParticipant) !== "1" && String(history_securite_read) === "1" && <Button variant="outlined" onClick={submenu_historique} className="detail_class_submenu" id='historique' name='historique'>Historique </Button>}
|
||||
|
|
@ -13272,7 +13278,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
</div>*/}
|
||||
|
||||
{New_Get_List_Mode_Financement_result && New_Get_List_Mode_Financement_result.length > 0 &&
|
||||
<div className="session_caract"> Mode Financement new <br />
|
||||
<div className="session_caract"> Mode Financement <br />
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="one_detail_mode_financement"
|
||||
|
|
|
|||
|
|
@ -6513,7 +6513,7 @@ const Intranet_Commande_Devis = (props) => {
|
|||
|
||||
|
||||
|
||||
<h3 style={{ fontFamily: 'DM Sans' }}> Mes Commandes et Devis </h3>
|
||||
<h3 style={{ fontFamily: 'DM Sans' }}> Mes Devis </h3>
|
||||
<div className="div_row">
|
||||
<div className="titre1"> Utilisez les filtres !</div>
|
||||
<div className="div_row" style={{ "marginBottom": "5px" }}>
|
||||
|
|
|
|||
|
|
@ -8869,8 +8869,6 @@ registerLocale('fr', fr);
|
|||
}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div className="session_caract"> Mode Financement <br />
|
||||
|
|
|
|||
|
|
@ -641,7 +641,177 @@ const Module_Admission_Candidat_Synthese = (props) => {
|
|||
setdisplay_alert_mysy("");
|
||||
}
|
||||
|
||||
|
||||
const [New_Get_List_Mode_Financement_result, setNew_Get_List_Mode_Financement_result] = useState([]);
|
||||
|
||||
const [Get_List_Mode_Financement_api, setGet_List_Mode_Financement_api] = useState();
|
||||
const [Get_List_Mode_Financement_message, setGet_List_Mode_Financement_message] = useState();
|
||||
const [Get_List_Mode_Financement_result, setGet_List_Mode_Financement_result] = useState([]);
|
||||
function Get_List_Mode_Financement() {
|
||||
var form = new FormData();
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
|
||||
|
||||
//console.log("### form = ", form);
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Financement_Mode/";
|
||||
|
||||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
//console.log(" In Get_List_Mode_Financement res.data.status = " + res.data.status);
|
||||
//console.log(" In Get_List_Mode_Financement res.data.message r_class = " + res.data.message);
|
||||
|
||||
setLoading(false);
|
||||
if (String(res.data.status) === String("true")) {
|
||||
setGet_List_Mode_Financement_api("true");
|
||||
setGet_List_Mode_Financement_message(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 code = JSON.parse(x).code;
|
||||
var description = JSON.parse(x).description;
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
"label": code,
|
||||
"code": code,
|
||||
"description": description,
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
});
|
||||
|
||||
var node = {
|
||||
"_id": "",
|
||||
"id": "",
|
||||
"label": "",
|
||||
"code": "",
|
||||
"description": "",
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
||||
setNew_Get_List_Mode_Financement_result(new_data2);
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
setGet_List_Mode_Financement_api("false");
|
||||
setGet_List_Mode_Financement_message(res.data.message);
|
||||
|
||||
// alert(res.data.message);
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("error");
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
|
||||
console.warn('Get_List_Mode_Financement : Not good man :( Get_List_Mode_Financement = ' + error);
|
||||
setGet_List_Mode_Financement_api("false");
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(" Impossible de récuperer la liste des modes de financement ");
|
||||
setalert_type("error");
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
const [New_Get_List_Type_Apprenant_result, setNew_Get_List_Type_Apprenant_result] = useState([]);
|
||||
|
||||
const [Get_List_Type_Apprenant_api, setGet_List_Type_Apprenant_api] = useState();
|
||||
const [Get_List_Type_Apprenant_message, setGet_List_Type_Apprenant_message] = useState();
|
||||
const [Get_List_Type_Apprenant_result, setGet_List_Type_Apprenant_result] = useState([]);
|
||||
function Get_List_Type_Apprenant() {
|
||||
var form = new FormData();
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
|
||||
|
||||
//console.log("### form = ", form);
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Type_Apprenant/";
|
||||
|
||||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
//console.log(" In Get_List_Type_Apprenant res.data.status = " + res.data.status);
|
||||
//console.log(" In Get_List_Type_Apprenant res.data.message r_class = " + res.data.message);
|
||||
|
||||
setLoading(false);
|
||||
if (String(res.data.status) === String("true")) {
|
||||
setGet_List_Type_Apprenant_api("true");
|
||||
setGet_List_Type_Apprenant_message(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 code = JSON.parse(x).code;
|
||||
var description = JSON.parse(x).description;
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
"label": code,
|
||||
"code": code,
|
||||
"description": description,
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
});
|
||||
|
||||
var node = {
|
||||
"_id": "",
|
||||
"id": "",
|
||||
"label": "",
|
||||
"code": "",
|
||||
"description": "",
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
||||
setNew_Get_List_Type_Apprenant_result(new_data2);
|
||||
|
||||
}
|
||||
else {
|
||||
setGet_List_Type_Apprenant_api("false");
|
||||
setGet_List_Type_Apprenant_message(res.data.message);
|
||||
|
||||
// alert(res.data.message);
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("error");
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
|
||||
console.warn('Get_List_Type_Apprenant : Not good man :( Get_List_Type_Apprenant = ' + error);
|
||||
setGet_List_Type_Apprenant_api("false");
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(" Impossible de récuperer la liste des types d'apprenants ");
|
||||
setalert_type("error");
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
Get_List_Mode_Financement();
|
||||
Get_List_Type_Apprenant();
|
||||
|
||||
GetListeInscrit_With_Synthese();
|
||||
|
||||
}, [])
|
||||
|
|
@ -984,7 +1154,7 @@ const Module_Admission_Candidat_Synthese = (props) => {
|
|||
form.append("type_apprenant", p_dialog_type_apprenant);
|
||||
form.append("modefinancement", p_dialog_financement);
|
||||
|
||||
|
||||
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Candidat_Inscrire_To_Session/";
|
||||
|
||||
|
|
@ -1099,7 +1269,7 @@ const Module_Admission_Candidat_Synthese = (props) => {
|
|||
</div>}
|
||||
|
||||
<div className="session_caract_Dialog" > <b> Type apprenant </b>
|
||||
<Autocomplete
|
||||
{/*<Autocomplete
|
||||
disablePortal
|
||||
id="combo-box-demo"
|
||||
className="session_caract_Dialog"
|
||||
|
|
@ -1118,12 +1288,36 @@ const Module_Admission_Candidat_Synthese = (props) => {
|
|||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
/>*/}
|
||||
|
||||
{New_Get_List_Type_Apprenant_result && New_Get_List_Type_Apprenant_result.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="one_detail_type_apprenant"
|
||||
id="one_detail_type_apprenant"
|
||||
className="session_caract_Dialog"
|
||||
options={New_Get_List_Type_Apprenant_result}
|
||||
onChange={(event, value) => {
|
||||
|
||||
if (value && value._id) {
|
||||
setp_dialog_type_apprenant(value._id);
|
||||
|
||||
} else {
|
||||
setp_dialog_type_apprenant("");
|
||||
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
|
||||
</div>
|
||||
|
||||
<div className="session_caract_Dialog" > <b> Mode Financement </b>
|
||||
<Autocomplete
|
||||
{/*<Autocomplete
|
||||
disablePortal
|
||||
id="combo-box-demo"
|
||||
className="session_caract_Dialog"
|
||||
|
|
@ -1142,7 +1336,33 @@ const Module_Admission_Candidat_Synthese = (props) => {
|
|||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
/>*/}
|
||||
|
||||
{New_Get_List_Mode_Financement_result && New_Get_List_Mode_Financement_result.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="one_detail_mode_financement"
|
||||
id="one_detail_mode_financement"
|
||||
className="session_caract_Dialog"
|
||||
options={New_Get_List_Mode_Financement_result}
|
||||
|
||||
onChange={(event, value) => {
|
||||
|
||||
if (value && value._id) {
|
||||
setp_dialog_financement(value._id);
|
||||
|
||||
} else {
|
||||
setp_dialog_financement('');
|
||||
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
|
@ -1356,7 +1576,7 @@ const Module_Admission_Candidat_Synthese = (props) => {
|
|||
|
||||
))}
|
||||
|
||||
{JSON.parse(item).inscrit_session_id.length <= 5 && <td style={{ textAlign: 'center', cursor: 'pointer' }} onClick={(e) => {
|
||||
{JSON.parse(item).inscrit_session_id.length <= 5 && <td style={{ textAlign: 'center', cursor: 'pointer' }} onClick={(e) => {
|
||||
setselected_candidat_nom(JSON.parse(item).nom);
|
||||
setselected_candidat_prenom(JSON.parse(item).prenom)
|
||||
setselected_candidat_id(JSON.parse(item)._id);
|
||||
|
|
@ -1365,8 +1585,8 @@ const Module_Admission_Candidat_Synthese = (props) => {
|
|||
|
||||
}}> <Users size={14} /></td>}
|
||||
|
||||
{JSON.parse(item).inscrit_session_id.length > 5 && <td style={{ textAlign: 'center', background:'#e9eff2' }}>
|
||||
{JSON.parse(item).inscrit_session_code} </td>}
|
||||
{JSON.parse(item).inscrit_session_id.length > 5 && <td style={{ textAlign: 'center', background: '#e9eff2' }}>
|
||||
{JSON.parse(item).inscrit_session_code} </td>}
|
||||
|
||||
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -870,8 +870,177 @@ const Module_Jury_Admission_Detail_Examen = (props) => {
|
|||
})
|
||||
}
|
||||
|
||||
|
||||
const [New_Get_List_Mode_Financement_result, setNew_Get_List_Mode_Financement_result] = useState([]);
|
||||
|
||||
const [Get_List_Mode_Financement_api, setGet_List_Mode_Financement_api] = useState();
|
||||
const [Get_List_Mode_Financement_message, setGet_List_Mode_Financement_message] = useState();
|
||||
const [Get_List_Mode_Financement_result, setGet_List_Mode_Financement_result] = useState([]);
|
||||
function Get_List_Mode_Financement() {
|
||||
var form = new FormData();
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
|
||||
|
||||
//console.log("### form = ", form);
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Financement_Mode/";
|
||||
|
||||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
//console.log(" In Get_List_Mode_Financement res.data.status = " + res.data.status);
|
||||
//console.log(" In Get_List_Mode_Financement res.data.message r_class = " + res.data.message);
|
||||
|
||||
setLoading(false);
|
||||
if (String(res.data.status) === String("true")) {
|
||||
setGet_List_Mode_Financement_api("true");
|
||||
setGet_List_Mode_Financement_message(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 code = JSON.parse(x).code;
|
||||
var description = JSON.parse(x).description;
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
"label": code,
|
||||
"code": code,
|
||||
"description": description,
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
});
|
||||
|
||||
var node = {
|
||||
"_id": "",
|
||||
"id": "",
|
||||
"label": "",
|
||||
"code": "",
|
||||
"description": "",
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
||||
setNew_Get_List_Mode_Financement_result(new_data2);
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
setGet_List_Mode_Financement_api("false");
|
||||
setGet_List_Mode_Financement_message(res.data.message);
|
||||
|
||||
// alert(res.data.message);
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("error");
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
|
||||
console.warn('Get_List_Mode_Financement : Not good man :( Get_List_Mode_Financement = ' + error);
|
||||
setGet_List_Mode_Financement_api("false");
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(" Impossible de récuperer la liste des modes de financement ");
|
||||
setalert_type("error");
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
const [New_Get_List_Type_Apprenant_result, setNew_Get_List_Type_Apprenant_result] = useState([]);
|
||||
|
||||
const [Get_List_Type_Apprenant_api, setGet_List_Type_Apprenant_api] = useState();
|
||||
const [Get_List_Type_Apprenant_message, setGet_List_Type_Apprenant_message] = useState();
|
||||
const [Get_List_Type_Apprenant_result, setGet_List_Type_Apprenant_result] = useState([]);
|
||||
function Get_List_Type_Apprenant() {
|
||||
var form = new FormData();
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
|
||||
|
||||
//console.log("### form = ", form);
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Type_Apprenant/";
|
||||
|
||||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
//console.log(" In Get_List_Type_Apprenant res.data.status = " + res.data.status);
|
||||
//console.log(" In Get_List_Type_Apprenant res.data.message r_class = " + res.data.message);
|
||||
|
||||
setLoading(false);
|
||||
if (String(res.data.status) === String("true")) {
|
||||
setGet_List_Type_Apprenant_api("true");
|
||||
setGet_List_Type_Apprenant_message(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 code = JSON.parse(x).code;
|
||||
var description = JSON.parse(x).description;
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
"label": code,
|
||||
"code": code,
|
||||
"description": description,
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
});
|
||||
|
||||
var node = {
|
||||
"_id": "",
|
||||
"id": "",
|
||||
"label": "",
|
||||
"code": "",
|
||||
"description": "",
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
||||
setNew_Get_List_Type_Apprenant_result(new_data2);
|
||||
|
||||
}
|
||||
else {
|
||||
setGet_List_Type_Apprenant_api("false");
|
||||
setGet_List_Type_Apprenant_message(res.data.message);
|
||||
|
||||
// alert(res.data.message);
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("error");
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
|
||||
console.warn('Get_List_Type_Apprenant : Not good man :( Get_List_Type_Apprenant = ' + error);
|
||||
setGet_List_Type_Apprenant_api("false");
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(" Impossible de récuperer la liste des types d'apprenants ");
|
||||
setalert_type("error");
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Get_List_Mode_Financement();
|
||||
Get_List_Type_Apprenant();
|
||||
|
||||
// Getall_Session_Detail_Final_Note_Classement();
|
||||
//Getall_Session_UE_Final_Note_Classement();
|
||||
|
|
@ -2263,7 +2432,7 @@ const Module_Jury_Admission_Detail_Examen = (props) => {
|
|||
</div>
|
||||
|
||||
<div className="session_caract_Dialog" > <b> Type apprenant </b>
|
||||
<Autocomplete
|
||||
{/*} <Autocomplete
|
||||
disablePortal
|
||||
id="combo-box-demo"
|
||||
className="session_caract_Dialog"
|
||||
|
|
@ -2282,12 +2451,36 @@ const Module_Jury_Admission_Detail_Examen = (props) => {
|
|||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
/>*/}
|
||||
|
||||
{New_Get_List_Type_Apprenant_result && New_Get_List_Type_Apprenant_result.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="one_detail_type_apprenant"
|
||||
id="one_detail_type_apprenant"
|
||||
className="session_caract_Dialog"
|
||||
options={New_Get_List_Type_Apprenant_result}
|
||||
onChange={(event, value) => {
|
||||
|
||||
if (value && value._id) {
|
||||
setp_dialog_type_apprenant(value._id);
|
||||
|
||||
} else {
|
||||
setp_dialog_type_apprenant("");
|
||||
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
|
||||
</div>
|
||||
|
||||
<div className="session_caract_Dialog" > <b> Mode Financement </b>
|
||||
<Autocomplete
|
||||
{/*} <Autocomplete
|
||||
disablePortal
|
||||
id="combo-box-demo"
|
||||
className="session_caract_Dialog"
|
||||
|
|
@ -2306,7 +2499,32 @@ const Module_Jury_Admission_Detail_Examen = (props) => {
|
|||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
/>*/}
|
||||
|
||||
{New_Get_List_Mode_Financement_result && New_Get_List_Mode_Financement_result.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="one_detail_mode_financement"
|
||||
id="one_detail_mode_financement"
|
||||
className="session_caract_Dialog"
|
||||
options={New_Get_List_Mode_Financement_result}
|
||||
|
||||
onChange={(event, value) => {
|
||||
|
||||
if (value && value._id) {
|
||||
setp_dialog_financement(value._id);
|
||||
|
||||
} else {
|
||||
setp_dialog_financement('');
|
||||
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
|
||||
</div>
|
||||
|
||||
|
|
@ -2529,9 +2747,9 @@ const Module_Jury_Admission_Detail_Examen = (props) => {
|
|||
|
||||
"& .MuiDataGrid-columnHeaders": {
|
||||
backgroundColor: "#dfe8f2",
|
||||
color: "#0a2a4d",
|
||||
fontSize: '14px',
|
||||
fontFamily:'DM Sans',
|
||||
color: "#0a2a4d",
|
||||
fontSize: '14px',
|
||||
fontFamily: 'DM Sans',
|
||||
},
|
||||
|
||||
'& .line--statut--selected': {
|
||||
|
|
@ -2563,7 +2781,7 @@ const Module_Jury_Admission_Detail_Examen = (props) => {
|
|||
|
||||
onCellEditCommit={OnchangeCellDataGrid}
|
||||
|
||||
// checkboxSelection
|
||||
// checkboxSelection
|
||||
onSelectionModelChange={(newSelectionModel) => {
|
||||
setselectionModel_note_Session_classement(newSelectionModel);
|
||||
/*if (newSelectionModel.length === 1)
|
||||
|
|
|
|||
|
|
@ -1037,8 +1037,176 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
})
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
const [New_Get_List_Mode_Financement_result, setNew_Get_List_Mode_Financement_result] = useState([]);
|
||||
|
||||
const [Get_List_Mode_Financement_api, setGet_List_Mode_Financement_api] = useState();
|
||||
const [Get_List_Mode_Financement_message, setGet_List_Mode_Financement_message] = useState();
|
||||
const [Get_List_Mode_Financement_result, setGet_List_Mode_Financement_result] = useState([]);
|
||||
function Get_List_Mode_Financement() {
|
||||
var form = new FormData();
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
|
||||
|
||||
//console.log("### form = ", form);
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Financement_Mode/";
|
||||
|
||||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
//console.log(" In Get_List_Mode_Financement res.data.status = " + res.data.status);
|
||||
//console.log(" In Get_List_Mode_Financement res.data.message r_class = " + res.data.message);
|
||||
|
||||
setLoading(false);
|
||||
if (String(res.data.status) === String("true")) {
|
||||
setGet_List_Mode_Financement_api("true");
|
||||
setGet_List_Mode_Financement_message(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 code = JSON.parse(x).code;
|
||||
var description = JSON.parse(x).description;
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
"label": code,
|
||||
"code": code,
|
||||
"description": description,
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
});
|
||||
|
||||
var node = {
|
||||
"_id": "",
|
||||
"id": "",
|
||||
"label": "",
|
||||
"code": "",
|
||||
"description": "",
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
||||
setNew_Get_List_Mode_Financement_result(new_data2);
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
setGet_List_Mode_Financement_api("false");
|
||||
setGet_List_Mode_Financement_message(res.data.message);
|
||||
|
||||
// alert(res.data.message);
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("error");
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
|
||||
console.warn('Get_List_Mode_Financement : Not good man :( Get_List_Mode_Financement = ' + error);
|
||||
setGet_List_Mode_Financement_api("false");
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(" Impossible de récuperer la liste des modes de financement ");
|
||||
setalert_type("error");
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
const [New_Get_List_Type_Apprenant_result, setNew_Get_List_Type_Apprenant_result] = useState([]);
|
||||
|
||||
const [Get_List_Type_Apprenant_api, setGet_List_Type_Apprenant_api] = useState();
|
||||
const [Get_List_Type_Apprenant_message, setGet_List_Type_Apprenant_message] = useState();
|
||||
const [Get_List_Type_Apprenant_result, setGet_List_Type_Apprenant_result] = useState([]);
|
||||
function Get_List_Type_Apprenant() {
|
||||
var form = new FormData();
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
|
||||
|
||||
//console.log("### form = ", form);
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Type_Apprenant/";
|
||||
|
||||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
//console.log(" In Get_List_Type_Apprenant res.data.status = " + res.data.status);
|
||||
//console.log(" In Get_List_Type_Apprenant res.data.message r_class = " + res.data.message);
|
||||
|
||||
setLoading(false);
|
||||
if (String(res.data.status) === String("true")) {
|
||||
setGet_List_Type_Apprenant_api("true");
|
||||
setGet_List_Type_Apprenant_message(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 code = JSON.parse(x).code;
|
||||
var description = JSON.parse(x).description;
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
"label": code,
|
||||
"code": code,
|
||||
"description": description,
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
});
|
||||
|
||||
var node = {
|
||||
"_id": "",
|
||||
"id": "",
|
||||
"label": "",
|
||||
"code": "",
|
||||
"description": "",
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
||||
setNew_Get_List_Type_Apprenant_result(new_data2);
|
||||
|
||||
}
|
||||
else {
|
||||
setGet_List_Type_Apprenant_api("false");
|
||||
setGet_List_Type_Apprenant_message(res.data.message);
|
||||
|
||||
// alert(res.data.message);
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("error");
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
|
||||
console.warn('Get_List_Type_Apprenant : Not good man :( Get_List_Type_Apprenant = ' + error);
|
||||
setGet_List_Type_Apprenant_api("false");
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(" Impossible de récuperer la liste des types d'apprenants ");
|
||||
setalert_type("error");
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
Get_List_Mode_Financement();
|
||||
Get_List_Type_Apprenant();
|
||||
|
||||
Getall_Session_Detail_Final_Note_Classement();
|
||||
Getall_Session_UE_Final_Note_Classement();
|
||||
|
|
@ -2425,8 +2593,8 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
}
|
||||
</div>
|
||||
|
||||
<div className="session_caract_Dialog" > Type apprenant
|
||||
<Autocomplete
|
||||
<div className="session_caract_Dialog" > Type apprenant
|
||||
{/*} <Autocomplete
|
||||
disablePortal
|
||||
id="combo-box-demo"
|
||||
className="session_caract_Dialog"
|
||||
|
|
@ -2445,12 +2613,36 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
/>*/}
|
||||
|
||||
{New_Get_List_Type_Apprenant_result && New_Get_List_Type_Apprenant_result.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="one_detail_type_apprenant"
|
||||
id="one_detail_type_apprenant"
|
||||
className="session_caract_Dialog"
|
||||
options={New_Get_List_Type_Apprenant_result}
|
||||
onChange={(event, value) => {
|
||||
|
||||
if (value && value._id) {
|
||||
setp_dialog_type_apprenant(value._id);
|
||||
|
||||
} else {
|
||||
setp_dialog_type_apprenant("");
|
||||
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
|
||||
</div>
|
||||
|
||||
<div className="session_caract_Dialog" > Mode Financement
|
||||
<Autocomplete
|
||||
{/*} <Autocomplete
|
||||
disablePortal
|
||||
id="combo-box-demo"
|
||||
className="session_caract_Dialog"
|
||||
|
|
@ -2469,7 +2661,32 @@ const Module_Session_Notes_Classement = (props) => {
|
|||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
/>*/}
|
||||
|
||||
{New_Get_List_Mode_Financement_result && New_Get_List_Mode_Financement_result.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="one_detail_mode_financement"
|
||||
id="one_detail_mode_financement"
|
||||
className="session_caract_Dialog"
|
||||
options={New_Get_List_Mode_Financement_result}
|
||||
|
||||
onChange={(event, value) => {
|
||||
|
||||
if (value && value._id) {
|
||||
setp_dialog_financement(value._id);
|
||||
|
||||
} else {
|
||||
setp_dialog_financement('');
|
||||
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -138,6 +138,7 @@ const Partner_Client = (props) => {
|
|||
const columns_clients = [
|
||||
{ field: 'id', headerName: 'id', hide: true },
|
||||
{ field: '_id', headerName: '_id', hide: true },
|
||||
{ field: 'client_facturation_id', headerName: 'client_facturation_id', hide: true },
|
||||
|
||||
|
||||
{ field: 'raison_sociale', headerName: 'Raison sociale', Width: 200, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
|
|
@ -149,6 +150,10 @@ const Partner_Client = (props) => {
|
|||
{ field: 'adr_code_postal', headerName: 'Code Postal', width: 100, hide: false, editable: false, width: 100, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'adr_ville', headerName: 'Ville', width: 100, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'adr_pays', headerName: 'Pays', width: 100, hide: true, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
|
||||
{ field: 'client_facturation_raison_sociale', headerName: 'Cl. Facturé', width: 100, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
|
||||
|
||||
{ field: 'siret', headerName: 'Siret', width: 100, hide: true, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'website', headerName: 'Siteweb', width: 100, hide: true, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
|
||||
|
|
@ -1845,6 +1850,9 @@ const Partner_Client = (props) => {
|
|||
is_prospect: JSON.parse(item).is_prospect,
|
||||
intranet_account_id: JSON.parse(item).intranet_account_id,
|
||||
|
||||
client_facturation_id: JSON.parse(item).client_facturation_id,
|
||||
client_facturation_raison_sociale: JSON.parse(item).client_facturation_raison_sociale,
|
||||
|
||||
}
|
||||
))}
|
||||
|
||||
|
|
@ -2076,10 +2084,114 @@ const Partner_Client = (props) => {
|
|||
|
||||
</div>}
|
||||
|
||||
|
||||
<style>{local_css}</style>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
export default Partner_Client;
|
||||
export default Partner_Client;
|
||||
|
||||
|
||||
const local_css = `
|
||||
:root {
|
||||
--bg: #f6f8fb;
|
||||
--card: #ffffff;
|
||||
--text: #0f172a;
|
||||
--muted: #64748b;
|
||||
--border: #e5e7eb;
|
||||
--shadow: 0 10px 25px rgba(2, 6, 23, .06);
|
||||
--green-700: #0f6b53;
|
||||
--green-600: #167a5e;
|
||||
--green-100: #e9f7f1;
|
||||
--blue-600: #2563eb;
|
||||
--radius: 14px;
|
||||
--radius-sm: 10px;
|
||||
}
|
||||
.Grid_2_col{
|
||||
margin-top: 12px;
|
||||
display:grid;
|
||||
grid-template-columns: 1.2fr 1fr;
|
||||
gap: 14px;
|
||||
padding:5px;
|
||||
}
|
||||
|
||||
.Grid_1_col{
|
||||
margin-top: 12px;
|
||||
display:grid;
|
||||
grid-template-columns: 1fr;
|
||||
gap: 14px;
|
||||
padding:5px;
|
||||
}
|
||||
|
||||
.Grid_2_col_sub_colone {
|
||||
background: #fff;
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 14px;
|
||||
box-shadow: 0 6px 18px rgba(2,6,23,.04);
|
||||
padding: 0px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
|
||||
.Grid_2_col_sub_colone_header {
|
||||
background: #dbeafe;
|
||||
border-top-right-radius: 10px;
|
||||
border-top-left-radius: 10px;
|
||||
text-align: center;
|
||||
font-family: DM Sans;
|
||||
font-weight: 700;
|
||||
height: 2rem;
|
||||
padding-top: 5px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.Grid_2_col_sub_colone_bottom_menu{
|
||||
|
||||
}
|
||||
|
||||
.card__header{
|
||||
background: #e2e8f0;
|
||||
font-size: small;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.card__title{
|
||||
display:flex;
|
||||
align-items:center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.card__icon{
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
display:grid;
|
||||
place-items:center;
|
||||
border-radius: 12px;
|
||||
background:#eff6ff;
|
||||
border:1px solid #dbeafe;
|
||||
}
|
||||
|
||||
.card__header h2{
|
||||
margin:0;
|
||||
font-size: 15px;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
|
||||
.card__actions{ display:flex; align-items:center; gap:8px; }
|
||||
|
||||
.block_detail_action{
|
||||
width: 100%;
|
||||
float: left;
|
||||
background: #fafafa;
|
||||
padding: 10px;
|
||||
border: unset;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.react-datepicker-wrapper{
|
||||
width: 100%;
|
||||
}
|
||||
`;
|
||||
|
|
|
|||
|
|
@ -167,6 +167,56 @@ const Partner_Commande = (props) => {
|
|||
);
|
||||
}
|
||||
|
||||
function local_format_monetaire(local_amount) {
|
||||
return new Intl.NumberFormat('fr-FR', {
|
||||
style: 'currency',
|
||||
currency: 'EUR',
|
||||
}).format(Number(local_amount));
|
||||
}
|
||||
|
||||
function local_format_monetaire_v2(local_amount) {
|
||||
if (isNaN(parseFloat(local_amount))) {
|
||||
return "—"
|
||||
} else {
|
||||
return new Intl.NumberFormat('fr-FR', {
|
||||
minimumFractionDigits: 0,
|
||||
maximumFractionDigits: 0,
|
||||
}).format(parseFloat(local_amount));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function ExpandableCell_String_to_monetaire({ value }) {
|
||||
const [expanded, setExpanded] = React.useState(false);
|
||||
|
||||
const number = parseFloat(value);
|
||||
var new_value = ""
|
||||
if (isNaN(number)) {
|
||||
new_value = "—"
|
||||
} else {
|
||||
new_value = new Intl.NumberFormat('fr-FR', {
|
||||
minimumFractionDigits: 0,
|
||||
maximumFractionDigits: 0,
|
||||
}).format(number);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<nav>
|
||||
{value && <div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all", paddingTop: '5px' }}>
|
||||
{new_value}
|
||||
</div>}
|
||||
|
||||
{!value && <div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all" }}>
|
||||
|
||||
</div>
|
||||
}
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
const columns = [
|
||||
{ field: '_id', headerName: '_id', hide: true, disableExport: true, },
|
||||
{ field: 'id', headerName: 'id', hide: true, disableExport: true, },
|
||||
|
|
@ -371,20 +421,31 @@ const Partner_Commande = (props) => {
|
|||
|
||||
|
||||
{ field: 'order_line_formation_external_code', headerName: 'Code Formation', minwidth: 200, flex: 1, hide: true, resizable: true, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'order_line_formation_duration', headerName: 'Durée', width: 80, hide: false, editable: false },
|
||||
{ field: 'order_line_qty', headerName: 'Qte', width: 100, hide: false, editable: false },
|
||||
{ field: 'order_line_prix_unitaire', headerName: 'Prix Unit.', width: 100, hide: false, editable: false },
|
||||
{ field: 'order_line_montant_hors_taxes', headerName: 'Total HT', width: 100, hide: false, editable: false },
|
||||
{ field: 'order_line_tax_amount', headerName: 'Taxe', width: 100, hide: false, editable: false },
|
||||
{ field: 'order_line_formation_duration', headerName: 'Durée', width: 80, hide: false, editable: false, align:'center' },
|
||||
{ field: 'order_line_qty', headerName: 'Qte', width: 100, hide: false, editable: false , align:'center'},
|
||||
{ field: 'order_line_prix_unitaire', headerName: 'Prix Unit.', width: 100, hide: false, editable: false,
|
||||
align:'right', hide: false,
|
||||
renderCell: (params) => <ExpandableCell_String_to_monetaire {...params} />, },
|
||||
{ field: 'order_line_montant_hors_taxes', headerName: 'Total HT', width: 100, hide: false, editable: false,
|
||||
align:'right', hide: false,
|
||||
renderCell: (params) => <ExpandableCell_String_to_monetaire {...params} />,
|
||||
},
|
||||
{ field: 'order_line_tax_amount', headerName: 'Taxe', width: 100, hide: false, editable: false,
|
||||
align:'right', hide: false,
|
||||
renderCell: (params) => <ExpandableCell_String_to_monetaire {...params} />,
|
||||
},
|
||||
|
||||
{ field: 'order_line_type_reduction', headerName: 'Reduc. Type', width: 100, hide: true, editable: false },
|
||||
{ field: 'order_line_type_valeur', headerName: 'Reduc. Val', width: 100, hide: true, editable: false },
|
||||
{ field: 'order_line_montant_reduction', headerName: 'Reduc. Mont.', width: 100, hide: false, editable: false },
|
||||
|
||||
|
||||
{ field: 'order_line_taux_taxe', headerName: '% Taxe', width: 100, hide: false, editable: false },
|
||||
{ field: 'order_line_taux_taxe', headerName: '% Taxe', width: 100, hide: false, editable: false , align:'center'},
|
||||
|
||||
{ field: 'order_line_montant_toutes_taxes', headerName: 'Montant TTC', width: 100, hide: false, editable: false },
|
||||
{ field: 'order_line_montant_toutes_taxes', headerName: 'Montant TTC', width: 100, hide: false, editable: false,
|
||||
align:'right', hide: false,
|
||||
renderCell: (params) => <ExpandableCell_String_to_monetaire {...params} />,
|
||||
},
|
||||
{ field: 'order_header_id', headerName: 'Id_Entete', hide: true, editable: false },
|
||||
{ field: 'order_header_ref_interne', headerName: 'Ref_Interne', hide: true, editable: false },
|
||||
{ field: 'order_line_type', headerName: 'Type', width: 100, hide: true, editable: false },
|
||||
|
|
@ -7555,7 +7616,7 @@ const Partner_Commande = (props) => {
|
|||
|
||||
{/********** FIN Dialog pour une entete de commande/devis */}
|
||||
|
||||
<h3 style={{ fontFamily: 'DM Sans' }}> Mes Commandes et Devis </h3>
|
||||
<h3 style={{ fontFamily: 'DM Sans' }}> Mes Devis </h3>
|
||||
<div className="div_row">
|
||||
<div className="titre1"> Utilisez les filtres !</div>
|
||||
<div className="div_row" style={{ "marginBottom": "5px" }}>
|
||||
|
|
|
|||
|
|
@ -7555,7 +7555,7 @@ const Partner_Commande_ARG = (props) => {
|
|||
|
||||
{/********** FIN Dialog pour une entete de commande/devis */}
|
||||
|
||||
<h3 style={{ fontFamily: 'DM Sans' }}> Mes Commandes et Devis </h3>
|
||||
<h3 style={{ fontFamily: 'DM Sans' }}> Mes Devis </h3>
|
||||
<div className="div_row">
|
||||
<div className="titre1"> Utilisez les filtres !</div>
|
||||
<div className="div_row" style={{ "marginBottom": "5px" }}>
|
||||
|
|
|
|||
|
|
@ -323,22 +323,22 @@ const Partner_Facture = (props) => {
|
|||
{ field: 'order_header_vendeur_nom_prenom', headerName: 'Vendeur', width: 150, flex: 1, editable: false },
|
||||
{ field: 'order_header_date_cmd', headerName: 'Date Cmd', width: 150, hide: true, editable: false },
|
||||
{
|
||||
field: 'total_header_hors_taxe_before_header_reduction', headerName: 'Montant HT', width: 150, hide: false, editable: false,
|
||||
field: 'total_header_hors_taxe_before_header_reduction', headerName: 'Montant HT', width: 150, hide: false, editable: false, align:'right',
|
||||
renderCell: (params) => <ExpandableCell_String_to_monetaire {...params} />,
|
||||
},
|
||||
|
||||
{
|
||||
field: 'order_header_tax_amount', headerName: 'Taxe', width: 150, hide: false, editable: false,
|
||||
field: 'order_header_tax_amount', headerName: 'Taxe', width: 150, hide: false, editable: false, align:'right',
|
||||
renderCell: (params) => <ExpandableCell_String_to_monetaire {...params} />,
|
||||
},
|
||||
|
||||
{
|
||||
field: 'total_header_toutes_taxes', headerName: 'Montant TTC', width: 150, hide: false, editable: false,
|
||||
field: 'total_header_toutes_taxes', headerName: 'Montant TTC', width: 150, hide: false, editable: false, align:'right',
|
||||
renderCell: (params) => <ExpandableCell_String_to_monetaire {...params} />,
|
||||
},
|
||||
|
||||
{
|
||||
field: 'reste_to_paye', headerName: 'A payer', width: 150, hide: false, editable: false,
|
||||
field: 'reste_to_paye', headerName: 'A payer', width: 150, hide: false, editable: false, align:'right',
|
||||
renderCell: (params) => <ExpandableCell_String_to_monetaire {...params} />,
|
||||
},
|
||||
|
||||
|
|
@ -454,10 +454,16 @@ const Partner_Facture = (props) => {
|
|||
{ field: 'order_line_session_code', headerName: 'Code Session', width: 150, hide: false, editable: false },
|
||||
{ field: 'order_line_formation_duration', headerName: 'Durée', width: 80, hide: false, editable: false },
|
||||
|
||||
{ field: 'order_line_qty', headerName: 'Qte', width: 100, hide: false, editable: false },
|
||||
{ field: 'order_line_prix_unitaire', headerName: 'Prix Unit.', width: 100, hide: false, editable: false },
|
||||
{ field: 'order_line_qty', headerName: 'Qte', width: 100, hide: false, editable: false, align:'center', },
|
||||
{ field: 'order_line_prix_unitaire', headerName: 'Prix Unit.', width: 100, hide: false, editable: false,
|
||||
align:'center',
|
||||
renderCell: (params) => <ExpandableCell_String_to_monetaire {...params} />,
|
||||
},
|
||||
|
||||
{ field: 'order_line_montant_hors_taxes', headerName: 'Total HT', width: 100, hide: false, editable: false },
|
||||
{ field: 'order_line_montant_hors_taxes', headerName: 'Total HT', width: 100, hide: false, editable: false,
|
||||
align:'right',
|
||||
renderCell: (params) => <ExpandableCell_String_to_monetaire {...params} />,
|
||||
},
|
||||
|
||||
{ field: 'order_header_id', headerName: 'Id_Entete', hide: true, editable: false },
|
||||
{ field: 'order_header_ref_interne', headerName: 'Ref_Interne', hide: true, editable: false },
|
||||
|
|
|
|||
Loading…
Reference in New Issue