fix(penilai): print out laporan
This commit is contained in:
@@ -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'];
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
@foreach (json_decode($detail->details) as $key => $value)
|
||||
@if (!is_null($value) && $value !== '')
|
||||
<tr>
|
||||
<td style="padding: 2px;">{{ ucwords(str_replace('_', ' ', $key)) ?? '' }}</td>
|
||||
<td style="padding: 2px;"> {{formatLabel($key)}}</td>
|
||||
<td style=" padding: 2px;">:</td>
|
||||
<td style="">{{ $value }}
|
||||
@if ($key == 'luas_bangunan' || $key == 'luas_tanah')
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
@if (!is_null($value) && $value !== '')
|
||||
<tr>
|
||||
<td style="width: 20%; padding: 2px;">
|
||||
{{ ucwords(str_replace('_', ' ', $key)) ?? '' }}
|
||||
{{formatLabel($key)}}
|
||||
</td>
|
||||
<td style="width: 1%; padding: 2px;">:</td>
|
||||
<td style="width: 79%; padding: 2px;">
|
||||
@@ -570,9 +570,9 @@
|
||||
PETA
|
||||
</h6>
|
||||
</div>
|
||||
<div class="photo-container">
|
||||
<div style="text-align: center">
|
||||
@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 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="page-break"></div>
|
||||
|
||||
|
||||
<div class="section">
|
||||
<div class="judul">
|
||||
<h6 class="border" style="text-align: center">
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
@if (!is_null($value) && $value !== '')
|
||||
<tr>
|
||||
<td style="padding: 2px; vertical-align: top;">
|
||||
{{ ucwords(str_replace('_', ' ', $key)) ?? '' }}
|
||||
{{formatLabel($key)}}
|
||||
</td>
|
||||
<td style="padding: 2px; vertical-align: top;">:</td>
|
||||
<td style="padding: 2px; vertical-align: top;">
|
||||
@@ -1095,7 +1095,7 @@
|
||||
</div>
|
||||
<div class="photo-container">
|
||||
@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]);
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
@foreach (json_decode($detail->details) as $key => $value)
|
||||
@if (!is_null($value) && $value !== '')
|
||||
<td style="width:25%; padding: 2px; vertical-align: top;">
|
||||
{{ ucwords(str_replace('_', ' ', $key)) ?? '' }}</td>
|
||||
{{formatLabel($key)}}</td>
|
||||
<td style="width:1%; padding: 2px; vertical-align: top;">:</td>
|
||||
<td style=" padding: 2px; vertical-align: top;">{{ $value }}
|
||||
@if ($key == 'luas_bangunan' || $key == 'luas_tanah')
|
||||
@@ -562,7 +562,7 @@
|
||||
</table>
|
||||
<div class="photo-container">
|
||||
@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]);
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
@foreach ($details as $key => $value)
|
||||
@if (!is_null($value) && $value !== '')
|
||||
<tr>
|
||||
<td style="">{{ ucwords(str_replace('_', ' ', $key)) ?? '' }}</td>
|
||||
<td style=""> {{formatLabel($key)}}</td>
|
||||
<td style=" padding: 2px;">:</td>
|
||||
<td style="">{{ $value }}
|
||||
@if ($key == 'luas_bangunan' || $key == 'luas_tanah')
|
||||
|
||||
@@ -99,10 +99,15 @@
|
||||
Status Bayar
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<span
|
||||
class="text-md font-bold {{ $permohonan->status_bayar === 'belum_bayar' ? 'text-red-600' : 'text-green-600' }} uppercase">
|
||||
{{ str_replace('_', ' ', $permohonan->status_bayar) }}
|
||||
</span>
|
||||
@if (strtolower($permohonan->tujuanPenilaian->name) ==
|
||||
'penilaian ulang')
|
||||
<span>-</span>
|
||||
@else
|
||||
<span
|
||||
class="text-md font-bold {{ $permohonan->status_bayar === 'belum_bayar' ? 'text-red-600' : 'text-green-600' }} uppercase">
|
||||
{{ str_replace('_', ' ', $permohonan->status_bayar) }}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -190,17 +195,16 @@
|
||||
</div>
|
||||
|
||||
@if ($permohonan->status == 'revisi-laporan')
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Catatan Revisi
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
{{ $permohonan->keterangan ?? '' }}
|
||||
</p>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Catatan Revisi
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
{{ $permohonan->keterangan ?? '' }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
</div>
|
||||
@@ -226,7 +230,8 @@
|
||||
Kertas Kerja
|
||||
</a>
|
||||
@endif
|
||||
<a class="btn btn-primary" onclick="paparan({{ $permohonan->id }}, {{ $dokumen->id }}, {{ $inspeksiId }}, {{ $dokumen->jenis_jaminan_id }})">
|
||||
<a class="btn btn-primary"
|
||||
onclick="paparan({{ $permohonan->id }}, {{ $dokumen->id }}, {{ $inspeksiId }}, {{ $dokumen->jenis_jaminan_id }})">
|
||||
Paparan
|
||||
</a>
|
||||
|
||||
@@ -295,9 +300,6 @@
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
{{-- @if ($permohonan->penilaian->jenis_penilaian_id == 2 && $permohonan->tujuanPenilaian->id == 4) --}}
|
||||
<div class="menu-item">
|
||||
<a class="menu-link"
|
||||
onclick="callReport('{{ $permohonan->id }}', '{{ $dokumen->id }}', '{{ $inspeksiId }}', {{ $dokumen->jenis_jaminan_id }})">
|
||||
@@ -310,6 +312,10 @@
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- @if ($permohonan->penilaian->jenis_penilaian_id == 2 && $permohonan->tujuanPenilaian->id == 4) --}}
|
||||
|
||||
{{-- @endif --}}
|
||||
|
||||
</div>
|
||||
@@ -319,8 +325,8 @@
|
||||
|
||||
<div class="flex justify-end gap-5">
|
||||
|
||||
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => $dokumen->id, 'jenis_jaminan_id' => $dokumen->jenis_jaminan_id]) }}" class="btn btn-light"
|
||||
>
|
||||
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => $dokumen->id, 'jenis_jaminan_id' => $dokumen->jenis_jaminan_id]) }}"
|
||||
class="btn btn-light">
|
||||
<i class="ki-filled ki-printer"></i> Cetak Hasil Inspeksi
|
||||
</a>
|
||||
|
||||
@@ -345,7 +351,9 @@
|
||||
REPORT
|
||||
</a>
|
||||
|
||||
<a class="btn btn-warning" {{ $permohonan->status == 'proses-paparan' || $permohonan->status == 'proses-laporan' ? 'disabled' : '' }} onclick="revisiSurveyor('{{ $permohonan->id }}', '{{$permohonan->debiture->name }}', '{{$permohonan->nomor_registrasi }}')">
|
||||
<a class="btn btn-warning"
|
||||
{{ $permohonan->status == 'proses-paparan' || $permohonan->status == 'proses-laporan' ? 'disabled' : '' }}
|
||||
onclick="revisiSurveyor('{{ $permohonan->id }}', '{{ $permohonan->debiture->name }}', '{{ $permohonan->nomor_registrasi }}')">
|
||||
<i class="ki-filled ki-arrow-circle-right"></i>
|
||||
REVISI
|
||||
</a>
|
||||
@@ -407,10 +415,10 @@
|
||||
</div>
|
||||
<div class="flex justify-between items-center">
|
||||
@if (isset($permohonan->penilai) && isset($permohonan->penilai->kertas_kerja) && $permohonan->penilai->kertas_kerja)
|
||||
<span data-modal-dismiss="true" class="btn btn-warning btn-outline"
|
||||
onclick="viewPDF('{{ Storage::url($permohonan->penilai->kertas_kerja) }}')"><i
|
||||
class="ki-filled ki-eye mr-2"></i>Lihat Kertas Kerja</span>
|
||||
@endif
|
||||
<span data-modal-dismiss="true" class="btn btn-warning btn-outline"
|
||||
onclick="viewPDF('{{ Storage::url($permohonan->penilai->kertas_kerja) }}')"><i
|
||||
class="ki-filled ki-eye mr-2"></i>Lihat Kertas Kerja</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -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');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
@include('lpj::surveyor.js.utils')
|
||||
|
||||
@@ -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 = '';
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,6 +115,27 @@
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
<span class="form-label">Gambar Surat Ukur</span>
|
||||
</label>
|
||||
<div class="input-group w-full flex gap-2">
|
||||
<input class="upload_gs" type="hidden" name="upload_gs" value="upload_gs">
|
||||
<div class="w-full">
|
||||
<input id="inputGistaru" type="file" name="upload_gs"
|
||||
class="file-input file-input-bordered w-full"
|
||||
accept=".jpg,.jpeg,.png,.gif,.bmp,.tiff,.tif,.webp,.svg"
|
||||
onchange="previewImage(this, 'upload-gs-preview')">
|
||||
|
||||
<img id="upload-gs-preview"
|
||||
src="{{ asset('storage/' . (isset($forminspeksi['upload_gs']) ? $forminspeksi['upload_gs'] : '')) }}"
|
||||
alt="Foto Gs" class="mt-2 max-w-full h-auto"
|
||||
style="{{ isset($forminspeksi['upload_gs']) ? '' : 'display: none;' }} max-width: 30rem;" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
<span class="form-label">Sentuh Tanahku</span>
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
@endif
|
||||
<input type="hidden" name="name_foto_objek" class="input"
|
||||
value="{{ $mainPhoto['path'] ?? '' }}">
|
||||
<input type="file" name="foto_objek" class="file-input" accept="image/*"
|
||||
<input type="file" name="foto_objek" class="file-input" accept=".jpg,.jpeg,.png"
|
||||
onchange="previewImage(this, 'uploadedImage1')">
|
||||
|
||||
</div>
|
||||
@@ -75,7 +75,7 @@
|
||||
<td class="px-4 py-2">
|
||||
<div class="flex flex-col gap-2">
|
||||
<img id="uploadedImage2" class="max-w-[200px] hidden" alt="Pembanding Image">
|
||||
<input type="file" name="foto_objek_pembanding[]" class="file-input" accept="image/*"
|
||||
<input type="file" name="foto_objek_pembanding[]" class="file-input" accept=".jpg,.jpeg,.png"
|
||||
onchange="previewImage(this, 'uploadedImage2')">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user