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:
@@ -171,7 +171,7 @@ new class extends Component
|
||||
|
||||
<div class="space-y-2">
|
||||
<p class="text-sm"><x-link :href="route('inventory.counts')" navigate>{{ __('inventory.counts.back') }}</x-link></p>
|
||||
<h1 class="text-2xl font-semibold">{{ __('inventory.counts.name', ['date' => $this->dateLabel($count->countedOn)]) }}</h1>
|
||||
<x-page-title icon="clipboard-document-check">{{ __('inventory.counts.name', ['date' => $this->dateLabel($count->countedOn)]) }}</x-page-title>
|
||||
<p class="text-sm">
|
||||
{{ $count->groupNames === [] ? __('inventory.counts.whole_stock') : implode(', ', $count->groupNames) }}
|
||||
· {{ __('inventory.counts.started_by', ['name' => $count->startedByName]) }}
|
||||
@@ -202,7 +202,7 @@ new class extends Component
|
||||
@endcan
|
||||
@else
|
||||
@can('inventory.manage-counts')
|
||||
<a href="{{ route('inventory.counts.csv', $count->id) }}" class="inline-flex items-center gap-1 text-sm font-medium underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700">
|
||||
<a href="{{ route('inventory.counts.csv', $count->id) }}" class="inline-flex items-center gap-1 text-sm font-medium underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300">
|
||||
<x-icon name="arrow-down-tray" class="size-4" aria-hidden="true" />
|
||||
{{ __('inventory.counts.download_csv') }}
|
||||
</a>
|
||||
@@ -211,7 +211,7 @@ new class extends Component
|
||||
</div>
|
||||
|
||||
@forelse ($this->groupedLines() as $groupName => $lines)
|
||||
<section wire:key="count-group-{{ md5($groupName) }}" aria-label="{{ $groupName }}" class="space-y-2">
|
||||
<section wire:key="count-group-{{ md5($groupName) }}" aria-label="{{ $groupName }}" class="card space-y-2">
|
||||
<h2 class="text-lg font-semibold">{{ $groupName }}</h2>
|
||||
<ul class="divide-y divide-zinc-200 rounded-lg border border-zinc-300 dark:divide-zinc-700 dark:border-zinc-600">
|
||||
@foreach ($lines as $line)
|
||||
@@ -252,7 +252,7 @@ new class extends Component
|
||||
value="{{ $line->isCounted() ? StockQuantity::inputValue((int) $line->countedMilli) : '' }}"
|
||||
wire:change="saveCounted({{ $line->itemId }}, $event.target.value)"
|
||||
@error('counted.'.$line->itemId) aria-invalid="true" aria-describedby="counted-{{ $line->itemId }}-error" @enderror
|
||||
class="mt-1 h-10 w-full rounded-md border border-zinc-500 bg-white px-2 text-right text-zinc-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:border-zinc-400 dark:bg-zinc-900 dark:text-zinc-100"
|
||||
class="mt-1 h-10 w-full rounded-md border border-zinc-500 bg-white px-2 text-right text-zinc-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 dark:border-zinc-400 dark:bg-zinc-900 dark:text-zinc-100"
|
||||
/>
|
||||
@error('counted.'.$line->itemId)
|
||||
<p id="counted-{{ $line->itemId }}-error" class="mt-1 text-sm text-red-700 dark:text-red-400">{{ $message }}</p>
|
||||
|
||||
@@ -73,12 +73,12 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-5xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-2">
|
||||
<h1 class="text-2xl font-semibold">{{ __('inventory.counts.title') }}</h1>
|
||||
<x-page-title icon="clipboard-document-check">{{ __('inventory.counts.title') }}</x-page-title>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('inventory.counts.intro') }}</p>
|
||||
</div>
|
||||
|
||||
@can('inventory.manage-counts')
|
||||
<section aria-labelledby="start-heading" class="space-y-3 rounded-lg border border-zinc-300 p-4 dark:border-zinc-600">
|
||||
<section aria-labelledby="start-heading" class="card space-y-3">
|
||||
<h2 id="start-heading" class="text-lg font-semibold">{{ __('inventory.counts.start_title') }}</h2>
|
||||
<form wire:submit="start" class="space-y-4" novalidate>
|
||||
@if ($this->groupOptions !== [])
|
||||
@@ -97,11 +97,11 @@ new class extends Component
|
||||
</section>
|
||||
@endcan
|
||||
|
||||
<section aria-labelledby="counts-heading" class="space-y-3">
|
||||
<section aria-labelledby="counts-heading" class="card space-y-3">
|
||||
<h2 id="counts-heading" class="text-lg font-semibold">{{ __('inventory.counts.list') }}</h2>
|
||||
|
||||
@if ($this->counts === [])
|
||||
<p class="text-sm">{{ __('inventory.counts.none') }}</p>
|
||||
<x-empty-state icon="archive-box">{{ __('inventory.counts.none') }}</x-empty-state>
|
||||
@else
|
||||
<ul class="divide-y divide-zinc-200 rounded-lg border border-zinc-300 dark:divide-zinc-700 dark:border-zinc-600">
|
||||
@foreach ($this->counts as $count)
|
||||
@@ -124,7 +124,7 @@ new class extends Component
|
||||
{{ __('inventory.counts.confirmed_by', ['name' => $count->confirmedByName, 'at' => $this->dateLabel((string) $count->confirmedAt)]) }}
|
||||
</span>
|
||||
@can('inventory.manage-counts')
|
||||
<a href="{{ route('inventory.counts.csv', $count->id) }}" class="inline-flex items-center gap-1 font-medium underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700">
|
||||
<a href="{{ route('inventory.counts.csv', $count->id) }}" class="inline-flex items-center gap-1 font-medium underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300">
|
||||
<x-icon name="arrow-down-tray" class="size-4" aria-hidden="true" />
|
||||
{{ __('inventory.counts.csv_named', ['date' => $this->dateLabel($count->countedOn)]) }}
|
||||
</a>
|
||||
|
||||
@@ -152,14 +152,14 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-3xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-2">
|
||||
<h1 class="text-2xl font-semibold">{{ __('inventory.groups.title') }}</h1>
|
||||
<x-page-title icon="folder">{{ __('inventory.groups.title') }}</x-page-title>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('inventory.groups.intro') }}</p>
|
||||
<p class="text-sm"><x-link :href="route('inventory.index')" navigate>{{ __('inventory.groups.back') }}</x-link></p>
|
||||
</div>
|
||||
|
||||
<p role="status" aria-live="polite" class="text-sm font-medium">{{ $message }}</p>
|
||||
|
||||
<form wire:submit="add" class="flex flex-wrap items-end gap-3" novalidate>
|
||||
<form wire:submit="add" class="card flex flex-wrap items-end gap-3" novalidate>
|
||||
<div class="min-w-0 flex-1">
|
||||
<x-input id="new-group-name" wire:model="newName" :label="__('inventory.groups.name')" autocomplete="off" maxlength="150" />
|
||||
</div>
|
||||
@@ -167,7 +167,7 @@ new class extends Component
|
||||
</form>
|
||||
|
||||
@if ($this->groups === [])
|
||||
<p class="text-sm">{{ __('inventory.groups.none') }}</p>
|
||||
<x-empty-state icon="archive-box">{{ __('inventory.groups.none') }}</x-empty-state>
|
||||
@else
|
||||
<ul class="divide-y divide-zinc-200 rounded-lg border border-zinc-300 dark:divide-zinc-700 dark:border-zinc-600">
|
||||
@foreach ($this->groups as $group)
|
||||
|
||||
@@ -93,7 +93,7 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-6xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-2">
|
||||
<h1 class="text-2xl font-semibold">{{ __('inventory.index.title') }}</h1>
|
||||
<x-page-title icon="archive-box">{{ __('inventory.index.title') }}</x-page-title>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('inventory.index.intro') }}</p>
|
||||
@can('inventory.manage')
|
||||
<div class="flex flex-wrap gap-3">
|
||||
@@ -127,7 +127,7 @@ new class extends Component
|
||||
</p>
|
||||
|
||||
@if ($this->items === [])
|
||||
<p class="text-sm">{{ __('inventory.index.none') }}</p>
|
||||
<x-empty-state icon="archive-box">{{ __('inventory.index.none') }}</x-empty-state>
|
||||
@else
|
||||
<x-table :headers="$this->headers()" :rows="$this->items">
|
||||
@interact('column_name', $item)
|
||||
|
||||
@@ -170,7 +170,7 @@ new class extends Component
|
||||
?>
|
||||
|
||||
<div class="mx-auto max-w-2xl space-y-6 p-4 sm:p-6">
|
||||
<h1 class="text-2xl font-semibold">{{ $this->heading() }}</h1>
|
||||
<x-page-title icon="archive-box">{{ $this->heading() }}</x-page-title>
|
||||
|
||||
@if ($this->groups === [])
|
||||
<p class="text-sm">{{ __('inventory.form.no_groups') }} <x-link :href="route('inventory.groups')" navigate>{{ __('inventory.index.groups') }}</x-link></p>
|
||||
@@ -211,7 +211,7 @@ new class extends Component
|
||||
accept="image/jpeg,image/png,image/webp,image/gif"
|
||||
aria-describedby="item-image-hint @error('image') item-image-error @enderror"
|
||||
@error('image') aria-invalid="true" @enderror
|
||||
class="block w-full max-w-md rounded-md text-sm text-zinc-900 file:me-3 file:min-h-9 file:cursor-pointer file:rounded-md file:border-0 file:bg-zinc-200 file:px-3 file:py-2 file:font-medium file:text-zinc-900 hover:file:bg-zinc-300 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:text-zinc-100 dark:file:bg-zinc-700 dark:file:text-zinc-100 dark:hover:file:bg-zinc-600 dark:focus-visible:outline-blue-400"
|
||||
class="block w-full max-w-md rounded-md text-sm text-zinc-900 file:me-3 file:min-h-9 file:cursor-pointer file:rounded-md file:border-0 file:bg-zinc-200 file:px-3 file:py-2 file:font-medium file:text-zinc-900 hover:file:bg-zinc-300 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 dark:text-zinc-100 dark:file:bg-zinc-700 dark:file:text-zinc-100 dark:hover:file:bg-zinc-600"
|
||||
/>
|
||||
@error('image')
|
||||
<p id="item-image-error" class="text-sm text-red-700 dark:text-red-400">{{ $message }}</p>
|
||||
|
||||
@@ -347,7 +347,7 @@ new class extends Component
|
||||
@endif
|
||||
<div class="min-w-0 flex-1 space-y-2">
|
||||
<p class="text-sm"><x-link :href="route('inventory.index')" navigate>{{ __('inventory.groups.back') }}</x-link></p>
|
||||
<h1 class="text-2xl font-semibold break-words">{{ $item->name }}</h1>
|
||||
<x-page-title icon="archive-box">{{ $item->name }}</x-page-title>
|
||||
<x-inventory.stock-status :item="$item" />
|
||||
@can('inventory.manage')
|
||||
<div class="flex flex-wrap gap-2">
|
||||
@@ -360,7 +360,7 @@ new class extends Component
|
||||
|
||||
<p id="item-status" tabindex="-1" role="status" aria-live="polite" class="text-sm font-medium focus:outline-none">{{ $message }}</p>
|
||||
|
||||
<section aria-labelledby="details-heading" class="space-y-3">
|
||||
<section aria-labelledby="details-heading" class="card space-y-3">
|
||||
<h2 id="details-heading" class="text-lg font-semibold">{{ __('inventory.item.details') }}</h2>
|
||||
<dl class="grid gap-x-6 gap-y-2 text-sm sm:grid-cols-2 lg:grid-cols-3">
|
||||
<div>
|
||||
@@ -406,7 +406,7 @@ new class extends Component
|
||||
|
||||
<div class="grid gap-6 lg:grid-cols-2">
|
||||
@can('inventory.manage')
|
||||
<section aria-labelledby="purchase-heading" class="space-y-3 rounded-lg border border-zinc-300 p-4 dark:border-zinc-600">
|
||||
<section aria-labelledby="purchase-heading" class="card space-y-3">
|
||||
<h2 id="purchase-heading" class="text-lg font-semibold">{{ __('inventory.purchase.title') }}</h2>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('inventory.purchase.intro') }}</p>
|
||||
<form wire:submit="recordPurchase" class="space-y-4" novalidate>
|
||||
@@ -420,7 +420,7 @@ new class extends Component
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section aria-labelledby="write-off-heading" class="space-y-3 rounded-lg border border-zinc-300 p-4 dark:border-zinc-600">
|
||||
<section aria-labelledby="write-off-heading" class="card space-y-3">
|
||||
<h2 id="write-off-heading" class="text-lg font-semibold">{{ __('inventory.write_off.title') }}</h2>
|
||||
<form wire:submit="recordWriteOff" class="space-y-4" novalidate>
|
||||
<x-input id="write-off-quantity" wire:model="writeOffQuantity" inputmode="decimal" :label="__('inventory.write_off.quantity', ['unit' => $unitLabel])" autocomplete="off" />
|
||||
@@ -432,7 +432,7 @@ new class extends Component
|
||||
|
||||
@if ($item->isActive)
|
||||
@can('inventory.record-use')
|
||||
<section aria-labelledby="use-heading" class="space-y-3 rounded-lg border border-zinc-300 p-4 dark:border-zinc-600">
|
||||
<section aria-labelledby="use-heading" class="card space-y-3">
|
||||
<h2 id="use-heading" class="text-lg font-semibold">{{ __('inventory.use.title') }}</h2>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('inventory.use.intro') }}</p>
|
||||
<form wire:submit="recordUse" class="space-y-4" novalidate>
|
||||
@@ -451,7 +451,7 @@ new class extends Component
|
||||
<h2 id="history-heading" class="text-lg font-semibold">{{ __('inventory.item.history') }}</h2>
|
||||
|
||||
@if ($this->movements === [])
|
||||
<p class="text-sm">{{ __('inventory.item.history_none') }}</p>
|
||||
<x-empty-state icon="archive-box">{{ __('inventory.item.history_none') }}</x-empty-state>
|
||||
@else
|
||||
@if (count($this->movements) >= $this::HISTORY_LIMIT)
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('inventory.item.history_limit', ['count' => $this::HISTORY_LIMIT]) }}</p>
|
||||
|
||||
@@ -341,7 +341,7 @@ new class extends Component
|
||||
<button
|
||||
type="button"
|
||||
wire:click="selectItem({{ $result->id }})"
|
||||
class="flex min-h-11 w-full flex-wrap items-center justify-between gap-2 rounded-md px-3 py-2 text-left text-sm hover:bg-zinc-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:hover:bg-zinc-700"
|
||||
class="flex min-h-11 w-full flex-wrap items-center justify-between gap-2 rounded-md px-3 py-2 text-left text-sm hover:bg-zinc-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 dark:hover:bg-zinc-700"
|
||||
aria-label="{{ __('inventory.task.choose', ['item' => $result->name, 'balance' => $this->quantity($result->balanceMilli, $result->unit)]) }}"
|
||||
>
|
||||
<span class="font-medium">{{ $result->name }}</span>
|
||||
|
||||
Reference in New Issue
Block a user