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
toeknee
toeknee7mo ago
Have a repeater of ranks per organisation? JSON Store?
Joe Kneeland
Joe Kneeland7mo ago
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 ).
awcodes
awcodes7mo ago
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
Joe Kneeland
Joe Kneeland7mo ago
Hi @awcodes , thank you. Actually do need the ability to set the 'completed_at' date, for when user completes a requirement.
awcodes
awcodes7mo ago
Right that can just be a regular form component outside the View field. It’s all still part of the form.
Joe Kneeland
Joe Kneeland7mo ago
Hey that's very clever! That might do the trick. Many thanks
Want results from more Discord servers?
Add your server
More Posts