mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 22:39:34 +00:00
[tm@store] Added store
This commit is contained in:
1 parent
a1a410c54d
commit
774ca7b607
44 files changed
+989
-720
No files matched your search
@@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<W-loadable :content="teams">
|
||||
<A-teams-table :teams="teams" @reloadData="_loadData" />
|
||||
<A-teams-table :teams="teams" />
|
||||
</W-loadable>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import ATeamsTable from './_components/a-teams-table.vue'
|
||||
|
||||
export default {
|
||||
@@ -12,30 +13,8 @@ export default {
|
||||
ATeamsTable
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
teams: null
|
||||
}
|
||||
},
|
||||
|
||||
async created() {
|
||||
await this._loadData()
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.$events.on('on-team-update', () => this._loadData())
|
||||
},
|
||||
|
||||
methods: {
|
||||
async _loadData() {
|
||||
this.teams = null
|
||||
|
||||
try {
|
||||
this.teams = await this.$axios.get_auth_data('v1/teams')
|
||||
} catch (error) {
|
||||
this.teams = {error}
|
||||
}
|
||||
}
|
||||
computed: {
|
||||
...mapGetters('tm', ['teams'])
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in new issue
Block a user