feat: hide 'Outlet' column if the authenticated user has one or fewer outlets.
This commit is contained in:
parent
5d46365963
commit
7035c3888d
@ -21,7 +21,9 @@ class OrdersTable extends DataTableComponent
|
||||
public function columns(): array
|
||||
{
|
||||
return [
|
||||
Column::make('Outlet', 'outlet.name')->searchable(),
|
||||
Column::make('Outlet', 'outlet.name')
|
||||
->searchable()
|
||||
->hideIf(auth()->user()->outlets()->count() <= 1),
|
||||
|
||||
Column::make('Pegawai', 'user.employee.full_name')
|
||||
->searchable(function (Builder $query, $searchTerm) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user