hide nonlocal stat cats from patron edit.
authorLlewellyn Marshall <llewellyn.marshall@ncdcr.gov>
Tue, 21 Jun 2022 20:29:39 +0000 (16:29 -0400)
committerLlewellyn Marshall <llewellyn.marshall@ncdcr.gov>
Tue, 21 Jun 2022 20:29:39 +0000 (16:29 -0400)
Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js

index c5f76f0..9b2006a 100644 (file)
@@ -310,6 +310,9 @@ angular.module('egCoreMod')
             'open-ils.circ.stat_cat.actor.retrieve.all',
             egCore.auth.token(), egCore.auth.user().ws_ou()
         ).then(function(cats) {
+                       //filter out stat cats unless accessible by env
+                       cats = cats.filter(function(cat) { 
+                       egCore.env.actsc.list.find(ecat => cat.id() == ecat.id())});
             cats = cats.sort(function(a, b) {
                 return a.name() < b.name() ? -1 : 1});
             angular.forEach(cats, function(cat) {