fix(penilai/surveyor): perbaikkan activity, form inspeksi, print out inspeksi dan laporan, ganti nama detail penilai ke detail penilaian
This commit is contained in:
@@ -392,7 +392,7 @@ class ActivityController extends Controller
|
||||
$q->where('user_id', $id);
|
||||
})
|
||||
->whereHas('permohonan', function ($q) {
|
||||
$q->whereIn('status', ['assign', 'proses-laporan', 'done', 'proses-survey', 'request-reschedule', 'reschedule', 'rejected-reschedule', 'approved-reschedule', 'revisi-laporan', 'survey']);
|
||||
$q->whereNotIn('status', ['done']);
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -297,7 +297,6 @@ class PenilaiController extends Controller
|
||||
|
||||
return redirect()
|
||||
->route('penilai.show', ['id' => $id])->with('success', 'diperbarui ke status paparan dan dikirim ke So untuk proses lebih lanjut.');
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return redirect()->route('penilai.show', ['id' => $id])->with('error', 'Terjadi kesalahan saat memproses permohonan.');
|
||||
}
|
||||
@@ -505,7 +504,7 @@ class PenilaiController extends Controller
|
||||
});
|
||||
}
|
||||
|
||||
$query->whereRaw('LOWER(status) IN (?, ?, ?, ?, ?, ?,?, ?)', ['assign','survey-completed', 'proses-laporan', 'paparan', 'proses-paparan','paparan', 'revisi-laporan','revisi-paparan']);
|
||||
$query->whereRaw('LOWER(status) IN (?, ?, ?, ?, ?, ?,?, ?)', ['assign', 'survey-completed', 'proses-laporan', 'paparan', 'proses-paparan', 'paparan', 'revisi-laporan', 'revisi-paparan']);
|
||||
|
||||
if (!Auth::user()->hasRole('administrator')) {
|
||||
$query->whereHas('penilaian.userPenilai', function ($q) {
|
||||
@@ -772,7 +771,6 @@ class PenilaiController extends Controller
|
||||
'success' => true,
|
||||
'message' => 'Berhasil Megirim reported ke so'
|
||||
], 200);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
@@ -1039,7 +1037,6 @@ class PenilaiController extends Controller
|
||||
'trace' => $e->getTraceAsString()
|
||||
], 500);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function storeCallReport(Request $request)
|
||||
@@ -1208,7 +1205,7 @@ class PenilaiController extends Controller
|
||||
$pdf->setPaper('A4', 'portrait');
|
||||
return response($pdf->output(), 200)
|
||||
->header('Content-Type', 'application/pdf')
|
||||
->header('Content-Disposition', 'inline; filename="Laporan_' . $tipeLaporan . '_' .$permohonan->debiture->name . '_' . $cleanNomorLaporan .'.pdf"');
|
||||
->header('Content-Disposition', 'inline; filename="Laporan_' . $tipeLaporan . '_' . $permohonan->debiture->name . '_' . $cleanNomorLaporan . '.pdf"');
|
||||
// return $pdf->stream();
|
||||
} else {
|
||||
// $pdf = view('lpj::' . $viewLaporan, compact(
|
||||
@@ -1233,14 +1230,12 @@ class PenilaiController extends Controller
|
||||
// return $pdf;
|
||||
$cleanNomorLaporan = str_replace(['/', '\\'], '-', $nomorLaporan);
|
||||
$pdf->setPaper('A4', 'portrait');
|
||||
return $pdf->download('Laporan_'. $tipeLaporan . '_' .$permohonan->debiture->name . '_' . $cleanNomorLaporan .'_data.pdf');
|
||||
return $pdf->download('Laporan_' . $tipeLaporan . '_' . $permohonan->debiture->name . '_' . $cleanNomorLaporan . '_data.pdf');
|
||||
}
|
||||
|
||||
} catch (\Exception $e) {
|
||||
Log::error('PDF generation failed: ' . $e->getMessage());
|
||||
return response()->json(['error' => 'Failed to generate PDF. Please check the log for details.'. $e->getMessage()], 500);
|
||||
return response()->json(['error' => 'Failed to generate PDF. Please check the log for details.' . $e->getMessage()], 500);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private function getViewLaporan($tipe)
|
||||
@@ -1609,6 +1604,4 @@ class PenilaiController extends Controller
|
||||
'message' => 'Berhasil Revisi Ke surveyor',
|
||||
], 200);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -20,8 +20,13 @@
|
||||
|
||||
@foreach ($informasi as $key)
|
||||
@if (isset($forminspeksi['fakta'][$key]) && $forminspeksi['fakta'][$key] !== '-')
|
||||
<p> - {{ ucfirst(str_replace('_', ' ', $key)) }}:
|
||||
{{ $forminspeksi['fakta'][$key] }}</p>
|
||||
@php
|
||||
$displayKey = ucfirst(str_replace('_', ' ', $key));
|
||||
if (strlen($key) == 3) {
|
||||
$displayKey = strtoupper($key);
|
||||
}
|
||||
@endphp
|
||||
<p> - {{ $displayKey }}: {{ $forminspeksi['fakta'][$key] }}</p>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
|
||||
@@ -116,7 +116,11 @@
|
||||
<td>Tusuk Sate</td>
|
||||
<td>:</td>
|
||||
<td>
|
||||
{{ isset($forminspeksi['tanah']['tusuk_sate']) && $forminspeksi['tanah']['tusuk_sate'] == 'yes' ? 'Ya' : 'Tidak' }}
|
||||
{{ isset($forminspeksi['tanah']['tusuk_sate']) && $forminspeksi['tanah']['tusuk_sate']['Ya'] ? 'Ya' : 'Tidak' }}
|
||||
@if (isset($forminspeksi['tanah']['tusuk_sate']) && $forminspeksi['tanah']['tusuk_sate']['Ya'])
|
||||
{{ isset($forminspeksi['tanah']['tusuk_sate_ya']) ? ' (' . $forminspeksi['tanah']['tusuk_sate_ya'] . ')' : '' }}
|
||||
@endif
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -908,8 +908,13 @@
|
||||
|
||||
@foreach ($informasi as $key)
|
||||
@if (isset($forminspeksi['fakta'][$key]) && $forminspeksi['fakta'][$key] !== '-')
|
||||
<p> - {{ ucfirst(str_replace('_', ' ', $key)) }}:
|
||||
{{ $forminspeksi['fakta'][$key] }}</p>
|
||||
@php
|
||||
$displayKey = ucfirst(str_replace('_', ' ', $key));
|
||||
if (strlen($key) == 3) {
|
||||
$displayKey = strtoupper($key);
|
||||
}
|
||||
@endphp
|
||||
<p> - {{ $displayKey }}: {{ $forminspeksi['fakta'][$key] }}</p>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
|
||||
@@ -415,7 +415,7 @@
|
||||
YANG BERLAKU, APABILA LEWAT MAKA HARUS DILAKUKAN ORDER ULANG SESUAI PROSEDUR YANG
|
||||
BERLAKU
|
||||
</li>
|
||||
<li>Apabila sudah melewati 6 bulan, maka harus penilaian ulang kembali
|
||||
<li class="uppercase">Apabila sudah melewati 6 bulan, maka harus penilaian ulang kembali
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="card border border-agi-100 pb-2.5">
|
||||
<div class="card-header bg-agi-50" id="basic_settings">
|
||||
<h3 class="card-title">
|
||||
Detail Penilai
|
||||
Detail Penilaian
|
||||
</h3>
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="{{ route('penilai.index') }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i>
|
||||
|
||||
@@ -329,10 +329,10 @@
|
||||
).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
const requestData = isPaparanSO ? {
|
||||
message: result.value.keterangan,
|
||||
message: result.value.message,
|
||||
tanggalPaparan: result.value.tanggalPaparan
|
||||
} : {
|
||||
message: result.value.keterangan
|
||||
message: result.value.message
|
||||
};
|
||||
|
||||
handleAjaxRequest(
|
||||
|
||||
@@ -339,7 +339,7 @@
|
||||
@endphp
|
||||
|
||||
<select id="hub_cadeb_tidak_sesuai" class="input w-full" name="hub_cadeb_tidak_sesuai"
|
||||
style="{{ old('hub_cadeb_tidak_sesuai', $selectedData) ? '' : 'display: none;' }}">
|
||||
style="{{ $statusKey != 'sesuai' ? '' : 'display: none;' }}">
|
||||
<option value="">Select Hubungan Cadeb</option>
|
||||
@if (isset($basicData['hubCadeb']))
|
||||
@foreach ($basicData['hubCadeb'] as $item)
|
||||
@@ -403,7 +403,7 @@
|
||||
<input id="hub_penghuni_tidak_sesuai" class="input" name="hub_penghuni_tidak_sesuai"
|
||||
placeholder="Masukkan Hubungan penghuni jaminan"
|
||||
value="{{ old('hub_penghuni_tidak_sesuai', isset($selectedData) ? $selectedData : '') }}"
|
||||
style="{{ old('hub_penghuni_tidak_sesuai', $selectedData ?? false) ? '' : 'display: none;' }}">
|
||||
style="{{ $statusKey != 'sesuai' ? '' : 'display: none;' }}">
|
||||
</div>
|
||||
<em id="error-hub_cadeb_penghuni" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
|
||||
@@ -91,6 +91,8 @@
|
||||
@push('scripts')
|
||||
<script src="https://cdn.jsdelivr.net/npm/signature_pad@4.1.7/dist/signature_pad.umd.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
const datas = @json($forminspeksi);
|
||||
console.log(datas);
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const signaturePads = {};
|
||||
const types = ['penilai', 'cabang', 'debitur', 'kjjp'];
|
||||
@@ -343,8 +345,6 @@
|
||||
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',
|
||||
@@ -364,8 +364,8 @@
|
||||
confirmButtonText: 'OK'
|
||||
}).then((response) => {
|
||||
if (response.isConfirmed) {
|
||||
window.location.href =
|
||||
'{{ route('surveyor.show', ['id' => $permohonan->id]) }}';
|
||||
// window.location.href =
|
||||
// '{{ route('surveyor.show', ['id' => $permohonan->id]) }}';
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@@ -389,8 +389,6 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
let errors = xhr.responseJSON?.errors;
|
||||
$('.alert').text('');
|
||||
if (errors) {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
: 'sesuai';
|
||||
$luasBangunan = $forminspeksi['bangunan']['luas_tanah_bagunan'][$cekLuasBangunan] ?? null;
|
||||
@endphp
|
||||
<td width="25%"><strong>Luas Tanah Bangunan</strong></td>
|
||||
<td width="25%"><strong>Luas Bangunan (IMB)</strong></td>
|
||||
<td>{{ $luasBangunan }}</td>
|
||||
</tr>
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
<input type="checkbox"
|
||||
{{ isset($forminspeksi['bangunan']['jenis_bangunan']) && in_array($item->name, $forminspeksi['bangunan']['jenis_bangunan']) ? 'checked' : '' }}>
|
||||
{{ $item->name }}
|
||||
|
||||
</label>
|
||||
</td>
|
||||
@endforeach
|
||||
@@ -80,6 +81,18 @@
|
||||
<input type="checkbox" name="sifat_bangunan[]" value="{{ $item->name }}"
|
||||
{{ isset($forminspeksi['bangunan']['sifat_bangunan']) && in_array($item->name, $forminspeksi['bangunan']['sifat_bangunan']) ? 'checked' : '' }}>
|
||||
{{ $item->name }}
|
||||
|
||||
@if (isset($forminspeksi['bangunan']['sifat_bangunan']) &&
|
||||
in_array($item->name, $forminspeksi['bangunan']['sifat_bangunan']))
|
||||
@php
|
||||
$inputValues = isset($forminspeksi['bangunan']['sifat_bangunan_input'][$index])
|
||||
? $forminspeksi['bangunan']['sifat_bangunan_input'][$index]
|
||||
: null;
|
||||
@endphp
|
||||
@if ($inputValues)
|
||||
<span class="label-checkbox"> - {{ $inputValues }}</span>
|
||||
@endif
|
||||
@endif
|
||||
</label>
|
||||
</td>
|
||||
@endforeach
|
||||
@@ -90,7 +103,8 @@
|
||||
</tr>
|
||||
|
||||
|
||||
@if (isset($forminspeksi['bangunan']['spesifikasi_bangunan']) && count($forminspeksi['bangunan']['spesifikasi_bangunan']) > 0)
|
||||
@if (isset($forminspeksi['bangunan']['spesifikasi_bangunan']) &&
|
||||
count($forminspeksi['bangunan']['spesifikasi_bangunan']) > 0)
|
||||
@foreach ($forminspeksi['bangunan']['spesifikasi_bangunan'] as $bangunanIndex => $bangunan)
|
||||
<tr>
|
||||
<td colspan="2"><strong>Spesifikasi Bangunan {{ $bangunanIndex + 1 }}</strong></td>
|
||||
@@ -109,14 +123,20 @@
|
||||
@php
|
||||
$selectedValues = [];
|
||||
if (isset($bangunan['spek_kategori_bangunan'][$spesifikasi->name])) {
|
||||
$selectedValues = array_values($bangunan['spek_kategori_bangunan'][$spesifikasi->name]);
|
||||
$selectedValues = array_values(
|
||||
$bangunan['spek_kategori_bangunan'][$spesifikasi->name],
|
||||
);
|
||||
}
|
||||
$lainnyaValue = $bangunan['spek_kategori_bangunan'][$spesifikasi->name]['lainnya'] ?? '';
|
||||
$lainnyaValue =
|
||||
$bangunan['spek_kategori_bangunan'][$spesifikasi->name][
|
||||
'lainnya'
|
||||
] ?? '';
|
||||
@endphp
|
||||
|
||||
<td class="checkbox-item">
|
||||
<label class="checkbox-label">
|
||||
<input type="checkbox" class="checkbox-lainnya" style="margin-right: 3px;"
|
||||
<input type="checkbox" class="checkbox-lainnya"
|
||||
style="margin-right: 3px;"
|
||||
name="spesifikasi_bangunan[{{ $bangunanIndex }}][{{ $spesifikasi->name }}][]"
|
||||
value="{{ $kategori->name }}"
|
||||
@if (in_array($kategori->name, $selectedValues)) checked @endif>
|
||||
@@ -144,9 +164,9 @@
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
</table>
|
||||
|
||||
@@ -129,8 +129,13 @@
|
||||
|
||||
@foreach ($informasi as $key)
|
||||
@if (isset($forminspeksi['fakta'][$key]) && $forminspeksi['fakta'][$key] !== '-')
|
||||
<p> - {{ ucfirst(str_replace('_', ' ', $key)) }}:
|
||||
{{ $forminspeksi['fakta'][$key] }}</p>
|
||||
@php
|
||||
$displayKey = ucfirst(str_replace('_', ' ', $key));
|
||||
if (strlen($key) == 3) {
|
||||
$displayKey = strtoupper($key);
|
||||
}
|
||||
@endphp
|
||||
<p> - {{ $displayKey }}: {{ $forminspeksi['fakta'][$key] }}</p>
|
||||
@endif
|
||||
@endforeach
|
||||
</td>
|
||||
|
||||
@@ -13,23 +13,23 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td width="25%">Jarak Jalan Utama</td>
|
||||
<td>{{ $forminspeksi['lingkungan']['jarak_jalan_utama'] ?? 'Tidak Diketahui' }}</td>
|
||||
<td>{{ $forminspeksi['lingkungan']['jarak_jalan_utama'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jalan Lingkungan</td>
|
||||
<td>{{ $forminspeksi['lingkungan']['jarak_jalan_utama'] ?? 'Tidak Diketahui' }}</td>
|
||||
<td>{{ $forminspeksi['lingkungan']['jalan_linkungan'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jarak CBD Point</td>
|
||||
<td>{{ $forminspeksi['lingkungan']['jarak_cbd_point'] ?? 'Tidak Diketahui' }}</td>
|
||||
<td>{{ $forminspeksi['lingkungan']['jarak_cbd_point'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Nama CBD Point</td>
|
||||
<td>{{ $forminspeksi['lingkungan']['nama_cbd_point'] ?? 'Tidak Diketahui' }}</td>
|
||||
<td>{{ $forminspeksi['lingkungan']['nama_cbd_point'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lebar Perkerasan Jalan</td>
|
||||
<td>{{ $forminspeksi['lingkungan']['lebar_perkerasan_jalan'] ?? 'Tidak Diketahui' }}</td>
|
||||
<td>{{ $forminspeksi['lingkungan']['lebar_perkerasan_jalan'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"><strong>Sarana Pelengkap</strong></td>
|
||||
@@ -191,6 +191,55 @@
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td style="vertical-align: top;"><strong>Dekat Makam</strong></td>
|
||||
<td>
|
||||
<div class="checkbox-item">
|
||||
<label class="checkbox-label">
|
||||
<input type="radio" name="disekitar_lokasi" value="ya"
|
||||
{{ ($forminspeksi['lingkungan']['dekat_makam'] ?? '') == 'ya' ? 'checked' : '' }}>
|
||||
Ya
|
||||
@if (($forminspeksi['lingkungan']['dekat_makam'] ?? '') == 'ya')
|
||||
- Nama Makam:
|
||||
{{ $forminspeksi['lingkungan']['nama_makam'] ?? '' }}
|
||||
, Jarak Makam:
|
||||
{{ $forminspeksi['lingkungan']['jarak_makam'] ?? '' }}
|
||||
@endif
|
||||
</label>
|
||||
<label class="checkbox-label">
|
||||
<input type="radio" name="disekitar_lokasi" value="tidak"
|
||||
{{ ($forminspeksi['lingkungan']['dekat_makam'] ?? '') == 'tidak' ? 'checked' : '' }}>
|
||||
Tidak
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td style="vertical-align: top;"><strong>Dekat TPS</strong></td>
|
||||
<td>
|
||||
<div class="checkbox-item">
|
||||
<label class="checkbox-label">
|
||||
<input type="radio" name="disekitar_lokasi" value="ya"
|
||||
{{ ($forminspeksi['lingkungan']['dekat_tps'] ?? '') == 'ya' ? 'checked' : '' }}>
|
||||
Ya
|
||||
@if (($forminspeksi['lingkungan']['dekat_tps'] ?? '') == 'ya')
|
||||
- Nama TPS:
|
||||
{{ $forminspeksi['lingkungan']['nama_tps'] ?? '' }}
|
||||
, Jarak TPS:
|
||||
{{ $forminspeksi['lingkungan']['jarak_tps'] ?? '' }}
|
||||
@endif
|
||||
</label>
|
||||
<label class="checkbox-label">
|
||||
<input type="radio" name="disekitar_lokasi" value="tidak"
|
||||
{{ ($forminspeksi['lingkungan']['dekat_tps'] ?? '') == 'tidak' ? 'checked' : '' }}>
|
||||
Tidak
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"><strong>Merupakan Daerah</strong></td>
|
||||
<td>
|
||||
|
||||
@@ -193,6 +193,12 @@
|
||||
.page-break {
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
.no-break {
|
||||
page-break-inside: avoid;
|
||||
page-break-before: auto;
|
||||
page-break-after: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
@@ -308,7 +314,13 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Nama Debiture/ Wakil Debiture</strong></td>
|
||||
<td>{{ $permohonan->debiture->name ?? '' }}</td>
|
||||
<td>{{ $permohonan->debiture->name ?? '' }}
|
||||
@if (isset($forminspeksi['asset']['debitur_perwakilan']) && !empty($forminspeksi['asset']['debitur_perwakilan']))
|
||||
@foreach ($forminspeksi['asset']['debitur_perwakilan'] as $key => $item)
|
||||
/ {{ $item }}
|
||||
@endforeach
|
||||
@endif
|
||||
</td>
|
||||
<td><strong>Kunjungan Tanggal</strong></td>
|
||||
<td>{{ formatTanggalIndonesia($permohonan->penilaian->tanggal_kunjungan) }}</td>
|
||||
</tr>
|
||||
@@ -556,10 +568,12 @@
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@if (strtolower($permohonan->tujuanPenilaian->name) == 'rap')
|
||||
@include('lpj::surveyor.components.print-out.rap')
|
||||
@else
|
||||
<tr>
|
||||
|
||||
<td style="text-align: center; border: 1px solid #000;">
|
||||
E
|
||||
</td>
|
||||
@@ -600,7 +614,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
@endIf
|
||||
|
||||
</div>
|
||||
{{-- <tr>
|
||||
<td style="text-align: center; border: 1px solid #000;">
|
||||
G
|
||||
|
||||
@@ -123,13 +123,16 @@
|
||||
<td><strong>Tusuk Sate</strong></td>
|
||||
<td>
|
||||
<label>
|
||||
<input type="radio" name="tusuk_sate" value="yes"
|
||||
{{ isset($forminspeksi['tanah']['tusuk_sate']) && $forminspeksi['tanah']['tusuk_sate'] == 'yes' ? 'Ya' : 'Tidak' }}
|
||||
<input type="radio" name="tusuk_sate" value="Ya"
|
||||
{{ isset($forminspeksi['tanah']['tusuk_sate']['Ya']) && $forminspeksi['tanah']['tusuk_sate']['Ya'] ? 'checked' : '' }}>
|
||||
Ya
|
||||
@if (isset($forminspeksi['tanah']['tusuk_sate']) && $forminspeksi['tanah']['tusuk_sate']['Ya'])
|
||||
{{ isset($forminspeksi['tanah']['tusuk_sate']['Ya']) ? ' (' . $forminspeksi['tanah']['tusuk_sate']['Ya'] . ')' : '' }}
|
||||
@endif
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" name="tusuk_sate" value="no"
|
||||
{{isset($forminspeksi['tanah']['tusuk_sate']) && $forminspeksi['tanah']['tusuk_sate'] == 'no' ? 'checked' : '' }}>
|
||||
<input type="radio" name="tusuk_sate" value="Tidak"
|
||||
{{isset($forminspeksi['tanah']['tusuk_sate']['Tidak']) && $forminspeksi['tanah']['tusuk_sate']['Tidak'] ? 'checked' : '' }}>
|
||||
Tidak
|
||||
</label>
|
||||
</td>
|
||||
|
||||
@@ -85,10 +85,9 @@
|
||||
<!-- Select dropdown untuk "Tidak Sesuai" -->
|
||||
<div id="hadap_mata_angin_tidak_sesuai" class="flex items-baseline gap-2"
|
||||
style="{{ old('hadap_mata_angin', isset($forminspeksi['tanah']['hadap_mata_angin']['tidak sesuai'])) ? '' : 'display: none;' }}">
|
||||
<select
|
||||
class="input w-full
|
||||
id=" hadap_mata_angin_tidak_sesuai"
|
||||
name="hadap_mata_angin_tidak_sesuai">
|
||||
<select class="input w-full
|
||||
id="
|
||||
hadap_mata_angin_tidak_sesuai" name="hadap_mata_angin_tidak_sesuai">
|
||||
@php
|
||||
$statusKey = isset($forminspeksi['tanah']['hadap_mata_angin']['sesuai'])
|
||||
? 'sesuai'
|
||||
@@ -129,7 +128,7 @@
|
||||
in_array($item->name, $forminspeksi['tanah']['bentuk_tanah']['bentuk_tanah']))
|
||||
? 'checked'
|
||||
: '' }}
|
||||
onclick="toggleCheckboxVisibility('bentuk_tanah', 'bentuk_tanah_lainnya', ['lainnya'])"/>
|
||||
onclick="toggleCheckboxVisibility('bentuk_tanah', 'bentuk_tanah_lainnya', ['lainnya'])" />
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
@if (strcasecmp($item->name, 'lainnya') == 0)
|
||||
@@ -137,7 +136,7 @@
|
||||
style="{{ isset($forminspeksi['tanah']['bentuk_tanah']['lainnya']) && $forminspeksi['tanah']['bentuk_tanah']['lainnya'] ? '' : 'display: none;' }}"
|
||||
name="bentuk_tanah_lainnya" class="input w-full mt-2"
|
||||
placeholder="Masukkan bentuk tanah..."
|
||||
value="{{ old('bentuk_tanah_lainnya', $forminspeksi['tanah']['bentuk_tanah']['lainnya'] ?? '') }}"/>
|
||||
value="{{ old('bentuk_tanah_lainnya', $forminspeksi['tanah']['bentuk_tanah']['lainnya'] ?? '') }}" />
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
@@ -180,19 +179,19 @@
|
||||
onclick="toggleMultipleFields('ketinggian_jalan', {
|
||||
'Lebih Tinggi': 'input-lebih-tinggi',
|
||||
'Lebih Rendah': 'input-lebih-rendah'
|
||||
})"/>
|
||||
})" />
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
@if (strcasecmp($item->name, 'Lebih Tinggi') == 0)
|
||||
<input id="input-lebih-tinggi" type="text"
|
||||
style="{{ isset($forminspeksi['tanah']['ketinggian_tanah']['lebih_tinggi']) && $forminspeksi['tanah']['ketinggian_tanah']['lebih_tinggi'] ? '' : 'display: none;' }}"
|
||||
name="ketinggian_lebih_tinggi" class="input w-full mt-2" placeholder="m2"
|
||||
value="{{ old('ketinggian_lebih_tinggi', $forminspeksi['tanah']['ketinggian_tanah']['lebih_tinggi'] ?? '') }}"/>
|
||||
value="{{ old('ketinggian_lebih_tinggi', $forminspeksi['tanah']['ketinggian_tanah']['lebih_tinggi'] ?? '') }}" />
|
||||
@elseif (strcasecmp($item->name, 'Lebih Rendah') == 0)
|
||||
<input id="input-lebih-rendah" type="text"
|
||||
style="{{ isset($forminspeksi['tanah']['ketinggian_tanah']['lebih_rendah']) && $forminspeksi['tanah']['ketinggian_tanah']['lebih_rendah'] ? '' : 'display: none;' }}"
|
||||
name="ketinggian_lebih_rendah" class="input w-full mt-2" placeholder="m"
|
||||
value="{{ old('ketinggian_lebih_rendah', $forminspeksi['tanah']['ketinggian_tanah']['lebih_rendah'] ?? '') }}"/>
|
||||
value="{{ old('ketinggian_lebih_rendah', $forminspeksi['tanah']['ketinggian_tanah']['lebih_rendah'] ?? '') }}" />
|
||||
@endif
|
||||
|
||||
</div>
|
||||
@@ -249,7 +248,7 @@
|
||||
<input class="checkbox" name="posisi_kavling[]" type="checkbox"
|
||||
value="{{ $item->name }}"
|
||||
{{ in_array($item->name, $selectedPosisiKavling) ? 'checked' : '' }}
|
||||
onclick="toggleCheckboxVisibility('posisi_kavling', 'posisi_kavling_lainnya', ['Lainnya'])"/>
|
||||
onclick="toggleCheckboxVisibility('posisi_kavling', 'posisi_kavling_lainnya', ['Lainnya'])" />
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
@if (strcasecmp($item->name, 'Lainnya') == 0)
|
||||
@@ -257,7 +256,7 @@
|
||||
style="{{ $lainnyaValue ? '' : 'display: none' }}"
|
||||
name="posisi_kavling_lainnya" class="input w-full mt-2"
|
||||
placeholder="Masukkan Posisi Kavling lainnya..."
|
||||
value="{{ $lainnyaValue }}"/>
|
||||
value="{{ $lainnyaValue }}" />
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
@@ -273,13 +272,24 @@
|
||||
<div class="flex-wrap items-stretch">
|
||||
<div class="grid grid-cols-2 md:grid-cols-3 gap-4 mt-2">
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input type="radio" class="radio" name="tusuk_sate" value="yes"
|
||||
{{ old('tusuk_sate') == 'yes' || (isset($forminspeksi['tanah']['tusuk_sate']) && $forminspeksi['tanah']['tusuk_sate'] == 'yes') ? 'checked' : '' }}>
|
||||
<input onclick="toggleFieldVisibility('tusuk_sate', 'tusuk_sate_ya', ['Ya'])"
|
||||
type="radio" class="radio" name="tusuk_sate" value="Ya"
|
||||
{{ old('tusuk_sate') == 'Ya' || (isset($forminspeksi['tanah']['tusuk_sate']) && $forminspeksi['tanah']['tusuk_sate']['Ya']) ? 'checked' : '' }}>
|
||||
<span class="ml-2">Ya</span>
|
||||
|
||||
@php
|
||||
$statusKey = isset($forminspeksi['tanah']['tusuk_sate']['Ya']) ? 'Ya' : 'Tidak';
|
||||
$selectedData = $forminspeksi['tanah']['tusuk_sate'][$statusKey] ?? null;
|
||||
@endphp
|
||||
<input id="tusuk_sate_ya" class="input" name="tusuk_sate_ya"
|
||||
placeholder="Masukkan Tusuk Sate..."
|
||||
value="{{ old('tusuk_sate_ya', isset($selectedData) ? $selectedData : '') }}"
|
||||
style="{{ $statusKey == 'Ya' ? '' : 'display: none;' }}">
|
||||
</label>
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input type="radio" class="radio" name="tusuk_sate" value="no"
|
||||
{{ old('tusuk_sate') == 'no' || (isset($forminspeksi['tanah']['tusuk_sate']) && $forminspeksi['tanah']['tusuk_sate'] == 'no') ? 'checked' : '' }}>
|
||||
<input onclick="toggleFieldVisibility('tusuk_sate', 'tusuk_sate_ya', ['Ya'])"
|
||||
type="radio" class="radio" name="tusuk_sate" value="Tidak"
|
||||
{{ old('tusuk_sate') == 'Tidak' || (isset($forminspeksi['tanah']['tusuk_sate']['Tidak']) && $forminspeksi['tanah']['tusuk_sate']['Tidak']) ? 'checked' : '' }}>
|
||||
<span class="ml-2">Tidak</span>
|
||||
</label>
|
||||
</div>
|
||||
@@ -318,7 +328,7 @@
|
||||
<input class="checkbox" name="kondisi_fisik_tanah[]" type="checkbox"
|
||||
value="{{ $item->name }}"
|
||||
{{ in_array($item->name, old('kondisi_fisik_tanah', [])) || (isset($forminspeksi['tanah']['kondisi_fisik_tanah']['kondisi_fisik_tanah']) && in_array($item->name, $forminspeksi['tanah']['kondisi_fisik_tanah']['kondisi_fisik_tanah'])) ? 'checked' : '' }}
|
||||
onclick="toggleInputLainnya(this, 'kondisi_fisik_tanah_lainnya', '{{ $item->name }}')"/>
|
||||
onclick="toggleInputLainnya(this, 'kondisi_fisik_tanah_lainnya', '{{ $item->name }}')" />
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
|
||||
|
||||
@@ -600,7 +600,7 @@
|
||||
|
||||
Breadcrumbs::for('penilai.show', function (BreadcrumbTrail $trail) {
|
||||
$trail->parent('penilai');
|
||||
$trail->push('Detail Penilai');
|
||||
$trail->push('Detail Penilaian');
|
||||
});
|
||||
|
||||
Breadcrumbs::for('penilai.edit', function (BreadcrumbTrail $trail) {
|
||||
|
||||
Reference in New Issue
Block a user