build: Use prettier for typescript
Stop ignoring .ts files in prettier and fix existing issues.
This commit is contained in:
@@ -11,7 +11,6 @@ import { SystemService } from '../system.service';
|
||||
* Audit Trails custom data source to implement server side filtering, pagination and sorting.
|
||||
*/
|
||||
export class AuditTrailsDataSource implements DataSource<any> {
|
||||
|
||||
/** Audit Trails behavior subject to represent loaded audit trails page. */
|
||||
private auditTrailsSubject = new BehaviorSubject<any[]>([]);
|
||||
/** Records subject to represent total number of filtered audit trail records. */
|
||||
@@ -23,7 +22,7 @@ export class AuditTrailsDataSource implements DataSource<any> {
|
||||
/**
|
||||
* @param {SystemService} systemService System Service.
|
||||
*/
|
||||
constructor(private systemService: SystemService) { }
|
||||
constructor(private systemService: SystemService) {}
|
||||
|
||||
/**
|
||||
* Gets audit trails on the basis of provided parameters and emits the value.
|
||||
@@ -33,9 +32,16 @@ export class AuditTrailsDataSource implements DataSource<any> {
|
||||
* @param {number} pageIndex Page number.
|
||||
* @param {number} limit Number of entries within the page.
|
||||
*/
|
||||
getAuditTrails(filterBy: any, orderBy: string = '', sortOrder: string = '', pageIndex: number = 0, limit: number = 10) {
|
||||
getAuditTrails(
|
||||
filterBy: any,
|
||||
orderBy: string = '',
|
||||
sortOrder: string = '',
|
||||
pageIndex: number = 0,
|
||||
limit: number = 10
|
||||
) {
|
||||
this.auditTrailsSubject.next([]);
|
||||
this.systemService.getAuditTrails(filterBy, orderBy, sortOrder, pageIndex * limit, limit)
|
||||
this.systemService
|
||||
.getAuditTrails(filterBy, orderBy, sortOrder, pageIndex * limit, limit)
|
||||
.subscribe((auditTrails: any) => {
|
||||
this.recordsSubject.next(auditTrails.totalFilteredRecords);
|
||||
this.auditTrailsSubject.next(auditTrails.pageItems);
|
||||
@@ -56,5 +62,4 @@ export class AuditTrailsDataSource implements DataSource<any> {
|
||||
this.auditTrailsSubject.complete();
|
||||
this.recordsSubject.complete();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user