♻️ (account) set account id in store when public
This commit is contained in:
@@ -181,6 +181,7 @@ import IStat from '@/models/IStat'
|
||||
import ITransaction from '@/models/ITransaction'
|
||||
import IUser from '@/models/IUser'
|
||||
import { primary, main, findContrastColor, findDarkValue } from '@/utils'
|
||||
import couchService from '@/services/CouchService'
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
@@ -199,6 +200,8 @@ import { primary, main, findContrastColor, findDarkValue } from '@/utils'
|
||||
export default class AccountItem extends BaseAccount {
|
||||
@Action
|
||||
public setTitle!: any
|
||||
@Action
|
||||
public addAccountId!: any
|
||||
public retrieveTransactions: boolean = false
|
||||
public transactions: ITransaction[] = []
|
||||
public activeTab: string = 'transaction'
|
||||
@@ -216,6 +219,11 @@ export default class AccountItem extends BaseAccount {
|
||||
this.$router.push({ name: 'home' })
|
||||
return
|
||||
}
|
||||
|
||||
if (this.account.isPublic) {
|
||||
this.addAccountId({ accountId: this.id })
|
||||
couchService.initLive()
|
||||
}
|
||||
this.transactions = await transactionService.getAllByAccountId(this.id)
|
||||
this.retrieveTransactions = true
|
||||
if (document && document.documentElement) {
|
||||
|
||||
Reference in New Issue
Block a user