Cleanup code.
This commit is contained in:
parent
296c89ce20
commit
161eb42942
@ -1,6 +1,6 @@
|
||||
// vim: set tw=80 ts=2 sw=2 sts=2 :
|
||||
import { CurrencyPipe } from '@angular/common';
|
||||
import { Component, Inject, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { Component, Inject, Input } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
import { Logger } from '@nsalaun/ng-logger';
|
||||
@ -77,7 +77,6 @@ import { OperationDeleteModalComponent } from './operationDeleteModal.component'
|
||||
export class OperationRowComponent {
|
||||
@Input('operation-row') operation: Operation;
|
||||
@Input() account: Account;
|
||||
@Output() needsReload: EventEmitter<void> = new EventEmitter<void>();
|
||||
|
||||
constructor(
|
||||
private operationService: OperationService,
|
||||
@ -105,8 +104,6 @@ export class OperationRowComponent {
|
||||
return this.operationService.update(operation).subscribe((operation) => {
|
||||
this.toastrService.success('Operation #' + operation.id + ' saved.');
|
||||
|
||||
this.needsReload.emit();
|
||||
|
||||
this.logger.info('Reload route', this.router.url);
|
||||
this.router.navigateByUrl(this.router.url);
|
||||
}, (result) => {
|
||||
@ -135,8 +132,6 @@ export class OperationRowComponent {
|
||||
return this.operationService.delete(operation).subscribe(() => {
|
||||
this.toastrService.success('Operation #' + id + ' deleted.');
|
||||
|
||||
this.needsReload.emit();
|
||||
|
||||
this.logger.info('Reload route', this.router.url);
|
||||
this.router.navigateByUrl(this.router.url);
|
||||
}, (result) => {
|
||||
|
Loading…
Reference in New Issue
Block a user