- 2.x - sites settings

- tags
- source-control soft deletes
This commit is contained in:
Saeed Vaziry
2024-10-06 00:04:57 +02:00
parent d1f2add699
commit 3c50e2c947
44 changed files with 972 additions and 119 deletions

View File

@ -4,6 +4,7 @@
use App\Actions\Server\Update;
use App\Models\Server;
use App\Web\Pages\Settings\Tags\Actions\EditTags;
use Filament\Forms\Concerns\InteractsWithForms;
use Filament\Forms\Contracts\HasForms;
use Filament\Infolists\Components\Actions\Action;
@ -88,16 +89,15 @@ public function infolist(Infolist $infolist): Infolist
TextEntry::make('provider')
->label('Provider')
->inlineLabel(),
TextEntry::make('tags')
->label('Tags')
TextEntry::make('tags.*')
->default('No tags')
->formatStateUsing(fn ($state) => is_object($state) ? $state->name : $state)
->inlineLabel()
->state(fn (Server $record) => view('web.components.tags', ['tags' => $record->tags]))
->badge()
->color(fn ($state) => is_object($state) ? $state->color : 'gray')
->icon(fn ($state) => is_object($state) ? 'heroicon-o-tag' : '')
->suffixAction(
Action::make('edit-tags')
->icon('heroicon-o-pencil')
->tooltip('Edit Tags')
->action(fn (Server $record) => $this->dispatch('$editTags', $record))
->tooltip('Edit Tags')
EditTags::infolist($this->server)
),
]),