--- /dev/null
+import {NgModule} from '@angular/core';
+import {EgCommonModule} from '@eg/common.module';
+import {CatalogService} from './catalog.service';
+import {CatalogUrlService} from './catalog-url.service';
+import {BibRecordService} from './bib-record.service';
+import {UnapiService} from './unapi.service';
+import {MarcHtmlComponent} from './marc-html.component';
+
+
+@NgModule({
+ declarations: [
+ MarcHtmlComponent
+ ],
+ imports: [
+ EgCommonModule
+ ],
+ exports: [
+ MarcHtmlComponent
+ ],
+ providers: [
+ CatalogService,
+ CatalogUrlService,
+ UnapiService,
+ BibRecordService
+ ]
+})
+
+export class CatalogCommonModule {}
let service = 'open-ils.search';
let method = 'open-ils.search.biblio.record.html';
+ let params: any[] = [this.recId];
switch (this.recType) {
break;
case 'vandelay-authority':
+ params.unshift(this.auth.token());
service = 'open-ils.vandelay';
method = 'open-ils.vandelay.queued_authority_record.html';
break;
case 'vandelay-bib':
+ params.unshift(this.auth.token());
service = 'open-ils.vandelay';
method = 'open-ils.vandelay.queued_bib_record.html';
break;
}
- this.net.request(
- service, method, this.auth.token(), this.recId
- ).toPromise().then(html => this.injectHtml(html));
+ this.net.requestWithParamList(service, method, params)
+ .toPromise().then(html => this.injectHtml(html));
}
injectHtml(html: string) {
}
ngOnInit() {
+
+ if (!this.dataSource) {
+ throw new Error('<eg-grid/> requires a [dataSource]');
+ }
+
this.context.idlClass = this.idlClass;
this.context.dataSource = this.dataSource;
this.context.persistKey = this.persistKey;
import {NgModule} from '@angular/core';
import {StaffCommonModule} from '@eg/staff/common.module';
import {GridModule} from '@eg/share/grid/grid.module';
-import {UnapiService} from '@eg/share/catalog/unapi.service';
+import {CatalogCommonModule} from '@eg/share/catalog/catalog-common.module';
import {CatalogRoutingModule} from './routing.module';
-import {BibRecordService} from '@eg/share/catalog/bib-record.service';
-import {CatalogService} from '@eg/share/catalog/catalog.service';
-import {CatalogUrlService} from '@eg/share/catalog/catalog-url.service';
import {CatalogComponent} from './catalog.component';
import {SearchFormComponent} from './search-form.component';
import {ResultsComponent} from './result/results.component';
import {RecordComponent} from './record/record.component';
import {CopiesComponent} from './record/copies.component';
-import {BibSummaryComponent} from '@eg/staff/share/bib-summary/bib-summary.component';
import {ResultPaginationComponent} from './result/pagination.component';
import {ResultFacetsComponent} from './result/facets.component';
import {ResultRecordComponent} from './result/record.component';
ResultsComponent,
RecordComponent,
CopiesComponent,
- BibSummaryComponent,
SearchFormComponent,
ResultRecordComponent,
ResultFacetsComponent,
imports: [
StaffCommonModule,
GridModule,
+ CatalogCommonModule,
CatalogRoutingModule
],
providers: [
- UnapiService,
- BibRecordService,
- CatalogService,
- CatalogUrlService,
StaffCatalogService,
HoldingsService
]
import {FmRecordEditorComponent} from '@eg/share/fm-editor/fm-editor.component';
import {DateSelectComponent} from '@eg/share/date-select/date-select.component';
import {RecordBucketDialogComponent} from '@eg/staff/share/buckets/record-bucket-dialog.component';
-import {MarcHtmlComponent} from '@eg/share/catalog/marc-html.component';
+import {BibSummaryComponent} from '@eg/staff/share/bib-summary/bib-summary.component';
/**
* Imports the EG common modules and adds modules common to all staff UI's.
FmRecordEditorComponent,
DateSelectComponent,
RecordBucketDialogComponent,
- MarcHtmlComponent
+ BibSummaryComponent
],
imports: [
EgCommonModule
FmRecordEditorComponent,
DateSelectComponent,
RecordBucketDialogComponent,
- MarcHtmlComponent
+ BibSummaryComponent
]
})