2020-05-17 18:43:19 +00:00
|
|
|
<template>
|
2020-05-22 18:04:27 +00:00
|
|
|
<div>
|
|
|
|
<div class="mb-2">
|
|
|
|
<label class="mr-auto h3">Daily Stats</label>
|
2020-07-02 18:05:20 +00:00
|
|
|
<b-button class="float-right" size="sm" @click="getDaily">↻</b-button>
|
2020-05-17 18:52:14 +00:00
|
|
|
</div>
|
2020-05-22 18:04:27 +00:00
|
|
|
<div>
|
2020-08-31 15:43:44 +00:00
|
|
|
<DailyChart v-if="dailyStats.data" :daily-stats="dailyStats" />
|
2020-05-17 18:52:14 +00:00
|
|
|
</div>
|
2020-06-11 18:24:17 +00:00
|
|
|
<div>
|
2020-08-17 18:39:14 +00:00
|
|
|
<b-table class="table-sm" :items="dailyStats.data" :fields="dailyFields"> </b-table>
|
2020-06-11 18:24:17 +00:00
|
|
|
</div>
|
2020-05-17 18:43:19 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { mapActions, mapState } from 'vuex';
|
2020-08-17 18:39:14 +00:00
|
|
|
import DailyChart from '@/components/charts/DailyChart.vue';
|
2020-05-17 18:43:19 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'DailyStats',
|
2020-06-11 18:24:17 +00:00
|
|
|
components: {
|
2020-08-17 18:39:14 +00:00
|
|
|
DailyChart,
|
2020-06-11 18:24:17 +00:00
|
|
|
},
|
2020-05-17 18:43:19 +00:00
|
|
|
computed: {
|
|
|
|
...mapState('ftbot', ['dailyStats']),
|
2020-06-04 18:06:58 +00:00
|
|
|
dailyFields() {
|
2020-05-17 18:43:19 +00:00
|
|
|
return [
|
|
|
|
{ key: 'date', label: 'Day' },
|
|
|
|
{ key: 'abs_profit', label: 'Profit' },
|
|
|
|
{ key: 'fiat_value', label: `In ${this.dailyStats.fiat_display_currency}` },
|
|
|
|
{ key: 'trade_count', label: 'Trades' },
|
|
|
|
];
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
this.getDaily();
|
|
|
|
},
|
2020-09-04 15:08:02 +00:00
|
|
|
methods: {
|
|
|
|
...mapActions('ftbot', ['getDaily']),
|
|
|
|
},
|
2020-05-17 18:43:19 +00:00
|
|
|
};
|
|
|
|
</script>
|