Kaynağa Gözat

income now with load and uplads navigator.

tags/2.037
Patrick Sun 4 yıl önce
ebeveyn
işleme
b84a5cea1f
2 değiştirilmiş dosya ile 19 ekleme ve 6 silme
  1. +8
    -3
      src/app/pay-in/pay-in.component.html
  2. +11
    -3
      src/app/pay-in/pay-in.component.ts

+ 8
- 3
src/app/pay-in/pay-in.component.html Dosyayı Görüntüle

@@ -62,7 +62,6 @@

</kendo-grid-column>


<kendo-grid-column field="OffsetBalance" title="Offset" width="200" >
<ng-template kendoGridCellTemplate let-dataItem>
<div *ngIf="dataItem.OffsetBalance >=0 "> {{ dataItem.OffsetBalance | currency}} </div>
@@ -87,12 +86,18 @@
</ng-template>
</kendo-grid-column>

<kendo-grid-column field="Uploaded" title="Uploads" width="100" format="{0:c}" editable="false">
<kendo-grid-column field="UploadId" title="Uploads" width="100" format="{0:c}" editable="false">
<ng-template kendoGridCellTemplate let-dataItem let-rowIndex="rowIndex" >
<button kendoButton *ngIf="dataItem.Uploads > 0" icon="attachment">
<button kendoButton *ngIf="dataItem.UploadId > 0" (click)="showUpload(dataItem.UploadId)" icon="attachment"> {{ dataItem.UploadId }}
</button>
<p *ngIf="dataItem.Uploads <=0" align="center"> - </p>
</ng-template>
</kendo-grid-column>

<kendo-grid-column field="LoanId" title="Loan" width="80">
<ng-template kendoGridCellTemplate let-dataItem>
<button kendoButton [icon]="'page-properties'" (click)="gotoLoan(dataItem.LoanId)" > </button>
</ng-template>
</kendo-grid-column>

</kendo-grid>

+ 11
- 3
src/app/pay-in/pay-in.component.ts Dosyayı Görüntüle

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

Yükleniyor…
İptal
Kaydet