diff --git a/src/components/HelloWorld.vue b/src/components/HelloWorld.vue deleted file mode 100644 index 629763357369cbd7fe04719f78abcd99eb7bb36e..0000000000000000000000000000000000000000 --- a/src/components/HelloWorld.vue +++ /dev/null @@ -1,116 +0,0 @@ -<template> - <div class="hello"> - <h1>{{ msg }}</h1> - <h2>Essential Links</h2> - <ul> - <li> - <a - href="https://vuejs.org" - target="_blank" - > - Core Docs - </a> - </li> - <li> - <a - href="https://forum.vuejs.org" - target="_blank" - > - Forum - </a> - </li> - <li> - <a - href="https://chat.vuejs.org" - target="_blank" - > - Community Chat - </a> - </li> - <li> - <a - href="https://twitter.com/vuejs" - target="_blank" - > - Twitter - </a> - </li> - <br> - <li> - <a - href="http://vuejs-templates.github.io/webpack/" - target="_blank" - > - Docs for This Template - </a> - </li> - </ul> - <h2>Ecosystem</h2> - <ul> - <li> - <a - href="http://router.vuejs.org/" - target="_blank" - > - vue-router - </a> - </li> - <li> - <a - href="http://vuex.vuejs.org/" - target="_blank" - > - vuex - </a> - </li> - <li> - <a - href="http://vue-loader.vuejs.org/" - target="_blank" - > - vue-loader - </a> - </li> - <li> - <a - href="https://github.com/vuejs/awesome-vue" - target="_blank" - > - awesome-vue - </a> - </li> - </ul> - </div> -</template> - -<script> -export default { - name: 'HelloWorld', - data () { - return { - msg: 'Welcome to Your Vue.js App' - } - }, - created : function() { - this.$store.commit('changed','Jenis Keuangan') - } -} -</script> - -<!-- Add "scoped" attribute to limit CSS to this component only --> -<style scoped> -h1, h2 { - font-weight: normal; -} -ul { - list-style-type: none; - padding: 0; -} -li { - display: inline-block; - margin: 0 10px; -} -a { - color: #42b983; -} -</style> diff --git a/src/components/pages/BiayaLangsungPage.vue b/src/components/pages/DetailAnggaran.vue similarity index 94% rename from src/components/pages/BiayaLangsungPage.vue rename to src/components/pages/DetailAnggaran.vue index 2e65195f150309c49f0158850cefde5b0d388cba..0f0c7975b9150c41c60d833fd54a65650b530d46 100644 --- a/src/components/pages/BiayaLangsungPage.vue +++ b/src/components/pages/DetailAnggaran.vue @@ -1,7 +1,7 @@ <template> <b-container> <b-breadcrumb class="bg-light" :items="items"></b-breadcrumb> - <h2>ANGGARAN BELANJA LANGSUNG APBD JABAR</h2> + <h2>{{currentData.name.toUpperCase()}}</h2> <b-row class="justify-content-md-center"> <b-col id="visualization" class="bg-light" cols="12"> <div id="toggle" v-if="currentData.level == 1"> @@ -63,7 +63,7 @@ export default { visualizationHandler(idobj) { let id = idobj.$oid this.toggleData = false - this.$router.push({ name: 'BiayaLangsungId', params: { id: id } }) + this.$router.push({ name: 'DetailAnggaranId', params: { id: id } }) }, getLowestLevel(data) { return data[data.length-1].level @@ -117,7 +117,7 @@ export default { if (this.items.length >= 2 && this.items[this.items.length-2].text != "Semua Anggaran") { var item = this.items[this.items.length-2] item.active = false - item.to = { name: 'BiayaLangsungId', params: { id: item.id } } + item.to = { name: 'DetailAnggaranId', params: { id: item.id } } } }, getData(id, updateBreadcrumbHandler) { @@ -170,9 +170,7 @@ export default { } }, created : function() { - this.$store.commit('changed','Anggaran Biaya Langsung') - if (!this.$route.params.id) this.getDataFromTop() - else this.getData(this.$route.params.id, true) + this.getData(this.$route.params.id, true) }, watch: { $route(to, from) { diff --git a/src/components/pages/SemuaAnggaran.vue b/src/components/pages/SemuaAnggaran.vue index 111d00c59fa278f091c08a4d8bb740a02f94ae5c..087def7b78fd5bbc20bb101eab85bb9d1dbd60b7 100644 --- a/src/components/pages/SemuaAnggaran.vue +++ b/src/components/pages/SemuaAnggaran.vue @@ -45,7 +45,7 @@ export default { methods: { handler(idobj) { let id = idobj.$oid - this.$router.push({ name: 'BiayaLangsungId', params: { id: id } }) + this.$router.push({ name: 'DetailAnggaranId', params: { id: id } }) }, getDataFromTop() { let fetchData = { diff --git a/src/router/index.js b/src/router/index.js index fa7d7fa16d106bfe81577a6be161ff45f59a2f61..38882fc287bf9c2375a78e28fe03848f718eb85a 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -2,10 +2,7 @@ import Vue from 'vue' import Router from 'vue-router' import LandingPage from '@/components/pages/LandingPage' import LoginPage from '@/components/pages/LoginPage' -import Pendapatan from '@/components/pages/PendapatanPage' -import Pembiayaan from '@/components/pages/PembiayaanPage' -import BiayaTidakLangsung from '@/components/pages/BiayaTidakLangsungPage' -import BiayaLangsung from '@/components/pages/BiayaLangsungPage' +import DetailAnggaran from '@/components/pages/DetailAnggaran' import SemuaAnggaran from '@/components/pages/SemuaAnggaran' import SimpleCardContainer from '@/components/partials/SimpleCardContainer' import PanelAdministrator from '@/components/pages/PanelAdministrator' @@ -15,7 +12,7 @@ Vue.use(Router) export default new Router({ routes: [ { - path: '/', + path: '*', name: 'LandingPage', component: LandingPage }, @@ -25,29 +22,9 @@ export default new Router({ component: LoginPage }, { - path: '/pendapatan', - name: 'PendapatanPage', - component: Pendapatan - }, - { - path: '/biaya-tidak-langsung', - name: 'BiayaTidakLangsung', - component: BiayaTidakLangsung - }, - { - path: '/biaya-langsung', - name: 'BiayaLangsung', - component: BiayaLangsung - }, - { - path: '/biaya-langsung/:id', - name: 'BiayaLangsungId', - component: BiayaLangsung - }, - { - path: '/pembiayaan', - name: 'Pembiayaan', - component: Pembiayaan + path: '/detail-anggaran/:id', + name: 'DetailAnggaranId', + component: DetailAnggaran }, { path: '/semua-anggaran',