Patrick
Patrick
FFilament
Created by Patrick on 6/7/2024 in #❓┊help
How can I hide NaviationItems in custom NavigationGroup based on user role
Hi there, As I am using getNavigationItems() it seems not possible? Or is there a way to hide each item based on a user role? NavigationGroup::make() ->label(__('Reporting')) ->items([ ...OrderReportingResource::getNavigationItems()->visible(auth()->user()->hasRole('OrderReportingUser')), ...OrderItemReportingResource::getNavigationItems(), ...ProductReportingResource::getNavigationItems(), ]),
11 replies
FFilament
Created by Patrick on 5/27/2024 in #❓┊help
How to apply current filters to Columns using summaries?
HI there, I am using sum() on TextColumn and Filter on relationships. But it seems the sum columns are not scoped by the filter? Is there any solution to this? I can't find a hint in the documentation. Appreciate your help. Thanks
3 replies
FFilament
Created by Patrick on 5/22/2024 in #❓┊help
Resource vs Page for Stock Management & Reporting?
Hi there, I am quite new to Filament and now have to build a Stock Management & Reporting view for my Products. I am already have a Product Resource with view, edit, list, create pages. I dont want to use the standard Product list page beacause the stock management is only for specific products and should only contain certain columns which are editable. Reports view contains all possible columns and makes use of Advanced Tables Plugin. I am using Advanced Tables Plugin for my standard table views and would like to use it for reports too. What would you recommend for my scenario? Creating a new Resource based on my Product Model und use its table integration, or create a page und use the table builder with a Livewire component? Or I am totally wrong and there is a better solution? Thanks! 🙂
2 replies
FFilament
Created by Patrick on 5/21/2024 in #❓┊help
Trigger form + relationship save method in custom action?
How can I save the form and all relationships in my custom action ? I want to manually call what "Save changes" button does.
4 replies
FFilament
Created by Patrick on 5/21/2024 in #❓┊help
Repeater Items: Disable already added items after form saved in edit mode
Hi guys, I can't find it in the documention. How can I disable editing of Repeater items after the form has been saved? I want the user only to be able to add & delete items after form save. Thanks
9 replies
FFilament
Created by Patrick on 3/27/2024 in #❓┊help
Custom Action: validateOnly() for field in repeater
Hi there, How can I validate a specific field in a repeater field in my custom form action? And I would like to validate the fields before ->requiresConfirmation() Appreciate your help 🙂
3 replies
FFilament
Created by Patrick on 3/22/2024 in #❓┊help
disableOptionWhen() method missing for Forms\Components\MorphToSelect\Type
Hi all, how can I exclude already selected options from Forms\Components\MorphToSelect\Type in a Repeater ? With the standard Select Field I have disableOptionWhen(), but it seems missing for MorphToSelect. afterStateUpdated() seems also missing Appreciate your help 🙂
1 replies
FFilament
Created by Patrick on 3/12/2024 in #❓┊help
RelationManager shows "Class must be declared abstract or implement method 'getTableQueryForExport'"
In my RelationManagers my code editor shows "Class must be declared abstract or implement method 'getTableQueryForExport'". Never saw this before. Any ideas why?
9 replies
FFilament
Created by Patrick on 3/1/2024 in #❓┊help
How to manipulate RelationManager query with laravel-adjacency-list tree() query?
Hi guys, I am using the laravel-adjacency-list package to work with hierarchies in my models. In my ModelResource I manipulate the query with: ->modifyQueryUsing(function (Builder $query) { return $query->tree()->orderBy('path'); }) and it works perfectly. However because the RelationManager has already a scope, the query manipulation is not working like this. Can anybody help me with the right manipulation to get the same tree() result in my RelationManager? Thanks
1 replies
FFilament
Created by Patrick on 2/20/2024 in #❓┊help
Best solution for dynamic Model attribute fields via Relationmanager
Hi all, I am new to Filament and Laravel, trying to get the following working. I have Tenant, CompanyGroup and CompanyGroupAttribute Model. A Tenant should create CompanyGroupAttributes which should then act as Form Fields for CompanyGroup. So I have different CompanyGroupAttributes per Tenant. A CompanyGroup belongs to one Tenant and should have all related CompanyGroupAttributes. The idea behind this is to provide custom attributes to each Tenant for their CompanyGroups. What would be the best implementation for this? Atm I have a belongsToMany relationship for CompanyGroup and CompanyGroupAttribute to have a pivot table to store the value for each custom attribute. However I am struggling to set the pivot table value on CompanyGroup creation in my CompanyGroupRelationManager. I am sure I made a mistake choosing the wrong relations or missing a logic part. Any ideas? Appreciate your help 🙂 Thanks
4 replies