Files
jandl-taskmanager-app/app/src/plugins/tm@overview/teams/teams.vue
T
2023-01-26 21:11:53 +01:00

41 lines
595 B
Vue

<template>
<W-loadable :content="teams">
<A-teams-table :teams="teams" />
</W-loadable>
</template>
<script>
import ATeamsTable from './_components/a-teams-table.vue'
export default {
components: {
ATeamsTable
},
data() {
return {
teams: null
}
},
async created() {
await this._loadData()
},
mounted() {
this.$events.on('on-team-deleted', () => this._loadData())
},
methods: {
async _loadData() {
this.teams = null
try {
this.teams = await this.$axios.get_auth_data('v1/teams')
} catch (error) {
this.teams = {error}
}
}
}
}
</script>