funds: fix lint
authorGalen Charlton <gmc@equinoxinitiative.org>
Mon, 29 Mar 2021 15:48:46 +0000 (11:48 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 29 Mar 2021 15:48:46 +0000 (11:48 -0400)
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-details-dialog.component.ts
Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-rollover-dialog.component.ts
Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-tags.component.ts
Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-transfer-dialog.component.ts
Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funding-source-transactions-dialog.component.ts
Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funding-sources.component.ts
Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funds-manager.component.ts
Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funds.component.ts

index 62a68f5..641dbcf 100644 (file)
@@ -31,9 +31,9 @@ export class FundDetailsDialogComponent
     fund: IdlObject;
     idlDef: any;
     fieldOrder: any;
-    acqfaDataSource: GridDataSource
-    acqftrDataSource: GridDataSource
-    acqfdebDataSource: GridDataSource
+    acqfaDataSource: GridDataSource;
+    acqftrDataSource: GridDataSource;
+    acqfdebDataSource: GridDataSource;
 
     @ViewChild('editDialog', { static: true }) editDialog: FmRecordEditorComponent;
     @ViewChild('transferDialog', { static: false }) transferDialog: FundTransferDialogComponent;
@@ -44,7 +44,7 @@ export class FundDetailsDialogComponent
     activeTab = 'summary';
     defaultTabType = 'summary';
     cellTextGenerator: GridCellTextGenerator;
+
     constructor(
         private idl: IdlService,
         private evt: EventService,
@@ -59,7 +59,7 @@ export class FundDetailsDialogComponent
     ) {
         super(modal);
     }
-    
+
     ngOnInit() {
 
         this.defaultTabType =
@@ -68,7 +68,7 @@ export class FundDetailsDialogComponent
 
         this.fund = null;
         this.onOpen$.subscribe(() => this._initRecord());
-        this.idlDef = this.idl.classes['acqf']
+        this.idlDef = this.idl.classes['acqf'];
         this.fieldOrder = 'name,code,year,org,active,currency_type,balance_stop_percentage,balance_warning_percentage,propagate,rollover';
 
         this.cellTextGenerator = {
@@ -129,7 +129,7 @@ export class FundDetailsDialogComponent
             if (idlClass === 'acqfa') {
                 search.push({ fund: this.fundId });
             } else if (idlClass === 'acqftr') {
-                search.push({ 
+                search.push({
                     '-or': [
                         { src_fund: this.fundId },
                         { dest_fund: this.fundId }
@@ -139,14 +139,14 @@ export class FundDetailsDialogComponent
                 searchOps['flesh_fields'] = {
                     'acqftr': ['funding_source_credit'],
                     'acqfscred': ['funding_source']
-                }
+                };
             } else if (idlClass === 'acqfdeb') {
                 search.push({ fund: this.fundId });
                 searchOps['flesh'] = 2;
                 searchOps['flesh_fields'] = {
                     'acqfdeb': ['invoice_entry'],
-                    'acqie': ['invoice','purchase_order','lineitem']
-                }
+                    'acqie': ['invoice', 'purchase_order', 'lineitem']
+                };
             }
 
             Object.keys(gridSource.filters).forEach(key => {
@@ -181,7 +181,7 @@ export class FundDetailsDialogComponent
                 if (row.invoice_entry().lineitem()) {
                     row['li_id'] = row.invoice_entry().lineitem().id();
                 }
-            } 
+            }
         }
         return of(row);
     }
@@ -193,7 +193,7 @@ export class FundDetailsDialogComponent
     }
 
     openEditDialog() {
-        this.editDialog.recordId = this.fundId
+        this.editDialog.recordId = this.fundId;
         this.editDialog.mode = 'update';
         this.editDialog.open({size: 'lg'}).subscribe(
             result => {
@@ -234,7 +234,7 @@ export class FundDetailsDialogComponent
         this.transferDialog.sourceFund = this.fund;
         this.transferDialog.open().subscribe(
             ok => this._initRecord()
-        )
+        );
     }
 
     setDefaultTab() {
index 9d9590a..4aec6e5 100644 (file)
@@ -26,7 +26,7 @@ import {ComboboxEntry} from '@eg/share/combobox/combobox.component';
 export class FundRolloverDialogComponent
   extends DialogComponent implements OnInit {
 
-    doneLoading: boolean = false;
+    doneLoading = false;
 
     @Input() contextOrgId: number;
 
@@ -35,14 +35,14 @@ export class FundRolloverDialogComponent
     @ViewChild('rolloverProgress', { static: true })
         private rolloverProgress: ProgressInlineComponent;
 
-    includeDescendants: boolean = false;
-    propagateFunds: boolean = false;
-    doCloseout: boolean = false;
-    limitToEncumbrances: boolean = false;
-    dryRun: boolean = true;
+    includeDescendants = false;
+    propagateFunds = false;
+    doCloseout = false;
+    limitToEncumbrances = false;
+    dryRun = true;
     contextOrg: IdlObject;
-    isProcessing: boolean = false;
-    showResults: boolean = false;
+    isProcessing = false;
+    showResults = false;
     years: ComboboxEntry[];
     year: number;
 
@@ -62,7 +62,7 @@ export class FundRolloverDialogComponent
     ) {
         super(modal);
     }
-    
+
     ngOnInit() {
         this.onOpen$.subscribe(() => this._initDialog());
         this.doneLoading = true;
@@ -93,7 +93,7 @@ export class FundRolloverDialogComponent
                 });
                 this.year = maxYear;
             }
-        )
+        );
     }
 
     rollover() {
@@ -133,7 +133,7 @@ export class FundRolloverDialogComponent
                 // note that we're intentionally not closing the dialog
                 // so that user can view the results
             }
-        )
+        );
     }
 
 }
index 529bca2..aba54fc 100644 (file)
@@ -29,7 +29,7 @@ export class FundTagsComponent implements OnInit {
 
     tagMaps: IdlObject[];
     newTag: ComboboxEntry = null;
-    tagSelectorDataSource: (term: string) => Observable<ComboboxEntry>
+    tagSelectorDataSource: (term: string) => Observable<ComboboxEntry>;
 
     constructor(
         private idl: IdlService,
@@ -48,7 +48,7 @@ export class FundTagsComponent implements OnInit {
             const args = {};
             const extra_args = { order_by : {} };
             args[field] = {'ilike': `%${term}%`}; // could -or search on label
-            args['owner'] = this.org.ancestors(this.fundOwner, true)
+            args['owner'] = this.org.ancestors(this.fundOwner, true);
             extra_args['order_by']['acqft'] = field;
             extra_args['limit'] = 100;
             extra_args['flesh'] = 2;
@@ -77,7 +77,7 @@ export class FundTagsComponent implements OnInit {
             res => this.tagMaps.push(res),
             err => {},
             () => this.tagMaps.sort((a, b) => {
-                return a.tag().name() < b.tag().name() ? -1 : 1
+                return a.tag().name() < b.tag().name() ? -1 : 1;
             })
         );
     }
@@ -119,6 +119,6 @@ export class FundTagsComponent implements OnInit {
                 .then(str => this.toast.danger(str));
             },
             () => this._loadTagMaps()
-        )
+        );
     }
 }
index 85ad875..f8904c3 100644 (file)
@@ -26,7 +26,7 @@ export class FundTransferDialogComponent
   extends DialogComponent implements OnInit {
 
     @Input() sourceFund: IdlObject;
-    doneLoading: boolean = false;
+    doneLoading = false;
 
     @ViewChild('successString', { static: true }) successString: StringComponent;
     @ViewChild('updateFailedString', { static: false }) updateFailedString: StringComponent;
@@ -34,9 +34,9 @@ export class FundTransferDialogComponent
 
     fundDataSource: (term: string) => Observable<ComboboxEntry>;
     destFund: ComboboxEntry = null;
-    sourceAmount: number = 0.0;
+    sourceAmount = 0.0;
     note = null;
+
     constructor(
         private idl: IdlService,
         private evt: EventService,
@@ -49,7 +49,7 @@ export class FundTransferDialogComponent
     ) {
         super(modal);
     }
-    
+
     ngOnInit() {
         this.destFund = null;
         this.onOpen$.subscribe(() => this._initRecord());
@@ -106,7 +106,7 @@ export class FundTransferDialogComponent
                     .then(str => this.toast.danger(str));
                 this.close(false);
             }
-        )
+        );
     }
 
 }
index 85d7758..2d052b3 100644 (file)
@@ -28,15 +28,15 @@ export class FundingSourceTransactionsDialogComponent
     fundingSource: IdlObject;
     idlDef: any;
     fieldOrder: any;
-    acqfaDataSource: GridDataSource
-    acqfscredDataSource: GridDataSource
+    acqfaDataSource: GridDataSource;
+    acqfscredDataSource: GridDataSource;
     cellTextGenerator: GridCellTextGenerator;
 
     @ViewChild('applyCreditDialog', { static: true }) applyCreditDialog: FmRecordEditorComponent;
     @ViewChild('allocateToFundDialog', { static: true }) allocateToFundDialog: FmRecordEditorComponent;
     @ViewChild('successString', { static: true }) successString: StringComponent;
     @ViewChild('updateFailedString', { static: false }) updateFailedString: StringComponent;
+
     constructor(
         private idl: IdlService,
         private evt: EventService,
@@ -50,7 +50,7 @@ export class FundingSourceTransactionsDialogComponent
     ) {
         super(modal);
     }
-    
+
     ngOnInit() {
         this.cellTextGenerator = {
             fund: row => {
@@ -60,7 +60,7 @@ export class FundingSourceTransactionsDialogComponent
         };
         this.fundingSource = null;
         this.onOpen$.subscribe(() => this._initRecord());
-        this.idlDef = this.idl.classes['acqfs']
+        this.idlDef = this.idl.classes['acqfs'];
         this.fieldOrder = 'name,code,year,org,active,currency_type,balance_stop_percentage,balance_warning_percentage,propagate,rollover';
     }
 
index cf7fb58..d5d541c 100644 (file)
@@ -33,7 +33,8 @@ export class FundingSourcesComponent extends AdminPageComponent implements OnIni
     @Input() startId: number;
 
     @ViewChild('grid', { static: true }) grid: GridComponent;
-    @ViewChild('fundingSourceTransactionsDialog', { static: false }) fundingSourceTransactionsDialog: FundingSourceTransactionsDialogComponent;
+    @ViewChild('fundingSourceTransactionsDialog', { static: false })
+        fundingSourceTransactionsDialog: FundingSourceTransactionsDialogComponent;
     @ViewChild('applyCreditDialog', { static: true }) applyCreditDialog: FmRecordEditorComponent;
     @ViewChild('allocateToFundDialog', { static: true }) allocateToFundDialog: FmRecordEditorComponent;
     @ViewChild('alertDialog', {static: false}) private alertDialog: AlertDialogComponent;
@@ -83,7 +84,7 @@ export class FundingSourcesComponent extends AdminPageComponent implements OnIni
                 order_by: orderBy,
                 flesh: 1,
                 flesh_fields: {
-                    acqfs: ['credits','allocations']
+                    acqfs: ['credits', 'allocations']
                 }
             };
             const reqOps = {
@@ -147,7 +148,7 @@ export class FundingSourcesComponent extends AdminPageComponent implements OnIni
     deleteSelected(rows: IdlObject[]) {
         if (rows.length > 0) {
             const id = rows[0].id();
-            let can: boolean = true;
+            let can = true;
             forkJoin([
                 this.pcrud.search('acqfa',      { funding_source: id }, { limit: 1 }, { atomic: true }),
                 this.pcrud.search('acqfscred',  { funding_source: id }, { limit: 1 }, { atomic: true }),
index cbdd164..e2684dd 100644 (file)
@@ -33,7 +33,7 @@ export class FundsManagerComponent extends AdminPageComponent implements OnInit,
     @ViewChild('grid', { static: true }) grid: GridComponent;
 
     cellTextGenerator: GridCellTextGenerator;
-    canRollover: boolean = false;
+    canRollover = false;
 
     constructor(
         route: ActivatedRoute,
index 145f9ec..f40a780 100644 (file)
@@ -23,7 +23,7 @@ export class FundsComponent implements OnInit {
             const tab = params.get('tab');
             const id = +params.get('id');
             if (!id || !tab) { return; }
-            if (tab === 'fund' || tab === 'funding_source') {  
+            if (tab === 'fund' || tab === 'funding_source') {
                 this.activeTab = tab;
                 if (tab === 'fund') {
                     this.fundId = id;