feat: Restrict TrashedFilter visibility to the Developer role across multiple Filament resources and apply minor code formatting adjustments.
This commit is contained in:
parent
2d3d001ea4
commit
974d8ac92b
@ -163,7 +163,8 @@ public static function table(Table $table): Table
|
||||
])
|
||||
->filters([
|
||||
TrashedFilter::make()
|
||||
->native(false),
|
||||
->native(false)
|
||||
->visible(fn () => auth()->user()?->hasRole('Developer')),
|
||||
])
|
||||
->recordActions([
|
||||
EditJournalistAction::make('edit'),
|
||||
|
||||
@ -306,7 +306,8 @@ public static function table(Table $table): Table
|
||||
])
|
||||
->filters([
|
||||
TrashedFilter::make()
|
||||
->native(false),
|
||||
->native(false)
|
||||
->visible(fn () => auth()->user()?->hasRole('Developer')),
|
||||
])
|
||||
->recordActions([
|
||||
ViewAction::make(),
|
||||
|
||||
@ -81,7 +81,8 @@ public static function table(Table $table): Table
|
||||
])
|
||||
->filters([
|
||||
TrashedFilter::make()
|
||||
->native(false),
|
||||
->native(false)
|
||||
->visible(fn () => auth()->user()?->hasRole('Developer')),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make()
|
||||
|
||||
@ -83,7 +83,8 @@ public static function table(Table $table): Table
|
||||
])
|
||||
->filters([
|
||||
TrashedFilter::make()
|
||||
->native(false),
|
||||
->native(false)
|
||||
->visible(fn () => auth()->user()?->hasRole('Developer')),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make()
|
||||
|
||||
@ -93,7 +93,8 @@ public static function table(Table $table): Table
|
||||
])
|
||||
->filters([
|
||||
TrashedFilter::make()
|
||||
->native(false),
|
||||
->native(false)
|
||||
->visible(fn () => auth()->user()?->hasRole('Developer')),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make()
|
||||
|
||||
@ -83,7 +83,8 @@ public static function table(Table $table): Table
|
||||
])
|
||||
->filters([
|
||||
TrashedFilter::make()
|
||||
->native(false),
|
||||
->native(false)
|
||||
->visible(fn () => auth()->user()?->hasRole('Developer')),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make()
|
||||
|
||||
@ -103,7 +103,8 @@ public static function table(Table $table): Table
|
||||
])
|
||||
->filters([
|
||||
TrashedFilter::make()
|
||||
->native(false),
|
||||
->native(false)
|
||||
->visible(fn () => auth()->user()?->hasRole('Developer')),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make()
|
||||
|
||||
@ -99,7 +99,8 @@ public static function table(Table $table): Table
|
||||
])
|
||||
->filters([
|
||||
TrashedFilter::make()
|
||||
->native(false),
|
||||
->native(false)
|
||||
->visible(fn () => auth()->user()?->hasRole('Developer')),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make()
|
||||
|
||||
@ -83,7 +83,8 @@ public static function table(Table $table): Table
|
||||
])
|
||||
->filters([
|
||||
TrashedFilter::make()
|
||||
->native(false),
|
||||
->native(false)
|
||||
->visible(fn () => auth()->user()?->hasRole('Developer')),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make()
|
||||
|
||||
@ -148,7 +148,8 @@ public static function table(Table $table): Table
|
||||
])
|
||||
->filters([
|
||||
TrashedFilter::make()
|
||||
->native(false),
|
||||
->native(false)
|
||||
->visible(fn () => auth()->user()?->hasRole('Developer')),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make()
|
||||
|
||||
@ -54,7 +54,8 @@ public static function configure(Table $table): Table
|
||||
])
|
||||
->filters([
|
||||
TrashedFilter::make()
|
||||
->native(false),
|
||||
->native(false)
|
||||
->visible(fn () => auth()->user()?->hasRole('Developer')),
|
||||
|
||||
SelectFilter::make('issue')
|
||||
->label('Filter Isu')
|
||||
|
||||
@ -40,10 +40,10 @@ public function panel(Panel $panel): Panel
|
||||
mkdir($fullPath, 0777, true);
|
||||
}
|
||||
|
||||
$files = glob($fullPath . '/*');
|
||||
$files = glob($fullPath.'/*');
|
||||
if (! $files || count($files) === 0) {
|
||||
$defaultImage = public_path('assets/img/bg/default.jpg');
|
||||
$targetImage = $fullPath . '/default.png';
|
||||
$targetImage = $fullPath.'/default.png';
|
||||
copy($defaultImage, $targetImage);
|
||||
}
|
||||
|
||||
@ -53,8 +53,8 @@ public function panel(Panel $panel): Panel
|
||||
->default()
|
||||
->id('dashboard')
|
||||
->path('dashboard')
|
||||
->brandLogo(fn() => Storage::url($generalSettings->site_logo))
|
||||
->favicon(fn() => Storage::url($generalSettings->site_icon))
|
||||
->brandLogo(fn () => Storage::url($generalSettings->site_logo))
|
||||
->favicon(fn () => Storage::url($generalSettings->site_icon))
|
||||
->login(Login::class)
|
||||
->registration(Registration::class)
|
||||
->emailVerification(EmailVerification::class)
|
||||
@ -93,7 +93,7 @@ public function panel(Panel $panel): Panel
|
||||
FilamentBackgroundsPlugin::make()
|
||||
->imageProvider(
|
||||
MyImages::make()
|
||||
->directory('storage/' . $directoryAuthBg)
|
||||
->directory('storage/'.$directoryAuthBg)
|
||||
),
|
||||
])
|
||||
->authMiddleware([
|
||||
|
||||
Loading…
Reference in New Issue
Block a user