From 796b6fab92b5d3815e1eb5a629d191a1a7f646c6 Mon Sep 17 00:00:00 2001 From: majid Date: Fri, 7 Mar 2025 10:11:26 +0700 Subject: [PATCH] fix(surveyor): perbaikkan foto dan print out hasil inspeksi --- app/Http/Controllers/SurveyorController.php | 6 +- .../penilai/components/foto-jaminan.blade.php | 83 ++++++++++--------- .../components/print-out/main.blade.php | 2 +- 3 files changed, 48 insertions(+), 43 deletions(-) diff --git a/app/Http/Controllers/SurveyorController.php b/app/Http/Controllers/SurveyorController.php index 31e0f55..b8c2d97 100644 --- a/app/Http/Controllers/SurveyorController.php +++ b/app/Http/Controllers/SurveyorController.php @@ -236,6 +236,7 @@ class SurveyorController extends Controller 'alat-berat' => 'getAlatBeratData', 'lingkungan' => 'getLingkunganData', 'fakta' => 'getFactData', + 'informasi' => 'getFactData', 'rap' => 'getRapData', ]; @@ -2668,7 +2669,8 @@ class SurveyorController extends Controller 'foto_bhumi', 'foto_argis_region', 'foto_tempat', - 'foto_sentuh_tanahku' + 'foto_sentuh_tanahku', + 'upload_gs' ]; if ($inspeksi) { @@ -3638,7 +3640,7 @@ class SurveyorController extends Controller $namaDebiture = $permohonan->debiture->name . '-' . $permohonan->nomor_registrasi; $fileName = 'inspeksi-' . $namaDebiture . '-data.pdf'; - return $pdf->download($fileName); + return $pdf->stream($fileName); } public function approveReschedule(Request $request, $id) diff --git a/resources/views/penilai/components/foto-jaminan.blade.php b/resources/views/penilai/components/foto-jaminan.blade.php index a92fc18..f70299c 100644 --- a/resources/views/penilai/components/foto-jaminan.blade.php +++ b/resources/views/penilai/components/foto-jaminan.blade.php @@ -30,8 +30,9 @@ /* Image Styling */ .photo-item img { - width: 300px; - height: 300px; + width: auto; + height: 400px; + max-height: 400px; object-fit: contain; background-color: #f0f0f0; border-radius: 5px; @@ -46,24 +47,27 @@ /* Media Print */ @media print { - table { - width: 100%; - border-collapse: collapse; - } - td { - vertical-align: top; - text-align: center; - page-break-inside: avoid; - } - .photo-image { - width: auto; - height: 400px; - max-height: 400px; - } - .page-break { - page-break-after: always; - } - } + table { + width: 100%; + border-collapse: collapse; + } + + td { + vertical-align: top; + text-align: center; + page-break-inside: avoid; + } + + .photo-image { + width: auto; + height: 400px; + max-height: 400px; + } + + .page-break { + page-break-after: always; + } + } @isset($basicData['foto']) @@ -81,8 +85,6 @@ @if ($groupedPhotos->isEmpty())

Tidak ada foto yang tersedia.

@else - - @foreach ($mainPhotos as $category => $photos) @php $groupedBySubcategory = $photos->groupBy('sub'); @@ -91,12 +93,13 @@ @foreach ($groupedBySubcategory as $subcategory => $subPhotos) @if (count($subPhotos) > 0) @foreach ($subPhotos->chunk(2) as $chunkedPhotos) - - @foreach ($chunkedPhotos as $item) - @php - $imagePath = storage_path('app/public/' . $item['path']); - @endphp - +
+ @foreach ($chunkedPhotos as $item) + @php + $imagePath = storage_path('app/public/' . $item['path']); + @endphp + - @endforeach - @if (count($chunkedPhotos) < 2) - - @endif + @endforeach + @if (count($chunkedPhotos) < 2) + + @endif

{{ $category }} - @isset($subcategory) @@ -114,10 +117,10 @@ @endisset

@endforeach @@ -129,12 +132,13 @@ @foreach ($otherPhotos->groupBy('sub') as $subcategory => $subPhotos) @if (count($subPhotos) > 0) @foreach ($subPhotos->chunk(2) as $chunkedPhotos) - - @foreach ($chunkedPhotos as $item) - @php - $imagePath = storage_path('app/public/' . $item['path']); - @endphp - +
+ @foreach ($chunkedPhotos as $item) + @php + $imagePath = storage_path('app/public/' . $item['path']); + @endphp + - @endforeach + @endforeach @if (count($chunkedPhotos) < 2) @@ -163,4 +167,3 @@ @endif @endif @endisset - diff --git a/resources/views/surveyor/components/print-out/main.blade.php b/resources/views/surveyor/components/print-out/main.blade.php index f006e40..af689e7 100644 --- a/resources/views/surveyor/components/print-out/main.blade.php +++ b/resources/views/surveyor/components/print-out/main.blade.php @@ -365,7 +365,7 @@

Lainnya - @isset($subcategory) @@ -151,7 +155,7 @@

{{ $item['description'] }}

@endisset

- Jaminan + STATUS KEPEMILIKAN, HUBUNGAN DAN PENGHUNI