feat: access and game server request
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\AccessRequests\Schemas;
|
||||
|
||||
use App\Enums\AccessRequestStatus;
|
||||
use Filament\Forms\Components\DateTimePicker;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class AccessRequestsForm
|
||||
{
|
||||
public static function configure(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
Select::make('status')
|
||||
->options(AccessRequestStatus::class)
|
||||
->required(),
|
||||
TextInput::make('game_username')
|
||||
->required(),
|
||||
TextInput::make('message')
|
||||
->required(),
|
||||
|
||||
Select::make('server_id')
|
||||
->relationship('server', 'name')
|
||||
->required(),
|
||||
DateTimePicker::make('reviewed_at'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\AccessRequests\Schemas;
|
||||
|
||||
use Filament\Infolists\Components\TextEntry;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class AccessRequestsInfolist
|
||||
{
|
||||
public static function configure(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
TextEntry::make('id')
|
||||
->label('ID'),
|
||||
TextEntry::make('status')
|
||||
->badge(),
|
||||
TextEntry::make('game_username'),
|
||||
TextEntry::make('message'),
|
||||
TextEntry::make('reviewed_by')
|
||||
->placeholder('-'),
|
||||
TextEntry::make('server.name')
|
||||
->label('Server'),
|
||||
TextEntry::make('reviewed_at')
|
||||
->dateTime()
|
||||
->placeholder('-'),
|
||||
TextEntry::make('created_at')
|
||||
->dateTime()
|
||||
->placeholder('-'),
|
||||
TextEntry::make('updated_at')
|
||||
->dateTime()
|
||||
->placeholder('-'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user