prouse_
prouse_
FFilament
Created by prouse_ on 1/7/2025 in #❓┊help
Close modal inside afterStateUpdated in form
If anyone has any similar issue. After a lot of digging I found the solution which is actually very simple. You can run $livewire->unmountFormComponentAction() which will close the modal. Unfortunately this is not documented anywhere. @Dan Harrin maybe something to mention in the new v4 docs? 😊
12 replies
FFilament
Created by prouse_ on 1/7/2025 in #❓┊help
Close modal inside afterStateUpdated in form
I am using a Filament Select component. I have some logic in the afterStateUpdated and in there I would like to close the modal. It's okay if it's outside afterStateUpdated method as well as long as I can detect that a option has been selected.
12 replies
FFilament
Created by prouse_ on 1/5/2025 in #❓┊help
All Tenants option
@toeknee where would you put the scope "auth()->user()->tenants?
11 replies
FFilament
Created by prouse_ on 1/5/2025 in #❓┊help
All Tenants option
@toeknee how would you change the value of scopeToTenant based on which tenant is selected? Since it's a static variable. Also, in our case when selecting all, it should only be all Tenants which the user has access to. Not all tenants that exist in the application. Also, I do not like the fact of creating 1 global tenant record. Can you think of any other way to solve that part?
11 replies
FFilament
Created by prouse_ on 1/5/2025 in #❓┊help
All Tenants option
Interesting solution. Basically you have implemented your own tenancy selector using a multi select? How have you connected it with the scopes?
11 replies
FFilament
Created by prouse_ on 11/9/2024 in #❓┊help
Same field in all forms/resources
Yeah, between these two options I agree with you. What I'm looking for is a solution similar to how you can use a bootable trait in laravel models to add functionality to your model without needing to touch the rest of the model. Basically hooking into the form/table using the trait. Or some other similar solution. But I guess that is currently not possible with Filament.. 😞
10 replies
FFilament
Created by prouse_ on 11/9/2024 in #❓┊help
Same field in all forms/resources
I think it's more than just adding to all the forms. Because all resources that have this also needs to add in the table, and then also in the filters would be preferable. That's 3 places per resource now at least where we need to repeat the same code. So in that sense a trait or being able to extend a specific class would make it much cleaner.
10 replies
FFilament
Created by prouse_ on 11/9/2024 in #❓┊help
Same field in all forms/resources
@awcodes do you have any way in mind?
10 replies
FFilament
Created by prouse_ on 11/9/2024 in #❓┊help
Same field in all forms/resources
Ideally we want to avoid needing to add the component into each form and then also the column into each table. Would like to achieve it in a more elegant way. For example like how you can use traits in Laravel models and boot into it. Just adding a trait to the resource. Or extend CompanyResource or just add a property to the Resource. I can't find any way though without overriding and changing too much of the core.
10 replies
FFilament
Created by Becker Maxime on 10/22/2024 in #❓┊help
All Tenant
@Becker Maxime did you manage to solve this in any good way? I assume you wanted an "All" option inside the tenant menu and not in the filters?
13 replies
FFilament
Created by prouse_ on 10/6/2024 in #❓┊help
Admin and super admin
A video about this would be great! We have multi tenancy. My main concern is basically. Should we use multiple panels? And if yes, how do we best reuse the fields/logic. Extending the resources or making classes for the fields which we can reuse? And if we do not do multiple panels. How do we best make a clear seperation between regular fields and super admin fields.
18 replies
FFilament
Created by prouse_ on 10/6/2024 in #❓┊help
Admin and super admin
Do you also need to extend/overwrite the pages as well in this case? Such as Create, Edit and so on? It sounds like we have similar requirements. How has this solution worked for you? Any flaws so far?
18 replies
FFilament
Created by prouse_ on 10/6/2024 in #❓┊help
Admin and super admin
This looks nice! But would you suggest to use multiple panels in this case and then reuse the fields in the super admin panel? Or what would you suggest?
18 replies
FFilament
Created by prouse_ on 10/6/2024 in #❓┊help
Admin and super admin
Thanks for your reply. I definitely agree with you about not wanting to change to much structure. That's why I'm wondering what is the best way to achieve this in Filament. The tests is a good way to ensure of course. But it's still easy for a new team member to add a new field and forget to make it hidden for regular users and also write test for it. I'm looking for a way where we can put a clear seperation between the admin fields and super admin fields. Do you have any idea on the best way to achieve that?
18 replies
FFilament
Created by prouse_ on 10/6/2024 in #❓┊help
Admin and super admin
The visible solution I don't like since it's easy for a new team member to add a new super admin field and then forget about the is visible since all is in the same class/file. So somehow I am looking for a solution that puts a clear seperation between the regular fields and super admin fields.
18 replies
FFilament
Created by prouse_ on 11/17/2023 in #❓┊help
Disable tenant menu with tenancy
I don't think that works since in the view file it only checks for hasTenancy and shows the menu based on that. Do you think we can add a feature to disable it so that you don't need to override the view?
3 replies
FFilament
Created by prouse_ on 11/17/2023 in #❓┊help
Hook into before form schema
That's definitely a solution. I was just looking at a more clean solution where you don't always have to remember to include this.
4 replies