Enable users to execute workflows

This commit is contained in:
Deon George
2021-09-29 17:11:46 +10:00
parent 4243da9c32
commit 7acb9e964b
7 changed files with 10 additions and 7 deletions

View File

@@ -48,9 +48,9 @@ class ServicePolicy
* @param string $stage
* @return bool
*/
public function progress(User $uo,Service $so,string $stage): bool
public function progress(User $uo,Service $so,string $stage=''): bool
{
return $so->actions()->has($stage);
return $stage ? $so->actions()->has(strtoupper($stage)) : $so->actions()->count();
}
/**