From dd0c9a631786893c4c1caca18d4f823851902368 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 8034f4174e..63b2106c77 100644 --- a/Open-ILS/src/eg2/src/app/staff/nav.component.html +++ b/Open-ILS/src/eg2/src/app/staff/nav.component.html @@ -161,7 +161,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 852562c8f1..f143727a33 100644 --- a/Open-ILS/src/eg2/src/app/staff/nav.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/nav.component.ts @@ -6,6 +6,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', @@ -24,6 +25,7 @@ export class StaffNavComponent implements OnInit { constructor( private router: Router, + private store: StoreService, private org: OrgService, private auth: AuthService, private pcrud: PcrudService, @@ -81,6 +83,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.43.2