Card the remaining form pages in the new look
The tasks-from-template, expense, stock item, workflow template and task hour forms sat inside @if blocks, so the earlier pass left them as bare fields on the page background. They are now cards; the template table has the indigo header row and primary focus rings, the expense billing fieldset and workflow steps get an inner surface instead of a nested card, locked-job notices are amber, and the item image picker button uses the primary colour. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -313,7 +313,7 @@ new class extends Component
|
|||||||
<div class="mx-auto max-w-3xl space-y-6 p-4 sm:p-6">
|
<div class="mx-auto max-w-3xl space-y-6 p-4 sm:p-6">
|
||||||
<x-page-title icon="queue-list">{{ $this->heading() }}</x-page-title>
|
<x-page-title icon="queue-list">{{ $this->heading() }}</x-page-title>
|
||||||
|
|
||||||
<form wire:submit="save" class="space-y-6" novalidate>
|
<form wire:submit="save" class="card space-y-6" novalidate>
|
||||||
<x-input wire:model="form.name" :label="__('catalog.fields.name')" :hint="__('catalog.workflows.name_help')" autocomplete="off" required />
|
<x-input wire:model="form.name" :label="__('catalog.fields.name')" :hint="__('catalog.workflows.name_help')" autocomplete="off" required />
|
||||||
|
|
||||||
{{-- TallStackUI's native select does not tie its label to the control, so aria-label names it. --}}
|
{{-- TallStackUI's native select does not tie its label to the control, so aria-label names it. --}}
|
||||||
@@ -334,7 +334,7 @@ new class extends Component
|
|||||||
@endforeach
|
@endforeach
|
||||||
</x-select.native>
|
</x-select.native>
|
||||||
|
|
||||||
<section aria-labelledby="steps-heading" class="card space-y-4">
|
<section aria-labelledby="steps-heading" class="space-y-4 rounded-lg border border-zinc-200 bg-zinc-50 p-4 dark:border-zinc-700 dark:bg-zinc-800/50">
|
||||||
<div class="space-y-1">
|
<div class="space-y-1">
|
||||||
<h2 id="steps-heading" class="text-xl font-semibold">{{ __('catalog.workflows.steps') }}</h2>
|
<h2 id="steps-heading" class="text-xl font-semibold">{{ __('catalog.workflows.steps') }}</h2>
|
||||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('catalog.workflows.steps_help') }}</p>
|
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('catalog.workflows.steps_help') }}</p>
|
||||||
|
|||||||
@@ -232,12 +232,12 @@ new class extends Component
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if ($job->isLocked)
|
@if ($job->isLocked)
|
||||||
<p class="flex items-start gap-2 rounded-lg border border-zinc-300 p-3 text-sm dark:border-zinc-600">
|
<p class="flex items-start gap-2 rounded-lg border border-amber-700 bg-amber-50 p-3 text-sm text-amber-950 dark:border-amber-400 dark:bg-amber-400/10 dark:text-amber-100">
|
||||||
<x-icon name="lock-closed" class="size-5 shrink-0" aria-hidden="true" />
|
<x-icon name="lock-closed" class="size-5 shrink-0" aria-hidden="true" />
|
||||||
{{ __('expenses.locked') }}
|
{{ __('expenses.locked') }}
|
||||||
</p>
|
</p>
|
||||||
@else
|
@else
|
||||||
<form wire:submit="save" class="space-y-6" novalidate>
|
<form wire:submit="save" class="card space-y-6" novalidate>
|
||||||
{{-- TallStackUI's native select does not tie its label to the control, so aria-label names it. --}}
|
{{-- TallStackUI's native select does not tie its label to the control, so aria-label names it. --}}
|
||||||
<x-select.native wire:model.live="form.category" :label="__('expenses.fields.category')" :aria-label="__('expenses.fields.category')">
|
<x-select.native wire:model.live="form.category" :label="__('expenses.fields.category')" :aria-label="__('expenses.fields.category')">
|
||||||
@foreach (ExpenseCategory::cases() as $category)
|
@foreach (ExpenseCategory::cases() as $category)
|
||||||
@@ -281,7 +281,7 @@ new class extends Component
|
|||||||
<x-input wire:model.live.blur="form.cost" inputmode="decimal" :label="__('expenses.fields.cost')" :hint="__('expenses.form.cost_help')" autocomplete="off" required />
|
<x-input wire:model.live.blur="form.cost" inputmode="decimal" :label="__('expenses.fields.cost')" :hint="__('expenses.form.cost_help')" autocomplete="off" required />
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<fieldset class="space-y-4 rounded-lg border border-zinc-200 p-4 dark:border-zinc-700">
|
<fieldset class="space-y-4 rounded-lg border border-zinc-200 bg-zinc-50 p-4 dark:border-zinc-700 dark:bg-zinc-800/50">
|
||||||
<legend class="px-1 font-medium">{{ __('expenses.form.billing') }}</legend>
|
<legend class="px-1 font-medium">{{ __('expenses.form.billing') }}</legend>
|
||||||
|
|
||||||
<x-checkbox id="expense-billable" wire:model.live="form.is_billable" :label="__('expenses.fields.is_billable')" />
|
<x-checkbox id="expense-billable" wire:model.live="form.is_billable" :label="__('expenses.fields.is_billable')" />
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ new class extends Component
|
|||||||
@if ($this->groups === [])
|
@if ($this->groups === [])
|
||||||
<p class="text-sm">{{ __('inventory.form.no_groups') }} <x-link :href="route('inventory.groups')" navigate>{{ __('inventory.index.groups') }}</x-link></p>
|
<p class="text-sm">{{ __('inventory.form.no_groups') }} <x-link :href="route('inventory.groups')" navigate>{{ __('inventory.index.groups') }}</x-link></p>
|
||||||
@else
|
@else
|
||||||
<form wire:submit="save" class="space-y-6" novalidate>
|
<form wire:submit="save" class="card space-y-6" novalidate>
|
||||||
{{-- TallStackUI's native select does not tie its label to the control, so aria-label names it. --}}
|
{{-- TallStackUI's native select does not tie its label to the control, so aria-label names it. --}}
|
||||||
<x-select.native id="item-group" wire:model="groupId" :label="__('inventory.form.group')" :aria-label="__('inventory.form.group')">
|
<x-select.native id="item-group" wire:model="groupId" :label="__('inventory.form.group')" :aria-label="__('inventory.form.group')">
|
||||||
@foreach ($this->groups as $group)
|
@foreach ($this->groups as $group)
|
||||||
@@ -211,7 +211,7 @@ new class extends Component
|
|||||||
accept="image/jpeg,image/png,image/webp,image/gif"
|
accept="image/jpeg,image/png,image/webp,image/gif"
|
||||||
aria-describedby="item-image-hint @error('image') item-image-error @enderror"
|
aria-describedby="item-image-hint @error('image') item-image-error @enderror"
|
||||||
@error('image') aria-invalid="true" @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-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"
|
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-primary-50 file:px-3 file:py-2 file:font-medium file:text-primary-800 hover:file:bg-primary-100 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-primary-950 dark:file:text-primary-100 dark:hover:file:bg-primary-900"
|
||||||
/>
|
/>
|
||||||
@error('image')
|
@error('image')
|
||||||
<p id="item-image-error" class="text-sm text-red-700 dark:text-red-400">{{ $message }}</p>
|
<p id="item-image-error" class="text-sm text-red-700 dark:text-red-400">{{ $message }}</p>
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ new class extends Component
|
|||||||
|
|
||||||
<x-button :href="route('jobs.show', $jobId)" wire:navigate subtle color="black" :text="__('jobs.tasks.from_template.back')" />
|
<x-button :href="route('jobs.show', $jobId)" wire:navigate subtle color="black" :text="__('jobs.tasks.from_template.back')" />
|
||||||
@else
|
@else
|
||||||
<form wire:submit="add" class="space-y-6" novalidate>
|
<form wire:submit="add" class="card space-y-6" novalidate>
|
||||||
<x-radio.group
|
<x-radio.group
|
||||||
id="template"
|
id="template"
|
||||||
wire:model.live="templateId"
|
wire:model.live="templateId"
|
||||||
@@ -247,7 +247,7 @@ new class extends Component
|
|||||||
<table class="w-full border-collapse text-sm">
|
<table class="w-full border-collapse text-sm">
|
||||||
<caption class="mb-2 text-left font-medium">{{ __('jobs.tasks.from_template.table_caption', ['name' => $template->name]) }}</caption>
|
<caption class="mb-2 text-left font-medium">{{ __('jobs.tasks.from_template.table_caption', ['name' => $template->name]) }}</caption>
|
||||||
<thead class="max-sm:hidden">
|
<thead class="max-sm:hidden">
|
||||||
<tr class="border-b border-zinc-200 dark:border-zinc-700">
|
<tr class="border-b-2 border-primary-200 text-primary-900 dark:border-primary-800 dark:text-primary-100">
|
||||||
<th scope="col" class="py-2 pr-2 text-left font-semibold">{{ __('jobs.tasks.from_template.task') }}</th>
|
<th scope="col" class="py-2 pr-2 text-left font-semibold">{{ __('jobs.tasks.from_template.task') }}</th>
|
||||||
<th scope="col" class="px-1 py-2 text-left font-semibold">{{ __('jobs.tasks.fields.due_on') }}</th>
|
<th scope="col" class="px-1 py-2 text-left font-semibold">{{ __('jobs.tasks.fields.due_on') }}</th>
|
||||||
<th scope="col" class="px-1 py-2 text-left font-semibold">{{ __('jobs.tasks.fields.estimated_hours') }}</th>
|
<th scope="col" class="px-1 py-2 text-left font-semibold">{{ __('jobs.tasks.fields.estimated_hours') }}</th>
|
||||||
@@ -269,7 +269,7 @@ new class extends Component
|
|||||||
wire:model="rows.{{ $index }}.due_on"
|
wire:model="rows.{{ $index }}.due_on"
|
||||||
aria-label="{{ __('jobs.tasks.from_template.due_on_of', ['title' => $step->title]) }}"
|
aria-label="{{ __('jobs.tasks.from_template.due_on_of', ['title' => $step->title]) }}"
|
||||||
@error('rows.'.$index.'.due_on') aria-invalid="true" aria-describedby="row-{{ $index }}-due-on-error" @enderror
|
@error('rows.'.$index.'.due_on') aria-invalid="true" aria-describedby="row-{{ $index }}-due-on-error" @enderror
|
||||||
class="w-full min-w-0 rounded-md border border-zinc-500 bg-white px-1 py-1 text-sm dark:border-zinc-400 dark:bg-zinc-800 dark:[color-scheme:dark]"
|
class="w-full min-w-0 rounded-md border border-zinc-500 bg-white px-1 py-1 text-sm dark:border-zinc-400 dark:bg-zinc-800 dark:[color-scheme:dark] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300"
|
||||||
/>
|
/>
|
||||||
@error('rows.'.$index.'.due_on')
|
@error('rows.'.$index.'.due_on')
|
||||||
<p id="row-{{ $index }}-due-on-error" class="mt-1 text-xs text-red-700 dark:text-red-400">{{ $message }}</p>
|
<p id="row-{{ $index }}-due-on-error" class="mt-1 text-xs text-red-700 dark:text-red-400">{{ $message }}</p>
|
||||||
@@ -285,7 +285,7 @@ new class extends Component
|
|||||||
wire:model="rows.{{ $index }}.estimated_hours"
|
wire:model="rows.{{ $index }}.estimated_hours"
|
||||||
aria-label="{{ __('jobs.tasks.from_template.hours_of', ['title' => $step->title]) }}"
|
aria-label="{{ __('jobs.tasks.from_template.hours_of', ['title' => $step->title]) }}"
|
||||||
@error('rows.'.$index.'.estimated_hours') aria-invalid="true" aria-describedby="row-{{ $index }}-hours-error" @enderror
|
@error('rows.'.$index.'.estimated_hours') aria-invalid="true" aria-describedby="row-{{ $index }}-hours-error" @enderror
|
||||||
class="w-16 rounded-md border max-sm:w-full border-zinc-500 bg-white px-2 py-1 text-sm dark:border-zinc-400 dark:bg-zinc-800"
|
class="w-16 rounded-md border max-sm:w-full border-zinc-500 bg-white px-2 py-1 text-sm dark:border-zinc-400 dark:bg-zinc-800 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300"
|
||||||
/>
|
/>
|
||||||
@error('rows.'.$index.'.estimated_hours')
|
@error('rows.'.$index.'.estimated_hours')
|
||||||
<p id="row-{{ $index }}-hours-error" class="mt-1 text-xs text-red-700 dark:text-red-400">{{ $message }}</p>
|
<p id="row-{{ $index }}-hours-error" class="mt-1 text-xs text-red-700 dark:text-red-400">{{ $message }}</p>
|
||||||
@@ -297,7 +297,7 @@ new class extends Component
|
|||||||
id="row-{{ $index }}-assignee"
|
id="row-{{ $index }}-assignee"
|
||||||
wire:model="rows.{{ $index }}.assignee_user_id"
|
wire:model="rows.{{ $index }}.assignee_user_id"
|
||||||
aria-label="{{ __('jobs.tasks.from_template.assignee_of', ['title' => $step->title]) }}"
|
aria-label="{{ __('jobs.tasks.from_template.assignee_of', ['title' => $step->title]) }}"
|
||||||
class="w-full min-w-0 rounded-md border border-zinc-500 bg-white px-1 py-1 text-sm dark:border-zinc-400 dark:bg-zinc-800"
|
class="w-full min-w-0 rounded-md border border-zinc-500 bg-white px-1 py-1 text-sm dark:border-zinc-400 dark:bg-zinc-800 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300"
|
||||||
>
|
>
|
||||||
<option value="">{{ __('jobs.calendar.no_assignee') }}</option>
|
<option value="">{{ __('jobs.calendar.no_assignee') }}</option>
|
||||||
@foreach ($this->userOptions as $user)
|
@foreach ($this->userOptions as $user)
|
||||||
|
|||||||
@@ -228,12 +228,12 @@ new class extends Component
|
|||||||
<p role="status" aria-live="polite" class="min-h-5 text-sm">{{ $statusMessage }}</p>
|
<p role="status" aria-live="polite" class="min-h-5 text-sm">{{ $statusMessage }}</p>
|
||||||
|
|
||||||
@if ($task->isLocked())
|
@if ($task->isLocked())
|
||||||
<p class="flex items-start gap-2 rounded-lg border border-zinc-300 p-3 text-sm dark:border-zinc-600">
|
<p class="flex items-start gap-2 rounded-lg border border-amber-700 bg-amber-50 p-3 text-sm text-amber-950 dark:border-amber-400 dark:bg-amber-400/10 dark:text-amber-100">
|
||||||
<x-icon name="lock-closed" class="size-5 shrink-0" aria-hidden="true" />
|
<x-icon name="lock-closed" class="size-5 shrink-0" aria-hidden="true" />
|
||||||
{{ __('time.task_page.locked') }}
|
{{ __('time.task_page.locked') }}
|
||||||
</p>
|
</p>
|
||||||
@else
|
@else
|
||||||
<form wire:submit="save" class="space-y-6" novalidate>
|
<form wire:submit="save" class="card space-y-6" novalidate>
|
||||||
<div class="grid gap-6 sm:grid-cols-2">
|
<div class="grid gap-6 sm:grid-cols-2">
|
||||||
<x-input wire:model="workedOn" type="date" :label="__('time.task_page.worked_on')" required />
|
<x-input wire:model="workedOn" type="date" :label="__('time.task_page.worked_on')" required />
|
||||||
<x-input wire:model="hours" inputmode="decimal" :label="__('time.task_page.hours')" :hint="__('time.task_page.hours_description')" autocomplete="off" required />
|
<x-input wire:model="hours" inputmode="decimal" :label="__('time.task_page.hours')" :hint="__('time.task_page.hours_description')" autocomplete="off" required />
|
||||||
|
|||||||
Reference in New Issue
Block a user