|
|
|
@@ -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]); |
|
|
|
} |
|
|
|
} |