perbaikan laporan penilai dan print out
This commit is contained in:
@@ -802,7 +802,7 @@ class PenilaiController extends Controller
|
||||
'standard' => 'penilai.components.print-out-standard',
|
||||
'resume' => 'penilai.components.print-resume',
|
||||
'memo' => 'penilai.components.print-memo',
|
||||
'rap' => 'penilai.components.print-rap'
|
||||
'rap' => 'penilai.components.print-out-rap'
|
||||
];
|
||||
return $viewMap[$tipe] ?? 'penilai.components.print-resume';
|
||||
}
|
||||
|
||||
@@ -995,7 +995,7 @@
|
||||
confirmButtonText: 'OK'
|
||||
}).then((response) => {
|
||||
if (response.isConfirmed) {
|
||||
window.location.reload();
|
||||
// window.location.reload();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumbs')
|
||||
{{ Breadcrumbs::render(request()->route()->getName()) }}
|
||||
{{ Breadcrumbs::render(request()->route()->getName()) }}
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
@@ -15,6 +15,15 @@
|
||||
<button type="button" class="btn btn-success" id="saveButton" onclick="saveLpjSederhanadanStandard()">
|
||||
<span id="saveButtonText">Save</span>
|
||||
</button>
|
||||
@if (Auth::user()->hasAnyRole(['senior-officer']))
|
||||
<a href="_blank" class="btn btn-warning">
|
||||
Revisi
|
||||
</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>
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@@ -266,11 +266,21 @@
|
||||
|
||||
@include('lpj::penilai.components.foto-lampiran')
|
||||
|
||||
<div class="flex justify-start gap-5">
|
||||
<div class="flex card-footer justify-end gap-5">
|
||||
<a class="btn btn-success" onclick="saveMemo()">
|
||||
SAVE
|
||||
</a>
|
||||
@if (Auth::user()->hasAnyRole(['senior-officer']))
|
||||
<a href="_blank" class="btn btn-warning">
|
||||
Revisi
|
||||
</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>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -333,8 +343,7 @@
|
||||
confirmButtonText: 'OK'
|
||||
}).then((response) => {
|
||||
if (response.isConfirmed) {
|
||||
window.location.href =
|
||||
'{{ route('penilai.show', ['id' => $permohonan->id]) }}';
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -10,16 +10,17 @@
|
||||
|
||||
<style>
|
||||
* {
|
||||
font-size: 6px;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 10px
|
||||
font-size: 12px
|
||||
}
|
||||
|
||||
/** Define the header rules **/
|
||||
@page {
|
||||
margin-top: 120px;
|
||||
margin-top: 100px;
|
||||
/* Ruang untuk header */
|
||||
margin-bottom: 50px;
|
||||
/* Ruang untuk footer */
|
||||
@@ -31,7 +32,7 @@
|
||||
/* Posisi header di luar konten */
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 90px;
|
||||
height: 50px;
|
||||
text-align: center;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
@@ -106,7 +107,7 @@
|
||||
|
||||
</head>
|
||||
|
||||
<body style="width: 80%; margin: auto">
|
||||
<body style="width: 80%; margin: auto;">
|
||||
<header id="header">
|
||||
<table style="width: 100%; border: none;">
|
||||
<tr>
|
||||
@@ -121,211 +122,214 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<h2 style=" text-transform: uppercase;">MEMO ANTAR KANTOR</h2>
|
||||
<h2 style="text-transform: uppercase;">Report Analisa Property</h2>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="width: 100%">
|
||||
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td style="width: 10%">Kepada</td>
|
||||
<td style="width: 10%;">Kepada</td>
|
||||
<td>:</td>
|
||||
<td>{{ $memo['kepada'] ?? '' }}</td>
|
||||
<td>{{ $rap['kepada'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Dari</td>
|
||||
<td>:</td>
|
||||
<td>{{ $memo['dari'] ?? '' }}</td>
|
||||
<td>{{ $rap['dari'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>No</td>
|
||||
<td>:</td>
|
||||
<td>{{ $memo['nomor_memo'] ?? '' }}</td>
|
||||
<td>{{ $rap['nomor_rap'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tanggal</td>
|
||||
<td>:</td>
|
||||
<td></td>
|
||||
<td>_</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Perihal</td>
|
||||
<td>:</td>
|
||||
<td>{{ $memo['perihal'] ?? '' }}</td>
|
||||
<td>{{ $rap['perihal'] ?? '' }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
Menindak lanjuti permintann penilaian jaminan dari {{ $permohonan->user->name }} AO Cabang Ternate
|
||||
tanggal , dapat di sampaikan sebagai berikut:
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="border-top: 1px solid black; width: 100%;"></div>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<h2 style=" text-transform: uppercase;">Identitas Deitur & Hubungan dan Penghuni</h2>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="width: 100%">
|
||||
|
||||
<tr>
|
||||
<td style="width: 10%">Nama Calon Debiture</td>
|
||||
<td>:</td>
|
||||
<td >{{ $permohonan->debiture->name ?? '' }}</td>
|
||||
</tr>
|
||||
|
||||
@if (@isset($dokumen))
|
||||
@foreach ($dokumen->detail as $details)
|
||||
<tr>
|
||||
<td>{{ $details->jenisLegalitasJaminan->name ?? '' }}
|
||||
</td>
|
||||
<td>:</td>
|
||||
<td>
|
||||
@if (isset($detail->dokumen_jaminan))
|
||||
@php
|
||||
$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)
|
||||
<div>
|
||||
@if (!empty($dokumen_nomor))
|
||||
<span>
|
||||
{{ $dokumen_nomor[$index] }}</span>
|
||||
@endif
|
||||
</div>
|
||||
<br>
|
||||
@endforeach
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
|
||||
<tr>
|
||||
<td>Atas Nama</td>
|
||||
<td>:</td>
|
||||
<td>{{ $permohonan->debiture->name ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tanggal Terbit Sertifikat</td>
|
||||
<td>:</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Surat Ukur No</td>
|
||||
<td>:</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<h2 style="text-transform: uppercase;">Copy Dokumen yang Dilampirkan</h2>
|
||||
<table style="width: 100%;">
|
||||
@foreach ($permohonan->debiture->documents as $dokumen)
|
||||
@php
|
||||
$cekLuas = isset($forminspeksi['tanah']['luas_tanah']['tidak sesuai']) ? 'tidak sesuai' : 'sesuai';
|
||||
$penilai = $permohonan->penilaian->userPenilai->where('role', 'penilai')->first();
|
||||
$teams = $permohonan->region->teams;
|
||||
|
||||
|
||||
|
||||
$luas = $forminspeksi['tanah']['luas_tanah'][$cekLuas] ?? null;
|
||||
@endphp
|
||||
<td >Luas Tanah</td>
|
||||
<td >:</td>
|
||||
<td >{{ $luas ?? '' }}</td>
|
||||
</tr>
|
||||
@if (isset($dokumen))
|
||||
@foreach ($dokumen->detail as $index => $details)
|
||||
<tr>
|
||||
<td>
|
||||
{{ $index + 1 }}. {{ $details->jenisLegalitasJaminan->name ?? '' }}
|
||||
@if (isset($details->dokumen_jaminan))
|
||||
@php
|
||||
$dokumen_nomor = is_array(json_decode($details->dokumen_nomor))
|
||||
? json_decode($details->dokumen_nomor)
|
||||
: ($details->dokumen_nomor
|
||||
? [$details->dokumen_nomor]
|
||||
: []);
|
||||
@endphp
|
||||
@foreach ($dokumen_nomor as $nomor)
|
||||
<div>{{ $nomor }}</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<h2 style="text-transform: uppercase;">Informasi Perusahaan/Kondisi dan Lingkungan Sekitar</h2>
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td>
|
||||
<h2 style=" text-transform: uppercase;">Loaksi Jaminan</h2>
|
||||
<td>1. {{ $permohonan->debiture->name ?? '' }} {{ $forminspeksi['pengalaman_developer'] ?? '' }}
|
||||
{{ $forminspeksi['developer_anggota'] ?? '' }}
|
||||
<p style="padding-left: 15px;">
|
||||
|
||||
@isset($forminspeksi['lainnya_developer'])
|
||||
@foreach ($forminspeksi['lainnya_developer'] as $item)
|
||||
<div>{{ $item }}</div>
|
||||
@endforeach
|
||||
@endisset
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td width="10%">Terletak di</td>
|
||||
<td>:</td>
|
||||
<td> {{ $alamat['address'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Kelurahan</td>
|
||||
<td>:</td>
|
||||
<td>{{ $alamat['village_code'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Kecamatan</td>
|
||||
<td>:</td>
|
||||
<td>{{ $alamat['district_code'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Kota</td>
|
||||
<td>:</td>
|
||||
<td> {{ $alamat['city_code'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Propinsi</td>
|
||||
<td>:</td>
|
||||
<td>{{ $alamat['province_code'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Titik Kordinat</td>
|
||||
<td>:</td>
|
||||
<td>{{ $alamat['province_code'] ?? '' }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<h2 style=" text-transform: uppercase;">HASIL INSPEKSI</h2>
|
||||
<td>2. {{ $forminspeksi['kapan_mulai_dibangun'] ?? '' }}<br>
|
||||
<p style="padding-left: 15px;">
|
||||
{{ $forminspeksi['kondisi_perumahan'] ?? '' }}<br>
|
||||
{{ $forminspeksi['progres_pembangunan'] ?? '' }}<br>
|
||||
{{ $forminspeksi['kontraktor'] ?? '' }}
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td>3. {{ $forminspeksi['kontraktor'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>4. @isset($forminspeksi['kerjasama_dengan_bank'])
|
||||
@foreach ($forminspeksi['kerjasama_dengan_bank'] as $item)
|
||||
<div>{{ $item }}</div>
|
||||
@endforeach
|
||||
@endisset
|
||||
<p style="padding-left: 15px;">
|
||||
@isset($forminspeksi['batas_batas_perumahan'])
|
||||
@foreach ($forminspeksi['batas_batas_perumahan'] as $item)
|
||||
<div>{{ $item }}</div>
|
||||
@endforeach
|
||||
@endisset
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>5. @isset($forminspeksi['harga_unit'])
|
||||
@foreach ($forminspeksi['harga_unit'] as $item)
|
||||
<div>{{ $item }}</div>
|
||||
@endforeach
|
||||
@endisset
|
||||
<p style="padding-left: 15px;">
|
||||
@isset($forminspeksi['progres_penjualan'])
|
||||
@foreach ($forminspeksi['progres_penjualan'] as $item)
|
||||
<div>{{ $item }}</div>
|
||||
@endforeach
|
||||
@endisset
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>6. @isset($forminspeksi['fasus_fasum'])
|
||||
@foreach ($forminspeksi['fasus_fasum'] as $item)
|
||||
<div>{{ $item }}</div>
|
||||
@endforeach
|
||||
@endisset
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>7. @isset($forminspeksi['target_market'])
|
||||
@foreach ($forminspeksi['target_market'] as $item)
|
||||
<div>{{ $item }}</div>
|
||||
@endforeach
|
||||
@endisset
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>8. {{ $forminspeksi['kontraktor'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>10. {{ $forminspeksi['lingkungan_sekitar'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>11. {{ $forminspeksi['rute_menuju_lokasi'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>12. Hasil pengecekan dan informasi ketentuan dari dinas tata ruang:
|
||||
<p style="padding-left: 15px;">
|
||||
|
||||
{{ $forminspeksi['fakta']['peruntukan'] ?? '' }}<br>
|
||||
{{ $forminspeksi['fakta']['gsb'] ?? '' }}<br>
|
||||
{{ $forminspeksi['fakta']['kdb'] ?? '' }}<br>
|
||||
{{ $forminspeksi['fakta']['klb'] ?? '' }}
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>13. {{ $forminspeksi['rute_menuju_lokasi'] ?? '' }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<h2 style=" text-transform: uppercase;">KESIMPULAN DAN SARAN</h2>
|
||||
@isset($forminspeksi['keterangan'])
|
||||
@foreach ($forminspeksi['keterangan'] as $item)
|
||||
<div>{{ $item }}</div>
|
||||
@endforeach
|
||||
@endisset
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td>Demikian Kami Sampaikan, aatas perhatiannya kami ucapkan terimakasih</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<table style="width: 100%; text-align: center;" border="1">
|
||||
<p>Demikian kami sampaikan, atas perhatiannya kami ucapkan terima kasih.</p>
|
||||
|
||||
<tr>
|
||||
<td style="height: 50px"></td>
|
||||
<td style="height: 50px"></td>
|
||||
<td style="height: 50px"></td>
|
||||
<td style="height: 50px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $penilai->userPenilaiTeam->name ?? '' }}</br>
|
||||
Appraisal
|
||||
</td>
|
||||
<td> {{ $senior_officer->name ?? '' }}</br>
|
||||
SO Region
|
||||
</td>
|
||||
<td> {{ $senior_officer->name ?? '' }}</br>
|
||||
EO Appraisal
|
||||
</td>
|
||||
<td> {{ $senior_officer->name ?? '' }}</br>
|
||||
Deputy Director
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="width: 100%; text-align: center;">
|
||||
<tr>
|
||||
<td style="height: 50px;"></td>
|
||||
<td style="height: 50px;"></td>
|
||||
<td style="height: 50px;"></td>
|
||||
<td style="height: 50px;"></td>
|
||||
</tr>
|
||||
@php
|
||||
use Modules\Usermanagement\Models\User;
|
||||
@endphp
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>{{ User::role('DD Appraisal')->first()->name ?? '' }}
|
||||
<br>Deputy Director
|
||||
</td>
|
||||
<td>
|
||||
<br>SO Region
|
||||
</td>
|
||||
<td>{{ $penilai->userPenilaiTeam->name ?? '' }}
|
||||
<br>Appraisal
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="page-break"></div>
|
||||
<table style="width: 100%">
|
||||
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td style=" width: 100%; padding: 2px; border: 1px solid #000; text-align: center">FOTO JAMINAN</td>
|
||||
<td style="width: 100%; padding: 2px; border: 1px solid #000; text-align: center;">FOTO JAMINAN</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
@@ -335,10 +339,13 @@
|
||||
</table>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
|
||||
</footer>
|
||||
<footer></footer>
|
||||
|
||||
<script>
|
||||
const data = @json($forminspeksi);
|
||||
console.log(data);
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
||||
</html>
|
||||
|
||||
@@ -259,7 +259,7 @@
|
||||
|
||||
<h4 style="text-align: center; text-transform: uppercase; font-size: 14px;">LAPORAN PENILAIAN ATAS
|
||||
{{ $data }}</h4>
|
||||
<p style="text-align: center;">NO:
|
||||
<p style="text-align: center; font-size:12px;">NO:
|
||||
{{ $permohonan->debiture->branch->code ?? '' }}/{{ $nomorLaporan }}/LPJ/{{ $permohonan->nomor_registrasi }}/{{ onRomawi(date('m')) }}/{{ date('Y') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -1,15 +1,288 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumbs')
|
||||
{{-- {{ Breadcrumbs::render(request()->route()->getName()) }}
|
||||
--}}
|
||||
RAP
|
||||
{{ Breadcrumbs::render(request()->route()->getName()) }}
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||
@include('lpj::assetsku.includenya')
|
||||
@include('lpj::surveyor.components.header')
|
||||
@include('lpj::surveyor.components.rap')
|
||||
</div>
|
||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||
<form id="formInspeksi" method="POST" enctype="multipart/form-data" class="grid gap-5">
|
||||
@csrf
|
||||
<input type="hidden" name="permohonan_id" value="{{ $permohonan->id }}">
|
||||
<input type="hidden" name="dokument_id" value="{{ request('documentId') }}">
|
||||
<input type="hidden" name="action" value="rap">
|
||||
<input type="hidden" name="type" value="rap">
|
||||
@include('lpj::assetsku.includenya')
|
||||
@include('lpj::surveyor.components.header')
|
||||
@include('lpj::surveyor.components.rap')
|
||||
<div class="flex justify-end gap-2" style="margin-right: 20px; margin-top: 20px">
|
||||
<button type="button" class="btn btn-success" id="saveButton" onclick="submitData()">
|
||||
<span id="saveButtonText">Save</span>
|
||||
<div class="spinner-border spinner-border-sm text-light" role="status" style="display: none;"
|
||||
id="saveButtonSpinner">
|
||||
|
||||
</div>
|
||||
</button>
|
||||
@if (Auth::user()->hasAnyRole(['senior-officer']))
|
||||
<a href="_blank" class="btn btn-warning">
|
||||
Revisi
|
||||
</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>
|
||||
</form>
|
||||
</div>
|
||||
@endsection
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
function updateAlamatFields(status) {
|
||||
// Ambil elemen formulir
|
||||
const addressForm = document.getElementById('alamat_form');
|
||||
const inputs = addressForm.querySelectorAll('input, select');
|
||||
const addressInput = document.getElementById('address');
|
||||
|
||||
if (status === 'sesuai') {
|
||||
addressInput.value = "{{ $dokumen->address ?? '' }}";
|
||||
inputs.forEach(element => {
|
||||
if (element.tagName === 'INPUT') {
|
||||
element.setAttribute('readonly', true);
|
||||
} else if (element.tagName === 'SELECT') {
|
||||
element.setAttribute('disabled', true);
|
||||
element.classList.add('disabled-input')
|
||||
}
|
||||
});
|
||||
|
||||
addressForm.style.display = 'grid';
|
||||
addressForm.disabled = true;
|
||||
addressForm.classList.add('disabled-input')
|
||||
|
||||
|
||||
} else if (status === 'tidak sesuai') {
|
||||
addressForm.style.display = 'grid';
|
||||
|
||||
addressForm.removeAttribute('disabled');
|
||||
addressForm.classList.remove('disabled-input')
|
||||
const formInspeksi = @json($forminspeksi);
|
||||
const addressInput = document.getElementById('address');
|
||||
|
||||
if (formInspeksi && formInspeksi.asset && formInspeksi.asset.alamat) {
|
||||
if (formInspeksi.asset.alamat['tidak sesuai'] && formInspeksi.asset.alamat['tidak sesuai'].address) {
|
||||
addressInput.value = formInspeksi.asset.alamat['tidak sesuai'].address;
|
||||
} else if (formInspeksi.asset.alamat['sesuai'] && formInspeksi.asset.alamat['sesuai'].address) {
|
||||
addressInput.value = formInspeksi.asset.alamat['sesuai'].address;
|
||||
} else {
|
||||
addressInput.value = "";
|
||||
}
|
||||
}
|
||||
|
||||
inputs.forEach(element => {
|
||||
if (element.tagName === 'INPUT') {
|
||||
element.removeAttribute('readonly');
|
||||
} else if (element.tagName === 'SELECT') {
|
||||
element.removeAttribute('disabled');
|
||||
element.classList.remove('disabled-input')
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function toggleFieldVisibility(fieldName, inputId, visibleValues = []) {
|
||||
const selectedValue = $(`[name="${fieldName}"]:checked`).val();
|
||||
const inputField = $(`#${inputId}`);
|
||||
|
||||
if (visibleValues.includes(selectedValue)) {
|
||||
inputField.show();
|
||||
} else {
|
||||
inputField.hide().val('');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function toggleCheckboxVisibility(fieldName, inputId, visibleValues = []) {
|
||||
const selectedValues = $(`[name="${fieldName}[]"]:checked`)
|
||||
.map(function() {
|
||||
return $(this).val().toLowerCase(); // Konversi nilai ke huruf kecil
|
||||
})
|
||||
.get();
|
||||
|
||||
const inputField = $(`#${inputId}`);
|
||||
|
||||
// Cek apakah salah satu nilai yang dipilih cocok dengan visibleValues
|
||||
const shouldShow = visibleValues.some(value => selectedValues.includes(value.toLowerCase()));
|
||||
|
||||
if (shouldShow) {
|
||||
inputField.show();
|
||||
} else {
|
||||
inputField.hide().val('');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function toggleMultipleFields(fieldName, mappings) {
|
||||
// Ambil semua nilai checkbox yang dicentang
|
||||
const selectedValues = $(`[name="${fieldName}[]"]:checked`)
|
||||
.map(function() {
|
||||
return $(this).val().toLowerCase(); // Konversi nilai ke huruf kecil
|
||||
})
|
||||
.get();
|
||||
|
||||
// Iterasi melalui setiap mapping
|
||||
for (const [key, inputId] of Object.entries(mappings)) {
|
||||
const inputField = $(`#${inputId}`);
|
||||
|
||||
// Tampilkan input jika nilai yang relevan dipilih
|
||||
if (selectedValues.includes(key.toLowerCase())) {
|
||||
inputField.show();
|
||||
} else {
|
||||
inputField.hide().val(''); // Sembunyikan dan reset nilai
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function toggleAlamatVisibility(idSesuai, idTidakSesuai, selectedValue) {
|
||||
// Ambil elemen berdasarkan ID
|
||||
const alamatSesuai = document.getElementById(idSesuai);
|
||||
const alamatTidakSesuai = document.getElementById(idTidakSesuai);
|
||||
|
||||
// Periksa nilai yang dipilih dan tampilkan elemen yang sesuai
|
||||
if (selectedValue === 'sesuai') {
|
||||
alamatSesuai.style.display = 'grid'; // Tampilkan "Alamat Sesuai"
|
||||
alamatTidakSesuai.style.display = 'none'; // Sembunyikan "Alamat Tidak Sesuai"
|
||||
} else if (selectedValue === 'tidak sesuai') {
|
||||
alamatSesuai.style.display = 'none'; // Sembunyikan "Alamat Sesuai"
|
||||
alamatTidakSesuai.style.display = 'grid'; // Tampilkan "Alamat Tidak Sesuai"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function submitData() {
|
||||
showLoadingSwal('Mengirim data ke server...');
|
||||
const form = document.querySelector('form');
|
||||
const formData = new FormData(form);
|
||||
console.log('Form data entries:', Array.from(formData.entries()));
|
||||
|
||||
$.ajax({
|
||||
url: '{{ route('surveyor.store') }}',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
hideLoadingSwal();
|
||||
if (response.success) {
|
||||
Swal.fire({
|
||||
title: 'Berhasil!',
|
||||
text: response.message,
|
||||
icon: 'success',
|
||||
confirmButtonText: 'OK'
|
||||
}).then((response) => {
|
||||
if (response.isConfirmed) {
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: 'Error!',
|
||||
text: response.message || 'Terjadi kesalahan',
|
||||
icon: 'error',
|
||||
confirmButtonText: 'OK'
|
||||
});
|
||||
}
|
||||
console.log(response);
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
|
||||
let errors = xhr.responseJSON?.errors;
|
||||
$('.alert').text('');
|
||||
if (errors) {
|
||||
$.each(errors, function(key, value) {
|
||||
$(`#error-${key}`).text(value[0]);
|
||||
toastrErrorBuild(value[0]);
|
||||
});
|
||||
// toastrErrorBuild(error);
|
||||
}
|
||||
hideLoadingSwal();
|
||||
console.log(errors);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Ensure existing remove buttons are functional
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const removeButtons = document.querySelectorAll('.remove-btn');
|
||||
removeButtons.forEach(button => {
|
||||
button.addEventListener('click', function() {
|
||||
this.closest('.perwakilan').remove();
|
||||
});
|
||||
});
|
||||
|
||||
document.querySelectorAll('.number-format').forEach(input => {
|
||||
input.addEventListener('input', function() {
|
||||
formatNumber(this);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
function updateAnalisa(params) {
|
||||
const inputMap = {
|
||||
jenis_asset: 'jenis_asset_tidak_sesuai',
|
||||
analisa_tanah: 'analisa_tanah_tidak_sesuai',
|
||||
analisa_unit: 'analisa_luas_unit_tidak_sesuai',
|
||||
analisa_bangunan: 'analisa_bangunan_tidak_sesuai',
|
||||
};
|
||||
|
||||
// Pastikan elemen ID ada di inputMap
|
||||
if (!inputMap[params]) {
|
||||
console.error('Parameter tidak valid:', params);
|
||||
return;
|
||||
}
|
||||
|
||||
// Ambil nilai berdasarkan parameter
|
||||
const inputValue = document.getElementById(inputMap[params]).value;
|
||||
const data = {
|
||||
[params === 'jenis_asset' ? 'jenis_asset' : params.replace('analisa_', 'luas_')]: inputValue,
|
||||
types: params
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: '{{ route('surveyor.update_analisa', ['id' => $permohonan->id]) }}',
|
||||
type: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
if (response.success) {
|
||||
// window.location.href =
|
||||
// '{{ route('surveyor.show', ['id' => $permohonan->id]) }}';
|
||||
toastrSuccessBuild(response.message);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error('Terjadi error:', error);
|
||||
console.log('Status:', status);
|
||||
console.log('Response:', xhr.responseText);
|
||||
if (xhr.responseJSON.message) {
|
||||
toastrErrorBuild(xhr.responseJSON.message);
|
||||
} else {
|
||||
toastrErrorBuild('Terjadi kesalahan');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@include('lpj::surveyor.js.utils')
|
||||
@endpush
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
@section('breadcrumbs')
|
||||
{{ Breadcrumbs::render(request()->route()->getName()) }}
|
||||
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
@@ -164,37 +163,43 @@
|
||||
</thead>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(!empty($resumeData['fisik']))
|
||||
@foreach($resumeData['fisik'] as $item)
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<input type="text" name="fisik_sertifikat[]" class="input number-format" value="{{ $item['sertifikat'] }}">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="fisik_luas_tanah[]" class="input number-format" value="{{ $item['luas_tanah'] }}">
|
||||
</td>
|
||||
<td class="text-center"> <input type="text" name="fisik_luas_bangunan[]" value="{{ $item['luas_bangunan'] }}"
|
||||
class="input number-format"></td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="fisik_nilai[]" class="input number-format" value="{{ $item['nilai'] }}">
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<input type="text" name="fisik_sertifikat[]" class="input number-format">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="fisik_luas_tanah[]" class="input number-format">
|
||||
</td>
|
||||
<td class="text-center"> <input type="text" name="fisik_luas_bangunan[]"
|
||||
class="input number-format"></td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="fisik_nilai[]" class="input number-format">
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if (!empty($resumeData['fisik']))
|
||||
@foreach ($resumeData['fisik'] as $item)
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<input type="text" name="fisik_sertifikat[]"
|
||||
class="input number-format" value="{{ $item['sertifikat'] }}">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="fisik_luas_tanah[]"
|
||||
class="input number-format" value="{{ $item['luas_tanah'] }}">
|
||||
</td>
|
||||
<td class="text-center"> <input type="text"
|
||||
name="fisik_luas_bangunan[]" value="{{ $item['luas_bangunan'] }}"
|
||||
class="input number-format"></td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="fisik_nilai[]"
|
||||
class="input number-format" value="{{ $item['nilai'] }}">
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<input type="text" name="fisik_sertifikat[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="fisik_luas_tanah[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
<td class="text-center"> <input type="text" name="fisik_luas_bangunan[]"
|
||||
class="input number-format"></td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="fisik_nilai[]" class="input number-format">
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -217,47 +222,52 @@
|
||||
</thead>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(!empty($resumeData['fisik']))
|
||||
@foreach($resumeData['fisik'] as $item)
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<input type="text" name="sesuai_sertifikat[]" class="input number-format" value="{{ $item['sertifikat'] }}">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="sesuai_luas_tanah[]" class="input number-format" value="{{ $item['luas_tanah'] }}">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="sesuai_luas_bangunan[]"
|
||||
class="input number-format" value="{{ $item['luas_bangunan'] }}">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="sesuai_nilai[]" class="input number-format" value="{{ $item['nilai'] }}">
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<input type="text" name="sesuai_sertifikat[]" class="input number-format">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="sesuai_luas_tanah[]" class="input number-format">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="sesuai_luas_bangunan[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="sesuai_nilai[]" class="input number-format">
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if (!empty($resumeData['fisik']))
|
||||
@foreach ($resumeData['fisik'] as $item)
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<input type="text" name="sesuai_sertifikat[]"
|
||||
class="input number-format" value="{{ $item['sertifikat'] }}">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="sesuai_luas_tanah[]"
|
||||
class="input number-format" value="{{ $item['luas_tanah'] }}">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="sesuai_luas_bangunan[]"
|
||||
class="input number-format" value="{{ $item['luas_bangunan'] }}">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="sesuai_nilai[]"
|
||||
class="input number-format" value="{{ $item['nilai'] }}">
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<input type="text" name="sesuai_sertifikat[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="sesuai_luas_tanah[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="sesuai_luas_bangunan[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="sesuai_nilai[]" class="input number-format">
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(!empty($resumeData['tambahan']))
|
||||
@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">
|
||||
@@ -265,35 +275,41 @@
|
||||
<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>
|
||||
<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>
|
||||
</tr>
|
||||
</thead>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(!empty($resumeData['tambahan']))
|
||||
@foreach($resumeData['tambahan'] as $item)
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<input type="text" name="tambahan_sertifikat[]" class="input number-format" value="{{ $item['sertifikat'] }}">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="tambahan_luas_tanah[]" class="input number-format" value="{{ $item['luas_tanah'] }}">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="tambahan_luas_bangunan[]"
|
||||
class="input number-format" value="{{ $item['luas_bangunan'] }}">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="tambahan_nilai[]" class="input number-format" value="{{ $item['nilai'] }}">
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
@if (!empty($resumeData['tambahan']))
|
||||
@foreach ($resumeData['tambahan'] as $item)
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<input type="text" name="tambahan_sertifikat[]"
|
||||
class="input number-format"
|
||||
value="{{ $item['sertifikat'] }}">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="tambahan_luas_tanah[]"
|
||||
class="input number-format"
|
||||
value="{{ $item['luas_tanah'] }}">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="tambahan_luas_bangunan[]"
|
||||
class="input number-format"
|
||||
value="{{ $item['luas_bangunan'] }}">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="tambahan_nilai[]"
|
||||
class="input number-format" value="{{ $item['nilai'] }}">
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -319,10 +335,19 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
|
||||
<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']))
|
||||
<a href="_blank" class="btn btn-warning">
|
||||
Revisi
|
||||
</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>
|
||||
|
||||
@@ -415,12 +440,12 @@
|
||||
url: requestUrl,
|
||||
type: 'POST',
|
||||
data: JSON.stringify({
|
||||
permohonan_id: permohonanId,
|
||||
document_id: documentId,
|
||||
inspeksi_id: inspeksiId,
|
||||
resume: jsonData,
|
||||
}),
|
||||
contentType: 'application/json',
|
||||
permohonan_id: permohonanId,
|
||||
document_id: documentId,
|
||||
inspeksi_id: inspeksiId,
|
||||
resume: jsonData,
|
||||
}),
|
||||
contentType: 'application/json',
|
||||
|
||||
|
||||
headers: {
|
||||
@@ -436,8 +461,7 @@
|
||||
confirmButtonText: 'OK'
|
||||
}).then((response) => {
|
||||
if (response.isConfirmed) {
|
||||
window.location.href =
|
||||
'{{ route('penilai.show', ['id' => $permohonan->id]) }}';
|
||||
// window.location.reload();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@@ -476,7 +500,7 @@
|
||||
},
|
||||
fisik: [],
|
||||
sesuai_imb: [],
|
||||
tambahan:[],
|
||||
tambahan: [],
|
||||
keterangan: ""
|
||||
};
|
||||
|
||||
|
||||
@@ -117,7 +117,6 @@
|
||||
@php
|
||||
$surveyor = $permohonan->penilaian->userPenilai->where('role', 'surveyor')->first();
|
||||
$penilai = $permohonan->penilaian->userPenilai->where('role', 'penilai')->first();
|
||||
|
||||
@endphp
|
||||
<label class="form-label max-w-56">
|
||||
Surveyor
|
||||
@@ -554,41 +553,6 @@
|
||||
|
||||
}
|
||||
|
||||
|
||||
function checkLaporan(permohonanId, documentId, inspeksiId, jaminanId) {
|
||||
// showLoadingSwal('Tunggu...');
|
||||
fetch(
|
||||
`{{ url('/penilai/check-laporan') }}?permohonanId=${permohonanId}&documentId=${documentId}&inspeksiId=${inspeksiId}`
|
||||
)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.status) {
|
||||
// Jika laporan ada, arahkan ke halaman cetak
|
||||
|
||||
window.location.href =
|
||||
`{{ route('penilai.print-out') }}?permohonanId=${permohonanId}&documentId=${documentId}&inspeksiId=${inspeksiId}&jaminanId=${jaminanId}&statusLpj=0&type=${data.status}`;
|
||||
} else {
|
||||
// Jika laporan belum ada, tampilkan pesan peringatan
|
||||
Swal.fire({
|
||||
title: 'Laporan Belum Ada',
|
||||
text: 'Silakan isi laporan terlebih dahulu sebelum mencetak.',
|
||||
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>
|
||||
|
||||
@include('lpj::surveyor.js.utils')
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
<span id="saveButtonText">Revisi</span>
|
||||
</button>
|
||||
|
||||
<a href="{{ route('penilai.print-out') }}?permohonanId={{ $permohonan->id }}&documentId={{ $documentId }}&inspeksiId={{ $inspeksiId }}&jaminanId={{ $jenisJaminanId }}&statusLpj=0"
|
||||
class="btn btn-primary">
|
||||
<a
|
||||
class="btn btn-primary" onclick="checkLaporan('{{ $permohonan->id }}', '{{ $documentId }}', '{{ $inspeksiId }}', {{ $jenisJaminanId }}, )">
|
||||
<i class="ki-filled ki-printer"></i> Print
|
||||
</a>
|
||||
|
||||
@@ -38,4 +38,7 @@
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
<script>
|
||||
|
||||
</script>
|
||||
@include('lpj::surveyor.js.utils')
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
$jenisJaminanId = null;
|
||||
foreach ($permohonan->debiture->documents as $item) {
|
||||
foreach ($item->inspeksi as $key => $value) {
|
||||
$inspeksiId = $item->id;
|
||||
$inspeksiId = $value->id;
|
||||
}
|
||||
$documentId = $item->id;
|
||||
$jenisJaminanId = $item->jenis_jaminan_id;
|
||||
|
||||
@@ -59,8 +59,7 @@
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
const datas = @json($forminspeksi);
|
||||
console.log(datas);
|
||||
|
||||
|
||||
function updateAlamatFields(status) {
|
||||
// Ambil elemen formulir
|
||||
|
||||
@@ -97,14 +97,14 @@
|
||||
<div class="w-full">
|
||||
<div id="lainnya_developer-container" class="flex flex-wrap items-baseline w-full">
|
||||
@if (!empty($forminspeksi['lainnya_developer']))
|
||||
@foreach ($forminspeksi['lainnya_developer'] as $item)
|
||||
@foreach ($forminspeksi['lainnya_developer'] as $index => $item)
|
||||
<div class="lainnya_developer flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="lainnya_developer[]" rows="3">{{ old("lainnya_developer.$index", $positif) }}</textarea>
|
||||
<textarea class="textarea mt-2" name="lainnya_developer[]" rows="3">{{ old("lainnya_developer.$index", $item) }}</textarea>
|
||||
</div>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
@endforeach>
|
||||
@endforeach
|
||||
@else
|
||||
<div class="lainnya_developer flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="lainnya_developer[]" rows="3">{{ old('lainnya_developer.0', '') }}</textarea>
|
||||
|
||||
@@ -302,4 +302,40 @@
|
||||
console.error('Error fetching villages:', error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function checkLaporan(permohonanId, documentId, inspeksiId, jaminanId) {
|
||||
// showLoadingSwal('Tunggu...');
|
||||
fetch(
|
||||
`{{ url('/penilai/check-laporan') }}?permohonanId=${permohonanId}&documentId=${documentId}&inspeksiId=${inspeksiId}`
|
||||
)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.status) {
|
||||
// Jika laporan ada, arahkan ke halaman cetak
|
||||
|
||||
window.location.href =
|
||||
`{{ route('penilai.print-out') }}?permohonanId=${permohonanId}&documentId=${documentId}&inspeksiId=${inspeksiId}&jaminanId=${jaminanId}&statusLpj=0&type=${data.status}`;
|
||||
} else {
|
||||
// Jika laporan belum ada, tampilkan pesan peringatan
|
||||
Swal.fire({
|
||||
title: 'Laporan Belum Ada',
|
||||
text: 'Silakan isi laporan terlebih dahulu sebelum mencetak.',
|
||||
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>
|
||||
|
||||
@@ -615,6 +615,10 @@
|
||||
$trail->parent('penilai.show');
|
||||
$trail->push('Paparan');
|
||||
});
|
||||
Breadcrumbs::for('penilai.rap', function (BreadcrumbTrail $trail) {
|
||||
$trail->parent('penilai.show');
|
||||
$trail->push('RAP');
|
||||
});
|
||||
|
||||
|
||||
Breadcrumbs::for('sla', function (BreadcrumbTrail $trail) {
|
||||
|
||||
Reference in New Issue
Block a user