galli.roberto
galli.roberto
FFilament
Created by galli.roberto on 1/6/2025 in #❓┊help
Repeater extra action mobile overflow
No description
2 replies
FFilament
Created by galli.roberto on 12/21/2024 in #❓┊help
How to translate slug
Multi tenant context, multi lang How to translate resource slug? (->getSlug()) Slug is called before middleware. Exists a way to achieve it? In this case my locale is ja_JP
Staff staffs | en
Staff staffs | en
Place places | en
Place places | en
Unit units | en
Unit units | en
Staff staffs | en
Staff staffs | en
Place places | en
Place places | en
Unit units | en
Unit units | en
Staff staffs | en
Staff staffs | en
Place places | en
Place places | en
Unit units | en
Unit units | en
Staff staffs | en
Staff staffs | en
Place places | en
Place places | en
Unit units | en
Unit units | en
7 replies
FFilament
Created by galli.roberto on 12/20/2024 in #❓┊help
Action Modal - inside user menu
I'm trying to add an Action with modal form inside e user menu. The button appear, but the modal doesn't open
Filament::registerRenderHook(
PanelsRenderHook::USER_MENU_PROFILE_AFTER,
fn (): string => Blade::render(
Action::make('updateAuthCredentials')
->modal(true)
->color('gray')
->icon('heroicon-o-user')
->form([

])->toHtml()
)
);
Filament::registerRenderHook(
PanelsRenderHook::USER_MENU_PROFILE_AFTER,
fn (): string => Blade::render(
Action::make('updateAuthCredentials')
->modal(true)
->color('gray')
->icon('heroicon-o-user')
->form([

])->toHtml()
)
);
Anyone with some experience?
7 replies
FFilament
Created by galli.roberto on 12/19/2024 in #❓┊help
Repeater DeleteAction
No description
7 replies
FFilament
Created by galli.roberto on 12/19/2024 in #❓┊help
Back button
If open a create or edit page in a new tab/window, the cancel button doesn't work, because history doesn't exist. You can try on filament-demo https://demo.filamentphp.com/shop/customers open a customer in a new tab/window and try to click Cancel button The solution is really simple, add a check to history.length > 1
->alpineClickHandler(
'document.referrer && window.history.length > 1 ? window.history.back() : (window.location.href = ' . Js::from(
$url
) . ')'
)
->alpineClickHandler(
'document.referrer && window.history.length > 1 ? window.history.back() : (window.location.href = ' . Js::from(
$url
) . ')'
)
Is it a bug? --- SPA context In SPA mode, when cancel button is pressed, return to the cached list page It is a problem when a table is filtered by a discriminant field that is modified in edit, when come back to table, the cache prevent to apply right the filter. I know that I can exclude some Resource/url from SPA, but forl all tables is annoying At the moment I make a custom back buttom:
->alpineClickHandler(
Filament::getCurrentPanel()->hasSpaMode() ?
('window.location.href = ' . Js::from($url)) :
(
'document.referrer && window.history.length > 1 ? window.history.back() : (window.location.href = ' . Js::from(
$url
) . ')'
)
)
->alpineClickHandler(
Filament::getCurrentPanel()->hasSpaMode() ?
('window.location.href = ' . Js::from($url)) :
(
'document.referrer && window.history.length > 1 ? window.history.back() : (window.location.href = ' . Js::from(
$url
) . ')'
)
)
Exists others options?
4 replies
FFilament
Created by galli.roberto on 12/16/2024 in #❓┊help
Repeater
No description
13 replies
FFilament
Created by galli.roberto on 12/15/2024 in #❓┊help
debugbar called +1 time than previous call
No description
2 replies
FFilament
Created by galli.roberto on 12/10/2024 in #❓┊help
Repeater - strange behaviour
No description
6 replies
FFilament
Created by galli.roberto on 12/5/2024 in #❓┊help
Get Tenant Url of non current Panel
Exist a way to get tenant url of other tenant panel. I have 2 panel A and B. Panel A has Tenant A Panel B has Tenant B How to get Url of Tenant B inside Panel A? in panel A
dd(
Filament::getUrl(),
Filament::getUrl(Place::first()),
Filament::getPanel('place')->getUrl(Place::first())
);
dd(
Filament::getUrl(),
Filament::getUrl(Place::first()),
Filament::getPanel('place')->getUrl(Place::first())
);
"https://system-tenant-000.fixhub.it.ddev.site/company/00000000000000000000000000/staffs"

"https://system-tenant-000.fixhub.it.ddev.site/company/01jec02a1bhymfa5f12ds8nw78/staffs"

"/log-viewer"
"https://system-tenant-000.fixhub.it.ddev.site/company/00000000000000000000000000/staffs"

"https://system-tenant-000.fixhub.it.ddev.site/company/01jec02a1bhymfa5f12ds8nw78/staffs"

"/log-viewer"
2 replies
FFilament
Created by galli.roberto on 12/4/2024 in #❓┊help
Repeater Select Morph - disable sibling options
No description
2 replies
FFilament
Created by galli.roberto on 11/30/2024 in #❓┊help
Repeater Add button - Icon
I desire to add an icon to add button repeater I deep into code and it seems impossible. So i did it. I write down this help to anyone need the same thing. Overrided the repeater.
$this->app->bind(
\Filament\Forms\Components\Repeater::class,
\App\Filament\Applications\Core\Forms\Components\Repeater::class
);
$this->app->bind(
\Filament\Forms\Components\Repeater::class,
\App\Filament\Applications\Core\Forms\Components\Repeater::class
);
Added HasIcon, I know I lose consistency. It's better to create a dedicated trait and use addActionIcon
class Repeater extends \Filament\Forms\Components\Repeater
{
use HasIcon;

public function getAddAction(): Action
{
$action = Action::make($this->getAddActionName())
->icon(fn (Repeater $component) => $component->getIcon())
->label(fn (Repeater $component) => $component->getAddActionLabel())
->color('gray')
class Repeater extends \Filament\Forms\Components\Repeater
{
use HasIcon;

public function getAddAction(): Action
{
$action = Action::make($this->getAddActionName())
->icon(fn (Repeater $component) => $component->getIcon())
->label(fn (Repeater $component) => $component->getAddActionLabel())
->color('gray')
and finally
->addActionLabel(fn() => __('company::user/form.assign_user_to_repair_shop.table.actions.add'))
->icon('heroicon-m-plus')
->extraActions([
->addActionLabel(fn() => __('company::user/form.assign_user_to_repair_shop.table.actions.add'))
->icon('heroicon-m-plus')
->extraActions([
Maybe I open a PR in future
3 replies
FFilament
Created by galli.roberto on 12/4/2023 in #❓┊help
resource view modal with relation manager
I am trying to show in view mode a resource with relation (relation manager) If I open modal the relation aren't shown. If I set footerModalContent and I pass resource, and relations to a custom view it works, but the related resource is always in edit mode. Exist some way to open resource in a modal with its relation manager resource in view mode?
4 replies