Initial commit
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\ResumeResource\RelationManagers;
|
||||
|
||||
use Filament\Forms\Components\DatePicker;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Tables\Actions\BulkActionGroup;
|
||||
use Filament\Tables\Actions\CreateAction;
|
||||
use Filament\Tables\Actions\DeleteAction;
|
||||
use Filament\Tables\Actions\DeleteBulkAction;
|
||||
use Filament\Tables\Actions\EditAction;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
final class EducationsRelationManager extends RelationManager
|
||||
{
|
||||
protected static string $relationship = 'educations';
|
||||
|
||||
public function form(Form $form): Form
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
TextInput::make('institution')
|
||||
->required(),
|
||||
|
||||
TextInput::make('url')
|
||||
->url(),
|
||||
|
||||
TextInput::make('area')
|
||||
->required(),
|
||||
|
||||
TextInput::make('study_type')
|
||||
->required(),
|
||||
|
||||
DatePicker::make('start_date'),
|
||||
|
||||
DatePicker::make('end_date'),
|
||||
|
||||
TextInput::make('score'),
|
||||
]);
|
||||
}
|
||||
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->recordTitleAttribute('institution')
|
||||
->columns([
|
||||
TextColumn::make('institution'),
|
||||
|
||||
TextColumn::make('area'),
|
||||
|
||||
TextColumn::make('study_type'),
|
||||
|
||||
TextColumn::make('start_date')
|
||||
->date(),
|
||||
|
||||
TextColumn::make('end_date')
|
||||
->date(),
|
||||
])
|
||||
->headerActions([
|
||||
CreateAction::make(),
|
||||
])
|
||||
->actions([
|
||||
EditAction::make(),
|
||||
DeleteAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user