Merge pull request 'feature/senior-officer' (#123) from feature/senior-officer into staging
Reviewed-on: #123
This commit is contained in:
@@ -236,6 +236,7 @@ class SurveyorController extends Controller
|
||||
'alat-berat' => 'getAlatBeratData',
|
||||
'lingkungan' => 'getLingkunganData',
|
||||
'fakta' => 'getFactData',
|
||||
'informasi' => 'getFactData',
|
||||
'rap' => 'getRapData',
|
||||
];
|
||||
|
||||
@@ -966,8 +967,11 @@ class SurveyorController extends Controller
|
||||
'keterangan' => 'required',
|
||||
]);
|
||||
|
||||
|
||||
$penilaian = Penilaian::findOrFail($id);
|
||||
|
||||
$permohonan = Permohonan::where('nomor_registrasi', $penilaian->nomor_registrasi)->first();
|
||||
;
|
||||
if (Carbon::parse($validate['waktu_penilaian']) <= Carbon::parse($penilaian->tanggal_kunjungan)) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
@@ -985,7 +989,9 @@ class SurveyorController extends Controller
|
||||
|
||||
SendJadwalKunjunganEmailJob::dispatch($emailData);
|
||||
|
||||
|
||||
$permohonan->update([
|
||||
'status' => 'request-jadwal',
|
||||
]);
|
||||
|
||||
|
||||
$penilaian->update([
|
||||
@@ -1471,8 +1477,8 @@ class SurveyorController extends Controller
|
||||
'dokument_id' => 'required',
|
||||
'name_foto_objek' => 'nullable|string',
|
||||
'nomor_registrasi' => 'required|string',
|
||||
'foto_objek' => 'nullable|image|max:'.$maxSize,
|
||||
'foto_objek_pembanding.*' => 'nullable|image|max:'.$maxSize,
|
||||
'foto_objek' => 'nullable|jpeg|png|jpg|gif|svg|max:'.$maxSize,
|
||||
'foto_objek_pembanding.*' => 'nullable|jpeg|png|jpg|gif|svg|max:'.$maxSize,
|
||||
]);
|
||||
|
||||
$tanahBangunanTypes = ['KAPAL', 'PESAWAT', 'KENDARAAN', 'ALAT BERAT', 'MESIN'];
|
||||
@@ -2106,7 +2112,7 @@ class SurveyorController extends Controller
|
||||
});
|
||||
}
|
||||
|
||||
$query->whereRaw('LOWER(status) IN (?, ?, ?, ?, ?, ? ,?,?)', ['assign', 'survey', 'proses-survey', 'request-reschedule', 'reschedule', 'rejected-reschedule', 'approved-reschedule', 'revisi-survey' ]);
|
||||
$query->whereRaw('LOWER(status) IN (?, ?, ?, ?, ?, ? ,?,?, ?)', ['assign', 'survey', 'proses-survey', 'request-reschedule', 'reschedule', 'rejected-reschedule', 'approved-reschedule', 'revisi-survey', 'request-jadwal' ]);
|
||||
|
||||
|
||||
if (!Auth::user()->hasRole('administrator')) {
|
||||
@@ -2456,7 +2462,7 @@ class SurveyorController extends Controller
|
||||
|
||||
'kordinat_lng' => $data['kordinat_lng'] ?? null,
|
||||
'kordinat_lat' => $data['kordinat_lat'] ?? null,
|
||||
'nomor_nib' => $data['nomor_nib'] ?? null
|
||||
// 'nomor_nib' => $data['nomor_nib'] ?? null
|
||||
]
|
||||
];
|
||||
}
|
||||
@@ -2668,7 +2674,8 @@ class SurveyorController extends Controller
|
||||
'foto_bhumi',
|
||||
'foto_argis_region',
|
||||
'foto_tempat',
|
||||
'foto_sentuh_tanahku'
|
||||
'foto_sentuh_tanahku',
|
||||
'upload_gs'
|
||||
];
|
||||
|
||||
if ($inspeksi) {
|
||||
@@ -3638,7 +3645,7 @@ class SurveyorController extends Controller
|
||||
$namaDebiture = $permohonan->debiture->name . '-' . $permohonan->nomor_registrasi;
|
||||
$fileName = 'inspeksi-' . $namaDebiture . '-data.pdf';
|
||||
|
||||
return $pdf->download($fileName);
|
||||
return $pdf->stream($fileName);
|
||||
}
|
||||
|
||||
public function approveReschedule(Request $request, $id)
|
||||
|
||||
@@ -30,8 +30,9 @@
|
||||
|
||||
/* Image Styling */
|
||||
.photo-item img {
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
width: auto;
|
||||
height: 400px;
|
||||
max-height: 400px;
|
||||
object-fit: contain;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 5px;
|
||||
@@ -46,24 +47,27 @@
|
||||
|
||||
/* Media Print */
|
||||
@media print {
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
td {
|
||||
vertical-align: top;
|
||||
text-align: center;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
.photo-image {
|
||||
width: auto;
|
||||
height: 400px;
|
||||
max-height: 400px;
|
||||
}
|
||||
.page-break {
|
||||
page-break-after: always;
|
||||
}
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
td {
|
||||
vertical-align: top;
|
||||
text-align: center;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
.photo-image {
|
||||
width: auto;
|
||||
height: 400px;
|
||||
max-height: 400px;
|
||||
}
|
||||
|
||||
.page-break {
|
||||
page-break-after: always;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@isset($basicData['foto'])
|
||||
@@ -81,8 +85,6 @@
|
||||
@if ($groupedPhotos->isEmpty())
|
||||
<p class="text-gray-500">Tidak ada foto yang tersedia.</p>
|
||||
@else
|
||||
|
||||
|
||||
@foreach ($mainPhotos as $category => $photos)
|
||||
@php
|
||||
$groupedBySubcategory = $photos->groupBy('sub');
|
||||
@@ -91,12 +93,13 @@
|
||||
@foreach ($groupedBySubcategory as $subcategory => $subPhotos)
|
||||
@if (count($subPhotos) > 0)
|
||||
@foreach ($subPhotos->chunk(2) as $chunkedPhotos)
|
||||
<table width="100%" border="0" style="align-content: center; text-align: center; margin-bottom: 20px">
|
||||
@foreach ($chunkedPhotos as $item)
|
||||
@php
|
||||
$imagePath = storage_path('app/public/' . $item['path']);
|
||||
@endphp
|
||||
<tr>
|
||||
<table width="100%" border="0"
|
||||
style="align-content: center; text-align: center; margin-bottom: 20px">
|
||||
@foreach ($chunkedPhotos as $item)
|
||||
@php
|
||||
$imagePath = storage_path('app/public/' . $item['path']);
|
||||
@endphp
|
||||
<tr>
|
||||
<td style="width: 100%; padding: 10px;" class="photo-item border">
|
||||
<p style="font-weight: medium; font-size: 10px">{{ $category }} -
|
||||
@isset($subcategory)
|
||||
@@ -114,10 +117,10 @@
|
||||
@endisset
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@if (count($chunkedPhotos) < 2)
|
||||
<tr style="width: 100%;"></tr>
|
||||
@endif
|
||||
@endforeach
|
||||
@if (count($chunkedPhotos) < 2)
|
||||
<tr style="width: 100%;"></tr>
|
||||
@endif
|
||||
</table>
|
||||
<div class="page-break"></div>
|
||||
@endforeach
|
||||
@@ -129,12 +132,13 @@
|
||||
@foreach ($otherPhotos->groupBy('sub') as $subcategory => $subPhotos)
|
||||
@if (count($subPhotos) > 0)
|
||||
@foreach ($subPhotos->chunk(2) as $chunkedPhotos)
|
||||
<table width="100%" border="0" style="align-content: center; text-align: center; margin-bottom: 20px">
|
||||
@foreach ($chunkedPhotos as $item)
|
||||
@php
|
||||
$imagePath = storage_path('app/public/' . $item['path']);
|
||||
@endphp
|
||||
<tr>
|
||||
<table width="100%" border="0"
|
||||
style="align-content: center; text-align: center; margin-bottom: 20px">
|
||||
@foreach ($chunkedPhotos as $item)
|
||||
@php
|
||||
$imagePath = storage_path('app/public/' . $item['path']);
|
||||
@endphp
|
||||
<tr>
|
||||
<td style="width: 100%; padding: 10px;" class="photo-item border">
|
||||
<p style="font-weight: medium; font-size: 10px">Lainnya -
|
||||
@isset($subcategory)
|
||||
@@ -151,7 +155,7 @@
|
||||
<p style="font-size:9px">{{ $item['description'] }}</p>
|
||||
@endisset
|
||||
</td>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</tr>
|
||||
@if (count($chunkedPhotos) < 2)
|
||||
<tr style="width: 100%;"></tr>
|
||||
@@ -163,4 +167,3 @@
|
||||
@endif
|
||||
@endif
|
||||
@endisset
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
@foreach (json_decode($detail->details) as $key => $value)
|
||||
@if (!is_null($value) && $value !== '')
|
||||
<tr>
|
||||
<td style="padding: 2px;">{{ ucwords(str_replace('_', ' ', $key)) ?? '' }}</td>
|
||||
<td style="padding: 2px;"> {{formatLabel($key)}}</td>
|
||||
<td style=" padding: 2px;">:</td>
|
||||
<td style="">{{ $value }}
|
||||
@if ($key == 'luas_bangunan' || $key == 'luas_tanah')
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
@if (!is_null($value) && $value !== '')
|
||||
<tr>
|
||||
<td style="width: 20%; padding: 2px;">
|
||||
{{ ucwords(str_replace('_', ' ', $key)) ?? '' }}
|
||||
{{formatLabel($key)}}
|
||||
</td>
|
||||
<td style="width: 1%; padding: 2px;">:</td>
|
||||
<td style="width: 79%; padding: 2px;">
|
||||
@@ -570,9 +570,9 @@
|
||||
PETA
|
||||
</h6>
|
||||
</div>
|
||||
<div class="photo-container">
|
||||
<div style="text-align: center">
|
||||
@php
|
||||
$fotoTypes = ['foto_gistaru', 'foto_bhumi', 'foto_argis_region', 'foto_tempat'];
|
||||
$fotoTypes = ['upload_gs','foto_sentuh_tanahku','foto_gistaru', 'foto_bhumi', 'foto_argis_region', 'foto_tempat'];
|
||||
// Memindahkan foto_tempat ke depan jika ada
|
||||
if (($key = array_search('foto_tempat', $fotoTypes)) !== false) {
|
||||
unset($fotoTypes[$key]);
|
||||
@@ -607,9 +607,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="page-break"></div>
|
||||
|
||||
|
||||
<div class="section">
|
||||
<div class="judul">
|
||||
<h6 class="border" style="text-align: center">
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
@if (!is_null($value) && $value !== '')
|
||||
<tr>
|
||||
<td style="padding: 2px; vertical-align: top;">
|
||||
{{ ucwords(str_replace('_', ' ', $key)) ?? '' }}
|
||||
{{formatLabel($key)}}
|
||||
</td>
|
||||
<td style="padding: 2px; vertical-align: top;">:</td>
|
||||
<td style="padding: 2px; vertical-align: top;">
|
||||
@@ -1095,7 +1095,7 @@
|
||||
</div>
|
||||
<div class="photo-container">
|
||||
@php
|
||||
$fotoTypes = ['foto_gistaru', 'foto_bhumi', 'foto_argis_region', 'foto_tempat', 'foto_sentuh_tanahku'];
|
||||
$fotoTypes = ['upload_gs','foto_sentuh_tanahku','foto_gistaru', 'foto_bhumi', 'foto_argis_region', 'foto_tempat'];
|
||||
// Memindahkan foto_tempat ke depan jika ada
|
||||
if (($key = array_search('foto_tempat', $fotoTypes)) !== false) {
|
||||
unset($fotoTypes[$key]);
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
@foreach (json_decode($detail->details) as $key => $value)
|
||||
@if (!is_null($value) && $value !== '')
|
||||
<td style="width:25%; padding: 2px; vertical-align: top;">
|
||||
{{ ucwords(str_replace('_', ' ', $key)) ?? '' }}</td>
|
||||
{{formatLabel($key)}}</td>
|
||||
<td style="width:1%; padding: 2px; vertical-align: top;">:</td>
|
||||
<td style=" padding: 2px; vertical-align: top;">{{ $value }}
|
||||
@if ($key == 'luas_bangunan' || $key == 'luas_tanah')
|
||||
@@ -562,7 +562,7 @@
|
||||
</table>
|
||||
<div class="photo-container">
|
||||
@php
|
||||
$fotoTypes = ['foto_gistaru', 'foto_bhumi', 'foto_argis_region', 'foto_tempat','foto_sentuh_tanahku'];
|
||||
$fotoTypes = ['upload_gs','foto_sentuh_tanahku','foto_gistaru', 'foto_bhumi', 'foto_argis_region', 'foto_tempat'];
|
||||
// Memindahkan foto_tempat ke depan jika ada
|
||||
if (($key = array_search('foto_tempat', $fotoTypes)) !== false) {
|
||||
unset($fotoTypes[$key]);
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
@foreach ($details as $key => $value)
|
||||
@if (!is_null($value) && $value !== '')
|
||||
<tr>
|
||||
<td style="">{{ ucwords(str_replace('_', ' ', $key)) ?? '' }}</td>
|
||||
<td style=""> {{formatLabel($key)}}</td>
|
||||
<td style=" padding: 2px;">:</td>
|
||||
<td style="">{{ $value }}
|
||||
@if ($key == 'luas_bangunan' || $key == 'luas_tanah')
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -356,9 +356,30 @@
|
||||
if (preview) {
|
||||
preview.id = newImageId;
|
||||
preview.src = '';
|
||||
preview.accept = ".jpg,.jpeg,.png";
|
||||
preview.classList.add('hidden');
|
||||
input.onchange = function() {
|
||||
previewImage(this, newImageId);
|
||||
const file = this.files[0];
|
||||
if (file) {
|
||||
const validExtensions = ['image/jpeg', 'image/png', 'image/gif',
|
||||
'image/webp'
|
||||
];
|
||||
if (validExtensions.includes(file.type)) {
|
||||
previewImage(this, newImageId);
|
||||
} else {
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Format Tidak Didukung',
|
||||
text: 'Hanya file gambar dengan format JPG, PNG, GIF, atau WEBP yang diperbolehkan.',
|
||||
position: 'top-end',
|
||||
toast: true,
|
||||
showConfirmButton: false,
|
||||
timer: 3000,
|
||||
timerProgressBar: true
|
||||
});
|
||||
this.value = '';
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -289,14 +289,14 @@
|
||||
<div class="card-body w-full">
|
||||
@include('lpj::component.detail-jaminan', ['status' => true])
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
{{-- <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label class="form-label font-medium max-w-56">Nomor NIB</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" name="nomor_nib" class="input w-full"
|
||||
value="{{ isset($forminspeksi['asset']['nomor_nib']) ? $forminspeksi['asset']['nomor_nib'] : '' }}"
|
||||
placeholder="Masukkan Nomor NIB">
|
||||
</div>
|
||||
</div>
|
||||
</div> --}}
|
||||
|
||||
<div class=" mx-auto rounded-lg overflow-hidden">
|
||||
<div class="py-4 ">
|
||||
|
||||
@@ -115,6 +115,27 @@
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
<span class="form-label">Gambar Surat Ukur</span>
|
||||
</label>
|
||||
<div class="input-group w-full flex gap-2">
|
||||
<input class="upload_gs" type="hidden" name="upload_gs" value="upload_gs">
|
||||
<div class="w-full">
|
||||
<input id="inputGistaru" type="file" name="upload_gs"
|
||||
class="file-input file-input-bordered w-full"
|
||||
accept=".jpg,.jpeg,.png,.gif,.bmp,.tiff,.tif,.webp,.svg"
|
||||
onchange="previewImage(this, 'upload-gs-preview')">
|
||||
|
||||
<img id="upload-gs-preview"
|
||||
src="{{ asset('storage/' . (isset($forminspeksi['upload_gs']) ? $forminspeksi['upload_gs'] : '')) }}"
|
||||
alt="Foto Gs" class="mt-2 max-w-full h-auto"
|
||||
style="{{ isset($forminspeksi['upload_gs']) ? '' : 'display: none;' }} max-width: 30rem;" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
<span class="form-label">Sentuh Tanahku</span>
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
@endif
|
||||
<input type="hidden" name="name_foto_objek" class="input"
|
||||
value="{{ $mainPhoto['path'] ?? '' }}">
|
||||
<input type="file" name="foto_objek" class="file-input" accept="image/*"
|
||||
<input type="file" name="foto_objek" class="file-input" accept=".jpg,.jpeg,.png"
|
||||
onchange="previewImage(this, 'uploadedImage1')">
|
||||
|
||||
</div>
|
||||
@@ -75,7 +75,7 @@
|
||||
<td class="px-4 py-2">
|
||||
<div class="flex flex-col gap-2">
|
||||
<img id="uploadedImage2" class="max-w-[200px] hidden" alt="Pembanding Image">
|
||||
<input type="file" name="foto_objek_pembanding[]" class="file-input" accept="image/*"
|
||||
<input type="file" name="foto_objek_pembanding[]" class="file-input" accept=".jpg,.jpeg,.png"
|
||||
onchange="previewImage(this, 'uploadedImage2')">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -365,7 +365,7 @@
|
||||
<tr>
|
||||
<td style="text-align: center; margin-top: 5px; ">
|
||||
<h2 style=" text-transform: uppercase; text-align: center; margin: 0;">
|
||||
Jaminan
|
||||
STATUS KEPEMILIKAN, HUBUNGAN DAN PENGHUNI
|
||||
</h2>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -500,7 +500,7 @@
|
||||
id: permohonanId,
|
||||
waktu_penilaian: tanggal,
|
||||
deskripsi_penilaian: keterangan,
|
||||
keterangan:'Tanggal Kunjungan: ' + tanggal + ', Keterangan: ' + keterangan
|
||||
keterangan:'Permintaan Jadwal Kujungan: ' + window.formatTanggalWaktuIndonesia(tanggal) + ', ' + keterangan
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
|
||||
Reference in New Issue
Block a user