From ca17cc1a8eb17af315296b2172ba418fb4146434 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 22 Jan 2019 20:50:01 -0500 Subject: [PATCH] LP#1772680: add admin interfaces for the RBDigital integration tables The database tables used by the RBDigital interface now have standard Angular administration interfaces. These can be reached from a new item on the web staff Adminstration menu, "Extras Administration" Signed-off-by: Galen Charlton --- .../app/staff/admin/basic-admin-page.component.ts | 6 +++--- .../admin/extra/admin-extra-splash.component.html | 16 +++++++++++++++ .../admin/extra/admin-extra-splash.component.ts | 11 ++++++++++ .../app/staff/admin/extra/admin-extra.module.ts | 24 ++++++++++++++++++++++ .../src/app/staff/admin/extra/routing.module.ts | 22 ++++++++++++++++++++ .../src/eg2/src/app/staff/admin/routing.module.ts | 3 +++ Open-ILS/src/eg2/src/app/staff/nav.component.html | 5 +++++ Open-ILS/src/templates/staff/navbar.tt2 | 6 ++++++ 8 files changed, 90 insertions(+), 3 deletions(-) create mode 100644 Open-ILS/src/eg2/src/app/staff/admin/extra/admin-extra-splash.component.html create mode 100644 Open-ILS/src/eg2/src/app/staff/admin/extra/admin-extra-splash.component.ts create mode 100644 Open-ILS/src/eg2/src/app/staff/admin/extra/admin-extra.module.ts create mode 100644 Open-ILS/src/eg2/src/app/staff/admin/extra/routing.module.ts diff --git a/Open-ILS/src/eg2/src/app/staff/admin/basic-admin-page.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/basic-admin-page.component.ts index 0d6be84dbd..613fb1a803 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/basic-admin-page.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/basic-admin-page.component.ts @@ -38,9 +38,9 @@ export class BasicAdminPageComponent implements OnInit { // Set the prefix to "server", "local", "workstation", // extracted from the URL path. this.persistKeyPfx = this.route.snapshot.parent.url[0].path; - if (this.persistKeyPfx === 'acq') { - // ACQ is a special case, becaus unlike 'server', 'local', - // 'workstation', the schema ('acq') is the root of the path. + if (this.persistKeyPfx === 'acq' || this.persistKeyPfx === 'extra') { + // ACQ and Extra are a special cases, because unlike 'server', 'local', + // 'workstation', the schema ('acq' or 'extra') is the root of the path. this.persistKeyPfx = ''; } diff --git a/Open-ILS/src/eg2/src/app/staff/admin/extra/admin-extra-splash.component.html b/Open-ILS/src/eg2/src/app/staff/admin/extra/admin-extra-splash.component.html new file mode 100644 index 0000000000..7ac9f144c1 --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/admin/extra/admin-extra-splash.component.html @@ -0,0 +1,16 @@ + + + +
+ + + + + + +
+ diff --git a/Open-ILS/src/eg2/src/app/staff/admin/extra/admin-extra-splash.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/extra/admin-extra-splash.component.ts new file mode 100644 index 0000000000..3be96b803d --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/admin/extra/admin-extra-splash.component.ts @@ -0,0 +1,11 @@ +import {Component, Input, ViewChildren, + AfterViewInit, QueryList} from '@angular/core'; + +@Component({ + templateUrl: './admin-extra-splash.component.html' +}) + +export class AdminExtraSplashComponent { +} + + diff --git a/Open-ILS/src/eg2/src/app/staff/admin/extra/admin-extra.module.ts b/Open-ILS/src/eg2/src/app/staff/admin/extra/admin-extra.module.ts new file mode 100644 index 0000000000..db2b7af7eb --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/admin/extra/admin-extra.module.ts @@ -0,0 +1,24 @@ +import {NgModule} from '@angular/core'; +import {StaffCommonModule} from '@eg/staff/common.module'; +import {AdminExtraRoutingModule} from './routing.module'; +import {AdminCommonModule} from '@eg/staff/admin/common.module'; +import {AdminExtraSplashComponent} from './admin-extra-splash.component'; + +@NgModule({ + declarations: [ + AdminExtraSplashComponent + ], + imports: [ + AdminCommonModule, + AdminExtraRoutingModule + ], + exports: [ + ], + providers: [ + ] +}) + +export class AdminExtraModule { +} + + diff --git a/Open-ILS/src/eg2/src/app/staff/admin/extra/routing.module.ts b/Open-ILS/src/eg2/src/app/staff/admin/extra/routing.module.ts new file mode 100644 index 0000000000..0cc37c59da --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/admin/extra/routing.module.ts @@ -0,0 +1,22 @@ +import {NgModule} from '@angular/core'; +import {RouterModule, Routes} from '@angular/router'; +import {AdminExtraSplashComponent} from './admin-extra-splash.component'; +import {BasicAdminPageComponent} from '@eg/staff/admin/basic-admin-page.component'; + +const routes: Routes = [{ + path: 'splash', + component: AdminExtraSplashComponent +}, { + path: ':table', + component: BasicAdminPageComponent, + // All "extra" admin pages cover data in the extra.* schema. No need to + // duplicate it within the URL path. Pass it manually instead. + data: [{schema: 'extra'}] +}]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) + +export class AdminExtraRoutingModule {} diff --git a/Open-ILS/src/eg2/src/app/staff/admin/routing.module.ts b/Open-ILS/src/eg2/src/app/staff/admin/routing.module.ts index a93f9ee37c..af4477400f 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/routing.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/routing.module.ts @@ -12,6 +12,9 @@ const routes: Routes = [{ }, { path: 'acq', loadChildren: '@eg/staff/admin/acq/admin-acq.module#AdminAcqModule' + }, { + path: 'extra', + loadChildren: '@eg/staff/admin/extra/admin-extra.module#AdminExtraModule' }] }]; 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..a99d246dc3 100644 --- a/Open-ILS/src/eg2/src/app/staff/nav.component.html +++ b/Open-ILS/src/eg2/src/app/staff/nav.component.html @@ -364,6 +364,11 @@ business_center Booking Administration + + card_giftcard + Extras Administration + insert_chart_outlined Reports diff --git a/Open-ILS/src/templates/staff/navbar.tt2 b/Open-ILS/src/templates/staff/navbar.tt2 index e9602305d5..2cd42778e9 100644 --- a/Open-ILS/src/templates/staff/navbar.tt2 +++ b/Open-ILS/src/templates/staff/navbar.tt2 @@ -517,6 +517,12 @@
  • + + + [% l('Extras Administration') %] + +
  • +
  • [% l('Reports') %] -- 2.11.0