fix(penilai/surveyor): perbaikkan print out dokument jaminan
This commit is contained in:
committed by
Daeng Deni Mardaeni
parent
d52edb9481
commit
340dce7ed7
@@ -1,6 +1,110 @@
|
||||
|
||||
<div class="page-break"></div>
|
||||
<div class="section">
|
||||
<table style="width: 100%; border-collapse: collapse; border: 1px solid #000;">
|
||||
<tr>
|
||||
<td style="width:20%; padding: 2px; border: 1px solid #000">Nama Debitur</td>
|
||||
<td style=" width: 1%; padding: 2px; border: 1px solid #000">:</td>
|
||||
<td style="padding: 2px; border: 1px solid #000">{{ $permohonan->debiture->name ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 2px; border: 1px solid #000">Nomor Laporan</td>
|
||||
<td style="padding: 2px; border: 1px solid #000">:</td>
|
||||
<td style="padding: 2px; border: 1px solid #000">{{ $nomorLaporan }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 2px; border: 1px solid #000">Tanggal Laporan</td>
|
||||
<td style="padding: 2px; border: 1px solid #000">:</td>
|
||||
<td style="padding: 2px; border: 1px solid #000">{{ formatTanggalIndonesia($tanggalLaporan) ?? '' }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="width: 100%; ">
|
||||
<tr>
|
||||
<td style="border: 1px solid #000; text-align: center;">
|
||||
PETA DAN BLAD TATA RUANG
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div>
|
||||
@php
|
||||
$fotoTypes = [
|
||||
'upload_gs',
|
||||
'foto_sentuh_tanahku',
|
||||
'foto_gistaru',
|
||||
'foto_bhumi',
|
||||
'foto_argis_region',
|
||||
'foto_tempat',
|
||||
];
|
||||
|
||||
$customLabels = [
|
||||
'upload_gs' => 'Gambar Situasi',
|
||||
'foto_sentuh_tanahku' => 'Sentuh Tanahku',
|
||||
'foto_gistaru' => 'Gistaru',
|
||||
'foto_bhumi' => 'Bhumi',
|
||||
'foto_argis_region' => 'Blad Tata Ruang ',
|
||||
'foto_tempat' => 'Tempat',
|
||||
];
|
||||
// Memindahkan foto_tempat ke depan jika ada
|
||||
if (($key = array_search('upload_gs', $fotoTypes)) !== false) {
|
||||
unset($fotoTypes[$key]);
|
||||
array_unshift($fotoTypes, 'upload_gs');
|
||||
}
|
||||
// Filter fotoTypes untuk memastikan hanya yang memiliki imagePath valid
|
||||
$validPhotoTypes = array_filter($fotoTypes, function ($type) use ($forminspeksi) {
|
||||
return isset($forminspeksi[$type]) &&
|
||||
file_exists(storage_path('app/public/' . $forminspeksi[$type]));
|
||||
});
|
||||
@endphp
|
||||
|
||||
<table width="100%" border="0">
|
||||
@foreach ($validPhotoTypes as $type)
|
||||
@php
|
||||
$imagePath = $forminspeksi[$type] ?? null;
|
||||
@endphp
|
||||
@if ($imagePath && file_exists(storage_path('app/public/' . $imagePath)))
|
||||
<tr>
|
||||
<td style="width: 100%; vertical-align: top; text-align: center" class="photo-item border">
|
||||
<p style="margin: 0; font-size: 10px; text-align: center;">
|
||||
{{ $customLabels[$type] ?? '' }}
|
||||
</p>
|
||||
<img src="{{ storage_path('app/public/' . $imagePath) }}" alt="{{ $imagePath }}"
|
||||
style="max-height: 400px; height: auto; max-width: 100%;">
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="page-break"></div>
|
||||
<table style="width: 100%; ">
|
||||
<tr>
|
||||
<td style="border: 1px solid #000; text-align: center;">
|
||||
FOTO JAMINAN
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@include('lpj::penilai.components.foto-jaminan')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer id="footer">
|
||||
Cabang : {{ $permohonan->debiture->branch->name ?? '' }}
|
||||
</footer>
|
||||
<script type="text/php">
|
||||
if (isset($pdf)) {
|
||||
$pdf->page_script('
|
||||
$font = $fontMetrics->get_font("Arial, Helvetica, sans-serif", "normal");
|
||||
$size = 10;
|
||||
$pageText = $PAGE_NUM;
|
||||
$y = 800;
|
||||
$x = 550;
|
||||
$pdf->text($x, $y, $pageText, $font, $size);
|
||||
');
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
const datas = @json($forminspeksi);
|
||||
console.log(datas);
|
||||
|
||||
Reference in New Issue
Block a user