LP#1830923: add support for editing queued authority records user/gmcharlt/lp1830923_signoff_and_followup-3.3
authorGalen Charlton <gmc@equinoxinitiative.org>
Wed, 4 Dec 2019 22:34:45 +0000 (17:34 -0500)
committerGalen Charlton <gmc@equinoxinitiative.org>
Wed, 4 Dec 2019 22:52:33 +0000 (17:52 -0500)
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/eg2/src/app/staff/cat/vandelay/queued-record.component.html
Open-ILS/src/eg2/src/app/staff/cat/vandelay/queued-record.component.ts

index ebb51b4..b8fcdec 100644 (file)
   <ngb-tab title="Edit Record" i18n-title id="edit">
     <ng-template ngbTabContent>
       <ng-container *ngIf="queuedRecord">
-        <eg-marc-editor [inPlaceMode]="true" [recordXml]="queuedRecord.marc()" 
+        <eg-marc-editor [inPlaceMode]="true" [recordXml]="queuedRecord.marc()"
           [hideFullEditorLink]="true"
           [recordSource]="queuedRecord.bib_source()"
-          (recordSaved)="handleMarcRecordSaved($event)"></eg-marc-editor>   
+          (recordSaved)="handleMarcRecordSaved($event)"
+          *ngIf="queueType === 'bib'"></eg-marc-editor>
+        <eg-marc-editor [inPlaceMode]="true" [recordXml]="queuedRecord.marc()"
+          [hideFullEditorLink]="true"
+          (recordSaved)="handleMarcRecordSaved($event)"
+          *ngIf="queueType !== 'bib'"></eg-marc-editor>
       </ng-container>
     </ng-template>
   </ngb-tab>
index 3b5ba4c..87ef080 100644 (file)
@@ -53,13 +53,15 @@ export class QueuedRecordComponent {
 
     loadRecord() {
         this.queuedRecord = null;
-        this.pcrud.retrieve('vqbr', this.recordId)
+        this.pcrud.retrieve((this.queueType === 'bib' ? 'vqbr' : 'vqar'), this.recordId)
         .subscribe(rec => this.queuedRecord = rec);
     }
 
     handleMarcRecordSaved(saveEvent: any) {
         this.queuedRecord.marc(saveEvent.marcXml);
-        this.queuedRecord.bib_source(saveEvent.bibSource);
+        if (this.queueType === 'bib') {
+            this.queuedRecord.bib_source(saveEvent.bibSource);
+        }
         this.pcrud.update(this.queuedRecord).subscribe(
             response => this.toast.success(this.updateSuccess.text),
             error => {