simedkom/resources/views/dashboard/reports/prints/collection.blade.php
2025-07-03 11:25:33 +07:00

178 lines
5.4 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
<title>Laporan Bukti Tayang</title>
<style>
@page {
size: A4;
margin: 20px;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-size: 12px;
}
body::before {
content: "";
position: fixed;
top: 40%;
left: 50%;
transform: translate(-50%, -50%);
width: 200px;
height: 200px;
background-image: url('{{ public_path('assets/defaults/simedkom-logo-circle.png') }}');
background-size: contain;
background-repeat: no-repeat;
opacity: 0.03;
z-index: -1;
}
header .icon {
text-align: center;
margin-bottom: 10px;
}
header .icon img {
width: 150px;
height: auto;
}
.container {
width: 100%;
max-width: 100%;
margin: 0 auto;
}
.header {
text-align: center;
margin-bottom: 20px;
border-bottom: 2px solid #e0e0e0;
padding-bottom: 10px;
}
.header h2 {
font-size: 18px;
color: #3A59D1;
}
table {
width: 100%;
border-collapse: collapse;
table-layout: fixed;
}
thead {
background-color: #f4f4f4;
}
th, td {
border: 1px solid #ccc;
padding: 6px;
vertical-align: top;
text-align: left;
word-break: break-word;
overflow-wrap: break-word;
font-size: 11px;
}
.link-cell {
max-width: 150px;
}
img.proof-img {
width: 80px;
height: 80px;
object-fit: cover;
display: block;
margin: 0 auto;
}
.footer {
text-align: right;
font-size: 10px;
color: #888;
margin-top: 30px;
}
</style>
</head>
<body>
<header>
<div class="icon">
<img src="{{ public_path('assets/defaults/simedkom-logo-full.png') }}" alt="Logo">
</div>
</header>
<div class="container">
<div class="header">
<h2>Laporan Bukti Tayang</h2>
</div>
<table>
<thead>
<tr>
<th style="width: 5%;">No</th>
<th>Kerja Sama</th>
<th>Media</th>
<th>Perusahaan</th>
<th class="link-cell">Link</th>
<th>Tgl Publikasi</th>
<th>Tgl Melapor</th>
<th>Status</th>
<th>Bukti</th>
</tr>
</thead>
<tbody>
@foreach($reports as $i => $report)
<tr>
<td>{{ $i + 1 }}</td>
<td>{{ $report->order->cooperation->name }}</td>
<td>{{ $report->media->name }}</td>
<td>{{ $report->media->company->name }}</td>
<td class="link-cell">
@if (filled($report->link))
<a href="{{ $report->link }}" target="_blank">{{ $report->link }}</a>
@else
<i>Tidak ada</i>
@endif
</td>
<td>{{ \Carbon\Carbon::parse($report->publication_date)->locale('id')->translatedFormat('l, d F Y') }}</td>
<td>{{ \Carbon\Carbon::parse($report->created_at)->locale('id')->translatedFormat('l, d F Y') }}</td>
<td>
@if ($report->status === '0')
Menunggu
@elseif ($report->status === '1')
Diterima
@elseif ($report->status === '2')
Ditolak
@endif
</td>
<td>
@php
$ext = pathinfo($report->proof, PATHINFO_EXTENSION);
@endphp
@if($report->proof)
@if(in_array(strtolower($ext), ['jpg', 'jpeg', 'png', 'gif', 'webp']))
<img class="proof-img" src="{{ public_path('storage/uploads/reports/' . $report->proof) }}" alt="Bukti">
@elseif(strtolower($ext) === 'pdf')
<a href="{{ asset('storage/uploads/reports/' . $report->proof) }}" target="_blank">Lihat PDF</a>
@else
Tidak dikenali
@endif
@else
Tidak ada
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="footer">
Dicetak pada {{ now()->format('d-m-Y H:i') }} {{ $app->app_title ?? 'SIMEDKOM' }}
</div>
</div>
</body>
</html>