31/08/2024 - 18h50

recette2
cherif 2024-08-31 18:50:13 +02:00
parent 573178b204
commit 05df64ab33
3 changed files with 166 additions and 61 deletions

View File

@ -99,27 +99,20 @@ function App() {
const subdomain = domain.split('.')[0];
console.log(" subdomain 12223 = ", subdomain);
var tab_reserved_subdomain = ['/dev', '/demo', 'demo', 'dev'];
console.log(" domain 12223 = ", domain);
if (tab_split.length > 1 && myurl_pathname && !tab_reserved_subdomain.includes(subdomain)) {
console.log(" on est dans myurl_pathname = ", myurl_pathname);
var tab_myurl_pathname = myurl_pathname.split('/');
console.log(" tab_myurl_pathname ", tab_myurl_pathname);
var tab_action = ['/moncatalog', '/Display-Partner-Catalog-Detail-formation', 'Display-Partner-Catalog-Detail-formation', 'moncatalog'];
if (tab_myurl_pathname.length > 0 && !tab_action.includes(tab_myurl_pathname[1]) && !tab_reserved_subdomain.includes(subdomain)) {
console.log(' le traitement a faire est : ', myurl_pathname);
var new_url = window.location.protocol + "//" + domain.split('.')[0] + "." + domain.split('.')[1] + "/moncatalog";
console.log(' new_url =', new_url);
/*
window.open(

View File

@ -18,6 +18,7 @@ import "react-datepicker/dist/react-datepicker.css";
import Button from '@mui/material/Button';
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
import fileDownload from 'js-file-download'
import Dashbord_Session_Par_Fteur from "./Dashbord_Session_Par_Fteur";
import Dashbord_Session_Taux_Remplissage from "./Dashbord_Session_Taux_Remplissage";
@ -1107,6 +1108,64 @@ const Mon_Tableau_De_Bord = (props) => {
}
function Export_BPF_PDF() {
const stored_cookie = getCookie('tokenmysypart');
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;
}
var nom_fichier_cmd_excel = "BPF.pdf";
//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/Prepare_and_Print_BPF_PDF/" + stored_cookie + "/" + date_from + "/" + date_to + "/";
//console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- selected_id = ", selected_id, " --- url =", url);
console.log(" #### url = ", url)
setLoading(true);
axios.get(url, { responseType: 'blob', },)
.then((res) => {
setLoading(false);
//console.log(" In Export_Dashbord_to_CSV res.data = " + res.data);
if (String(res.data) === String("false")) {
alert("Impossible d'exporter les données (2) ");
} else {
fileDownload(res.data, nom_fichier_cmd_excel)
}
}).catch((error) => {
setLoading(false);
console.error('Error:', error);
alert(" Impossible d'exporter les données ")
});
}
/****** FIN GESTION BPF */
return (
<div className="mon_tableau_de_bord">
@ -1973,23 +2032,24 @@ const Mon_Tableau_De_Bord = (props) => {
<div style={{ "width": '100%', "float": "left" }}>
<div style={{ "width": '70%', "float": "left", "fontWeight": "600" }}>
- des entreprises pour la formation de leurs salariés :
- Des entreprises pour la formation de leurs salariés :
</div>
<div style={{ "width": '25%', "float": "right", textAlign: "right", paddingRight: "15px", "fontWeight": "600" }}>
<div style={{ "width": '25%', "float": "right", textAlign: "right", paddingRight: "15px", "fontWeight": "600" }}
className="bpf_blck_valeur1">
{Getall_Qry_BPF_PAVE_Data_result_JSON && Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_c1_entreprise && <nav>
{Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_c1_entreprise[0].bpf_c1_entreprise}
{parseFloat(String(Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_c1_entreprise[0].bpf_c1_entreprise)).toLocaleString()}&nbsp;
</nav>}
</div>
</div>
<div style={{ "width": '100%', "float": "left" }}>
<div style={{ "width": '100%', "float": "left", "marginTop": "2rem" }}>
<div style={{ "width": '70%', "float": "left" }}>
- des organismes gestionnaires des fonds de la formation professionnelle pour des actions dispensées dans le cadre :
- Des organismes gestionnaires des fonds de la formation professionnelle pour des actions dispensées dans le cadre :
</div>
<div style={{ "width": '25%', "float": "right", textAlign: "right", paddingRight: "25px" }}>
@ -1998,22 +2058,23 @@ const Mon_Tableau_De_Bord = (props) => {
</div>
<br />
{Getall_Qry_BPF_PAVE_Data_result_JSON && Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_c2_type_apprenant &&
Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_c2_type_apprenant.length > 0 && Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_c2_type_apprenant.map((my_bpf_c2_data) => (
<div className="div_row">
<div style={{ "width": '100%', "float": "left" }}>
<div>
<div style={{ "width": '100%', "float": "left", "marginBottom": "5px" }}>
<div style={{ "width": '70%', "float": "left", "paddingLeft": "3rem", "fontWeight": "600" }}>
<nav>
{my_bpf_c2_data.Type_Apprenant_Desc}
{my_bpf_c2_data.Type_Apprenant_Desc.charAt(0).toUpperCase() + my_bpf_c2_data.Type_Apprenant_Desc.slice(1)}
</nav>
</div>
<div style={{ "width": '25%', "float": "right", textAlign: "right", paddingRight: "25px", "fontWeight": "600" }}>
<div style={{ "width": '25%', "float": "right", textAlign: "right", paddingRight: "40px", "fontWeight": "600" }}
className="bpf_blck_valeur1">
<nav>
{my_bpf_c2_data.TotalAmount_HT}
{parseFloat(String(my_bpf_c2_data.TotalAmount_HT)).toLocaleString()}&nbsp;
</nav>
</div>
@ -2031,10 +2092,11 @@ const Mon_Tableau_De_Bord = (props) => {
- Total des produits provenant des organismes gestionnaires des fonds de la formation :
</div>
<div style={{ "width": '25%', "float": "right", textAlign: "right", paddingRight: "15px", "fontWeight": "600" }}>
<div style={{ "width": '25%', "float": "right", textAlign: "right", paddingRight: "15px", "fontWeight": "600" }}
className="bpf_blck_valeur1" >
{Getall_Qry_BPF_PAVE_Data_result_JSON && Getall_Qry_BPF_PAVE_Data_result_JSON.total_bpf_c_type_apprenant && <nav>
{Getall_Qry_BPF_PAVE_Data_result_JSON.total_bpf_c_type_apprenant}
{Getall_Qry_BPF_PAVE_Data_result_JSON.total_bpf_c_type_apprenant}&nbsp;
</nav>}
</div>
@ -2043,7 +2105,7 @@ const Mon_Tableau_De_Bord = (props) => {
<br />
<br />
<div style={{ "width": '100%', "float": "left" }}>
<div style={{ "width": '100%', "float": "left", "marginTop": "2rem" }}>
<div style={{ "width": '70%', "float": "left" }}>
Des pouvoirs publics :
@ -2067,10 +2129,11 @@ const Mon_Tableau_De_Bord = (props) => {
</nav>
</div>
<div style={{ "width": '25%', "float": "right", textAlign: "right", paddingRight: "25px", "fontWeight": "600" }}>
<div style={{ "width": '25%', "float": "right", textAlign: "right", paddingRight: "25px", "fontWeight": "600" }}
className="bpf_blck_valeur1">
<nav>
{my_bpf_c3_c8_data.TotalAmount_HT}
{parseFloat(String(my_bpf_c3_c8_data.TotalAmount_HT)).toLocaleString()}&nbsp;
</nav>
</div>
@ -2084,28 +2147,33 @@ const Mon_Tableau_De_Bord = (props) => {
<div style={{ "width": '100%', "float": "left" }}>
<div style={{ "width": '70%', "float": "left", "fontWeight": "600" }}>
- de contrats conclus avec des personnes à titre individuel et à leurs frais :
<div style={{ "width": '70%', "float": "left", "fontWeight": "600", "marginTop": "2rem" }}>
- De contrats conclus avec des personnes à titre individuel et à leurs frais <br />
</div>
<div style={{ "width": '25%', "float": "right", textAlign: "right", paddingRight: "15px", "fontWeight": "600" }}>
<div style={{ "width": '25%', "float": "right", textAlign: "right", paddingRight: "15px", "fontWeight": "600" }}
className="bpf_blck_valeur1">
{Getall_Qry_BPF_PAVE_Data_result_JSON && Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_c9_is_company_particulier && <nav>
{Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_c9_is_company_particulier[0].TotalAmount_HT}
</nav>}
{Getall_Qry_BPF_PAVE_Data_result_JSON && Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_c9_is_company_particulier &&
Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_c9_is_company_particulier.length > 0 && <nav>
{parseFloat(String(Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_c9_is_company_particulier[0].TotalAmount_HT)).toLocaleString()}&nbsp;
</nav>}
</div>
</div>
<div style={{ "width": '100%', "float": "left" }}>
<div style={{ "width": '100%', "float": "left", "marginTop": "2rem" }}>
<div style={{ "width": '70%', "float": "left" }}>
<div style={{ "width": '70%', "float": "left", "fontWeight": "600" }}>
TOTAL DES PRODUITS RÉALISÉS AU TITRE DE LA FORMATION PROFESSIONNELLE :
</div>
<div style={{ "width": '25%', "float": "right", textAlign: "right", paddingRight: "25px" }}>
ttttt
<div style={{ "width": '25%', "float": "right", textAlign: "right", paddingRight: "25px", "fontWeight": "600" }} className="bpf_blck_valeur1">
{Getall_Qry_BPF_PAVE_Data_result_JSON && Getall_Qry_BPF_PAVE_Data_result_JSON.total_bpf_c1_c9 && <nav>
{parseFloat(String(Getall_Qry_BPF_PAVE_Data_result_JSON.total_bpf_c1_c9)).toLocaleString()}&nbsp;
</nav>}
</div>
@ -2125,9 +2193,9 @@ const Mon_Tableau_De_Bord = (props) => {
<div className="titre1"> E. Personnes dispensant des heures de formation </div>
<div className="div_row">
<div style={{ "width": '100%', "float": "left" }}>
<div className="div_row">
<div style={{ "width": '50%', "float": "left", "paddingLeft": "3rem", "fontWeight": "600" }}>
<div className="bpf_blck_valeur50" >
<nav>
&nbsp;
</nav>
@ -2137,7 +2205,7 @@ const Mon_Tableau_De_Bord = (props) => {
<div style={{ "width": '23%', "float": "right", textAlign: "right", paddingRight: "25px", "fontWeight": "600" }}>
<nav>
Nombre Formateurs
Nombre Formateurs
</nav>
</div>
@ -2145,42 +2213,42 @@ const Mon_Tableau_De_Bord = (props) => {
<div style={{ "width": '23%', "float": "right", textAlign: "right", paddingRight: "25px", "fontWeight": "600" }}>
<nav>
Nombre d'heures
Nombre d'heures
</nav>
</div>
</div>
<div style={{ "width": '100%', "float": "left" }}>
<div className="div_row">
<div style={{ "width": '50%', "float": "left" }}>
<div className="bpf_blck_valeur50">
Personnes de votre organisme dispensant des heures de formation
</div>
<div style={{ "width": '23%', "float": "right", textAlign: "right", paddingRight: "25px" }}>
<div style={{ "width": '23%', "float": "right", textAlign: "right", paddingRight: "25px" }} className="bpf_blck_valeur1">
{Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_e1_nb_formateurs_internee}
</div>
<div style={{ "width": '23%', "float": "right", textAlign: "right", paddingRight: "25px" }}>
<div style={{ "width": '23%', "float": "right", textAlign: "right", paddingRight: "25px" }} className="bpf_blck_valeur1">
{Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_e1_nb_heures_formateurs_internes}
</div>
</div>
<div style={{ "width": '100%', "float": "left" }}>
<div className="div_row">
<div style={{ "width": '50%', "float": "left" }}>
<div className="bpf_blck_valeur50">
Personnes extérieures à votre organisme dispensant des heures de formation dans le cadre de contrats de sous-traitance
</div>
<div style={{ "width": '23%', "float": "right", textAlign: "right", paddingRight: "25px" }}>
<div style={{ "width": '23%', "float": "right", textAlign: "right", paddingRight: "25px" }} className="bpf_blck_valeur1">
{Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_e2_nb_formateurs_externes}
</div>
<div style={{ "width": '23%', "float": "right", textAlign: "right", paddingRight: "25px" }}>
{Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_e2_nb_heures_formateurs_externes}
<div style={{ "width": '23%', "float": "right", textAlign: "right", paddingRight: "25px" }} className="bpf_blck_valeur1">
{parseFloat(String(Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_e2_nb_heures_formateurs_externes)).toLocaleString()}
</div>
@ -2192,9 +2260,9 @@ const Mon_Tableau_De_Bord = (props) => {
<div className="titre1"> F. Type de stagiaires de l'organisme </div>
<div className="div_row">
<div style={{ "width": '100%', "float": "left" }}>
<div className="div_row">
<div style={{ "width": '50%', "float": "left", "paddingLeft": "3rem", "fontWeight": "600" }}>
<div className="bpf_blck_valeur50" >
<nav>
&nbsp;
</nav>
@ -2204,7 +2272,7 @@ const Mon_Tableau_De_Bord = (props) => {
<div style={{ "width": '23%', "float": "right", textAlign: "right", paddingRight: "25px", "fontWeight": "600" }}>
<nav>
Nombre apprenants
Nombre apprenants
</nav>
</div>
@ -2212,7 +2280,7 @@ const Mon_Tableau_De_Bord = (props) => {
<div style={{ "width": '23%', "float": "right", textAlign: "right", paddingRight: "25px", "fontWeight": "600" }}>
<nav>
Nombre d'heures
Nombre d'heures
</nav>
</div>
@ -2223,15 +2291,15 @@ const Mon_Tableau_De_Bord = (props) => {
{Getall_Qry_BPF_PAVE_Data_result_JSON && Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_f_class_niveau_formation &&
Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_f_class_niveau_formation.length > 0 && Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_f_class_niveau_formation.map((my_bpf_f_data) => (
<div className="div_row">
<div style={{ "width": '100%', "float": "left" }}>
<div className="div_row">
<div style={{ "width": '50%', "float": "left", "paddingLeft": "3rem", "fontWeight": "600" }}>
<div className="bpf_blck_valeur50" >
<nav>
{my_bpf_f_data.Class_Level_Desc}
</nav>
</div>
<div style={{ "width": '23%', "float": "right", textAlign: "right", paddingRight: "25px", "fontWeight": "600" }}>
<div style={{ "width": '23%', "float": "right", textAlign: "right", paddingRight: "25px", "fontWeight": "600" }} className="bpf_blck_valeur1">
<nav>
{my_bpf_f_data.Nb_Apprenant_By_Class_Level}
@ -2239,11 +2307,11 @@ const Mon_Tableau_De_Bord = (props) => {
</div>
<div style={{ "width": '23%', "float": "right", textAlign: "right", paddingRight: "25px", "fontWeight": "600" }}>
<div style={{ "width": '23%', "float": "right", textAlign: "right", paddingRight: "25px", "fontWeight": "600" }} className="bpf_blck_valeur1">
<nav>
{my_bpf_f_data.total_nb_heure_formation_by_level} (h)
</nav>
{my_bpf_f_data.total_nb_heure_formation_by_level && <nav>
{parseFloat(String(my_bpf_f_data.total_nb_heure_formation_by_level)).toLocaleString()} (h)
</nav>}
</div>
@ -2251,9 +2319,13 @@ const Mon_Tableau_De_Bord = (props) => {
</div>))}
<hr className="hr_break" />
<div className="div_row">
<div className="div_row" onClick={(event) => {
Export_BPF_PDF();
}}>
<nav style={{ width: "5rem", float: "right", "marginRight": "1rem" }}> Imprimer </nav>
</div>
</div>}

View File

@ -683,6 +683,14 @@
width: 200px !important;
}
.bpf_blck_valeur50 {
width: 50%;
float: left;
padding-left: 3rem;
font-weight: 600;
}
}
@media only screen and (min-width: 601px) and (max-width: 991px) {
@ -1303,6 +1311,13 @@
width: 500px !important;
}
.bpf_blck_valeur50 {
width: 50%;
float: left;
padding-left: 3rem;
font-weight: 600;
}
}
@media only screen and (min-width: 992px) and (max-width: 1199px) {
@ -1847,6 +1862,13 @@
width: 500px !important;
}
.bpf_blck_valeur50 {
width: 50%;
float: left;
padding-left: 3rem;
font-weight: 600;
}
}
@media only screen and (min-width: 1200px) {
@ -2511,13 +2533,31 @@
}
.bpf_blck_valeur50 {
width: 50%;
float: left;
padding-left: 3rem;
font-weight: 600;
}
}
// end media
.bpf_blck_valeur1 {
box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
border: 1px solid;
border: 1px solid #CCC;
background: #eaeded;
vertical-align: middle;
padding: 5px;
}
.css-10lpdtz-MuiResponsiveChart-container {
svg{
svg {
width: 90% !important;
}
}