<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()"
[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()"
+ (recordSaved)="handleMarcRecordSaved($event)"
+ *ngIf="queueType !== 'bib'"></eg-marc-editor>
</ng-container>
</ng-template>
</ngb-tab>
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 => {
console.log('response = ', response);