feat(time-tracking) : add ActiveTimeEntryProvider, fixtures, and serialization groups
- ActiveTimeEntryProvider returns active timer for current user - TimeEntry fixtures with 10 sample entries for the SIRH project - Add time_entry:read group to Project, User, and TaskType for embedded serialization Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -32,11 +32,11 @@ class Project
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
#[Groups(['project:read'])]
|
||||
#[Groups(['project:read', 'time_entry:read'])]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
#[Groups(['project:read', 'project:write'])]
|
||||
#[Groups(['project:read', 'project:write', 'time_entry:read'])]
|
||||
private ?string $name = null;
|
||||
|
||||
#[ORM\Column(type: 'text', nullable: true)]
|
||||
@@ -44,7 +44,7 @@ class Project
|
||||
private ?string $description = null;
|
||||
|
||||
#[ORM\Column(length: 7)]
|
||||
#[Groups(['project:read', 'project:write'])]
|
||||
#[Groups(['project:read', 'project:write', 'time_entry:read'])]
|
||||
private ?string $color = '#222783';
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: Client::class, inversedBy: 'projects')]
|
||||
|
||||
@@ -32,15 +32,15 @@ class TaskType
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
#[Groups(['task_type:read', 'task:read'])]
|
||||
#[Groups(['task_type:read', 'task:read', 'time_entry:read'])]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
#[Groups(['task_type:read', 'task_type:write', 'task:read'])]
|
||||
#[Groups(['task_type:read', 'task_type:write', 'task:read', 'time_entry:read'])]
|
||||
private ?string $label = null;
|
||||
|
||||
#[ORM\Column(length: 7)]
|
||||
#[Groups(['task_type:read', 'task_type:write', 'task:read'])]
|
||||
#[Groups(['task_type:read', 'task_type:write', 'task:read', 'time_entry:read'])]
|
||||
private ?string $color = '#222783';
|
||||
|
||||
public function getId(): ?int
|
||||
|
||||
@@ -46,11 +46,11 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
#[Groups(['me:read', 'task:read', 'user:list'])]
|
||||
#[Groups(['me:read', 'task:read', 'user:list', 'time_entry:read'])]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(length: 180, unique: true)]
|
||||
#[Groups(['me:read', 'task:read', 'user:list', 'user:write'])]
|
||||
#[Groups(['me:read', 'task:read', 'user:list', 'user:write', 'time_entry:read'])]
|
||||
private ?string $username = null;
|
||||
|
||||
/** @var list<string> */
|
||||
|
||||
Reference in New Issue
Block a user