perbaikan laporan

This commit is contained in:
majid
2024-12-29 14:10:05 +07:00
parent 371de00add
commit c3362821c3
10 changed files with 596 additions and 728 deletions

View File

@@ -7,9 +7,7 @@
</h2>
@php
$imagePath = $statusLpj
? asset('storage/' . $item['path'])
: storage_path('app/public/' . $item['path']);
$imagePath = storage_path('app/public/' . $item['path']);
@endphp
@if ($statusLpj || file_exists(storage_path('app/public/' . $item['path'])))
@@ -27,9 +25,7 @@
</h2>
@php
$imagePath = $statusLpj
? asset('storage/' . $item['foto_rute_lainnya'])
: storage_path('app/public/' . $item['foto_rute_lainnya']);
$imagePath = storage_path('app/public/' . $item['foto_rute_lainnya']);
@endphp
@if ($statusLpj || file_exists(storage_path('app/public/' . $item['foto_rute_lainnya'])))
@@ -48,9 +44,7 @@
</h2>
@php
$imagePath = $statusLpj
? asset('storage/' . $item['foto_objek'])
: storage_path('app/public/' . $item['foto_objek']);
$imagePath = storage_path('app/public/' . $item['foto_objek']);
@endphp
@if ($statusLpj || file_exists(storage_path('app/public/' . $item['foto_objek'])))
@@ -70,9 +64,7 @@
</h2>
@php
$imagePath = $statusLpj
? asset('storage/' . $item['path'])
: storage_path('app/public/' . $item['path']);
$imagePath = storage_path('app/public/' . $item['path']);
@endphp
@if ($statusLpj || file_exists(storage_path('app/public/' . $item['path'])))
@@ -91,9 +83,7 @@
</h2>
@php
$imagePath = $statusLpj
? asset('storage/' . $item['path'])
: storage_path('app/public/' . $item['path']);
$imagePath = storage_path('app/public/' . $item['path']);
@endphp
@if ($statusLpj || file_exists(storage_path('app/public/' . $item['path'])))
@@ -110,9 +100,7 @@
</h2>
@php
$imagePath = $statusLpj
? asset('storage/' . $formFoto['foto_basement'])
: storage_path('app/public/' . $formFoto['foto_basement']);
$imagePath = storage_path('app/public/' . $formFoto['foto_basement']);
@endphp
@if ($statusLpj || file_exists(storage_path('app/public/' . $formFoto['foto_basement'])))
@@ -128,9 +116,7 @@
</h2>
@php
$imagePath = $statusLpj
? asset('storage/' . $formFoto['foto_gerbang'])
: storage_path('app/public/' . $formFoto['foto_gerbang']);
$imagePath = storage_path('app/public/' . $formFoto['foto_gerbang']);
@endphp
@if ($statusLpj || file_exists(storage_path('app/public/' . $formFoto['foto_gerbang'])))
@@ -146,9 +132,7 @@
</h2>
@php
$imagePath = $statusLpj
? asset('storage/' . $formFoto['pendamping'])
: storage_path('app/public/' . $formFoto['pendamping']);
$imagePath = storage_path('app/public/' . $formFoto['pendamping']);
@endphp
@if ($statusLpj || file_exists(storage_path('app/public/' . $formFoto['pendamping'])))

View File

@@ -13,7 +13,8 @@
{{ $item['name'] ?? 'Rute menuju lokasi - ' . ($index + 1) }}
</h2>
<div class="flex items-center">
<img src="{{ Storage::url($item['path']) }}" alt="Gambar {{ $index + 1 }}" class="w-full h-auto object-cover">
<img src="{{ Storage::url($item['path']) }}" alt="Gambar {{ $index + 1 }}"
class="w-full h-auto object-cover">
</div>
</div>
</div>
@@ -34,10 +35,11 @@
<div class="flex items-center justify-between mt-5">
<div class="grid gap-5">
<h2 class="text-gray-600 font-semibold text-xl">
{{ $item['name_rute_lainnya'] ?? 'Rute menuju lokasi - ' . ($index + 1) }}
{{ $item['name_rute_lainnya'] ?? 'Rute Lainnya - ' . ($index + 1) }}
</h2>
<div class="flex items-center">
<img src="{{ Storage::url($item['foto_rute_lainnya']) }}" alt="Gambar {{ $index + 1 }}" class="w-full h-auto object-cover">
<img src="{{ Storage::url($item['foto_rute_lainnya']) }}" alt="Gambar {{ $index + 1 }}"
class="w-full h-auto object-cover">
</div>
</div>
</div>
@@ -64,7 +66,8 @@
<div class="flex items-center">
<img src="{{ Storage::url($item['foto_objek']) }}" alt="" class="w-full h-auto object-cover">
<img src="{{ Storage::url($item['foto_objek']) }}" alt=""
class="w-full h-auto object-cover">
</div>
</div>
@@ -80,22 +83,25 @@
</div>
<div class="card-body">
@if (isset($formFoto['foto_lantai_unit']))
@foreach ($formFoto['foto_lantai_unit'] as $floorNumber => $floorPhotos)
@foreach ($formFoto['foto_lantai_unit'] as $floorIndex => $floorPhotos)
<div class="mt-5">
@foreach ($floorPhotos as $index => $item)
<div class="flex items-center justify-between mt-3">
<div class="grid gap-3">
<h3 class="text-gray-600 font-semibold text-lg">
{{ $item['name'] ?? 'Foto Lantai ' . $floorNumber . ' - ' . ($index + 1) }}
{{ $item['name'] ?? 'Foto Lantai ' . ($floorIndex + 1) . ' - ' . ($index + 1) }}
</h3>
<div class="flex items-center">
<img src="{{ Storage::url($item['path']) }}" alt="Gambar {{ $floorNumber }}-{{ $index + 1 }}" class="w-full h-auto object-cover">
<img src="{{ Storage::url($item['path']) }}"
alt="Gambar {{ $floorIndex + 1 }}-{{ $index + 1 }}"
class="w-full h-auto object-cover">
</div>
</div>
</div>
@endforeach
</div>
@endforeach
@endif
</div>
</div>
@@ -112,10 +118,11 @@
<div class="flex items-center justify-between mt-5">
<div class="grid gap-5">
<h2 class="text-gray-600 font-semibold text-xl">
{{ $item['name'] ?? 'Rute menuju lokasi - ' . ($index + 1) }}
{{ $item['name'] ?? 'Lingkungan - ' . ($index + 1) }}
</h2>
<div class="flex items-center">
<img src="{{ Storage::url($item['path']) }}" alt="Gambar {{ $index + 1 }}" class="w-full h-auto object-cover">
<img src="{{ Storage::url($item['path']) }}" alt="Gambar {{ $index + 1 }}"
class="w-full h-auto object-cover">
</div>
</div>
</div>
@@ -163,10 +170,11 @@
<div class="flex items-center justify-between mt-5">
<div class="grid gap-5">
<h2 class="text-gray-600 font-semibold text-xl">
{{ $item['name_lantai_lainnya'] ?? 'Rute menuju lokasi - ' . ($index + 1) }}
{{ $item['name_lantai_lainnya'] ?? 'Lantai - ' . ($index + 1) }}
</h2>
<div class="flex items-center">
<img src="{{ Storage::url($item['foto_lantai_lainnya']) }}" alt="Gambar {{ $index + 1 }}" class="w-full h-auto object-cover">
<img src="{{ Storage::url($item['foto_lantai_lainnya']) }}"
alt="Gambar {{ $index + 1 }}" class="w-full h-auto object-cover">
</div>
</div>
</div>
@@ -231,3 +239,39 @@
</div>
</div>
@endif
<div class="card">
<div class="card-header bg-agi-50" id="basic_settings">
<h3 class="card-title">
Peta
</h3>
</div>
<div class="card-body">
@php
$fotoTypes = ['foto_gistaru', 'foto_bhumi', 'foto_argis_region', 'foto_tempat'];
if (($key = array_search('foto_tempat', $fotoTypes)) !== false) {
unset($fotoTypes[$key]);
array_unshift($fotoTypes, 'foto_tempat');
}
@endphp
<div>
@if (isset($forminspeksi))
@forelse ($fotoTypes as $type)
<div class="border photo-item">
@php
$imagePath = $forminspeksi[$type] ?? null;
@endphp
@if ($imagePath && file_exists(storage_path('app/public/' . $imagePath)))
<img src="{{ asset('storage/' . $imagePath) }}" alt="{{ $type }}"
class="photo-image">
@endif
<p class="mt-2 text-sm">{{ Str::title(str_replace('_', ' ', $type)) }}</p>
</div>
@empty
<p>Tidak ada tipe foto yang tersedia</p>
@endforelse
@endif
</div>
</div>
</div>

View File

@@ -106,7 +106,7 @@
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Pihak Bank Selain Appraisal</label>
<div class="flex flex-wrap items-baseline w-full">
<span></span>
<span> {{ $forminspeksi['asset']['pihak_bank'] ?? '' }}</span>
</div>
</div>

View File

@@ -5,7 +5,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Laporan Penilai Jaminan</title>
<style>
@@ -108,12 +108,12 @@
<body style="width: 80%; margin: auto">
@php
$data = '';
foreach ($permohonan->debiture->documents as $dokumen) {
$data .= $dokumen->jenisJaminan->name . ', ';
}
$data = rtrim($data, ', ');
@endphp
$data = '';
foreach ($permohonan->debiture->documents as $dokumen) {
$data .= $dokumen->jenisJaminan->name . ', ';
}
$data = rtrim($data, ', ');
@endphp
<header id="header">
<table style="width: 100%; border: none;">
<tr>
@@ -121,8 +121,9 @@
@include('lpj::component.logo-bag')
</td>
<td style="width: 80%; text-align: center; border: 1px solid black; ">
<h3 style="width:100% padding-top: 40px; text-align: center;text-transform: uppercase;">LAPORAN PENILAIAN ATAS {{$data}}
</h3>
<h3 style="width:100% padding-top: 40px; text-align: center;text-transform: uppercase;">LAPORAN
PENILAIAN ATAS {{ $data }}
</h3>
</td>
</tr>
</table>
@@ -370,7 +371,7 @@
<table style="width: 100%; border: 1px solid #000; text-transform: uppercase;">
<tr>
<td >
<td>
B. ANALISA {{ $data }}
</td>
@@ -613,9 +614,7 @@
<table>
<tr>
@php
$cekLuas = isset(
$forminspeksi['luas_unit']['tidak sesuai'],
)
$cekLuas = isset($forminspeksi['luas_unit']['tidak sesuai'])
? 'tidak sesuai'
: 'sesuai';
@@ -1060,12 +1059,13 @@
@forelse ($fotoTypes as $type)
<div class="border photo-item">
@php
$imagePath = $forminspeksi[$type];
$imagePath = storage_path('app/public/' . $forminspeksi[$type]);
@endphp
@if ($imagePath && file_exists(storage_path('app/public/' . $imagePath)))
<img src="{{ storage_path('app/public/' . $imagePath) }}"
alt="{{ $type }}" class="photo-image">
@if ($statusLpj || file_exists(storage_path('app/public/' . $imagePath)))
<img src="{{ $imagePath }}" alt="{{ $type }}"
class="photo-image">
@endif
<p class="mt-2 text-sm">{{ Str::title(str_replace('_', ' ', $type)) }}</p>

View File

@@ -5,7 +5,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Laporan Penilai jaminan</title>
<style>
body {
@@ -207,12 +207,12 @@
<body>
@php
$data = '';
foreach ($permohonan->debiture->documents as $dokumen) {
$data .= $dokumen->jenisJaminan->name . ', ';
}
$data = rtrim($data, ', ');
@endphp
$data = '';
foreach ($permohonan->debiture->documents as $dokumen) {
$data .= $dokumen->jenisJaminan->name . ', ';
}
$data = rtrim($data, ', ');
@endphp
<main class="content">
@php
$senior_officer = null;
@@ -257,7 +257,8 @@
</tr>
</table>
<h4 style="text-align: center; text-transform: uppercase; font-size: 14px;">LAPORAN PENILAIAN ATAS {{$data}}</h4>
<h4 style="text-align: center; text-transform: uppercase; font-size: 14px;">LAPORAN PENILAIAN ATAS
{{ $data }}</h4>
<p style="text-align: center;">NO:
{{ $permohonan->debiture->branch->code ?? '' }}/{{ $nomorLaporan }}/LPJ/{{ $permohonan->nomor_registrasi }}/{{ onRomawi(date('m')) }}/{{ date('Y') }}
</p>
@@ -822,37 +823,43 @@
<!-- Spesifikasi Bangunan -->
@if (isset($basicData['spekKategoriBangunan']))
@foreach ($basicData['spekKategoriBangunan'] as $index => $spesifikasi)
<tr>
<td><strong>{{ $spesifikasi->name }}</strong></td>
<td>
<table class="checkbox-list">
@if (isset($basicData['spekBangunan']))
@foreach ($basicData['spekBangunan'] as $kategori)
@if ($kategori->spek_kategori_bangunan_id == $spesifikasi->id)
@if ($loop->iteration % 3 == 1 && $loop->iteration > 1)
</tr><tr> <!-- Start a new row after 3 items -->
@endif
<td class="checkbox-item">
<label class="checkbox-label">
<input type="checkbox"
style="margin-right: 3px;"
name="spesifikasi_bangunan[{{ $index }}][{{ $spesifikasi->name }}][]"
value="{{ $kategori->name }}"
{{ isset($forminspeksi['bangunan']['spesifikasi_bangunan'][$index]['spek_kategori_bangunan'][$spesifikasi->name]) &&
in_array($kategori->name, $forminspeksi['bangunan']['spesifikasi_bangunan'][$index]['spek_kategori_bangunan'][$spesifikasi->name])
? 'checked' : '' }}>
{{ $kategori->name }}
</label>
</td>
@endif
@endforeach
@endif
</table>
</td>
</tr>
@foreach ($basicData['spekKategoriBangunan'] as $index => $spesifikasi)
<tr>
<td><strong>{{ $spesifikasi->name }}</strong></td>
<td>
<table class="checkbox-list">
@if (isset($basicData['spekBangunan']))
@foreach ($basicData['spekBangunan'] as $kategori)
@if ($kategori->spek_kategori_bangunan_id == $spesifikasi->id)
@if ($loop->iteration % 3 == 1 && $loop->iteration > 1)
</tr>
<tr> <!-- Start a new row after 3 items -->
@endif
<td class="checkbox-item">
<label class="checkbox-label">
<input type="checkbox" style="margin-right: 3px;"
name="spesifikasi_bangunan[{{ $index }}][{{ $spesifikasi->name }}][]"
value="{{ $kategori->name }}"
{{ isset(
$forminspeksi['bangunan']['spesifikasi_bangunan'][$index]['spek_kategori_bangunan'][$spesifikasi->name],
) &&
in_array(
$kategori->name,
$forminspeksi['bangunan']['spesifikasi_bangunan'][$index]['spek_kategori_bangunan'][$spesifikasi->name],
)
? 'checked'
: '' }}>
{{ $kategori->name }}
</label>
</td>
@endif
@endforeach
@endif
@endif
</table>
</td>
</tr>
@endforeach
@endif
<!-- Sarana Pelengkap -->
@@ -896,11 +903,7 @@
<table>
<tr>
@php
$cekLuas = isset(
$forminspeksi['luas_unit']['tidak sesuai'],
)
? 'tidak sesuai'
: 'sesuai';
$cekLuas = isset($forminspeksi['luas_unit']['tidak sesuai']) ? 'tidak sesuai' : 'sesuai';
$luas = $forminspeksi['luas_unit'][$cekLuas] ?? null;
@endphp
@@ -931,70 +934,70 @@
</table>
@endif
<tr>
<td><strong>Kondisi Unit</strong></td>
<td>
@if (isset($basicData['kondisiUnit']))
<table class="checkbox-list">
<tr>
@foreach ($basicData['kondisiUnit'] as $index => $item)
@if ($index % 3 == 0 && $index > 0)
</tr>
<tr>
@endif
<td class="checkbox-item">
<label class="checkbox-label">
<input type="checkbox"
{{ isset($forminspeksi['kondisi_unit']) && in_array($item->name, $forminspeksi['kondisi_unit']) ? 'checked' : '' }}>
{{ $item->name }}
</label>
</td>
@endforeach
</tr>
<tr>
<td><strong>Kondisi Unit</strong></td>
<td>
@if (isset($basicData['kondisiUnit']))
<table class="checkbox-list">
<tr>
@foreach ($basicData['kondisiUnit'] as $index => $item)
@if ($index % 3 == 0 && $index > 0)
</tr>
<tr>
@endif
<td class="checkbox-item">
<label class="checkbox-label">
<input type="checkbox"
{{ isset($forminspeksi['kondisi_unit']) && in_array($item->name, $forminspeksi['kondisi_unit']) ? 'checked' : '' }}>
{{ $item->name }}
</label>
</td>
@endforeach
</tr>
</table>
@endif
<tr>
<td><strong>Posisi Unit</strong></td>
<td>
@if (isset($basicData['posisiUnit']))
<table class="checkbox-list">
<tr>
@foreach ($basicData['posisiUnit'] as $index => $item)
@if ($index % 3 == 0 && $index > 0)
</tr>
<tr>
@endif
<td class="checkbox-item">
<label class="checkbox-label">
<input type="checkbox"
{{ isset($forminspeksi['posisi_unit']) && in_array($item->name, $forminspeksi['posisi_unit']) ? 'checked' : '' }}>
{{ $item->name }}
</label>
</td>
@endforeach
</tr>
<tr>
<td><strong>Posisi Unit</strong></td>
<td>
@if (isset($basicData['posisiUnit']))
<table class="checkbox-list">
<tr>
@foreach ($basicData['posisiUnit'] as $index => $item)
@if ($index % 3 == 0 && $index > 0)
</tr>
<tr>
@endif
<td class="checkbox-item">
<label class="checkbox-label">
<input type="checkbox"
{{ isset($forminspeksi['posisi_unit']) && in_array($item->name, $forminspeksi['posisi_unit']) ? 'checked' : '' }}>
{{ $item->name }}
</label>
</td>
@endforeach
</tr>
</table>
@endif
<tr>
<td><strong>View Unit</strong></td>
<td>
@if (isset($basicData['view']))
<table class="checkbox-list">
<tr>
@foreach ($basicData['view'] as $index => $item)
@if ($index % 3 == 0 && $index > 0)
</tr>
<tr>
@endif
<td class="checkbox-item">
<label class="checkbox-label">
<input type="checkbox"
{{ isset($forminspeksi['view']) && in_array($item->name, $forminspeksi['view']) ? 'checked' : '' }}>
{{ $item->name }}
</label>
</td>
@endforeach
</tr>
<tr>
<td><strong>View Unit</strong></td>
<td>
@if (isset($basicData['view']))
<table class="checkbox-list">
<tr>
@foreach ($basicData['view'] as $index => $item)
@if ($index % 3 == 0 && $index > 0)
</tr>
<tr>
@endif
<td class="checkbox-item">
<label class="checkbox-label">
<input type="checkbox"
{{ isset($forminspeksi['view']) && in_array($item->name, $forminspeksi['view']) ? 'checked' : '' }}>
{{ $item->name }}
</label>
</td>
@endforeach
</tr>
</table>
@endif
</table>
@@ -1362,7 +1365,8 @@
Likuidasi</td>
</tr>
<tr>
<td style=" padding: 8px; text-align: right;">{{ $lpjData['likuidasi'] ?? '' }}% X Total Nilai
<td style=" padding: 8px; text-align: right;">{{ $lpjData['likuidasi'] ?? '' }}% X Total
Nilai
Pasar Wajar</td>
<td colspan="2" style=" padding: 8px; text-align: right;">=
{{ $lpjData['likuidasi_nilai_1'] ?? '' }}</td>
@@ -1425,12 +1429,40 @@
</div>
<div class="page-break"></div>
<div class="section">
<div class="judul">
<h6 class="border">
PETA LOKASI
</h6>
</div>
<td>
@php
$fotoTypes = ['foto_gistaru', 'foto_bhumi', 'foto_argis_region', 'foto_tempat'];
if (($key = array_search('foto_tempat', $fotoTypes)) !== false) {
unset($fotoTypes[$key]);
array_unshift($fotoTypes, 'foto_tempat');
}
@endphp
<div>
@if (isset($forminspeksi))
@forelse ($fotoTypes as $type)
<div class="border photo-item">
@php
$imagePath = $forminspeksi[$type] ?? null;
@endphp
@if ($imagePath && file_exists(storage_path('app/public/' . $imagePath)))
<img src="{{ asset('storage/' . $imagePath) }}" alt="{{ $type }}" class="photo-image">
@endif
<p class="mt-2 text-sm">{{ Str::title(str_replace('_', ' ', $type)) }}</p>
</div>
@empty
<p>Tidak ada tipe foto yang tersedia</p>
@endforelse
@endif
</div>
</td>
</div>
<div class="section">