perbaikan laporan berdasarkan form inspeksi di so dan penilai dan perbaikan tambah data di jenis jaminan
This commit is contained in:
@@ -3,6 +3,11 @@
|
||||
<h3 class="card-title uppercase">
|
||||
Order Penilaian
|
||||
</h3>
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="{{ url()->previous() }}" class="btn btn-xs btn-info">
|
||||
<i class="ki-filled ki-exit-left"></i> Back
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="grid gap-5 grid-cols-2">
|
||||
@@ -404,13 +409,24 @@
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Faktor Positif</label>
|
||||
<div id="fakta-positif-container" class="flex flex-wrap items-baseline w-full">
|
||||
<div class="fakta_positif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_positif[]" rows="3">{{ old('fakta_positif.0', $forminspeksi['fakta_positif'][0] ?? '') }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
<em id="error-fakta_positif" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
@if (!empty($forminspeksi['fakta_positif']))
|
||||
@foreach ($forminspeksi['fakta_positif'] as $index => $positif)
|
||||
<div class="fakta_positif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_positif[]" rows="3">{{ old("fakta_positif.$index", $positif) }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
<div class="fakta_positif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_positif[]" rows="3">{{ old('fakta_positif.0', '') }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
<button type="button" class="btn btn-primary btn-sm mt-5"
|
||||
onclick="addClonableItem('fakta-positif-container', 'fakta_positif')">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
@@ -421,13 +437,26 @@
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Faktor Negatif</label>
|
||||
<div id="fakta-negatif-container" class="flex flex-wrap items-baseline w-full">
|
||||
<div class="fakta_negatif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_negatif[]" rows="3">{{ old('fakta_negatif.0', $forminspeksi['fakta_negatif'][0] ?? '') }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
<em id="error-fakta_negatif" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
|
||||
@if (!empty($forminspeksi['fakta_negatif']))
|
||||
@foreach ($forminspeksi['fakta_negatif'] as $index => $negatif)
|
||||
<div class="fakta_negatif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_negatif[]" rows="3">{{ old("fakta_negatif.$index", $negatif) }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
<div class="fakta_negatif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_negatif[]" rows="3">{{ old('fakta_negatif.0', $forminspeksi['fakta_negatif'][0] ?? '') }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
<em id="error-fakta_negatif" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
@endif
|
||||
<button type="button" class="btn btn-primary btn-sm mt-5"
|
||||
onclick="addClonableItem('fakta-negatif-container', 'fakta_negatif')">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
$jaminanId = $dokumen->id;
|
||||
$currentInspeksi = $inspeksiData[$jaminanId] ?? null;
|
||||
|
||||
$tanahBangunanTypes = ['KAPAL', 'PESAWAT', 'KENDARAAN', 'ALAT BERAT'];
|
||||
$tanahBangunanTypes = ['KAPAL', 'PESAWAT', 'KENDARAAN', 'ALAT BERAT', 'MESIN'];
|
||||
|
||||
$href = [
|
||||
[
|
||||
|
||||
@@ -15,464 +15,17 @@
|
||||
<input type="hidden" name="permohonan_id" value="{{ $permohonan->id }}">
|
||||
<input type="hidden" name="type" value="tanah">
|
||||
<input type="hidden" name="dokument_id" value="{{ request('dokument') }}">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header bg-agi-50">
|
||||
<h3 class="card-title">Data Pembanding</h3>
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="{{ route('surveyor.show', ['id' => request('pembanding')]) }}"
|
||||
class="btn btn-xs btn-info">
|
||||
<i class="ki-filled ki-exit-left"></i> Kembali
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-header bg-agi-50 py-5 flex-wrap flex justify-end">
|
||||
<button type="button" id="addColumnBtn" class="btn btn-primary btn-sm">
|
||||
<i class="ki-filled ki-plus"></i> Tambah Pembanding
|
||||
@include('lpj::surveyor.components.pembanding-kendaraan')
|
||||
<div class="card-footer">
|
||||
<div class="flex justify-end gap-2">
|
||||
<button type="button" onclick="submitData()" class="btn btn-primary">
|
||||
<i class="ki-duotone ki-save-2 fs-2"></i>
|
||||
Simpan
|
||||
</button>
|
||||
<button type="button" id="removeColumnBtn" class="btn btn-danger btn-sm ml-2"
|
||||
style="display: none;">
|
||||
<i class="ki-filled ki-minus"></i> Hapus Pembanding
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{{-- @php
|
||||
print_r($inspectionData);
|
||||
@endphp --}}
|
||||
|
||||
<div class="card-body">
|
||||
<div class="scrollable-x-auto">
|
||||
<table id="dataTable"
|
||||
class="table table-auto table-border align-middle text-gray-700 font-medium text-sm">
|
||||
<thead class="bg-gray-50 sticky top-0">
|
||||
<tr>
|
||||
<th class="px-4 py-3 min-w-[200px]">Parameter</th>
|
||||
<th class="px-4 py-3 min-w-[250px]">Objek Penilaian</th>
|
||||
<th class="px-4 py-3 min-w-[250px]">Data Pembanding 1</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- Informasi Dasar -->
|
||||
<tr class="bg-gray-100">
|
||||
<td colspan="3" class="px-4 py-2 font-semibold">Informasi Dasar</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Foto</td>
|
||||
<td class="px-4 py-2">
|
||||
<div class="flex flex-col gap-2">
|
||||
<img id="uploadedImage1"
|
||||
src="{{ isset($fotoForm['object_jaminan'][0]['foto_objek']) ? asset('storage/' . $fotoForm['object_jaminan'][0]['foto_objek']) : '' }}"
|
||||
class="max-w-[200px] {{ isset($fotoForm['object_jaminan'][0]['foto_objek']) ? '' : 'hidden' }}"
|
||||
alt="Uploaded Image">
|
||||
<input type="file" name="foto_objek" class="file-input"
|
||||
accept="image/*" onchange="previewImage(this, 'uploadedImage1')">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<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/*" onchange="previewImage(this, 'uploadedImage2')">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<!-- Data Properti -->
|
||||
<tr class="bg-gray-100">
|
||||
<td colspan="3" class="px-4 py-2 font-semibold">Data Properti</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Jenis Aset</td>
|
||||
<td class="px-4 py-2">
|
||||
<select name="jenis_aset" class="select">
|
||||
<option value="">Pilih Jenis Aset</option>
|
||||
@foreach ($data['jenisJaminan'] as $item)
|
||||
<option value="{{ $item->name }}"
|
||||
{{ ($inspectionData['asset']['jenis_asset']['sesuai'] ?? '') == $item->name ? 'selected' : '' }}>
|
||||
{{ $item->name }}</option>
|
||||
@endforeach
|
||||
|
||||
</select>
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<select name="jenis_aset_pembanding[]" class="select">
|
||||
<option value="">Pilih Jenis Aset</option>
|
||||
@foreach ($data['jenisJaminan'] as $item)
|
||||
<option value="{{ $item->name }}"
|
||||
{{ ($inspectionData['jenis_aset'] ?? '') == $item->name ? 'selected' : '' }}>
|
||||
{{ $item->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Luas Tanah (m²)</td>
|
||||
@php
|
||||
$cekLuas =
|
||||
isset($inspectionData['tanah']['luas_tanah']) == 'sesuai'
|
||||
? 'sesuai'
|
||||
: 'tidak sesuai';
|
||||
|
||||
@endphp
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="luas_tanah" class="input number-format"
|
||||
value="{{ $inspectionData['tanah']['luas_tanah']['sesuai'] ?? ($inspectionData['tanah']['luas_tanah']['tidak sesuai'] ?? '') }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
|
||||
<input type="text" name="luas_tanah_pembanding[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Luas Bangunan (m²)</td>
|
||||
<td class="px-4 py-2">
|
||||
|
||||
<input type="text" name="luas_tanah_bagunan"
|
||||
class="input number-format"
|
||||
value="{{ $inspectionData['bangunan']['luas_tanah_bagunan']['sesuai'] ?? ($inspectionData['bangunan']['luas_tanah_bagunan']['tidak sesuai'] ?? '') }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="luas_bangunan_pembanding[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<!-- Informasi Harga -->
|
||||
<tr class="bg-gray-100">
|
||||
<td colspan="3" class="px-4 py-2 font-semibold">Informasi</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Hak atas properti yang dialihkan</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="hak_properti" class="input"
|
||||
value="{{ $inspectionData['asset']['hak_properti'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="hak_properti_pembanding[]"
|
||||
class="input">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Penawaran/ Transaksi</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="penawaran" class="input"
|
||||
value="{{ $inspectionData['asset']['penawaran'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="penawaran_pembanding[]"
|
||||
class="input">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Telepon Contact Person</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="telepon" class="input"
|
||||
value="{{ $inspectionData['asset']['telepon'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="telepon_pembanding[]"
|
||||
class="input">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Status Narasumber</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="status_nara_sumber" class="input"
|
||||
value="{{ $inspectionData['asset']['status_nara_sumber'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="status_nara_sumber_pembanding[]"
|
||||
class="input">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Nama Narasumber</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="nama_nara_sumber" class="input"
|
||||
value="{{ $inspectionData['asset']['nama_nara_sumber'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="nama_nara_sumber_pembanding[]"
|
||||
class="input">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<!-- Lokasi -->
|
||||
<tr class="bg-gray-100">
|
||||
<td colspan="3" class="px-4 py-2 font-semibold">Lokasi</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Koordinat</td>
|
||||
<td class="px-4 py-2">
|
||||
<div class="grid grid-cols-2 gap-2">
|
||||
<input type="text" name="kordinat_lat" class="input"
|
||||
placeholder="Latitude"
|
||||
value="{{ $inspectionData['asset']['kordinat_lat'] ?? '' }}">
|
||||
<input type="text" name="kordinat_lng" class="input"
|
||||
placeholder="Longitude"
|
||||
value="{{ $inspectionData['asset']['kordinat_lng'] ?? '' }}">
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<div class="grid grid-cols-2 gap-2">
|
||||
<input type="text" name="kordinat_lat_pembanding[]" class="input"
|
||||
placeholder="Latitude">
|
||||
<input type="text" name="kordinat_lng_pembanding[]" class="input"
|
||||
placeholder="Longitude">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Alamat</td>
|
||||
<td class="px-4 py-2">
|
||||
@php
|
||||
$statusAlamat = isset($inspectionData['asset']['alamat']['sesuai'])
|
||||
? 'sesuai'
|
||||
: 'tidak sesuai';
|
||||
$address =
|
||||
$inspectionData['asset']['alamat'][$statusAlamat]['address'] ??
|
||||
null;
|
||||
@endphp
|
||||
<textarea name="address" class="input py-2" rows="2">{{ $address }}</textarea>
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<textarea name="address_pembanding[]" class="input py-2" rows="2"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Provinsi</td>
|
||||
<td class="px-4 py-2">
|
||||
<select id="province_code" name="province_code" class="input w-full">
|
||||
@php
|
||||
$statusKey = isset($inspectionData['asset']['alamat']['sesuai'])
|
||||
? 'sesuai'
|
||||
: 'tidak sesuai';
|
||||
$address =
|
||||
$inspectionData['asset']['alamat'][$statusKey][
|
||||
'province_code'
|
||||
] ?? null;
|
||||
@endphp
|
||||
<option value="">Select Province</option>
|
||||
@foreach ($provinces as $province)
|
||||
@php
|
||||
$statusKey = isset(
|
||||
$inspectionData['asset']['alamat']['sesuai'],
|
||||
)
|
||||
? 'sesuai'
|
||||
: 'tidak sesuai';
|
||||
$selectedProvince =
|
||||
$inspectionData['asset']['alamat'][$statusKey][
|
||||
'province_code'
|
||||
] ?? null;
|
||||
@endphp
|
||||
|
||||
<option value="{{ $province->code }}"
|
||||
{{ $selectedProvince == $province->code ? 'selected' : '' }}>
|
||||
{{ $province->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<select id="province_code_pembanding" name="province_code_pembanding[]"
|
||||
onchange="handleProvinceChange(this)" class="input w-full">
|
||||
<option value="">Pilih Provinsi</option>
|
||||
@foreach ($provinces as $province)
|
||||
<option value="{{ $province->code }}">{{ $province->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Kabupaten/Kota</td>
|
||||
<td class="px-4 py-2">
|
||||
<select id="city_code" name="city_code" class="select w-full">
|
||||
@php
|
||||
|
||||
$statusKey = isset($inspectionData['asset']['alamat']['sesuai'])
|
||||
? 'sesuai'
|
||||
: 'tidak sesuai';
|
||||
$selectedCity =
|
||||
$inspectionData['asset']['alamat'][$statusKey][
|
||||
'city_code'
|
||||
] ?? null;
|
||||
@endphp
|
||||
<option value="">Pilih Kota/Kabupaten</option>
|
||||
@if (isset($selectedCity))
|
||||
@foreach ($cities as $city)
|
||||
<option value="{{ $city->code }}"
|
||||
{{ $selectedCity == $city->code ? 'selected' : '' }}>
|
||||
{{ $city->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<select id="city_code_pembanding" name="city_code_pembanding[]"
|
||||
onchange="handleCityChange(this)" class="input w-full">
|
||||
<option value="">Pilih Kota/Kabupaten</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Kecamatan</td>
|
||||
<td class="px-4 py-2">
|
||||
<select id="district_code" name="district_code" class="select w-full">
|
||||
@php
|
||||
|
||||
$statusKey = isset($inspectionData['asset']['alamat']['sesuai'])
|
||||
? 'sesuai'
|
||||
: 'tidak sesuai';
|
||||
$selectedDisrict =
|
||||
$inspectionData['asset']['alamat'][$statusKey][
|
||||
'district_code'
|
||||
] ?? null;
|
||||
@endphp
|
||||
<option value="">Pilih Kecamatan</option>
|
||||
@if (isset($selectedDisrict))
|
||||
@foreach ($districts as $district)
|
||||
<option value="{{ $district->code }}"
|
||||
{{ $selectedDisrict == $district->code ? 'selected' : '' }}>
|
||||
{{ $district->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
|
||||
<select id="district_code_pembanding" name="district_code_pembanding[]"
|
||||
onchange="handleDistrictChange(this)" class="input w-full">
|
||||
<option value="">Pilih Kecamatan</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Desa/Kelurahan</td>
|
||||
<td class="px-4 py-2">
|
||||
<select id="village_code" name="village_code" class="select w-full">
|
||||
@php
|
||||
$statusKey = isset($inspectionData['asset']['alamat']['sesuai'])
|
||||
? 'sesuai'
|
||||
: 'tidak sesuai';
|
||||
$selectedDesa =
|
||||
$inspectionData['asset']['alamat'][$statusKey][
|
||||
'village_code'
|
||||
] ?? null;
|
||||
@endphp
|
||||
<option value="">Pilih Kecamatan</option>
|
||||
@if (isset($selectedDesa))
|
||||
@foreach ($villages as $village)
|
||||
<option value="{{ $village->code }}"
|
||||
{{ $selectedDesa == $village->code ? 'selected' : '' }}>
|
||||
{{ $village->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<select id="village_code_pembanding" name="village_code_pembanding[]"
|
||||
class="input w-full">
|
||||
<option value="">Pilih Desa/Kelurahan</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="bg-gray-100">
|
||||
<td colspan="3" class="px-4 py-2 font-semibold">Harga Per Meter</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Harga</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="harga" class="input currency-format"
|
||||
value="{{ $inspectionData['asset']['harga'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="harga_pembanding[]"
|
||||
class="input currency-format">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Diskon</td>
|
||||
<td class="px-4 py-2">
|
||||
<div class="input">
|
||||
<input type="text" name="diskon" class=" currency"
|
||||
value="{{ $inspectionData['asset']['diskon'] ?? '' }}">
|
||||
<span class="btn btn-icon">
|
||||
<i class="ki-outline ki-percentage"></i>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td class=" px-4 py-2">
|
||||
<div class="input">
|
||||
<input type="text" name="diskon_pembanding[]"
|
||||
class="currency">
|
||||
<span class="btn btn-icon">
|
||||
<i class="ki-outline ki-percentage"></i>
|
||||
</i>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="display: none;">
|
||||
<td class="px-4 py-2">Total</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="total" class="input currency"
|
||||
value="{{ $inspectionData['asset']['total'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="total_pembanding[]"
|
||||
class="input currency-format">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Harga Setelah Diskon</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="harga_diskon" class="input currency-format" readonly
|
||||
value="{{ $inspectionData['asset']['harga_diskon'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="harga_diskon_pembanding[]" readonly
|
||||
class="input currency-format">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
<div class="flex justify-end gap-2">
|
||||
<button type="button" onclick="submitData()" class="btn btn-primary">
|
||||
<i class="ki-duotone ki-save-2 fs-2"></i>
|
||||
Simpan
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -244,11 +244,14 @@
|
||||
|
||||
@php
|
||||
$processedCategories = [];
|
||||
$tanahBangunanTypes = ['KAPAL', 'PESAWAT', 'KENDARAAN', 'ALAT BERAT','MESIN'];
|
||||
$dokumentName = null;
|
||||
@endphp
|
||||
|
||||
@foreach ($permohonan->debiture->documents as $dokumen)
|
||||
@if ($dokumen->jenisJaminan)
|
||||
@php
|
||||
$dokumentName =$dokumen->jenisJaminan->name;
|
||||
$formKategori = json_decode($dokumen->jenisJaminan->form_kategori, true);
|
||||
@endphp
|
||||
@if (isset($formKategori) && $formKategori)
|
||||
@@ -323,6 +326,7 @@
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
@if (!in_array(strtoupper($dokumentName), $tanahBangunanTypes))
|
||||
<div id="lantaiContainer" class="mt-2">
|
||||
<!-- Lantai akan dinamis ditambahkan di sini -->
|
||||
<div class="lantai-item mb-4" id="lantai-item-1">
|
||||
@@ -390,6 +394,7 @@
|
||||
<i class="ki-outline ki-plus text-2sm"></i>
|
||||
Lainnya
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -218,33 +218,34 @@
|
||||
|
||||
<label class="form-label lg:form-label max-w-56 ">Catatan yang Perlu Diperhatikan
|
||||
</label>
|
||||
<div class="w-full">
|
||||
<div id="keterangan-container" class="flex items-baseline flex-wrap gap-2.5 w-full">
|
||||
@if (!empty($forminspeksi['fakta']['keterangan']) && is_array($forminspeksi['fakta']['keterangan']))
|
||||
@foreach ($forminspeksi['fakta']['keterangan'] as $index => $item)
|
||||
<div class="w-full">
|
||||
<div id="keterangan-container" class="flex items-baseline flex-wrap gap-2.5 w-full">
|
||||
@if (!empty($forminspeksi['fakta']['keterangan']) && is_array($forminspeksi['fakta']['keterangan']))
|
||||
@foreach ($forminspeksi['fakta']['keterangan'] as $index => $item)
|
||||
<div class="keterangan flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea name="keterangan[]" class="textarea mt-2" placeholder="Masukkan catatan penting" rows="3">{{ old("keterangan.$index", $item) }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
<div class="keterangan flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea name="keterangan[]" class="textarea mt-2" placeholder="Masukkan catatan penting" rows="3">{{ old("keterangan.$index", $item) }}</textarea>
|
||||
<textarea name="keterangan[]" class="textarea mt-2" placeholder="Masukkan catatan penting" rows="3"></textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
<em id="error-keterangan" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
<div class="keterangan flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea name="keterangan[]" class="textarea mt-2" placeholder="Masukkan catatan penting" rows="3"></textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
<em id="error-keterangan" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<button type="button" onclick="addClonableItem('keterangan-container', 'keterangan')"
|
||||
class="btn btn-primary btn-sm mt-5 ">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<button type="button" onclick="addClonableItem('keterangan-container', 'keterangan')"
|
||||
class="btn btn-primary btn-sm mt-5 ">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,6 +3,11 @@
|
||||
<h3 class="card-title uppercase">
|
||||
Order Penilaian
|
||||
</h3>
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="{{ url()->previous() }}" class="btn btn-xs btn-info">
|
||||
<i class="ki-filled ki-exit-left"></i> Back
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="grid gap-5 grid-cols-2">
|
||||
@@ -162,8 +167,8 @@
|
||||
<label class="form-label max-w-56">Kendaraan</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<div class="flex flex-col items-start gap-4">
|
||||
@if (isset($jenisKendaraan))
|
||||
@foreach ($jenisKendaraan as $item)
|
||||
@if (isset($basicData['jenisKendaraan']))
|
||||
@foreach ($basicData['jenisKendaraan'] as $item)
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56 gap-2.5" style="width: 500px">
|
||||
<input class="checkbox" name="kendaraan[]" type="checkbox"
|
||||
@@ -171,9 +176,9 @@
|
||||
{{ in_array($item->name, old('kendaraan', $forminspeksi['kendaraan'] ?? [])) ? 'checked' : '' }} />
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
<input type="text" name="sarana_pelengkap_input[]" class="input w-full"
|
||||
id="bentukTanahInput" placeholder="Masukkan {{ $item->name }}..."
|
||||
value="{{ old('sarana_pelengkap_input.' . $loop->index, $forminspeksi['sarana_pelengkap_input'][$loop->index] ?? '') }}">
|
||||
<input type="text" name="kendaraan_input[]" class="input w-full"
|
||||
id="kendaraan_input" placeholder="Masukkan {{ $item->name }}..."
|
||||
value="{{ old('kendaraan_input.' . $loop->index, $forminspeksi['kendaraan_input'][$loop->index] ?? '') }}">
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
@@ -400,7 +405,7 @@
|
||||
$inputDataJaminan = [
|
||||
[
|
||||
'label' => 'Transmisi',
|
||||
'value' => ['Terawat', 'Cukup Terawat', 'Tidak Terawat'],
|
||||
'value' => ['Otomatis', 'Manual'],
|
||||
'name' => 'transmisi',
|
||||
'index' => 0,
|
||||
],
|
||||
@@ -596,13 +601,24 @@
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Faktor Positif</label>
|
||||
<div id="fakta-positif-container" class="flex flex-wrap items-baseline w-full">
|
||||
<div class="fakta_positif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_positif[]" rows="3">{{ old('fakta_positif.0', $forminspeksi['fakta_positif'][0] ?? '') }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
<em id="error-fakta_positif" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
@if (!empty($forminspeksi['fakta_positif']))
|
||||
@foreach ($forminspeksi['fakta_positif'] as $index => $positif)
|
||||
<div class="fakta_positif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_positif[]" rows="3">{{ old("fakta_positif.$index", $positif) }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
<div class="fakta_positif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_positif[]" rows="3">{{ old('fakta_positif.0', '') }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
<button type="button" class="btn btn-primary btn-sm mt-5"
|
||||
onclick="addClonableItem('fakta-positif-container', 'fakta_positif')">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
@@ -610,16 +626,30 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Faktor Negatif</label>
|
||||
<div id="fakta-negatif-container" class="flex flex-wrap items-baseline w-full">
|
||||
<div class="fakta_negatif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_negatif[]" rows="3">{{ old('fakta_negatif.0', $forminspeksi['fakta_negatif'][0] ?? '') }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
<em id="error-fakta_negatif" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
|
||||
@if (!empty($forminspeksi['fakta_negatif']))
|
||||
@foreach ($forminspeksi['fakta_negatif'] as $index => $negatif)
|
||||
<div class="fakta_negatif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_negatif[]" rows="3">{{ old("fakta_negatif.$index", $negatif) }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
<div class="fakta_negatif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_negatif[]" rows="3">{{ old('fakta_negatif.0', $forminspeksi['fakta_negatif'][0] ?? '') }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
<em id="error-fakta_negatif" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
@endif
|
||||
<button type="button" class="btn btn-primary btn-sm mt-5"
|
||||
onclick="addClonableItem('fakta-negatif-container', 'fakta_negatif')">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
@@ -627,62 +657,92 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Analisa makro</label>
|
||||
<div class="flex flex-wrap items-baseline w-full" id="analisa-makro-container">
|
||||
<div class="analisa_makro flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="analisa_makro[]" rows="3" placeholder="Tambahkan keterangan"></textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
<em id="error-analisa_makro" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
<div id="analisa_makro-container" class="flex flex-wrap items-baseline w-full">
|
||||
|
||||
<button class="btn btn-primary btn-sm mt-5" type="button"
|
||||
onclick="addClonableItem('analisa-makro-container', 'analisa_makro')">
|
||||
@if (!empty($forminspeksi['analisa_makro']))
|
||||
@foreach ($forminspeksi['analisa_makro'] as $index => $negatif)
|
||||
<div class="analisa_makro flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="analisa_makro[]" rows="3">{{ old("analisa_makro.$index", $negatif) }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
<div class="analisa_makro flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="analisa_makro[]" rows="3">{{ old('analisa_makro.0', $forminspeksi['analisa_makro'][0] ?? '') }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
<em id="error-analisa_makro" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
@endif
|
||||
<button type="button" class="btn btn-primary btn-sm mt-5"
|
||||
onclick="addClonableItem('analisa_makro-container', 'analisa_makro')">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Kesimpulan</label>
|
||||
<div id="kesimpulan-container" class="flex flex-wrap items-baseline w-full">
|
||||
<div class="kesimpulan flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="kesimpulan[]" rows="3">{{ old('kesimpulan.0', $forminspeksi['kesimpulan'][0] ?? '') }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
<em id="error-kesimpulan" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
<button type="button"
|
||||
onclick="addClonableItem('kesimpulan-container', 'kesimpulan')"
|
||||
class="btn btn-primary btn-sm mt-5 ">
|
||||
@if (!empty($forminspeksi['kesimpulan']))
|
||||
@foreach ($forminspeksi['kesimpulan'] as $index => $negatif)
|
||||
<div class="kesimpulan flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="kesimpulan[]" rows="3">{{ old("kesimpulan.$index", $negatif) }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
<div class="kesimpulan flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="kesimpulan[]" rows="3">{{ old('kesimpulan.0', $forminspeksi['kesimpulan'][0] ?? '') }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
<em id="error-kesimpulan" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
@endif
|
||||
<button type="button" class="btn btn-primary btn-sm mt-5"
|
||||
onclick="addClonableItem('kesimpulan-container', 'kesimpulan')">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Catatan Lainnya</label>
|
||||
<label class="form-label max-w-56">Kesimpulan</label>
|
||||
<div id="catatan-container" class="flex flex-wrap items-baseline w-full">
|
||||
<div class="catatan flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="catatan[]" rows="3">{{ old('catatan.0', $forminspeksi['catatan'][0] ?? '') }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
<em id="error-catatan" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
<button type="button"
|
||||
onclick="addClonableItem('catatan-container', 'catatan')"
|
||||
class="btn btn-primary btn-sm mt-5 ">
|
||||
@if (!empty($forminspeksi['catatan']))
|
||||
@foreach ($forminspeksi['catatan'] as $index => $negatif)
|
||||
<div class="catatan flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="catatan[]" rows="3">{{ old("catatan.$index", $negatif) }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
<div class="catatan flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="catatan[]" rows="3">{{ old('catatan.0', $forminspeksi['catatan'][0] ?? '') }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
<em id="error-catatan" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
@endif
|
||||
<button type="button" class="btn btn-primary btn-sm mt-5"
|
||||
onclick="addClonableItem('catatan-container', 'catatan')">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -49,20 +49,14 @@
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="province_code" class="form-label max-w-56">Provinsi</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="province_code" name="province_code" class="input w-full" onchange="getCity(this.value)">
|
||||
<option value="">Select Province</option>
|
||||
@foreach ($provinces as $province)
|
||||
<option value="{{ $province->code }}"
|
||||
@if (
|
||||
(isset($cekAlamat['province_code']) && $cekAlamat['province_code'] == $province->code) ||
|
||||
(!isset($cekAlamat['province_code']) &&
|
||||
isset($debitur->province_code) &&
|
||||
$debitur->province_code == $province->code)) selected @endif>
|
||||
{{ $province->name }}
|
||||
</option>
|
||||
<select id="province_code" name="province_code" class="input w-full">
|
||||
<option value="">Pilih Provinsi</option>
|
||||
@foreach ($provinces as $item)
|
||||
<option value="{{ $item->code }}" {{ ($forminspeksi['alamat']['sesuai']['province_code'] ?? '') == $item->code ? 'selected' : '' }}>{{ $item->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@@ -71,8 +65,13 @@
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="city_code" class="form-label max-w-56">Kota/Kabupaten</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="city_code" name="city_code" class="select w-full" onchange="getDistrict(this.value)">
|
||||
<select id="city_code" name="city_code" class="select w-full">
|
||||
<option value="">Pilih Kota/Kabupaten</option>
|
||||
@if(isset($cities))
|
||||
@foreach ($cities as $item)
|
||||
<option value="{{ $item->code }}" {{ ($forminspeksi['alamat']['sesuai']['city_code'] ?? '') == $item->code ? 'selected' : '' }}>{{ $item->name }}</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -80,8 +79,13 @@
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="district_code" class="form-label max-w-56">Kecamatan</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="district_code" name="district_code" class="select w-full" onchange="getVillage(this.value)">
|
||||
<select id="district_code" name="district_code" class="select w-full">
|
||||
<option value="">Pilih Kecamatan</option>
|
||||
@if(isset($districts))
|
||||
@foreach ($districts as $item)
|
||||
<option value="{{ $item->code }}" {{ ($forminspeksi['alamat']['sesuai']['district_code'] ?? '') == $item->code ? 'selected' : '' }}>{{ $item->name }}</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -91,6 +95,11 @@
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="village_code" name="village_code" class="select w-full">
|
||||
<option value="">Pilih Kelurahan</option>
|
||||
@if(isset($villages))
|
||||
@foreach ($villages as $item)
|
||||
<option value="{{ $item->code }}" {{ ($forminspeksi['alamat']['sesuai']['village_code'] ?? '') == $item->code ? 'selected' : '' }}>{{ $item->name }}</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
<div class="card border border-agi-100 bg-white rounded-lg shadow-md overflow-hidden">
|
||||
<div class="card-body">
|
||||
<div class="py-4 px-6">
|
||||
<h1 class="text-md font-medium text-gray-900">Order Penilaian</h1>
|
||||
<div class="card-header bg-agi-50">
|
||||
<h3 class="card-title uppercase">
|
||||
Order Penilaian
|
||||
</h3>
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="{{ url()->previous() }}" class="btn btn-xs btn-info">
|
||||
<i class="ki-filled ki-exit-left"></i> Back
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="grid gap-5 grid-cols-2">
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
@@ -46,10 +52,13 @@
|
||||
|
||||
|
||||
<div class="card border border-agi-100 bg-white rounded-lg shadow-md overflow-hidden">
|
||||
<div class="card-header bg-agi-50">
|
||||
<h3 class="card-title uppercase">
|
||||
Identitas Debitur
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="py-4 px-6">
|
||||
<h1 class="text-md font-medium text-gray-900">Identitas Debitur</h1>
|
||||
</div>
|
||||
|
||||
<div class="grid gap-5">
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
@@ -189,3 +198,92 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card border border-agi-100 rounded-lg overflow-hidden">
|
||||
<div class="card-header bg-agi-50">
|
||||
<h3 class="card-title uppercase">
|
||||
Analisis Fakta
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="grid gap-5">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Faktor Positif</label>
|
||||
<div id="fakta-positif-container" class="flex flex-wrap items-baseline w-full">
|
||||
@if (!empty($forminspeksi['fakta_positif']))
|
||||
@foreach ($forminspeksi['fakta_positif'] as $index => $positif)
|
||||
<div class="fakta_positif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_positif[]" rows="3">{{ old("fakta_positif.$index", $positif) }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
<div class="fakta_positif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_positif[]" rows="3">{{ old('fakta_positif.0', '') }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
<button type="button" class="btn btn-primary btn-sm mt-5"
|
||||
onclick="addClonableItem('fakta-positif-container', 'fakta_positif')">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Faktor Negatif</label>
|
||||
<div id="fakta-negatif-container" class="flex flex-wrap items-baseline w-full">
|
||||
|
||||
@if (!empty($forminspeksi['fakta_negatif']))
|
||||
@foreach ($forminspeksi['fakta_negatif'] as $index => $negatif)
|
||||
<div class="fakta_negatif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_negatif[]" rows="3">{{ old("fakta_negatif.$index", $negatif) }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
<div class="fakta_negatif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_negatif[]" rows="3">{{ old('fakta_negatif.0', $forminspeksi['fakta_negatif'][0] ?? '') }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
<em id="error-fakta_negatif" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
@endif
|
||||
<button type="button" class="btn btn-primary btn-sm mt-5"
|
||||
onclick="addClonableItem('fakta-negatif-container', 'fakta_negatif')">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Catatan Yang Perlu Diperhatikan</label>
|
||||
<div id="catatan-container" class="flex flex-wrap items-baseline w-full">
|
||||
<div class="catatan flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="catatan[]" rows="3">{{ old('catatan.0', $forminspeksi['catatan'][0] ?? '') }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
<em id="error-catatan" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
<button type="button"
|
||||
onclick="addClonableItem('catatan-container', 'catatan')"
|
||||
class="btn btn-primary btn-sm mt-5 ">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,433 @@
|
||||
|
||||
<div class="card-header bg-agi-50">
|
||||
<h3 class="card-title">Data Pembanding</h3>
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="{{ route('surveyor.show', ['id' => request('pembanding')]) }}" class="btn btn-xs btn-info">
|
||||
<i class="ki-filled ki-exit-left"></i> Kembali
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-header bg-agi-50 py-5 flex-wrap flex justify-end">
|
||||
<button type="button" id="addColumnBtn" class="btn btn-primary btn-sm">
|
||||
<i class="ki-filled ki-plus"></i> Tambah Pembanding
|
||||
</button>
|
||||
<button type="button" id="removeColumnBtn" class="btn btn-danger btn-sm ml-2" style="display: none;">
|
||||
<i class="ki-filled ki-minus"></i> Hapus Pembanding
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="scrollable-x-auto">
|
||||
<table id="dataTable" class="table table-auto table-border align-middle text-gray-700 font-medium text-sm">
|
||||
<thead class="bg-gray-50 sticky top-0">
|
||||
<tr>
|
||||
<th class="px-4 py-3 min-w-[200px]">Parameter</th>
|
||||
<th class="px-4 py-3 min-w-[250px]">Objek Penilaian</th>
|
||||
<th class="px-4 py-3 min-w-[250px]">Data Pembanding 1</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- Informasi Dasar -->
|
||||
<tr class="bg-gray-100">
|
||||
<td colspan="3" class="px-4 py-2 font-semibold">Informasi Dasar</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Foto</td>
|
||||
<td class="px-4 py-2">
|
||||
<div class="flex flex-col gap-2">
|
||||
<img id="uploadedImage1"
|
||||
src="{{ isset($fotoForm['object_jaminan'][0]['foto_objek']) ? asset('storage/' . $fotoForm['object_jaminan'][0]['foto_objek']) : '' }}"
|
||||
class="max-w-[200px] {{ isset($fotoForm['object_jaminan'][0]['foto_objek']) ? '' : 'hidden' }}"
|
||||
alt="Uploaded Image">
|
||||
<input type="file" name="foto_objek" class="file-input" accept="image/*"
|
||||
onchange="previewImage(this, 'uploadedImage1')">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<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/*"
|
||||
onchange="previewImage(this, 'uploadedImage2')">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<!-- Data Properti -->
|
||||
<tr class="bg-gray-100">
|
||||
<td colspan="3" class="px-4 py-2 font-semibold">Data </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Nama</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="" class="input">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="" class="input">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Tipe</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="luas_tanah" class="input" value="">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
|
||||
<input type="text" name="luas_tanah_pembanding[]" class="input number-format">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Warna</td>
|
||||
<td class="px-4 py-2">
|
||||
|
||||
<input type="text" name="luas_tanah_bagunan" class="input number-format" value="">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="luas_bangunan_pembanding[]" class="input number-format">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Lokasi</td>
|
||||
<td class="px-4 py-2">
|
||||
|
||||
<input type="text" name="luas_tanah_bagunan" class="input number-format" value="">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="luas_bangunan_pembanding[]" class="input number-format">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Sumber data</td>
|
||||
<td class="px-4 py-2">
|
||||
|
||||
<input type="text" name="luas_tanah_bagunan" class="input number-format" value="">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="luas_bangunan_pembanding[]" class="input number-format">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Tahun</td>
|
||||
<td class="px-4 py-2">
|
||||
|
||||
<input type="text" name="luas_tanah_bagunan" class="input number-format"
|
||||
value="">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="luas_bangunan_pembanding[]" class="input number-format">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Transmisi</td>
|
||||
<td class="px-4 py-2">
|
||||
|
||||
<input type="text" name="luas_tanah_bagunan" class="input number-format"
|
||||
value="">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="luas_bangunan_pembanding[]" class="input number-format">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<!-- Informasi Harga -->
|
||||
<tr class="bg-gray-100">
|
||||
<td colspan="3" class="px-4 py-2 font-semibold">Spesifikasi</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Tahun Pembuatan
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="hak_properti" class="input"
|
||||
value="{{ $inspectionData['asset']['hak_properti'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="hak_properti_pembanding[]" class="input">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Merek / Buatan
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="penawaran" class="input"
|
||||
value="{{ $inspectionData['asset']['penawaran'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="penawaran_pembanding[]" class="input">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Kapasitas / HP
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="telepon" class="input"
|
||||
value="{{ $inspectionData['asset']['telepon'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="telepon_pembanding[]" class="input">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Power</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="status_nara_sumber" class="input"
|
||||
value="{{ $inspectionData['asset']['status_nara_sumber'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="status_nara_sumber_pembanding[]" class="input">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Kondisi</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="nama_nara_sumber" class="input"
|
||||
value="{{ $inspectionData['asset']['nama_nara_sumber'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="nama_nara_sumber_pembanding[]" class="input">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<!-- Lokasi -->
|
||||
<tr class="bg-gray-100">
|
||||
<td colspan="3" class="px-4 py-2 font-semibold">Lokasi</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Koordinat</td>
|
||||
<td class="px-4 py-2">
|
||||
<div class="grid grid-cols-2 gap-2">
|
||||
<input type="text" name="kordinat_lat" class="input" placeholder="Latitude"
|
||||
value="{{ $inspectionData['asset']['kordinat_lat'] ?? '' }}">
|
||||
<input type="text" name="kordinat_lng" class="input" placeholder="Longitude"
|
||||
value="{{ $inspectionData['asset']['kordinat_lng'] ?? '' }}">
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<div class="grid grid-cols-2 gap-2">
|
||||
<input type="text" name="kordinat_lat_pembanding[]" class="input"
|
||||
placeholder="Latitude">
|
||||
<input type="text" name="kordinat_lng_pembanding[]" class="input"
|
||||
placeholder="Longitude">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Alamat</td>
|
||||
<td class="px-4 py-2">
|
||||
@php
|
||||
$statusAlamat = isset($inspectionData['asset']['alamat']['sesuai'])
|
||||
? 'sesuai'
|
||||
: 'tidak sesuai';
|
||||
$address = $inspectionData['asset']['alamat'][$statusAlamat]['address'] ?? null;
|
||||
@endphp
|
||||
<textarea name="address" class="input py-2" rows="2">{{ $address }}</textarea>
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<textarea name="address_pembanding[]" class="input py-2" rows="2"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Provinsi</td>
|
||||
<td class="px-4 py-2">
|
||||
<select id="province_code" name="province_code" class="input w-full">
|
||||
@php
|
||||
$statusKey = isset($inspectionData['asset']['alamat']['sesuai'])
|
||||
? 'sesuai'
|
||||
: 'tidak sesuai';
|
||||
$address = $inspectionData['asset']['alamat'][$statusKey]['province_code'] ?? null;
|
||||
@endphp
|
||||
<option value="">Select Province</option>
|
||||
@foreach ($provinces as $province)
|
||||
@php
|
||||
$statusKey = isset($inspectionData['asset']['alamat']['sesuai'])
|
||||
? 'sesuai'
|
||||
: 'tidak sesuai';
|
||||
$selectedProvince =
|
||||
$inspectionData['asset']['alamat'][$statusKey]['province_code'] ?? null;
|
||||
@endphp
|
||||
|
||||
<option value="{{ $province->code }}"
|
||||
{{ $selectedProvince == $province->code ? 'selected' : '' }}>
|
||||
{{ $province->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<select id="province_code_pembanding" name="province_code_pembanding[]"
|
||||
onchange="handleProvinceChange(this)" class="input w-full">
|
||||
<option value="">Pilih Provinsi</option>
|
||||
@foreach ($provinces as $province)
|
||||
<option value="{{ $province->code }}">{{ $province->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Kabupaten/Kota</td>
|
||||
<td class="px-4 py-2">
|
||||
<select id="city_code" name="city_code" class="select w-full">
|
||||
@php
|
||||
|
||||
$statusKey = isset($inspectionData['asset']['alamat']['sesuai'])
|
||||
? 'sesuai'
|
||||
: 'tidak sesuai';
|
||||
$selectedCity = $inspectionData['asset']['alamat'][$statusKey]['city_code'] ?? null;
|
||||
@endphp
|
||||
<option value="">Pilih Kota/Kabupaten</option>
|
||||
@if (isset($selectedCity))
|
||||
@foreach ($cities as $city)
|
||||
<option value="{{ $city->code }}"
|
||||
{{ $selectedCity == $city->code ? 'selected' : '' }}>
|
||||
{{ $city->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<select id="city_code_pembanding" name="city_code_pembanding[]"
|
||||
onchange="handleCityChange(this)" class="input w-full">
|
||||
<option value="">Pilih Kota/Kabupaten</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Kecamatan</td>
|
||||
<td class="px-4 py-2">
|
||||
<select id="district_code" name="district_code" class="select w-full">
|
||||
@php
|
||||
|
||||
$statusKey = isset($inspectionData['asset']['alamat']['sesuai'])
|
||||
? 'sesuai'
|
||||
: 'tidak sesuai';
|
||||
$selectedDisrict =
|
||||
$inspectionData['asset']['alamat'][$statusKey]['district_code'] ?? null;
|
||||
@endphp
|
||||
<option value="">Pilih Kecamatan</option>
|
||||
@if (isset($selectedDisrict))
|
||||
@foreach ($districts as $district)
|
||||
<option value="{{ $district->code }}"
|
||||
{{ $selectedDisrict == $district->code ? 'selected' : '' }}>
|
||||
{{ $district->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
|
||||
<select id="district_code_pembanding" name="district_code_pembanding[]"
|
||||
onchange="handleDistrictChange(this)" class="input w-full">
|
||||
<option value="">Pilih Kecamatan</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Desa/Kelurahan</td>
|
||||
<td class="px-4 py-2">
|
||||
<select id="village_code" name="village_code" class="select w-full">
|
||||
@php
|
||||
$statusKey = isset($inspectionData['asset']['alamat']['sesuai'])
|
||||
? 'sesuai'
|
||||
: 'tidak sesuai';
|
||||
$selectedDesa =
|
||||
$inspectionData['asset']['alamat'][$statusKey]['village_code'] ?? null;
|
||||
@endphp
|
||||
<option value="">Pilih Kecamatan</option>
|
||||
@if (isset($selectedDesa))
|
||||
@foreach ($villages as $village)
|
||||
<option value="{{ $village->code }}"
|
||||
{{ $selectedDesa == $village->code ? 'selected' : '' }}>
|
||||
{{ $village->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<select id="village_code_pembanding" name="village_code_pembanding[]"
|
||||
class="input w-full">
|
||||
<option value="">Pilih Desa/Kelurahan</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="bg-gray-100">
|
||||
<td colspan="3" class="px-4 py-2 font-semibold">Harga Per Meter</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Harga</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="harga" class="input currency-format"
|
||||
value="{{ $inspectionData['asset']['harga'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="harga_pembanding[]" class="input currency-format">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Diskon</td>
|
||||
<td class="px-4 py-2">
|
||||
<div class="input">
|
||||
<input type="text" name="diskon" class=" currency"
|
||||
value="{{ $inspectionData['asset']['diskon'] ?? '' }}">
|
||||
<span class="btn btn-icon">
|
||||
<i class="ki-outline ki-percentage"></i>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td class=" px-4 py-2">
|
||||
<div class="input">
|
||||
<input type="text" name="diskon_pembanding[]" class="currency">
|
||||
<span class="btn btn-icon">
|
||||
<i class="ki-outline ki-percentage"></i>
|
||||
</i>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="display: none;">
|
||||
<td class="px-4 py-2">Total</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="total" class="input currency"
|
||||
value="{{ $inspectionData['asset']['total'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="total_pembanding[]" class="input currency-format">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Harga Setelah Diskon</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="harga_diskon" class="input currency-format" readonly
|
||||
value="{{ $inspectionData['asset']['harga_diskon'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="harga_diskon_pembanding[]" readonly
|
||||
class="input currency-format">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,448 @@
|
||||
|
||||
<div class="card-header bg-agi-50">
|
||||
<h3 class="card-title">Data Pembanding</h3>
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="{{ route('surveyor.show', ['id' => request('pembanding')]) }}"
|
||||
class="btn btn-xs btn-info">
|
||||
<i class="ki-filled ki-exit-left"></i> Kembali
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-header bg-agi-50 py-5 flex-wrap flex justify-end">
|
||||
<button type="button" id="addColumnBtn" class="btn btn-primary btn-sm">
|
||||
<i class="ki-filled ki-plus"></i> Tambah Pembanding
|
||||
</button>
|
||||
<button type="button" id="removeColumnBtn" class="btn btn-danger btn-sm ml-2"
|
||||
style="display: none;">
|
||||
<i class="ki-filled ki-minus"></i> Hapus Pembanding
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{{-- @php
|
||||
print_r($inspectionData);
|
||||
@endphp --}}
|
||||
|
||||
<div class="card-body">
|
||||
<div class="scrollable-x-auto">
|
||||
<table id="dataTable"
|
||||
class="table table-auto table-border align-middle text-gray-700 font-medium text-sm">
|
||||
<thead class="bg-gray-50 sticky top-0">
|
||||
<tr>
|
||||
<th class="px-4 py-3 min-w-[200px]">Parameter</th>
|
||||
<th class="px-4 py-3 min-w-[250px]">Objek Penilaian</th>
|
||||
<th class="px-4 py-3 min-w-[250px]">Data Pembanding 1</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- Informasi Dasar -->
|
||||
<tr class="bg-gray-100">
|
||||
<td colspan="3" class="px-4 py-2 font-semibold">Informasi Dasar</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Foto</td>
|
||||
<td class="px-4 py-2">
|
||||
<div class="flex flex-col gap-2">
|
||||
<img id="uploadedImage1"
|
||||
src="{{ isset($fotoForm['object_jaminan'][0]['foto_objek']) ? asset('storage/' . $fotoForm['object_jaminan'][0]['foto_objek']) : '' }}"
|
||||
class="max-w-[200px] {{ isset($fotoForm['object_jaminan'][0]['foto_objek']) ? '' : 'hidden' }}"
|
||||
alt="Uploaded Image">
|
||||
<input type="file" name="foto_objek" class="file-input"
|
||||
accept="image/*" onchange="previewImage(this, 'uploadedImage1')">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<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/*" onchange="previewImage(this, 'uploadedImage2')">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<!-- Data Properti -->
|
||||
<tr class="bg-gray-100">
|
||||
<td colspan="3" class="px-4 py-2 font-semibold">Data Properti</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Jenis Aset</td>
|
||||
<td class="px-4 py-2">
|
||||
<select name="jenis_aset" class="select">
|
||||
<option value="">Pilih Jenis Aset</option>
|
||||
@foreach ($data['jenisJaminan'] as $item)
|
||||
<option value="{{ $item->name }}"
|
||||
{{ ($inspectionData['asset']['jenis_asset']['sesuai'] ?? '') == $item->name ? 'selected' : '' }}>
|
||||
{{ $item->name }}</option>
|
||||
@endforeach
|
||||
|
||||
</select>
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<select name="jenis_aset_pembanding[]" class="select">
|
||||
<option value="">Pilih Jenis Aset</option>
|
||||
@foreach ($data['jenisJaminan'] as $item)
|
||||
<option value="{{ $item->name }}"
|
||||
{{ ($inspectionData['jenis_aset'] ?? '') == $item->name ? 'selected' : '' }}>
|
||||
{{ $item->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Luas Tanah (m²)</td>
|
||||
@php
|
||||
$cekLuas =
|
||||
isset($inspectionData['tanah']['luas_tanah']) == 'sesuai'
|
||||
? 'sesuai'
|
||||
: 'tidak sesuai';
|
||||
|
||||
@endphp
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="luas_tanah" class="input number-format"
|
||||
value="{{ $inspectionData['tanah']['luas_tanah']['sesuai'] ?? ($inspectionData['tanah']['luas_tanah']['tidak sesuai'] ?? '') }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
|
||||
<input type="text" name="luas_tanah_pembanding[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Luas Bangunan (m²)</td>
|
||||
<td class="px-4 py-2">
|
||||
|
||||
<input type="text" name="luas_tanah_bagunan"
|
||||
class="input number-format"
|
||||
value="{{ $inspectionData['bangunan']['luas_tanah_bagunan']['sesuai'] ?? ($inspectionData['bangunan']['luas_tanah_bagunan']['tidak sesuai'] ?? '') }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="luas_bangunan_pembanding[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<!-- Informasi Harga -->
|
||||
<tr class="bg-gray-100">
|
||||
<td colspan="3" class="px-4 py-2 font-semibold">Informasi</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Hak atas properti yang dialihkan</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="hak_properti" class="input"
|
||||
value="{{ $inspectionData['asset']['hak_properti'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="hak_properti_pembanding[]"
|
||||
class="input">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Penawaran/ Transaksi</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="penawaran" class="input"
|
||||
value="{{ $inspectionData['asset']['penawaran'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="penawaran_pembanding[]"
|
||||
class="input">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Telepon Contact Person</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="telepon" class="input"
|
||||
value="{{ $inspectionData['asset']['telepon'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="telepon_pembanding[]"
|
||||
class="input">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Status Narasumber</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="status_nara_sumber" class="input"
|
||||
value="{{ $inspectionData['asset']['status_nara_sumber'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="status_nara_sumber_pembanding[]"
|
||||
class="input">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Nama Narasumber</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="nama_nara_sumber" class="input"
|
||||
value="{{ $inspectionData['asset']['nama_nara_sumber'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="nama_nara_sumber_pembanding[]"
|
||||
class="input">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<!-- Lokasi -->
|
||||
<tr class="bg-gray-100">
|
||||
<td colspan="3" class="px-4 py-2 font-semibold">Lokasi</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Koordinat</td>
|
||||
<td class="px-4 py-2">
|
||||
<div class="grid grid-cols-2 gap-2">
|
||||
<input type="text" name="kordinat_lat" class="input"
|
||||
placeholder="Latitude"
|
||||
value="{{ $inspectionData['asset']['kordinat_lat'] ?? '' }}">
|
||||
<input type="text" name="kordinat_lng" class="input"
|
||||
placeholder="Longitude"
|
||||
value="{{ $inspectionData['asset']['kordinat_lng'] ?? '' }}">
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<div class="grid grid-cols-2 gap-2">
|
||||
<input type="text" name="kordinat_lat_pembanding[]" class="input"
|
||||
placeholder="Latitude">
|
||||
<input type="text" name="kordinat_lng_pembanding[]" class="input"
|
||||
placeholder="Longitude">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Alamat</td>
|
||||
<td class="px-4 py-2">
|
||||
@php
|
||||
$statusAlamat = isset($inspectionData['asset']['alamat']['sesuai'])
|
||||
? 'sesuai'
|
||||
: 'tidak sesuai';
|
||||
$address =
|
||||
$inspectionData['asset']['alamat'][$statusAlamat]['address'] ??
|
||||
null;
|
||||
@endphp
|
||||
<textarea name="address" class="input py-2" rows="2">{{ $address }}</textarea>
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<textarea name="address_pembanding[]" class="input py-2" rows="2"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Provinsi</td>
|
||||
<td class="px-4 py-2">
|
||||
<select id="province_code" name="province_code" class="input w-full">
|
||||
@php
|
||||
$statusKey = isset($inspectionData['asset']['alamat']['sesuai'])
|
||||
? 'sesuai'
|
||||
: 'tidak sesuai';
|
||||
$address =
|
||||
$inspectionData['asset']['alamat'][$statusKey][
|
||||
'province_code'
|
||||
] ?? null;
|
||||
@endphp
|
||||
<option value="">Select Province</option>
|
||||
@foreach ($provinces as $province)
|
||||
@php
|
||||
$statusKey = isset(
|
||||
$inspectionData['asset']['alamat']['sesuai'],
|
||||
)
|
||||
? 'sesuai'
|
||||
: 'tidak sesuai';
|
||||
$selectedProvince =
|
||||
$inspectionData['asset']['alamat'][$statusKey][
|
||||
'province_code'
|
||||
] ?? null;
|
||||
@endphp
|
||||
|
||||
<option value="{{ $province->code }}"
|
||||
{{ $selectedProvince == $province->code ? 'selected' : '' }}>
|
||||
{{ $province->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<select id="province_code_pembanding" name="province_code_pembanding[]"
|
||||
onchange="handleProvinceChange(this)" class="input w-full">
|
||||
<option value="">Pilih Provinsi</option>
|
||||
@foreach ($provinces as $province)
|
||||
<option value="{{ $province->code }}">{{ $province->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Kabupaten/Kota</td>
|
||||
<td class="px-4 py-2">
|
||||
<select id="city_code" name="city_code" class="select w-full">
|
||||
@php
|
||||
|
||||
$statusKey = isset($inspectionData['asset']['alamat']['sesuai'])
|
||||
? 'sesuai'
|
||||
: 'tidak sesuai';
|
||||
$selectedCity =
|
||||
$inspectionData['asset']['alamat'][$statusKey][
|
||||
'city_code'
|
||||
] ?? null;
|
||||
@endphp
|
||||
<option value="">Pilih Kota/Kabupaten</option>
|
||||
@if (isset($selectedCity))
|
||||
@foreach ($cities as $city)
|
||||
<option value="{{ $city->code }}"
|
||||
{{ $selectedCity == $city->code ? 'selected' : '' }}>
|
||||
{{ $city->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<select id="city_code_pembanding" name="city_code_pembanding[]"
|
||||
onchange="handleCityChange(this)" class="input w-full">
|
||||
<option value="">Pilih Kota/Kabupaten</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Kecamatan</td>
|
||||
<td class="px-4 py-2">
|
||||
<select id="district_code" name="district_code" class="select w-full">
|
||||
@php
|
||||
|
||||
$statusKey = isset($inspectionData['asset']['alamat']['sesuai'])
|
||||
? 'sesuai'
|
||||
: 'tidak sesuai';
|
||||
$selectedDisrict =
|
||||
$inspectionData['asset']['alamat'][$statusKey][
|
||||
'district_code'
|
||||
] ?? null;
|
||||
@endphp
|
||||
<option value="">Pilih Kecamatan</option>
|
||||
@if (isset($selectedDisrict))
|
||||
@foreach ($districts as $district)
|
||||
<option value="{{ $district->code }}"
|
||||
{{ $selectedDisrict == $district->code ? 'selected' : '' }}>
|
||||
{{ $district->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
|
||||
<select id="district_code_pembanding" name="district_code_pembanding[]"
|
||||
onchange="handleDistrictChange(this)" class="input w-full">
|
||||
<option value="">Pilih Kecamatan</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Desa/Kelurahan</td>
|
||||
<td class="px-4 py-2">
|
||||
<select id="village_code" name="village_code" class="select w-full">
|
||||
@php
|
||||
$statusKey = isset($inspectionData['asset']['alamat']['sesuai'])
|
||||
? 'sesuai'
|
||||
: 'tidak sesuai';
|
||||
$selectedDesa =
|
||||
$inspectionData['asset']['alamat'][$statusKey][
|
||||
'village_code'
|
||||
] ?? null;
|
||||
@endphp
|
||||
<option value="">Pilih Kecamatan</option>
|
||||
@if (isset($selectedDesa))
|
||||
@foreach ($villages as $village)
|
||||
<option value="{{ $village->code }}"
|
||||
{{ $selectedDesa == $village->code ? 'selected' : '' }}>
|
||||
{{ $village->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<select id="village_code_pembanding" name="village_code_pembanding[]"
|
||||
class="input w-full">
|
||||
<option value="">Pilih Desa/Kelurahan</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="bg-gray-100">
|
||||
<td colspan="3" class="px-4 py-2 font-semibold">Harga Per Meter</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2">Harga</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="harga" class="input currency-format"
|
||||
value="{{ $inspectionData['asset']['harga'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="harga_pembanding[]"
|
||||
class="input currency-format">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Diskon</td>
|
||||
<td class="px-4 py-2">
|
||||
<div class="input">
|
||||
<input type="text" name="diskon" class=" currency"
|
||||
value="{{ $inspectionData['asset']['diskon'] ?? '' }}">
|
||||
<span class="btn btn-icon">
|
||||
<i class="ki-outline ki-percentage"></i>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td class=" px-4 py-2">
|
||||
<div class="input">
|
||||
<input type="text" name="diskon_pembanding[]"
|
||||
class="currency">
|
||||
<span class="btn btn-icon">
|
||||
<i class="ki-outline ki-percentage"></i>
|
||||
</i>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="display: none;">
|
||||
<td class="px-4 py-2">Total</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="total" class="input currency"
|
||||
value="{{ $inspectionData['asset']['total'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="total_pembanding[]"
|
||||
class="input currency-format">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-4 py-2">Harga Setelah Diskon</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="harga_diskon" class="input currency-format" readonly
|
||||
value="{{ $inspectionData['asset']['harga_diskon'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="harga_diskon_pembanding[]" readonly
|
||||
class="input currency-format">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -65,24 +65,6 @@
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Hadap Mata Angin</label>
|
||||
<div class="mt-2">
|
||||
@if (isset($permohonan->debiture->documents))
|
||||
@foreach ($permohonan->debiture->documents as $item)
|
||||
@php
|
||||
$luas = $item->detail;
|
||||
if(is_array($luas)){
|
||||
$details = json_decode($luas[0]->details, true);
|
||||
$hadap_mata_angin = isset($details['hadap_mata_angin'])
|
||||
? $details['hadap_mata_angin']
|
||||
: 'N/A';
|
||||
} else {
|
||||
$luas_tanah = $hadap_mata_angin= 'N/A';
|
||||
}
|
||||
@endphp
|
||||
<input type="hidden" name="hadap_mata_angin_sesuai" class="input"
|
||||
value="{{ $hadap_mata_angin }}">
|
||||
<p class="text-2sm text-gray-700">{{ $hadap_mata_angin }} m<sup>2</sup></p>
|
||||
@endforeach
|
||||
@endif
|
||||
<div class="flex-wrap items-stretch">
|
||||
<div class="grid grid-cols-3 md:grid-cols-3 gap-4 mt-2">
|
||||
<label class="form-label flex items-center gap-3 text-nowrap">
|
||||
|
||||
Reference in New Issue
Block a user