Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/EsraDoerksen/All-In-Banking
- Loading branch information
Showing
33 changed files
with
335 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Local: Attach to Local", | ||
"type": "node", | ||
"request": "attach", | ||
"protocol": "inspector", | ||
"port": 9229, | ||
"sourceMaps": true, | ||
"trace": true | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "attach", | ||
"name": "Docker: Attach to Remote", | ||
"address": "localhost", | ||
"port": 9229, | ||
"localRoot": "${workspaceFolder}/dist", | ||
"remoteRoot": "/usr/src/app/dist", | ||
"protocol": "inspector", | ||
"skipFiles": ["<node_internals>/**"] | ||
}, | ||
{ | ||
"name": "Debug Jest tests", | ||
"type": "node", | ||
"request": "launch", | ||
"program": "${workspaceRoot}\\node_modules\\jest\\bin\\jest.js", | ||
"args": ["--runInBand", "--no-cache"], | ||
"runtimeArgs": ["--inspect-brk"], | ||
"cwd": "${workspaceRoot}", | ||
"protocol": "inspector", | ||
"console": "integratedTerminal" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,5 +84,8 @@ | |
} | ||
} | ||
} | ||
}, | ||
"cli": { | ||
"analytics": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 3 additions & 10 deletions
13
bank-advisor/src/app/components/all-expenses/all-expenses.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,5 @@ | ||
<div class="margin-x"> | ||
<app-big-expenses | ||
*ngIf="this.route === 'bigTransactions'" | ||
[bigTransactions]="bigTransactions" | ||
></app-big-expenses> | ||
<app-regular-expenses | ||
[regularTransactions]="regularTransactions" | ||
></app-regular-expenses> | ||
<app-contract-expenses | ||
[contractTransactions]="contractTransactions" | ||
></app-contract-expenses> | ||
<!--<app-big-expenses></app-big-expenses> | ||
<app-regular-expenses></app-regular-expenses> | ||
<app-contract-expenses></app-contract-expenses>--> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 3 additions & 16 deletions
19
bank-advisor/src/app/components/big-expenses/big-expenses.component.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,4 @@ | ||
.text-orange { | ||
border-color: orange; | ||
} | ||
|
||
.text-red { | ||
border-color: red; | ||
} | ||
|
||
.red { | ||
fill: red; | ||
color: red; | ||
background-color: red; | ||
} | ||
|
||
.bg-grey { | ||
background-color: grey; | ||
.margin-x { | ||
margin-left: 15%; | ||
margin-right: 15%; | ||
} |
71 changes: 37 additions & 34 deletions
71
bank-advisor/src/app/components/big-expenses/big-expenses.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 14 additions & 1 deletion
15
bank-advisor/src/app/components/big-expenses/big-expenses.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,24 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { Transaction } from '../../models/transaction.interface'; | ||
import { User } from '../../models/user.interface'; | ||
import { Account } from '../../models/account.interface'; | ||
import { DataService } from '../../services/data.service'; | ||
|
||
@Component({ | ||
selector: 'app-big-expenses', | ||
templateUrl: './big-expenses.component.html', | ||
styleUrls: ['./big-expenses.component.css'], | ||
}) | ||
export class BigExpensesComponent { | ||
@Input() bigTransactions: Transaction[] = []; | ||
private user: User = {} as User; | ||
private account: Account = {} as Account; | ||
bigTransactions: Transaction[] = []; | ||
|
||
constructor(dataService: DataService) { | ||
this.user = dataService.getUser(); | ||
this.account = dataService.getAccount(); | ||
this.bigTransactions = this.account.transactions.filter((t) => { | ||
return t.amount > 300; | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.margin-x { | ||
margin-left: 15%; | ||
margin-right: 15%; | ||
} |
15 changes: 14 additions & 1 deletion
15
bank-advisor/src/app/components/contract-expenses/contract-expenses.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,24 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { Transaction } from 'src/app/models/transaction.interface'; | ||
import { User } from '../../models/user.interface'; | ||
import { Account } from '../../models/account.interface'; | ||
import { DataService } from '../../services/data.service'; | ||
|
||
@Component({ | ||
selector: 'app-contract-expenses', | ||
templateUrl: './contract-expenses.component.html', | ||
styleUrls: ['./contract-expenses.component.css'], | ||
}) | ||
export class ContractExpensesComponent { | ||
@Input() contractTransactions: Transaction[] = []; | ||
private user: User = {} as User; | ||
private account: Account = {} as Account; | ||
contractTransactions: Transaction[] = []; | ||
|
||
constructor(dataService: DataService) { | ||
this.user = dataService.getUser(); | ||
this.account = dataService.getAccount(); | ||
this.contractTransactions = this.account.transactions.filter( | ||
(t) => t.standingOrder | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.margin-x { | ||
margin-left: 15%; | ||
margin-right: 15%; | ||
} |
25 changes: 24 additions & 1 deletion
25
bank-advisor/src/app/components/regular-expenses/regular-expenses.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,34 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { Transaction } from 'src/app/models/transaction.interface'; | ||
import { DataService } from '../../services/data.service'; | ||
import { Account } from '../../models/account.interface'; | ||
import { User } from '../../models/user.interface'; | ||
|
||
@Component({ | ||
selector: 'app-regular-expenses', | ||
templateUrl: './regular-expenses.component.html', | ||
styleUrls: ['./regular-expenses.component.css'], | ||
}) | ||
export class RegularExpensesComponent { | ||
@Input() regularTransactions: Transaction[] = []; | ||
private user: User = {} as User; | ||
private account: Account = {} as Account; | ||
regularTransactions: Transaction[] = []; | ||
|
||
constructor(dataService: DataService) { | ||
this.user = dataService.getUser(); | ||
this.account = dataService.getAccount(); | ||
const transactionCounts: { [key: string]: number } = {}; | ||
|
||
this.account.transactions.forEach((t) => { | ||
if (transactionCounts[t.location]) { | ||
transactionCounts[t.location]++; | ||
} else { | ||
transactionCounts[t.location] = 1; | ||
} | ||
}); | ||
|
||
this.regularTransactions = this.account.transactions.filter( | ||
(t) => transactionCounts[t.location] > 2 | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { User } from '../models/user.interface'; | ||
import { Account } from '../models/account.interface'; | ||
|
||
@Injectable({ | ||
providedIn: 'root', | ||
}) | ||
export class DataService { | ||
private sharedUser: User = {} as User; | ||
private sharedAccount: Account = {} as Account; | ||
|
||
setUser(user: User) { | ||
this.sharedUser = user; | ||
} | ||
|
||
setAccount(account: Account) { | ||
this.sharedAccount = account; | ||
} | ||
|
||
getUser() { | ||
return this.sharedUser; | ||
} | ||
|
||
getAccount() { | ||
return this.sharedAccount; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.