deployed count

This commit is contained in:
Danil Kovtonyuk 2020-11-03 23:13:09 +10:00
parent 70c5487ba2
commit b41e441395
2 changed files with 14 additions and 2 deletions

View File

@ -16,7 +16,7 @@
<i18n tag="h3" class="title is-14px mt-6" path="completedTasks">
<template v-slot:progress>
<span>5/16</span>
<span>{{ deployedCount }}</span>
</template>
</i18n>
@ -28,11 +28,15 @@
<script>
import Steps from '@/components/Steps'
import { mapGetters } from 'vuex'
export default {
components: {
Steps,
},
computed: {
...mapGetters('steps', ['deployedCount']),
},
methods: {
scrollTo(element) {
window.scrollTo({

View File

@ -92,7 +92,15 @@ const state = () => {
}
}
const getters = {}
const getters = {
deployedCount: (state) => {
const deployed = state.steps.filter((step) => {
return !!step.deployerAddress
}).length
const all = state.steps.length
return `${deployed}/${all}`
},
}
const SET_DEPLOYER = 'SET_DEPLOYER'
const mutations = {