Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
<div class="row pad-vert"></div>
- <div class="row" ng-repeat="sc in statcats">
+ <div class="row" ng-repeat="sc in statcats" ng-show="statcat_visible(sc.owner().id())">
<div class="col-xs-12">
<div class="row bg-info">
<div class="col-xs-12">
$scope.workingGridDataProvider.refresh();
});
+ $scope.statcat_visible = function (sc_owner) {
+ var visible = typeof $scope.working.statcat_filter === 'undefined' || !$scope.working.statcat_filter;
+ angular.forEach(egCore.org.ancestors(sc_owner), function (anscestor_org) {
+ if ($scope.working.statcat_filter == anscestor_org.id())
+ visible = true;
+ });
+ return visible;
+ }
+
$scope.suffix_list = [];
itemSvc.get_suffixes(egCore.auth.user().ws_ou()).then(function(list){
$scope.suffix_list = list;