David | Fortune Validator
Custom Pages By User
Hi all
I need a little advice on the best approach. I have a Reporting page whereby I select a user and then I can multiple sub pages to view different types of data about said user.
Currently I select a user and I get the URL
Then I navigate to a subpage and pass along the selectedUser
I am doing this simply by custom pages under a cluster called /rephub/10/forecast-turnover``` would be more approporate but I'm not sure how to implement this.
I thought the User resource but only an admin can see this.
Other info: an admin can see all users in the rephub but a standard user can only see themselves.
Any tips on the best way to manage this would be appreciated as I have multiple area of my system that generate reports and such.
I could be overthinking this.
10 replies
SUB_NAVIGATION Hook
Hi all
I am having trouble finding a hook that will let me display content underneath the Sub Navigation on a resource.
I've tried all the hooks and the best I can find is PAGE_SUB_NAVIGATION_START_AFTER but that shows the content next to the sub navigation rather than under it.
Sorry if I am missing it but any help would be appreciated.
Thank you.
11 replies
Dynamic Badge Count on Sub Navigation Relation Page
Hi all
I am not finding a method that I can use which I can access the the relationship modal on a relationship manager PAGE.
I can edit the label of the sub navigation but I cannot seem to access the records to get a count.
I simply would like a badge count on the sub nav. Can anyone assist here at all?
Many thanks.
8 replies
Relationship Tabs on Mobile
Hi all
I noticed if you have a sub page navigation as a top of the page tabs ( the same as the relationship manger tabs ), on a mobile when using Sub Nav it changes to a nice SELECT, but if you are standard relationship manager tabs they stay as tabs.
Does anyone know a way to force a Select for mobile on this? It works much nicer when I have lots of relationship managers.
5 replies
Update Parent Form data after Relationship Manager update
Hi all
I have an Edit page with a relationship manager table. I update an item on the table and I now want to update the parent form to reflect a new 'total' field.
I have this so far:
It works but I get two Save notifcations. works great but as I have the unsaved notifactions on if I try to navigate away it thinks there is unsaved data. So I added in the $this->save()
Is this really the best way to update refresh the parent form? as currently Im updating the form twice. Once in an After() action on the table and again after the form has refreshed.
2 replies
Table -> Modal -> Filament Table
Hi all
I've an interesting issue.
I have a filament table with a custom action (opens a modal) on a row:
I have used ->modalContent to direct to a blade file which calls the livewire component
On the pallet lables modal, I have another livewire component which is utilising a Filament Table to display associated Pallet Labels. This is working to this point ( I assume this is the best method thus far? )
The issue I have:
When I click 'Create Pallet Label' or the Edit button it SHOULD open a SECOND modal, however I get a js error . If I click the button again it will then load modal and work as intended.
I wondered if 1) I am doing this the correct way or 2) ideas on fixing the error so it doesnt require two clicks
Thanks everyone.
3 replies
Is it possible to apply a class to a specific page? So I can target some css to only that page?
I am using panels and I have a relationshup manager table which I would like to apply some custom css to but I dont want to override every RM table on my app.
I've tried to look through the source html and I cannot see any unique identifier for that page.
10 replies
Eager load or lazy load on modals?
Sorry for the silly question. I have an Edit modal for a record on my table. I am using
$record->supplier
in multiple places ( supplier
being a relationship which gets the supplier modal for the table record ). Is a query being run each time to get the supplier info or is it eager loaded the once?
Thanks all. I am running $record->supplier
maybe five times through the schema so I idealy I didnt want to be running a query five times for the same thing.
Example code usage:
5 replies
Repeater action -> modal
Hey all
Feel like I live in this thread at the moment so I do apologise.
I have the following:
1) Estimate Edit Page with a repeater showing EstimatePrices. It shows a slimed version.
2) I want an action on the repeater item to open up the estimatePrices record so I can perform further relationship components and show more fields.
I cannot for the live of me figure out how to pass the repeater record model/collection in.
To clarify I want the record of the repeater passed in and not the main parent record.
Any help would be appreciated. Thank you.
35 replies
Get Repeater data for form save
hi all
I have an Estimate Model and I'm using a form with a repeater to show all EstimateCosts records associated. I can view and save these no problem. However, I want to be able to access all the repeater records before saving. They dont appear in the $data var.
My aim is to add all the 'price' fields from the repeater and save them to a field on the Estimate record.
Any help would be greatly appreciated.
5 replies
unsavedChangesAlert() - can this work on non panel. eg a filament form on a livewire component ?
can this work on non panel. eg a filament form on a livewire component ?
I’ve not worked out how if indeed it’s possible at all.
Thanks everyone.
4 replies
How to access Page key
Hi all
Just a quick one hopefully. I have need to dynamically access to page key eg Create Edit List.
I need to only allow a check on the default option for a select based off whether the $_GET parameter exists. But only want to do so on the Create form.
Is there a quick one to check this ?
Thanks all
8 replies
Embed Notification Action
I'm at a loss on this one. I have a notification that pops up and halts a Create form when no credit exists. I then have a button to request a credit limit. I cannot seem to fire off said custom action. for the moment I have a die() in place.
4 replies
Autofocus() on modals
Im seeing lots of posts about autofocus() not working on modals. I have now come across the issue myself, even on a simple form.
The follow user has this solution: https://discord.com/channels/883083792112300104/1137977978677108816/1138339761522753536
The above works but I feel like perhaps another solution is needed?
2 replies
Missing JS on livewire component
Hi all
I have a table and form with various actions on an existing project. It looks like the autosize on textareas is throwing an error.
livewire.js?id=c4fc8c5d:1125 Alpine Expression Error: height is not defined
and ReferenceError: resize is not defined
I have included Filament with @filamentScripts
in my main layout file. Any ideas?
EDIT: I am seeing the same errors on the Panel side of the site as well :/4 replies
Open Table Heading Model Action by URL
Hi all
I have the need whereby when I open a URL with a specific paramter that the model would open with the Create Form inside it. I'm sure I read something like this is possible in the docs but I cannot find it again...
21 replies
Focus another select after change
Hi all
I have the need for the focus to change automatically.
Eg I have company name select with autofocus on page load using ->autofocus(). After the company is selected I need it to auto focus onto the next select for 'product type'. Does anyone know how to achieve this?
FYI: I am using a form on a custom livewire page.
thanks all
5 replies