From 0ba927a2b64d579fda6d51c2390e8cba0596d365 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 30 Nov 2021 09:59:23 -0500 Subject: [PATCH] LP#1929749: fix lint Signed-off-by: Galen Charlton Signed-off-by: Ruth Frasur Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg --- .../app/staff/acq/picklist/routing.module.ts | 2 +- .../staff/acq/picklist/upload.component.ts | 39 +++++++++---------- .../app/staff/acq/picklist/upload.service.ts | 10 ++--- 3 files changed, 24 insertions(+), 27 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/acq/picklist/routing.module.ts b/Open-ILS/src/eg2/src/app/staff/acq/picklist/routing.module.ts index 1d304cbaca..1302fbd024 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/picklist/routing.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/picklist/routing.module.ts @@ -10,7 +10,7 @@ import {BriefRecordComponent} from '../lineitem/brief-record.component'; import {LineitemHistoryComponent} from '../lineitem/history.component'; import {UploadComponent} from './upload.component'; import {VandelayService} from '@eg/staff/cat/vandelay/vandelay.service'; -import {PicklistUploadService} from './upload.service' +import {PicklistUploadService} from './upload.service'; const routes: Routes = [{ path: 'brief-record', diff --git a/Open-ILS/src/eg2/src/app/staff/acq/picklist/upload.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/picklist/upload.component.ts index 86b691874e..22ae79d69a 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/picklist/upload.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/picklist/upload.component.ts @@ -18,7 +18,7 @@ import {ProgressInlineComponent} from '@eg/share/dialog/progress-inline.componen import {AlertDialogComponent} from '@eg/share/dialog/alert.component'; import {ServerStoreService} from '@eg/core/server-store.service'; import {PicklistUploadService} from './upload.service'; -import {OrgSelectComponent} from '@eg/share/org-select/org-select.component' +import {OrgSelectComponent} from '@eg/share/org-select/org-select.component'; const TEMPLATE_SETTING_NAME = 'eg.acq.picklist.upload.templates'; @@ -64,7 +64,7 @@ export class UploadComponent implements OnInit, AfterViewInit, OnDestroy { settings: Object = {}; recordType: string; - selectedQueue: ComboboxEntry; + selectedQueue: ComboboxEntry; activeSelectionListId: number; @@ -117,7 +117,7 @@ export class UploadComponent implements OnInit, AfterViewInit, OnDestroy { @ViewChild('fiscalYearSelector', { static: true }) private fiscalYearSelector: ComboboxComponent; @ViewChild('selectionListSelector', { static: true }) - private selectionListSelector: ComboboxComponent; + private selectionListSelector: ComboboxComponent; @ViewChild('matchSetSelector', { static: true }) private matchSetSelector: ComboboxComponent; @ViewChild('mergeProfileSelector', { static: true }) @@ -212,7 +212,7 @@ export class UploadComponent implements OnInit, AfterViewInit, OnDestroy { orgOnChange(org: IdlObject) { - this.orderingAgency = org.id() + this.orderingAgency = org.id(); } loadTemplates() { @@ -248,13 +248,13 @@ export class UploadComponent implements OnInit, AfterViewInit, OnDestroy { s => { return {id: s.id(), label: s.source()}; }); - + case 'providersList': return (this.vlagent.providersList || []).map( p => { return {id: p.id(), label: p.code()}; }); - + case 'fiscalYears': return (this.vlagent.fiscalYears || []).map( fy => { @@ -273,7 +273,7 @@ export class UploadComponent implements OnInit, AfterViewInit, OnDestroy { case 'matchSets': list = this.vlagent.matchSets['bib']; break; - + case 'importItemDefs': list = this.vlagent.importItemAttrDefs; @@ -327,7 +327,7 @@ export class UploadComponent implements OnInit, AfterViewInit, OnDestroy { break; } } - + fileSelected($event) { this.selectedFile = $event.target.files[0]; } @@ -339,8 +339,7 @@ export class UploadComponent implements OnInit, AfterViewInit, OnDestroy { Boolean(this.selectedProvider) && Boolean(this.orderingAgency); } - - + upload() { this.sessionKey = null; this.isUploading = true; @@ -406,10 +405,10 @@ export class UploadComponent implements OnInit, AfterViewInit, OnDestroy { resolveSelectionList(): Promise { if (!this.selectedSelectionList) { - return Promise.resolve() + return Promise.resolve(); } if (this.selectedSelectionList.id) { - this.activeSelectionListId = this.selectedSelectionList.id + this.activeSelectionListId = this.selectedSelectionList.id; } if (this.selectedSelectionList.freetext) { @@ -420,7 +419,7 @@ export class UploadComponent implements OnInit, AfterViewInit, OnDestroy { value => this.activeSelectionListId = value ); } - return Promise.resolve(this.activeSelectionListId); + return Promise.resolve(this.activeSelectionListId); } uploadFile(): Promise { @@ -469,8 +468,8 @@ export class UploadComponent implements OnInit, AfterViewInit, OnDestroy { if (this.vlagent.importSelection) { return Promise.resolve(); } - - let spoolType = this.recordType; + + const spoolType = this.recordType; const vandelayOptions = { import_no_match: this.importNonMatching, @@ -483,10 +482,9 @@ export class UploadComponent implements OnInit, AfterViewInit, OnDestroy { bib_source: this.selectedBibSource, create_assets: this.loadItems, queue_name: this.selectedQueue.label - } + }; const args = { - provider: this.selectedProvider, ordering_agency: this.orderingAgency, create_po: this.createPurchaseOrder, @@ -494,8 +492,7 @@ export class UploadComponent implements OnInit, AfterViewInit, OnDestroy { fiscal_year: this.selectedFiscalYear, picklist: this.activeSelectionListId, vandelay: vandelayOptions - } - + }; const method = `open-ils.acq.process_upload_records`; @@ -507,12 +504,12 @@ export class UploadComponent implements OnInit, AfterViewInit, OnDestroy { progress => { const resp = this.evt.parse(progress); console.log(progress); - if (resp) { console.error(resp); return reject();} + if (resp) { console.error(resp); return reject(); } if (progress.complete) { this.uploadProcessing = false; this.uploadComplete = true; } - if (progress.purchase_order) {this.newPO = progress.purchase_order.id();} + if (progress.purchase_order) {this.newPO = progress.purchase_order.id(); } } ); }); diff --git a/Open-ILS/src/eg2/src/app/staff/acq/picklist/upload.service.ts b/Open-ILS/src/eg2/src/app/staff/acq/picklist/upload.service.ts index 0cf0718f36..7b1f739bc3 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/picklist/upload.service.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/picklist/upload.service.ts @@ -11,7 +11,7 @@ import {PcrudService} from '@eg/core/pcrud.service'; import {PermService} from '@eg/core/perm.service'; import {EventService} from '@eg/core/event.service'; import {ProgressDialogComponent} from '@eg/share/dialog/progress.component'; -import {VandelayImportSelection} from '@eg/staff/cat/vandelay/vandelay.service' +import {VandelayImportSelection} from '@eg/staff/cat/vandelay/vandelay.service'; @Injectable() @@ -166,7 +166,7 @@ export class PicklistUploadService { getMatchSets(mtype: string): Promise { - const mstype = 'biblio' + const mstype = 'biblio'; if (this.matchSets[mtype]) { return Promise.resolve(this.matchSets[mtype]); @@ -220,8 +220,8 @@ export class PicklistUploadService { const newpicklist = this.idl.create('acqpl'); newpicklist.owner(this.auth.user().id()); newpicklist.name(picklistName); - newpicklist.org_unit(picklistOrg) - + newpicklist.org_unit(picklistOrg); + return new Promise((resolve, reject) => { this.net.request( 'open-ils.acq', 'open-ils.acq.picklist.create', @@ -236,6 +236,6 @@ export class PicklistUploadService { }); }); } - + } -- 2.43.2