PM-Detailseite: Inhaltspruefung (Gruen/Gelb/Rot) + Qualitaets-Score sichtbar

- Neue Kachel "Inhaltspruefung" in Status & Verlauf (Badge je Ergebnis,
  "Ausstehend" ohne Pruefung); bei Gelb neutraler Hinweis, dass die
  Boost-Platzierung gruen gepruefte Meldungen voraussetzt
- Content-Score-Panel des Editors in gemeinsame Komponente
  x-content-score-panel extrahiert und auf der Detailseite wiederverwendet
  (Score/100, Stufe, Abstand zur naechsten Schwelle)
- PressReleaseClassification::badgeClass() (ok/warn/err)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Kevin Adametz 2026-07-13 14:59:33 +00:00
parent 4f2be1e0a8
commit 6f96e4a4cc
5 changed files with 126 additions and 32 deletions

View file

@ -0,0 +1,42 @@
{{-- Content-Score-Panel (Qualitäts-Feedback): Score 0–100 + Stufe samt
Abstand zur nächsten Schwelle. Gemeinsam genutzt von PM-Editor und
PM-Detailseite (13.07.); `note` trägt den kontextspezifischen Fußtext. --}}
@props(['score', 'tier' => null, 'note' => null])
@php
$tierEnum = $tier instanceof \App\Enums\PressReleaseContentTier
? $tier
: ($tier ? \App\Enums\PressReleaseContentTier::from($tier) : null);
$tiers = config('scoring.content_score.tiers');
$nextThreshold = $score < (int) $tiers['gepruft']
? (int) $tiers['gepruft']
: ($score < (int) $tiers['hochwertig'] ? (int) $tiers['hochwertig'] : null);
@endphp
<article class="panel">
<div class="panel-head">
<span class="section-eyebrow">{{ __('Qualität') }}</span>
@if ($tierEnum)
<span class="badge {{ $tierEnum === \App\Enums\PressReleaseContentTier::Hochwertig ? 'ok' : ($tierEnum === \App\Enums\PressReleaseContentTier::Geprueft ? 'hub' : 'muted') }}">{{ $tierEnum->label() }}</span>
@endif
</div>
<div class="p-4">
<div class="text-[26px] font-bold leading-none text-[color:var(--color-ink)]">
{{ $score }}<span class="text-[14px] font-medium text-[color:var(--color-ink-3)]">/100</span>
</div>
@if ($nextThreshold)
<p class="text-[12px] text-[color:var(--color-ink-2)] mt-2 m-0">
{{ __('Noch :points Punkte bis zur nächsten Stufe.', ['points' => $nextThreshold - $score]) }}
</p>
@else
<p class="text-[12px] text-[color:var(--color-ink-2)] mt-2 m-0">
{{ __('Höchste Stufe erreicht.') }}
</p>
@endif
@if ($note)
<p class="text-[11px] text-[color:var(--color-ink-3)] mt-2 leading-[1.45] m-0">
{{ $note }}
</p>
@endif
</div>
</article>