Give the UI an indigo look with cards, status badges and empty states
- Dark indigo header and tinted page background; the mobile main menu gets its own row, in the same order as the keyboard reaches it. - Page titles with an icon chip (x-page-title, x-page, x-page-header) and card sections (x-panel, the card utility); x-table styled as a card with an indigo header row in AppServiceProvider::styleTables(). - Job and task statuses, late work, unapproved hours and stock states as badges with icon and text (x-status-badge, x-jobs.status, x-jobs.task-status), never colour alone. - Empty lists as x-empty-state; dashboard quick link tiles, week hour bars and trend arrows; Kanban columns and task cards edged by status; calendar today column and bar accents; quick sale, reports and machine console restyled; signed-out pages show the app name. - Focus rings use the primary colour in both themes (white in the header). - Document the components in CLAUDE.md; test the status badges. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -153,14 +153,12 @@ new class extends Component
|
||||
|
||||
@php($canMove = Gate::allows('jobs.manage'))
|
||||
|
||||
<div class="mx-auto max-w-[120rem] space-y-6 p-4 sm:p-6">
|
||||
<div class="flex flex-wrap items-center justify-between gap-4">
|
||||
<h1 class="text-2xl font-semibold">{{ __('jobs.board.title') }}</h1>
|
||||
<x-page width="full">
|
||||
<x-page-header :title="__('jobs.board.title')" icon="view-columns">
|
||||
<x-link :href="route('jobs.index')" navigate class="text-sm">{{ __('jobs.board.show_list') }}</x-link>
|
||||
</x-page-header>
|
||||
|
||||
<x-link :href="route('jobs.index')" navigate>{{ __('jobs.board.show_list') }}</x-link>
|
||||
</div>
|
||||
|
||||
<div class="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
||||
<div class="grid gap-4 rounded-xl border border-zinc-200 bg-white p-4 shadow-sm sm:grid-cols-2 lg:grid-cols-3 dark:border-zinc-700 dark:bg-zinc-900">
|
||||
{{-- TallStackUI's native select does not tie its label to the control, so aria-label names it. --}}
|
||||
<x-select.native wire:model.live="priority" :label="__('jobs.fields.priority')" :aria-label="__('jobs.fields.priority')">
|
||||
<option value="">{{ __('jobs.list.all_priorities') }}</option>
|
||||
@@ -205,11 +203,18 @@ new class extends Component
|
||||
id="column-{{ $status }}"
|
||||
wire:key="column-{{ $status }}"
|
||||
aria-labelledby="column-{{ $status }}-heading"
|
||||
class="flex min-w-0 flex-col rounded-lg border border-zinc-300 bg-zinc-200 p-3 dark:border-zinc-700 dark:bg-zinc-950"
|
||||
@class(['flex min-w-0 flex-col rounded-xl border border-t-4 border-zinc-200 bg-zinc-100 p-3 dark:border-zinc-700 dark:bg-zinc-900/60', match ($status) {
|
||||
'quote_request' => 'border-t-violet-500',
|
||||
'order', 'invoiced' => 'border-t-sky-500',
|
||||
'in_production' => 'border-t-primary-500',
|
||||
'on_hold' => 'border-t-amber-500',
|
||||
'done', 'billed' => 'border-t-emerald-500',
|
||||
default => 'border-t-zinc-400',
|
||||
}])
|
||||
>
|
||||
<h2 id="column-{{ $status }}-heading" class="mb-3 flex items-baseline justify-between gap-2 text-base font-semibold">
|
||||
{{ __('jobs.statuses.'.$status) }}
|
||||
<span class="text-sm font-normal">{{ trans_choice('jobs.board.count', count($jobs), ['count' => count($jobs)]) }}</span>
|
||||
<h2 id="column-{{ $status }}-heading" class="mb-3 flex flex-wrap items-center justify-between gap-2 text-base font-semibold">
|
||||
<x-jobs.status :status="$status" class="px-2.5 py-1 text-sm" />
|
||||
<span class="text-sm font-normal text-zinc-700 dark:text-zinc-200">{{ trans_choice('jobs.board.count', count($jobs), ['count' => count($jobs)]) }}</span>
|
||||
</h2>
|
||||
|
||||
<ul
|
||||
@@ -224,7 +229,7 @@ new class extends Component
|
||||
<li wire:key="job-card-{{ $job->id }}" @if ($canMove) wire:sort:item="{{ $job->id }}" @endif>
|
||||
<article
|
||||
aria-labelledby="job-card-{{ $job->id }}-title"
|
||||
class="relative space-y-2 rounded-md border border-zinc-200 bg-white p-3 text-sm shadow-sm dark:border-zinc-600 dark:bg-zinc-900"
|
||||
@class(['relative space-y-2 rounded-lg border border-zinc-200 bg-white p-3 text-sm shadow-sm transition hover:shadow-md dark:border-zinc-600 dark:bg-zinc-800', 'border-l-4 border-l-red-600 dark:border-l-red-400' => in_array($job->priority->value, ['urgent', 'immediate'], true)])
|
||||
>
|
||||
@if ($canMove)
|
||||
<x-icon name="bars-3" class="absolute top-3 right-3 size-5 cursor-grab text-zinc-500 dark:text-zinc-400" aria-hidden="true" />
|
||||
@@ -264,10 +269,10 @@ new class extends Component
|
||||
</article>
|
||||
</li>
|
||||
@empty
|
||||
<li wire:key="empty-{{ $status }}" class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('jobs.board.empty') }}</li>
|
||||
<li wire:key="empty-{{ $status }}" class="rounded-lg border border-dashed border-zinc-300 p-3 text-center text-sm text-zinc-700 dark:border-zinc-600 dark:text-zinc-200">{{ __('jobs.board.empty') }}</li>
|
||||
@endforelse
|
||||
</ul>
|
||||
</section>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</x-page>
|
||||
|
||||
Reference in New Issue
Block a user