- 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]>
41 lines
2.6 KiB
PHP
41 lines
2.6 KiB
PHP
{{--
|
|
The fields of signing in with a console PIN code (spec 19.6), inside a
|
|
Livewire component that uses SignsInWithPin: the user's name as large
|
|
radio buttons, the PIN code and a number keypad for touch screens.
|
|
--}}
|
|
@props([
|
|
'users',
|
|
])
|
|
|
|
@php
|
|
$key = 'inline-flex min-h-14 items-center justify-center rounded-lg border border-zinc-500 bg-white text-2xl font-semibold text-zinc-900 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:border-zinc-400 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-700';
|
|
@endphp
|
|
|
|
<fieldset>
|
|
<legend class="mb-2 font-semibold">{{ __('users.pin_switch.user') }}</legend>
|
|
<div class="grid max-h-64 gap-2 overflow-y-auto sm:grid-cols-2">
|
|
@foreach ($users as $option)
|
|
<label wire:key="pin-user-{{ $option->id }}" class="flex min-h-11 cursor-pointer items-center gap-3 rounded-lg border border-zinc-300 px-3 py-2 has-checked:border-primary-600 has-checked:font-semibold dark:border-zinc-600 dark:has-checked:border-primary-400">
|
|
<input type="radio" name="pin-user" value="{{ $option->id }}" wire:model="userId" class="size-5 text-primary-600 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300">
|
|
{{ $option->name }}
|
|
</label>
|
|
@endforeach
|
|
</div>
|
|
@error('userId')
|
|
<p role="alert" class="mt-1 text-sm font-medium text-red-700 dark:text-red-400">{{ $message }}</p>
|
|
@enderror
|
|
</fieldset>
|
|
|
|
<x-input id="pin-sign-in-pin" wire:model="pin" type="password" inputmode="numeric" maxlength="6" :label="__('users.pin_switch.pin')" autocomplete="off" />
|
|
|
|
<div class="grid grid-cols-3 gap-2" role="group" aria-label="{{ __('users.pin_switch.keypad') }}">
|
|
@foreach (['1', '2', '3', '4', '5', '6', '7', '8', '9'] as $digit)
|
|
<button type="button" class="{{ $key }}" x-on:click="if (($wire.pin ?? '').length < 6) $wire.pin = ($wire.pin ?? '') + '{{ $digit }}'">{{ $digit }}</button>
|
|
@endforeach
|
|
<button type="button" class="{{ $key }} text-base" x-on:click="$wire.pin = ''">{{ __('users.pin_switch.clear') }}</button>
|
|
<button type="button" class="{{ $key }}" x-on:click="if (($wire.pin ?? '').length < 6) $wire.pin = ($wire.pin ?? '') + '0'">0</button>
|
|
<button type="button" class="{{ $key }}" x-on:click="$wire.pin = ($wire.pin ?? '').slice(0, -1)" aria-label="{{ __('users.pin_switch.backspace') }}">
|
|
<x-icon name="backspace" class="size-7" aria-hidden="true" />
|
|
</button>
|
|
</div>
|