From 5c1c21ce43cb90c29ca2cb2e6e65ef7c37048697 Mon Sep 17 00:00:00 2001 From: kflemin <2205659+kflemin@users.noreply.github.com> Date: Fri, 8 Nov 2024 11:44:14 -0700 Subject: [PATCH] fix stats table for different alis --- .../js/controllers/inventory_reports_controller.js | 10 ++++++++++ seed/static/seed/partials/inventory_reports.html | 5 ++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/seed/static/seed/js/controllers/inventory_reports_controller.js b/seed/static/seed/js/controllers/inventory_reports_controller.js index 0d322b260e..2eed57e7ba 100644 --- a/seed/static/seed/js/controllers/inventory_reports_controller.js +++ b/seed/static/seed/js/controllers/inventory_reports_controller.js @@ -65,6 +65,16 @@ angular.module('SEED.controller.inventory_reports', []).controller('inventory_re $scope.filter_groups = filter_groups; $scope.report_configurations = report_configurations; $scope.filter_group_id = null; + + $scope.has_children = (obj) => { + // check if the access level selected has children levels for stats table + let children = false; + if ('children' in obj && Object.keys(obj.children).length > 0) { + children = true; + } + return children; + }; + function path_to_string(path) { const orderedPath = []; for (const i in $scope.level_names) { diff --git a/seed/static/seed/partials/inventory_reports.html b/seed/static/seed/partials/inventory_reports.html index f612743d0e..2e8b4936ce 100644 --- a/seed/static/seed/partials/inventory_reports.html +++ b/seed/static/seed/partials/inventory_reports.html @@ -267,14 +267,13 @@