Replace the demo home page with a dashboard
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]>
This commit is contained in:
@@ -46,6 +46,22 @@ enum JobStatus: string
|
||||
return in_array($this, [self::Done, self::Invoiced, self::Billed, self::Archived], true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Work still to be done: a job past its due date in such a status is late.
|
||||
*/
|
||||
public function isOpen(): bool
|
||||
{
|
||||
return ! $this->locksTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list<self>
|
||||
*/
|
||||
public static function openStatuses(): array
|
||||
{
|
||||
return array_values(array_filter(self::cases(), fn (self $status): bool => $status->isOpen()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether moving from this status to $to opens the lock on hours and expenses.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user