|
|
@@ -22,20 +22,20 @@ class Pelaporan extends Component {
|
|
|
|
|
|
componentDidMount = async () => {
|
|
|
const pelaporan = await getPelaporan(this.props.token);
|
|
|
- const graph = await getGraph(this.props.token, { laporanTahun: true, newLaporan: true });
|
|
|
+ const graph = await getGraph(this.props.token, { laporanTahun: true, newLaporan: true, jumlahLaporan: true });
|
|
|
const newLaporan = graph.data.newLaporan;
|
|
|
this.setState({ pelaporan, graph, newLaporan });
|
|
|
};
|
|
|
|
|
|
nextButton = async () => {
|
|
|
const tahun = this.state.tahun + 1;
|
|
|
- const graph = await getGraph(this.props.token, { laporanTahun: true, tahun });
|
|
|
+ const graph = await getGraph(this.props.token, { laporanTahun: true, jumlahLaporan: true, tahun });
|
|
|
this.setState({ graph, tahun });
|
|
|
};
|
|
|
|
|
|
prevButton = async () => {
|
|
|
const tahun = this.state.tahun - 1;
|
|
|
- const graph = await getGraph(this.props.token, { laporanTahun: true, tahun });
|
|
|
+ const graph = await getGraph(this.props.token, { laporanTahun: true, jumlahLaporan: true, tahun });
|
|
|
this.setState({ graph, tahun });
|
|
|
};
|
|
|
|