in sample/frontend/src/app/financial-grid/financial-grid.service.ts [48:76]
mapData() {
const data = [];
const hashAccountTypes = this.makeHash(this.accountTypes, 'id')
const hashTransactionTypes = this.makeHash(this.transactionTypes, 'id')
for (const user of this.financialUsers) {
data.push(user);
user.children = [];
for (const account of this.accounts) {
if (account.userId !== user.id) {
continue;
}
account.children = [];
account.accountType = hashAccountTypes[account.accountTypeId];
user.children.push(account);
for (const transaction of this.transactions) {
if (transaction.accountId !== account.id) {
continue;
}
account.children.push(transaction);
transaction.transactionType = hashTransactionTypes[transaction.transactionTypeId]
}
}
}
console.log(data)
this.gridEngine.data = data;
}