From: Dan Briem Date: Sat, 4 Mar 2023 21:10:44 +0000 (+0000) Subject: LP#1901072 Menus Don't Recognize Max Recent Patrons Setting X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1608860dc3376201c224a3d032e61fd4dfd3ba26;p=Evergreen.git LP#1901072 Menus Don't Recognize Max Recent Patrons Setting On the Angular menu, both Retrieve Last Patron and Recent Patrons links appear under Circulation, regardless of what the "Number of Retrievable Recent Patrons" setting is set to. On both the AngularJS and Angular menus, both links appear under Circulation (Experimental). On the Angular menu, Circulation->Retrieve Recent Patrons links to the Angular interface instead of the AngularJS interface. To test this fix: 1. Set Enable Angular Circulation Menu setting to True 2. Set Number of Retrievable Recent Patrons setting to 0 - Retrieve Last Patron and Recent Patrons links don't appear 3. Set to 1 or unset (default fallback is 1) - Retrieve Last Patron link appears only 4. Set to greather than 1 - both links appear - Circulation->Retrieve Recent Patrons loads the AngJS interface Signed-off-by: Dan Briem Signed-off-by: Susan Morrison Signed-off-by: Jane Sandberg --- 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 facd33cd10..d7db8bd391 100644 --- a/Open-ILS/src/eg2/src/app/staff/nav.component.html +++ b/Open-ILS/src/eg2/src/app/staff/nav.component.html @@ -77,13 +77,13 @@ Register Patron - Retrieve Last Patron - + Retrieve Recent Patrons @@ -194,13 +194,13 @@ Register Patron - Retrieve Last Patron - 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 e8246b44c6..d4201a84a2 100644 --- a/Open-ILS/src/eg2/src/app/staff/nav.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/nav.component.ts @@ -29,6 +29,7 @@ export class StaffNavComponent implements OnInit, OnDestroy { showAngularAcq: boolean; curbsideEnabled: boolean; showAngularCirc = false; + maxRecentPatrons: number = 1; @ViewChild('navOpChange', {static: false}) opChange: OpChangeComponent; permFailedSub: Subscription; @@ -72,6 +73,10 @@ export class StaffNavComponent implements OnInit, OnDestroy { .then(settings => this.curbsideEnabled = Boolean(settings['circ.curbside'])); + this.org.settings('ui.staff.max_recent_patrons') + .then(settings => this.maxRecentPatrons = + settings['ui.staff.max_recent_patrons'] ?? 1) + // Do we show the angular circ menu? // TODO remove these once Angular Circ takes over. const angSet = 'ui.staff.angular_circ.enabled'; diff --git a/Open-ILS/src/templates/staff/navbar.tt2 b/Open-ILS/src/templates/staff/navbar.tt2 index 58ce7666bb..4a6f3936b6 100644 --- a/Open-ILS/src/templates/staff/navbar.tt2 +++ b/Open-ILS/src/templates/staff/navbar.tt2 @@ -305,13 +305,13 @@ [% l('Register Patron') %] -
  • +
  • [% l('Retrieve Last Patron') %]
  • -
  • +
  • [% l('Retrieve Recent Patrons') %]