-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to display two buttons Approve an Reject on the view page of Ressource? #33
Comments
They will only show if at the user can approve or reject. Has the process been submitted? If the flow has started is it still at initiated state? If so then you need the submit button. If you want to auto-submit on creation you can use: public bool $autoSubmit = true; on the model as per: https://github.com/ringlesoft/laravel-process-approval?tab=readme-ov-file#model-submitting |
Thanks for your answer @tonypartridge At the moment, I only have one user with the Admin role who can validate or reject the process (he can do all the actions). So for the submission, I do it manually. I'd like to be able to display both the Approve and Reject buttons once I'm on my view page, since the current user has the Admin role, so he can see both buttons normally, but that's not the case at the moment. I'm trying now to use auto-submit as you told me above and then display only the buttons Approve or Reject but still dosen't work. |
Dive into the vendor source code and dd on the button visibility parameters to see which are not being hit |
I am currently step by step setup filament-approval on my project. I need to display the "Approve" and "Reject" buttons on my view page. To achieve this, I added the following actions to the getHeaderActions function :
ApproveAction::make();
RejectAction::make();
However, despite this configuration, the buttons are still not appearing on the page. I was expecting to see both buttons in the header, but nothing shows up.
Have I missed a step or a specific configuration ? Are there any prerequisites or additional dependencies required to make these actions visible?
Thank you in advance for your help.
The text was updated successfully, but these errors were encountered: