diff --git a/app/Http/Controllers/Api/StatuslabelsController.php b/app/Http/Controllers/Api/StatuslabelsController.php index f85ae68169..9860beea20 100644 --- a/app/Http/Controllers/Api/StatuslabelsController.php +++ b/app/Http/Controllers/Api/StatuslabelsController.php @@ -22,7 +22,7 @@ class StatuslabelsController extends Controller public function index(Request $request) { $this->authorize('view', Statuslabel::class); - $allowed_columns = ['id','name','created_at']; + $allowed_columns = ['id','name','created_at', 'assets_count']; $statuslabels = Statuslabel::withCount('assets'); diff --git a/app/Http/Transformers/StatuslabelsTransformer.php b/app/Http/Transformers/StatuslabelsTransformer.php index 7eb3be4f4d..fa2b4f75a5 100644 --- a/app/Http/Transformers/StatuslabelsTransformer.php +++ b/app/Http/Transformers/StatuslabelsTransformer.php @@ -26,6 +26,7 @@ class StatuslabelsTransformer 'type' => $statuslabel->getStatuslabelType(), 'color' => ($statuslabel->color) ? e($statuslabel->color) : null, 'show_in_nav' => ($statuslabel->show_in_nav=='1') ? true : false, + 'assets_count' => (int) $statuslabel->assets_count, 'notes' => e($statuslabel->notes), 'created_at' => Helper::getFormattedDateObject($statuslabel->created_at, 'datetime'), 'updated_at' => Helper::getFormattedDateObject($statuslabel->updated_at, 'datetime'), diff --git a/resources/views/statuslabels/index.blade.php b/resources/views/statuslabels/index.blade.php index bcc9466c11..2f267041ed 100755 --- a/resources/views/statuslabels/index.blade.php +++ b/resources/views/statuslabels/index.blade.php @@ -32,6 +32,7 @@ {{ trans('general.id') }} {{ trans('admin/statuslabels/table.name') }} {{ trans('admin/statuslabels/table.status_type') }} + {{ trans('general.assets') }} {{ trans('admin/statuslabels/table.color') }} {{ trans('admin/statuslabels/table.show_in_nav') }} {{ trans('table.actions') }}