Filament moderne (groupes nav, 4 charts, filtres/badges) + Filament Shield (rôles/permissions) + noms exos localisés dans routines
Build & Deploy / build (push) Successful in 19s
Build & Deploy / build (push) Successful in 19s
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,8 @@ class ExerciseResource extends Resource
|
||||
|
||||
protected static string|UnitEnum|null $navigationGroup = 'Catalogue';
|
||||
|
||||
protected static ?int $navigationSort = 1;
|
||||
|
||||
protected static ?string $modelLabel = 'exercice';
|
||||
|
||||
protected static ?string $pluralModelLabel = 'exercices';
|
||||
@@ -47,6 +49,14 @@ class ExerciseResource extends Resource
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<int, string>
|
||||
*/
|
||||
public static function getGloballySearchableAttributes(): array
|
||||
{
|
||||
return ['name', 'category', 'body_part', 'target'];
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
|
||||
@@ -25,18 +25,28 @@ class ExercisesTable
|
||||
->label('Nom')
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('category')
|
||||
->label('Catégorie')
|
||||
->badge()
|
||||
->color('gray')
|
||||
->sortable()
|
||||
->toggleable(isToggledHiddenByDefault: true),
|
||||
TextColumn::make('body_part')
|
||||
->label('Partie du corps')
|
||||
->badge()
|
||||
->sortable(),
|
||||
TextColumn::make('equipment')
|
||||
->label('Équipement')
|
||||
->badge(),
|
||||
->badge()
|
||||
->toggleable(),
|
||||
TextColumn::make('target')
|
||||
->label('Muscle cible')
|
||||
->badge(),
|
||||
])
|
||||
->filters([
|
||||
SelectFilter::make('category')
|
||||
->label('Catégorie')
|
||||
->options(fn (): array => self::distinctOptions('category')),
|
||||
SelectFilter::make('body_part')
|
||||
->label('Partie du corps')
|
||||
->options(fn (): array => self::distinctOptions('body_part')),
|
||||
|
||||
Reference in New Issue
Block a user