Files
petriandClaude Opus 5.5 6332ff0fa9 Rebuild the Kanban board after the prototype, with the job editor and quick intake dialog
- Toolbar: whose board (own, a person, a service line, all), pipeline
  views (daily, sales, full), urgent and late filters with a live count,
  normal and compact density, and the quick intake button.
- Columns side by side with horizontal scrolling on desktop, stacked on
  phones; each user's own column colours and order, the urgent column's
  threshold menu, and the continuing jobs column.
- Cards in customer colours: job cards with their tasks checked off inside
  the card (the status select is gone), continuing job cards with the next
  period, PIN and quick add, and pinned task cards. Dragging moves and
  orders cards; the keyboard opens the job editor from the card title.
- Job editor dialog: every job detail, tasks with checklists and
  templates, quick hours (TimeTracking) and expenses (Expenses), history.
- The quick intake form also adds a contact person, initial status and
  priority, and opens as a dialog on the board.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 06:33:28 +02:00

40 lines
1022 B
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace App\Modules\Jobs\Presentation\Support;
use App\Modules\Jobs\Application\DTOs\BoardCard;
use Carbon\CarbonImmutable;
/**
* Finnish short formats on Kanban cards: "16.12." and "1,5".
*/
final class BoardFormat
{
public static function shortDate(?string $date): string
{
return $date === null ? '–' : CarbonImmutable::parse($date)->format('j.n.');
}
public static function hours(float|string|null $hours): string
{
if ($hours === null || $hours === '') {
return '0';
}
$text = rtrim(rtrim(number_format((float) $hours, 2, '.', ''), '0'), '.');
return str_replace('.', ',', $text === '' ? '0' : $text);
}
/**
* "1,5/4 h": recorded against estimated hours.
*/
public static function cardHours(BoardCard $card): string
{
return __('jobs.board.hours', [
'logged' => self::hours($card->loggedHours()),
'estimated' => self::hours($card->estimatedHours),
]);
}
}