#62 - vacation request list for approvers (#69)

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* #5 - bump dependencies

* #43 - wip

* #43 - add composer script

* #43 - fix

* #43 - fix

* #43 - wip

* #43 - ecs fix

* #43 - cr fix

* #43 - cr fix

* #43 - fix

* #62 - wip

* #62 - wip

* #62 - wip

* #62 - fix

* #62 - fix

* #62 - fix

* #62 - fix

* #62 - fix

* #62 - ecs fix

Co-authored-by: EwelinaLasowy <ewelina.lasowy@blumilk.pl>
This commit is contained in:
Adrian Hopek
2022-03-08 09:25:24 +01:00
committed by GitHub
parent af6f747aa2
commit db4be79c91
28 changed files with 753 additions and 146 deletions

View File

@@ -10,6 +10,11 @@ use Toby\Eloquent\Models\VacationRequest;
class VacationRequestPolicy
{
public function listAll(User $user): bool
{
return in_array($user->role, [Role::AdministrativeApprover, Role::TechnicalApprover], true);
}
public function createOnBehalfOfEmployee(User $user): bool
{
return $user->role === Role::AdministrativeApprover;