Kanban / timesheet update
This commit is contained in:
+5
@@ -4,6 +4,7 @@ namespace App\Modules\TimeTracking\Infrastructure\Persistence\Repositories;
|
||||
|
||||
use App\Modules\TimeTracking\Domain\Contracts\TimeEntryRepository;
|
||||
use App\Modules\TimeTracking\Domain\Entities\TimeEntry;
|
||||
use App\Modules\TimeTracking\Domain\Enums\EntryBillingModel;
|
||||
use App\Modules\TimeTracking\Domain\ValueObjects\WorkedHours;
|
||||
use App\Modules\TimeTracking\Infrastructure\Persistence\Eloquent\TimeEntryModel;
|
||||
use DateTimeImmutable;
|
||||
@@ -40,6 +41,8 @@ class EloquentTimeEntryRepository implements TimeEntryRepository
|
||||
'worked_on' => $entry->workedOn()->format('Y-m-d'),
|
||||
'hours' => $entry->hours()->decimal(),
|
||||
'note' => $entry->note(),
|
||||
'billing_model' => $entry->billingModel()?->value,
|
||||
'internal_comment' => $entry->internalComment(),
|
||||
'approved_by' => $entry->approvedBy(),
|
||||
'approved_at' => $entry->approvedAt()?->format('Y-m-d H:i:s'),
|
||||
'billing_export_id' => $entry->billingExportId(),
|
||||
@@ -102,6 +105,8 @@ class EloquentTimeEntryRepository implements TimeEntryRepository
|
||||
$model->approved_by,
|
||||
$model->approved_at === null ? null : DateTimeImmutable::createFromInterface($model->approved_at),
|
||||
$model->billing_export_id,
|
||||
$model->billing_model === null ? null : EntryBillingModel::tryFrom($model->billing_model),
|
||||
$model->internal_comment,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user