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:
2026-11-29 10:53:10 +02:00
co-authored by Claude Opus 5.5
parent ef400054b0
commit 51b40b24fe
99 changed files with 702 additions and 388 deletions
@@ -620,7 +620,7 @@ new #[Layout('layouts.console')] class extends Component
?>
@php
$touch = 'inline-flex min-h-11 min-w-11 items-center justify-center gap-2 rounded-lg px-4 py-2 font-medium focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:focus-visible:outline-blue-400';
$touch = 'inline-flex min-h-11 min-w-11 items-center justify-center gap-2 rounded-lg px-4 py-2 font-medium focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300';
$primary = $touch.' bg-primary-600 text-white hover:bg-primary-700';
$secondary = $touch.' border border-zinc-500 bg-white text-zinc-900 hover:bg-zinc-100 dark:border-zinc-400 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-700';
$machine = $this->machine;
@@ -628,9 +628,9 @@ new #[Layout('layouts.console')] class extends Component
@endphp
<div wire:poll.30s="refreshList" class="mx-auto max-w-6xl space-y-6 p-3 sm:p-4">
<header class="flex flex-wrap items-center justify-between gap-3 rounded-lg bg-zinc-800 p-3 text-zinc-100 dark">
<header class="flex flex-wrap items-center justify-between gap-3 rounded-xl bg-primary-950 p-3 text-zinc-100 shadow-md dark">
<div class="min-w-0">
<h1 class="text-2xl font-semibold break-words">{{ $machine->name }}</h1>
<x-page-title icon="cpu-chip">{{ $machine->name }}</x-page-title>
<p class="text-base">{{ __('machines.console.user', ['name' => auth()->user()?->name]) }}</p>
</div>
<div class="flex flex-wrap gap-2">
@@ -640,7 +640,7 @@ new #[Layout('layouts.console')] class extends Component
</button>
<livewire:users::pin-switch :return-to="route('machines.console', $machine->id)" />
{{-- The normal user interface has a session of its own (Users' UseConsoleSession). --}}
<a href="{{ route('machines.show', $machine->id) }}" class="{{ $touch }} border border-zinc-300 text-zinc-100 hover:bg-zinc-700">
<a href="{{ route('machines.show', $machine->id) }}" class="{{ $touch }} border border-white/60 text-zinc-100 hover:bg-white/10">
<x-icon name="arrow-left" class="size-6" aria-hidden="true" />
{{ __('machines.console.back') }}
</a>
@@ -653,7 +653,7 @@ new #[Layout('layouts.console')] class extends Component
</div>
@if ($lateMaintenance !== [])
<div class="space-y-1 rounded-lg border-2 border-red-700 p-3 dark:border-red-400">
<div class="space-y-1 rounded-xl border-2 border-red-700 bg-red-50 p-3 dark:border-red-400 dark:bg-red-400/10">
@foreach ($lateMaintenance as $late)
<p wire:key="late-{{ $late->id }}" class="flex items-center gap-2 font-semibold text-red-700 dark:text-red-400">
<x-icon name="exclamation-triangle" class="size-6 shrink-0" aria-hidden="true" />
@@ -664,7 +664,7 @@ new #[Layout('layouts.console')] class extends Component
@endif
<div class="grid gap-6 lg:grid-cols-2">
<section aria-labelledby="console-list-heading" class="space-y-3">
<section aria-labelledby="console-list-heading" class="card space-y-3">
<h2 id="console-list-heading" class="text-xl font-semibold">{{ $nextDay ? __('machines.console.next_list', ['date' => $this->dateLabel($this->day())]) : __('machines.console.today_list') }}</h2>
<div class="flex flex-wrap gap-2" role="group" aria-label="{{ __('machines.show.day_navigation') }}">
<button type="button" wire:click="showDay(false)" class="{{ $nextDay ? $secondary : $primary }}" @unless ($nextDay) aria-pressed="true" @else aria-pressed="false" @endunless>{{ __('machines.show.today') }}</button>
@@ -672,7 +672,7 @@ new #[Layout('layouts.console')] class extends Component
</div>
@if ($this->rows === [])
<p>{{ __('machines.show.none') }}</p>
<x-empty-state icon="cpu-chip">{{ __('machines.show.none') }}</x-empty-state>
@else
<ol class="space-y-3">
@foreach ($this->rows as $row)
@@ -827,7 +827,7 @@ new #[Layout('layouts.console')] class extends Component
<button
type="button"
wire:click="selectItem({{ $item->id }})"
class="flex h-full min-h-24 w-full flex-col items-start gap-1 rounded-lg border-2 p-2 text-left focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 {{ $selectedItemId === $item->id ? 'border-primary-600 dark:border-primary-400' : 'border-zinc-300 bg-white hover:bg-zinc-100 dark:border-zinc-600 dark:bg-zinc-900 dark:hover:bg-zinc-700' }}"
class="flex h-full min-h-24 w-full flex-col items-start gap-1 rounded-lg border-2 p-2 text-left focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 {{ $selectedItemId === $item->id ? 'border-primary-600 dark:border-primary-400' : 'border-zinc-300 bg-white hover:bg-zinc-100 dark:border-zinc-600 dark:bg-zinc-900 dark:hover:bg-zinc-700' }}"
aria-label="{{ __('inventory.task.choose', ['item' => $item->name, 'balance' => $this->quantity($item->balanceMilli, $item->unit)]) }}"
>
@if ($item->hasImage)
@@ -868,7 +868,7 @@ new #[Layout('layouts.console')] class extends Component
</div>
@if ($machine->counters !== [] || $this->maintenance !== [])
<section aria-labelledby="console-maintenance-heading" class="space-y-3">
<section aria-labelledby="console-maintenance-heading" class="card space-y-3">
<h2 id="console-maintenance-heading" class="text-xl font-semibold">{{ __('machines.console.counters_and_maintenance') }}</h2>
<div class="grid gap-3 md:grid-cols-2">