recette2
cherif 2024-02-12 23:12:28 +01:00
parent cf87c3dbf1
commit 7b965dd81f
6 changed files with 894 additions and 162 deletions

View File

@ -91,7 +91,7 @@ const AddParnerClient = (props) => {
const [selected_contact_id, setelected_contact_id] = useState("");
function ExpandableCell_50({ value }) {
const [expanded, setExpanded] = React.useState(false);
@ -485,6 +485,15 @@ const AddParnerClient = (props) => {
new_data2.push(node);
});
//---
var node = {
"_id": "",
"id": "",
"label": "",
"code": "",
};
new_data2.push(node);
if (new_data2.length > 0)
setNew_Get_List_Client_Type_result(new_data2);
@ -579,6 +588,26 @@ const AddParnerClient = (props) => {
setclient_raison_sociale("");
}
if (String(mylocalclient.is_financeur) === "1")
setp_client_is_financeur(true);
else
setp_client_is_financeur(false);
if (String(mylocalclient.is_client) === "1")
setp_client_is_client(true);
else
setp_client_is_client(false);
if (String(mylocalclient.is_fournisseur) === "1")
setp_client_is_fournisseur(true);
else
setp_client_is_fournisseur(false);
if (mylocalclient.adr_adresse)
setclient_adresse(mylocalclient.adr_adresse);
else
@ -1366,12 +1395,30 @@ const AddParnerClient = (props) => {
else
form.append("client_type_id", "");
if (String(p_client_is_financeur) === "true")
form.append("is_financeur", "1");
else
form.append("is_financeur", "0");
if (String(p_client_is_fournisseur) === "true")
form.append("is_fournisseur", "1");
else
form.append("is_fournisseur", "0");
if (String(p_client_is_client) === "true")
form.append("is_client", "1");
else
form.append("is_client", "0");
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Partner_Client/";
axios.post(myurl, form).then(res => {
if (String(res.data.status) === String("true")) {
console.log(" In Add_New_PartnerClient res.data.status = " + res.data.status);
console.log(" In Add_New_PartnerClient res.data.message = " + res.data.message);
//console.log(" In Add_New_PartnerClient res.data.status = " + res.data.status);
//console.log(" In Add_New_PartnerClient res.data.message = " + res.data.message);
setAdd_New_PartnerClient_api("true");
setAdd_New_PartnerClient_result(res.data.message);
setformedit_mode("0");
@ -1491,11 +1538,7 @@ const AddParnerClient = (props) => {
}
form.append("siret", client_siret);
var client_type_client_id = ""
if (document.getElementsByName("client_type_id")) {
client_type_client_id = document.getElementsByName("client_type_id")[0].value;
}
form.append("client_type_id", client_type_client_id);
var client_tva = ""
@ -1515,6 +1558,25 @@ const AddParnerClient = (props) => {
else
form.append("client_type_id", "");
if (String(p_client_is_financeur) === "true")
form.append("is_financeur", "1");
else
form.append("is_financeur", "0");
if (String(p_client_is_fournisseur) === "true")
form.append("is_fournisseur", "1");
else
form.append("is_fournisseur", "0");
if (String(p_client_is_client) === "true")
form.append("is_client", "1");
else
form.append("is_client", "0");
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Update_Partner_Client/";
axios.post(myurl, form).then(res => {
@ -2260,6 +2322,10 @@ const AddParnerClient = (props) => {
{ "id": "", "label": "", "value": "" },
]
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);
return (
<div className="add_partner_client">
@ -2315,20 +2381,19 @@ const AddParnerClient = (props) => {
if (value && value._id) {
setp_client_type_id(value._id);
}
}}
//value={p_one_detail_client_rattachement_nom}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
{/* <TextField
{/* <TextField
required
name="client_type_id"
id="client_type_id"
@ -2498,8 +2563,83 @@ const AddParnerClient = (props) => {
<div className="div_row" style={{ "border": "None" }}>
&nbsp;
</div>
<div className="session_caract" >
<Tooltip className="tooltip_css" id="tooltip_financeur" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="tooltip_financeur" data-tooltip-html="Si ce type s'applique aux organismes finaceurs, cliquez 'OUI' ">
<nav className="disabled_style" style={{ "height": '3rem', border: "none" }}
onChange={(e) => {
DataEditMode();
if (p_client_is_financeur === true)
setp_client_is_financeur(false)
else {
setp_client_is_financeur(true);
}
}}
id="toggleSwitchNav_1" name="toggleSwitchNav_1">
<ToggleSwitch
label="Est il un financeur ?" id="toggleSwitch_1" name="toggleSwitch_1" checked={p_client_is_financeur} style={{ height: "2rem" }} />
</nav>
</a>
</div>
<div className="session_caract" >
<Tooltip className="tooltip_css" id="tooltip_fsseur" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="tooltip_fsseur" data-tooltip-html="Si ce type s'applique aux fournisseurs, cliquez 'OUI' ">
<nav className="disabled_style" style={{ "height": '3rem', border: "none" }}
onChange={(e) => {
DataEditMode();
if (p_client_is_fournisseur === true)
setp_client_is_fournisseur(false)
else {
setp_client_is_fournisseur(true);
}
}}
id="toggleSwitchNav_2" name="toggleSwitchNav_2">
<ToggleSwitch
label="Est il un fournisseur ?" id="toggleSwitch_2" name="toggleSwitch_2" checked={p_client_is_fournisseur} style={{ height: "2rem" }} />
</nav>
</a>
</div>
<div className="session_caract" >
<Tooltip className="tooltip_css" id="tooltip_is_client" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="tooltip_is_client" data-tooltip-html="Si ce type s'applique aux clients, cliquez 'OUI' ">
<nav className="disabled_style" style={{ "height": '3rem', border: "none" }}
onChange={(e) => {
DataEditMode();
if (p_client_is_client === true)
setp_client_is_client(false)
else {
setp_client_is_client(true);
}
}}
id="toggleSwitchNav_3" name="toggleSwitchNav_3">
<ToggleSwitch
label="Est il un client ?" id="toggleSwitch_3" name="toggleSwitch_3" checked={p_client_is_client} style={{ height: "2rem" }} />
</nav>
</a>
</div>
<div className="div_row" style={{ "border": "None" }}>
&nbsp;
</div>
<div className="div_row">
<div className="div_row_gauche">
<Popup
@ -2622,8 +2762,33 @@ const AddParnerClient = (props) => {
</div>}
{String(formedit_mode) === "1" && <div className="session_caract"> Type client <br />
<TextField
{New_Get_List_Client_Type_result && New_Get_List_Client_Type_result.length > 1 &&
String(formedit_mode) === "1" && <div className="session_caract"> Type client <br />
<Autocomplete
disablePortal
name="client_type_id"
id="client_type_id"
className="disabled_style"
options={New_Get_List_Client_Type_result}
value={New_Get_List_Client_Type_result.filter((data) => (data)._id === String(p_client_type_id))[0].label}
onChange={(event, value) => {
if (value && value._id) {
setp_client_type_id(value._id);
DataUpdated();
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
/>
{/*<TextField
required
name="client_type_id"
id="client_type_id"
@ -2650,8 +2815,8 @@ const AddParnerClient = (props) => {
</MenuItem>
))}
</TextField>
</div>}
</TextField>*/}
</div>}
<div className="session_caract"> N° Siret<br />
@ -2772,7 +2937,7 @@ const AddParnerClient = (props) => {
/>
</div>
<div className="session_caract"> Site web<br />
<div className="session_caract"> Site web 1<br />
<TextField
required
name="client_website"
@ -2787,6 +2952,79 @@ const AddParnerClient = (props) => {
/>
</div>
<div className="session_caract" >
<Tooltip className="tooltip_css" id="tooltip_financeur" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="tooltip_financeur" data-tooltip-html="Si ce type s'applique aux organismes finaceurs, cliquez 'OUI' ">
<nav className="disabled_style" style={{ "height": '3rem', border: "none" }}
onChange={(e) => {
DataEditMode();
if (p_client_is_financeur === true)
setp_client_is_financeur(false)
else {
setp_client_is_financeur(true);
}
}}
id="toggleSwitchNav_1" name="toggleSwitchNav_1">
<ToggleSwitch
label="Est il un financeur ?" id="toggleSwitch_1" name="toggleSwitch_1" checked={p_client_is_financeur} style={{ height: "2rem" }} />
</nav>
</a>
</div>
<div className="session_caract" >
<Tooltip className="tooltip_css" id="tooltip_fsseur" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="tooltip_fsseur" data-tooltip-html="Si ce type s'applique aux fournisseurs, cliquez 'OUI' ">
<nav className="disabled_style" style={{ "height": '3rem', border: "none" }}
onChange={(e) => {
DataEditMode();
if (p_client_is_fournisseur === true)
setp_client_is_fournisseur(false)
else {
setp_client_is_fournisseur(true);
}
}}
id="toggleSwitchNav_2" name="toggleSwitchNav_2">
<ToggleSwitch
label="Est il un fournisseur ?" id="toggleSwitch_2" name="toggleSwitch_2" checked={p_client_is_fournisseur} style={{ height: "2rem" }} />
</nav>
</a>
</div>
<div className="session_caract" >
<Tooltip className="tooltip_css" id="tooltip_is_client" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="tooltip_is_client" data-tooltip-html="Si ce type s'applique aux clients, cliquez 'OUI' ">
<nav className="disabled_style" style={{ "height": '3rem', border: "none" }}
onChange={(e) => {
DataEditMode();
if (p_client_is_client === true)
setp_client_is_client(false)
else {
setp_client_is_client(true);
}
}}
id="toggleSwitchNav_3" name="toggleSwitchNav_3">
<ToggleSwitch
label="Est il un client ?" id="toggleSwitch_3" name="toggleSwitch_3" checked={p_client_is_client} style={{ height: "2rem" }} />
</nav>
</a>
</div>
<div className="div_row" style={{ "border": "None" }}>
&nbsp;
@ -2808,7 +3046,7 @@ const AddParnerClient = (props) => {
{String(formedit_mode) !== "1" && <div className="div_row">
<div className="div_row_droite" style={{ "textAlign": "right" }}>
<Button variant="contained" color="success" className="bton_edit" onClick={DataEditMode}> Modifier</Button>
<Button variant="contained" color="success" className="bton_edit" onClick={DataEditMode}> Editer </Button>
</div>
</div>
}
@ -3101,9 +3339,9 @@ const AddParnerClient = (props) => {
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
@ -3142,7 +3380,7 @@ const AddParnerClient = (props) => {
disabled={false}
className="disabled_style"
value={p_contact_civilite}
/>
@ -3408,7 +3646,7 @@ const AddParnerClient = (props) => {
</div>
<div className="div_row_droite" style={{ "textAlign": "right" }}>
<Button variant="contained" color="success" className="bton_edit" onClick={DataEditMode_Contact_Data}> Modifier</Button>
<Button variant="contained" color="success" className="bton_edit" onClick={DataEditMode_Contact_Data}> Editer</Button>
</div>
</div>
}

View File

@ -263,9 +263,9 @@ const DisplayPartnerSession = (props) => {
{ field: 'domaine', headerName: 'Domaine', minWidth: datagrid_columns_size_model1, align: "center", hide: true, hideable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'published', headerName: 'publié', minWidth: datagrid_columns_size_model1, align: "center", hide: true, hideable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'site_formation_id', headerName: 'site_formation_id', with: 0, align: "center", hide: true, hideable: false},
{ field: 'site_formation_nom', headerName: 'Site Ftion',with: 150, align: "center", hide: false, hideable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'site_formation_id', headerName: 'site_formation_id', with: 0, align: "center", hide: true, hideable: false },
{ field: 'site_formation_nom', headerName: 'Site Ftion', with: 150, align: "center", hide: false, hideable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'duration', headerName: 'Durée', minWidth: datagrid_columns_size_model2, align: "center", hide: true, hideable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
@ -3669,6 +3669,11 @@ const DisplayPartnerSession = (props) => {
document.getElementsByName("prix_session")[0].style.backgroundColor = "#ECEFF1";
}
if (document.getElementsByName("prix_session_by")[0]) {
document.getElementsByName("prix_session_by")[0].disabled = true;
document.getElementsByName("prix_session_by")[0].style.backgroundColor = "#ECEFF1";
}
if (document.getElementsByName("titre_session")[0]) {
document.getElementsByName("titre_session")[0].disabled = true;
document.getElementsByName("titre_session")[0].style.backgroundColor = "#ECEFF1";
@ -4214,6 +4219,8 @@ const DisplayPartnerSession = (props) => {
form.append("location_type", p_detail_location_type);
form.append("is_bpf", p_detail_is_bpf);
form.append("price_by", p_prix_session_by);
form.append("formateur_id", p_formateur_id);
form.append("site_formation_id", p_session_site_formation_id);
@ -4450,6 +4457,7 @@ const DisplayPartnerSession = (props) => {
form.append("titre", p_one_titre);
form.append("location_type", p_one_location_type);
form.append("is_bpf", p_one_is_bpf);
form.append("price_by", p_one_prix_session_by);
form.append("session_status", p_one_session_status);
@ -4746,6 +4754,13 @@ const DisplayPartnerSession = (props) => {
if (mylocaltraining.prix_session)
setp_prix_session(mylocaltraining.prix_session);
if (mylocaltraining.price_by)
setp_prix_session_by(mylocaltraining.price_by);
else
setp_prix_session_by("");
if (mylocaltraining.distantiel) {
setp_session_distance(mylocaltraining.distantiel);
if (String(mylocaltraining.distantiel) === "1")
@ -4947,6 +4962,7 @@ const DisplayPartnerSession = (props) => {
const [p_lms_class_code, setp_lms_class_code] = useState("");
const [p_nb_participant, setp_nb_participant] = useState("");
const [p_prix_session, setp_prix_session] = useState("");
const [p_prix_session_by, setp_prix_session_by] = useState("");
const [p_one_myclass_title, setp_one_myclass_title] = useState("");
@ -4966,6 +4982,7 @@ const DisplayPartnerSession = (props) => {
const [p_one_lms_class_code, setp_one_lms_class_code] = useState("");
const [p_one_nb_participant, setp_one_nb_participant] = useState("");
const [p_one_prix_session, setp_one_prix_session] = useState("");
const [p_one_prix_session_by, setp_one_prix_session_by] = useState("");
const [p_one_session_ondemande, setp_one_session_ondemande] = useState("0");
const [p_one_session_ondemande_label, setp_one_session_ondemande_label] = useState("Non");
const [p_one_session_distance, setp_one_session_distance] = useState("0");
@ -9321,6 +9338,11 @@ const DisplayPartnerSession = (props) => {
}
const New_Price_by = [
{ "id": "persession", "label": "Par Session", "value": "persession" },
{ "id": "perstagiaire", "label": "Par Stagiaire", "value": "perstagiaire" },
{ "id": "", "label": "", "value": "" },
]
return (
<div className="displaypartnersession">
@ -9970,9 +9992,9 @@ const DisplayPartnerSession = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
@ -10911,7 +10933,7 @@ const DisplayPartnerSession = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
@ -10978,7 +11000,7 @@ const DisplayPartnerSession = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
@ -11046,7 +11068,7 @@ const DisplayPartnerSession = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
@ -11108,7 +11130,7 @@ const DisplayPartnerSession = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
@ -11240,7 +11262,7 @@ const DisplayPartnerSession = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
@ -11412,7 +11434,7 @@ const DisplayPartnerSession = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
@ -11477,7 +11499,7 @@ const DisplayPartnerSession = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
@ -11515,7 +11537,7 @@ const DisplayPartnerSession = (props) => {
className="disabled_style"
options={New_Getall_Partner_Site_Formation_result}
value={New_Getall_Partner_Site_Formation_result.filter((data) => (data)._id === String(p_session_site_formation_id))[0].label}
onChange={(event, value) => {
if (value && value._id && String(value._id).length > 2) {
@ -11570,9 +11592,9 @@ const DisplayPartnerSession = (props) => {
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>}
</div>}
@ -11697,38 +11719,7 @@ const DisplayPartnerSession = (props) => {
</div>}
{/*edit_session_form && <div className="session_caract"> Formateur <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="formateur_id"
id="formateur_id"
select
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={p_formateur_id}
onChange={(e) => {
setp_formateur_id(e.target.value);
IssessionChanged();
}
}
>
{Getall_Training_Employee_No_Filter_result &&
Getall_Training_Employee_No_Filter_result.map((myclient) => (
<MenuItem key={JSON.parse(myclient)._id} value={JSON.parse(myclient)._id}
style={{ "paddingLeft": "5px", "textAlign": "left", "height": "2rem", "width": '100%' }}>
{JSON.parse(myclient).nom}&nbsp; {JSON.parse(myclient).prenom}
</MenuItem>
))}
</TextField>
</div>*/}
{edit_session_form && <div className="session_caract"> Formateur <br />
<Autocomplete
@ -11748,7 +11739,7 @@ const DisplayPartnerSession = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
@ -11780,7 +11771,7 @@ const DisplayPartnerSession = (props) => {
/>
</div>
<div className="session_caract"> Prix session <br />
{/*<div className="session_caract"> Prix session <br />
<TextField sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="prix_session"
@ -11798,6 +11789,70 @@ const DisplayPartnerSession = (props) => {
IssessionChanged();
}}
/>
</div>*/}
<div className="session_caract"> Prix session <br />
<TextField sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="prix_session"
id="prix_session"
type="number"
InputLabelProps={{
shrink: true,
}}
inputProps={{ min: "1", max: "1000", step: "1" }}
disabled={false}
className="disabled_style_moitier"
value={p_prix_session}
onChange={(e) => {
setp_prix_session(e.target.value);
IssessionChanged();
}}
/>
{!edit_session_form && <TextField sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="prix_session_by"
id="prix_session_by"
InputLabelProps={{
shrink: true,
}}
inputProps={{ min: "1", max: "1000", step: "1" }}
disabled={false}
className="disabled_style_moitier"
value={New_Price_by.filter((data) => (data).value === String(p_prix_session_by))[0].label}
onChange={(e) => {
setp_prix_session(e.target.value);
IssessionChanged();
}}
/>}
{edit_session_form && <Autocomplete
disablePortal
name="prix_session_by"
id="prix_session_by"
className="disabled_style_moitier"
value={New_Price_by.filter((data) => (data).value === String(p_prix_session_by))[0].label}
options={New_Price_by}
onChange={(event, value) => {
if (value && value.value) {
setp_prix_session_by(value.value);
IssessionChanged();
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
/>}
</div>
@ -12019,7 +12074,7 @@ const DisplayPartnerSession = (props) => {
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
@ -12081,7 +12136,7 @@ const DisplayPartnerSession = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
@ -12126,7 +12181,7 @@ const DisplayPartnerSession = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
@ -12171,7 +12226,7 @@ const DisplayPartnerSession = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
@ -12218,7 +12273,7 @@ const DisplayPartnerSession = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
@ -12263,7 +12318,7 @@ const DisplayPartnerSession = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
@ -12399,7 +12454,7 @@ const DisplayPartnerSession = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
@ -12441,7 +12496,7 @@ const DisplayPartnerSession = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
@ -12530,9 +12585,9 @@ const DisplayPartnerSession = (props) => {
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>}
@ -12671,7 +12726,7 @@ const DisplayPartnerSession = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
@ -12695,7 +12750,7 @@ const DisplayPartnerSession = (props) => {
/>
</div>
<div className="session_caract"> Prix session <br />
{/* <div className="session_caract"> Prix session <br />
<TextField sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="one_prix_session"
@ -12710,6 +12765,45 @@ const DisplayPartnerSession = (props) => {
value={p_one_prix_session}
onChange={(e) => setp_one_prix_session(e.target.value)}
/>
</div>*/}
<div className="session_caract"> Prix session <br />
<TextField sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="one_prix_session"
id="one_prix_session"
type="number"
InputLabelProps={{
shrink: true,
}}
inputProps={{ min: "1", max: "1000", step: "1" }}
disabled={false}
className="disabled_style_moitier enable_style"
value={p_one_prix_session}
onChange={(e) => setp_one_prix_session(e.target.value)}
/>
<Autocomplete
disablePortal
name="detail_config_point"
id="detail_config_point"
className="disabled_style_moitier"
options={New_Price_by}
onChange={(event, value) => {
if (value && value.value) {
setp_one_prix_session_by(value.value)
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
/>
</div>
@ -13316,9 +13410,9 @@ const DisplayPartnerSession = (props) => {
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
@ -13460,9 +13554,9 @@ const DisplayPartnerSession = (props) => {
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
@ -13508,9 +13602,9 @@ const DisplayPartnerSession = (props) => {
value={p_one_detail_client_rattachement_nom}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
</div>
@ -13530,9 +13624,9 @@ const DisplayPartnerSession = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
@ -13807,9 +13901,9 @@ const DisplayPartnerSession = (props) => {
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
@ -14033,9 +14127,9 @@ const DisplayPartnerSession = (props) => {
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
@ -14178,9 +14272,9 @@ const DisplayPartnerSession = (props) => {
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
@ -14224,9 +14318,9 @@ const DisplayPartnerSession = (props) => {
value={p_one_detail_client_rattachement_nom}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
</div>
@ -14247,9 +14341,9 @@ const DisplayPartnerSession = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
@ -14645,9 +14739,9 @@ const DisplayPartnerSession = (props) => {
value={p_detail_client_rattachement_nom}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
@ -14703,9 +14797,9 @@ const DisplayPartnerSession = (props) => {
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
@ -14856,9 +14950,9 @@ const DisplayPartnerSession = (props) => {
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>}

View File

@ -54,6 +54,7 @@ import { FcDownRight, FcRight, FcSearch, FcViewDetails, FcOpenedFolder } from "r
import { MdOutlineVisibility } from "react-icons/md";
import Link from '@mui/material/Link';
import { PiDotsThree } from "react-icons/pi";
import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5";
const DisplayPartnerStagiaires = (props) => {
const history = useHistory();
@ -866,6 +867,7 @@ const DisplayPartnerStagiaires = (props) => {
function handleClick_edit_session_From_Line(selected_row_id) {
Get_List_Partner_Financeurs();
var line = JSON.parse(rowss[selected_row_id]);
@ -986,6 +988,7 @@ const DisplayPartnerStagiaires = (props) => {
setsubmenu("");
setSelectionModel([]);
setselected_code_session();
Get_List_Partner_Financeurs();
setaddOneParticipant("1");
@ -1170,6 +1173,9 @@ const DisplayPartnerStagiaires = (props) => {
setp_detail_client_rattachement_nom();
setp_detail_client_rattachement_id();
setp_detail_financeur_rattachement_nom();
setp_detail_financeur_rattachement_id();
setp_detail_type_apprenant();
setp_detail_type_apprenant_label();
@ -1243,8 +1249,13 @@ const DisplayPartnerStagiaires = (props) => {
setp_one_detail_client_rattachement_nom("");
setp_one_detail_client_rattachement_id("");
setp_one_detail_financeur_rattachement_id("");
setp_one_detail_financeur_rattachement_nom("");
setp_one_detail_type_apprenant("");
setp_one_detail_client_rattachement_id("");
setp_one_status_part("");
}
@ -2258,6 +2269,7 @@ const DisplayPartnerStagiaires = (props) => {
Getall_TrainingSession();
Get_List_Partner_Clients();
GetCurrentPartnerClass();
Get_List_Partner_Financeurs();
let windowWidth = window.innerWidth;
if (windowWidth < 1001) {
setdatagrid_columns_size_model2(10);
@ -2334,6 +2346,9 @@ const DisplayPartnerStagiaires = (props) => {
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_apprenant_id, setp_detail_apprenant_id] = useState("");
const [p_detail_tuteur1_nom, setp_detail_tuteur1_nom] = useState("");
@ -2379,6 +2394,9 @@ const DisplayPartnerStagiaires = (props) => {
const [p_one_detail_client_rattachement_nom, setp_one_detail_client_rattachement_nom] = useState();
const [p_one_detail_client_rattachement_id, setp_one_detail_client_rattachement_id] = useState();
const [p_one_detail_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_code_session, setp_one_detail_code_session] = useState();
@ -2506,6 +2524,12 @@ const DisplayPartnerStagiaires = (props) => {
}
if (mylocalattendee.financeur_rattachement_id) {
setp_detail_financeur_rattachement_id(mylocalattendee.financeur_rattachement_id);
setp_detail_financeur_rattachement_nom(mylocalattendee.financeur_rattachement_nom);
}
if (mylocalattendee.civilite)
setp_detail_civilite(mylocalattendee.civilite);
@ -2979,6 +3003,13 @@ const DisplayPartnerStagiaires = (props) => {
else
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", "");
form.append("modefinancement", "");
@ -3155,13 +3186,6 @@ const DisplayPartnerStagiaires = (props) => {
form.append("pays", "");
//---
if (p_detail_mode_fin)
form.append("modefinancement", p_detail_mode_fin);
else
@ -3186,6 +3210,11 @@ const DisplayPartnerStagiaires = (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
*/
@ -3346,6 +3375,86 @@ const DisplayPartnerStagiaires = (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("")
})
}
function annule_Add_One_Participant() {
clear_one_Attende_Fields();
setaddOneParticipant();
@ -3398,6 +3507,16 @@ const DisplayPartnerStagiaires = (props) => {
new_data2.push(node);
});
var node = {
"_id": "",
"id": "",
"label": "",
"internal_url": "",
"title": "",
"external_code": ""
};
new_data2.push(node);
if (new_data2.length > 0)
setNew_GetCurrentPartnerClass_result(new_data2);
@ -5169,6 +5288,7 @@ const DisplayPartnerStagiaires = (props) => {
const [selected_row_data_json_age, setselected_row_data_json_age] = useState("");
function Show_Detailled_stagiaire_Data() {
handleClick_edit_session_From_Line(gridline_id);
Dialog_stagiaire_handleClose_buton();
}
@ -5835,9 +5955,9 @@ const DisplayPartnerStagiaires = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
@ -6672,7 +6792,7 @@ const DisplayPartnerStagiaires = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
@ -6777,8 +6897,9 @@ const DisplayPartnerStagiaires = (props) => {
<Button variant="outlined" onClick={submenu_add_one_stagiaire}
className="detail_class_submenu bton_add_session"
id='menu_import_participant' name='menu_import_participant'>Ajouter 1 participant &nbsp;
<img src={add_plus} alt="ajout session" className="icon_plus" />
id='menu_import_participant' name='menu_import_participant'>Ajout 1 participant &nbsp;
<IoAddCircleOutline style={{ "fontSize": "x-large", "color": "green" }} />
</Button>
<br />
@ -6859,9 +6980,9 @@ const DisplayPartnerStagiaires = (props) => {
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
</div>
@ -6883,9 +7004,9 @@ const DisplayPartnerStagiaires = (props) => {
value={p_one_detail_code_session}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
</div>}
@ -6904,9 +7025,9 @@ const DisplayPartnerStagiaires = (props) => {
value={p_one_detail_code_session}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
</div>}
@ -6969,9 +7090,9 @@ const DisplayPartnerStagiaires = (props) => {
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
{/* <TextField
@ -7200,9 +7321,9 @@ const DisplayPartnerStagiaires = (props) => {
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
@ -7250,14 +7371,41 @@ const DisplayPartnerStagiaires = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
</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
@ -7275,9 +7423,9 @@ const DisplayPartnerStagiaires = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
@ -7549,9 +7697,9 @@ const DisplayPartnerStagiaires = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
@ -7610,9 +7758,9 @@ const DisplayPartnerStagiaires = (props) => {
value={p_detail_client_rattachement_nom}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
@ -7659,6 +7807,79 @@ const DisplayPartnerStagiaires = (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 client selectionné")
}
}
}
>
<div className="disabled_style_with_visualiser_icone" >
<FcOpenedFolder />
</div>
</div>
</a>
</div>}
{String(participant_data_edit_mode) === "1" && <div className="session_caract"> Type apprenant<br />
<Autocomplete
@ -7677,9 +7898,9 @@ const DisplayPartnerStagiaires = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
@ -7738,9 +7959,9 @@ const DisplayPartnerStagiaires = (props) => {
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
@ -7767,9 +7988,9 @@ const DisplayPartnerStagiaires = (props) => {
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>

View File

@ -124,29 +124,31 @@ const Partner_Client = (props) => {
{ field: 'nom', headerName: 'nom', width: 100, hide: false, editable: false, Width: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'email', headerName: 'email', width: 100, hideable: false, width: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'telephone', headerName: 'Téléphone', width: 100, hide: false, editable: false, width: 100, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'adr_adresse', headerName: 'Adresse', width: 100, hide: true, editable: false, width: 100, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'telephone', headerName: 'Téléphone', width: 100, hide: false, editable: false, width: 100, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'adr_adresse', headerName: 'Adresse', width: 100, hide: true, editable: false, width: 100, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ 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: '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} />, },
{ 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: '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} />, },
/*{
field: "update", headerName: 'Modifier',
{
field: "detail", headerName: 'Voir détail',
renderCell: (cellValues) => {
return (
<div style={{ "marginLeft": "auto", "marginRight": "auto", "cursor": "pointer" }} onClick={(event) => {
handleClick_modifier(event, cellValues);
setgridline_id(cellValues.row.id)
handleClick_edit_session_From_Line(cellValues.row.id);
}}>
<FcAcceptDatabase style={{ "fontSize": "x-large" }} />
</div>
);
}
},*/
},
{
field: "delete", headerName: 'Supprimer',
renderCell: (cellValues) => {
@ -471,6 +473,8 @@ const Partner_Client = (props) => {
if (rows_list_clients[selected_row_id]) {
console.log(" OKKKKK ");
var line = JSON.parse(rows_list_clients[selected_row_id]);
var clientmail = String(line.email);
@ -507,15 +511,15 @@ const Partner_Client = (props) => {
const [p_filtre1, setp_filtre1] = useState();
const [p_filtre1_value, setp_filtre1_value] = useState();
const [p_filtre1, setp_filtre1] = useState("");
const [p_filtre1_value, setp_filtre1_value] = useState("");
const [p_filtre2, setp_filtre2] = useState();
const [p_filtre2_value, setp_filtre2_value] = useState();
function clean_all_filters() {
setp_filtre1();
setp_filtre1("");
setp_filtre1_value();
setp_filtre2();
setp_filtre2_value();
@ -649,7 +653,7 @@ const Partner_Client = (props) => {
<DialogActions>
<div className="div_row">
<div className="div_row_gauche">
<Button onClick={Show_Detailled_client_Data} className="bton_enreg_dialog">Voir detail</Button>
<Button onClick={Show_Detailled_client_Data} className="bton_enreg_dialog">Voir détail</Button>
</div>
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
<Button onClick={Dialog_client_handleClose_buton} className="bton_annule_dialog" >Fermer</Button>
@ -684,6 +688,7 @@ const Partner_Client = (props) => {
<MenuItem value="nom_client" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Nom &nbsp;&nbsp;</MenuItem>
<MenuItem value="email_client" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Email &nbsp;</MenuItem>
<MenuItem value="" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >&nbsp;</MenuItem>
</TextField>
</div>
@ -867,6 +872,7 @@ const Partner_Client = (props) => {
}}
>
<DataGrid
disableSelectionOnClick
localeText={frFR.components.MuiDataGrid.defaultProps.localeText}
rows={rows_list_clients.map((item, index) => (
{
@ -912,10 +918,12 @@ const Partner_Client = (props) => {
selectionModel={selectionModel}
onRowDoubleClick={(newSelectionModel) => {
console.log(" 01 GRRRR newSelectionModel.row._id = ", newSelectionModel.row._id);
setgridline_id(newSelectionModel.row.id);
setselected_id(newSelectionModel.row._id)
setselected_id(newSelectionModel.row._id);
//handleClick_edit_session_From_Line(newSelectionModel.row.id);
console.log(" GRRRR newSelectionModel.row._id = ", newSelectionModel.row._id);
setDialog_client_open(true);
}}
@ -933,7 +941,7 @@ const Partner_Client = (props) => {
}
}}
sx={{
"& .MuiDataGrid-cellContent": {
minHeight: 100,

View File

@ -41,6 +41,7 @@ import DialogTitle from '@mui/material/DialogTitle';
import { TransitionProps } from '@mui/material/transitions';
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5";
import ToggleSwitch from "./ToggleSwitch";
const Partner_Configuration_Technique = (props) => {
@ -148,6 +149,48 @@ const Partner_Configuration_Technique = (props) => {
{ field: 'id', headerName: 'id', hide: true },
{ field: 'code', headerName: 'Nom Configuration', flex: 1, hide: false, editable: false },
{ field: 'description', headerName: 'Valeur config', flex: 1, hide: false, editable: false },
{ field: 'is_financeur', headerName: 'Financeur', flex: 1, hide: false, editable: false ,
renderCell: (cellValues) => {
return (
<div style={{ paddingLeft: "5px", paddingRight: "10px", "display": "block", wordBreak: "break-all" }}>
{String(cellValues.row.is_financeur) === "1" && "Oui"}&nbsp;
{String(cellValues.row.is_financeur) !== "1" && "Non"}&nbsp;
</div>
);
},
},
{ field: 'is_client', headerName: 'Client', flex: 1, hide: false, editable: false,
renderCell: (cellValues) => {
return (
<div style={{ paddingLeft: "5px", paddingRight: "10px", "display": "block", wordBreak: "break-all" }}>
{String(cellValues.row.is_client) === "1" && "Oui"}&nbsp;
{String(cellValues.row.is_client) !== "1" && "Non"}&nbsp;
</div>
);
},
},
{ field: 'is_fournisseur', headerName: 'Fournisseur', flex: 1, hide: false, editable: false ,
renderCell: (cellValues) => {
return (
<div style={{ paddingLeft: "5px", paddingRight: "10px", "display": "block", wordBreak: "break-all" }}>
{String(cellValues.row.is_fournisseur) === "1" && "Oui"}&nbsp;
{String(cellValues.row.is_fournisseur) !== "1" && "Non"}&nbsp;
</div>
);
},
},
{
field: "delete", headerName: 'Supprimer',
renderCell: (cellValues) => {
@ -680,6 +723,26 @@ const Partner_Configuration_Technique = (props) => {
setp_type_client_code(line.code);
setp_type_client_desc(line.description);
if (String(line.is_financeur) === "1")
setp_type_client_is_financeur(true);
else
setp_type_client_is_financeur(false);
if (String(line.is_client) === "1")
setp_type_client_is_client(true);
else
setp_type_client_is_client(false);
if (String(line.is_fournisseur) === "1")
setp_type_client_is_fournisseur(true);
else
setp_type_client_is_fournisseur(false);
setDialog_type_client_1_open(true);
}
@ -709,6 +772,12 @@ const Partner_Configuration_Technique = (props) => {
const [p_type_client_desc, setp_type_client_desc] = useState("");
const [selected_type_client_id, setselected_type_client_id] = useState("");
const [p_type_client_is_financeur, setp_type_client_is_financeur] = useState(false);
const [p_type_client_is_fournisseur, setp_type_client_is_fournisseur] = useState(false);
const [p_type_client_is_client, setp_type_client_is_client] = useState(false);
const [p_detail_code_site_stored, setp_detail_code_site_stored] = useState("");
const [p_detail_code_site, setp_detail_code_site] = useState("");
const [p_detail_nom_site, setp_detail_nom_site] = useState("");
@ -735,6 +804,23 @@ const Partner_Configuration_Technique = (props) => {
const stored_cookie = getCookie('tokenmysypart');
form.append("token", stored_cookie);
if (String(p_type_client_is_financeur) === "true")
form.append("is_financeur", "1");
else
form.append("is_financeur", "0");
if (String(p_type_client_is_fournisseur) === "true")
form.append("is_fournisseur", "1");
else
form.append("is_fournisseur", "0");
if (String(p_type_client_is_client) === "true")
form.append("is_client", "1");
else
form.append("is_client", "0");
var myurl = "";
@ -1073,6 +1159,73 @@ const Partner_Configuration_Technique = (props) => {
</div>
{/*<div className="session_caract_Dialog" > Caracteristiques
<Tooltip className="tooltip_css" id="tooltip_financeur" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="tooltip_financeur" data-tooltip-html="Si ce type s'applique aux organismes finaceurs, cliquez 'OUI' ">
<nav style={{ "height": '3rem' }}
onChange={(e) => {
if (p_type_client_is_financeur === true)
setp_type_client_is_financeur(false)
else {
setp_type_client_is_financeur(true);
}
}}
id="toggleSwitchNav" name="toggleSwitchNav">
<ToggleSwitch
label="S'applique aux financeurs ?" id="toggleSwitch" name="toggleSwitch" checked={p_type_client_is_financeur} style={{ height: "2rem" }} />
</nav>
</a>
<Tooltip className="tooltip_css" id="tooltip_fsseur" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="tooltip_fsseur" data-tooltip-html="Si ce type s'applique aux fournisseurs, cliquez 'OUI' ">
<nav style={{ "height": '3rem' }}
onChange={(e) => {
if (p_type_client_is_fournisseur === true)
setp_type_client_is_fournisseur(false)
else {
setp_type_client_is_fournisseur(true);
}
}}
id="toggleSwitchNav" name="toggleSwitchNav">
<ToggleSwitch
label="S'applique aux fournisseurs ? " id="toggleSwitch" name="toggleSwitch" checked={p_type_client_is_fournisseur} style={{ height: "2rem" }} />
</nav>
</a>
<Tooltip className="tooltip_css" id="tooltip_is_client" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="tooltip_is_client" data-tooltip-html="Si ce type s'applique aux clients, cliquez 'OUI' ">
<nav style={{ "height": '3rem' }}
onChange={(e) => {
if (p_type_client_is_client === true)
setp_type_client_is_client(false)
else {
setp_type_client_is_client(true);
}
}}
id="toggleSwitchNav" name="toggleSwitchNav">
<ToggleSwitch
label="S'applique aux clients ? " id="toggleSwitch" name="toggleSwitch" checked={p_type_client_is_client} style={{ height: "2rem" }} />
</nav>
</a>
</div>*/}
</DialogContent>
@ -1295,9 +1448,9 @@ const Partner_Configuration_Technique = (props) => {
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>}
@ -1629,9 +1782,9 @@ const Partner_Configuration_Technique = (props) => {
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps = {{...params.inputProps, style: { fontSize: 12, height:"1.4rem" }}}
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
/>
}
/>
@ -1836,6 +1989,10 @@ const Partner_Configuration_Technique = (props) => {
_id: JSON.parse(item)._id,
code: JSON.parse(item).code,
description: JSON.parse(item).description,
is_financeur: JSON.parse(item).is_financeur,
is_client: JSON.parse(item).is_client,
is_fournisseur: JSON.parse(item).is_fournisseur,
}
))}

View File

@ -2056,6 +2056,20 @@
border: solid gainsboro 1px;
}
.disabled_style_moitier {
//background-color: #ECEFF1;
font-size: small !important;
color: black;
width: 45% !important;
height: 3.5rem !important;
margin: 5px !important;
//border: none !important;
border-radius: 5px;
background: white;
border: solid gainsboro 1px;
float: left;
}
.training_caract {
width: 30%;
padding: 5px;