Everyone sees their open tasks on an agenda, their open jobs, this week's hours and quick links. Admin and management also get a lazily loaded management panel: things to do, the month so far against the previous month, jobs and late work, and everyone's workload. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
29 lines
719 B
PHP
29 lines
719 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Modules\Dashboard\Application\DTOs;
|
|
|
|
/**
|
|
* An open customer job on the home page. Status and priority are the Jobs
|
|
* module's keys; the due date is Y-m-d.
|
|
*/
|
|
final readonly class WorkJob
|
|
{
|
|
public function __construct(
|
|
public int $id,
|
|
public string $number,
|
|
public string $name,
|
|
public string $customerName,
|
|
public string $status,
|
|
public string $priority,
|
|
public ?string $dueOn,
|
|
public bool $isLate = false,
|
|
) {}
|
|
|
|
public function late(): self
|
|
{
|
|
return new self($this->id, $this->number, $this->name, $this->customerName, $this->status, $this->priority, $this->dueOn, true);
|
|
}
|
|
}
|