fix(penilai): print out laporan
This commit is contained in:
@@ -99,10 +99,15 @@
|
||||
Status Bayar
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<span
|
||||
class="text-md font-bold {{ $permohonan->status_bayar === 'belum_bayar' ? 'text-red-600' : 'text-green-600' }} uppercase">
|
||||
{{ str_replace('_', ' ', $permohonan->status_bayar) }}
|
||||
</span>
|
||||
@if (strtolower($permohonan->tujuanPenilaian->name) ==
|
||||
'penilaian ulang')
|
||||
<span>-</span>
|
||||
@else
|
||||
<span
|
||||
class="text-md font-bold {{ $permohonan->status_bayar === 'belum_bayar' ? 'text-red-600' : 'text-green-600' }} uppercase">
|
||||
{{ str_replace('_', ' ', $permohonan->status_bayar) }}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -190,17 +195,16 @@
|
||||
</div>
|
||||
|
||||
@if ($permohonan->status == 'revisi-laporan')
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Catatan Revisi
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
{{ $permohonan->keterangan ?? '' }}
|
||||
</p>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Catatan Revisi
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
{{ $permohonan->keterangan ?? '' }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
</div>
|
||||
@@ -226,7 +230,8 @@
|
||||
Kertas Kerja
|
||||
</a>
|
||||
@endif
|
||||
<a class="btn btn-primary" onclick="paparan({{ $permohonan->id }}, {{ $dokumen->id }}, {{ $inspeksiId }}, {{ $dokumen->jenis_jaminan_id }})">
|
||||
<a class="btn btn-primary"
|
||||
onclick="paparan({{ $permohonan->id }}, {{ $dokumen->id }}, {{ $inspeksiId }}, {{ $dokumen->jenis_jaminan_id }})">
|
||||
Paparan
|
||||
</a>
|
||||
|
||||
@@ -295,9 +300,6 @@
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
{{-- @if ($permohonan->penilaian->jenis_penilaian_id == 2 && $permohonan->tujuanPenilaian->id == 4) --}}
|
||||
<div class="menu-item">
|
||||
<a class="menu-link"
|
||||
onclick="callReport('{{ $permohonan->id }}', '{{ $dokumen->id }}', '{{ $inspeksiId }}', {{ $dokumen->jenis_jaminan_id }})">
|
||||
@@ -310,6 +312,10 @@
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- @if ($permohonan->penilaian->jenis_penilaian_id == 2 && $permohonan->tujuanPenilaian->id == 4) --}}
|
||||
|
||||
{{-- @endif --}}
|
||||
|
||||
</div>
|
||||
@@ -319,8 +325,8 @@
|
||||
|
||||
<div class="flex justify-end gap-5">
|
||||
|
||||
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => $dokumen->id, 'jenis_jaminan_id' => $dokumen->jenis_jaminan_id]) }}" class="btn btn-light"
|
||||
>
|
||||
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => $dokumen->id, 'jenis_jaminan_id' => $dokumen->jenis_jaminan_id]) }}"
|
||||
class="btn btn-light">
|
||||
<i class="ki-filled ki-printer"></i> Cetak Hasil Inspeksi
|
||||
</a>
|
||||
|
||||
@@ -345,7 +351,9 @@
|
||||
REPORT
|
||||
</a>
|
||||
|
||||
<a class="btn btn-warning" {{ $permohonan->status == 'proses-paparan' || $permohonan->status == 'proses-laporan' ? 'disabled' : '' }} onclick="revisiSurveyor('{{ $permohonan->id }}', '{{$permohonan->debiture->name }}', '{{$permohonan->nomor_registrasi }}')">
|
||||
<a class="btn btn-warning"
|
||||
{{ $permohonan->status == 'proses-paparan' || $permohonan->status == 'proses-laporan' ? 'disabled' : '' }}
|
||||
onclick="revisiSurveyor('{{ $permohonan->id }}', '{{ $permohonan->debiture->name }}', '{{ $permohonan->nomor_registrasi }}')">
|
||||
<i class="ki-filled ki-arrow-circle-right"></i>
|
||||
REVISI
|
||||
</a>
|
||||
@@ -407,10 +415,10 @@
|
||||
</div>
|
||||
<div class="flex justify-between items-center">
|
||||
@if (isset($permohonan->penilai) && isset($permohonan->penilai->kertas_kerja) && $permohonan->penilai->kertas_kerja)
|
||||
<span data-modal-dismiss="true" class="btn btn-warning btn-outline"
|
||||
onclick="viewPDF('{{ Storage::url($permohonan->penilai->kertas_kerja) }}')"><i
|
||||
class="ki-filled ki-eye mr-2"></i>Lihat Kertas Kerja</span>
|
||||
@endif
|
||||
<span data-modal-dismiss="true" class="btn btn-warning btn-outline"
|
||||
onclick="viewPDF('{{ Storage::url($permohonan->penilai->kertas_kerja) }}')"><i
|
||||
class="ki-filled ki-eye mr-2"></i>Lihat Kertas Kerja</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -610,7 +618,8 @@
|
||||
confirmButtonText: 'Yes'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
window.location.href = `/penilai/${permohonanId}/edit?document_id=${documentId}&inspeksi_id=${inspeksiId}&jaminanId=${jaminanId}`;
|
||||
window.location.href =
|
||||
`/penilai/${permohonanId}/edit?document_id=${documentId}&inspeksi_id=${inspeksiId}&jaminanId=${jaminanId}`;
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -635,7 +644,7 @@
|
||||
// window.location.reload();
|
||||
hideLoadingSwal();
|
||||
toastrSuccessBuild(response.message);
|
||||
}else{
|
||||
} else {
|
||||
// hideLoadingSwal();
|
||||
Swal.fire('Perhatian!', response.message, 'warning');
|
||||
}
|
||||
@@ -658,52 +667,52 @@
|
||||
|
||||
function revisiSurveyor(dataId, debitur, noreg) {
|
||||
|
||||
Swal.fire({
|
||||
title: 'Apakah Anda yakin?',
|
||||
text: `Untuk melakukan Revisi nomor registrasi ${noreg} atas nama debiture ${debitur} !`,
|
||||
icon: 'warning',
|
||||
input: 'textarea',
|
||||
inputLabel: 'Keterangan',
|
||||
inputPlaceholder: 'Masukkan keterangan...',
|
||||
inputAttributes: {
|
||||
'aria-label': 'Masukkan keterangan'
|
||||
Swal.fire({
|
||||
title: 'Apakah Anda yakin?',
|
||||
text: `Untuk melakukan Revisi nomor registrasi ${noreg} atas nama debiture ${debitur} !`,
|
||||
icon: 'warning',
|
||||
input: 'textarea',
|
||||
inputLabel: 'Keterangan',
|
||||
inputPlaceholder: 'Masukkan keterangan...',
|
||||
inputAttributes: {
|
||||
'aria-label': 'Masukkan keterangan'
|
||||
},
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Ya, Lanjutkan!',
|
||||
cancelButtonText: 'Batal',
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
const userMessage = result.value || '';
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||
},
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Ya, Lanjutkan!',
|
||||
cancelButtonText: 'Batal',
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
const userMessage = result.value || '';
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||
},
|
||||
});
|
||||
$.ajax({
|
||||
url: `/penilai/revisi-surveyor/${dataId}`,
|
||||
type: 'PUT',
|
||||
data: {
|
||||
message: userMessage
|
||||
},
|
||||
success: (response) => {
|
||||
Swal.fire('Berhasil!', response.message , 'success').then(
|
||||
});
|
||||
$.ajax({
|
||||
url: `/penilai/revisi-surveyor/${dataId}`,
|
||||
type: 'PUT',
|
||||
data: {
|
||||
message: userMessage
|
||||
},
|
||||
success: (response) => {
|
||||
Swal.fire('Berhasil!', response.message, 'success').then(
|
||||
() => {
|
||||
window.location.href =
|
||||
'{{ route('penilai.index') }}';
|
||||
});
|
||||
console.log(response);
|
||||
},
|
||||
error: (error) => {
|
||||
console.error('Error:', error);
|
||||
Swal.fire('Gagal!', 'Terjadi kesalahan saat melakukan Revisi.',
|
||||
'error');
|
||||
}
|
||||
});
|
||||
window.location.href =
|
||||
'{{ route('penilai.index') }}';
|
||||
});
|
||||
console.log(response);
|
||||
},
|
||||
error: (error) => {
|
||||
console.error('Error:', error);
|
||||
Swal.fire('Gagal!', 'Terjadi kesalahan saat melakukan Revisi.',
|
||||
'error');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
@include('lpj::surveyor.js.utils')
|
||||
|
||||
Reference in New Issue
Block a user