training app, how to show ranks and requirements on user resource, and allow admin to mark completed
Hello, just my second app building with filament and I love it. Bumped into a bit of a tricky thing. Each user belongs to an organization, and each organization has ranks and corresponding requirements. How to show on the user edit page ( on filament panel of course ), the ranks and requirements for that users organization ( not a crud for these, already have separate crud for managing ranks and requirements). Admin just needs to be able to set a 'completed_at' date. So I need to show the ranks listed in order, and under each rank the corresponding requirements ( also listed in order ) I've been trying a custom widget but can't seem to get custom livewire blade view to load. Not even sure if that's the right approach. Any advise will be greatly appreciated.
6 Replies
Have a repeater of ranks per organisation? JSON Store?
thanks @toeknee that's an idea. I checked docs but not seeing how to load one relationship ( requirements ) but save data for a different one ( user_requirements_completed ).
Why not just do a custom view, pass the record to it then display it anyway you want. If it’s read only data anyway.
https://filamentphp.com/docs/3.x/forms/fields/custom#view-fields
Hi @awcodes , thank you. Actually do need the ability to set the 'completed_at' date, for when user completes a requirement.
Right that can just be a regular form component outside the View field. It’s all still part of the form.
Hey that's very clever! That might do the trick. Many thanks