Files
petriandClaude Opus 5.5 1d9bcefb41 Fix editor colour refresh, task row layout, dark date icons and time cell width
- The job editor redraws its customer-coloured header when the board saves
  a customer colour (customer-color-changed).
- Service units and members in the editor's sidebar are in two columns.
- Native controls follow the dark theme (color-scheme), so the date
  picker's calendar icon is light.
- Task status, assignee and due date sit side by side in the editor.
- Each task in the editor has its checklist, comments and images.
- The time sheet's time field shows five characters (00:00).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 11:00:53 +02:00

54 lines
2.1 KiB
PHP

{{--
A group of checkboxes for one array property, in a fieldset whose
legend names the group. Native inputs with wrapping labels, so every
box has a name; the validation error is announced with the group.
$options: list of ['value' => ..., 'label' => ..., 'note' => ?string].
--}}
@props([
'legend',
'model',
'options',
'hint' => null,
'columns' => true, // true: 2 from sm and 3 from lg; 2: always two; false: one
])
@php
$errorKey = $model;
$id = 'group-'.str_replace('.', '-', $model);
@endphp
<fieldset
{{ $attributes->class('space-y-2') }}
@if ($hint !== null || $errors->has($errorKey)) aria-describedby="{{ trim(($hint !== null ? $id.'-hint ' : '').($errors->has($errorKey) ? $id.'-error' : '')) }}" @endif
>
<legend class="text-sm font-semibold text-gray-700 dark:text-dark-300">{{ $legend }}</legend>
@if ($hint !== null)
<p id="{{ $id }}-hint" class="text-sm text-zinc-600 dark:text-zinc-200">{{ $hint }}</p>
@endif
<div @class(['grid gap-2', 'grid-cols-2' => $columns === 2, 'sm:grid-cols-2 lg:grid-cols-3' => $columns === true])>
@foreach ($options as $option)
<label wire:key="{{ $id }}-{{ $option['value'] }}" class="flex min-h-6 cursor-pointer items-start gap-2 text-sm">
<input
type="checkbox"
wire:model="{{ $model }}"
value="{{ $option['value'] }}"
class="mt-0.5 size-4 shrink-0 rounded border-zinc-400 text-primary-600 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 dark:border-zinc-500 dark:bg-zinc-800"
/>
<span>
{{ $option['label'] }}
@if (($option['note'] ?? null) !== null)
<span class="text-zinc-600 dark:text-zinc-200">({{ $option['note'] }})</span>
@endif
</span>
</label>
@endforeach
</div>
@error($errorKey)
<p id="{{ $id }}-error" class="text-sm text-red-700 dark:text-red-400">{{ $message }}</p>
@enderror
</fieldset>