Add ability to update billable rate of existing time entries

This commit is contained in:
Constantin Graf
2024-06-14 16:46:39 +02:00
committed by Gregor Vostrak
parent 7c26cee1ea
commit 2184b3c835
22 changed files with 1001 additions and 25 deletions

View File

@@ -23,12 +23,26 @@ class OrganizationFactory extends Factory
return [
'name' => $this->faker->unique()->company(),
'currency' => $this->faker->currencyCode(),
'billable_rate' => $this->faker->numberBetween(50, 1000) * 100,
'billable_rate' => null,
'user_id' => User::factory(),
'personal_team' => true,
];
}
public function billableRate(?int $billableRate): self
{
return $this->state(fn (array $attributes) => [
'billable_rate' => $billableRate,
]);
}
public function withBillableRate(): self
{
return $this->state(fn (array $attributes) => [
'billable_rate' => $this->faker->numberBetween(50, 1000) * 100,
]);
}
public function withOwner(?User $owner = null): self
{
return $this->state(fn (array $attributes) => [