From: Bill Erickson Date: Wed, 12 May 2021 14:25:40 +0000 (-0400) Subject: LP1842763 Vandelay retain queue, etc. selection X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a74186f77836a1e8d25816f018d4e5e7c33ae605;p=working%2FEvergreen.git LP1842763 Vandelay retain queue, etc. selection When importing from a preselected queue, retain the queue selection and other queue-related values and display the values in read-only mode instead of disabling them so they are easier to read. Signed-off-by: Bill Erickson --- 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 93f237ac8e..b9f059b251 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 @@ -50,7 +50,7 @@ @@ -82,7 +82,7 @@ id="queue-select" [startId]="startQueueId" [startIdFiresOnChange]="true" - [disabled]="startQueueId" + [readOnly]="startQueueId" (onChange)="selectedQueue=$event" i18n-placeholder [required]="true" [allowFreeText]="true" placeholder="Select or Create a Queue..."> @@ -95,7 +95,7 @@ @@ -108,7 +108,7 @@ @@ -131,7 +131,7 @@ id="item-import-def" [entries]="formatEntries('importItemDefs')" [startId]="selectedHoldingsProfile" - [disabled]="(selectedQueue && !selectedQueue.freetext) || importSelection()" + [readOnly]="(selectedQueue && !selectedQueue.freetext) || importSelection()" (onChange)="selectEntry($event, 'importItemDefs')" placeholder="Holdings Import Profile..." i18n-placeholder> 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 549254e9c2..1e86e7f840 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 @@ -385,6 +385,11 @@ export class ImportComponent implements OnInit, AfterViewInit, OnDestroy { // Extract selected queue ID or create a new queue when requested. resolveQueue(): Promise { + if (this.startQueueId) { + // Only happens when the queue is predefined / readonly + return Promise.resolve(this.startQueueId); + } + if (this.selectedQueue.freetext) { // Free text queue selector means create a new entry. // TODO: first check for name dupes