From 5fa9c2daf9a559e3a9c143632e7ca1243cb82a99 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Sun, 3 Dec 2017 11:06:36 -0500 Subject: [PATCH] LP#626157 Ang2 experiments Signed-off-by: Bill Erickson --- .../js/ui/default/staff/cat/services/holdings.js | 2 +- Open-ILS/webby-src/package.json | 1 + Open-ILS/webby-src/src/app/base.module.ts | 6 +- Open-ILS/webby-src/src/app/core/README | 9 +- Open-ILS/webby-src/src/app/core/auth.ts | 2 +- .../src/app/core/{net.service.ts => net.ts} | 0 Open-ILS/webby-src/src/app/core/pcrud.ts | 2 +- Open-ILS/webby-src/src/app/share/README | 7 + Open-ILS/webby-src/src/app/share/unapi.ts | 66 +++++ .../admin/workstation/workstations.component.ts | 2 +- .../src/app/staff/catalog/catalog.component.html | 4 + .../src/app/staff/catalog/catalog.component.ts | 14 + .../src/app/staff/catalog/catalog.module.ts | 28 ++ .../src/app/staff/catalog/catalog.service.ts | 316 +++++++++++++++++++++ .../src/app/staff/catalog/routing.module.ts | 20 ++ .../src/app/staff/catalog/search.component.html | 12 + .../src/app/staff/catalog/search.component.ts | 40 +++ .../circ/patron/bcsearch/bcsearch.component.ts | 2 +- .../webby-src/src/app/staff/resolver.service.ts | 2 +- Open-ILS/webby-src/src/app/staff/routing.module.ts | 3 + .../webby-src/src/app/staff/splash.component.html | 3 + .../webby-src/src/app/staff/staff.component.ts | 2 +- 22 files changed, 531 insertions(+), 12 deletions(-) rename Open-ILS/webby-src/src/app/core/{net.service.ts => net.ts} (100%) create mode 100644 Open-ILS/webby-src/src/app/share/README create mode 100644 Open-ILS/webby-src/src/app/share/unapi.ts create mode 100644 Open-ILS/webby-src/src/app/staff/catalog/catalog.component.html create mode 100644 Open-ILS/webby-src/src/app/staff/catalog/catalog.component.ts create mode 100644 Open-ILS/webby-src/src/app/staff/catalog/catalog.module.ts create mode 100644 Open-ILS/webby-src/src/app/staff/catalog/catalog.service.ts create mode 100644 Open-ILS/webby-src/src/app/staff/catalog/routing.module.ts create mode 100644 Open-ILS/webby-src/src/app/staff/catalog/search.component.html create mode 100644 Open-ILS/webby-src/src/app/staff/catalog/search.component.ts diff --git a/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js b/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js index 1d97a49ddd..f0e0185c78 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js +++ b/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js @@ -253,7 +253,7 @@ function(egCore , $q) { var owner_name_list = []; while (owner.parent_ou()) { // we're going to skip the top of the tree... - owner_name_list.unshift(owner.name()); + owner_name_list.unshift(owner.shortname()); owner = egCore.org.get(owner.parent_ou()); } diff --git a/Open-ILS/webby-src/package.json b/Open-ILS/webby-src/package.json index 88f8edc6f0..41b5925989 100644 --- a/Open-ILS/webby-src/package.json +++ b/Open-ILS/webby-src/package.json @@ -36,6 +36,7 @@ "@types/jasminewd2": "~2.0.2", "@types/jquery": "^3.2.16", "@types/node": "~6.0.60", + "@types/xml2js": "^0.4.2", "codelyzer": "~3.2.0", "jasmine-core": "~2.6.2", "jasmine-spec-reporter": "~4.1.0", diff --git a/Open-ILS/webby-src/src/app/base.module.ts b/Open-ILS/webby-src/src/app/base.module.ts index 7f2df7c7ec..f462f84db1 100644 --- a/Open-ILS/webby-src/src/app/base.module.ts +++ b/Open-ILS/webby-src/src/app/base.module.ts @@ -8,6 +8,7 @@ import {NgModule} from '@angular/core'; import {Router} from '@angular/router'; // Debugging import {NgbModule} from '@ng-bootstrap/ng-bootstrap'; import {CookieModule} from 'ngx-cookie'; // import CookieMonster +import {HttpClientModule} from '@angular/common/http'; import {EgBaseComponent} from './base.component'; import {EgBaseRoutingModule} from './routing.module'; @@ -17,7 +18,7 @@ import {WelcomeComponent} from './welcome.component'; import {EgEventService} from '@eg/core/event'; import {EgStoreService} from '@eg/core/store'; import {EgIdlService} from '@eg/core/idl'; -import {EgNetService} from '@eg/core/net.service'; +import {EgNetService} from '@eg/core/net'; import {EgAuthService} from '@eg/core/auth'; import {EgPcrudService} from '@eg/core/pcrud'; import {EgOrgService} from '@eg/core/org'; @@ -31,7 +32,8 @@ import {EgOrgService} from '@eg/core/org'; EgBaseRoutingModule, BrowserModule, NgbModule.forRoot(), - CookieModule.forRoot() + CookieModule.forRoot(), + HttpClientModule ], providers: [ EgEventService, diff --git a/Open-ILS/webby-src/src/app/core/README b/Open-ILS/webby-src/src/app/core/README index 68dff847e9..58828bed85 100644 --- a/Open-ILS/webby-src/src/app/core/README +++ b/Open-ILS/webby-src/src/app/core/README @@ -1,5 +1,8 @@ -Core types (classes) and Angular services used by all modules. +Core Angular services and assocated types/classes. -NOTES: +Core services are imported and exported by the base module, which means +they are automatically added as dependencies to ALL applications. + +1. Only add services here that are universally required! +2. Avoid path navigation in the core services as paths will vary by application. -* Avoid path navigation in the core services as paths will vary by application. diff --git a/Open-ILS/webby-src/src/app/core/auth.ts b/Open-ILS/webby-src/src/app/core/auth.ts index b544ae9fbd..87d5c70888 100644 --- a/Open-ILS/webby-src/src/app/core/auth.ts +++ b/Open-ILS/webby-src/src/app/core/auth.ts @@ -3,7 +3,7 @@ */ import { Injectable, EventEmitter } from '@angular/core'; import { Observable } from 'rxjs/Rx'; -import { EgNetService } from './net.service'; +import { EgNetService } from './net'; import { EgEventService, EgEvent } from './event'; import { EgIdlService, EgIdlObject } from './idl'; import { EgStoreService } from './store'; diff --git a/Open-ILS/webby-src/src/app/core/net.service.ts b/Open-ILS/webby-src/src/app/core/net.ts similarity index 100% rename from Open-ILS/webby-src/src/app/core/net.service.ts rename to Open-ILS/webby-src/src/app/core/net.ts diff --git a/Open-ILS/webby-src/src/app/core/pcrud.ts b/Open-ILS/webby-src/src/app/core/pcrud.ts index b6185cbed2..0cee7d3073 100644 --- a/Open-ILS/webby-src/src/app/core/pcrud.ts +++ b/Open-ILS/webby-src/src/app/core/pcrud.ts @@ -2,7 +2,7 @@ import {Injectable} from '@angular/core'; import {Observable, Observer} from 'rxjs/Rx'; //import {toPromise} from 'rxjs/operators'; import {EgIdlService, EgIdlObject} from './idl'; -import {EgNetService, EgNetRequest} from './net.service'; +import {EgNetService, EgNetRequest} from './net'; import {EgAuthService} from './auth'; // Used for debugging. diff --git a/Open-ILS/webby-src/src/app/share/README b/Open-ILS/webby-src/src/app/share/README new file mode 100644 index 0000000000..1a8b6e1646 --- /dev/null +++ b/Open-ILS/webby-src/src/app/share/README @@ -0,0 +1,7 @@ +Common Angular services and associated types/classes. + +This collection of services MIGHT be used by practically all applications. +They are NOT automatically imported/exported by the base module and should +be loaded within the requesting application as needed. + + diff --git a/Open-ILS/webby-src/src/app/share/unapi.ts b/Open-ILS/webby-src/src/app/share/unapi.ts new file mode 100644 index 0000000000..bf2f44c825 --- /dev/null +++ b/Open-ILS/webby-src/src/app/share/unapi.ts @@ -0,0 +1,66 @@ +import {Injectable, EventEmitter} from '@angular/core'; +import {EgOrgService} from '@eg/core/org'; +import {HttpClient} from '@angular/common/http'; +import {Parser} from 'xml2js'; + +/* +TODO: Add Display Fields to UNAPI +https://library.biz/opac/extras/unapi?id=tag::U2@bre/1{bre.extern,holdings_xml,mra}/BR1/0&format=mods32 +*/ + +const UNAPI_PATH = '/opac/extras/unapi?id=tag::U2@'; + +interface EgUnapiParams { + target: string; // bre, ... + id: number | string; // 1 | 1,2,3,4,5 + extras: string; // {holdings_xml,mra,...} + format: string; // mods32, marxml, ... + orgId?: number; // org unit ID + depth?: number; // org unit depth +}; + +@Injectable() +export class EgUnapiService { + + constructor( + private org: EgOrgService, + private http: HttpClient + ) {} + + /** + * Retrieve an UNAPI document and return it as an XML string + */ + getAsXmlString(params: EgUnapiParams): Promise { + let depth = params.depth || 0; + let org = params.orgId ? this.org.get(params.orgId) : this.org.root(); + + let url = `${UNAPI_PATH}${params.target}/${params.id}${params.extras}/` + + `${org.shortname()}/${depth}&format=${params.format}`; + + return new Promise((resolve, reject) => { + this.http.get(url, {responseType: 'text'}) + .subscribe(xmlStr => resolve(xmlStr)); + }); + } + + /** + * Retrieve an UNAPI document and return its object form, as + * generated by xml2js. + */ + getAsObject(params: EgUnapiParams): Promise { + return new Promise((resolve, reject) => { + this.getAsXmlString(params) + .then(xmlStr => { + new Parser().parseString(xmlStr, (err, unapiBlob) => { + if (err) { + reject(err); + } else { + resolve(unapiBlob); + } + }); + }); + }); + } +} + + diff --git a/Open-ILS/webby-src/src/app/staff/admin/workstation/workstations.component.ts b/Open-ILS/webby-src/src/app/staff/admin/workstation/workstations.component.ts index 861d388b91..27574b35da 100644 --- a/Open-ILS/webby-src/src/app/staff/admin/workstation/workstations.component.ts +++ b/Open-ILS/webby-src/src/app/staff/admin/workstation/workstations.component.ts @@ -2,7 +2,7 @@ import {Component, OnInit} from '@angular/core'; import {ActivatedRoute} from '@angular/router'; import {EgStoreService} from '@eg/core/store'; import {EgIdlObject} from '@eg/core/idl'; -import {EgNetService} from '@eg/core/net.service'; +import {EgNetService} from '@eg/core/net'; import {EgAuthService} from '@eg/core/auth'; import {EgOrgService} from '@eg/core/org'; diff --git a/Open-ILS/webby-src/src/app/staff/catalog/catalog.component.html b/Open-ILS/webby-src/src/app/staff/catalog/catalog.component.html new file mode 100644 index 0000000000..024bf0b208 --- /dev/null +++ b/Open-ILS/webby-src/src/app/staff/catalog/catalog.component.html @@ -0,0 +1,4 @@ + +

CATALOG

+ + diff --git a/Open-ILS/webby-src/src/app/staff/catalog/catalog.component.ts b/Open-ILS/webby-src/src/app/staff/catalog/catalog.component.ts new file mode 100644 index 0000000000..5b6618221d --- /dev/null +++ b/Open-ILS/webby-src/src/app/staff/catalog/catalog.component.ts @@ -0,0 +1,14 @@ +import {Component, OnInit} from '@angular/core'; +import {Observable} from 'rxjs/Rx'; +import {ActivatedRoute} from '@angular/router'; + +@Component({ + templateUrl: 'catalog.component.html' +}) +export class EgCatalogComponent implements OnInit { + constructor() {} + + ngOnInit() { } + +} + diff --git a/Open-ILS/webby-src/src/app/staff/catalog/catalog.module.ts b/Open-ILS/webby-src/src/app/staff/catalog/catalog.module.ts new file mode 100644 index 0000000000..37d31314fe --- /dev/null +++ b/Open-ILS/webby-src/src/app/staff/catalog/catalog.module.ts @@ -0,0 +1,28 @@ +import {CommonModule} from '@angular/common'; +import {NgModule} from '@angular/core'; +import {EgStaffModule} from '../staff.module'; +import {EgCatalogRoutingModule} from './routing.module'; +import {EgUnapiService} from '@eg/share/unapi'; +import {EgCatalogComponent} from './catalog.component'; +import {EgCatalogSearchComponent} from './search.component'; +import {EgCatalogService} from './catalog.service'; + +@NgModule({ + declarations: [ + EgCatalogComponent, + EgCatalogSearchComponent + ], + imports: [ + EgStaffModule, + CommonModule, + EgCatalogRoutingModule + ], + providers: [ + EgUnapiService, + EgCatalogService + ] +}) + +export class EgCatalogModule { + +} diff --git a/Open-ILS/webby-src/src/app/staff/catalog/catalog.service.ts b/Open-ILS/webby-src/src/app/staff/catalog/catalog.service.ts new file mode 100644 index 0000000000..d4f3581485 --- /dev/null +++ b/Open-ILS/webby-src/src/app/staff/catalog/catalog.service.ts @@ -0,0 +1,316 @@ +import {Injectable, EventEmitter} from '@angular/core'; +import {EgOrgService} from '@eg/core/org'; +import {EgUnapiService} from '@eg/share/unapi'; +import {EgIdlObject} from '@eg/core/idl'; +import {EgNetService} from '@eg/core/net'; +import {EgPcrudService} from '@eg/core/pcrud'; + +const CCVM_FILTER_TYPES = [ + 'item_type', + 'item_form', + 'item_lang', + 'audience', + 'audience_group', + 'vr_format', + 'bib_level', + 'lit_form', + 'search_format' +]; + +class Paginator { + offset: number = 0; + limit: number = 15; + resultCount: number; + + isFirstPage(): boolean { + return this.offset == 0; + } + + isLastPage(): boolean { + return this.currentPage() == this.pageCount(); + } + + currentPage(): number { + return Math.floor(this.offset / this.limit) + 1 + } + + pageCount(): number { + let pages = this.resultCount / this.limit; + if (Math.floor(pages) < pages) + pages = Math.floor(pages) + 1; + return pages; + } + + pageList(): number[] { + let list = []; + for(let i = 1; i <= this.pageCount(); i++) + list.push(i); + return list; + } +} + +export class FacetFilter { + facetClass: string; + facetName: string; + facetValue: string; +} + +export class CatalogContext { + available: boolean = false; + global: boolean = false; + sort: string; + searchClass: string[]; + query: string[]; + joiner: string[]; + match: string[]; + format: string; + searchOrg: EgIdlObject; + ccvmFilters: {[ccvm:string] : string} = {}; + facetFilters: FacetFilter[] = []; + paginator: Paginator = new Paginator(); + result: any; + org: EgOrgService; + + compileSearch(): string { + + let str: string = ''; + + if (this.available) str += ' #available'; + + if (this.sort) { + // e.g. title, title.descending + let parts = this.sort.split(/\./); + if (parts[1]) str += ' #descending'; + str += ' sort(' + parts[0] + ')'; + } + + // ------- + // Compile boolean sub-query components + if (str.length) str += ' '; + let qcount = this.query.length; + + // if we multiple boolean query components, wrap them in parens. + if (qcount > 1) str += '('; + this.query.forEach((q, idx) => { + str += this.compileBoolQuerySet(idx) + }); + if (qcount > 1) str += ')'; + // ------- + + if (this.format) { + str += ' format(' + this.format + ')'; + } + + if (this.global) { + str += ' depth(' + + this.org.root().ou_type().depth() + ')'; + } + + str += ' site(' + this.searchOrg.shortname() + ')'; + + Object.keys(this.ccvmFilters).forEach(field => { + str += ' ' + field + '(' + this.ccvmFilters[field] + ')'; + }); + + this.facetFilters.forEach(f => { + str += ' ' + f.facetClass + '|' + + f.facetName + '[' + f.facetValue + ']'; + }); + + return str; + } + + stripQuotes(query: string): string { + return query.replace(/"/g, ''); + } + + stripAnchors(query: string): string { + return query.replace(/[\^\$]/g, ''); + } + + addQuotes(query: string): string { + if (query.match(/ /)) + return '"' + query + '"' + return query; + }; + + compileBoolQuerySet(idx: number): string { + let query = this.query[idx]; + let joiner = this.joiner[idx]; + let match = this.match[idx]; + let searchClass = this.searchClass[idx]; + + let str = ''; + if (!query) return str; + + if (idx > 0) str += ' ' + joiner + ' '; + + str += '('; + if (searchClass) str += searchClass + ':'; + + switch(match) { + case 'phrase': + query = this.addQuotes(this.stripQuotes(query)); + break; + case 'nocontains': + query = '-' + this.addQuotes(this.stripQuotes(query)); + break; + case 'exact': + query = '^' + this.stripAnchors(query) + '$'; + break; + case 'starts': + query = this.addQuotes('^' + + this.stripAnchors(this.stripQuotes(query))); + break; + } + + return str + query + ')'; + } +} + + +@Injectable() +export class EgCatalogService { + + ccvmMap: {[ccvm:string] : EgIdlObject[]} = {}; + cmfMap: {[cmf:string] : EgIdlObject[]} = {}; + + constructor( + private net: EgNetService, + private org: EgOrgService, + private unapi: EgUnapiService, + private pcrud: EgPcrudService + ) {} + + + search(context: CatalogContext): Promise { + + var fullQuery = context.compileSearch(); + + console.debug(`search query: ${fullQuery}`); + + return new Promise((resolve, reject) => { + + this.net.request( + 'open-ils.search', + 'open-ils.search.biblio.multiclass.query.staff', { + limit : context.paginator.limit, + offset : context.paginator.offset + }, fullQuery, true + ).subscribe(result => { + context.result = result; + context.result.records = []; + context.paginator.resultCount = result.count; + + let promises = []; + result.ids.forEach(blob => { + promises.push( + this.getBibSummary(blob[0], + context.searchOrg.id(), + context.global ? + context.org.root().ou_typ().depth() : + context.searchOrg.ou_type().depth() + ).then( + summary => context.result.records.push(summary) + ) + ); + }); + + Promise.all(promises).then(ok => resolve()); + }); + }) + } + + fetchCcvms(): Promise { + + if (Object.keys(this.ccvmMap).length) + return Promise.resolve(); + + return new Promise((resolve, reject) => { + this.pcrud.search('ccvm', + {ctype : CCVM_FILTER_TYPES}, {}, {atomic: true} + ).subscribe(list => { + console.debug(list); + this.compileCcvms(list); + resolve(); + }) + }); + } + + compileCcvms(ccvms : EgIdlObject[]): void { + ccvms.forEach(ccvm => { + if (!this.ccvmMap[ccvm.ctype()]) + this.ccvmMap[ccvm.ctype()] = []; + this.ccvmMap[ccvm.ctype()].push(ccvm); + }); + + Object.keys(this.ccvmMap).forEach(cType => { + this.ccvmMap[cType] = + this.ccvmMap[cType].sort((a, b) => { + return a.value() < b.value() ? -1 : 1; + }); + }); + } + + + fetchCmfs(): Promise { + // At the moment, we only need facet CMFs. + if (Object.keys(this.cmfMap).length) + return Promise.resolve(); + + return new Promise((resolve, reject) => { + this.pcrud.search('cmf', + {facet_field : 't'}, {}, {atomic : true} + ).subscribe( + cmfs => { + cmfs.forEach(c => this.cmfMap[c.id()] = c); + resolve(); + } + ) + }); + } + + /** + * Probably don't want to require navigating the bare UNAPI + * blob in the template, plus that's quite a lot of stuff + * to sit in the scope / watch for changes. Translate the + * UNAPI content into a more digestable form. + * TODO: Add display field support + */ + translateBibSummary(summary: any): any { // TODO: bib summary type + const UNAPI_PATHS = { + title : 'titleInfo[0].title[0]', + author: 'name[0].namePart[0]', + genre: 'genre[0]._' + } + + let response = {}; + for (let key in UNAPI_PATHS) { + try { + response[key] = eval(`summary.mods.${UNAPI_PATHS[key]}`); + } catch(E) { + response[key] =''; + } + } + + return response; + } + + getBibSummary(bibId: number, orgId: number, depth: number): Promise { + return new Promise((resolve, reject) => { + this.unapi.getAsObject({ + target: 'bre', + id: bibId, + extras: '{bre.extern,holdings_xml,mra}', + format: 'mods32', + orgId: orgId, + depth: depth + }).then(summary => { + summary = this.translateBibSummary(summary); + summary.id = bibId; + resolve(summary); + }); + }); + } + +} diff --git a/Open-ILS/webby-src/src/app/staff/catalog/routing.module.ts b/Open-ILS/webby-src/src/app/staff/catalog/routing.module.ts new file mode 100644 index 0000000000..3cafbb4d13 --- /dev/null +++ b/Open-ILS/webby-src/src/app/staff/catalog/routing.module.ts @@ -0,0 +1,20 @@ +import {NgModule} from '@angular/core'; +import {RouterModule, Routes} from '@angular/router'; +import {EgCatalogComponent} from './catalog.component'; +import {EgCatalogSearchComponent} from './search.component'; + +const routes: Routes = [{ + path: '', + component: EgCatalogComponent, + children : [{ + path: 'search', + component: EgCatalogSearchComponent, + }] +}]; + +@NgModule({ + imports: [ RouterModule.forChild(routes) ], + exports: [ RouterModule ] +}) + +export class EgCatalogRoutingModule {} diff --git a/Open-ILS/webby-src/src/app/staff/catalog/search.component.html b/Open-ILS/webby-src/src/app/staff/catalog/search.component.html new file mode 100644 index 0000000000..3e5aebc1ed --- /dev/null +++ b/Open-ILS/webby-src/src/app/staff/catalog/search.component.html @@ -0,0 +1,12 @@ + +

Search Sample

+ +
+
+
{{idx + 1}}
+
{{record.title}}
+
{{record.author}}
+
{{record.genre}}
+
+
+ diff --git a/Open-ILS/webby-src/src/app/staff/catalog/search.component.ts b/Open-ILS/webby-src/src/app/staff/catalog/search.component.ts new file mode 100644 index 0000000000..39a6ec8aac --- /dev/null +++ b/Open-ILS/webby-src/src/app/staff/catalog/search.component.ts @@ -0,0 +1,40 @@ +import {Component, OnInit} from '@angular/core'; +import {ActivatedRoute} from '@angular/router'; +import {EgAuthService} from '@eg/core/auth'; +import {EgOrgService} from '@eg/core/org'; +import {EgCatalogService, CatalogContext} from './catalog.service'; + +@Component({ + templateUrl: 'search.component.html' +}) +export class EgCatalogSearchComponent implements OnInit { + + context: CatalogContext; + + constructor( + private auth: EgAuthService, + private org: EgOrgService, + private cat: EgCatalogService + ) {} + + ngOnInit() { + this.context = new CatalogContext(); + + this.cat.fetchCcvms().then(ok => { // TODO: catalog resolver + console.log(this.cat.ccvmMap); + + this.context.searchClass = ['keyword']; + this.context.query = ['piano']; + this.context.joiner = ['&&']; + this.context.match = ['contains']; + this.context.format = null; + this.context.org = this.org; // hmm, refactor maybe + this.context.searchOrg = this.org.get(4); // BR1 + + this.cat.search(this.context).then(ok => { + console.log('ALL DONE SEARCH'); + }); + }); + } +} + diff --git a/Open-ILS/webby-src/src/app/staff/circ/patron/bcsearch/bcsearch.component.ts b/Open-ILS/webby-src/src/app/staff/circ/patron/bcsearch/bcsearch.component.ts index 3cc225e92b..cfc2ee2143 100644 --- a/Open-ILS/webby-src/src/app/staff/circ/patron/bcsearch/bcsearch.component.ts +++ b/Open-ILS/webby-src/src/app/staff/circ/patron/bcsearch/bcsearch.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { EgNetService } from '@eg/core/net.service'; +import { EgNetService } from '@eg/core/net'; import { EgAuthService } from '@eg/core/auth'; @Component({ diff --git a/Open-ILS/webby-src/src/app/staff/resolver.service.ts b/Open-ILS/webby-src/src/app/staff/resolver.service.ts index a811ff931a..492663f0a9 100644 --- a/Open-ILS/webby-src/src/app/staff/resolver.service.ts +++ b/Open-ILS/webby-src/src/app/staff/resolver.service.ts @@ -4,7 +4,7 @@ import { Observable, Observer } from 'rxjs/Rx'; import { Router, Resolve, RouterStateSnapshot, ActivatedRouteSnapshot } from '@angular/router'; import { EgStoreService } from '@eg/core/store'; -import { EgNetService } from '@eg/core/net.service'; +import { EgNetService } from '@eg/core/net'; import { EgAuthService } from '@eg/core/auth'; /** diff --git a/Open-ILS/webby-src/src/app/staff/routing.module.ts b/Open-ILS/webby-src/src/app/staff/routing.module.ts index 31a42c338c..eaeaafd2a3 100644 --- a/Open-ILS/webby-src/src/app/staff/routing.module.ts +++ b/Open-ILS/webby-src/src/app/staff/routing.module.ts @@ -26,6 +26,9 @@ const routes: Routes = [{ path: 'circ', loadChildren : '@eg/staff/circ/circ.module#EgCircModule' }, { + path: 'catalog', + loadChildren : '@eg/staff/catalog/catalog.module#EgCatalogModule' + }, { path: 'admin', loadChildren : '@eg/staff/admin/admin.module#EgAdminModule' }] diff --git a/Open-ILS/webby-src/src/app/staff/splash.component.html b/Open-ILS/webby-src/src/app/staff/splash.component.html index 85b2d35f2e..025903195d 100644 --- a/Open-ILS/webby-src/src/app/staff/splash.component.html +++ b/Open-ILS/webby-src/src/app/staff/splash.component.html @@ -4,4 +4,7 @@ Some links to test... Workstation Admin +
+
+Catalog Test diff --git a/Open-ILS/webby-src/src/app/staff/staff.component.ts b/Open-ILS/webby-src/src/app/staff/staff.component.ts index 6989cd0673..e4808a9efe 100644 --- a/Open-ILS/webby-src/src/app/staff/staff.component.ts +++ b/Open-ILS/webby-src/src/app/staff/staff.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { Router, ActivatedRoute, NavigationEnd } from '@angular/router'; import { EgAuthService, EgAuthWsState } from '@eg/core/auth'; -import { EgNetService } from '@eg/core/net.service'; +import { EgNetService } from '@eg/core/net'; @Component({ templateUrl: 'staff.component.html' -- 2.11.0