Added filled gaps to time entry aggregation; Moved aggregation to service

This commit is contained in:
Constantin Graf
2024-05-21 17:31:45 +02:00
parent efd3fef0c5
commit 2a8ab12017
30 changed files with 1017 additions and 218 deletions

View File

@@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
namespace App\Enums;
enum TimeEntryAggregationType: string
{
case Day = 'day';
case Week = 'week';
case Month = 'month';
case Year = 'year';
case User = 'user';
case Project = 'project';
case Task = 'task';
case Client = 'client';
case Billable = 'billable';
public function toInterval(): ?TimeEntryAggregationTypeInterval
{
return match ($this) {
TimeEntryAggregationType::Day => TimeEntryAggregationTypeInterval::Day,
TimeEntryAggregationType::Week => TimeEntryAggregationTypeInterval::Week,
TimeEntryAggregationType::Month => TimeEntryAggregationTypeInterval::Month,
TimeEntryAggregationType::Year => TimeEntryAggregationTypeInterval::Year,
default => null
};
}
}