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]>
This commit is contained in:
2026-11-30 06:33:28 +02:00
co-authored by Claude Opus 5.5
parent f4b58f6b1d
commit 6332ff0fa9
35 changed files with 3556 additions and 494 deletions
@@ -0,0 +1,99 @@
{{--
A customer job card (docs/ui-kanban-board.md 4.1): customer bar, title
that opens the job editor, responsible person, service unit, priority,
due date, hours and the job's tasks, which open inside the card and can
be marked done. Compact cards have three rows.
--}}
@props(['card', 'compact' => false, 'canMove' => false, 'canColor' => false, 'canCheck' => false])
@use('App\Modules\Jobs\Presentation\Support\BoardFormat')
@php
$total = count($card->tasks);
$done = $card->doneTaskCount();
@endphp
<article
aria-labelledby="card-{{ $card->key() }}-title"
x-data="{ expanded: false }"
class="overflow-hidden rounded-xl border border-neutral-300 bg-white shadow-sm transition dark:border-[#36393f] dark:bg-[#282a2e]"
>
<x-jobs.board.card-header :card="$card" :can-move="$canMove" :can-color="$canColor" />
<div @class(['space-y-1.5 p-1.5' => $compact, 'space-y-2 p-2.5' => ! $compact])>
<h3 class="m-0" id="card-{{ $card->key() }}-title">
<button
type="button"
id="card-{{ $card->key() }}-open"
wire:click="openJob({{ $card->jobId }})"
title="{{ $card->title }}"
class="block w-full truncate rounded text-left text-[13px] font-bold text-neutral-900 hover:underline focus-visible:outline-2 focus-visible:outline-primary-600 dark:text-white dark:focus-visible:outline-primary-300"
><span class="sr-only">{{ $card->number }} </span>{{ $card->title }}</button>
</h3>
@if ($compact)
<div class="flex items-center justify-between gap-1 text-[10px]">
<div class="flex min-w-0 items-center gap-1">
<x-jobs.board.person :initials="$card->responsibleInitials()" :name="$card->responsibleFirstName()" />
<x-jobs.board.priority-badge :priority="$card->priority" />
</div>
@if ($total > 0)
<button
type="button"
x-on:click="expanded = ! expanded"
x-bind:aria-expanded="expanded.toString()"
aria-controls="tasks-{{ $card->key() }}"
aria-label="{{ __('jobs.board.tasks_compact', ['done' => $done, 'total' => $total]) }}"
class="inline-flex min-h-6 shrink-0 items-center gap-0.5 rounded bg-neutral-100 px-1.5 text-[10px] font-bold text-neutral-800 transition hover:bg-neutral-200 focus-visible:outline-2 focus-visible:outline-primary-600 dark:bg-[#1e2023] dark:text-neutral-100 dark:hover:bg-[#32353b] dark:focus-visible:outline-primary-300"
>
{{ $done }}/{{ $total }}
<x-icon name="chevron-down" class="size-3 transition" x-bind:class="expanded && 'rotate-180'" aria-hidden="true" />
</button>
@endif
</div>
@else
<div class="flex items-center justify-between gap-1 text-[10px]">
<x-jobs.board.person :initials="$card->responsibleInitials()" :name="$card->responsibleFirstName()" />
<div class="flex min-w-0 items-center gap-1">
@if ($card->serviceUnitName !== null)
<span class="truncate rounded bg-neutral-100 px-1.5 py-0.5 font-medium text-neutral-700 dark:bg-[#1e2023] dark:text-neutral-200" title="{{ $card->serviceUnitName }}">{{ $card->serviceUnitName }}</span>
@endif
<x-jobs.board.priority-badge :priority="$card->priority" />
</div>
</div>
<p class="flex flex-wrap items-center gap-1.5 text-[10px] text-neutral-700 dark:text-neutral-200">
@if ($card->isLate)
<span class="inline-flex items-center gap-0.5 font-bold text-red-700 dark:text-red-200">
<x-icon name="exclamation-triangle" class="size-3" aria-hidden="true" />{{ __('jobs.board.late', ['date' => BoardFormat::shortDate($card->dueOn)]) }}
</span>
@else
<span class="font-medium">{{ __('jobs.board.due', ['date' => BoardFormat::shortDate($card->dueOn)]) }}</span>
@endif
<span aria-hidden="true">•</span>
<span>{{ BoardFormat::cardHours($card) }}</span>
</p>
@if ($total > 0)
<div class="border-t border-neutral-200 pt-1 dark:border-[#36393f]">
<button
type="button"
x-on:click="expanded = ! expanded"
x-bind:aria-expanded="expanded.toString()"
aria-controls="tasks-{{ $card->key() }}"
class="flex min-h-6 w-full items-center justify-between rounded px-1.5 text-[11px] font-semibold text-neutral-800 transition hover:bg-neutral-100 focus-visible:outline-2 focus-visible:outline-primary-600 dark:text-neutral-100 dark:hover:bg-[#32353b] dark:focus-visible:outline-primary-300"
>
<span>{{ __('jobs.board.tasks_toggle', ['done' => $done, 'total' => $total]) }}</span>
<x-icon name="chevron-down" class="size-3.5 transition" x-bind:class="expanded && 'rotate-180'" aria-hidden="true" />
</button>
</div>
@endif
@endif
@if ($total > 0)
<div id="tasks-{{ $card->key() }}" x-show="expanded" x-cloak @class(['border-t border-neutral-200 pt-1 dark:border-[#36393f]' => $compact, 'mt-1.5' => ! $compact])>
<x-jobs.board.task-list :card="$card" :can-check="$canCheck" :compact="$compact" />
</div>
@endif
</div>
</article>