Dissociate new account modal from editing account on AccountListComponent.
This commit is contained in:
parent
79d55bfc44
commit
f8fa34f269
@ -160,7 +160,17 @@ export class AccountListComponent {
|
||||
* Add an empty account.
|
||||
*/
|
||||
add() {
|
||||
return this.modify(new Account());
|
||||
const modal = this.NgbModal.open(AccountEditModalComponent, {
|
||||
windowClass: 'in'
|
||||
});
|
||||
|
||||
modal.componentInstance.account = new Account();
|
||||
|
||||
modal.result.then((account: Account) => {
|
||||
this.Logger.log("Modal closed => save account", account);
|
||||
this.save(account);
|
||||
}, (reason) => function(reason) {
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user