diff --git a/src/accounts/account.module.ts b/src/accounts/account.module.ts index 26a3370..7127f44 100644 --- a/src/accounts/account.module.ts +++ b/src/accounts/account.module.ts @@ -12,6 +12,7 @@ import { ToastrModule } from 'ngx-toastr'; import { AccountService } from './account.service'; import { AccountBalancesService } from './accountBalances.service'; +import { AccountListComponent } from './accountList.component'; import { AccountDeleteModalComponent } from './accountDeleteModal.component'; import { AccountEditModalComponent } from './accountEditModal.component'; import { AccountFormComponent } from './accountForm.component'; @@ -31,11 +32,13 @@ import { AccountFormComponent } from './accountForm.component'; AccountBalancesService, ], declarations: [ + AccountListComponent, AccountDeleteModalComponent, AccountEditModalComponent, AccountFormComponent ], entryComponents: [ + AccountListComponent, AccountDeleteModalComponent, AccountEditModalComponent, AccountFormComponent diff --git a/src/accounts/accountList.component.ts b/src/accounts/accountList.component.ts index d1f3df7..a5c350b 100644 --- a/src/accounts/accountList.component.ts +++ b/src/accounts/accountList.component.ts @@ -1,3 +1,5 @@ +import { CurrencyPipe } from '@angular/common'; +import { Component, Inject } from '@angular/core'; import { Observable } from 'rxjs/Rx'; import { Logger } from '@nsalaun/ng-logger'; @@ -10,6 +12,80 @@ import { AccountService } from './account.service'; import { AccountBalancesService } from './accountBalances.service'; import { AccountDeleteModalComponent } from './accountDeleteModal.component'; import { AccountEditModalComponent } from './accountEditModal.component'; + +@Component({ + selector: 'account-list', + template: ` +
Nom du compte | +Solde courant | +Solde pointé | +Découvert autorisé | +Actions | +
---|---|---|---|---|
+ + | +||||
+ {{ account.name }} + | + ++ + {{ account.balances?.current | currency:"EUR" }} + + | + ++ + {{ account.balances?.pointed | currency:"EUR" }} + + | + +{{ account.authorized_overdraft | currency:"EUR" }} | + +
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+