- 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]>
70 lines
3.6 KiB
PHP
70 lines
3.6 KiB
PHP
{{--
|
|
A task of a continuing job lifted into the pipeline (docs/ui-kanban-board.md
|
|
4.3): dashed border, indigo bar with "Vapauta", link to the parent job.
|
|
Its column follows the task's status.
|
|
--}}
|
|
@props(['card', 'compact' => false, 'canMove' => false, 'canManage' => false])
|
|
|
|
@use('App\Modules\Jobs\Presentation\Support\BoardFormat')
|
|
|
|
|
|
<article
|
|
aria-labelledby="card-{{ $card->key() }}-title"
|
|
class="overflow-hidden rounded-xl border-2 border-dashed border-indigo-400 bg-white shadow-md dark:border-indigo-400/80 dark:bg-[#282a2e]"
|
|
>
|
|
<div
|
|
@if ($canMove) wire:sort:handle @endif
|
|
wire:click="openJob({{ $card->jobId }})"
|
|
title="{{ __('jobs.board.drag_hint') }}"
|
|
@class(['flex items-center justify-between gap-1.5 bg-indigo-700 px-2.5 py-1 text-white select-none', 'cursor-grab active:cursor-grabbing' => $canMove, 'cursor-pointer' => ! $canMove])
|
|
>
|
|
<div class="flex min-w-0 items-center gap-1 text-[10px] font-extrabold tracking-wide uppercase">
|
|
@if ($canMove)
|
|
<x-icon name="ellipsis-vertical" class="size-3 shrink-0 opacity-80" aria-hidden="true" />
|
|
@endif
|
|
<x-icon name="map-pin" class="size-3 shrink-0" aria-hidden="true" />
|
|
<span class="truncate">{{ __('jobs.board.task_card') }}</span>
|
|
</div>
|
|
@if ($canManage)
|
|
<button
|
|
type="button"
|
|
wire:click.stop="pinTask({{ $card->jobId }}, {{ $card->taskId }}, false)"
|
|
aria-label="{{ __('jobs.board.unpin_label', ['task' => $card->title]) }}"
|
|
class="inline-flex min-h-6 shrink-0 items-center rounded bg-white/20 px-1.5 text-[10px] font-bold transition hover:bg-white/30 focus-visible:outline-2 focus-visible:outline-white"
|
|
>{{ __('jobs.board.release') }}</button>
|
|
@endif
|
|
</div>
|
|
|
|
<div @class(['space-y-1 p-1.5' => $compact, 'space-y-2 p-2.5' => ! $compact])>
|
|
<p class="truncate text-[10px] font-semibold text-indigo-800 dark:text-indigo-200" title="{{ $card->customerName }} • {{ $card->jobName }}">
|
|
<x-icon name="link" class="inline size-3" aria-hidden="true" /> {{ $card->customerName }} • {{ $card->jobName }}
|
|
</p>
|
|
|
|
<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"
|
|
>{{ $card->title }}</button>
|
|
</h3>
|
|
|
|
<div class="flex items-center justify-between gap-1 text-[10px]">
|
|
<x-jobs.board.person :initials="$card->responsibleInitials()" :name="$card->responsibleFirstName()" />
|
|
<div class="flex items-center gap-1">
|
|
<x-jobs.board.priority-badge :priority="$card->priority" />
|
|
@if ($compact)
|
|
<span class="font-semibold text-neutral-700 dark:text-neutral-200">{{ BoardFormat::shortDate($card->dueOn) }}</span>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
@unless ($compact)
|
|
<p class="border-t border-neutral-200 pt-1.5 text-[10px] font-medium text-neutral-700 dark:border-[#36393f] dark:text-neutral-200">
|
|
{{ BoardFormat::shortDate($card->dueOn) }} • {{ BoardFormat::cardHours($card) }}
|
|
</p>
|
|
@endunless
|
|
</div>
|
|
</article>
|