diff --git a/app/Http/Controllers/SurveyorController.php b/app/Http/Controllers/SurveyorController.php index 31e0f55..67e7e5b 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', ]; @@ -966,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, @@ -985,7 +989,9 @@ class SurveyorController extends Controller SendJadwalKunjunganEmailJob::dispatch($emailData); - + $permohonan->update([ + 'status' => 'request-jadwal', + ]); $penilaian->update([ @@ -1471,8 +1477,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']; @@ -2106,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')) { @@ -2456,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 ] ]; } @@ -2668,7 +2674,8 @@ class SurveyorController extends Controller 'foto_bhumi', 'foto_argis_region', 'foto_tempat', - 'foto_sentuh_tanahku' + 'foto_sentuh_tanahku', + 'upload_gs' ]; if ($inspeksi) { @@ -3638,7 +3645,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/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
{{ 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 @@
- + Cetak Hasil Inspeksi @@ -345,7 +351,9 @@ REPORT - status == 'proses-paparan' || $permohonan->status == 'proses-laporan' ? 'disabled' : '' }} onclick="revisiSurveyor('{{ $permohonan->id }}', '{{$permohonan->debiture->name }}', '{{$permohonan->nomor_registrasi }}')"> + status == 'proses-paparan' || $permohonan->status == 'proses-laporan' ? 'disabled' : '' }} + onclick="revisiSurveyor('{{ $permohonan->id }}', '{{ $permohonan->debiture->name }}', '{{ $permohonan->nomor_registrasi }}')"> REVISI @@ -407,10 +415,10 @@
@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/registrasi/js/editjs.blade.php b/resources/views/registrasi/js/editjs.blade.php index b005f59..7d0d063 100644 --- a/resources/views/registrasi/js/editjs.blade.php +++ b/resources/views/registrasi/js/editjs.blade.php @@ -200,23 +200,16 @@ }); $('#{{$route[0]}}_jenis_penilaian').on('change', function (e) { + var jenis_penilaian_id = $(this).val(); - var idNya = $('#{{$route[0]}}_jenis_penilaian').find(":selected").val(); - // var textNya = $('#{{$route[0]}}_jenis_penilaian').find(":selected").text(); - - if('1'==idNya) - { + if (jenis_penilaian_id === '1') { // INTERNAL, show region $("#{{ $route[0] }}_div_region").show(); - } - else if('2' == idNya) - { - $("#{{ $route[0] }}_div_region").hide(); - } - else if('0' == idNya) - { - // selain INTERNAL, hide region + $("#jenis_laporan").val('sederhana'); + } else { + // For all other cases, hide region $("#{{ $route[0] }}_div_region").hide(); + $("#jenis_laporan").val('standar'); } }); 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/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/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 @@
-
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 @@

- Jaminan + STATUS KEPEMILIKAN, HUBUNGAN DAN PENGHUNI

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({