feat(account): add basic view of an account"
This commit is contained in:
51
src/components/Account.vue
Normal file
51
src/components/Account.vue
Normal file
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<div class="account-tab">
|
||||
<b-card no-body>
|
||||
<b-tabs card>
|
||||
<b-tab :title=account.name >
|
||||
</b-tab>
|
||||
</b-tabs>
|
||||
</b-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {BCard, BTabs , BTab} from "bootstrap-vue";
|
||||
import {getAnAccount} from "@/config/noscomptes";
|
||||
export default {
|
||||
name: 'account',
|
||||
data: function () {
|
||||
return {
|
||||
account: {},
|
||||
}
|
||||
},
|
||||
beforeCreate() {
|
||||
let loggedUser = this.$store.state.loggedUser
|
||||
getAnAccount(loggedUser.oauth_token, loggedUser.nosComptesId, this.$route.params.accountId).then(data => {
|
||||
this.account = data
|
||||
})
|
||||
},
|
||||
mounted () {
|
||||
},
|
||||
methods: {
|
||||
loadAccount() {
|
||||
let loggedUser = this.$store.state.loggedUser
|
||||
getAnAccount(loggedUser.oauth_token, loggedUser.nosComptesId, this.$route.params.accountId).then(data => {
|
||||
this.account = data
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
components: {
|
||||
BCard,
|
||||
BTabs,
|
||||
BTab
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user