fix: update dokumentId and fix save penilai rap
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
@include('lpj::assetsku.includenya')
|
||||
<form id="form-lpj" method="post" class="w-full grid gap-5">
|
||||
<input type="hidden" name="permohonan_id" value="{{ $permohonan->id }}">
|
||||
<input type="hidden" name="dokument_id" value="{{ request('dokument') }}">
|
||||
<input type="hidden" name="dokument_id" value="{{ request('documentId') }}">
|
||||
<input type="hidden" name="nomor_registrasi" value="{{ $permohonan->nomor_registrasi }}">
|
||||
<input type="hidden" id="lpj-data" value="{{ json_encode($lpjData ?? []) }}" />
|
||||
@include('lpj::component.form-penilai')
|
||||
@@ -52,15 +52,15 @@
|
||||
@endif
|
||||
@if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal', 'administrator']))
|
||||
<a class="btn btn-info"
|
||||
href="{{ route('penilai.lampiran') }}?permohonanId={{ $permohonan->id }}&documentId={{ request('dokument') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
|
||||
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('dokument'), 'jenis_jaminan_id' => request('jaminanId')]) }}" class="btn btn-light"
|
||||
<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('dokument') }}', {{ request('jaminanId') }}, 0)">
|
||||
onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', {{ request('jaminanId') }}, 0)">
|
||||
<i class="ki-filled ki-printer"></i> Cetak Laporan
|
||||
</a>
|
||||
@endif
|
||||
|
||||
@@ -14,14 +14,16 @@
|
||||
<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="card">
|
||||
<div class="card-header bg-agi-50">
|
||||
<h3 class="card-title uppercase">
|
||||
RAP
|
||||
</h3>
|
||||
<a href="{{ route('penilai.show', $permohonan->id) }}" class="btn btn-xs btn-info">
|
||||
<i class="ki-filled ki-exit-left"></i> Back
|
||||
</a>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="card-body grid gap-5">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
@@ -64,24 +66,27 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('lpj::surveyor.components.header')
|
||||
@include('lpj::surveyor.components.rap')
|
||||
<div class="flex justify-end gap-2" style="margin-right: 20px; margin-top: 20px">
|
||||
@if (Auth::user()->hasAnyRole(['senior-officer', 'surveyor', 'administrator']))
|
||||
<button type="button" class="btn btn-primary" id="saveButton" onclick="submitData()" {{ $permohonan->status == 'proses-paparan' || $permohonan->status == 'proses-laporan' && Auth::user()->hasAnyRole(['surveyor']) ? 'disabled' : '' }}>
|
||||
<i class="ki-filled ki-save-2"></i>
|
||||
<span id="saveButtonText" >Save</span>
|
||||
<div class="spinner-border spinner-border-sm text-light" role="status" style="display: none;"
|
||||
id="saveButtonSpinner">
|
||||
<button type="button" class="btn btn-primary" id="saveButton" onclick="submitData()"
|
||||
{{ $permohonan->status == 'proses-paparan' || ($permohonan->status == 'proses-laporan' && Auth::user()->hasAnyRole(['surveyor'])) ? 'disabled' : '' }}>
|
||||
<i class="ki-filled ki-save-2"></i>
|
||||
<span id="saveButtonText">Save</span>
|
||||
<div class="spinner-border spinner-border-sm text-light" role="status" style="display: none;"
|
||||
id="saveButtonSpinner">
|
||||
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</button>
|
||||
@endif
|
||||
@if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal', 'administrator']))
|
||||
<a class="btn btn-info"
|
||||
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&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"
|
||||
>
|
||||
<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"
|
||||
|
||||
@@ -493,11 +493,11 @@
|
||||
if (data.status === 'standar') {
|
||||
showLoadingSwal('Tunggu ...');
|
||||
window.location.href =
|
||||
`{{ route('penilai.standar', $permohonan->id) }}?dokument=${documentId}&jaminanId=${jaminanId}`;
|
||||
`{{ route('penilai.standar', $permohonan->id) }}?documentId=${documentId}&jaminanId=${jaminanId}`;
|
||||
} else if (data.status === 'sederhana') {
|
||||
showLoadingSwal('Tunggu ...');
|
||||
window.location.href =
|
||||
`{{ route('penilai.sederhana', $permohonan->id) }}?dokument=${documentId}&jaminanId=${jaminanId}`;
|
||||
`{{ route('penilai.sederhana', $permohonan->id) }}?documentId=${documentId}&jaminanId=${jaminanId}`;
|
||||
}
|
||||
} else {
|
||||
if (fasilitasKredit.toUpperCase() === 'KPR KERJASAMA') {
|
||||
@@ -556,10 +556,10 @@
|
||||
if (data.success) {
|
||||
if (type === 'standar') {
|
||||
window.location.href =
|
||||
`{{ route('penilai.standar', $permohonan->id) }}?dokument=${documentId}&jaminanId=${jaminanId}`;
|
||||
`{{ route('penilai.standar', $permohonan->id) }}?documentId=${documentId}&jaminanId=${jaminanId}`;
|
||||
} else if (type === 'sederhana') {
|
||||
window.location.href =
|
||||
`{{ route('penilai.sederhana', $permohonan->id) }}?dokument=${documentId}&jaminanId=${jaminanId}`;
|
||||
`{{ route('penilai.sederhana', $permohonan->id) }}?documentId=${documentId}&jaminanId=${jaminanId}`;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -640,7 +640,7 @@
|
||||
function rap(permohonanId, documentId, jaminanId) {
|
||||
showLoadingSwal('Tunggu ...');
|
||||
window.location.href =
|
||||
`{{ route('penilai.rap') }}?permohonanId=${permohonanId}&dokument=${documentId}&jaminanId=${jaminanId}`;
|
||||
`{{ route('penilai.rap') }}?permohonanId=${permohonanId}&documentId=${documentId}&jaminanId=${jaminanId}`;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
'url' =>
|
||||
route('surveyor.inspeksi', [
|
||||
'id' => $permohonan->id,
|
||||
]) . "?dokument={$jaminanId}&jenis_jaminan={$dokumen->jenisJaminan->id}",
|
||||
]) . "?documentId={$jaminanId}&jenis_jaminan={$dokumen->jenisJaminan->id}",
|
||||
'show' => true,
|
||||
'icon' => !empty($currentInspeksi['data_form']),
|
||||
],
|
||||
@@ -27,7 +27,7 @@
|
||||
'url' =>
|
||||
route('surveyor.denah', [
|
||||
'id' => $permohonan->id,
|
||||
]) . "?dokument={$jaminanId}&jenis_jaminan={$dokumen->jenisJaminan->id}",
|
||||
]) . "?documentId={$jaminanId}&jenis_jaminan={$dokumen->jenisJaminan->id}",
|
||||
'show' => true,
|
||||
'icon' => !empty($currentInspeksi['denah_form']),
|
||||
];
|
||||
@@ -39,7 +39,7 @@
|
||||
'url' =>
|
||||
route('surveyor.foto', [
|
||||
'id' => $permohonan->id,
|
||||
]) . "?dokument={$jaminanId}&jenis_jaminan={$dokumen->jenisJaminan->id}",
|
||||
]) . "?documentId={$jaminanId}&jenis_jaminan={$dokumen->jenisJaminan->id}",
|
||||
'show' => true,
|
||||
'icon' => !empty($currentInspeksi['foto_form']),
|
||||
],
|
||||
@@ -48,7 +48,7 @@
|
||||
'url' =>
|
||||
route('surveyor.data-pembanding', [
|
||||
'id' => $permohonan->id,
|
||||
]) . "?dokument={$jaminanId}&jenis_jaminan={$dokumen->jenisJaminan->id}",
|
||||
]) . "?documentId={$jaminanId}&jenis_jaminan={$dokumen->jenisJaminan->id}",
|
||||
'show' => true,
|
||||
'icon' => !empty($currentInspeksi['data_pembanding']),
|
||||
],
|
||||
@@ -84,7 +84,7 @@
|
||||
<a href="{{ route('surveyor.inspeksi', ['id' => $permohonan->id]) .
|
||||
'?' .
|
||||
http_build_query([
|
||||
'dokument' => $jaminanId,
|
||||
'documentId' => $jaminanId,
|
||||
'jenis_jaminan' => $dokumen->jenisJaminan->id,
|
||||
]) }}"
|
||||
class="flex items-center justify-between border border-gray-200 rounded-xl gap-2 px-4 py-4 btn-outline {{ !empty($currentInspeksi['data_form']) ? 'btn-success' : 'btn-primary' }} hover:btn-light">
|
||||
@@ -109,7 +109,7 @@
|
||||
<a href="{{ route('surveyor.foto', ['id' => $permohonan->id]) .
|
||||
'?' .
|
||||
http_build_query([
|
||||
'dokument' => $jaminanId,
|
||||
'documentId' => $jaminanId,
|
||||
'jenis_jaminan' => $dokumen->jenisJaminan->id,
|
||||
]) }}"
|
||||
class="flex items-center justify-between border border-gray-200 rounded-xl gap-2 px-4 py-4 btn-outline {{ !empty($currentInspeksi['foto_form']) ? 'btn-success' : 'btn-primary' }} hover:btn-light">
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
@csrf
|
||||
<input type="hidden" name="permohonan_id" value="{{ $permohonan->id }}">
|
||||
|
||||
<input type="hidden" name="dokument_id" value="{{ request('dokument') }}">
|
||||
<input type="hidden" name="dokument_id" value="{{ request('documentId') }}">
|
||||
<input type="hidden" name="nomor_registrasi" value="{{ $permohonan->nomor_registrasi }}">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
|
||||
<form id="formFoto" method="POST" class="grid gap-5" enctype="multipart/form-data">
|
||||
<input type="hidden" name="permohonan_id" value="{{ $permohonan->id }}">
|
||||
<input type="hidden" name="dokument_id" value="{{ request('dokument') }}">
|
||||
<input type="hidden" name="dokument_id" value="{{ request('documentId') }}">
|
||||
<input type="hidden" name="nomor_registrasi" value="{{ $permohonan->nomor_registrasi }}">
|
||||
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
|
||||
params: {
|
||||
permohonan_id: {{ $permohonan->id ?? 0 }},
|
||||
dokument_id: '{{ request('dokument') ?? '' }}',
|
||||
dokument_id: '{{ request('documentId') ?? '' }}',
|
||||
param_name: paramName,
|
||||
nomor_registrasi: '{{ $permohonan->nomor_registrasi ?? '' }}',
|
||||
},
|
||||
@@ -531,7 +531,7 @@
|
||||
method: 'GET',
|
||||
data: {
|
||||
permohonan_id: {{ $permohonan->id ?? 0 }},
|
||||
dokument_id: '{{ request('dokument') ?? '' }}',
|
||||
dokument_id: '{{ request('documentId') ?? '' }}',
|
||||
param_name: paramName
|
||||
},
|
||||
headers: {
|
||||
@@ -881,7 +881,7 @@
|
||||
data: {
|
||||
path: response.path,
|
||||
permohonan_id: {{ $permohonan->id ?? 0 }},
|
||||
dokument_id: '{{ request('dokument') ?? '' }}',
|
||||
dokument_id: '{{ request('documentId') ?? '' }}',
|
||||
param_name: response.param_name
|
||||
},
|
||||
headers: {
|
||||
@@ -916,7 +916,7 @@
|
||||
},
|
||||
data: {
|
||||
permohonan_id: {{ $permohonan->id }},
|
||||
dokument_id: '{{ request('dokument') ?? '' }}',
|
||||
dokument_id: '{{ request('documentId') ?? '' }}',
|
||||
name: $('#editDataName').val(),
|
||||
description: $('#editDataDescription').val(),
|
||||
category: $('#editDataCategory').val(),
|
||||
|
||||
@@ -342,7 +342,7 @@
|
||||
// Buat FormData untuk mengirim file
|
||||
const formData = new FormData();
|
||||
|
||||
const dokument = "{{ request('dokument') }}";
|
||||
const dokument = "{{ request('documentId') }}";
|
||||
const permohonan = "{{ $permohonan->id }}";
|
||||
formData.append('file', file);
|
||||
formData.append('dokument_id', dokument);
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<i class="ki-filled ki-save-2"></i>
|
||||
<span id="saveButtonText">Simpan</span>
|
||||
</button>
|
||||
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => request('dokument'), 'jenis_jaminan_id' => request('jenis_jaminan')]) }}"
|
||||
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => request('documentId'), 'jenis_jaminan_id' => request('jenis_jaminan')]) }}"
|
||||
class="btn btn-info" id="saveButton">
|
||||
<i class="ki-filled ki-printer"></i>
|
||||
<span>Cetak Form Inspeksi</span>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class="card-header bg-agi-50">
|
||||
<h3 class="card-title">Data Pembanding</h3>
|
||||
<div class="flex items-center gap-2">
|
||||
@if (Request::is('penilai/show-data-pembanding/*/edit') && request()->has('dokument') && request()->has('jenis_jaminan'))
|
||||
@if (Request::is('penilai/show-data-pembanding/*/edit') && request()->has('documentId') && request()->has('jenis_jaminan'))
|
||||
<a href="{{ url()->previous() }}" class="btn btn-xs btn-info">
|
||||
<i class="ki-filled ki-exit-left"></i> Back
|
||||
</a>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class="card-header bg-agi-50">
|
||||
<h3 class="card-title">Data Pembanding</h3>
|
||||
<div class="flex items-center gap-2">
|
||||
@if (Request::is('penilai/show-data-pembanding/*/edit') && request()->has('dokument') && request()->has('jenis_jaminan'))
|
||||
@if (Request::is('penilai/show-data-pembanding/*/edit') && request()->has('documentId') && request()->has('jenis_jaminan'))
|
||||
<a href="{{ url()->previous() }}" class="btn btn-xs btn-info">
|
||||
<i class="ki-filled ki-exit-left"></i> Back
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user