From 59981abab0c15e57b22138955021d39afa3c2564 Mon Sep 17 00:00:00 2001 From: Novy San87 Date: Fri, 7 Aug 2026 14:41:04 +0700 Subject: [PATCH] fix(sp-letters): daftar pelanggaran jadi tabel (Tanggal | Jenis | Point) + baris Total, tanpa bullet --- resources/views/sp-letters/print.blade.php | 39 +++++++++++++++++----- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/resources/views/sp-letters/print.blade.php b/resources/views/sp-letters/print.blade.php index 7a3b477..c5ca9b6 100644 --- a/resources/views/sp-letters/print.blade.php +++ b/resources/views/sp-letters/print.blade.php @@ -22,6 +22,10 @@ .body-text { text-align: justify; margin-bottom: 20px; } .violation-list { margin: 15px 0 15px 20px; } .violation-list li { margin-bottom: 3px; } + .violation-table { width: 100%; border-collapse: collapse; margin: 12px 0; } + .violation-table th, .violation-table td { border: 1px solid #000; padding: 6px 10px; text-align: left; font-size: 11pt; } + .violation-table th { font-weight: bold; } + .violation-table .total-row td { font-weight: bold; } .signature { margin-top: 50px; } .signature .date { text-align: center; margin-bottom: 5px; } .signature .title { text-align: center; margin-bottom: 60px; } @@ -74,15 +78,32 @@

Total akumulasi poin pelanggaran: {{ $spLetter->total_points_at_time }} poin

-

Daftar pelanggaran:

- +

Berikut daftar pelanggaran :

+ @php $violations = is_array($spLetter->violations_included) ? $spLetter->violations_included : json_decode($spLetter->violations_included, true); @endphp + @if($violations) + + + + + + + + + + @foreach($violations as $v) + + + + + + @endforeach + + + + + +
Tanggal PelanggaranJenis PelanggaranPoint
{{ \Carbon\Carbon::parse($v['violation_date'] ?? now())->format('d/m/Y') }}{{ $v['description'] ?? '-' }}{{ $v['points'] ?? 0 }}
Total{{ array_sum(array_column($violations, 'points')) }}
+ @endif