From 0e71d01276c8d5e83fcb7d99a2a71c0c4b1965e8 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 17 Feb 2021 10:15:40 -0500 Subject: [PATCH] LP1845240 Survey editor ng lint repairs Replace some tabs, improve resulting formatting, and add some spaces. Signed-off-by: Bill Erickson --- .../staff/admin/local/survey/survey.component.ts | 31 +++++++++++----------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/survey/survey.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/local/survey/survey.component.ts index 7bec134b89..8e40e9ad6e 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/local/survey/survey.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/local/survey/survey.component.ts @@ -31,7 +31,7 @@ export class SurveyComponent implements OnInit { @ViewChild('endSurveySuccessString', { static: true }) endSurveySuccessString: StringComponent; @Input() sortField: string; - @Input() idlClass='asv'; + @Input() idlClass = 'asv'; @Input() dialogSize: 'sm' | 'lg' = 'lg'; constructor( @@ -46,20 +46,21 @@ export class SurveyComponent implements OnInit { ngOnInit() { this.gridDataSource.getRows = (pager: Pager, sort: any[]) => { - const orderBy: any = {}; - if (sort.length) { - // Sort specified from grid - orderBy[this.idlClass] = sort[0].name + ' ' + sort[0].dir; - } else if (this.sortField) { - // Default sort field - orderBy[this.idlClass] = this.sortField; - } - - const searchOps = { - offset: pager.offset, - limit: pager.limit, - order_by: orderBy - }; + const orderBy: any = {}; + if (sort.length) { + // Sort specified from grid + orderBy[this.idlClass] = sort[0].name + ' ' + sort[0].dir; + } else if (this.sortField) { + // Default sort field + orderBy[this.idlClass] = this.sortField; + } + + const searchOps = { + offset: pager.offset, + limit: pager.limit, + order_by: orderBy + }; + return this.pcrud.retrieveAll('asv', searchOps, {}); }; -- 2.11.0