Unposted Done!!
This commit is contained in:
@ -12,13 +12,13 @@
|
||||
<!-- Date Column -->
|
||||
<ng-container matColumnDef="date">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Date</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"><a [routerLink]="['/', row.url, row.id]">{{row.date}}</a></mat-cell>
|
||||
<mat-cell *matCellDef="let row"><a [routerLink]="row.url">{{row.date}}</a></mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Type Column -->
|
||||
<ng-container matColumnDef="voucherType">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Type</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">{{row.voucherType}}</mat-cell>
|
||||
<mat-cell *matCellDef="let row">{{row.type}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Narration Column -->
|
||||
|
||||
@ -24,12 +24,7 @@ export class UnpostedComponent implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.data.pipe(map(
|
||||
(data: { info: Unposted[] }) => {
|
||||
data.info = data.info.map(x => ({...x, url: x['type'].replace(/ /g, '-').toLowerCase()}));
|
||||
return data;
|
||||
}
|
||||
)).subscribe((data: { info: Unposted[] }) => {
|
||||
this.route.data.subscribe((data: { info: Unposted[] }) => {
|
||||
this.info = data.info;
|
||||
});
|
||||
this.dataSource = new UnpostedDataSource(this.paginator, this.sort, this.info);
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
export class Unposted {
|
||||
id: string;
|
||||
date: string;
|
||||
voucherType: string;
|
||||
url: string[];
|
||||
type: string;
|
||||
narration: string;
|
||||
debitName: string;
|
||||
debitAmount: number;
|
||||
|
||||
Reference in New Issue
Block a user