mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-29 14:24:46 +02:00
Allow primary allocation to be changed
This commit is contained in:
parent
c5008a43e7
commit
d659bf4349
@ -523,9 +523,11 @@ class ServerResource extends Resource
|
|||||||
->label('Owner')
|
->label('Owner')
|
||||||
->url(fn (Server $server): string => route('filament.admin.resources.users.edit', ['record' => $server->user]))
|
->url(fn (Server $server): string => route('filament.admin.resources.users.edit', ['record' => $server->user]))
|
||||||
->sortable(),
|
->sortable(),
|
||||||
Tables\Columns\SelectColumn::make('allocation.id')
|
Tables\Columns\SelectColumn::make('allocation_id')
|
||||||
->label('Primary Allocation')
|
->label('Primary Allocation')
|
||||||
->options(fn ($state, Server $server) => [$server->allocation->id => $server->allocation->address])
|
->options(fn ($state, Server $server) => $server->allocations->mapWithKeys(
|
||||||
|
fn ($allocation) => [$allocation->id => $allocation->address])
|
||||||
|
)
|
||||||
->selectablePlaceholder(false)
|
->selectablePlaceholder(false)
|
||||||
->sortable(),
|
->sortable(),
|
||||||
Tables\Columns\TextColumn::make('image')->hidden(),
|
Tables\Columns\TextColumn::make('image')->hidden(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user