Tables\Columns\TextColumn::make('status') ->badge() ->icon(function (ProjectStatus $state) { if ($state === ProjectStatus::Building || $state === ProjectStatus::UploadingToGit) { return 'heroicon-o-arrow-path'; } return null; }) ->extraAttributes(['class' => 'filament-icon-spin']) ->color(fn (ProjectStatus $state): string => match ($state->value) { 'finished', 'downloaded' => 'success', 'building', 'uploading-to-git' => 'gray', 'failed' => 'danger', default => 'primary' })
.filament-icon-spin svg { @apply animate-spin;}
->disabled(fn (Project $record) => $record->status === ProjectStatus::Building)
->poll(function () use ($table) { if ( $table->getRecords() ->whereIn('status', [ProjectStatus::Building, ProjectStatus::UploadingToGit]) ->count() > 0 ) { return '5s'; } return null; })