<span class="material-icons" aria-hidden="true">insert_chart</span>
<span i18n>Reports</span>
</a>
+ <a class="dropdown-item" routerLink="/staff/reporter/simple">
+ <span class="material-icons" aria-hidden="true">insert_chart</span>
+ <span i18n>Simple Reports</span>
+ </a>
</div>
</div>
</div>
path: 'login',
component: StaffLoginComponent
}, {
+ path: 'no_permission',
+ component: StaffSplashComponent
+ }, {
path: 'splash',
component: StaffSplashComponent
}, {
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)
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({
export class StaffSplashComponent implements OnInit {
+ @ViewChild('noPermissionString', { static: true }) noPermissionString: StringComponent;
catSearchQuery: string;
portalEntries: any[][] = [];
portalHeaders: any[] = [];
private pcrud: PcrudService,
private auth: AuthService,
private org: OrgService,
- private router: Router
+ private router: Router,
+ private toast: ToastService
) {}
ngOnInit() {
});
}
);
+
+ if (this.router.url === '/staff/no_permission') {
+ this.noPermissionString.current()
+ .then(str => {
+ this.toast.danger(str);
+ this.router.navigate(['/staff']);
+ });
+ }
}
searchCatalog(): void {
[% l('Reports') %]
</a>
</li>
+ <li>
+ <a href="/eg2/staff/reporter/simple" target="_self">
+ <span class="glyphicon glyphicon-object-align-bottom"
+ aria-hidden="true"></span>
+ [% l('Simple Reports') %]
+ </a>
+ </li>
</ul> <!-- admin dropdown -->
</li>
</ul> <!-- end left side entries -->