cloudcake / laravel-approval

Attach an approval process to any model, approve and disapprove from any other model, for Laravel.
MIT License
143 stars 15 forks source link

Multiple Approvers setup (Not an issue) #10

Closed ChinwalPrasad closed 4 years ago

ChinwalPrasad commented 4 years ago

Not an Issue (Need Help)

I have a project where a student submits a type of form. Based on the type of form there are different approvers associated with it.

EX. Form type 1 requires approval of Advisor and Dean Form type 2 requires approval of Instructor, Advisor and Dean. (in that order) and so on.

How can I achieve this workflow using this package? Let me know if this is not clear explanation and I will do my best to explain the scenario.

Appreciate all the help.

huge10 commented 4 years ago

This package doesn't handle different approver roles, nor does it enforce an order of approvers (with a different role). You might be better off writing the logic yourself. Are Advisor, Dean and Instuctor user roles or models on their own? You could combine this with a status on the form (ie. 'awaiting_advisor_approval', 'awaiting_dean_approval', etc.) and then use that status to list the forms to users with that role. If they approve, toggle the status to the next in your workflow. It wouldn't require this package, though.

ChinwalPrasad commented 4 years ago

@huge10 Thanks a lot for the explanation and help. Advisor, Dean and Instructor are models on their own.