Files
Toiminnanohjaus/resources/views/components/status-badge.blade.php
T
petriandClaude Opus 5.5 f4b58f6b1d Darken the dark canvas, add customer colours, the ongoing status and the board model
- Dark theme page background is #5a5e60; text on it is lifted to zinc-200 /
  primary-100 and TallStackUI's dark labels, hints and checkbox labels are
  lightened so everything stays at 4.5:1.
- Shared HexColor picks white or black text by the higher WCAG contrast; a
  native-dialog colour picker and a large work dialog component.
- Customers get a header colour (customers.header_color), set on the
  customer page.
- New job status Jatkuvat / Kausi (ongoing): open, never late, billed
  monthly like running jobs.
- Kanban model: board columns and views, urgent threshold, per-user board
  preferences (density, column colours and sort), card positions, tasks of
  continuing jobs pinned to the board, MoveBoardCard and board queries with
  logged hours from TimeTracking.

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

25 lines
1.6 KiB
PHP

{{--
A status as a tinted label: the text (and optional icon) carries the meaning, the colour only supports it.
Tones: neutral, primary, info, success, warning, danger, violet. Text and background meet 4.5:1 in both themes.
--}}
@props(['tone' => 'neutral', 'icon' => null])
@php
$colours = match ($tone) {
'primary' => 'bg-primary-50 text-primary-800 ring-primary-600/30 dark:bg-primary-400/15 dark:text-primary-100 dark:ring-primary-300/30',
'info' => 'bg-sky-50 text-sky-800 ring-sky-600/30 dark:bg-sky-400/15 dark:text-sky-100 dark:ring-sky-300/30',
'success' => 'bg-emerald-50 text-emerald-800 ring-emerald-600/30 dark:bg-emerald-400/15 dark:text-emerald-100 dark:ring-emerald-300/30',
'warning' => 'bg-amber-50 text-amber-900 ring-amber-600/40 dark:bg-amber-400/15 dark:text-amber-100 dark:ring-amber-300/30',
'danger' => 'bg-red-50 text-red-800 ring-red-600/30 dark:bg-red-400/15 dark:text-red-100 dark:ring-red-300/30',
'violet' => 'bg-violet-50 text-violet-800 ring-violet-600/30 dark:bg-violet-400/15 dark:text-violet-100 dark:ring-violet-300/30',
default => 'bg-zinc-100 text-zinc-800 ring-zinc-500/30 dark:bg-zinc-400/15 dark:text-zinc-100 dark:ring-zinc-300/30',
};
@endphp
<span {{ $attributes->class(['inline-flex max-w-full items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium ring-1 ring-inset', $colours]) }}>
@if ($icon !== null)
<x-icon :name="$icon" class="size-3.5 shrink-0" aria-hidden="true" />
@endif
<span class="min-w-0 break-words">{{ $slot }}</span>
</span>