diff --git a/src/app/pay-in/pay-in.component.html b/src/app/pay-in/pay-in.component.html index 8e1c498..04e9051 100644 --- a/src/app/pay-in/pay-in.component.html +++ b/src/app/pay-in/pay-in.component.html @@ -62,7 +62,6 @@ - =0 "> {{ dataItem.OffsetBalance | currency}} @@ -87,12 +86,18 @@ - + - 0" icon="attachment"> + 0" (click)="showUpload(dataItem.UploadId)" icon="attachment"> {{ dataItem.UploadId }} - + + + + + + diff --git a/src/app/pay-in/pay-in.component.ts b/src/app/pay-in/pay-in.component.ts index dd8a9d3..41569b6 100644 --- a/src/app/pay-in/pay-in.component.ts +++ b/src/app/pay-in/pay-in.component.ts @@ -4,6 +4,7 @@ import {FormControl, FormGroup, Validators} from '@angular/forms'; import {PayInListFilterModel} from '../models/pay-in-list.filter.model'; import {PayInService} from '../service/pay-in.service'; import {PayInListResult} from '../models/pay-in-list-result.model'; +import {Router} from '@angular/router'; const createFormGroup = dataItem => new FormGroup({ Id: new FormControl({value: dataItem.Id, disabled: true}, Validators.required), @@ -22,8 +23,8 @@ const createFormGroup = dataItem => new FormGroup({ export class PayInComponent implements OnInit { @Input() loanFilter: string[] = []; @Input() uploadsFilter: string[] = []; - @Input() allowAddNew = false; // TODO: - @Input() allowEdit = false; // TODO: + @Input() allowAddNew = true; + @Input() allowEdit = true; @Input() pageSize = 10; @Input() skip = 0; @Input() dateStart = new Date('1900-01-01'); @@ -37,7 +38,7 @@ export class PayInComponent implements OnInit { public showOffsetBalance = true; - constructor(private pis: PayInService) { } + constructor(private pis: PayInService, private router: Router) { } ngOnInit(): void { this.pis.getPayInList(new PayInListFilterModel()).subscribe( @@ -139,4 +140,11 @@ export class PayInComponent implements OnInit { this.editedRowIndex = undefined; this.incomeFormGroup = undefined; } + + public showUpload(id: number): void { + this.router.navigate(['/upload-details', id]); + } + public gotoLoan(id: string): void { + this.router.navigate(['/edit-loan', id]); + } }
-