28/04/2024 - 22h
parent
84e5f96cdc
commit
97bde01099
|
@ -584,8 +584,8 @@ const Dashbord_Factures = (props) => {
|
||||||
}} />
|
}} />
|
||||||
</a> </div>
|
</a> </div>
|
||||||
|
|
||||||
<div className="div_row">
|
<div style={{ "width": "100%", "float": "left" }}>
|
||||||
<div className="" style={{ "width": "30%" }}>
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
Filtre <br />
|
Filtre <br />
|
||||||
|
|
||||||
<Autocomplete
|
<Autocomplete
|
||||||
|
@ -614,8 +614,9 @@ const Dashbord_Factures = (props) => {
|
||||||
|
|
||||||
{filter_value && String(filter_value) === "d" &&
|
{filter_value && String(filter_value) === "d" &&
|
||||||
|
|
||||||
<div>
|
<div style={{ "width": "100%", "float": "left" }}>
|
||||||
<div className="session_caract">
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
|
<div className="session_caract" style={{ "padding": '0px', 'width': '100%' }}>
|
||||||
Date Debut
|
Date Debut
|
||||||
<DatePicker
|
<DatePicker
|
||||||
name="one_sessiondatedebut"
|
name="one_sessiondatedebut"
|
||||||
|
@ -629,14 +630,16 @@ const Dashbord_Factures = (props) => {
|
||||||
}
|
}
|
||||||
showTimeSelect={false}
|
showTimeSelect={false}
|
||||||
dateFormat="dd/MM/yyyy"
|
dateFormat="dd/MM/yyyy"
|
||||||
className="disabled_style session_caract_Dialog_DatePicker"
|
className="disabled_style"
|
||||||
locale='fr-FR'
|
locale='fr-FR'
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="session_caract">
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
|
<div className="session_caract" style={{ "padding": '0px', 'width': '100%' }}>
|
||||||
Date Fin
|
Date Fin
|
||||||
<DatePicker
|
<DatePicker
|
||||||
name="one_sessiondatefin"
|
name="one_sessiondatefin"
|
||||||
|
@ -649,15 +652,16 @@ const Dashbord_Factures = (props) => {
|
||||||
}
|
}
|
||||||
showTimeSelect={false}
|
showTimeSelect={false}
|
||||||
dateFormat="dd/MM/yyyy"
|
dateFormat="dd/MM/yyyy"
|
||||||
className="disabled_style enable_style"
|
className="disabled_style"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
</div>}
|
</div>}
|
||||||
<div>
|
<div style={{ "width": "100%", "float": "left" }}>
|
||||||
<div className="" style={{ "width": "30%" }}>
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
Client <br />
|
Client <br />
|
||||||
|
|
||||||
{New_Get_List_Partner_Clients_result && New_Get_List_Partner_Clients_result.length > 0 &&
|
{New_Get_List_Partner_Clients_result && New_Get_List_Partner_Clients_result.length > 0 &&
|
||||||
|
@ -695,6 +699,7 @@ const Dashbord_Factures = (props) => {
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
<div className="div_row">
|
||||||
|
|
||||||
<Button variant="contained" className="bton_enreg" onClick={(e) => {
|
<Button variant="contained" className="bton_enreg" onClick={(e) => {
|
||||||
Getall_Qry_Invoice_Data();
|
Getall_Qry_Invoice_Data();
|
||||||
|
@ -704,6 +709,7 @@ const Dashbord_Factures = (props) => {
|
||||||
}}> Afficher
|
}}> Afficher
|
||||||
</Button><br />
|
</Button><br />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div style={{ "float": "left", "width": "100%", "paddingRight": "5px" }}>
|
<div style={{ "float": "left", "width": "100%", "paddingRight": "5px" }}>
|
||||||
|
|
||||||
|
@ -941,7 +947,7 @@ const Dashbord_Factures = (props) => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="div_row"> </div>
|
<div className="div_row"> </div>
|
||||||
</div>)
|
</div >)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -407,7 +407,6 @@ const Dashbord_Factures_Par_Client = (props) => {
|
||||||
var url = process.env.REACT_APP_API_URL + "myclass/api/TBD_FACTURE_01_Export_Dashbord_To_Excel/" + stored_cookie + "/" + local_dashbord_internal_id + "/" + date_from + "/" + date_to + "/" + local_client_id + "/";
|
var url = process.env.REACT_APP_API_URL + "myclass/api/TBD_FACTURE_01_Export_Dashbord_To_Excel/" + stored_cookie + "/" + local_dashbord_internal_id + "/" + date_from + "/" + date_to + "/" + local_client_id + "/";
|
||||||
|
|
||||||
//console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- selected_id = ", selected_id, " --- url =", url);
|
//console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- selected_id = ", selected_id, " --- url =", url);
|
||||||
console.log(" ### url zzz = ", url);
|
|
||||||
|
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
axios.get(url, { responseType: 'blob', },)
|
axios.get(url, { responseType: 'blob', },)
|
||||||
|
@ -432,6 +431,15 @@ const Dashbord_Factures_Par_Client = (props) => {
|
||||||
const [p_detail_partner_client_id, setp_detail_partner_client_id] = useState("");
|
const [p_detail_partner_client_id, setp_detail_partner_client_id] = useState("");
|
||||||
const [p_detail_partner_client_nom, setp_detail_partner_client_nom] = useState("");
|
const [p_detail_partner_client_nom, setp_detail_partner_client_nom] = useState("");
|
||||||
|
|
||||||
|
|
||||||
|
const New_option_periode = [
|
||||||
|
{ "id": "m0", "label": "Mois en cours", "value": "m0" },
|
||||||
|
{ "id": "m1", "label": "Mois précédant ", "value": "m1" },
|
||||||
|
{ "id": "d", "label": "Choisir des dates", "value": "d" },
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="dashbord_session">
|
<div className="dashbord_session">
|
||||||
{isLoading && <div className="loader-container">
|
{isLoading && <div className="loader-container">
|
||||||
|
@ -441,35 +449,39 @@ const Dashbord_Factures_Par_Client = (props) => {
|
||||||
|
|
||||||
<div style={{ "height": "40rem" }}>
|
<div style={{ "height": "40rem" }}>
|
||||||
|
|
||||||
<div className="div_row">
|
<div style={{ "width": "100%", "float": "left" }}>
|
||||||
<div className="" style={{ "width": "30%" }}>
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
Filtre <br />
|
Filtre <br />
|
||||||
<TextField
|
|
||||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
<Autocomplete
|
||||||
required
|
disablePortal
|
||||||
name="filtre11"
|
name="filtre11"
|
||||||
id="filtre11"
|
id="filtre11"
|
||||||
select
|
|
||||||
InputLabelProps={{
|
|
||||||
shrink: true,
|
|
||||||
}}
|
|
||||||
disabled={false}
|
|
||||||
className="disabled_style"
|
className="disabled_style"
|
||||||
value={filter_value}
|
options={New_option_periode}
|
||||||
onChange={(e) => {
|
onChange={(event, value) => {
|
||||||
setfilter_value(e.target.value);
|
if (value && value.value) {
|
||||||
}
|
setfilter_value(value.value);
|
||||||
}
|
|
||||||
|
} else {
|
||||||
|
setfilter_value("");
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une période"
|
||||||
|
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||||
|
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
>
|
|
||||||
<MenuItem value="m0" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Mois en cours </MenuItem>
|
|
||||||
<MenuItem value="m1" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Mois précédant </MenuItem>
|
|
||||||
<MenuItem value="d" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Choisir des dates </MenuItem>
|
|
||||||
</TextField>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{filter_value && String(filter_value) === "d" && <div>
|
{filter_value && String(filter_value) === "d" &&
|
||||||
<div className="session_caract">
|
|
||||||
|
<div style={{ "width": "100%", "float": "left" }}>
|
||||||
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
|
<div className="session_caract" style={{ "padding": '0px', 'width': '100%' }}>
|
||||||
Date Debut
|
Date Debut
|
||||||
<DatePicker
|
<DatePicker
|
||||||
name="one_sessiondatedebut"
|
name="one_sessiondatedebut"
|
||||||
|
@ -483,14 +495,16 @@ const Dashbord_Factures_Par_Client = (props) => {
|
||||||
}
|
}
|
||||||
showTimeSelect={false}
|
showTimeSelect={false}
|
||||||
dateFormat="dd/MM/yyyy"
|
dateFormat="dd/MM/yyyy"
|
||||||
className="disabled_style session_caract_Dialog_DatePicker"
|
className="disabled_style"
|
||||||
locale='fr-FR'
|
locale='fr-FR'
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="session_caract">
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
|
<div className="session_caract" style={{ "padding": '0px', 'width': '100%' }}>
|
||||||
Date Fin
|
Date Fin
|
||||||
<DatePicker
|
<DatePicker
|
||||||
name="one_sessiondatefin"
|
name="one_sessiondatefin"
|
||||||
|
@ -503,13 +517,16 @@ const Dashbord_Factures_Par_Client = (props) => {
|
||||||
}
|
}
|
||||||
showTimeSelect={false}
|
showTimeSelect={false}
|
||||||
dateFormat="dd/MM/yyyy"
|
dateFormat="dd/MM/yyyy"
|
||||||
className="disabled_style enable_style"
|
className="disabled_style"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<div className="" style={{ "width": "30%" }}>
|
</div>}
|
||||||
|
<div style={{ "width": "100%", "float": "left" }}>
|
||||||
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
Client <br />
|
Client <br />
|
||||||
|
|
||||||
{New_Get_List_Partner_Clients_result && New_Get_List_Partner_Clients_result.length > 0 &&
|
{New_Get_List_Partner_Clients_result && New_Get_List_Partner_Clients_result.length > 0 &&
|
||||||
|
@ -528,18 +545,13 @@ const Dashbord_Factures_Par_Client = (props) => {
|
||||||
if (value && value._id) {
|
if (value && value._id) {
|
||||||
|
|
||||||
setp_detail_partner_client_id(value._id);
|
setp_detail_partner_client_id(value._id);
|
||||||
|
|
||||||
setp_detail_partner_client_nom(value.label);
|
setp_detail_partner_client_nom(value.label);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
setp_detail_partner_client_id("");
|
setp_detail_partner_client_id("");
|
||||||
setp_detail_partner_client_nom("");
|
setp_detail_partner_client_nom("");
|
||||||
}
|
}
|
||||||
|
|
||||||
Getall_Qry_Invoice_Data();
|
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||||
|
@ -550,17 +562,19 @@ const Dashbord_Factures_Par_Client = (props) => {
|
||||||
/>}
|
/>}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>}
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
<div className="div_row">
|
||||||
|
|
||||||
<Button variant="contained" className="bton_enreg" onClick={(e) => {
|
<Button variant="contained" className="bton_enreg" onClick={(e) => {
|
||||||
|
|
||||||
Getall_Qry_Invoice_Data_Group_By_Client();
|
Getall_Qry_Invoice_Data_Group_By_Client();
|
||||||
|
|
||||||
|
|
||||||
}}> Afficher
|
}}> Afficher
|
||||||
</Button><br />
|
</Button><br />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="titre1" style={{ "float": "left", "cursor": "none" }}>
|
<div className="titre1" style={{ "float": "left", "cursor": "none" }}>
|
||||||
<nav style={{ "width": "80%", "float": "left", "textAlign": "center" }}> TBD : {props.user_dashbord_title} - Du : {props.user_dashbord_filter_start} au : {props.user_dashbord_filter_end}</nav>
|
<nav style={{ "width": "80%", "float": "left", "textAlign": "center" }}> TBD : {props.user_dashbord_title} - Du : {props.user_dashbord_filter_start} au : {props.user_dashbord_filter_end}</nav>
|
||||||
|
@ -629,7 +643,7 @@ const Dashbord_Factures_Par_Client = (props) => {
|
||||||
|
|
||||||
<div style={{ "float": "left", "width": "100%", "paddingRight": "5px" }}>
|
<div style={{ "float": "left", "width": "100%", "paddingRight": "5px" }}>
|
||||||
|
|
||||||
<div style={{ "float": "left", "width": String(display_column_size), "height": "42rem", "float": "left", "paddingRight": "5px" }} >
|
<div style={{ "float": "left", "width": String(display_column_size), "float": "left", "paddingRight": "5px" }} >
|
||||||
|
|
||||||
<Box style={{ "color": "black", "height": "30rem" }}>
|
<Box style={{ "color": "black", "height": "30rem" }}>
|
||||||
|
|
||||||
|
|
|
@ -288,9 +288,9 @@ const Dashbord_Factures_Par_Periode = (props) => {
|
||||||
|
|
||||||
|
|
||||||
var local_client_id = "";
|
var local_client_id = "";
|
||||||
if( !p_detail_partner_client_id || String(p_detail_partner_client_id) === ""){
|
if (!p_detail_partner_client_id || String(p_detail_partner_client_id) === "") {
|
||||||
local_client_id = "-"
|
local_client_id = "-"
|
||||||
}else{
|
} else {
|
||||||
local_client_id = p_detail_partner_client_id;
|
local_client_id = p_detail_partner_client_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,7 +298,7 @@ const Dashbord_Factures_Par_Periode = (props) => {
|
||||||
var nom_fichier_cmd_excel = "export_excel.xlsx";
|
var nom_fichier_cmd_excel = "export_excel.xlsx";
|
||||||
//console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- local_dashbord_internal_id = ", local_dashbord_internal_id);
|
//console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- local_dashbord_internal_id = ", local_dashbord_internal_id);
|
||||||
|
|
||||||
var url = process.env.REACT_APP_API_URL + "myclass/api/TBD_FACTURE_01_Export_Dashbord_To_Excel/" + stored_cookie + "/" + local_dashbord_internal_id+"/"+date_from+"/"+date_to+"/"+local_client_id+"/";
|
var url = process.env.REACT_APP_API_URL + "myclass/api/TBD_FACTURE_01_Export_Dashbord_To_Excel/" + stored_cookie + "/" + local_dashbord_internal_id + "/" + date_from + "/" + date_to + "/" + local_client_id + "/";
|
||||||
|
|
||||||
//console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- selected_id = ", selected_id, " --- url =", url);
|
//console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- selected_id = ", selected_id, " --- url =", url);
|
||||||
|
|
||||||
|
@ -420,6 +420,13 @@ const Dashbord_Factures_Par_Periode = (props) => {
|
||||||
const [p_detail_partner_client_id, setp_detail_partner_client_id] = useState("");
|
const [p_detail_partner_client_id, setp_detail_partner_client_id] = useState("");
|
||||||
const [p_detail_partner_client_nom, setp_detail_partner_client_nom] = useState("");
|
const [p_detail_partner_client_nom, setp_detail_partner_client_nom] = useState("");
|
||||||
|
|
||||||
|
const New_option_periode = [
|
||||||
|
{ "id": "m0", "label": "Mois en cours", "value": "m0" },
|
||||||
|
{ "id": "m1", "label": "Mois précédant ", "value": "m1" },
|
||||||
|
{ "id": "d", "label": "Choisir des dates", "value": "d" },
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="dashbord_session">
|
<div className="dashbord_session">
|
||||||
{isLoading && <div className="loader-container">
|
{isLoading && <div className="loader-container">
|
||||||
|
@ -429,35 +436,39 @@ const Dashbord_Factures_Par_Periode = (props) => {
|
||||||
|
|
||||||
<div style={{ "height": "40rem" }}>
|
<div style={{ "height": "40rem" }}>
|
||||||
|
|
||||||
<div className="div_row">
|
<div style={{ "width": "100%", "float": "left" }}>
|
||||||
<div className="" style={{ "width": "30%" }}>
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
Filtre <br />
|
Filtre <br />
|
||||||
<TextField
|
|
||||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
<Autocomplete
|
||||||
required
|
disablePortal
|
||||||
name="filtre11"
|
name="filtre11"
|
||||||
id="filtre11"
|
id="filtre11"
|
||||||
select
|
|
||||||
InputLabelProps={{
|
|
||||||
shrink: true,
|
|
||||||
}}
|
|
||||||
disabled={false}
|
|
||||||
className="disabled_style"
|
className="disabled_style"
|
||||||
value={filter_value}
|
options={New_option_periode}
|
||||||
onChange={(e) => {
|
onChange={(event, value) => {
|
||||||
setfilter_value(e.target.value);
|
if (value && value.value) {
|
||||||
}
|
setfilter_value(value.value);
|
||||||
}
|
|
||||||
|
} else {
|
||||||
|
setfilter_value("");
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une période"
|
||||||
|
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||||
|
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
>
|
|
||||||
<MenuItem value="m0" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Mois en cours </MenuItem>
|
|
||||||
<MenuItem value="m1" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Mois précédant </MenuItem>
|
|
||||||
<MenuItem value="d" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Choisir des dates </MenuItem>
|
|
||||||
</TextField>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{filter_value && String(filter_value) === "d" && <div>
|
{filter_value && String(filter_value) === "d" &&
|
||||||
<div className="session_caract">
|
|
||||||
|
<div style={{ "width": "100%", "float": "left" }}>
|
||||||
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
|
<div className="session_caract" style={{ "padding": '0px', 'width': '100%' }}>
|
||||||
Date Debut
|
Date Debut
|
||||||
<DatePicker
|
<DatePicker
|
||||||
name="one_sessiondatedebut"
|
name="one_sessiondatedebut"
|
||||||
|
@ -471,14 +482,16 @@ const Dashbord_Factures_Par_Periode = (props) => {
|
||||||
}
|
}
|
||||||
showTimeSelect={false}
|
showTimeSelect={false}
|
||||||
dateFormat="dd/MM/yyyy"
|
dateFormat="dd/MM/yyyy"
|
||||||
className="disabled_style session_caract_Dialog_DatePicker"
|
className="disabled_style"
|
||||||
locale='fr-FR'
|
locale='fr-FR'
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="session_caract">
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
|
<div className="session_caract" style={{ "padding": '0px', 'width': '100%' }}>
|
||||||
Date Fin
|
Date Fin
|
||||||
<DatePicker
|
<DatePicker
|
||||||
name="one_sessiondatefin"
|
name="one_sessiondatefin"
|
||||||
|
@ -491,13 +504,16 @@ const Dashbord_Factures_Par_Periode = (props) => {
|
||||||
}
|
}
|
||||||
showTimeSelect={false}
|
showTimeSelect={false}
|
||||||
dateFormat="dd/MM/yyyy"
|
dateFormat="dd/MM/yyyy"
|
||||||
className="disabled_style enable_style"
|
className="disabled_style"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<div className="" style={{ "width": "30%" }}>
|
</div>}
|
||||||
|
<div style={{ "width": "100%", "float": "left" }}>
|
||||||
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
Client <br />
|
Client <br />
|
||||||
|
|
||||||
{New_Get_List_Partner_Clients_result && New_Get_List_Partner_Clients_result.length > 0 &&
|
{New_Get_List_Partner_Clients_result && New_Get_List_Partner_Clients_result.length > 0 &&
|
||||||
|
@ -518,16 +534,11 @@ const Dashbord_Factures_Par_Periode = (props) => {
|
||||||
setp_detail_partner_client_id(value._id);
|
setp_detail_partner_client_id(value._id);
|
||||||
setp_detail_partner_client_nom(value.label);
|
setp_detail_partner_client_nom(value.label);
|
||||||
|
|
||||||
// console.log(" ### setp_detail_partner_client_id = ", p_detail_partner_client_id );
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
setp_detail_partner_client_id("");
|
setp_detail_partner_client_id("");
|
||||||
setp_detail_partner_client_nom("");
|
setp_detail_partner_client_nom("");
|
||||||
}
|
}
|
||||||
|
|
||||||
Getall_Qry_Invoice_Data();
|
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||||
|
@ -538,17 +549,16 @@ const Dashbord_Factures_Par_Periode = (props) => {
|
||||||
/>}
|
/>}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>}
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
<div className="div_row">
|
||||||
|
|
||||||
<Button variant="contained" className="bton_enreg" onClick={(e) => {
|
<Button variant="contained" className="bton_enreg" onClick={(e) => {
|
||||||
Getall_Qry_Invoice_Data();
|
Getall_Qry_Invoice_Data();
|
||||||
//Getall_Qry_Invoice_Data_Group_By_Client();
|
|
||||||
|
|
||||||
}}> Afficher
|
}}> Afficher
|
||||||
</Button><br />
|
</Button><br />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="titre1" style={{ "float": "left", "cursor": "none" }}>
|
<div className="titre1" style={{ "float": "left", "cursor": "none" }}>
|
||||||
<nav style={{ "width": "80%", "float": "left", "textAlign": "center" }}> TBD : {props.user_dashbord_title} - Du : {props.user_dashbord_filter_start} au : {props.user_dashbord_filter_end}</nav>
|
<nav style={{ "width": "80%", "float": "left", "textAlign": "center" }}> TBD : {props.user_dashbord_title} - Du : {props.user_dashbord_filter_start} au : {props.user_dashbord_filter_end}</nav>
|
||||||
|
@ -621,7 +631,7 @@ const Dashbord_Factures_Par_Periode = (props) => {
|
||||||
<div className="session_data">
|
<div className="session_data">
|
||||||
|
|
||||||
|
|
||||||
{p_detail_partner_client_nom && String(p_detail_partner_client_nom) !== "" && " Client : " + p_detail_partner_client_nom }
|
{p_detail_partner_client_nom && String(p_detail_partner_client_nom) !== "" && " Client : " + p_detail_partner_client_nom}
|
||||||
|
|
||||||
{Getall_Qry_Invoice_Data_result_JSON && Getall_Qry_Invoice_Data_result_JSON.length > 0 &&
|
{Getall_Qry_Invoice_Data_result_JSON && Getall_Qry_Invoice_Data_result_JSON.length > 0 &&
|
||||||
Getall_Qry_Invoice_Data_result_JSON[0].data &&
|
Getall_Qry_Invoice_Data_result_JSON[0].data &&
|
||||||
|
@ -636,7 +646,7 @@ const Dashbord_Factures_Par_Periode = (props) => {
|
||||||
|
|
||||||
]}
|
]}
|
||||||
{...chartSetting}
|
{...chartSetting}
|
||||||
margin={{right: 15, left: 100}}
|
margin={{ right: 15, left: 100 }}
|
||||||
|
|
||||||
/>}
|
/>}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -181,7 +181,7 @@ const Dashbord_Inscriptions = (props) => {
|
||||||
|
|
||||||
var tdb_title = "default";
|
var tdb_title = "default";
|
||||||
var filter_val = "";
|
var filter_val = "";
|
||||||
var filter_type_event = "";
|
var local_filter_group_by = "";
|
||||||
|
|
||||||
|
|
||||||
if (document.getElementsByName("tdb_title")[0]) {
|
if (document.getElementsByName("tdb_title")[0]) {
|
||||||
|
@ -196,8 +196,8 @@ const Dashbord_Inscriptions = (props) => {
|
||||||
filter_val = filter_value
|
filter_val = filter_value
|
||||||
}
|
}
|
||||||
|
|
||||||
if (document.getElementsByName("filtre12")[0]) {
|
if (filter_group_by) {
|
||||||
filter_type_event = document.getElementsByName("filtre12")[0].value;
|
local_filter_group_by = filter_group_by;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Si filter_val = "d", alors on va recuperer l'interval de date
|
// Si filter_val = "d", alors on va recuperer l'interval de date
|
||||||
|
@ -215,7 +215,7 @@ const Dashbord_Inscriptions = (props) => {
|
||||||
form.append("dashbord_internal_code", local_dashbord_internal_code);
|
form.append("dashbord_internal_code", local_dashbord_internal_code);
|
||||||
form.append("default_filter", filter_val);
|
form.append("default_filter", filter_val);
|
||||||
form.append("title", tdb_title);
|
form.append("title", tdb_title);
|
||||||
form.append("type_event", filter_type_event);
|
form.append("group_by", local_filter_group_by);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -274,6 +274,7 @@ const Dashbord_Inscriptions = (props) => {
|
||||||
{ "id": "mois", "label": "Mois", "value": "mois" },
|
{ "id": "mois", "label": "Mois", "value": "mois" },
|
||||||
{ "id": "class", "label": "Formation", "value": "class" },
|
{ "id": "class", "label": "Formation", "value": "class" },
|
||||||
{ "id": "session", "label": "Session", "value": "session" },
|
{ "id": "session", "label": "Session", "value": "session" },
|
||||||
|
{ "id": "", "label": "", "value": "" },
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -325,8 +326,8 @@ const Dashbord_Inscriptions = (props) => {
|
||||||
}} />
|
}} />
|
||||||
</a> </div>
|
</a> </div>
|
||||||
|
|
||||||
<div className="div_row">
|
<div style={{ "width": "100%", "float": "left" }}>
|
||||||
<div className="" style={{ "width": "30%" }}>
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
Filtre <br />
|
Filtre <br />
|
||||||
|
|
||||||
<Autocomplete
|
<Autocomplete
|
||||||
|
@ -356,8 +357,10 @@ const Dashbord_Inscriptions = (props) => {
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{filter_value && String(filter_value) === "d" && <div>
|
{filter_value && String(filter_value) === "d" &&
|
||||||
<div className="session_caract">
|
<div style={{ "width": "100%", "float": "left" }}>
|
||||||
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
|
<div className="session_caract" style={{ "padding": '0px', 'width': '100%' }}>
|
||||||
Date Debut
|
Date Debut
|
||||||
<DatePicker
|
<DatePicker
|
||||||
name="one_sessiondatedebut"
|
name="one_sessiondatedebut"
|
||||||
|
@ -371,14 +374,16 @@ const Dashbord_Inscriptions = (props) => {
|
||||||
}
|
}
|
||||||
showTimeSelect={false}
|
showTimeSelect={false}
|
||||||
dateFormat="dd/MM/yyyy"
|
dateFormat="dd/MM/yyyy"
|
||||||
className="disabled_style session_caract_Dialog_DatePicker"
|
className="disabled_style"
|
||||||
locale='fr-FR'
|
locale='fr-FR'
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="session_caract">
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
|
<div className="session_caract" style={{ "padding": '0px', 'width': '100%' }}>
|
||||||
Date Fin
|
Date Fin
|
||||||
<DatePicker
|
<DatePicker
|
||||||
name="one_sessiondatefin"
|
name="one_sessiondatefin"
|
||||||
|
@ -391,14 +396,16 @@ const Dashbord_Inscriptions = (props) => {
|
||||||
}
|
}
|
||||||
showTimeSelect={false}
|
showTimeSelect={false}
|
||||||
dateFormat="dd/MM/yyyy"
|
dateFormat="dd/MM/yyyy"
|
||||||
className="disabled_style enable_style"
|
className="disabled_style"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>}
|
</div>}
|
||||||
<br />
|
<br />
|
||||||
<div className="" style={{ "width": "30%" }}>
|
<div style={{ "width": "100%", "float": "left" }}>
|
||||||
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
Grouper par <br />
|
Grouper par <br />
|
||||||
<Autocomplete
|
<Autocomplete
|
||||||
disablePortal
|
disablePortal
|
||||||
|
@ -406,6 +413,7 @@ const Dashbord_Inscriptions = (props) => {
|
||||||
id="filtre12"
|
id="filtre12"
|
||||||
className="disabled_style"
|
className="disabled_style"
|
||||||
options={New_option_group_by}
|
options={New_option_group_by}
|
||||||
|
value={New_option_group_by.filter((data) => (data).value === String(filter_group_by))[0].label}
|
||||||
onChange={(event, value) => {
|
onChange={(event, value) => {
|
||||||
if (value && value.value) {
|
if (value && value.value) {
|
||||||
setfilter_group_by(value.value);
|
setfilter_group_by(value.value);
|
||||||
|
@ -423,17 +431,17 @@ const Dashbord_Inscriptions = (props) => {
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div className="div_row">
|
||||||
<Button variant="contained" className="bton_enreg" onClick={(e) => {
|
<Button variant="contained" className="bton_enreg" onClick={(e) => {
|
||||||
Getall_Qry_Inscription_Data();
|
Getall_Qry_Inscription_Data();
|
||||||
|
|
||||||
}}> Afficher
|
}}> Afficher
|
||||||
</Button><br />
|
</Button><br />
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,38 @@
|
||||||
import React, { useRef, useState, useEffect } from "react";
|
import React, { useRef, useState, useEffect } from "react";
|
||||||
|
import TextField from '@mui/material/TextField';
|
||||||
|
import MenuItem from '@mui/material/MenuItem';
|
||||||
import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css
|
import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css
|
||||||
|
import Button from '@mui/material/Button';
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { getCookie, setCookie } from 'react-use-cookie';
|
import { getCookie, setCookie } from 'react-use-cookie';
|
||||||
import { useHistory } from "react-router-dom";
|
import { useHistory } from "react-router-dom";
|
||||||
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
|
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
|
||||||
import 'react-tooltip/dist/react-tooltip.css'
|
import 'react-tooltip/dist/react-tooltip.css'
|
||||||
import { Tooltip } from 'react-tooltip'
|
import { Tooltip } from 'react-tooltip'
|
||||||
import fileDownload from 'js-file-download'
|
|
||||||
import Popup from 'reactjs-popup';
|
|
||||||
import 'reactjs-popup/dist/index.css';
|
import 'reactjs-popup/dist/index.css';
|
||||||
|
import DatePicker from "react-datepicker";
|
||||||
import "react-datepicker/dist/react-datepicker.css";
|
import "react-datepicker/dist/react-datepicker.css";
|
||||||
|
import { format } from 'date-fns'
|
||||||
|
import moment from "moment";
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
|
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
|
||||||
import { tokens } from "../theme";
|
|
||||||
import { MdDeleteForever } from "react-icons/md";
|
|
||||||
import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid';
|
import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid';
|
||||||
|
import { tokens } from "./../theme";
|
||||||
|
import { MdOutlineAddchart, } from "react-icons/md";
|
||||||
import {
|
import {
|
||||||
useTheme,
|
useTheme,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
|
import Autocomplete from '@mui/material/Autocomplete';
|
||||||
|
import { ResponsivePie } from '@nivo/pie'
|
||||||
import { ResponsiveBar } from "@nivo/bar";
|
import { ResponsiveBar } from "@nivo/bar";
|
||||||
|
|
||||||
|
import { TbColumns2, TbColumns1 } from "react-icons/tb";
|
||||||
|
import { BarChart } from '@mui/x-charts';
|
||||||
|
import { axisClasses } from '@mui/x-charts';
|
||||||
|
import { pieArcLabelClasses } from '@mui/x-charts/PieChart';
|
||||||
|
import Popup from 'reactjs-popup';
|
||||||
|
import 'reactjs-popup/dist/index.css';
|
||||||
|
import { MdDeleteForever } from "react-icons/md";
|
||||||
import { RiFileExcel2Line } from "react-icons/ri";
|
import { RiFileExcel2Line } from "react-icons/ri";
|
||||||
|
|
||||||
const Dashbord_Inscriptions_all_inscriptions = (props) => {
|
const Dashbord_Inscriptions_all_inscriptions = (props) => {
|
||||||
|
@ -35,7 +47,6 @@ const Dashbord_Inscriptions_all_inscriptions = (props) => {
|
||||||
var date_today_90j = new Date();
|
var date_today_90j = new Date();
|
||||||
date_today_90j.setDate(date_today_90j.getDate() - 90);
|
date_today_90j.setDate(date_today_90j.getDate() - 90);
|
||||||
const [selectionModel, setSelectionModel] = React.useState([]);
|
const [selectionModel, setSelectionModel] = React.useState([]);
|
||||||
const [user_dashbord_id, setuser_dashbord_id] = useState(props.user_dashbord_id);
|
|
||||||
|
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
|
@ -80,6 +91,8 @@ const Dashbord_Inscriptions_all_inscriptions = (props) => {
|
||||||
|
|
||||||
const [filter_type_tache, setfilter_type_tache] = useState("");
|
const [filter_type_tache, setfilter_type_tache] = useState("");
|
||||||
|
|
||||||
|
const [filter_group_by, setfilter_group_by] = useState("");
|
||||||
|
|
||||||
const [tdb_title, settdb_title] = useState();
|
const [tdb_title, settdb_title] = useState();
|
||||||
|
|
||||||
const [display_nb_column, setdisplay_nb_column] = useState("1");
|
const [display_nb_column, setdisplay_nb_column] = useState("1");
|
||||||
|
@ -89,6 +102,7 @@ const Dashbord_Inscriptions_all_inscriptions = (props) => {
|
||||||
const [gridline_id, setgridline_id] = useState("");
|
const [gridline_id, setgridline_id] = useState("");
|
||||||
|
|
||||||
const [Getall_Qry_Inscription_Data_result_JSON, setGetall_Qry_Inscription_Data_result_JSON] = useState([]);
|
const [Getall_Qry_Inscription_Data_result_JSON, setGetall_Qry_Inscription_Data_result_JSON] = useState([]);
|
||||||
|
|
||||||
const [Getall_Qry_Inscription_Data_api, setGetall_Qry_Inscription_Data_api] = useState();
|
const [Getall_Qry_Inscription_Data_api, setGetall_Qry_Inscription_Data_api] = useState();
|
||||||
const [Getall_Qry_Inscription_Data_message, setGetall_Qry_Inscription_Data_message] = useState();
|
const [Getall_Qry_Inscription_Data_message, setGetall_Qry_Inscription_Data_message] = useState();
|
||||||
const [Getall_Qry_Inscription_Data_result, setGetall_Qry_Inscription_Data_result] = useState([]);
|
const [Getall_Qry_Inscription_Data_result, setGetall_Qry_Inscription_Data_result] = useState([]);
|
||||||
|
@ -116,9 +130,15 @@ const Dashbord_Inscriptions_all_inscriptions = (props) => {
|
||||||
form.append("filter_value", filter_value);
|
form.append("filter_value", filter_value);
|
||||||
|
|
||||||
|
|
||||||
console.log(' #### Get_Qery_Inscription_By_Session_By_Periode form = ', form);
|
console.log(" LAAA filter_group_by = ", filter_group_by)
|
||||||
|
|
||||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_Inscription_By_Session_By_Periode/";
|
var myurl = "";
|
||||||
|
if (String(filter_group_by) === "class")
|
||||||
|
myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_Inscription_Group_By_Class/";
|
||||||
|
else if (String(filter_group_by) === "session")
|
||||||
|
myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_Inscription_Group_By_Session/";
|
||||||
|
else
|
||||||
|
myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_Inscription_By_Session_By_Periode/";
|
||||||
|
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
axios.post(myurl, form).then(res => {
|
axios.post(myurl, form).then(res => {
|
||||||
|
@ -131,6 +151,8 @@ const Dashbord_Inscriptions_all_inscriptions = (props) => {
|
||||||
|
|
||||||
var jsonObj = JSON.parse('[' + res.data.message + ']');
|
var jsonObj = JSON.parse('[' + res.data.message + ']');
|
||||||
|
|
||||||
|
//console.log(" ### jsonObj = ", jsonObj)
|
||||||
|
|
||||||
setGetall_Qry_Inscription_Data_api("true");
|
setGetall_Qry_Inscription_Data_api("true");
|
||||||
setGetall_Qry_Inscription_Data_result(res.data.message);
|
setGetall_Qry_Inscription_Data_result(res.data.message);
|
||||||
|
|
||||||
|
@ -152,54 +174,6 @@ const Dashbord_Inscriptions_all_inscriptions = (props) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const [Remove_From_User_TBD_api, setRemove_From_User_TBD_api] = useState();
|
|
||||||
const [Remove_From_User_TBD_message, setRemove_From_User_TBD_message] = useState();
|
|
||||||
const [Remove_From_User_TBD_result, setRemove_From_User_TBD_result] = useState();
|
|
||||||
function Remove_From_User_TBD() {
|
|
||||||
|
|
||||||
var form = new FormData();
|
|
||||||
const stored_cookie = getCookie('tokenmysypart');
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
form.append("token", stored_cookie);
|
|
||||||
form.append("user_dashbord_id", user_dashbord_id);
|
|
||||||
|
|
||||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Delete_To_User_Dashbord/";
|
|
||||||
|
|
||||||
//console.log(" ## myurl = ", myurl);
|
|
||||||
|
|
||||||
setLoading(true);
|
|
||||||
axios.post(myurl, form).then(res => {
|
|
||||||
setLoading(false);
|
|
||||||
if (String(res.data.status) === String("true")) {
|
|
||||||
//console.log(" In Remove_From_User_TBD res.data.status = " + res.data.status);
|
|
||||||
//console.log(" In Remove_From_User_TBD res.data.message r_class = " + res.data.message);
|
|
||||||
|
|
||||||
setRemove_From_User_TBD_api("true");
|
|
||||||
setRemove_From_User_TBD_result(res.data.message);
|
|
||||||
Getall_Qry_Inscription_Data();
|
|
||||||
alert(res.data.message);
|
|
||||||
window.location.reload();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
setRemove_From_User_TBD_api("false");
|
|
||||||
setRemove_From_User_TBD_message(res.data.message);
|
|
||||||
alert(res.data.message)
|
|
||||||
}
|
|
||||||
|
|
||||||
}).catch((error) => {
|
|
||||||
setLoading(false);
|
|
||||||
console.warn('Not good man :( Remove_From_User_TBD = ', error);
|
|
||||||
setRemove_From_User_TBD_api("false");
|
|
||||||
alert("Impossible de supprimer le tableau de bord de votre liste");
|
|
||||||
//setmyApimyApiMessage("")
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const [Add_To_User_TBD_api, setAdd_To_User_TBD_api] = useState();
|
const [Add_To_User_TBD_api, setAdd_To_User_TBD_api] = useState();
|
||||||
const [Add_To_User_TBD_message, setAdd_To_User_TBD_message] = useState();
|
const [Add_To_User_TBD_message, setAdd_To_User_TBD_message] = useState();
|
||||||
const [Add_To_User_TBD_result, setAdd_To_User_TBD_result] = useState();
|
const [Add_To_User_TBD_result, setAdd_To_User_TBD_result] = useState();
|
||||||
|
@ -212,19 +186,23 @@ const Dashbord_Inscriptions_all_inscriptions = (props) => {
|
||||||
|
|
||||||
var tdb_title = "default";
|
var tdb_title = "default";
|
||||||
var filter_val = "";
|
var filter_val = "";
|
||||||
var filter_type_event = "";
|
var local_filter_group_by = "";
|
||||||
|
|
||||||
|
|
||||||
if (document.getElementsByName("tdb_title")[0]) {
|
if (document.getElementsByName("tdb_title")[0]) {
|
||||||
tdb_title = document.getElementsByName("tdb_title")[0].value;
|
tdb_title = document.getElementsByName("tdb_title")[0].value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
if (document.getElementsByName("filtre11")[0]) {
|
if (document.getElementsByName("filtre11")[0]) {
|
||||||
filter_val = document.getElementsByName("filtre11")[0].value;
|
filter_val = document.getElementsByName("filtre11")[0].value;
|
||||||
|
}*/
|
||||||
|
if (filter_value) {
|
||||||
|
filter_val = filter_value
|
||||||
}
|
}
|
||||||
|
|
||||||
if (document.getElementsByName("filtre12")[0]) {
|
if (filter_group_by) {
|
||||||
filter_type_event = document.getElementsByName("filtre12")[0].value;
|
local_filter_group_by = filter_group_by;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Si filter_val = "d", alors on va recuperer l'interval de date
|
// Si filter_val = "d", alors on va recuperer l'interval de date
|
||||||
|
@ -242,7 +220,7 @@ const Dashbord_Inscriptions_all_inscriptions = (props) => {
|
||||||
form.append("dashbord_internal_code", local_dashbord_internal_code);
|
form.append("dashbord_internal_code", local_dashbord_internal_code);
|
||||||
form.append("default_filter", filter_val);
|
form.append("default_filter", filter_val);
|
||||||
form.append("title", tdb_title);
|
form.append("title", tdb_title);
|
||||||
form.append("type_event", filter_type_event);
|
form.append("group_by", local_filter_group_by);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -279,15 +257,12 @@ const Dashbord_Inscriptions_all_inscriptions = (props) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const [event_type_filter, setevent_type_filter] = useState(props.user_dashbord_filter_type_envent);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
||||||
console.log(" &&&& props.user_dashbord_filter_end = ", props.user_dashbord_filter_end);
|
|
||||||
|
|
||||||
setp_filter_date_from(props.user_dashbord_filter_start);
|
setp_filter_date_from(props.user_dashbord_filter_start);
|
||||||
setp_filter_date_to(props.user_dashbord_filter_end);
|
setp_filter_date_to(props.user_dashbord_filter_end);
|
||||||
setevent_type_filter(props.user_dashbord_filter_type_envent);
|
setfilter_group_by(props.user_dashbord_filter_group_by);
|
||||||
|
|
||||||
|
|
||||||
Getall_Qry_Inscription_Data();
|
Getall_Qry_Inscription_Data();
|
||||||
|
|
||||||
|
@ -299,17 +274,128 @@ const Dashbord_Inscriptions_all_inscriptions = (props) => {
|
||||||
}, [p_filter_date_from, p_filter_date_to])
|
}, [p_filter_date_from, p_filter_date_to])
|
||||||
|
|
||||||
|
|
||||||
|
const New_option_periode = [
|
||||||
|
{ "id": "m0", "label": "Mois en cours", "value": "m0" },
|
||||||
|
{ "id": "m1", "label": "Mois précédant ", "value": "m1" },
|
||||||
|
{ "id": "d", "label": "Choisir des dates", "value": "d" },
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
const New_option_group_by = [
|
||||||
|
{ "id": "mois", "label": "Mois", "value": "mois" },
|
||||||
|
{ "id": "class", "label": "Formation", "value": "class" },
|
||||||
|
{ "id": "session", "label": "Session", "value": "session" },
|
||||||
|
{ "id": "", "label": "", "value": "" },
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
const valueFormatter_count = (value) => `${value} Insc`;
|
||||||
|
|
||||||
|
const chartSetting = {
|
||||||
|
yAxis: [
|
||||||
|
{
|
||||||
|
label: " Nombre d'inscription ",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
width: 1000,
|
||||||
|
height: 400,
|
||||||
|
sx: {
|
||||||
|
[`.${axisClasses.left} .${axisClasses.label}`]: {
|
||||||
|
transform: 'translate(-20px, 0)',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
margin: 100,
|
||||||
|
};
|
||||||
|
|
||||||
|
const [user_dashbord_id, setuser_dashbord_id] = useState(props.user_dashbord_id);
|
||||||
|
|
||||||
|
const [Remove_From_User_TBD_api, setRemove_From_User_TBD_api] = useState();
|
||||||
|
const [Remove_From_User_TBD_message, setRemove_From_User_TBD_message] = useState();
|
||||||
|
const [Remove_From_User_TBD_result, setRemove_From_User_TBD_result] = useState();
|
||||||
|
function Remove_From_User_TBD() {
|
||||||
|
|
||||||
|
var form = new FormData();
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
form.append("token", stored_cookie);
|
||||||
|
form.append("user_dashbord_id", user_dashbord_id);
|
||||||
|
|
||||||
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Delete_To_User_Dashbord/";
|
||||||
|
|
||||||
|
//console.log(" ## myurl = ", myurl);
|
||||||
|
|
||||||
|
setLoading(true);
|
||||||
|
axios.post(myurl, form).then(res => {
|
||||||
|
setLoading(false);
|
||||||
|
if (String(res.data.status) === String("true")) {
|
||||||
|
//console.log(" In Remove_From_User_TBD res.data.status = " + res.data.status);
|
||||||
|
//console.log(" In Remove_From_User_TBD res.data.message r_class = " + res.data.message);
|
||||||
|
|
||||||
|
setRemove_From_User_TBD_api("true");
|
||||||
|
setRemove_From_User_TBD_result(res.data.message);
|
||||||
|
// Getall_Qry_Formation_Session();
|
||||||
|
alert(res.data.message);
|
||||||
|
window.location.reload();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setRemove_From_User_TBD_api("false");
|
||||||
|
setRemove_From_User_TBD_message(res.data.message);
|
||||||
|
alert(res.data.message)
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch((error) => {
|
||||||
|
setLoading(false);
|
||||||
|
console.warn('Not good man :( Remove_From_User_TBD = ', error);
|
||||||
|
setRemove_From_User_TBD_api("false");
|
||||||
|
alert("Impossible de supprimer le tableau de bord de votre liste");
|
||||||
|
//setmyApimyApiMessage("")
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function Export_Dashbord_to_CSV(local_dashbord_internal_id) {
|
function Export_Dashbord_to_CSV(local_dashbord_internal_id) {
|
||||||
|
|
||||||
|
|
||||||
|
alert(" Cette fontion sera bientot disponible ");
|
||||||
|
return;
|
||||||
|
/*
|
||||||
const stored_cookie = getCookie('tokenmysypart');
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
|
||||||
var nom_fichier_cmd = "export_csv.csv";
|
var date_from = "";
|
||||||
|
if (p_filter_date_from) {
|
||||||
|
date_from = p_filter_date_from;
|
||||||
|
date_from = date_from.replaceAll('/', "-")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var date_to = "";
|
||||||
|
if (p_filter_date_to) {
|
||||||
|
date_to = p_filter_date_to;
|
||||||
|
date_to = date_to.replaceAll('/', "-")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var local_client_id = "";
|
||||||
|
if (!p_detail_partner_client_id || String(p_detail_partner_client_id) === "") {
|
||||||
|
local_client_id = "-"
|
||||||
|
} else {
|
||||||
|
local_client_id = p_detail_partner_client_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(" #### p_detail_partner_client_id = ", p_detail_partner_client_id, " ### local_client_id = ", local_client_id)
|
||||||
|
var nom_fichier_cmd_excel = "export_excel.xlsx";
|
||||||
//console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- local_dashbord_internal_id = ", local_dashbord_internal_id);
|
//console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- local_dashbord_internal_id = ", local_dashbord_internal_id);
|
||||||
|
|
||||||
var url = process.env.REACT_APP_API_URL + "myclass/api/TBD_Inscription_Export_Dashbord_To_Csv/" + stored_cookie + "/" + local_dashbord_internal_id;
|
var url = process.env.REACT_APP_API_URL + "myclass/api/TBD_FACTURE_01_Export_Dashbord_To_Excel/" + stored_cookie + "/" + local_dashbord_internal_id + "/" + date_from + "/" + date_to + "/" + local_client_id + "/";
|
||||||
|
|
||||||
//console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- selected_id = ", selected_id, " --- url =", url);
|
//console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- selected_id = ", selected_id, " --- url =", url);
|
||||||
|
|
||||||
|
console.log(" #### url = ", url)
|
||||||
|
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
axios.get(url, { responseType: 'blob', },)
|
axios.get(url, { responseType: 'blob', },)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
@ -318,7 +404,7 @@ const Dashbord_Inscriptions_all_inscriptions = (props) => {
|
||||||
if (String(res.data) === String("false")) {
|
if (String(res.data) === String("false")) {
|
||||||
alert("Impossible d'exporter les données (2) ");
|
alert("Impossible d'exporter les données (2) ");
|
||||||
} else {
|
} else {
|
||||||
fileDownload(res.data, nom_fichier_cmd)
|
fileDownload(res.data, nom_fichier_cmd_excel)
|
||||||
|
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
|
@ -327,18 +413,142 @@ const Dashbord_Inscriptions_all_inscriptions = (props) => {
|
||||||
alert(" Impossible d'exporter les données ")
|
alert(" Impossible d'exporter les données ")
|
||||||
|
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="dashbord_session">
|
<div className="dashbord_session">
|
||||||
{isLoading && <div className="loader-container">
|
{isLoading && <div className="loader-container">
|
||||||
<div className="mysy_spinner"> <img src={img_loading_spin} /> </div>
|
<div className="mysy_spinner"> <img src={img_loading_spin} /> </div>
|
||||||
</div>}
|
</div>}
|
||||||
<div>
|
<div style={{ "width": "100%", "float": "left" }}>
|
||||||
<div style={{ "height": "40rem" }}>
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
|
Filtre <br />
|
||||||
|
|
||||||
|
<Autocomplete
|
||||||
|
disablePortal
|
||||||
|
name="filtre11"
|
||||||
|
id="filtre11"
|
||||||
|
className="disabled_style"
|
||||||
|
options={New_option_periode}
|
||||||
|
onChange={(event, value) => {
|
||||||
|
if (value && value.value) {
|
||||||
|
setfilter_value(value.value);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
setfilter_value("");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une période"
|
||||||
|
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||||
|
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{filter_value && String(filter_value) === "d" &&
|
||||||
|
<div style={{ "width": "100%", "float": "left" }}>
|
||||||
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
|
<div className="session_caract" style={{ "padding": '0px', 'width': '100%' }}>
|
||||||
|
Date Debut
|
||||||
|
<DatePicker
|
||||||
|
name="one_sessiondatedebut"
|
||||||
|
id="one_sessiondatedebut"
|
||||||
|
|
||||||
|
selected={new Date(moment(p_filter_date_from, "DD/MM/YYYY"))}
|
||||||
|
onChange={(date) => {
|
||||||
|
setp_filter_date_from(format(date, 'dd/MM/yyyy'));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
showTimeSelect={false}
|
||||||
|
dateFormat="dd/MM/yyyy"
|
||||||
|
className="disabled_style"
|
||||||
|
locale='fr-FR'
|
||||||
|
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
|
<div className="session_caract" style={{ "padding": '0px', 'width': '100%' }}>
|
||||||
|
Date Fin
|
||||||
|
<DatePicker
|
||||||
|
name="one_sessiondatefin"
|
||||||
|
id="one_sessiondatefin"
|
||||||
|
selected={new Date(moment(p_filter_date_to, "DD/MM/YYYY"))}
|
||||||
|
onChange={(date) => {
|
||||||
|
setp_filter_date_to(format(date, 'dd/MM/yyyy'));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
showTimeSelect={false}
|
||||||
|
dateFormat="dd/MM/yyyy"
|
||||||
|
className="disabled_style"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>}
|
||||||
|
<br />
|
||||||
|
<div style={{ "width": "100%", "float": "left" }}>
|
||||||
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
|
Grouper par <br />
|
||||||
|
<Autocomplete
|
||||||
|
disablePortal
|
||||||
|
name="filtre12"
|
||||||
|
id="filtre12"
|
||||||
|
className="disabled_style"
|
||||||
|
options={New_option_group_by}
|
||||||
|
value={New_option_group_by.filter((data) => (data).value === String(filter_group_by))[0].label}
|
||||||
|
onChange={(event, value) => {
|
||||||
|
if (value && value.value) {
|
||||||
|
setfilter_group_by(value.value);
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
setfilter_group_by("");
|
||||||
|
}
|
||||||
|
|
||||||
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} label="" placeholder="Grouper par"
|
||||||
|
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||||
|
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div className="div_row">
|
||||||
|
<Button variant="contained" className="bton_enreg" onClick={(e) => {
|
||||||
|
Getall_Qry_Inscription_Data();
|
||||||
|
|
||||||
|
}}> Afficher
|
||||||
|
</Button><br />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div style={{ "float": "left", "width": "100%", "paddingRight": "5px" }}>
|
||||||
|
|
||||||
|
|
||||||
|
<div style={{ "float": "left", "width": String(display_column_size), "float": "left", "paddingRight": "5px" }} >
|
||||||
<div className="titre1" style={{ "float": "left", "cursor": "none" }}>
|
<div className="titre1" style={{ "float": "left", "cursor": "none" }}>
|
||||||
<nav style={{ "width": "80%", "float": "left", "textAlign": "center" }}> TBD : {props.user_dashbord_title} - Du : {props.user_dashbord_filter_start} au : {props.user_dashbord_filter_end}</nav>
|
<nav style={{ "width": "80%", "float": "left", "textAlign": "center" }}> TBD : {props.user_dashbord_title} - Du : {props.user_dashbord_filter_start} au : {props.user_dashbord_filter_end}</nav>
|
||||||
|
|
||||||
<Tooltip className="tooltip_css" id="my-tooltip02" style={{ "fontSize": "12px" }} />
|
<Tooltip className="tooltip_css" id="my-tooltip02" style={{ "fontSize": "12px" }} />
|
||||||
<a data-tooltip-id="my-tooltip02" data-tooltip-html="Supprimer de ma liste de TBD">
|
<a data-tooltip-id="my-tooltip02" data-tooltip-html="Supprimer de ma liste de TBD">
|
||||||
<Popup
|
<Popup
|
||||||
|
@ -401,165 +611,57 @@ const Dashbord_Inscriptions_all_inscriptions = (props) => {
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{tdb_title && String(tdb_title) === "3" && <nav> Donnez un titre <TextField
|
||||||
|
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||||
|
required
|
||||||
|
name="tdb_title"
|
||||||
|
id="tdb_title"
|
||||||
|
text
|
||||||
|
|
||||||
|
InputLabelProps={{
|
||||||
|
shrink: true,
|
||||||
|
}}
|
||||||
|
disabled={false}
|
||||||
|
className="disabled_style"
|
||||||
|
|
||||||
|
|
||||||
|
/>
|
||||||
|
<nav style={{ "textAlign": "center" }}> <button onClick={(event) => {
|
||||||
|
setdashbord_internal_code("RESSOURCES_HUMAINES_01")
|
||||||
|
Add_To_User_TBD("tbd_inscription_01");
|
||||||
|
|
||||||
|
}}> Ajouter </button> <button onClick={(e) => settdb_title("0")}> Fermer </button>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
</nav>}
|
||||||
<Box style={{ "color": "black", "height": "30rem" }}>
|
<Box style={{ "color": "black", "height": "30rem" }}>
|
||||||
|
|
||||||
|
|
||||||
<div className="session_data">
|
<div className="session_data">
|
||||||
<div style={{ "border": "None" }}>
|
|
||||||
|
|
||||||
<div style={{ height: 550, width: '100%', paddingRight: '5px' }}>
|
{Getall_Qry_Inscription_Data_result_JSON && Getall_Qry_Inscription_Data_result_JSON.length > 0 &&
|
||||||
|
Getall_Qry_Inscription_Data_result_JSON[0].data &&
|
||||||
<Box
|
<BarChart
|
||||||
sx={{
|
|
||||||
height: 500,
|
dataset={Getall_Qry_Inscription_Data_result_JSON[0].data}
|
||||||
width: '100%',
|
xAxis={[{ scaleType: 'band', dataKey: 'label', tickPlacement: 'middle' }]}
|
||||||
paddingRight: '1px',
|
series={[
|
||||||
'& .cell--inscrit': {
|
|
||||||
backgroundColor: '#2ECC71',
|
{ dataKey: 'count', label: 'Count', valueFormatter_count },
|
||||||
color: '#1a3e72',
|
|
||||||
fontWeight: 'bold',
|
]}
|
||||||
},
|
{...chartSetting}
|
||||||
'& .cell--preinscrit': {
|
margin={{ right: 15, left: 100 }}
|
||||||
backgroundColor: '#F7DC6F',
|
|
||||||
color: '#1a3e72',
|
|
||||||
fontWeight: 'light',
|
|
||||||
},
|
|
||||||
'& .cell--encours': {
|
|
||||||
backgroundColor: '#D2B4DE',
|
|
||||||
color: '#1a3e72',
|
|
||||||
fontWeight: 'light',
|
|
||||||
},
|
|
||||||
'& .cell--annule': {
|
|
||||||
backgroundColor: '#ABB2B9',
|
|
||||||
color: '#1a3e72',
|
|
||||||
fontWeight: 'light',
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
"& .MuiDataGrid-columnHeaders": {
|
/>}
|
||||||
backgroundColor: "#c8cfd5",
|
</div>
|
||||||
color: "black",
|
|
||||||
fontSize: 14
|
|
||||||
},
|
|
||||||
|
|
||||||
'& .line--statut--selected': {
|
|
||||||
backgroundColor: '#FBF2EF',
|
|
||||||
color: 'black',
|
|
||||||
},
|
|
||||||
'& .line--statut--pair': {
|
|
||||||
backgroundColor: 'rgba(235, 235, 235, .7)',
|
|
||||||
color: 'black',
|
|
||||||
},
|
|
||||||
'& .line--statut--impair': {
|
|
||||||
backgroundColor: '#FFFFFF',
|
|
||||||
color: 'black',
|
|
||||||
},
|
|
||||||
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<DataGrid
|
|
||||||
checkboxSelection
|
|
||||||
|
|
||||||
onSelectionModelChange={(newSelectionModel) => {
|
|
||||||
setSelectionModel(newSelectionModel);
|
|
||||||
/*if (newSelectionModel.length === 1)
|
|
||||||
handleClick_edit_session_From_Line(newSelectionModel);*/
|
|
||||||
if (newSelectionModel.length !== 1) {
|
|
||||||
/* setaddOneParticipant();
|
|
||||||
setdisplay_detail_insc();
|
|
||||||
setselected_code_session();
|
|
||||||
setsubmenu();*/
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
selectionModel={selectionModel}
|
|
||||||
|
|
||||||
localeText={frFR.components.MuiDataGrid.defaultProps.localeText}
|
|
||||||
rows={Getall_Qry_Inscription_Data_result.map((item, index) => (
|
|
||||||
{
|
|
||||||
id: index,
|
|
||||||
_id: JSON.parse(item)._id,
|
|
||||||
civilite: JSON.parse(item).civilite,
|
|
||||||
nom: JSON.parse(item).nom,
|
|
||||||
prenom: JSON.parse(item).prenom,
|
|
||||||
email: JSON.parse(item).email,
|
|
||||||
telephone: JSON.parse(item).telephone,
|
|
||||||
session_class_title: JSON.parse(item).session_class_title,
|
|
||||||
session_code_session: JSON.parse(item).session_code_session,
|
|
||||||
session_date_debut: JSON.parse(item).session_date_debut,
|
|
||||||
session_date_fin: JSON.parse(item).session_date_fin,
|
|
||||||
session_distantiel: JSON.parse(item).session_distantiel,
|
|
||||||
session_presentiel: JSON.parse(item).session_presentiel,
|
|
||||||
inscription_status: JSON.parse(item).inscription_status,
|
|
||||||
apprenant_id: JSON.parse(item).apprenant_id,
|
|
||||||
|
|
||||||
}
|
|
||||||
))}
|
|
||||||
|
|
||||||
columns={columns}
|
|
||||||
pageSize={20}
|
|
||||||
className="datagridclass"
|
|
||||||
|
|
||||||
onRowDoubleClick={(newSelectionModel) => {
|
|
||||||
|
|
||||||
}}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
rowsPerPageOptions={[20]}
|
|
||||||
disableSelectionOnClick
|
|
||||||
components={{
|
|
||||||
Toolbar: GridToolbar,
|
|
||||||
}}
|
|
||||||
//sx={datagridSx}
|
|
||||||
getCellClassName={(params) => {
|
|
||||||
|
|
||||||
if (params.field === 'inscription_status' && String(params.value) === "-1") {
|
|
||||||
return 'cell--annule';
|
|
||||||
}
|
|
||||||
if (params.field === "inscription_status" && String(params.value) == "0") {
|
|
||||||
return 'cell--preinscrit';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (params.field === "inscription_status" && String(params.value) == "1") {
|
|
||||||
return 'cell--inscrit';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (params.field === "inscription_status" && String(params.value) == "2") {
|
|
||||||
return '.cell--encours';
|
|
||||||
}
|
|
||||||
|
|
||||||
}}
|
|
||||||
|
|
||||||
getRowClassName={(params) => {
|
|
||||||
|
|
||||||
// Pour la gestion de la couleur de zone double cliquée
|
|
||||||
if (String(params.row.id) === String(gridline_id)) {
|
|
||||||
|
|
||||||
return 'line--statut--selected';
|
|
||||||
}
|
|
||||||
else if (parseInt(String(params.row.id)) % 2 === 0) {
|
|
||||||
return 'line--statut--pair';
|
|
||||||
}
|
|
||||||
else if (parseInt(String(params.row.id)) % 2 !== 0) {
|
|
||||||
return 'line--statut--impair';
|
|
||||||
}
|
|
||||||
|
|
||||||
}}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
</Box>
|
</Box>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</Box>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -298,8 +298,6 @@ const Dashbord_Ressources_Humaines_Tache_by_rhid = (props) => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
||||||
setp_filter_date_from(props.user_dashbord_filter_start);
|
setp_filter_date_from(props.user_dashbord_filter_start);
|
||||||
|
|
||||||
|
|
||||||
setp_filter_date_to(props.user_dashbord_filter_end);
|
setp_filter_date_to(props.user_dashbord_filter_end);
|
||||||
setevent_type_filter(props.user_dashbord_filter_type_envent);
|
setevent_type_filter(props.user_dashbord_filter_type_envent);
|
||||||
|
|
||||||
|
|
|
@ -24,10 +24,10 @@ import Dashbord_Session_Repartition_Fteur from "./Dashbord_Session_Repartition_F
|
||||||
import Dashbord_Formation_Evol_Session from "./Dashbord_Formation_Evol_Session";
|
import Dashbord_Formation_Evol_Session from "./Dashbord_Formation_Evol_Session";
|
||||||
import Dashbord_Ressources_Humaines_Tache_by_rhid from "./Dashbord_Ressources_Humaines_Tache_by_rhid";
|
import Dashbord_Ressources_Humaines_Tache_by_rhid from "./Dashbord_Ressources_Humaines_Tache_by_rhid";
|
||||||
import Dashbord_Ressources_Humaines_Tache_Couts from "./Dashbord_Ressources_Humaines_Tache_Couts";
|
import Dashbord_Ressources_Humaines_Tache_Couts from "./Dashbord_Ressources_Humaines_Tache_Couts";
|
||||||
import Dashbord_Inscriptions_all_inscriptions from "./Dashbord_Inscription_All_Inscription";
|
|
||||||
import Dashbord_Factures_Par_Periode from "./Dashbord_Factures_Par_Periode";
|
import Dashbord_Factures_Par_Periode from "./Dashbord_Factures_Par_Periode";
|
||||||
import Dashbord_Factures_Par_Client from "./Dashbord_Factures_Par_Client";
|
import Dashbord_Factures_Par_Client from "./Dashbord_Factures_Par_Client";
|
||||||
import Dashbord_Factures_Devis_Par_Periode from "./Dashbord_Factures_Devis_Par_Periode";
|
import Dashbord_Factures_Devis_Par_Periode from "./Dashbord_Factures_Devis_Par_Periode";
|
||||||
|
import Dashbord_Inscriptions_all_inscriptions from "./Dashbord_Inscription_All_Inscription";
|
||||||
|
|
||||||
import { TbColumns2, TbColumns1 } from "react-icons/tb";
|
import { TbColumns2, TbColumns1 } from "react-icons/tb";
|
||||||
|
|
||||||
|
@ -94,8 +94,8 @@ const Mon_Tableau_De_Bord = (props) => {
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
|
||||||
const [display_nb_column, setdisplay_nb_column] = useState("2");
|
const [display_nb_column, setdisplay_nb_column] = useState("1");
|
||||||
const [display_column_size, setdisplay_column_size] = useState("49%");
|
const [display_column_size, setdisplay_column_size] = useState("98%");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mon_tableau_de_bord">
|
<div className="mon_tableau_de_bord">
|
||||||
|
@ -118,49 +118,82 @@ const Mon_Tableau_De_Bord = (props) => {
|
||||||
<a data-tooltip-id="my_tooltip_2_col" data-tooltip-html="Affichage sur deux colonnes">
|
<a data-tooltip-id="my_tooltip_2_col" data-tooltip-html="Affichage sur deux colonnes">
|
||||||
<TbColumns2 style={{ "cursor": "pointer" }} onClick={(e) => {
|
<TbColumns2 style={{ "cursor": "pointer" }} onClick={(e) => {
|
||||||
setdisplay_nb_column("2");
|
setdisplay_nb_column("2");
|
||||||
setdisplay_column_size("49%");
|
setdisplay_column_size("48%");
|
||||||
}} />
|
}} />
|
||||||
</a> </div>
|
</a> </div>
|
||||||
|
|
||||||
|
|
||||||
|
{/* Gestion des TBD des Inscriptions */}
|
||||||
|
|
||||||
|
{display_nb_column && <div>
|
||||||
|
{Get_Connected_User_Dashbord_result &&
|
||||||
|
Get_Connected_User_Dashbord_result.map((step) => (
|
||||||
|
|
||||||
|
<div className="div_row" >
|
||||||
|
{String(JSON.parse(step).dashbord_internal_code) === "tbd_inscription_01" &&
|
||||||
|
<div style={{ "width": String(display_column_size), "float": "left", "paddingRight": "2px" }}>
|
||||||
|
<Dashbord_Inscriptions_all_inscriptions user_dashbord_id={String(JSON.parse(step)._id)}
|
||||||
|
user_dashbord_title={String(JSON.parse(step).title)}
|
||||||
|
user_dashbord_filter_start={String(JSON.parse(step).start_date)}
|
||||||
|
user_dashbord_filter_end={String(JSON.parse(step).end_date)}
|
||||||
|
user_dashbord_filter_group_by={String(JSON.parse(step).group_by)}
|
||||||
|
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
))}
|
||||||
|
</div>}
|
||||||
|
|
||||||
{/* Gestion des TBD des sessions et formations */}
|
{/* Gestion des TBD des sessions et formations */}
|
||||||
{display_nb_column && <div>
|
{display_nb_column && <div>
|
||||||
{Get_Connected_User_Dashbord_result &&
|
{Get_Connected_User_Dashbord_result &&
|
||||||
Get_Connected_User_Dashbord_result.map((step) => (
|
Get_Connected_User_Dashbord_result.map((step) => (
|
||||||
|
|
||||||
<div className="div_row" style={{ "width": String(display_column_size), "float": "left", "paddingRight": "2px" }}>
|
<div className="div_row">
|
||||||
|
|
||||||
{String(JSON.parse(step).dashbord_internal_code) === "tbd_code_session_01" &&
|
{String(JSON.parse(step).dashbord_internal_code) === "tbd_code_session_01" &&
|
||||||
|
<div style={{ "width": String(display_column_size), "float": "left", "paddingRight": "2px" }}>
|
||||||
|
|
||||||
<Dashbord_Session_Taux_Remplissage user_dashbord_id={String(JSON.parse(step)._id)}
|
<Dashbord_Session_Taux_Remplissage user_dashbord_id={String(JSON.parse(step)._id)}
|
||||||
user_dashbord_title={String(JSON.parse(step).title)}
|
user_dashbord_title={String(JSON.parse(step).title)}
|
||||||
user_dashbord_filter_start={String(JSON.parse(step).start_date)}
|
user_dashbord_filter_start={String(JSON.parse(step).start_date)}
|
||||||
user_dashbord_filter_end={String(JSON.parse(step).end_date)} />
|
user_dashbord_filter_end={String(JSON.parse(step).end_date)} />
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
{String(JSON.parse(step).dashbord_internal_code) === "tbd_code_session_02" &&
|
{String(JSON.parse(step).dashbord_internal_code) === "tbd_code_session_02" &&
|
||||||
|
|
||||||
|
<div style={{ "width": String(display_column_size), "float": "left", "paddingRight": "2px" }}>
|
||||||
<Dashbord_Session_Par_Fteur user_dashbord_id={String(JSON.parse(step)._id)}
|
<Dashbord_Session_Par_Fteur user_dashbord_id={String(JSON.parse(step)._id)}
|
||||||
user_dashbord_title={String(JSON.parse(step).title)}
|
user_dashbord_title={String(JSON.parse(step).title)}
|
||||||
user_dashbord_filter_start={String(JSON.parse(step).start_date)}
|
user_dashbord_filter_start={String(JSON.parse(step).start_date)}
|
||||||
user_dashbord_filter_end={String(JSON.parse(step).end_date)} />
|
user_dashbord_filter_end={String(JSON.parse(step).end_date)} />
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
{String(JSON.parse(step).dashbord_internal_code) === "tbd_code_session_03" &&
|
{String(JSON.parse(step).dashbord_internal_code) === "tbd_code_session_03" &&
|
||||||
|
<div style={{ "width": String(display_column_size), "float": "left", "paddingRight": "2px" }}>
|
||||||
|
|
||||||
<Dashbord_Session_Repartition_Fteur user_dashbord_id={String(JSON.parse(step)._id)}
|
<Dashbord_Session_Repartition_Fteur user_dashbord_id={String(JSON.parse(step)._id)}
|
||||||
user_dashbord_title={String(JSON.parse(step).title)}
|
user_dashbord_title={String(JSON.parse(step).title)}
|
||||||
user_dashbord_filter_start={String(JSON.parse(step).start_date)}
|
user_dashbord_filter_start={String(JSON.parse(step).start_date)}
|
||||||
user_dashbord_filter_end={String(JSON.parse(step).end_date)} />
|
user_dashbord_filter_end={String(JSON.parse(step).end_date)} />
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
{String(JSON.parse(step).dashbord_internal_code) === "tbd_code_formation_01" &&
|
{String(JSON.parse(step).dashbord_internal_code) === "tbd_code_formation_01" &&
|
||||||
|
<div style={{ "width": String(display_column_size), "float": "left", "paddingRight": "2px" }}>
|
||||||
|
|
||||||
<Dashbord_Formation_Evol_Session user_dashbord_id={String(JSON.parse(step)._id)}
|
<Dashbord_Formation_Evol_Session user_dashbord_id={String(JSON.parse(step)._id)}
|
||||||
user_dashbord_title={String(JSON.parse(step).title)}
|
user_dashbord_title={String(JSON.parse(step).title)}
|
||||||
user_dashbord_filter_start={String(JSON.parse(step).start_date)}
|
user_dashbord_filter_start={String(JSON.parse(step).start_date)}
|
||||||
user_dashbord_filter_end={String(JSON.parse(step).end_date)} />
|
user_dashbord_filter_end={String(JSON.parse(step).end_date)} />
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -176,30 +209,34 @@ const Mon_Tableau_De_Bord = (props) => {
|
||||||
{Get_Connected_User_Dashbord_result &&
|
{Get_Connected_User_Dashbord_result &&
|
||||||
Get_Connected_User_Dashbord_result.map((step) => (
|
Get_Connected_User_Dashbord_result.map((step) => (
|
||||||
|
|
||||||
<div className="div_row" style={{ "width": String(display_column_size), "float": "left", "paddingRight": "2px" }}>
|
<div className="div_row">
|
||||||
|
|
||||||
|
|
||||||
{String(JSON.parse(step).dashbord_internal_code) === "tbd_facture_01" &&
|
{String(JSON.parse(step).dashbord_internal_code) === "tbd_facture_01" &&
|
||||||
|
<div style={{ "width": String(display_column_size), "float": "left", "paddingRight": "2px" }}>
|
||||||
<Dashbord_Factures_Par_Periode user_dashbord_id={String(JSON.parse(step)._id)}
|
<Dashbord_Factures_Par_Periode user_dashbord_id={String(JSON.parse(step)._id)}
|
||||||
user_dashbord_title={String(JSON.parse(step).title)}
|
user_dashbord_title={String(JSON.parse(step).title)}
|
||||||
user_dashbord_filter_start={String(JSON.parse(step).start_date)}
|
user_dashbord_filter_start={String(JSON.parse(step).start_date)}
|
||||||
user_dashbord_filter_end={String(JSON.parse(step).end_date)} />
|
user_dashbord_filter_end={String(JSON.parse(step).end_date)} />
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
{String(JSON.parse(step).dashbord_internal_code) === "tbd_facture_02" &&
|
{String(JSON.parse(step).dashbord_internal_code) === "tbd_facture_02" &&
|
||||||
|
<div style={{ "width": String(display_column_size), "float": "left", "paddingRight": "2px" }}>
|
||||||
<Dashbord_Factures_Par_Client user_dashbord_id={String(JSON.parse(step)._id)}
|
<Dashbord_Factures_Par_Client user_dashbord_id={String(JSON.parse(step)._id)}
|
||||||
user_dashbord_title={String(JSON.parse(step).title)}
|
user_dashbord_title={String(JSON.parse(step).title)}
|
||||||
user_dashbord_filter_start={String(JSON.parse(step).start_date)}
|
user_dashbord_filter_start={String(JSON.parse(step).start_date)}
|
||||||
user_dashbord_filter_end={String(JSON.parse(step).end_date)} />
|
user_dashbord_filter_end={String(JSON.parse(step).end_date)} />
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
{String(JSON.parse(step).dashbord_internal_code) === "tbd_facture_03" &&
|
{String(JSON.parse(step).dashbord_internal_code) === "tbd_facture_03" &&
|
||||||
|
<div style={{ "width": String(display_column_size), "float": "left", "paddingRight": "2px" }}>
|
||||||
<Dashbord_Factures_Devis_Par_Periode user_dashbord_id={String(JSON.parse(step)._id)}
|
<Dashbord_Factures_Devis_Par_Periode user_dashbord_id={String(JSON.parse(step)._id)}
|
||||||
user_dashbord_title={String(JSON.parse(step).title)}
|
user_dashbord_title={String(JSON.parse(step).title)}
|
||||||
user_dashbord_filter_start={String(JSON.parse(step).start_date)}
|
user_dashbord_filter_start={String(JSON.parse(step).start_date)}
|
||||||
user_dashbord_filter_end={String(JSON.parse(step).end_date)} />
|
user_dashbord_filter_end={String(JSON.parse(step).end_date)} />
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,18 +276,8 @@ const Mon_Tableau_De_Bord = (props) => {
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|
||||||
{String(JSON.parse(step).dashbord_internal_code) === "tbd_inscription_01" &&
|
|
||||||
|
|
||||||
|
|
||||||
<Dashbord_Inscriptions_all_inscriptions user_dashbord_id={String(JSON.parse(step)._id)}
|
|
||||||
user_dashbord_title={String(JSON.parse(step).title)}
|
|
||||||
user_dashbord_filter_start={String(JSON.parse(step).start_date)}
|
|
||||||
user_dashbord_filter_end={String(JSON.parse(step).end_date)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1552,10 +1552,11 @@
|
||||||
color: black;
|
color: black;
|
||||||
width: 40%;
|
width: 40%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bton_add_session_create_automatic {
|
.bton_add_session_create_automatic {
|
||||||
background: #c8cfd5;
|
background: #c8cfd5;
|
||||||
color: black;
|
color: black;
|
||||||
width:60% !important;
|
width: 60% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bton_import_excel {
|
.bton_import_excel {
|
||||||
|
@ -2503,7 +2504,7 @@
|
||||||
|
|
||||||
// end media
|
// end media
|
||||||
|
|
||||||
.css-md26zr-MuiInputBase-root-MuiOutlinedInput-root{
|
.css-md26zr-MuiInputBase-root-MuiOutlinedInput-root {
|
||||||
height: 3rem !important;
|
height: 3rem !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2616,3 +2617,15 @@
|
||||||
.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input {
|
.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input {
|
||||||
padding-left: 5px !important;
|
padding-left: 5px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.css-k69abp-MuiResponsiveChart-container {
|
||||||
|
width: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-1jkcq86-MuiResponsiveChart-container {
|
||||||
|
width: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-s0svql-MuiResponsiveChart-container {
|
||||||
|
width: auto !important;
|
||||||
|
}
|
Loading…
Reference in New Issue