Ron
Testing call wizard next step fails
I am unable to get my Pest test function to actually call the form wizard next step.
CreateUserTest.php This test fails with "Component has no errors" but the name field is required. Following the test source code and injecting "ray()" debug calls, it appears the next step action is not called. CreateUser.php I referenced the following this link https://filamentphp.com/docs/3.x/panels/resources/creating-records#using-a-wizard in the docs. Does anyone know the correct way to test the next step action in a form wizard?
CreateUserTest.php This test fails with "Component has no errors" but the name field is required. Following the test source code and injecting "ray()" debug calls, it appears the next step action is not called. CreateUser.php I referenced the following this link https://filamentphp.com/docs/3.x/panels/resources/creating-records#using-a-wizard in the docs. Does anyone know the correct way to test the next step action in a form wizard?
2 replies
reload a Livewire form component after updating the record
I am attempting to refresh a livewire form component after updating the record associated with the form section. I have a form section with a simple schema that just loads a livewire component.
That livewire component uses a mount method to retrieve the record and passes this to an infolist. This all works great on initial load, but I have a section footer action that updates the record and I want the infolist to refresh after update.
The OverrideRecommendation action has a modal form and then updates the record in the action
ViewApplicationRecommendation uses an infolist and includes a mount method to get the record
In the OverrideRecommendation action I can redirect, which would be fine but it doesn't seem as Livewire assorts redirects to url fragments to position the page to the section.
8 replies
How to test Header/Footer Actions in a Section Form Component
callFormComponentAction fails with error "Call to a member function getKey() on null" when attempting to test calling a section header action.
Can callFormComponentAction() be used to test Header/Footer actions on Form Sections.
Test Code:
Form Code:
2 replies
How to close an ActionGroup dropdown with a custom function after the function completes
I see from a similar post how to close the drop down immediately on click, but is there a way to close the drop down within the custom function itself to preserve the progress spinner on the action?
The code below shows an action w/in a group where the drop down is closed immediately (this code was from a similar post)
5 replies
Global navigation combined from multiple panels.
Is it possible to combine the navigation from multiple "sub" panels into a single app panel.
I have an App panel with this code:
And PanelNavigation:items() calls module facades to pull the navigation items from respective panels
The getNavigationItems from a facade / module gets the resource navitems with the following
I use the same navigation builder in each panel and the code works only when running the /admin panel.
When accessing the /app panel, the error is Route [filament.app.resources.companies.index] not defined.
It appears that CompanyResource::getNavigationItems() is using the App panel to build the route
Has anyone successfull built a global side nav with access to multiple panel resources?
3 replies