mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 19:37:23 +08:00
admin torrent add visible filter
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\Torrent;
|
||||
|
||||
use App\Filament\OptionsTrait;
|
||||
use App\Filament\Resources\Torrent\TorrentResource\Pages;
|
||||
use App\Filament\Resources\Torrent\TorrentResource\RelationManagers;
|
||||
use App\Models\Setting;
|
||||
@@ -25,6 +26,8 @@ use Illuminate\Support\Str;
|
||||
|
||||
class TorrentResource extends Resource
|
||||
{
|
||||
use OptionsTrait;
|
||||
|
||||
protected static ?string $model = Torrent::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-collection';
|
||||
@@ -87,9 +90,9 @@ class TorrentResource extends Resource
|
||||
])
|
||||
->defaultSort('id', 'desc')
|
||||
->filters([
|
||||
Tables\Filters\SelectFilter::make('approval_status')
|
||||
->options(Torrent::listApprovalStatus(true))
|
||||
->label(__('label.torrent.approval_status')),
|
||||
Tables\Filters\SelectFilter::make('visible')
|
||||
->options(self::$yesOrNo)
|
||||
->label(__('label.torrent.visible')),
|
||||
|
||||
Tables\Filters\SelectFilter::make('pos_state')
|
||||
->options(Torrent::listPosStates(true))
|
||||
@@ -98,6 +101,11 @@ class TorrentResource extends Resource
|
||||
Tables\Filters\SelectFilter::make('sp_state')
|
||||
->options(Torrent::listPromotionTypes(true))
|
||||
->label(__('label.torrent.sp_state')),
|
||||
|
||||
Tables\Filters\SelectFilter::make('approval_status')
|
||||
->options(Torrent::listApprovalStatus(true))
|
||||
->visible($showApproval)
|
||||
->label(__('label.torrent.approval_status')),
|
||||
])
|
||||
->actions([
|
||||
// Tables\Actions\EditAction::make(),
|
||||
|
||||
@@ -119,6 +119,7 @@ return [
|
||||
'approval_status' => 'Approval status',
|
||||
'pos_state' => 'Pos state',
|
||||
'sp_state' => 'Promotion',
|
||||
'visible' => 'Visible',
|
||||
],
|
||||
'hit_and_run' => [
|
||||
|
||||
|
||||
@@ -118,6 +118,7 @@ return [
|
||||
'approval_status' => '审核状态',
|
||||
'pos_state' => '置顶',
|
||||
'sp_state' => '优惠',
|
||||
'visible' => '活种',
|
||||
],
|
||||
'hit_and_run' => [
|
||||
|
||||
|
||||
@@ -119,6 +119,7 @@ return [
|
||||
'approval_status' => '審核狀態',
|
||||
'pos_state' => '置頂',
|
||||
'sp_state' => '優惠',
|
||||
'visible' => '活種',
|
||||
],
|
||||
'hit_and_run' => [
|
||||
|
||||
|
||||
Reference in New Issue
Block a user