Merge remote-tracking branch 'composer/feature/senior-officer' into staging
This commit is contained in:
@@ -571,7 +571,7 @@ class PenilaiController extends Controller
|
|||||||
try {
|
try {
|
||||||
$validatedRequest = app(FormSurveyorRequest::class);
|
$validatedRequest = app(FormSurveyorRequest::class);
|
||||||
$this->surveyorController->store($validatedRequest);
|
$this->surveyorController->store($validatedRequest);
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'luas_tanah' => $request->input('luas_tanah'),
|
'luas_tanah' => $request->input('luas_tanah'),
|
||||||
'nilai_tanah_1' => $request->input('nilai_tanah_1'),
|
'nilai_tanah_1' => $request->input('nilai_tanah_1'),
|
||||||
@@ -590,10 +590,10 @@ class PenilaiController extends Controller
|
|||||||
'asuransi_nilai_1' => $request->input('asuransi_nilai_1'),
|
'asuransi_nilai_1' => $request->input('asuransi_nilai_1'),
|
||||||
'asuransi_nilai_2' => $request->input('asuransi_nilai_2'),
|
'asuransi_nilai_2' => $request->input('asuransi_nilai_2'),
|
||||||
];
|
];
|
||||||
|
|
||||||
$npwData = [];
|
$npwData = [];
|
||||||
$npwCounter = 1;
|
$npwCounter = 1;
|
||||||
|
|
||||||
|
|
||||||
while ($request->has("name_npw_{$npwCounter}")) {
|
while ($request->has("name_npw_{$npwCounter}")) {
|
||||||
$npwData[] = [
|
$npwData[] = [
|
||||||
@@ -604,11 +604,11 @@ class PenilaiController extends Controller
|
|||||||
];
|
];
|
||||||
$npwCounter++;
|
$npwCounter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($npwData)) {
|
if (!empty($npwData)) {
|
||||||
$data['npw_tambahan'] = $npwData;
|
$data['npw_tambahan'] = $npwData;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update atau buat data baru
|
// Update atau buat data baru
|
||||||
$penilai = Penilai::updateOrCreate(
|
$penilai = Penilai::updateOrCreate(
|
||||||
[
|
[
|
||||||
@@ -620,7 +620,7 @@ class PenilaiController extends Controller
|
|||||||
'lpj' => json_encode($data),
|
'lpj' => json_encode($data),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'success' => true,
|
'success' => true,
|
||||||
'message' => 'Berhasil menyimpan LPJ',
|
'message' => 'Berhasil menyimpan LPJ',
|
||||||
@@ -635,7 +635,7 @@ class PenilaiController extends Controller
|
|||||||
], 500);
|
], 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function print_out(Request $request)
|
public function print_out(Request $request)
|
||||||
|
|||||||
@@ -55,8 +55,8 @@
|
|||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
||||||
@if (isset($formFoto['foto_lantai_unit']['foto_lantai_unit'] ))
|
@if (isset($formFoto['foto_lantai_unit'] ))
|
||||||
@foreach ($formFoto['foto_lantai_unit']['foto_lantai_unit'] as $index => $floorPhotos)
|
@foreach ($formFoto['foto_lantai_unit'] as $index => $floorPhotos)
|
||||||
@foreach ($floorPhotos as $index => $item)
|
@foreach ($floorPhotos as $index => $item)
|
||||||
<div class="border photo-item">
|
<div class="border photo-item">
|
||||||
<h2 class="text-gray-600 font-semibold text-xl">
|
<h2 class="text-gray-600 font-semibold text-xl">
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
{{-- @if (isset($formFoto['foto_lingkungan']['foto_lingkungan']))
|
@if (isset($formFoto['foto_lingkungan']['foto_lingkungan']))
|
||||||
@foreach ($formFoto['foto_lingkungan']['foto_lingkungan'][0] as $index => $item)
|
@foreach ($formFoto['foto_lingkungan']['foto_lingkungan'][0] as $index => $item)
|
||||||
<div class="border photo-item">
|
<div class="border photo-item">
|
||||||
<h2 class="text-gray-600 font-semibold text-xl">
|
<h2 class="text-gray-600 font-semibold text-xl">
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif --}}
|
@endif
|
||||||
|
|
||||||
@if (isset($formFoto['foto_basement']))
|
@if (isset($formFoto['foto_basement']))
|
||||||
<div class="border photo-item">
|
<div class="border photo-item">
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@if (isset($formFoto['foto_rute_lainnya']))
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header" id="basic_settings">
|
<div class="card-header" id="basic_settings">
|
||||||
<h3 class="card-title">
|
<h3 class="card-title">
|
||||||
@@ -47,7 +48,7 @@
|
|||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header bg-agi-50" id="basic_settings">
|
<div class="card-header bg-agi-50" id="basic_settings">
|
||||||
@@ -74,13 +75,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@if (isset($formFoto['foto_lantai_unit']))
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header" id="basic_settings">
|
<div class="card-header" id="basic_settings">
|
||||||
<h3 class="card-title">Lantai</h3>
|
<h3 class="card-title">Lantai</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
@if (isset($formFoto['foto_lantai_unit']['foto_lantai_unit']))
|
@if (isset($formFoto['foto_lantai_unit']))
|
||||||
@foreach ($formFoto['foto_lantai_unit']['foto_lantai_unit'] as $floorIndex => $floorPhotos)
|
@foreach ($formFoto['foto_lantai_unit'] as $floorIndex => $floorPhotos)
|
||||||
<div class="mt-5">
|
<div class="mt-5">
|
||||||
@foreach ($floorPhotos as $index => $item)
|
@foreach ($floorPhotos as $index => $item)
|
||||||
<div class="flex items-center justify-between mt-3">
|
<div class="flex items-center justify-between mt-3">
|
||||||
@@ -102,7 +104,7 @@
|
|||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header" id="basic_settings">
|
<div class="card-header" id="basic_settings">
|
||||||
|
|||||||
@@ -498,9 +498,11 @@
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
@php
|
@php
|
||||||
$cekHub = isset($forminspeksi['asset']['hub_cadeb']) && $forminspeksi['asset']['hub_cadeb'] === 'sesuai'
|
$cekHub =
|
||||||
? 'sesuai'
|
isset($forminspeksi['asset']['hub_cadeb']) &&
|
||||||
: 'tidak sesuai';
|
$forminspeksi['asset']['hub_cadeb'] === 'sesuai'
|
||||||
|
? 'sesuai'
|
||||||
|
: 'tidak sesuai';
|
||||||
|
|
||||||
$hubCadeb = isset($forminspeksi['asset']['hub_cadeb'][$cekHub])
|
$hubCadeb = isset($forminspeksi['asset']['hub_cadeb'][$cekHub])
|
||||||
? $forminspeksi['asset']['hub_cadeb'][$cekHub]
|
? $forminspeksi['asset']['hub_cadeb'][$cekHub]
|
||||||
@@ -523,48 +525,49 @@
|
|||||||
@php $count++; @endphp
|
@php $count++; @endphp
|
||||||
|
|
||||||
@if ($count % 3 === 0)
|
@if ($count % 3 === 0)
|
||||||
</tr><tr> <!-- Membuka baris baru setelah 3 kolom -->
|
|
||||||
@endif
|
|
||||||
@endforeach
|
|
||||||
|
|
||||||
{{-- Isi kolom kosong jika tidak genap --}}
|
|
||||||
@if ($count % 3 !== 0)
|
|
||||||
@for ($i = 0; $i < (3 - $count % 3); $i++)
|
|
||||||
<td></td>
|
|
||||||
@endfor
|
|
||||||
@endif
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
<tr> <!-- Membuka baris baru setelah 3 kolom -->
|
||||||
@endif
|
@endif
|
||||||
</td>
|
@endforeach
|
||||||
|
|
||||||
|
{{-- Isi kolom kosong jika tidak genap --}}
|
||||||
|
@if ($count % 3 !== 0)
|
||||||
|
@for ($i = 0; $i < 3 - ($count % 3); $i++)
|
||||||
|
<td></td>
|
||||||
|
@endfor
|
||||||
|
@endif
|
||||||
</tr>
|
</tr>
|
||||||
|
</table>
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
@php
|
@php
|
||||||
|
|
||||||
$cekHub =
|
$cekHub =
|
||||||
isset($forminspeksi['asset']['hub_cadeb_penghuni']) &&
|
isset($forminspeksi['asset']['hub_cadeb_penghuni']) &&
|
||||||
$forminspeksi['asset']['hub_cadeb_penghuni'] === 'sesuai'
|
$forminspeksi['asset']['hub_cadeb_penghuni'] === 'sesuai'
|
||||||
? 'sesuai'
|
? 'sesuai'
|
||||||
: 'tidak sesuai';
|
: 'tidak sesuai';
|
||||||
|
|
||||||
$hubCadeb = isset($forminspeksi['asset']['hub_cadeb_penghuni'][$cekHub])
|
$hubCadeb = isset($forminspeksi['asset']['hub_cadeb_penghuni'][$cekHub])
|
||||||
? $forminspeksi['asset']['hub_cadeb_penghuni']['tidak sesuai']
|
? $forminspeksi['asset']['hub_cadeb_penghuni']['tidak sesuai']
|
||||||
: $forminspeksi['asset']['hub_cadeb_penghuni']['sesuai'];
|
: $forminspeksi['asset']['hub_cadeb_penghuni']['sesuai'];
|
||||||
@endphp
|
@endphp
|
||||||
<td><strong>Hubungan Penghuni Jaminan dengan Debitur</strong></td>
|
<td><strong>Hubungan Penghuni Jaminan dengan Debitur</strong></td>
|
||||||
<td>
|
<td>
|
||||||
@if (isset($basicData['hubPenghuni']))
|
@if (isset($basicData['hubPenghuni']))
|
||||||
<table class="checkbox-table">
|
<table class="checkbox-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
{{ $hubCadeb ?? '' }}
|
{{ $hubCadeb ?? '' }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
@@ -836,44 +839,48 @@
|
|||||||
|
|
||||||
<!-- Spesifikasi Bangunan -->
|
<!-- Spesifikasi Bangunan -->
|
||||||
@if (isset($basicData['spekKategoriBangunan']))
|
@if (isset($basicData['spekKategoriBangunan']))
|
||||||
@foreach ($basicData['spekKategoriBangunan'] as $index => $spesifikasi)
|
@foreach ($basicData['spekKategoriBangunan'] as $index => $spesifikasi)
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>{{ $spesifikasi->name }}</strong></td>
|
<td><strong>{{ $spesifikasi->name }}</strong></td>
|
||||||
<td>
|
<td>
|
||||||
<table class="checkbox-list">
|
<table class="checkbox-list">
|
||||||
@if (isset($basicData['spekBangunan']))
|
@if (isset($basicData['spekBangunan']))
|
||||||
@php $count = 0; @endphp
|
@php $count = 0; @endphp
|
||||||
<tr> <!-- Start row for checkboxes -->
|
<tr> <!-- Start row for checkboxes -->
|
||||||
@foreach ($basicData['spekBangunan'] as $kategori)
|
@foreach ($basicData['spekBangunan'] as $kategori)
|
||||||
@if ($kategori->spek_kategori_bangunan_id == $spesifikasi->id)
|
@if ($kategori->spek_kategori_bangunan_id == $spesifikasi->id)
|
||||||
<td class="checkbox-item">
|
<td class="checkbox-item">
|
||||||
<label class="checkbox-label">
|
<label class="checkbox-label">
|
||||||
<input
|
<input type="checkbox" style="margin-right: 3px;"
|
||||||
type="checkbox"
|
name="spesifikasi_bangunan[{{ $index }}][{{ $spesifikasi->name }}][]"
|
||||||
style="margin-right: 3px;"
|
value="{{ $kategori->name }}"
|
||||||
name="spesifikasi_bangunan[{{ $index }}][{{ $spesifikasi->name }}][]"
|
{{ isset(
|
||||||
value="{{ $kategori->name }}"
|
$forminspeksi['bangunan']['spesifikasi_bangunan'][$index]['spek_kategori_bangunan'][$spesifikasi->name],
|
||||||
{{ isset($forminspeksi['bangunan']['spesifikasi_bangunan'][$index]['spek_kategori_bangunan'][$spesifikasi->name]) &&
|
) &&
|
||||||
in_array($kategori->name, $forminspeksi['bangunan']['spesifikasi_bangunan'][$index]['spek_kategori_bangunan'][$spesifikasi->name])
|
in_array(
|
||||||
? 'checked'
|
$kategori->name,
|
||||||
: '' }}>
|
$forminspeksi['bangunan']['spesifikasi_bangunan'][$index]['spek_kategori_bangunan'][$spesifikasi->name],
|
||||||
{{ $kategori->name }}
|
)
|
||||||
</label>
|
? 'checked'
|
||||||
</td>
|
: '' }}>
|
||||||
@php $count++; @endphp
|
{{ $kategori->name }}
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
@php $count++; @endphp
|
||||||
|
|
||||||
@if ($count % 3 == 0)
|
@if ($count % 3 == 0)
|
||||||
</tr><tr> <!-- Start a new row every 3 items -->
|
</tr>
|
||||||
@endif
|
<tr> <!-- Start a new row every 3 items -->
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
|
||||||
</tr> <!-- Close last row -->
|
|
||||||
@endif
|
@endif
|
||||||
|
@endforeach
|
||||||
|
</tr> <!-- Close last row -->
|
||||||
|
@endif
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -893,7 +900,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@elseif ($kategori === 'apartemen-kantor')
|
@elseif ($kategori === 'apartemen-kantor')
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
@php
|
@php
|
||||||
@@ -1270,53 +1277,85 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
{{-- Faktor Negatif --}}
|
||||||
<tr>
|
<tr>
|
||||||
<td width="25%" style="vertical-align: top;"><strong>Faktor Negatif</strong></td>
|
<td width="25%" style="vertical-align: top;"><strong>Faktor Negatif</strong></td>
|
||||||
<td>
|
<td>
|
||||||
@isset($forminspeksi['fakta']['fakta_negatif'])
|
@php
|
||||||
|
$faktaNegatif = $forminspeksi['fakta']['fakta_negatif'] ?? [];
|
||||||
|
$faktaNegatifFiltered = is_array($faktaNegatif)
|
||||||
|
? array_filter($faktaNegatif, function ($item) {
|
||||||
|
return !empty(trim($item));
|
||||||
|
})
|
||||||
|
: [];
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@if (!empty($faktaNegatifFiltered))
|
||||||
<table style="width: 100%; border-collapse: collapse;">
|
<table style="width: 100%; border-collapse: collapse;">
|
||||||
@foreach ($forminspeksi['fakta']['fakta_negatif'] as $key => $item)
|
@foreach ($faktaNegatifFiltered as $key => $item)
|
||||||
<tr>
|
<tr>
|
||||||
<td>[{{ $key }}] {{ $item }}</td>
|
<td>[{{ $key + 1 }}] {{ $item }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</table>
|
</table>
|
||||||
@endisset
|
@else
|
||||||
|
<p>Tidak ada faktor negatif yang teridentifikasi.</p>
|
||||||
|
@endif
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
{{-- Lain-lain --}}
|
||||||
<tr>
|
<tr>
|
||||||
<td width="25%" style="vertical-align: top;"><strong>Lain - lain :</strong></td>
|
<td width="25%" style="vertical-align: top;"><strong>Lain - lain :</strong></td>
|
||||||
<td>
|
<td>
|
||||||
<p>- Berdasarkan hasil kunjungan di lapangan dapat disampaikan sebagai berikut :</p>
|
<p>- Berdasarkan hasil kunjungan di lapangan dapat disampaikan sebagai berikut :</p>
|
||||||
|
|
||||||
@isset($forminspeksi['fakta'])
|
@php
|
||||||
@foreach ($forminspeksi['fakta'] as $key => $item)
|
$excludedKeys = [
|
||||||
@if (
|
'fakta_positif',
|
||||||
!in_array($key, [
|
'fakta_negatif',
|
||||||
'fakta_positif',
|
'rute_menuju',
|
||||||
'fakta_negatif',
|
'batas_batas',
|
||||||
'rute_menuju',
|
'batas_batas_input',
|
||||||
'batas_batas',
|
'kondisi_lingkungan',
|
||||||
'batas_batas_input',
|
'kondisi_lain_bangunan',
|
||||||
'kondisi_lingkungan',
|
'informasi_dokument',
|
||||||
'kondisi_lain_bangunan',
|
];
|
||||||
'informasi_dokument',
|
|
||||||
]))
|
$additionalFakta = [];
|
||||||
|
if (isset($forminspeksi['fakta']) && is_array($forminspeksi['fakta'])) {
|
||||||
|
foreach ($forminspeksi['fakta'] as $key => $item) {
|
||||||
|
// Cek apakah key tidak ada di daftar yang dikecualikan
|
||||||
|
if (!in_array($key, $excludedKeys)) {
|
||||||
|
// Pastikan item bukan array kosong atau null
|
||||||
|
if (!empty($item) && (!is_array($item) || count($item) > 0)) {
|
||||||
|
$additionalFakta[$key] = $item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@if (!empty($additionalFakta))
|
||||||
|
@foreach ($additionalFakta as $key => $item)
|
||||||
|
@if (is_array($item))
|
||||||
|
<p>{{ $key }}: {{ implode(', ', array_filter($item)) }}</p>
|
||||||
|
@else
|
||||||
<p>{{ $item }}</p>
|
<p>{{ $item }}</p>
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@endisset
|
@else
|
||||||
|
<p>Tidak ada informasi tambahan yang dapat disampaikan.</p>
|
||||||
|
@endif
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>2. Informasi Harga:</td>
|
<td>2. Informasi Harga:</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="25%" style="vertical-align: top;"><strong>Lain - lain :</strong></td>
|
<td width="25%" style="vertical-align: top;"><strong>Lain - lain :</strong></td>
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -1371,17 +1410,23 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Catatan yang Perlu Diperhatikan:</td>
|
<td>Catatan yang Perlu Diperhatikan:</td>
|
||||||
<td>
|
<td>
|
||||||
@isset($forminspeksi['fakta']['keterangan'])
|
@php
|
||||||
|
$keterangan = $forminspeksi['fakta']['keterangan'] ?? '';
|
||||||
|
if (is_array($keterangan)) {
|
||||||
|
$keterangan = implode(', ', array_filter($keterangan));
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@if (!empty($keterangan))
|
||||||
<table style="width: 100%; border-collapse: collapse;">
|
<table style="width: 100%; border-collapse: collapse;">
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $forminspeksi['fakta']['keterangan'] ?? '' }}</td>
|
<td>{{ $keterangan }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
@endisset
|
@endif
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
@@ -1418,54 +1463,54 @@
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="page-break"></div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<div class="judul">
|
||||||
|
<h6 class="border">
|
||||||
|
PETA
|
||||||
|
</h6>
|
||||||
</div>
|
</div>
|
||||||
<div class="page-break"></div>
|
|
||||||
|
|
||||||
|
<div>
|
||||||
|
@php
|
||||||
|
$fotoTypes = ['foto_gistaru', 'foto_bhumi', 'foto_argis_region', 'foto_tempat'];
|
||||||
|
if (($key = array_search('foto_tempat', $fotoTypes)) !== false) {
|
||||||
|
unset($fotoTypes[$key]);
|
||||||
|
array_unshift($fotoTypes, 'foto_tempat');
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
|
|
||||||
<div class="section">
|
@if (isset($forminspeksi))
|
||||||
<div class="judul">
|
@forelse ($fotoTypes as $type)
|
||||||
<h6 class="border">
|
|
||||||
PETA
|
|
||||||
</h6>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
@php
|
|
||||||
$fotoTypes = ['foto_gistaru', 'foto_bhumi', 'foto_argis_region', 'foto_tempat'];
|
|
||||||
if (($key = array_search('foto_tempat', $fotoTypes)) !== false) {
|
|
||||||
unset($fotoTypes[$key]);
|
|
||||||
array_unshift($fotoTypes, 'foto_tempat');
|
|
||||||
}
|
|
||||||
@endphp
|
|
||||||
|
|
||||||
@if (isset($forminspeksi))
|
|
||||||
@forelse ($fotoTypes as $type)
|
|
||||||
<div class="border photo-item">
|
<div class="border photo-item">
|
||||||
@php
|
@php
|
||||||
$imagePath = $forminspeksi[$type] ?? null;
|
$imagePath = $forminspeksi[$type] ?? null;
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@if ($imagePath && file_exists(storage_path('app/public/' . $imagePath)))
|
@if ($imagePath && file_exists(storage_path('app/public/' . $imagePath)))
|
||||||
<img src="{{ storage_path('app/public/' . $imagePath) }}" alt="{{ $type }}"
|
<img src="{{ storage_path('app/public/' . $imagePath) }}"
|
||||||
class="photo-image">
|
alt="{{ $type }}" class="photo-image">
|
||||||
@endif
|
@endif
|
||||||
<p class="mt-2 text-sm">{{ Str::title(str_replace('_', ' ', $type)) }}</p>
|
<p class="mt-2 text-sm">{{ Str::title(str_replace('_', ' ', $type)) }}</p>
|
||||||
</div>
|
</div>
|
||||||
@empty
|
@empty
|
||||||
<p>Tidak ada tipe foto yang tersedia</p>
|
<p>Tidak ada tipe foto yang tersedia</p>
|
||||||
@endforelse
|
@endforelse
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<div class="judul">
|
||||||
|
<h6 class="border">
|
||||||
|
FOTO JAMINAN
|
||||||
|
</h6>
|
||||||
</div>
|
</div>
|
||||||
<div class="section">
|
@include('lpj::penilai.components.foto-jaminan')
|
||||||
<div class="judul">
|
</div>
|
||||||
<h6 class="border">
|
|
||||||
FOTO JAMINAN
|
|
||||||
</h6>
|
|
||||||
</div>
|
|
||||||
@include('lpj::penilai.components.foto-jaminan')
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
|||||||
@@ -42,9 +42,12 @@
|
|||||||
|
|
||||||
<div id="luas_unit_tidak_sesuai" class="flex items-baseline gap-2"
|
<div id="luas_unit_tidak_sesuai" class="flex items-baseline gap-2"
|
||||||
style="{{ old('luas_unit', isset($forminspeksi['luas_unit']['tidak sesuai'])) ? '' : 'display: none;' }}">
|
style="{{ old('luas_unit', isset($forminspeksi['luas_unit']['tidak sesuai'])) ? '' : 'display: none;' }}">
|
||||||
|
<div class="input">
|
||||||
<input id="analisa_luas_unit_tidak_sesuai" type="text" name="luas_unit_tidak_sesuai"
|
<input id="analisa_luas_unit_tidak_sesuai" type="text" name="luas_unit_tidak_sesuai"
|
||||||
class="input w-full" placeholder="Masukan Luas Tanah"
|
class="number-format w-full" placeholder="Masukan Luas Tanah"
|
||||||
value="{{ old('luas_unit_tidak_sesuai', $forminspeksi['luas_unit_tidak_sesuai'] ?? '') }}">
|
value="{{ old('luas_unit_tidak_sesuai', $forminspeksi['luas_unit_tidak_sesuai'] ?? '') }}">
|
||||||
|
<i>M<sup>2</sup></i>
|
||||||
|
</div>
|
||||||
<button type="button" class="btn btn-md btn-primary"
|
<button type="button" class="btn btn-md btn-primary"
|
||||||
onclick="updateAnalisa('analisa_unit')">Save</button>
|
onclick="updateAnalisa('analisa_unit')">Save</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -47,10 +47,13 @@
|
|||||||
|
|
||||||
<div id="luas_tanah_bagunan_tidak_sesuai" class="flex items-baseline gap-2"
|
<div id="luas_tanah_bagunan_tidak_sesuai" class="flex items-baseline gap-2"
|
||||||
style="{{ old('luas_tanah_bagunan_tidak_sesuai', $selectedData) ? '' : 'display: none' }}">
|
style="{{ old('luas_tanah_bagunan_tidak_sesuai', $selectedData) ? '' : 'display: none' }}">
|
||||||
|
<div class="input">
|
||||||
<input type="text" id="analisa_bangunan_tidak_sesuai"
|
<input type="text" id="analisa_bangunan_tidak_sesuai"
|
||||||
name="luas_tanah_bagunan_tidak_sesuai" class="input w-full"
|
name="luas_tanah_bagunan_tidak_sesuai" class="w-full number-format"
|
||||||
placeholder="Masukan Luas Bangunan Tidak Sesuai..."
|
placeholder="Masukan Luas Bangunan Tidak Sesuai..."
|
||||||
value="{{ old('luas_tanah_bagunan_tidak_sesuai', $forminspeksi['bangunan']['luas_tanah_bagunan']['tidak sesuai'] ?? '') }}">
|
value="{{ old('luas_tanah_bagunan_tidak_sesuai', $forminspeksi['bangunan']['luas_tanah_bagunan']['tidak sesuai'] ?? '') }}">
|
||||||
|
<i>M<sup>2</sup></i>
|
||||||
|
</div>
|
||||||
<button type="button" class="btn btn-md btn-primary"
|
<button type="button" class="btn btn-md btn-primary"
|
||||||
onclick="updateAnalisa('analisa_bangunan')">
|
onclick="updateAnalisa('analisa_bangunan')">
|
||||||
Save
|
Save
|
||||||
|
|||||||
@@ -244,6 +244,12 @@
|
|||||||
this.closest('.perwakilan').remove();
|
this.closest('.perwakilan').remove();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
document.querySelectorAll('.number-format').forEach(input => {
|
||||||
|
input.addEventListener('input', function() {
|
||||||
|
formatNumber(this);
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -38,9 +38,12 @@
|
|||||||
</label>
|
</label>
|
||||||
<div id="luas_tanah_tidak_sesuai" class="flex items-baseline gap-2"
|
<div id="luas_tanah_tidak_sesuai" class="flex items-baseline gap-2"
|
||||||
style="{{ old('luas_tanah', isset($forminspeksi['tanah']['luas_tanah']['tidak sesuai'])) ? '' : 'display: none;' }}">
|
style="{{ old('luas_tanah', isset($forminspeksi['tanah']['luas_tanah']['tidak sesuai'])) ? '' : 'display: none;' }}">
|
||||||
<input id="analisa_tanah_tidak_sesuai" type="text" name="luas_tanah_tidak_sesuai"
|
<div class="input">
|
||||||
class="input w-full" placeholder="Masukan Luas Tanah"
|
<input id="analisa_tanah_tidak_sesuai" type="text" name="luas_tanah_tidak_sesuai"
|
||||||
|
class="w-full number-format" placeholder="Masukan Luas Tanah"
|
||||||
value="{{ old('luas_tanah_tidak_sesuai', $forminspeksi['tanah']['luas_tanah']['tidak sesuai'] ?? '') }}">
|
value="{{ old('luas_tanah_tidak_sesuai', $forminspeksi['tanah']['luas_tanah']['tidak sesuai'] ?? '') }}">
|
||||||
|
<i>M<sup>2</sup></i>
|
||||||
|
</div>
|
||||||
<button type="button" class="btn btn-md btn-primary"
|
<button type="button" class="btn btn-md btn-primary"
|
||||||
onclick="updateAnalisa('analisa_tanah')">Save
|
onclick="updateAnalisa('analisa_tanah')">Save
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user