Sengi-Windows-MacOS-Linux/src/app/services/tools.service.ts

21 lines
461 B
TypeScript
Raw Normal View History

import { Injectable } from '@angular/core';
import { Store } from '@ngxs/store';
import { AccountInfo } from '../states/accounts.state';
@Injectable({
providedIn: 'root'
})
export class ToolsService {
constructor( private readonly store: Store) { }
getSelectedAccounts(): AccountInfo[] {
var regAccounts = <AccountInfo[]>this.store.snapshot().registeredaccounts.accounts;
return regAccounts.filter(x => x.isSelected);
}
}