mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
41 lines
595 B
Vue
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> |