From: Jason Boyer Date: Tue, 14 Dec 2021 19:15:13 +0000 (-0500) Subject: Wire up Simple Reporter into the Staff Client Interface X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9a7cddc13a0d70d74b91dbbc882b4f7e36bff9b6;p=Evergreen.git Wire up Simple Reporter into the Staff Client Interface Sponsored-by: C/W MARS Sponsored-by: Missouri Evergreen Consortium Signed-off-by: Jason Boyer Signed-off-by: rfrasur Signed-off-by: Mike Rylander --- 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 6440486430..b7e0e08f8b 100644 --- a/Open-ILS/src/eg2/src/app/staff/nav.component.html +++ b/Open-ILS/src/eg2/src/app/staff/nav.component.html @@ -399,6 +399,10 @@ Reports + + + Simple Reports + 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 21e7427537..d7981d7053 100644 --- a/Open-ILS/src/eg2/src/app/staff/routing.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/routing.module.ts @@ -33,6 +33,9 @@ const routes: Routes = [{ path: 'login', component: StaffLoginComponent }, { + path: 'no_permission', + component: StaffSplashComponent + }, { path: 'splash', component: StaffSplashComponent }, { @@ -48,6 +51,10 @@ const routes: Routes = [{ loadChildren: () => import('./catalog/catalog.module').then(m => m.CatalogModule) }, { + path: 'reporter', + loadChildren: () => + import('@eg/staff/reporter/routing.module').then(m => m.ReporterRoutingModule) + }, { path: 'sandbox', loadChildren: () => import('./sandbox/sandbox.module').then(m => m.SandboxModule) diff --git a/Open-ILS/src/eg2/src/app/staff/splash.component.html b/Open-ILS/src/eg2/src/app/staff/splash.component.html index 6f95510a2f..d9e6b76025 100644 --- a/Open-ILS/src/eg2/src/app/staff/splash.component.html +++ b/Open-ILS/src/eg2/src/app/staff/splash.component.html @@ -85,3 +85,4 @@ + diff --git a/Open-ILS/src/eg2/src/app/staff/splash.component.ts b/Open-ILS/src/eg2/src/app/staff/splash.component.ts index ccf95222f9..7882450387 100644 --- a/Open-ILS/src/eg2/src/app/staff/splash.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/splash.component.ts @@ -2,6 +2,8 @@ import {Component, OnInit, AfterViewInit, Directive, ElementRef, Renderer2} from import {OrgService} from '@eg/core/org.service'; import {AuthService} from '@eg/core/auth.service'; import {PcrudService} from '@eg/core/pcrud.service'; +import {ToastService} from '@eg/share/toast/toast.service'; +import {StringComponent} from '@eg/share/string/string.component'; import {Router} from '@angular/router'; @Component({ @@ -10,6 +12,7 @@ import {Router} from '@angular/router'; export class StaffSplashComponent implements OnInit { + @ViewChild('noPermissionString', { static: true }) noPermissionString: StringComponent; catSearchQuery: string; portalEntries: any[][] = []; portalHeaders: any[] = []; @@ -19,7 +22,8 @@ export class StaffSplashComponent implements OnInit { private pcrud: PcrudService, private auth: AuthService, private org: OrgService, - private router: Router + private router: Router, + private toast: ToastService ) {} ngOnInit() { @@ -87,6 +91,14 @@ export class StaffSplashComponent implements OnInit { }); } ); + + if (this.router.url === '/staff/no_permission') { + this.noPermissionString.current() + .then(str => { + this.toast.danger(str); + this.router.navigate(['/staff']); + }); + } } searchCatalog(): void { diff --git a/Open-ILS/src/templates/staff/navbar.tt2 b/Open-ILS/src/templates/staff/navbar.tt2 index 3a66c3d02d..7c532ebb09 100644 --- a/Open-ILS/src/templates/staff/navbar.tt2 +++ b/Open-ILS/src/templates/staff/navbar.tt2 @@ -553,6 +553,13 @@ [% l('Reports') %] +
  • + + + [% l('Simple Reports') %] + +