From 9722377f1aedaee8e593a0542b7665937eaa894a Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 28 Jun 2018 18:23:39 -0400 Subject: [PATCH] LP#1779158 Angular vandelay module, routing, stub modules Signed-off-by: Bill Erickson --- .../src/eg2/src/app/staff/cat/routing.module.ts | 15 ++++++++++ .../app/staff/cat/vandelay/export.component.html | 1 + .../src/app/staff/cat/vandelay/export.component.ts | 14 +++++++++ .../app/staff/cat/vandelay/import.component.html | 2 ++ .../src/app/staff/cat/vandelay/import.component.ts | 14 +++++++++ .../src/app/staff/cat/vandelay/routing.module.ts | 30 ++++++++++++++++++++ .../app/staff/cat/vandelay/vandelay.component.html | 33 ++++++++++++++++++++++ .../app/staff/cat/vandelay/vandelay.component.ts | 33 ++++++++++++++++++++++ .../src/app/staff/cat/vandelay/vandelay.module.ts | 26 +++++++++++++++++ Open-ILS/src/eg2/src/app/staff/nav.component.html | 2 +- Open-ILS/src/eg2/src/app/staff/routing.module.ts | 3 ++ 11 files changed, 172 insertions(+), 1 deletion(-) create mode 100644 Open-ILS/src/eg2/src/app/staff/cat/routing.module.ts create mode 100644 Open-ILS/src/eg2/src/app/staff/cat/vandelay/export.component.html create mode 100644 Open-ILS/src/eg2/src/app/staff/cat/vandelay/export.component.ts create mode 100644 Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.html create mode 100644 Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.ts create mode 100644 Open-ILS/src/eg2/src/app/staff/cat/vandelay/routing.module.ts create mode 100644 Open-ILS/src/eg2/src/app/staff/cat/vandelay/vandelay.component.html create mode 100644 Open-ILS/src/eg2/src/app/staff/cat/vandelay/vandelay.component.ts create mode 100644 Open-ILS/src/eg2/src/app/staff/cat/vandelay/vandelay.module.ts diff --git a/Open-ILS/src/eg2/src/app/staff/cat/routing.module.ts b/Open-ILS/src/eg2/src/app/staff/cat/routing.module.ts new file mode 100644 index 0000000000..a923b46822 --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/cat/routing.module.ts @@ -0,0 +1,15 @@ +import {NgModule} from '@angular/core'; +import {RouterModule, Routes} from '@angular/router'; + +const routes: Routes = [ + { path: 'vandelay', + loadChildren: '@eg/staff/cat/vandelay/vandelay.module#VandelayModule' + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) + +export class CatRoutingModule {} diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/export.component.html b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/export.component.html new file mode 100644 index 0000000000..41a4880ddd --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/export.component.html @@ -0,0 +1 @@ +EXPORT COMPONENT diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/export.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/export.component.ts new file mode 100644 index 0000000000..4f64a3ea5f --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/export.component.ts @@ -0,0 +1,14 @@ +import {Component, OnInit} from '@angular/core'; + +@Component({ + templateUrl: 'export.component.html' +}) +export class ExportComponent implements OnInit { + + constructor() {} + + ngOnInit() { + } + +} + diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.html b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.html new file mode 100644 index 0000000000..83bbc2d19a --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.html @@ -0,0 +1,2 @@ + +IMPORT COMPONENT diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.ts new file mode 100644 index 0000000000..40c65a5c6d --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.ts @@ -0,0 +1,14 @@ +import {Component, OnInit} from '@angular/core'; + +@Component({ + templateUrl: 'import.component.html' +}) +export class ImportComponent implements OnInit { + + constructor() {} + + ngOnInit() { + } + +} + diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/routing.module.ts b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/routing.module.ts new file mode 100644 index 0000000000..232f51f9a3 --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/routing.module.ts @@ -0,0 +1,30 @@ +import {NgModule} from '@angular/core'; +import {RouterModule, Routes} from '@angular/router'; +import {VandelayComponent} from './vandelay.component'; +import {ImportComponent} from './import.component'; +import {ExportComponent} from './export.component'; + +const routes: Routes = [{ + path: '', + component: VandelayComponent, + //resolve: {vandelayResolver : VandelayResolver}, + children: [{ + path: '', + pathMatch: 'full', + redirectTo: 'import' + }, { + path: 'import', + component: ImportComponent + }, { + path: 'export', + component: ExportComponent + }] +}]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], + providers: [] +}) + +export class VandelayRoutingModule {} diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/vandelay.component.html b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/vandelay.component.html new file mode 100644 index 0000000000..839454b5ca --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/vandelay.component.html @@ -0,0 +1,33 @@ + + + + diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/vandelay.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/vandelay.component.ts new file mode 100644 index 0000000000..4c537b6a15 --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/vandelay.component.ts @@ -0,0 +1,33 @@ +import {Component, OnInit} from '@angular/core'; +import {Router, ActivatedRoute, NavigationEnd} from "@angular/router"; +import {take} from 'rxjs/operators/take'; + +@Component({ + templateUrl: 'vandelay.component.html' +}) +export class VandelayComponent implements OnInit { + + tab: string; + + constructor( + private router: Router, + private route: ActivatedRoute + ) { + + // As the parent component of the vandelay route tree, our + // activated route never changes. Instead, listen for global + // route events, then ask for the first segement of the first + // child, which will be the tab name. + this.router.events.subscribe(routeEvent => { + if (routeEvent instanceof NavigationEnd) { + this.route.firstChild.url.pipe(take(1)) + .subscribe(segments => this.tab = segments[0].path); + } + }); + } + + ngOnInit() { + } + +} + diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/vandelay.module.ts b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/vandelay.module.ts new file mode 100644 index 0000000000..2b9c65b154 --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/vandelay.module.ts @@ -0,0 +1,26 @@ +import {NgModule} from '@angular/core'; +import {StaffCommonModule} from '@eg/staff/common.module'; +import {VandelayRoutingModule} from './routing.module'; +import {VandelayComponent} from './vandelay.component'; +import {ImportComponent} from './import.component'; +import {ExportComponent} from './export.component'; +import {GridModule} from '@eg/share/grid/grid.module'; + +@NgModule({ + declarations: [ + VandelayComponent, + ImportComponent, + ExportComponent + ], + imports: [ + StaffCommonModule, + VandelayRoutingModule, + GridModule + ], + providers: [ + ] +}) + +export class VandelayModule { + +} diff --git a/Open-ILS/src/eg2/src/app/staff/nav.component.html b/Open-ILS/src/eg2/src/app/staff/nav.component.html index feed30bcb5..dc5fa775f2 100644 --- a/Open-ILS/src/eg2/src/app/staff/nav.component.html +++ b/Open-ILS/src/eg2/src/app/staff/nav.component.html @@ -184,7 +184,7 @@ cloud_download Import Record from Z39.50 - + import_export MARC Batch Import/Export diff --git a/Open-ILS/src/eg2/src/app/staff/routing.module.ts b/Open-ILS/src/eg2/src/app/staff/routing.module.ts index b515f389af..6f20336660 100644 --- a/Open-ILS/src/eg2/src/app/staff/routing.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/routing.module.ts @@ -31,6 +31,9 @@ const routes: Routes = [{ path: 'circ', loadChildren : '@eg/staff/circ/routing.module#CircRoutingModule' }, { + path: 'cat', + loadChildren : '@eg/staff/cat/routing.module#CatRoutingModule' + }, { path: 'catalog', loadChildren : '@eg/staff/catalog/catalog.module#CatalogModule' }, { -- 2.11.0