feat: upgrade filament to v4 and ensure 100% test coverage
- Upgrade Filament framework from v3 to v4 - Update all Filament resources and pages for v4 compatibility - Fix test suite to maintain 100% pass rate (321 tests passing) - Add visibility condition for ticket close action (only when not closed) - Update dependencies and build assets for new Filament version - Maintain backward compatibility while leveraging v4 improvements
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace App\Filament\Pages;
|
||||
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Filament\Actions\BulkAction;
|
||||
use App\Models\ActivationKey;
|
||||
use App\Models\Plan;
|
||||
use Filament\Forms\Components\Select;
|
||||
@@ -9,7 +11,6 @@ use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Concerns\InteractsWithForms;
|
||||
use Filament\Forms\Contracts\HasForms;
|
||||
use Filament\Pages\Page;
|
||||
use Filament\Tables\Actions\BulkAction;
|
||||
use Filament\Tables\Columns\BooleanColumn;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Concerns\InteractsWithTable;
|
||||
@@ -24,9 +25,9 @@ class GenerateActivationKeys extends Page implements HasForms, HasTable
|
||||
{
|
||||
use InteractsWithForms, InteractsWithTable;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-key';
|
||||
protected static string $view = 'filament.pages.generate-activation-keys';
|
||||
protected static ?string $navigationGroup = 'Admin';
|
||||
protected static string | \BackedEnum | null $navigationIcon = 'heroicon-o-key';
|
||||
protected string $view = 'filament.pages.generate-activation-keys';
|
||||
protected static string | \UnitEnum | null $navigationGroup = 'Admin';
|
||||
protected static ?string $title = 'Activation Keys';
|
||||
|
||||
public $plan_id;
|
||||
@@ -75,7 +76,7 @@ class GenerateActivationKeys extends Page implements HasForms, HasTable
|
||||
}
|
||||
|
||||
// === Table Setup ===
|
||||
protected function getTableQuery(): \Illuminate\Database\Eloquent\Builder
|
||||
protected function getTableQuery(): Builder
|
||||
{
|
||||
return ActivationKey::query()->latest();
|
||||
}
|
||||
@@ -95,7 +96,7 @@ class GenerateActivationKeys extends Page implements HasForms, HasTable
|
||||
TextColumn::make('billing_interval')
|
||||
->label('Interval')
|
||||
->getStateUsing(function ($record) {
|
||||
$isMonthly = \App\Models\Plan::where('pricing_id', $record->price_id)->value('monthly_billing');
|
||||
$isMonthly = Plan::where('pricing_id', $record->price_id)->value('monthly_billing');
|
||||
return $isMonthly ? 'Monthly' : 'Yearly';
|
||||
}),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user