Build & Deploy / build (push) Successful in 18s
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
40 lines
1.3 KiB
PHP
40 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\WorkoutSessions\Schemas;
|
|
|
|
use Filament\Forms\Components\DateTimePicker;
|
|
use Filament\Forms\Components\Select;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Forms\Components\Textarea;
|
|
use Filament\Schemas\Schema;
|
|
use Functional\Tracking\Enums\WorkoutSessionStatus;
|
|
|
|
class WorkoutSessionForm
|
|
{
|
|
public static function configure(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
Select::make('user_id')
|
|
->relationship('user', 'name')
|
|
->required(),
|
|
Select::make('routine_id')
|
|
->relationship('routine', 'name'),
|
|
Select::make('program_id')
|
|
->relationship('program', 'name'),
|
|
TextInput::make('title'),
|
|
DateTimePicker::make('started_at')
|
|
->required(),
|
|
DateTimePicker::make('ended_at'),
|
|
Select::make('status')
|
|
->options(WorkoutSessionStatus::class)
|
|
->default('active')
|
|
->required(),
|
|
Textarea::make('notes')
|
|
->columnSpanFull(),
|
|
TextInput::make('total_volume')
|
|
->numeric(),
|
|
]);
|
|
}
|
|
}
|