Changeset View
Changeset View
Standalone View
Standalone View
src/resources/vue/Reseller/Dashboard.vue
Show All 28 Lines | export default { | ||||
}, | }, | ||||
data() { | data() { | ||||
return { | return { | ||||
status: {}, | status: {}, | ||||
balance: 0 | balance: 0 | ||||
} | } | ||||
}, | }, | ||||
mounted() { | mounted() { | ||||
const authInfo = this.$store.state.authInfo | this.status = this.$root.authInfo.statusInfo | ||||
this.status = authInfo.statusInfo | this.getBalance(this.$root.authInfo) | ||||
this.getBalance(authInfo) | |||||
}, | }, | ||||
methods: { | methods: { | ||||
getBalance(authInfo) { | getBalance(authInfo) { | ||||
this.balance = 0; | this.balance = 0; | ||||
// TODO: currencies, multi-wallets, accounts | // TODO: currencies, multi-wallets, accounts | ||||
authInfo.wallets.forEach(wallet => { | authInfo.wallets.forEach(wallet => { | ||||
this.balance += wallet.balance | this.balance += wallet.balance | ||||
}) | }) | ||||
} | } | ||||
} | } | ||||
} | } | ||||
</script> | </script> |