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:
@@ -508,11 +508,11 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-[120rem] space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-1">
|
||||
<h1 class="text-2xl font-semibold">{{ __('jobs.calendar.title') }}</h1>
|
||||
<x-page-title icon="calendar-days">{{ __('jobs.calendar.title') }}</x-page-title>
|
||||
<p class="max-w-3xl text-sm text-zinc-600 dark:text-zinc-300">{{ __('jobs.calendar.intro') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap items-end gap-4">
|
||||
<div class="card flex flex-wrap items-end gap-4">
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<x-button subtle color="black" icon="chevron-left" wire:click="showPrevious" :text="__('jobs.calendar.previous')" />
|
||||
<x-button subtle color="black" wire:click="showToday" :text="__('jobs.calendar.today')" />
|
||||
@@ -540,7 +540,7 @@ new class extends Component
|
||||
|
||||
<p role="status" aria-live="polite" class="min-h-5 text-sm font-medium">{{ $statusMessage }}</p>
|
||||
|
||||
<section aria-labelledby="calendar-range-heading" class="space-y-3">
|
||||
<section aria-labelledby="calendar-range-heading" class="card space-y-3">
|
||||
<h2 id="calendar-range-heading" class="text-lg font-semibold">
|
||||
{{ __('jobs.calendar.range', ['from' => $this->shortDate($days[0]), 'to' => $this->shortDate($days[count($days) - 1])]) }}
|
||||
</h2>
|
||||
@@ -563,6 +563,7 @@ new class extends Component
|
||||
@class([
|
||||
'border-l border-zinc-200 px-1 py-2 text-center dark:border-zinc-700',
|
||||
'bg-zinc-200 dark:bg-zinc-950' => $this->isDayOff($day),
|
||||
'border-b-4 border-b-primary-600 bg-primary-50 text-primary-900 dark:border-b-primary-300 dark:bg-primary-950 dark:text-primary-100' => $day === now()->format('Y-m-d'),
|
||||
])
|
||||
>
|
||||
<div @class(['font-semibold' => $day === now()->format('Y-m-d')])>{{ $this->dayLabel($day) }}</div>
|
||||
@@ -606,7 +607,7 @@ new class extends Component
|
||||
wire:key="cell-{{ $rowKey }}-{{ $day }}"
|
||||
data-calendar-day="{{ $day }}"
|
||||
data-calendar-user="{{ $row->userId ?? '' }}"
|
||||
x-bind:class="isTarget('{{ $day }}', '{{ $row->userId ?? '' }}') && 'outline-2 -outline-offset-2 outline-blue-700 dark:outline-blue-300'"
|
||||
x-bind:class="isTarget('{{ $day }}', '{{ $row->userId ?? '' }}') && 'outline-2 -outline-offset-2 outline-primary-600 dark:outline-primary-300'"
|
||||
@class([
|
||||
'min-h-12 border-l border-zinc-200 dark:border-zinc-700',
|
||||
'bg-amber-100 dark:bg-amber-950' => $overloaded,
|
||||
@@ -651,10 +652,10 @@ new class extends Component
|
||||
x-on:pointerdown="begin($event, 'move', @js(['task' => $bar->task->taskId, 'job' => $bar->task->jobId, 'user' => $bar->userId, 'from' => $bar->from, 'to' => $bar->to]))"
|
||||
x-on:click="clickBar($el, 'bar-info-{{ $bar->key() }}', () => $wire.openDialog({{ $bar->task->taskId }}, {{ $bar->userId ?? 'null' }}))"
|
||||
@class([
|
||||
'relative z-10 mx-0.5 my-1 flex min-w-0 touch-none flex-col justify-center overflow-hidden border px-2 text-left text-xs leading-tight select-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:focus-visible:outline-blue-300',
|
||||
'relative z-10 mx-0.5 my-1 flex min-w-0 touch-none flex-col justify-center overflow-hidden border px-2 text-left text-xs leading-tight select-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300',
|
||||
'cursor-grab' => $canManage,
|
||||
'border-primary-300 bg-primary-100 text-primary-950 dark:border-primary-600 dark:bg-primary-900 dark:text-white' => $bar->task->status !== TaskStatus::Done && ! $bar->late,
|
||||
'border-red-600 bg-red-100 text-red-950 dark:border-red-400 dark:bg-red-950 dark:text-white' => $bar->late,
|
||||
'border-primary-300 border-l-4 border-l-primary-600 bg-primary-100 text-primary-950 shadow-sm dark:border-primary-600 dark:border-l-primary-300 dark:bg-primary-900 dark:text-white' => $bar->task->status !== TaskStatus::Done && ! $bar->late,
|
||||
'border-red-600 border-l-4 bg-red-100 text-red-950 shadow-sm dark:border-red-400 dark:bg-red-950 dark:text-white' => $bar->late,
|
||||
'border-zinc-300 bg-zinc-100 text-zinc-800 dark:border-zinc-600 dark:bg-zinc-700 dark:text-zinc-100' => $bar->task->status === TaskStatus::Done,
|
||||
'rounded-l-md' => $bar->from >= $days[0],
|
||||
'rounded-r-md' => $bar->to <= $days[count($days) - 1],
|
||||
@@ -760,7 +761,7 @@ new class extends Component
|
||||
id="agenda-bar-{{ $bar->key() }}"
|
||||
wire:click="openDialog({{ $bar->task->taskId }}, {{ $bar->userId ?? 'null' }})"
|
||||
@class([
|
||||
'flex w-full flex-col gap-1 rounded-md border p-2 text-left text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:focus-visible:outline-blue-300',
|
||||
'flex w-full flex-col gap-1 rounded-md border p-2 text-left text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300',
|
||||
'border-zinc-300 dark:border-zinc-600' => ! $bar->late,
|
||||
'border-red-600 border-l-4 bg-red-50 dark:border-red-400 dark:bg-red-950' => $bar->late,
|
||||
])
|
||||
@@ -786,11 +787,11 @@ new class extends Component
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section aria-labelledby="unscheduled-heading" class="space-y-3" x-data>
|
||||
<section aria-labelledby="unscheduled-heading" class="card space-y-3" x-data>
|
||||
<h2 id="unscheduled-heading" class="text-lg font-semibold">{{ __('jobs.calendar.unscheduled') }}</h2>
|
||||
|
||||
@if ($this->unscheduled === [])
|
||||
<p class="text-sm">{{ __('jobs.calendar.unscheduled_none') }}</p>
|
||||
<x-empty-state icon="calendar-days">{{ __('jobs.calendar.unscheduled_none') }}</x-empty-state>
|
||||
@else
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('jobs.calendar.unscheduled_intro') }}</p>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user