Add disable activity check option on certain roles #1078 (#1087)

* Add boolean field "disable activity checks" to role, check for this field inside PilotLeave-Check, add tests

* fix checkbox on form

* CS fixes

* CS fixes again :-)

Co-authored-by: Andreas Palm <ap@ewsp.de>
This commit is contained in:
exciler
2021-03-19 18:09:29 +01:00
committed by GitHub
parent 2cede04b1e
commit 9bb192b97f
7 changed files with 117 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ use App\Models\Aircraft;
use App\Models\Enums\UserState;
use App\Models\Flight;
use App\Models\Pirep;
use App\Models\Role;
use App\Models\Subfleet;
use App\Models\User;
use Exception;
@@ -154,4 +155,16 @@ trait TestData
'aircraft' => $aircraft,
];
}
/**
* Create a role
*
* @param array $attrs Additional role attributes
*
* @return Role
*/
public function createRole(array $attrs = []): Role
{
return factory(Role::class)->create($attrs);
}
}