From 08707f3958cc21e6955a7fafc25212771d80cc8d Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 16 Jul 2018 11:01:16 -0400 Subject: [PATCH] LP#1779158 Bib trash groups; show error detail Signed-off-by: Bill Erickson --- .../src/eg2/src/app/staff/cat/vandelay/export.component.ts | 13 ++++++++----- .../eg2/src/app/staff/cat/vandelay/import.component.html | 10 ++++++++++ .../src/eg2/src/app/staff/cat/vandelay/import.component.ts | 10 ++++++++-- .../src/eg2/src/app/staff/cat/vandelay/queue.component.html | 3 +-- .../src/eg2/src/app/staff/cat/vandelay/queue.component.ts | 1 + 5 files changed, 28 insertions(+), 9 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/export.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/export.component.ts index d7e4d0784f..253cfcb454 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/export.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/export.component.ts @@ -48,11 +48,14 @@ export class ExportComponent implements AfterViewInit { sourceChange($event: NgbPanelChangeEvent) { this.recordSource = $event.panelId; - // Give the tab a chance to change before focusing. - setTimeout(() => - this.renderer.selectRootElement( - '#' + this.recordSource + '-input').focus() - ) + if ($event.nextState) { // panel opened + + // give the panel a chance to render before focusing input + setTimeout(() => { + this.renderer.selectRootElement( + `#${this.recordSource}-input`).focus(); + }) + } } fileSelected($event) { diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.html b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.html index 2d4b150237..58f875b1a2 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.html +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.html @@ -151,6 +151,16 @@ +
+ +
+
+ +
diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.ts index 6689e1a924..925b28d64d 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.ts @@ -23,7 +23,7 @@ interface ImportOptions { opp_acq_copy_overlay?: boolean; merge_profile?: any; fall_through_merge_profile?: any; - strip_field_groups?: any; + strip_field_groups?: number[]; } @Component({ @@ -38,6 +38,9 @@ export class ImportComponent implements OnInit, AfterViewInit, OnDestroy { // a load-time queue before the queue combobox entries exist. startQueueId: number; + bibTrashGroups: IdlObject[]; + selectedTrashGroups: number[]; + activeQueueId: number; selectedBucket: number; selectedBibSource: number; @@ -93,6 +96,7 @@ export class ImportComponent implements OnInit, AfterViewInit, OnDestroy { this.minQualityRatio = 0; this.selectedBibSource = 1; // default to system local this.recordType = 'bib'; + this.bibTrashGroups = []; if (this.vandelay.importSelection) { @@ -149,6 +153,8 @@ export class ImportComponent implements OnInit, AfterViewInit, OnDestroy { this.vandelay.getBibBuckets(), this.vandelay.getBibSources(), this.vandelay.getItemImportDefs(), + this.vandelay.getBibTrashGroups().then( + groups => this.bibTrashGroups = groups), this.org.settings(['vandelay.default_match_set']).then( s => this.defaultMatchSet = s['vandelay.default_match_set']) ]; @@ -433,7 +439,7 @@ export class ImportComponent implements OnInit, AfterViewInit, OnDestroy { opp_acq_copy_overlay: this.autoOverlayAcqCopies, merge_profile: this.selectedMergeProfile, fall_through_merge_profile: this.selectedFallThruMergeProfile, - strip_field_groups: null // TODO + strip_field_groups: this.selectedTrashGroups }; if (this.vandelay.importSelection) { diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/queue.component.html b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/queue.component.html index 6136b13f2b..728b3ed559 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/queue.component.html +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/queue.component.html @@ -99,8 +99,7 @@ - - {{row.import_error}} + {{row.import_error}} diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/queue.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/queue.component.ts index 9d0ccb1af4..f6571f52c9 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/queue.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/queue.component.ts @@ -160,6 +160,7 @@ export class QueueComponent implements OnInit, AfterViewInit { const recHash: any = { id: rec.id(), import_error: rec.import_error(), + error_detail: rec.error_detail(), import_time: rec.import_time(), imported_as: rec.imported_as(), matches: rec.matches() -- 2.11.0