Skip to content

Commit

Permalink
stan is always right
Browse files Browse the repository at this point in the history
  • Loading branch information
alnutile committed Oct 10, 2024
1 parent 18d0ed8 commit 6519b57
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 24 deletions.
1 change: 1 addition & 0 deletions app/Filament/Resources/UserResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public static function form(Form $form): Form
->afterStateUpdated(function (User $user, Forms\Set $set, ?string $state) {
Log::info('UserResource::afterStateUpdated', [
'set' => $set,
/** @phpstan-ignore-next-line */
'user' => $user?->id,
'state' => $state,
]);
Expand Down
23 changes: 0 additions & 23 deletions app/Filament/Resources/UserResource/Pages/ListUsers.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace App\Filament\Resources\UserResource\Pages;

use App\Domains\Accounts\AccountTypeEnum;
use App\Filament\Resources\UserResource;
use Filament\Actions;
use Filament\Resources\Components\Tab;
Expand All @@ -19,27 +18,5 @@ protected function getHeaderActions(): array
];
}

public function getTabs(): array
{
return [
'all' => Tab::make('All Users'),
'buyer' => Tab::make('Buyer')
->modifyQueryUsing(function ($query) {
return $query->where('account_type', AccountTypeEnum::Buyer);
}),
'seller' => Tab::make('Seller')
->modifyQueryUsing(function ($query) {
return $query->where('account_type', AccountTypeEnum::Seller);
}),

'buyer_and_seller' => Tab::make('Buyer And Seller')
->modifyQueryUsing(function ($query) {
return $query->where('account_type', AccountTypeEnum::BuyerAndSeller);
}),
'system_user' => Tab::make('System User')
->modifyQueryUsing(function ($query) {
return $query->where('account_type', AccountTypeEnum::SystemUser);
}),
];
}
}
1 change: 0 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ parameters:
- vendor
- app/Actions/*
- app/Http/Resources/*
- app/Filament/*

0 comments on commit 6519b57

Please sign in to comment.