Modal related stuff.

This commit is contained in:
Alexis Lahouze 2017-07-30 16:42:02 +02:00
parent 28460e10ff
commit efb0f70f31

View File

@ -67,14 +67,14 @@ export class AccountRowComponent implements OnInit {
@Input('account-row') account: Account;
@Output() needsReload: EventEmitter<void> = new EventEmitter<void>();
accountBalances: AccountBalances;
private accountBalances: AccountBalances;
constructor(
private accountService: AccountService,
private accountBalancesService: AccountBalancesService,
private toastrService: ToastrService,
private logger: Logger,
private modal: NgbModal
private ngbModal: NgbModal
) {
this.logger.log("AccountRowComponent constructor");
}
@ -115,9 +115,7 @@ export class AccountRowComponent implements OnInit {
};
confirmDelete() {
const modal = this.modal.open(AccountDeleteModalComponent, {
windowClass: 'in'
});
const modal = this.ngbModal.open(AccountDeleteModalComponent);
modal.componentInstance.account = this.account;
@ -149,9 +147,7 @@ export class AccountRowComponent implements OnInit {
* Open the popup to modify the account, save it on confirm.
*/
modify() {
const modal = this.modal.open(AccountEditModalComponent, {
windowClass: 'in'
});
const modal = this.ngbModal.open(AccountEditModalComponent);
modal.componentInstance.account = this.account;