WiseWill
Caching Filament components
Referring to https://filamentphp.com/docs/3.x/panels/installation#caching-filament-components
When I attempt I get an error:
Has component caching been dropped?
I am struggling with a bit of a lack of speed issue on a form which has a fair amount of Livewire and lots of components.
11 replies
Unauthenticated exception thrown instead of a login page
The path is set to '/' in the AppPanelProvider config. There is one panel.
If I visit the base url of my app, e.g. http://labman (it is hosted on my local dev box, but I can provide a link to a staging site) while I am logged in, everything works as expected, i.e the dashboard is displayed.
If I visit the login route, e.g. http://labman/login everything works as expected - I can log in, and I am redirected to the dashboard.
However, if I visit the base domain while not logged in, I get an "Unauthenticated" error instead of the login page, which is what I expect.
Flare link: https://flareapp.io/share/17WJD3DP
4 replies
Managing Relationships in the Form Builder
I have a pretty complex requirement related to relationships in a form.
The form is in a RequisitionResource, and the Requisition has a Patient and a Guarantor. When a new requisition is being captured, the operator can use a searchable Select to find the patient, but if the patient cannot be found, a new one must be created without leaving the page.
I am trying two approaches, a modal (https://bit.ly/3TMF42c) and a Section using the relationship() method (https://bit.ly/3TFG3B6).
The modal works, and once a new patient is created it fills all the fields properly, including those in the Section. My problem here is that the modal is not the preferred approach for the client.
If a patient is found in the Select and selected, the Section fields are populated, and can be edited - first prize. However, if a new patient is created using the same fields, the patient_id Select is not populated, and it really should be required(). Is there a way I can make the Section "live()" or something like that?
The Guarantor is actually just another instance of a Patient model, and is often the same person. It is handled in the same way as the patient, with a Select, modal forms and a Section.
A pair of buttons are provided to copy the patient_id to the gurantor_id, which both work, but the Section for the Guarantor is not populated when the patient_id is copied over. This is a problem, because the Guarantor form has a couple of fields which the patient doesn't have, which need to edited.
The preference here is to stick to the relationship() method on the Section layout component and drop the modals altogether.
I would really, really appreciate any help or suggestions offered.
Source code: https://gist.github.com/nettsite/ff80a0a061dfd49bfede1ee9c6afb227
Source code: https://gist.github.com/nettsite/ff80a0a061dfd49bfede1ee9c6afb227
2 replies
notification color
I have added the following code to position the notifications used in the panel builder forms , and it is perfect (I can't remember how I found out how to do this):
The notifications are a bit subtle for my use case. Is there a way to do something similar to change the notification colours and / or backgrounds for create and edit pages?
4 replies
Updating fields in a Section when a Select is changed based on a relationship.
For context, this is part of a laboratory system. A doctor completes a requisition, which is captured into the system. The requisition belongs to a patient:
A patient has many requisitions:
I need the requisition creation form to be able to select a patient, or create a new one if it exists. This works:
In addition, once the patient is selected, it must be displayed so that it can be updated in case any information has changed. I have made the Select live() in the hopes that the chosen or created patient's data can be presented in thuis section for editing:
I am obviously not doing the thing properly, because the fields in the section do not respond to changes in the select at all.
What do I need to do?
3 replies
Modal form for url action on panel
Is there any way I could open a modal before opening a url from an action? I want to open a custom form, and then use data from the form as a parameter on the url. This doesn't work at all, the url is simply opened. I would like to replace "cash" in the url with the value selected in the form.
3 replies