diff --git a/src/operations/operationList.component.ts b/src/operations/operationList.component.ts index 28285e6..9b5a5ac 100644 --- a/src/operations/operationList.component.ts +++ b/src/operations/operationList.component.ts @@ -92,7 +92,15 @@ export class OperationListComponent implements OnInit { var operation = new Operation(); operation.account_id = this.accountIdService.get(); - return this.modify(operation); + // FIXME Alexis Lahouze 2017-06-15 i18n + const modal = this.ngbModal.open(OperationEditModalComponent); + + modal.componentInstance.operation = operation; + + modal.result.then((operation: Operation) => { + this.save(operation); + }, (reason) => { + }); }; /* @@ -138,20 +146,6 @@ export class OperationListComponent implements OnInit { }); }; - modify(operation) { - // FIXME Alexis Lahouze 2017-06-15 i18n - const modal = this.ngbModal.open(OperationEditModalComponent, { - windowClass: 'in' - }); - - modal.componentInstance.operation = operation; - - modal.result.then((operation: Operation) => { - this.save(operation); - }, (reason) => { - }); - }; - onUpdate(dateRange) { this.load(dateRange.minDate, dateRange.maxDate); };