Unverified Commit 9ba7e7a0 authored by snipe's avatar snipe Committed by GitHub
Browse files

Merge pull request #9761 from snipe/features/9745_add_notes_to_statuslabels

Added #9745 - adds searchable, sortable notes to statuslabels index
parents 6521f16b 30297e47
......@@ -22,7 +22,7 @@ class StatuslabelsController extends Controller
public function index(Request $request)
{
$this->authorize('view', Statuslabel::class);
$allowed_columns = ['id','name','created_at', 'assets_count','color','default_label'];
$allowed_columns = ['id','name','created_at', 'assets_count','color', 'notes','default_label'];
$statuslabels = Statuslabel::withCount('assets as assets_count');
......
......@@ -41,7 +41,7 @@ class Statuslabel extends SnipeModel
*
* @var array
*/
protected $searchableAttributes = ['name'];
protected $searchableAttributes = ['name', 'notes'];
/**
* The relations and their attributes that should be included when searching the model.
......
......@@ -53,6 +53,7 @@
<th data-sortable="true" data-field="color" data-formatter="colorSqFormatter">{{ trans('admin/statuslabels/table.color') }}</th>
<th class="text-center" data-sortable="true" data-field="show_in_nav" data-formatter="trueFalseFormatter">{{ trans('admin/statuslabels/table.show_in_nav') }}</th>
<th class="text-center" data-sortable="true" data-field="default_label" data-formatter="trueFalseFormatter">{{ trans('admin/statuslabels/table.default_label') }}</th>
<th data-sortable="true" data-field="notes" data-visible="false">{{ trans('general.notes') }}</th>
<th data-formatter="statuslabelsActionsFormatter" data-searchable="false" data-sortable="false" data-field="actions">{{ trans('table.actions') }}</th>
</tr>
</thead>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment