ViewAction::Make() in users list to show transactions of a user
I have a TransactionsResource in which every transaction of a user is logged. Now i want a button to see every transaction of this user in a modal window.
How will I implement this?
9 Replies
I have these two tables
Please provice code sample, until then, hop on the docs and try this:
Create a view page for each transaction: https://filamentphp.com/docs/3.x/panels/resources/viewing-records#adding-a-view-page-to-an-existing-resource
and also add the view action in the table: https://filamentphp.com/docs/3.x/panels/resources/viewing-records#adding-a-view-page-to-an-existing-resource
Thanks for this... I didn't find this.
My UserResource and Transaction is => Files
I registered the View in the TransactionResource. But I dont know how to open the View in a Modal to show every transaction of the specific user_id
I don't know if "Modal" is the right I want.
I want to show every transaction of the user in a new popup-window in the UserTable when I click on the action "show transactions"
I hope you know what I mean
ok, i added a relation manager to my users list. nice to have. but now, I want this table in a modal window with an action π
Though this is certainly possible. But it may be worth looking into combining the relation manager tabs with the form first. As this is built in and comes with no extra work. Im assuming that you just want to encapsulate the actual action (showing the transactions) from watching the record and scrolling down.
If your dont create an action, how can you open the modal?
You need to create a custom action for your User list table/record, loaded it with your relationship (HasMany) to show the correct table/form/infolist in a modal if that's all you want.
There's no other way around this modal requirement if you're using Filament only.
a friend helped me. Now i added a livewire table