mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 03:57:22 +08:00
migration script
# Conflicts: # app/Filament/Resources/Torrent/AnnounceLogResource.php
This commit is contained in:
+24
-17
@@ -2,8 +2,15 @@
|
||||
|
||||
namespace App\Filament\Resources\System\AgentAllowResource\RelationManagers;
|
||||
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
@@ -16,14 +23,14 @@ class DeniesRelationManager extends RelationManager
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'name';
|
||||
|
||||
public function form(Form $form): Form
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
Forms\Components\TextInput::make('name')->required()->maxLength(255)->label(__('label.name')),
|
||||
Forms\Components\TextInput::make('peer_id')->required()->maxLength(255)->label(__('label.agent_deny.peer_id')),
|
||||
Forms\Components\TextInput::make('agent')->required()->maxLength(255)->label(__('label.agent_deny.agent')),
|
||||
Forms\Components\Textarea::make('comment')->label(__('label.comment')),
|
||||
return $schema
|
||||
->components([
|
||||
TextInput::make('name')->required()->maxLength(255)->label(__('label.name')),
|
||||
TextInput::make('peer_id')->required()->maxLength(255)->label(__('label.agent_deny.peer_id')),
|
||||
TextInput::make('agent')->required()->maxLength(255)->label(__('label.agent_deny.agent')),
|
||||
Textarea::make('comment')->label(__('label.comment')),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -31,22 +38,22 @@ class DeniesRelationManager extends RelationManager
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
Tables\Columns\TextColumn::make('name')->label(__('label.name')),
|
||||
Tables\Columns\TextColumn::make('peer_id')->label(__('label.agent_deny.peer_id')),
|
||||
Tables\Columns\TextColumn::make('agent')->label(__('label.agent_deny.agent')),
|
||||
TextColumn::make('name')->label(__('label.name')),
|
||||
TextColumn::make('peer_id')->label(__('label.agent_deny.peer_id')),
|
||||
TextColumn::make('agent')->label(__('label.agent_deny.agent')),
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->headerActions([
|
||||
Tables\Actions\CreateAction::make(),
|
||||
CreateAction::make(),
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
Tables\Actions\DeleteAction::make(),
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
DeleteAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
->toolbarActions([
|
||||
DeleteBulkAction::make(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user