diff --git a/app/Http/Controllers/PenilaiController.php b/app/Http/Controllers/PenilaiController.php
index 66ee6d8..8c972e5 100644
--- a/app/Http/Controllers/PenilaiController.php
+++ b/app/Http/Controllers/PenilaiController.php
@@ -586,6 +586,7 @@ class PenilaiController extends Controller
$documentId = $request->query('documentId');
$jaminanId = $request->query('jaminanId');
$permohonanId = $request->query('permohonanId');
+ $statusLpj = $request->query('statusLpj');
$permohonan = $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId);
$basicData = $this->surveyorController->getCommonData();
@@ -609,33 +610,40 @@ class PenilaiController extends Controller
}
try {
- $pdf = PDF::loadView('lpj::penilai.components.print-out', compact(
- 'permohonan',
- 'forminspeksi',
- 'lpjData',
- 'formFoto',
- 'basicData',
- 'inspeksi',
- 'lpj'
- ));
- $pdf->setPaper('A4', 'portrait');
+ // if ($statusLpj) {
+ // return view('lpj::penilai.components.print-out-laporan', compact(
+ // 'permohonan',
+ // 'forminspeksi',
+ // 'lpjData',
+ // 'formFoto',
+ // 'basicData',
+ // 'inspeksi',
+ // 'lpj',
+ // 'statusLpj'
+ // ));
+ // }else{
+ $pdf = PDF::loadView('lpj::penilai.components.print-out-laporan', compact(
+ 'permohonan',
+ 'forminspeksi',
+ 'lpjData',
+ 'formFoto',
+ 'basicData',
+ 'inspeksi',
+ 'lpj',
+ 'statusLpj'
+ ));
+
+ $pdf->setPaper('A4', 'portrait');
+ return $pdf->download('laporan.pdf');
+ // }
- return $pdf->download('laporan.pdf');
} catch (\Exception $e) {
Log::error('PDF generation failed: ' . $e->getMessage());
return response()->json(['error' => 'Failed to generate PDF. Please check the log for details.'], 500);
}
- // return view('lpj::penilai.components.print-out', compact(
- // 'permohonan',
- // 'forminspeksi',
- // 'lpjData',
- // 'formFoto',
- // 'basicData',
- // 'inspeksi',
- // 'lpj'
- // ));
+
}
}
diff --git a/resources/views/component/logo-bag.blade.php b/resources/views/component/logo-bag.blade.php
new file mode 100644
index 0000000..90d2f65
--- /dev/null
+++ b/resources/views/component/logo-bag.blade.php
@@ -0,0 +1 @@
+
diff --git a/resources/views/penilai/components/print-out-laporan.blade.php b/resources/views/penilai/components/print-out-laporan.blade.php
new file mode 100644
index 0000000..8257f38
--- /dev/null
+++ b/resources/views/penilai/components/print-out-laporan.blade.php
@@ -0,0 +1,567 @@
+
+
+
+
| + @include('lpj::component.logo-bag') + | +
+ LAPORAN PENILAIAN ATAS + TANAH + DAN/ATAU BANGUNAN+ |
+
+
|
+
+
|
+ |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| + A. STATUS KEPEMILIKAN, HUBUNGAN DAN PENGHUNI + | + ++ C. SARANA PELENGKAP DAN LINGKUNGAN + | +|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+
|
+
+
+
|
+
| + D. ASURANSI + | +
| + E. INFORMASI HARGA + | +
| + F. INFORMASI NILAI + | ++ G. CATATAN YANG PERLU DI PERHATIKAN + | +
| Nama Debitur | +: | +SUKARDI | +
| Nomor Laporan | +: | ++ |
| Tanggal Laporan | +: | ++ |
| PETA | +
|
+ @php
+ $fotoTypes = ['foto_gistaru', 'foto_bhumi', 'foto_argis_region', 'foto_tempat'];
+ @endphp
+
+ @if (isset($forminspeksi))
+ @forelse ($fotoTypes as $type)
+
+
+ @php
+ $imagePath = $forminspeksi[$type];
+ @endphp
+
+ @if ($imagePath && file_exists(storage_path('app/public/' . $imagePath)))
+
+ @empty
+ {{ Str::title(str_replace('_', ' ', $type)) }} + +Tidak ada tipe foto yang tersedia + @endforelse + @endif + |
+
| FOTO JAMINAN | +
|
+
+ @if (isset($formFoto['rute_menuju_lokasi']))
+ @foreach ($formFoto['rute_menuju_lokasi'] as $item)
+
+
+
+ @endforeach
+ @endif
+
+ @if (isset($formFoto['object_jaminan']))
+ @foreach ($formFoto['object_jaminan'] as $item)
+ + {{ $item['name_rute'] . ' ' . $loop->index + 1 }} ++ + @if (file_exists(storage_path('app/public/' . $item['foto_rute']))) +
+
+ @endforeach
+ @endif
+
+ @if (isset($formFoto['foto_basement']))
+ + {{ $item['name_objek'] }} ++ + @if (file_exists(storage_path('app/public/' . $item['foto_objek']))) +
+
+ @endif
+
+ @if (isset($formFoto['foto_gerbang']))
+ + Basement ++ + @if (file_exists(storage_path('app/public/' . $formFoto['foto_basement']))) +
+
+ @endif
+ @if (isset($formFoto['pendamping']))
+ + Gerbang ++ + @if (file_exists(storage_path('app/public/' . $formFoto['foto_gerbang']))) +
+
+ @endif
+ + Pendamping ++ @if (file_exists(storage_path('app/public/' . $formFoto['pendamping']))) + |
+
{{ Str::title(str_replace('_', ' ', $type)) }}
- -Tidak ada tipe foto yang tersedia
- @endforelse - @endif -|
- |
@@ -84,7 +84,7 @@ {{ $penawaran->jenis_laporan_name }} |
| Lokasi Jaminan {{ $i }} | @@ -101,16 +101,16 @@ @foreach ($data->dokumenjaminan as $dokumen_jaminans) @if ($dokumen->id== $dokumen_jaminans->id) @php $details = $dokumen_jaminans->detail; @endphp - @foreach ($details as $index => $detailku) + @foreach ($details as $index => $detailku) {{ $detailku->name }}{{ $index === count($details) - 1 ? '' : ', ' }} - @endforeach - @endif - @endforeach + @endforeach + @endif + @endforeach|
| Fee / Harga Penilaian | : | diff --git a/resources/views/surveyor/components/foto.blade.php b/resources/views/surveyor/components/foto.blade.php index c48e202..b5b2f50 100644 --- a/resources/views/surveyor/components/foto.blade.php +++ b/resources/views/surveyor/components/foto.blade.php @@ -418,6 +418,10 @@