fix(penilai): perbaikan output resume,memo dan update upload foto directory by nomor registrasi

This commit is contained in:
majid
2025-01-22 09:06:10 +07:00
parent d101db1043
commit 575ea3fdce
12 changed files with 440 additions and 271 deletions

View File

@@ -5,22 +5,21 @@
@endsection
@section('content')
<style>
.list-decimal {
list-style-type: decimal;
margin: 0;
padding-left: 1.25rem;
line-height: 1.6;
font-family: Arial, sans-serif;
font-size: 16px;
color: #333333;
}
<style>
.list-decimal {
list-style-type: decimal;
margin: 0;
padding-left: 1.25rem;
line-height: 1.6;
font-family: Arial, sans-serif;
font-size: 16px;
color: #333333;
}
.list-decimal li {
margin-bottom: 0.5rem;
}
</style>
.list-decimal li {
margin-bottom: 0.5rem;
}
</style>
@include('lpj::assetsku.includenya')
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
<form id="formResume" method="POST" class="w-full grid gap-5">
@@ -76,7 +75,7 @@
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Nomor Laporan</label>
<div class="flex flex-wrap items-base line w-full">
<p class="text-2sm text-gray-700">{{ $permohonan->nomor_registrasi }}</p>
<p class="text-2sm text-gray-700">{{ $nomorLaporan ?? '' }}</p>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
@@ -87,6 +86,14 @@
@endif
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Tanggal Resume</label>
<div class="flex flex-wrap items-baseline w-full">
<input type="date" name="tanggal_resume" class="input w-full" placeholder="Masukkan..."
value="{{ $resumeData['tanggal_resume'] ?? '' }}">
</div>
</div>
</div>
</div>
<div class="card">
@@ -165,7 +172,7 @@
<div class="card-body grid gap-5">
<div class="gird gap-5">
<label class="form-label max-w-56">1. SESUAI FISIK</label>
<label class="form-label max-w-56">SESUAI FISIK</label>
<div class="flex flex-wrap items-baseline w-full mt-5">
<table class="table table-auto table-border align-middle text-gray-700 font-medium text-sm">
<thead>
@@ -222,7 +229,7 @@
</div>
<div class="gird gap-5">
<label class="form-label max-w-56">2. SESUAI IMB</label>
<label class="form-label max-w-56">SESUAI IMB</label>
<div class="flex flex-wrap items-baseline w-full">
<table
@@ -284,25 +291,32 @@
</div>
@if (!empty($resumeData['tambahan']))
<div class="gird gap-5">
<label class="form-label max-w-56">3. Tambahan</label>
<div class="flex flex-wrap items-baseline w-full">
@foreach ($resumeData['tambahan'] as $item)
<div id="kesimpulan" class="gird gap-5">
<table
class="table table-auto table-border align-middle text-gray-700 font-medium text-sm mt-5">
<thead>
<tr>
<th class="text-center">Sertipikat</th>
<th class="text-center">Luas Tanah</th>
<th class="text-center">Luas Bangunan</th>
<th class="text-center">Nilai Pasar Wajar</th>
<div class="flex flex-wrap items-baseline w-full">
</tr>
</thead>
</thead>
<tbody>
@if (!empty($resumeData['tambahan']))
@foreach ($resumeData['tambahan'] as $item)
<table
class="table table-auto table-border align-middle text-gray-700 font-medium text-sm mt-5">
<input class="input" name="tambahan_nama_kesimpulan[]"
placeholder="Masukkan Nama Kesimpulan" type="text" value="{{ $item['tambahan_nama_kesimpulan'] ?? ''}}">
<thead>
<tr>
<th class="text-center">Sertipikat</th>
<th class="text-center">Luas Tanah</th>
<th class="text-center">Luas Bangunan</th>
<th class="text-center">Nilai Pasar Wajar</th>
</tr>
</thead>
</thead>
<tbody>
@if (!empty($resumeData['tambahan']))
{{-- @foreach ($resumeData['tambahan'] as $item) --}}
<tr>
<td class="text-center">
<input type="text" name="tambahan_sertifikat[]"
@@ -324,12 +338,12 @@
class="input number-format" value="{{ $item['nilai'] }}">
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
@endif
</tbody>
</table>
</div>
</div>
</div>
@endforeach
@endif
<div>
@@ -354,44 +368,44 @@
</label>
<div class="input-group w-full flex gap-2">
<ol class="list-decimal pl-5 space-y-2">
<li>LAPORAN RESUME INI DIKELUARKAN DIKARENAKAN BELUM DILAKUKANNYA PEMBAYARAN BIAYA PENILAIAN JAMINAN
<li>LAPORAN RESUME INI DIKELUARKAN DIKARENAKAN BELUM DILAKUKANNYA PEMBAYARAN BIAYA PENILAIAN
JAMINAN
</li>
<li>LAPORAN RESUME INI TIDAK BISA DIJADIKAN SEBAGAI DASAR PENGAJUAN DAN ATAU PENCAIRAN KREDIT, LAPORAN YANG
<li>LAPORAN RESUME INI TIDAK BISA DIJADIKAN SEBAGAI DASAR PENGAJUAN DAN ATAU PENCAIRAN
KREDIT, LAPORAN YANG
DIGUNAKAN TETAP WAJIB BERUPA LAPORAN PENILAIAN JAMINAN (LPJ)
</li>
<li>DETAIL PER METER TANAH DAN BANGUNAN, SARANA PELENGKAP DLL AKAN TERCATAT DI LAPORAN PENILAIAN JAMINAN
</li>
<li>DETAIL PER METER TANAH DAN BANGUNAN, SARANA PELENGKAP DLL AKAN TERCATAT DI LAPORAN
PENILAIAN JAMINAN
(LPJ) NANTI
</li>
</li>
<li>LAPORAN RESUME INI HANYA DIGUNAKAN UNTUK KEPENTINGAN INTERNAL BAGI
</li>
<li>LAPORAN RESUME INI HANYA BERLAKU 14 HARI KALENDER TERHITUNG DARI TANGGAL RESUME INI DIBUAT SESUAI ATURAN
YANG BERLAKU, APABILA LEWAT MAKA HARUS DILAKUKAN ORDER ULANG SESUAI PROSEDUR YANG BERLAKU
</li>
<li>LAPORAN RESUME INI HANYA BERLAKU 14 HARI KALENDER TERHITUNG DARI TANGGAL RESUME INI
DIBUAT SESUAI ATURAN
YANG BERLAKU, APABILA LEWAT MAKA HARUS DILAKUKAN ORDER ULANG SESUAI PROSEDUR YANG
BERLAKU
</li>
<li>Apabila sudah melewati 6 bulan, maka harus penilaian ulang kembali
</li>
</ol>
</div>
</div>
<div class="flex card-footer justify-end gap-5">
<button type="button" class="btn btn-success" onclick="saveResume()">Save</button>
@if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal']))
<a class="btn btn-info"
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
LAMPIRAN FOTO DAN DOKUMEN
</a>
<a class="btn btn-primary"
onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', '{{ request('inspeksiId') }}', {{ request('jaminanId') }}, )">
<i class="ki-filled ki-printer"></i> Print
</a>
@endif
</div>
</div>
<div class="flex card-footer justify-end gap-5">
<button type="button" class="btn btn-success" onclick="saveResume()">Save</button>
@if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal']))
<a class="btn btn-info"
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
LAMPIRAN FOTO DAN DOKUMEN
</a>
<a class="btn btn-primary"
onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', '{{ request('inspeksiId') }}', {{ request('jaminanId') }}, )">
<i class="ki-filled ki-printer"></i> Print
</a>
@endif
</div>
</div>
</form>
</div>
@@ -405,11 +419,17 @@
kesimpulan.innerHTML += `
<div class="grid gap-5 w-full" id="kesimpulan-${counter}">
<label class="form-label kesimpulan max-w-56">${counter}. Tambahan</label>
<div class="flex flex-wrap items-baseline w-full">
<div class="tabel-container w-full">
<table class="table table-auto table-border align-middle text-gray-700 font-medium text-sm mt-5">
<input type="text" name="tambahan_nama_kesimpulan[]"
class="input number-format">
<thead>
<tr>
<th class="text-center">Sertipikat</th>
<th class="text-center">Luas Tanah</th>
@@ -419,7 +439,7 @@
</tr>
</thead>
<tbody>
<tr>
<td class="text-center">
<input type="text" name="tambahan_sertifikat[]"
class="input number-format">
@@ -537,6 +557,7 @@
function formToJson(formElement) {
const formData = new FormData(formElement);
const jsonData = {
tanggal_resume: "",
fakta: {
fakta_positif: [],
fakta_negatif: []
@@ -547,6 +568,7 @@
keterangan: ""
};
// Ambil fakta positif
document.querySelectorAll('textarea[name="fakta_positif[]"]').forEach(textarea => {
jsonData.fakta.fakta_positif.push(textarea.value);
@@ -583,8 +605,10 @@
}
});
document.querySelectorAll('table tbody tr').forEach(row => {
document.querySelectorAll('#kesimpulan > div').forEach(row => {
const imbData = {
tambahan_nama_kesimpulan: row.querySelector('input[name="tambahan_nama_kesimpulan[]"]')
?.value || "",
sertifikat: row.querySelector('input[name="tambahan_sertifikat[]"]')?.value || "",
luas_tanah: row.querySelector('input[name="tambahan_luas_tanah[]"]')?.value || "",
luas_bangunan: row.querySelector('input[name="tambahan_luas_bangunan[]"]')?.value || "",
@@ -600,6 +624,9 @@
const keterangan = formElement.querySelector('textarea[name="keterangan"]')?.value || "";
jsonData.keterangan = keterangan;
const tanggal_resume = formElement.querySelector('input[name="tanggal_resume"]')?.value || "";
jsonData.tanggal_resume = tanggal_resume;
return jsonData;
}