Feat: Add summarize box
This commit is contained in:
@@ -12,12 +12,20 @@
|
||||
</b-row>
|
||||
</b-container>
|
||||
|
||||
<b-card-group deck class="mb-3">
|
||||
<box postename="total" :rows="filter_rows"></box>
|
||||
<box postename="cash" :rows="filter_rows"></box>
|
||||
<box postename="CB" :rows="filter_rows"></box>
|
||||
<box postename="other" :rows="filter_rows"></box>
|
||||
</b-card-group>
|
||||
|
||||
<b-table striped hover :items="filter_rows" :fields='fields'></b-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import box from '../components/box'
|
||||
|
||||
var today = new Date()
|
||||
var monthAgo = new Date()
|
||||
@@ -26,6 +34,7 @@ monthAgo.setMonth(monthAgo.getMonth() - 1)
|
||||
export default {
|
||||
name: 'home',
|
||||
components: {
|
||||
box: box
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
@@ -50,12 +59,14 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
this.$store.dispatch('config/load_postes')
|
||||
this.$store.dispatch('datas/find_csv')
|
||||
},
|
||||
computed: {
|
||||
...mapGetters({
|
||||
'csvs': 'datas/csvs',
|
||||
'rows': 'datas/rows'
|
||||
'rows': 'datas/rows',
|
||||
'postes': 'config/postes'
|
||||
}),
|
||||
filter_rows () {
|
||||
return this.filter_date(this.filter_spending(this.rows))
|
||||
|
||||
Reference in New Issue
Block a user