Patrick
Patrick
FFilament
Created by Patrick on 3/21/2025 in #❓┊help
Adding HTML id attribute to Nav Items, RelationManager Tabs, etc.
We need to make sure the Usetiful selector is unique and stays the same regardless of the classes, order, structure, etc.
14 replies
FFilament
Created by Patrick on 3/21/2025 in #❓┊help
Adding HTML id attribute to Nav Items, RelationManager Tabs, etc.
Thanks for the suggestion, I don't think it's working for our case. Our ProductOwner creates the Usetiful tours without the need of communication to our dev team. So whenever the dev team changes the navigation structure or tab structure or any non ID related stuff, the selector would be wrong/broken. Or do I miss sth?
14 replies
FFilament
Created by Patrick on 3/21/2025 in #❓┊help
Adding HTML id attribute to Nav Items, RelationManager Tabs, etc.
No description
14 replies
FFilament
Created by Patrick on 3/21/2025 in #❓┊help
Adding HTML id attribute to Nav Items, RelationManager Tabs, etc.
or tag, css
14 replies
FFilament
Created by Patrick on 3/21/2025 in #❓┊help
Adding HTML id attribute to Nav Items, RelationManager Tabs, etc.
It's Usetiful. They are using attribute selectors
14 replies
FFilament
Created by Patrick on 3/21/2025 in #❓┊help
Adding HTML id attribute to Nav Items, RelationManager Tabs, etc.
Thanks @toeknee for your fast reply. I need to implement a User onbaording tool which could work for class selectors, but this will be a pain in the future. So I want to assign ID's to specific elements to make sure the target does not change
14 replies
FFilament
Created by Patrick on 1/23/2025 in #❓┊help
Create record with custom creation date
Thank you for sharing, then I will add a custom field to track the process start, it's just adding more complexity, so I thought it would be more aligned if I use the default timestamp column.
9 replies
FFilament
Created by Patrick on 1/23/2025 in #❓┊help
Create record with custom creation date
Thank @Matthew ! Any specific reasons for your concerns about using the default field?
9 replies
FFilament
Created by Patrick on 1/23/2025 in #❓┊help
Create record with custom creation date
Yes I would like to "abuse" the create timestamp to keep track of the button click instead of when the record is written to the db
9 replies
FFilament
Created by Patrick on 8/29/2024 in #❓┊help
auth()->user() is NULL for loading custom assets with data
Okay, thanks. Custom middleware solved my prob
13 replies
FFilament
Created by Patrick on 8/29/2024 in #❓┊help
auth()->user() is NULL for loading custom assets with data
Thanks Dennis, I just created a middleware for it and not it works. Did I missed sth in the docs? It says clearly ServiceProvider boot with this example
13 replies
FFilament
Created by Patrick on 8/29/2024 in #❓┊help
auth()->user() is NULL for loading custom assets with data
Sry I don't get it...I tried custom ServiceProvider, however it does not work. In the docs they write "Sometimes, you may wish to make data from the backend available to JavaScript files. To do this, you can use the FilamentAsset::registerScriptData() method in the boot() method of a service provider:" the best place for my script would be in my AdminPanelProvider boot method. So how can I ensure it only runs after middleware?
13 replies
FFilament
Created by Patrick on 8/29/2024 in #❓┊help
auth()->user() is NULL for loading custom assets with data
Hey @Tonkawuck , thanks for your reply. I am looged in. I haven't tried the own service provider yet, will do it now. But first will check your linked thread. Thanks
13 replies
FFilament
Created by Patrick on 6/7/2024 in #❓┊help
How can I hide NaviationItems in custom NavigationGroup based on user role
Okay...sorry it's not working with new login. I found the solution here: https://github.com/filamentphp/filament/issues/7288
11 replies
FFilament
Created by Patrick on 6/7/2024 in #❓┊help
How can I hide NaviationItems in custom NavigationGroup based on user role
Mhh but I am using a custom navigation, so ->navigationItems is not what I am using or? I am using your build in :getNavigationItems() on a resource which neither accepts a closure nor I have access to visible() or hide()
...ShippingDocumentResource::getNavigationItems()
...ShippingDocumentResource::getNavigationItems()
Custom Nav code part. So for example for Order Management I can hide the whole nav group by returning empty array if my auth check fails. But no clue how I can do it for single getNavigationItems()
->navigation(function (NavigationBuilder $builder): NavigationBuilder {
return $builder
->items(
Pages\Dashboard::getNavigationItems()
)
->groups([
NavigationGroup::make()
->label(__('Order Management'))
->items(auth()->user()->hasAnyRole(
...
)?[
NavigationItem::make(__('Orders'))
->url(fn():string => OrderResource\Pages\ListOrders::getUrl())
->icon('heroicon-o-rectangle-stack')
->isActiveWhen(fn (): bool => request()->routeIs(OrderResource\Pages\ListOrders::getRouteName())),
...ShippingDocumentResource::getNavigationItems(),
...ReturnableResource::getNavigationItems(),
]:[]),
...
->navigation(function (NavigationBuilder $builder): NavigationBuilder {
return $builder
->items(
Pages\Dashboard::getNavigationItems()
)
->groups([
NavigationGroup::make()
->label(__('Order Management'))
->items(auth()->user()->hasAnyRole(
...
)?[
NavigationItem::make(__('Orders'))
->url(fn():string => OrderResource\Pages\ListOrders::getUrl())
->icon('heroicon-o-rectangle-stack')
->isActiveWhen(fn (): bool => request()->routeIs(OrderResource\Pages\ListOrders::getRouteName())),
...ShippingDocumentResource::getNavigationItems(),
...ReturnableResource::getNavigationItems(),
]:[]),
...
11 replies
FFilament
Created by Patrick on 6/7/2024 in #❓┊help
How can I hide NaviationItems in custom NavigationGroup based on user role
Thanks! Sadly items() does not support a closure, so I will add items manually and do a check there 🙂
11 replies
FFilament
Created by Patrick on 6/7/2024 in #❓┊help
How can I hide NaviationItems in custom NavigationGroup based on user role
@Dennis Koch Thanks for your fast reply, I added a closure but the problem is more that visible() is not available on getNavigationItems(). Any ideas if there is way to solve it except adding all pages manually?
11 replies
FFilament
Created by Patrick on 5/27/2024 in #❓┊help
How to apply current filters to Columns using summaries?
Solution was provided by Kenneth Sese TextColumn::make('order_items_sum') ->sum(fn ($livewire) => ['orderItems' => function ($query) use ($livewire) { // dump the tableFilters to see the array structure so you can get the value. Probably want to use data_get() with wildcards) dd($livewire->tableFilters); return $query->where('your_table_filter', 'your_value'); }]),
3 replies
FFilament
Created by Patrick on 5/21/2024 in #❓┊help
Repeater Items: Disable already added items after form saved in edit mode
Thanks for your replies and sorry for the misleading question
9 replies
FFilament
Created by Patrick on 5/21/2024 in #❓┊help
Repeater Items: Disable already added items after form saved in edit mode
Sorry guys I think I did not explained my issue well. And the title was misleading. I have a RelationManager in my Tenant view for Orders. In Order Modal I can add OrderItems. What I was looking for is that already added items are disabled (only deletable) in Edit mode.
9 replies