From 4ab9ddb371f2e188638a6d0e35f3fe160d359e36 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 29 May 2019 14:03:38 -0400 Subject: [PATCH] LP1830424 Implement Angular "retrieve last bib record" Repair the Angular navbar menu entry for "Retrieve Last Bib Record" by replacing the copy/paste'd ng-click handler with an Angular (click) handler and local implementation. Signed-off-by: Bill Erickson Signed-off-by: Galen Charlton --- Open-ILS/src/eg2/src/app/staff/nav.component.html | 2 +- Open-ILS/src/eg2/src/app/staff/nav.component.ts | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) 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..70ca9f5240 100644 --- a/Open-ILS/src/eg2/src/app/staff/nav.component.html +++ b/Open-ILS/src/eg2/src/app/staff/nav.component.html @@ -169,7 +169,7 @@ collections_bookmark Retrieve Bib Record by TCN - redo diff --git a/Open-ILS/src/eg2/src/app/staff/nav.component.ts b/Open-ILS/src/eg2/src/app/staff/nav.component.ts index c477c116b9..970277c25b 100644 --- a/Open-ILS/src/eg2/src/app/staff/nav.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/nav.component.ts @@ -5,6 +5,7 @@ import {AuthService} from '@eg/core/auth.service'; import {PcrudService} from '@eg/core/pcrud.service'; import {LocaleService} from '@eg/core/locale.service'; import {PrintService} from '@eg/share/print/print.service'; +import {StoreService} from '@eg/core/store.service'; @Component({ selector: 'eg-staff-nav-bar', @@ -20,6 +21,7 @@ export class StaffNavComponent implements OnInit { constructor( private router: Router, + private store: StoreService, private auth: AuthService, private pcrud: PcrudService, private locale: LocaleService, @@ -67,6 +69,14 @@ export class StaffNavComponent implements OnInit { reprintLast() { this.printer.reprintLast(); } + + // TODO: Point to Angular catalog when the time comes + retrieveLastRecord() { + const recId = this.store.getLocalItem('eg.cat.last_record_retrieved'); + if (recId) { + window.location.href = '/eg/staff/cat/catalog/record/' + recId; + } + } } -- 2.11.0