mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 08:12:17 +01:00
Add ability to update billable rate of existing time entries
This commit is contained in:
committed by
Gregor Vostrak
parent
7c26cee1ea
commit
2184b3c835
@@ -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) => [
|
||||
|
||||
Reference in New Issue
Block a user