A free open source IT asset/license management system
Added child location count
snipe1da37e0d3804
diff --git a/app/Http/Transformers/LocationsTransformer.php b/app/Http/Transformers/LocationsTransformer.phpindex 95d6911b1c..538f7e54c3 100644--- a/app/Http/Transformers/LocationsTransformer.php+++ b/app/Http/Transformers/LocationsTransformer.php@@ -55,6 +55,7 @@ class LocationsTransformer'users_count' => (int) $location->users_count,'consumables_count' => (int) $location->consumables_count,'components_count' => (int) $location->components_count,+ 'children_count' => (int) $location->children_count,'currency' => ($location->currency) ? e($location->currency) : null,'ldap_ou' => ($location->ldap_ou) ? e($location->ldap_ou) : null,'notes' => Helper::parseEscapedMarkedownInline($location->notes),diff --git a/app/Presenters/LocationPresenter.php b/app/Presenters/LocationPresenter.phpindex 097d218683..30225460dc 100644--- a/app/Presenters/LocationPresenter.php+++ b/app/Presenters/LocationPresenter.php@@ -135,7 +135,17 @@ class LocationPresenter extends Presenter'titleTooltip' => trans('general.consumables'),'visible' => true,'class' => 'css-consumable',- ], [+ ],+ [+ 'field' => 'children_count',+ 'searchable' => false,+ 'sortable' => true,+ 'switchable' => true,+ 'title' => trans('general.child_locations'),+ 'titleTooltip' => trans('general.child_locations'),+ 'visible' => true,+ 'class' => 'css-child-locations',+ ], ['field' => 'currency','searchable' => true,'sortable' => true,