81 lines
2.1 KiB
PHP
81 lines
2.1 KiB
PHP
<?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;
|
|
use Filament\Tables\Columns\TextColumn;
|
|
use Filament\Tables\Table;
|
|
|
|
final class VolunteerExperiencesRelationManager extends RelationManager
|
|
{
|
|
protected static string $relationship = 'volunteerExperiences';
|
|
|
|
public function form(Form $form): Form
|
|
{
|
|
return $form
|
|
->schema([
|
|
TextInput::make('organization')
|
|
->required(),
|
|
|
|
TextInput::make('position')
|
|
->required(),
|
|
|
|
TextInput::make('url')
|
|
->required()
|
|
->url(),
|
|
|
|
DatePicker::make('start_date')
|
|
->required(),
|
|
|
|
DatePicker::make('end_date'),
|
|
|
|
TextInput::make('summary')
|
|
->required(),
|
|
]);
|
|
}
|
|
|
|
public function table(Table $table): Table
|
|
{
|
|
return $table
|
|
->recordTitleAttribute('organization')
|
|
->columns([
|
|
TextColumn::make('organization'),
|
|
|
|
TextColumn::make('position'),
|
|
|
|
TextColumn::make('url'),
|
|
|
|
TextColumn::make('start_date')
|
|
->date(),
|
|
|
|
TextColumn::make('end_date')
|
|
->date(),
|
|
|
|
TextColumn::make('summary'),
|
|
|
|
TextColumn::make('highlights'),
|
|
])
|
|
->filters([
|
|
//
|
|
])
|
|
->headerActions([
|
|
Tables\Actions\CreateAction::make(),
|
|
])
|
|
->actions([
|
|
Tables\Actions\EditAction::make(),
|
|
Tables\Actions\DeleteAction::make(),
|
|
])
|
|
->bulkActions([
|
|
Tables\Actions\BulkActionGroup::make([
|
|
Tables\Actions\DeleteBulkAction::make(),
|
|
]),
|
|
]);
|
|
}
|
|
}
|