// Extract selected queue ID or create a new queue when requested.
resolveQueue(): Promise<number> {
- if (this.selectedQueue.freetext) {
+ if (this.selectedQueue && this.selectedQueue.freetext) {
// Free text queue selector means create a new entry.
// TODO: first check for name dupes
);
} else {
- return Promise.resolve(this.selectedQueue.id);
+ var queue_id = this.startQueueId;
+ if (this.selectedQueue) queue_id = this.selectedQueue.id;
+ return Promise.resolve(queue_id);
}
}
// Nothing to enqueue when processing pre-queued records
return Promise.resolve();
}
+ var spoolType = this.recordType;
+ if (this.recordType == 'authority') spoolType = 'auth'
- const method = `open-ils.vandelay.${this.recordType}.process_spool`;
+ const method = `open-ils.vandelay.${spoolType}.process_spool`;
return new Promise((resolve, reject) => {
this.net.request(
error_detail: rec.error_detail(),
import_time: rec.import_time(),
imported_as: rec.imported_as(),
- import_items: rec.import_items(),
- error_items: rec.import_items().filter(i => i.import_error()),
+ import_items: [],
+ error_items: [],
matches: rec.matches()
};
+ if (this.queueType === 'bib') {
+ recHash.import_items = rec.import_items();
+ recHash.error_items = rec.import_items().filter(i => i.import_error());
+ }
+
// Link the record attribute values to the root record
// object so the grid can find them.
rec.attributes().forEach(attr => {