Added client to time entries

This commit is contained in:
Constantin Graf
2024-05-29 17:20:37 +02:00
committed by Constantin Graf
parent 2862033321
commit ec239f20f2
10 changed files with 372 additions and 7 deletions

View File

@@ -155,6 +155,7 @@ class TimeEntryFactory extends Factory
return $this->state(function (array $attributes) use ($project) {
return [
'project_id' => $project?->getKey(),
'client_id' => $project?->client_id,
];
});
}
@@ -164,6 +165,8 @@ class TimeEntryFactory extends Factory
return $this->state(function (array $attributes) use ($task) {
return [
'task_id' => $task?->getKey(),
'project_id' => $task?->project?->getKey(),
'client_id' => $task?->project?->client?->getKey(),
];
});
}