diff --git a/src/components/pages/SemuaAnggaran.vue b/src/components/pages/SemuaAnggaran.vue index 087def7b78fd5bbc20bb101eab85bb9d1dbd60b7..aeb1bb14033f653f1e74f1f68904fad0ae866422 100644 --- a/src/components/pages/SemuaAnggaran.vue +++ b/src/components/pages/SemuaAnggaran.vue @@ -1,6 +1,6 @@ <template> <b-container> - <h2> SEMUA ANGGARAN APBD JABAR</h2> + <h2> SEMUA ANGGARAN APBD JABAR TAHUN {{tahun}}</h2> <b-row class="justify-content-md-center"> <b-col id="visualization" class="bg-light" cols="12" lg="8"> <visualization @@ -38,6 +38,7 @@ export default { }, data() { return { + tahun: 2019, data : [], id : "" } @@ -50,7 +51,7 @@ export default { getDataFromTop() { let fetchData = { method: 'POST', - body: JSON.stringify({ year: 2019 }), + body: JSON.stringify({ year: this.tahun }), headers: { "Content-Type": "application/json" } } @@ -66,6 +67,9 @@ export default { }, created : function() { this.$store.commit('changed','Semua Anggaran') + if (this.$store.state.year !== 0) { + this.tahun = this.$store.state.year + } this.getDataFromTop() } }