diff --git a/src/accounts/accountRow.component.ts b/src/accounts/accountRow.component.ts
index fa9b30c..003af6f 100644
--- a/src/accounts/accountRow.component.ts
+++ b/src/accounts/accountRow.component.ts
@@ -17,9 +17,9 @@ import { AccountEditModalComponent } from './accountEditModal.component';
selector: 'tr[account-row]',
host: {
"[id]": "account.id",
- "class": "lighten-4",
- "[class.orange]": "warning",
- "[class.red]": "danger"
+ "class": "lighten-5",
+ "[class.orange]": "account.authorized_overdraft < 0 && accountBalances?.current < 0",
+ "[class.red]": "accountBalances?.current < account.authorized_overdraft",
},
template: `
@@ -27,13 +27,17 @@ import { AccountEditModalComponent } from './accountEditModal.component';
|
-
+
{{ accountBalances?.current | currency:"EUR":true }}
|
-
+
{{ accountBalances?.pointed | currency:"EUR":true }}
|
@@ -89,32 +93,6 @@ export class AccountRowComponent implements OnInit {
})
}
- get warning() {
- return this.account && this.accountBalances
- && this.account.authorized_overdraft < this.accountBalances.current
- && this.accountBalances.current < 0;
- };
-
- get error() {
- return this.account && this.accountBalances
- && this.accountBalances.current < this.account.authorized_overdraft;
- };
-
- /*
- * Return the class for a value compared to account authorized overdraft.
- */
- valueClass(value: number) {
- if (!value) {
- return;
- }
-
- if (value < this.account.authorized_overdraft) {
- return 'text-danger';
- } else if (value < 0) {
- return 'text-warning';
- }
- };
-
confirmDelete() {
const modal = this.ngbModal.open(AccountDeleteModalComponent);