Grogu
Conditional actions on table columns
Hi all!
I have a table, along the Y axis (rows) is a list of locations, and each column along the X axis is information from different relations to that Location (complianceA.name, complianceB.name).
I want the ability when clicking on the column, to either open an edit modal for the relation if it exists, and to open a create modal for the relation if it does not exist.
Any help appreciated!
16 replies
New tailwindcss classes not bundling in new blade files
Wondering what I'm doing wrong.
I have
composer dev
/ npm run dev
running, and created a new file:
resources/views/livewire/application-nav.blade.php
Added hover:text-blue-500
to an element in the new file, restarted the bundlers, but that class is never being generated in the bundled css file and therefore the text is not turning blue on hover.
Any help appreciated!27 replies
Relation manager not allowing duplicates
Hi there, I have roles and users in my app. In the pivot table, there is an optional "assignable" morph, so that the role can be against another entity, such as my Location model... "A user has a role for this location..."
I should be able to attach multiple roles to a user, as long as the assignable is different, so the user can have the same role for multiple locations, but I can't seem to figure out how to achieve this? In the relation manager attach action, the role is removed from the selection as soon as it's been assigned once. If I hard code the role options to always displace all, if i attach multiple roles to a user with different "assignables", when I "detach" one record, it detaches all relations which have the same user_id, role_id... Any help? I've attached some files, and my relationships include the id pivot:
Thanks!
2 replies
How to set the default action on table row click
Hi all!
It seems an obvious one, but I can't seem to figure out how filament determines the default action when a table row is clicked. I have 2 resources, both have View and Edit actions in the $table->actions() array, yet when clicking a row in 1 of the resources, I am taken to the edit page and the other resource goes to the view page?
Thanks!
7 replies