DDS: approvals tab, vouchers, payout & close, Sundry GL search, closure tab, fixes
This commit is contained in:
@@ -117,8 +117,24 @@ export class PartyMasterComponent implements OnInit {
|
||||
parties: any[] = [];
|
||||
filteredCount = 0;
|
||||
|
||||
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
|
||||
@ViewChild(MatSort, { static: true }) sort: MatSort;
|
||||
paginator: MatPaginator;
|
||||
sort: MatSort;
|
||||
|
||||
// The table sits inside an @if, so these only exist once the list has loaded. Read statically they
|
||||
// were never there, the table was never paged, and the paginator read "0 of 0" over a full list.
|
||||
@ViewChild(MatPaginator) set matPaginator(paginator: MatPaginator) {
|
||||
this.paginator = paginator;
|
||||
if (paginator) {
|
||||
this.dataSource.paginator = paginator;
|
||||
}
|
||||
}
|
||||
|
||||
@ViewChild(MatSort) set matSort(sort: MatSort) {
|
||||
this.sort = sort;
|
||||
if (sort) {
|
||||
this.dataSource.sort = sort;
|
||||
}
|
||||
}
|
||||
|
||||
get totalCount(): number {
|
||||
return this.parties.length;
|
||||
@@ -163,7 +179,10 @@ export class PartyMasterComponent implements OnInit {
|
||||
next: (due: any) => {
|
||||
const rows = Array.isArray(due) ? due : due?.pageItems || [];
|
||||
this.dueForClosureCount = rows.length;
|
||||
this.dueForClosurePayable = rows.reduce((sum: number, party: any) => sum + Number(party.currentBalance || 0), 0);
|
||||
this.dueForClosurePayable = rows.reduce(
|
||||
(sum: number, party: any) => sum + Number(party.currentBalance || 0),
|
||||
0
|
||||
);
|
||||
},
|
||||
// The party list is the point of this screen; a failed banner must not take it down with it.
|
||||
error: () => {
|
||||
|
||||
Reference in New Issue
Block a user