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(),
|
...TimestampColumns::make(),
|
||||||
])
|
])
|
||||||
->filters([
|
->filters([
|
||||||
TrashedFilter::make()->native(false),
|
TrashedFilter::make()
|
||||||
|
->native(false)
|
||||||
|
->visible(fn () => auth()->user()?->hasRole('Developer')),
|
||||||
|
|
||||||
SelectFilter::make('status')
|
SelectFilter::make('status')
|
||||||
->label('Status')
|
->label('Status')
|
||||||
|
|||||||
@ -72,7 +72,9 @@ public static function configure(Table $table): Table
|
|||||||
...TimestampColumns::make(),
|
...TimestampColumns::make(),
|
||||||
])
|
])
|
||||||
->filters([
|
->filters([
|
||||||
TrashedFilter::make()->native(false),
|
TrashedFilter::make()
|
||||||
|
->native(false)
|
||||||
|
->visible(fn () => auth()->user()?->hasRole('Developer')),
|
||||||
|
|
||||||
SelectFilter::make('social_media')
|
SelectFilter::make('social_media')
|
||||||
->label('Media Sosial')
|
->label('Media Sosial')
|
||||||
|
|||||||
@ -96,7 +96,9 @@ public static function configure(Table $table): Table
|
|||||||
...TimestampColumns::make(),
|
...TimestampColumns::make(),
|
||||||
])
|
])
|
||||||
->filters([
|
->filters([
|
||||||
TrashedFilter::make()->native(false),
|
TrashedFilter::make()
|
||||||
|
->native(false)
|
||||||
|
->visible(fn () => auth()->user()?->hasRole('Developer')),
|
||||||
|
|
||||||
SelectFilter::make('themes')
|
SelectFilter::make('themes')
|
||||||
->label('Tema')
|
->label('Tema')
|
||||||
|
|||||||
@ -126,7 +126,9 @@ public static function table(Table $table): Table
|
|||||||
...TimestampColumns::make(),
|
...TimestampColumns::make(),
|
||||||
])
|
])
|
||||||
->filters([
|
->filters([
|
||||||
TrashedFilter::make()->native(false),
|
TrashedFilter::make()
|
||||||
|
->native(false)
|
||||||
|
->visible(fn () => auth()->user()?->hasRole('Developer')),
|
||||||
])
|
])
|
||||||
->recordActions([
|
->recordActions([
|
||||||
EditAction::make()
|
EditAction::make()
|
||||||
|
|||||||
@ -81,7 +81,9 @@ public static function configure(Table $table): Table
|
|||||||
...TimestampColumns::make(),
|
...TimestampColumns::make(),
|
||||||
])
|
])
|
||||||
->filters([
|
->filters([
|
||||||
TrashedFilter::make()->native(false),
|
TrashedFilter::make()
|
||||||
|
->native(false)
|
||||||
|
->visible(fn () => auth()->user()?->hasRole('Developer')),
|
||||||
])
|
])
|
||||||
->recordActions([
|
->recordActions([
|
||||||
EditAction::make(),
|
EditAction::make(),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user