From: Galen Charlton Date: Mon, 29 Mar 2021 15:48:46 +0000 (-0400) Subject: funds: fix lint X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f382fba6a7c96b30705b882a508b10f7d25bdc8d;p=working%2FEvergreen.git funds: fix lint Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-details-dialog.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-details-dialog.component.ts index 62a68f5c90..641dbcf021 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-details-dialog.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-details-dialog.component.ts @@ -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() { diff --git a/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-rollover-dialog.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-rollover-dialog.component.ts index 9d9590aed6..4aec6e54e9 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-rollover-dialog.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-rollover-dialog.component.ts @@ -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 } - ) + ); } } diff --git a/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-tags.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-tags.component.ts index 529bca2792..aba54fc129 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-tags.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-tags.component.ts @@ -29,7 +29,7 @@ export class FundTagsComponent implements OnInit { tagMaps: IdlObject[]; newTag: ComboboxEntry = null; - tagSelectorDataSource: (term: string) => Observable + tagSelectorDataSource: (term: string) => Observable; 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() - ) + ); } } diff --git a/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-transfer-dialog.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-transfer-dialog.component.ts index 85ad875689..f8904c337a 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-transfer-dialog.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-transfer-dialog.component.ts @@ -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; 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); } - ) + ); } } diff --git a/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funding-source-transactions-dialog.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funding-source-transactions-dialog.component.ts index 85d7758065..2d052b356f 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funding-source-transactions-dialog.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funding-source-transactions-dialog.component.ts @@ -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'; } diff --git a/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funding-sources.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funding-sources.component.ts index cf7fb58ddc..d5d541c327 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funding-sources.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funding-sources.component.ts @@ -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 }), diff --git a/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funds-manager.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funds-manager.component.ts index cbdd1642ca..e2684ddcc4 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funds-manager.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funds-manager.component.ts @@ -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, diff --git a/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funds.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funds.component.ts index 145f9ecefa..f40a7801fe 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funds.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funds.component.ts @@ -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;