Skip to content

Commit

Permalink
Mise à jour de la ressource CategorieOddResource
Browse files Browse the repository at this point in the history
  • Loading branch information
BorisGautier committed Mar 20, 2024
1 parent bd78484 commit d7f3886
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions app/Filament/Resources/CategorieOddResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,21 @@ class CategorieOddResource extends Resource

protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';

protected static ?string $navigationLabel = 'Cibles des Objectifs';
protected static ?string $navigationLabel = 'Cibles des Objectifs';

protected static ?string $navigationGroup = 'Objectifs';
protected static ?string $navigationGroup = 'Objectifs';

public static function form(Form $form): Form
{
return $form
->schema([
Forms\Components\TextInput::make('category_number')
Forms\Components\TextInput::make('category_number')
->required()
->maxLength(255),
Forms\Components\TextInput::make('intitule')
->required()
->maxLength(255),
->required(),
Forms\Components\TextInput::make('name_en')
->required()
->maxLength(255),
->required(),
Forms\Components\Select::make('id_odd')
->relationship('odd', 'name')
->required(),
Expand Down Expand Up @@ -86,14 +84,14 @@ public static function table(Table $table): Table
Tables\Actions\CreateAction::make(),
]);
}

public static function getRelations(): array
{
return [
//
];
}

public static function getPages(): array
{
return [
Expand All @@ -102,8 +100,8 @@ public static function getPages(): array
'view' => Pages\ViewCategorieOdd::route('/{record}'),
'edit' => Pages\EditCategorieOdd::route('/{record}/edit'),
];
}
}

public static function getEloquentQuery(): Builder
{
return parent::getEloquentQuery()
Expand All @@ -118,7 +116,7 @@ public static function shouldRegisterNavigation(): bool
}

public static function getNavigationBadge(): ?string
{
return static::getModel()::count();
}
{
return static::getModel()::count();
}
}

0 comments on commit d7f3886

Please sign in to comment.