Update app/Filament/Resources/ServerResource/Pages/ListServers.php

Co-authored-by: Boy132 <Boy132@users.noreply.github.com>
This commit is contained in:
MartinOscar 2024-10-07 18:50:57 +02:00 committed by GitHub
parent 45b73debc2
commit 6a8ff1a186
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -67,7 +67,7 @@ class ListServers extends ListRecords
->options(fn (Server $server) => $server->allocations->mapWithKeys(fn ($allocation) => [$allocation->id => $allocation->address]))
->selectablePlaceholder(false)
->sortable(),
TextColumn::make('allocation_id_can')
TextColumn::make('allocation_id_readonly')
->label('Primary Allocation')
->hidden(auth()->user()->can('update server'))
->state(fn (Server $server) => $server->allocation->address),