feat: Restrict TrashedFilter visibility to only the Developer role in various resource tables.
This commit is contained in:
parent
912a20421c
commit
0d4662086a
@ -141,7 +141,9 @@ public static function configure(Table $table): Table
|
||||
...TimestampColumns::make(),
|
||||
])
|
||||
->filters([
|
||||
TrashedFilter::make()->native(false),
|
||||
TrashedFilter::make()
|
||||
->native(false)
|
||||
->visible(fn () => auth()->user()?->hasRole('Developer')),
|
||||
|
||||
SelectFilter::make('status')
|
||||
->label('Status')
|
||||
|
||||
@ -72,7 +72,9 @@ public static function configure(Table $table): Table
|
||||
...TimestampColumns::make(),
|
||||
])
|
||||
->filters([
|
||||
TrashedFilter::make()->native(false),
|
||||
TrashedFilter::make()
|
||||
->native(false)
|
||||
->visible(fn () => auth()->user()?->hasRole('Developer')),
|
||||
|
||||
SelectFilter::make('social_media')
|
||||
->label('Media Sosial')
|
||||
|
||||
@ -96,7 +96,9 @@ public static function configure(Table $table): Table
|
||||
...TimestampColumns::make(),
|
||||
])
|
||||
->filters([
|
||||
TrashedFilter::make()->native(false),
|
||||
TrashedFilter::make()
|
||||
->native(false)
|
||||
->visible(fn () => auth()->user()?->hasRole('Developer')),
|
||||
|
||||
SelectFilter::make('themes')
|
||||
->label('Tema')
|
||||
|
||||
@ -126,7 +126,9 @@ public static function table(Table $table): Table
|
||||
...TimestampColumns::make(),
|
||||
])
|
||||
->filters([
|
||||
TrashedFilter::make()->native(false),
|
||||
TrashedFilter::make()
|
||||
->native(false)
|
||||
->visible(fn () => auth()->user()?->hasRole('Developer')),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make()
|
||||
|
||||
@ -81,7 +81,9 @@ public static function configure(Table $table): Table
|
||||
...TimestampColumns::make(),
|
||||
])
|
||||
->filters([
|
||||
TrashedFilter::make()->native(false),
|
||||
TrashedFilter::make()
|
||||
->native(false)
|
||||
->visible(fn () => auth()->user()?->hasRole('Developer')),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user