62 lines
3.1 KiB
PHP
62 lines
3.1 KiB
PHP
<div class="space-y-6">
|
|
{{-- Kopf wie überall in der Konsole: Augenbraue, Titel, ein Satz darunter. --}}
|
|
<header class="animate-rise">
|
|
<p class="lbl">{{ __('admin.console') }}</p>
|
|
<h1 class="mt-[7px] text-[23px] font-bold leading-[1.12] tracking-[-0.03em] text-ink min-[901px]:text-[30px]">
|
|
{{ __('open_work.title') }}
|
|
</h1>
|
|
<p class="mt-2 max-w-[76ch] text-sm leading-relaxed text-muted">{{ __('open_work.subtitle') }}</p>
|
|
</header>
|
|
|
|
{{-- Die Zählung nach Zustand, ganz oben. Sie beantwortet die einzige Frage,
|
|
die man vor der Liste hat: ist etwas dabei, das gerade Geld kostet? --}}
|
|
@if ($counts)
|
|
<div class="flex flex-wrap gap-2 animate-rise [animation-delay:40ms]">
|
|
@foreach (['sold', 'partial', 'unproven', 'planned'] as $state)
|
|
@if (($counts[$state] ?? 0) > 0)
|
|
<span class="inline-flex items-center gap-2 rounded-pill border px-3 py-1 text-xs font-medium
|
|
{{ $state === 'sold'
|
|
? 'border-danger/30 bg-danger/5 text-danger'
|
|
: 'border-line bg-surface text-body' }}">
|
|
<span class="tabular-nums font-bold">{{ $counts[$state] }}</span>
|
|
{{ __('open_work.state.'.$state) }}
|
|
</span>
|
|
@endif
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
|
|
@forelse ($items as $item)
|
|
<article class="rounded-xl border border-line bg-surface p-6 shadow-xs animate-rise [animation-delay:60ms]">
|
|
<div class="flex flex-wrap items-start justify-between gap-3">
|
|
<h2 class="min-w-0 text-md font-bold tracking-[-0.01em] text-ink">{{ $item['title'] }}</h2>
|
|
|
|
{{-- „Verkauft, nicht geliefert" bekommt als einziger Zustand die
|
|
Warnfarbe. Wenn alles auffällt, fällt nichts auf. --}}
|
|
<span class="shrink-0 rounded-pill border px-2.5 py-1 text-xs font-medium
|
|
{{ $item['state'] === 'sold'
|
|
? 'border-danger/30 bg-danger/5 text-danger'
|
|
: 'border-line bg-surface-2 text-muted' }}"
|
|
title="{{ __('open_work.state_hint.'.$item['state']) }}">
|
|
{{ __('open_work.state.'.$item['state']) }}
|
|
</span>
|
|
</div>
|
|
|
|
<dl class="mt-4 space-y-3">
|
|
@foreach (['where', 'missing', 'risk'] as $field)
|
|
<div class="grid gap-x-6 gap-y-1 sm:grid-cols-[minmax(0,150px)_minmax(0,1fr)] sm:items-baseline">
|
|
<dt class="text-xs text-muted">{{ __('open_work.'.$field) }}</dt>
|
|
<dd class="text-sm leading-relaxed {{ $field === 'where' ? 'font-mono text-xs text-body break-all' : 'text-body' }}">
|
|
{{ $item[$field] }}
|
|
</dd>
|
|
</div>
|
|
@endforeach
|
|
</dl>
|
|
</article>
|
|
@empty
|
|
<p class="rounded-xl border border-line bg-surface p-6 text-sm leading-relaxed text-muted shadow-xs">
|
|
{{ __('open_work.empty') }}
|
|
</p>
|
|
@endforelse
|
|
</div>
|