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:
@@ -318,7 +318,7 @@ new class extends Component
|
||||
|
||||
<div class="space-y-2">
|
||||
<p><x-link :href="route('billing.index')" navigate>{{ __('billing.export.back') }}</x-link></p>
|
||||
<h1 class="text-2xl font-semibold">{{ $this->heading() }}</h1>
|
||||
<x-page-title icon="document-arrow-down">{{ $this->heading() }}</x-page-title>
|
||||
<p class="flex items-center gap-2 text-sm">
|
||||
@if ($export->isDraft())
|
||||
<x-icon name="pencil-square" class="size-5 shrink-0" aria-hidden="true" />
|
||||
@@ -353,7 +353,7 @@ new class extends Component
|
||||
wire:change="savePeriod($event.target.value)"
|
||||
aria-describedby="billing-period-help @error('period') billing-period-error @enderror"
|
||||
@error('period') aria-invalid="true" @enderror
|
||||
class="w-full rounded-md border border-zinc-400 bg-white px-2 py-1.5 text-zinc-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 aria-invalid:border-red-700 dark:border-zinc-500 dark:bg-zinc-900 dark:text-zinc-100 dark:aria-invalid:border-red-400 dark:[color-scheme:dark]"
|
||||
class="w-full rounded-md border border-zinc-400 bg-white px-2 py-1.5 text-zinc-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 aria-invalid:border-red-700 dark:border-zinc-500 dark:bg-zinc-900 dark:text-zinc-100 dark:aria-invalid:border-red-400 dark:[color-scheme:dark]"
|
||||
/>
|
||||
<p id="billing-period-help" class="text-xs text-zinc-600 dark:text-zinc-300">{{ __('billing.export.period_help') }}</p>
|
||||
@error('period')
|
||||
@@ -362,7 +362,7 @@ new class extends Component
|
||||
</div>
|
||||
|
||||
@if ($export->hasProblems())
|
||||
<p class="flex items-start gap-2 rounded-lg border border-amber-700 p-4 text-sm dark:border-amber-400">
|
||||
<p class="flex items-start gap-2 rounded-lg border border-amber-700 bg-amber-50 p-4 text-sm text-amber-950 dark:border-amber-400 dark:bg-amber-400/10 dark:text-amber-100">
|
||||
<x-icon name="exclamation-triangle" class="size-5 shrink-0" aria-hidden="true" />
|
||||
{{ __('billing.export.problems') }}
|
||||
</p>
|
||||
@@ -380,11 +380,11 @@ new class extends Component
|
||||
<h2 id="invoices-heading" class="text-xl font-semibold">{{ __('billing.invoices.title') }}</h2>
|
||||
|
||||
@if ($export->invoices === [])
|
||||
<p class="text-sm">{{ __('billing.invoices.none') }}</p>
|
||||
<x-empty-state icon="banknotes">{{ __('billing.invoices.none') }}</x-empty-state>
|
||||
@endif
|
||||
|
||||
@foreach ($export->invoices as $invoiceNumber => $invoice)
|
||||
<section wire:key="invoice-{{ $invoice->key }}" aria-labelledby="invoice-{{ $invoice->key }}-heading" class="space-y-4 rounded-lg border border-zinc-300 bg-white p-4 dark:border-zinc-600 dark:bg-zinc-900">
|
||||
<section wire:key="invoice-{{ $invoice->key }}" aria-labelledby="invoice-{{ $invoice->key }}-heading" class="card space-y-4">
|
||||
<div class="space-y-1">
|
||||
<h3 id="invoice-{{ $invoice->key }}-heading" class="text-lg font-semibold">{{ __('billing.invoices.heading', ['number' => $invoiceNumber + 1, 'customer' => $invoice->customerName]) }}</h3>
|
||||
<dl class="grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]">
|
||||
@@ -428,7 +428,7 @@ new class extends Component
|
||||
<table class="w-full text-sm">
|
||||
<caption class="mb-1 text-left font-medium">{{ __('billing.jobs.months_caption', ['job' => $job->label()]) }}</caption>
|
||||
<thead>
|
||||
<tr class="border-b border-zinc-300 text-left dark:border-zinc-600">
|
||||
<tr class="border-b-2 border-primary-200 text-left text-primary-900 dark:border-primary-800 dark:text-primary-100">
|
||||
<th scope="col" class="py-2 pr-3">{{ __('billing.jobs.month') }}</th>
|
||||
<th scope="col" class="py-2 text-right">{{ __('billing.jobs.amount') }}</th>
|
||||
</tr>
|
||||
@@ -463,7 +463,7 @@ new class extends Component
|
||||
<table class="w-full text-sm">
|
||||
<caption class="sr-only">{{ __('billing.jobs.hours_caption', ['job' => $job->label()]) }}</caption>
|
||||
<thead>
|
||||
<tr class="border-b border-zinc-300 text-left dark:border-zinc-600">
|
||||
<tr class="border-b-2 border-primary-200 text-left text-primary-900 dark:border-primary-800 dark:text-primary-100">
|
||||
<th scope="col" class="py-2 pr-3">{{ __('billing.jobs.work_type') }}</th>
|
||||
<th scope="col" class="py-2 pr-3 text-right">{{ __('billing.jobs.approved_hours') }}</th>
|
||||
<th scope="col" class="py-2 pr-3">{{ __('billing.jobs.billable_hours') }}</th>
|
||||
@@ -488,7 +488,7 @@ new class extends Component
|
||||
aria-label="{{ __('billing.jobs.billable_label', ['work_type' => $row->name]) }}"
|
||||
aria-describedby="hours-help-{{ $job->jobId }}"
|
||||
@error('hours.'.$job->jobId.'.'.$row->workTypeId) aria-invalid="true" aria-errormessage="{{ $fieldId }}-error" @enderror
|
||||
class="w-20 rounded-md border border-zinc-400 bg-white px-2 py-1.5 text-right text-zinc-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 aria-invalid:border-red-700 dark:border-zinc-500 dark:bg-zinc-900 dark:text-zinc-100 dark:aria-invalid:border-red-400"
|
||||
class="w-20 rounded-md border border-zinc-400 bg-white px-2 py-1.5 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 aria-invalid:border-red-700 dark:border-zinc-500 dark:bg-zinc-900 dark:text-zinc-100 dark:aria-invalid:border-red-400"
|
||||
/>
|
||||
@if ($row->isAdjusted)
|
||||
<span class="ml-1 text-xs">({{ __('billing.jobs.adjusted') }})</span>
|
||||
@@ -512,7 +512,7 @@ new class extends Component
|
||||
<table class="w-full text-sm">
|
||||
<caption class="mb-1 text-left font-medium">{{ __('billing.jobs.expenses_caption', ['job' => $job->label()]) }}</caption>
|
||||
<thead>
|
||||
<tr class="border-b border-zinc-300 text-left dark:border-zinc-600">
|
||||
<tr class="border-b-2 border-primary-200 text-left text-primary-900 dark:border-primary-800 dark:text-primary-100">
|
||||
<th scope="col" class="py-2 pr-3">{{ __('billing.jobs.expense') }}</th>
|
||||
<th scope="col" class="py-2 text-right">{{ __('billing.jobs.amount') }}</th>
|
||||
</tr>
|
||||
@@ -557,7 +557,7 @@ new class extends Component
|
||||
<table class="w-full text-sm">
|
||||
<caption class="sr-only">{{ __('billing.lines.caption', ['job' => $job->label()]) }}</caption>
|
||||
<thead>
|
||||
<tr class="border-b border-zinc-300 text-left dark:border-zinc-600">
|
||||
<tr class="border-b-2 border-primary-200 text-left text-primary-900 dark:border-primary-800 dark:text-primary-100">
|
||||
<th scope="col" class="py-2 pr-3">{{ __('billing.lines.description') }}</th>
|
||||
<th scope="col" class="py-2 pr-3 text-right">{{ __('billing.lines.recorded') }}</th>
|
||||
<th scope="col" class="py-2 pr-3 text-right">{{ __('billing.lines.quantity') }}</th>
|
||||
@@ -630,7 +630,7 @@ new class extends Component
|
||||
<p class="text-sm">{{ __('billing.available.intro') }}</p>
|
||||
|
||||
@if ($export->availableJobs === [])
|
||||
<p class="text-sm">{{ __('billing.available.none') }}</p>
|
||||
<x-empty-state icon="banknotes">{{ __('billing.available.none') }}</x-empty-state>
|
||||
@else
|
||||
<x-table :headers="$this->availableHeaders()" :rows="$export->availableJobs">
|
||||
@interact('column_job', $available)
|
||||
|
||||
Reference in New Issue
Block a user