From 5fa6f2c9ef4abae6bad7faee8c5e90bf184f6e8f Mon Sep 17 00:00:00 2001 From: majid Date: Fri, 7 Mar 2025 07:37:16 +0700 Subject: [PATCH 1/5] fix(surveyor):perbaikkan print out form inspeksi dan penambahan helper nama detail jaminan, dan form penilaian lpj --- app/Helpers/Lpj.php | 19 +- .../views/component/detail-jaminan.blade.php | 2 +- .../views/component/form-penilai.blade.php | 32 +- resources/views/penilai/show.blade.php | 5 + .../components/data-pembanding.blade.php | 4 +- .../surveyor/components/header.blade.php | 2 +- .../pembanding-tanah-bangunan-unit.blade.php | 32 +- .../components/print-out/bangunan.blade.php | 54 +- .../components/print-out/fakta.blade.php | 37 +- .../components/print-out/informasi.blade.php | 12 +- .../components/print-out/lingkungan.blade.php | 107 +-- .../components/print-out/main.blade.php | 535 +++++------- .../components/print-out/rap.blade.php | 780 +++++++++--------- .../components/print-out/tanah.blade.php | 490 ++++++----- 14 files changed, 1083 insertions(+), 1028 deletions(-) diff --git a/app/Helpers/Lpj.php b/app/Helpers/Lpj.php index a479209..5262587 100644 --- a/app/Helpers/Lpj.php +++ b/app/Helpers/Lpj.php @@ -432,20 +432,15 @@ function getWilayahName($code, $type) function formatLabel($key) { - $customLabels = [ - 'shgb_no_kel_desa' => 'SHGB', - 'nib' => 'NIB', - 'img_pbg_no' =>'IMB/PBG NO', - 'no_surat_ukur_gs' => 'No Surat Ukur/GS', - ]; - - // Jika ada dalam mapping, gunakan label custom - if (array_key_exists($key, $customLabels)) { - return $customLabels[$key]; + static $labelCache = []; + if (isset($labelCache[$key])) { + return $labelCache[$key]; } - // Default: Ubah underscore menjadi spasi dan kapitalisasi - return ucwords(str_replace('_', ' ', $key)); + $customLabel = CustomField::where('name', $key)->first(); + $labelCache[$key] = $customLabel->label ?? ucwords(str_replace('_', ' ', $key)); + + return $labelCache[$key]; } function calculateSLA($permohonan, $type) diff --git a/resources/views/component/detail-jaminan.blade.php b/resources/views/component/detail-jaminan.blade.php index 55b618a..edba9aa 100644 --- a/resources/views/component/detail-jaminan.blade.php +++ b/resources/views/component/detail-jaminan.blade.php @@ -283,7 +283,7 @@ @foreach (json_decode($detail->details) as $key => $value) - {{ str_replace("_"," ",$key) ?? "" }} + {{formatLabel($key)}} {{ $value ?? "" }} diff --git a/resources/views/component/form-penilai.blade.php b/resources/views/component/form-penilai.blade.php index 40b12de..88b0e6f 100644 --- a/resources/views/component/form-penilai.blade.php +++ b/resources/views/component/form-penilai.blade.php @@ -1,4 +1,3 @@ -
@foreach ($permohonan->documents as $dokumen) @@ -17,8 +16,8 @@ @if (array_intersect($kategoriUnik, ['tanah', 'bangunan', 'apartemen-kantor'])) - @include('lpj::surveyor.components.header') - @endif + @include('lpj::surveyor.components.header') + @endif @foreach ($kategoriUnik as $kategori) {{-- Tampilkan komponen sesuai kategori --}} @@ -37,7 +36,8 @@ Informasi dan pembanding @@ -75,6 +75,21 @@ @endphp @foreach ($kategoriUnik as $item) + @php + + if ($item === 'bangunan') { + $luas = + $forminspeksi['bangunan']['luas_tanah_bagunan']['tidak sesuai'] ?? + ($forminspeksi['bangunan']['luas_tanah_bagunan']['sesuai'] ?? null); + } elseif ($item === 'tanah') { + $luas = + $forminspeksi['tanah']['luas_tanah']['tidak sesuai'] ?? + ($forminspeksi['tanah']['luas_tanah']['sesuai'] ?? null); + } else { + $luas = null; + } + $luas = old('luas_' . $item, $lpjData['luas_' . $item] ?? $luas); + @endphp @if (isset($labelNilai[$item]))
@@ -82,16 +97,15 @@ {{ $labelNilai[$item] }}
@@ -129,7 +143,7 @@
-
+
diff --git a/resources/views/penilai/show.blade.php b/resources/views/penilai/show.blade.php index d2c1a37..b6eb0e0 100644 --- a/resources/views/penilai/show.blade.php +++ b/resources/views/penilai/show.blade.php @@ -319,6 +319,11 @@
+ + Cetak Hasil Inspeksi + + diff --git a/resources/views/surveyor/components/data-pembanding.blade.php b/resources/views/surveyor/components/data-pembanding.blade.php index 7275b64..786d568 100644 --- a/resources/views/surveyor/components/data-pembanding.blade.php +++ b/resources/views/surveyor/components/data-pembanding.blade.php @@ -193,7 +193,7 @@ 'total_pembanding[]': currentData.total, 'diskon_pembanding[]': currentData.diskon, 'telepon_pembanding[]': currentData.telepon, - 'penawaran_pembanding[]': currentData.penawaran + // 'penawaran_pembanding[]': currentData.penawaran } : { 'jenis_aset_pembanding[]': currentData.jenis_aset, 'luas_tanah_pembanding[]': currentData.luas_tanah, @@ -213,7 +213,7 @@ 'diskon_pembanding[]': currentData.diskon, 'hak_properti_pembanding[]': currentData.hak_properti, 'telepon_pembanding[]': currentData.telepon, - 'penawaran_pembanding[]': currentData.penawaran, + // 'penawaran_pembanding[]': currentData.penawaran, 'tanggal_pembanding[]': currentData.tanggal, // 'harga_penawaran_pembanding[]':currentData.harga_penawaran diff --git a/resources/views/surveyor/components/header.blade.php b/resources/views/surveyor/components/header.blade.php index 16c02ea..7ef39f7 100644 --- a/resources/views/surveyor/components/header.blade.php +++ b/resources/views/surveyor/components/header.blade.php @@ -187,7 +187,7 @@ @if (isset($basicData['jenisJaminan'])) @foreach ($basicData['jenisJaminan'] as $item) - diff --git a/resources/views/surveyor/components/pembanding-tanah-bangunan-unit.blade.php b/resources/views/surveyor/components/pembanding-tanah-bangunan-unit.blade.php index 8aa2d9b..d717730 100644 --- a/resources/views/surveyor/components/pembanding-tanah-bangunan-unit.blade.php +++ b/resources/views/surveyor/components/pembanding-tanah-bangunan-unit.blade.php @@ -92,12 +92,20 @@ @@ -173,27 +181,27 @@ - - Penawaran/ Transaksi + {{-- --}} + {{-- Penawaran/ Transaksi - {{-- --}} - + {{-- - - {{-- --}} + {{-- --}} - - + {{-- + --}} {{-- Harga Penawaran/ Transaksi(Rp) diff --git a/resources/views/surveyor/components/print-out/bangunan.blade.php b/resources/views/surveyor/components/print-out/bangunan.blade.php index 0224431..fdd9460 100644 --- a/resources/views/surveyor/components/print-out/bangunan.blade.php +++ b/resources/views/surveyor/components/print-out/bangunan.blade.php @@ -1,4 +1,4 @@ -
+
@@ -15,18 +15,44 @@ @php - $cekLuasBangunan = isset($forminspeksi['bangunan']['luas_tanah_bagunan']['tidak sesuai']) + // Tentukan apakah sesuai atau tidak sesuai berdasarkan input lama atau data awal + $cekLuasBangunan = old('luas_bangunan') ?? (isset($forminspeksi['bangunan']['luas_tanah_bagunan']['tidak sesuai']) ? 'tidak sesuai' - : 'sesuai'; - $luasBangunan = $forminspeksi['bangunan']['luas_tanah_bagunan'][$cekLuasBangunan] ?? null; + : 'sesuai'); + // Ambil nilai dari key yang sesuai + $luasBangunanSesuai = $forminspeksi['bangunan']['luas_tanah_bagunan']['sesuai'] ?? null; + $luasBangunanTidakSesuai = $forminspeksi['bangunan']['luas_tanah_bagunan']['tidak sesuai'] ?? null; @endphp - - + + + + + - + +
Luas Bangunan (IMB){{ $luasBangunan }}Luas Bangunan (IMB): + + + + + + + +
+ +
+ +
+
Jenis BangunanJenis Bangunan: @if (isset($basicData['jenisBangunan'])) @@ -53,7 +79,8 @@ - + +
Kondisi BangunanKondisi Bangunan: @if (isset($basicData['kondisiBangunan'])) @@ -79,7 +106,8 @@ - + +
Sifat BangunanSifat Bangunan: @if (isset($basicData['sifatBangunan'])) @@ -120,12 +148,13 @@ count($forminspeksi['bangunan']['spesifikasi_bangunan']) > 0) @foreach ($forminspeksi['bangunan']['spesifikasi_bangunan'] as $bangunanIndex => $bangunan) - + @if (isset($basicData['spekKategoriBangunan'])) @foreach ($basicData['spekKategoriBangunan'] as $index => $spesifikasi) - + +
Spesifikasi Bangunan {{ $bangunanIndex + 1 }}Spesifikasi Bangunan {{ $bangunanIndex + 1 }}
{{ $spesifikasi->name }}{{ $spesifikasi->name }}: @if (isset($basicData['spekBangunan'])) @@ -185,7 +214,8 @@ @endif - + +
Sarana PelengkapSarana Pelengkap: @if (isset($basicData['saranaPelengkap'])) diff --git a/resources/views/surveyor/components/print-out/fakta.blade.php b/resources/views/surveyor/components/print-out/fakta.blade.php index 480f15d..72216e8 100644 --- a/resources/views/surveyor/components/print-out/fakta.blade.php +++ b/resources/views/surveyor/components/print-out/fakta.blade.php @@ -1,4 +1,4 @@ -
+
@@ -14,8 +14,9 @@
- - + +
Faktor Positif + Faktor Positif: @isset($forminspeksi['fakta']['fakta_positif']) @foreach ($forminspeksi['fakta']['fakta_positif'] as $key => $item) @@ -28,8 +29,9 @@ - - + + - - + + - - + + - - + + - - + + - - + +
Faktor Negatif + Faktor Negatif: @php $faktaNegatif = $forminspeksi['fakta']['fakta_negatif'] ?? []; $faktaNegatifFiltered = is_array($faktaNegatif) @@ -54,16 +56,18 @@
Rute Munuju + Rute Munuju:

{{ $forminspeksi['fakta']['rute_menuju'] ?? '' }}

Batas Batas + Batas Batas : @foreach ($forminspeksi['fakta']['batas_batas_input'] ?? [] as $arah => $batas) @@ -75,8 +79,9 @@
Kondisi lain terkait lingkungan + Kondisi lain terkait lingkungan : @foreach ($forminspeksi['fakta']['kondisi_lingkungan'] ?? [] as $kondisi) @@ -85,8 +90,9 @@
Kondisi lain terkait Bangunan + Kondisi lain terkait Bangunan : @foreach ($forminspeksi['fakta']['kondisi_lain_bangunan'] ?? [] as $kondisiLain)

{!! nl2br(e($kondisiLain)) !!}

@@ -94,8 +100,9 @@
Informasi Terkait Dokumen + Informasi Terkait Dokumen : @foreach ($forminspeksi['fakta']['informasi_dokument'] ?? [] as $informasi)

{!! nl2br(e($informasi)) !!}

diff --git a/resources/views/surveyor/components/print-out/informasi.blade.php b/resources/views/surveyor/components/print-out/informasi.blade.php index 90b845b..fe6a138 100644 --- a/resources/views/surveyor/components/print-out/informasi.blade.php +++ b/resources/views/surveyor/components/print-out/informasi.blade.php @@ -1,4 +1,4 @@ -
+
@@ -13,8 +13,9 @@ - - + + - - + + - + From 345cbbe22c90661b109ba3b344df90c0d66d499a Mon Sep 17 00:00:00 2001 From: majid Date: Fri, 7 Mar 2025 11:17:31 +0700 Subject: [PATCH 4/5] fix(surveyor): perbaikkan proses jadwal dan hapus nib di form inspeksi --- app/Http/Controllers/SurveyorController.php | 11 ++++++++--- resources/views/surveyor/components/header.blade.php | 4 ++-- resources/views/surveyor/index.blade.php | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/SurveyorController.php b/app/Http/Controllers/SurveyorController.php index 69c3653..67e7e5b 100644 --- a/app/Http/Controllers/SurveyorController.php +++ b/app/Http/Controllers/SurveyorController.php @@ -967,8 +967,11 @@ class SurveyorController extends Controller 'keterangan' => 'required', ]); + $penilaian = Penilaian::findOrFail($id); + $permohonan = Permohonan::where('nomor_registrasi', $penilaian->nomor_registrasi)->first(); + ; if (Carbon::parse($validate['waktu_penilaian']) <= Carbon::parse($penilaian->tanggal_kunjungan)) { return response()->json([ 'success' => false, @@ -986,7 +989,9 @@ class SurveyorController extends Controller SendJadwalKunjunganEmailJob::dispatch($emailData); - + $permohonan->update([ + 'status' => 'request-jadwal', + ]); $penilaian->update([ @@ -2107,7 +2112,7 @@ class SurveyorController extends Controller }); } - $query->whereRaw('LOWER(status) IN (?, ?, ?, ?, ?, ? ,?,?)', ['assign', 'survey', 'proses-survey', 'request-reschedule', 'reschedule', 'rejected-reschedule', 'approved-reschedule', 'revisi-survey' ]); + $query->whereRaw('LOWER(status) IN (?, ?, ?, ?, ?, ? ,?,?, ?)', ['assign', 'survey', 'proses-survey', 'request-reschedule', 'reschedule', 'rejected-reschedule', 'approved-reschedule', 'revisi-survey', 'request-jadwal' ]); if (!Auth::user()->hasRole('administrator')) { @@ -2457,7 +2462,7 @@ class SurveyorController extends Controller 'kordinat_lng' => $data['kordinat_lng'] ?? null, 'kordinat_lat' => $data['kordinat_lat'] ?? null, - 'nomor_nib' => $data['nomor_nib'] ?? null + // 'nomor_nib' => $data['nomor_nib'] ?? null ] ]; } diff --git a/resources/views/surveyor/components/header.blade.php b/resources/views/surveyor/components/header.blade.php index 7ef39f7..0cc9318 100644 --- a/resources/views/surveyor/components/header.blade.php +++ b/resources/views/surveyor/components/header.blade.php @@ -289,14 +289,14 @@
@include('lpj::component.detail-jaminan', ['status' => true]) -
+ {{--
-
+
--}}
diff --git a/resources/views/surveyor/index.blade.php b/resources/views/surveyor/index.blade.php index 70c2043..8cc5671 100644 --- a/resources/views/surveyor/index.blade.php +++ b/resources/views/surveyor/index.blade.php @@ -500,7 +500,7 @@ id: permohonanId, waktu_penilaian: tanggal, deskripsi_penilaian: keterangan, - keterangan:'Tanggal Kunjungan: ' + tanggal + ', Keterangan: ' + keterangan + keterangan:'Permintaan Jadwal Kujungan: ' + window.formatTanggalWaktuIndonesia(tanggal) + ', ' + keterangan }; $.ajax({ From 50ce815ac1cd627d5042c7ff8b459e6d4b6d61f4 Mon Sep 17 00:00:00 2001 From: majid Date: Fri, 7 Mar 2025 13:40:33 +0700 Subject: [PATCH 5/5] fix(surveyor) :hilakan tobol save luas tanah, bagunna, ubah message ke keterangan --- app/Http/Controllers/PenilaiController.php | 2 +- resources/views/penilai/show.blade.php | 2 +- .../views/surveyor/components/apartemen-kantor.blade.php | 4 ++-- resources/views/surveyor/components/bangunan.blade.php | 4 ++-- resources/views/surveyor/components/tanah.blade.php | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/Http/Controllers/PenilaiController.php b/app/Http/Controllers/PenilaiController.php index 218ad3e..5727369 100644 --- a/app/Http/Controllers/PenilaiController.php +++ b/app/Http/Controllers/PenilaiController.php @@ -1698,7 +1698,7 @@ class PenilaiController extends Controller $permohonan->update([ 'status' => 'revisi-survey', - 'keterangan' => $request->message, + 'keterangan' => $request->keterangan, 'submitted_at' => now() ]); diff --git a/resources/views/penilai/show.blade.php b/resources/views/penilai/show.blade.php index bc12dc9..0e723fa 100644 --- a/resources/views/penilai/show.blade.php +++ b/resources/views/penilai/show.blade.php @@ -694,7 +694,7 @@ url: `/penilai/revisi-surveyor/${dataId}`, type: 'PUT', data: { - message: userMessage + keterangan: userMessage }, success: (response) => { Swal.fire('Berhasil!', response.message, 'success').then( diff --git a/resources/views/surveyor/components/apartemen-kantor.blade.php b/resources/views/surveyor/components/apartemen-kantor.blade.php index 3529e98..1d7a9ed 100644 --- a/resources/views/surveyor/components/apartemen-kantor.blade.php +++ b/resources/views/surveyor/components/apartemen-kantor.blade.php @@ -61,8 +61,8 @@ value="{{ old('luas_unit_tidak_sesuai', $forminspeksi['luas_unit_tidak_sesuai'] ?? '') }}"> M2
- + {{-- --}}
diff --git a/resources/views/surveyor/components/bangunan.blade.php b/resources/views/surveyor/components/bangunan.blade.php index e47c164..ee656a3 100644 --- a/resources/views/surveyor/components/bangunan.blade.php +++ b/resources/views/surveyor/components/bangunan.blade.php @@ -68,10 +68,10 @@ value="{{ old('luas_tanah_bagunan_tidak_sesuai', $forminspeksi['bangunan']['luas_tanah_bagunan']['tidak sesuai'] ?? '') }}"> - + --}} diff --git a/resources/views/surveyor/components/tanah.blade.php b/resources/views/surveyor/components/tanah.blade.php index a2cb070..3e856f6 100644 --- a/resources/views/surveyor/components/tanah.blade.php +++ b/resources/views/surveyor/components/tanah.blade.php @@ -57,9 +57,9 @@ value="{{ old('luas_tanah_tidak_sesuai', $forminspeksi['tanah']['luas_tanah']['tidak sesuai'] ?? '') }}"> - + --}} @@ -191,7 +191,7 @@ @if (strcasecmp($item->name, 'Lebih Tinggi') == 0) @elseif (strcasecmp($item->name, 'Lebih Rendah') == 0)
Informasi Dinas Tata Ruang + Informasi Dinas Tata Ruang : @php $informasi = [ 'peruntukan', @@ -44,8 +45,9 @@
Catatan yang Perlu Diperhatikan + Catatan yang Perlu Diperhatikan : @foreach ($forminspeksi['fakta']['keterangan'] ?? [] as $informasi)

{!! nl2br(e($informasi)) !!}

diff --git a/resources/views/surveyor/components/print-out/lingkungan.blade.php b/resources/views/surveyor/components/print-out/lingkungan.blade.php index d717e68..715cd1b 100644 --- a/resources/views/surveyor/components/print-out/lingkungan.blade.php +++ b/resources/views/surveyor/components/print-out/lingkungan.blade.php @@ -1,4 +1,4 @@ -
+
@@ -14,27 +14,24 @@
- - - - - + + + - - - - - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Jarak Jalan Utama{{ $forminspeksi['lingkungan']['jarak_jalan_utama'] ?? '' }}
Jalan Lingkungan{{ $forminspeksi['lingkungan']['jalan_linkungan'] ?? '' }}:{{ $forminspeksi['lingkungan']['jarak_jalan_utama'] ?? '' }} {{ $forminspeksi['lingkungan']['jalan_linkungan'] ?? '' }}
Jarak CBD Point{{ $forminspeksi['lingkungan']['jarak_cbd_point'] ?? '' }}
Nama CBD Point{{ $forminspeksi['lingkungan']['nama_cbd_point'] ?? '' }}:{{ $forminspeksi['lingkungan']['jarak_cbd_point'] ?? '' }} {{ $forminspeksi['lingkungan']['nama_cbd_point'] ?? '' }}
Lebar Perkerasan Jalan: {{ $forminspeksi['lingkungan']['lebar_perkerasan_jalan'] ?? '' }}
Perkerasan JalanPerkerasan Jalan: @if (isset($basicData['perkerasanJalan'])) @@ -59,7 +56,8 @@ - + + - + + - - - + + + - - - - - + -
Lalu Lintas Depan LokasiLalu Lintas Depan Lokasi: @if (isset($basicData['laluLintasLokasi'])) @@ -84,7 +82,8 @@ - + + - - - -
Golongan Masyarakat SekitarGolongan Masyarakat Sekitar: @if (isset($basicData['golMasySekitar'])) @@ -109,7 +108,34 @@ - + + + + + + + + - - - - - + +
Tingkat KeramaianTingkat Keramaian: + @if (isset($basicData['tingkatKeramaian'])) + + + @foreach ($basicData['tingkatKeramaian'] as $index => $item) + @if ($index % 3 == 0 && $index > 0) + + + @endif + + @endforeach + +
+ +
+ @endif +
Terletak Di Area: @if (isset($basicData['terletakDiArea'])) @@ -122,7 +148,7 @@ @@ -134,32 +160,8 @@ - - - - - - + + - + + - + + - + + + - + + - - - +
Terletak di Daerah - @if (isset($basicData['terletakDiArea'])) - - - @foreach ($basicData['terletakDiArea'] as $index => $item) - @if ($index % 3 == 0 && $index > 0) - - - @endif - - @endforeach - -
- -
- @endif -
Disekitar LokasiDisekitar Lokasi:
Dekat MakamDekat Makam:
Dekat TPSDekat TPS:
Dekat LainnyaDekat Lainnya:{{ $forminspeksi['lingkungan']['dekat_lainnya'] ?? '' }}
Merupakan DaerahMerupakan Daerah: @if (isset($basicData['merupakanDaerah'])) @@ -265,8 +273,9 @@ - - + + -
Fasilitas Umum Dekat Lokasi + Fasilitas Umum Dekat Lokasi: @if (isset($basicData['fasilitasObjek'])) diff --git a/resources/views/surveyor/components/print-out/main.blade.php b/resources/views/surveyor/components/print-out/main.blade.php index 8d4df95..f006e40 100644 --- a/resources/views/surveyor/components/print-out/main.blade.php +++ b/resources/views/surveyor/components/print-out/main.blade.php @@ -6,105 +6,96 @@ - Laporan Penilai Jaminan + Hasil Inspeksi @@ -238,18 +175,18 @@ } @endphp - +
@@ -257,7 +194,8 @@
-
- @include('lpj::component.logo-bag') + @include('lpj::component.logo-bag', ['width' => 150, 'height' => 40])
-

Tanggal: {{ date('Y-m-d') }}

-

Waktu: {{ date('H:i:s') }}

-

User: {{ Auth::user()->name }}

+

Tanggal: {{ date('Y-m-d') }}

+

Waktu: {{ date('H:i:s') }}

+

User: {{ Auth::user()->name }}

+
@@ -322,7 +260,8 @@
- +
@@ -332,22 +271,16 @@
- +
- + + +
- - - - - - - -
Nama:{{ $permohonan->debiture->name ?? '' }}
-
Nama:{{ $permohonan->debiture->name ?? '' }}
- +
@@ -357,65 +290,53 @@
- +
- + + - + + + + + + @php + $statusKey = isset($forminspeksi['asset']['hub_cadeb_penghuni']['sesuai']) + ? 'sesuai' + : 'tidak sesuai'; + $selectedData = $forminspeksi['asset']['hub_cadeb_penghuni'][$statusKey] ?? null; + @endphp + + + + @endif - {{-- end hub --}} - - - @php - $statusKey = isset($forminspeksi['asset']['hub_cadeb_penghuni']['sesuai']) ? 'sesuai' : 'tidak sesuai'; - $selectedData = $forminspeksi['asset']['hub_cadeb_penghuni'][$statusKey] ?? null; - @endphp - - - - -
- - - @php - $statusKey = isset($forminspeksi['asset']['jenis_asset']['sesuai']) - ? 'sesuai' - : 'tidak sesuai'; - $selectedData = $forminspeksi['asset']['jenis_asset'][$statusKey] ?? null; - @endphp - - - - - -
Jenis Aset: - {{ $selectedData ?? '' }} -
+ @php + $statusKey = isset($forminspeksi['asset']['jenis_asset']['sesuai']) + ? 'sesuai' + : 'tidak sesuai'; + $selectedData = $forminspeksi['asset']['jenis_asset'][$statusKey] ?? null; + @endphp +
Jenis Aset: + {{ $selectedData ?? '' }}
- + + +
Alamat: + - - - + + + + + + + + + + + + + + + + + +
Alamat: - - - - - - - - - - - - - - - - - - - - - -
Terletak di {{ $alamat['address'] ?? '' }}
Kelurahan{{ $alamat['village_code'] ?? '' }}
Kecamatan{{ $alamat['district_code'] ?? '' }}
Kotamadya {{ $alamat['city_code'] ?? '' }}
Propinsi{{ $alamat['province_code'] ?? '' }}
-
Terletak di {{ $alamat['address'] ?? '' }}
Kelurahan{{ $alamat['village_code'] ?? '' }}
Kecamatan{{ $alamat['district_code'] ?? '' }}
Kotamadya {{ $alamat['city_code'] ?? '' }}
Propinsi{{ $alamat['province_code'] ?? '' }}
- +
@@ -426,26 +347,20 @@
- +
- + +
- - - - - - - -
Titik Kordinat: - {{ isset($forminspeksi['asset']['kordinat_lat']) ? $forminspeksi['asset']['kordinat_lat'] : '' }} - , - {{ isset($forminspeksi['asset']['kordinat_lng']) ? $forminspeksi['asset']['kordinat_lng'] : '' }} -
+
Titik Kordinat: + {{ isset($forminspeksi['asset']['kordinat_lat']) ? $forminspeksi['asset']['kordinat_lat'] : '' }} + , + {{ isset($forminspeksi['asset']['kordinat_lng']) ? $forminspeksi['asset']['kordinat_lng'] : '' }}
- - +
+
@@ -457,136 +372,117 @@
- - + @endfor + @endif + +
- - @if (@isset($dokumen)) - @foreach ($dokumen->detail as $detail) - @if (isset($detail->dokumen_jaminan)) - - - {{-- --}} - + + {{-- --}} + + + @endif + + @if (isset($detail->details)) + @if (json_decode($detail->details)) + @foreach (json_decode($detail->details) as $key => $value) + @if (!is_null($value) && $value !== '') + + + + @endif - - @if (isset($detail->details)) - @if (json_decode($detail->details)) - @foreach (json_decode($detail->details) as $key => $value) - @if (!is_null($value) && $value !== '') - - - {{-- --}} - - - @endif - @endforeach - @endif - @endif @endforeach @endif + @endif + @endforeach + @endif - - @php - // Ambil nilai hub_cadeb langsung - $hubCadeb = isset($forminspeksi['asset']['hub_cadeb']) - ? $forminspeksi['asset']['hub_cadeb'] - : null; - // Jika nilai adalah array dengan key 'sesuai', ambil nilainya - if (is_array($hubCadeb) && isset($hubCadeb['sesuai'])) { - $hubCadeb = $hubCadeb['sesuai']; - } - @endphp - - {{-- --}} -
{{ $detail->name ?? '' }}: - @if (isset($detail->dokumen_jaminan)) - @php - $dokumen_jaminan = is_array(json_decode($detail->dokumen_jaminan)) - ? json_decode($detail->dokumen_jaminan) - : [$detail->dokumen_jaminan]; - $dokumen_nomor = is_array(json_decode($detail->dokumen_nomor)) - ? json_decode($detail->dokumen_nomor) - : ($detail->dokumen_nomor - ? [$detail->dokumen_nomor] - : []); - @endphp - @foreach ($dokumen_jaminan as $index => $dokumen) -
- @if (!empty($dokumen_nomor[$index])) - {{ $dokumen_nomor[$index] }} - @endif -
- @endforeach + @if (@isset($dokumen)) + @foreach ($dokumen->detail as $detail) + @if (isset($detail->dokumen_jaminan)) +
{{ $detail->name ?? '' }}:
+ {{ formatLabel($key) }} + : + {{ $value }} + @if ($key == 'luas_bangunan' || $key == 'luas_tanah') + m2 @endif
- {{ ucwords(str_replace('_', ' ', $key)) ?? '' }} - : - {{ $value }} - @if ($key == 'luas_bangunan' || $key == 'luas_tanah') - m2 - @endif -
Hubungan Pemilik Jaminan dengan Debitur - : - @if (isset($basicData['hubCadeb'])) - - @php $count = 0; @endphp - - @foreach ($basicData['hubCadeb'] as $item) - - @php $count++; @endphp + + @php + // Ambil nilai sesuai dan tidak sesuai + $hubCadebSesuai = $forminspeksi['asset']['hub_cadeb']['sesuai'] ?? null; + $hubCadebTidakSesuai = $forminspeksi['asset']['hub_cadeb']['tidak sesuai'] ?? null; + @endphp + + + - - @endif + @if (!empty($basicData['hubCadeb'])) +
- -
Hubungan Pemilik Jaminan dengan Debitur: +
+ + +
- @if ($count % 3 === 0) -
+ + @php $count = 0; @endphp + @foreach ($basicData['hubCadeb'] as $item) + + @php $count++; @endphp + + @if ($count % 3 === 0) + + + @endif @endforeach @if ($count % 3 !== 0) @for ($i = 0; $i < 3 - ($count % 3); $i++) - - @endfor - @endif - -
+ +
-
+
+ @endif +
Hubungan Penghuni Jaminan dengan Debitur: + @if (isset($selectedData)) + {{ $selectedData ?? '' }} +
Hubungan Penghuni Jaminan dengan Debitur - @if (isset($selectedData)) - - - - -
- {{ $selectedData ?? '' }} -
- @endif -
-
+ + + + @if (strtolower($permohonan->tujuanPenilaian->name) == 'rap') @include('lpj::surveyor.components.print-out.rap') @else @@ -614,7 +510,7 @@
- +
- + - - - - - - - - - - - - + - - - + -@isset($forminspeksi['partisi']) - - - - - - - - -@endisset +
@@ -673,7 +569,8 @@ @if (isset($forminspeksi['signature']['debitur'])) @endif diff --git a/resources/views/surveyor/components/print-out/rap.blade.php b/resources/views/surveyor/components/print-out/rap.blade.php index dc53a01..63c12c7 100644 --- a/resources/views/surveyor/components/print-out/rap.blade.php +++ b/resources/views/surveyor/components/print-out/rap.blade.php @@ -1,23 +1,16 @@ +
+
- Debitur/Perwakilan
-
-
+ + - - -
+

+ PERIZINAN +

-
-

- PERIZINAN -

- -
- - - - - - + +
- +
@if (isset($forminspeksi['perizinan']) && is_array($forminspeksi['perizinan']) && count($forminspeksi['perizinan']) > 0) @foreach ($forminspeksi['perizinan'] as $perizinan) @@ -40,27 +33,32 @@ @endif
-
- F - - DESKRIPSI DEVELOPER -
+
+ + + + + +
+

+ DESKRIPSI DEVELOPER +

+ +
-
- + + + + + @@ -68,6 +66,8 @@ @isset($forminspeksi['lainnya_developer']) @foreach ($forminspeksi['lainnya_developer'] as $item) + + @@ -75,45 +75,61 @@ @endforeach @endisset
{!! nl2br(e($forminspeksi['pengalaman_developer'] ?? 'Data tidak tersedia')) !!}Pengalaman Developer & Proyek Yang Pernah + Dibuat:{!! nl2br(e($forminspeksi['pengalaman_developer'] ?? 'Data tidak tersedia')) !!}
Apakah Developer Anggota REI: {!! nl2br(e($forminspeksi['developer_anggota'] ?? 'Data tidak tersedia')) !!}
Lainnya: {!! nl2br(e($item)) !!}
-
- G - - KONDISI, LINGKUNGAN DAN PROGRESS PEMBANGUNAN -
+
+ - - + + +
+
+

+ KONDISI, LINGKUNGAN DAN PROGRESS PEMBANGUNAN +

+ +
+ + + + + + + + + + + + + + + + @@ -121,6 +137,8 @@ @isset($forminspeksi['lainnya_kondisi']) @foreach ($forminspeksi['lainnya_kondisi'] as $item) + + @@ -128,354 +146,352 @@ @endforeach @endisset
Kapan Mulai Dibangun & Target Penyelesaian + : {!! nl2br(e($forminspeksi['kapan_mulai_dibangun'] ?? 'Data tidak tersedia')) !!}
Kondisi Perumahan Saat Ini: {!! nl2br(e($forminspeksi['kondisi_perumahan'] ?? 'Data tidak tersedia')) !!}
Progress Pembangunan: {!! nl2br(e($forminspeksi['progres_pembangunan'] ?? 'Data tidak tersedia')) !!}
Kontraktor (internal/eksternal): {!! nl2br(e($forminspeksi['kontraktor'] ?? 'Data tidak tersedia')) !!}
Lingkungan Sekitar: {!! nl2br(e($forminspeksi['lingkungan_sekitar'] ?? 'Data tidak tersedia')) !!}
Komplek Lain Disekitar Lokasi: {!! nl2br(e($forminspeksi['komplek_disekitar'] ?? 'Data tidak tersedia')) !!}
Pusat Keramaian Dekat Lokasi: {!! nl2br(e($forminspeksi['pusat_keramaian'] ?? 'Data tidak tersedia')) !!}
Transportasi Umum Yang Tersedia: {!! nl2br(e($forminspeksi['transportasi_umum'] ?? 'Data tidak tersedia')) !!}
Lainnya: {!! nl2br(e($item)) !!}
-
- H - - PARTISI BANGUNAN -
- +
+ @isset($forminspeksi['partisi']) + -
- @if (is_array($forminspeksi['partisi'])) - @foreach ($forminspeksi['partisi'] as $key => $item) - @if (is_array($item)) - - - - - - + + + +
- {{ $item['nama'] ?? '' }} -
- {{ $item['value'] ?? '' }} -
+

+ PARTISI BANGUNAN +

+ +
+ + @if (is_array($forminspeksi['partisi'])) + @foreach ($forminspeksi['partisi'] as $key => $item) + @if (is_array($item)) + + + + + + @endif + @endforeach @endif - @endforeach - @endif -
+ {{ $item['nama'] ?? '' }} + : + {{ $item['value'] ?? '' }} +
-
+ @endisset +
+
+ @isset($forminspeksi['jumlah_unit']) -@isset($forminspeksi['jumlah_unit']) -
- I - - JUMLAH UNIT, BLOK, TYPE DAN LUAS BANGUNAN -
- - - - - -@endisset -@isset($forminspeksi['batas_batas_perumahan']) - - - - - - - - -@endisset - -@isset($forminspeksi['fasus_fasum']) - - - - - - - - -@endisset -@isset($forminspeksi['progres_penjualan']) - - - - - - - - -@endisset -@isset($forminspeksi['harga_unit']) - - - - - - - - - -@endisset -@isset($forminspeksi['target_market']) - - - - - - - - -@endisset -@isset($forminspeksi['kerjasama_dengan_bank']) - - - - - - - - - -@endisset -@isset($forminspeksi['rute_menuju_lokasi']) - - - - - - - - -@endisset -@isset($forminspeksi['properti_sejenis']) - - - - - - - - -@endisset -@if (isset($forminspeksi['fakta']) && is_array($forminspeksi['fakta'])) - - - - - - - - +
- - - - @foreach ($forminspeksi['jumlah_unit'] as $item) - - @endforeach -
- {!! nl2br(e($item)) !!} + +

+ JUMLAH UNIT, BLOK, TYPE DAN LUAS BANGUNAN +

+
-
- J - - BATAS-BATAS PERUMAHAN -
- - - - @foreach ($forminspeksi['batas_batas_perumahan'] as $item) - - - - @endforeach -
- {!! nl2br(e($item)) !!} -
-
- J - - FASOS/FASUM -
- - - - @foreach ($forminspeksi['fasus_fasum'] as $item) - - - - @endforeach -
- {!! nl2br(e($item)) !!} -
-
- K - - PROGRES PENJUALAN SAAT INI -
- - - - @foreach ($forminspeksi['progres_penjualan'] as $item) - - - - @endforeach -
- {!! nl2br(e($item)) !!} -
-
- L - - HARGA UNIT -
- - - - @foreach ($forminspeksi['harga_unit'] as $item) - - - - @endforeach -
- {!! nl2br(e($item)) !!} -
-
- M - - TARGET MARKET -
- - - - @foreach ($forminspeksi['target_market'] as $item) - - - - @endforeach -
- {!! nl2br(e($item)) !!} -
-
- N - - KERJASAMA DENGAN BANK LAIN -
- - - - @foreach ($forminspeksi['kerjasama_dengan_bank'] as $item) - - - - @endforeach -
- {!! nl2br(e($item)) !!} -
-
- O - - RUTE MENUJU LOKASI -
- - - - - - - -
- {{ $forminspeksi['rute_menuju_lokasi'] ?? '' }} -
-
- P - - PROPERTI SEJENIS -
- - - - - - - -
- {{ $forminspeksi['properti_sejenis'] ?? '' }} -
-
- Q - - ATURAN TATA KOTA -
- - - - @php - $informasi = [ - 'peruntukan', - 'kdb', - 'kdh', - 'gsb', - 'max_lantai', - 'klb', - 'gss', - 'pelebaran_jalan', - 'nama_petugas', - ]; - @endphp - - @if (isset($forminspeksi['fakta']) && is_array($forminspeksi['fakta'])) - @foreach ($informasi as $key) - @if (isset($forminspeksi['fakta'][$key]) && $forminspeksi['fakta'][$key] !== '-') -

- {{ ucfirst(str_replace('_', ' ', $key)) }}: - {{ $forminspeksi['fakta'][$key] }}

- @endif +
+ + @foreach ($forminspeksi['jumlah_unit'] as $item) + + + @endforeach - @endif -
+ {!! nl2br(e($item)) !!} +
-
-@endif + @endisset + -@isset($forminspeksi['fakta']['keterangan']) +
+ @isset($forminspeksi['batas_batas_perumahan']) -
- R - - CATATAN LAINNYA -
+ - - - + +
- - @foreach ($forminspeksi['fakta']['keterangan'] ?? [] as $keterangan) - - - - @endforeach -
-

{!! nl2br(e($keterangan)) !!}

-
-
+

+ BATAS-BATAS PERUMAHAN +

-@endisset -
- +
+ + @foreach ($forminspeksi['batas_batas_perumahan'] as $item) + + + + @endforeach +
+ {!! nl2br(e($item)) !!} +
+ @endisset + + +
+ @isset($forminspeksi['fasus_fasum']) + + + + + +
+

+ FASOS/FASUM +

+ +
+ + @foreach ($forminspeksi['fasus_fasum'] as $item) + + + + @endforeach +
+ {!! nl2br(e($item)) !!} +
+ @endisset +
+ +
+ @isset($forminspeksi['progres_penjualan']) + + + + + +
+

+ PROGRES PENJUALAN SAAT INI +

+ +
+ + + @foreach ($forminspeksi['progres_penjualan'] as $item) + + + + @endforeach +
+ {!! nl2br(e($item)) !!} +
+ @endisset +
+ +
+ @isset($forminspeksi['harga_unit']) + + + + + +
+

+ HARGA UNIT +

+ +
+ < + @foreach ($forminspeksi['harga_unit'] as $item) + + + + @endforeach +
+ {!! nl2br(e($item)) !!} +
+ @endisset +
+
+ @isset($forminspeksi['target_market']) + + + + + +
+

+ TARGet market +

+ +
+ + @foreach ($forminspeksi['target_market'] as $item) + + + + @endforeach +
+ {!! nl2br(e($item)) !!} +
+ @endisset +
+ +
+ @isset($forminspeksi['kerjasama_dengan_bank']) + + + + + +
+

+ Kerjasama dengan bank lain +

+ +
+ + @foreach ($forminspeksi['kerjasama_dengan_bank'] as $item) + + + + @endforeach +
+ {!! nl2br(e($item)) !!} +
+ + @endisset +
+ +
+ @isset($forminspeksi['rute_menuju_lokasi']) + + + + + +
+

+ rute menuju lokasi +

+ +
+ + + + + +
+ {{ $forminspeksi['rute_menuju_lokasi'] ?? '' }} +
+ @endisset +
+
+ @isset($forminspeksi['properti_sejenis']) + + + + + +
+

+ properti sejenis +

+ +
+ + + + + + +
+ {{ $forminspeksi['properti_sejenis'] ?? '' }} +
+ @endisset +
+ +
+ @if (isset($forminspeksi['fakta']) && is_array($forminspeksi['fakta'])) + + + + + + +
+

+ ATURAN TATA KOTA +

+ +
+ + @php + $informasi = [ + 'peruntukan', + 'kdb', + 'kdh', + 'gsb', + 'max_lantai', + 'klb', + 'gss', + 'pelebaran_jalan', + 'nama_petugas', + ]; + @endphp + + @if (isset($forminspeksi['fakta']) && is_array($forminspeksi['fakta'])) + @foreach ($informasi as $key) + @if (isset($forminspeksi['fakta'][$key]) && $forminspeksi['fakta'][$key] !== '-') + @php + $displayKey = ucfirst(str_replace('_', ' ', $key)); + if (strlen($key) == 3) { + $displayKey = strtoupper($key); + } + @endphp +

- {{ $displayKey }}: {{ $forminspeksi['fakta'][$key] }}

+ @endif + @endforeach + @endif +
+ + @endif +
+ +
+ @isset($forminspeksi['fakta']['keterangan']) + + + + + + + +
+

+ CATATAN LAINNYA +

+ +
+ + @foreach ($forminspeksi['fakta']['keterangan'] ?? [] as $keterangan) + + + + @endforeach +
+

{!! nl2br(e($keterangan)) !!}

+
+ + @endisset +
diff --git a/resources/views/surveyor/components/print-out/tanah.blade.php b/resources/views/surveyor/components/print-out/tanah.blade.php index 250f47a..7d789c8 100644 --- a/resources/views/surveyor/components/print-out/tanah.blade.php +++ b/resources/views/surveyor/components/print-out/tanah.blade.php @@ -1,61 +1,115 @@ +
+ -
-
+ + + + +
+

+ ANalisa Tanah +

+
-
-

- ANalisa Tanah -

-
+ + + @php -
- - @php - $cekLuas = isset( - $forminspeksi['tanah']['luas_tanah']['tidak sesuai'], - ) - ? 'tidak sesuai' - : 'sesuai'; + $cekLuas = + old('luas_tanah_radio') ?? + (isset($forminspeksi['tanah']['luas_tanah']['tidak sesuai']) ? 'tidak sesuai' : 'sesuai'); - $luas = $forminspeksi['tanah']['luas_tanah'][$cekLuas] ?? null; - @endphp - - - + $luasSesuai = $forminspeksi['tanah']['luas_tanah']['sesuai'] ?? null; + $luasTidakSesuai = $forminspeksi['tanah']['luas_tanah']['tidak sesuai'] ?? null; + @endphp + + + + - - - + + + + + + + + + + - + + - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@endforeach - -
Luas Tanah{{ $luas }}
Luas Tanah: + + + + + + + +
+ +
+ +
+
Hadap mata Angin -
Hadap mata Angin: + - + +
Bentuk Tanah: + @if (isset($basicData['bentukTanah'])) + + + @foreach ($basicData['bentukTanah'] as $index => $item) + @if ($index % 3 == 0 && $index > 0) + + @endif - - + + @endforeach + +
+ +
+ @endif +
Bentuk TanahKontur Tanah: - @if (isset($basicData['bentukTanah'])) + @if (isset($basicData['konturTanah'])) - @foreach ($basicData['bentukTanah'] as $index => $item) + @foreach ($basicData['konturTanah'] as $index => $item) @if ($index % 3 == 0 && $index > 0) @@ -63,177 +117,195 @@ -@endforeach - -
-@endif -
Kontur Tanah - @if (isset($basicData['konturTanah'])) - - - @foreach ($basicData['konturTanah'] as $index => $item) - @if ($index % 3 == 0 && $index > 0) - - - @endif - -@endforeach - -
- -
-@endif -
Beda Ketinggian Dengan Jalan - @if (isset($basicData['ketinggianTanah'])) - - - @foreach ($basicData['ketinggianTanah'] as $index => $item) - @if ($index % 3 == 0 && $index > 0) - - - @endif - -@endforeach - -
- -
-@endif -
Hadap mata Angin - - - -
Posisi Kavling - @if (isset($basicData['posisiKavling'])) - - - @foreach ($basicData['posisiKavling'] as $index => $item) - @if ($index % 3 == 0 && $index > 0) - - - @endif - -@endforeach - -
- -
-@endif -
Kondisi Fisik Tanah - @if (isset($basicData['kondisiFisikTanah'])) - - - @foreach ($basicData['kondisiFisikTanah'] as $index => $item) - @if ($index % 3 == 0 && $index > 0) - - + @endforeach + +
@endif -
- -
-@endif -
Tusuk Sate -
Beda Ketinggian Dengan Jalan: + @if (isset($basicData['ketinggianTanah'])) + + + @foreach ($basicData['ketinggianTanah'] as $index => $item) + @if ($index % 3 == 0 && $index > 0) + + @endif - - + + @endforeach + +
+ +
+ @endif
Lockland - - -
+
Kontur Jalan Depan Objek: + + + + + + + + + + +
+ +
+ +
+ +
+ +
Posisi Kavling: + @if (isset($basicData['posisiKavling'])) + + + @foreach ($basicData['posisiKavling'] as $index => $item) + @if ($index % 3 == 0 && $index > 0) + + + @endif + + @endforeach + +
+ +
+ @endif +
Tusuk Sate: + + + + + + + +
+ +
+ +
+
Lockland: + + + + + + + + +
+ +
+ +
+ + +
Kondisi Fisik Tanah: + @if (isset($basicData['kondisiFisikTanah'])) + + + @foreach ($basicData['kondisiFisikTanah'] as $index => $item) + @if ($index % 3 == 0 && $index > 0) + + + @endif + + @endforeach + +
+ +
+ @endif +
From 69e888c6d40d871b7d58faf7534c33a5a169e3f7 Mon Sep 17 00:00:00 2001 From: majid Date: Fri, 7 Mar 2025 10:11:26 +0700 Subject: [PATCH 2/5] 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 @@ From 3e6613f955eee590c598e105efb6b4b655bc97ea Mon Sep 17 00:00:00 2001 From: majid Date: Fri, 7 Mar 2025 10:46:24 +0700 Subject: [PATCH 3/5] fix(penilai): print out laporan --- app/Http/Controllers/SurveyorController.php | 4 +- .../print-out-call-report.blade.php | 2 +- .../components/print-out-rap.blade.php | 9 +- .../components/print-out-sederhana.blade.php | 4 +- .../components/print-out-standard.blade.php | 4 +- .../penilai/components/print-resume.blade.php | 2 +- resources/views/penilai/show.blade.php | 145 ++++++++++-------- .../components/data-pembanding.blade.php | 23 ++- .../surveyor/components/informasi.blade.php | 21 +++ .../pembanding-tanah-bangunan-unit.blade.php | 4 +- 10 files changed, 134 insertions(+), 84 deletions(-) diff --git a/app/Http/Controllers/SurveyorController.php b/app/Http/Controllers/SurveyorController.php index b8c2d97..69c3653 100644 --- a/app/Http/Controllers/SurveyorController.php +++ b/app/Http/Controllers/SurveyorController.php @@ -1472,8 +1472,8 @@ class SurveyorController extends Controller 'dokument_id' => 'required', 'name_foto_objek' => 'nullable|string', 'nomor_registrasi' => 'required|string', - 'foto_objek' => 'nullable|image|max:'.$maxSize, - 'foto_objek_pembanding.*' => 'nullable|image|max:'.$maxSize, + 'foto_objek' => 'nullable|jpeg|png|jpg|gif|svg|max:'.$maxSize, + 'foto_objek_pembanding.*' => 'nullable|jpeg|png|jpg|gif|svg|max:'.$maxSize, ]); $tanahBangunanTypes = ['KAPAL', 'PESAWAT', 'KENDARAAN', 'ALAT BERAT', 'MESIN']; diff --git a/resources/views/penilai/components/print-out-call-report.blade.php b/resources/views/penilai/components/print-out-call-report.blade.php index 4d806e3..439ffb9 100644 --- a/resources/views/penilai/components/print-out-call-report.blade.php +++ b/resources/views/penilai/components/print-out-call-report.blade.php @@ -138,7 +138,7 @@ @foreach (json_decode($detail->details) as $key => $value) @if (!is_null($value) && $value !== '') - + + {{formatLabel($key)}}

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

{{ $item['description'] }}

@endisset

- Jaminan + STATUS KEPEMILIKAN, HUBUNGAN DAN PENGHUNI

{{ ucwords(str_replace('_', ' ', $key)) ?? '' }} {{formatLabel($key)}} : {{ $value }} @if ($key == 'luas_bangunan' || $key == 'luas_tanah') diff --git a/resources/views/penilai/components/print-out-rap.blade.php b/resources/views/penilai/components/print-out-rap.blade.php index 770745e..eba779f 100644 --- a/resources/views/penilai/components/print-out-rap.blade.php +++ b/resources/views/penilai/components/print-out-rap.blade.php @@ -175,7 +175,7 @@ @if (!is_null($value) && $value !== '')
- {{ ucwords(str_replace('_', ' ', $key)) ?? '' }} + {{formatLabel($key)}} : @@ -570,9 +570,9 @@ PETA -
+
@php - $fotoTypes = ['foto_gistaru', 'foto_bhumi', 'foto_argis_region', 'foto_tempat']; + $fotoTypes = ['upload_gs','foto_sentuh_tanahku','foto_gistaru', 'foto_bhumi', 'foto_argis_region', 'foto_tempat']; // Memindahkan foto_tempat ke depan jika ada if (($key = array_search('foto_tempat', $fotoTypes)) !== false) { unset($fotoTypes[$key]); @@ -607,9 +607,8 @@
+
- -
diff --git a/resources/views/penilai/components/print-out-sederhana.blade.php b/resources/views/penilai/components/print-out-sederhana.blade.php index 4f69b77..931d77c 100644 --- a/resources/views/penilai/components/print-out-sederhana.blade.php +++ b/resources/views/penilai/components/print-out-sederhana.blade.php @@ -197,7 +197,7 @@ @if (!is_null($value) && $value !== '')
- {{ ucwords(str_replace('_', ' ', $key)) ?? '' }} + {{formatLabel($key)}} : @@ -1095,7 +1095,7 @@
@php - $fotoTypes = ['foto_gistaru', 'foto_bhumi', 'foto_argis_region', 'foto_tempat', 'foto_sentuh_tanahku']; + $fotoTypes = ['upload_gs','foto_sentuh_tanahku','foto_gistaru', 'foto_bhumi', 'foto_argis_region', 'foto_tempat']; // Memindahkan foto_tempat ke depan jika ada if (($key = array_search('foto_tempat', $fotoTypes)) !== false) { unset($fotoTypes[$key]); diff --git a/resources/views/penilai/components/print-out-standard.blade.php b/resources/views/penilai/components/print-out-standard.blade.php index 30a2f34..b480c2d 100644 --- a/resources/views/penilai/components/print-out-standard.blade.php +++ b/resources/views/penilai/components/print-out-standard.blade.php @@ -202,7 +202,7 @@ @foreach (json_decode($detail->details) as $key => $value) @if (!is_null($value) && $value !== '')
- {{ ucwords(str_replace('_', ' ', $key)) ?? '' }} : {{ $value }} @if ($key == 'luas_bangunan' || $key == 'luas_tanah') @@ -562,7 +562,7 @@
@php - $fotoTypes = ['foto_gistaru', 'foto_bhumi', 'foto_argis_region', 'foto_tempat','foto_sentuh_tanahku']; + $fotoTypes = ['upload_gs','foto_sentuh_tanahku','foto_gistaru', 'foto_bhumi', 'foto_argis_region', 'foto_tempat']; // Memindahkan foto_tempat ke depan jika ada if (($key = array_search('foto_tempat', $fotoTypes)) !== false) { unset($fotoTypes[$key]); diff --git a/resources/views/penilai/components/print-resume.blade.php b/resources/views/penilai/components/print-resume.blade.php index 9f08454..1eb9cc0 100644 --- a/resources/views/penilai/components/print-resume.blade.php +++ b/resources/views/penilai/components/print-resume.blade.php @@ -109,7 +109,7 @@ @foreach ($details as $key => $value) @if (!is_null($value) && $value !== '')
{{ ucwords(str_replace('_', ' ', $key)) ?? '' }} {{formatLabel($key)}} : {{ $value }} @if ($key == 'luas_bangunan' || $key == 'luas_tanah') diff --git a/resources/views/penilai/show.blade.php b/resources/views/penilai/show.blade.php index b6eb0e0..bc12dc9 100644 --- a/resources/views/penilai/show.blade.php +++ b/resources/views/penilai/show.blade.php @@ -99,10 +99,15 @@ Status Bayar
- - {{ str_replace('_', ' ', $permohonan->status_bayar) }} - + @if (strtolower($permohonan->tujuanPenilaian->name) == + 'penilaian ulang') + - + @else + + {{ str_replace('_', ' ', $permohonan->status_bayar) }} + + @endif
@@ -190,17 +195,16 @@ @if ($permohonan->status == 'revisi-laporan') -
- -
-

- {{ $permohonan->keterangan ?? '' }} -

+
+ +
+

+ {{ $permohonan->keterangan ?? '' }} +

+
-
- @endif
@@ -226,7 +230,8 @@ Kertas Kerja @endif - + Paparan @@ -295,9 +300,6 @@ @endif - @endif - - {{-- @if ($permohonan->penilaian->jenis_penilaian_id == 2 && $permohonan->tujuanPenilaian->id == 4) --}} + @endif + + {{-- @if ($permohonan->penilaian->jenis_penilaian_id == 2 && $permohonan->tujuanPenilaian->id == 4) --}} + {{-- @endif --}} @@ -319,8 +325,8 @@
@if (isset($permohonan->penilai) && isset($permohonan->penilai->kertas_kerja) && $permohonan->penilai->kertas_kerja) - Lihat Kertas Kerja - @endif + Lihat Kertas Kerja + @endif
@@ -610,7 +618,8 @@ confirmButtonText: 'Yes' }).then((result) => { if (result.isConfirmed) { - window.location.href = `/penilai/${permohonanId}/edit?document_id=${documentId}&inspeksi_id=${inspeksiId}&jaminanId=${jaminanId}`; + window.location.href = + `/penilai/${permohonanId}/edit?document_id=${documentId}&inspeksi_id=${inspeksiId}&jaminanId=${jaminanId}`; } }); } @@ -635,7 +644,7 @@ // window.location.reload(); hideLoadingSwal(); toastrSuccessBuild(response.message); - }else{ + } else { // hideLoadingSwal(); Swal.fire('Perhatian!', response.message, 'warning'); } @@ -658,52 +667,52 @@ function revisiSurveyor(dataId, debitur, noreg) { - Swal.fire({ - title: 'Apakah Anda yakin?', - text: `Untuk melakukan Revisi nomor registrasi ${noreg} atas nama debiture ${debitur} !`, - icon: 'warning', - input: 'textarea', - inputLabel: 'Keterangan', - inputPlaceholder: 'Masukkan keterangan...', - inputAttributes: { - 'aria-label': 'Masukkan keterangan' + Swal.fire({ + title: 'Apakah Anda yakin?', + text: `Untuk melakukan Revisi nomor registrasi ${noreg} atas nama debiture ${debitur} !`, + icon: 'warning', + input: 'textarea', + inputLabel: 'Keterangan', + inputPlaceholder: 'Masukkan keterangan...', + inputAttributes: { + 'aria-label': 'Masukkan keterangan' + }, + showCancelButton: true, + confirmButtonColor: '#3085d6', + cancelButtonColor: '#d33', + confirmButtonText: 'Ya, Lanjutkan!', + cancelButtonText: 'Batal', + }).then((result) => { + if (result.isConfirmed) { + const userMessage = result.value || ''; + $.ajaxSetup({ + headers: { + 'X-CSRF-TOKEN': '{{ csrf_token() }}' }, - showCancelButton: true, - confirmButtonColor: '#3085d6', - cancelButtonColor: '#d33', - confirmButtonText: 'Ya, Lanjutkan!', - cancelButtonText: 'Batal', - }).then((result) => { - if (result.isConfirmed) { - const userMessage = result.value || ''; - $.ajaxSetup({ - headers: { - 'X-CSRF-TOKEN': '{{ csrf_token() }}' - }, - }); - $.ajax({ - url: `/penilai/revisi-surveyor/${dataId}`, - type: 'PUT', - data: { - message: userMessage - }, - success: (response) => { - Swal.fire('Berhasil!', response.message , 'success').then( + }); + $.ajax({ + url: `/penilai/revisi-surveyor/${dataId}`, + type: 'PUT', + data: { + message: userMessage + }, + success: (response) => { + Swal.fire('Berhasil!', response.message, 'success').then( () => { - window.location.href = - '{{ route('penilai.index') }}'; - }); - console.log(response); - }, - error: (error) => { - console.error('Error:', error); - Swal.fire('Gagal!', 'Terjadi kesalahan saat melakukan Revisi.', - 'error'); - } - }); + window.location.href = + '{{ route('penilai.index') }}'; + }); + console.log(response); + }, + error: (error) => { + console.error('Error:', error); + Swal.fire('Gagal!', 'Terjadi kesalahan saat melakukan Revisi.', + 'error'); } }); } + }); + } @include('lpj::surveyor.js.utils') diff --git a/resources/views/surveyor/components/data-pembanding.blade.php b/resources/views/surveyor/components/data-pembanding.blade.php index 786d568..cbc47ab 100644 --- a/resources/views/surveyor/components/data-pembanding.blade.php +++ b/resources/views/surveyor/components/data-pembanding.blade.php @@ -356,9 +356,30 @@ if (preview) { preview.id = newImageId; preview.src = ''; + preview.accept = ".jpg,.jpeg,.png"; preview.classList.add('hidden'); input.onchange = function() { - previewImage(this, newImageId); + const file = this.files[0]; + if (file) { + const validExtensions = ['image/jpeg', 'image/png', 'image/gif', + 'image/webp' + ]; + if (validExtensions.includes(file.type)) { + previewImage(this, newImageId); + } else { + Swal.fire({ + icon: 'error', + title: 'Format Tidak Didukung', + text: 'Hanya file gambar dengan format JPG, PNG, GIF, atau WEBP yang diperbolehkan.', + position: 'top-end', + toast: true, + showConfirmButton: false, + timer: 3000, + timerProgressBar: true + }); + this.value = ''; + } + } }; } } diff --git a/resources/views/surveyor/components/informasi.blade.php b/resources/views/surveyor/components/informasi.blade.php index 077c4f2..cfd19f4 100644 --- a/resources/views/surveyor/components/informasi.blade.php +++ b/resources/views/surveyor/components/informasi.blade.php @@ -115,6 +115,27 @@ @endforeach @endif +
+ +
+ +
+ + + Foto Gs + +
+
+
+
@@ -75,7 +75,7 @@
-