diff --git a/src/App.js b/src/App.js
index 3d39968..7f24663 100644
--- a/src/App.js
+++ b/src/App.js
@@ -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(
diff --git a/src/components/Mon_Tableau_De_Bord.js b/src/components/Mon_Tableau_De_Bord.js
index 374c812..9d470ff 100644
--- a/src/components/Mon_Tableau_De_Bord.js
+++ b/src/components/Mon_Tableau_De_Bord.js
@@ -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 (
@@ -1973,23 +2032,24 @@ const Mon_Tableau_De_Bord = (props) => {
- - des entreprises pour la formation de leurs salariés :
+ - Des entreprises pour la formation de leurs salariés :
-
+
{Getall_Qry_BPF_PAVE_Data_result_JSON && Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_c1_entreprise &&
- {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()} €
}
-
+
- - 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 :
@@ -1998,22 +2058,23 @@ const Mon_Tableau_De_Bord = (props) => {
-
+
{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) => (
-
-
+
+
- {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)}
-
+
- {my_bpf_c2_data.TotalAmount_HT}
+ {parseFloat(String(my_bpf_c2_data.TotalAmount_HT)).toLocaleString()} €
@@ -2031,10 +2092,11 @@ const Mon_Tableau_De_Bord = (props) => {
- Total des produits provenant des organismes gestionnaires des fonds de la formation :
-
+
{Getall_Qry_BPF_PAVE_Data_result_JSON && Getall_Qry_BPF_PAVE_Data_result_JSON.total_bpf_c_type_apprenant &&
- {Getall_Qry_BPF_PAVE_Data_result_JSON.total_bpf_c_type_apprenant}
+ {Getall_Qry_BPF_PAVE_Data_result_JSON.total_bpf_c_type_apprenant} €
}
@@ -2043,7 +2105,7 @@ const Mon_Tableau_De_Bord = (props) => {
-
+
Des pouvoirs publics :
@@ -2067,10 +2129,11 @@ const Mon_Tableau_De_Bord = (props) => {
-
+
- {my_bpf_c3_c8_data.TotalAmount_HT}
+ {parseFloat(String(my_bpf_c3_c8_data.TotalAmount_HT)).toLocaleString()} €
@@ -2084,28 +2147,33 @@ const Mon_Tableau_De_Bord = (props) => {
-
- - de contrats conclus avec des personnes à titre individuel et à leurs frais :
+
+ - De contrats conclus avec des personnes à titre individuel et à leurs frais
+
-
+
- {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[0].TotalAmount_HT}
- }
+ {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 &&
+ {parseFloat(String(Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_c9_is_company_particulier[0].TotalAmount_HT)).toLocaleString()} €
+ }
-
+
-
+
TOTAL DES PRODUITS RÉALISÉS AU TITRE DE LA FORMATION PROFESSIONNELLE :
-
- ttttt
+
+ {Getall_Qry_BPF_PAVE_Data_result_JSON && Getall_Qry_BPF_PAVE_Data_result_JSON.total_bpf_c1_c9 &&
+ {parseFloat(String(Getall_Qry_BPF_PAVE_Data_result_JSON.total_bpf_c1_c9)).toLocaleString()} €
+ }
@@ -2125,9 +2193,9 @@ const Mon_Tableau_De_Bord = (props) => {
E. Personnes dispensant des heures de formation
-
+
-
+
@@ -2137,7 +2205,7 @@ const Mon_Tableau_De_Bord = (props) => {
- Nombre Formateurs
+ Nombre Formateurs
@@ -2145,42 +2213,42 @@ const Mon_Tableau_De_Bord = (props) => {
- Nombre d'heures
+ Nombre d'heures
-
+
-
+
Personnes de votre organisme dispensant des heures de formation
-
+
{Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_e1_nb_formateurs_internee}
-
+
{Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_e1_nb_heures_formateurs_internes}
-
+
-
+
Personnes extérieures à votre organisme dispensant des heures de formation dans le cadre de contrats de sous-traitance
-
+
{Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_e2_nb_formateurs_externes}
-
- {Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_e2_nb_heures_formateurs_externes}
+
+ {parseFloat(String(Getall_Qry_BPF_PAVE_Data_result_JSON.bpf_e2_nb_heures_formateurs_externes)).toLocaleString()}
@@ -2192,9 +2260,9 @@ const Mon_Tableau_De_Bord = (props) => {
F. Type de stagiaires de l'organisme
-
+
-
+
@@ -2204,7 +2272,7 @@ const Mon_Tableau_De_Bord = (props) => {
- Nombre apprenants
+ Nombre apprenants
@@ -2212,7 +2280,7 @@ const Mon_Tableau_De_Bord = (props) => {
- Nombre d'heures
+ Nombre d'heures
@@ -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) => (
-
+
-
+
{my_bpf_f_data.Class_Level_Desc}
-
+
{my_bpf_f_data.Nb_Apprenant_By_Class_Level}
@@ -2239,11 +2307,11 @@ const Mon_Tableau_De_Bord = (props) => {
-
+
-
- {my_bpf_f_data.total_nb_heure_formation_by_level} (h)
-
+ {my_bpf_f_data.total_nb_heure_formation_by_level &&
+ {parseFloat(String(my_bpf_f_data.total_nb_heure_formation_by_level)).toLocaleString()} (h)
+ }
@@ -2251,9 +2319,13 @@ const Mon_Tableau_De_Bord = (props) => {
))}
+
-
+
{
+ Export_BPF_PDF();
+
+ }}>
Imprimer
}
diff --git a/src/styles/components/_mon_tableau_de_bord.scss b/src/styles/components/_mon_tableau_de_bord.scss
index cbc2ab3..e69fe8a 100644
--- a/src/styles/components/_mon_tableau_de_bord.scss
+++ b/src/styles/components/_mon_tableau_de_bord.scss
@@ -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;
}
}