Skip to content

Commit

Permalink
Fixed Attribute Templates Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
spitfire305 committed Nov 1, 2023
1 parent 6c6204e commit 54fee8e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions app/Models/AttributeTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,4 +261,19 @@ public function filterableColumns(): array
'attribute_template_id',
];
}

/**
* Grid mode sortable fields
*/
public function datagridSortableColumns(): array
{
$columns = [
'name' => __('crud.fields.name'),
];

if (auth()->check() && auth()->user()->isAdmin()) {
$columns['is_private'] = __('crud.fields.is_private');
}
return $columns;
}
}

0 comments on commit 54fee8e

Please sign in to comment.