Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CategorieOddResource #234

Merged
merged 2 commits into from
Mar 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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();
}
}
Loading