mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
remove statistics from admin overview page
This commit is contained in:
parent
7dee06bc56
commit
0a8d1ddb76
@ -28,32 +28,13 @@
|
||||
</b-link>
|
||||
</b-card-text>
|
||||
</b-card>
|
||||
<community-statistic class="mt-5" v-model="statistics" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { communityStatistics } from '@/graphql/communityStatistics.js'
|
||||
import CommunityStatistic from '../components/CommunityStatistic.vue'
|
||||
import { listUnconfirmedContributions } from '@/graphql/listUnconfirmedContributions.js'
|
||||
|
||||
export default {
|
||||
name: 'overview',
|
||||
components: {
|
||||
CommunityStatistic,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
statistics: {
|
||||
totalUsers: null,
|
||||
activeUsers: null,
|
||||
deletedUsers: null,
|
||||
totalGradidoCreated: null,
|
||||
totalGradidoDecayed: null,
|
||||
totalGradidoAvailable: null,
|
||||
totalGradidoUnbookedDecayed: null,
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getPendingCreations() {
|
||||
this.$apollo
|
||||
@ -65,30 +46,9 @@ export default {
|
||||
this.$store.commit('setOpenCreations', result.data.listUnconfirmedContributions.length)
|
||||
})
|
||||
},
|
||||
getCommunityStatistics() {
|
||||
this.$apollo
|
||||
.query({
|
||||
query: communityStatistics,
|
||||
})
|
||||
.then((result) => {
|
||||
this.statistics.totalUsers = result.data.communityStatistics.totalUsers
|
||||
this.statistics.activeUsers = result.data.communityStatistics.activeUsers
|
||||
this.statistics.deletedUsers = result.data.communityStatistics.deletedUsers
|
||||
this.statistics.totalGradidoCreated = result.data.communityStatistics.totalGradidoCreated
|
||||
this.statistics.totalGradidoDecayed = result.data.communityStatistics.totalGradidoDecayed
|
||||
this.statistics.totalGradidoAvailable =
|
||||
result.data.communityStatistics.totalGradidoAvailable
|
||||
this.statistics.totalGradidoUnbookedDecayed =
|
||||
result.data.communityStatistics.totalGradidoUnbookedDecayed
|
||||
})
|
||||
.catch(() => {
|
||||
this.toastError('communityStatistics has no result, use default data')
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getPendingCreations()
|
||||
this.getCommunityStatistics()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user