fix: tampilan detail laporan, dan ganti route print out, penambahan service
This commit is contained in:
@@ -85,7 +85,7 @@
|
||||
<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> Hasil Inspeksi
|
||||
</a>
|
||||
<a class="btn btn-success" onclick="checkLaporan('{{ $permohonan->id }}', '{{ $dokumen->id }}', '{{ $inspeksiId }}', {{ $dokumen->jenis_jaminan_id }}, 0 )">
|
||||
<a class="btn btn-success" href="{{ route('penilai.print-out-laporan', ['permohonan_id' => $permohonan->id, 'dokument_id' => $dokumen->id, 'jenis_jaminan_id' => $dokumen->jenis_jaminan_id ]) }}">
|
||||
<i class="ki-filled ki-printer"></i> Print Laporan
|
||||
</a>
|
||||
</div>
|
||||
@@ -100,4 +100,4 @@
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@include('lpj::surveyor.js.utils')
|
||||
{{-- @include('lpj::surveyor.js.utils') --}}
|
||||
|
||||
117
resources/views/component/show-laporan-inspeksi.blade.php
Normal file
117
resources/views/component/show-laporan-inspeksi.blade.php
Normal file
@@ -0,0 +1,117 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumbs')
|
||||
{{-- {{ Breadcrumbs::render(request()->route()->getName()) }} --}}
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-header py-5 flex-wrap">
|
||||
<div class="card-title flex flex-row gap-1.5">
|
||||
<button id="tab-laporan" class="btn btn-sm btn-primary">Laporan</button>
|
||||
<button id="tab-hasil" class="btn btn-sm btn-light">Hasil Inspeksi</button>
|
||||
</div>
|
||||
<div class="flex items-wrap gap-2.5">
|
||||
<a href="{{ $back ?? route()->previous()}}" class="btn btn-xs btn-info"><i
|
||||
class="ki-filled ki-exit-left"></i>
|
||||
Back</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@php
|
||||
$permohonan_id = request()->segment(3);
|
||||
$dokumen_id = request()->segment(4);
|
||||
$jenis_jaminan_id = request()->segment(5);
|
||||
@endphp
|
||||
|
||||
<div id="laporan" class="tab-content">
|
||||
<div class="floating-button">
|
||||
<a href="penilai/print-out-laporan/{{ $permohonan_id }}/{{ $dokumen_id }}/{{ $jenis_jaminan_id }}" class="btn btn-primary">
|
||||
Cetak Laporan
|
||||
<i class="ki-filled ki-printer"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@php
|
||||
$laporan = [
|
||||
'sederhana' => 'lpj::penilai.components.print-out-sederhana',
|
||||
'standar' => 'lpj::penilai.components.print-out-standar',
|
||||
'resume' => 'lpj::penilai.components.print-resume',
|
||||
'memo' => 'lpj::penilai.components.print-memo',
|
||||
'rap' => 'lpj::penilai.components.print-out-rap',
|
||||
'call-report' => 'penilai.components.print-out-call-report',
|
||||
];
|
||||
@endphp
|
||||
@if (array_key_exists($lpj->type_penilai, $laporan))
|
||||
@include($laporan[$lpj->type_penilai])
|
||||
@else
|
||||
<p>Tipe laporan tidak ditemukan.</p>
|
||||
@endif
|
||||
</div>
|
||||
<div id="hasil-inspeksi" class="tab-content hidden-tab">
|
||||
<div class="floating-button">
|
||||
<a href="surveyor/print-out-inspeksi/{{ $permohonan_id }}/{{ $dokumen_id }}/{{ $jenis_jaminan_id }}"
|
||||
class="btn btn-primary">
|
||||
Cetak Laporan
|
||||
<i class="ki-filled ki-printer"></i>
|
||||
</a>
|
||||
</div>
|
||||
@include('lpj::surveyor.components.print-out.main')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const tabLaporan = document.getElementById('tab-laporan');
|
||||
const tabHasil = document.getElementById('tab-hasil');
|
||||
const laporanContent = document.getElementById('laporan');
|
||||
const hasilContent = document.getElementById('hasil-inspeksi');
|
||||
|
||||
tabLaporan.addEventListener('click', () => {
|
||||
tabLaporan.classList.add('btn-primary');
|
||||
tabLaporan.classList.remove('btn-light');
|
||||
tabHasil.classList.add('btn-light');
|
||||
tabHasil.classList.remove('btn-primary');
|
||||
laporanContent.classList.remove('hidden-tab');
|
||||
hasilContent.classList.add('hidden-tab');
|
||||
});
|
||||
|
||||
tabHasil.addEventListener('click', () => {
|
||||
tabHasil.classList.add('btn-primary');
|
||||
tabHasil.classList.remove('btn-light');
|
||||
tabLaporan.classList.add('btn-light');
|
||||
tabLaporan.classList.remove('btn-primary');
|
||||
laporanContent.classList.add('hidden-tab');
|
||||
hasilContent.classList.remove('hidden-tab');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.hidden-tab {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.floating-button {
|
||||
position: fixed;
|
||||
bottom: 20px;
|
||||
right: 20px;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.floating-button .btn {
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 50px;
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
.floating-button .btn:hover {
|
||||
transform: scale(1.05);
|
||||
transition: transform 0.2s ease-in-out;
|
||||
}
|
||||
</style>
|
||||
|
||||
{{-- @include('lpj::surveyor.js.utils') --}}
|
||||
@endsection
|
||||
@@ -358,7 +358,7 @@
|
||||
<a class="btn btn-sm btn-info" href="laporan-penilai-jaminan/show/${data.id}/${dokumen.id}/${dokumen.jenis_jaminan_id}" >
|
||||
<i class="ki-filled ki-eye"></i>Lihat
|
||||
</a>
|
||||
<a class="btn btn-sm btn-success" onclick="checkLaporan('${data.id}', '${dokumen.id}', '${dokumen.jenis_jaminan_id}', 0)">
|
||||
<a class="btn btn-sm btn-success" href="penilai/print-out-laporan/${data.id}/${dokumen.id}/${dokumen.jenis_jaminan_id}">
|
||||
<i class="ki-filled ki-printer"></i>Laporan
|
||||
</a>
|
||||
|
||||
@@ -516,38 +516,5 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function checkLaporan(permohonanId, documentId, statusLpj) {
|
||||
// showLoadingSwal('Tunggu...');
|
||||
fetch(
|
||||
`{{ url('/penilai/check-laporan') }}?permohonanId=${permohonanId}&documentId=${documentId}`
|
||||
)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.status) {
|
||||
window.location.href =
|
||||
`{{ route('penilai.print-out') }}?permohonanId=${permohonanId}&documentId=${documentId}&statusLpj=${0}&type=${data.status}`;
|
||||
} else {
|
||||
// Jika laporan belum ada, tampilkan pesan peringatan
|
||||
Swal.fire({
|
||||
title: 'Laporan Belum Ada',
|
||||
text: data.message,
|
||||
icon: 'warning',
|
||||
confirmButtonText: 'OK',
|
||||
confirmButtonColor: '#3085d6',
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error:', error);
|
||||
Swal.fire({
|
||||
title: 'Terjadi Kesalahan',
|
||||
text: 'Tidak dapat memproses permintaan. Silakan coba lagi nanti.',
|
||||
icon: 'error',
|
||||
confirmButtonText: 'OK',
|
||||
confirmButtonColor: '#d33',
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
@endpush
|
||||
|
||||
@@ -8,7 +8,10 @@
|
||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-header py-5 flex-wrap">
|
||||
<h3 class="card-title">Lihat Laporan</h3>
|
||||
<div class="card-title flex flex-row gap-1.5">
|
||||
<button id="tab-laporan" class="btn btn-sm btn-primary">Laporan</button>
|
||||
<button id="tab-hasil" class="btn btn-sm btn-light">Hasil Inspeksi</button>
|
||||
</div>
|
||||
<div class="flex items-wrap gap-2.5">
|
||||
<a href="{{ route('laporan-penilai-jaminan.index') }}" class="btn btn-xs btn-info"><i
|
||||
class="ki-filled ki-exit-left"></i>
|
||||
@@ -17,23 +20,98 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
@php
|
||||
$laporan = [
|
||||
'sederhana' => 'lpj::penilai.components.print-out-sederhana',
|
||||
'standar' => 'lpj::penilai.components.print-out-standar',
|
||||
'resume' => 'lpj::penilai.components.print-resume',
|
||||
'memo' => 'lpj::penilai.components.print-memo',
|
||||
'rap' => 'lpj::penilai.components.print-out-rap',
|
||||
'call-report' => 'penilai.components.print-out-call-report',
|
||||
];
|
||||
$permohonan_id = request()->segment(3);
|
||||
$dokumen_id = request()->segment(4);
|
||||
$jenis_jaminan_id = request()->segment(5);
|
||||
@endphp
|
||||
|
||||
@if (array_key_exists($lpj->type_penilai, $laporan))
|
||||
@include($laporan[$lpj->type_penilai])
|
||||
@else
|
||||
<p>Tipe laporan tidak ditemukan.</p>
|
||||
@endif
|
||||
</div>
|
||||
<div id="laporan" class="tab-content">
|
||||
<div class="floating-button">
|
||||
<a href="penilai/print-out-laporan/{{ $permohonan_id }}/{{ $dokumen_id }}/{{ $jenis_jaminan_id }}" class="btn btn-primary">
|
||||
Cetak Laporan
|
||||
<i class="ki-filled ki-printer"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
@php
|
||||
$laporan = [
|
||||
'sederhana' => 'lpj::penilai.components.print-out-sederhana',
|
||||
'standar' => 'lpj::penilai.components.print-out-standar',
|
||||
'resume' => 'lpj::penilai.components.print-resume',
|
||||
'memo' => 'lpj::penilai.components.print-memo',
|
||||
'rap' => 'lpj::penilai.components.print-out-rap',
|
||||
'call-report' => 'penilai.components.print-out-call-report',
|
||||
];
|
||||
@endphp
|
||||
@if (array_key_exists($lpj->type_penilai, $laporan))
|
||||
@include($laporan[$lpj->type_penilai])
|
||||
@else
|
||||
<p>Tipe laporan tidak ditemukan.</p>
|
||||
@endif
|
||||
</div>
|
||||
<div id="hasil-inspeksi" class="tab-content hidden-tab">
|
||||
<div class="floating-button">
|
||||
<a href="surveyor/print-out-inspeksi/{{ $permohonan_id }}/{{ $dokumen_id }}/{{ $jenis_jaminan_id }}"
|
||||
class="btn btn-primary">
|
||||
Cetak Laporan
|
||||
<i class="ki-filled ki-printer"></i>
|
||||
</a>
|
||||
</div>
|
||||
@include('lpj::surveyor.components.print-out.main')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const tabLaporan = document.getElementById('tab-laporan');
|
||||
const tabHasil = document.getElementById('tab-hasil');
|
||||
const laporanContent = document.getElementById('laporan');
|
||||
const hasilContent = document.getElementById('hasil-inspeksi');
|
||||
|
||||
tabLaporan.addEventListener('click', () => {
|
||||
tabLaporan.classList.add('btn-primary');
|
||||
tabLaporan.classList.remove('btn-light');
|
||||
tabHasil.classList.add('btn-light');
|
||||
tabHasil.classList.remove('btn-primary');
|
||||
laporanContent.classList.remove('hidden-tab');
|
||||
hasilContent.classList.add('hidden-tab');
|
||||
});
|
||||
|
||||
tabHasil.addEventListener('click', () => {
|
||||
tabHasil.classList.add('btn-primary');
|
||||
tabHasil.classList.remove('btn-light');
|
||||
tabLaporan.classList.add('btn-light');
|
||||
tabLaporan.classList.remove('btn-primary');
|
||||
laporanContent.classList.add('hidden-tab');
|
||||
hasilContent.classList.remove('hidden-tab');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.hidden-tab {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.floating-button {
|
||||
position: fixed;
|
||||
bottom: 20px;
|
||||
right: 20px;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.floating-button .btn {
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 50px;
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
.floating-button .btn:hover {
|
||||
transform: scale(1.05);
|
||||
transition: transform 0.2s ease-in-out;
|
||||
}
|
||||
</style>
|
||||
|
||||
{{-- @include('lpj::surveyor.js.utils') --}}
|
||||
@endsection
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
|
||||
if(data.penilai.resume) {
|
||||
resumeButton = `
|
||||
<a href="{{ route('penilai.print-out') }}?permohonanId=${data.id}&documentId=${dokumenID}&inspeksiId=${inspeksiId}&jaminanId=${jenisJaminanID}&statusLpj=0" class="btn btn-sm btn-success">
|
||||
<a href="penilai/print-out-laporan/${data.id}/${dokumenID}/${jenisJaminanID}" class="btn btn-sm btn-success">
|
||||
Resume
|
||||
</a>`;
|
||||
}
|
||||
@@ -266,12 +266,12 @@
|
||||
if((data.status_bayar=="sudah_bayar" || data.status_bayar=="tidak_bayar") && data.nilai_liquidasi >0) {
|
||||
if(data.penilai.type_penilai=='resume' && !data.penilai.resume){
|
||||
laporanButton = `
|
||||
<a href="{{ route('penilai.print-out') }}?permohonanId=${data.id}&documentId=${dokumenID}&inspeksiId=${inspeksiId}&jaminanId=${jenisJaminanID}&statusLpj=0&type=${type}" class="btn btn-sm btn-primary">
|
||||
<a href="penilai/print-out-laporan/${data.id}/${dokumenID}/${jenisJaminanID}" class="btn btn-sm btn-primary">
|
||||
Laporan
|
||||
</a>`;
|
||||
} else {
|
||||
laporanButton = `
|
||||
<a href="{{ route('penilai.print-out') }}?permohonanId=${data.id}&documentId=${dokumenID}&inspeksiId=${inspeksiId}&jaminanId=${jenisJaminanID}&statusLpj=0&type=${typePenilaian}" class="btn btn-sm btn-primary">
|
||||
<a href="penilai/print-out-laporan/${data.id}/${dokumenID}/${jenisJaminanID}" class="btn btn-sm btn-primary">
|
||||
Laporan
|
||||
</a>`;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
@endforeach
|
||||
</table>
|
||||
@else
|
||||
<p>Tidak ada faktor negatif yang teridentifikasi.</p>
|
||||
<p></p>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -93,10 +93,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- <footer id="footer"> --}}
|
||||
<footer id="footer">
|
||||
{{-- Cabang : {{ $permohonan->debiture->branch->name ?? '' }} --}}
|
||||
{{-- </footer> --}}
|
||||
{{-- <script type="text/php">
|
||||
</footer>
|
||||
<script type="text/php">
|
||||
if (isset($pdf)) {
|
||||
$pdf->page_script('
|
||||
$font = $fontMetrics->get_font("Arial, Helvetica, sans-serif", "normal");
|
||||
@@ -107,8 +107,8 @@
|
||||
$pdf->text($x, $y, $pageText, $font, $size);
|
||||
');
|
||||
}
|
||||
</script> --}}
|
||||
{{-- <script>
|
||||
</script>
|
||||
<script>
|
||||
const datas = @json($forminspeksi);
|
||||
console.log(datas);
|
||||
const lpjData = @json($lpjData);
|
||||
@@ -138,4 +138,4 @@
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html> --}}
|
||||
</html>
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
|
||||
/* Image Styling */
|
||||
.photo-item img {
|
||||
display: block;
|
||||
margin: auto;
|
||||
width: auto;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
@@ -97,13 +99,14 @@
|
||||
style="align-content: center; text-align: center; margin-bottom: 20px">
|
||||
@foreach ($chunkedPhotos as $item)
|
||||
@php
|
||||
$filePath = $statusLpj == 1 ? storage_path('app/public/' . $item['path']) : asset('storage/' . $item['path']);
|
||||
$filePath = asset('storage/' . $item['path']);
|
||||
$extension = strtolower(pathinfo($item['path'], PATHINFO_EXTENSION));
|
||||
$isImage = in_array($extension, ['jpg', 'jpeg', 'png', 'gif']);
|
||||
$isPdf = $extension === 'pdf';
|
||||
@endphp
|
||||
<tr>
|
||||
<td style="width: 100%; padding: 10px; text-align: center" class="photo-item border" >
|
||||
<td style="width: 100%; padding: 10px; align-content: center; text-align: center" class="photo-item border " >
|
||||
<p style="font-weight: medium; font-size: 10px">{{ $category }} -
|
||||
@isset($subcategory)
|
||||
@if (trim($subcategory) !== '')
|
||||
@@ -114,14 +117,14 @@
|
||||
</p>
|
||||
@if ($statusLpj || file_exists(public_path('storage/' . $item['path'])))
|
||||
@if ($isImage)
|
||||
<img src="{{ $filePath }}" alt="{{ $item['path'] }}" class="photo-image" style="text-align: center;">
|
||||
<img src="{{ $filePath }}" alt="{{ $item['path'] }}" class="photo-image" style="align-content: center; text-align: center;">
|
||||
@elseif ($isPdf)
|
||||
<a href="{{ $filePath }}" download="{{ basename($filePath) }}" style="font-size:12px; color:#1a73e8; text-decoration: underline;">
|
||||
⬇️ Unduh File PDF
|
||||
</a>
|
||||
@else
|
||||
<a href="{{ $filePath }}" download="{{ basename($filePath) }}" style="font-size:12px; color:#1a73e8; text-decoration: underline;">
|
||||
⬇️ Unduh File
|
||||
⬇️ Unduh File
|
||||
</a>
|
||||
@endif
|
||||
@endif
|
||||
@@ -149,7 +152,8 @@
|
||||
style="align-content: center; text-align: center; margin-bottom: 20px">
|
||||
@foreach ($chunkedPhotos as $item)
|
||||
@php
|
||||
$filePath = asset('storage/' . $item['path']);
|
||||
$filePath = $statusLpj == 1 ? storage_path('app/public/' . $item['path']) : asset('storage/' . $item['path']);
|
||||
|
||||
$extension = strtolower(pathinfo($item['path'], PATHINFO_EXTENSION));
|
||||
$isPdf = $extension === 'pdf';
|
||||
@endphp
|
||||
|
||||
@@ -8,12 +8,16 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Laporan Penilai Jaminan</title>
|
||||
|
||||
@if ($statusLpj == 1)
|
||||
|
||||
<style>
|
||||
* {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** Define the header rules **/
|
||||
@page {
|
||||
margin-top: 100px;
|
||||
@@ -21,7 +25,7 @@
|
||||
|
||||
}
|
||||
|
||||
/* #header {
|
||||
#header {
|
||||
position: fixed;
|
||||
top: -80px;
|
||||
left: 0;
|
||||
@@ -29,15 +33,15 @@
|
||||
height: 50px;
|
||||
text-align: center;
|
||||
padding-bottom: 10px;
|
||||
} */
|
||||
}
|
||||
|
||||
/* .header-logo {
|
||||
.header-logo {
|
||||
position: absolute;
|
||||
left: 20px;
|
||||
top: 10px;
|
||||
max-height: 80px;
|
||||
max-width: 150px;
|
||||
} */
|
||||
}
|
||||
|
||||
.header-title {
|
||||
margin-top: 20px;
|
||||
@@ -88,9 +92,9 @@
|
||||
page-break-before: always;
|
||||
break-before: page;
|
||||
}
|
||||
/* .border {
|
||||
.border {
|
||||
border: 1px solid #000;
|
||||
} */
|
||||
}
|
||||
|
||||
.no-break {
|
||||
page-break-inside: avoid;
|
||||
@@ -99,6 +103,7 @@
|
||||
|
||||
}
|
||||
</style>
|
||||
@endif
|
||||
</head>
|
||||
{{-- @php
|
||||
$data = '';
|
||||
|
||||
@@ -55,17 +55,13 @@
|
||||
href="{{ route('penilai.lampiran') }}?permohonanId={{ $permohonan->id }}&documentId={{ request('documentId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
|
||||
Lampiran Foto dan Dokumen
|
||||
</a>
|
||||
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => request('documentId'), 'jenis_jaminan_id' => request('jaminanId')]) }}" class="btn btn-light"
|
||||
>
|
||||
<i class="ki-filled ki-printer"></i> Cetak Hasil Inspeksi
|
||||
</a>
|
||||
<a class="btn btn-success"
|
||||
onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', {{ request('jaminanId') }}, 0)">
|
||||
<i class="ki-filled ki-printer"></i> Cetak Laporan
|
||||
href="penilai/show-laporan-inspeksi/{{ $permohonan->id }}/{{ request('documentId') }}/{{ request('jaminanId') }}?type=detail-penilai">
|
||||
<i class="ki-filled ki-eye"></i> Lihat Laporan dan Inspeksi
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@include('lpj::surveyor.js.utils')
|
||||
{{-- @include('lpj::surveyor.js.utils') --}}
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
foreach ($team_users as $team_user) {
|
||||
$user = $team_user->user;
|
||||
|
||||
if ($user && $user->hasRole('senior-officer')) {
|
||||
if ($user) {
|
||||
$senior_officer = $user;
|
||||
break 3;
|
||||
}
|
||||
@@ -101,12 +101,12 @@
|
||||
<tr>
|
||||
<td style="padding: 2px; vertical-align: top;">Pemeriksa</td>
|
||||
<td style="padding: 2px; vertical-align: top;">:</td>
|
||||
<td style="padding: 2px; vertical-align: top;">{{ $senior_officer->name ?? '' }}</td>
|
||||
<td style="padding: 2px; vertical-align: top;">{{ $permohonan->approveSo->name ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 2px; vertical-align: top;">Menyetujui</td>
|
||||
<td style="padding: 2px; vertical-align: top;">:</td>
|
||||
<td style="padding: 2px; vertical-align: top;">{{ $senior_officer->name ?? '' }}</td>
|
||||
<td style="padding: 2px; vertical-align: top;">{{ $permohonan->approveSo->name ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 2px; vertical-align: top;">Tanggal Laporan</td>
|
||||
@@ -210,7 +210,7 @@
|
||||
|
||||
<div class="no-break">
|
||||
|
||||
<table>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width: 50%; border: 1px solid #000;">
|
||||
STATUS KEPEMILIKAN, HUBUNGAN DAN PENGHUNI
|
||||
@@ -326,7 +326,7 @@
|
||||
{{ implode(', ', $lingkungan['tingkat_keramaian']['tingkat_keramaian'] ?? $lingkungan['tingkat_keramaian'] ?? ['-']) }}
|
||||
</td>
|
||||
</tr>
|
||||
< <tr>
|
||||
<tr>
|
||||
<td style="padding: 2px; vertical-align: top;">Terletak di Area</td>
|
||||
<td style="padding: 2px; vertical-align: top;">:</td>
|
||||
<td style="padding: 2px; vertical-align: top;">
|
||||
@@ -538,115 +538,6 @@
|
||||
</div>
|
||||
<div class="no-break">
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td style="border: 1px solid #000;">
|
||||
F. ANALISA FAKTA
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<table>
|
||||
@if (isset($forminspeksi['fakta']['fakta_positif']) && count($forminspeksi['fakta']['fakta_positif']) > 0)
|
||||
<tr>
|
||||
<td width="25%" style="vertical-align: top;"><strong>Faktor Positif</strong></td>
|
||||
<td>
|
||||
@isset($forminspeksi['fakta']['fakta_positif'])
|
||||
<table style="width: 100%; border-collapse: collapse;">
|
||||
@foreach ($forminspeksi['fakta']['fakta_positif'] as $key => $item)
|
||||
<tr>
|
||||
<td>{!! nl2br(e($item)) !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
@endisset
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if (isset($forminspeksi['fakta']['fakta_negatif']) && count($forminspeksi['fakta']['fakta_negatif']) > 0)
|
||||
<tr>
|
||||
<td width="25%" style="vertical-align: top;"><strong>Faktor Negatif</strong></td>
|
||||
<td>
|
||||
@isset($forminspeksi['fakta']['fakta_negatif'])
|
||||
<table style="width: 100%; border-collapse: collapse;">
|
||||
@foreach ($forminspeksi['fakta']['fakta_negatif'] as $key => $item)
|
||||
<tr>
|
||||
<td>{!! nl2br(e($item)) !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
@endisset
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if (isset($forminspeksi['fakta']['batas_batas_input']) && count($forminspeksi['fakta']['batas_batas_input']) > 0)
|
||||
<tr>
|
||||
<td width="25%" style="vertical-align: top;"><strong>Batas batas</strong></td>
|
||||
<td>
|
||||
@foreach ($forminspeksi['fakta']['batas_batas_input'] ?? [] as $arah => $batas)
|
||||
@if ($batas)
|
||||
<p> - {{ $arah }} : {{ $batas }}</p>
|
||||
@endif
|
||||
@endforeach
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td width="25%" style="vertical-align: top;"><strong>Informasi Dinas Tata Ruang</strong>
|
||||
</td>
|
||||
<td>
|
||||
@php
|
||||
$informasi = [
|
||||
'peruntukan',
|
||||
'kdb',
|
||||
'kdh',
|
||||
'gsb',
|
||||
'max_lantai',
|
||||
'klb',
|
||||
'gss',
|
||||
'pelebaran_jalan',
|
||||
'nama_petugas',
|
||||
];
|
||||
@endphp
|
||||
|
||||
@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
|
||||
<p> - {{ $displayKey }}: {{ $forminspeksi['fakta'][$key] }}</p>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@if (!empty($forminspeksi['fakta']['keterangan']))
|
||||
<tr>
|
||||
<td width="25%" style="vertical-align: top;"><strong>Catatan yang Perlu
|
||||
Diperhatikan</strong></td>
|
||||
<td>
|
||||
@php
|
||||
$keterangan = $forminspeksi['fakta']['keterangan'] ?? '';
|
||||
if (is_array($keterangan)) {
|
||||
$keterangan = implode(', ', array_filter($keterangan));
|
||||
}
|
||||
@endphp
|
||||
|
||||
@if (!empty($keterangan))
|
||||
<table style="width: 100%; border-collapse: collapse;">
|
||||
<tr>
|
||||
<td>{{ $keterangan }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
|
||||
@@ -106,13 +106,19 @@
|
||||
<tr>
|
||||
<td style="width: 25%; padding: 2px; vertical-align: top;">Debitur / Wakil Debitur</td>
|
||||
<td style="width: 1%; vertical-align: top;">:</td>
|
||||
|
||||
@if (isset($forminspeksi['asset']['debitur_perwakilan']))
|
||||
<td>
|
||||
<td>
|
||||
@if (is_array($forminspeksi['asset']['debitur_perwakilan']))
|
||||
@foreach ($forminspeksi['asset']['debitur_perwakilan'] as $item)
|
||||
{{ $item ?? $permohonan->debiture->name ?? '' }}<br>
|
||||
{{ $item ?? $permohonan->debiture->name ?? '' }}<br>
|
||||
@endforeach
|
||||
</td>
|
||||
@endif
|
||||
@else
|
||||
{{ $forminspeksi['asset']['debitur_perwakilan'] ?? $permohonan->debiture->name ?? '' }}
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 25%; padding: 2px; vertical-align: top;">Pihak Bank selain Appraisal</td>
|
||||
|
||||
@@ -370,13 +370,13 @@
|
||||
</a>
|
||||
|
||||
<a class="btn btn-outline btn-info "
|
||||
onclick="checkLaporan('{{ $permohonan->id }}', '{{ $dokumen->id }}', {{ $dokumen->jenis_jaminan_id }}, 1 )">
|
||||
href="penilai/show-laporan-inspeksi/{{ $permohonan->id }}/{{ $dokumen->id }}/{{ $dokumen->jenis_jaminan_id }}">
|
||||
<i class="ki-filled ki-eye"></i>
|
||||
Lihat Laporan
|
||||
</a>
|
||||
|
||||
<a class="btn btn-success"
|
||||
onclick="checkLaporan('{{ $permohonan->id }}', '{{ $dokumen->id }}', {{ $dokumen->jenis_jaminan_id }}, 0 )">
|
||||
href="penilai/print-out-laporan/{{ $permohonan->id }}/{{ $dokumen->id }}/{{ $dokumen->jenis_jaminan_id }}?type=penilai">
|
||||
<i class="ki-filled ki-printer"></i>
|
||||
Cetak Laporan
|
||||
</a>
|
||||
@@ -751,4 +751,4 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
@include('lpj::surveyor.js.utils')
|
||||
{{-- @include('lpj::surveyor.js.utils') --}}
|
||||
|
||||
@@ -82,14 +82,14 @@
|
||||
@if (isset($forminspeksi['asset']['debitur_perwakilan']) && !empty($forminspeksi['asset']['debitur_perwakilan']))
|
||||
|
||||
<div id="perwakilan" class="flex flex-wrap items-baseline w-full gap-5">
|
||||
@foreach ($forminspeksi['asset']['debitur_perwakilan'] as $key => $item)
|
||||
{{-- @foreach ($forminspeksi['asset']['debitur_perwakilan'] as $key => $item)
|
||||
<div class="perwakilan flex flex-wrap w-full items-baseline gap-2 ">
|
||||
<input type="text" class="input form-control" name="debitur_perwakilan[]"
|
||||
value="{{ old('debitur_perwakilan.' . $key, $item) }}"
|
||||
placeholder="Masukkan Debitur/Perwakilan" />
|
||||
<button type="button" class="btn btn-danger btn-outline btn-xs remove-btn">Hapus</button>
|
||||
</div>
|
||||
@endforeach
|
||||
@endforeach --}}
|
||||
</div>
|
||||
@else
|
||||
<div id="perwakilan" class="flex flex-wrap items-baseline w-full gap-5">
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
}
|
||||
|
||||
#header {
|
||||
/* #header {
|
||||
position: fixed;
|
||||
top: -80px;
|
||||
left: 0;
|
||||
@@ -32,9 +32,9 @@
|
||||
height: 50px;
|
||||
text-align: center;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
} */
|
||||
|
||||
.header-logo {
|
||||
/* .header-logo {
|
||||
position: absolute;
|
||||
left: 20px;
|
||||
top: 10px;
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
.header-title {
|
||||
margin-top: 20px;
|
||||
}
|
||||
} */
|
||||
|
||||
#footer {
|
||||
position: fixed;
|
||||
@@ -82,16 +82,16 @@
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
body {
|
||||
/* body {
|
||||
margin-top: 3cm;
|
||||
margin-bottom: 120px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
} */
|
||||
|
||||
.border {
|
||||
/* .border {
|
||||
border: 1px solid #000;
|
||||
}
|
||||
} */
|
||||
|
||||
.no-break {
|
||||
page-break-inside: avoid;
|
||||
@@ -657,7 +657,7 @@
|
||||
<footer id="footer">
|
||||
{{-- Cabang : {{ $permohonan->debiture->branch->name ?? '' }} --}}
|
||||
</footer>
|
||||
<script type="text/php">
|
||||
{{-- <script type="text/php">
|
||||
if (isset($pdf)) {
|
||||
$pdf->page_script('
|
||||
$font = $fontMetrics->get_font("Arial, Helvetica, sans-serif", "normal");
|
||||
@@ -668,7 +668,7 @@
|
||||
$pdf->text($x, $y, $pageText, $font, $size);
|
||||
');
|
||||
}
|
||||
</script>
|
||||
</script> --}}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -309,38 +309,6 @@
|
||||
}
|
||||
|
||||
|
||||
function checkLaporan(permohonanId, documentId, inspeksiId, statusLpj) {
|
||||
// showLoadingSwal('Tunggu...');
|
||||
fetch(
|
||||
`{{ url('/penilai/check-laporan') }}?permohonanId=${permohonanId}&documentId=${documentId}&inspeksiId=${inspeksiId}`
|
||||
)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.status) {
|
||||
window.location.href =
|
||||
`{{ route('penilai.print-out') }}?permohonanId=${permohonanId}&documentId=${documentId}&inspeksiId=${inspeksiId}&statusLpj=${statusLpj}&type=${data.status}`;
|
||||
} else {
|
||||
// Jika laporan belum ada, tampilkan pesan peringatan
|
||||
Swal.fire({
|
||||
title: 'Laporan Belum Ada',
|
||||
text: data.message,
|
||||
icon: 'warning',
|
||||
confirmButtonText: 'OK',
|
||||
confirmButtonColor: '#3085d6',
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error:', error);
|
||||
Swal.fire({
|
||||
title: 'Terjadi Kesalahan',
|
||||
text: 'Tidak dapat memproses permintaan. Silakan coba lagi nanti.',
|
||||
icon: 'error',
|
||||
confirmButtonText: 'OK',
|
||||
confirmButtonColor: '#d33',
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function updateAnalisa(params) {
|
||||
const inputMap = {
|
||||
|
||||
Reference in New Issue
Block a user