- added beneficiary stats page;
This commit is contained in:
@@ -7,16 +7,14 @@ import NumberFlow from '@number-flow/react';
|
||||
import { useStore } from '../../store';
|
||||
|
||||
// components
|
||||
//import PreInstructorSoccorsiTable from './components/PreInstructorSoccorsiTable';
|
||||
import DashboardService from '../../service/dashboard-service';
|
||||
import ChartDomandePerBando from '../../components/ChartDomandePerBando';
|
||||
import ChartStatoDomande from '../../components/ChartStatoDomande';
|
||||
import ChartDomandePerStato from '../../components/ChartDomandePerStato';
|
||||
import ChartRichiesteVsApprovate from '../../components/ChartRichiesteVsApprovate';
|
||||
import BeneficiarioUltimeDomandeTable from './components/BeneficiarioUltimeDomandeTable';
|
||||
|
||||
const StatsBeneficiary = () => {
|
||||
const [mainStats, setMainStats] = useState({});
|
||||
const [chartStats, setChartStats] = useState({});
|
||||
//const userData = useStore().main.userData();
|
||||
const chosenCompanyId = useStore().main.chosenCompanyId();
|
||||
|
||||
const getStats = (resp) => {
|
||||
@@ -34,8 +32,8 @@ const StatsBeneficiary = () => {
|
||||
|
||||
useEffect(() => {
|
||||
DashboardService.getBeneficiaryStatsPage(chosenCompanyId, getStats, errGetStats);
|
||||
}, []);
|
||||
console.log(chartStats)
|
||||
}, [chosenCompanyId]);
|
||||
|
||||
return(
|
||||
<div className="appPage">
|
||||
<div className="appPage__pageHeader">
|
||||
@@ -81,7 +79,7 @@ console.log(chartStats)
|
||||
currency: 'EUR',
|
||||
currencyDisplay: 'symbol'
|
||||
}}
|
||||
locales="en-US"/></span>
|
||||
locales="it-IT"/></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -92,14 +90,21 @@ console.log(chartStats)
|
||||
? <div className="appPageSection">
|
||||
<h2>{__('Statistiche di sistema', 'gepafin')}</h2>
|
||||
<div className="appPageSection columns">
|
||||
{/*<ChartDomandePerBando
|
||||
title={__('Domande per bando', 'gepafin')}
|
||||
data={chartStats.applicationPerCall}/>*/}
|
||||
<ChartRichiesteVsApprovate
|
||||
title={__('Importi Richiesti VS Approvati', 'gepafin')}
|
||||
data={chartStats.requestedVsApprovedAmount}/>
|
||||
<ChartDomandePerStato
|
||||
title={__('Domande per stato', 'gepafin')}
|
||||
data={chartStats.applicationPerStatus}/>
|
||||
</div>
|
||||
</div> : null}
|
||||
|
||||
<div className="appPage__spacer"></div>
|
||||
|
||||
<div className="appPageSection">
|
||||
<h2>{__('Ultime richieste di finanziamento', 'gepafin')}</h2>
|
||||
<BeneficiarioUltimeDomandeTable/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user