mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 00:02:15 +01:00
Fixed time entries exports for employees
This commit is contained in:
committed by
Constantin Graf
parent
b4edcaa2dc
commit
36caadeb14
@@ -56,10 +56,12 @@ abstract class TestCaseWithDatabase extends TestCase
|
||||
/**
|
||||
* @return object{user: User, organization: Organization, member: Member, owner: User, ownerMember: Member}
|
||||
*/
|
||||
public function createUserWithRole(Role $role): object
|
||||
public function createUserWithRole(Role $role, bool $employeesCanSeeBillableRates = false): object
|
||||
{
|
||||
$owner = User::factory()->create();
|
||||
$organization = Organization::factory()->withOwner($owner)->create();
|
||||
$organization = Organization::factory()->withOwner($owner)->create([
|
||||
'employees_can_see_billable_rates' => $employeesCanSeeBillableRates,
|
||||
]);
|
||||
$ownerMember = Member::factory()->forUser($owner)->forOrganization($organization)->role(Role::Owner)->create();
|
||||
$owner->currentOrganization()->associate($organization);
|
||||
$owner->save();
|
||||
|
||||
Reference in New Issue
Block a user