Kanban / timesheet update
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Modules\TimeTracking\Application\DTOs;
|
||||
|
||||
use App\Modules\Jobs\Domain\Enums\JobStatus;
|
||||
use App\Modules\TimeTracking\Domain\Enums\EntryBillingModel;
|
||||
|
||||
/**
|
||||
* A customer job on the time sheet (level 2) with its task rows.
|
||||
*/
|
||||
final readonly class TimesheetJobGroup
|
||||
{
|
||||
/**
|
||||
* @param list<TimesheetTaskRow> $rows
|
||||
*/
|
||||
public function __construct(
|
||||
public int $jobId,
|
||||
public string $number,
|
||||
public string $name,
|
||||
public JobStatus $status,
|
||||
public ?string $paymentBasis,
|
||||
public int $accumulatedQuarters,
|
||||
public array $rows,
|
||||
) {}
|
||||
|
||||
public function billingModel(): EntryBillingModel
|
||||
{
|
||||
return EntryBillingModel::forPaymentBasis($this->paymentBasis);
|
||||
}
|
||||
|
||||
public function isContinuing(): bool
|
||||
{
|
||||
return $this->status === JobStatus::Ongoing;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user