fix: anpassungen aus der powerpoint final sprintende

This commit is contained in:
2025-11-10 14:08:26 +01:00
parent 175aebffa5
commit 08faf9fb86
3 changed files with 26 additions and 14 deletions
+11 -4
View File
@@ -25,11 +25,18 @@
}
$formatCurrency=static fn (float $value): string=> number_format($value, 2, ',', '.') . ' €';
$formatCurrencyCompact = static function (float $value): string {
if ($value >= 1000000) {
return number_format($value / 1000000, 0, ',', '.') . ' Mio. €';
}
return number_format($value, 2, ',', '.') . ' €';
};
$formatNumber = static fn ($value): string => number_format($value, 0, ',', '.');
$riskSegments = collect([
'Kritisch (≥80)' => $transactions->filter(fn ($trx) => $trx->risk_score >= 80),
'Hoch (65-79)' => $transactions->filter(fn ($trx) => $trx->risk_score >= 65 && $trx->risk_score < 80), 'Beobachtung (40-64)'=> $transactions->filter(fn ($trx) => $trx->risk_score >= 40 && $trx->risk_score < 65), 'Routine (<40)'=> $transactions->filter(fn ($trx) => $trx->risk_score < 40),
'Hoch (65-79)' => $transactions->filter(fn ($trx) => $trx->risk_score >= 65 && $trx->risk_score < 80),
'Beobachtung (40-64)' => $transactions->filter(fn ($trx) => $trx->risk_score >= 40 && $trx->risk_score < 65),
])->map(fn ($group, $label) => [
'label' => $label,
'count' => $group->count(),
@@ -69,7 +76,7 @@
</div>
<div class="rounded-2xl border border-emerald-400/30 bg-emerald-500/20 p-4 backdrop-blur-sm shadow-lg shadow-emerald-900/30">
<p class="text-xs font-semibold uppercase tracking-wide text-emerald-50">Gesamtvolumen</p>
<p class="mt-2 text-2xl font-semibold text-emerald-100">{{ $formatCurrency($totalVolume) }}</p>
<p class="mt-2 text-2xl font-semibold text-emerald-100">{{ $formatCurrencyCompact($totalVolume) }}</p>
</div>
<div class="rounded-2xl border border-indigo-400/30 bg-indigo-500/20 p-4 backdrop-blur-sm shadow-lg shadow-indigo-900/30">
<p class="text-xs font-semibold uppercase tracking-wide text-indigo-50">Alerts pro Analyst:in</p>
@@ -108,7 +115,7 @@
</div>
<div class="text-right">
<p class="text-xs uppercase tracking-wide text-zinc-400">Volumen</p>
<p class="text-sm font-semibold text-zinc-900 dark:text-zinc-100">{{ $formatCurrency($segment['volume']) }}</p>
<p class="text-sm font-semibold text-zinc-900 dark:text-zinc-100">{{ $formatCurrencyCompact($segment['volume']) }}</p>
</div>
</div>
@endforeach
@@ -154,7 +161,7 @@
</div>
<div class="text-right text-xs">
<p class="uppercase tracking-wide text-zinc-400">Volumen</p>
<p class="font-semibold text-zinc-900 dark:text-zinc-100">{{ $formatCurrency($company['volume']) }}</p>
<p class="font-semibold text-zinc-900 dark:text-zinc-100">{{ $formatCurrencyCompact($company['volume']) }}</p>
</div>
</li>
@empty