feat: Add grouping functionality to SubLocationResource table for improved data organization by location.
This commit is contained in:
parent
44ee744615
commit
a2adfbb53d
@ -25,6 +25,7 @@
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Columns\ToggleColumn;
|
||||
use Filament\Tables\Filters\TrashedFilter;
|
||||
use Filament\Tables\Grouping\Group;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||
@ -73,11 +74,6 @@ public static function table(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('location.name')
|
||||
->label('Lokus')
|
||||
->searchable()
|
||||
->sortable(),
|
||||
|
||||
TextColumn::make('name')
|
||||
->label('Nama')
|
||||
->searchable()
|
||||
@ -119,7 +115,12 @@ public static function table(Table $table): Table
|
||||
->emptyStateIcon(Heroicon::NumberedList)
|
||||
->emptyStateDescription('Setelah Anda membubat data pertama, maka akan muncul disini.')
|
||||
->defaultSort('created_at', 'desc')
|
||||
->deferFilters(false);
|
||||
->deferFilters(false)
|
||||
->groups([
|
||||
Group::make('location.name')
|
||||
->label('Lokus')
|
||||
->collapsible(),
|
||||
]);
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
|
||||
Loading…
Reference in New Issue
Block a user