return from([]);
}
- //return this.getCopyCountsBatch(ids)
-
return this.pcrud.search('bre', {id: ids},
{ flesh: 1,
flesh_fields: {bre: ['flat_display_entries', 'mattrs']},
}));
}
- getCopyCountsBatch(recordIds: number[],
- orgId: number, isStaff?: boolean, isMetarecord?: boolean): Promise<any> {
-
- let method = 'open-ils.search.biblio.record.copy_count.batch';
-
- if (isMetarecord) {
- method = method.replace(/record/, 'metarecord/');
- }
-
- if (isStaff) { method += '.staff'; }
-
- return this.net.request(
- 'open-ils.search', method, orgId, recordIds
- ).toPromise();
- }
-
// A Metabib Summary is a BibRecordSummary with the lead record as
// its core bib record plus attributes (e.g. formats) from related
// records.
getHoldingsSummary(recordId: number,
orgId: number, orgDepth: number, isMetarecord?: boolean): Promise<any> {
- let method = 'open-ils.search.biblio.record.copy_count';
-
- if (isMetarecord) {
- method = method.replace(/record/, 'metarecord/');
- }
-
- // TODO: isStaff param / replace depth
- method += '.staff';
-
- return this.net.request(
- 'open-ils.search', method, orgId, recordId
- ).toPromise();
- }
-
- getHoldingsSummaryUnapi(recordId: number,
- orgId: number, orgDepth: number, isMetarecord?: boolean): Promise<any> {
-
const holdingsSummary = [];
return this.unapi.getAsXmlDocument({