- 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]>
48 lines
2.3 KiB
PHP
48 lines
2.3 KiB
PHP
{{--
|
|
The customer-coloured top bar of a job card: the drag handle
|
|
(wire:sort:handle) and a click target that opens the job editor. The
|
|
keyboard opens the job from the title button below; the palette button
|
|
changes the customer's colour for every card and the time sheet.
|
|
--}}
|
|
@props(['card', 'canMove' => false, 'canColor' => false])
|
|
|
|
@php
|
|
$color = new \App\Modules\Shared\Domain\ValueObjects\HexColor($card->customerHeaderColor ?? '#23476a');
|
|
$light = $color->isLight();
|
|
@endphp
|
|
|
|
<div
|
|
@if ($canMove) wire:sort:handle @endif
|
|
wire:click="openJob({{ $card->jobId }})"
|
|
title="{{ __('jobs.board.drag_hint') }}"
|
|
style="background-color: {{ $color->value }}; color: {{ $color->textColor() }}"
|
|
@class(['flex items-center justify-between gap-1 px-2 py-1 select-none', 'cursor-grab active:cursor-grabbing' => $canMove, 'cursor-pointer' => ! $canMove])
|
|
>
|
|
<div class="flex min-w-0 items-center gap-1">
|
|
@if ($canMove)
|
|
<x-icon name="ellipsis-vertical" class="size-3 shrink-0 opacity-80" aria-hidden="true" />
|
|
@endif
|
|
<span class="truncate text-[11px] font-extrabold tracking-tight">{{ $card->customerName }}</span>
|
|
</div>
|
|
<div class="flex shrink-0 items-center gap-1">
|
|
<span @class(['rounded px-1.5 text-[10px] font-bold', 'bg-black/10' => $light, 'bg-white/20' => ! $light])>{{ $card->number }}</span>
|
|
@if ($canColor)
|
|
<button
|
|
type="button"
|
|
x-on:click.stop="$dispatch('color-picker:open', {{ Js::from([
|
|
'id' => 'colour-picker',
|
|
'title' => __('jobs.board.customer_color_title', ['customer' => $card->customerName]),
|
|
'color' => $color->value,
|
|
'method' => 'setCustomerColor',
|
|
'args' => [$card->customerId],
|
|
'resettable' => $card->customerHeaderColor !== null,
|
|
]) }})"
|
|
aria-label="{{ __('jobs.board.customer_color_button', ['customer' => $card->customerName]) }}"
|
|
class="inline-flex size-6 items-center justify-center rounded hover:bg-black/15 focus-visible:outline-2 focus-visible:outline-current dark:hover:bg-white/15"
|
|
>
|
|
<x-icon name="swatch" class="size-3.5" aria-hidden="true" />
|
|
</button>
|
|
@endif
|
|
</div>
|
|
</div>
|