@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\TlaSuggestions\Schemas;
|
||||
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class TlaSuggestionForm
|
||||
{
|
||||
public static function configure(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
TextInput::make('acronym')
|
||||
->required(),
|
||||
TextInput::make('hint')
|
||||
->default(null),
|
||||
Select::make('language')
|
||||
->options(['hu' => 'Hu', 'en' => 'En'])
|
||||
->required(),
|
||||
Textarea::make('context')
|
||||
->default(null)
|
||||
->columnSpanFull(),
|
||||
TextInput::make('submitter')
|
||||
->default(null),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\TlaSuggestions\Schemas;
|
||||
|
||||
use Filament\Infolists\Components\TextEntry;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class TlaSuggestionInfolist
|
||||
{
|
||||
public static function configure(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
TextEntry::make('acronym'),
|
||||
TextEntry::make('hint')
|
||||
->placeholder('-'),
|
||||
TextEntry::make('language')
|
||||
->badge(),
|
||||
TextEntry::make('context')
|
||||
->placeholder('-')
|
||||
->columnSpanFull(),
|
||||
TextEntry::make('submitter')
|
||||
->placeholder('-'),
|
||||
TextEntry::make('created_at')
|
||||
->dateTime()
|
||||
->placeholder('-'),
|
||||
TextEntry::make('updated_at')
|
||||
->dateTime()
|
||||
->placeholder('-'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user