Kanban / timesheet update

This commit is contained in:
2026-11-30 06:56:14 +02:00
parent 6332ff0fa9
commit a4dbe8ce09
46 changed files with 8091 additions and 331 deletions
@@ -0,0 +1,47 @@
<?php
declare(strict_types=1);
namespace App\Modules\TimeTracking\Domain\Enums;
/**
* Laskutusperuste of a time entry (docs/ui-timesheet.md 5.2): within a
* fixed price (K), billed by the hour (€) or not billable (•). It is
* tracking only: billing still follows the job's payment basis.
*/
enum EntryBillingModel: string
{
case Fixed = 'fixed';
case Hourly = 'hourly';
case NonBillable = 'non_billable';
/**
* The default of an entry, from its job's payment basis (a Jobs
* PaymentBasis value).
*/
public static function forPaymentBasis(?string $paymentBasis): self
{
return match ($paymentBasis) {
'fixed_quote', 'price_list', 'monthly_fee' => self::Fixed,
'not_billable' => self::NonBillable,
default => self::Hourly,
};
}
public function symbol(): string
{
return match ($this) {
self::Fixed => 'K',
self::Hourly => '€',
self::NonBillable => '•',
};
}
/**
* Billed or within a fixed price, against internal work.
*/
public function isBillable(): bool
{
return $this !== self::NonBillable;
}
}