Jérôme
Jérôme
FFilament
Created by Jérôme on 11/12/2024 in #❓┊help
open action depending on get parameter
Hello, I have a controller that create automatically a resource for a specific entity, then it redirect to the index resources pages. The goal is that the user click on a link in an email, it create the resource, redirect to the index page, AND open a specific custom action. I added 2 gets parameters to identify the table action to open and the record id. But I don't seems to find a way to open the modal action. I tried using extraatributes, or using the mount in the listresource but nothing seems to work. Has anyone find a way to do that? Thx! Jerome
2 replies
FFilament
Created by Jérôme on 10/18/2024 in #❓┊help
Delete button on infolist (slideover). How to close it?
Hello, I'm having this infolist:
public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
Actions::make([
Action::make('delete')
->label('Supprimer')
->color('danger')
->icon('heroicon-o-trash')
->action(fn ($record) => $record->delete()),
]),

Section::make('Informations générales')
->schema([
TextEntry::make('consultationForm.name')
->label('Formulaire de consultation'),
TextEntry::make('created_at')
->label('Date de soumission')
->dateTime(),
])
->columns(2),
...
]);
}
public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
Actions::make([
Action::make('delete')
->label('Supprimer')
->color('danger')
->icon('heroicon-o-trash')
->action(fn ($record) => $record->delete()),
]),

Section::make('Informations générales')
->schema([
TextEntry::make('consultationForm.name')
->label('Formulaire de consultation'),
TextEntry::make('created_at')
->label('Date de soumission')
->dateTime(),
])
->columns(2),
...
]);
}
It's called from my view action in my table with ->slideOver() As it's only for a quickview and delete, I added a delete action in the infolist. My issue is that when I delete, I see the record disappearing under the infolist, but the infolist itself stays open (with a deleted record then) How can I force it to close after deletion ? Thx!
2 replies
FFilament
Created by Jérôme on 8/23/2024 in #❓┊help
add action on infolist/view on relation manager?
Hello, I have a relation manager between "customers" and "events". So, on my customer resources pages I can see all their events. When I click on one, I open an infolist. Is there a way to add a button on the infolist when we're on a relation manager ? I can't find anything about that Thx!
5 replies
FFilament
Created by Jérôme on 8/15/2024 in #❓┊help
Builder: block open by default?
Hello, I'm using a simple Builder in my filament admin app. My builder contains 2 blocks : Paragraph or Image, each having multiple inputs. I would like, on creation, to have a block image already opened. Is is possible? I don't find how in the doc Thx 🙂
6 replies
FFilament
Created by Jérôme on 5/10/2024 in #❓┊help
Change badge color on NavigationItem in AdminPanelProdiver
Hi! I added a few direct links to my tabs in the navigation items by using the navigationItems function inside the provider Here is my current code : NavigationItem::make('document') ->group('Suivi des événements') ->icon('heroicon-o-document') ->sort(21) ->badge(function (): ?int { $count = EventResource::getEloquentQuery()->where('type', 'document')->where('is_new', true)->count(); return $count > 0 ? $count : null; }) ->label(fn(): string => __('Documents')) ->url(fn(): string => EventResource::getUrl() . '?activeTab=document') ->isActiveWhen(fn() => request()->routeIs('filament.admin.resources.events.*') && request()->input('activeTab') === 'document'), I don't find out to change the badge color. There is a badge function and a badgeTooltip function but I can't find a badgeColor. Is that possible to specity from here? Thx
6 replies
FFilament
Created by Jérôme on 11/24/2023 in #❓┊help
Reordering only part of the table (filter it first)
Hi, I have a table/list with additionnal attributes for my app. Some of theses attributes will be useful for the website, some other are only useful for the emails. I would like that, when an admin go into reorder mode, to filter on lines concerning only the website. For that I would only need to apply a filter on my display_on_site column. But I'm not sure I can add a filter automatically only for the reorder. Any idea how to do that ?
2 replies